@leonardo-ai/sdk 1.11.3 → 1.18.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 +2 -2
- package/dist/index.js +3 -0
- package/dist/internal/utils/contenttype.js +3 -0
- package/dist/internal/utils/headers.js +3 -0
- package/dist/internal/utils/index.js +3 -0
- package/dist/internal/utils/pathparams.js +3 -0
- package/dist/internal/utils/queryparams.js +4 -1
- package/dist/internal/utils/requestbody.js +8 -3
- package/dist/internal/utils/retries.js +3 -0
- package/dist/internal/utils/security.js +5 -1
- package/dist/internal/utils/utils.js +15 -9
- package/dist/sdk/dataset.d.ts +15 -10
- package/dist/sdk/dataset.js +23 -15
- package/dist/sdk/generation.d.ts +12 -8
- package/dist/sdk/generation.js +19 -12
- package/dist/sdk/index.js +3 -0
- package/dist/sdk/initimage.d.ts +9 -6
- package/dist/sdk/initimage.js +15 -9
- package/dist/sdk/model.d.ts +9 -6
- package/dist/sdk/model.js +15 -9
- package/dist/sdk/models/operations/createdataset.d.ts +19 -1
- package/dist/sdk/models/operations/createdataset.js +10 -2
- package/dist/sdk/models/operations/creategeneration.d.ts +63 -0
- package/dist/sdk/models/operations/creategeneration.js +9 -0
- package/dist/sdk/models/operations/createmodel.d.ts +36 -0
- package/dist/sdk/models/operations/createmodel.js +9 -0
- package/dist/sdk/models/operations/createvariationupscale.d.ts +9 -0
- package/dist/sdk/models/operations/createvariationupscale.js +9 -0
- package/dist/sdk/models/operations/deletedatasetbyid.d.ts +13 -1
- package/dist/sdk/models/operations/deletedatasetbyid.js +7 -2
- package/dist/sdk/models/operations/deletegenerationbyid.d.ts +13 -1
- package/dist/sdk/models/operations/deletegenerationbyid.js +7 -2
- package/dist/sdk/models/operations/deleteinitimagebyid.d.ts +13 -1
- package/dist/sdk/models/operations/deleteinitimagebyid.js +7 -2
- package/dist/sdk/models/operations/deletemodelbyid.d.ts +13 -1
- package/dist/sdk/models/operations/deletemodelbyid.js +7 -2
- package/dist/sdk/models/operations/getdatasetbyid.d.ts +14 -2
- package/dist/sdk/models/operations/getdatasetbyid.js +8 -4
- package/dist/sdk/models/operations/getgenerationbyid.d.ts +33 -3
- package/dist/sdk/models/operations/getgenerationbyid.js +9 -6
- package/dist/sdk/models/operations/getgenerationsbyuserid.d.ts +27 -3
- package/dist/sdk/models/operations/getgenerationsbyuserid.js +9 -6
- package/dist/sdk/models/operations/getinitimagebyid.d.ts +13 -1
- package/dist/sdk/models/operations/getinitimagebyid.js +7 -2
- package/dist/sdk/models/operations/getmodelbyid.d.ts +22 -1
- package/dist/sdk/models/operations/getmodelbyid.js +7 -2
- package/dist/sdk/models/operations/getuserself.d.ts +11 -2
- package/dist/sdk/models/operations/getuserself.js +8 -4
- package/dist/sdk/models/operations/getvariationbyid.d.ts +16 -1
- package/dist/sdk/models/operations/getvariationbyid.js +7 -2
- package/dist/sdk/models/operations/index.js +3 -0
- package/dist/sdk/models/operations/uploaddatasetimage.d.ts +18 -0
- package/dist/sdk/models/operations/uploaddatasetimage.js +9 -0
- package/dist/sdk/models/operations/uploaddatasetimagefromgen.d.ts +18 -0
- package/dist/sdk/models/operations/uploaddatasetimagefromgen.js +9 -0
- package/dist/sdk/models/operations/uploadinitimage.d.ts +12 -0
- package/dist/sdk/models/operations/uploadinitimage.js +9 -0
- package/dist/sdk/models/shared/custommodeltypeenum.d.ts +3 -0
- package/dist/sdk/models/shared/custommodeltypeenum.js +6 -0
- package/dist/sdk/models/shared/index.js +3 -0
- package/dist/sdk/models/shared/jobstatusenum.d.ts +3 -0
- package/dist/sdk/models/shared/jobstatusenum.js +6 -0
- package/dist/sdk/models/shared/sdgenerationschedulersenum.d.ts +3 -0
- package/dist/sdk/models/shared/sdgenerationschedulersenum.js +6 -0
- package/dist/sdk/models/shared/sdgenerationstyleenum.d.ts +3 -0
- package/dist/sdk/models/shared/sdgenerationstyleenum.js +6 -0
- package/dist/sdk/models/shared/sdversionsenum.d.ts +3 -0
- package/dist/sdk/models/shared/sdversionsenum.js +6 -0
- package/dist/sdk/models/shared/security.js +3 -0
- package/dist/sdk/models/shared/strengthenum.d.ts +3 -0
- package/dist/sdk/models/shared/strengthenum.js +6 -0
- package/dist/sdk/models/shared/variationtypeenum.d.ts +3 -0
- package/dist/sdk/models/shared/variationtypeenum.js +6 -0
- package/dist/sdk/sdk.d.ts +19 -1
- package/dist/sdk/sdk.js +17 -5
- package/dist/sdk/user.d.ts +3 -2
- package/dist/sdk/user.js +7 -3
- package/dist/sdk/variation.d.ts +6 -4
- package/dist/sdk/variation.js +11 -6
- package/package.json +5 -2
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
6
|
if (k2 === undefined) k2 = k;
|
|
4
7
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.getHeadersFromResponse = exports.getHeadersFromRequest = exports.headerMetadataKey = void 0;
|
|
4
7
|
var utils_1 = require("./utils");
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
6
|
if (k2 === undefined) k2 = k;
|
|
4
7
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.serializeQueryParams = exports.qpMetadataKey = void 0;
|
|
4
7
|
var utils_1 = require("./utils");
|
|
@@ -19,7 +22,7 @@ function serializeQueryParams(queryParams, globals) {
|
|
|
19
22
|
return;
|
|
20
23
|
var qpAnn = Reflect.getMetadata(exports.qpMetadataKey, queryParams, fname);
|
|
21
24
|
if (!qpAnn)
|
|
22
|
-
return { serialize: function (
|
|
25
|
+
return { serialize: function () { return ""; } };
|
|
23
26
|
var qpDecorator = (0, utils_1.parseParamDecorator)(qpAnn, fname, "form", true);
|
|
24
27
|
if (!qpDecorator)
|
|
25
28
|
return;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
6
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
7
|
};
|
|
5
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
9
|
exports.serializeRequestBody = exports.requestMetadataKey = void 0;
|
|
7
|
-
var form_data_1 = __importDefault(require("form-data"));
|
|
8
10
|
var utils_1 = require("./utils");
|
|
11
|
+
var form_data_1 = __importDefault(require("form-data"));
|
|
9
12
|
exports.requestMetadataKey = "request";
|
|
10
13
|
var mpFormMetadataKey = "multipart_form";
|
|
11
14
|
function serializeRequestBody(request, requestFieldName, serializationMethod) {
|
|
12
|
-
if (request !== Object(request) ||
|
|
15
|
+
if (request !== Object(request) ||
|
|
16
|
+
!request.hasOwnProperty(requestFieldName)) {
|
|
13
17
|
return serializeContentType(utils_1.SerializationMethodToContentType[serializationMethod], request);
|
|
14
18
|
}
|
|
15
19
|
var requestBodyAnn = Reflect.getMetadata(exports.requestMetadataKey, request, requestFieldName);
|
|
@@ -42,7 +46,7 @@ var serializeContentType = function (contentType, reqBody) {
|
|
|
42
46
|
reqBody,
|
|
43
47
|
], requestHeaders = _b[0], requestBody = _b[1];
|
|
44
48
|
break;
|
|
45
|
-
default:
|
|
49
|
+
default: {
|
|
46
50
|
requestBody = reqBody;
|
|
47
51
|
var requestBodyType = typeof requestBody;
|
|
48
52
|
if (requestBodyType === "string" ||
|
|
@@ -51,6 +55,7 @@ var serializeContentType = function (contentType, reqBody) {
|
|
|
51
55
|
requestHeaders = { "Content-Type": "".concat(contentType) };
|
|
52
56
|
else
|
|
53
57
|
throw new Error("invalid request body type ".concat(requestBodyType, " for mediaType ").concat(contentType));
|
|
58
|
+
}
|
|
54
59
|
}
|
|
55
60
|
return [requestHeaders, requestBody];
|
|
56
61
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.createSecurityClient = void 0;
|
|
4
7
|
var securityMetadataKey = "security";
|
|
@@ -103,11 +106,12 @@ function parseSecuritySchemeValue(client, schemeDecorator, securityDecorator, va
|
|
|
103
106
|
case "query":
|
|
104
107
|
client.defaults.params[securityDecorator.Name] = value;
|
|
105
108
|
break;
|
|
106
|
-
case "cookie":
|
|
109
|
+
case "cookie": {
|
|
107
110
|
var securityDecoratorName = securityDecorator.Name;
|
|
108
111
|
var val = value;
|
|
109
112
|
client.defaults.headers.common["Cookie"] = "".concat(securityDecoratorName, "=").concat(val);
|
|
110
113
|
break;
|
|
114
|
+
}
|
|
111
115
|
default:
|
|
112
116
|
throw new Error("not supported");
|
|
113
117
|
}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.populateFromGlobals = exports.getResFieldDepth = exports.deserializeJSONResponse = exports.encodeAndConvertPrimitiveVal = exports.convertIfDateObjectToISOString = exports.isEmpty = exports.isBooleanRecord = exports.isNumberRecord = exports.isStringRecord = exports.parseParamDecorator = exports.generateURL = exports.templateUrl = exports.SpeakeasyMetadata = exports.ParamDecorator = exports.SpeakeasyBase = exports.SerializationMethodToContentType = void 0;
|
|
4
7
|
require("reflect-metadata");
|
|
@@ -6,11 +9,11 @@ var pathparams_1 = require("./pathparams");
|
|
|
6
9
|
var class_transformer_1 = require("class-transformer");
|
|
7
10
|
var requestbody_1 = require("./requestbody");
|
|
8
11
|
exports.SerializationMethodToContentType = {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
json: "application/json",
|
|
13
|
+
form: "application/x-www-form-urlencoded",
|
|
14
|
+
multipart: "multipart/form-data",
|
|
15
|
+
raw: "application/octet-stream",
|
|
16
|
+
string: "text/plain",
|
|
14
17
|
};
|
|
15
18
|
function isSpeakeasyBase(type) {
|
|
16
19
|
var _a;
|
|
@@ -159,11 +162,12 @@ function generateURL(serverURL, path, pathParams, globals) {
|
|
|
159
162
|
var value = pathParams[fname];
|
|
160
163
|
value = populateFromGlobals(value, fname, "pathParam", globals);
|
|
161
164
|
switch (ppDecorator.Style) {
|
|
162
|
-
case "simple":
|
|
165
|
+
case "simple": {
|
|
163
166
|
var simpleParams = (0, pathparams_1.getSimplePathParams)(ppDecorator.ParamName, value, ppDecorator.Explode, ppDecorator.DateTimeFormat);
|
|
164
167
|
simpleParams.forEach(function (value, key) {
|
|
165
168
|
parsedParameters[key] = value;
|
|
166
169
|
});
|
|
170
|
+
}
|
|
167
171
|
}
|
|
168
172
|
});
|
|
169
173
|
return templateUrl(url, parsedParameters);
|
|
@@ -236,9 +240,11 @@ function convertIfDateObjectToISOString(value, dateTimeFormat) {
|
|
|
236
240
|
if (value instanceof Date) {
|
|
237
241
|
if (dtFormat === "YYYY-MM-DD") {
|
|
238
242
|
var dateRegex = /^(\d{4})-(\d{2})-(\d{2})/;
|
|
239
|
-
var
|
|
240
|
-
|
|
241
|
-
|
|
243
|
+
var matches = value.toISOString().match(dateRegex);
|
|
244
|
+
if (matches == null) {
|
|
245
|
+
throw new Error("Date format is not valid");
|
|
246
|
+
}
|
|
247
|
+
var year = matches[1], month = matches[2], day = matches[3];
|
|
242
248
|
return "".concat(year, "-").concat(month, "-").concat(day);
|
|
243
249
|
}
|
|
244
250
|
if (dtFormat === "YYYY-MM-DDThh:mm:ss.sssZ") {
|
package/dist/sdk/dataset.d.ts
CHANGED
|
@@ -9,33 +9,38 @@ export declare class Dataset {
|
|
|
9
9
|
_genVersion: string;
|
|
10
10
|
constructor(defaultClient: AxiosInstance, securityClient: AxiosInstance, serverURL: string, language: string, sdkVersion: string, genVersion: string);
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Create a Dataset
|
|
13
13
|
*
|
|
14
|
+
* @remarks
|
|
14
15
|
* This endpoint creates a new dataset
|
|
15
|
-
|
|
16
|
+
*/
|
|
16
17
|
createDataset(req: operations.CreateDatasetRequestBody, config?: AxiosRequestConfig): Promise<operations.CreateDatasetResponse>;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Delete a Single Dataset by ID
|
|
19
20
|
*
|
|
21
|
+
* @remarks
|
|
20
22
|
* This endpoint deletes the specific dataset
|
|
21
|
-
|
|
23
|
+
*/
|
|
22
24
|
deleteDatasetById(req: operations.DeleteDatasetByIdRequest, config?: AxiosRequestConfig): Promise<operations.DeleteDatasetByIdResponse>;
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* Get a Single Dataset by ID
|
|
25
27
|
*
|
|
28
|
+
* @remarks
|
|
26
29
|
* This endpoint gets the specific dataset
|
|
27
|
-
|
|
30
|
+
*/
|
|
28
31
|
getDatasetById(req: operations.GetDatasetByIdRequest, config?: AxiosRequestConfig): Promise<operations.GetDatasetByIdResponse>;
|
|
29
32
|
/**
|
|
30
|
-
*
|
|
33
|
+
* Upload dataset image
|
|
31
34
|
*
|
|
35
|
+
* @remarks
|
|
32
36
|
* This endpoint returns presigned details to upload a dataset image to S3
|
|
33
|
-
|
|
37
|
+
*/
|
|
34
38
|
uploadDatasetImage(req: operations.UploadDatasetImageRequest, config?: AxiosRequestConfig): Promise<operations.UploadDatasetImageResponse>;
|
|
35
39
|
/**
|
|
36
|
-
*
|
|
40
|
+
* Upload a Single Generated Image to a Dataset
|
|
37
41
|
*
|
|
42
|
+
* @remarks
|
|
38
43
|
* This endpoint will upload a previously generated image to the dataset
|
|
39
|
-
|
|
44
|
+
*/
|
|
40
45
|
uploadDatasetImageFromGen(req: operations.UploadDatasetImageFromGenRequest, config?: AxiosRequestConfig): Promise<operations.UploadDatasetImageFromGenResponse>;
|
|
41
46
|
}
|
package/dist/sdk/dataset.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
var __assign = (this && this.__assign) || function () {
|
|
3
6
|
__assign = Object.assign || function(t) {
|
|
4
7
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -47,10 +50,11 @@ var Dataset = /** @class */ (function () {
|
|
|
47
50
|
this._genVersion = genVersion;
|
|
48
51
|
}
|
|
49
52
|
/**
|
|
50
|
-
*
|
|
53
|
+
* Create a Dataset
|
|
51
54
|
*
|
|
55
|
+
* @remarks
|
|
52
56
|
* This endpoint creates a new dataset
|
|
53
|
-
|
|
57
|
+
*/
|
|
54
58
|
Dataset.prototype.createDataset = function (req, config) {
|
|
55
59
|
var _a;
|
|
56
60
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
@@ -67,7 +71,7 @@ var Dataset = /** @class */ (function () {
|
|
|
67
71
|
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
|
-
var client = this._securityClient;
|
|
74
|
+
var client = this._securityClient || this._defaultClient;
|
|
71
75
|
var headers = __assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers);
|
|
72
76
|
if (reqBody == null || Object.keys(reqBody).length === 0)
|
|
73
77
|
throw new Error("request body is required");
|
|
@@ -94,17 +98,18 @@ var Dataset = /** @class */ (function () {
|
|
|
94
98
|
});
|
|
95
99
|
};
|
|
96
100
|
/**
|
|
97
|
-
*
|
|
101
|
+
* Delete a Single Dataset by ID
|
|
98
102
|
*
|
|
103
|
+
* @remarks
|
|
99
104
|
* This endpoint deletes the specific dataset
|
|
100
|
-
|
|
105
|
+
*/
|
|
101
106
|
Dataset.prototype.deleteDatasetById = function (req, config) {
|
|
102
107
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
103
108
|
req = new operations.DeleteDatasetByIdRequest(req);
|
|
104
109
|
}
|
|
105
110
|
var baseURL = this._serverURL;
|
|
106
111
|
var url = utils.generateURL(baseURL, "/datasets/{id}", req);
|
|
107
|
-
var client = this._securityClient;
|
|
112
|
+
var client = this._securityClient || this._defaultClient;
|
|
108
113
|
var r = client.request(__assign({ url: url, method: "delete" }, config));
|
|
109
114
|
return r.then(function (httpRes) {
|
|
110
115
|
var _a, _b;
|
|
@@ -128,17 +133,18 @@ var Dataset = /** @class */ (function () {
|
|
|
128
133
|
});
|
|
129
134
|
};
|
|
130
135
|
/**
|
|
131
|
-
*
|
|
136
|
+
* Get a Single Dataset by ID
|
|
132
137
|
*
|
|
138
|
+
* @remarks
|
|
133
139
|
* This endpoint gets the specific dataset
|
|
134
|
-
|
|
140
|
+
*/
|
|
135
141
|
Dataset.prototype.getDatasetById = function (req, config) {
|
|
136
142
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
137
143
|
req = new operations.GetDatasetByIdRequest(req);
|
|
138
144
|
}
|
|
139
145
|
var baseURL = this._serverURL;
|
|
140
146
|
var url = utils.generateURL(baseURL, "/datasets/{id}", req);
|
|
141
|
-
var client = this._securityClient;
|
|
147
|
+
var client = this._securityClient || this._defaultClient;
|
|
142
148
|
var r = client.request(__assign({ url: url, method: "get" }, config));
|
|
143
149
|
return r.then(function (httpRes) {
|
|
144
150
|
var _a, _b;
|
|
@@ -162,10 +168,11 @@ var Dataset = /** @class */ (function () {
|
|
|
162
168
|
});
|
|
163
169
|
};
|
|
164
170
|
/**
|
|
165
|
-
*
|
|
171
|
+
* Upload dataset image
|
|
166
172
|
*
|
|
173
|
+
* @remarks
|
|
167
174
|
* This endpoint returns presigned details to upload a dataset image to S3
|
|
168
|
-
|
|
175
|
+
*/
|
|
169
176
|
Dataset.prototype.uploadDatasetImage = function (req, config) {
|
|
170
177
|
var _a;
|
|
171
178
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
@@ -182,7 +189,7 @@ var Dataset = /** @class */ (function () {
|
|
|
182
189
|
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
183
190
|
}
|
|
184
191
|
}
|
|
185
|
-
var client = this._securityClient;
|
|
192
|
+
var client = this._securityClient || this._defaultClient;
|
|
186
193
|
var headers = __assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers);
|
|
187
194
|
if (reqBody == null || Object.keys(reqBody).length === 0)
|
|
188
195
|
throw new Error("request body is required");
|
|
@@ -209,10 +216,11 @@ var Dataset = /** @class */ (function () {
|
|
|
209
216
|
});
|
|
210
217
|
};
|
|
211
218
|
/**
|
|
212
|
-
*
|
|
219
|
+
* Upload a Single Generated Image to a Dataset
|
|
213
220
|
*
|
|
221
|
+
* @remarks
|
|
214
222
|
* This endpoint will upload a previously generated image to the dataset
|
|
215
|
-
|
|
223
|
+
*/
|
|
216
224
|
Dataset.prototype.uploadDatasetImageFromGen = function (req, config) {
|
|
217
225
|
var _a;
|
|
218
226
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
@@ -229,7 +237,7 @@ var Dataset = /** @class */ (function () {
|
|
|
229
237
|
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
230
238
|
}
|
|
231
239
|
}
|
|
232
|
-
var client = this._securityClient;
|
|
240
|
+
var client = this._securityClient || this._defaultClient;
|
|
233
241
|
var headers = __assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers);
|
|
234
242
|
if (reqBody == null || Object.keys(reqBody).length === 0)
|
|
235
243
|
throw new Error("request body is required");
|
package/dist/sdk/generation.d.ts
CHANGED
|
@@ -9,27 +9,31 @@ export declare class Generation {
|
|
|
9
9
|
_genVersion: string;
|
|
10
10
|
constructor(defaultClient: AxiosInstance, securityClient: AxiosInstance, serverURL: string, language: string, sdkVersion: string, genVersion: string);
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Create a Generation of Images
|
|
13
13
|
*
|
|
14
|
+
* @remarks
|
|
14
15
|
* This endpoint will generate images
|
|
15
|
-
|
|
16
|
+
*/
|
|
16
17
|
createGeneration(req: operations.CreateGenerationRequestBody, config?: AxiosRequestConfig): Promise<operations.CreateGenerationResponse>;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Delete a Single Generation
|
|
19
20
|
*
|
|
21
|
+
* @remarks
|
|
20
22
|
* This endpoint deletes a specific generation
|
|
21
|
-
|
|
23
|
+
*/
|
|
22
24
|
deleteGenerationById(req: operations.DeleteGenerationByIdRequest, config?: AxiosRequestConfig): Promise<operations.DeleteGenerationByIdResponse>;
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* Get a Single Generation
|
|
25
27
|
*
|
|
28
|
+
* @remarks
|
|
26
29
|
* This endpoint will provide information about a specific generation
|
|
27
|
-
|
|
30
|
+
*/
|
|
28
31
|
getGenerationById(req: operations.GetGenerationByIdRequest, config?: AxiosRequestConfig): Promise<operations.GetGenerationByIdResponse>;
|
|
29
32
|
/**
|
|
30
|
-
*
|
|
33
|
+
* Get generations by user ID
|
|
31
34
|
*
|
|
35
|
+
* @remarks
|
|
32
36
|
* This endpoint returns all generations by a specific user
|
|
33
|
-
|
|
37
|
+
*/
|
|
34
38
|
getGenerationsByUserId(req: operations.GetGenerationsByUserIdRequest, config?: AxiosRequestConfig): Promise<operations.GetGenerationsByUserIdResponse>;
|
|
35
39
|
}
|
package/dist/sdk/generation.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
var __assign = (this && this.__assign) || function () {
|
|
3
6
|
__assign = Object.assign || function(t) {
|
|
4
7
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -47,10 +50,11 @@ var Generation = /** @class */ (function () {
|
|
|
47
50
|
this._genVersion = genVersion;
|
|
48
51
|
}
|
|
49
52
|
/**
|
|
50
|
-
*
|
|
53
|
+
* Create a Generation of Images
|
|
51
54
|
*
|
|
55
|
+
* @remarks
|
|
52
56
|
* This endpoint will generate images
|
|
53
|
-
|
|
57
|
+
*/
|
|
54
58
|
Generation.prototype.createGeneration = function (req, config) {
|
|
55
59
|
var _a;
|
|
56
60
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
@@ -67,7 +71,7 @@ var Generation = /** @class */ (function () {
|
|
|
67
71
|
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
|
-
var client = this._securityClient;
|
|
74
|
+
var client = this._securityClient || this._defaultClient;
|
|
71
75
|
var headers = __assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers);
|
|
72
76
|
if (reqBody == null || Object.keys(reqBody).length === 0)
|
|
73
77
|
throw new Error("request body is required");
|
|
@@ -94,17 +98,18 @@ var Generation = /** @class */ (function () {
|
|
|
94
98
|
});
|
|
95
99
|
};
|
|
96
100
|
/**
|
|
97
|
-
*
|
|
101
|
+
* Delete a Single Generation
|
|
98
102
|
*
|
|
103
|
+
* @remarks
|
|
99
104
|
* This endpoint deletes a specific generation
|
|
100
|
-
|
|
105
|
+
*/
|
|
101
106
|
Generation.prototype.deleteGenerationById = function (req, config) {
|
|
102
107
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
103
108
|
req = new operations.DeleteGenerationByIdRequest(req);
|
|
104
109
|
}
|
|
105
110
|
var baseURL = this._serverURL;
|
|
106
111
|
var url = utils.generateURL(baseURL, "/generations/{id}", req);
|
|
107
|
-
var client = this._securityClient;
|
|
112
|
+
var client = this._securityClient || this._defaultClient;
|
|
108
113
|
var r = client.request(__assign({ url: url, method: "delete" }, config));
|
|
109
114
|
return r.then(function (httpRes) {
|
|
110
115
|
var _a, _b;
|
|
@@ -128,17 +133,18 @@ var Generation = /** @class */ (function () {
|
|
|
128
133
|
});
|
|
129
134
|
};
|
|
130
135
|
/**
|
|
131
|
-
*
|
|
136
|
+
* Get a Single Generation
|
|
132
137
|
*
|
|
138
|
+
* @remarks
|
|
133
139
|
* This endpoint will provide information about a specific generation
|
|
134
|
-
|
|
140
|
+
*/
|
|
135
141
|
Generation.prototype.getGenerationById = function (req, config) {
|
|
136
142
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
137
143
|
req = new operations.GetGenerationByIdRequest(req);
|
|
138
144
|
}
|
|
139
145
|
var baseURL = this._serverURL;
|
|
140
146
|
var url = utils.generateURL(baseURL, "/generations/{id}", req);
|
|
141
|
-
var client = this._securityClient;
|
|
147
|
+
var client = this._securityClient || this._defaultClient;
|
|
142
148
|
var r = client.request(__assign({ url: url, method: "get" }, config));
|
|
143
149
|
return r.then(function (httpRes) {
|
|
144
150
|
var _a, _b;
|
|
@@ -162,17 +168,18 @@ var Generation = /** @class */ (function () {
|
|
|
162
168
|
});
|
|
163
169
|
};
|
|
164
170
|
/**
|
|
165
|
-
*
|
|
171
|
+
* Get generations by user ID
|
|
166
172
|
*
|
|
173
|
+
* @remarks
|
|
167
174
|
* This endpoint returns all generations by a specific user
|
|
168
|
-
|
|
175
|
+
*/
|
|
169
176
|
Generation.prototype.getGenerationsByUserId = function (req, config) {
|
|
170
177
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
171
178
|
req = new operations.GetGenerationsByUserIdRequest(req);
|
|
172
179
|
}
|
|
173
180
|
var baseURL = this._serverURL;
|
|
174
181
|
var url = utils.generateURL(baseURL, "/generations/user/{userId}", req);
|
|
175
|
-
var client = this._securityClient;
|
|
182
|
+
var client = this._securityClient || this._defaultClient;
|
|
176
183
|
var queryParams = utils.serializeQueryParams(req);
|
|
177
184
|
var r = client.request(__assign({ url: url + queryParams, method: "get" }, config));
|
|
178
185
|
return r.then(function (httpRes) {
|
package/dist/sdk/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
6
|
if (k2 === undefined) k2 = k;
|
|
4
7
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
package/dist/sdk/initimage.d.ts
CHANGED
|
@@ -9,21 +9,24 @@ export declare class InitImage {
|
|
|
9
9
|
_genVersion: string;
|
|
10
10
|
constructor(defaultClient: AxiosInstance, securityClient: AxiosInstance, serverURL: string, language: string, sdkVersion: string, genVersion: string);
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Delete init image
|
|
13
13
|
*
|
|
14
|
+
* @remarks
|
|
14
15
|
* This endpoint deletes an init image
|
|
15
|
-
|
|
16
|
+
*/
|
|
16
17
|
deleteInitImageById(req: operations.DeleteInitImageByIdRequest, config?: AxiosRequestConfig): Promise<operations.DeleteInitImageByIdResponse>;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Get single init image
|
|
19
20
|
*
|
|
21
|
+
* @remarks
|
|
20
22
|
* This endpoint will return a single init image
|
|
21
|
-
|
|
23
|
+
*/
|
|
22
24
|
getInitImageById(req: operations.GetInitImageByIdRequest, config?: AxiosRequestConfig): Promise<operations.GetInitImageByIdResponse>;
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* Upload init image
|
|
25
27
|
*
|
|
28
|
+
* @remarks
|
|
26
29
|
* This endpoint returns presigned details to upload an init image to S3
|
|
27
|
-
|
|
30
|
+
*/
|
|
28
31
|
uploadInitImage(req: operations.UploadInitImageRequestBody, config?: AxiosRequestConfig): Promise<operations.UploadInitImageResponse>;
|
|
29
32
|
}
|
package/dist/sdk/initimage.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
2
5
|
var __assign = (this && this.__assign) || function () {
|
|
3
6
|
__assign = Object.assign || function(t) {
|
|
4
7
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -47,17 +50,18 @@ var InitImage = /** @class */ (function () {
|
|
|
47
50
|
this._genVersion = genVersion;
|
|
48
51
|
}
|
|
49
52
|
/**
|
|
50
|
-
*
|
|
53
|
+
* Delete init image
|
|
51
54
|
*
|
|
55
|
+
* @remarks
|
|
52
56
|
* This endpoint deletes an init image
|
|
53
|
-
|
|
57
|
+
*/
|
|
54
58
|
InitImage.prototype.deleteInitImageById = function (req, config) {
|
|
55
59
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
56
60
|
req = new operations.DeleteInitImageByIdRequest(req);
|
|
57
61
|
}
|
|
58
62
|
var baseURL = this._serverURL;
|
|
59
63
|
var url = utils.generateURL(baseURL, "/init-image/{id}", req);
|
|
60
|
-
var client = this._securityClient;
|
|
64
|
+
var client = this._securityClient || this._defaultClient;
|
|
61
65
|
var r = client.request(__assign({ url: url, method: "delete" }, config));
|
|
62
66
|
return r.then(function (httpRes) {
|
|
63
67
|
var _a, _b;
|
|
@@ -81,17 +85,18 @@ var InitImage = /** @class */ (function () {
|
|
|
81
85
|
});
|
|
82
86
|
};
|
|
83
87
|
/**
|
|
84
|
-
*
|
|
88
|
+
* Get single init image
|
|
85
89
|
*
|
|
90
|
+
* @remarks
|
|
86
91
|
* This endpoint will return a single init image
|
|
87
|
-
|
|
92
|
+
*/
|
|
88
93
|
InitImage.prototype.getInitImageById = function (req, config) {
|
|
89
94
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
90
95
|
req = new operations.GetInitImageByIdRequest(req);
|
|
91
96
|
}
|
|
92
97
|
var baseURL = this._serverURL;
|
|
93
98
|
var url = utils.generateURL(baseURL, "/init-image/{id}", req);
|
|
94
|
-
var client = this._securityClient;
|
|
99
|
+
var client = this._securityClient || this._defaultClient;
|
|
95
100
|
var r = client.request(__assign({ url: url, method: "get" }, config));
|
|
96
101
|
return r.then(function (httpRes) {
|
|
97
102
|
var _a, _b;
|
|
@@ -115,10 +120,11 @@ var InitImage = /** @class */ (function () {
|
|
|
115
120
|
});
|
|
116
121
|
};
|
|
117
122
|
/**
|
|
118
|
-
*
|
|
123
|
+
* Upload init image
|
|
119
124
|
*
|
|
125
|
+
* @remarks
|
|
120
126
|
* This endpoint returns presigned details to upload an init image to S3
|
|
121
|
-
|
|
127
|
+
*/
|
|
122
128
|
InitImage.prototype.uploadInitImage = function (req, config) {
|
|
123
129
|
var _a;
|
|
124
130
|
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
@@ -135,7 +141,7 @@ var InitImage = /** @class */ (function () {
|
|
|
135
141
|
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
136
142
|
}
|
|
137
143
|
}
|
|
138
|
-
var client = this._securityClient;
|
|
144
|
+
var client = this._securityClient || this._defaultClient;
|
|
139
145
|
var headers = __assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers);
|
|
140
146
|
if (reqBody == null || Object.keys(reqBody).length === 0)
|
|
141
147
|
throw new Error("request body is required");
|
package/dist/sdk/model.d.ts
CHANGED
|
@@ -9,21 +9,24 @@ export declare class Model {
|
|
|
9
9
|
_genVersion: string;
|
|
10
10
|
constructor(defaultClient: AxiosInstance, securityClient: AxiosInstance, serverURL: string, language: string, sdkVersion: string, genVersion: string);
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Train a Custom Model
|
|
13
13
|
*
|
|
14
|
+
* @remarks
|
|
14
15
|
* This endpoint will train a new custom model
|
|
15
|
-
|
|
16
|
+
*/
|
|
16
17
|
createModel(req: operations.CreateModelRequestBody, config?: AxiosRequestConfig): Promise<operations.CreateModelResponse>;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* Delete a Single Custom Model by ID
|
|
19
20
|
*
|
|
21
|
+
* @remarks
|
|
20
22
|
* This endpoint will delete a specific custom model
|
|
21
|
-
|
|
23
|
+
*/
|
|
22
24
|
deleteModelById(req: operations.DeleteModelByIdRequest, config?: AxiosRequestConfig): Promise<operations.DeleteModelByIdResponse>;
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* Get a Single Custom Model by ID
|
|
25
27
|
*
|
|
28
|
+
* @remarks
|
|
26
29
|
* This endpoint gets the specific custom model
|
|
27
|
-
|
|
30
|
+
*/
|
|
28
31
|
getModelById(req: operations.GetModelByIdRequest, config?: AxiosRequestConfig): Promise<operations.GetModelByIdResponse>;
|
|
29
32
|
}
|