@leonardo-ai/sdk 2.1.3 → 2.2.0

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 (63) hide show
  1. package/README.md +49 -56
  2. package/dist/sdk/models/operations/createdataset.d.ts +1 -1
  3. package/dist/sdk/models/operations/creategeneration.d.ts +1 -1
  4. package/dist/sdk/models/operations/createmodel.d.ts +1 -1
  5. package/dist/sdk/models/operations/createvariationnobg.d.ts +1 -1
  6. package/dist/sdk/models/operations/createvariationupscale.d.ts +1 -1
  7. package/dist/sdk/models/operations/deletedatasetbyid.d.ts +1 -1
  8. package/dist/sdk/models/operations/deletegenerationbyid.d.ts +1 -1
  9. package/dist/sdk/models/operations/deletegenerationstextureid.d.ts +1 -1
  10. package/dist/sdk/models/operations/deleteinitimagebyid.d.ts +1 -1
  11. package/dist/sdk/models/operations/deletemodelbyid.d.ts +1 -1
  12. package/dist/sdk/models/operations/deletemodels3did.d.ts +1 -1
  13. package/dist/sdk/models/operations/getdatasetbyid.d.ts +1 -1
  14. package/dist/sdk/models/operations/getelements.d.ts +1 -1
  15. package/dist/sdk/models/operations/getgenerationbyid.d.ts +1 -1
  16. package/dist/sdk/models/operations/getgenerationsbyuserid.d.ts +1 -1
  17. package/dist/sdk/models/operations/getinitimagebyid.d.ts +1 -1
  18. package/dist/sdk/models/operations/getmodelbyid.d.ts +1 -1
  19. package/dist/sdk/models/operations/getplatformmodels.d.ts +1 -1
  20. package/dist/sdk/models/operations/getuserself.d.ts +1 -1
  21. package/dist/sdk/models/operations/getvariationbyid.d.ts +1 -1
  22. package/dist/sdk/models/operations/postgenerationstexture.d.ts +1 -1
  23. package/dist/sdk/models/operations/postmodels3dupload.d.ts +1 -1
  24. package/dist/sdk/models/operations/postvariationsunzoom.d.ts +1 -1
  25. package/dist/sdk/models/operations/uploaddatasetimage.d.ts +1 -1
  26. package/dist/sdk/models/operations/uploaddatasetimagefromgen.d.ts +1 -1
  27. package/dist/sdk/models/operations/uploadinitimage.d.ts +1 -1
  28. package/dist/sdk/sdk.js +3 -3
  29. package/docs/sdk/models/operations/createdatasetresponse.md +1 -1
  30. package/docs/sdk/models/operations/creategenerationresponse.md +1 -1
  31. package/docs/sdk/models/operations/createmodelresponse.md +1 -1
  32. package/docs/sdk/models/operations/createvariationnobgresponse.md +1 -1
  33. package/docs/sdk/models/operations/createvariationupscaleresponse.md +1 -1
  34. package/docs/sdk/models/operations/deletedatasetbyidresponse.md +1 -1
  35. package/docs/sdk/models/operations/deletegenerationbyidresponse.md +1 -1
  36. package/docs/sdk/models/operations/deletegenerationstextureidresponse.md +1 -1
  37. package/docs/sdk/models/operations/deleteinitimagebyidresponse.md +1 -1
  38. package/docs/sdk/models/operations/deletemodelbyidresponse.md +1 -1
  39. package/docs/sdk/models/operations/deletemodels3didresponse.md +1 -1
  40. package/docs/sdk/models/operations/getdatasetbyidresponse.md +1 -1
  41. package/docs/sdk/models/operations/getelementsresponse.md +1 -1
  42. package/docs/sdk/models/operations/getgenerationbyidresponse.md +1 -1
  43. package/docs/sdk/models/operations/getgenerationsbyuseridresponse.md +1 -1
  44. package/docs/sdk/models/operations/getinitimagebyidresponse.md +1 -1
  45. package/docs/sdk/models/operations/getmodelbyidresponse.md +1 -1
  46. package/docs/sdk/models/operations/getplatformmodelsresponse.md +1 -1
  47. package/docs/sdk/models/operations/getuserselfresponse.md +1 -1
  48. package/docs/sdk/models/operations/getvariationbyidresponse.md +1 -1
  49. package/docs/sdk/models/operations/postgenerationstextureresponse.md +1 -1
  50. package/docs/sdk/models/operations/postmodels3duploadresponse.md +1 -1
  51. package/docs/sdk/models/operations/postvariationsunzoomresponse.md +1 -1
  52. package/docs/sdk/models/operations/uploaddatasetimagefromgenresponse.md +1 -1
  53. package/docs/sdk/models/operations/uploaddatasetimageresponse.md +1 -1
  54. package/docs/sdk/models/operations/uploadinitimageresponse.md +1 -1
  55. package/docs/sdk/models/shared/security.md +3 -3
  56. package/docs/sdks/dataset/README.md +35 -25
  57. package/docs/sdks/element/README.md +5 -3
  58. package/docs/sdks/generation/README.md +35 -23
  59. package/docs/sdks/initimage/README.md +15 -9
  60. package/docs/sdks/model/README.md +35 -23
  61. package/docs/sdks/user/README.md +5 -3
  62. package/docs/sdks/variation/README.md +20 -12
  63. package/package.json +1 -1
