@hautechai/sdk 0.0.1 → 0.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.
@@ -3,13 +3,13 @@ export declare const createSDK: (options: SDKOptions) => {
3
3
  accounts: {
4
4
  create: (props?: {
5
5
  alias?: string;
6
- }) => Promise<import("../autogenerated").AccountEntity>;
6
+ }) => Promise<import("../types").AccountEntity>;
7
7
  get: (props: {
8
8
  id: string;
9
- }) => Promise<import("../autogenerated").AccountEntity | undefined>;
9
+ }) => Promise<import("../types").AccountEntity | undefined>;
10
10
  getByAlias: (props: {
11
11
  alias: string;
12
- }) => Promise<import("../autogenerated").AccountEntity | undefined>;
12
+ }) => Promise<import("../types").AccountEntity | undefined>;
13
13
  };
14
14
  balances: {
15
15
  add: (props: {
@@ -24,10 +24,10 @@ export declare const createSDK: (options: SDKOptions) => {
24
24
  collections: {
25
25
  create: (props?: {
26
26
  metadata?: any;
27
- }) => Promise<import("../autogenerated").CollectionEntity>;
27
+ }) => Promise<import("../types").CollectionEntity>;
28
28
  get: (props: {
29
29
  id: string;
30
- }) => Promise<import("../autogenerated").CollectionEntity | undefined>;
30
+ }) => Promise<import("../types").CollectionEntity | undefined>;
31
31
  items: {
32
32
  add: (props: {
33
33
  collectionId: string;
@@ -45,7 +45,7 @@ export declare const createSDK: (options: SDKOptions) => {
45
45
  updateMetadata: (props: {
46
46
  id: string;
47
47
  metadata?: any;
48
- }) => Promise<import("../autogenerated").ResourceEntity>;
48
+ }) => Promise<import("../types").ResourceEntity>;
49
49
  };
50
50
  groups: {
51
51
  accounts: {
@@ -60,60 +60,88 @@ export declare const createSDK: (options: SDKOptions) => {
60
60
  role: import("../autogenerated").RemoveAccountFromGroupControllerParamsDtoRoleEnum;
61
61
  }) => Promise<void>;
62
62
  };
63
- create: () => Promise<import("../autogenerated").GroupEntity>;
63
+ create: () => Promise<import("../types").GroupEntity>;
64
64
  delete: (props: {
65
65
  id: string;
66
66
  }) => Promise<void>;
67
67
  get: (props: {
68
68
  id: string;
69
- }) => Promise<import("../autogenerated").GroupEntity | undefined>;
69
+ }) => Promise<import("../types").GroupEntity | undefined>;
70
70
  };
71
71
  images: {
72
72
  createFromFile: (props: {
73
73
  file: any;
74
- }) => Promise<import("../autogenerated").ImageEntity>;
74
+ }) => Promise<import("../types").ImageEntity>;
75
75
  createFromUrl: (props: {
76
76
  url: string;
77
- }) => Promise<import("../autogenerated").ImageEntity>;
77
+ }) => Promise<import("../types").ImageEntity>;
78
78
  get: (props: {
79
79
  id: string;
80
- }) => Promise<import("../autogenerated").ImageEntity | undefined>;
80
+ }) => Promise<import("../types").ImageEntity | undefined>;
81
81
  getUrls: (props: {
82
82
  ids: string[];
83
83
  }) => Promise<Record<string, string>>;
84
84
  };
