windmill-client 1.156.1 → 1.158.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.d.ts CHANGED
@@ -66,5 +66,23 @@ export declare function getVariable(path: string): Promise<string>;
66
66
  */
67
67
  export declare function setVariable(path: string, value: string, isSecretIfNotExist?: boolean, descriptionIfNotExist?: string): Promise<void>;
68
68
  export declare function databaseUrlFromResource(path: string): Promise<string>;
69
+ /**
70
+ * Get URLs needed for resuming a flow after this step
71
+ * @param approver approver name
72
+ * @returns approval page UI URL, resume and cancel API URLs for resumeing the flow
73
+ */
74
+ export declare function getResumeUrls(approver?: string): Promise<{
75
+ approvalPage: string;
76
+ resume: string;
77
+ cancel: string;
78
+ }>;
79
+ /**
80
+ * @deprecated use getResumeUrls instead
81
+ */
82
+ export declare function getResumeEndpoints(approver?: string): Promise<{
83
+ approvalPage: string;
84
+ resume: string;
85
+ cancel: string;
86
+ }>;
69
87
  export declare function base64ToUint8Array(data: string): Uint8Array;
70
88
  export declare function uint8ArrayToBase64(arrayBuffer: Uint8Array): string;
package/dist/client.js CHANGED
@@ -9,9 +9,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.uint8ArrayToBase64 = exports.base64ToUint8Array = exports.databaseUrlFromResource = exports.setVariable = exports.getVariable = exports.getState = exports.getInternalState = exports.setState = exports.setInternalState = exports.setResource = exports.getStatePath = exports.resolveDefaultResource = exports.getResource = exports.getWorkspace = exports.setClient = exports.SHARED_FOLDER = exports.WorkspaceService = exports.UserService = exports.SettingsService = exports.ScheduleService = exports.ScriptService = exports.VariableService = exports.ResourceService = exports.JobService = exports.GroupService = exports.GranularAclService = exports.FlowService = exports.AuditService = exports.AdminService = void 0;
12
+ exports.uint8ArrayToBase64 = exports.base64ToUint8Array = exports.getResumeEndpoints = exports.getResumeUrls = exports.databaseUrlFromResource = exports.setVariable = exports.getVariable = exports.getState = exports.getInternalState = exports.setState = exports.setInternalState = exports.setResource = exports.getStatePath = exports.resolveDefaultResource = exports.getResource = exports.getWorkspace = exports.setClient = exports.SHARED_FOLDER = exports.WorkspaceService = exports.UserService = exports.SettingsService = exports.ScheduleService = exports.ScriptService = exports.VariableService = exports.ResourceService = exports.JobService = exports.GroupService = exports.GranularAclService = exports.FlowService = exports.AuditService = exports.AdminService = void 0;
13
13
  const index_1 = require("./index");
14
14
  const index_2 = require("./index");
15
+ const src_1 = require("./src");
15
16
  var index_3 = require("./index");
16
17
  Object.defineProperty(exports, "AdminService", { enumerable: true, get: function () { return index_3.AdminService; } });
17
18
  Object.defineProperty(exports, "AuditService", { enumerable: true, get: function () { return index_3.AuditService; } });
@@ -256,25 +257,33 @@ function databaseUrlFromResource(path) {
256
257
  });
257
258
  }
258
259
  exports.databaseUrlFromResource = databaseUrlFromResource;