@@ -17,9 +17,9 @@ This endpoint deletes an init image
17
17
  import { Leonardo } from "@leonardo-ai/sdk";
18
18
  import { DeleteInitImageByIdRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
19
19
 
20
- (async() => {
20
+ async function run() {
21
21
  const sdk = new Leonardo({
22
- bearerAuth: "",
22
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
23
23
  });
24
24
  const id: string = "string";
25
25
 
@@ -28,7 +28,9 @@ const id: string = "string";
28
28
  if (res.statusCode == 200) {
29
29
  // handle response
30
30
  }
31
- })();
31
+ }
32
+
33
+ run();
32
34
  ```
33
35
 
34
36
  ### Parameters
@@ -58,9 +60,9 @@ This endpoint will return a single init image
58
60
  import { Leonardo } from "@leonardo-ai/sdk";
59
61
  import { GetInitImageByIdRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
60
62
 
61
- (async() => {
63
+ async function run() {
62
64
  const sdk = new Leonardo({
63
- bearerAuth: "",
65
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
64
66
  });
65
67
  const id: string = "string";
66
68
 
@@ -69,7 +71,9 @@ const id: string = "string";
69
71
  if (res.statusCode == 200) {
70
72
  // handle response
71
73
  }
72
- })();
74
+ }
75
+
76
+ run();
73
77
  ```
74
78
 
75
79
  ### Parameters
@@ -98,9 +102,9 @@ This endpoint returns presigned details to upload an init image to S3
98
102
  ```typescript
99
103
  import { Leonardo } from "@leonardo-ai/sdk";
100
104
 
101
- (async() => {
105
+ async function run() {
102
106
  const sdk = new Leonardo({
103
- bearerAuth: "",
107
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
104
108
  });
105
109
 
106
110
  const res = await sdk.initImage.uploadInitImage({
@@ -110,7 +114,9 @@ import { Leonardo } from "@leonardo-ai/sdk";
110
114
  if (res.statusCode == 200) {
111
115
  // handle response
112
116
  }
113
- })();
117
+ }
118
+
119
+ run();
114
120
  ```
115
121
 
116
122
  ### Parameters
@@ -20,9 +20,9 @@ This endpoint will train a new custom model
20
20
  import { Leonardo } from "@leonardo-ai/sdk";
21
21
  import { CustomModelType, SdVersions, Strength } from "@leonardo-ai/sdk/dist/sdk/models/shared";
22
22
 
23
- (async() => {
23
+ async function run() {
24
24
  const sdk = new Leonardo({
25
- bearerAuth: "",
25
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
26
26
  });
27
27
 
28
28
  const res = await sdk.model.createModel({
@@ -34,7 +34,9 @@ import { CustomModelType, SdVersions, Strength } from "@leonardo-ai/sdk/dist/sdk
34
34
  if (res.statusCode == 200) {
35
35
  // handle response
36
36
  }
37
- })();
37
+ }
38
+
39
+ run();
38
40
  ```
39
41
 
40
42
  ### Parameters
@@ -64,9 +66,9 @@ This endpoint will delete a specific custom model
64
66
  import { Leonardo } from "@leonardo-ai/sdk";
65
67
  import { DeleteModelByIdRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
66
68
 
67
- (async() => {
69
+ async function run() {
68
70
  const sdk = new Leonardo({
69
- bearerAuth: "",
71
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
70
72
  });
71
73
  const id: string = "string";
72
74
 
@@ -75,7 +77,9 @@ const id: string = "string";
75
77
  if (res.statusCode == 200) {
76
78
  // handle response
77
79
  }
78
- })();
80
+ }
81
+
82
+ run();
79
83
  ```
80
84
 
81
85
  ### Parameters
@@ -105,9 +109,9 @@ This endpoint deletes the specific 3D Model
105
109
  import { Leonardo } from "@leonardo-ai/sdk";
106
110
  import { DeleteModels3dIdRequest, DeleteModels3dIdRequestBody } from "@leonardo-ai/sdk/dist/sdk/models/operations";
107
111
 
108
- (async() => {
112
+ async function run() {
109
113
  const sdk = new Leonardo({
110
- bearerAuth: "",
114
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
111
115
  });
112
116
  const id: string = "string";
113
117
  const requestBody: DeleteModels3dIdRequestBody = {};
@@ -117,16 +121,18 @@ const requestBody: DeleteModels3dIdRequestBody = {};
117
121
  if (res.statusCode == 200) {
118
122
  // handle response
119
123
  }
120
- })();
124
+ }
125
+
126
+ run();
121
127
  ```
122
128
 
123
129
  ### Parameters
124
130
 
125
- | Parameter | Type | Required | Description |
126
- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
127
- | `id` | *string* | :heavy_check_mark: | _"id" is required (enter it either in parameters or request body)_ |
128
- | `requestBody` | [operations.DeleteModels3dIdRequestBody](../../../sdk/models/operations/deletemodels3didrequestbody.md) | :heavy_minus_sign: | Query parameters can also be provided in the request body as a JSON object |
129
- | `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
131
+ | Parameter | Type | Required | Description |
132
+ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
133
+ | `id` | *string* | :heavy_check_mark: | _"id" is required (enter it either in parameters or request body)_ |
134
+ | `requestBody` | [operations.DeleteModels3dIdRequestBody](../../sdk/models/operations/deletemodels3didrequestbody.md) | :heavy_minus_sign: | Query parameters can also be provided in the request body as a JSON object |
135
+ | `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
130
136
 
131
137
 
132
138
  ### Response
@@ -148,9 +154,9 @@ This endpoint gets the specific custom model
148
154
  import { Leonardo } from "@leonardo-ai/sdk";
149
155
  import { GetModelByIdRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
150
156
 
151
- (async() => {
157
+ async function run() {
152
158
  const sdk = new Leonardo({
153
- bearerAuth: "",
159
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
154
160
  });
155
161
  const id: string = "string";
156
162
 
@@ -159,7 +165,9 @@ const id: string = "string";
159
165
  if (res.statusCode == 200) {
160
166
  // handle response
161
167
  }
162
- })();
168
+ }
169
+
170
+ run();
163
171
  ```
164
172
 
165
173
  ### Parameters
@@ -189,9 +197,9 @@ Get a list of public Platform Models available for use with generations.
189
197
  import { Leonardo } from "@leonardo-ai/sdk";
190
198
  import { GetPlatformModelsRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
191
199
 
192
- (async() => {
200
+ async function run() {
193
201
  const sdk = new Leonardo({
194
- bearerAuth: "",
202
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
195
203
  });
196
204
  const limit: number = 419487;
197
205
  const offset: number = 472174;
@@ -201,7 +209,9 @@ const offset: number = 472174;
201
209
  if (res.statusCode == 200) {
202
210
  // handle response
203
211
  }
204
- })();
212
+ }
213
+
214
+ run();
205
215
  ```
206
216
 
207
217
  ### Parameters
@@ -231,9 +241,9 @@ This endpoint returns presigned details to upload a 3D model to S3
231
241
  ```typescript
232
242
  import { Leonardo } from "@leonardo-ai/sdk";
233
243
 
234
- (async() => {
244
+ async function run() {
235
245
  const sdk = new Leonardo({
236
- bearerAuth: "",
246
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
237
247
  });
238
248
 
239
249
  const res = await sdk.model.postModels3dUpload({});
@@ -241,7 +251,9 @@ import { Leonardo } from "@leonardo-ai/sdk";
241
251
  if (res.statusCode == 200) {
242
252
  // handle response
243
253
  }
244
- })();
254
+ }
255
+
256
+ run();
245
257
  ```
246
258
 
247
259
  ### Parameters
@@ -14,9 +14,9 @@ This endpoint will return your user information such as your user id, username,
14
14
  ```typescript
15
15
  import { Leonardo } from "@leonardo-ai/sdk";
16
16
 
17
- (async() => {
17
+ async function run() {
18
18
  const sdk = new Leonardo({
19
- bearerAuth: "",
19
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
20
20
  });
21
21
 
22
22
  const res = await sdk.user.getUserSelf();
@@ -24,7 +24,9 @@ import { Leonardo } from "@leonardo-ai/sdk";
24
24
  if (res.statusCode == 200) {
25
25
  // handle response
26
26
  }
27
- })();
27
+ }
28
+
29
+ run();
28
30
  ```
29
31
 
30
32
  ### Parameters
@@ -17,9 +17,9 @@ This endpoint will create a no background variation of the provided image ID
17
17
  ```typescript
18
18
  import { Leonardo } from "@leonardo-ai/sdk";
19
19
 
20
- (async() => {
20
+ async function run() {
21
21
  const sdk = new Leonardo({
22
- bearerAuth: "",
22
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
23
23
  });
24
24
 
25
25
  const res = await sdk.variation.createVariationNoBG({
@@ -29,7 +29,9 @@ import { Leonardo } from "@leonardo-ai/sdk";
29
29
  if (res.statusCode == 200) {
30
30
  // handle response
31
31
  }
32
- })();
32
+ }
33
+
34
+ run();
33
35
  ```
34
36
 
35
37
  ### Parameters
@@ -58,9 +60,9 @@ This endpoint will create an upscale for the provided image ID
58
60
  ```typescript
59
61
  import { Leonardo } from "@leonardo-ai/sdk";
60
62
 
61
- (async() => {
63
+ async function run() {
62
64
  const sdk = new Leonardo({
63
- bearerAuth: "",
65
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
64
66
  });
65
67
 
66
68
  const res = await sdk.variation.createVariationUpscale({
@@ -70,7 +72,9 @@ import { Leonardo } from "@leonardo-ai/sdk";
70
72
  if (res.statusCode == 200) {
71
73
  // handle response
72
74
  }
73
- })();
75
+ }
76
+
77
+ run();
74
78
  ```
75
79
 
76
80
  ### Parameters
@@ -100,9 +104,9 @@ This endpoint will get the variation by ID
100
104
  import { Leonardo } from "@leonardo-ai/sdk";
101
105
  import { GetVariationByIdRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
102
106
 
103
- (async() => {
107
+ async function run() {
104
108
  const sdk = new Leonardo({
105
- bearerAuth: "",
109
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
106
110
  });
107
111
  const id: string = "string";
108
112
 
@@ -111,7 +115,9 @@ const id: string = "string";
111
115
  if (res.statusCode == 200) {
112
116
  // handle response
113
117
  }
114
- })();
118
+ }
119
+
120
+ run();
115
121
  ```
116
122
 
117
123
  ### Parameters
@@ -140,9 +146,9 @@ This endpoint will create an unzoom variation for the provided image ID
140
146
  ```typescript
141
147
  import { Leonardo } from "@leonardo-ai/sdk";
142
148
 
143
- (async() => {
149
+ async function run() {
144
150
  const sdk = new Leonardo({
145
- bearerAuth: "",
151
+ bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
146
152
  });
147
153
 
148
154
  const res = await sdk.variation.postVariationsUnzoom({});
@@ -150,7 +156,9 @@ import { Leonardo } from "@leonardo-ai/sdk";
150
156
  if (res.statusCode == 200) {
151
157
  // handle response
152
158
  }
153
- })();
159
+ }
160
+
161
+ run();
154
162
  ```
155
163
 
156
164
  ### Parameters
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leonardo-ai/sdk",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "author": "leonardoai",
5
5
  "scripts": {
6
6
  "prepare": "tsc --build",