@hautechai/sdk 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/sdk/accounts/index.d.ts +4 -3
- package/dist/sdk/collections/index.d.ts +7 -7
- package/dist/sdk/collections/index.js +4 -1
- package/dist/sdk/groups/index.d.ts +3 -3
- package/dist/sdk/images/index.d.ts +4 -3
- package/dist/sdk/index.d.ts +9 -9
- package/dist/sdk/operations/index.d.ts +4 -4
- package/dist/sdk/operations/index.js +2 -0
- package/dist/sdk/stacks/index.d.ts +7 -6
- package/dist/sdk/stacks/index.js +2 -0
- package/dist/sdk/transformers.d.ts +7 -0
- package/dist/sdk/transformers.js +6 -0
- package/dist/types.d.ts +3 -0
- package/dist/types.js +2 -1
- package/package.json +1 -1
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { AccountEntity } from '../../autogenerated';
|
|
1
2
|
import { SDKOptions } from '../../types';
|
|
2
3
|
declare const accounts: (options: SDKOptions) => {
|
|
3
4
|
create: (props?: {
|
|
4
5
|
alias?: string;
|
|
5
|
-
}) => Promise<
|
|
6
|
+
}) => Promise<AccountEntity>;
|
|
6
7
|
get: (props: {
|
|
7
8
|
id: string;
|
|
8
|
-
}) => Promise<
|
|
9
|
+
}) => Promise<AccountEntity | undefined>;
|
|
9
10
|
getByAlias: (props: {
|
|
10
11
|
alias: string;
|
|
11
|
-
}) => Promise<
|
|
12
|
+
}) => Promise<AccountEntity | undefined>;
|
|
12
13
|
};
|
|
13
14
|
export default accounts;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { SDKOptions, ListProps } from '../../types';
|
|
2
|
-
import { CollectionsControllerListItemsV1KindEnum } from '../../autogenerated';
|
|
1
|
+
import { SDKOptions, ListProps, ListResponse } from '../../types';
|
|
2
|
+
import { CollectionEntity, CollectionsControllerListItemsV1KindEnum, ResourceEntity } from '../../autogenerated';
|
|
3
3
|
declare const collections: (options: SDKOptions) => {
|
|
4
4
|
create: (props?: {
|
|
5
5
|
metadata?: any;
|
|
6
|
-
}) => Promise<
|
|
6
|
+
}) => Promise<CollectionEntity>;
|
|
7
7
|
get: (props: {
|
|
8
8
|
id: string;
|
|
9
|
-
}) => Promise<
|
|
9
|
+
}) => Promise<CollectionEntity | undefined>;
|
|
10
10
|
items: {
|
|
11
11
|
add: (props: {
|
|
12
12
|
collectionId: string;
|
|
@@ -15,16 +15,16 @@ declare const collections: (options: SDKOptions) => {
|
|
|
15
15
|
list: (props: {
|
|
16
16
|
collectionId: string;
|
|
17
17
|
kind?: CollectionsControllerListItemsV1KindEnum;
|
|
18
|
-
} & ListProps) => Promise<
|
|
18
|
+
} & ListProps) => Promise<ListResponse<ResourceEntity>>;
|
|
19
19
|
remove: (props: {
|
|
20
20
|
collectionId: string;
|
|
21
21
|
itemIds: string[];
|
|
22
22
|
}) => Promise<void>;
|
|
23
23
|
};
|
|
24
|
-
list: (props?: ListProps) => Promise<
|
|
24
|
+
list: (props?: ListProps) => Promise<ListResponse<CollectionEntity>>;
|
|
25
25
|
updateMetadata: (props: {
|
|
26
26
|
id: string;
|
|
27
27
|
metadata?: any;
|
|
28
|
-
}) => Promise<
|
|
28
|
+
}) => Promise<void>;
|
|
29
29
|
};
|
|
30
30
|
export default collections;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { CollectionsApi } from '../../autogenerated';
|
|
1
|
+
import { CollectionsApi, } from '../../autogenerated';
|
|
2
2
|
import { useAutogeneratedAPI } from '../api';
|
|
3
|
+
import { transformToListResponse } from '../transformers';
|
|
3
4
|
const collections = (options) => {
|
|
4
5
|
const api = useAutogeneratedAPI({ API: CollectionsApi, options });
|
|
5
6
|
return {
|
|
@@ -15,6 +16,7 @@ const collections = (options) => {
|
|
|
15
16
|
}),
|
|
16
17
|
list: async (props) => api.call({
|
|
17
18
|
run: (methods) => methods.collectionsControllerListItemsV1(props.collectionId, props.cursor, props.orderBy, props.limit, props.kind),
|
|
19
|
+
transform: transformToListResponse,
|
|
18
20
|
}),
|
|
19
21
|
remove: async (props) => api.call({
|
|
20
22
|
run: (methods) => methods.collectionsControllerRemoveItemsV1(props.collectionId, { itemIds: props.itemIds }),
|
|
@@ -22,6 +24,7 @@ const collections = (options) => {
|
|
|
22
24
|
},
|
|
23
25
|
list: async (props = {}) => api.call({
|
|
24
26
|
run: (methods) => methods.collectionsControllerListCollectionsV1(props.orderBy, props.limit, props.cursor),
|
|
27
|
+
transform: transformToListResponse,
|
|
25
28
|
}),
|
|
26
29
|
updateMetadata: async (props) => api.call({
|
|
27
30
|
run: (methods) => methods.collectionsControllerUpdateMetadataV1(props.id, { overwrite: props.metadata }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDKOptions } from '../../types';
|
|
2
|
-
import { AddAccountToGroupControllerParamsDtoRoleEnum, RemoveAccountFromGroupControllerParamsDtoRoleEnum } from '../../autogenerated';
|
|
2
|
+
import { AddAccountToGroupControllerParamsDtoRoleEnum, GroupEntity, RemoveAccountFromGroupControllerParamsDtoRoleEnum } from '../../autogenerated';
|
|
3
3
|
declare const groups: (options: SDKOptions) => {
|
|
4
4
|
accounts: {
|
|
5
5
|
add: (props: {
|
|
@@ -13,12 +13,12 @@ declare const groups: (options: SDKOptions) => {
|
|
|
13
13
|
role: RemoveAccountFromGroupControllerParamsDtoRoleEnum;
|
|
14
14
|
}) => Promise<void>;
|
|
15
15
|
};
|
|
16
|
-
create: () => Promise<
|
|
16
|
+
create: () => Promise<GroupEntity>;
|
|
17
17
|
delete: (props: {
|
|
18
18
|
id: string;
|
|
19
19
|
}) => Promise<void>;
|
|
20
20
|
get: (props: {
|
|
21
21
|
id: string;
|
|
22
|
-
}) => Promise<
|
|
22
|
+
}) => Promise<GroupEntity | undefined>;
|
|
23
23
|
};
|
|
24
24
|
export default groups;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { SDKOptions } from '../../types';
|
|
2
|
+
import { ImageEntity } from '../../autogenerated';
|
|
2
3
|
declare const images: (options: SDKOptions) => {
|
|
3
4
|
createFromFile: (props: {
|
|
4
5
|
file: any;
|
|
5
|
-
}) => Promise<
|
|
6
|
+
}) => Promise<ImageEntity>;
|
|
6
7
|
createFromUrl: (props: {
|
|
7
8
|
url: string;
|
|
8
|
-
}) => Promise<
|
|
9
|
+
}) => Promise<ImageEntity>;
|
|
9
10
|
get: (props: {
|
|
10
11
|
id: string;
|
|
11
|
-
}) => Promise<
|
|
12
|
+
}) => Promise<ImageEntity | undefined>;
|
|
12
13
|
getUrls: (props: {
|
|
13
14
|
ids: string[];
|
|
14
15
|
}) => Promise<Record<string, string>>;
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -36,17 +36,17 @@ export declare const createSDK: (options: SDKOptions) => {
|
|
|
36
36
|
list: (props: {
|
|
37
37
|
collectionId: string;
|
|
38
38
|
kind?: import("../autogenerated").CollectionsControllerListItemsV1KindEnum;
|
|
39
|
-
} & import("../types").ListProps) => Promise<import("../
|
|
39
|
+
} & import("../types").ListProps) => Promise<import("../types").ListResponse<import("../types").ResourceEntity>>;
|
|
40
40
|
remove: (props: {
|
|
41
41
|
collectionId: string;
|
|
42
42
|
itemIds: string[];
|
|
43
43
|
}) => Promise<void>;
|
|
44
44
|
};
|
|
45
|
-
list: (props?: import("../types").ListProps) => Promise<import("../
|
|
45
|
+
list: (props?: import("../types").ListProps) => Promise<import("../types").ListResponse<import("../types").CollectionEntity>>;
|
|
46
46
|
updateMetadata: (props: {
|
|
47
47
|
id: string;
|
|
48
48
|
metadata?: any;
|
|
49
|
-
}) => Promise<
|
|
49
|
+
}) => Promise<void>;
|
|
50
50
|
};
|
|
51
51
|
groups: {
|
|
52
52
|
accounts: {
|
|
@@ -144,11 +144,11 @@ export declare const createSDK: (options: SDKOptions) => {
|
|
|
144
144
|
getMany: (props: {
|
|
145
145
|
ids: string[];
|
|
146
146
|
}) => Promise<import("../types").OperationEntity[]>;
|
|
147
|
-
list: (props?: import("../types").ListProps) => Promise<import("../
|
|
147
|
+
list: (props?: import("../types").ListProps) => Promise<import("../types").ListResponse<import("../types").OperationEntity>>;
|
|
148
148
|
updateMetadata: (props: {
|
|
149
149
|
id: string;
|
|
150
150
|
metadata?: any;
|
|
151
|
-
}) => Promise<
|
|
151
|
+
}) => Promise<void>;
|
|
152
152
|
updates: {
|
|
153
153
|
subscribe: (props: {
|
|
154
154
|
callback: (operation: import("../types").OperationEntity) => void;
|
|
@@ -160,7 +160,7 @@ export declare const createSDK: (options: SDKOptions) => {
|
|
|
160
160
|
wait: (props: {
|
|
161
161
|
id: string;
|
|
162
162
|
timeoutInSeconds?: number;
|
|
163
|
-
}) => Promise<
|
|
163
|
+
}) => Promise<import("../types").OperationEntity>;
|
|
164
164
|
};
|
|
165
165
|
stacks: {
|
|
166
166
|
create: (props?: {
|
|
@@ -169,7 +169,7 @@ export declare const createSDK: (options: SDKOptions) => {
|
|
|
169
169
|
get: (props: {
|
|
170
170
|
id: string;
|
|
171
171
|
}) => Promise<import("../types").StackEntity | undefined>;
|
|
172
|
-
list: (props?: import("../types").ListProps) => Promise<import("../
|
|
172
|
+
list: (props?: import("../types").ListProps) => Promise<import("../types").ListResponse<import("../types").StackEntity>>;
|
|
173
173
|
operations: {
|
|
174
174
|
add: (props: {
|
|
175
175
|
operationIds: string[];
|
|
@@ -178,12 +178,12 @@ export declare const createSDK: (options: SDKOptions) => {
|
|
|
178
178
|
remove: (props: {
|
|
179
179
|
operationIds: string[];
|
|
180
180
|
stackId: string;
|
|
181
|
-
}) => Promise<
|
|
181
|
+
}) => Promise<void>;
|
|
182
182
|
};
|
|
183
183
|
updateMetadata: (props: {
|
|
184
184
|
id: string;
|
|
185
185
|
metadata?: any;
|
|
186
|
-
}) => Promise<
|
|
186
|
+
}) => Promise<void>;
|
|
187
187
|
};
|
|
188
188
|
storage: {
|
|
189
189
|
create: (props: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GenerateV1Input, GenerateV3Input, GPTV1Input, ImagineV1Input, InpaintV1Input, ObjectDetectionV1Input, OperationEntity, PoseEstimationV1Input, SegmentAnythingEmbeddingsV1Input, UpscaleV1Input } from '../../autogenerated';
|
|
2
|
-
import { ListProps, SDKOptions } from '../../types';
|
|
2
|
+
import { ListProps, ListResponse, SDKOptions } from '../../types';
|
|
3
3
|
declare const operations: (options: SDKOptions) => {
|
|
4
4
|
create: {
|
|
5
5
|
detect: {
|
|
@@ -61,11 +61,11 @@ declare const operations: (options: SDKOptions) => {
|
|
|
61
61
|
getMany: (props: {
|
|
62
62
|
ids: string[];
|
|
63
63
|
}) => Promise<OperationEntity[]>;
|
|
64
|
-
list: (props?: ListProps) => Promise<
|
|
64
|
+
list: (props?: ListProps) => Promise<ListResponse<OperationEntity>>;
|
|
65
65
|
updateMetadata: (props: {
|
|
66
66
|
id: string;
|
|
67
67
|
metadata?: any;
|
|
68
|
-
}) => Promise<
|
|
68
|
+
}) => Promise<void>;
|
|
69
69
|
updates: {
|
|
70
70
|
subscribe: (props: {
|
|
71
71
|
callback: (operation: OperationEntity) => void;
|
|
@@ -77,6 +77,6 @@ declare const operations: (options: SDKOptions) => {
|
|
|
77
77
|
wait: (props: {
|
|
78
78
|
id: string;
|
|
79
79
|
timeoutInSeconds?: number;
|
|
80
|
-
}) => Promise<
|
|
80
|
+
}) => Promise<OperationEntity>;
|
|
81
81
|
};
|
|
82
82
|
export default operations;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import createOperationUpdater from './updater';
|
|
2
2
|
import { OperationsApi, } from '../../autogenerated';
|
|
3
3
|
import { useAutogeneratedAPI } from '../api';
|
|
4
|
+
import { transformToListResponse } from '../transformers';
|
|
4
5
|
const operations = (options) => {
|
|
5
6
|
const api = useAutogeneratedAPI({ API: OperationsApi, options });
|
|
6
7
|
const updates = createOperationUpdater(options);
|
|
@@ -41,6 +42,7 @@ const operations = (options) => {
|
|
|
41
42
|
}),
|
|
42
43
|
list: (props = {}) => api.call({
|
|
43
44
|
run: (methods) => methods.operationsControllerListOperationsV1(props.orderBy, props.limit, props.cursor),
|
|
45
|
+
transform: transformToListResponse,
|
|
44
46
|
}),
|
|
45
47
|
updateMetadata: async (props) => api.call({
|
|
46
48
|
run: (methods) => methods.operationsControllerUpdateMetadataV1(props.id, { overwrite: props.metadata }),
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { SDKOptions, ListProps } from '../../types';
|
|
1
|
+
import { SDKOptions, ListProps, ListResponse } from '../../types';
|
|
2
|
+
import { StackEntity } from '../../autogenerated';
|
|
2
3
|
declare const stacks: (options: SDKOptions) => {
|
|
3
4
|
create: (props?: {
|
|
4
5
|
metadata?: any;
|
|
5
|
-
}) => Promise<
|
|
6
|
+
}) => Promise<StackEntity>;
|
|
6
7
|
get: (props: {
|
|
7
8
|
id: string;
|
|
8
|
-
}) => Promise<
|
|
9
|
-
list: (props?: ListProps) => Promise<
|
|
9
|
+
}) => Promise<StackEntity | undefined>;
|
|
10
|
+
list: (props?: ListProps) => Promise<ListResponse<StackEntity>>;
|
|
10
11
|
operations: {
|
|
11
12
|
add: (props: {
|
|
12
13
|
operationIds: string[];
|
|
@@ -15,11 +16,11 @@ declare const stacks: (options: SDKOptions) => {
|
|
|
15
16
|
remove: (props: {
|
|
16
17
|
operationIds: string[];
|
|
17
18
|
stackId: string;
|
|
18
|
-
}) => Promise<
|
|
19
|
+
}) => Promise<void>;
|
|
19
20
|
};
|
|
20
21
|
updateMetadata: (props: {
|
|
21
22
|
id: string;
|
|
22
23
|
metadata?: any;
|
|
23
|
-
}) => Promise<
|
|
24
|
+
}) => Promise<void>;
|
|
24
25
|
};
|
|
25
26
|
export default stacks;
|
package/dist/sdk/stacks/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StacksApi } from '../../autogenerated';
|
|
2
2
|
import { useAutogeneratedAPI } from '../api';
|
|
3
|
+
import { transformToListResponse } from '../transformers';
|
|
3
4
|
const stacks = (options) => {
|
|
4
5
|
const api = useAutogeneratedAPI({ API: StacksApi, options });
|
|
5
6
|
return {
|
|
@@ -13,6 +14,7 @@ const stacks = (options) => {
|
|
|
13
14
|
}),
|
|
14
15
|
list: async (props = {}) => api.call({
|
|
15
16
|
run: (methods) => methods.stacksControllerListStacksV1(props.orderBy, props.limit, props.cursor),
|
|
17
|
+
transform: transformToListResponse,
|
|
16
18
|
}),
|
|
17
19
|
operations: {
|
|
18
20
|
add: async (props) => api.call({
|
package/dist/types.d.ts
CHANGED
package/dist/types.js
CHANGED