@hautechai/sdk 0.0.15 → 0.0.17

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.
@@ -600,13 +600,13 @@ export interface GenerateV3Input {
600
600
  * @type {string}
601
601
  * @memberof GenerateV3Input
602
602
  */
603
- 'garmentImage': string;
603
+ 'garmentImageId': string;
604
604
  /**
605
605
  *
606
606
  * @type {string}
607
607
  * @memberof GenerateV3Input
608
608
  */
609
- 'poseImage': string;
609
+ 'poseId': string;
610
610
  /**
611
611
  *
612
612
  * @type {number}
@@ -696,6 +696,25 @@ export interface GetUrlsForImagesParamsDto {
696
696
  */
697
697
  'ids': Array<string>;
698
698
  }
699
+ /**
700
+ *
701
+ * @export
702
+ * @interface GrantAccessControllerParams
703
+ */
704
+ export interface GrantAccessControllerParams {
705
+ /**
706
+ *
707
+ * @type {string}
708
+ * @memberof GrantAccessControllerParams
709
+ */
710
+ 'resourceId': string;
711
+ /**
712
+ *
713
+ * @type {string}
714
+ * @memberof GrantAccessControllerParams
715
+ */
716
+ 'access': string;
717
+ }
699
718
  /**
700
719
  *
701
720
  * @export
@@ -1799,6 +1818,98 @@ export interface UpscaleV1Input {
1799
1818
  */
1800
1819
  'imageId': string;
1801
1820
  }