85
85
  operations: {
86
86
  create: {
87
+ detect: {
88
+ v1: (props: {
89
+ input: import("../autogenerated").ObjectDetectionV1Input;
90
+ metadata?: any;
91
+ }) => Promise<import("../types").OperationEntity>;
92
+ };
87
93
  generate: {
88
94
  v1: (props: {
95
+ input: import("../autogenerated").GenerateV1Input;
96
+ metadata?: any;
97
+ }) => Promise<import("../types").OperationEntity>;
98
+ v3: (props: {
89
99
  input: import("../autogenerated").GenerateV3Input;
90
100
  metadata?: any;
91
- }) => Promise<import("../autogenerated").OperationEntity>;
101
+ }) => Promise<import("../types").OperationEntity>;
102
+ };
103
+ gpt: {
104
+ v1: (props: {
105
+ input: import("../autogenerated").GPTV1Input;
106
+ metadata?: any;
107
+ }) => Promise<import("../types").OperationEntity>;
108
+ };
109
+ imagine: {
110
+ v1: (props: {
111
+ input: import("../autogenerated").InpaintV1Input;
112
+ metadata?: any;
113
+ }) => Promise<import("../types").OperationEntity>;
92
114
  };
93
115
  inpaint: {
94
116
  v1: (props: {
95
117
  input: import("../autogenerated").InpaintV1Input;
96
118
  metadata?: any;
97
- }) => Promise<import("../autogenerated").OperationEntity>;
119
+ }) => Promise<import("../types").OperationEntity>;
120
+ };
121
+ upscale: {
122
+ v1: (props: {
123
+ input: import("../autogenerated").UpscaleV1Input;
124
+ metadata?: any;
125
+ }) => Promise<import("../types").OperationEntity>;
98
126
  };
99
127
  };
100
128
  get: (props: {
101
129
  id: string;
102
- }) => Promise<import("../autogenerated").OperationEntity | undefined>;
130
+ }) => Promise<import("../types").OperationEntity | undefined>;
103
131
  getMany: (props: {
104
132
  ids: string[];
105
- }) => Promise<import("../autogenerated").OperationEntity[]>;
133
+ }) => Promise<import("../types").OperationEntity[]>;
106
134
  list: (props?: import("../types").ListProps) => Promise<import("../autogenerated").ListOperationsDto>;
107
135
  updateMetadata: (props: {
108
136
  id: string;
109
137
  metadata?: any;
110
- }) => Promise<import("../autogenerated").ResourceEntity>;
138
+ }) => Promise<import("../types").ResourceEntity>;
111
139
  updates: {
112
140
  subscribe: (props: {
113
- callback: (operation: import("../autogenerated").OperationEntity) => void;
141
+ callback: (operation: import("../types").OperationEntity) => void;
114
142
  }) => void;
115
143
  unsubscribe: (props: {
116
- callback: (operation: import("../autogenerated").OperationEntity) => void;
144
+ callback: (operation: import("../types").OperationEntity) => void;
117
145
  }) => void;
118
146
  };
119
147
  wait: (props: {
@@ -124,10 +152,10 @@ export declare const createSDK: (options: SDKOptions) => {
124
152
  stacks: {
125
153
  create: (props?: {
126
154
  metadata?: any;
127
- }) => Promise<import("../autogenerated").StackEntity>;
155
+ }) => Promise<import("../types").StackEntity>;
128
156
  get: (props: {
129
157
  id: string;
130
- }) => Promise<import("../autogenerated").StackEntity | undefined>;
158
+ }) => Promise<import("../types").StackEntity | undefined>;
131
159
  list: (props?: import("../types").ListProps) => Promise<import("../autogenerated").ListStacksDto>;
132
160
  operations: {
133
161
  add: (props: {
@@ -137,12 +165,12 @@ export declare const createSDK: (options: SDKOptions) => {
137
165
  remove: (props: {
138
166
  operationIds: string[];
139
167
  stackId: string;
140
- }) => Promise<import("../autogenerated").StackEntity>;
168
+ }) => Promise<import("../types").StackEntity>;
141
169
  };
142
170
  updateMetadata: (props: {
143
171
  id: string;
144
172
  metadata?: any;
145
- }) => Promise<import("../autogenerated").ResourceEntity>;
173
+ }) => Promise<import("../types").ResourceEntity>;
146
174
  };
