windmill-client 1.881.1 → 1.883.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/client.mjs +5 -1
- package/dist/core/OpenAPI.mjs +1 -1
- package/dist/index.js +16 -3
- package/dist/services.gen.d.ts +5 -0
- package/dist/services.gen.mjs +9 -1
- package/dist/sqlUtils.mjs +1 -0
- package/dist/types.gen.d.ts +42 -2
- package/package.json +1 -1
package/dist/client.mjs
CHANGED
|
@@ -150,7 +150,11 @@ async function runFlow(path = null, args = null, verbose = false, tag = null) {
|
|
|
150
150
|
*/
|
|
151
151
|
async function waitJob(jobId, verbose = false) {
|
|
152
152
|
while (true) {
|
|
153
|
-
const resultRes = await
|
|
153
|
+
const resultRes = await JobService.getCompletedJobResultMaybe({
|
|
154
|
+
workspace: getWorkspace(),
|
|
155
|
+
id: jobId,
|
|
156
|
+
waitForChild: true
|
|
157
|
+
});
|
|
154
158
|
const started = resultRes.started;
|
|
155
159
|
const completed = resultRes.completed;
|
|
156
160
|
const success = resultRes.success;
|
package/dist/core/OpenAPI.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -126,7 +126,7 @@ const OpenAPI = {
|
|
|
126
126
|
PASSWORD: void 0,
|
|
127
127
|
TOKEN: getEnv$1("WM_TOKEN"),
|
|
128
128
|
USERNAME: void 0,
|
|
129
|
-
VERSION: "1.
|
|
129
|
+
VERSION: "1.883.0",
|
|
130
130
|
WITH_CREDENTIALS: !getEnv$1("WM_RAW_APP"),
|
|
131
131
|
interceptors: {
|
|
132
132
|
request: new Interceptors(),
|
|
@@ -11582,6 +11582,11 @@ var JobService = class {
|
|
|
11582
11582
|
* @param data.workspace
|
|
11583
11583
|
* @param data.id
|
|
11584
11584
|
* @param data.getStarted
|
|
11585
|
+
* @param data.waitForChild Set by a job's SDK wait helpers when the calling job is blocked until this job, its
|
|
11586
|
+
* child, completes. If every worker of the child's tag is held by such a waiting parent,
|
|
11587
|
+
* the child can never start, and the request fails with 409 instead of the wait hanging.
|
|
11588
|
+
* Leave unset for a plain status read.
|
|
11589
|
+
*
|
|
11585
11590
|
* @returns unknown result
|
|
11586
11591
|
* @throws ApiError
|
|
11587
11592
|
*/
|
|
@@ -11593,7 +11598,10 @@ var JobService = class {
|
|
|
11593
11598
|
workspace: data.workspace,
|
|
11594
11599
|
id: data.id
|
|
11595
11600
|
},
|
|
11596
|
-
query: {
|
|
11601
|
+
query: {
|
|
11602
|
+
get_started: data.getStarted,
|
|
11603
|
+
wait_for_child: data.waitForChild
|
|
11604
|
+
}
|
|
11597
11605
|
});
|
|
11598
11606
|
}
|
|
11599
11607
|
/**
|
|
@@ -19771,6 +19779,7 @@ function buildSqlStatement(provider, content, contentBody, args) {
|
|
|
19771
19779
|
};
|
|
19772
19780
|
}
|
|
19773
19781
|
function serializeArgValue(v) {
|
|
19782
|
+
if (Array.isArray(v)) return v.map(serializeArgValue);
|
|
19774
19783
|
if (typeof v === "bigint") return v.toString();
|
|
19775
19784
|
if (v instanceof Date) return v.toISOString();
|
|
19776
19785
|
if (typeof v === "number" && !Number.isFinite(v)) {
|
|
@@ -20194,7 +20203,11 @@ async function runFlow(path = null, args = null, verbose = false, tag = null) {
|
|
|
20194
20203
|
*/
|
|
20195
20204
|
async function waitJob(jobId, verbose = false) {
|
|
20196
20205
|
while (true) {
|
|
20197
|
-
const resultRes = await
|
|
20206
|
+
const resultRes = await JobService.getCompletedJobResultMaybe({
|
|
20207
|
+
workspace: getWorkspace(),
|
|
20208
|
+
id: jobId,
|
|
20209
|
+
waitForChild: true
|
|
20210
|
+
});
|
|
20198
20211
|
const started = resultRes.started;
|
|
20199
20212
|
const completed = resultRes.completed;
|
|
20200
20213
|
const success = resultRes.success;
|
package/dist/services.gen.d.ts
CHANGED
|
@@ -5912,6 +5912,11 @@ export declare class JobService {
|
|
|
5912
5912
|
* @param data.workspace
|
|
5913
5913
|
* @param data.id
|
|
5914
5914
|
* @param data.getStarted
|
|
5915
|
+
* @param data.waitForChild Set by a job's SDK wait helpers when the calling job is blocked until this job, its
|
|
5916
|
+
* child, completes. If every worker of the child's tag is held by such a waiting parent,
|
|
5917
|
+
* the child can never start, and the request fails with 409 instead of the wait hanging.
|
|
5918
|
+
* Leave unset for a plain status read.
|
|
5919
|
+
*
|
|
5915
5920
|
* @returns unknown result
|
|
5916
5921
|
* @throws ApiError
|
|
5917
5922
|
*/
|
package/dist/services.gen.mjs
CHANGED
|
@@ -11214,6 +11214,11 @@ var JobService = class {
|
|
|
11214
11214
|
* @param data.workspace
|
|
11215
11215
|
* @param data.id
|
|
11216
11216
|
* @param data.getStarted
|
|
11217
|
+
* @param data.waitForChild Set by a job's SDK wait helpers when the calling job is blocked until this job, its
|
|
11218
|
+
* child, completes. If every worker of the child's tag is held by such a waiting parent,
|
|
11219
|
+
* the child can never start, and the request fails with 409 instead of the wait hanging.
|
|
11220
|
+
* Leave unset for a plain status read.
|
|
11221
|
+
*
|
|
11217
11222
|
* @returns unknown result
|
|
11218
11223
|
* @throws ApiError
|
|
11219
11224
|
*/
|
|
@@ -11225,7 +11230,10 @@ var JobService = class {
|
|
|
11225
11230
|
workspace: data.workspace,
|
|
11226
11231
|
id: data.id
|
|
11227
11232
|
},
|
|
11228
|
-
query: {
|
|
11233
|
+
query: {
|
|
11234
|
+
get_started: data.getStarted,
|
|
11235
|
+
wait_for_child: data.waitForChild
|
|
11236
|
+
}
|
|
11229
11237
|
});
|
|
11230
11238
|
}
|
|
11231
11239
|
/**
|
package/dist/sqlUtils.mjs
CHANGED
|
@@ -90,6 +90,7 @@ function buildSqlStatement(provider, content, contentBody, args) {
|
|
|
90
90
|
};
|
|
91
91
|
}
|
|
92
92
|
function serializeArgValue(v) {
|
|
93
|
+
if (Array.isArray(v)) return v.map(serializeArgValue);
|
|
93
94
|
if (typeof v === "bigint") return v.toString();
|
|
94
95
|
if (v instanceof Date) return v.toISOString();
|
|
95
96
|
if (typeof v === "number" && !Number.isFinite(v)) {
|
package/dist/types.gen.d.ts
CHANGED
|
@@ -1556,6 +1556,10 @@ export type ErrorHandlerConfig = {
|
|
|
1556
1556
|
extra_args?: ScriptArgs;
|
|
1557
1557
|
muted_on_cancel?: boolean;
|
|
1558
1558
|
muted_on_user_path?: boolean;
|
|
1559
|
+
/**
|
|
1560
|
+
* Skip jobs started from the UI, whose trigger kind is `ui`. Stored only when true.
|
|
1561
|
+
*/
|
|
1562
|
+
muted_on_ui_runs?: boolean;
|
|
1559
1563
|
};
|
|
1560
1564
|
/**
|
|
1561
1565
|
* Configuration for the workspace success handler
|
|
@@ -1582,6 +1586,10 @@ export type EditErrorHandlerNew = {
|
|
|
1582
1586
|
extra_args?: ScriptArgs;
|
|
1583
1587
|
muted_on_cancel?: boolean;
|
|
1584
1588
|
muted_on_user_path?: boolean;
|
|
1589
|
+
/**
|
|
1590
|
+
* Skip jobs started from the UI, whose trigger kind is `ui`. Omit to leave the stored value untouched.
|
|
1591
|
+
*/
|
|
1592
|
+
muted_on_ui_runs?: boolean;
|
|
1585
1593
|
/**
|
|
1586
1594
|
* Report failed jobs to the instance critical alert channels when no workspace error handler is set. Omit to leave the stored value untouched.
|
|
1587
1595
|
*/
|
|
@@ -11805,9 +11813,17 @@ export type ListOauthConnectsResponse = Array<{
|
|
|
11805
11813
|
name: string;
|
|
11806
11814
|
supports_client_credentials: boolean;
|
|
11807
11815
|
/**
|
|
11808
|
-
* The instance entry
|
|
11816
|
+
* The instance entry declares the authorization-code grant, so users can sign in with their own account when has_shared_credentials is also true.
|
|
11817
|
+
*/
|
|
11818
|
+
supports_authorization_code: boolean;
|
|
11819
|
+
/**
|
|
11820
|
+
* The instance entry holds a client id and secret users can connect with, for sign-in or as a shared service account.
|
|
11809
11821
|
*/
|
|
11810
11822
|
has_shared_credentials: boolean;
|
|
11823
|
+
/**
|
|
11824
|
+
* Users may connect as the instance entry's own app with its shared client credentials, with no sign-in.
|
|
11825
|
+
*/
|
|
11826
|
+
shares_client_credentials: boolean;
|
|
11811
11827
|
}>;
|
|
11812
11828
|
export type GetOauthConnectData = {
|
|
11813
11829
|
/**
|
|
@@ -16355,6 +16371,14 @@ export type GetCompletedJobResultResponse = unknown;
|
|
|
16355
16371
|
export type GetCompletedJobResultMaybeData = {
|
|
16356
16372
|
getStarted?: boolean;
|
|
16357
16373
|
id: string;
|
|
16374
|
+
/**
|
|
16375
|
+
* Set by a job's SDK wait helpers when the calling job is blocked until this job, its
|
|
16376
|
+
* child, completes. If every worker of the child's tag is held by such a waiting parent,
|
|
16377
|
+
* the child can never start, and the request fails with 409 instead of the wait hanging.
|
|
16378
|
+
* Leave unset for a plain status read.
|
|
16379
|
+
*
|
|
16380
|
+
*/
|
|
16381
|
+
waitForChild?: boolean;
|
|
16358
16382
|
workspace: string;
|
|
16359
16383
|
};
|
|
16360
16384
|
export type GetCompletedJobResultMaybeResponse = {
|
|
@@ -27123,9 +27147,17 @@ export type $OpenApiTs = {
|
|
|
27123
27147
|
name: string;
|
|
27124
27148
|
supports_client_credentials: boolean;
|
|
27125
27149
|
/**
|
|
27126
|
-
* The instance entry
|
|
27150
|
+
* The instance entry declares the authorization-code grant, so users can sign in with their own account when has_shared_credentials is also true.
|
|
27151
|
+
*/
|
|
27152
|
+
supports_authorization_code: boolean;
|
|
27153
|
+
/**
|
|
27154
|
+
* The instance entry holds a client id and secret users can connect with, for sign-in or as a shared service account.
|
|
27127
27155
|
*/
|
|
27128
27156
|
has_shared_credentials: boolean;
|
|
27157
|
+
/**
|
|
27158
|
+
* Users may connect as the instance entry's own app with its shared client credentials, with no sign-in.
|
|
27159
|
+
*/
|
|
27160
|
+
shares_client_credentials: boolean;
|
|
27129
27161
|
}>;
|
|
27130
27162
|
};
|
|
27131
27163
|
};
|
|
@@ -33945,6 +33977,14 @@ export type $OpenApiTs = {
|
|
|
33945
33977
|
req: {
|
|
33946
33978
|
getStarted?: boolean;
|
|
33947
33979
|
id: string;
|
|
33980
|
+
/**
|
|
33981
|
+
* Set by a job's SDK wait helpers when the calling job is blocked until this job, its
|
|
33982
|
+
* child, completes. If every worker of the child's tag is held by such a waiting parent,
|
|
33983
|
+
* the child can never start, and the request fails with 409 instead of the wait hanging.
|
|
33984
|
+
* Leave unset for a plain status read.
|
|
33985
|
+
*
|
|
33986
|
+
*/
|
|
33987
|
+
waitForChild?: boolean;
|
|
33948
33988
|
workspace: string;
|
|
33949
33989
|
};
|
|
33950
33990
|
res: {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "windmill-client",
|
|
3
3
|
"description": "Windmill SDK client for browsers and Node.js",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.883.0",
|
|
5
5
|
"author": "Ruben Fiszel",
|
|
6
6
|
"license": "Apache 2.0",
|
|
7
7
|
"homepage": "https://github.com/windmill-labs/windmill/tree/main/typescript-client#readme",
|