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 MainArgSignature = {
6
+ type: MainArgSignature.type;
7
+ error: string;
8
+ star_args: boolean;
9
+ star_kwargs?: boolean;
10
+ args: Array<{
11
+ name: string;
12
+ typ: ('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | {
13
+ resource: string | null;
14
+ } | {
15
+ str: Array<string> | null;
16
+ } | {
17
+ object: Array<{
18
+ key: string;
19
+ typ: ('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | {
20
+ str: any;
21
+ });
22
+ }>;
23
+ } | {
24
+ list: ('float' | 'int' | 'bool' | 'email' | 'unknown' | 'bytes' | 'dict' | 'datetime' | 'sql' | {
25
+ str: any;
26
+ }) | null;
27
+ });
28
+ has_default?: boolean;
29
+ default?: any;
30
+ }>;
31
+ };
32
+
33
+ export namespace MainArgSignature {
34
+
35
+ export enum type {
36
+ VALID = 'Valid',
37
+ INVALID = 'Invalid',
38
+ }
39
+
40
+
41
+ }
42
+
@@ -0,0 +1,16 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { ScriptArgs } from './ScriptArgs';
6
+
7
+ export type NewSchedule = {
8
+ path: string;
9
+ schedule: string;
10
+ timezone: string;
11
+ script_path: string;
12
+ is_flow: boolean;
13
+ args: ScriptArgs;
14
+ enabled?: boolean;
15
+ };
16
+
@@ -0,0 +1,39 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type NewScript = {
6
+ path: string;
7
+ parent_hash?: string;
8
+ summary: string;
9
+ description: string;
10
+ content: string;
11
+ schema?: any;
12
+ is_template?: boolean;
13
+ lock?: Array<string>;
14
+ language: NewScript.language;
15
+ kind?: NewScript.kind;
16
+ tag?: string;
17
+ draft_only?: boolean;
18
+ };
19
+
20
+ export namespace NewScript {
21
+
22
+ export enum language {
23
+ PYTHON3 = 'python3',
24
+ DENO = 'deno',
25
+ GO = 'go',
26
+ BASH = 'bash',
27
+ }
28
+
29
+ export enum kind {
30
+ SCRIPT = 'script',
31
+ FAILURE = 'failure',
32
+ TRIGGER = 'trigger',
33
+ COMMAND = 'command',
34
+ APPROVAL = 'approval',
35
+ }
36
+
37
+
38
+ }
39
+
@@ -0,0 +1,11 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { NewScript } from './NewScript';
6
+
7
+ export type NewScriptWithDraft = (NewScript & {
8
+ draft?: NewScript;
9
+ hash: string;
10
+ });
11
+
@@ -0,0 +1,9 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type NewToken = {
6
+ label?: string;
7
+ expiration?: string;
8
+ };
9
+
@@ -0,0 +1,10 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type NewTokenImpersonate = {
6
+ label?: string;
7
+ expiration?: string;
8
+ impersonate_email: string;
9
+ };
10
+
@@ -0,0 +1,10 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type NewUser = {
6
+ email: string;
7
+ username: string;
8
+ is_admin: boolean;
9
+ };
10
+
@@ -0,0 +1,13 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { FlowValue } from './FlowValue';
6
+
7
+ export type OpenFlow = {
8
+ summary: string;
9
+ description?: string;
10
+ value: FlowValue;
11
+ schema?: any;
12
+ };
13
+
@@ -0,0 +1,10 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { OpenFlow } from './OpenFlow';
6
+
7
+ export type OpenFlowWPath = (OpenFlow & {
8
+ path: string;
9
+ });
10
+
@@ -0,0 +1,12 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { InputTransform } from './InputTransform';
6
+
7
+ export type PathFlow = {
8
+ input_transforms: Record<string, InputTransform>;
9
+ path: string;
10
+ type: 'flow';
11
+ };
12
+
@@ -0,0 +1,13 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { InputTransform } from './InputTransform';
6
+
7
+ export type PathScript = {
8
+ input_transforms: Record<string, InputTransform>;
9
+ path: string;
10
+ hash?: string;
11
+ type: 'script';
12
+ };
13
+
@@ -0,0 +1,22 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Policy = {
6
+ triggerables?: Record<string, any>;
7
+ execution_mode?: Policy.execution_mode;
8
+ on_behalf_of?: string;
9
+ on_behalf_of_email?: string;
10
+ };
11
+
12
+ export namespace Policy {
13
+
14
+ export enum execution_mode {
15
+ VIEWER = 'viewer',
16
+ PUBLISHER = 'publisher',
17
+ ANONYMOUS = 'anonymous',
18
+ }
19
+
20
+
21
+ }
22
+
@@ -0,0 +1,26 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { ScriptArgs } from './ScriptArgs';
6
+
7
+ export type Preview = {
8
+ content: string;
9
+ path?: string;
10
+ args: ScriptArgs;
11
+ language: Preview.language;
12
+ tag?: string;
13
+ };
14
+
15
+ export namespace Preview {
16
+
17
+ export enum language {
18
+ PYTHON3 = 'python3',
19
+ DENO = 'deno',
20
+ GO = 'go',
21
+ BASH = 'bash',
22
+ }
23
+
24
+
25
+ }
26
+
@@ -0,0 +1,66 @@
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 QueuedJob = {
10
+ workspace_id?: string;
11
+ id: string;
12
+ parent_job?: string;
13
+ created_by?: string;
14
+ created_at?: string;
15
+ started_at?: string;
16
+ scheduled_for?: string;
17
+ running: boolean;
18
+ script_path?: string;
19
+ script_hash?: string;
20
+ args?: ScriptArgs;
21
+ logs?: string;
22
+ raw_code?: string;
23
+ canceled: boolean;
24
+ canceled_by?: string;
25
+ canceled_reason?: string;
26
+ last_ping?: string;
27
+ job_kind: QueuedJob.job_kind;
28
+ schedule_path?: string;
29
+ /**
30
+ * The user (u/userfoo) or group (g/groupfoo) whom
31
+ * the execution of this script will be permissioned_as and by extension its DT_TOKEN.
32
+ *
33
+ */
34
+ permissioned_as: string;
35
+ flow_status?: FlowStatus;
36
+ raw_flow?: FlowValue;
37
+ is_flow_step: boolean;
38
+ language?: QueuedJob.language;
39
+ email: string;
40
+ visible_to_owner: boolean;
41
+ mem_peak?: number;
42
+ tag: string;
43
+ };
44
+
45
+ export namespace QueuedJob {
46
+
47
+ export enum job_kind {
48
+ SCRIPT = 'script',
49
+ PREVIEW = 'preview',
50
+ DEPENDENCIES = 'dependencies',
51
+ FLOW = 'flow',
52
+ FLOWPREVIEW = 'flowpreview',
53
+ SCRIPT_HUB = 'script_hub',
54
+ IDENTITY = 'identity',
55
+ }
56
+
57
+ export enum language {
58
+ PYTHON3 = 'python3',
59
+ DENO = 'deno',
60
+ GO = 'go',
61
+ BASH = 'bash',
62
+ }
63
+
64
+
65
+ }
66
+
@@ -0,0 +1,28 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { InputTransform } from './InputTransform';
6
+
7
+ export type RawScript = {
8
+ input_transforms: Record<string, InputTransform>;
9
+ content: string;
10
+ language: RawScript.language;
11
+ path?: string;
12
+ lock?: string;
13
+ type: 'rawscript';
14
+ tag?: string;
15
+ };
16
+
17
+ export namespace RawScript {
18
+
19
+ export enum language {
20
+ DENO = 'deno',
21
+ PYTHON3 = 'python3',
22
+ GO = 'go',
23
+ BASH = 'bash',
24
+ }
25
+
26
+
27
+ }
28
+
@@ -0,0 +1,14 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Resource = {
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
+ };
14
+
@@ -0,0 +1,11 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type ResourceType = {
6
+ workspace_id?: string;
7
+ name: string;
8
+ schema?: any;
9
+ description?: string;
10
+ };
11
+
@@ -0,0 +1,16 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Retry = {
6
+ constant?: {
7
+ attempts?: number;
8
+ seconds?: number;
9
+ };
10
+ exponential?: {
11
+ attempts?: number;
12
+ multiplier?: number;
13
+ seconds?: number;
14
+ };
15
+ };
16
+
@@ -0,0 +1,9 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export enum RunnableType {
6
+ SCRIPT_HASH = 'ScriptHash',
7
+ SCRIPT_PATH = 'ScriptPath',
8
+ FLOW_PATH = 'FlowPath',
9
+ }
@@ -0,0 +1,21 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { ScriptArgs } from './ScriptArgs';
6
+
7
+ export type Schedule = {
8
+ path: string;
9
+ edited_by: string;
10
+ edited_at: string;
11
+ schedule: string;
12
+ timezone: string;
13
+ enabled: boolean;
14
+ script_path: string;
15
+ is_flow: boolean;
16
+ args?: ScriptArgs;
17
+ extra_perms: Record<string, boolean>;
18
+ email: string;
19
+ error?: string;
20
+ };
21
+
@@ -0,0 +1,53 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Script = {
6
+ workspace_id?: string;
7
+ hash: string;
8
+ path: string;
9
+ /**
10
+ * The first element is the direct parent of the script, the second is the parent of the first, etc
11
+ *
12
+ */
13
+ parent_hashes?: Array<string>;
14
+ summary: string;
15
+ description: string;
16
+ content: string;
17
+ created_by: string;
18
+ created_at: string;
19
+ archived: boolean;
20
+ schema?: any;
21
+ deleted: boolean;
22
+ is_template: boolean;
23
+ extra_perms: Record<string, boolean>;
24
+ lock?: string;
25
+ lock_error_logs?: string;
26
+ language: Script.language;
27
+ kind: Script.kind;
28
+ starred: boolean;
29
+ tag?: string;
30
+ has_draft?: boolean;
31
+ draft_only?: boolean;
32
+ };
33
+
34
+ export namespace Script {
35
+
36
+ export enum language {
37
+ PYTHON3 = 'python3',
38
+ DENO = 'deno',
39
+ GO = 'go',
40
+ BASH = 'bash',
41
+ }
42
+
43
+ export enum kind {
44
+ SCRIPT = 'script',
45
+ FAILURE = 'failure',
46
+ TRIGGER = 'trigger',
47
+ COMMAND = 'command',
48
+ APPROVAL = 'approval',
49
+ }
50
+
51
+
52
+ }
53
+
@@ -0,0 +1,5 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type ScriptArgs = Record<string, any>;
@@ -0,0 +1,13 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type SlackToken = {
6
+ access_token: string;
7
+ team_id: string;
8
+ team_name: string;
9
+ bot: {
10
+ bot_access_token?: string;
11
+ };
12
+ };
13
+
@@ -0,0 +1,9 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type StaticTransform = {
6
+ value?: any;
7
+ type: 'static';
8
+ };
9
+
@@ -0,0 +1,11 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type TokenResponse = {
6
+ access_token: string;
7
+ expires_in?: number;
8
+ refresh_token?: string;
9
+ scope?: Array<string>;
10
+ };
11
+
@@ -0,0 +1,12 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type TruncatedToken = {
6
+ label?: string;
7
+ expiration?: string;
8
+ token_prefix: string;
9
+ created_at: string;
10
+ last_used_at: string;
11
+ };
12
+
@@ -0,0 +1,10 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type UpdateInput = {
6
+ id: string;
7
+ name: string;
8
+ is_public: boolean;
9
+ };
10
+
@@ -0,0 +1,8 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Usage = {
6
+ executions?: number;
7
+ };
8
+
@@ -0,0 +1,20 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ import type { Usage } from './Usage';
6
+
7
+ export type User = {
8
+ email: string;
9
+ username: string;
10
+ is_admin: boolean;
11
+ is_super_admin: boolean;
12
+ created_at: string;
13
+ operator: boolean;
14
+ disabled: boolean;
15
+ groups?: Array<string>;
16
+ folders: Array<string>;
17
+ folders_owners: Array<string>;
18
+ usage?: Usage;
19
+ };
20
+
@@ -0,0 +1,13 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type UserWorkspaceList = {
6
+ email: string;
7
+ workspaces: Array<{
8
+ id: string;
9
+ name: string;
10
+ username: string;
11
+ }>;
12
+ };
13
+
@@ -0,0 +1,13 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type WorkerPing = {
6
+ worker: string;
7
+ worker_instance: string;
8
+ last_ping?: number;
9
+ started_at: string;
10
+ ip: string;
11
+ jobs_executed: number;
12
+ };
13
+
@@ -0,0 +1,11 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type Workspace = {
6
+ id: string;
7
+ name: string;
8
+ owner: string;
9
+ domain?: string;
10
+ };
11
+
@@ -0,0 +1,11 @@
1
+ /* istanbul ignore file */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+
5
+ export type WorkspaceInvite = {
6
+ workspace_id: string;
7
+ email: string;
8
+ is_admin: boolean;
9
+ operator: boolean;
10
+ };
11
+