147
175
  storage: {
148
176
  create: (props: {
@@ -1,37 +1,65 @@
1
1
  import { SDKOptions, ListProps } from '../../types';
2
- import { GenerateV3Input, InpaintV1Input } from '../../autogenerated';
2
+ import { GenerateV1Input, GenerateV3Input, GPTV1Input, InpaintV1Input, ObjectDetectionV1Input, UpscaleV1Input } from '../../autogenerated';
3
3
  declare const operations: (options: SDKOptions) => {
4
4
  create: {
5
+ detect: {
6
+ v1: (props: {
7
+ input: ObjectDetectionV1Input;
8
+ metadata?: any;
9
+ }) => Promise<import("../../types").OperationEntity>;
10
+ };
5
11
  generate: {
6
12
  v1: (props: {
13
+ input: GenerateV1Input;
14
+ metadata?: any;
15
+ }) => Promise<import("../../types").OperationEntity>;
16
+ v3: (props: {
7
17
  input: GenerateV3Input;
8
18
  metadata?: any;
9
- }) => Promise<import("../../autogenerated").OperationEntity>;
19
+ }) => Promise<import("../../types").OperationEntity>;
20
+ };
21
+ gpt: {
22
+ v1: (props: {
23
+ input: GPTV1Input;
24
+ metadata?: any;
25
+ }) => Promise<import("../../types").OperationEntity>;
26
+ };
27
+ imagine: {
28
+ v1: (props: {
29
+ input: InpaintV1Input;
30
+ metadata?: any;
31
+ }) => Promise<import("../../types").OperationEntity>;
10
32
  };
11
33
  inpaint: {
12
34
  v1: (props: {
13
35
  input: InpaintV1Input;
14
36
  metadata?: any;
15
- }) => Promise<import("../../autogenerated").OperationEntity>;
37
+ }) => Promise<import("../../types").OperationEntity>;
38
+ };
39
+ upscale: {
40
+ v1: (props: {
41
+ input: UpscaleV1Input;
42
+ metadata?: any;
43
+ }) => Promise<import("../../types").OperationEntity>;
16
44
  };
17
45
  };
18
46
  get: (props: {
19
47
  id: string;
20
- }) => Promise<import("../../autogenerated").OperationEntity | undefined>;
48
+ }) => Promise<import("../../types").OperationEntity | undefined>;
21
49
  getMany: (props: {
22
50
  ids: string[];
23
- }) => Promise<import("../../autogenerated").OperationEntity[]>;
51
+ }) => Promise<import("../../types").OperationEntity[]>;
24
52
  list: (props?: ListProps) => Promise<import("../../autogenerated").ListOperationsDto>;
25
53
  updateMetadata: (props: {
26
54
  id: string;
27
55
  metadata?: any;
28
- }) => Promise<import("../../autogenerated").ResourceEntity>;
56
+ }) => Promise<import("../../types").ResourceEntity>;
29
57
  updates: {
30
58
  subscribe: (props: {
31
- callback: (operation: import("../../autogenerated").OperationEntity) => void;
59
+ callback: (operation: import("../../types").OperationEntity) => void;
32
60
  }) => void;
33
61
  unsubscribe: (props: {
34
- callback: (operation: import("../../autogenerated").OperationEntity) => void;
62
+ callback: (operation: import("../../types").OperationEntity) => void;
35
63
  }) => void;
36
64
  };
