windmill-client 0.1.0 → 0.2.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.
Files changed (100) hide show
  1. package/package.json +7 -2
  2. package/src/core/ApiError.d.ts +10 -0
  3. package/src/core/ApiRequestOptions.d.ts +13 -0
  4. package/src/core/ApiResult.d.ts +7 -0
  5. package/src/core/CancelablePromise.d.ts +26 -0
  6. package/src/core/OpenAPI.d.ts +16 -0
  7. package/src/core/request.d.ts +13 -0
  8. package/src/index.d.ts +95 -0
  9. package/src/models/AppWithLastVersion.d.ts +21 -0
  10. package/src/models/AppWithLastVersionWDraft.d.ts +5 -0
  11. package/src/models/AuditLog.d.ts +32 -0
  12. package/src/models/BranchAll.d.ts +10 -0
  13. package/src/models/BranchOne.d.ts +10 -0
  14. package/src/models/CompletedJob.d.ts +57 -0
  15. package/src/models/ContextualVariable.d.ts +5 -0
  16. package/src/models/CreateInput.d.ts +4 -0
  17. package/src/models/CreateResource.d.ts +6 -0
  18. package/src/models/CreateVariable.d.ts +8 -0
  19. package/src/models/CreateWorkspace.d.ts +5 -0
  20. package/src/models/EditResource.d.ts +5 -0
  21. package/src/models/EditResourceType.d.ts +4 -0
  22. package/src/models/EditSchedule.d.ts +6 -0
  23. package/src/models/EditVariable.d.ts +6 -0
  24. package/src/models/EditWorkspaceUser.d.ts +5 -0
  25. package/src/models/Flow.d.ts +3 -0
  26. package/src/models/FlowMetadata.d.ts +11 -0
  27. package/src/models/FlowModule.d.ts +18 -0
  28. package/src/models/FlowModuleValue.d.ts +8 -0
  29. package/src/models/FlowPreview.d.ts +7 -0
  30. package/src/models/FlowStatus.d.ts +12 -0
  31. package/src/models/FlowStatusModule.d.ts +34 -0
  32. package/src/models/FlowValue.d.ts +6 -0
  33. package/src/models/Folder.d.ts +5 -0
  34. package/src/models/ForloopFlow.d.ts +9 -0
  35. package/src/models/GlobalUserInfo.d.ts +14 -0
  36. package/src/models/Group.d.ts +6 -0
  37. package/src/models/Identity.d.ts +4 -0
  38. package/src/models/Input.d.ts +8 -0
  39. package/src/models/InputTransform.d.ts +3 -0
  40. package/src/models/JavascriptTransform.d.ts +4 -0
  41. package/src/models/Job.d.ts +11 -0
  42. package/src/models/ListableApp.d.ts +18 -0
  43. package/src/models/ListableResource.d.ts +14 -0
  44. package/src/models/ListableVariable.d.ts +14 -0
  45. package/src/models/Login.d.ts +4 -0
  46. package/src/models/MainArgSignature.d.ts +33 -0
  47. package/src/models/NewSchedule.d.ts +10 -0
  48. package/src/models/NewScript.d.ts +29 -0
  49. package/src/models/NewScriptWithDraft.d.ts +5 -0
  50. package/src/models/NewToken.d.ts +4 -0
  51. package/src/models/NewTokenImpersonate.d.ts +5 -0
  52. package/src/models/NewUser.d.ts +5 -0
  53. package/src/models/OpenFlow.d.ts +7 -0
  54. package/src/models/OpenFlowWPath.d.ts +4 -0
  55. package/src/models/PathFlow.d.ts +6 -0
  56. package/src/models/PathScript.d.ts +7 -0
  57. package/src/models/Policy.d.ts +13 -0
  58. package/src/models/Preview.d.ts +16 -0
  59. package/src/models/QueuedJob.d.ts +55 -0
  60. package/src/models/RawScript.d.ts +18 -0
  61. package/src/models/Resource.d.ts +9 -0
  62. package/src/models/ResourceType.d.ts +6 -0
  63. package/src/models/Retry.d.ts +11 -0
  64. package/src/models/RunnableType.d.ts +5 -0
  65. package/src/models/Schedule.d.ts +15 -0
  66. package/src/models/Script.d.ts +43 -0
  67. package/src/models/ScriptArgs.d.ts +1 -0
  68. package/src/models/SlackToken.d.ts +8 -0
  69. package/src/models/StaticTransform.d.ts +4 -0
  70. package/src/models/TokenResponse.d.ts +6 -0
  71. package/src/models/TruncatedToken.d.ts +7 -0
  72. package/src/models/UpdateInput.d.ts +5 -0
  73. package/src/models/Usage.d.ts +3 -0
  74. package/src/models/User.d.ts +14 -0
  75. package/src/models/UserWorkspaceList.d.ts +8 -0
  76. package/src/models/WorkerPing.d.ts +8 -0
  77. package/src/models/Workspace.d.ts +6 -0
  78. package/src/models/WorkspaceInvite.d.ts +6 -0
  79. package/src/services/AdminService.d.ts +39 -0
  80. package/src/services/AppService.d.ts +194 -0
  81. package/src/services/AuditService.d.ts +53 -0
  82. package/src/services/CaptureService.d.ts +30 -0
  83. package/src/services/DraftService.d.ts +16 -0
  84. package/src/services/FavoriteService.d.ts +27 -0
  85. package/src/services/FlowService.d.ts +186 -0
  86. package/src/services/FolderService.d.ts +128 -0
  87. package/src/services/GranularAclService.d.ts +46 -0
  88. package/src/services/GroupService.d.ts +110 -0
  89. package/src/services/InputService.d.ts +78 -0
  90. package/src/services/JobService.d.ts +636 -0
  91. package/src/services/OauthService.d.ts +95 -0
  92. package/src/services/ResourceService.d.ts +177 -0
  93. package/src/services/ScheduleService.d.ts +103 -0
  94. package/src/services/ScriptService.d.ts +303 -0
  95. package/src/services/SettingsService.d.ts +15 -0
  96. package/src/services/UserService.d.ts +284 -0
  97. package/src/services/VariableService.d.ts +83 -0
  98. package/src/services/WorkerService.d.ts +25 -0
  99. package/src/services/WorkspaceService.d.ts +227 -0
  100. package/tsconfig.json +111 -0
