@leonardo-ai/sdk 1.1.1 → 1.2.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.
Files changed (108) hide show
  1. package/README.md +30 -29
  2. package/dist/sdk/dataset.d.ts +41 -0
  3. package/dist/sdk/{creatingdatasets.js → dataset.js} +46 -46
  4. package/dist/sdk/generation.d.ts +35 -0
  5. package/dist/sdk/{generatingimages.js → generation.js} +45 -45
  6. package/dist/sdk/{initimages.d.ts → initimage.d.ts} +7 -7
  7. package/dist/sdk/{initimages.js → initimage.js} +17 -17
  8. package/dist/sdk/{trainingmodels.d.ts → model.d.ts} +10 -10
  9. package/dist/sdk/{trainingmodels.js → model.js} +38 -38
  10. package/dist/sdk/models/operations/createdataset.d.ts +22 -0
  11. package/dist/sdk/models/operations/createdataset.js +104 -0
  12. package/dist/sdk/models/operations/creategeneration.d.ts +34 -0
  13. package/dist/sdk/models/operations/creategeneration.js +180 -0
  14. package/dist/sdk/models/operations/createmodel.d.ts +27 -0
  15. package/dist/sdk/models/operations/createmodel.js +152 -0
  16. package/dist/sdk/models/operations/createvariationupscale.d.ts +18 -0
  17. package/dist/sdk/models/operations/createvariationupscale.js +96 -0
  18. package/dist/sdk/models/operations/deletedatasetbyid.d.ts +21 -0
  19. package/dist/sdk/models/operations/deletedatasetbyid.js +100 -0
  20. package/dist/sdk/models/operations/deletegenerationbyid.d.ts +21 -0
  21. package/dist/sdk/models/operations/deletegenerationbyid.js +100 -0
  22. package/dist/sdk/models/operations/deleteinitimagebyid.d.ts +21 -0
  23. package/dist/sdk/models/operations/deleteinitimagebyid.js +100 -0
  24. package/dist/sdk/models/operations/deletemodelbyid.d.ts +21 -0
  25. package/dist/sdk/models/operations/deletemodelbyid.js +100 -0
  26. package/dist/sdk/models/operations/getdatasetbyid.d.ts +34 -0
  27. package/dist/sdk/models/operations/getdatasetbyid.js +144 -0
  28. package/dist/sdk/models/operations/getgenerationbyid.d.ts +56 -0
  29. package/dist/sdk/models/operations/getgenerationbyid.js +244 -0
  30. package/dist/sdk/models/operations/getgenerationsbyuserid.d.ts +61 -0
  31. package/dist/sdk/models/operations/getgenerationsbyuserid.js +264 -0
  32. package/dist/sdk/models/operations/getinitimagebyid.d.ts +23 -0
  33. package/dist/sdk/models/operations/getinitimagebyid.js +108 -0
  34. package/dist/sdk/models/operations/getmodelbyid.d.ts +33 -0
  35. package/dist/sdk/models/operations/getmodelbyid.js +168 -0
  36. package/dist/sdk/models/operations/getuserself.d.ts +23 -0
  37. package/dist/sdk/models/operations/getuserself.js +100 -0
  38. package/dist/sdk/models/operations/getvariationbyid.d.ts +26 -0
  39. package/dist/sdk/models/operations/getvariationbyid.js +140 -0
  40. package/dist/sdk/models/operations/index.d.ts +18 -18
  41. package/dist/sdk/models/operations/index.js +18 -18
  42. package/dist/sdk/models/operations/uploaddatasetimage.d.ts +25 -0
  43. package/dist/sdk/models/operations/uploaddatasetimage.js +124 -0
  44. package/dist/sdk/models/operations/uploaddatasetimagefromgen.d.ts +22 -0
  45. package/dist/sdk/models/operations/uploaddatasetimagefromgen.js +112 -0
  46. package/dist/sdk/models/operations/uploadinitimage.d.ts +22 -0
  47. package/dist/sdk/models/operations/uploadinitimage.js +112 -0
  48. package/dist/sdk/models/shared/custommodeltypeenum.d.ts +17 -0
  49. package/dist/sdk/models/shared/custommodeltypeenum.js +21 -0
  50. package/dist/sdk/models/shared/index.d.ts +7 -0
  51. package/dist/sdk/models/shared/index.js +7 -0
  52. package/dist/sdk/models/shared/jobstatusenum.d.ts +5 -0
  53. package/dist/sdk/models/shared/jobstatusenum.js +9 -0
  54. package/dist/sdk/models/shared/sdgenerationschedulersenum.d.ts +9 -0
  55. package/dist/sdk/models/shared/sdgenerationschedulersenum.js +13 -0
  56. package/dist/sdk/models/shared/sdgenerationstyleenum.d.ts +5 -0
  57. package/dist/sdk/models/shared/sdgenerationstyleenum.js +9 -0
  58. package/dist/sdk/models/shared/sdversionsenum.d.ts +5 -0
  59. package/dist/sdk/models/shared/sdversionsenum.js +9 -0
  60. package/dist/sdk/models/shared/strengthenum.d.ts +7 -0
  61. package/dist/sdk/models/shared/strengthenum.js +11 -0
  62. package/dist/sdk/models/shared/variationtypeenum.d.ts +8 -0
  63. package/dist/sdk/models/shared/variationtypeenum.js +12 -0
  64. package/dist/sdk/sdk.d.ts +12 -12
  65. package/dist/sdk/sdk.js +13 -13
  66. package/dist/sdk/{userinformation.d.ts → user.d.ts} +3 -3
  67. package/dist/sdk/{userinformation.js → user.js} +8 -8
  68. package/dist/sdk/{imagevariations.d.ts → variation.d.ts} +7 -7
  69. package/dist/sdk/{imagevariations.js → variation.js} +30 -30
  70. package/package.json +2 -19
  71. package/dist/sdk/creatingdatasets.d.ts +0 -41
  72. package/dist/sdk/generatingimages.d.ts +0 -35
  73. package/dist/sdk/models/operations/deletedatasetsid.d.ts +0 -12
  74. package/dist/sdk/models/operations/deletedatasetsid.js +0 -72
  75. package/dist/sdk/models/operations/deletegenerationsid.d.ts +0 -12
  76. package/dist/sdk/models/operations/deletegenerationsid.js +0 -72
  77. package/dist/sdk/models/operations/deleteinitimageid.d.ts +0 -12
  78. package/dist/sdk/models/operations/deleteinitimageid.js +0 -72
  79. package/dist/sdk/models/operations/deletemodelsid.d.ts +0 -12
  80. package/dist/sdk/models/operations/deletemodelsid.js +0 -72
  81. package/dist/sdk/models/operations/getdatasetsid.d.ts +0 -12
  82. package/dist/sdk/models/operations/getdatasetsid.js +0 -72
  83. package/dist/sdk/models/operations/getgenerationsid.d.ts +0 -12
  84. package/dist/sdk/models/operations/getgenerationsid.js +0 -72
  85. package/dist/sdk/models/operations/getgenerationsuseruserid.d.ts +0 -17
  86. package/dist/sdk/models/operations/getgenerationsuseruserid.js +0 -92
  87. package/dist/sdk/models/operations/getinitimageid.d.ts +0 -12
  88. package/dist/sdk/models/operations/getinitimageid.js +0 -72
  89. package/dist/sdk/models/operations/getme.d.ts +0 -6
  90. package/dist/sdk/models/operations/getme.js +0 -48
  91. package/dist/sdk/models/operations/getmodelsid.d.ts +0 -12
  92. package/dist/sdk/models/operations/getmodelsid.js +0 -72
  93. package/dist/sdk/models/operations/getvariationsid.d.ts +0 -12
  94. package/dist/sdk/models/operations/getvariationsid.js +0 -72
  95. package/dist/sdk/models/operations/postdatasets.d.ts +0 -13
  96. package/dist/sdk/models/operations/postdatasets.js +0 -76
  97. package/dist/sdk/models/operations/postdatasetsdatasetidupload.d.ts +0 -16
  98. package/dist/sdk/models/operations/postdatasetsdatasetidupload.js +0 -88
  99. package/dist/sdk/models/operations/postdatasetsdatasetiduploadgen.d.ts +0 -16
  100. package/dist/sdk/models/operations/postdatasetsdatasetiduploadgen.js +0 -88
  101. package/dist/sdk/models/operations/postgenerations.d.ts +0 -27
  102. package/dist/sdk/models/operations/postgenerations.js +0 -132
  103. package/dist/sdk/models/operations/postinitimage.d.ts +0 -12
  104. package/dist/sdk/models/operations/postinitimage.js +0 -72
  105. package/dist/sdk/models/operations/postmodels.d.ts +0 -20
  106. package/dist/sdk/models/operations/postmodels.js +0 -104
  107. package/dist/sdk/models/operations/postvariationsupscale.d.ts +0 -12
  108. package/dist/sdk/models/operations/postvariationsupscale.js +0 -72
