windmill-client 0.1.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/build.sh +7 -0
  2. package/package.json +7 -0
  3. package/src/core/ApiError.ts +24 -0
  4. package/src/core/ApiRequestOptions.ts +16 -0
  5. package/src/core/ApiResult.ts +10 -0
  6. package/src/core/CancelablePromise.ts +128 -0
  7. package/src/core/OpenAPI.ts +31 -0
  8. package/src/core/request.ts +308 -0
  9. package/src/index.ts +100 -0
  10. package/src/models/AppWithLastVersion.ts +31 -0
  11. package/src/models/AppWithLastVersionWDraft.ts +11 -0
  12. package/src/models/AuditLog.ts +42 -0
  13. package/src/models/BranchAll.ts +16 -0
  14. package/src/models/BranchOne.ts +16 -0
  15. package/src/models/CompletedJob.ts +68 -0
  16. package/src/models/ContextualVariable.ts +10 -0
  17. package/src/models/CreateInput.ts +9 -0
  18. package/src/models/CreateResource.ts +11 -0
  19. package/src/models/CreateVariable.ts +13 -0
  20. package/src/models/CreateWorkspace.ts +10 -0
  21. package/src/models/EditResource.ts +10 -0
  22. package/src/models/EditResourceType.ts +9 -0
  23. package/src/models/EditSchedule.ts +12 -0
  24. package/src/models/EditVariable.ts +11 -0
  25. package/src/models/EditWorkspaceUser.ts +10 -0
  26. package/src/models/Flow.ts +9 -0
  27. package/src/models/FlowMetadata.ts +16 -0
  28. package/src/models/FlowModule.ts +24 -0
  29. package/src/models/FlowModuleValue.ts +14 -0
  30. package/src/models/FlowPreview.ts +13 -0
  31. package/src/models/FlowStatus.ts +18 -0
  32. package/src/models/FlowStatusModule.ts +43 -0
  33. package/src/models/FlowValue.ts +12 -0
  34. package/src/models/Folder.ts +10 -0
  35. package/src/models/ForloopFlow.ts +15 -0
  36. package/src/models/GlobalUserInfo.ts +23 -0
  37. package/src/models/Group.ts +11 -0
  38. package/src/models/Identity.ts +9 -0
  39. package/src/models/Input.ts +13 -0
  40. package/src/models/InputTransform.ts +9 -0
  41. package/src/models/JavascriptTransform.ts +9 -0
  42. package/src/models/Job.ts +21 -0
  43. package/src/models/ListableApp.ts +27 -0
  44. package/src/models/ListableResource.ts +19 -0
  45. package/src/models/ListableVariable.ts +19 -0
  46. package/src/models/Login.ts +9 -0
  47. package/src/models/MainArgSignature.ts +42 -0
  48. package/src/models/NewSchedule.ts +16 -0
  49. package/src/models/NewScript.ts +39 -0
  50. package/src/models/NewScriptWithDraft.ts +11 -0
  51. package/src/models/NewToken.ts +9 -0
  52. package/src/models/NewTokenImpersonate.ts +10 -0
  53. package/src/models/NewUser.ts +10 -0
  54. package/src/models/OpenFlow.ts +13 -0
  55. package/src/models/OpenFlowWPath.ts +10 -0
  56. package/src/models/PathFlow.ts +12 -0
  57. package/src/models/PathScript.ts +13 -0
  58. package/src/models/Policy.ts +22 -0
  59. package/src/models/Preview.ts +26 -0
  60. package/src/models/QueuedJob.ts +66 -0
  61. package/src/models/RawScript.ts +28 -0
  62. package/src/models/Resource.ts +14 -0
  63. package/src/models/ResourceType.ts +11 -0
  64. package/src/models/Retry.ts +16 -0
  65. package/src/models/RunnableType.ts +9 -0
  66. package/src/models/Schedule.ts +21 -0
  67. package/src/models/Script.ts +53 -0
  68. package/src/models/ScriptArgs.ts +5 -0
  69. package/src/models/SlackToken.ts +13 -0
  70. package/src/models/StaticTransform.ts +9 -0
  71. package/src/models/TokenResponse.ts +11 -0
  72. package/src/models/TruncatedToken.ts +12 -0
  73. package/src/models/UpdateInput.ts +10 -0
  74. package/src/models/Usage.ts +8 -0
  75. package/src/models/User.ts +20 -0
  76. package/src/models/UserWorkspaceList.ts +13 -0
  77. package/src/models/WorkerPing.ts +13 -0
  78. package/src/models/Workspace.ts +11 -0
  79. package/src/models/WorkspaceInvite.ts +11 -0
  80. package/src/services/AdminService.ts +90 -0
  81. package/src/services/AppService.ts +383 -0
  82. package/src/services/AuditService.ts +103 -0
  83. package/src/services/CaptureService.ts +79 -0
  84. package/src/services/DraftService.ts +37 -0
  85. package/src/services/FavoriteService.ts +62 -0
  86. package/src/services/FlowService.ts +368 -0
  87. package/src/services/FolderService.ts +269 -0
  88. package/src/services/GranularAclService.ts +104 -0
  89. package/src/services/GroupService.ts +238 -0
  90. package/src/services/InputService.ts +175 -0
  91. package/src/services/JobService.ts +1247 -0
  92. package/src/services/OauthService.ts +197 -0
  93. package/src/services/ResourceService.ts +395 -0
  94. package/src/services/ScheduleService.ts +223 -0
  95. package/src/services/ScriptService.ts +601 -0
  96. package/src/services/SettingsService.ts +34 -0
  97. package/src/services/UserService.ts +574 -0
  98. package/src/services/VariableService.ts +194 -0
  99. package/src/services/WorkerService.ts +52 -0
  100. package/src/services/WorkspaceService.ts +446 -0
