@hautechai/sdk 0.2.4 → 0.2.6
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/autogenerated/api.d.ts +475 -469
- package/dist/autogenerated/api.js +392 -392
- package/dist/sdk/api.js +3 -2
- package/dist/sdk/collections/index.d.ts +8 -5
- package/dist/sdk/collections/index.js +2 -2
- package/dist/sdk/errors/index.d.ts +3 -0
- package/dist/sdk/errors/index.js +6 -0
- package/dist/sdk/index.d.ts +164 -75
- package/dist/sdk/index.js +2 -0
- package/dist/sdk/listeners/index.js +5 -5
- package/dist/sdk/operations/index.d.ts +9 -6
- package/dist/sdk/pipelines/index.d.ts +102 -62
- package/dist/sdk/pipelines/index.js +10 -1
- package/dist/sdk/poses/index.d.ts +13 -0
- package/dist/sdk/poses/index.js +21 -0
- package/dist/sdk/stacks/index.d.ts +7 -4
- package/dist/sdk/stacks/index.js +1 -1
- package/dist/sdk/utils/index.d.ts +5 -0
- package/package.json +1 -1
- package/scripts/generate.sh +1 -1
- package/dist/sdk/exceptions/index.d.ts +0 -3
- package/dist/sdk/exceptions/index.js +0 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { client as WebSocketClient } from 'websocket';
|
|
2
|
-
import {
|
|
2
|
+
import { HautechError } from '../errors';
|
|
3
3
|
// This is pretty much a dirty solution until we need to rework this part.
|
|
4
4
|
export class OperationsListener {
|
|
5
5
|
constructor({ ws, operations, }) {
|
|
@@ -50,12 +50,12 @@ export class OperationsListener {
|
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
52
|
catch (err) {
|
|
53
|
-
throw new
|
|
53
|
+
throw new HautechError(`SDK failed to open websocket: ${err}`);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
onOpen() {
|
|
57
57
|
if (!this.connection)
|
|
58
|
-
throw new
|
|
58
|
+
throw new HautechError('Semantics error: this is a bug.');
|
|
59
59
|
this.connection.send(JSON.stringify({
|
|
60
60
|
event: 'subscribe',
|
|
61
61
|
data: {
|
|
@@ -65,7 +65,7 @@ export class OperationsListener {
|
|
|
65
65
|
}
|
|
66
66
|
onMessage(msg) {
|
|
67
67
|
if (!this.connection)
|
|
68
|
-
throw new
|
|
68
|
+
throw new HautechError('Semantics error: this is a bug.');
|
|
69
69
|
const { event, data } = JSON.parse(msg);
|
|
70
70
|
switch (event) {
|
|
71
71
|
case 'subscription:created':
|
|
@@ -78,7 +78,7 @@ export class OperationsListener {
|
|
|
78
78
|
}
|
|
79
79
|
onClose(number, reason) {
|
|
80
80
|
if (!this.connection)
|
|
81
|
-
throw new
|
|
81
|
+
throw new HautechError('Semantics error: this is a bug.');
|
|
82
82
|
// Reset dirty state.
|
|
83
83
|
this.operationsStore = {};
|
|
84
84
|
this.ws = null;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { CompositeV1Input, CompositeV1Response, CutV1Input, CutV1Response, GiseleVtonV1Input, GPTV1Input, GptV1Response, HauteLindaV1Response, HauteNaomiV1Response, ImagineKateV1Response, KateImagineV1Input, KateInpaintV1Input, LindaHauteV1Input, NaomiHauteV1Input, NegateImageV1Input, NegateImageV1Response, ObjectDetectionV1Input, ObjectDetectionV1Response, OperationEntity, OperationEntityStatusEnum, PoseEstimationV1Input, PoseEstimationV1Response, SegmentAnythingEmbeddingsV1Input, SegmentAnythingEmbeddingsV1Response, SegmentAnythingMaskV1Input, SegmentAnythingMaskV1Response, UpscaleV1Input, UpscaleV1Response, VtonGiseleV1Response } from '../../autogenerated';
|
|
2
2
|
import { ListProps, ListResponse, SDKOptions } from '../../types';
|
|
3
3
|
import { OperationsListener } from '../listeners';
|
|
4
|
-
|
|
4
|
+
import { AddMetadata } from '../utils';
|
|
5
|
+
import { OperationsMetadata } from '../index';
|
|
6
|
+
type OperationEntityWithMetadata = AddMetadata<OperationEntity, OperationsMetadata>;
|
|
7
|
+
type Waited<T extends OperationEntityWithMetadata> = T & ({
|
|
5
8
|
status: typeof OperationEntityStatusEnum.Failed;
|
|
6
9
|
output: null;
|
|
7
10
|
} | {
|
|
@@ -110,17 +113,17 @@ declare const operations: (options: SDKOptions, relevantOperations: OperationsLi
|
|
|
110
113
|
};
|
|
111
114
|
get: (props: {
|
|
112
115
|
id: string;
|
|
113
|
-
}) => Promise<
|
|
116
|
+
}) => Promise<OperationEntityWithMetadata | undefined>;
|
|
114
117
|
getMany: (props: {
|
|
115
118
|
ids: string[];
|
|
116
|
-
}) => Promise<
|
|
117
|
-
list: (props?: ListProps) => Promise<ListResponse<
|
|
119
|
+
}) => Promise<OperationEntityWithMetadata[]>;
|
|
120
|
+
list: (props?: ListProps) => Promise<ListResponse<OperationEntityWithMetadata>>;
|
|
118
121
|
updateMetadata: (props: {
|
|
119
122
|
id: string;
|
|
120
123
|
metadata?: any;
|
|
121
124
|
}) => Promise<void>;
|
|
122
|
-
wait: <T extends
|
|
125
|
+
wait: <T extends OperationEntityWithMetadata | {
|
|
123
126
|
id: string;
|
|
124
|
-
}, N extends number | undefined = undefined>(props: T, timeoutMs?: N) => Promise<Waited<T extends
|
|
127
|
+
}, N extends number | undefined = undefined>(props: T, timeoutMs?: N) => Promise<Waited<T extends OperationEntityWithMetadata ? T : OperationEntityWithMetadata> | (N extends undefined ? never : null)>;
|
|
125
128
|
};
|
|
126
129
|
export default operations;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { PipelineEntity } from '../../autogenerated';
|
|
1
|
+
import { PipelineEntity, PipelinesControllerListPipelinesV1OrderByEnum } from '../../autogenerated';
|
|
2
2
|
import { Pipeline } from '@hautechai/pipelines';
|
|
3
|
-
import { SDKOptions } from '../../types';
|
|
3
|
+
import { ListResponse, SDKOptions } from '../../types';
|
|
4
|
+
import { PipelinesMetadata } from '../index';
|
|
5
|
+
import { AddMetadata } from '../utils';
|
|
6
|
+
type PipelineEntityWithMetadata = AddMetadata<PipelineEntity, PipelinesMetadata>;
|
|
4
7
|
declare const pipelines: (options: SDKOptions) => {
|
|
5
8
|
constructTemplate: (consructPipeline: (pipeline: Pipeline<{
|
|
6
9
|
access: {
|
|
@@ -98,81 +101,81 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
98
101
|
run: {
|
|
99
102
|
haute: {
|
|
100
103
|
linda: {
|
|
101
|
-
v1: (params: import("../../autogenerated").
|
|
104
|
+
v1: (params: import("../../autogenerated").HauteLindaV1Request & {
|
|
102
105
|
__taskOutput__?: never;
|
|
103
106
|
}) => Promise<import("../../autogenerated").HauteLindaV1Response>;
|
|
104
107
|
};
|
|
105
108
|
naomi: {
|
|
106
|
-
v1: (params: import("../../autogenerated").
|
|
109
|
+
v1: (params: import("../../autogenerated").HauteNaomiV1Request & {
|
|
107
110
|
__taskOutput__?: never;
|
|
108
111
|
}) => Promise<import("../../autogenerated").HauteNaomiV1Response>;
|
|
109
112
|
};
|
|
110
113
|
};
|
|
111
114
|
inpaint: {
|
|
112
115
|
kate: {
|
|
113
|
-
v1: (params: import("../../autogenerated").
|
|
116
|
+
v1: (params: import("../../autogenerated").InpaintKateV1Request & {
|
|
114
117
|
__taskOutput__?: never;
|
|
115
118
|
}) => Promise<import("../../autogenerated").InpaintKateV1Response>;
|
|
116
119
|
};
|
|
117
120
|
};
|
|
118
121
|
gpt: {
|
|
119
|
-
v1: (params: import("../../autogenerated").
|
|
122
|
+
v1: (params: import("../../autogenerated").GptV1Request & {
|
|
120
123
|
__taskOutput__?: never;
|
|
121
124
|
}) => Promise<import("../../autogenerated").GptV1Response>;
|
|
122
125
|
};
|
|
123
126
|
imagine: {
|
|
124
127
|
kate: {
|
|
125
|
-
v1: (params: import("../../autogenerated").
|
|
128
|
+
v1: (params: import("../../autogenerated").ImagineKateV1Request & {
|
|
126
129
|
__taskOutput__?: never;
|
|
127
130
|
}) => Promise<import("../../autogenerated").ImagineKateV1Response>;
|
|
128
131
|
};
|
|
129
132
|
};
|
|
130
133
|
upscale: {
|
|
131
|
-
v1: (params: import("../../autogenerated").
|
|
134
|
+
v1: (params: import("../../autogenerated").UpscaleV1Request & {
|
|
132
135
|
__taskOutput__?: never;
|
|
133
136
|
}) => Promise<import("../../autogenerated").UpscaleV1Response>;
|
|
134
137
|
};
|
|
135
138
|
objectDetection: {
|
|
136
|
-
v1: (params: import("../../autogenerated").
|
|
139
|
+
v1: (params: import("../../autogenerated").ObjectDetectionV1Request & {
|
|
137
140
|
__taskOutput__?: never;
|
|
138
141
|
}) => Promise<import("../../autogenerated").ObjectDetectionV1Response>;
|
|
139
142
|
};
|
|
140
143
|
segmentAnything: {
|
|
141
144
|
embeddings: {
|
|
142
|
-
v1: (params: import("../../autogenerated").
|
|
145
|
+
v1: (params: import("../../autogenerated").SegmentAnythingEmbeddingsV1Request & {
|
|
143
146
|
__taskOutput__?: never;
|
|
144
147
|
}) => Promise<import("../../autogenerated").SegmentAnythingEmbeddingsV1Response>;
|
|
145
148
|
};
|
|
146
149
|
mask: {
|
|
147
|
-
v1: (params: import("../../autogenerated").
|
|
150
|
+
v1: (params: import("../../autogenerated").SegmentAnythingMaskV1Request & {
|
|
148
151
|
__taskOutput__?: never;
|
|
149
152
|
}) => Promise<import("../../autogenerated").SegmentAnythingMaskV1Response>;
|
|
150
153
|
};
|
|
151
154
|
};
|
|
152
155
|
poseEstimation: {
|
|
153
|
-
v1: (params: import("../../autogenerated").
|
|
156
|
+
v1: (params: import("../../autogenerated").PoseEstimationV1Request & {
|
|
154
157
|
__taskOutput__?: never;
|
|
155
158
|
}) => Promise<import("../../autogenerated").PoseEstimationV1Response>;
|
|
156
159
|
};
|
|
157
160
|
cut: {
|
|
158
|
-
v1: (params: import("../../autogenerated").
|
|
161
|
+
v1: (params: import("../../autogenerated").CutV1Request & {
|
|
159
162
|
__taskOutput__?: never;
|
|
160
163
|
}) => Promise<import("../../autogenerated").CutV1Response>;
|
|
161
164
|
};
|
|
162
165
|
composite: {
|
|
163
|
-
v1: (params: import("../../autogenerated").
|
|
166
|
+
v1: (params: import("../../autogenerated").CompositeV1Request & {
|
|
164
167
|
__taskOutput__?: never;
|
|
165
168
|
}) => Promise<import("../../autogenerated").CompositeV1Response>;
|
|
166
169
|
};
|
|
167
170
|
vton: {
|
|
168
171
|
gisele: {
|
|
169
|
-
v1: (params: import("../../autogenerated").
|
|
172
|
+
v1: (params: import("../../autogenerated").VtonGiseleV1Request & {
|
|
170
173
|
__taskOutput__?: never;
|
|
171
174
|
}) => Promise<import("../../autogenerated").VtonGiseleV1Response>;
|
|
172
175
|
};
|
|
173
176
|
};
|
|
174
177
|
negateImage: {
|
|
175
|
-
v1: (params: import("../../autogenerated").
|
|
178
|
+
v1: (params: import("../../autogenerated").NegateImageV1Request & {
|
|
176
179
|
__taskOutput__?: never;
|
|
177
180
|
}) => Promise<import("../../autogenerated").NegateImageV1Response>;
|
|
178
181
|
};
|
|
@@ -202,6 +205,14 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
202
205
|
updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto & {
|
|
203
206
|
__taskOutput__?: never;
|
|
204
207
|
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
208
|
+
items: {
|
|
209
|
+
add: (params: import("../../autogenerated").AddItemsToStackParamsDto & {
|
|
210
|
+
__taskOutput__?: never;
|
|
211
|
+
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
212
|
+
remove: (params: import("../../autogenerated").RemoveItemsFromStackParamsDto & {
|
|
213
|
+
__taskOutput__?: never;
|
|
214
|
+
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
215
|
+
};
|
|
205
216
|
};
|
|
206
217
|
storage: {
|
|
207
218
|
create: (params: import("../../autogenerated").CreateStorageRecordParamsDto & {
|
|
@@ -313,81 +324,81 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
313
324
|
run: {
|
|
314
325
|
haute: {
|
|
315
326
|
linda: {
|
|
316
|
-
v1: (params: import("../../autogenerated").
|
|
327
|
+
v1: (params: import("../../autogenerated").HauteLindaV1Request & {
|
|
317
328
|
__taskOutput__?: never;
|
|
318
329
|
}) => Promise<import("../../autogenerated").HauteLindaV1Response>;
|
|
319
330
|
};
|
|
320
331
|
naomi: {
|
|
321
|
-
v1: (params: import("../../autogenerated").
|
|
332
|
+
v1: (params: import("../../autogenerated").HauteNaomiV1Request & {
|
|
322
333
|
__taskOutput__?: never;
|
|
323
334
|
}) => Promise<import("../../autogenerated").HauteNaomiV1Response>;
|
|
324
335
|
};
|
|
325
336
|
};
|
|
326
337
|
inpaint: {
|
|
327
338
|
kate: {
|
|
328
|
-
v1: (params: import("../../autogenerated").
|
|
339
|
+
v1: (params: import("../../autogenerated").InpaintKateV1Request & {
|
|
329
340
|
__taskOutput__?: never;
|
|
330
341
|
}) => Promise<import("../../autogenerated").InpaintKateV1Response>;
|
|
331
342
|
};
|
|
332
343
|
};
|
|
333
344
|
gpt: {
|
|
334
|
-
v1: (params: import("../../autogenerated").
|
|
345
|
+
v1: (params: import("../../autogenerated").GptV1Request & {
|
|
335
346
|
__taskOutput__?: never;
|
|
336
347
|
}) => Promise<import("../../autogenerated").GptV1Response>;
|
|
337
348
|
};
|
|
338
349
|
imagine: {
|
|
339
350
|
kate: {
|
|
340
|
-
v1: (params: import("../../autogenerated").
|
|
351
|
+
v1: (params: import("../../autogenerated").ImagineKateV1Request & {
|
|
341
352
|
__taskOutput__?: never;
|
|
342
353
|
}) => Promise<import("../../autogenerated").ImagineKateV1Response>;
|
|
343
354
|
};
|
|
344
355
|
};
|
|
345
356
|
upscale: {
|
|
346
|
-
v1: (params: import("../../autogenerated").
|
|
357
|
+
v1: (params: import("../../autogenerated").UpscaleV1Request & {
|
|
347
358
|
__taskOutput__?: never;
|
|
348
359
|
}) => Promise<import("../../autogenerated").UpscaleV1Response>;
|
|
349
360
|
};
|
|
350
361
|
objectDetection: {
|
|
351
|
-
v1: (params: import("../../autogenerated").
|
|
362
|
+
v1: (params: import("../../autogenerated").ObjectDetectionV1Request & {
|
|
352
363
|
__taskOutput__?: never;
|
|
353
364
|
}) => Promise<import("../../autogenerated").ObjectDetectionV1Response>;
|
|
354
365
|
};
|
|
355
366
|
segmentAnything: {
|
|
356
367
|
embeddings: {
|
|
357
|
-
v1: (params: import("../../autogenerated").
|
|
368
|
+
v1: (params: import("../../autogenerated").SegmentAnythingEmbeddingsV1Request & {
|
|
358
369
|
__taskOutput__?: never;
|
|
359
370
|
}) => Promise<import("../../autogenerated").SegmentAnythingEmbeddingsV1Response>;
|
|
360
371
|
};
|
|
361
372
|
mask: {
|
|
362
|
-
v1: (params: import("../../autogenerated").
|
|
373
|
+
v1: (params: import("../../autogenerated").SegmentAnythingMaskV1Request & {
|
|
363
374
|
__taskOutput__?: never;
|
|
364
375
|
}) => Promise<import("../../autogenerated").SegmentAnythingMaskV1Response>;
|
|
365
376
|
};
|
|
366
377
|
};
|
|
367
378
|
poseEstimation: {
|
|
368
|
-
v1: (params: import("../../autogenerated").
|
|
379
|
+
v1: (params: import("../../autogenerated").PoseEstimationV1Request & {
|
|
369
380
|
__taskOutput__?: never;
|
|
370
381
|
}) => Promise<import("../../autogenerated").PoseEstimationV1Response>;
|
|
371
382
|
};
|
|
372
383
|
cut: {
|
|
373
|
-
v1: (params: import("../../autogenerated").
|
|
384
|
+
v1: (params: import("../../autogenerated").CutV1Request & {
|
|
374
385
|
__taskOutput__?: never;
|
|
375
386
|
}) => Promise<import("../../autogenerated").CutV1Response>;
|
|
376
387
|
};
|
|
377
388
|
composite: {
|
|
378
|
-
v1: (params: import("../../autogenerated").
|
|
389
|
+
v1: (params: import("../../autogenerated").CompositeV1Request & {
|
|
379
390
|
__taskOutput__?: never;
|
|
380
391
|
}) => Promise<import("../../autogenerated").CompositeV1Response>;
|
|
381
392
|
};
|
|
382
393
|
vton: {
|
|
383
394
|
gisele: {
|
|
384
|
-
v1: (params: import("../../autogenerated").
|
|
395
|
+
v1: (params: import("../../autogenerated").VtonGiseleV1Request & {
|
|
385
396
|
__taskOutput__?: never;
|
|
386
397
|
}) => Promise<import("../../autogenerated").VtonGiseleV1Response>;
|
|
387
398
|
};
|
|
388
399
|
};
|
|
389
400
|
negateImage: {
|
|
390
|
-
v1: (params: import("../../autogenerated").
|
|
401
|
+
v1: (params: import("../../autogenerated").NegateImageV1Request & {
|
|
391
402
|
__taskOutput__?: never;
|
|
392
403
|
}) => Promise<import("../../autogenerated").NegateImageV1Response>;
|
|
393
404
|
};
|
|
@@ -417,6 +428,14 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
417
428
|
updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto & {
|
|
418
429
|
__taskOutput__?: never;
|
|
419
430
|
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
431
|
+
items: {
|
|
432
|
+
add: (params: import("../../autogenerated").AddItemsToStackParamsDto & {
|
|
433
|
+
__taskOutput__?: never;
|
|
434
|
+
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
435
|
+
remove: (params: import("../../autogenerated").RemoveItemsFromStackParamsDto & {
|
|
436
|
+
__taskOutput__?: never;
|
|
437
|
+
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
438
|
+
};
|
|
420
439
|
};
|
|
421
440
|
storage: {
|
|
422
441
|
create: (params: import("../../autogenerated").CreateStorageRecordParamsDto & {
|
|
@@ -528,81 +547,81 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
528
547
|
run: {
|
|
529
548
|
haute: {
|
|
530
549
|
linda: {
|
|
531
|
-
v1: (params: import("../../autogenerated").
|
|
550
|
+
v1: (params: import("../../autogenerated").HauteLindaV1Request & {
|
|
532
551
|
__taskOutput__?: never;
|
|
533
552
|
}) => Promise<import("../../autogenerated").HauteLindaV1Response>;
|
|
534
553
|
};
|
|
535
554
|
naomi: {
|
|
536
|
-
v1: (params: import("../../autogenerated").
|
|
555
|
+
v1: (params: import("../../autogenerated").HauteNaomiV1Request & {
|
|
537
556
|
__taskOutput__?: never;
|
|
538
557
|
}) => Promise<import("../../autogenerated").HauteNaomiV1Response>;
|
|
539
558
|
};
|
|
540
559
|
};
|
|
541
560
|
inpaint: {
|
|
542
561
|
kate: {
|
|
543
|
-
v1: (params: import("../../autogenerated").
|
|
562
|
+
v1: (params: import("../../autogenerated").InpaintKateV1Request & {
|
|
544
563
|
__taskOutput__?: never;
|
|
545
564
|
}) => Promise<import("../../autogenerated").InpaintKateV1Response>;
|
|
546
565
|
};
|
|
547
566
|
};
|
|
548
567
|
gpt: {
|
|
549
|
-
v1: (params: import("../../autogenerated").
|
|
568
|
+
v1: (params: import("../../autogenerated").GptV1Request & {
|
|
550
569
|
__taskOutput__?: never;
|
|
551
570
|
}) => Promise<import("../../autogenerated").GptV1Response>;
|
|
552
571
|
};
|
|
553
572
|
imagine: {
|
|
554
573
|
kate: {
|
|
555
|
-
v1: (params: import("../../autogenerated").
|
|
574
|
+
v1: (params: import("../../autogenerated").ImagineKateV1Request & {
|
|
556
575
|
__taskOutput__?: never;
|
|
557
576
|
}) => Promise<import("../../autogenerated").ImagineKateV1Response>;
|
|
558
577
|
};
|
|
559
578
|
};
|
|
560
579
|
upscale: {
|
|
561
|
-
v1: (params: import("../../autogenerated").
|
|
580
|
+
v1: (params: import("../../autogenerated").UpscaleV1Request & {
|
|
562
581
|
__taskOutput__?: never;
|
|
563
582
|
}) => Promise<import("../../autogenerated").UpscaleV1Response>;
|
|
564
583
|
};
|
|
565
584
|
objectDetection: {
|
|
566
|
-
v1: (params: import("../../autogenerated").
|
|
585
|
+
v1: (params: import("../../autogenerated").ObjectDetectionV1Request & {
|
|
567
586
|
__taskOutput__?: never;
|
|
568
587
|
}) => Promise<import("../../autogenerated").ObjectDetectionV1Response>;
|
|
569
588
|
};
|
|
570
589
|
segmentAnything: {
|
|
571
590
|
embeddings: {
|
|
572
|
-
v1: (params: import("../../autogenerated").
|
|
591
|
+
v1: (params: import("../../autogenerated").SegmentAnythingEmbeddingsV1Request & {
|
|
573
592
|
__taskOutput__?: never;
|
|
574
593
|
}) => Promise<import("../../autogenerated").SegmentAnythingEmbeddingsV1Response>;
|
|
575
594
|
};
|
|
576
595
|
mask: {
|
|
577
|
-
v1: (params: import("../../autogenerated").
|
|
596
|
+
v1: (params: import("../../autogenerated").SegmentAnythingMaskV1Request & {
|
|
578
597
|
__taskOutput__?: never;
|
|
579
598
|
}) => Promise<import("../../autogenerated").SegmentAnythingMaskV1Response>;
|
|
580
599
|
};
|
|
581
600
|
};
|
|
582
601
|
poseEstimation: {
|
|
583
|
-
v1: (params: import("../../autogenerated").
|
|
602
|
+
v1: (params: import("../../autogenerated").PoseEstimationV1Request & {
|
|
584
603
|
__taskOutput__?: never;
|
|
585
604
|
}) => Promise<import("../../autogenerated").PoseEstimationV1Response>;
|
|
586
605
|
};
|
|
587
606
|
cut: {
|
|
588
|
-
v1: (params: import("../../autogenerated").
|
|
607
|
+
v1: (params: import("../../autogenerated").CutV1Request & {
|
|
589
608
|
__taskOutput__?: never;
|
|
590
609
|
}) => Promise<import("../../autogenerated").CutV1Response>;
|
|
591
610
|
};
|
|
592
611
|
composite: {
|
|
593
|
-
v1: (params: import("../../autogenerated").
|
|
612
|
+
v1: (params: import("../../autogenerated").CompositeV1Request & {
|
|
594
613
|
__taskOutput__?: never;
|
|
595
614
|
}) => Promise<import("../../autogenerated").CompositeV1Response>;
|
|
596
615
|
};
|
|
597
616
|
vton: {
|
|
598
617
|
gisele: {
|
|
599
|
-
v1: (params: import("../../autogenerated").
|
|
618
|
+
v1: (params: import("../../autogenerated").VtonGiseleV1Request & {
|
|
600
619
|
__taskOutput__?: never;
|
|
601
620
|
}) => Promise<import("../../autogenerated").VtonGiseleV1Response>;
|
|
602
621
|
};
|
|
603
622
|
};
|
|
604
623
|
negateImage: {
|
|
605
|
-
v1: (params: import("../../autogenerated").
|
|
624
|
+
v1: (params: import("../../autogenerated").NegateImageV1Request & {
|
|
606
625
|
__taskOutput__?: never;
|
|
607
626
|
}) => Promise<import("../../autogenerated").NegateImageV1Response>;
|
|
608
627
|
};
|
|
@@ -632,6 +651,14 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
632
651
|
updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto & {
|
|
633
652
|
__taskOutput__?: never;
|
|
634
653
|
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
654
|
+
items: {
|
|
655
|
+
add: (params: import("../../autogenerated").AddItemsToStackParamsDto & {
|
|
656
|
+
__taskOutput__?: never;
|
|
657
|
+
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
658
|
+
remove: (params: import("../../autogenerated").RemoveItemsFromStackParamsDto & {
|
|
659
|
+
__taskOutput__?: never;
|
|
660
|
+
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
661
|
+
};
|
|
635
662
|
};
|
|
636
663
|
storage: {
|
|
637
664
|
create: (params: import("../../autogenerated").CreateStorageRecordParamsDto & {
|
|
@@ -649,7 +676,7 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
649
676
|
};
|
|
650
677
|
}>;
|
|
651
678
|
create: (props: {
|
|
652
|
-
metadata?:
|
|
679
|
+
metadata?: PipelinesMetadata;
|
|
653
680
|
template: Pipeline<{
|
|
654
681
|
access: {
|
|
655
682
|
attach: (params: import("../../autogenerated").AttachAccessParamsDto & {
|
|
@@ -746,81 +773,81 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
746
773
|
run: {
|
|
747
774
|
haute: {
|
|
748
775
|
linda: {
|
|
749
|
-
v1: (params: import("../../autogenerated").
|
|
776
|
+
v1: (params: import("../../autogenerated").HauteLindaV1Request & {
|
|
750
777
|
__taskOutput__?: never;
|
|
751
778
|
}) => Promise<import("../../autogenerated").HauteLindaV1Response>;
|
|
752
779
|
};
|
|
753
780
|
naomi: {
|
|
754
|
-
v1: (params: import("../../autogenerated").
|
|
781
|
+
v1: (params: import("../../autogenerated").HauteNaomiV1Request & {
|
|
755
782
|
__taskOutput__?: never;
|
|
756
783
|
}) => Promise<import("../../autogenerated").HauteNaomiV1Response>;
|
|
757
784
|
};
|
|
758
785
|
};
|
|
759
786
|
inpaint: {
|
|
760
787
|
kate: {
|
|
761
|
-
v1: (params: import("../../autogenerated").
|
|
788
|
+
v1: (params: import("../../autogenerated").InpaintKateV1Request & {
|
|
762
789
|
__taskOutput__?: never;
|
|
763
790
|
}) => Promise<import("../../autogenerated").InpaintKateV1Response>;
|
|
764
791
|
};
|
|
765
792
|
};
|
|
766
793
|
gpt: {
|
|
767
|
-
v1: (params: import("../../autogenerated").
|
|
794
|
+
v1: (params: import("../../autogenerated").GptV1Request & {
|
|
768
795
|
__taskOutput__?: never;
|
|
769
796
|
}) => Promise<import("../../autogenerated").GptV1Response>;
|
|
770
797
|
};
|
|
771
798
|
imagine: {
|
|
772
799
|
kate: {
|
|
773
|
-
v1: (params: import("../../autogenerated").
|
|
800
|
+
v1: (params: import("../../autogenerated").ImagineKateV1Request & {
|
|
774
801
|
__taskOutput__?: never;
|
|
775
802
|
}) => Promise<import("../../autogenerated").ImagineKateV1Response>;
|
|
776
803
|
};
|
|
777
804
|
};
|
|
778
805
|
upscale: {
|
|
779
|
-
v1: (params: import("../../autogenerated").
|
|
806
|
+
v1: (params: import("../../autogenerated").UpscaleV1Request & {
|
|
780
807
|
__taskOutput__?: never;
|
|
781
808
|
}) => Promise<import("../../autogenerated").UpscaleV1Response>;
|
|
782
809
|
};
|
|
783
810
|
objectDetection: {
|
|
784
|
-
v1: (params: import("../../autogenerated").
|
|
811
|
+
v1: (params: import("../../autogenerated").ObjectDetectionV1Request & {
|
|
785
812
|
__taskOutput__?: never;
|
|
786
813
|
}) => Promise<import("../../autogenerated").ObjectDetectionV1Response>;
|
|
787
814
|
};
|
|
788
815
|
segmentAnything: {
|
|
789
816
|
embeddings: {
|
|
790
|
-
v1: (params: import("../../autogenerated").
|
|
817
|
+
v1: (params: import("../../autogenerated").SegmentAnythingEmbeddingsV1Request & {
|
|
791
818
|
__taskOutput__?: never;
|
|
792
819
|
}) => Promise<import("../../autogenerated").SegmentAnythingEmbeddingsV1Response>;
|
|
793
820
|
};
|
|
794
821
|
mask: {
|
|
795
|
-
v1: (params: import("../../autogenerated").
|
|
822
|
+
v1: (params: import("../../autogenerated").SegmentAnythingMaskV1Request & {
|
|
796
823
|
__taskOutput__?: never;
|
|
797
824
|
}) => Promise<import("../../autogenerated").SegmentAnythingMaskV1Response>;
|
|
798
825
|
};
|
|
799
826
|
};
|
|
800
827
|
poseEstimation: {
|
|
801
|
-
v1: (params: import("../../autogenerated").
|
|
828
|
+
v1: (params: import("../../autogenerated").PoseEstimationV1Request & {
|
|
802
829
|
__taskOutput__?: never;
|
|
803
830
|
}) => Promise<import("../../autogenerated").PoseEstimationV1Response>;
|
|
804
831
|
};
|
|
805
832
|
cut: {
|
|
806
|
-
v1: (params: import("../../autogenerated").
|
|
833
|
+
v1: (params: import("../../autogenerated").CutV1Request & {
|
|
807
834
|
__taskOutput__?: never;
|
|
808
835
|
}) => Promise<import("../../autogenerated").CutV1Response>;
|
|
809
836
|
};
|
|
810
837
|
composite: {
|
|
811
|
-
v1: (params: import("../../autogenerated").
|
|
838
|
+
v1: (params: import("../../autogenerated").CompositeV1Request & {
|
|
812
839
|
__taskOutput__?: never;
|
|
813
840
|
}) => Promise<import("../../autogenerated").CompositeV1Response>;
|
|
814
841
|
};
|
|
815
842
|
vton: {
|
|
816
843
|
gisele: {
|
|
817
|
-
v1: (params: import("../../autogenerated").
|
|
844
|
+
v1: (params: import("../../autogenerated").VtonGiseleV1Request & {
|
|
818
845
|
__taskOutput__?: never;
|
|
819
846
|
}) => Promise<import("../../autogenerated").VtonGiseleV1Response>;
|
|
820
847
|
};
|
|
821
848
|
};
|
|
822
849
|
negateImage: {
|
|
823
|
-
v1: (params: import("../../autogenerated").
|
|
850
|
+
v1: (params: import("../../autogenerated").NegateImageV1Request & {
|
|
824
851
|
__taskOutput__?: never;
|
|
825
852
|
}) => Promise<import("../../autogenerated").NegateImageV1Response>;
|
|
826
853
|
};
|
|
@@ -850,6 +877,14 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
850
877
|
updateMetadata: (params: import("../../autogenerated").UpdateResourceMetadataDto & {
|
|
851
878
|
__taskOutput__?: never;
|
|
852
879
|
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
880
|
+
items: {
|
|
881
|
+
add: (params: import("../../autogenerated").AddItemsToStackParamsDto & {
|
|
882
|
+
__taskOutput__?: never;
|
|
883
|
+
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
884
|
+
remove: (params: import("../../autogenerated").RemoveItemsFromStackParamsDto & {
|
|
885
|
+
__taskOutput__?: never;
|
|
886
|
+
}) => Promise<import("../../autogenerated").StackEntity>;
|
|
887
|
+
};
|
|
853
888
|
};
|
|
854
889
|
storage: {
|
|
855
890
|
create: (params: import("../../autogenerated").CreateStorageRecordParamsDto & {
|
|
@@ -866,13 +901,18 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
866
901
|
}) => Promise<import("../../autogenerated").StorageEntity>;
|
|
867
902
|
};
|
|
868
903
|
}>;
|
|
869
|
-
}) => Promise<
|
|
904
|
+
}) => Promise<PipelineEntityWithMetadata>;
|
|
870
905
|
get: (props: {
|
|
871
906
|
id: string;
|
|
872
|
-
}) => Promise<
|
|
907
|
+
}) => Promise<PipelineEntityWithMetadata | undefined>;
|
|
908
|
+
list: (props?: {
|
|
909
|
+
orderBy?: PipelinesControllerListPipelinesV1OrderByEnum;
|
|
910
|
+
limit?: number;
|
|
911
|
+
cursor?: string;
|
|
912
|
+
}) => Promise<ListResponse<PipelineEntityWithMetadata>>;
|
|
873
913
|
wait: (props: {
|
|
874
914
|
id: string;
|
|
875
915
|
timeoutInSeconds?: number;
|
|
876
|
-
}) => Promise<
|
|
916
|
+
}) => Promise<PipelineEntityWithMetadata>;
|
|
877
917
|
};
|
|
878
918
|
export default pipelines;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { CallApi, PipelinesApi } from '../../autogenerated';
|
|
1
|
+
import { CallApi, PipelinesApi, } from '../../autogenerated';
|
|
2
2
|
import { Pipeline } from '@hautechai/pipelines';
|
|
3
3
|
import { useAutogeneratedAPI } from '../api';
|
|
4
|
+
import { transformToListResponse } from '../transformers';
|
|
4
5
|
const pipelines = (options) => {
|
|
5
6
|
const api = useAutogeneratedAPI({ API: PipelinesApi, options });
|
|
6
7
|
const callAPI = useAutogeneratedAPI({ API: CallApi, options });
|
|
@@ -117,6 +118,10 @@ const pipelines = (options) => {
|
|
|
117
118
|
get: callMethod((methods) => methods.callControllerCallStacksGetV1),
|
|
118
119
|
list: callMethod((methods) => methods.callControllerCallStacksListV1),
|
|
119
120
|
updateMetadata: callMethod((methods) => methods.callControllerCallStacksMetadataUpdateV1),
|
|
121
|
+
items: {
|
|
122
|
+
add: callMethod((methods) => methods.callControllerCallStacksItemsAddV1),
|
|
123
|
+
remove: callMethod((methods) => methods.callControllerCallStacksItemsRemoveV1),
|
|
124
|
+
},
|
|
120
125
|
},
|
|
121
126
|
storage: {
|
|
122
127
|
create: callMethod((methods) => methods.callControllerCallStorageCreateV1),
|
|
@@ -136,6 +141,10 @@ const pipelines = (options) => {
|
|
|
136
141
|
get: async (props) => api.callWithReturningUndefinedOn404({
|
|
137
142
|
run: (methods) => methods.pipelinesControllerGetPipelineV1(props.id),
|
|
138
143
|
}),
|
|
144
|
+
list: (props = {}) => api.call({
|
|
145
|
+
run: (methods) => methods.pipelinesControllerListPipelinesV1(props.orderBy, props.limit, props.cursor),
|
|
146
|
+
transform: transformToListResponse,
|
|
147
|
+
}),
|
|
139
148
|
wait: async (props) => new Promise((resolve, reject) => {
|
|
140
149
|
const initialDelay = 5000;
|
|
141
150
|
const delay = 2000;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ListResponse, SDKOptions } from '../../types';
|
|
2
|
+
import { ListPosesParamsDto, PoseEntity } from '../../autogenerated';
|
|
3
|
+
declare const poses: (options: SDKOptions) => {
|
|
4
|
+
putPreview: (props: {
|
|
5
|
+
id: string;
|
|
6
|
+
previewImageId: string;
|
|
7
|
+
}) => Promise<void>;
|
|
8
|
+
get: (props: {
|
|
9
|
+
id: string;
|
|
10
|
+
}) => Promise<PoseEntity | undefined>;
|
|
11
|
+
list: (props: ListPosesParamsDto) => Promise<ListResponse<PoseEntity>>;
|
|
12
|
+
};
|
|
13
|
+
export default poses;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PosesApi } from '../../autogenerated';
|
|
2
|
+
import { useAutogeneratedAPI } from '../api';
|
|
3
|
+
import { transformToListResponse } from '../transformers';
|
|
4
|
+
const poses = (options) => {
|
|
5
|
+
const api = useAutogeneratedAPI({ API: PosesApi, options });
|
|
6
|
+
return {
|
|
7
|
+
putPreview: async (props) => api.call({
|
|
8
|
+
run: (methods) => methods.posesControllerSetPosePreviewV1(props.id, {
|
|
9
|
+
previewImageId: props.previewImageId,
|
|
10
|
+
}),
|
|
11
|
+
}),
|
|
12
|
+
get: async (props) => api.callWithReturningUndefinedOn404({
|
|
13
|
+
run: (methods) => methods.posesControllerGetPoseV1(props.id),
|
|
14
|
+
}),
|
|
15
|
+
list: async (props) => api.call({
|
|
16
|
+
run: (methods) => methods.posesControllerListPosesV1(props.orderBy, props.limit, props.cursor),
|
|
17
|
+
transform: transformToListResponse,
|
|
18
|
+
}),
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default poses;
|