windmill-client 1.292.3 → 1.293.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.js CHANGED
@@ -105,8 +105,8 @@ function getRootJobId(jobId) {
105
105
  });
106
106
  }
107
107
  exports.getRootJobId = getRootJobId;
108
- function runScript(path = null, hash_ = null, args = null, verbose = false) {
109
- return __awaiter(this, void 0, void 0, function* () {
108
+ function runScript() {
109
+ return __awaiter(this, arguments, void 0, function* (path = null, hash_ = null, args = null, verbose = false) {
110
110
  args = args || {};
111
111
  if (verbose) {
112
112
  console.info(`running \`${path}\` synchronously with args:`, args);
@@ -116,8 +116,8 @@ function runScript(path = null, hash_ = null, args = null, verbose = false) {
116
116
  });
117
117
  }
118
118
  exports.runScript = runScript;
119
- function waitJob(jobId, verbose = false) {
120
- return __awaiter(this, void 0, void 0, function* () {
119
+ function waitJob(jobId_1) {
120
+ return __awaiter(this, arguments, void 0, function* (jobId, verbose = false) {
121
121
  while (true) {
122
122
  // Implement your HTTP request logic here to get job result
123
123
  const resultRes = yield getResultMaybe(jobId);
@@ -194,8 +194,8 @@ function task(f) {
194
194
  });
195
195
  }
196
196
  exports.task = task;
197
- function runScriptAsync(path, hash_, args, scheduledInSeconds = null) {
198
- return __awaiter(this, void 0, void 0, function* () {
197
+ function runScriptAsync(path_1, hash_1, args_1) {
198
+ return __awaiter(this, arguments, void 0, function* (path, hash_, args, scheduledInSeconds = null) {
199
199
  !clientSet && setClient();
200
200
  // Create a script job and return its job id.
201
201
  if (path && hash_) {
@@ -452,8 +452,8 @@ exports.denoS3LightClientSettings = denoS3LightClientSettings;
452
452
  * console.log(text);
453
453
  * ```
454
454
  */
455
- function loadS3File(s3object, s3ResourcePath = undefined) {
456
- return __awaiter(this, void 0, void 0, function* () {
455
+ function loadS3File(s3object_1) {
456
+ return __awaiter(this, arguments, void 0, function* (s3object, s3ResourcePath = undefined) {
457
457
  !clientSet && setClient();
458
458
  const fileContentBlob = yield loadS3FileStream(s3object, s3ResourcePath);
459
459
  if (fileContentBlob === undefined) {
@@ -492,8 +492,8 @@ exports.loadS3File = loadS3File;
492
492
  * console.log(await fileContentBlob.text());
493
493
  * ```
494
494
  */
495
- function loadS3FileStream(s3object, s3ResourcePath = undefined) {
496
- return __awaiter(this, void 0, void 0, function* () {
495
+ function loadS3FileStream(s3object_1) {
496
+ return __awaiter(this, arguments, void 0, function* (s3object, s3ResourcePath = undefined) {
497
497
  !clientSet && setClient();
498
498
  let params = {};
499
499
  params["file_key"] = s3object.s3;
@@ -521,8 +521,8 @@ exports.loadS3FileStream = loadS3FileStream;
521
521
  * console.log(fileContentAsUtf8Str)
522
522
  * ```
523
523
  */
524
- function writeS3File(s3object, fileContent, s3ResourcePath = undefined) {
525
- return __awaiter(this, void 0, void 0, function* () {
524
+ function writeS3File(s3object_1, fileContent_1) {
525
+ return __awaiter(this, arguments, void 0, function* (s3object, fileContent, s3ResourcePath = undefined) {
526
526
  !clientSet && setClient();
527
527
  let fileContentBlob;
528
528
  if (typeof fileContent === "string") {
@@ -552,8 +552,8 @@ exports.writeS3File = writeS3File;
552
552
  * @returns approval page UI URL, resume and cancel API URLs for resuming the flow
553
553
  */
554
554
  function getResumeUrls(approver) {
555
- var _a;
556
555
  return __awaiter(this, void 0, void 0, function* () {
556
+ var _a;
557
557
  const nonce = Math.floor(Math.random() * 4294967295);
558
558
  !clientSet && setClient();
559
559
  const workspace = getWorkspace();
@@ -13,7 +13,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
13
13
  var _CancelablePromise_isResolved, _CancelablePromise_isRejected, _CancelablePromise_isCancelled, _CancelablePromise_cancelHandlers, _CancelablePromise_promise, _CancelablePromise_resolve, _CancelablePromise_reject;
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.CancelablePromise = exports.CancelError = void 0;
16
- /* generated using openapi-typescript-codegen -- do no edit */
16
+ /* generated using openapi-typescript-codegen -- do not edit */
17
17
  /* istanbul ignore file */
18
18
  /* tslint:disable */
19
19
  /* eslint-disable */
@@ -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.292.3',
6
+ VERSION: '1.293.0',
7
7
  WITH_CREDENTIALS: false,
8
8
  CREDENTIALS: 'include',
9
9
  TOKEN: undefined,
@@ -12,7 +12,7 @@ export declare const base64: (str: string) => string;
12
12
  export declare const getQueryString: (params: Record<string, any>) => string;
13
13
  export declare const getFormData: (options: ApiRequestOptions) => FormData | undefined;
14
14
  type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
15
- export declare const resolve: <T>(options: ApiRequestOptions, resolver?: T | Resolver<T> | undefined) => Promise<T | undefined>;
15
+ export declare const resolve: <T>(options: ApiRequestOptions, resolver?: T | Resolver<T>) => Promise<T | undefined>;
16
16
  export declare const getHeaders: (config: OpenAPIConfig, options: ApiRequestOptions) => Promise<Headers>;
17
17
  export declare const getRequestBody: (options: ApiRequestOptions) => any;
18
18
  export declare const sendRequest: (config: OpenAPIConfig, options: ApiRequestOptions, url: string, body: any, formData: FormData | undefined, headers: Headers, onCancel: OnCancel) => Promise<Response>;
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.request = exports.catchErrorCodes = exports.getResponseBody = exports.getResponseHeader = exports.sendRequest = exports.getRequestBody = exports.getHeaders = exports.resolve = exports.getFormData = exports.getQueryString = exports.base64 = exports.isFormData = exports.isBlob = exports.isStringWithValue = exports.isString = exports.isDefined = void 0;
13
- /* generated using openapi-typescript-codegen -- do no edit */
13
+ /* generated using openapi-typescript-codegen -- do not edit */
14
14
  /* istanbul ignore file */
15
15
  /* tslint:disable */
16
16
  /* eslint-disable */
@@ -151,7 +151,7 @@ const getHeaders = (config, options) => __awaiter(void 0, void 0, void 0, functi
151
151
  const credentials = (0, exports.base64)(`${username}:${password}`);
152
152
  headers['Authorization'] = `Basic ${credentials}`;
153
153
  }
154
- if (options.body) {
154
+ if (options.body !== undefined) {
155
155
  if (options.mediaType) {
156
156
  headers['Content-Type'] = options.mediaType;
157
157
  }
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VariableService = exports.UserService = exports.SettingsService = exports.SettingService = exports.ScriptService = exports.ScheduleService = exports.ResourceService = exports.RawAppService = exports.OidcService = exports.OauthService = exports.MetricsService = exports.JobService = exports.IntegrationService = exports.InputService = exports.HelpersService = exports.GroupService = exports.GranularAclService = exports.FolderService = exports.FlowService = exports.FavoriteService = exports.DraftService = exports.ConfigService = exports.ConcurrencyGroupsService = exports.CaptureService = exports.AuditService = exports.AppService = exports.AdminService = exports.WindmillFilePreview = exports.Script = exports.RunnableType = exports.RawScriptForDependencies = exports.RawScript = exports.QueuedJob = exports.Preview = exports.Policy = exports.NewScript = exports.MainArgSignature = exports.ListableApp = exports.LargeFileStorage = exports.Job = exports.GlobalUserInfo = exports.FlowStatusModule = exports.CompletedJob = exports.AuditLog = exports.AppWithLastVersion = exports.ActionKind = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.ApiError = void 0;
4
4
  exports.getRootJobId = exports.waitJob = exports.runScriptAsync = exports.runScript = exports.task = exports.writeS3File = exports.loadS3File = exports.loadS3FileStream = exports.denoS3LightClientSettings = exports.getIdToken = exports.getState = exports.setState = exports.getResumeUrls = exports.setResource = exports.getResource = exports.setVariable = exports.getVariable = exports.setClient = exports.WorkspaceService = exports.WorkerService = void 0;
5
- /* generated using openapi-typescript-codegen -- do no edit */
5
+ /* generated using openapi-typescript-codegen -- do not edit */
6
6
  /* istanbul ignore file */
7
7
  /* tslint:disable */
8
8
  /* eslint-disable */
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ActionKind = void 0;
4
- /* generated using openapi-typescript-codegen -- do no edit */
4
+ /* generated using openapi-typescript-codegen -- do not edit */
5
5
  /* istanbul ignore file */
6
6
  /* tslint:disable */
7
7
  /* eslint-disable */
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RunnableType = void 0;
4
- /* generated using openapi-typescript-codegen -- do no edit */
4
+ /* generated using openapi-typescript-codegen -- do not edit */
5
5
  /* istanbul ignore file */
6
6
  /* tslint:disable */
7
7
  /* eslint-disable */
@@ -62,6 +62,23 @@ export declare class SettingService {
62
62
  license_key: string;
63
63
  };
64
64
  }): CancelablePromise<string>;
65
+ /**
66
+ * test s3 config
67
+ * @returns string status
68
+ * @throws ApiError
69
+ */
70
+ static testS3Config({ requestBody, }: {
71
+ /**
72
+ * test s3 config
73
+ */
74
+ requestBody: {
75
+ bucket?: string;
76
+ region?: string;
77
+ access_key?: string;
78
+ secret_key?: string;
79
+ endpoint?: string;
80
+ };
81
+ }): CancelablePromise<string>;
65
82
  /**
66
83
  * send stats
67
84
  * @returns string status
@@ -71,6 +71,19 @@ class SettingService {
71
71
  mediaType: 'application/json',
72
72
  });
73
73
  }
74
+ /**
75
+ * test s3 config
76
+ * @returns string status
77
+ * @throws ApiError
78
+ */
79
+ static testS3Config({ requestBody, }) {
80
+ return (0, request_1.request)(OpenAPI_1.OpenAPI, {
81
+ method: 'POST',
82
+ url: '/settings/test_s3_config',
83
+ body: requestBody,
84
+ mediaType: 'application/json',
85
+ });
86
+ }
74
87
  /**
75
88
  * send stats
76
89
  * @returns string status
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.292.3",
4
+ "version": "1.293.0",
5
5
  "author": "Ruben Fiszel",
6
6
  "license": "Apache 2.0",
7
7
  "devDependencies": {