@leonardo-ai/sdk 4.3.0 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.speakeasy/gen.lock +29 -7
- package/README.md +4 -0
- package/docs/sdks/generation/README.md +183 -2
- package/hooks/types.d.ts +1 -1
- package/hooks/types.d.ts.map +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/security.d.ts +6 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +2 -0
- package/lib/security.js.map +1 -1
- package/package.json +1 -1
- package/sdk/dataset.d.ts.map +1 -1
- package/sdk/dataset.js +25 -5
- package/sdk/dataset.js.map +1 -1
- package/sdk/element.d.ts.map +1 -1
- package/sdk/element.js +5 -1
- package/sdk/element.js.map +1 -1
- package/sdk/generation.d.ts +28 -0
- package/sdk/generation.d.ts.map +1 -1
- package/sdk/generation.js +283 -7
- package/sdk/generation.js.map +1 -1
- package/sdk/initimage.d.ts.map +1 -1
- package/sdk/initimage.js +15 -3
- package/sdk/initimage.js.map +1 -1
- package/sdk/model.d.ts.map +1 -1
- package/sdk/model.js +30 -6
- package/sdk/model.js.map +1 -1
- package/sdk/models/operations/index.d.ts +4 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +4 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/postgenerationslcm.d.ts +146 -0
- package/sdk/models/operations/postgenerationslcm.d.ts.map +1 -0
- package/sdk/models/operations/postgenerationslcm.js +194 -0
- package/sdk/models/operations/postgenerationslcm.js.map +1 -0
- package/sdk/models/operations/postlcminpainting.d.ts +152 -0
- package/sdk/models/operations/postlcminpainting.d.ts.map +1 -0
- package/sdk/models/operations/postlcminpainting.js +198 -0
- package/sdk/models/operations/postlcminpainting.js.map +1 -0
- package/sdk/models/operations/postlcminstantrefine.d.ts +146 -0
- package/sdk/models/operations/postlcminstantrefine.d.ts.map +1 -0
- package/sdk/models/operations/postlcminstantrefine.js +194 -0
- package/sdk/models/operations/postlcminstantrefine.js.map +1 -0
- package/sdk/models/operations/postlcmupscale.d.ts +167 -0
- package/sdk/models/operations/postlcmupscale.d.ts.map +1 -0
- package/sdk/models/operations/postlcmupscale.js +218 -0
- package/sdk/models/operations/postlcmupscale.js.map +1 -0
- package/sdk/models/shared/index.d.ts +1 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +1 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/lcmgenerationstyle.d.ts +23 -0
- package/sdk/models/shared/lcmgenerationstyle.d.ts.map +1 -0
- package/sdk/models/shared/lcmgenerationstyle.js +30 -0
- package/sdk/models/shared/lcmgenerationstyle.js.map +1 -0
- package/sdk/models/shared/security.d.ts +12 -0
- package/sdk/models/shared/security.d.ts.map +1 -1
- package/sdk/models/shared/security.js +24 -0
- package/sdk/models/shared/security.js.map +1 -1
- package/sdk/user.d.ts.map +1 -1
- package/sdk/user.js +5 -1
- package/sdk/user.js.map +1 -1
- package/sdk/variation.d.ts.map +1 -1
- package/sdk/variation.js +20 -4
- package/sdk/variation.js.map +1 -1
- package/src/hooks/types.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/security.ts +9 -0
- package/src/sdk/dataset.ts +25 -5
- package/src/sdk/element.ts +5 -1
- package/src/sdk/generation.ts +367 -7
- package/src/sdk/initimage.ts +15 -3
- package/src/sdk/model.ts +30 -6
- package/src/sdk/models/operations/index.ts +4 -0
- package/src/sdk/models/operations/postgenerationslcm.ts +309 -0
- package/src/sdk/models/operations/postlcminpainting.ts +326 -0
- package/src/sdk/models/operations/postlcminstantrefine.ts +325 -0
- package/src/sdk/models/operations/postlcmupscale.ts +360 -0
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/lcmgenerationstyle.ts +28 -0
- package/src/sdk/models/shared/security.ts +33 -0
- package/src/sdk/user.ts +5 -1
- package/src/sdk/variation.ts +20 -4
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The style to generate LCM images with.
|
|
9
|
+
*/
|
|
10
|
+
export enum LcmGenerationStyle {
|
|
11
|
+
Anime = "ANIME",
|
|
12
|
+
Cinematic = "CINEMATIC",
|
|
13
|
+
DigitalArt = "DIGITAL_ART",
|
|
14
|
+
Dynamic = "DYNAMIC",
|
|
15
|
+
Environment = "ENVIRONMENT",
|
|
16
|
+
FantasyArt = "FANTASY_ART",
|
|
17
|
+
Illustration = "ILLUSTRATION",
|
|
18
|
+
Photography = "PHOTOGRAPHY",
|
|
19
|
+
Render3D = "RENDER_3D",
|
|
20
|
+
Raytraced = "RAYTRACED",
|
|
21
|
+
SketchBw = "SKETCH_BW",
|
|
22
|
+
SketchColor = "SKETCH_COLOR",
|
|
23
|
+
Vibrant = "VIBRANT",
|
|
24
|
+
None = "NONE",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const LcmGenerationStyle$ = z.nativeEnum(LcmGenerationStyle);
|
|
@@ -2,6 +2,39 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
|
|
5
7
|
export type Security = {
|
|
6
8
|
bearerAuth: string;
|
|
7
9
|
};
|
|
10
|
+
|
|
11
|
+
/** @internal */
|
|
12
|
+
export namespace Security$ {
|
|
13
|
+
export type Inbound = {
|
|
14
|
+
bearerAuth: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const inboundSchema: z.ZodType<Security, z.ZodTypeDef, Inbound> = z
|
|
18
|
+
.object({
|
|
19
|
+
bearerAuth: z.string(),
|
|
20
|
+
})
|
|
21
|
+
.transform((v) => {
|
|
22
|
+
return {
|
|
23
|
+
bearerAuth: v.bearerAuth,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export type Outbound = {
|
|
28
|
+
bearerAuth: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export const outboundSchema: z.ZodType<Outbound, z.ZodTypeDef, Security> = z
|
|
32
|
+
.object({
|
|
33
|
+
bearerAuth: z.string(),
|
|
34
|
+
})
|
|
35
|
+
.transform((v) => {
|
|
36
|
+
return {
|
|
37
|
+
bearerAuth: v.bearerAuth,
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
}
|
package/src/sdk/user.ts
CHANGED
|
@@ -60,9 +60,13 @@ export class User extends ClientSDK {
|
|
|
60
60
|
} else {
|
|
61
61
|
security$ = {};
|
|
62
62
|
}
|
|
63
|
+
const context = {
|
|
64
|
+
operationID: "getUserSelf",
|
|
65
|
+
oAuth2Scopes: [],
|
|
66
|
+
securitySource: this.options$.bearerAuth,
|
|
67
|
+
};
|
|
63
68
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
64
69
|
|
|
65
|
-
const context = { operationID: "getUserSelf" };
|
|
66
70
|
const doOptions = { context, errorCodes: [] };
|
|
67
71
|
const request = this.createRequest$(
|
|
68
72
|
{
|
package/src/sdk/variation.ts
CHANGED
|
@@ -72,9 +72,13 @@ export class Variation extends ClientSDK {
|
|
|
72
72
|
} else {
|
|
73
73
|
security$ = {};
|
|
74
74
|
}
|
|
75
|
+
const context = {
|
|
76
|
+
operationID: "createVariationNoBG",
|
|
77
|
+
oAuth2Scopes: [],
|
|
78
|
+
securitySource: this.options$.bearerAuth,
|
|
79
|
+
};
|
|
75
80
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
76
81
|
|
|
77
|
-
const context = { operationID: "createVariationNoBG" };
|
|
78
82
|
const doOptions = { context, errorCodes: [] };
|
|
79
83
|
const request = this.createRequest$(
|
|
80
84
|
{
|
|
@@ -153,9 +157,13 @@ export class Variation extends ClientSDK {
|
|
|
153
157
|
} else {
|
|
154
158
|
security$ = {};
|
|
155
159
|
}
|
|
160
|
+
const context = {
|
|
161
|
+
operationID: "createVariationUpscale",
|
|
162
|
+
oAuth2Scopes: [],
|
|
163
|
+
securitySource: this.options$.bearerAuth,
|
|
164
|
+
};
|
|
156
165
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
157
166
|
|
|
158
|
-
const context = { operationID: "createVariationUpscale" };
|
|
159
167
|
const doOptions = { context, errorCodes: [] };
|
|
160
168
|
const request = this.createRequest$(
|
|
161
169
|
{
|
|
@@ -235,9 +243,13 @@ export class Variation extends ClientSDK {
|
|
|
235
243
|
} else {
|
|
236
244
|
security$ = {};
|
|
237
245
|
}
|
|
246
|
+
const context = {
|
|
247
|
+
operationID: "getVariationById",
|
|
248
|
+
oAuth2Scopes: [],
|
|
249
|
+
securitySource: this.options$.bearerAuth,
|
|
250
|
+
};
|
|
238
251
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
239
252
|
|
|
240
|
-
const context = { operationID: "getVariationById" };
|
|
241
253
|
const doOptions = { context, errorCodes: [] };
|
|
242
254
|
const request = this.createRequest$(
|
|
243
255
|
{
|
|
@@ -314,9 +326,13 @@ export class Variation extends ClientSDK {
|
|
|
314
326
|
} else {
|
|
315
327
|
security$ = {};
|
|
316
328
|
}
|
|
329
|
+
const context = {
|
|
330
|
+
operationID: "post_/variations/unzoom",
|
|
331
|
+
oAuth2Scopes: [],
|
|
332
|
+
securitySource: this.options$.bearerAuth,
|
|
333
|
+
};
|
|
317
334
|
const securitySettings$ = this.resolveGlobalSecurity(security$);
|
|
318
335
|
|
|
319
|
-
const context = { operationID: "post_/variations/unzoom" };
|
|
320
336
|
const doOptions = { context, errorCodes: [] };
|
|
321
337
|
const request = this.createRequest$(
|
|
322
338
|
{
|