@skyvern/client 1.0.12 → 1.0.13

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.
@@ -210,6 +210,37 @@ export declare class SkyvernClient {
210
210
  */
211
211
  getRunTimeline(runId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowRunTimeline[]>;
212
212
  private __getRunTimeline;
213
+ /**
214
+ * @param {string} workflowPermanentId
215
+ * @param {Skyvern.GetWorkflowRequest} request
216
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
217
+ *
218
+ * @throws {@link Skyvern.UnprocessableEntityError}
219
+ *
220
+ * @example
221
+ * await client.getWorkflow("workflow_permanent_id", {
222
+ * version: 1,
223
+ * template: true
224
+ * })
225
+ */
226
+ getWorkflow(workflowPermanentId: string, request?: Skyvern.GetWorkflowRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.Workflow>;
227
+ private __getWorkflow;
228
+ /**
229
+ * Get all versions of a workflow by its permanent ID.
230
+ *
231
+ * @param {string} workflowPermanentId
232
+ * @param {Skyvern.GetWorkflowVersionsRequest} request
233
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
234
+ *
235
+ * @throws {@link Skyvern.UnprocessableEntityError}
236
+ *
237
+ * @example
238
+ * await client.getWorkflowVersions("workflow_permanent_id", {
239
+ * template: true
240
+ * })
241
+ */
242
+ getWorkflowVersions(workflowPermanentId: string, request?: Skyvern.GetWorkflowVersionsRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.Workflow[]>;
243
+ private __getWorkflowVersions;
213
244
  /**
214
245
  * @param {Skyvern.BodyUploadFileV1UploadFilePost} request
215
246
  * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -56,8 +56,8 @@ class SkyvernClient {
56
56
  "x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
57
57
  "X-Fern-Language": "JavaScript",
58
58
  "X-Fern-SDK-Name": "@skyvern/client",
59
- "X-Fern-SDK-Version": "1.0.12",
60
- "User-Agent": "@skyvern/client/1.0.12",
59
+ "X-Fern-SDK-Version": "1.0.13",
60
+ "User-Agent": "@skyvern/client/1.0.13",
61
61
  "X-Fern-Runtime": core.RUNTIME.type,
62
62
  "X-Fern-Runtime-Version": core.RUNTIME.version,
63
63
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -907,6 +907,142 @@ class SkyvernClient {
907
907
  }
908
908
  });
909
909
  }
910
+ /**
911
+ * @param {string} workflowPermanentId
912
+ * @param {Skyvern.GetWorkflowRequest} request
913
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
914
+ *
915
+ * @throws {@link Skyvern.UnprocessableEntityError}
916
+ *
917
+ * @example
918
+ * await client.getWorkflow("workflow_permanent_id", {
919
+ * version: 1,
920
+ * template: true
921
+ * })
922
+ */
923
+ getWorkflow(workflowPermanentId, request = {}, requestOptions) {
924
+ return core.HttpResponsePromise.fromPromise(this.__getWorkflow(workflowPermanentId, request, requestOptions));
925
+ }
926
+ __getWorkflow(workflowPermanentId_1) {
927
+ return __awaiter(this, arguments, void 0, function* (workflowPermanentId, request = {}, requestOptions) {
928
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
929
+ const { version, template } = request;
930
+ const _queryParams = {};
931
+ if (version != null) {
932
+ _queryParams.version = version.toString();
933
+ }
934
+ if (template != null) {
935
+ _queryParams.template = template.toString();
936
+ }
937
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "x-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
938
+ const _response = yield core.fetcher({
939
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SkyvernEnvironment.Cloud, `v1/workflows/${core.url.encodePathParam(workflowPermanentId)}`),
940
+ method: "GET",
941
+ headers: _headers,
942
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
943
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
944
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
945
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
946
+ });
947
+ if (_response.ok) {
948
+ return { data: _response.body, rawResponse: _response.rawResponse };
949
+ }
950
+ if (_response.error.reason === "status-code") {
951
+ switch (_response.error.statusCode) {
952
+ case 422:
953
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
954
+ default:
955
+ throw new errors.SkyvernError({
956
+ statusCode: _response.error.statusCode,
957
+ body: _response.error.body,
958
+ rawResponse: _response.rawResponse,
959
+ });
960
+ }
961
+ }
962
+ switch (_response.error.reason) {
963
+ case "non-json":
964
+ throw new errors.SkyvernError({
965
+ statusCode: _response.error.statusCode,
966
+ body: _response.error.rawBody,
967
+ rawResponse: _response.rawResponse,
968
+ });
969
+ case "timeout":
970
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/workflows/{workflow_permanent_id}.");
971
+ case "unknown":
972
+ throw new errors.SkyvernError({
973
+ message: _response.error.errorMessage,
974
+ rawResponse: _response.rawResponse,
975
+ });
976
+ }
977
+ });
978
+ }
979
+ /**
980
+ * Get all versions of a workflow by its permanent ID.
981
+ *
982
+ * @param {string} workflowPermanentId
983
+ * @param {Skyvern.GetWorkflowVersionsRequest} request
984
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
985
+ *
986
+ * @throws {@link Skyvern.UnprocessableEntityError}
987
+ *
988
+ * @example
989
+ * await client.getWorkflowVersions("workflow_permanent_id", {
990
+ * template: true
991
+ * })
992
+ */
993
+ getWorkflowVersions(workflowPermanentId, request = {}, requestOptions) {
994
+ return core.HttpResponsePromise.fromPromise(this.__getWorkflowVersions(workflowPermanentId, request, requestOptions));
995
+ }
996
+ __getWorkflowVersions(workflowPermanentId_1) {
997
+ return __awaiter(this, arguments, void 0, function* (workflowPermanentId, request = {}, requestOptions) {
998
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
999
+ const { template } = request;
1000
+ const _queryParams = {};
1001
+ if (template != null) {
1002
+ _queryParams.template = template.toString();
1003
+ }
1004
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "x-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
1005
+ const _response = yield core.fetcher({
1006
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SkyvernEnvironment.Cloud, `v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/versions`),
1007
+ method: "GET",
1008
+ headers: _headers,
1009
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
1010
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
1011
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
1012
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
1013
+ });
1014
+ if (_response.ok) {
1015
+ return { data: _response.body, rawResponse: _response.rawResponse };
1016
+ }
1017
+ if (_response.error.reason === "status-code") {
1018
+ switch (_response.error.statusCode) {
1019
+ case 422:
1020
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
1021
+ default:
1022
+ throw new errors.SkyvernError({
1023
+ statusCode: _response.error.statusCode,
1024
+ body: _response.error.body,
1025
+ rawResponse: _response.rawResponse,
1026
+ });
1027
+ }
1028
+ }
1029
+ switch (_response.error.reason) {
1030
+ case "non-json":
1031
+ throw new errors.SkyvernError({
1032
+ statusCode: _response.error.statusCode,
1033
+ body: _response.error.rawBody,
1034
+ rawResponse: _response.rawResponse,
1035
+ });
1036
+ case "timeout":
1037
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/workflows/{workflow_permanent_id}/versions.");
1038
+ case "unknown":
1039
+ throw new errors.SkyvernError({
1040
+ message: _response.error.errorMessage,
1041
+ rawResponse: _response.rawResponse,
1042
+ });
1043
+ }
1044
+ });
1045
+ }
910
1046
  /**
911
1047
  * @param {Skyvern.BodyUploadFileV1UploadFilePost} request
912
1048
  * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * version: 1,
5
+ * template: true
6
+ * }
7
+ */
8
+ export interface GetWorkflowRequest {
9
+ version?: number;
10
+ template?: boolean;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * template: true
5
+ * }
6
+ */
7
+ export interface GetWorkflowVersionsRequest {
8
+ template?: boolean;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,7 +11,9 @@ export type { DownloadFilesRequest } from "./DownloadFilesRequest.js";
11
11
  export type { GetCredentialsRequest } from "./GetCredentialsRequest.js";
12
12
  export type { GetRunArtifactsRequest } from "./GetRunArtifactsRequest.js";
13
13
  export type { GetScriptsRequest } from "./GetScriptsRequest.js";
14
+ export type { GetWorkflowRequest } from "./GetWorkflowRequest.js";
14
15
  export type { GetWorkflowsRequest } from "./GetWorkflowsRequest.js";
16
+ export type { GetWorkflowVersionsRequest } from "./GetWorkflowVersionsRequest.js";
15
17
  export type { ListBrowserProfilesRequest } from "./ListBrowserProfilesRequest.js";
16
18
  export type { LoginRequest } from "./LoginRequest.js";
17
19
  export type { RunSdkActionRequest } from "./RunSdkActionRequest.js";
@@ -14,6 +14,7 @@ export interface BillingStateResponse {
14
14
  topup_credits_used: number;
15
15
  topup_credits_remaining: number;
16
16
  credits_remaining: number;
17
+ cancel_at_period_end?: boolean;
17
18
  created_at: string;
18
19
  modified_at: string;
19
20
  }
@@ -2,5 +2,6 @@ export declare const FileType: {
2
2
  readonly Csv: "csv";
3
3
  readonly Excel: "excel";
4
4
  readonly Pdf: "pdf";
5
+ readonly Image: "image";
5
6
  };
6
7
  export type FileType = (typeof FileType)[keyof typeof FileType];
@@ -6,4 +6,5 @@ exports.FileType = {
6
6
  Csv: "csv",
7
7
  Excel: "excel",
8
8
  Pdf: "pdf",
9
+ Image: "image",
9
10
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.12";
1
+ export declare const SDK_VERSION = "1.0.13";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.0.12";
4
+ exports.SDK_VERSION = "1.0.13";
@@ -210,6 +210,37 @@ export declare class SkyvernClient {
210
210
  */
211
211
  getRunTimeline(runId: string, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.WorkflowRunTimeline[]>;
212
212
  private __getRunTimeline;
213
+ /**
214
+ * @param {string} workflowPermanentId
215
+ * @param {Skyvern.GetWorkflowRequest} request
216
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
217
+ *
218
+ * @throws {@link Skyvern.UnprocessableEntityError}
219
+ *
220
+ * @example
221
+ * await client.getWorkflow("workflow_permanent_id", {
222
+ * version: 1,
223
+ * template: true
224
+ * })
225
+ */
226
+ getWorkflow(workflowPermanentId: string, request?: Skyvern.GetWorkflowRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.Workflow>;
227
+ private __getWorkflow;
228
+ /**
229
+ * Get all versions of a workflow by its permanent ID.
230
+ *
231
+ * @param {string} workflowPermanentId
232
+ * @param {Skyvern.GetWorkflowVersionsRequest} request
233
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
234
+ *
235
+ * @throws {@link Skyvern.UnprocessableEntityError}
236
+ *
237
+ * @example
238
+ * await client.getWorkflowVersions("workflow_permanent_id", {
239
+ * template: true
240
+ * })
241
+ */
242
+ getWorkflowVersions(workflowPermanentId: string, request?: Skyvern.GetWorkflowVersionsRequest, requestOptions?: SkyvernClient.RequestOptions): core.HttpResponsePromise<Skyvern.Workflow[]>;
243
+ private __getWorkflowVersions;
213
244
  /**
214
245
  * @param {Skyvern.BodyUploadFileV1UploadFilePost} request
215
246
  * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -20,8 +20,8 @@ export class SkyvernClient {
20
20
  "x-api-key": _options === null || _options === void 0 ? void 0 : _options.apiKey,
21
21
  "X-Fern-Language": "JavaScript",
22
22
  "X-Fern-SDK-Name": "@skyvern/client",
23
- "X-Fern-SDK-Version": "1.0.12",
24
- "User-Agent": "@skyvern/client/1.0.12",
23
+ "X-Fern-SDK-Version": "1.0.13",
24
+ "User-Agent": "@skyvern/client/1.0.13",
25
25
  "X-Fern-Runtime": core.RUNTIME.type,
26
26
  "X-Fern-Runtime-Version": core.RUNTIME.version,
27
27
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -871,6 +871,142 @@ export class SkyvernClient {
871
871
  }
872
872
  });
873
873
  }
874
+ /**
875
+ * @param {string} workflowPermanentId
876
+ * @param {Skyvern.GetWorkflowRequest} request
877
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
878
+ *
879
+ * @throws {@link Skyvern.UnprocessableEntityError}
880
+ *
881
+ * @example
882
+ * await client.getWorkflow("workflow_permanent_id", {
883
+ * version: 1,
884
+ * template: true
885
+ * })
886
+ */
887
+ getWorkflow(workflowPermanentId, request = {}, requestOptions) {
888
+ return core.HttpResponsePromise.fromPromise(this.__getWorkflow(workflowPermanentId, request, requestOptions));
889
+ }
890
+ __getWorkflow(workflowPermanentId_1) {
891
+ return __awaiter(this, arguments, void 0, function* (workflowPermanentId, request = {}, requestOptions) {
892
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
893
+ const { version, template } = request;
894
+ const _queryParams = {};
895
+ if (version != null) {
896
+ _queryParams.version = version.toString();
897
+ }
898
+ if (template != null) {
899
+ _queryParams.template = template.toString();
900
+ }
901
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
902
+ const _response = yield core.fetcher({
903
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SkyvernEnvironment.Cloud, `v1/workflows/${core.url.encodePathParam(workflowPermanentId)}`),
904
+ method: "GET",
905
+ headers: _headers,
906
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
907
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
908
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
909
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
910
+ });
911
+ if (_response.ok) {
912
+ return { data: _response.body, rawResponse: _response.rawResponse };
913
+ }
914
+ if (_response.error.reason === "status-code") {
915
+ switch (_response.error.statusCode) {
916
+ case 422:
917
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
918
+ default:
919
+ throw new errors.SkyvernError({
920
+ statusCode: _response.error.statusCode,
921
+ body: _response.error.body,
922
+ rawResponse: _response.rawResponse,
923
+ });
924
+ }
925
+ }
926
+ switch (_response.error.reason) {
927
+ case "non-json":
928
+ throw new errors.SkyvernError({
929
+ statusCode: _response.error.statusCode,
930
+ body: _response.error.rawBody,
931
+ rawResponse: _response.rawResponse,
932
+ });
933
+ case "timeout":
934
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/workflows/{workflow_permanent_id}.");
935
+ case "unknown":
936
+ throw new errors.SkyvernError({
937
+ message: _response.error.errorMessage,
938
+ rawResponse: _response.rawResponse,
939
+ });
940
+ }
941
+ });
942
+ }
943
+ /**
944
+ * Get all versions of a workflow by its permanent ID.
945
+ *
946
+ * @param {string} workflowPermanentId
947
+ * @param {Skyvern.GetWorkflowVersionsRequest} request
948
+ * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
949
+ *
950
+ * @throws {@link Skyvern.UnprocessableEntityError}
951
+ *
952
+ * @example
953
+ * await client.getWorkflowVersions("workflow_permanent_id", {
954
+ * template: true
955
+ * })
956
+ */
957
+ getWorkflowVersions(workflowPermanentId, request = {}, requestOptions) {
958
+ return core.HttpResponsePromise.fromPromise(this.__getWorkflowVersions(workflowPermanentId, request, requestOptions));
959
+ }
960
+ __getWorkflowVersions(workflowPermanentId_1) {
961
+ return __awaiter(this, arguments, void 0, function* (workflowPermanentId, request = {}, requestOptions) {
962
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
963
+ const { template } = request;
964
+ const _queryParams = {};
965
+ if (template != null) {
966
+ _queryParams.template = template.toString();
967
+ }
968
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "x-api-key": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.apiKey) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.apiKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
969
+ const _response = yield core.fetcher({
970
+ url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.SkyvernEnvironment.Cloud, `v1/workflows/${core.url.encodePathParam(workflowPermanentId)}/versions`),
971
+ method: "GET",
972
+ headers: _headers,
973
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
974
+ timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
975
+ maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
976
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
977
+ });
978
+ if (_response.ok) {
979
+ return { data: _response.body, rawResponse: _response.rawResponse };
980
+ }
981
+ if (_response.error.reason === "status-code") {
982
+ switch (_response.error.statusCode) {
983
+ case 422:
984
+ throw new Skyvern.UnprocessableEntityError(_response.error.body, _response.rawResponse);
985
+ default:
986
+ throw new errors.SkyvernError({
987
+ statusCode: _response.error.statusCode,
988
+ body: _response.error.body,
989
+ rawResponse: _response.rawResponse,
990
+ });
991
+ }
992
+ }
993
+ switch (_response.error.reason) {
994
+ case "non-json":
995
+ throw new errors.SkyvernError({
996
+ statusCode: _response.error.statusCode,
997
+ body: _response.error.rawBody,
998
+ rawResponse: _response.rawResponse,
999
+ });
1000
+ case "timeout":
1001
+ throw new errors.SkyvernTimeoutError("Timeout exceeded when calling GET /v1/workflows/{workflow_permanent_id}/versions.");
1002
+ case "unknown":
1003
+ throw new errors.SkyvernError({
1004
+ message: _response.error.errorMessage,
1005
+ rawResponse: _response.rawResponse,
1006
+ });
1007
+ }
1008
+ });
1009
+ }
874
1010
  /**
875
1011
  * @param {Skyvern.BodyUploadFileV1UploadFilePost} request
876
1012
  * @param {SkyvernClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * version: 1,
5
+ * template: true
6
+ * }
7
+ */
8
+ export interface GetWorkflowRequest {
9
+ version?: number;
10
+ template?: boolean;
11
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * template: true
5
+ * }
6
+ */
7
+ export interface GetWorkflowVersionsRequest {
8
+ template?: boolean;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -11,7 +11,9 @@ export type { DownloadFilesRequest } from "./DownloadFilesRequest.mjs";
11
11
  export type { GetCredentialsRequest } from "./GetCredentialsRequest.mjs";
12
12
  export type { GetRunArtifactsRequest } from "./GetRunArtifactsRequest.mjs";
13
13
  export type { GetScriptsRequest } from "./GetScriptsRequest.mjs";
14
+ export type { GetWorkflowRequest } from "./GetWorkflowRequest.mjs";
14
15
  export type { GetWorkflowsRequest } from "./GetWorkflowsRequest.mjs";
16
+ export type { GetWorkflowVersionsRequest } from "./GetWorkflowVersionsRequest.mjs";
15
17
  export type { ListBrowserProfilesRequest } from "./ListBrowserProfilesRequest.mjs";
16
18
  export type { LoginRequest } from "./LoginRequest.mjs";
17
19
  export type { RunSdkActionRequest } from "./RunSdkActionRequest.mjs";
@@ -14,6 +14,7 @@ export interface BillingStateResponse {
14
14
  topup_credits_used: number;
15
15
  topup_credits_remaining: number;
16
16
  credits_remaining: number;
17
+ cancel_at_period_end?: boolean;
17
18
  created_at: string;
18
19
  modified_at: string;
19
20
  }
@@ -2,5 +2,6 @@ export declare const FileType: {
2
2
  readonly Csv: "csv";
3
3
  readonly Excel: "excel";
4
4
  readonly Pdf: "pdf";
5
+ readonly Image: "image";
5
6
  };
6
7
  export type FileType = (typeof FileType)[keyof typeof FileType];
@@ -3,4 +3,5 @@ export const FileType = {
3
3
  Csv: "csv",
4
4
  Excel: "excel",
5
5
  Pdf: "pdf",
6
+ Image: "image",
6
7
  };
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.0.12";
1
+ export declare const SDK_VERSION = "1.0.13";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.0.12";
1
+ export const SDK_VERSION = "1.0.13";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyvern/client",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",