@hautechai/sdk 0.0.29 → 0.1.1
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/.github/workflows/main.yml +32 -35
- package/.github/workflows/test.yml +39 -0
- package/dist/sdk/index.d.ts +40 -38
- package/dist/sdk/operations/index.d.ts +40 -38
- package/dist/sdk/operations/index.js +24 -22
- package/package.json +37 -36
- package/scripts/generate-permissions.js +0 -0
- package/scripts/generate.sh +0 -0
|
@@ -1,43 +1,40 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Publish Package to npmjs
|
|
2
2
|
on:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- main
|
|
3
|
+
release:
|
|
4
|
+
types: [published]
|
|
6
5
|
jobs:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
build-and-publish:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write
|
|
11
|
+
environment: main
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout
|
|
14
|
+
uses: actions/checkout@v4
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
- name: Install pnpm
|
|
17
|
+
uses: pnpm/action-setup@v4
|
|
18
|
+
with:
|
|
19
|
+
version: 9
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
- name: Use Node LTS
|
|
22
|
+
uses: actions/setup-node@v4
|
|
23
|
+
with:
|
|
24
|
+
node-version: '20.x'
|
|
25
|
+
registry-url: 'https://registry.npmjs.org'
|
|
26
|
+
cache: pnpm
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
- name: Install dependencies
|
|
29
|
+
run: pnpm install --frozen-lockfile
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
env:
|
|
31
|
-
API_CORE_URL: https://api.dev.hautech.ai
|
|
32
|
-
APP_ID: ${{ secrets.APP_ID }}
|
|
33
|
-
APP_KEY_ID: ${{ secrets.APP_KEY_ID }}
|
|
34
|
-
APP_KEY_SECRET: ${{ secrets.APP_KEY_SECRET }}
|
|
35
|
-
SDK_TOKEN: ${{ secrets.SDK_TOKEN }}
|
|
31
|
+
- name: Bump version
|
|
32
|
+
run: pnpm version from-git --no-commit-hooks --no-git-tag-version --allow-same-version
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
- name: Build the package
|
|
35
|
+
run: pnpm build
|
|
39
36
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
- name: Publish the package
|
|
38
|
+
run: pnpm publish --no-git-checks --access public
|
|
39
|
+
env:
|
|
40
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- 'main'
|
|
6
|
+
jobs:
|
|
7
|
+
test:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
id-token: write
|
|
12
|
+
environment: main
|
|
13
|
+
steps:
|
|
14
|
+
- name: Checkout
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Install pnpm
|
|
18
|
+
uses: pnpm/action-setup@v4
|
|
19
|
+
with:
|
|
20
|
+
version: 9
|
|
21
|
+
|
|
22
|
+
- name: Use Node LTS
|
|
23
|
+
uses: actions/setup-node@v4
|
|
24
|
+
with:
|
|
25
|
+
node-version: '20.x'
|
|
26
|
+
registry-url: 'https://registry.npmjs.org'
|
|
27
|
+
cache: pnpm
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: pnpm install --frozen-lockfile
|
|
31
|
+
|
|
32
|
+
- name: Test
|
|
33
|
+
run: pnpm test
|
|
34
|
+
env:
|
|
35
|
+
API_CORE_URL: https://api.dev.hautech.ai
|
|
36
|
+
APP_ID: ${{ secrets.APP_ID }}
|
|
37
|
+
APP_KEY_ID: ${{ secrets.APP_KEY_ID }}
|
|
38
|
+
APP_KEY_SECRET: ${{ secrets.APP_KEY_SECRET }}
|
|
39
|
+
SDK_TOKEN: ${{ secrets.SDK_TOKEN }}
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -93,31 +93,7 @@ export declare const createSDK: (options: SDKOptions) => {
|
|
|
93
93
|
}) => Promise<Record<string, string>>;
|
|
94
94
|
};
|
|
95
95
|
operations: {
|
|
96
|
-
|
|
97
|
-
composite: {
|
|
98
|
-
v1: (props: {
|
|
99
|
-
input: import("../autogenerated").CompositeV1Input;
|
|
100
|
-
metadata?: any;
|
|
101
|
-
}) => Promise<import("../autogenerated").CompositeV1Response>;
|
|
102
|
-
};
|
|
103
|
-
cut: {
|
|
104
|
-
v1: (props: {
|
|
105
|
-
input: import("../autogenerated").CutV1Input;
|
|
106
|
-
metadata?: any;
|
|
107
|
-
}) => Promise<import("../autogenerated").CutV1Response>;
|
|
108
|
-
};
|
|
109
|
-
detect: {
|
|
110
|
-
v1: (props: {
|
|
111
|
-
input: import("../autogenerated").ObjectDetectionV1Input;
|
|
112
|
-
metadata?: any;
|
|
113
|
-
}) => Promise<import("../autogenerated").ObjectDetectionV1Response>;
|
|
114
|
-
};
|
|
115
|
-
estimatePose: {
|
|
116
|
-
v1: (props: {
|
|
117
|
-
input: import("../autogenerated").PoseEstimationV1Input;
|
|
118
|
-
metadata?: any;
|
|
119
|
-
}) => Promise<import("../autogenerated").PoseEstimationV1Response>;
|
|
120
|
-
};
|
|
96
|
+
run: {
|
|
121
97
|
haute: {
|
|
122
98
|
linda: {
|
|
123
99
|
v1: (props: {
|
|
@@ -132,6 +108,14 @@ export declare const createSDK: (options: SDKOptions) => {
|
|
|
132
108
|
}) => Promise<import("../autogenerated").HauteNaomiV1Response>;
|
|
133
109
|
};
|
|
134
110
|
};
|
|
111
|
+
inpaint: {
|
|
112
|
+
kate: {
|
|
113
|
+
v1: (props: {
|
|
114
|
+
input: import("../autogenerated").KateInpaintV1Input;
|
|
115
|
+
metadata?: any;
|
|
116
|
+
}) => Promise<import("../autogenerated").ImagineKateV1Response>;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
135
119
|
gpt: {
|
|
136
120
|
v1: (props: {
|
|
137
121
|
input: import("../autogenerated").GPTV1Input;
|
|
@@ -146,31 +130,49 @@ export declare const createSDK: (options: SDKOptions) => {
|
|
|
146
130
|
}) => Promise<import("../autogenerated").ImagineKateV1Response>;
|
|
147
131
|
};
|
|
148
132
|
};
|
|
149
|
-
|
|
150
|
-
|
|
133
|
+
upscale: {
|
|
134
|
+
v1: (props: {
|
|
135
|
+
input: import("../autogenerated").UpscaleV1Input;
|
|
136
|
+
metadata?: any;
|
|
137
|
+
}) => Promise<import("../autogenerated").UpscaleV1Response>;
|
|
138
|
+
};
|
|
139
|
+
objectDetection: {
|
|
140
|
+
v1: (props: {
|
|
141
|
+
input: import("../autogenerated").ObjectDetectionV1Input;
|
|
142
|
+
metadata?: any;
|
|
143
|
+
}) => Promise<import("../autogenerated").ObjectDetectionV1Response>;
|
|
144
|
+
};
|
|
145
|
+
segmentAnything: {
|
|
146
|
+
embeddings: {
|
|
151
147
|
v1: (props: {
|
|
152
|
-
input: import("../autogenerated").
|
|
148
|
+
input: import("../autogenerated").SegmentAnythingEmbeddingsV1Input;
|
|
153
149
|
metadata?: any;
|
|
154
|
-
}) => Promise<import("../autogenerated").
|
|
150
|
+
}) => Promise<import("../autogenerated").SegmentAnythingEmbeddingsV1Response>;
|
|
151
|
+
};
|
|
152
|
+
mask: {
|
|
153
|
+
v1: (props: {
|
|
154
|
+
input: import("../autogenerated").SegmentAnythingMaskV1Input;
|
|
155
|
+
metadata?: any;
|
|
156
|
+
}) => Promise<import("../autogenerated").SegmentAnythingMaskV1Response>;
|
|
155
157
|
};
|
|
156
158
|
};
|
|
157
|
-
|
|
159
|
+
poseEstimation: {
|
|
158
160
|
v1: (props: {
|
|
159
|
-
input: import("../autogenerated").
|
|
161
|
+
input: import("../autogenerated").PoseEstimationV1Input;
|
|
160
162
|
metadata?: any;
|
|
161
|
-
}) => Promise<import("../autogenerated").
|
|
163
|
+
}) => Promise<import("../autogenerated").PoseEstimationV1Response>;
|
|
162
164
|
};
|
|
163
|
-
|
|
165
|
+
cut: {
|
|
164
166
|
v1: (props: {
|
|
165
|
-
input: import("../autogenerated").
|
|
167
|
+
input: import("../autogenerated").CutV1Input;
|
|
166
168
|
metadata?: any;
|
|
167
|
-
}) => Promise<import("../autogenerated").
|
|
169
|
+
}) => Promise<import("../autogenerated").CutV1Response>;
|
|
168
170
|
};
|
|
169
|
-
|
|
171
|
+
composite: {
|
|
170
172
|
v1: (props: {
|
|
171
|
-
input: import("../autogenerated").
|
|
173
|
+
input: import("../autogenerated").CompositeV1Input;
|
|
172
174
|
metadata?: any;
|
|
173
|
-
}) => Promise<import("../autogenerated").
|
|
175
|
+
}) => Promise<import("../autogenerated").CompositeV1Response>;
|
|
174
176
|
};
|
|
175
177
|
vton: {
|
|
176
178
|
gisele: {
|
|
@@ -1,31 +1,7 @@
|
|
|
1
1
|
import { CompositeV1Input, CompositeV1Response, CutV1Input, CutV1Response, GiseleVtonV1Input, GPTV1Input, GptV1Response, HauteLindaV1Response, HauteNaomiV1Response, ImagineKateV1Response, KateImagineV1Input, KateInpaintV1Input, LindaHauteV1Input, NaomiHauteV1Input, NegateImageV1Input, NegateImageV1Response, ObjectDetectionV1Input, ObjectDetectionV1Response, OperationEntity, PoseEstimationV1Input, PoseEstimationV1Response, SegmentAnythingEmbeddingsV1Input, SegmentAnythingEmbeddingsV1Response, SegmentAnythingMaskV1Input, SegmentAnythingMaskV1Response, UpscaleV1Input, UpscaleV1Response, VtonGiseleV1Response } from '../../autogenerated';
|
|
2
2
|
import { ListProps, ListResponse, SDKOptions } from '../../types';
|
|
3
3
|
declare const operations: (options: SDKOptions) => {
|
|
4
|
-
|
|
5
|
-
composite: {
|
|
6
|
-
v1: (props: {
|
|
7
|
-
input: CompositeV1Input;
|
|
8
|
-
metadata?: any;
|
|
9
|
-
}) => Promise<CompositeV1Response>;
|
|
10
|
-
};
|
|
11
|
-
cut: {
|
|
12
|
-
v1: (props: {
|
|
13
|
-
input: CutV1Input;
|
|
14
|
-
metadata?: any;
|
|
15
|
-
}) => Promise<CutV1Response>;
|
|
16
|
-
};
|
|
17
|
-
detect: {
|
|
18
|
-
v1: (props: {
|
|
19
|
-
input: ObjectDetectionV1Input;
|
|
20
|
-
metadata?: any;
|
|
21
|
-
}) => Promise<ObjectDetectionV1Response>;
|
|
22
|
-
};
|
|
23
|
-
estimatePose: {
|
|
24
|
-
v1: (props: {
|
|
25
|
-
input: PoseEstimationV1Input;
|
|
26
|
-
metadata?: any;
|
|
27
|
-
}) => Promise<PoseEstimationV1Response>;
|
|
28
|
-
};
|
|
4
|
+
run: {
|
|
29
5
|
haute: {
|
|
30
6
|
linda: {
|
|
31
7
|
v1: (props: {
|
|
@@ -40,6 +16,14 @@ declare const operations: (options: SDKOptions) => {
|
|
|
40
16
|
}) => Promise<HauteNaomiV1Response>;
|
|
41
17
|
};
|
|
42
18
|
};
|
|
19
|
+
inpaint: {
|
|
20
|
+
kate: {
|
|
21
|
+
v1: (props: {
|
|
22
|
+
input: KateInpaintV1Input;
|
|
23
|
+
metadata?: any;
|
|
24
|
+
}) => Promise<ImagineKateV1Response>;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
43
27
|
gpt: {
|
|
44
28
|
v1: (props: {
|
|
45
29
|
input: GPTV1Input;
|
|
@@ -54,31 +38,49 @@ declare const operations: (options: SDKOptions) => {
|
|
|
54
38
|
}) => Promise<ImagineKateV1Response>;
|
|
55
39
|
};
|
|
56
40
|
};
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
upscale: {
|
|
42
|
+
v1: (props: {
|
|
43
|
+
input: UpscaleV1Input;
|
|
44
|
+
metadata?: any;
|
|
45
|
+
}) => Promise<UpscaleV1Response>;
|
|
46
|
+
};
|
|
47
|
+
objectDetection: {
|
|
48
|
+
v1: (props: {
|
|
49
|
+
input: ObjectDetectionV1Input;
|
|
50
|
+
metadata?: any;
|
|
51
|
+
}) => Promise<ObjectDetectionV1Response>;
|
|
52
|
+
};
|
|
53
|
+
segmentAnything: {
|
|
54
|
+
embeddings: {
|
|
59
55
|
v1: (props: {
|
|
60
|
-
input:
|
|
56
|
+
input: SegmentAnythingEmbeddingsV1Input;
|
|
61
57
|
metadata?: any;
|
|
62
|
-
}) => Promise<
|
|
58
|
+
}) => Promise<SegmentAnythingEmbeddingsV1Response>;
|
|
59
|
+
};
|
|
60
|
+
mask: {
|
|
61
|
+
v1: (props: {
|
|
62
|
+
input: SegmentAnythingMaskV1Input;
|
|
63
|
+
metadata?: any;
|
|
64
|
+
}) => Promise<SegmentAnythingMaskV1Response>;
|
|
63
65
|
};
|
|
64
66
|
};
|
|
65
|
-
|
|
67
|
+
poseEstimation: {
|
|
66
68
|
v1: (props: {
|
|
67
|
-
input:
|
|
69
|
+
input: PoseEstimationV1Input;
|
|
68
70
|
metadata?: any;
|
|
69
|
-
}) => Promise<
|
|
71
|
+
}) => Promise<PoseEstimationV1Response>;
|
|
70
72
|
};
|
|
71
|
-
|
|
73
|
+
cut: {
|
|
72
74
|
v1: (props: {
|
|
73
|
-
input:
|
|
75
|
+
input: CutV1Input;
|
|
74
76
|
metadata?: any;
|
|
75
|
-
}) => Promise<
|
|
77
|
+
}) => Promise<CutV1Response>;
|
|
76
78
|
};
|
|
77
|
-
|
|
79
|
+
composite: {
|
|
78
80
|
v1: (props: {
|
|
79
|
-
input:
|
|
81
|
+
input: CompositeV1Input;
|
|
80
82
|
metadata?: any;
|
|
81
|
-
}) => Promise<
|
|
83
|
+
}) => Promise<CompositeV1Response>;
|
|
82
84
|
};
|
|
83
85
|
vton: {
|
|
84
86
|
gisele: {
|
|
@@ -5,19 +5,7 @@ const operations = (options) => {
|
|
|
5
5
|
const api = useAutogeneratedAPI({ API: OperationsApi, options });
|
|
6
6
|
const createOperation = (callMethod) => (props) => api.call({ run: (methods) => callMethod(methods, props) });
|
|
7
7
|
return {
|
|
8
|
-
|
|
9
|
-
composite: {
|
|
10
|
-
v1: createOperation((methods, props) => methods.operationsControllerRunCompositeV1V1(props)),
|
|
11
|
-
},
|
|
12
|
-
cut: {
|
|
13
|
-
v1: createOperation((methods, props) => methods.operationsControllerRunCutV1V1(props)),
|
|
14
|
-
},
|
|
15
|
-
detect: {
|
|
16
|
-
v1: createOperation((methods, props) => methods.operationsControllerRunObjectDetectionV1V1(props)),
|
|
17
|
-
},
|
|
18
|
-
estimatePose: {
|
|
19
|
-
v1: createOperation((methods, props) => methods.operationsControllerRunPoseEstimationV1V1(props)),
|
|
20
|
-
},
|
|
8
|
+
run: {
|
|
21
9
|
haute: {
|
|
22
10
|
linda: {
|
|
23
11
|
v1: createOperation((methods, props) => methods.operationsControllerRunHauteLindaV1V1(props)),
|
|
@@ -26,6 +14,11 @@ const operations = (options) => {
|
|
|
26
14
|
v1: createOperation((methods, props) => methods.operationsControllerRunHauteNaomiV1V1(props)),
|
|
27
15
|
},
|
|
28
16
|
},
|
|
17
|
+
inpaint: {
|
|
18
|
+
kate: {
|
|
19
|
+
v1: createOperation((methods, props) => methods.operationsControllerRunInpaintKateV1V1(props)),
|
|
20
|
+
},
|
|
21
|
+
},
|
|
29
22
|
gpt: {
|
|
30
23
|
v1: createOperation((methods, props) => methods.operationsControllerRunGptV1V1(props)),
|
|
31
24
|
},
|
|
@@ -34,19 +27,28 @@ const operations = (options) => {
|
|
|
34
27
|
v1: createOperation((methods, props) => methods.operationsControllerRunImagineKateV1V1(props)),
|
|
35
28
|
},
|
|
36
29
|
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
upscale: {
|
|
31
|
+
v1: createOperation((methods, props) => methods.operationsControllerRunUpscaleV1V1(props)),
|
|
32
|
+
},
|
|
33
|
+
objectDetection: {
|
|
34
|
+
v1: createOperation((methods, props) => methods.operationsControllerRunObjectDetectionV1V1(props)),
|
|
35
|
+
},
|
|
36
|
+
segmentAnything: {
|
|
37
|
+
embeddings: {
|
|
38
|
+
v1: createOperation((methods, props) => methods.operationsControllerRunSegmentAnythingEmbeddingsV1V1(props)),
|
|
39
|
+
},
|
|
40
|
+
mask: {
|
|
41
|
+
v1: createOperation((methods, props) => methods.operationsControllerRunSegmentAnythingMaskV1V1(props)),
|
|
40
42
|
},
|
|
41
43
|
},
|
|
42
|
-
|
|
43
|
-
v1: createOperation((methods, props) => methods.
|
|
44
|
+
poseEstimation: {
|
|
45
|
+
v1: createOperation((methods, props) => methods.operationsControllerRunPoseEstimationV1V1(props)),
|
|
44
46
|
},
|
|
45
|
-
|
|
46
|
-
v1: createOperation((methods, props) => methods.
|
|
47
|
+
cut: {
|
|
48
|
+
v1: createOperation((methods, props) => methods.operationsControllerRunCutV1V1(props)),
|
|
47
49
|
},
|
|
48
|
-
|
|
49
|
-
v1: createOperation((methods, props) => methods.
|
|
50
|
+
composite: {
|
|
51
|
+
v1: createOperation((methods, props) => methods.operationsControllerRunCompositeV1V1(props)),
|
|
50
52
|
},
|
|
51
53
|
vton: {
|
|
52
54
|
gisele: {
|
package/package.json
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
2
|
+
"name": "@hautechai/sdk",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/HautechAI/sdk"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"description": "Hautech SDK",
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@hautechai/pipelines": "0.1.0",
|
|
14
|
+
"axios": "1.6.1",
|
|
15
|
+
"jose": "5.9.6"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@jest/globals": "^29.7.0",
|
|
19
|
+
"@openapitools/openapi-generator-cli": "2.15.3",
|
|
20
|
+
"@types/jest": "29.5.12",
|
|
21
|
+
"@types/jsonwebtoken": "9.0.7",
|
|
22
|
+
"@types/node": "22.5.2",
|
|
23
|
+
"dotenv": "16.4.7",
|
|
24
|
+
"jest": "29.7.0",
|
|
25
|
+
"jest-environment-jsdom": "29.7.0",
|
|
26
|
+
"ts-jest": "29.2.5",
|
|
27
|
+
"ts-node": "10.9.2",
|
|
28
|
+
"tslib": "2.7.0",
|
|
29
|
+
"typescript": "5.5.4"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsc",
|
|
33
|
+
"generate": "./scripts/generate.sh",
|
|
34
|
+
"lint": "nx run-many --all --target=lint",
|
|
35
|
+
"lint:fix": "nx run-many --all --target=lint --fix",
|
|
36
|
+
"test": "jest"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
File without changes
|
package/scripts/generate.sh
CHANGED
|
File without changes
|