37
65
  wait: (props: {
@@ -1,19 +1,49 @@
1
1
  import createOperationUpdater from './updater';
2
- import { OperationsApi } from '../../autogenerated';
2
+ import { OperationsApi, } from '../../autogenerated';
3
3
  import { useAutogeneratedAPI } from '../api';
4
4
  const operations = (options) => {
5
5
  const api = useAutogeneratedAPI({ API: OperationsApi, options });
6
6
  const updates = createOperationUpdater(options);
7
7
  return {
8
8
  create: {
9
+ detect: {
10
+ v1: (props) => api.call({
11
+ run: (methods) => methods.operationsControllerRunObjectDetectionV1V1({
12
+ input: props.input,
13
+ metadata: props.metadata,
14
+ }),
15
+ }),
16
+ },
9
17
  generate: {
10
18
  v1: (props) => api.call({
19
+ run: (methods) => methods.operationsControllerRunGenerateV1V1({
20
+ input: props.input,
21
+ metadata: props.metadata,
22
+ }),
23
+ }),
24
+ v3: (props) => api.call({
11
25
  run: (methods) => methods.operationsControllerRunGenerateV3V1({
12
26
  input: props.input,
13
27
  metadata: props.metadata,
14
28
  }),
15
29
  }),
16
30
  },
31
+ gpt: {
32
+ v1: (props) => api.call({
33
+ run: (methods) => methods.operationsControllerRunGptV1V1({
34
+ input: props.input,
35
+ metadata: props.metadata,
36
+ }),
37
+ }),
38
+ },
39
+ imagine: {
40
+ v1: (props) => api.call({
41
+ run: (methods) => methods.operationsControllerRunImagineV1V1({
42
+ input: props.input,
43
+ metadata: props.metadata,
44
+ }),
45
+ }),
46
+ },
17
47
  inpaint: {
18
48
  v1: (props) => api.call({
19
49
  run: (methods) => methods.operationsControllerRunInpaintV1V1({
@@ -22,6 +52,14 @@ const operations = (options) => {
22
52
  }),
23
53
  }),
24
54
  },
55
+ upscale: {
56
+ v1: (props) => api.call({
57
+ run: (methods) => methods.operationsControllerRunUpscaleV1V1({
58
+ input: props.input,
59
+ metadata: props.metadata,
60
+ }),
61
+ }),
62
+ },
25
63
  },
26
64
  get: (props) => api.callWithReturningUndefinedOn404({
27
65
  run: (methods) => methods.operationsControllerGetOperationV1(props.id),
@@ -2,10 +2,10 @@ import { SDKOptions, ListProps } from '../../types';
2
2
  declare const stacks: (options: SDKOptions) => {
3
3
  create: (props?: {
4
4
  metadata?: any;
5
- }) => Promise<import("../../autogenerated").StackEntity>;
5
+ }) => Promise<import("../../types").StackEntity>;
6
6
  get: (props: {
7
7
  id: string;
8
- }) => Promise<import("../../autogenerated").StackEntity | undefined>;
8
+ }) => Promise<import("../../types").StackEntity | undefined>;
9
9
  list: (props?: ListProps) => Promise<import("../../autogenerated").ListStacksDto>;
10
10
  operations: {
11
11
  add: (props: {
@@ -15,11 +15,11 @@ declare const stacks: (options: SDKOptions) => {
15
15
  remove: (props: {
16
16
  operationIds: string[];
17
17
  stackId: string;
18
- }) => Promise<import("../../autogenerated").StackEntity>;
18
+ }) => Promise<import("../../types").StackEntity>;
19
19
  };
20
20
  updateMetadata: (props: {
21
21
  id: string;
22
22
  metadata?: any;
23
- }) => Promise<import("../../autogenerated").ResourceEntity>;
23
+ }) => Promise<import("../../types").ResourceEntity>;
24
24
  };
25
25
  export default stacks;
package/dist/types.d.ts CHANGED
@@ -51,4 +51,4 @@ export interface MethodsPermissions {
51
51
  };
52
52
  storage: Create & Delete & Read & Update;
53
53
  }
54
- export {};
54
+ export { AccountEntity, CollectionEntity, GroupEntity, ImageEntity, OperationEntity, PipelineEntity, ResourceEntity, StackEntity, StorageEntity, } from './autogenerated/api';
package/dist/types.js CHANGED
@@ -1,4 +1,2 @@
1
1
  export {};
2
2
  // ------------------------------------------------------------
3
- // METHODS PERMISSIONS END
4
- // ------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hautechai/sdk",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "license": "MIT",
5
5
  "keywords": [],
6
6
  "repository": {