@leonardo-ai/sdk 1.56.0 → 1.58.1
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/README.md +8 -8
- package/dist/internal/utils/requestbody.js +1 -1
- package/dist/sdk/dataset.js +5 -5
- package/dist/sdk/generation.js +6 -6
- package/dist/sdk/initimage.js +3 -3
- package/dist/sdk/model.js +6 -6
- package/dist/sdk/sdk.d.ts +1 -0
- package/dist/sdk/sdk.js +3 -2
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/variation.js +3 -3
- package/docs/sdks/dataset/README.md +9 -8
- package/docs/sdks/generation/README.md +36 -35
- package/docs/sdks/initimage/README.md +4 -3
- package/docs/sdks/leonardo/README.md +1 -0
- package/docs/sdks/model/README.md +16 -15
- package/docs/sdks/user/README.md +1 -0
- package/docs/sdks/variation/README.md +4 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,8 +40,8 @@ const sdk = new Leonardo({
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
sdk.dataset.createDataset({
|
|
43
|
-
description: "
|
|
44
|
-
name: "
|
|
43
|
+
description: "Synchronised multi-tasking projection",
|
|
44
|
+
name: "Quetzal South",
|
|
45
45
|
}).then((res: CreateDatasetResponse) => {
|
|
46
46
|
if (res.statusCode == 200) {
|
|
47
47
|
// handle response
|
|
@@ -54,7 +54,7 @@ sdk.dataset.createDataset({
|
|
|
54
54
|
## Available Resources and Operations
|
|
55
55
|
|
|
56
56
|
|
|
57
|
-
### [
|
|
57
|
+
### [dataset](docs/sdks/dataset/README.md)
|
|
58
58
|
|
|
59
59
|
* [createDataset](docs/sdks/dataset/README.md#createdataset) - Create a Dataset
|
|
60
60
|
* [deleteDatasetById](docs/sdks/dataset/README.md#deletedatasetbyid) - Delete a Single Dataset by ID
|
|
@@ -62,7 +62,7 @@ sdk.dataset.createDataset({
|
|
|
62
62
|
* [uploadDatasetImage](docs/sdks/dataset/README.md#uploaddatasetimage) - Upload dataset image
|
|
63
63
|
* [uploadDatasetImageFromGen](docs/sdks/dataset/README.md#uploaddatasetimagefromgen) - Upload a Single Generated Image to a Dataset
|
|
64
64
|
|
|
65
|
-
### [
|
|
65
|
+
### [generation](docs/sdks/generation/README.md)
|
|
66
66
|
|
|
67
67
|
* [createGeneration](docs/sdks/generation/README.md#creategeneration) - Create a Generation of Images
|
|
68
68
|
* [deleteGenerationById](docs/sdks/generation/README.md#deletegenerationbyid) - Delete a Single Generation
|
|
@@ -71,13 +71,13 @@ sdk.dataset.createDataset({
|
|
|
71
71
|
* [getGenerationsByUserId](docs/sdks/generation/README.md#getgenerationsbyuserid) - Get generations by user ID
|
|
72
72
|
* [postGenerationsTexture](docs/sdks/generation/README.md#postgenerationstexture) - Create Texture Generation
|
|
73
73
|
|
|
74
|
-
### [
|
|
74
|
+
### [initImage](docs/sdks/initimage/README.md)
|
|
75
75
|
|
|
76
76
|
* [deleteInitImageById](docs/sdks/initimage/README.md#deleteinitimagebyid) - Delete init image
|
|
77
77
|
* [getInitImageById](docs/sdks/initimage/README.md#getinitimagebyid) - Get single init image
|
|
78
78
|
* [uploadInitImage](docs/sdks/initimage/README.md#uploadinitimage) - Upload init image
|
|
79
79
|
|
|
80
|
-
### [
|
|
80
|
+
### [model](docs/sdks/model/README.md)
|
|
81
81
|
|
|
82
82
|
* [createModel](docs/sdks/model/README.md#createmodel) - Train a Custom Model
|
|
83
83
|
* [deleteModelById](docs/sdks/model/README.md#deletemodelbyid) - Delete a Single Custom Model by ID
|
|
@@ -86,11 +86,11 @@ sdk.dataset.createDataset({
|
|
|
86
86
|
* [getPlatformModels](docs/sdks/model/README.md#getplatformmodels) - List Platform Models
|
|
87
87
|
* [postModels3dUpload](docs/sdks/model/README.md#postmodels3dupload) - Upload 3D Model
|
|
88
88
|
|
|
89
|
-
### [
|
|
89
|
+
### [user](docs/sdks/user/README.md)
|
|
90
90
|
|
|
91
91
|
* [getUserSelf](docs/sdks/user/README.md#getuserself) - Get user information
|
|
92
92
|
|
|
93
|
-
### [
|
|
93
|
+
### [variation](docs/sdks/variation/README.md)
|
|
94
94
|
|
|
95
95
|
* [createVariationUpscale](docs/sdks/variation/README.md#createvariationupscale) - Create upscale
|
|
96
96
|
* [getVariationById](docs/sdks/variation/README.md#getvariationbyid) - Get variation by ID
|
|
@@ -268,7 +268,7 @@ function encodeMultipartFormDataFile(formData, file) {
|
|
|
268
268
|
if (mpFormDecoratorName === "" || fileName === "" || content == null) {
|
|
269
269
|
throw new Error("invalid multipart/form-data file");
|
|
270
270
|
}
|
|
271
|
-
formData.append(
|
|
271
|
+
formData.append(mpFormDecoratorName, Buffer.from(content), fileName);
|
|
272
272
|
return formData;
|
|
273
273
|
}
|
|
274
274
|
function parseMultipartFormDecorator(mpFormAnn) {
|
package/dist/sdk/dataset.js
CHANGED
|
@@ -142,7 +142,7 @@ var Dataset = /** @class */ (function () {
|
|
|
142
142
|
if (reqBody == null)
|
|
143
143
|
throw new Error("request body is required");
|
|
144
144
|
headers["Accept"] = "application/json";
|
|
145
|
-
headers["user-agent"] =
|
|
145
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
146
146
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
147
147
|
case 3:
|
|
148
148
|
httpRes = _e.sent();
|
|
@@ -203,7 +203,7 @@ var Dataset = /** @class */ (function () {
|
|
|
203
203
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
204
204
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
205
205
|
headers["Accept"] = "application/json";
|
|
206
|
-
headers["user-agent"] =
|
|
206
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
207
207
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
|
|
208
208
|
case 3:
|
|
209
209
|
httpRes = _c.sent();
|
|
@@ -264,7 +264,7 @@ var Dataset = /** @class */ (function () {
|
|
|
264
264
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
265
265
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
266
266
|
headers["Accept"] = "application/json";
|
|
267
|
-
headers["user-agent"] =
|
|
267
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
268
268
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
269
269
|
case 3:
|
|
270
270
|
httpRes = _c.sent();
|
|
@@ -338,7 +338,7 @@ var Dataset = /** @class */ (function () {
|
|
|
338
338
|
if (reqBody == null)
|
|
339
339
|
throw new Error("request body is required");
|
|
340
340
|
headers["Accept"] = "application/json";
|
|
341
|
-
headers["user-agent"] =
|
|
341
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
342
342
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
343
343
|
case 3:
|
|
344
344
|
httpRes = _e.sent();
|
|
@@ -412,7 +412,7 @@ var Dataset = /** @class */ (function () {
|
|
|
412
412
|
if (reqBody == null)
|
|
413
413
|
throw new Error("request body is required");
|
|
414
414
|
headers["Accept"] = "application/json";
|
|
415
|
-
headers["user-agent"] =
|
|
415
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
416
416
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
417
417
|
case 3:
|
|
418
418
|
httpRes = _e.sent();
|
package/dist/sdk/generation.js
CHANGED
|
@@ -142,7 +142,7 @@ var Generation = /** @class */ (function () {
|
|
|
142
142
|
if (reqBody == null)
|
|
143
143
|
throw new Error("request body is required");
|
|
144
144
|
headers["Accept"] = "application/json";
|
|
145
|
-
headers["user-agent"] =
|
|
145
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
146
146
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
147
147
|
case 3:
|
|
148
148
|
httpRes = _e.sent();
|
|
@@ -203,7 +203,7 @@ var Generation = /** @class */ (function () {
|
|
|
203
203
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
204
204
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
205
205
|
headers["Accept"] = "application/json";
|
|
206
|
-
headers["user-agent"] =
|
|
206
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
207
207
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
|
|
208
208
|
case 3:
|
|
209
209
|
httpRes = _c.sent();
|
|
@@ -275,7 +275,7 @@ var Generation = /** @class */ (function () {
|
|
|
275
275
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
276
276
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
277
277
|
headers["Accept"] = "application/json";
|
|
278
|
-
headers["user-agent"] =
|
|
278
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
279
279
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "delete", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
280
280
|
case 3:
|
|
281
281
|
httpRes = _e.sent();
|
|
@@ -336,7 +336,7 @@ var Generation = /** @class */ (function () {
|
|
|
336
336
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
337
337
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
338
338
|
headers["Accept"] = "application/json";
|
|
339
|
-
headers["user-agent"] =
|
|
339
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
340
340
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
341
341
|
case 3:
|
|
342
342
|
httpRes = _c.sent();
|
|
@@ -400,7 +400,7 @@ var Generation = /** @class */ (function () {
|
|
|
400
400
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
401
401
|
queryParams = utils.serializeQueryParams(req);
|
|
402
402
|
headers["Accept"] = "application/json";
|
|
403
|
-
headers["user-agent"] =
|
|
403
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
404
404
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
405
405
|
case 3:
|
|
406
406
|
httpRes = _c.sent();
|
|
@@ -471,7 +471,7 @@ var Generation = /** @class */ (function () {
|
|
|
471
471
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
472
472
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
473
473
|
headers["Accept"] = "application/json";
|
|
474
|
-
headers["user-agent"] =
|
|
474
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
475
475
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
476
476
|
case 3:
|
|
477
477
|
httpRes = _e.sent();
|
package/dist/sdk/initimage.js
CHANGED
|
@@ -130,7 +130,7 @@ var InitImage = /** @class */ (function () {
|
|
|
130
130
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
131
131
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
132
132
|
headers["Accept"] = "application/json";
|
|
133
|
-
headers["user-agent"] =
|
|
133
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
134
134
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
|
|
135
135
|
case 3:
|
|
136
136
|
httpRes = _c.sent();
|
|
@@ -191,7 +191,7 @@ var InitImage = /** @class */ (function () {
|
|
|
191
191
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
192
192
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
193
193
|
headers["Accept"] = "application/json";
|
|
194
|
-
headers["user-agent"] =
|
|
194
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
195
195
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
196
196
|
case 3:
|
|
197
197
|
httpRes = _c.sent();
|
|
@@ -264,7 +264,7 @@ var InitImage = /** @class */ (function () {
|
|
|
264
264
|
if (reqBody == null)
|
|
265
265
|
throw new Error("request body is required");
|
|
266
266
|
headers["Accept"] = "application/json";
|
|
267
|
-
headers["user-agent"] =
|
|
267
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
268
268
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
269
269
|
case 3:
|
|
270
270
|
httpRes = _e.sent();
|
package/dist/sdk/model.js
CHANGED
|
@@ -142,7 +142,7 @@ var Model = /** @class */ (function () {
|
|
|
142
142
|
if (reqBody == null)
|
|
143
143
|
throw new Error("request body is required");
|
|
144
144
|
headers["Accept"] = "application/json";
|
|
145
|
-
headers["user-agent"] =
|
|
145
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
146
146
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
147
147
|
case 3:
|
|
148
148
|
httpRes = _e.sent();
|
|
@@ -203,7 +203,7 @@ var Model = /** @class */ (function () {
|
|
|
203
203
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
204
204
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
205
205
|
headers["Accept"] = "application/json";
|
|
206
|
-
headers["user-agent"] =
|
|
206
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
207
207
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "delete", headers: headers, responseType: "arraybuffer" }, config))];
|
|
208
208
|
case 3:
|
|
209
209
|
httpRes = _c.sent();
|
|
@@ -275,7 +275,7 @@ var Model = /** @class */ (function () {
|
|
|
275
275
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
276
276
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
277
277
|
headers["Accept"] = "application/json";
|
|
278
|
-
headers["user-agent"] =
|
|
278
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
279
279
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "delete", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
280
280
|
case 3:
|
|
281
281
|
httpRes = _e.sent();
|
|
@@ -336,7 +336,7 @@ var Model = /** @class */ (function () {
|
|
|
336
336
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
337
337
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
338
338
|
headers["Accept"] = "application/json";
|
|
339
|
-
headers["user-agent"] =
|
|
339
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
340
340
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
341
341
|
case 3:
|
|
342
342
|
httpRes = _c.sent();
|
|
@@ -399,7 +399,7 @@ var Model = /** @class */ (function () {
|
|
|
399
399
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
400
400
|
queryParams = utils.serializeQueryParams(req);
|
|
401
401
|
headers["Accept"] = "application/json";
|
|
402
|
-
headers["user-agent"] =
|
|
402
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
403
403
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url + queryParams, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
404
404
|
case 3:
|
|
405
405
|
httpRes = _c.sent();
|
|
@@ -470,7 +470,7 @@ var Model = /** @class */ (function () {
|
|
|
470
470
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
471
471
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
472
472
|
headers["Accept"] = "application/json";
|
|
473
|
-
headers["user-agent"] =
|
|
473
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
474
474
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
475
475
|
case 3:
|
|
476
476
|
httpRes = _e.sent();
|
package/dist/sdk/sdk.d.ts
CHANGED
package/dist/sdk/sdk.js
CHANGED
|
@@ -27,8 +27,9 @@ var SDKConfiguration = /** @class */ (function () {
|
|
|
27
27
|
function SDKConfiguration(init) {
|
|
28
28
|
this.language = "typescript";
|
|
29
29
|
this.openapiDocVersion = "v1.0.0";
|
|
30
|
-
this.sdkVersion = "1.
|
|
31
|
-
this.genVersion = "2.
|
|
30
|
+
this.sdkVersion = "1.58.1";
|
|
31
|
+
this.genVersion = "2.143.2";
|
|
32
|
+
this.userAgent = "speakeasy-sdk/typescript 1.58.1 2.143.2 v1.0.0 @leonardo-ai/sdk";
|
|
32
33
|
Object.assign(this, init);
|
|
33
34
|
}
|
|
34
35
|
return SDKConfiguration;
|
package/dist/sdk/user.js
CHANGED
|
@@ -111,7 +111,7 @@ var User = /** @class */ (function () {
|
|
|
111
111
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
112
112
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
113
113
|
headers["Accept"] = "application/json";
|
|
114
|
-
headers["user-agent"] =
|
|
114
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
115
115
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
116
116
|
case 3:
|
|
117
117
|
httpRes = _c.sent();
|
package/dist/sdk/variation.js
CHANGED
|
@@ -140,7 +140,7 @@ var Variation = /** @class */ (function () {
|
|
|
140
140
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
141
141
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
142
142
|
headers["Accept"] = "application/json";
|
|
143
|
-
headers["user-agent"] =
|
|
143
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
144
144
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
145
145
|
case 3:
|
|
146
146
|
httpRes = _e.sent();
|
|
@@ -201,7 +201,7 @@ var Variation = /** @class */ (function () {
|
|
|
201
201
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
202
202
|
headers = __assign(__assign({}, config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
203
203
|
headers["Accept"] = "application/json";
|
|
204
|
-
headers["user-agent"] =
|
|
204
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
205
205
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "get", headers: headers, responseType: "arraybuffer" }, config))];
|
|
206
206
|
case 3:
|
|
207
207
|
httpRes = _c.sent();
|
|
@@ -272,7 +272,7 @@ var Variation = /** @class */ (function () {
|
|
|
272
272
|
properties = utils.parseSecurityProperties(globalSecurity);
|
|
273
273
|
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
274
274
|
headers["Accept"] = "application/json";
|
|
275
|
-
headers["user-agent"] =
|
|
275
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
276
276
|
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: url, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
277
277
|
case 3:
|
|
278
278
|
httpRes = _e.sent();
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Dataset
|
|
2
|
+
(*dataset*)
|
|
2
3
|
|
|
3
4
|
### Available Operations
|
|
4
5
|
|
|
@@ -25,8 +26,8 @@ const sdk = new Leonardo({
|
|
|
25
26
|
});
|
|
26
27
|
|
|
27
28
|
sdk.dataset.createDataset({
|
|
28
|
-
description: "
|
|
29
|
-
name: "
|
|
29
|
+
description: "Synchronised multi-tasking projection",
|
|
30
|
+
name: "Quetzal South",
|
|
30
31
|
}).then((res: CreateDatasetResponse) => {
|
|
31
32
|
if (res.statusCode == 200) {
|
|
32
33
|
// handle response
|
|
@@ -62,7 +63,7 @@ const sdk = new Leonardo({
|
|
|
62
63
|
bearerAuth: "",
|
|
63
64
|
},
|
|
64
65
|
});
|
|
65
|
-
const id: string = "
|
|
66
|
+
const id: string = "Lucia";
|
|
66
67
|
|
|
67
68
|
sdk.dataset.deleteDatasetById(id).then((res: DeleteDatasetByIdResponse) => {
|
|
68
69
|
if (res.statusCode == 200) {
|
|
@@ -99,7 +100,7 @@ const sdk = new Leonardo({
|
|
|
99
100
|
bearerAuth: "",
|
|
100
101
|
},
|
|
101
102
|
});
|
|
102
|
-
const id: string = "
|
|
103
|
+
const id: string = "red";
|
|
103
104
|
|
|
104
105
|
sdk.dataset.getDatasetById(id).then((res: GetDatasetByIdResponse) => {
|
|
105
106
|
if (res.statusCode == 200) {
|
|
@@ -141,9 +142,9 @@ const sdk = new Leonardo({
|
|
|
141
142
|
},
|
|
142
143
|
});
|
|
143
144
|
const requestBody: UploadDatasetImageRequestBody = {
|
|
144
|
-
extension: "
|
|
145
|
+
extension: "mpg4",
|
|
145
146
|
};
|
|
146
|
-
const datasetId: string = "
|
|
147
|
+
const datasetId: string = "deposit";
|
|
147
148
|
|
|
148
149
|
sdk.dataset.uploadDatasetImage(requestBody, datasetId).then((res: UploadDatasetImageResponse) => {
|
|
149
150
|
if (res.statusCode == 200) {
|
|
@@ -186,9 +187,9 @@ const sdk = new Leonardo({
|
|
|
186
187
|
},
|
|
187
188
|
});
|
|
188
189
|
const requestBody: UploadDatasetImageFromGenRequestBody = {
|
|
189
|
-
generatedImageId: "
|
|
190
|
+
generatedImageId: "navigate programming evolve",
|
|
190
191
|
};
|
|
191
|
-
const datasetId: string = "
|
|
192
|
+
const datasetId: string = "finally";
|
|
192
193
|
|
|
193
194
|
sdk.dataset.uploadDatasetImageFromGen(requestBody, datasetId).then((res: UploadDatasetImageFromGenResponse) => {
|
|
194
195
|
if (res.statusCode == 200) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Generation
|
|
2
|
+
(*generation*)
|
|
2
3
|
|
|
3
4
|
### Available Operations
|
|
4
5
|
|
|
@@ -28,41 +29,41 @@ const sdk = new Leonardo({
|
|
|
28
29
|
|
|
29
30
|
sdk.generation.createGeneration({
|
|
30
31
|
alchemy: false,
|
|
31
|
-
contrastRatio:
|
|
32
|
+
contrastRatio: 4444.14,
|
|
32
33
|
controlNet: false,
|
|
33
34
|
controlNetType: ControlnetType.Canny,
|
|
34
35
|
expandedDomain: false,
|
|
35
|
-
guidanceScale:
|
|
36
|
-
height:
|
|
36
|
+
guidanceScale: 784343,
|
|
37
|
+
height: 244808,
|
|
37
38
|
highContrast: false,
|
|
38
39
|
highResolution: false,
|
|
39
|
-
imagePromptWeight:
|
|
40
|
+
imagePromptWeight: 2793,
|
|
40
41
|
imagePrompts: [
|
|
41
|
-
"
|
|
42
|
+
"Product",
|
|
42
43
|
],
|
|
43
|
-
initGenerationImageId: "
|
|
44
|
-
initImageId: "
|
|
45
|
-
initStrength:
|
|
46
|
-
modelId: "
|
|
47
|
-
negativePrompt: "
|
|
44
|
+
initGenerationImageId: "actuating DNS",
|
|
45
|
+
initImageId: "salmon wireless rarely",
|
|
46
|
+
initStrength: 1502.38,
|
|
47
|
+
modelId: "emulation Country",
|
|
48
|
+
negativePrompt: "Kentucky MTF",
|
|
48
49
|
nsfw: false,
|
|
49
|
-
numImages:
|
|
50
|
-
numInferenceSteps:
|
|
50
|
+
numImages: 649224,
|
|
51
|
+
numInferenceSteps: 895539,
|
|
51
52
|
photoReal: false,
|
|
52
53
|
presetStyle: SdGenerationStyle.Leonardo,
|
|
53
|
-
prompt: "
|
|
54
|
+
prompt: "aggregate",
|
|
54
55
|
promptMagic: false,
|
|
55
|
-
promptMagicVersion: "
|
|
56
|
+
promptMagicVersion: "visionary which",
|
|
56
57
|
public: false,
|
|
57
|
-
scheduler: SdGenerationSchedulers.
|
|
58
|
-
sdVersion: SdVersions.
|
|
59
|
-
seed:
|
|
58
|
+
scheduler: SdGenerationSchedulers.Ddim,
|
|
59
|
+
sdVersion: SdVersions.V2,
|
|
60
|
+
seed: 262328,
|
|
60
61
|
tiling: false,
|
|
61
62
|
unzoom: false,
|
|
62
|
-
unzoomAmount:
|
|
63
|
-
upscaleRatio:
|
|
64
|
-
weighting:
|
|
65
|
-
width:
|
|
63
|
+
unzoomAmount: 371.25,
|
|
64
|
+
upscaleRatio: 485.82,
|
|
65
|
+
weighting: 9968.92,
|
|
66
|
+
width: 152007,
|
|
66
67
|
}).then((res: CreateGenerationResponse) => {
|
|
67
68
|
if (res.statusCode == 200) {
|
|
68
69
|
// handle response
|
|
@@ -98,7 +99,7 @@ const sdk = new Leonardo({
|
|
|
98
99
|
bearerAuth: "",
|
|
99
100
|
},
|
|
100
101
|
});
|
|
101
|
-
const id: string = "
|
|
102
|
+
const id: string = "Sports";
|
|
102
103
|
|
|
103
104
|
sdk.generation.deleteGenerationById(id).then((res: DeleteGenerationByIdResponse) => {
|
|
104
105
|
if (res.statusCode == 200) {
|
|
@@ -139,9 +140,9 @@ const sdk = new Leonardo({
|
|
|
139
140
|
bearerAuth: "",
|
|
140
141
|
},
|
|
141
142
|
});
|
|
142
|
-
const id: string = "
|
|
143
|
+
const id: string = "Lodge";
|
|
143
144
|
const requestBody: DeleteGenerationsTextureIdRequestBody = {
|
|
144
|
-
id: "
|
|
145
|
+
id: "<ID>",
|
|
145
146
|
};
|
|
146
147
|
|
|
147
148
|
sdk.generation.deleteGenerationsTextureId(id, requestBody).then((res: DeleteGenerationsTextureIdResponse) => {
|
|
@@ -180,7 +181,7 @@ const sdk = new Leonardo({
|
|
|
180
181
|
bearerAuth: "",
|
|
181
182
|
},
|
|
182
183
|
});
|
|
183
|
-
const id: string = "
|
|
184
|
+
const id: string = "male";
|
|
184
185
|
|
|
185
186
|
sdk.generation.getGenerationById(id).then((res: GetGenerationByIdResponse) => {
|
|
186
187
|
if (res.statusCode == 200) {
|
|
@@ -217,9 +218,9 @@ const sdk = new Leonardo({
|
|
|
217
218
|
bearerAuth: "",
|
|
218
219
|
},
|
|
219
220
|
});
|
|
220
|
-
const userId: string = "
|
|
221
|
-
const limit: number =
|
|
222
|
-
const offset: number =
|
|
221
|
+
const userId: string = "Oriental";
|
|
222
|
+
const limit: number = 135536;
|
|
223
|
+
const offset: number = 934375;
|
|
223
224
|
|
|
224
225
|
sdk.generation.getGenerationsByUserId(userId, limit, offset).then((res: GetGenerationsByUserIdResponse) => {
|
|
225
226
|
if (res.statusCode == 200) {
|
|
@@ -260,14 +261,14 @@ const sdk = new Leonardo({
|
|
|
260
261
|
});
|
|
261
262
|
|
|
262
263
|
sdk.generation.postGenerationsTexture({
|
|
263
|
-
frontRotationOffset:
|
|
264
|
-
modelAssetId: "
|
|
265
|
-
negativePrompt: "
|
|
264
|
+
frontRotationOffset: 854632,
|
|
265
|
+
modelAssetId: "West",
|
|
266
|
+
negativePrompt: "quantifying pink ah",
|
|
266
267
|
preview: false,
|
|
267
|
-
previewDirection: "
|
|
268
|
-
prompt: "
|
|
269
|
-
sdVersion: "
|
|
270
|
-
seed:
|
|
268
|
+
previewDirection: "Auto",
|
|
269
|
+
prompt: "Coupe North Steel",
|
|
270
|
+
sdVersion: "Market parsing inasmuch",
|
|
271
|
+
seed: 895868,
|
|
271
272
|
}).then((res: PostGenerationsTextureResponse) => {
|
|
272
273
|
if (res.statusCode == 200) {
|
|
273
274
|
// handle response
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# InitImage
|
|
2
|
+
(*initImage*)
|
|
2
3
|
|
|
3
4
|
### Available Operations
|
|
4
5
|
|
|
@@ -21,7 +22,7 @@ const sdk = new Leonardo({
|
|
|
21
22
|
bearerAuth: "",
|
|
22
23
|
},
|
|
23
24
|
});
|
|
24
|
-
const id: string = "
|
|
25
|
+
const id: string = "Woman";
|
|
25
26
|
|
|
26
27
|
sdk.initImage.deleteInitImageById(id).then((res: DeleteInitImageByIdResponse) => {
|
|
27
28
|
if (res.statusCode == 200) {
|
|
@@ -58,7 +59,7 @@ const sdk = new Leonardo({
|
|
|
58
59
|
bearerAuth: "",
|
|
59
60
|
},
|
|
60
61
|
});
|
|
61
|
-
const id: string = "
|
|
62
|
+
const id: string = "Namibia";
|
|
62
63
|
|
|
63
64
|
sdk.initImage.getInitImageById(id).then((res: GetInitImageByIdResponse) => {
|
|
64
65
|
if (res.statusCode == 200) {
|
|
@@ -97,7 +98,7 @@ const sdk = new Leonardo({
|
|
|
97
98
|
});
|
|
98
99
|
|
|
99
100
|
sdk.initImage.uploadInitImage({
|
|
100
|
-
extension: "
|
|
101
|
+
extension: "png",
|
|
101
102
|
}).then((res: UploadInitImageResponse) => {
|
|
102
103
|
if (res.statusCode == 200) {
|
|
103
104
|
// handle response
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Model
|
|
2
|
+
(*model*)
|
|
2
3
|
|
|
3
4
|
### Available Operations
|
|
4
5
|
|
|
@@ -27,15 +28,15 @@ const sdk = new Leonardo({
|
|
|
27
28
|
});
|
|
28
29
|
|
|
29
30
|
sdk.model.createModel({
|
|
30
|
-
datasetId: "
|
|
31
|
-
description: "
|
|
32
|
-
instancePrompt: "
|
|
33
|
-
modelType: CustomModelType.
|
|
34
|
-
name: "
|
|
31
|
+
datasetId: "24/7",
|
|
32
|
+
description: "Proactive transitional function",
|
|
33
|
+
instancePrompt: "Des",
|
|
34
|
+
modelType: CustomModelType.PixelArt,
|
|
35
|
+
name: "Officer female",
|
|
35
36
|
nsfw: false,
|
|
36
|
-
resolution:
|
|
37
|
+
resolution: 451662,
|
|
37
38
|
sdVersion: SdVersions.V2,
|
|
38
|
-
strength: Strength.
|
|
39
|
+
strength: Strength.High,
|
|
39
40
|
}).then((res: CreateModelResponse) => {
|
|
40
41
|
if (res.statusCode == 200) {
|
|
41
42
|
// handle response
|
|
@@ -71,7 +72,7 @@ const sdk = new Leonardo({
|
|
|
71
72
|
bearerAuth: "",
|
|
72
73
|
},
|
|
73
74
|
});
|
|
74
|
-
const id: string = "
|
|
75
|
+
const id: string = "Mills";
|
|
75
76
|
|
|
76
77
|
sdk.model.deleteModelById(id).then((res: DeleteModelByIdResponse) => {
|
|
77
78
|
if (res.statusCode == 200) {
|
|
@@ -108,9 +109,9 @@ const sdk = new Leonardo({
|
|
|
108
109
|
bearerAuth: "",
|
|
109
110
|
},
|
|
110
111
|
});
|
|
111
|
-
const id: string = "
|
|
112
|
+
const id: string = "Electronics";
|
|
112
113
|
const requestBody: DeleteModels3dIdRequestBody = {
|
|
113
|
-
id: "
|
|
114
|
+
id: "<ID>",
|
|
114
115
|
};
|
|
115
116
|
|
|
116
117
|
sdk.model.deleteModels3dId(id, requestBody).then((res: DeleteModels3dIdResponse) => {
|
|
@@ -149,7 +150,7 @@ const sdk = new Leonardo({
|
|
|
149
150
|
bearerAuth: "",
|
|
150
151
|
},
|
|
151
152
|
});
|
|
152
|
-
const id: string = "
|
|
153
|
+
const id: string = "protocol";
|
|
153
154
|
|
|
154
155
|
sdk.model.getModelById(id).then((res: GetModelByIdResponse) => {
|
|
155
156
|
if (res.statusCode == 200) {
|
|
@@ -186,8 +187,8 @@ const sdk = new Leonardo({
|
|
|
186
187
|
bearerAuth: "",
|
|
187
188
|
},
|
|
188
189
|
});
|
|
189
|
-
const limit: number =
|
|
190
|
-
const offset: number =
|
|
190
|
+
const limit: number = 419487;
|
|
191
|
+
const offset: number = 472174;
|
|
191
192
|
|
|
192
193
|
sdk.model.getPlatformModels(limit, offset).then((res: GetPlatformModelsResponse) => {
|
|
193
194
|
if (res.statusCode == 200) {
|
|
@@ -227,8 +228,8 @@ const sdk = new Leonardo({
|
|
|
227
228
|
});
|
|
228
229
|
|
|
229
230
|
sdk.model.postModels3dUpload({
|
|
230
|
-
modelExtension: "
|
|
231
|
-
name: "
|
|
231
|
+
modelExtension: "Bromine",
|
|
232
|
+
name: "Electric Berkshire",
|
|
232
233
|
}).then((res: PostModels3dUploadResponse) => {
|
|
233
234
|
if (res.statusCode == 200) {
|
|
234
235
|
// handle response
|
package/docs/sdks/user/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
# Variation
|
|
2
|
+
(*variation*)
|
|
2
3
|
|
|
3
4
|
### Available Operations
|
|
4
5
|
|
|
@@ -23,7 +24,7 @@ const sdk = new Leonardo({
|
|
|
23
24
|
});
|
|
24
25
|
|
|
25
26
|
sdk.variation.createVariationUpscale({
|
|
26
|
-
id: "
|
|
27
|
+
id: "<ID>",
|
|
27
28
|
}).then((res: CreateVariationUpscaleResponse) => {
|
|
28
29
|
if (res.statusCode == 200) {
|
|
29
30
|
// handle response
|
|
@@ -59,7 +60,7 @@ const sdk = new Leonardo({
|
|
|
59
60
|
bearerAuth: "",
|
|
60
61
|
},
|
|
61
62
|
});
|
|
62
|
-
const id: string = "
|
|
63
|
+
const id: string = "walker";
|
|
63
64
|
|
|
64
65
|
sdk.variation.getVariationById(id).then((res: GetVariationByIdResponse) => {
|
|
65
66
|
if (res.statusCode == 200) {
|
|
@@ -98,7 +99,7 @@ const sdk = new Leonardo({
|
|
|
98
99
|
});
|
|
99
100
|
|
|
100
101
|
sdk.variation.postVariationsUnzoom({
|
|
101
|
-
id: "
|
|
102
|
+
id: "<ID>",
|
|
102
103
|
isVariation: false,
|
|
103
104
|
}).then((res: PostVariationsUnzoomResponse) => {
|
|
104
105
|
if (res.statusCode == 200) {
|