1821
+ /**
1822
+ * AccessApi - axios parameter creator
1823
+ * @export
1824
+ */
1825
+ export declare const AccessApiAxiosParamCreator: (configuration?: Configuration) => {
1826
+ /**
1827
+ *
1828
+ * @param {string} id
1829
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
1830
+ * @param {*} [options] Override http request option.
1831
+ * @throws {RequiredError}
1832
+ */
1833
+ accessControllerAccountGrantAccessV1: (id: string, grantAccessControllerParams: GrantAccessControllerParams, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1834
+ /**
1835
+ *
1836
+ * @param {string} id
1837
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
1838
+ * @param {*} [options] Override http request option.
1839
+ * @throws {RequiredError}
1840
+ */
1841
+ accessControllerGroupGrantAccessV1: (id: string, grantAccessControllerParams: GrantAccessControllerParams, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1842
+ };
1843
+ /**
1844
+ * AccessApi - functional programming interface
1845
+ * @export
1846
+ */
1847
+ export declare const AccessApiFp: (configuration?: Configuration) => {
1848
+ /**
1849
+ *
1850
+ * @param {string} id
1851
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
1852
+ * @param {*} [options] Override http request option.
1853
+ * @throws {RequiredError}
1854
+ */
1855
+ accessControllerAccountGrantAccessV1(id: string, grantAccessControllerParams: GrantAccessControllerParams, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
1856
+ /**
1857
+ *
1858
+ * @param {string} id
1859
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
1860
+ * @param {*} [options] Override http request option.
1861
+ * @throws {RequiredError}
1862
+ */
1863
+ accessControllerGroupGrantAccessV1(id: string, grantAccessControllerParams: GrantAccessControllerParams, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
1864
+ };
1865
+ /**
1866
+ * AccessApi - factory interface
1867
+ * @export
1868
+ */
1869
+ export declare const AccessApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
1870
+ /**
1871
+ *
1872
+ * @param {string} id
1873
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
1874
+ * @param {*} [options] Override http request option.
1875
+ * @throws {RequiredError}
1876
+ */
1877
+ accessControllerAccountGrantAccessV1(id: string, grantAccessControllerParams: GrantAccessControllerParams, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1878
+ /**
1879
+ *
1880
+ * @param {string} id
1881
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
1882
+ * @param {*} [options] Override http request option.
1883
+ * @throws {RequiredError}
1884
+ */
1885
+ accessControllerGroupGrantAccessV1(id: string, grantAccessControllerParams: GrantAccessControllerParams, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1886
+ };
1887
+ /**
1888
+ * AccessApi - object-oriented interface
1889
+ * @export
1890
+ * @class AccessApi
1891
+ * @extends {BaseAPI}
1892
+ */
1893
+ export declare class AccessApi extends BaseAPI {
1894
+ /**
1895
+ *
1896
+ * @param {string} id
1897
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
1898
+ * @param {*} [options] Override http request option.
1899
+ * @throws {RequiredError}
1900
+ * @memberof AccessApi
1901
+ */
1902
+ accessControllerAccountGrantAccessV1(id: string, grantAccessControllerParams: GrantAccessControllerParams, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
1903
+ /**
1904
+ *
1905
+ * @param {string} id
1906
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
1907
+ * @param {*} [options] Override http request option.
1908
+ * @throws {RequiredError}
1909
+ * @memberof AccessApi
1910
+ */
1911
+ accessControllerGroupGrantAccessV1(id: string, grantAccessControllerParams: GrantAccessControllerParams, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
1912
+ }
1802
1913
  /**
1803
1914
  * AccountsApi - axios parameter creator
1804
1915
  * @export
@@ -136,6 +136,180 @@ export const StorageEntityKindEnum = {
136
136
  Storage: 'storage',
137
137
  Pipeline: 'pipeline'
138
138
  };
139
+ /**
140
+ * AccessApi - axios parameter creator
141
+ * @export
142
+ */
143
+ export const AccessApiAxiosParamCreator = function (configuration) {
144
+ return {
145
+ /**
146
+ *
147
+ * @param {string} id
148
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ accessControllerAccountGrantAccessV1: async (id, grantAccessControllerParams, options = {}) => {
153
+ // verify required parameter 'id' is not null or undefined
154
+ assertParamExists('accessControllerAccountGrantAccessV1', 'id', id);
155
+ // verify required parameter 'grantAccessControllerParams' is not null or undefined
156
+ assertParamExists('accessControllerAccountGrantAccessV1', 'grantAccessControllerParams', grantAccessControllerParams);
157
+ const localVarPath = `/v1/accounts/{id}/grant`
158
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
159
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
160
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
161
+ let baseOptions;
162
+ if (configuration) {
163
+ baseOptions = configuration.baseOptions;
164
+ }
165
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
166
+ const localVarHeaderParameter = {};
167
+ const localVarQueryParameter = {};
168
+ // authentication bearer required
169
+ // http bearer authentication required
170
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
171
+ localVarHeaderParameter['Content-Type'] = 'application/json';
172
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
173
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
174
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
175
+ localVarRequestOptions.data = serializeDataIfNeeded(grantAccessControllerParams, localVarRequestOptions, configuration);
176
+ return {
177
+ url: toPathString(localVarUrlObj),
178
+ options: localVarRequestOptions,
179
+ };
180
+ },
181
+ /**
182
+ *
183
+ * @param {string} id
184
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
185
+ * @param {*} [options] Override http request option.
186
+ * @throws {RequiredError}
187
+ */
188
+ accessControllerGroupGrantAccessV1: async (id, grantAccessControllerParams, options = {}) => {
189
+ // verify required parameter 'id' is not null or undefined
190
+ assertParamExists('accessControllerGroupGrantAccessV1', 'id', id);
191
+ // verify required parameter 'grantAccessControllerParams' is not null or undefined
192
+ assertParamExists('accessControllerGroupGrantAccessV1', 'grantAccessControllerParams', grantAccessControllerParams);
193
+ const localVarPath = `/v1/groups/{id}/grant`
194
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
195
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
196
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
197
+ let baseOptions;
198
+ if (configuration) {
199
+ baseOptions = configuration.baseOptions;
200
+ }
201
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
202
+ const localVarHeaderParameter = {};
203
+ const localVarQueryParameter = {};
204
+ // authentication bearer required
205
+ // http bearer authentication required
206
+ await setBearerAuthToObject(localVarHeaderParameter, configuration);
207
+ localVarHeaderParameter['Content-Type'] = 'application/json';
208
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
209
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
210
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
211
+ localVarRequestOptions.data = serializeDataIfNeeded(grantAccessControllerParams, localVarRequestOptions, configuration);
212
+ return {
213
+ url: toPathString(localVarUrlObj),
214
+ options: localVarRequestOptions,
215
+ };
216
+ },
217
+ };
218
+ };
219
+ /**
220
+ * AccessApi - functional programming interface
221
+ * @export
222
+ */
223
+ export const AccessApiFp = function (configuration) {
224
+ const localVarAxiosParamCreator = AccessApiAxiosParamCreator(configuration);
225
+ return {
226
+ /**
227
+ *
228
+ * @param {string} id
229
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
230
+ * @param {*} [options] Override http request option.
231
+ * @throws {RequiredError}
232
+ */
233
+ async accessControllerAccountGrantAccessV1(id, grantAccessControllerParams, options) {
234
+ const localVarAxiosArgs = await localVarAxiosParamCreator.accessControllerAccountGrantAccessV1(id, grantAccessControllerParams, options);
235
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
236
+ const localVarOperationServerBasePath = operationServerMap['AccessApi.accessControllerAccountGrantAccessV1']?.[localVarOperationServerIndex]?.url;
237
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
238
+ },
239
+ /**
240
+ *
241
+ * @param {string} id
242
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
243
+ * @param {*} [options] Override http request option.
244
+ * @throws {RequiredError}
245
+ */
246
+ async accessControllerGroupGrantAccessV1(id, grantAccessControllerParams, options) {
247
+ const localVarAxiosArgs = await localVarAxiosParamCreator.accessControllerGroupGrantAccessV1(id, grantAccessControllerParams, options);
248
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
249
+ const localVarOperationServerBasePath = operationServerMap['AccessApi.accessControllerGroupGrantAccessV1']?.[localVarOperationServerIndex]?.url;
250
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
251
+ },
252
+ };
253
+ };
254
+ /**
255
+ * AccessApi - factory interface
256
+ * @export
257
+ */
258
+ export const AccessApiFactory = function (configuration, basePath, axios) {
259
+ const localVarFp = AccessApiFp(configuration);
260
+ return {
261
+ /**
262
+ *
263
+ * @param {string} id
264
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
265
+ * @param {*} [options] Override http request option.
266
+ * @throws {RequiredError}
267
+ */
268
+ accessControllerAccountGrantAccessV1(id, grantAccessControllerParams, options) {
269
+ return localVarFp.accessControllerAccountGrantAccessV1(id, grantAccessControllerParams, options).then((request) => request(axios, basePath));
270
+ },
271
+ /**
272
+ *
273
+ * @param {string} id
274
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
275
+ * @param {*} [options] Override http request option.
276
+ * @throws {RequiredError}
277
+ */
278
+ accessControllerGroupGrantAccessV1(id, grantAccessControllerParams, options) {
279
+ return localVarFp.accessControllerGroupGrantAccessV1(id, grantAccessControllerParams, options).then((request) => request(axios, basePath));
280
+ },
281
+ };
282
+ };
283
+ /**
284
+ * AccessApi - object-oriented interface
285
+ * @export
286
+ * @class AccessApi
287
+ * @extends {BaseAPI}
288
+ */
289
+ export class AccessApi extends BaseAPI {
290
+ /**
291
+ *
292
+ * @param {string} id
293
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
294
+ * @param {*} [options] Override http request option.
295
+ * @throws {RequiredError}
296
+ * @memberof AccessApi
297
+ */
298
+ accessControllerAccountGrantAccessV1(id, grantAccessControllerParams, options) {
299
+ return AccessApiFp(this.configuration).accessControllerAccountGrantAccessV1(id, grantAccessControllerParams, options).then((request) => request(this.axios, this.basePath));
300
+ }
301
+ /**
302
+ *
303
+ * @param {string} id
304
+ * @param {GrantAccessControllerParams} grantAccessControllerParams
305
+ * @param {*} [options] Override http request option.
306
+ * @throws {RequiredError}
307
+ * @memberof AccessApi
308
+ */
309
+ accessControllerGroupGrantAccessV1(id, grantAccessControllerParams, options) {
310
+ return AccessApiFp(this.configuration).accessControllerGroupGrantAccessV1(id, grantAccessControllerParams, options).then((request) => request(this.axios, this.basePath));
311
+ }
312
+ }
139
313
  /**
140
314
  * AccountsApi - axios parameter creator
141
315
  * @export
@@ -85,6 +85,18 @@ export declare const createSDK: (options: SDKOptions) => {
85
85
  };
86
86
  operations: {
87
87
  create: {
88
+ composite: {
89
+ v1: (props: {
90
+ input: import("../autogenerated").CompositeV1Input;
91
+ metadata?: any;
92
+ }) => Promise<import("../types").OperationEntity>;
93
+ };
94
+ cut: {
95
+ v1: (props: {
96
+ input: import("../autogenerated").CutV1Input;
97
+ metadata?: any;
98
+ }) => Promise<import("../types").OperationEntity>;
99
+ };
88
100
  detect: {
89
101
  v1: (props: {
90
102
  input: import("../autogenerated").ObjectDetectionV1Input;
@@ -131,6 +143,12 @@ export declare const createSDK: (options: SDKOptions) => {
131
143
  metadata?: any;
132
144
  }) => Promise<import("../types").OperationEntity>;
133
145
  };
146
+ segmentMask: {
147
+ v1: (props: {
148
+ input: import("../autogenerated").SegmentAnythingMaskV1Input;
149
+ metadata?: any;
150
+ }) => Promise<import("../types").OperationEntity>;
151
+ };
134
152
  upscale: {
135
153
  v1: (props: {
136
154
  input: import("../autogenerated").UpscaleV1Input;
@@ -163,18 +181,37 @@ export declare const createSDK: (options: SDKOptions) => {
163
181
  }) => Promise<import("../types").OperationEntity>;
164
182
  };
165
183
  pipelines: {
184
+ constructTemplate: (consructPipeline: (pipeline: import("@hautechai/pipelines").Pipeline<{
185
+ collections: {
186
+ create: (params: import("../autogenerated").CreateCollectionParamsDto) => Promise<import("../types").CollectionEntity>;
187
+ get: (params: import("../autogenerated").GetCollectionParamsDto) => Promise<import("../types").CollectionEntity>;
188
+ };
189
+ stacks: {
190
+ create: (params: import("../autogenerated").CreateStackParamsDto) => Promise<import("../types").StackEntity>;
191
+ get: (params: import("../autogenerated").ListStacksParamsDto) => Promise<import("../types").StackEntity>;
192
+ };
193
+ }>) => import("@hautechai/pipelines").Pipeline<{
194
+ collections: {
195
+ create: (params: import("../autogenerated").CreateCollectionParamsDto) => Promise<import("../types").CollectionEntity>;
196
+ get: (params: import("../autogenerated").GetCollectionParamsDto) => Promise<import("../types").CollectionEntity>;
197
+ };
198
+ stacks: {
199
+ create: (params: import("../autogenerated").CreateStackParamsDto) => Promise<import("../types").StackEntity>;
200
+ get: (params: import("../autogenerated").ListStacksParamsDto) => Promise<import("../types").StackEntity>;
201
+ };
202
+ }>) => import("@hautechai/pipelines").Pipeline<{
203
+ collections: {
204
+ create: (params: import("../autogenerated").CreateCollectionParamsDto) => Promise<import("../types").CollectionEntity>;
205
+ get: (params: import("../autogenerated").GetCollectionParamsDto) => Promise<import("../types").CollectionEntity>;
206
+ };
207
+ stacks: {
208
+ create: (params: import("../autogenerated").CreateStackParamsDto) => Promise<import("../types").StackEntity>;
209
+ get: (params: import("../autogenerated").ListStacksParamsDto) => Promise<import("../types").StackEntity>;
210
+ };
211
+ }>;
166
212
  create: (props: {
167
213
  metadata?: any;
168
- tasks: (pipeline: ReturnType<() => import("@hautechai/pipelines").Pipeline<{
169
- collections: {
170
- create: (params: import("../autogenerated").CreateCollectionParamsDto) => Promise<import("../types").CollectionEntity>;
171
- get: (params: import("../autogenerated").GetCollectionParamsDto) => Promise<import("../types").CollectionEntity>;
172
- };
173
- stacks: {
174
- create: (params: import("../autogenerated").CreateStackParamsDto) => Promise<import("../types").StackEntity>;
175
- get: (params: import("../autogenerated").ListStacksParamsDto) => Promise<import("../types").StackEntity>;
176
- };
177
- }>>) => ReturnType<() => import("@hautechai/pipelines").Pipeline<{
214
+ template: import("@hautechai/pipelines").Pipeline<{
178
215
  collections: {
179
216
  create: (params: import("../autogenerated").CreateCollectionParamsDto) => Promise<import("../types").CollectionEntity>;
180
217
  get: (params: import("../autogenerated").GetCollectionParamsDto) => Promise<import("../types").CollectionEntity>;
@@ -183,7 +220,7 @@ export declare const createSDK: (options: SDKOptions) => {
183
220
  create: (params: import("../autogenerated").CreateStackParamsDto) => Promise<import("../types").StackEntity>;
184
221
  get: (params: import("../autogenerated").ListStacksParamsDto) => Promise<import("../types").StackEntity>;
185
222
  };
186
- }>>;
223
+ }>;
187
224
  }) => Promise<import("../types").PipelineEntity>;
188
225
  get: (props: {
189
226
  id: string;
@@ -1,7 +1,19 @@
1
- import { GenerateV1Input, GenerateV3Input, GPTV1Input, ImagineV1Input, InpaintV1Input, ObjectDetectionV1Input, OperationEntity, PoseEstimationV1Input, SegmentAnythingEmbeddingsV1Input, UpscaleV1Input } from '../../autogenerated';
1
+ import { CompositeV1Input, CutV1Input, GenerateV1Input, GenerateV3Input, GPTV1Input, ImagineV1Input, InpaintV1Input, ObjectDetectionV1Input, OperationEntity, PoseEstimationV1Input, SegmentAnythingEmbeddingsV1Input, SegmentAnythingMaskV1Input, UpscaleV1Input } from '../../autogenerated';
2
2
  import { ListProps, ListResponse, SDKOptions } from '../../types';
3
3
  declare const operations: (options: SDKOptions) => {
4
4
  create: {
5
+ composite: {
6
+ v1: (props: {
7
+ input: CompositeV1Input;
8
+ metadata?: any;
9
+ }) => Promise<OperationEntity>;
10
+ };
11
+ cut: {
12
+ v1: (props: {
13
+ input: CutV1Input;
14
+ metadata?: any;
15
+ }) => Promise<OperationEntity>;
16
+ };
5
17
  detect: {
6
18
  v1: (props: {
7
19
  input: ObjectDetectionV1Input;
@@ -48,6 +60,12 @@ declare const operations: (options: SDKOptions) => {
48
60
  metadata?: any;
49
61
  }) => Promise<OperationEntity>;
50
62
  };
63
+ segmentMask: {
64
+ v1: (props: {
65
+ input: SegmentAnythingMaskV1Input;
66
+ metadata?: any;
67
+ }) => Promise<OperationEntity>;
68
+ };
51
69
  upscale: {
52
70
  v1: (props: {
53
71
  input: UpscaleV1Input;
@@ -8,6 +8,12 @@ const operations = (options) => {
8
8
  const createOperation = (callMethod) => (props) => api.call({ run: (methods) => callMethod(methods, props) });
9
9
  return {
10
10
  create: {
11
+ composite: {
12
+ v1: createOperation((methods, props) => methods.operationsControllerRunCompositeV1V1(props)),
13
+ },
14
+ cut: {
15
+ v1: createOperation((methods, props) => methods.operationsControllerRunCutV1V1(props)),
16
+ },
11
17
  detect: {
12
18
  v1: createOperation((methods, props) => methods.operationsControllerRunObjectDetectionV1V1(props)),
13
19
  },
@@ -30,6 +36,9 @@ const operations = (options) => {
30
36
  segmentEmbeddings: {
31
37
  v1: createOperation((methods, props) => methods.operationsControllerRunSegmentAnythingEmbeddingsV1V1(props)),
32
38
  },
39
+ segmentMask: {
40
+ v1: createOperation((methods, props) => methods.operationsControllerRunSegmentAnythingMaskV1V1(props)),
41
+ },
33
42
  upscale: {
34
43
  v1: createOperation((methods, props) => methods.operationsControllerRunUpscaleV1V1(props)),
35
44
  },
@@ -2,9 +2,37 @@ import { CollectionEntity, CreateCollectionParamsDto, CreateStackParamsDto, GetC
2
2
  import { SDKOptions } from '../../types';
3
3
  import { Pipeline } from '@hautechai/pipelines';
4
4
  declare const pipelines: (options: SDKOptions) => {
5
+ constructTemplate: (consructPipeline: (pipeline: Pipeline<{
6
+ collections: {
7
+ create: (params: CreateCollectionParamsDto) => Promise<CollectionEntity>;
8
+ get: (params: GetCollectionParamsDto) => Promise<CollectionEntity>;
9
+ };
10
+ stacks: {
11
+ create: (params: CreateStackParamsDto) => Promise<StackEntity>;
12
+ get: (params: ListStacksParamsDto) => Promise<StackEntity>;
13
+ };
14
+ }>) => Pipeline<{
15
+ collections: {
16
+ create: (params: CreateCollectionParamsDto) => Promise<CollectionEntity>;
17
+ get: (params: GetCollectionParamsDto) => Promise<CollectionEntity>;
18
+ };
19
+ stacks: {
20
+ create: (params: CreateStackParamsDto) => Promise<StackEntity>;
21
+ get: (params: ListStacksParamsDto) => Promise<StackEntity>;
22
+ };
23
+ }>) => Pipeline<{
24
+ collections: {
25
+ create: (params: CreateCollectionParamsDto) => Promise<CollectionEntity>;
26
+ get: (params: GetCollectionParamsDto) => Promise<CollectionEntity>;
27
+ };
28
+ stacks: {
29
+ create: (params: CreateStackParamsDto) => Promise<StackEntity>;
30
+ get: (params: ListStacksParamsDto) => Promise<StackEntity>;
31
+ };
32
+ }>;
5
33
  create: (props: {
6
34
  metadata?: any;
7
- tasks: (pipeline: ReturnType<() => Pipeline<{
35
+ template: Pipeline<{
8
36
  collections: {
9
37
  create: (params: CreateCollectionParamsDto) => Promise<CollectionEntity>;
10
38
  get: (params: GetCollectionParamsDto) => Promise<CollectionEntity>;
@@ -13,16 +41,7 @@ declare const pipelines: (options: SDKOptions) => {
13
41
  create: (params: CreateStackParamsDto) => Promise<StackEntity>;
14
42
  get: (params: ListStacksParamsDto) => Promise<StackEntity>;
15
43
  };
16
- }>>) => ReturnType<() => Pipeline<{
17
- collections: {
18
- create: (params: CreateCollectionParamsDto) => Promise<CollectionEntity>;
19
- get: (params: GetCollectionParamsDto) => Promise<CollectionEntity>;
20
- };
21
- stacks: {
22
- create: (params: CreateStackParamsDto) => Promise<StackEntity>;
23
- get: (params: ListStacksParamsDto) => Promise<StackEntity>;
24
- };
25
- }>>;
44
+ }>;
26
45
  }) => Promise<PipelineEntity>;
27
46
  get: (props: {
28
47
  id: string;
@@ -23,10 +23,11 @@ const pipelines = (options) => {
23
23
  },
24
24
  });
25
25
  return {
26
+ constructTemplate: (consructPipeline) => consructPipeline(createPipeline()),
26
27
  create: async (props) => api.call({
27
28
  run: (methods) => methods.pipelinesControllerCreatePipelineV1({
28
29
  metadata: props.metadata,
29
- tasks: props.tasks(createPipeline()).tasks,
30
+ tasks: props.template.tasks,
30
31
  }),
31
32
  }),
32
33
  get: async (props) => api.callWithReturningUndefinedOn404({
@@ -1,4 +1,4 @@
1
- import { defaultPermissions, defaultRootPermissions } from './permissions';
1
+ import { defaultPermissions } from './permissions';
2
2
  import * as jose from 'jose';
3
3
  const createPrivateKey = (key) => {
4
4
  const header = `-----BEGIN PRIVATE KEY-----\n`;
@@ -49,7 +49,7 @@ export const createTokenSigner = (options) => ({
49
49
  expiresInSeconds: props.expiresInSeconds ?? 3600,
50
50
  payload: {
51
51
  iss: options.appId,
52
- permissions: serializePermissions(defaultRootPermissions),
52
+ permissions: ['*'],
53
53
  },
54
54
  }),
55
55
  });
@@ -1,3 +1,2 @@
1
1
  import { MethodsPermissions } from '../autogenerated/permissions';
2
2
  export declare const defaultPermissions: MethodsPermissions;
3
- export declare const defaultRootPermissions: MethodsPermissions;
@@ -16,21 +16,3 @@ export const defaultPermissions = {
16
16
  stacks: { create: true, items: { add: true, remove: true }, read: true, metadata: { update: true } },
17
17
  storage: { create: true, delete: true, read: true, update: true },
18
18
  };
19
- export const defaultRootPermissions = {
20
- access: { add: true, read: true, remove: true },
21
- accounts: { create: true, read: true },
22
- balances: { read: true, self: { read: true, update: true }, update: true },
23
- collections: {
24
- create: true,
25
- items: { add: true, read: true, remove: true },
26
- read: true,
27
- update: true,
28
- },
29
- groups: { accounts: { add: true, read: true, remove: true }, create: true, delete: true, read: true },
30
- images: { create: true, read: true },
31
- operations: { create: true, read: true, metadata: { update: true } },
32
- pipelines: { create: true, read: true, update: true },
33
- poses: { create: true, read: true },
34
- stacks: { create: true, items: { add: true, remove: true }, read: true, metadata: { update: true } },
35
- storage: { create: true, delete: true, read: true, update: true },
36
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hautechai/sdk",
3
- "version": "0.0.15",
3
+ "version": "0.0.17",
4
4
  "license": "MIT",
5
5
  "keywords": [],
6
6
  "repository": {