@hautechai/sdk 0.2.5 → 0.2.7
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/index.d.ts
CHANGED
|
@@ -1140,6 +1140,13 @@ export declare const createSDK: (options: SDKOptions) => {
|
|
|
1140
1140
|
}) => Promise<(Omit<import("../types").PipelineEntity, "metadata"> & {
|
|
1141
1141
|
metadata: PipelinesMetadata;
|
|
1142
1142
|
}) | undefined>;
|
|
1143
|
+
list: (props?: {
|
|
1144
|
+
orderBy?: import("../autogenerated").PipelinesControllerListPipelinesV1OrderByEnum;
|
|
1145
|
+
limit?: number;
|
|
1146
|
+
cursor?: string;
|
|
1147
|
+
}) => Promise<import("../types").ListResponse<Omit<import("../types").PipelineEntity, "metadata"> & {
|
|
1148
|
+
metadata: PipelinesMetadata;
|
|
1149
|
+
}>>;
|
|
1143
1150
|
wait: (props: {
|
|
1144
1151
|
id: string;
|
|
1145
1152
|
timeoutInSeconds?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
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
4
|
import { PipelinesMetadata } from '../index';
|
|
5
5
|
import { AddMetadata } from '../utils';
|
|
6
6
|
type PipelineEntityWithMetadata = AddMetadata<PipelineEntity, PipelinesMetadata>;
|
|
@@ -905,6 +905,11 @@ declare const pipelines: (options: SDKOptions) => {
|
|
|
905
905
|
get: (props: {
|
|
906
906
|
id: string;
|
|
907
907
|
}) => Promise<PipelineEntityWithMetadata | undefined>;
|
|
908
|
+
list: (props?: {
|
|
909
|
+
orderBy?: PipelinesControllerListPipelinesV1OrderByEnum;
|
|
910
|
+
limit?: number;
|
|
911
|
+
cursor?: string;
|
|
912
|
+
}) => Promise<ListResponse<PipelineEntityWithMetadata>>;
|
|
908
913
|
wait: (props: {
|
|
909
914
|
id: string;
|
|
910
915
|
timeoutInSeconds?: number;
|
|
@@ -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 });
|
|
@@ -140,6 +141,10 @@ const pipelines = (options) => {
|
|
|
140
141
|
get: async (props) => api.callWithReturningUndefinedOn404({
|
|
141
142
|
run: (methods) => methods.pipelinesControllerGetPipelineV1(props.id),
|
|
142
143
|
}),
|
|
144
|
+
list: (props = {}) => api.call({
|
|
145
|
+
run: (methods) => methods.pipelinesControllerListPipelinesV1(props.orderBy, props.limit, props.cursor),
|
|
146
|
+
transform: transformToListResponse,
|
|
147
|
+
}),
|
|
143
148
|
wait: async (props) => new Promise((resolve, reject) => {
|
|
144
149
|
const initialDelay = 5000;
|
|
145
150
|
const delay = 2000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hautechai/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"description": "Hautech SDK",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@hautechai/pipelines": "0.3.
|
|
13
|
+
"@hautechai/pipelines": "0.3.4",
|
|
14
14
|
"axios": "1.7.9",
|
|
15
15
|
"jose": "5.9.6",
|
|
16
16
|
"websocket": "^1.0.35"
|