@hautechai/sdk 2.32.2 → 2.33.0
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/index.d.mts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +38 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.mts
CHANGED
|
@@ -12028,7 +12028,7 @@ type RunWorkflowParamsDtoMetadata = {
|
|
|
12028
12028
|
interface RunWorkflowParamsDto {
|
|
12029
12029
|
input: RunWorkflowParamsDtoInput;
|
|
12030
12030
|
metadata?: RunWorkflowParamsDtoMetadata;
|
|
12031
|
-
|
|
12031
|
+
versionNumber?: number;
|
|
12032
12032
|
}
|
|
12033
12033
|
|
|
12034
12034
|
/**
|
|
@@ -15440,9 +15440,10 @@ type WorkflowsRunV1InputMetadata = {
|
|
|
15440
15440
|
|
|
15441
15441
|
interface WorkflowsRunV1Input {
|
|
15442
15442
|
workflowId?: string;
|
|
15443
|
+
workflowAlias?: string;
|
|
15443
15444
|
input: WorkflowsRunV1InputInput;
|
|
15444
15445
|
metadata?: WorkflowsRunV1InputMetadata;
|
|
15445
|
-
|
|
15446
|
+
versionNumber?: number;
|
|
15446
15447
|
}
|
|
15447
15448
|
|
|
15448
15449
|
/**
|
|
@@ -15760,6 +15761,7 @@ declare const apiDefinitions: {
|
|
|
15760
15761
|
listPublic: (options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<PublicWorkflowSummaryDto[], any>>;
|
|
15761
15762
|
getPublic: (id: string, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<PublicWorkflowDto, any>>;
|
|
15762
15763
|
runPublic: (id: string, runWorkflowParamsDto: RunWorkflowParamsDto, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<RunPublicWorkflowResponseDto, any>>;
|
|
15764
|
+
runPublicByAlias: (alias: string, runWorkflowParamsDto: RunWorkflowParamsDto, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<RunPublicWorkflowResponseDto, any>>;
|
|
15763
15765
|
shareWithEveryone: (id: string, shareWithEveryoneControllerParamsDto: ShareWithEveryoneControllerParamsDto, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<WorkflowDto, any>>;
|
|
15764
15766
|
revokePublicAccess: (id: string, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<WorkflowDto, any>>;
|
|
15765
15767
|
getStatistics: (id: string, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<WorkflowStatisticsDto, any>>;
|
|
@@ -15839,8 +15841,8 @@ declare const apiDefinitions: {
|
|
|
15839
15841
|
};
|
|
15840
15842
|
naomi: {
|
|
15841
15843
|
v1: (hauteNaomiV1Request: HauteNaomiV1Request, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<HauteNaomiV1Response, any>>;
|
|
15842
|
-
train: any
|
|
15843
|
-
prepareDataset: any
|
|
15844
|
+
train: (hauteNaomiTrainV1Request: HauteNaomiTrainV1Request, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<HauteNaomiTrainV1Response, any>>;
|
|
15845
|
+
prepareDataset: (hauteNaomiPrepareDatasetV1Request: HauteNaomiPrepareDatasetV1Request, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<HauteNaomiPrepareDatasetV1Response, any>>;
|
|
15844
15846
|
};
|
|
15845
15847
|
};
|
|
15846
15848
|
ideogram: {
|
|
@@ -15961,6 +15963,7 @@ declare const apiDefinitions: {
|
|
|
15961
15963
|
wait: <O, T extends Omit<OperationEntity, "output"> & {
|
|
15962
15964
|
output: O extends unknown ? any : O;
|
|
15963
15965
|
}>(this: any, operation: T, timeoutMs?: number, delay?: number) => Promise<T>;
|
|
15966
|
+
waitById: (this: any, operationId: string, timeoutMs?: any, delay?: any) => Promise<OperationEntity>;
|
|
15964
15967
|
}>;
|
|
15965
15968
|
groups: ApiDefinitionTree<{
|
|
15966
15969
|
create: (options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<GroupEntity, any>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -12028,7 +12028,7 @@ type RunWorkflowParamsDtoMetadata = {
|
|
|
12028
12028
|
interface RunWorkflowParamsDto {
|
|
12029
12029
|
input: RunWorkflowParamsDtoInput;
|
|
12030
12030
|
metadata?: RunWorkflowParamsDtoMetadata;
|
|
12031
|
-
|
|
12031
|
+
versionNumber?: number;
|
|
12032
12032
|
}
|
|
12033
12033
|
|
|
12034
12034
|
/**
|
|
@@ -15440,9 +15440,10 @@ type WorkflowsRunV1InputMetadata = {
|
|
|
15440
15440
|
|
|
15441
15441
|
interface WorkflowsRunV1Input {
|
|
15442
15442
|
workflowId?: string;
|
|
15443
|
+
workflowAlias?: string;
|
|
15443
15444
|
input: WorkflowsRunV1InputInput;
|
|
15444
15445
|
metadata?: WorkflowsRunV1InputMetadata;
|
|
15445
|
-
|
|
15446
|
+
versionNumber?: number;
|
|
15446
15447
|
}
|
|
15447
15448
|
|
|
15448
15449
|
/**
|
|
@@ -15760,6 +15761,7 @@ declare const apiDefinitions: {
|
|
|
15760
15761
|
listPublic: (options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<PublicWorkflowSummaryDto[], any>>;
|
|
15761
15762
|
getPublic: (id: string, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<PublicWorkflowDto, any>>;
|
|
15762
15763
|
runPublic: (id: string, runWorkflowParamsDto: RunWorkflowParamsDto, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<RunPublicWorkflowResponseDto, any>>;
|
|
15764
|
+
runPublicByAlias: (alias: string, runWorkflowParamsDto: RunWorkflowParamsDto, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<RunPublicWorkflowResponseDto, any>>;
|
|
15763
15765
|
shareWithEveryone: (id: string, shareWithEveryoneControllerParamsDto: ShareWithEveryoneControllerParamsDto, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<WorkflowDto, any>>;
|
|
15764
15766
|
revokePublicAccess: (id: string, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<WorkflowDto, any>>;
|
|
15765
15767
|
getStatistics: (id: string, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<WorkflowStatisticsDto, any>>;
|
|
@@ -15839,8 +15841,8 @@ declare const apiDefinitions: {
|
|
|
15839
15841
|
};
|
|
15840
15842
|
naomi: {
|
|
15841
15843
|
v1: (hauteNaomiV1Request: HauteNaomiV1Request, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<HauteNaomiV1Response, any>>;
|
|
15842
|
-
train: any
|
|
15843
|
-
prepareDataset: any
|
|
15844
|
+
train: (hauteNaomiTrainV1Request: HauteNaomiTrainV1Request, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<HauteNaomiTrainV1Response, any>>;
|
|
15845
|
+
prepareDataset: (hauteNaomiPrepareDatasetV1Request: HauteNaomiPrepareDatasetV1Request, options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<HauteNaomiPrepareDatasetV1Response, any>>;
|
|
15844
15846
|
};
|
|
15845
15847
|
};
|
|
15846
15848
|
ideogram: {
|
|
@@ -15961,6 +15963,7 @@ declare const apiDefinitions: {
|
|
|
15961
15963
|
wait: <O, T extends Omit<OperationEntity, "output"> & {
|
|
15962
15964
|
output: O extends unknown ? any : O;
|
|
15963
15965
|
}>(this: any, operation: T, timeoutMs?: number, delay?: number) => Promise<T>;
|
|
15966
|
+
waitById: (this: any, operationId: string, timeoutMs?: any, delay?: any) => Promise<OperationEntity>;
|
|
15964
15967
|
}>;
|
|
15965
15968
|
groups: ApiDefinitionTree<{
|
|
15966
15969
|
create: (options?: axios.AxiosRequestConfig<any> | undefined) => Promise<axios.AxiosResponse<GroupEntity, any>>;
|
package/dist/index.js
CHANGED
|
@@ -11040,19 +11040,30 @@ var getWorkflows = () => {
|
|
|
11040
11040
|
options
|
|
11041
11041
|
);
|
|
11042
11042
|
};
|
|
11043
|
-
const
|
|
11043
|
+
const workflowsControllerGetPublicWorkflowByAliasV1 = (alias, options) => {
|
|
11044
11044
|
return axiosMutator(
|
|
11045
11045
|
{
|
|
11046
|
-
url: `/v1/workflows/public/${
|
|
11046
|
+
url: `/v1/workflows/public/alias/${alias}`,
|
|
11047
11047
|
method: "GET"
|
|
11048
11048
|
},
|
|
11049
11049
|
options
|
|
11050
11050
|
);
|
|
11051
11051
|
};
|
|
11052
|
-
const
|
|
11052
|
+
const workflowsControllerRunPublicWorkflowByAliasV1 = (alias, runWorkflowParamsDto, options) => {
|
|
11053
11053
|
return axiosMutator(
|
|
11054
11054
|
{
|
|
11055
|
-
url: `/v1/workflows/public/alias/${alias}`,
|
|
11055
|
+
url: `/v1/workflows/public/alias/${alias}/run`,
|
|
11056
|
+
method: "POST",
|
|
11057
|
+
headers: { "Content-Type": "application/json" },
|
|
11058
|
+
data: runWorkflowParamsDto
|
|
11059
|
+
},
|
|
11060
|
+
options
|
|
11061
|
+
);
|
|
11062
|
+
};
|
|
11063
|
+
const workflowsControllerGetPublicWorkflowV1 = (id, options) => {
|
|
11064
|
+
return axiosMutator(
|
|
11065
|
+
{
|
|
11066
|
+
url: `/v1/workflows/public/${id}`,
|
|
11056
11067
|
method: "GET"
|
|
11057
11068
|
},
|
|
11058
11069
|
options
|
|
@@ -11147,7 +11158,7 @@ var getWorkflows = () => {
|
|
|
11147
11158
|
options
|
|
11148
11159
|
);
|
|
11149
11160
|
};
|
|
11150
|
-
return { workflowsControllerCreateWorkflowV1, workflowsControllerListWorkflowsV1, workflowsControllerListPublicWorkflowsV1,
|
|
11161
|
+
return { workflowsControllerCreateWorkflowV1, workflowsControllerListWorkflowsV1, workflowsControllerListPublicWorkflowsV1, workflowsControllerGetPublicWorkflowByAliasV1, workflowsControllerRunPublicWorkflowByAliasV1, workflowsControllerGetPublicWorkflowV1, workflowsControllerRunPublicWorkflowV1, workflowsControllerShareWorkflowWithEveryoneV1, workflowsControllerRevokeWorkflowPublicAccessV1, workflowsControllerGetWorkflowV1, workflowsControllerUpdateWorkflowV1, workflowsControllerDeleteWorkflowV1, workflowsControllerRunWorkflowV1, workflowsControllerGetWorkflowSchemaV1, workflowsControllerGetSharedWorkflowStatisticsV1 };
|
|
11151
11162
|
};
|
|
11152
11163
|
|
|
11153
11164
|
// src/sdk/api-definitions/workflows.ts
|
|
@@ -11165,6 +11176,7 @@ var useWorkflowsApi = () => {
|
|
|
11165
11176
|
listPublic: hautechApi.workflowsControllerListPublicWorkflowsV1,
|
|
11166
11177
|
getPublic: hautechApi.workflowsControllerGetPublicWorkflowV1,
|
|
11167
11178
|
runPublic: hautechApi.workflowsControllerRunPublicWorkflowV1,
|
|
11179
|
+
runPublicByAlias: hautechApi.workflowsControllerRunPublicWorkflowByAliasV1,
|
|
11168
11180
|
shareWithEveryone: hautechApi.workflowsControllerShareWorkflowWithEveryoneV1,
|
|
11169
11181
|
revokePublicAccess: hautechApi.workflowsControllerRevokeWorkflowPublicAccessV1,
|
|
11170
11182
|
getStatistics: hautechApi.workflowsControllerGetSharedWorkflowStatisticsV1
|
|
@@ -12395,6 +12407,23 @@ var waitOperation = wrapCustomMethod(async function(operation, timeoutMs = 6e4,
|
|
|
12395
12407
|
}
|
|
12396
12408
|
throw new Error("Operation timed out");
|
|
12397
12409
|
});
|
|
12410
|
+
var waitOperationById = wrapCustomMethod(async function(operationId, timeoutMs = 6e4, delay2 = 3e3) {
|
|
12411
|
+
const deadline = Date.now() + timeoutMs;
|
|
12412
|
+
const sdk = this;
|
|
12413
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
12414
|
+
const poll = async (id) => {
|
|
12415
|
+
const op = await sdk.operations.get(id);
|
|
12416
|
+
if (!op) throw new Error("Operation not found");
|
|
12417
|
+
if (op.status !== "pending") return op;
|
|
12418
|
+
return null;
|
|
12419
|
+
};
|
|
12420
|
+
while (Date.now() < deadline) {
|
|
12421
|
+
const result = await poll(operationId);
|
|
12422
|
+
if (result) return result;
|
|
12423
|
+
await sleep(delay2);
|
|
12424
|
+
}
|
|
12425
|
+
throw new Error("Operation timed out");
|
|
12426
|
+
});
|
|
12398
12427
|
var useOperationsApi = () => {
|
|
12399
12428
|
const hautechApi = getOperations();
|
|
12400
12429
|
return useApi({
|
|
@@ -12427,8 +12456,8 @@ var useOperationsApi = () => {
|
|
|
12427
12456
|
},
|
|
12428
12457
|
naomi: {
|
|
12429
12458
|
v1: hautechApi.operationsControllerRunHauteNaomiV1V1,
|
|
12430
|
-
train: hautechApi.
|
|
12431
|
-
prepareDataset: hautechApi.
|
|
12459
|
+
train: hautechApi.operationsControllerRunHauteNaomiTrainV1V1,
|
|
12460
|
+
prepareDataset: hautechApi.operationsControllerRunHauteNaomiPrepareDatasetV1V1
|
|
12432
12461
|
}
|
|
12433
12462
|
},
|
|
12434
12463
|
ideogram: {
|
|
@@ -12546,7 +12575,8 @@ var useOperationsApi = () => {
|
|
|
12546
12575
|
getMany: hautechApi.operationsControllerGetOperationsV1,
|
|
12547
12576
|
list: hautechApi.operationsControllerListOperationsV1,
|
|
12548
12577
|
updateMetadata: hautechApi.operationsControllerUpdateMetadataV1,
|
|
12549
|
-
wait: waitOperation
|
|
12578
|
+
wait: waitOperation,
|
|
12579
|
+
waitById: waitOperationById
|
|
12550
12580
|
});
|
|
12551
12581
|
};
|
|
12552
12582
|
|