@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.
Files changed (84) hide show
  1. package/.speakeasy/gen.lock +29 -7
  2. package/README.md +4 -0
  3. package/docs/sdks/generation/README.md +183 -2
  4. package/hooks/types.d.ts +1 -1
  5. package/hooks/types.d.ts.map +1 -1
  6. package/lib/config.d.ts +3 -3
  7. package/lib/config.js +3 -3
  8. package/lib/security.d.ts +6 -1
  9. package/lib/security.d.ts.map +1 -1
  10. package/lib/security.js +2 -0
  11. package/lib/security.js.map +1 -1
  12. package/package.json +1 -1
  13. package/sdk/dataset.d.ts.map +1 -1
  14. package/sdk/dataset.js +25 -5
  15. package/sdk/dataset.js.map +1 -1
  16. package/sdk/element.d.ts.map +1 -1
  17. package/sdk/element.js +5 -1
  18. package/sdk/element.js.map +1 -1
  19. package/sdk/generation.d.ts +28 -0
  20. package/sdk/generation.d.ts.map +1 -1
  21. package/sdk/generation.js +283 -7
  22. package/sdk/generation.js.map +1 -1
  23. package/sdk/initimage.d.ts.map +1 -1
  24. package/sdk/initimage.js +15 -3
  25. package/sdk/initimage.js.map +1 -1
  26. package/sdk/model.d.ts.map +1 -1
  27. package/sdk/model.js +30 -6
  28. package/sdk/model.js.map +1 -1
  29. package/sdk/models/operations/index.d.ts +4 -0
  30. package/sdk/models/operations/index.d.ts.map +1 -1
  31. package/sdk/models/operations/index.js +4 -0
  32. package/sdk/models/operations/index.js.map +1 -1
  33. package/sdk/models/operations/postgenerationslcm.d.ts +146 -0
  34. package/sdk/models/operations/postgenerationslcm.d.ts.map +1 -0
  35. package/sdk/models/operations/postgenerationslcm.js +194 -0
  36. package/sdk/models/operations/postgenerationslcm.js.map +1 -0
  37. package/sdk/models/operations/postlcminpainting.d.ts +152 -0
  38. package/sdk/models/operations/postlcminpainting.d.ts.map +1 -0
  39. package/sdk/models/operations/postlcminpainting.js +198 -0
  40. package/sdk/models/operations/postlcminpainting.js.map +1 -0
  41. package/sdk/models/operations/postlcminstantrefine.d.ts +146 -0
  42. package/sdk/models/operations/postlcminstantrefine.d.ts.map +1 -0
  43. package/sdk/models/operations/postlcminstantrefine.js +194 -0
  44. package/sdk/models/operations/postlcminstantrefine.js.map +1 -0
  45. package/sdk/models/operations/postlcmupscale.d.ts +167 -0
  46. package/sdk/models/operations/postlcmupscale.d.ts.map +1 -0
  47. package/sdk/models/operations/postlcmupscale.js +218 -0
  48. package/sdk/models/operations/postlcmupscale.js.map +1 -0
  49. package/sdk/models/shared/index.d.ts +1 -0
  50. package/sdk/models/shared/index.d.ts.map +1 -1
  51. package/sdk/models/shared/index.js +1 -0
  52. package/sdk/models/shared/index.js.map +1 -1
  53. package/sdk/models/shared/lcmgenerationstyle.d.ts +23 -0
  54. package/sdk/models/shared/lcmgenerationstyle.d.ts.map +1 -0
  55. package/sdk/models/shared/lcmgenerationstyle.js +30 -0
  56. package/sdk/models/shared/lcmgenerationstyle.js.map +1 -0
  57. package/sdk/models/shared/security.d.ts +12 -0
  58. package/sdk/models/shared/security.d.ts.map +1 -1
  59. package/sdk/models/shared/security.js +24 -0
  60. package/sdk/models/shared/security.js.map +1 -1
  61. package/sdk/user.d.ts.map +1 -1
  62. package/sdk/user.js +5 -1
  63. package/sdk/user.js.map +1 -1
  64. package/sdk/variation.d.ts.map +1 -1
  65. package/sdk/variation.js +20 -4
  66. package/sdk/variation.js.map +1 -1
  67. package/src/hooks/types.ts +1 -1
  68. package/src/lib/config.ts +3 -3
  69. package/src/lib/security.ts +9 -0
  70. package/src/sdk/dataset.ts +25 -5
  71. package/src/sdk/element.ts +5 -1
  72. package/src/sdk/generation.ts +367 -7
  73. package/src/sdk/initimage.ts +15 -3
  74. package/src/sdk/model.ts +30 -6
  75. package/src/sdk/models/operations/index.ts +4 -0
  76. package/src/sdk/models/operations/postgenerationslcm.ts +309 -0
  77. package/src/sdk/models/operations/postlcminpainting.ts +326 -0
  78. package/src/sdk/models/operations/postlcminstantrefine.ts +325 -0
  79. package/src/sdk/models/operations/postlcmupscale.ts +360 -0
  80. package/src/sdk/models/shared/index.ts +1 -0
  81. package/src/sdk/models/shared/lcmgenerationstyle.ts +28 -0
  82. package/src/sdk/models/shared/security.ts +33 -0
  83. package/src/sdk/user.ts +5 -1
  84. 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
  {
@@ -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
  {