@@ -34,11 +34,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
34
34
  return result;
35
35
  };
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.InitImages = void 0;
37
+ exports.InitImage = void 0;
38
38
  var utils = __importStar(require("../internal/utils"));
39
39
  var operations = __importStar(require("./models/operations"));
40
- var InitImages = /** @class */ (function () {
41
- function InitImages(defaultClient, securityClient, serverURL, language, sdkVersion, genVersion) {
40
+ var InitImage = /** @class */ (function () {
41
+ function InitImage(defaultClient, securityClient, serverURL, language, sdkVersion, genVersion) {
42
42
  this._defaultClient = defaultClient;
43
43
  this._securityClient = securityClient;
44
44
  this._serverURL = serverURL;
@@ -47,13 +47,13 @@ var InitImages = /** @class */ (function () {
47
47
  this._genVersion = genVersion;
48
48
  }
49
49
  /**
50
- * deleteInitImageId - Delete init image
50
+ * deleteInitImageById - Delete init image
51
51
  *
52
52
  * This endpoint deletes an init image
53
53
  **/
54
- InitImages.prototype.deleteInitImageId = function (req, config) {
54
+ InitImage.prototype.deleteInitImageById = function (req, config) {
55
55
  if (!(req instanceof utils.SpeakeasyBase)) {
56
- req = new operations.DeleteInitImageIdRequest(req);
56
+ req = new operations.DeleteInitImageByIdRequest(req);
57
57
  }
58
58
  var baseURL = this._serverURL;
59
59
  var url = utils.generateURL(baseURL, "/init-image/{id}", req.pathParams);
@@ -68,7 +68,7 @@ var InitImages = /** @class */ (function () {
68
68
  switch (true) {
69
69
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
70
70
  if (utils.matchContentType(contentType, "application/json")) {
71
- res.deleteInitImageId200ApplicationJSONAny = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
71
+ res.deleteInitImageById200ApplicationJSONObject = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
72
72
  }
73
73
  break;
74
74
  }
@@ -76,13 +76,13 @@ var InitImages = /** @class */ (function () {
76
76
  });
77
77
  };
78
78
  /**
79
- * getInitImageId - Get single init image
79
+ * getInitImageById - Get single init image
80
80
  *
81
81
  * This endpoint will return a single init image
82
82
  **/
83
- InitImages.prototype.getInitImageId = function (req, config) {
83
+ InitImage.prototype.getInitImageById = function (req, config) {
84
84
  if (!(req instanceof utils.SpeakeasyBase)) {
85
- req = new operations.GetInitImageIdRequest(req);
85
+ req = new operations.GetInitImageByIdRequest(req);
86
86
  }
87
87
  var baseURL = this._serverURL;
88
88
  var url = utils.generateURL(baseURL, "/init-image/{id}", req.pathParams);
@@ -97,7 +97,7 @@ var InitImages = /** @class */ (function () {
97
97
  switch (true) {
98
98
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
99
99
  if (utils.matchContentType(contentType, "application/json")) {
100
- res.getInitImageId200ApplicationJSONAny = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
100
+ res.getInitImageById200ApplicationJSONObject = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
101
101
  }
102
102
  break;
103
103
  }
@@ -105,14 +105,14 @@ var InitImages = /** @class */ (function () {
105
105
  });
106
106
  };
107
107
  /**
108
- * postInitImage - Upload init image
108
+ * uploadInitImage - Upload init image
109
109
  *
110
110
  * This endpoint returns presigned details to upload an init image to S3
111
111
  **/
112
- InitImages.prototype.postInitImage = function (req, config) {
112
+ InitImage.prototype.uploadInitImage = function (req, config) {
113
113
  var _a;
114
114
  if (!(req instanceof utils.SpeakeasyBase)) {
115
- req = new operations.PostInitImageRequest(req);
115
+ req = new operations.UploadInitImageRequest(req);
116
116
  }
117
117
  var baseURL = this._serverURL;
118
118
  var url = baseURL.replace(/\/$/, "") + "/init-image";
@@ -139,13 +139,13 @@ var InitImages = /** @class */ (function () {
139
139
  switch (true) {
140
140
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
141
141
  if (utils.matchContentType(contentType, "application/json")) {
142
- res.postInitImage200ApplicationJSONAny = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
142
+ res.uploadInitImage200ApplicationJSONObject = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
143
143
  }
144
144
  break;
145
145
  }
146
146
  return res;
147
147
  });
148
148
  };
149
- return InitImages;
149
+ return InitImage;
150
150
  }());
151
- exports.InitImages = InitImages;
151
+ exports.InitImage = InitImage;
@@ -1,6 +1,6 @@
1
1
  import * as operations from "./models/operations";
2
2
  import { AxiosInstance, AxiosRequestConfig } from "axios";
3
- export declare class TrainingModels {
3
+ export declare class Model {
4
4
  _defaultClient: AxiosInstance;
5
5
  _securityClient: AxiosInstance;
6
6
  _serverURL: string;
@@ -9,21 +9,21 @@ export declare class TrainingModels {
9
9
  _genVersion: string;
10
10
  constructor(defaultClient: AxiosInstance, securityClient: AxiosInstance, serverURL: string, language: string, sdkVersion: string, genVersion: string);
11
11
  /**
12
- * deleteModelsId - Delete a Single Custom Model by ID
12
+ * createModel - Train a Custom Model
13
13
  *
14
- * This endpoint will delete a specific custom model
14
+ * This endpoint will train a new custom model
15
15
  **/
16
- deleteModelsId(req: operations.DeleteModelsIdRequest, config?: AxiosRequestConfig): Promise<operations.DeleteModelsIdResponse>;
16
+ createModel(req: operations.CreateModelRequest, config?: AxiosRequestConfig): Promise<operations.CreateModelResponse>;
17
17
  /**
18
- * getModelsId - Get a Single Custom Model by ID
18
+ * deleteModelById - Delete a Single Custom Model by ID
19
19
  *
20
- * This endpoint gets the specific custom model
20
+ * This endpoint will delete a specific custom model
21
21
  **/
22
- getModelsId(req: operations.GetModelsIdRequest, config?: AxiosRequestConfig): Promise<operations.GetModelsIdResponse>;
22
+ deleteModelById(req: operations.DeleteModelByIdRequest, config?: AxiosRequestConfig): Promise<operations.DeleteModelByIdResponse>;
23
23
  /**
24
- * postModels - Train a Custom Model
24
+ * getModelById - Get a Single Custom Model by ID
25
25
  *
26
- * This endpoint will train a new custom model
26
+ * This endpoint gets the specific custom model
27
27
  **/
28
- postModels(req: operations.PostModelsRequest, config?: AxiosRequestConfig): Promise<operations.PostModelsResponse>;
28
+ getModelById(req: operations.GetModelByIdRequest, config?: AxiosRequestConfig): Promise<operations.GetModelByIdResponse>;
29
29
  }
@@ -34,11 +34,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
34
34
  return result;
35
35
  };
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
- exports.TrainingModels = void 0;
37
+ exports.Model = void 0;
38
38
  var utils = __importStar(require("../internal/utils"));
39
39
  var operations = __importStar(require("./models/operations"));
40
- var TrainingModels = /** @class */ (function () {
41
- function TrainingModels(defaultClient, securityClient, serverURL, language, sdkVersion, genVersion) {
40
+ var Model = /** @class */ (function () {
41
+ function Model(defaultClient, securityClient, serverURL, language, sdkVersion, genVersion) {
42
42
  this._defaultClient = defaultClient;
43
43
  this._securityClient = securityClient;
44
44
  this._serverURL = serverURL;
@@ -47,18 +47,31 @@ var TrainingModels = /** @class */ (function () {
47
47
  this._genVersion = genVersion;
48
48
  }
49
49
  /**
50
- * deleteModelsId - Delete a Single Custom Model by ID
50
+ * createModel - Train a Custom Model
51
51
  *
52
- * This endpoint will delete a specific custom model
52
+ * This endpoint will train a new custom model
53
53
  **/
54
- TrainingModels.prototype.deleteModelsId = function (req, config) {
54
+ Model.prototype.createModel = function (req, config) {
55
+ var _a;
55
56
  if (!(req instanceof utils.SpeakeasyBase)) {
56
- req = new operations.DeleteModelsIdRequest(req);
57
+ req = new operations.CreateModelRequest(req);
57
58
  }
58
59
  var baseURL = this._serverURL;
59
- var url = utils.generateURL(baseURL, "/models/{id}", req.pathParams);
60
+ var url = baseURL.replace(/\/$/, "") + "/models";
61
+ var _b = [{}, {}], reqBodyHeaders = _b[0], reqBody = _b[1];
62
+ try {
63
+ _a = utils.serializeRequestBody(req), reqBodyHeaders = _a[0], reqBody = _a[1];
64
+ }
65
+ catch (e) {
66
+ if (e instanceof Error) {
67
+ throw new Error("Error serializing request body, cause: ".concat(e.message));
68
+ }
69
+ }
60
70
  var client = this._securityClient;
61
- var r = client.request(__assign({ url: url, method: "delete" }, config));
71
+ var headers = __assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers);
72
+ if (reqBody == null || Object.keys(reqBody).length === 0)
73
+ throw new Error("request body is required");
74
+ var r = client.request(__assign({ url: url, method: "post", headers: headers, data: reqBody }, config));
62
75
  return r.then(function (httpRes) {
63
76
  var _a, _b;
64
77
  var contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
@@ -68,7 +81,7 @@ var TrainingModels = /** @class */ (function () {
68
81
  switch (true) {
69
82
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
70
83
  if (utils.matchContentType(contentType, "application/json")) {
71
- res.deleteModelsId200ApplicationJSONAny = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
84
+ res.createModel200ApplicationJSONObject = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
72
85
  }
73
86
  break;
74
87
  }
@@ -76,18 +89,18 @@ var TrainingModels = /** @class */ (function () {
76
89
  });
77
90
  };
78
91
  /**
79
- * getModelsId - Get a Single Custom Model by ID
92
+ * deleteModelById - Delete a Single Custom Model by ID
80
93
  *
81
- * This endpoint gets the specific custom model
94
+ * This endpoint will delete a specific custom model
82
95
  **/
83
- TrainingModels.prototype.getModelsId = function (req, config) {
96
+ Model.prototype.deleteModelById = function (req, config) {
84
97
  if (!(req instanceof utils.SpeakeasyBase)) {
85
- req = new operations.GetModelsIdRequest(req);
98
+ req = new operations.DeleteModelByIdRequest(req);
86
99
  }
87
100
  var baseURL = this._serverURL;
88
101
  var url = utils.generateURL(baseURL, "/models/{id}", req.pathParams);
89
102
  var client = this._securityClient;
90
- var r = client.request(__assign({ url: url, method: "get" }, config));
103
+ var r = client.request(__assign({ url: url, method: "delete" }, config));
91
104
  return r.then(function (httpRes) {
92
105
  var _a, _b;
93
106
  var contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
@@ -97,7 +110,7 @@ var TrainingModels = /** @class */ (function () {
97
110
  switch (true) {
98
111
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
99
112
  if (utils.matchContentType(contentType, "application/json")) {
100
- res.getModelsId200ApplicationJSONAny = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
113
+ res.deleteModelById200ApplicationJSONObject = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
101
114
  }
102
115
  break;
103
116
  }
@@ -105,31 +118,18 @@ var TrainingModels = /** @class */ (function () {
105
118
  });
106
119
  };
107
120
  /**
108
- * postModels - Train a Custom Model
121
+ * getModelById - Get a Single Custom Model by ID
109
122
  *
110
- * This endpoint will train a new custom model
123
+ * This endpoint gets the specific custom model
111
124
  **/
112
- TrainingModels.prototype.postModels = function (req, config) {
113
- var _a;
125
+ Model.prototype.getModelById = function (req, config) {
114
126
  if (!(req instanceof utils.SpeakeasyBase)) {
115
- req = new operations.PostModelsRequest(req);
127
+ req = new operations.GetModelByIdRequest(req);
116
128
  }
117
129
  var baseURL = this._serverURL;
118
- var url = baseURL.replace(/\/$/, "") + "/models";
119
- var _b = [{}, {}], reqBodyHeaders = _b[0], reqBody = _b[1];
120
- try {
121
- _a = utils.serializeRequestBody(req), reqBodyHeaders = _a[0], reqBody = _a[1];
122
- }
123
- catch (e) {
124
- if (e instanceof Error) {
125
- throw new Error("Error serializing request body, cause: ".concat(e.message));
126
- }
127
- }
130
+ var url = utils.generateURL(baseURL, "/models/{id}", req.pathParams);
128
131
  var client = this._securityClient;
129
- var headers = __assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers);
130
- if (reqBody == null || Object.keys(reqBody).length === 0)
131
- throw new Error("request body is required");
132
- var r = client.request(__assign({ url: url, method: "post", headers: headers, data: reqBody }, config));
132
+ var r = client.request(__assign({ url: url, method: "get" }, config));
133
133
  return r.then(function (httpRes) {
134
134
  var _a, _b;
135
135
  var contentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
@@ -139,13 +139,13 @@ var TrainingModels = /** @class */ (function () {
139
139
  switch (true) {
140
140
  case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
141
141
  if (utils.matchContentType(contentType, "application/json")) {
142
- res.postModels200ApplicationJSONAny = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
142
+ res.getModelById200ApplicationJSONObject = httpRes === null || httpRes === void 0 ? void 0 : httpRes.data;
143
143
  }
144
144
  break;
145
145
  }
146
146
  return res;
147
147
  });
148
148
  };
149
- return TrainingModels;
149
+ return Model;
150
150
  }());
151
- exports.TrainingModels = TrainingModels;
151
+ exports.Model = Model;
@@ -0,0 +1,22 @@
1
+ import { SpeakeasyBase } from "../../../internal/utils";
2
+ export declare class CreateDatasetRequestBody extends SpeakeasyBase {
3
+ description?: string;
4
+ name: string;
5
+ }
6
+ export declare class CreateDatasetRequest extends SpeakeasyBase {
7
+ request: CreateDatasetRequestBody;
8
+ }
9
+ /**
10
+ * columns and relationships of "datasets"
11
+ **/
12
+ export declare class CreateDataset200ApplicationJSONDatasets extends SpeakeasyBase {
13
+ id?: string;
14
+ }
15
+ export declare class CreateDataset200ApplicationJSON extends SpeakeasyBase {
16
+ insertDatasetsOne?: CreateDataset200ApplicationJSONDatasets;
17
+ }
18
+ export declare class CreateDatasetResponse extends SpeakeasyBase {
19
+ contentType: string;
20
+ statusCode: number;
21
+ createDataset200ApplicationJSONObject?: CreateDataset200ApplicationJSON;
22
+ }
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
18
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
19
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
20
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
21
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
22
+ };
23
+ var __metadata = (this && this.__metadata) || function (k, v) {
24
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.CreateDatasetResponse = exports.CreateDataset200ApplicationJSON = exports.CreateDataset200ApplicationJSONDatasets = exports.CreateDatasetRequest = exports.CreateDatasetRequestBody = void 0;
28
+ var utils_1 = require("../../../internal/utils");
29
+ var CreateDatasetRequestBody = /** @class */ (function (_super) {
30
+ __extends(CreateDatasetRequestBody, _super);
31
+ function CreateDatasetRequestBody() {
32
+ return _super !== null && _super.apply(this, arguments) || this;
33
+ }
34
+ __decorate([
35
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=description" }),
36
+ __metadata("design:type", String)
37
+ ], CreateDatasetRequestBody.prototype, "description", void 0);
38
+ __decorate([
39
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=name" }),
40
+ __metadata("design:type", String)
41
+ ], CreateDatasetRequestBody.prototype, "name", void 0);
42
+ return CreateDatasetRequestBody;
43
+ }(utils_1.SpeakeasyBase));
44
+ exports.CreateDatasetRequestBody = CreateDatasetRequestBody;
45
+ var CreateDatasetRequest = /** @class */ (function (_super) {
46
+ __extends(CreateDatasetRequest, _super);
47
+ function CreateDatasetRequest() {
48
+ return _super !== null && _super.apply(this, arguments) || this;
49
+ }
50
+ __decorate([
51
+ (0, utils_1.SpeakeasyMetadata)({ data: "request, media_type=application/json" }),
52
+ __metadata("design:type", CreateDatasetRequestBody)
53
+ ], CreateDatasetRequest.prototype, "request", void 0);
54
+ return CreateDatasetRequest;
55
+ }(utils_1.SpeakeasyBase));
56
+ exports.CreateDatasetRequest = CreateDatasetRequest;
57
+ // CreateDataset200ApplicationJSONDatasets
58
+ /**
59
+ * columns and relationships of "datasets"
60
+ **/
61
+ var CreateDataset200ApplicationJSONDatasets = /** @class */ (function (_super) {
62
+ __extends(CreateDataset200ApplicationJSONDatasets, _super);
63
+ function CreateDataset200ApplicationJSONDatasets() {
64
+ return _super !== null && _super.apply(this, arguments) || this;
65
+ }
66
+ __decorate([
67
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=id" }),
68
+ __metadata("design:type", String)
69
+ ], CreateDataset200ApplicationJSONDatasets.prototype, "id", void 0);
70
+ return CreateDataset200ApplicationJSONDatasets;
71
+ }(utils_1.SpeakeasyBase));
72
+ exports.CreateDataset200ApplicationJSONDatasets = CreateDataset200ApplicationJSONDatasets;
73
+ var CreateDataset200ApplicationJSON = /** @class */ (function (_super) {
74
+ __extends(CreateDataset200ApplicationJSON, _super);
75
+ function CreateDataset200ApplicationJSON() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ __decorate([
79
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=insert_datasets_one" }),
80
+ __metadata("design:type", CreateDataset200ApplicationJSONDatasets)
81
+ ], CreateDataset200ApplicationJSON.prototype, "insertDatasetsOne", void 0);
82
+ return CreateDataset200ApplicationJSON;
83
+ }(utils_1.SpeakeasyBase));
84
+ exports.CreateDataset200ApplicationJSON = CreateDataset200ApplicationJSON;
85
+ var CreateDatasetResponse = /** @class */ (function (_super) {
86
+ __extends(CreateDatasetResponse, _super);
87
+ function CreateDatasetResponse() {
88
+ return _super !== null && _super.apply(this, arguments) || this;
89
+ }
90
+ __decorate([
91
+ (0, utils_1.SpeakeasyMetadata)(),
92
+ __metadata("design:type", String)
93
+ ], CreateDatasetResponse.prototype, "contentType", void 0);
94
+ __decorate([
95
+ (0, utils_1.SpeakeasyMetadata)(),
96
+ __metadata("design:type", Number)
97
+ ], CreateDatasetResponse.prototype, "statusCode", void 0);
98
+ __decorate([
99
+ (0, utils_1.SpeakeasyMetadata)(),
100
+ __metadata("design:type", CreateDataset200ApplicationJSON)
101
+ ], CreateDatasetResponse.prototype, "createDataset200ApplicationJSONObject", void 0);
102
+ return CreateDatasetResponse;
103
+ }(utils_1.SpeakeasyBase));
104
+ exports.CreateDatasetResponse = CreateDatasetResponse;
@@ -0,0 +1,34 @@
1
+ import { SpeakeasyBase } from "../../../internal/utils";
2
+ import * as shared from "../shared";
3
+ export declare class CreateGenerationRequestBody extends SpeakeasyBase {
4
+ guidanceScale?: number;
5
+ height?: number;
6
+ initGenerationImageId?: string;
7
+ initImageId?: string;
8
+ initStrength?: number;
9
+ modelId?: string;
10
+ negativePrompt?: string;
11
+ numImages?: number;
12
+ numInferenceSteps?: number;
13
+ presetStyle?: shared.SdGenerationStyleEnum;
14
+ prompt: string;
15
+ public?: boolean;
16
+ scheduler?: shared.SdGenerationSchedulersEnum;
17
+ sdVersion?: shared.SdVersionsEnum;
18
+ tiling?: boolean;
19
+ width?: number;
20
+ }
21
+ export declare class CreateGenerationRequest extends SpeakeasyBase {
22
+ request: CreateGenerationRequestBody;
23
+ }
24
+ export declare class CreateGeneration200ApplicationJSONSDGenerationOutput extends SpeakeasyBase {
25
+ generationId?: string;
26
+ }
27
+ export declare class CreateGeneration200ApplicationJSON extends SpeakeasyBase {
28
+ sdGenerationJob?: CreateGeneration200ApplicationJSONSDGenerationOutput;
29
+ }
30
+ export declare class CreateGenerationResponse extends SpeakeasyBase {
31
+ contentType: string;
32
+ statusCode: number;
33
+ createGeneration200ApplicationJSONObject?: CreateGeneration200ApplicationJSON;
34
+ }
@@ -0,0 +1,180 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
29
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
30
+ }) : function(o, v) {
31
+ o["default"] = v;
32
+ });
33
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
34
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
35
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
36
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
37
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
38
+ };
39
+ var __importStar = (this && this.__importStar) || function (mod) {
40
+ if (mod && mod.__esModule) return mod;
41
+ var result = {};
42
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
43
+ __setModuleDefault(result, mod);
44
+ return result;
45
+ };
46
+ var __metadata = (this && this.__metadata) || function (k, v) {
47
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
48
+ };
49
+ Object.defineProperty(exports, "__esModule", { value: true });
50
+ exports.CreateGenerationResponse = exports.CreateGeneration200ApplicationJSON = exports.CreateGeneration200ApplicationJSONSDGenerationOutput = exports.CreateGenerationRequest = exports.CreateGenerationRequestBody = void 0;
51
+ var utils_1 = require("../../../internal/utils");
52
+ var shared = __importStar(require("../shared"));
53
+ var CreateGenerationRequestBody = /** @class */ (function (_super) {
54
+ __extends(CreateGenerationRequestBody, _super);
55
+ function CreateGenerationRequestBody() {
56
+ return _super !== null && _super.apply(this, arguments) || this;
57
+ }
58
+ __decorate([
59
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=guidance_scale" }),
60
+ __metadata("design:type", Number)
61
+ ], CreateGenerationRequestBody.prototype, "guidanceScale", void 0);
62
+ __decorate([
63
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=height" }),
64
+ __metadata("design:type", Number)
65
+ ], CreateGenerationRequestBody.prototype, "height", void 0);
66
+ __decorate([
67
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=init_generation_image_id" }),
68
+ __metadata("design:type", String)
69
+ ], CreateGenerationRequestBody.prototype, "initGenerationImageId", void 0);
70
+ __decorate([
71
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=init_image_id" }),
72
+ __metadata("design:type", String)
73
+ ], CreateGenerationRequestBody.prototype, "initImageId", void 0);
74
+ __decorate([
75
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=init_strength" }),
76
+ __metadata("design:type", Number)
77
+ ], CreateGenerationRequestBody.prototype, "initStrength", void 0);
78
+ __decorate([
79
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=modelId" }),
80
+ __metadata("design:type", String)
81
+ ], CreateGenerationRequestBody.prototype, "modelId", void 0);
82
+ __decorate([
83
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=negative_prompt" }),
84
+ __metadata("design:type", String)
85
+ ], CreateGenerationRequestBody.prototype, "negativePrompt", void 0);
86
+ __decorate([
87
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=num_images" }),
88
+ __metadata("design:type", Number)
89
+ ], CreateGenerationRequestBody.prototype, "numImages", void 0);
90
+ __decorate([
91
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=num_inference_steps" }),
92
+ __metadata("design:type", Number)
93
+ ], CreateGenerationRequestBody.prototype, "numInferenceSteps", void 0);
94
+ __decorate([
95
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=presetStyle" }),
96
+ __metadata("design:type", String)
97
+ ], CreateGenerationRequestBody.prototype, "presetStyle", void 0);
98
+ __decorate([
99
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=prompt" }),
100
+ __metadata("design:type", String)
101
+ ], CreateGenerationRequestBody.prototype, "prompt", void 0);
102
+ __decorate([
103
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=public" }),
104
+ __metadata("design:type", Boolean)
105
+ ], CreateGenerationRequestBody.prototype, "public", void 0);
106
+ __decorate([
107
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=scheduler" }),
108
+ __metadata("design:type", String)
109
+ ], CreateGenerationRequestBody.prototype, "scheduler", void 0);
110
+ __decorate([
111
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=sd_version" }),
112
+ __metadata("design:type", String)
113
+ ], CreateGenerationRequestBody.prototype, "sdVersion", void 0);
114
+ __decorate([
115
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=tiling" }),
116
+ __metadata("design:type", Boolean)
117
+ ], CreateGenerationRequestBody.prototype, "tiling", void 0);
118
+ __decorate([
119
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=width" }),
120
+ __metadata("design:type", Number)
121
+ ], CreateGenerationRequestBody.prototype, "width", void 0);
122
+ return CreateGenerationRequestBody;
123
+ }(utils_1.SpeakeasyBase));
124
+ exports.CreateGenerationRequestBody = CreateGenerationRequestBody;
125
+ var CreateGenerationRequest = /** @class */ (function (_super) {
126
+ __extends(CreateGenerationRequest, _super);
127
+ function CreateGenerationRequest() {
128
+ return _super !== null && _super.apply(this, arguments) || this;
129
+ }
130
+ __decorate([
131
+ (0, utils_1.SpeakeasyMetadata)({ data: "request, media_type=application/json" }),
132
+ __metadata("design:type", CreateGenerationRequestBody)
133
+ ], CreateGenerationRequest.prototype, "request", void 0);
134
+ return CreateGenerationRequest;
135
+ }(utils_1.SpeakeasyBase));
136
+ exports.CreateGenerationRequest = CreateGenerationRequest;
137
+ var CreateGeneration200ApplicationJSONSDGenerationOutput = /** @class */ (function (_super) {
138
+ __extends(CreateGeneration200ApplicationJSONSDGenerationOutput, _super);
139
+ function CreateGeneration200ApplicationJSONSDGenerationOutput() {
140
+ return _super !== null && _super.apply(this, arguments) || this;
141
+ }
142
+ __decorate([
143
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=generationId" }),
144
+ __metadata("design:type", String)
145
+ ], CreateGeneration200ApplicationJSONSDGenerationOutput.prototype, "generationId", void 0);
146
+ return CreateGeneration200ApplicationJSONSDGenerationOutput;
147
+ }(utils_1.SpeakeasyBase));
148
+ exports.CreateGeneration200ApplicationJSONSDGenerationOutput = CreateGeneration200ApplicationJSONSDGenerationOutput;
149
+ var CreateGeneration200ApplicationJSON = /** @class */ (function (_super) {
150
+ __extends(CreateGeneration200ApplicationJSON, _super);
151
+ function CreateGeneration200ApplicationJSON() {
152
+ return _super !== null && _super.apply(this, arguments) || this;
153
+ }
154
+ __decorate([
155
+ (0, utils_1.SpeakeasyMetadata)({ data: "json, name=sdGenerationJob" }),
156
+ __metadata("design:type", CreateGeneration200ApplicationJSONSDGenerationOutput)
157
+ ], CreateGeneration200ApplicationJSON.prototype, "sdGenerationJob", void 0);
158
+ return CreateGeneration200ApplicationJSON;
159
+ }(utils_1.SpeakeasyBase));
160
+ exports.CreateGeneration200ApplicationJSON = CreateGeneration200ApplicationJSON;
161
+ var CreateGenerationResponse = /** @class */ (function (_super) {
162
+ __extends(CreateGenerationResponse, _super);
163
+ function CreateGenerationResponse() {
164
+ return _super !== null && _super.apply(this, arguments) || this;
165
+ }
166
+ __decorate([
167
+ (0, utils_1.SpeakeasyMetadata)(),
168
+ __metadata("design:type", String)
169
+ ], CreateGenerationResponse.prototype, "contentType", void 0);
170
+ __decorate([
171
+ (0, utils_1.SpeakeasyMetadata)(),
172
+ __metadata("design:type", Number)
173
+ ], CreateGenerationResponse.prototype, "statusCode", void 0);
174
+ __decorate([
175
+ (0, utils_1.SpeakeasyMetadata)(),
176
+ __metadata("design:type", CreateGeneration200ApplicationJSON)
177
+ ], CreateGenerationResponse.prototype, "createGeneration200ApplicationJSONObject", void 0);
178
+ return CreateGenerationResponse;
179
+ }(utils_1.SpeakeasyBase));
180
+ exports.CreateGenerationResponse = CreateGenerationResponse;
@@ -0,0 +1,27 @@
1
+ import { SpeakeasyBase } from "../../../internal/utils";
2
+ import * as shared from "../shared";
3
+ export declare class CreateModelRequestBody extends SpeakeasyBase {
4
+ datasetId: string;
5
+ description?: string;
6
+ instancePrompt: string;
7
+ modelType?: shared.CustomModelTypeEnum;
8
+ name: string;
9
+ nsfw?: boolean;
10
+ resolution?: number;
11
+ sdVersion?: shared.SdVersionsEnum;
12
+ strength?: shared.StrengthEnum;
13
+ }
14
+ export declare class CreateModelRequest extends SpeakeasyBase {
15
+ request: CreateModelRequestBody;
16
+ }
17
+ export declare class CreateModel200ApplicationJSONSDTrainingOutput extends SpeakeasyBase {
18
+ customModelId?: string;
19
+ }
20
+ export declare class CreateModel200ApplicationJSON extends SpeakeasyBase {
21
+ sdTrainingJob?: CreateModel200ApplicationJSONSDTrainingOutput;
22
+ }
23
+ export declare class CreateModelResponse extends SpeakeasyBase {
24
+ contentType: string;
25
+ statusCode: number;
26
+ createModel200ApplicationJSONObject?: CreateModel200ApplicationJSON;
27
+ }