259
- // /**
260
- // * Get URLs needed for resuming a flow after this step
261
- // * @param approver approver name
262
- // * @returns approval page UI URL, resume and cancel API URLs for resumeing the flow
263
- // */
264
- // export async function getResumeUrls(approver?: string): Promise<{
265
- // approvalPage: string;
266
- // resume: string;
267
- // cancel: string;
268
- // }> {
269
- // const nonce = Math.floor(Math.random() * 4294967295);
270
- // const workspace = getWorkspace();
271
- // return await JobService.getResumeUrls({
272
- // workspace,
273
- // resumeId: nonce,
274
- // approver,
275
- // id: process.env.get("WM_JOB_ID") ?? "NO_JOB_ID",
276
- // });
277
- // }
260
+ /**
261
+ * Get URLs needed for resuming a flow after this step
262
+ * @param approver approver name
263
+ * @returns approval page UI URL, resume and cancel API URLs for resumeing the flow
264
+ */
265
+ function getResumeUrls(approver) {
266
+ var _a;
267
+ return __awaiter(this, void 0, void 0, function* () {
268
+ const nonce = Math.floor(Math.random() * 4294967295);
269
+ !clientSet && setClient();
270
+ const workspace = getWorkspace();
271
+ return yield src_1.JobService.getResumeUrls({
272
+ workspace,
273
+ resumeId: nonce,
274
+ approver,
275
+ id: (_a = getEnv("WM_JOB_ID")) !== null && _a !== void 0 ? _a : "NO_JOB_ID",
276
+ });
277
+ });
278
+ }
279
+ exports.getResumeUrls = getResumeUrls;
280
+ /**
281
+ * @deprecated use getResumeUrls instead
282
+ */
283
+ function getResumeEndpoints(approver) {
284
+ return getResumeUrls(approver);
285
+ }
286
+ exports.getResumeEndpoints = getResumeEndpoints;
278
287
  function base64ToUint8Array(data) {
279
288
  return Uint8Array.from(atob(data), (c) => c.charCodeAt(0));
280
289
  }
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OpenAPI = void 0;
4
4
  exports.OpenAPI = {
5
5
  BASE: '/api',
6
- VERSION: '1.156.1',
6
+ VERSION: '1.158.0',
7
7
  WITH_CREDENTIALS: false,
8
8
  CREDENTIALS: 'include',
9
9
  TOKEN: undefined,
@@ -45,6 +45,7 @@ export declare namespace CompletedJob {
45
45
  DEPENDENCIES = "dependencies",
46
46
  FLOW = "flow",
47
47
  FLOWDEPENDENCIES = "flowdependencies",
48
+ APPDEPENDENCIES = "appdependencies",
48
49
  FLOWPREVIEW = "flowpreview",
49
50
  SCRIPT_HUB = "script_hub",
50
51
  IDENTITY = "identity"
@@ -14,6 +14,7 @@ var CompletedJob;
14
14
  job_kind["DEPENDENCIES"] = "dependencies";
15
15
  job_kind["FLOW"] = "flow";
16
16
  job_kind["FLOWDEPENDENCIES"] = "flowdependencies";
17
+ job_kind["APPDEPENDENCIES"] = "appdependencies";
17
18
  job_kind["FLOWPREVIEW"] = "flowpreview";
18
19
  job_kind["SCRIPT_HUB"] = "script_hub";
19
20
  job_kind["IDENTITY"] = "identity";
@@ -42,6 +42,7 @@ export declare namespace QueuedJob {
42
42
  PREVIEW = "preview",
43
43
  DEPENDENCIES = "dependencies",
44
44
  FLOWDEPENDENCIES = "flowdependencies",
45
+ APPDEPENDENCIES = "appdependencies",
45
46
  FLOW = "flow",
46
47
  FLOWPREVIEW = "flowpreview",
47
48
  SCRIPT_HUB = "script_hub",
@@ -13,6 +13,7 @@ var QueuedJob;
13
13
  job_kind["PREVIEW"] = "preview";
14
14
  job_kind["DEPENDENCIES"] = "dependencies";
15
15
  job_kind["FLOWDEPENDENCIES"] = "flowdependencies";
16
+ job_kind["APPDEPENDENCIES"] = "appdependencies";
16
17
  job_kind["FLOW"] = "flow";
17
18
  job_kind["FLOWPREVIEW"] = "flowpreview";
18
19
  job_kind["SCRIPT_HUB"] = "script_hub";
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.156.1",
4
+ "version": "1.158.0",
5
5
  "author": "Ruben Fiszel",
6
6
  "license": "Apache 2.0",
7
7
  "devDependencies": {