@hautechai/sdk 1.0.2 → 1.0.3

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 (63) hide show
  1. package/.github/workflows/release.yaml +57 -62
  2. package/CHANGELOG.md +1 -0
  3. package/package.json +49 -44
  4. package/release.config.cjs +4 -0
  5. package/scripts/generate-permissions.js +0 -0
  6. package/scripts/generate.sh +0 -0
  7. package/scripts/up-versions.sh +0 -0
  8. package/dist/autogenerated/api.d.ts +0 -11397
  9. package/dist/autogenerated/api.js +0 -11002
  10. package/dist/autogenerated/base.d.ts +0 -66
  11. package/dist/autogenerated/base.js +0 -59
  12. package/dist/autogenerated/common.d.ts +0 -65
  13. package/dist/autogenerated/common.js +0 -133
  14. package/dist/autogenerated/configuration.d.ts +0 -91
  15. package/dist/autogenerated/configuration.js +0 -39
  16. package/dist/autogenerated/index.d.ts +0 -13
  17. package/dist/autogenerated/index.js +0 -15
  18. package/dist/autogenerated/permissions.d.ts +0 -94
  19. package/dist/autogenerated/permissions.js +0 -1
  20. package/dist/index.d.ts +0 -3
  21. package/dist/index.js +0 -3
  22. package/dist/sdk/access/index.d.ts +0 -20
  23. package/dist/sdk/access/index.js +0 -23
  24. package/dist/sdk/accounts/index.d.ts +0 -16
  25. package/dist/sdk/accounts/index.js +0 -25
  26. package/dist/sdk/api.d.ts +0 -20
  27. package/dist/sdk/api.js +0 -33
  28. package/dist/sdk/balances/index.d.ts +0 -12
  29. package/dist/sdk/balances/index.js +0 -19
  30. package/dist/sdk/collections/index.d.ts +0 -33
  31. package/dist/sdk/collections/index.js +0 -34
  32. package/dist/sdk/errors/index.d.ts +0 -3
  33. package/dist/sdk/errors/index.js +0 -6
  34. package/dist/sdk/groups/index.d.ts +0 -24
  35. package/dist/sdk/groups/index.js +0 -31
  36. package/dist/sdk/images/index.d.ts +0 -17
  37. package/dist/sdk/images/index.js +0 -35
  38. package/dist/sdk/index.d.ts +0 -1585
  39. package/dist/sdk/index.js +0 -69
  40. package/dist/sdk/listeners/index.d.ts +0 -28
  41. package/dist/sdk/listeners/index.js +0 -104
  42. package/dist/sdk/operations/index.d.ts +0 -199
  43. package/dist/sdk/operations/index.js +0 -133
  44. package/dist/sdk/pipelines/index.d.ts +0 -1189
  45. package/dist/sdk/pipelines/index.js +0 -208
  46. package/dist/sdk/pipelines/pipelines.d.ts +0 -0
  47. package/dist/sdk/pipelines/pipelines.js +0 -1
  48. package/dist/sdk/poses/index.d.ts +0 -20
  49. package/dist/sdk/poses/index.js +0 -24
  50. package/dist/sdk/stacks/index.d.ts +0 -29
  51. package/dist/sdk/stacks/index.js +0 -32
  52. package/dist/sdk/storage/index.d.ts +0 -18
  53. package/dist/sdk/storage/index.js +0 -27
  54. package/dist/sdk/transformers.d.ts +0 -7
  55. package/dist/sdk/transformers.js +0 -6
  56. package/dist/sdk/utils/index.d.ts +0 -10
  57. package/dist/sdk/utils/index.js +0 -6
  58. package/dist/sdk/videos/index.d.ts +0 -11
  59. package/dist/sdk/videos/index.js +0 -15
  60. package/dist/token/index.d.ts +0 -15
  61. package/dist/token/index.js +0 -65
  62. package/dist/types.d.ts +0 -15
  63. package/dist/types.js +0 -5
