@hautechai/sdk 0.0.20 → 0.0.22

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.
@@ -4416,7 +4416,7 @@ export declare const GroupsApiAxiosParamCreator: (configuration?: Configuration)
4416
4416
  * @param {*} [options] Override http request option.
4417
4417
  * @throws {RequiredError}
4418
4418
  */
4419
- groupsControllerAddAccountsV1: (id: string, addAccountToGroupControllerParamsDto: AddAccountToGroupControllerParamsDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4419
+ groupsControllerAddAccountV1: (id: string, addAccountToGroupControllerParamsDto: AddAccountToGroupControllerParamsDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4420
4420
  /**
4421
4421
  *
4422
4422
  * @param {*} [options] Override http request option.
@@ -4444,7 +4444,7 @@ export declare const GroupsApiAxiosParamCreator: (configuration?: Configuration)
4444
4444
  * @param {*} [options] Override http request option.
4445
4445
  * @throws {RequiredError}
4446
4446
  */
4447
- groupsControllerRemoveAccountsV1: (id: string, removeAccountFromGroupControllerParamsDto: RemoveAccountFromGroupControllerParamsDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4447
+ groupsControllerRemoveAccountV1: (id: string, removeAccountFromGroupControllerParamsDto: RemoveAccountFromGroupControllerParamsDto, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
4448
4448
  };
4449
4449
  /**
4450
4450
  * GroupsApi - functional programming interface
@@ -4458,7 +4458,7 @@ export declare const GroupsApiFp: (configuration?: Configuration) => {
4458
4458
  * @param {*} [options] Override http request option.
4459
4459
  * @throws {RequiredError}
4460
4460
  */
4461
- groupsControllerAddAccountsV1(id: string, addAccountToGroupControllerParamsDto: AddAccountToGroupControllerParamsDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
4461
+ groupsControllerAddAccountV1(id: string, addAccountToGroupControllerParamsDto: AddAccountToGroupControllerParamsDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
4462
4462
  /**
4463
4463
  *
4464
4464
  * @param {*} [options] Override http request option.
@@ -4486,7 +4486,7 @@ export declare const GroupsApiFp: (configuration?: Configuration) => {
4486
4486
  * @param {*} [options] Override http request option.
4487
4487
  * @throws {RequiredError}
4488
4488
  */
4489
- groupsControllerRemoveAccountsV1(id: string, removeAccountFromGroupControllerParamsDto: RemoveAccountFromGroupControllerParamsDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
4489
+ groupsControllerRemoveAccountV1(id: string, removeAccountFromGroupControllerParamsDto: RemoveAccountFromGroupControllerParamsDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
4490
4490
  };
4491
4491
  /**
4492
4492
  * GroupsApi - factory interface
@@ -4500,7 +4500,7 @@ export declare const GroupsApiFactory: (configuration?: Configuration, basePath?
4500
4500
  * @param {*} [options] Override http request option.
4501
4501
  * @throws {RequiredError}
4502
4502
  */
4503
- groupsControllerAddAccountsV1(id: string, addAccountToGroupControllerParamsDto: AddAccountToGroupControllerParamsDto, options?: RawAxiosRequestConfig): AxiosPromise<void>;
4503
+ groupsControllerAddAccountV1(id: string, addAccountToGroupControllerParamsDto: AddAccountToGroupControllerParamsDto, options?: RawAxiosRequestConfig): AxiosPromise<void>;
4504
4504
  /**
4505
4505
  *
4506
4506
  * @param {*} [options] Override http request option.
@@ -4528,7 +4528,7 @@ export declare const GroupsApiFactory: (configuration?: Configuration, basePath?
4528
4528
  * @param {*} [options] Override http request option.
4529
4529
  * @throws {RequiredError}
4530
4530
  */
4531
- groupsControllerRemoveAccountsV1(id: string, removeAccountFromGroupControllerParamsDto: RemoveAccountFromGroupControllerParamsDto, options?: RawAxiosRequestConfig): AxiosPromise<void>;
4531
+ groupsControllerRemoveAccountV1(id: string, removeAccountFromGroupControllerParamsDto: RemoveAccountFromGroupControllerParamsDto, options?: RawAxiosRequestConfig): AxiosPromise<void>;
4532
4532
  };
4533
4533
  /**
4534
4534
  * GroupsApi - object-oriented interface
@@ -4545,7 +4545,7 @@ export declare class GroupsApi extends BaseAPI {
4545
4545
  * @throws {RequiredError}
4546
4546
  * @memberof GroupsApi
4547
4547
  */
4548
- groupsControllerAddAccountsV1(id: string, addAccountToGroupControllerParamsDto: AddAccountToGroupControllerParamsDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
4548
+ groupsControllerAddAccountV1(id: string, addAccountToGroupControllerParamsDto: AddAccountToGroupControllerParamsDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
4549
4549
  /**
4550
4550
  *
4551
4551
  * @param {*} [options] Override http request option.
@@ -4577,7 +4577,7 @@ export declare class GroupsApi extends BaseAPI {
4577
4577
  * @throws {RequiredError}
4578
4578
  * @memberof GroupsApi
4579
4579
  */
4580
- groupsControllerRemoveAccountsV1(id: string, removeAccountFromGroupControllerParamsDto: RemoveAccountFromGroupControllerParamsDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
4580
+ groupsControllerRemoveAccountV1(id: string, removeAccountFromGroupControllerParamsDto: RemoveAccountFromGroupControllerParamsDto, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
4581
4581
  }
4582
4582
  /**
4583
4583
  * ImagesApi - axios parameter creator
@@ -4613,11 +4613,11 @@ export const GroupsApiAxiosParamCreator = function (configuration) {
4613
4613
  * @param {*} [options] Override http request option.
4614
4614
  * @throws {RequiredError}
4615
4615
  */
4616
- groupsControllerAddAccountsV1: async (id, addAccountToGroupControllerParamsDto, options = {}) => {
4616
+ groupsControllerAddAccountV1: async (id, addAccountToGroupControllerParamsDto, options = {}) => {
4617
4617
  // verify required parameter 'id' is not null or undefined
4618
- assertParamExists('groupsControllerAddAccountsV1', 'id', id);
4618
+ assertParamExists('groupsControllerAddAccountV1', 'id', id);
4619
4619
  // verify required parameter 'addAccountToGroupControllerParamsDto' is not null or undefined
4620
- assertParamExists('groupsControllerAddAccountsV1', 'addAccountToGroupControllerParamsDto', addAccountToGroupControllerParamsDto);
4620
+ assertParamExists('groupsControllerAddAccountV1', 'addAccountToGroupControllerParamsDto', addAccountToGroupControllerParamsDto);
4621
4621
  const localVarPath = `/v1/groups/{id}/accounts/add`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
4622
4622
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4623
4623
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -4751,11 +4751,11 @@ export const GroupsApiAxiosParamCreator = function (configuration) {
4751
4751
  * @param {*} [options] Override http request option.
4752
4752
  * @throws {RequiredError}
4753
4753
  */
4754
- groupsControllerRemoveAccountsV1: async (id, removeAccountFromGroupControllerParamsDto, options = {}) => {
4754
+ groupsControllerRemoveAccountV1: async (id, removeAccountFromGroupControllerParamsDto, options = {}) => {
4755
4755
  // verify required parameter 'id' is not null or undefined
4756
- assertParamExists('groupsControllerRemoveAccountsV1', 'id', id);
4756
+ assertParamExists('groupsControllerRemoveAccountV1', 'id', id);
4757
4757
  // verify required parameter 'removeAccountFromGroupControllerParamsDto' is not null or undefined
4758
- assertParamExists('groupsControllerRemoveAccountsV1', 'removeAccountFromGroupControllerParamsDto', removeAccountFromGroupControllerParamsDto);
4758
+ assertParamExists('groupsControllerRemoveAccountV1', 'removeAccountFromGroupControllerParamsDto', removeAccountFromGroupControllerParamsDto);
4759
4759
  const localVarPath = `/v1/groups/{id}/accounts/remove`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
4760
4760
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
4761
4761
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -4799,10 +4799,10 @@ export const GroupsApiFp = function (configuration) {
4799
4799
  * @param {*} [options] Override http request option.
4800
4800
  * @throws {RequiredError}
4801
4801
  */
4802
- async groupsControllerAddAccountsV1(id, addAccountToGroupControllerParamsDto, options) {
4803
- const localVarAxiosArgs = await localVarAxiosParamCreator.groupsControllerAddAccountsV1(id, addAccountToGroupControllerParamsDto, options);
4802
+ async groupsControllerAddAccountV1(id, addAccountToGroupControllerParamsDto, options) {
4803
+ const localVarAxiosArgs = await localVarAxiosParamCreator.groupsControllerAddAccountV1(id, addAccountToGroupControllerParamsDto, options);
4804
4804
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4805
- const localVarOperationServerBasePath = operationServerMap['GroupsApi.groupsControllerAddAccountsV1']?.[localVarOperationServerIndex]?.url;
4805
+ const localVarOperationServerBasePath = operationServerMap['GroupsApi.groupsControllerAddAccountV1']?.[localVarOperationServerIndex]?.url;
4806
4806
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4807
4807
  },
4808
4808
  /**
@@ -4847,10 +4847,10 @@ export const GroupsApiFp = function (configuration) {
4847
4847
  * @param {*} [options] Override http request option.
4848
4848
  * @throws {RequiredError}
4849
4849
  */
4850
- async groupsControllerRemoveAccountsV1(id, removeAccountFromGroupControllerParamsDto, options) {
4851
- const localVarAxiosArgs = await localVarAxiosParamCreator.groupsControllerRemoveAccountsV1(id, removeAccountFromGroupControllerParamsDto, options);
4850
+ async groupsControllerRemoveAccountV1(id, removeAccountFromGroupControllerParamsDto, options) {
4851
+ const localVarAxiosArgs = await localVarAxiosParamCreator.groupsControllerRemoveAccountV1(id, removeAccountFromGroupControllerParamsDto, options);
4852
4852
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4853
- const localVarOperationServerBasePath = operationServerMap['GroupsApi.groupsControllerRemoveAccountsV1']?.[localVarOperationServerIndex]?.url;
4853
+ const localVarOperationServerBasePath = operationServerMap['GroupsApi.groupsControllerRemoveAccountV1']?.[localVarOperationServerIndex]?.url;
4854
4854
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4855
4855
  },
4856
4856
  };
@@ -4869,9 +4869,9 @@ export const GroupsApiFactory = function (configuration, basePath, axios) {
4869
4869
  * @param {*} [options] Override http request option.
4870
4870
  * @throws {RequiredError}
4871
4871
  */
4872
- groupsControllerAddAccountsV1(id, addAccountToGroupControllerParamsDto, options) {
4872
+ groupsControllerAddAccountV1(id, addAccountToGroupControllerParamsDto, options) {
4873
4873
  return localVarFp
4874
- .groupsControllerAddAccountsV1(id, addAccountToGroupControllerParamsDto, options)
4874
+ .groupsControllerAddAccountV1(id, addAccountToGroupControllerParamsDto, options)
4875
4875
  .then((request) => request(axios, basePath));
4876
4876
  },
4877
4877
  /**
@@ -4907,9 +4907,9 @@ export const GroupsApiFactory = function (configuration, basePath, axios) {
4907
4907
  * @param {*} [options] Override http request option.
4908
4908
  * @throws {RequiredError}
4909
4909
  */
4910
- groupsControllerRemoveAccountsV1(id, removeAccountFromGroupControllerParamsDto, options) {
4910
+ groupsControllerRemoveAccountV1(id, removeAccountFromGroupControllerParamsDto, options) {
4911
4911
  return localVarFp
4912
- .groupsControllerRemoveAccountsV1(id, removeAccountFromGroupControllerParamsDto, options)
4912
+ .groupsControllerRemoveAccountV1(id, removeAccountFromGroupControllerParamsDto, options)
4913
4913
  .then((request) => request(axios, basePath));
4914
4914
  },
4915
4915
  };
@@ -4929,9 +4929,9 @@ export class GroupsApi extends BaseAPI {
4929
4929
  * @throws {RequiredError}
4930
4930
  * @memberof GroupsApi
4931
4931
  */
4932
- groupsControllerAddAccountsV1(id, addAccountToGroupControllerParamsDto, options) {
4932
+ groupsControllerAddAccountV1(id, addAccountToGroupControllerParamsDto, options) {
4933
4933
  return GroupsApiFp(this.configuration)
4934
- .groupsControllerAddAccountsV1(id, addAccountToGroupControllerParamsDto, options)
4934
+ .groupsControllerAddAccountV1(id, addAccountToGroupControllerParamsDto, options)
4935
4935
  .then((request) => request(this.axios, this.basePath));
4936
4936
  }
4937
4937
  /**
@@ -4977,9 +4977,9 @@ export class GroupsApi extends BaseAPI {
4977
4977
  * @throws {RequiredError}
4978
4978
  * @memberof GroupsApi
4979
4979
  */
4980
- groupsControllerRemoveAccountsV1(id, removeAccountFromGroupControllerParamsDto, options) {
4980
+ groupsControllerRemoveAccountV1(id, removeAccountFromGroupControllerParamsDto, options) {
4981
4981
  return GroupsApiFp(this.configuration)
4982
- .groupsControllerRemoveAccountsV1(id, removeAccountFromGroupControllerParamsDto, options)
4982
+ .groupsControllerRemoveAccountV1(id, removeAccountFromGroupControllerParamsDto, options)
4983
4983
  .then((request) => request(this.axios, this.basePath));
4984
4984
  }
4985
4985
  }
@@ -15,12 +15,14 @@ export type MethodsPermissions = {
15
15
  collections: {
16
16
  create: boolean;
17
17
  read: boolean;
18
- update: boolean;
19
18
  items: {
20
19
  add: boolean;
21
20
  read: boolean;
22
21
  remove: boolean;
23
22
  };
23
+ metadata: {
24
+ update: boolean;
25
+ };
24
26
  };
25
27
  groups: {
26
28
  create: boolean;
@@ -46,7 +48,6 @@ export type MethodsPermissions = {
46
48
  pipelines: {
47
49
  create: boolean;
48
50
  read: boolean;
49
- update: boolean;
50
51
  };
51
52
  poses: {
52
53
  create: boolean;
@@ -0,0 +1,11 @@
1
+ import { AttachAccessControllerParamsDto, GrantAccessControllerParams } from '../../autogenerated';
2
+ import { SDKOptions } from '../../types';
3
+ declare const resources: (options: SDKOptions) => {
4
+ attach: (props: AttachAccessControllerParamsDto & {
5
+ id: string;
6
+ }) => Promise<void>;
7
+ grant: (props: GrantAccessControllerParams & {
8
+ id: string;
9
+ }) => Promise<void>;
10
+ };
11
+ export default resources;
@@ -0,0 +1,14 @@
1
+ import { AccessApi } from '../../autogenerated';
2
+ import { useAutogeneratedAPI } from '../api';
3
+ const resources = (options) => {
4
+ const api = useAutogeneratedAPI({ API: AccessApi, options });
5
+ return {
6
+ attach: async (props) => api.call({
7
+ run: (methods) => methods.accessControllerAttachAccessV1(props.id, props),
8
+ }),
9
+ grant: async (props) => api.call({
10
+ run: (methods) => methods.accessControllerGrantAccessV1(props.id, props),
11
+ }),
12
+ };
13
+ };
14
+ export default resources;
package/dist/sdk/api.d.ts CHANGED
@@ -16,8 +16,3 @@ export declare const useAutogeneratedAPI: <T extends BaseAPI>(baseProps: {
16
16
  transform?: (response: ResponseEntity) => ReturnType_1;
17
17
  }) => Promise<ReturnType_1 | undefined>;
18
18
  };
19
- export declare const createWebsocket: (props: {
20
- callback: (data: any) => void;
21
- options: SDKOptions;
22
- topic: string;
23
- }) => Promise<void>;
package/dist/sdk/api.js CHANGED
@@ -1,5 +1,3 @@
1
- import { WebsocketApi } from '../autogenerated';
2
- import Pusher from 'pusher-js';
3
1
  const getBaseUrl = (options) => options.endpoint ?? 'https://api.hautech.ai';
4
2
  export const useAutogeneratedAPI = (baseProps) => {
5
3
  const getAPI = async () => {
@@ -32,24 +30,3 @@ export const useAutogeneratedAPI = (baseProps) => {
32
30
  callWithReturningUndefinedOn404,
33
31
  };
34
32
  };
35
- export const createWebsocket = async (props) => {
36
- const api = useAutogeneratedAPI({ API: WebsocketApi, options: props.options });
37
- const baseUrl = getBaseUrl(props.options);
38
- const pusherSettings = (await api.call({ run: (api) => api.websocketControllerGetSettingsV1() }));
39
- const pusher = new Pusher(pusherSettings.key, {
40
- channelAuthorization: {
41
- endpoint: `${baseUrl}/v1/websocket/auth`,
42
- headers: {
43
- 'Access-Control-Allow-Origin': '*',
44
- Authorization: `Bearer ${await props.options.authToken()}`,
45
- },
46
- transport: 'ajax',
47
- },
48
- cluster: pusherSettings.cluster,
49
- forceTLS: true,
50
- });
51
- const channel = pusher.subscribe(`private-user-${pusherSettings.userId?.replace('|', '_')}`);
52
- channel.bind('pusher:subscription_succeeded', () => console.log(`Subscribed to ${props.topic} updates`));
53
- channel.bind('pusher:subscription_error', (data) => console.error(data));
54
- channel.bind(props.topic, (data) => props.callback(data));
55
- };
@@ -5,13 +5,13 @@ const groups = (options) => {
5
5
  return {
6
6
  accounts: {
7
7
  add: async (props) => api.call({
8
- run: (methods) => methods.groupsControllerAddAccountsV1(props.groupId, {
8
+ run: (methods) => methods.groupsControllerAddAccountV1(props.groupId, {
9
9
  accountId: props.accountId,
10
10
  role: props.role,
11
11
  }),
12
12
  }),
13
13
  remove: async (props) => api.call({
14
- run: (methods) => methods.groupsControllerRemoveAccountsV1(props.groupId, {
14
+ run: (methods) => methods.groupsControllerRemoveAccountV1(props.groupId, {
15
15
  accountId: props.accountId,
16
16
  role: props.role,
17
17
  }),
@@ -1,5 +1,13 @@
1
1
  import { SDKOptions } from '../types';
2
2
  export declare const createSDK: (options: SDKOptions) => {
3
+ access: {
4
+ attach: (props: import("../autogenerated").AttachAccessControllerParamsDto & {
5
+ id: string;
6
+ }) => Promise<void>;
7
+ grant: (props: import("../autogenerated").GrantAccessControllerParams & {
8
+ id: string;
9
+ }) => Promise<void>;
10
+ };
3
11
  accounts: {
4
12
  create: (props?: {
5
13
  alias?: string;
@@ -183,14 +191,6 @@ export declare const createSDK: (options: SDKOptions) => {
183
191
  id: string;
184
192
  metadata?: any;
185
193
  }) => Promise<void>;
186
- updates: {
187
- subscribe: (props: {
188
- callback: (operation: import("../types").OperationEntity) => void;
189
- }) => void;
190
- unsubscribe: (props: {
191
- callback: (operation: import("../types").OperationEntity) => void;
192
- }) => void;
193
- };
194
194
  wait: (props: {
195
195
  id: string;
196
196
  timeoutInSeconds?: number;
@@ -198,6 +198,10 @@ export declare const createSDK: (options: SDKOptions) => {
198
198
  };
199
199
  pipelines: {
200
200
  constructTemplate: (consructPipeline: (pipeline: import("@hautechai/pipelines").Pipeline<{
201
+ access: {
202
+ attach: (params: import("../autogenerated").AttachAccessParamsDto) => Promise<void>;
203
+ grant: (params: import("../autogenerated").GrantAccessParamsDto) => Promise<void>;
204
+ };
201
205
  accounts: {
202
206
  create: (params: import("../autogenerated").CreateAccountParamsDto) => Promise<import("../types").AccountEntity>;
203
207
  get: (params: import("../autogenerated").GetAccountParamsDto) => Promise<import("../types").AccountEntity>;
@@ -229,6 +233,7 @@ export declare const createSDK: (options: SDKOptions) => {
229
233
  get: (params: import("../autogenerated").GetGroupParamsDto) => Promise<import("../types").GroupEntity>;
230
234
  };
231
235
  images: {
236
+ get: (params: import("../autogenerated").GetImageParamsDto) => Promise<import("../types").ImageEntity>;
232
237
  getUrls: (params: import("../autogenerated").GetUrlsForImagesParamsDto) => Promise<import("../autogenerated").ImageUrlResponseDto[]>;
233
238
  };
234
239
  operations: {
@@ -236,13 +241,27 @@ export declare const createSDK: (options: SDKOptions) => {
236
241
  list: (params: import("../autogenerated").ListOperationsParamsDto) => Promise<import("../autogenerated").ListOperationsDto>;
237
242
  updateMetadata: (params: import("../autogenerated").UpdateResourceMetadataDto) => Promise<import("../types").OperationEntity>;
238
243
  };
244
+ poses: {
245
+ get: (params: import("../autogenerated").GetPoseParamsDto) => Promise<import("../autogenerated").PoseEntity>;
246
+ list: (params: import("../autogenerated").ListPosesParamsDto) => Promise<import("../autogenerated").ListPosesDto>;
247
+ };
239
248
  stacks: {
240
249
  create: (params: import("../autogenerated").CreateStackParamsDto) => Promise<import("../types").StackEntity>;
241
250
  get: (params: import("../autogenerated").GetStackParamsDto) => Promise<import("../types").StackEntity>;
242
251
  list: (params: import("../autogenerated").ListStacksParamsDto) => Promise<import("../autogenerated").ListStacksDto>;
243
252
  updateMetadata: (params: import("../autogenerated").UpdateResourceMetadataDto) => Promise<import("../types").StackEntity>;
244
253
  };
254
+ storage: {
255
+ create: (params: import("../autogenerated").CreateStorageRecordParamsDto) => Promise<import("../types").StorageEntity>;
256
+ delete: (params: import("../autogenerated").DeleteStorageParamsDto) => Promise<void>;
257
+ getMany: (params: import("../autogenerated").GetStorageRecordParamsDto) => Promise<import("../autogenerated").StorageRecordsResultDto[]>;
258
+ update: (params: import("../autogenerated").UpdateStorageRecordParamsDto) => Promise<import("../types").StorageEntity>;
259
+ };
245
260
  }>) => import("@hautechai/pipelines").Pipeline<{
261
+ access: {
262
+ attach: (params: import("../autogenerated").AttachAccessParamsDto) => Promise<void>;
263
+ grant: (params: import("../autogenerated").GrantAccessParamsDto) => Promise<void>;
264
+ };
246
265
  accounts: {
247
266
  create: (params: import("../autogenerated").CreateAccountParamsDto) => Promise<import("../types").AccountEntity>;
248
267
  get: (params: import("../autogenerated").GetAccountParamsDto) => Promise<import("../types").AccountEntity>;
@@ -274,6 +293,7 @@ export declare const createSDK: (options: SDKOptions) => {
274
293
  get: (params: import("../autogenerated").GetGroupParamsDto) => Promise<import("../types").GroupEntity>;
275
294
  };
276
295
  images: {
296
+ get: (params: import("../autogenerated").GetImageParamsDto) => Promise<import("../types").ImageEntity>;
277
297
  getUrls: (params: import("../autogenerated").GetUrlsForImagesParamsDto) => Promise<import("../autogenerated").ImageUrlResponseDto[]>;
278
298
  };
279
299
  operations: {
@@ -281,13 +301,27 @@ export declare const createSDK: (options: SDKOptions) => {
281
301
  list: (params: import("../autogenerated").ListOperationsParamsDto) => Promise<import("../autogenerated").ListOperationsDto>;
282
302
  updateMetadata: (params: import("../autogenerated").UpdateResourceMetadataDto) => Promise<import("../types").OperationEntity>;
283
303
  };
304
+ poses: {
305
+ get: (params: import("../autogenerated").GetPoseParamsDto) => Promise<import("../autogenerated").PoseEntity>;
306
+ list: (params: import("../autogenerated").ListPosesParamsDto) => Promise<import("../autogenerated").ListPosesDto>;
307
+ };
284
308
  stacks: {
285
309
  create: (params: import("../autogenerated").CreateStackParamsDto) => Promise<import("../types").StackEntity>;
286
310
  get: (params: import("../autogenerated").GetStackParamsDto) => Promise<import("../types").StackEntity>;
287
311
  list: (params: import("../autogenerated").ListStacksParamsDto) => Promise<import("../autogenerated").ListStacksDto>;
288
312
  updateMetadata: (params: import("../autogenerated").UpdateResourceMetadataDto) => Promise<import("../types").StackEntity>;
289
313
  };
314
+ storage: {
315
+ create: (params: import("../autogenerated").CreateStorageRecordParamsDto) => Promise<import("../types").StorageEntity>;
316
+ delete: (params: import("../autogenerated").DeleteStorageParamsDto) => Promise<void>;
317
+ getMany: (params: import("../autogenerated").GetStorageRecordParamsDto) => Promise<import("../autogenerated").StorageRecordsResultDto[]>;
318
+ update: (params: import("../autogenerated").UpdateStorageRecordParamsDto) => Promise<import("../types").StorageEntity>;
319
+ };
290
320
  }>) => import("@hautechai/pipelines").Pipeline<{
321
+ access: {
322
+ attach: (params: import("../autogenerated").AttachAccessParamsDto) => Promise<void>;
323
+ grant: (params: import("../autogenerated").GrantAccessParamsDto) => Promise<void>;
324
+ };
291
325
  accounts: {
292
326
  create: (params: import("../autogenerated").CreateAccountParamsDto) => Promise<import("../types").AccountEntity>;
293
327
  get: (params: import("../autogenerated").GetAccountParamsDto) => Promise<import("../types").AccountEntity>;
@@ -319,6 +353,7 @@ export declare const createSDK: (options: SDKOptions) => {
319
353
  get: (params: import("../autogenerated").GetGroupParamsDto) => Promise<import("../types").GroupEntity>;
320
354
  };
321
355
  images: {
356
+ get: (params: import("../autogenerated").GetImageParamsDto) => Promise<import("../types").ImageEntity>;
322
357
  getUrls: (params: import("../autogenerated").GetUrlsForImagesParamsDto) => Promise<import("../autogenerated").ImageUrlResponseDto[]>;
323
358
  };
324
359
  operations: {
@@ -326,16 +361,30 @@ export declare const createSDK: (options: SDKOptions) => {
326
361
  list: (params: import("../autogenerated").ListOperationsParamsDto) => Promise<import("../autogenerated").ListOperationsDto>;
327
362
  updateMetadata: (params: import("../autogenerated").UpdateResourceMetadataDto) => Promise<import("../types").OperationEntity>;
328
363
  };
364
+ poses: {
365
+ get: (params: import("../autogenerated").GetPoseParamsDto) => Promise<import("../autogenerated").PoseEntity>;
366
+ list: (params: import("../autogenerated").ListPosesParamsDto) => Promise<import("../autogenerated").ListPosesDto>;
367
+ };
329
368
  stacks: {
330
369
  create: (params: import("../autogenerated").CreateStackParamsDto) => Promise<import("../types").StackEntity>;
331
370
  get: (params: import("../autogenerated").GetStackParamsDto) => Promise<import("../types").StackEntity>;
332
371
  list: (params: import("../autogenerated").ListStacksParamsDto) => Promise<import("../autogenerated").ListStacksDto>;
333
372
  updateMetadata: (params: import("../autogenerated").UpdateResourceMetadataDto) => Promise<import("../types").StackEntity>;
334
373
  };
374
+ storage: {
375
+ create: (params: import("../autogenerated").CreateStorageRecordParamsDto) => Promise<import("../types").StorageEntity>;
376
+ delete: (params: import("../autogenerated").DeleteStorageParamsDto) => Promise<void>;
377
+ getMany: (params: import("../autogenerated").GetStorageRecordParamsDto) => Promise<import("../autogenerated").StorageRecordsResultDto[]>;
378
+ update: (params: import("../autogenerated").UpdateStorageRecordParamsDto) => Promise<import("../types").StorageEntity>;
379
+ };
335
380
  }>;
336
381
  create: (props: {
337
382
  metadata?: any;
338
383
  template: import("@hautechai/pipelines").Pipeline<{
384
+ access: {
385
+ attach: (params: import("../autogenerated").AttachAccessParamsDto) => Promise<void>;
386
+ grant: (params: import("../autogenerated").GrantAccessParamsDto) => Promise<void>;
387
+ };
339
388
  accounts: {
340
389
  create: (params: import("../autogenerated").CreateAccountParamsDto) => Promise<import("../types").AccountEntity>;
341
390
  get: (params: import("../autogenerated").GetAccountParamsDto) => Promise<import("../types").AccountEntity>;
@@ -367,6 +416,7 @@ export declare const createSDK: (options: SDKOptions) => {
367
416
  get: (params: import("../autogenerated").GetGroupParamsDto) => Promise<import("../types").GroupEntity>;
368
417
  };
369
418
  images: {
419
+ get: (params: import("../autogenerated").GetImageParamsDto) => Promise<import("../types").ImageEntity>;
370
420
  getUrls: (params: import("../autogenerated").GetUrlsForImagesParamsDto) => Promise<import("../autogenerated").ImageUrlResponseDto[]>;
371
421
  };
372
422
  operations: {
@@ -374,12 +424,22 @@ export declare const createSDK: (options: SDKOptions) => {
374
424
  list: (params: import("../autogenerated").ListOperationsParamsDto) => Promise<import("../autogenerated").ListOperationsDto>;
375
425
  updateMetadata: (params: import("../autogenerated").UpdateResourceMetadataDto) => Promise<import("../types").OperationEntity>;
376
426
  };
427
+ poses: {
428
+ get: (params: import("../autogenerated").GetPoseParamsDto) => Promise<import("../autogenerated").PoseEntity>;
429
+ list: (params: import("../autogenerated").ListPosesParamsDto) => Promise<import("../autogenerated").ListPosesDto>;
430
+ };
377
431
  stacks: {
378
432
  create: (params: import("../autogenerated").CreateStackParamsDto) => Promise<import("../types").StackEntity>;
379
433
  get: (params: import("../autogenerated").GetStackParamsDto) => Promise<import("../types").StackEntity>;
380
434
  list: (params: import("../autogenerated").ListStacksParamsDto) => Promise<import("../autogenerated").ListStacksDto>;
381
435
  updateMetadata: (params: import("../autogenerated").UpdateResourceMetadataDto) => Promise<import("../types").StackEntity>;
382
436
  };
437
+ storage: {
438
+ create: (params: import("../autogenerated").CreateStorageRecordParamsDto) => Promise<import("../types").StorageEntity>;
439
+ delete: (params: import("../autogenerated").DeleteStorageParamsDto) => Promise<void>;
440
+ getMany: (params: import("../autogenerated").GetStorageRecordParamsDto) => Promise<import("../autogenerated").StorageRecordsResultDto[]>;
441
+ update: (params: import("../autogenerated").UpdateStorageRecordParamsDto) => Promise<import("../types").StorageEntity>;
442
+ };
383
443
  }>;
384
444
  }) => Promise<import("../types").PipelineEntity>;
385
445
  get: (props: {
package/dist/sdk/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import access from './access';
1
2
  import accounts from './accounts';
2
3
  import balances from './balances';
3
4
  import collections from './collections';
@@ -23,6 +24,7 @@ export const createSDK = (options) => {
23
24
  };
24
25
  const optionsWithTokenRefresher = { ...options, authToken };
25
26
  return {
27
+ access: access(optionsWithTokenRefresher),
26
28
  accounts: accounts(optionsWithTokenRefresher),
27
29
  balances: balances(optionsWithTokenRefresher),
28
30
  collections: collections(optionsWithTokenRefresher),
@@ -100,14 +100,6 @@ declare const operations: (options: SDKOptions) => {
100
100
  id: string;
101
101
  metadata?: any;
102
102
  }) => Promise<void>;
103
- updates: {
104
- subscribe: (props: {
105
- callback: (operation: OperationEntity) => void;
106
- }) => void;
107
- unsubscribe: (props: {
108
- callback: (operation: OperationEntity) => void;
109
- }) => void;
110
- };
111
103
  wait: (props: {
112
104
  id: string;
113
105
  timeoutInSeconds?: number;
@@ -1,10 +1,8 @@
1
- import createOperationUpdater from './updater';
2
1
  import { OperationsApi, } from '../../autogenerated';
3
2
  import { useAutogeneratedAPI } from '../api';
4
3
  import { transformToListResponse } from '../transformers';
5
4
  const operations = (options) => {
6
5
  const api = useAutogeneratedAPI({ API: OperationsApi, options });
7
- const updates = createOperationUpdater(options);
8
6
  const createOperation = (callMethod) => (props) => api.call({ run: (methods) => callMethod(methods, props) });
9
7
  return {
10
8
  create: {
@@ -69,18 +67,9 @@ const operations = (options) => {
69
67
  updateMetadata: async (props) => api.call({
70
68
  run: (methods) => methods.operationsControllerUpdateMetadataV1(props.id, { overwrite: props.metadata }),
71
69
  }),
72
- updates,
73
70
  wait: async (props) => new Promise((resolve, reject) => {
74
71
  const initialDelay = 5000;
75
72
  const delay = 2000;
76
- const listenToOperation = (operation) => {
77
- if (operation.id === props.id) {
78
- clearTimeout(timeoutId);
79
- resolve(operation);
80
- updates.unsubscribe({ callback: listenToOperation });
81
- }
82
- };
83
- updates.subscribe({ callback: listenToOperation });
84
73
  let timeoutId;
85
74
  const poll = async () => {
86
75
  const operation = await api.call({
@@ -89,7 +78,6 @@ const operations = (options) => {
89
78
  if (operation.status !== 'pending')
90
79
  return resolve(operation);
91
80
  timeoutId = setTimeout(poll, delay);
92
- updates.unsubscribe({ callback: listenToOperation });
93
81
  };
94
82
  timeoutId = setTimeout(poll, initialDelay);
95
83
  }),
@@ -3,6 +3,10 @@ import { Pipeline } from '@hautechai/pipelines';
3
3
  import { SDKOptions } from '../../types';
4
4
  declare const pipelines: (options: SDKOptions) => {
5
5
  constructTemplate: (consructPipeline: (pipeline: Pipeline<{
6
+ access: {
7
+ attach: (params: import("../../autogenerated").AttachAccessParamsDto) => Promise<void>;
8
+ grant: (params: import("../../autogenerated").GrantAccessParamsDto) => Promise<void>;
9
+ };
6
10
  accounts: {
7
11
  create: (params: import("../../autogenerated").CreateAccountParamsDto) => Promise<import("../../autogenerated").AccountEntity>;
8
12
  get: (params: import("../../autogenerated").GetAccountParamsDto) => Promise<import("../../autogenerated").AccountEntity>;
@@ -34,6 +38,7 @@ declare const pipelines: (options: SDKOptions) => {
34
38
  get: (params: import("../../autogenerated").GetGroupParamsDto) => Promise<import("../../autogenerated").GroupEntity>;
35
39
  };
36
40
  images: {
41
+ get: (params: import("../../autogenerated").GetImageParamsDto) => Promise<import("../../autogenerated").ImageEntity>;
37
42
  getUrls: (params: import("../../autogenerated").GetUrlsForImagesParamsDto) => Promise<import("../../autogenerated").ImageUrlResponseDto[]>;
38
43
  };
39
44
  operations: {
@@ -41,13 +46,27 @@ declare const pipelines: (options: SDKOptions) => {
41
46
  list: (params: import("../../autogenerated").ListOperationsParamsDto) => Promise<import("../../autogenerated").ListOperationsDto>;
42
47
  updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto) => Promise<import("../../autogenerated").OperationEntity>;
43
48
  };
49
+ poses: {
50
+ get: (params: import("../../autogenerated").GetPoseParamsDto) => Promise<import("../../autogenerated").PoseEntity>;
51
+ list: (params: import("../../autogenerated").ListPosesParamsDto) => Promise<import("../../autogenerated").ListPosesDto>;
52
+ };
44
53
  stacks: {
45
54
  create: (params: import("../../autogenerated").CreateStackParamsDto) => Promise<import("../../autogenerated").StackEntity>;
46
55
  get: (params: import("../../autogenerated").GetStackParamsDto) => Promise<import("../../autogenerated").StackEntity>;
47
56
  list: (params: import("../../autogenerated").ListStacksParamsDto) => Promise<import("../../autogenerated").ListStacksDto>;
48
57
  updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto) => Promise<import("../../autogenerated").StackEntity>;
49
58
  };
59
+ storage: {
60
+ create: (params: import("../../autogenerated").CreateStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageEntity>;
61
+ delete: (params: import("../../autogenerated").DeleteStorageParamsDto) => Promise<void>;
62
+ getMany: (params: import("../../autogenerated").GetStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageRecordsResultDto[]>;
63
+ update: (params: import("../../autogenerated").UpdateStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageEntity>;
64
+ };
50
65
  }>) => Pipeline<{
66
+ access: {
67
+ attach: (params: import("../../autogenerated").AttachAccessParamsDto) => Promise<void>;
68
+ grant: (params: import("../../autogenerated").GrantAccessParamsDto) => Promise<void>;
69
+ };
51
70
  accounts: {
52
71
  create: (params: import("../../autogenerated").CreateAccountParamsDto) => Promise<import("../../autogenerated").AccountEntity>;
53
72
  get: (params: import("../../autogenerated").GetAccountParamsDto) => Promise<import("../../autogenerated").AccountEntity>;
@@ -79,6 +98,7 @@ declare const pipelines: (options: SDKOptions) => {
79
98
  get: (params: import("../../autogenerated").GetGroupParamsDto) => Promise<import("../../autogenerated").GroupEntity>;
80
99
  };
81
100
  images: {
101
+ get: (params: import("../../autogenerated").GetImageParamsDto) => Promise<import("../../autogenerated").ImageEntity>;
82
102
  getUrls: (params: import("../../autogenerated").GetUrlsForImagesParamsDto) => Promise<import("../../autogenerated").ImageUrlResponseDto[]>;
83
103
  };
84
104
  operations: {
@@ -86,13 +106,27 @@ declare const pipelines: (options: SDKOptions) => {
86
106
  list: (params: import("../../autogenerated").ListOperationsParamsDto) => Promise<import("../../autogenerated").ListOperationsDto>;
87
107
  updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto) => Promise<import("../../autogenerated").OperationEntity>;
88
108
  };
109
+ poses: {
110
+ get: (params: import("../../autogenerated").GetPoseParamsDto) => Promise<import("../../autogenerated").PoseEntity>;
111
+ list: (params: import("../../autogenerated").ListPosesParamsDto) => Promise<import("../../autogenerated").ListPosesDto>;
112
+ };
89
113
  stacks: {
90
114
  create: (params: import("../../autogenerated").CreateStackParamsDto) => Promise<import("../../autogenerated").StackEntity>;
91
115
  get: (params: import("../../autogenerated").GetStackParamsDto) => Promise<import("../../autogenerated").StackEntity>;
92
116
  list: (params: import("../../autogenerated").ListStacksParamsDto) => Promise<import("../../autogenerated").ListStacksDto>;
93
117
  updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto) => Promise<import("../../autogenerated").StackEntity>;
94
118
  };
119
+ storage: {
120
+ create: (params: import("../../autogenerated").CreateStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageEntity>;
121
+ delete: (params: import("../../autogenerated").DeleteStorageParamsDto) => Promise<void>;
122
+ getMany: (params: import("../../autogenerated").GetStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageRecordsResultDto[]>;
123
+ update: (params: import("../../autogenerated").UpdateStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageEntity>;
124
+ };
95
125
  }>) => Pipeline<{
126
+ access: {
127
+ attach: (params: import("../../autogenerated").AttachAccessParamsDto) => Promise<void>;
128
+ grant: (params: import("../../autogenerated").GrantAccessParamsDto) => Promise<void>;
129
+ };
96
130
  accounts: {
97
131
  create: (params: import("../../autogenerated").CreateAccountParamsDto) => Promise<import("../../autogenerated").AccountEntity>;
98
132
  get: (params: import("../../autogenerated").GetAccountParamsDto) => Promise<import("../../autogenerated").AccountEntity>;
@@ -124,6 +158,7 @@ declare const pipelines: (options: SDKOptions) => {
124
158
  get: (params: import("../../autogenerated").GetGroupParamsDto) => Promise<import("../../autogenerated").GroupEntity>;
125
159
  };
126
160
  images: {
161
+ get: (params: import("../../autogenerated").GetImageParamsDto) => Promise<import("../../autogenerated").ImageEntity>;
127
162
  getUrls: (params: import("../../autogenerated").GetUrlsForImagesParamsDto) => Promise<import("../../autogenerated").ImageUrlResponseDto[]>;
128
163
  };
129
164
  operations: {
@@ -131,16 +166,30 @@ declare const pipelines: (options: SDKOptions) => {
131
166
  list: (params: import("../../autogenerated").ListOperationsParamsDto) => Promise<import("../../autogenerated").ListOperationsDto>;
132
167
  updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto) => Promise<import("../../autogenerated").OperationEntity>;
133
168
  };
169
+ poses: {
170
+ get: (params: import("../../autogenerated").GetPoseParamsDto) => Promise<import("../../autogenerated").PoseEntity>;
171
+ list: (params: import("../../autogenerated").ListPosesParamsDto) => Promise<import("../../autogenerated").ListPosesDto>;
172
+ };
134
173
  stacks: {
135
174
  create: (params: import("../../autogenerated").CreateStackParamsDto) => Promise<import("../../autogenerated").StackEntity>;
136
175
  get: (params: import("../../autogenerated").GetStackParamsDto) => Promise<import("../../autogenerated").StackEntity>;
137
176
  list: (params: import("../../autogenerated").ListStacksParamsDto) => Promise<import("../../autogenerated").ListStacksDto>;
138
177
  updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto) => Promise<import("../../autogenerated").StackEntity>;
139
178
  };
179
+ storage: {
180
+ create: (params: import("../../autogenerated").CreateStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageEntity>;
181
+ delete: (params: import("../../autogenerated").DeleteStorageParamsDto) => Promise<void>;
182
+ getMany: (params: import("../../autogenerated").GetStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageRecordsResultDto[]>;
183
+ update: (params: import("../../autogenerated").UpdateStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageEntity>;
184
+ };
140
185
  }>;
141
186
  create: (props: {
142
187
  metadata?: any;
143
188
  template: Pipeline<{
189
+ access: {
190
+ attach: (params: import("../../autogenerated").AttachAccessParamsDto) => Promise<void>;
191
+ grant: (params: import("../../autogenerated").GrantAccessParamsDto) => Promise<void>;
192
+ };
144
193
  accounts: {
145
194
  create: (params: import("../../autogenerated").CreateAccountParamsDto) => Promise<import("../../autogenerated").AccountEntity>;
146
195
  get: (params: import("../../autogenerated").GetAccountParamsDto) => Promise<import("../../autogenerated").AccountEntity>;
@@ -172,6 +221,7 @@ declare const pipelines: (options: SDKOptions) => {
172
221
  get: (params: import("../../autogenerated").GetGroupParamsDto) => Promise<import("../../autogenerated").GroupEntity>;
173
222
  };
174
223
  images: {
224
+ get: (params: import("../../autogenerated").GetImageParamsDto) => Promise<import("../../autogenerated").ImageEntity>;
175
225
  getUrls: (params: import("../../autogenerated").GetUrlsForImagesParamsDto) => Promise<import("../../autogenerated").ImageUrlResponseDto[]>;
176
226
  };
177
227
  operations: {
@@ -179,12 +229,22 @@ declare const pipelines: (options: SDKOptions) => {
179
229
  list: (params: import("../../autogenerated").ListOperationsParamsDto) => Promise<import("../../autogenerated").ListOperationsDto>;
180
230
  updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto) => Promise<import("../../autogenerated").OperationEntity>;
181
231
  };
232
+ poses: {
233
+ get: (params: import("../../autogenerated").GetPoseParamsDto) => Promise<import("../../autogenerated").PoseEntity>;
234
+ list: (params: import("../../autogenerated").ListPosesParamsDto) => Promise<import("../../autogenerated").ListPosesDto>;
235
+ };
182
236
  stacks: {
183
237
  create: (params: import("../../autogenerated").CreateStackParamsDto) => Promise<import("../../autogenerated").StackEntity>;
184
238
  get: (params: import("../../autogenerated").GetStackParamsDto) => Promise<import("../../autogenerated").StackEntity>;
185
239
  list: (params: import("../../autogenerated").ListStacksParamsDto) => Promise<import("../../autogenerated").ListStacksDto>;
186
240
  updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto) => Promise<import("../../autogenerated").StackEntity>;
187
241
  };
242
+ storage: {
243
+ create: (params: import("../../autogenerated").CreateStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageEntity>;
244
+ delete: (params: import("../../autogenerated").DeleteStorageParamsDto) => Promise<void>;
245
+ getMany: (params: import("../../autogenerated").GetStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageRecordsResultDto[]>;
246
+ update: (params: import("../../autogenerated").UpdateStorageRecordParamsDto) => Promise<import("../../autogenerated").StorageEntity>;
247
+ };
188
248
  }>;
189
249
  }) => Promise<PipelineEntity>;
190
250
  get: (props: {
@@ -8,6 +8,10 @@ const pipelines = (options) => {
8
8
  run: (methods) => method(methods)(params),
9
9
  });
10
10
  const createPipeline = () => new Pipeline({
11
+ access: {
12
+ attach: callMethod((methods) => methods.callControllerCallResourceAccessAttachV1),
13
+ grant: callMethod((methods) => methods.callControllerCallResourceAccessGrantV1),
14
+ },
11
15
  accounts: {
12
16
  create: callMethod((methods) => methods.callControllerCallAccountsCreateV1),
13
17
  get: callMethod((methods) => methods.callControllerCallAccountsGetV1),
@@ -39,6 +43,7 @@ const pipelines = (options) => {
39
43
  get: callMethod((methods) => methods.callControllerCallGroupsGetV1),
40
44
  },
41
45
  images: {
46
+ get: callMethod((methods) => methods.callControllerCallImagesGetV1),
42
47
  getUrls: callMethod((methods) => methods.callControllerCallImagesGetManyV1),
43
48
  },
44
49
  operations: {
@@ -46,12 +51,22 @@ const pipelines = (options) => {
46
51
  list: callMethod((methods) => methods.callControllerCallOperationsListV1),
47
52
  updateMetadata: callMethod((methods) => methods.callControllerCallOperationsMetadataUpdateV1),
48
53
  },
54
+ poses: {
55
+ get: callMethod((methods) => methods.callControllerCallPosesGetV1),
56
+ list: callMethod((methods) => methods.callControllerCallPosesListV1),
57
+ },
49
58
  stacks: {
50
59
  create: callMethod((methods) => methods.callControllerCallStacksCreateV1),
51
60
  get: callMethod((methods) => methods.callControllerCallStacksGetV1),
52
61
  list: callMethod((methods) => methods.callControllerCallStacksListV1),
53
62
  updateMetadata: callMethod((methods) => methods.callControllerCallStacksMetadataUpdateV1),
54
63
  },
64
+ storage: {
65
+ create: callMethod((methods) => methods.callControllerCallStorageCreateV1),
66
+ delete: callMethod((methods) => methods.callControllerCallStorageDeleteV1),
67
+ getMany: callMethod((methods) => methods.callControllerCallStorageGetManyV1),
68
+ update: callMethod((methods) => methods.callControllerCallStorageUpdateV1),
69
+ },
55
70
  });
56
71
  return {
57
72
  constructTemplate: (consructPipeline) => consructPipeline(createPipeline()),
@@ -4,13 +4,13 @@ export const defaultPermissions = {
4
4
  collections: {
5
5
  create: true,
6
6
  items: { add: true, read: true, remove: true },
7
+ metadata: { update: true },
7
8
  read: true,
8
- update: true,
9
9
  },
10
10
  groups: { accounts: { add: false, read: true, remove: false }, create: false, delete: false, read: true },
11
11
  images: { create: true, read: true },
12
12
  operations: { create: true, read: true, metadata: { update: true } },
13
- pipelines: { create: true, read: true, update: true },
13
+ pipelines: { create: true, read: true },
14
14
  poses: { create: true, read: true, update: true },
15
15
  resources: {
16
16
  access: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hautechai/sdk",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "license": "MIT",
5
5
  "keywords": [],
6
6
  "repository": {
@@ -19,8 +19,7 @@
19
19
  "dependencies": {
20
20
  "@hautechai/pipelines": "0.1.0",
21
21
  "axios": "1.6.1",
22
- "jose": "5.9.6",
23
- "pusher-js": "8.4.0-rc2"
22
+ "jose": "5.9.6"
24
23
  },
25
24
  "devDependencies": {
26
25
  "@openapitools/openapi-generator-cli": "2.15.3",
@@ -1,11 +0,0 @@
1
- import { SDKOptions } from '../../types';
2
- import { OperationEntity } from '../../autogenerated';
3
- declare const createOperationUpdater: (options: SDKOptions) => {
4
- subscribe: (props: {
5
- callback: (operation: OperationEntity) => void;
6
- }) => void;
7
- unsubscribe: (props: {
8
- callback: (operation: OperationEntity) => void;
9
- }) => void;
10
- };
11
- export default createOperationUpdater;
@@ -1,23 +0,0 @@
1
- import { createWebsocket } from '../api';
2
- const createOperationUpdater = (options) => {
3
- const eventListeners = [];
4
- const eventListener = (operation) => {
5
- eventListeners.forEach((listener) => listener(operation));
6
- };
7
- let websocketInited = false;
8
- const initWebsocket = () => {
9
- createWebsocket({ callback: eventListener, options, topic: 'operation' });
10
- websocketInited = true;
11
- };
12
- return {
13
- subscribe: (props) => {
14
- eventListeners.push(props.callback);
15
- if (!websocketInited)
16
- initWebsocket();
17
- },
18
- unsubscribe: (props) => {
19
- eventListeners.splice(eventListeners.indexOf(props.callback), 1);
20
- },
21
- };
22
- };
23
- export default createOperationUpdater;