package/package.json CHANGED
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "name": "windmill-client",
3
3
  "description": "Windmill SDK client for browsers and Node.js",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
+ "author": "Ruben Fiszel",
6
+ "license": "Apache 2.0",
5
7
  "dependencies": {},
6
- "devDependencies": {}
8
+ "devDependencies": {},
9
+ "main": "dist/index.js",
10
+ "types": "dist/index.d.ts",
11
+ "prepublish": "tsc"
7
12
  }
@@ -0,0 +1,10 @@
1
+ import type { ApiRequestOptions } from './ApiRequestOptions';
2
+ import type { ApiResult } from './ApiResult';
3
+ export declare class ApiError extends Error {
4
+ readonly url: string;
5
+ readonly status: number;
6
+ readonly statusText: string;
7
+ readonly body: any;
8
+ readonly request: ApiRequestOptions;
9
+ constructor(request: ApiRequestOptions, response: ApiResult, message: string);
10
+ }
@@ -0,0 +1,13 @@
1
+ export type ApiRequestOptions = {
2
+ readonly method: 'GET' | 'PUT' | 'POST' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'PATCH';
3
+ readonly url: string;
4
+ readonly path?: Record<string, any>;
5
+ readonly cookies?: Record<string, any>;
6
+ readonly headers?: Record<string, any>;
7
+ readonly query?: Record<string, any>;
8
+ readonly formData?: Record<string, any>;
9
+ readonly body?: any;
10
+ readonly mediaType?: string;
11
+ readonly responseHeader?: string;
12
+ readonly errors?: Record<number, string>;
13
+ };
@@ -0,0 +1,7 @@
1
+ export type ApiResult = {
2
+ readonly url: string;
3
+ readonly ok: boolean;
4
+ readonly status: number;
5
+ readonly statusText: string;
6
+ readonly body: any;
7
+ };
@@ -0,0 +1,26 @@
1
+ export declare class CancelError extends Error {
2
+ constructor(message: string);
3
+ get isCancelled(): boolean;
4
+ }
5
+ export interface OnCancel {
6
+ readonly isResolved: boolean;
7
+ readonly isRejected: boolean;
8
+ readonly isCancelled: boolean;
9
+ (cancelHandler: () => void): void;
10
+ }
11
+ export declare class CancelablePromise<T> implements Promise<T> {
12
+ readonly [Symbol.toStringTag]: string;
13
+ private _isResolved;
14
+ private _isRejected;
15
+ private _isCancelled;
16
+ private readonly _cancelHandlers;
17
+ private readonly _promise;
18
+ private _resolve?;
19
+ private _reject?;
20
+ constructor(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, onCancel: OnCancel) => void);
21
+ then<TResult1 = T, TResult2 = never>(onFulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null, onRejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
22
+ catch<TResult = never>(onRejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null): Promise<T | TResult>;
23
+ finally(onFinally?: (() => void) | null): Promise<T>;
24
+ cancel(): void;
25
+ get isCancelled(): boolean;
26
+ }
@@ -0,0 +1,16 @@
1
+ import type { ApiRequestOptions } from './ApiRequestOptions';
2
+ type Resolver<T> = (options: ApiRequestOptions) => Promise<T>;
3
+ type Headers = Record<string, string>;
4
+ export type OpenAPIConfig = {
5
+ BASE: string;
6
+ VERSION: string;
7
+ WITH_CREDENTIALS: boolean;
8
+ CREDENTIALS: 'include' | 'omit' | 'same-origin';
9
+ TOKEN?: string | Resolver<string>;
10
+ USERNAME?: string | Resolver<string>;
11
+ PASSWORD?: string | Resolver<string>;
12
+ HEADERS?: Headers | Resolver<Headers>;
13
+ ENCODE_PATH?: (path: string) => string;
14
+ };
15
+ export declare const OpenAPI: OpenAPIConfig;
16
+ export {};
@@ -0,0 +1,13 @@
1
+ import type { ApiRequestOptions } from './ApiRequestOptions';
2
+ import { CancelablePromise } from './CancelablePromise';
3
+ import type { OnCancel } from './CancelablePromise';
4
+ import type { OpenAPIConfig } from './OpenAPI';
5
+ export declare const sendRequest: (config: OpenAPIConfig, options: ApiRequestOptions, url: string, body: any, formData: FormData | undefined, headers: Headers, onCancel: OnCancel) => Promise<Response>;
6
+ /**
7
+ * Request method
8
+ * @param config The OpenAPI configuration object
9
+ * @param options The request options from the service
10
+ * @returns CancelablePromise<T>
11
+ * @throws ApiError
12
+ */
13
+ export declare const request: <T>(config: OpenAPIConfig, options: ApiRequestOptions) => CancelablePromise<T>;
package/src/index.d.ts ADDED
@@ -0,0 +1,95 @@
1
+ export { ApiError } from './core/ApiError';
2
+ export { CancelablePromise, CancelError } from './core/CancelablePromise';
3
+ export { OpenAPI } from './core/OpenAPI';
4
+ export type { OpenAPIConfig } from './core/OpenAPI';
5
+ export { AppWithLastVersion } from './models/AppWithLastVersion';
6
+ export type { AppWithLastVersionWDraft } from './models/AppWithLastVersionWDraft';
7
+ export { AuditLog } from './models/AuditLog';
8
+ export type { BranchAll } from './models/BranchAll';
9
+ export type { BranchOne } from './models/BranchOne';
10
+ export { CompletedJob } from './models/CompletedJob';
11
+ export type { ContextualVariable } from './models/ContextualVariable';
12
+ export type { CreateInput } from './models/CreateInput';
13
+ export type { CreateResource } from './models/CreateResource';
14
+ export type { CreateVariable } from './models/CreateVariable';
15
+ export type { CreateWorkspace } from './models/CreateWorkspace';
16
+ export type { EditResource } from './models/EditResource';
17
+ export type { EditResourceType } from './models/EditResourceType';
18
+ export type { EditSchedule } from './models/EditSchedule';
19
+ export type { EditVariable } from './models/EditVariable';
20
+ export type { EditWorkspaceUser } from './models/EditWorkspaceUser';
21
+ export type { Flow } from './models/Flow';
22
+ export type { FlowMetadata } from './models/FlowMetadata';
23
+ export type { FlowModule } from './models/FlowModule';
24
+ export type { FlowModuleValue } from './models/FlowModuleValue';
25
+ export type { FlowPreview } from './models/FlowPreview';
26
+ export type { FlowStatus } from './models/FlowStatus';
27
+ export { FlowStatusModule } from './models/FlowStatusModule';
28
+ export type { FlowValue } from './models/FlowValue';
29
+ export type { Folder } from './models/Folder';
30
+ export type { ForloopFlow } from './models/ForloopFlow';
31
+ export { GlobalUserInfo } from './models/GlobalUserInfo';
32
+ export type { Group } from './models/Group';
33
+ export type { Identity } from './models/Identity';
34
+ export type { Input } from './models/Input';
35
+ export type { InputTransform } from './models/InputTransform';
36
+ export type { JavascriptTransform } from './models/JavascriptTransform';
37
+ export { Job } from './models/Job';
38
+ export { ListableApp } from './models/ListableApp';
39
+ export type { ListableResource } from './models/ListableResource';
40
+ export type { ListableVariable } from './models/ListableVariable';
41
+ export type { Login } from './models/Login';
42
+ export { MainArgSignature } from './models/MainArgSignature';
43
+ export type { NewSchedule } from './models/NewSchedule';
44
+ export { NewScript } from './models/NewScript';
45
+ export type { NewScriptWithDraft } from './models/NewScriptWithDraft';
46
+ export type { NewToken } from './models/NewToken';
47
+ export type { NewTokenImpersonate } from './models/NewTokenImpersonate';
48
+ export type { NewUser } from './models/NewUser';
49
+ export type { OpenFlow } from './models/OpenFlow';
50
+ export type { OpenFlowWPath } from './models/OpenFlowWPath';
51
+ export type { PathFlow } from './models/PathFlow';
52
+ export type { PathScript } from './models/PathScript';
53
+ export { Policy } from './models/Policy';
54
+ export { Preview } from './models/Preview';
55
+ export { QueuedJob } from './models/QueuedJob';
56
+ export { RawScript } from './models/RawScript';
57
+ export type { Resource } from './models/Resource';
58
+ export type { ResourceType } from './models/ResourceType';
59
+ export type { Retry } from './models/Retry';
60
+ export { RunnableType } from './models/RunnableType';
61
+ export type { Schedule } from './models/Schedule';
62
+ export { Script } from './models/Script';
63
+ export type { ScriptArgs } from './models/ScriptArgs';
64
+ export type { SlackToken } from './models/SlackToken';
65
+ export type { StaticTransform } from './models/StaticTransform';
66
+ export type { TokenResponse } from './models/TokenResponse';
67
+ export type { TruncatedToken } from './models/TruncatedToken';
68
+ export type { UpdateInput } from './models/UpdateInput';
69
+ export type { Usage } from './models/Usage';
70
+ export type { User } from './models/User';
71
+ export type { UserWorkspaceList } from './models/UserWorkspaceList';
72
+ export type { WorkerPing } from './models/WorkerPing';
73
+ export type { Workspace } from './models/Workspace';
74
+ export type { WorkspaceInvite } from './models/WorkspaceInvite';
75
+ export { AdminService } from './services/AdminService';
76
+ export { AppService } from './services/AppService';
77
+ export { AuditService } from './services/AuditService';
78
+ export { CaptureService } from './services/CaptureService';
79
+ export { DraftService } from './services/DraftService';
80
+ export { FavoriteService } from './services/FavoriteService';
81
+ export { FlowService } from './services/FlowService';
82
+ export { FolderService } from './services/FolderService';
83
+ export { GranularAclService } from './services/GranularAclService';
84
+ export { GroupService } from './services/GroupService';
85
+ export { InputService } from './services/InputService';
86
+ export { JobService } from './services/JobService';
87
+ export { OauthService } from './services/OauthService';
88
+ export { ResourceService } from './services/ResourceService';
89
+ export { ScheduleService } from './services/ScheduleService';
90
+ export { ScriptService } from './services/ScriptService';
91
+ export { SettingsService } from './services/SettingsService';
92
+ export { UserService } from './services/UserService';
93
+ export { VariableService } from './services/VariableService';
94
+ export { WorkerService } from './services/WorkerService';
95
+ export { WorkspaceService } from './services/WorkspaceService';
@@ -0,0 +1,21 @@
1
+ import type { Policy } from './Policy';
2
+ export type AppWithLastVersion = {
3
+ id: number;
4
+ workspace_id: string;
5
+ path: string;
6
+ summary: string;
7
+ versions: Array<number>;
8
+ created_by: string;
9
+ created_at: string;
10
+ value: any;
11
+ policy: Policy;
12
+ execution_mode: AppWithLastVersion.execution_mode;
13
+ extra_perms: Record<string, boolean>;
14
+ };
15
+ export declare namespace AppWithLastVersion {
16
+ enum execution_mode {
17
+ VIEWER = "viewer",
18
+ PUBLISHER = "publisher",
19
+ ANONYMOUS = "anonymous"
20
+ }
21
+ }
@@ -0,0 +1,5 @@
1
+ import type { AppWithLastVersion } from './AppWithLastVersion';
2
+ export type AppWithLastVersionWDraft = (AppWithLastVersion & {
3
+ draft_only?: boolean;
4
+ draft?: any;
5
+ });
@@ -0,0 +1,32 @@
1
+ export type AuditLog = {
2
+ id: number;
3
+ timestamp: string;
4
+ username: string;
5
+ operation: AuditLog.operation;
6
+ action_kind: AuditLog.action_kind;
7
+ resource?: string;
8
+ parameters?: any;
9
+ };
10
+ export declare namespace AuditLog {
11
+ enum operation {
12
+ JOBS_RUN = "jobs.run",
13
+ SCRIPTS_CREATE = "scripts.create",
14
+ SCRIPTS_UPDATE = "scripts.update",
15
+ USERS_CREATE = "users.create",
16
+ USERS_DELETE = "users.delete",
17
+ USERS_SETPASSWORD = "users.setpassword",
18
+ USERS_UPDATE = "users.update",
19
+ USERS_LOGIN = "users.login",
20
+ USERS_TOKEN_CREATE = "users.token.create",
21
+ USERS_TOKEN_DELETE = "users.token.delete",
22
+ VARIABLES_CREATE = "variables.create",
23
+ VARIABLES_DELETE = "variables.delete",
24
+ VARIABLES_UPDATE = "variables.update"
25
+ }
26
+ enum action_kind {
27
+ CREATED = "Created",
28
+ UPDATED = "Updated",
29
+ DELETE = "Delete",
30
+ EXECUTE = "Execute"
31
+ }
32
+ }
@@ -0,0 +1,10 @@
1
+ import type { FlowModule } from './FlowModule';
2
+ export type BranchAll = {
3
+ branches: Array<{
4
+ summary?: string;
5
+ skip_failure?: boolean;
6
+ modules: Array<FlowModule>;
7
+ }>;
8
+ type: 'branchall';
9
+ parallel?: boolean;
10
+ };
@@ -0,0 +1,10 @@
1
+ import type { FlowModule } from './FlowModule';
2
+ export type BranchOne = {
3
+ branches: Array<{
4
+ summary?: string;
5
+ expr: string;
6
+ modules: Array<FlowModule>;
7
+ }>;
8
+ default: Array<FlowModule>;
9
+ type: 'branchone';
10
+ };
@@ -0,0 +1,57 @@
1
+ import type { FlowStatus } from './FlowStatus';
2
+ import type { FlowValue } from './FlowValue';
3
+ import type { ScriptArgs } from './ScriptArgs';
4
+ export type CompletedJob = {
5
+ workspace_id?: string;
6
+ id: string;
7
+ parent_job?: string;
8
+ created_by: string;
9
+ created_at: string;
10
+ started_at: string;
11
+ duration_ms: number;
12
+ success: boolean;
13
+ script_path?: string;
14
+ script_hash?: string;
15
+ args?: ScriptArgs;
16
+ result?: any;
17
+ logs?: string;
18
+ deleted?: boolean;
19
+ raw_code?: string;
20
+ canceled: boolean;
21
+ canceled_by?: string;
22
+ canceled_reason?: string;
23
+ job_kind: CompletedJob.job_kind;
24
+ schedule_path?: string;
25
+ /**
26
+ * The user (u/userfoo) or group (g/groupfoo) whom
27
+ * the execution of this script will be permissioned_as and by extension its DT_TOKEN.
28
+ *
29
+ */
30
+ permissioned_as: string;
31
+ flow_status?: FlowStatus;
32
+ raw_flow?: FlowValue;
33
+ is_flow_step: boolean;
34
+ language?: CompletedJob.language;
35
+ is_skipped: boolean;
36
+ email: string;
37
+ visible_to_owner: boolean;
38
+ mem_peak?: number;
39
+ tag: string;
40
+ };
41
+ export declare namespace CompletedJob {
42
+ enum job_kind {
43
+ SCRIPT = "script",
44
+ PREVIEW = "preview",
45
+ DEPENDENCIES = "dependencies",
46
+ FLOW = "flow",
47
+ FLOWPREVIEW = "flowpreview",
48
+ SCRIPT_HUB = "script_hub",
49
+ IDENTITY = "identity"
50
+ }
51
+ enum language {
52
+ PYTHON3 = "python3",
53
+ DENO = "deno",
54
+ GO = "go",
55
+ BASH = "bash"
56
+ }
57
+ }
@@ -0,0 +1,5 @@
1
+ export type ContextualVariable = {
2
+ name: string;
3
+ value: string;
4
+ description: string;
5
+ };
@@ -0,0 +1,4 @@
1
+ export type CreateInput = {
2
+ name: string;
3
+ args: any;
4
+ };
@@ -0,0 +1,6 @@
1
+ export type CreateResource = {
2
+ path: string;
3
+ value: any;
4
+ description?: string;
5
+ resource_type: string;
6
+ };
@@ -0,0 +1,8 @@
1
+ export type CreateVariable = {
2
+ path: string;
3
+ value: string;
4
+ is_secret: boolean;
5
+ description: string;
6
+ account?: number;
7
+ is_oauth?: boolean;
8
+ };
@@ -0,0 +1,5 @@
1
+ export type CreateWorkspace = {
2
+ id: string;
3
+ name: string;
4
+ username: string;
5
+ };
@@ -0,0 +1,5 @@
1
+ export type EditResource = {
2
+ path?: string;
3
+ description?: string;
4
+ value?: any;
5
+ };
@@ -0,0 +1,4 @@
1
+ export type EditResourceType = {
2
+ schema?: string;
3
+ description?: string;
4
+ };
@@ -0,0 +1,6 @@
1
+ import type { ScriptArgs } from './ScriptArgs';
2
+ export type EditSchedule = {
3
+ schedule: string;
4
+ timezone: string;
5
+ args: ScriptArgs;
6
+ };
@@ -0,0 +1,6 @@
1
+ export type EditVariable = {
2
+ path?: string;
3
+ value?: string;
4
+ is_secret?: boolean;
5
+ description?: string;
6
+ };
@@ -0,0 +1,5 @@
1
+ export type EditWorkspaceUser = {
2
+ is_admin?: boolean;
3
+ operator?: boolean;
4
+ disabled?: boolean;
5
+ };
@@ -0,0 +1,3 @@
1
+ import type { FlowMetadata } from './FlowMetadata';
2
+ import type { OpenFlow } from './OpenFlow';
3
+ export type Flow = (OpenFlow & FlowMetadata);
@@ -0,0 +1,11 @@
1
+ export type FlowMetadata = {
2
+ workspace_id?: string;
3
+ path: string;
4
+ edited_by: string;
5
+ edited_at: string;
6
+ archived: boolean;
7
+ extra_perms: any;
8
+ additionalProperties?: boolean;
9
+ starred?: boolean;
10
+ draft_only?: boolean;
11
+ };
@@ -0,0 +1,18 @@
1
+ import type { FlowModuleValue } from './FlowModuleValue';
2
+ import type { InputTransform } from './InputTransform';
3
+ import type { Retry } from './Retry';
4
+ export type FlowModule = {
5
+ id: string;
6
+ value: FlowModuleValue;
7
+ stop_after_if?: {
8
+ skip_if_stopped?: boolean;
9
+ expr: string;
10
+ };
11
+ sleep?: InputTransform;
12
+ summary?: string;
13
+ suspend?: {
14
+ required_events?: number;
15
+ timeout?: number;
16
+ };
17
+ retry?: Retry;
18
+ };
@@ -0,0 +1,8 @@
1
+ import type { BranchAll } from './BranchAll';
2
+ import type { BranchOne } from './BranchOne';
3
+ import type { ForloopFlow } from './ForloopFlow';
4
+ import type { Identity } from './Identity';
5
+ import type { PathFlow } from './PathFlow';
6
+ import type { PathScript } from './PathScript';
7
+ import type { RawScript } from './RawScript';
8
+ export type FlowModuleValue = (RawScript | PathScript | PathFlow | ForloopFlow | BranchOne | BranchAll | Identity);
@@ -0,0 +1,7 @@
1
+ import type { FlowValue } from './FlowValue';
2
+ import type { ScriptArgs } from './ScriptArgs';
3
+ export type FlowPreview = {
4
+ value: FlowValue;
5
+ path?: string;
6
+ args: ScriptArgs;
7
+ };
@@ -0,0 +1,12 @@
1
+ import type { FlowStatusModule } from './FlowStatusModule';
2
+ export type FlowStatus = {
3
+ step: number;
4
+ modules: Array<FlowStatusModule>;
5
+ failure_module: (FlowStatusModule & {
6
+ parent_module?: string;
7
+ });
8
+ retry?: {
9
+ fail_count?: number;
10
+ failed_jobs?: Array<string>;
11
+ };
12
+ };
@@ -0,0 +1,34 @@
1
+ export type FlowStatusModule = {
2
+ type: FlowStatusModule.type;
3
+ id?: string;
4
+ job?: string;
5
+ count?: number;
6
+ iterator?: {
7
+ index?: number;
8
+ itered?: Array<any>;
9
+ args?: any;
10
+ };
11
+ flow_jobs?: Array<string>;
12
+ branch_chosen?: {
13
+ type: FlowStatusModule.type;
14
+ branch?: number;
15
+ };
16
+ branchall?: {
17
+ branch: number;
18
+ len: number;
19
+ };
20
+ approvers?: Array<{
21
+ resume_id: number;
22
+ approver: string;
23
+ }>;
24
+ };
25
+ export declare namespace FlowStatusModule {
26
+ enum type {
27
+ WAITING_FOR_PRIOR_STEPS = "WaitingForPriorSteps",
28
+ WAITING_FOR_EVENTS = "WaitingForEvents",
29
+ WAITING_FOR_EXECUTOR = "WaitingForExecutor",
30
+ IN_PROGRESS = "InProgress",
31
+ SUCCESS = "Success",
32
+ FAILURE = "Failure"
33
+ }
34
+ }
@@ -0,0 +1,6 @@
1
+ import type { FlowModule } from './FlowModule';
2
+ export type FlowValue = {
3
+ modules: Array<FlowModule>;
4
+ failure_module?: FlowModule;
5
+ same_worker?: boolean;
6
+ };
@@ -0,0 +1,5 @@
1
+ export type Folder = {
2
+ name: string;
3
+ owners: Array<string>;
4
+ extra_perms: Record<string, boolean>;
5
+ };
@@ -0,0 +1,9 @@
1
+ import type { FlowModule } from './FlowModule';
2
+ import type { InputTransform } from './InputTransform';
3
+ export type ForloopFlow = {
4
+ modules: Array<FlowModule>;
5
+ iterator: InputTransform;
6
+ skip_failures: boolean;
7
+ type: 'forloopflow';
8
+ parallel?: boolean;
9
+ };
@@ -0,0 +1,14 @@
1
+ export type GlobalUserInfo = {
2
+ email: string;
3
+ login_type: GlobalUserInfo.login_type;
4
+ super_admin: boolean;
5
+ verified: boolean;
6
+ name?: string;
7
+ company?: string;
8
+ };
9
+ export declare namespace GlobalUserInfo {
10
+ enum login_type {
11
+ PASSWORD = "password",
12
+ GITHUB = "github"
13
+ }
14
+ }
@@ -0,0 +1,6 @@
1
+ export type Group = {
2
+ name: string;
3
+ summary?: string;
4
+ members?: Array<string>;
5
+ extra_perms?: Record<string, boolean>;
6
+ };
@@ -0,0 +1,4 @@
1
+ export type Identity = {
2
+ type: 'identity';
3
+ flow?: boolean;
4
+ };
@@ -0,0 +1,8 @@
1
+ export type Input = {
2
+ id: string;
3
+ name: string;
4
+ args: any;
5
+ created_by: string;
6
+ created_at: string;
7
+ is_public: boolean;
8
+ };
@@ -0,0 +1,3 @@
1
+ import type { JavascriptTransform } from './JavascriptTransform';
2
+ import type { StaticTransform } from './StaticTransform';
3
+ export type InputTransform = (StaticTransform | JavascriptTransform);
@@ -0,0 +1,4 @@
1
+ export type JavascriptTransform = {
2
+ expr: string;
3
+ type: 'javascript';
4
+ };
@@ -0,0 +1,11 @@
1
+ import type { CompletedJob } from './CompletedJob';
2
+ import type { QueuedJob } from './QueuedJob';
3
+ export type Job = ((CompletedJob | QueuedJob) & {
4
+ type?: Job.type;
5
+ });
6
+ export declare namespace Job {
7
+ enum type {
8
+ COMPLETED_JOB = "CompletedJob",
9
+ QUEUED_JOB = "QueuedJob"
10
+ }
11
+ }
@@ -0,0 +1,18 @@
1
+ export type ListableApp = {
2
+ id: number;
3
+ workspace_id: string;
4
+ path: string;
5
+ summary: string;
6
+ version: number;
7
+ extra_perms: Record<string, boolean>;
8
+ starred?: boolean;
9
+ edited_at: string;
10
+ execution_mode: ListableApp.execution_mode;
11
+ };
12
+ export declare namespace ListableApp {
13
+ enum execution_mode {
14
+ VIEWER = "viewer",
15
+ PUBLISHER = "publisher",
16
+ ANONYMOUS = "anonymous"
17
+ }
18
+ }
@@ -0,0 +1,14 @@
1
+ export type ListableResource = {
2
+ workspace_id?: string;
3
+ path: string;
4
+ description?: string;
5
+ resource_type: string;
6
+ value?: any;
7
+ is_oauth: boolean;
8
+ extra_perms?: Record<string, boolean>;
9
+ is_expired?: boolean;
10
+ refresh_error?: string;
11
+ is_linked: boolean;
12
+ is_refreshed: boolean;
13
+ account?: number;
14
+ };