@@ -1,66 +0,0 @@
1
- /**
2
- * Hautech API
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Configuration } from './configuration';
13
- import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
- export declare const BASE_PATH: string;
15
- /**
16
- *
17
- * @export
18
- */
19
- export declare const COLLECTION_FORMATS: {
20
- csv: string;
21
- ssv: string;
22
- tsv: string;
23
- pipes: string;
24
- };
25
- /**
26
- *
27
- * @export
28
- * @interface RequestArgs
29
- */
30
- export interface RequestArgs {
31
- url: string;
32
- options: RawAxiosRequestConfig;
33
- }
34
- /**
35
- *
36
- * @export
37
- * @class BaseAPI
38
- */
39
- export declare class BaseAPI {
40
- protected basePath: string;
41
- protected axios: AxiosInstance;
42
- protected configuration: Configuration | undefined;
43
- constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
- }
45
- /**
46
- *
47
- * @export
48
- * @class RequiredError
49
- * @extends {Error}
50
- */
51
- export declare class RequiredError extends Error {
52
- field: string;
53
- constructor(field: string, msg?: string);
54
- }
55
- interface ServerMap {
56
- [key: string]: {
57
- url: string;
58
- description: string;
59
- }[];
60
- }
61
- /**
62
- *
63
- * @export
64
- */
65
- export declare const operationServerMap: ServerMap;
66
- export {};
@@ -1,59 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Hautech API
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import globalAxios from 'axios';
15
- export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
16
- /**
17
- *
18
- * @export
19
- */
20
- export const COLLECTION_FORMATS = {
21
- csv: ",",
22
- ssv: " ",
23
- tsv: "\t",
24
- pipes: "|",
25
- };
26
- /**
27
- *
28
- * @export
29
- * @class BaseAPI
30
- */
31
- export class BaseAPI {
32
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
33
- this.basePath = basePath;
34
- this.axios = axios;
35
- if (configuration) {
36
- this.configuration = configuration;
37
- this.basePath = configuration.basePath ?? basePath;
38
- }
39
- }
40
- }
41
- ;
42
- /**
43
- *
44
- * @export
45
- * @class RequiredError
46
- * @extends {Error}
47
- */
48
- export class RequiredError extends Error {
49
- constructor(field, msg) {
50
- super(msg);
51
- this.field = field;
52
- this.name = "RequiredError";
53
- }
54
- }
55
- /**
56
- *
57
- * @export
58
- */
59
- export const operationServerMap = {};
@@ -1,65 +0,0 @@
1
- /**
2
- * Hautech API
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Configuration } from "./configuration";
13
- import type { RequestArgs } from "./base";
14
- import type { AxiosInstance, AxiosResponse } from 'axios';
15
- /**
16
- *
17
- * @export
18
- */
19
- export declare const DUMMY_BASE_URL = "https://example.com";
20
- /**
21
- *
22
- * @throws {RequiredError}
23
- * @export
24
- */
25
- export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
26
- /**
27
- *
28
- * @export
29
- */
30
- export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
31
- /**
32
- *
33
- * @export
34
- */
35
- export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
36
- /**
37
- *
38
- * @export
39
- */
40
- export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
41
- /**
42
- *
43
- * @export
44
- */
45
- export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
46
- /**
47
- *
48
- * @export
49
- */
50
- export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
51
- /**
52
- *
53
- * @export
54
- */
55
- export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
56
- /**
57
- *
58
- * @export
59
- */
60
- export declare const toPathString: (url: URL) => string;
61
- /**
62
- *
63
- * @export
64
- */
65
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -1,133 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Hautech API
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- import { RequiredError } from "./base";
15
- /**
16
- *
17
- * @export
18
- */
19
- export const DUMMY_BASE_URL = 'https://example.com';
20
- /**
21
- *
22
- * @throws {RequiredError}
23
- * @export
24
- */
25
- export const assertParamExists = function (functionName, paramName, paramValue) {
26
- if (paramValue === null || paramValue === undefined) {
27
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
28
- }
29
- };
30
- /**
31
- *
32
- * @export
33
- */
34
- export const setApiKeyToObject = async function (object, keyParamName, configuration) {
35
- if (configuration && configuration.apiKey) {
36
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
37
- ? await configuration.apiKey(keyParamName)
38
- : await configuration.apiKey;
39
- object[keyParamName] = localVarApiKeyValue;
40
- }
41
- };
42
- /**
43
- *
44
- * @export
45
- */
46
- export const setBasicAuthToObject = function (object, configuration) {
47
- if (configuration && (configuration.username || configuration.password)) {
48
- object["auth"] = { username: configuration.username, password: configuration.password };
49
- }
50
- };
51
- /**
52
- *
53
- * @export
54
- */
55
- export const setBearerAuthToObject = async function (object, configuration) {
56
- if (configuration && configuration.accessToken) {
57
- const accessToken = typeof configuration.accessToken === 'function'
58
- ? await configuration.accessToken()
59
- : await configuration.accessToken;
60
- object["Authorization"] = "Bearer " + accessToken;
61
- }
62
- };
63
- /**
64
- *
65
- * @export
66
- */
67
- export const setOAuthToObject = async function (object, name, scopes, configuration) {
68
- if (configuration && configuration.accessToken) {
69
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
70
- ? await configuration.accessToken(name, scopes)
71
- : await configuration.accessToken;
72
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
73
- }
74
- };
75
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
76
- if (parameter == null)
77
- return;
78
- if (typeof parameter === "object") {
79
- if (Array.isArray(parameter)) {
80
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
81
- }
82
- else {
83
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
84
- }
85
- }
86
- else {
87
- if (urlSearchParams.has(key)) {
88
- urlSearchParams.append(key, parameter);
89
- }
90
- else {
91
- urlSearchParams.set(key, parameter);
92
- }
93
- }
94
- }
95
- /**
96
- *
97
- * @export
98
- */
99
- export const setSearchParams = function (url, ...objects) {
100
- const searchParams = new URLSearchParams(url.search);
101
- setFlattenedQueryParams(searchParams, objects);
102
- url.search = searchParams.toString();
103
- };
104
- /**
105
- *
106
- * @export
107
- */
108
- export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
109
- const nonString = typeof value !== 'string';
110
- const needsSerialization = nonString && configuration && configuration.isJsonMime
111
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
112
- : nonString;
113
- return needsSerialization
114
- ? JSON.stringify(value !== undefined ? value : {})
115
- : (value || "");
116
- };
117
- /**
118
- *
119
- * @export
120
- */
121
- export const toPathString = function (url) {
122
- return url.pathname + url.search + url.hash;
123
- };
124
- /**
125
- *
126
- * @export
127
- */
128
- export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
129
- return (axios = globalAxios, basePath = BASE_PATH) => {
130
- const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
131
- return axios.request(axiosRequestArgs);
132
- };
133
- };
@@ -1,91 +0,0 @@
1
- /**
2
- * Hautech API
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export interface ConfigurationParameters {
13
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
14
- username?: string;
15
- password?: string;
16
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
17
- basePath?: string;
18
- serverIndex?: number;
19
- baseOptions?: any;
20
- formDataCtor?: new () => any;
21
- }
22
- export declare class Configuration {
23
- /**
24
- * parameter for apiKey security
25
- * @param name security name
26
- * @memberof Configuration
27
- */
28
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
29
- /**
30
- * parameter for basic security
31
- *
32
- * @type {string}
33
- * @memberof Configuration
34
- */
35
- username?: string;
36
- /**
37
- * parameter for basic security
38
- *
39
- * @type {string}
40
- * @memberof Configuration
41
- */
42
- password?: string;
43
- /**
44
- * parameter for oauth2 security
45
- * @param name security name
46
- * @param scopes oauth2 scope
47
- * @memberof Configuration
48
- */
49
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
50
- /**
51
- * override base path
52
- *
53
- * @type {string}
54
- * @memberof Configuration
55
- */
56
- basePath?: string;
57
- /**
58
- * override server index
59
- *
60
- * @type {number}
61
- * @memberof Configuration
62
- */
63
- serverIndex?: number;
64
- /**
65
- * base options for axios calls
66
- *
67
- * @type {any}
68
- * @memberof Configuration
69
- */
70
- baseOptions?: any;
71
- /**
72
- * The FormData constructor that will be used to create multipart form data
73
- * requests. You can inject this here so that execution environments that
74
- * do not support the FormData class can still run the generated client.
75
- *
76
- * @type {new () => FormData}
77
- */
78
- formDataCtor?: new () => any;
79
- constructor(param?: ConfigurationParameters);
80
- /**
81
- * Check if the given MIME is a JSON MIME.
82
- * JSON MIME examples:
83
- * application/json
84
- * application/json; charset=UTF8
85
- * APPLICATION/JSON
86
- * application/vnd.company+json
87
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
88
- * @return True if the given MIME is JSON, false otherwise.
89
- */
90
- isJsonMime(mime: string): boolean;
91
- }
@@ -1,39 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Hautech API
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- export class Configuration {
15
- constructor(param = {}) {
16
- this.apiKey = param.apiKey;
17
- this.username = param.username;
18
- this.password = param.password;
19
- this.accessToken = param.accessToken;
20
- this.basePath = param.basePath;
21
- this.serverIndex = param.serverIndex;
22
- this.baseOptions = param.baseOptions;
23
- this.formDataCtor = param.formDataCtor;
24
- }
25
- /**
26
- * Check if the given MIME is a JSON MIME.
27
- * JSON MIME examples:
28
- * application/json
29
- * application/json; charset=UTF8
30
- * APPLICATION/JSON
31
- * application/vnd.company+json
32
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
33
- * @return True if the given MIME is JSON, false otherwise.
34
- */
35
- isJsonMime(mime) {
36
- const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
37
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
38
- }
39
- }
@@ -1,13 +0,0 @@
1
- /**
2
- * Hautech API
3
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
- *
5
- * The version of the OpenAPI document: 1.0
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export * from "./api";
13
- export * from "./configuration";
@@ -1,15 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Hautech API
5
- * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- *
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
- export * from "./api";
15
- export * from "./configuration";
@@ -1,94 +0,0 @@
1
- export type MethodsPermissions = {
2
- accounts: {
3
- create: boolean;
4
- read: boolean;
5
- list: boolean;
6
- };
7
- balances: {
8
- read: boolean;
9
- update: boolean;
10
- self: {
11
- read: boolean;
12
- update: boolean;
13
- };
14
- };
15
- collections: {
16
- create: boolean;
17
- read: boolean;
18
- items: {
19
- add: boolean;
20
- read: boolean;
21
- remove: boolean;
22
- };
23
- metadata: {
24
- update: boolean;
25
- };
26
- };
27
- groups: {
28
- create: boolean;
29
- read: boolean;
30
- delete: boolean;
31
- accounts: {
32
- add: boolean;
33
- remove: boolean;
34
- read: boolean;
35
- };
36
- };
37
- images: {
38
- create: boolean;
39
- read: boolean;
40
- };
41
- videos: {
42
- read: boolean;
43
- };
44
- operations: {
45
- create: boolean;
46
- read: boolean;
47
- metadata: {
48
- update: boolean;
49
- };
50
- };
51
- pipelines: {
52
- create: boolean;
53
- read: boolean;
54
- };
55
- poses: {
56
- create: boolean;
57
- read: boolean;
58
- update: boolean;
59
- metadata: {
60
- update: boolean;
61
- };
62
- };
63
- stacks: {
64
- create: boolean;
65
- read: boolean;
66
- items: {
67
- add: boolean;
68
- remove: boolean;
69
- };
70
- metadata: {
71
- update: boolean;
72
- };
73
- };
74
- resources: {
75
- access: {
76
- list: boolean;
77
- read: boolean;
78
- grant: boolean;
79
- revoke: boolean;
80
- attach: boolean;
81
- detach: boolean;
82
- };
83
- };
84
- storage: {
85
- create: boolean;
86
- delete: boolean;
87
- read: boolean;
88
- update: boolean;
89
- };
90
- websocket: {
91
- connect: boolean;
92
- subscribe: boolean;
93
- };
94
- };
@@ -1 +0,0 @@
1
- export {};
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './sdk';
2
- export * from './token';
3
- export * from './types';
package/dist/index.js DELETED
@@ -1,3 +0,0 @@
1
- export * from './sdk';
2
- export * from './token';
3
- export * from './types';
@@ -1,20 +0,0 @@
1
- import { AttachAccessControllerParamsDto, DetachAccessControllerParamsDto, GrantAccessControllerParams, ListAccessControllerDto, RevokeAccessControllerParamsDto } from '../../autogenerated';
2
- import { SDKOptions } from '../../types';
3
- declare const resources: (options: SDKOptions) => {
4
- attach: (props: AttachAccessControllerParamsDto & {
5
- id: string;
6
- }) => Promise<void>;
7
- detach: (props: DetachAccessControllerParamsDto & {
8
- id: string;
9
- }) => Promise<void>;
10
- grant: (props: GrantAccessControllerParams & {
11
- id: string;
12
- }) => Promise<void>;
13
- revoke: (props: RevokeAccessControllerParamsDto & {
14
- id: string;
15
- }) => Promise<void>;
16
- list: (props: {
17
- id: string;
18
- }) => Promise<ListAccessControllerDto>;
19
- };
20
- export default resources;
@@ -1,23 +0,0 @@
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
- detach: async (props) => api.call({
10
- run: (methods) => methods.accessControllerDetachAccessV1(props.id, props),
11
- }),
12
- grant: async (props) => api.call({
13
- run: (methods) => methods.accessControllerGrantAccessV1(props.id, props),
14
- }),
15
- revoke: async (props) => api.call({
16
- run: (methods) => methods.accessControllerRevokeAccessV1(props.id, props),
17
- }),
18
- list: async (props) => api.call({
19
- run: (methods) => methods.accessControllerAccessV1(props.id),
20
- }),
21
- };
22
- };
23
- export default resources;
@@ -1,16 +0,0 @@
1
- import { AccountEntity, ListAccountsParamsDto } from '../../autogenerated';
2
- import { ListResponse, SDKOptions } from '../../types';
3
- declare const accounts: (options: SDKOptions) => {
4
- create: (props?: {
5
- alias?: string;
6
- }) => Promise<AccountEntity>;
7
- get: (props: {
8
- id: string;
9
- }) => Promise<AccountEntity | undefined>;
10
- self: () => Promise<AccountEntity | undefined>;
11
- getByAlias: (props: {
12
- alias: string;
13
- }) => Promise<AccountEntity | undefined>;
14
- list: (props?: ListAccountsParamsDto) => Promise<ListResponse<AccountEntity>>;
15
- };
16
- export default accounts;
@@ -1,25 +0,0 @@
1
- import { AccountsApi } from '../../autogenerated';
2
- import { useAutogeneratedAPI } from '../api';
3
- import { transformToListResponse } from '../transformers';
4
- const accounts = (options) => {
5
- const api = useAutogeneratedAPI({ API: AccountsApi, options });
6
- return {
7
- create: async (props = {}) => api.call({
8
- run: (methods) => methods.accountsControllerCreateAccountV1({ alias: props.alias }),
9
- }),
10
- get: async (props) => api.callWithReturningUndefinedOn404({
11
- run: (methods) => methods.accountsControllerGetAccountV1(props.id),
12
- }),
13
- self: async () => api.callWithReturningUndefinedOn404({
14
- run: (methods) => methods.accountsControllerGetSelfV1(),
15
- }),
16
- getByAlias: async (props) => api.callWithReturningUndefinedOn404({
17
- run: (methods) => methods.accountsControllerGetAccountByAliasV1(props.alias),
18
- }),
19
- list: async (props = {}) => api.call({
20
- run: (methods) => methods.accountsControllerListAccountsV1(props.orderBy, props.limit, props.cursor),
21
- transform: transformToListResponse,
22
- }),
23
- };
24
- };
25
- export default accounts;