@@ -0,0 +1,42 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type AuditLog = {
6
+ id: number;
7
+ timestamp: string;
8
+ username: string;
9
+ operation: AuditLog.operation;
10
+ action_kind: AuditLog.action_kind;
11
+ resource?: string;
12
+ parameters?: any;
13
+ };
14
+
15
+ export namespace AuditLog {
16
+
17
+ export enum operation {
18
+ JOBS_RUN = 'jobs.run',
19
+ SCRIPTS_CREATE = 'scripts.create',
20
+ SCRIPTS_UPDATE = 'scripts.update',
21
+ USERS_CREATE = 'users.create',
22
+ USERS_DELETE = 'users.delete',
23
+ USERS_SETPASSWORD = 'users.setpassword',
24
+ USERS_UPDATE = 'users.update',
25
+ USERS_LOGIN = 'users.login',
26
+ USERS_TOKEN_CREATE = 'users.token.create',
27
+ USERS_TOKEN_DELETE = 'users.token.delete',
28
+ VARIABLES_CREATE = 'variables.create',
29
+ VARIABLES_DELETE = 'variables.delete',
30
+ VARIABLES_UPDATE = 'variables.update',
31
+ }
32
+
33
+ export enum action_kind {
34
+ CREATED = 'Created',
35
+ UPDATED = 'Updated',
36
+ DELETE = 'Delete',
37
+ EXECUTE = 'Execute',
38
+ }
39
+
40
+
41
+ }
42
+
@@ -0,0 +1,16 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { FlowModule } from './FlowModule';
6
+
7
+ export type BranchAll = {
8
+ branches: Array<{
9
+ summary?: string;
10
+ skip_failure?: boolean;
11
+ modules: Array<FlowModule>;
12
+ }>;
13
+ type: 'branchall';
14
+ parallel?: boolean;
15
+ };
16
+
@@ -0,0 +1,16 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { FlowModule } from './FlowModule';
6
+
7
+ export type BranchOne = {
8
+ branches: Array<{
9
+ summary?: string;
10
+ expr: string;
11
+ modules: Array<FlowModule>;
12
+ }>;
13
+ default: Array<FlowModule>;
14
+ type: 'branchone';
15
+ };
16
+
@@ -0,0 +1,68 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { FlowStatus } from './FlowStatus';
6
+ import type { FlowValue } from './FlowValue';
7
+ import type { ScriptArgs } from './ScriptArgs';
8
+
9
+ export type CompletedJob = {
10
+ workspace_id?: string;
11
+ id: string;
12
+ parent_job?: string;
13
+ created_by: string;
14
+ created_at: string;
15
+ started_at: string;
16
+ duration_ms: number;
17
+ success: boolean;
18
+ script_path?: string;
19
+ script_hash?: string;
20
+ args?: ScriptArgs;
21
+ result?: any;
22
+ logs?: string;
23
+ deleted?: boolean;
24
+ raw_code?: string;
25
+ canceled: boolean;
26
+ canceled_by?: string;
27
+ canceled_reason?: string;
28
+ job_kind: CompletedJob.job_kind;
29
+ schedule_path?: string;
30
+ /**
31
+ * The user (u/userfoo) or group (g/groupfoo) whom
32
+ * the execution of this script will be permissioned_as and by extension its DT_TOKEN.
33
+ *
34
+ */
35
+ permissioned_as: string;
36
+ flow_status?: FlowStatus;
37
+ raw_flow?: FlowValue;
38
+ is_flow_step: boolean;
39
+ language?: CompletedJob.language;
40
+ is_skipped: boolean;
41
+ email: string;
42
+ visible_to_owner: boolean;
43
+ mem_peak?: number;
44
+ tag: string;
45
+ };
46
+
47
+ export namespace CompletedJob {
48
+
49
+ export enum job_kind {
50
+ SCRIPT = 'script',
51
+ PREVIEW = 'preview',
52
+ DEPENDENCIES = 'dependencies',
53
+ FLOW = 'flow',
54
+ FLOWPREVIEW = 'flowpreview',
55
+ SCRIPT_HUB = 'script_hub',
56
+ IDENTITY = 'identity',
57
+ }
58
+
59
+ export enum language {
60
+ PYTHON3 = 'python3',
61
+ DENO = 'deno',
62
+ GO = 'go',
63
+ BASH = 'bash',
64
+ }
65
+
66
+
67
+ }
68
+
@@ -0,0 +1,10 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type ContextualVariable = {
6
+ name: string;
7
+ value: string;
8
+ description: string;
9
+ };
10
+
@@ -0,0 +1,9 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type CreateInput = {
6
+ name: string;
7
+ args: any;
8
+ };
9
+
@@ -0,0 +1,11 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type CreateResource = {
6
+ path: string;
7
+ value: any;
8
+ description?: string;
9
+ resource_type: string;
10
+ };
11
+
@@ -0,0 +1,13 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type CreateVariable = {
6
+ path: string;
7
+ value: string;
8
+ is_secret: boolean;
9
+ description: string;
10
+ account?: number;
11
+ is_oauth?: boolean;
12
+ };
13
+
@@ -0,0 +1,10 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type CreateWorkspace = {
6
+ id: string;
7
+ name: string;
8
+ username: string;
9
+ };
10
+
@@ -0,0 +1,10 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type EditResource = {
6
+ path?: string;
7
+ description?: string;
8
+ value?: any;
9
+ };
10
+
@@ -0,0 +1,9 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type EditResourceType = {
6
+ schema?: string;
7
+ description?: string;
8
+ };
9
+
@@ -0,0 +1,12 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { ScriptArgs } from './ScriptArgs';
6
+
7
+ export type EditSchedule = {
8
+ schedule: string;
9
+ timezone: string;
10
+ args: ScriptArgs;
11
+ };
12
+
@@ -0,0 +1,11 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type EditVariable = {
6
+ path?: string;
7
+ value?: string;
8
+ is_secret?: boolean;
9
+ description?: string;
10
+ };
11
+
@@ -0,0 +1,10 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type EditWorkspaceUser = {
6
+ is_admin?: boolean;
7
+ operator?: boolean;
8
+ disabled?: boolean;
9
+ };
10
+
@@ -0,0 +1,9 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { FlowMetadata } from './FlowMetadata';
6
+ import type { OpenFlow } from './OpenFlow';
7
+
8
+ export type Flow = (OpenFlow & FlowMetadata);
9
+
@@ -0,0 +1,16 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type FlowMetadata = {
6
+ workspace_id?: string;
7
+ path: string;
8
+ edited_by: string;
9
+ edited_at: string;
10
+ archived: boolean;
11
+ extra_perms: any;
12
+ additionalProperties?: boolean;
13
+ starred?: boolean;
14
+ draft_only?: boolean;
15
+ };
16
+
@@ -0,0 +1,24 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { FlowModuleValue } from './FlowModuleValue';
6
+ import type { InputTransform } from './InputTransform';
7
+ import type { Retry } from './Retry';
8
+
9
+ export type FlowModule = {
10
+ id: string;
11
+ value: FlowModuleValue;
12
+ stop_after_if?: {
13
+ skip_if_stopped?: boolean;
14
+ expr: string;
15
+ };
16
+ sleep?: InputTransform;
17
+ summary?: string;
18
+ suspend?: {
19
+ required_events?: number;
20
+ timeout?: number;
21
+ };
22
+ retry?: Retry;
23
+ };
24
+
@@ -0,0 +1,14 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { BranchAll } from './BranchAll';
6
+ import type { BranchOne } from './BranchOne';
7
+ import type { ForloopFlow } from './ForloopFlow';
8
+ import type { Identity } from './Identity';
9
+ import type { PathFlow } from './PathFlow';
10
+ import type { PathScript } from './PathScript';
11
+ import type { RawScript } from './RawScript';
12
+
13
+ export type FlowModuleValue = (RawScript | PathScript | PathFlow | ForloopFlow | BranchOne | BranchAll | Identity);
14
+
@@ -0,0 +1,13 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { FlowValue } from './FlowValue';
6
+ import type { ScriptArgs } from './ScriptArgs';
7
+
8
+ export type FlowPreview = {
9
+ value: FlowValue;
10
+ path?: string;
11
+ args: ScriptArgs;
12
+ };
13
+
@@ -0,0 +1,18 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { FlowStatusModule } from './FlowStatusModule';
6
+
7
+ export type FlowStatus = {
8
+ step: number;
9
+ modules: Array<FlowStatusModule>;
10
+ failure_module: (FlowStatusModule & {
11
+ parent_module?: string;
12
+ });
13
+ retry?: {
14
+ fail_count?: number;
15
+ failed_jobs?: Array<string>;
16
+ };
17
+ };
18
+
@@ -0,0 +1,43 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type FlowStatusModule = {
6
+ type: FlowStatusModule.type;
7
+ id?: string;
8
+ job?: string;
9
+ count?: number;
10
+ iterator?: {
11
+ index?: number;
12
+ itered?: Array<any>;
13
+ args?: any;
14
+ };
15
+ flow_jobs?: Array<string>;
16
+ branch_chosen?: {
17
+ type: FlowStatusModule.type;
18
+ branch?: number;
19
+ };
20
+ branchall?: {
21
+ branch: number;
22
+ len: number;
23
+ };
24
+ approvers?: Array<{
25
+ resume_id: number;
26
+ approver: string;
27
+ }>;
28
+ };
29
+
30
+ export namespace FlowStatusModule {
31
+
32
+ export enum type {
33
+ WAITING_FOR_PRIOR_STEPS = 'WaitingForPriorSteps',
34
+ WAITING_FOR_EVENTS = 'WaitingForEvents',
35
+ WAITING_FOR_EXECUTOR = 'WaitingForExecutor',
36
+ IN_PROGRESS = 'InProgress',
37
+ SUCCESS = 'Success',
38
+ FAILURE = 'Failure',
39
+ }
40
+
41
+
42
+ }
43
+
@@ -0,0 +1,12 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { FlowModule } from './FlowModule';
6
+
7
+ export type FlowValue = {
8
+ modules: Array<FlowModule>;
9
+ failure_module?: FlowModule;
10
+ same_worker?: boolean;
11
+ };
12
+
@@ -0,0 +1,10 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Folder = {
6
+ name: string;
7
+ owners: Array<string>;
8
+ extra_perms: Record<string, boolean>;
9
+ };
10
+
@@ -0,0 +1,15 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { FlowModule } from './FlowModule';
6
+ import type { InputTransform } from './InputTransform';
7
+
8
+ export type ForloopFlow = {
9
+ modules: Array<FlowModule>;
10
+ iterator: InputTransform;
11
+ skip_failures: boolean;
12
+ type: 'forloopflow';
13
+ parallel?: boolean;
14
+ };
15
+
@@ -0,0 +1,23 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type GlobalUserInfo = {
6
+ email: string;
7
+ login_type: GlobalUserInfo.login_type;
8
+ super_admin: boolean;
9
+ verified: boolean;
10
+ name?: string;
11
+ company?: string;
12
+ };
13
+
14
+ export namespace GlobalUserInfo {
15
+
16
+ export enum login_type {
17
+ PASSWORD = 'password',
18
+ GITHUB = 'github',
19
+ }
20
+
21
+
22
+ }
23
+
@@ -0,0 +1,11 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Group = {
6
+ name: string;
7
+ summary?: string;
8
+ members?: Array<string>;
9
+ extra_perms?: Record<string, boolean>;
10
+ };
11
+
@@ -0,0 +1,9 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Identity = {
6
+ type: 'identity';
7
+ flow?: boolean;
8
+ };
9
+
@@ -0,0 +1,13 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Input = {
6
+ id: string;
7
+ name: string;
8
+ args: any;
9
+ created_by: string;
10
+ created_at: string;
11
+ is_public: boolean;
12
+ };
13
+
@@ -0,0 +1,9 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { JavascriptTransform } from './JavascriptTransform';
6
+ import type { StaticTransform } from './StaticTransform';
7
+
8
+ export type InputTransform = (StaticTransform | JavascriptTransform);
9
+
@@ -0,0 +1,9 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type JavascriptTransform = {
6
+ expr: string;
7
+ type: 'javascript';
8
+ };
9
+
@@ -0,0 +1,21 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { CompletedJob } from './CompletedJob';
6
+ import type { QueuedJob } from './QueuedJob';
7
+
8
+ export type Job = ((CompletedJob | QueuedJob) & {
9
+ type?: Job.type;
10
+ });
11
+
12
+ export namespace Job {
13
+
14
+ export enum type {
15
+ COMPLETED_JOB = 'CompletedJob',
16
+ QUEUED_JOB = 'QueuedJob',
17
+ }
18
+
19
+
20
+ }
21
+
@@ -0,0 +1,27 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type ListableApp = {
6
+ id: number;
7
+ workspace_id: string;
8
+ path: string;
9
+ summary: string;
10
+ version: number;
11
+ extra_perms: Record<string, boolean>;
12
+ starred?: boolean;
13
+ edited_at: string;
14
+ execution_mode: ListableApp.execution_mode;
15
+ };
16
+
17
+ export namespace ListableApp {
18
+
19
+ export enum execution_mode {
20
+ VIEWER = 'viewer',
21
+ PUBLISHER = 'publisher',
22
+ ANONYMOUS = 'anonymous',
23
+ }
24
+
25
+
26
+ }
27
+
@@ -0,0 +1,19 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type ListableResource = {
6
+ workspace_id?: string;
7
+ path: string;
8
+ description?: string;
9
+ resource_type: string;
10
+ value?: any;
11
+ is_oauth: boolean;
12
+ extra_perms?: Record<string, boolean>;
13
+ is_expired?: boolean;
14
+ refresh_error?: string;
15
+ is_linked: boolean;
16
+ is_refreshed: boolean;
17
+ account?: number;
18
+ };
19
+
@@ -0,0 +1,19 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type ListableVariable = {
6
+ workspace_id: string;
7
+ path: string;
8
+ value?: string;
9
+ is_secret: boolean;
10
+ description?: string;
11
+ account?: number;
12
+ is_oauth?: boolean;
13
+ extra_perms: Record<string, boolean>;
14
+ is_expired?: boolean;
15
+ refresh_error?: string;
16
+ is_linked?: boolean;
17
+ is_refreshed?: boolean;
18
+ };
19
+
@@ -0,0 +1,9 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Login = {
6
+ email: string;
7
+ password: string;
8
+ };
9
+