-
Notifications
You must be signed in to change notification settings - Fork 16
/
listelements.ts
173 lines (160 loc) · 5.52 KB
/
listelements.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
*/
import { remap as remap$ } from "../../../lib/primitives";
import * as shared from "../shared";
import * as z from "zod";
/**
* columns and relationships of "elements"
*/
export type Loras = {
/**
* Unique identifier for the element. Elements can be found from the List Elements endpoint.
*/
akUUID?: string | null | undefined;
/**
* The base version of stable diffusion to use if not using a custom model. v1_5 is 1.5, v2 is 2.1, if not specified it will default to v1_5. Also includes SDXL and SDXL Lightning models
*/
baseModel?: shared.SdVersions | undefined;
/**
* Name of the creator of the element
*/
creatorName?: string | null | undefined;
/**
* Description for the element
*/
description?: string | null | undefined;
/**
* Name of the element
*/
name?: string | null | undefined;
/**
* URL of the element image
*/
urlImage?: string | null | undefined;
/**
* Default weight for the element
*/
weightDefault?: number | null | undefined;
/**
* Maximum weight for the element
*/
weightMax?: number | null | undefined;
/**
* Minimum weight for the element
*/
weightMin?: number | null | undefined;
};
/**
* Responses for GET /api/rest/v1/elements
*/
export type ListElementsResponseBody = {
loras?: Array<Loras> | undefined;
};
export type ListElementsResponse = {
/**
* HTTP response content type for this operation
*/
contentType: string;
/**
* HTTP response status code for this operation
*/
statusCode: number;
/**
* Raw HTTP response; suitable for custom response parsing
*/
rawResponse: Response;
/**
* Responses for GET /api/rest/v1/elements
*/
object?: ListElementsResponseBody | undefined;
};
/** @internal */
export namespace Loras$ {
export const inboundSchema: z.ZodType<Loras, z.ZodTypeDef, unknown> = z.object({
akUUID: z.nullable(z.string()).optional(),
baseModel: shared.SdVersions$.inboundSchema.optional(),
creatorName: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
name: z.nullable(z.string()).optional(),
urlImage: z.nullable(z.string()).optional(),
weightDefault: z.nullable(z.number().int()).optional(),
weightMax: z.nullable(z.number().int()).optional(),
weightMin: z.nullable(z.number().int()).optional(),
});
export type Outbound = {
akUUID?: string | null | undefined;
baseModel?: string | undefined;
creatorName?: string | null | undefined;
description?: string | null | undefined;
name?: string | null | undefined;
urlImage?: string | null | undefined;
weightDefault?: number | null | undefined;
weightMax?: number | null | undefined;
weightMin?: number | null | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Loras> = z.object({
akUUID: z.nullable(z.string()).optional(),
baseModel: shared.SdVersions$.outboundSchema.optional(),
creatorName: z.nullable(z.string()).optional(),
description: z.nullable(z.string()).optional(),
name: z.nullable(z.string()).optional(),
urlImage: z.nullable(z.string()).optional(),
weightDefault: z.nullable(z.number().int()).optional(),
weightMax: z.nullable(z.number().int()).optional(),
weightMin: z.nullable(z.number().int()).optional(),
});
}
/** @internal */
export namespace ListElementsResponseBody$ {
export const inboundSchema: z.ZodType<ListElementsResponseBody, z.ZodTypeDef, unknown> =
z.object({
loras: z.array(z.lazy(() => Loras$.inboundSchema)).optional(),
});
export type Outbound = {
loras?: Array<Loras$.Outbound> | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListElementsResponseBody> =
z.object({
loras: z.array(z.lazy(() => Loras$.outboundSchema)).optional(),
});
}
/** @internal */
export namespace ListElementsResponse$ {
export const inboundSchema: z.ZodType<ListElementsResponse, z.ZodTypeDef, unknown> = z
.object({
ContentType: z.string(),
StatusCode: z.number().int(),
RawResponse: z.instanceof(Response),
object: z.lazy(() => ListElementsResponseBody$.inboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
ContentType: "contentType",
StatusCode: "statusCode",
RawResponse: "rawResponse",
});
});
export type Outbound = {
ContentType: string;
StatusCode: number;
RawResponse: never;
object?: ListElementsResponseBody$.Outbound | undefined;
};
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, ListElementsResponse> = z
.object({
contentType: z.string(),
statusCode: z.number().int(),
rawResponse: z.instanceof(Response).transform(() => {
throw new Error("Response cannot be serialized");
}),
object: z.lazy(() => ListElementsResponseBody$.outboundSchema).optional(),
})
.transform((v) => {
return remap$(v, {
contentType: "ContentType",
statusCode: "StatusCode",
rawResponse: "RawResponse",
});
});
}