windmill-client 1.554.0 → 1.555.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.
@@ -18,6 +18,10 @@ export type FlowValue = {
18
18
  cache_ttl?: number;
19
19
  priority?: number;
20
20
  early_return?: string;
21
+ /**
22
+ * Whether this flow accepts chat-style input
23
+ */
24
+ chat_input_enabled?: boolean;
21
25
  };
22
26
  export type Retry = {
23
27
  constant?: {
@@ -221,6 +225,62 @@ export type FlowStatusModule = {
221
225
  })>;
222
226
  agent_actions_success?: Array<(boolean)>;
223
227
  };
228
+ export type FlowConversation = {
229
+ /**
230
+ * Unique identifier for the conversation
231
+ */
232
+ id: string;
233
+ /**
234
+ * The workspace ID where the conversation belongs
235
+ */
236
+ workspace_id: string;
237
+ /**
238
+ * Path of the flow this conversation is for
239
+ */
240
+ flow_path: string;
241
+ /**
242
+ * Optional title for the conversation
243
+ */
244
+ title?: string | null;
245
+ /**
246
+ * When the conversation was created
247
+ */
248
+ created_at: string;
249
+ /**
250
+ * When the conversation was last updated
251
+ */
252
+ updated_at: string;
253
+ /**
254
+ * Username who created the conversation
255
+ */
256
+ created_by: string;
257
+ };
258
+ export type FlowConversationMessage = {
259
+ /**
260
+ * Unique identifier for the message
261
+ */
262
+ id: string;
263
+ /**
264
+ * The conversation this message belongs to
265
+ */
266
+ conversation_id: string;
267
+ /**
268
+ * Type of the message
269
+ */
270
+ message_type: 'user' | 'assistant' | 'system';
271
+ /**
272
+ * The message content
273
+ */
274
+ content: string;
275
+ /**
276
+ * Associated job ID if this message came from a flow run
277
+ */
278
+ job_id?: string | null;
279
+ /**
280
+ * When the message was created
281
+ */
282
+ created_at: string;
283
+ };
224
284
  export type EndpointTool = {
225
285
  /**
226
286
  * The tool name/operation ID
@@ -1597,6 +1657,7 @@ export type UserWorkspaceList = {
1597
1657
  operator_settings?: OperatorSettings;
1598
1658
  parent_workspace_id?: string | null;
1599
1659
  created_by?: string | null;
1660
+ disabled: boolean;
1600
1661
  }>;
1601
1662
  };
1602
1663
  export type CreateWorkspace = {
@@ -4210,6 +4271,11 @@ export type GetPublicSecretOfAppData = {
4210
4271
  workspace: string;
4211
4272
  };
4212
4273
  export type GetPublicSecretOfAppResponse = string;
4274
+ export type GetPublicSecretOfLatestVersionOfAppData = {
4275
+ path: string;
4276
+ workspace: string;
4277
+ };
4278
+ export type GetPublicSecretOfLatestVersionOfAppResponse = string;
4213
4279
  export type GetAppByVersionData = {
4214
4280
  id: number;
4215
4281
  workspace: string;
@@ -4854,6 +4920,10 @@ export type RunWaitResultFlowByPathData = {
4854
4920
  * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
4855
4921
  */
4856
4922
  jobId?: string;
4923
+ /**
4924
+ * memory ID for chat-enabled flows
4925
+ */
4926
+ memoryId?: string;
4857
4927
  path: string;
4858
4928
  /**
4859
4929
  * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
@@ -4871,97 +4941,91 @@ export type RunWaitResultFlowByPathData = {
4871
4941
  workspace: string;
4872
4942
  };
4873
4943
  export type RunWaitResultFlowByPathResponse = unknown;
4874
- export type ResultByIdData = {
4875
- flowJobId: string;
4876
- nodeId: string;
4877
- workspace: string;
4878
- };
4879
- export type ResultByIdResponse = unknown;
4880
- export type RunFlowByPathData = {
4944
+ export type RunAndStreamFlowByPathData = {
4881
4945
  /**
4882
4946
  * List of headers's keys (separated with ',') whove value are added to the args
4883
4947
  * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
4884
4948
  *
4885
4949
  */
4886
4950
  includeHeader?: string;
4887
- /**
4888
- * make the run invisible to the the flow owner (default false)
4889
- */
4890
- invisibleToOwner?: boolean;
4891
4951
  /**
4892
4952
  * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
4893
4953
  */
4894
4954
  jobId?: string;
4895
4955
  /**
4896
- * The parent job that is at the origin and responsible for the execution of this script if any
4956
+ * memory ID for chat-enabled flows
4897
4957
  */
4898
- parentJob?: string;
4958
+ memoryId?: string;
4899
4959
  path: string;
4900
4960
  /**
4901
- * flow args
4961
+ * delay between polling for job updates in milliseconds
4902
4962
  */
4903
- requestBody: ScriptArgs;
4963
+ pollDelayMs?: number;
4904
4964
  /**
4905
- * when to schedule this job (leave empty for immediate run)
4965
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
4966
+ *
4906
4967
  */
4907
- scheduledFor?: string;
4968
+ queueLimit?: string;
4908
4969
  /**
4909
- * schedule the script to execute in the number of seconds starting now
4970
+ * flow args
4910
4971
  */
4911
- scheduledInSecs?: number;
4972
+ requestBody: ScriptArgs;
4912
4973
  /**
4913
4974
  * skip the preprocessor
4914
4975
  */
4915
4976
  skipPreprocessor?: boolean;
4916
- /**
4917
- * Override the tag to use
4918
- */
4919
- tag?: string;
4920
4977
  workspace: string;
4921
4978
  };
4922
- export type RunFlowByPathResponse = string;
4923
- export type BatchReRunJobsData = {
4979
+ export type RunAndStreamFlowByPathResponse = string;
4980
+ export type RunAndStreamFlowByPathGetData = {
4924
4981
  /**
4925
- * list of job ids to re run and arg tranforms
4982
+ * List of headers's keys (separated with ',') whove value are added to the args
4983
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
4984
+ *
4926
4985
  */
4927
- requestBody: {
4928
- job_ids: Array<(string)>;
4929
- script_options_by_path: {
4930
- [key: string]: {
4931
- input_transforms?: {
4932
- [key: string]: InputTransform;
4933
- };
4934
- use_latest_version?: boolean;
4935
- };
4936
- };
4937
- flow_options_by_path: {
4938
- [key: string]: {
4939
- input_transforms?: {
4940
- [key: string]: InputTransform;
4941
- };
4942
- use_latest_version?: boolean;
4943
- };
4944
- };
4945
- };
4986
+ includeHeader?: string;
4987
+ /**
4988
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
4989
+ */
4990
+ jobId?: string;
4991
+ /**
4992
+ * memory ID for chat-enabled flows
4993
+ */
4994
+ memoryId?: string;
4995
+ path: string;
4996
+ /**
4997
+ * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent
4998
+ * `encodeURIComponent(btoa(JSON.stringify({a: 2})))`
4999
+ *
5000
+ */
5001
+ payload?: string;
5002
+ /**
5003
+ * delay between polling for job updates in milliseconds
5004
+ */
5005
+ pollDelayMs?: number;
5006
+ /**
5007
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
5008
+ *
5009
+ */
5010
+ queueLimit?: string;
5011
+ /**
5012
+ * skip the preprocessor
5013
+ */
5014
+ skipPreprocessor?: boolean;
4946
5015
  workspace: string;
4947
5016
  };
4948
- export type BatchReRunJobsResponse = string;
4949
- export type RestartFlowAtStepData = {
5017
+ export type RunAndStreamFlowByPathGetResponse = string;
5018
+ export type RunAndStreamScriptByPathData = {
4950
5019
  /**
4951
- * for branchall or loop, the iteration at which the flow should restart
5020
+ * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
4952
5021
  */
4953
- branchOrIterationN: number;
4954
- id: string;
5022
+ cacheTtl?: string;
4955
5023
  /**
4956
5024
  * List of headers's keys (separated with ',') whove value are added to the args
4957
5025
  * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
4958
5026
  *
4959
5027
  */
4960
5028
  includeHeader?: string;
4961
- /**
4962
- * make the run invisible to the the flow owner (default false)
4963
- */
4964
- invisibleToOwner?: boolean;
4965
5029
  /**
4966
5030
  * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
4967
5031
  */
@@ -4970,45 +5034,42 @@ export type RestartFlowAtStepData = {
4970
5034
  * The parent job that is at the origin and responsible for the execution of this script if any
4971
5035
  */
4972
5036
  parentJob?: string;
5037
+ path: string;
4973
5038
  /**
4974
- * flow args
5039
+ * delay between polling for job updates in milliseconds
4975
5040
  */
4976
- requestBody: ScriptArgs;
5041
+ pollDelayMs?: number;
4977
5042
  /**
4978
- * when to schedule this job (leave empty for immediate run)
5043
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
5044
+ *
4979
5045
  */
4980
- scheduledFor?: string;
5046
+ queueLimit?: string;
4981
5047
  /**
4982
- * schedule the script to execute in the number of seconds starting now
5048
+ * script args
4983
5049
  */
4984
- scheduledInSecs?: number;
5050
+ requestBody: ScriptArgs;
4985
5051
  /**
4986
- * step id to restart the flow from
5052
+ * skip the preprocessor
4987
5053
  */
4988
- stepId: string;
5054
+ skipPreprocessor?: boolean;
4989
5055
  /**
4990
5056
  * Override the tag to use
4991
5057
  */
4992
5058
  tag?: string;
4993
5059
  workspace: string;
4994
5060
  };
4995
- export type RestartFlowAtStepResponse = string;
4996
- export type RunScriptByHashData = {
5061
+ export type RunAndStreamScriptByPathResponse = string;
5062
+ export type RunAndStreamScriptByPathGetData = {
4997
5063
  /**
4998
5064
  * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
4999
5065
  */
5000
5066
  cacheTtl?: string;
5001
- hash: string;
5002
5067
  /**
5003
5068
  * List of headers's keys (separated with ',') whove value are added to the args
5004
5069
  * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
5005
5070
  *
5006
5071
  */
5007
5072
  includeHeader?: string;
5008
- /**
5009
- * make the run invisible to the the script owner (default false)
5010
- */
5011
- invisibleToOwner?: boolean;
5012
5073
  /**
5013
5074
  * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
5014
5075
  */
@@ -5017,20 +5078,22 @@ export type RunScriptByHashData = {
5017
5078
  * The parent job that is at the origin and responsible for the execution of this script if any
5018
5079
  */
5019
5080
  parentJob?: string;
5081
+ path: string;
5020
5082
  /**
5021
- * Partially filled args
5083
+ * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent
5084
+ * `encodeURIComponent(btoa(JSON.stringify({a: 2})))`
5085
+ *
5022
5086
  */
5023
- requestBody: {
5024
- [key: string]: unknown;
5025
- };
5087
+ payload?: string;
5026
5088
  /**
5027
- * when to schedule this job (leave empty for immediate run)
5089
+ * delay between polling for job updates in milliseconds
5028
5090
  */
5029
- scheduledFor?: string;
5091
+ pollDelayMs?: number;
5030
5092
  /**
5031
- * schedule the script to execute in the number of seconds starting now
5093
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
5094
+ *
5032
5095
  */
5033
- scheduledInSecs?: number;
5096
+ queueLimit?: string;
5034
5097
  /**
5035
5098
  * skip the preprocessor
5036
5099
  */
@@ -5041,344 +5104,364 @@ export type RunScriptByHashData = {
5041
5104
  tag?: string;
5042
5105
  workspace: string;
5043
5106
  };
5044
- export type RunScriptByHashResponse = string;
5045
- export type RunScriptPreviewData = {
5107
+ export type RunAndStreamScriptByPathGetResponse = string;
5108
+ export type RunAndStreamScriptByHashData = {
5109
+ /**
5110
+ * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
5111
+ */
5112
+ cacheTtl?: string;
5113
+ hash: string;
5046
5114
  /**
5047
5115
  * List of headers's keys (separated with ',') whove value are added to the args
5048
5116
  * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
5049
5117
  *
5050
5118
  */
5051
5119
  includeHeader?: string;
5052
- /**
5053
- * make the run invisible to the the script owner (default false)
5054
- */
5055
- invisibleToOwner?: boolean;
5056
5120
  /**
5057
5121
  * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
5058
5122
  */
5059
5123
  jobId?: string;
5060
5124
  /**
5061
- * preview
5125
+ * The parent job that is at the origin and responsible for the execution of this script if any
5062
5126
  */
5063
- requestBody: Preview;
5064
- workspace: string;
5065
- };
5066
- export type RunScriptPreviewResponse = string;
5067
- export type RunScriptPreviewAndWaitResultData = {
5127
+ parentJob?: string;
5068
5128
  /**
5069
- * preview
5129
+ * delay between polling for job updates in milliseconds
5070
5130
  */
5071
- requestBody: Preview;
5072
- workspace: string;
5073
- };
5074
- export type RunScriptPreviewAndWaitResultResponse = unknown;
5075
- export type RunCodeWorkflowTaskData = {
5076
- entrypoint: string;
5077
- jobId: string;
5131
+ pollDelayMs?: number;
5078
5132
  /**
5079
- * preview
5133
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
5134
+ *
5080
5135
  */
5081
- requestBody: WorkflowTask;
5082
- workspace: string;
5083
- };
5084
- export type RunCodeWorkflowTaskResponse = string;
5085
- export type RunRawScriptDependenciesData = {
5136
+ queueLimit?: string;
5086
5137
  /**
5087
- * raw script content
5138
+ * script args
5088
5139
  */
5089
- requestBody: {
5090
- raw_scripts: Array<RawScriptForDependencies>;
5091
- entrypoint: string;
5092
- };
5140
+ requestBody: ScriptArgs;
5141
+ /**
5142
+ * skip the preprocessor
5143
+ */
5144
+ skipPreprocessor?: boolean;
5145
+ /**
5146
+ * Override the tag to use
5147
+ */
5148
+ tag?: string;
5093
5149
  workspace: string;
5094
5150
  };
5095
- export type RunRawScriptDependenciesResponse = {
5096
- lock: string;
5097
- };
5098
- export type RunFlowPreviewData = {
5151
+ export type RunAndStreamScriptByHashResponse = string;
5152
+ export type RunAndStreamScriptByHashGetData = {
5153
+ /**
5154
+ * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
5155
+ */
5156
+ cacheTtl?: string;
5157
+ hash: string;
5099
5158
  /**
5100
5159
  * List of headers's keys (separated with ',') whove value are added to the args
5101
5160
  * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
5102
5161
  *
5103
5162
  */
5104
5163
  includeHeader?: string;
5105
- /**
5106
- * make the run invisible to the the script owner (default false)
5107
- */
5108
- invisibleToOwner?: boolean;
5109
5164
  /**
5110
5165
  * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
5111
5166
  */
5112
5167
  jobId?: string;
5113
5168
  /**
5114
- * preview
5169
+ * The parent job that is at the origin and responsible for the execution of this script if any
5115
5170
  */
5116
- requestBody: FlowPreview;
5117
- workspace: string;
5118
- };
5119
- export type RunFlowPreviewResponse = string;
5120
- export type RunFlowPreviewAndWaitResultData = {
5171
+ parentJob?: string;
5121
5172
  /**
5122
- * preview
5173
+ * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent
5174
+ * `encodeURIComponent(btoa(JSON.stringify({a: 2})))`
5175
+ *
5123
5176
  */
5124
- requestBody: FlowPreview;
5125
- workspace: string;
5126
- };
5127
- export type RunFlowPreviewAndWaitResultResponse = unknown;
5128
- export type RunDynamicSelectData = {
5177
+ payload?: string;
5129
5178
  /**
5130
- * dynamic select request
5179
+ * delay between polling for job updates in milliseconds
5131
5180
  */
5132
- requestBody: DynamicInputData;
5133
- workspace: string;
5134
- };
5135
- export type RunDynamicSelectResponse = string;
5136
- export type ListQueueData = {
5137
- /**
5138
- * allow wildcards (*) in the filter of label, tag, worker
5139
- */
5140
- allowWildcards?: boolean;
5181
+ pollDelayMs?: number;
5141
5182
  /**
5142
- * get jobs from all workspaces (only valid if request come from the `admins` workspace)
5183
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
5184
+ *
5143
5185
  */
5144
- allWorkspaces?: boolean;
5186
+ queueLimit?: string;
5145
5187
  /**
5146
- * filter on jobs containing those args as a json subset (@> in postgres)
5188
+ * skip the preprocessor
5147
5189
  */
5148
- args?: string;
5190
+ skipPreprocessor?: boolean;
5149
5191
  /**
5150
- * mask to filter exact matching user creator
5192
+ * Override the tag to use
5151
5193
  */
5152
- createdBy?: string;
5194
+ tag?: string;
5195
+ workspace: string;
5196
+ };
5197
+ export type RunAndStreamScriptByHashGetResponse = string;
5198
+ export type ResultByIdData = {
5199
+ flowJobId: string;
5200
+ nodeId: string;
5201
+ workspace: string;
5202
+ };
5203
+ export type ResultByIdResponse = unknown;
5204
+ export type RunFlowByPathData = {
5153
5205
  /**
5154
- * is not a scheduled job
5206
+ * List of headers's keys (separated with ',') whove value are added to the args
5207
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
5208
+ *
5155
5209
  */
5156
- isNotSchedule?: boolean;
5210
+ includeHeader?: string;
5157
5211
  /**
5158
- * filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by,
5212
+ * make the run invisible to the the flow owner (default false)
5159
5213
  */
5160
- jobKinds?: string;
5214
+ invisibleToOwner?: boolean;
5161
5215
  /**
5162
- * order by desc order (default true)
5216
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
5163
5217
  */
5164
- orderDesc?: boolean;
5218
+ jobId?: string;
5165
5219
  /**
5166
- * which page to return (start at 1, default 1)
5220
+ * memory ID for chat-enabled flows
5167
5221
  */
5168
- page?: number;
5222
+ memoryId?: string;
5169
5223
  /**
5170
5224
  * The parent job that is at the origin and responsible for the execution of this script if any
5171
5225
  */
5172
5226
  parentJob?: string;
5227
+ path: string;
5173
5228
  /**
5174
- * number of items to return for a given page (default 30, max 100)
5175
- */
5176
- perPage?: number;
5177
- /**
5178
- * filter on jobs containing those result as a json subset (@> in postgres)
5179
- */
5180
- result?: string;
5181
- /**
5182
- * filter on running jobs
5183
- */
5184
- running?: boolean;
5185
- /**
5186
- * filter on jobs scheduled_for before now (hence waitinf for a worker)
5187
- */
5188
- scheduledForBeforeNow?: boolean;
5189
- /**
5190
- * mask to filter by schedule path
5191
- */
5192
- schedulePath?: string;
5193
- /**
5194
- * mask to filter exact matching path
5195
- */
5196
- scriptHash?: string;
5197
- /**
5198
- * mask to filter exact matching path
5199
- */
5200
- scriptPathExact?: string;
5201
- /**
5202
- * mask to filter matching starting path
5203
- */
5204
- scriptPathStart?: string;
5205
- /**
5206
- * filter on started after (exclusive) timestamp
5229
+ * flow args
5207
5230
  */
5208
- startedAfter?: string;
5231
+ requestBody: ScriptArgs;
5209
5232
  /**
5210
- * filter on started before (inclusive) timestamp
5233
+ * when to schedule this job (leave empty for immediate run)
5211
5234
  */
5212
- startedBefore?: string;
5235
+ scheduledFor?: string;
5213
5236
  /**
5214
- * filter on successful jobs
5237
+ * schedule the script to execute in the number of seconds starting now
5215
5238
  */
5216
- success?: boolean;
5239
+ scheduledInSecs?: number;
5217
5240
  /**
5218
- * filter on suspended jobs
5241
+ * skip the preprocessor
5219
5242
  */
5220
- suspended?: boolean;
5243
+ skipPreprocessor?: boolean;
5221
5244
  /**
5222
- * filter on jobs with a given tag/worker group
5245
+ * Override the tag to use
5223
5246
  */
5224
5247
  tag?: string;
5225
- /**
5226
- * worker this job was ran on
5227
- */
5228
- worker?: string;
5229
5248
  workspace: string;
5230
5249
  };
5231
- export type ListQueueResponse = Array<QueuedJob>;
5232
- export type GetQueueCountData = {
5250
+ export type RunFlowByPathResponse = string;
5251
+ export type BatchReRunJobsData = {
5233
5252
  /**
5234
- * get jobs from all workspaces (only valid if request come from the `admins` workspace)
5253
+ * list of job ids to re run and arg tranforms
5235
5254
  */
5236
- allWorkspaces?: boolean;
5237
- workspace: string;
5238
- };
5239
- export type GetQueueCountResponse = {
5240
- database_length: number;
5241
- suspended?: number;
5242
- };
5243
- export type GetCompletedCountData = {
5244
- workspace: string;
5245
- };
5246
- export type GetCompletedCountResponse = {
5247
- database_length: number;
5248
- };
5249
- export type CountCompletedJobsData = {
5250
- allWorkspaces?: boolean;
5251
- completedAfterSAgo?: number;
5252
- success?: boolean;
5253
- tags?: string;
5255
+ requestBody: {
5256
+ job_ids: Array<(string)>;
5257
+ script_options_by_path: {
5258
+ [key: string]: {
5259
+ input_transforms?: {
5260
+ [key: string]: InputTransform;
5261
+ };
5262
+ use_latest_version?: boolean;
5263
+ };
5264
+ };
5265
+ flow_options_by_path: {
5266
+ [key: string]: {
5267
+ input_transforms?: {
5268
+ [key: string]: InputTransform;
5269
+ };
5270
+ use_latest_version?: boolean;
5271
+ };
5272
+ };
5273
+ };
5254
5274
  workspace: string;
5255
5275
  };
5256
- export type CountCompletedJobsResponse = number;
5257
- export type ListFilteredJobsUuidsData = {
5258
- /**
5259
- * get jobs from all workspaces (only valid if request come from the `admins` workspace)
5260
- */
5261
- allWorkspaces?: boolean;
5276
+ export type BatchReRunJobsResponse = string;
5277
+ export type RestartFlowAtStepData = {
5262
5278
  /**
5263
- * filter on jobs containing those args as a json subset (@> in postgres)
5279
+ * for branchall or loop, the iteration at which the flow should restart
5264
5280
  */
5265
- args?: string;
5281
+ branchOrIterationN: number;
5282
+ id: string;
5266
5283
  /**
5267
- * filter on created after (exclusive) timestamp
5284
+ * List of headers's keys (separated with ',') whove value are added to the args
5285
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
5286
+ *
5268
5287
  */
5269
- createdAfter?: string;
5288
+ includeHeader?: string;
5270
5289
  /**
5271
- * filter on created before (inclusive) timestamp
5290
+ * make the run invisible to the the flow owner (default false)
5272
5291
  */
5273
- createdBefore?: string;
5292
+ invisibleToOwner?: boolean;
5274
5293
  /**
5275
- * mask to filter exact matching user creator
5294
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
5276
5295
  */
5277
- createdBy?: string;
5296
+ jobId?: string;
5278
5297
  /**
5279
- * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp
5298
+ * The parent job that is at the origin and responsible for the execution of this script if any
5280
5299
  */
5281
- createdOrStartedAfter?: string;
5300
+ parentJob?: string;
5282
5301
  /**
5283
- * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp but only for the completed jobs
5302
+ * flow args
5284
5303
  */
5285
- createdOrStartedAfterCompletedJobs?: string;
5304
+ requestBody: ScriptArgs;
5286
5305
  /**
5287
- * filter on created_at for non non started job and started_at otherwise before (inclusive) timestamp
5306
+ * when to schedule this job (leave empty for immediate run)
5288
5307
  */
5289
- createdOrStartedBefore?: string;
5308
+ scheduledFor?: string;
5290
5309
  /**
5291
- * has null parent
5310
+ * schedule the script to execute in the number of seconds starting now
5292
5311
  */
5293
- hasNullParent?: boolean;
5312
+ scheduledInSecs?: number;
5294
5313
  /**
5295
- * is the job a flow step
5314
+ * step id to restart the flow from
5296
5315
  */
5297
- isFlowStep?: boolean;
5316
+ stepId: string;
5298
5317
  /**
5299
- * is not a scheduled job
5318
+ * Override the tag to use
5300
5319
  */
5301
- isNotSchedule?: boolean;
5320
+ tag?: string;
5321
+ workspace: string;
5322
+ };
5323
+ export type RestartFlowAtStepResponse = string;
5324
+ export type RunScriptByHashData = {
5302
5325
  /**
5303
- * is the job skipped
5326
+ * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
5304
5327
  */
5305
- isSkipped?: boolean;
5328
+ cacheTtl?: string;
5329
+ hash: string;
5306
5330
  /**
5307
- * filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by,
5331
+ * List of headers's keys (separated with ',') whove value are added to the args
5332
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
5333
+ *
5308
5334
  */
5309
- jobKinds?: string;
5335
+ includeHeader?: string;
5310
5336
  /**
5311
- * mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels')
5337
+ * make the run invisible to the the script owner (default false)
5312
5338
  */
5313
- label?: string;
5339
+ invisibleToOwner?: boolean;
5314
5340
  /**
5315
- * which page to return (start at 1, default 1)
5341
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
5316
5342
  */
5317
- page?: number;
5343
+ jobId?: string;
5318
5344
  /**
5319
5345
  * The parent job that is at the origin and responsible for the execution of this script if any
5320
5346
  */
5321
5347
  parentJob?: string;
5322
5348
  /**
5323
- * number of items to return for a given page (default 30, max 100)
5349
+ * Partially filled args
5324
5350
  */
5325
- perPage?: number;
5351
+ requestBody: {
5352
+ [key: string]: unknown;
5353
+ };
5326
5354
  /**
5327
- * filter on jobs containing those result as a json subset (@> in postgres)
5355
+ * when to schedule this job (leave empty for immediate run)
5328
5356
  */
5329
- result?: string;
5357
+ scheduledFor?: string;
5330
5358
  /**
5331
- * filter on running jobs
5359
+ * schedule the script to execute in the number of seconds starting now
5332
5360
  */
5333
- running?: boolean;
5361
+ scheduledInSecs?: number;
5334
5362
  /**
5335
- * filter on jobs scheduled_for before now (hence waitinf for a worker)
5363
+ * skip the preprocessor
5336
5364
  */
5337
- scheduledForBeforeNow?: boolean;
5365
+ skipPreprocessor?: boolean;
5338
5366
  /**
5339
- * mask to filter by schedule path
5367
+ * Override the tag to use
5340
5368
  */
5341
- schedulePath?: string;
5369
+ tag?: string;
5370
+ workspace: string;
5371
+ };
5372
+ export type RunScriptByHashResponse = string;
5373
+ export type RunScriptPreviewData = {
5342
5374
  /**
5343
- * mask to filter exact matching path
5375
+ * List of headers's keys (separated with ',') whove value are added to the args
5376
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
5377
+ *
5344
5378
  */
5345
- scriptHash?: string;
5379
+ includeHeader?: string;
5346
5380
  /**
5347
- * mask to filter exact matching path
5381
+ * make the run invisible to the the script owner (default false)
5348
5382
  */
5349
- scriptPathExact?: string;
5383
+ invisibleToOwner?: boolean;
5350
5384
  /**
5351
- * mask to filter matching starting path
5385
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
5352
5386
  */
5353
- scriptPathStart?: string;
5387
+ jobId?: string;
5354
5388
  /**
5355
- * filter on started after (exclusive) timestamp
5389
+ * preview
5356
5390
  */
5357
- startedAfter?: string;
5391
+ requestBody: Preview;
5392
+ workspace: string;
5393
+ };
5394
+ export type RunScriptPreviewResponse = string;
5395
+ export type RunScriptPreviewAndWaitResultData = {
5358
5396
  /**
5359
- * filter on started before (inclusive) timestamp
5397
+ * preview
5360
5398
  */
5361
- startedBefore?: string;
5399
+ requestBody: Preview;
5400
+ workspace: string;
5401
+ };
5402
+ export type RunScriptPreviewAndWaitResultResponse = unknown;
5403
+ export type RunCodeWorkflowTaskData = {
5404
+ entrypoint: string;
5405
+ jobId: string;
5362
5406
  /**
5363
- * filter on successful jobs
5407
+ * preview
5364
5408
  */
5365
- success?: boolean;
5409
+ requestBody: WorkflowTask;
5410
+ workspace: string;
5411
+ };
5412
+ export type RunCodeWorkflowTaskResponse = string;
5413
+ export type RunRawScriptDependenciesData = {
5366
5414
  /**
5367
- * filter on suspended jobs
5415
+ * raw script content
5368
5416
  */
5369
- suspended?: boolean;
5417
+ requestBody: {
5418
+ raw_scripts: Array<RawScriptForDependencies>;
5419
+ entrypoint: string;
5420
+ };
5421
+ workspace: string;
5422
+ };
5423
+ export type RunRawScriptDependenciesResponse = {
5424
+ lock: string;
5425
+ };
5426
+ export type RunFlowPreviewData = {
5370
5427
  /**
5371
- * filter on jobs with a given tag/worker group
5428
+ * List of headers's keys (separated with ',') whove value are added to the args
5429
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
5430
+ *
5372
5431
  */
5373
- tag?: string;
5432
+ includeHeader?: string;
5374
5433
  /**
5375
- * worker this job was ran on
5434
+ * make the run invisible to the the script owner (default false)
5376
5435
  */
5377
- worker?: string;
5436
+ invisibleToOwner?: boolean;
5437
+ /**
5438
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
5439
+ */
5440
+ jobId?: string;
5441
+ /**
5442
+ * preview
5443
+ */
5444
+ requestBody: FlowPreview;
5378
5445
  workspace: string;
5379
5446
  };
5380
- export type ListFilteredJobsUuidsResponse = Array<(string)>;
5381
- export type ListFilteredQueueUuidsData = {
5447
+ export type RunFlowPreviewResponse = string;
5448
+ export type RunFlowPreviewAndWaitResultData = {
5449
+ /**
5450
+ * preview
5451
+ */
5452
+ requestBody: FlowPreview;
5453
+ workspace: string;
5454
+ };
5455
+ export type RunFlowPreviewAndWaitResultResponse = unknown;
5456
+ export type RunDynamicSelectData = {
5457
+ /**
5458
+ * dynamic select request
5459
+ */
5460
+ requestBody: DynamicInputData;
5461
+ workspace: string;
5462
+ };
5463
+ export type RunDynamicSelectResponse = string;
5464
+ export type ListQueueData = {
5382
5465
  /**
5383
5466
  * allow wildcards (*) in the filter of label, tag, worker
5384
5467
  */
@@ -5391,7 +5474,6 @@ export type ListFilteredQueueUuidsData = {
5391
5474
  * filter on jobs containing those args as a json subset (@> in postgres)
5392
5475
  */
5393
5476
  args?: string;
5394
- concurrencyKey?: string;
5395
5477
  /**
5396
5478
  * mask to filter exact matching user creator
5397
5479
  */
@@ -5468,31 +5550,71 @@ export type ListFilteredQueueUuidsData = {
5468
5550
  * filter on jobs with a given tag/worker group
5469
5551
  */
5470
5552
  tag?: string;
5553
+ /**
5554
+ * worker this job was ran on
5555
+ */
5556
+ worker?: string;
5471
5557
  workspace: string;
5472
5558
  };
5473
- export type ListFilteredQueueUuidsResponse = Array<(string)>;
5474
- export type CancelSelectionData = {
5475
- forceCancel?: boolean;
5559
+ export type ListQueueResponse = Array<QueuedJob>;
5560
+ export type GetQueueCountData = {
5476
5561
  /**
5477
- * uuids of the jobs to cancel
5562
+ * get jobs from all workspaces (only valid if request come from the `admins` workspace)
5478
5563
  */
5479
- requestBody: Array<(string)>;
5564
+ allWorkspaces?: boolean;
5480
5565
  workspace: string;
5481
5566
  };
5482
- export type CancelSelectionResponse = Array<(string)>;
5483
- export type ListCompletedJobsData = {
5567
+ export type GetQueueCountResponse = {
5568
+ database_length: number;
5569
+ suspended?: number;
5570
+ };
5571
+ export type GetCompletedCountData = {
5572
+ workspace: string;
5573
+ };
5574
+ export type GetCompletedCountResponse = {
5575
+ database_length: number;
5576
+ };
5577
+ export type CountCompletedJobsData = {
5578
+ allWorkspaces?: boolean;
5579
+ completedAfterSAgo?: number;
5580
+ success?: boolean;
5581
+ tags?: string;
5582
+ workspace: string;
5583
+ };
5584
+ export type CountCompletedJobsResponse = number;
5585
+ export type ListFilteredJobsUuidsData = {
5484
5586
  /**
5485
- * allow wildcards (*) in the filter of label, tag, worker
5587
+ * get jobs from all workspaces (only valid if request come from the `admins` workspace)
5486
5588
  */
5487
- allowWildcards?: boolean;
5589
+ allWorkspaces?: boolean;
5488
5590
  /**
5489
5591
  * filter on jobs containing those args as a json subset (@> in postgres)
5490
5592
  */
5491
5593
  args?: string;
5594
+ /**
5595
+ * filter on created after (exclusive) timestamp
5596
+ */
5597
+ createdAfter?: string;
5598
+ /**
5599
+ * filter on created before (inclusive) timestamp
5600
+ */
5601
+ createdBefore?: string;
5492
5602
  /**
5493
5603
  * mask to filter exact matching user creator
5494
5604
  */
5495
5605
  createdBy?: string;
5606
+ /**
5607
+ * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp
5608
+ */
5609
+ createdOrStartedAfter?: string;
5610
+ /**
5611
+ * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp but only for the completed jobs
5612
+ */
5613
+ createdOrStartedAfterCompletedJobs?: string;
5614
+ /**
5615
+ * filter on created_at for non non started job and started_at otherwise before (inclusive) timestamp
5616
+ */
5617
+ createdOrStartedBefore?: string;
5496
5618
  /**
5497
5619
  * has null parent
5498
5620
  */
@@ -5517,10 +5639,6 @@ export type ListCompletedJobsData = {
5517
5639
  * mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels')
5518
5640
  */
5519
5641
  label?: string;
5520
- /**
5521
- * order by desc order (default true)
5522
- */
5523
- orderDesc?: boolean;
5524
5642
  /**
5525
5643
  * which page to return (start at 1, default 1)
5526
5644
  */
@@ -5537,6 +5655,14 @@ export type ListCompletedJobsData = {
5537
5655
  * filter on jobs containing those result as a json subset (@> in postgres)
5538
5656
  */
5539
5657
  result?: string;
5658
+ /**
5659
+ * filter on running jobs
5660
+ */
5661
+ running?: boolean;
5662
+ /**
5663
+ * filter on jobs scheduled_for before now (hence waitinf for a worker)
5664
+ */
5665
+ scheduledForBeforeNow?: boolean;
5540
5666
  /**
5541
5667
  * mask to filter by schedule path
5542
5668
  */
@@ -5565,6 +5691,10 @@ export type ListCompletedJobsData = {
5565
5691
  * filter on successful jobs
5566
5692
  */
5567
5693
  success?: boolean;
5694
+ /**
5695
+ * filter on suspended jobs
5696
+ */
5697
+ suspended?: boolean;
5568
5698
  /**
5569
5699
  * filter on jobs with a given tag/worker group
5570
5700
  */
@@ -5575,8 +5705,8 @@ export type ListCompletedJobsData = {
5575
5705
  worker?: string;
5576
5706
  workspace: string;
5577
5707
  };
5578
- export type ListCompletedJobsResponse = Array<CompletedJob>;
5579
- export type ListJobsData = {
5708
+ export type ListFilteredJobsUuidsResponse = Array<(string)>;
5709
+ export type ListFilteredQueueUuidsData = {
5580
5710
  /**
5581
5711
  * allow wildcards (*) in the filter of label, tag, worker
5582
5712
  */
@@ -5589,54 +5719,23 @@ export type ListJobsData = {
5589
5719
  * filter on jobs containing those args as a json subset (@> in postgres)
5590
5720
  */
5591
5721
  args?: string;
5592
- /**
5593
- * filter on created after (exclusive) timestamp
5594
- */
5595
- createdAfter?: string;
5596
- /**
5597
- * filter on created before (inclusive) timestamp
5598
- */
5599
- createdBefore?: string;
5722
+ concurrencyKey?: string;
5600
5723
  /**
5601
5724
  * mask to filter exact matching user creator
5602
5725
  */
5603
5726
  createdBy?: string;
5604
- /**
5605
- * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp
5606
- */
5607
- createdOrStartedAfter?: string;
5608
- /**
5609
- * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp but only for the completed jobs
5610
- */
5611
- createdOrStartedAfterCompletedJobs?: string;
5612
- /**
5613
- * filter on created_at for non non started job and started_at otherwise before (inclusive) timestamp
5614
- */
5615
- createdOrStartedBefore?: string;
5616
- /**
5617
- * has null parent
5618
- */
5619
- hasNullParent?: boolean;
5620
- /**
5621
- * is the job a flow step
5622
- */
5623
- isFlowStep?: boolean;
5624
5727
  /**
5625
5728
  * is not a scheduled job
5626
5729
  */
5627
5730
  isNotSchedule?: boolean;
5628
- /**
5629
- * is the job skipped
5630
- */
5631
- isSkipped?: boolean;
5632
5731
  /**
5633
5732
  * filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by,
5634
5733
  */
5635
5734
  jobKinds?: string;
5636
5735
  /**
5637
- * mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels')
5736
+ * order by desc order (default true)
5638
5737
  */
5639
- label?: string;
5738
+ orderDesc?: boolean;
5640
5739
  /**
5641
5740
  * which page to return (start at 1, default 1)
5642
5741
  */
@@ -5697,65 +5796,294 @@ export type ListJobsData = {
5697
5796
  * filter on jobs with a given tag/worker group
5698
5797
  */
5699
5798
  tag?: string;
5799
+ workspace: string;
5800
+ };
5801
+ export type ListFilteredQueueUuidsResponse = Array<(string)>;
5802
+ export type CancelSelectionData = {
5803
+ forceCancel?: boolean;
5700
5804
  /**
5701
- * worker this job was ran on
5805
+ * uuids of the jobs to cancel
5702
5806
  */
5703
- worker?: string;
5807
+ requestBody: Array<(string)>;
5704
5808
  workspace: string;
5705
5809
  };
5706
- export type ListJobsResponse = Array<Job>;
5707
- export type GetDbClockResponse = number;
5708
- export type CountJobsByTagData = {
5810
+ export type CancelSelectionResponse = Array<(string)>;
5811
+ export type ListCompletedJobsData = {
5709
5812
  /**
5710
- * Past Time horizon in seconds (when to start the count = now - horizon) (default is 3600)
5813
+ * allow wildcards (*) in the filter of label, tag, worker
5711
5814
  */
5712
- horizonSecs?: number;
5815
+ allowWildcards?: boolean;
5713
5816
  /**
5714
- * Specific workspace ID to filter results (optional)
5817
+ * filter on jobs containing those args as a json subset (@> in postgres)
5715
5818
  */
5716
- workspaceId?: string;
5717
- };
5718
- export type CountJobsByTagResponse = Array<{
5719
- tag: string;
5720
- count: number;
5721
- }>;
5722
- export type GetJobData = {
5723
- id: string;
5724
- noCode?: boolean;
5725
- noLogs?: boolean;
5726
- workspace: string;
5727
- };
5728
- export type GetJobResponse = Job;
5729
- export type GetRootJobIdData = {
5730
- id: string;
5731
- workspace: string;
5732
- };
5733
- export type GetRootJobIdResponse = string;
5734
- export type GetJobLogsData = {
5735
- id: string;
5736
- removeAnsiWarnings?: boolean;
5737
- workspace: string;
5738
- };
5739
- export type GetJobLogsResponse = string;
5740
- export type GetCompletedJobLogsTailData = {
5741
- id: string;
5742
- workspace: string;
5743
- };
5744
- export type GetCompletedJobLogsTailResponse = string;
5745
- export type GetJobArgsData = {
5746
- id: string;
5747
- workspace: string;
5748
- };
5749
- export type GetJobArgsResponse = unknown;
5750
- export type GetStartedAtByIdsData = {
5819
+ args?: string;
5751
5820
  /**
5752
- * ids
5821
+ * mask to filter exact matching user creator
5753
5822
  */
5754
- requestBody: Array<(string)>;
5755
- workspace: string;
5756
- };
5757
- export type GetStartedAtByIdsResponse = Array<(string)>;
5758
- export type GetJobUpdatesData = {
5823
+ createdBy?: string;
5824
+ /**
5825
+ * has null parent
5826
+ */
5827
+ hasNullParent?: boolean;
5828
+ /**
5829
+ * is the job a flow step
5830
+ */
5831
+ isFlowStep?: boolean;
5832
+ /**
5833
+ * is not a scheduled job
5834
+ */
5835
+ isNotSchedule?: boolean;
5836
+ /**
5837
+ * is the job skipped
5838
+ */
5839
+ isSkipped?: boolean;
5840
+ /**
5841
+ * filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by,
5842
+ */
5843
+ jobKinds?: string;
5844
+ /**
5845
+ * mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels')
5846
+ */
5847
+ label?: string;
5848
+ /**
5849
+ * order by desc order (default true)
5850
+ */
5851
+ orderDesc?: boolean;
5852
+ /**
5853
+ * which page to return (start at 1, default 1)
5854
+ */
5855
+ page?: number;
5856
+ /**
5857
+ * The parent job that is at the origin and responsible for the execution of this script if any
5858
+ */
5859
+ parentJob?: string;
5860
+ /**
5861
+ * number of items to return for a given page (default 30, max 100)
5862
+ */
5863
+ perPage?: number;
5864
+ /**
5865
+ * filter on jobs containing those result as a json subset (@> in postgres)
5866
+ */
5867
+ result?: string;
5868
+ /**
5869
+ * mask to filter by schedule path
5870
+ */
5871
+ schedulePath?: string;
5872
+ /**
5873
+ * mask to filter exact matching path
5874
+ */
5875
+ scriptHash?: string;
5876
+ /**
5877
+ * mask to filter exact matching path
5878
+ */
5879
+ scriptPathExact?: string;
5880
+ /**
5881
+ * mask to filter matching starting path
5882
+ */
5883
+ scriptPathStart?: string;
5884
+ /**
5885
+ * filter on started after (exclusive) timestamp
5886
+ */
5887
+ startedAfter?: string;
5888
+ /**
5889
+ * filter on started before (inclusive) timestamp
5890
+ */
5891
+ startedBefore?: string;
5892
+ /**
5893
+ * filter on successful jobs
5894
+ */
5895
+ success?: boolean;
5896
+ /**
5897
+ * filter on jobs with a given tag/worker group
5898
+ */
5899
+ tag?: string;
5900
+ /**
5901
+ * worker this job was ran on
5902
+ */
5903
+ worker?: string;
5904
+ workspace: string;
5905
+ };
5906
+ export type ListCompletedJobsResponse = Array<CompletedJob>;
5907
+ export type ListJobsData = {
5908
+ /**
5909
+ * allow wildcards (*) in the filter of label, tag, worker
5910
+ */
5911
+ allowWildcards?: boolean;
5912
+ /**
5913
+ * get jobs from all workspaces (only valid if request come from the `admins` workspace)
5914
+ */
5915
+ allWorkspaces?: boolean;
5916
+ /**
5917
+ * filter on jobs containing those args as a json subset (@> in postgres)
5918
+ */
5919
+ args?: string;
5920
+ /**
5921
+ * filter on created after (exclusive) timestamp
5922
+ */
5923
+ createdAfter?: string;
5924
+ /**
5925
+ * filter on created before (inclusive) timestamp
5926
+ */
5927
+ createdBefore?: string;
5928
+ /**
5929
+ * mask to filter exact matching user creator
5930
+ */
5931
+ createdBy?: string;
5932
+ /**
5933
+ * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp
5934
+ */
5935
+ createdOrStartedAfter?: string;
5936
+ /**
5937
+ * filter on created_at for non non started job and started_at otherwise after (exclusive) timestamp but only for the completed jobs
5938
+ */
5939
+ createdOrStartedAfterCompletedJobs?: string;
5940
+ /**
5941
+ * filter on created_at for non non started job and started_at otherwise before (inclusive) timestamp
5942
+ */
5943
+ createdOrStartedBefore?: string;
5944
+ /**
5945
+ * has null parent
5946
+ */
5947
+ hasNullParent?: boolean;
5948
+ /**
5949
+ * is the job a flow step
5950
+ */
5951
+ isFlowStep?: boolean;
5952
+ /**
5953
+ * is not a scheduled job
5954
+ */
5955
+ isNotSchedule?: boolean;
5956
+ /**
5957
+ * is the job skipped
5958
+ */
5959
+ isSkipped?: boolean;
5960
+ /**
5961
+ * filter on job kind (values 'preview', 'script', 'dependencies', 'flow') separated by,
5962
+ */
5963
+ jobKinds?: string;
5964
+ /**
5965
+ * mask to filter exact matching job's label (job labels are completed jobs with as a result an object containing a string in the array at key 'wm_labels')
5966
+ */
5967
+ label?: string;
5968
+ /**
5969
+ * which page to return (start at 1, default 1)
5970
+ */
5971
+ page?: number;
5972
+ /**
5973
+ * The parent job that is at the origin and responsible for the execution of this script if any
5974
+ */
5975
+ parentJob?: string;
5976
+ /**
5977
+ * number of items to return for a given page (default 30, max 100)
5978
+ */
5979
+ perPage?: number;
5980
+ /**
5981
+ * filter on jobs containing those result as a json subset (@> in postgres)
5982
+ */
5983
+ result?: string;
5984
+ /**
5985
+ * filter on running jobs
5986
+ */
5987
+ running?: boolean;
5988
+ /**
5989
+ * filter on jobs scheduled_for before now (hence waitinf for a worker)
5990
+ */
5991
+ scheduledForBeforeNow?: boolean;
5992
+ /**
5993
+ * mask to filter by schedule path
5994
+ */
5995
+ schedulePath?: string;
5996
+ /**
5997
+ * mask to filter exact matching path
5998
+ */
5999
+ scriptHash?: string;
6000
+ /**
6001
+ * mask to filter exact matching path
6002
+ */
6003
+ scriptPathExact?: string;
6004
+ /**
6005
+ * mask to filter matching starting path
6006
+ */
6007
+ scriptPathStart?: string;
6008
+ /**
6009
+ * filter on started after (exclusive) timestamp
6010
+ */
6011
+ startedAfter?: string;
6012
+ /**
6013
+ * filter on started before (inclusive) timestamp
6014
+ */
6015
+ startedBefore?: string;
6016
+ /**
6017
+ * filter on successful jobs
6018
+ */
6019
+ success?: boolean;
6020
+ /**
6021
+ * filter on suspended jobs
6022
+ */
6023
+ suspended?: boolean;
6024
+ /**
6025
+ * filter on jobs with a given tag/worker group
6026
+ */
6027
+ tag?: string;
6028
+ /**
6029
+ * worker this job was ran on
6030
+ */
6031
+ worker?: string;
6032
+ workspace: string;
6033
+ };
6034
+ export type ListJobsResponse = Array<Job>;
6035
+ export type GetDbClockResponse = number;
6036
+ export type CountJobsByTagData = {
6037
+ /**
6038
+ * Past Time horizon in seconds (when to start the count = now - horizon) (default is 3600)
6039
+ */
6040
+ horizonSecs?: number;
6041
+ /**
6042
+ * Specific workspace ID to filter results (optional)
6043
+ */
6044
+ workspaceId?: string;
6045
+ };
6046
+ export type CountJobsByTagResponse = Array<{
6047
+ tag: string;
6048
+ count: number;
6049
+ }>;
6050
+ export type GetJobData = {
6051
+ id: string;
6052
+ noCode?: boolean;
6053
+ noLogs?: boolean;
6054
+ workspace: string;
6055
+ };
6056
+ export type GetJobResponse = Job;
6057
+ export type GetRootJobIdData = {
6058
+ id: string;
6059
+ workspace: string;
6060
+ };
6061
+ export type GetRootJobIdResponse = string;
6062
+ export type GetJobLogsData = {
6063
+ id: string;
6064
+ removeAnsiWarnings?: boolean;
6065
+ workspace: string;
6066
+ };
6067
+ export type GetJobLogsResponse = string;
6068
+ export type GetCompletedJobLogsTailData = {
6069
+ id: string;
6070
+ workspace: string;
6071
+ };
6072
+ export type GetCompletedJobLogsTailResponse = string;
6073
+ export type GetJobArgsData = {
6074
+ id: string;
6075
+ workspace: string;
6076
+ };
6077
+ export type GetJobArgsResponse = unknown;
6078
+ export type GetStartedAtByIdsData = {
6079
+ /**
6080
+ * ids
6081
+ */
6082
+ requestBody: Array<(string)>;
6083
+ workspace: string;
6084
+ };
6085
+ export type GetStartedAtByIdsResponse = Array<(string)>;
6086
+ export type GetJobUpdatesData = {
5759
6087
  getProgress?: boolean;
5760
6088
  id: string;
5761
6089
  logOffset?: number;
@@ -6113,6 +6441,46 @@ export type ListExtendedJobsData = {
6113
6441
  workspace: string;
6114
6442
  };
6115
6443
  export type ListExtendedJobsResponse = ExtendedJobs;
6444
+ export type ListFlowConversationsData = {
6445
+ /**
6446
+ * filter conversations by flow path
6447
+ */
6448
+ flowPath?: string;
6449
+ /**
6450
+ * which page to return (start at 1, default 1)
6451
+ */
6452
+ page?: number;
6453
+ /**
6454
+ * number of items to return for a given page (default 30, max 100)
6455
+ */
6456
+ perPage?: number;
6457
+ workspace: string;
6458
+ };
6459
+ export type ListFlowConversationsResponse = Array<FlowConversation>;
6460
+ export type DeleteFlowConversationData = {
6461
+ /**
6462
+ * conversation id
6463
+ */
6464
+ conversationId: string;
6465
+ workspace: string;
6466
+ };
6467
+ export type DeleteFlowConversationResponse = string;
6468
+ export type ListConversationMessagesData = {
6469
+ /**
6470
+ * conversation id
6471
+ */
6472
+ conversationId: string;
6473
+ /**
6474
+ * which page to return (start at 1, default 1)
6475
+ */
6476
+ page?: number;
6477
+ /**
6478
+ * number of items to return for a given page (default 30, max 100)
6479
+ */
6480
+ perPage?: number;
6481
+ workspace: string;
6482
+ };
6483
+ export type ListConversationMessagesResponse = Array<FlowConversationMessage>;
6116
6484
  export type ListRawAppsData = {
6117
6485
  /**
6118
6486
  * mask to filter exact matching user creator
@@ -11815,6 +12183,20 @@ export type $OpenApiTs = {
11815
12183
  };
11816
12184
  };
11817
12185
  };
12186
+ '/w/{workspace}/apps/secret_of_latest_version/{path}': {
12187
+ get: {
12188
+ req: {
12189
+ path: string;
12190
+ workspace: string;
12191
+ };
12192
+ res: {
12193
+ /**
12194
+ * app secret
12195
+ */
12196
+ 200: string;
12197
+ };
12198
+ };
12199
+ };
11818
12200
  '/w/{workspace}/apps/get/v/{id}': {
11819
12201
  get: {
11820
12202
  req: {
@@ -12527,237 +12909,516 @@ export type $OpenApiTs = {
12527
12909
  /**
12528
12910
  * does it exists
12529
12911
  */
12530
- 200: boolean;
12912
+ 200: boolean;
12913
+ };
12914
+ };
12915
+ };
12916
+ '/w/{workspace}/scripts/get/h/{hash}': {
12917
+ get: {
12918
+ req: {
12919
+ authed?: boolean;
12920
+ hash: string;
12921
+ withStarredInfo?: boolean;
12922
+ workspace: string;
12923
+ };
12924
+ res: {
12925
+ /**
12926
+ * script details
12927
+ */
12928
+ 200: Script;
12929
+ };
12930
+ };
12931
+ };
12932
+ '/w/{workspace}/scripts/raw/h/{path}': {
12933
+ get: {
12934
+ req: {
12935
+ path: string;
12936
+ workspace: string;
12937
+ };
12938
+ res: {
12939
+ /**
12940
+ * script content
12941
+ */
12942
+ 200: string;
12943
+ };
12944
+ };
12945
+ };
12946
+ '/w/{workspace}/scripts/deployment_status/h/{hash}': {
12947
+ get: {
12948
+ req: {
12949
+ hash: string;
12950
+ workspace: string;
12951
+ };
12952
+ res: {
12953
+ /**
12954
+ * script details
12955
+ */
12956
+ 200: {
12957
+ lock?: string;
12958
+ lock_error_logs?: string;
12959
+ };
12960
+ };
12961
+ };
12962
+ };
12963
+ '/w/{workspace}/drafts/create': {
12964
+ post: {
12965
+ req: {
12966
+ requestBody: {
12967
+ path: string;
12968
+ typ: 'flow' | 'script' | 'app';
12969
+ value?: unknown;
12970
+ };
12971
+ workspace: string;
12972
+ };
12973
+ res: {
12974
+ /**
12975
+ * draft created
12976
+ */
12977
+ 201: string;
12978
+ };
12979
+ };
12980
+ };
12981
+ '/w/{workspace}/drafts/delete/{kind}/{path}': {
12982
+ delete: {
12983
+ req: {
12984
+ kind: 'script' | 'flow' | 'app';
12985
+ path: string;
12986
+ workspace: string;
12987
+ };
12988
+ res: {
12989
+ /**
12990
+ * draft deleted
12991
+ */
12992
+ 200: string;
12993
+ };
12994
+ };
12995
+ };
12996
+ '/workers/custom_tags': {
12997
+ get: {
12998
+ req: {
12999
+ showWorkspaceRestriction?: boolean;
13000
+ workspace?: string;
13001
+ };
13002
+ res: {
13003
+ /**
13004
+ * list of custom tags
13005
+ */
13006
+ 200: Array<(string)>;
13007
+ };
13008
+ };
13009
+ };
13010
+ '/workers/get_default_tags': {
13011
+ get: {
13012
+ res: {
13013
+ /**
13014
+ * list of default tags
13015
+ */
13016
+ 200: Array<(string)>;
13017
+ };
13018
+ };
13019
+ };
13020
+ '/workers/is_default_tags_per_workspace': {
13021
+ get: {
13022
+ res: {
13023
+ /**
13024
+ * is the default tags per workspace
13025
+ */
13026
+ 200: boolean;
13027
+ };
13028
+ };
13029
+ };
13030
+ '/workers/list': {
13031
+ get: {
13032
+ req: {
13033
+ /**
13034
+ * which page to return (start at 1, default 1)
13035
+ */
13036
+ page?: number;
13037
+ /**
13038
+ * number of items to return for a given page (default 30, max 100)
13039
+ */
13040
+ perPage?: number;
13041
+ /**
13042
+ * number of seconds the worker must have had a last ping more recent of (default to 300)
13043
+ */
13044
+ pingSince?: number;
13045
+ };
13046
+ res: {
13047
+ /**
13048
+ * a list of workers
13049
+ */
13050
+ 200: Array<WorkerPing>;
13051
+ };
13052
+ };
13053
+ };
13054
+ '/workers/exists_workers_with_tags': {
13055
+ get: {
13056
+ req: {
13057
+ /**
13058
+ * comma separated list of tags
13059
+ */
13060
+ tags: string;
13061
+ };
13062
+ res: {
13063
+ /**
13064
+ * map of tags to whether at least one worker with the tag exists
13065
+ */
13066
+ 200: {
13067
+ [key: string]: (boolean);
13068
+ };
13069
+ };
13070
+ };
13071
+ };
13072
+ '/workers/queue_metrics': {
13073
+ get: {
13074
+ res: {
13075
+ /**
13076
+ * metrics
13077
+ */
13078
+ 200: Array<{
13079
+ id: string;
13080
+ values: Array<{
13081
+ created_at: string;
13082
+ value: number;
13083
+ }>;
13084
+ }>;
12531
13085
  };
12532
13086
  };
12533
13087
  };
12534
- '/w/{workspace}/scripts/get/h/{hash}': {
13088
+ '/workers/queue_counts': {
12535
13089
  get: {
12536
- req: {
12537
- authed?: boolean;
12538
- hash: string;
12539
- withStarredInfo?: boolean;
12540
- workspace: string;
12541
- };
12542
13090
  res: {
12543
13091
  /**
12544
- * script details
13092
+ * queue counts
12545
13093
  */
12546
- 200: Script;
13094
+ 200: {
13095
+ [key: string]: (number);
13096
+ };
12547
13097
  };
12548
13098
  };
12549
13099
  };
12550
- '/w/{workspace}/scripts/raw/h/{path}': {
13100
+ '/workers/queue_running_counts': {
12551
13101
  get: {
12552
- req: {
12553
- path: string;
12554
- workspace: string;
12555
- };
12556
13102
  res: {
12557
13103
  /**
12558
- * script content
13104
+ * queue running counts
12559
13105
  */
12560
- 200: string;
13106
+ 200: {
13107
+ [key: string]: (number);
13108
+ };
12561
13109
  };
12562
13110
  };
12563
13111
  };
12564
- '/w/{workspace}/scripts/deployment_status/h/{hash}': {
12565
- get: {
13112
+ '/w/{workspace}/jobs/list_selected_job_groups': {
13113
+ post: {
12566
13114
  req: {
12567
- hash: string;
13115
+ /**
13116
+ * script args
13117
+ */
13118
+ requestBody: Array<(string)>;
12568
13119
  workspace: string;
12569
13120
  };
12570
13121
  res: {
12571
13122
  /**
12572
- * script details
13123
+ * result
12573
13124
  */
12574
- 200: {
12575
- lock?: string;
12576
- lock_error_logs?: string;
12577
- };
13125
+ 200: Array<{
13126
+ kind: 'script' | 'flow';
13127
+ script_path: string;
13128
+ latest_schema: {
13129
+ [key: string]: unknown;
13130
+ };
13131
+ schemas: Array<{
13132
+ schema: {
13133
+ [key: string]: unknown;
13134
+ };
13135
+ script_hash: string;
13136
+ job_ids: Array<(string)>;
13137
+ }>;
13138
+ }>;
12578
13139
  };
12579
13140
  };
12580
13141
  };
12581
- '/w/{workspace}/drafts/create': {
13142
+ '/w/{workspace}/jobs/run/p/{path}': {
12582
13143
  post: {
12583
13144
  req: {
12584
- requestBody: {
12585
- path: string;
12586
- typ: 'flow' | 'script' | 'app';
12587
- value?: unknown;
12588
- };
13145
+ /**
13146
+ * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
13147
+ */
13148
+ cacheTtl?: string;
13149
+ /**
13150
+ * make the run invisible to the the script owner (default false)
13151
+ */
13152
+ invisibleToOwner?: boolean;
13153
+ /**
13154
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
13155
+ */
13156
+ jobId?: string;
13157
+ /**
13158
+ * The parent job that is at the origin and responsible for the execution of this script if any
13159
+ */
13160
+ parentJob?: string;
13161
+ path: string;
13162
+ /**
13163
+ * script args
13164
+ */
13165
+ requestBody: ScriptArgs;
13166
+ /**
13167
+ * when to schedule this job (leave empty for immediate run)
13168
+ */
13169
+ scheduledFor?: string;
13170
+ /**
13171
+ * schedule the script to execute in the number of seconds starting now
13172
+ */
13173
+ scheduledInSecs?: number;
13174
+ /**
13175
+ * skip the preprocessor
13176
+ */
13177
+ skipPreprocessor?: boolean;
13178
+ /**
13179
+ * Override the tag to use
13180
+ */
13181
+ tag?: string;
12589
13182
  workspace: string;
12590
13183
  };
12591
13184
  res: {
12592
13185
  /**
12593
- * draft created
13186
+ * job created
12594
13187
  */
12595
13188
  201: string;
12596
13189
  };
12597
13190
  };
12598
13191
  };
12599
- '/w/{workspace}/drafts/delete/{kind}/{path}': {
12600
- delete: {
13192
+ '/w/{workspace}/jobs/run_wait_result/p/{path}': {
13193
+ post: {
12601
13194
  req: {
12602
- kind: 'script' | 'flow' | 'app';
13195
+ /**
13196
+ * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
13197
+ */
13198
+ cacheTtl?: string;
13199
+ /**
13200
+ * List of headers's keys (separated with ',') whove value are added to the args
13201
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
13202
+ *
13203
+ */
13204
+ includeHeader?: string;
13205
+ /**
13206
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
13207
+ */
13208
+ jobId?: string;
13209
+ /**
13210
+ * The parent job that is at the origin and responsible for the execution of this script if any
13211
+ */
13212
+ parentJob?: string;
12603
13213
  path: string;
13214
+ /**
13215
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
13216
+ *
13217
+ */
13218
+ queueLimit?: string;
13219
+ /**
13220
+ * script args
13221
+ */
13222
+ requestBody: ScriptArgs;
13223
+ /**
13224
+ * skip the preprocessor
13225
+ */
13226
+ skipPreprocessor?: boolean;
13227
+ /**
13228
+ * Override the tag to use
13229
+ */
13230
+ tag?: string;
12604
13231
  workspace: string;
12605
13232
  };
12606
13233
  res: {
12607
13234
  /**
12608
- * draft deleted
13235
+ * job result
12609
13236
  */
12610
- 200: string;
13237
+ 200: unknown;
12611
13238
  };
12612
13239
  };
12613
- };
12614
- '/workers/custom_tags': {
12615
13240
  get: {
12616
13241
  req: {
12617
- showWorkspaceRestriction?: boolean;
12618
- workspace?: string;
13242
+ /**
13243
+ * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
13244
+ */
13245
+ cacheTtl?: string;
13246
+ /**
13247
+ * List of headers's keys (separated with ',') whove value are added to the args
13248
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
13249
+ *
13250
+ */
13251
+ includeHeader?: string;
13252
+ /**
13253
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
13254
+ */
13255
+ jobId?: string;
13256
+ /**
13257
+ * The parent job that is at the origin and responsible for the execution of this script if any
13258
+ */
13259
+ parentJob?: string;
13260
+ path: string;
13261
+ /**
13262
+ * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent
13263
+ * `encodeURIComponent(btoa(JSON.stringify({a: 2})))`
13264
+ *
13265
+ */
13266
+ payload?: string;
13267
+ /**
13268
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
13269
+ *
13270
+ */
13271
+ queueLimit?: string;
13272
+ /**
13273
+ * skip the preprocessor
13274
+ */
13275
+ skipPreprocessor?: boolean;
13276
+ /**
13277
+ * Override the tag to use
13278
+ */
13279
+ tag?: string;
13280
+ workspace: string;
12619
13281
  };
12620
13282
  res: {
12621
13283
  /**
12622
- * list of custom tags
13284
+ * job result
12623
13285
  */
12624
- 200: Array<(string)>;
13286
+ 200: unknown;
12625
13287
  };
12626
13288
  };
12627
13289
  };
12628
- '/workers/get_default_tags': {
12629
- get: {
12630
- res: {
13290
+ '/w/{workspace}/jobs/run_wait_result/f/{path}': {
13291
+ post: {
13292
+ req: {
12631
13293
  /**
12632
- * list of default tags
13294
+ * List of headers's keys (separated with ',') whove value are added to the args
13295
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
13296
+ *
12633
13297
  */
12634
- 200: Array<(string)>;
13298
+ includeHeader?: string;
13299
+ /**
13300
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
13301
+ */
13302
+ jobId?: string;
13303
+ /**
13304
+ * memory ID for chat-enabled flows
13305
+ */
13306
+ memoryId?: string;
13307
+ path: string;
13308
+ /**
13309
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
13310
+ *
13311
+ */
13312
+ queueLimit?: string;
13313
+ /**
13314
+ * script args
13315
+ */
13316
+ requestBody: ScriptArgs;
13317
+ /**
13318
+ * skip the preprocessor
13319
+ */
13320
+ skipPreprocessor?: boolean;
13321
+ workspace: string;
12635
13322
  };
12636
- };
12637
- };
12638
- '/workers/is_default_tags_per_workspace': {
12639
- get: {
12640
13323
  res: {
12641
13324
  /**
12642
- * is the default tags per workspace
13325
+ * job result
12643
13326
  */
12644
- 200: boolean;
13327
+ 200: unknown;
12645
13328
  };
12646
13329
  };
12647
13330
  };
12648
- '/workers/list': {
12649
- get: {
13331
+ '/w/{workspace}/jobs/run_and_stream/f/{path}': {
13332
+ post: {
12650
13333
  req: {
12651
13334
  /**
12652
- * which page to return (start at 1, default 1)
13335
+ * List of headers's keys (separated with ',') whove value are added to the args
13336
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
13337
+ *
13338
+ */
13339
+ includeHeader?: string;
13340
+ /**
13341
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
13342
+ */
13343
+ jobId?: string;
13344
+ /**
13345
+ * memory ID for chat-enabled flows
13346
+ */
13347
+ memoryId?: string;
13348
+ path: string;
13349
+ /**
13350
+ * delay between polling for job updates in milliseconds
12653
13351
  */
12654
- page?: number;
13352
+ pollDelayMs?: number;
12655
13353
  /**
12656
- * number of items to return for a given page (default 30, max 100)
13354
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
13355
+ *
12657
13356
  */
12658
- perPage?: number;
13357
+ queueLimit?: string;
12659
13358
  /**
12660
- * number of seconds the worker must have had a last ping more recent of (default to 300)
13359
+ * flow args
12661
13360
  */
12662
- pingSince?: number;
13361
+ requestBody: ScriptArgs;
13362
+ /**
13363
+ * skip the preprocessor
13364
+ */
13365
+ skipPreprocessor?: boolean;
13366
+ workspace: string;
12663
13367
  };
12664
13368
  res: {
12665
13369
  /**
12666
- * a list of workers
13370
+ * server-sent events stream of job updates
12667
13371
  */
12668
- 200: Array<WorkerPing>;
13372
+ 200: string;
12669
13373
  };
12670
13374
  };
12671
- };
12672
- '/workers/exists_workers_with_tags': {
12673
13375
  get: {
12674
13376
  req: {
12675
13377
  /**
12676
- * comma separated list of tags
13378
+ * List of headers's keys (separated with ',') whove value are added to the args
13379
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
13380
+ *
12677
13381
  */
12678
- tags: string;
12679
- };
12680
- res: {
13382
+ includeHeader?: string;
12681
13383
  /**
12682
- * map of tags to whether at least one worker with the tag exists
13384
+ * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
12683
13385
  */
12684
- 200: {
12685
- [key: string]: (boolean);
12686
- };
12687
- };
12688
- };
12689
- };
12690
- '/workers/queue_metrics': {
12691
- get: {
12692
- res: {
13386
+ jobId?: string;
12693
13387
  /**
12694
- * metrics
13388
+ * memory ID for chat-enabled flows
12695
13389
  */
12696
- 200: Array<{
12697
- id: string;
12698
- values: Array<{
12699
- created_at: string;
12700
- value: number;
12701
- }>;
12702
- }>;
12703
- };
12704
- };
12705
- };
12706
- '/workers/queue_counts': {
12707
- get: {
12708
- res: {
13390
+ memoryId?: string;
13391
+ path: string;
12709
13392
  /**
12710
- * queue counts
13393
+ * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent
13394
+ * `encodeURIComponent(btoa(JSON.stringify({a: 2})))`
13395
+ *
12711
13396
  */
12712
- 200: {
12713
- [key: string]: (number);
12714
- };
12715
- };
12716
- };
12717
- };
12718
- '/workers/queue_running_counts': {
12719
- get: {
12720
- res: {
13397
+ payload?: string;
12721
13398
  /**
12722
- * queue running counts
13399
+ * delay between polling for job updates in milliseconds
12723
13400
  */
12724
- 200: {
12725
- [key: string]: (number);
12726
- };
12727
- };
12728
- };
12729
- };
12730
- '/w/{workspace}/jobs/list_selected_job_groups': {
12731
- post: {
12732
- req: {
13401
+ pollDelayMs?: number;
12733
13402
  /**
12734
- * script args
13403
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
13404
+ *
12735
13405
  */
12736
- requestBody: Array<(string)>;
13406
+ queueLimit?: string;
13407
+ /**
13408
+ * skip the preprocessor
13409
+ */
13410
+ skipPreprocessor?: boolean;
12737
13411
  workspace: string;
12738
13412
  };
12739
13413
  res: {
12740
13414
  /**
12741
- * result
13415
+ * server-sent events stream of job updates
12742
13416
  */
12743
- 200: Array<{
12744
- kind: 'script' | 'flow';
12745
- script_path: string;
12746
- latest_schema: {
12747
- [key: string]: unknown;
12748
- };
12749
- schemas: Array<{
12750
- schema: {
12751
- [key: string]: unknown;
12752
- };
12753
- script_hash: string;
12754
- job_ids: Array<(string)>;
12755
- }>;
12756
- }>;
13417
+ 200: string;
12757
13418
  };
12758
13419
  };
12759
13420
  };
12760
- '/w/{workspace}/jobs/run/p/{path}': {
13421
+ '/w/{workspace}/jobs/run_and_stream/p/{path}': {
12761
13422
  post: {
12762
13423
  req: {
12763
13424
  /**
@@ -12765,9 +13426,11 @@ export type $OpenApiTs = {
12765
13426
  */
12766
13427
  cacheTtl?: string;
12767
13428
  /**
12768
- * make the run invisible to the the script owner (default false)
13429
+ * List of headers's keys (separated with ',') whove value are added to the args
13430
+ * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
13431
+ *
12769
13432
  */
12770
- invisibleToOwner?: boolean;
13433
+ includeHeader?: string;
12771
13434
  /**
12772
13435
  * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
12773
13436
  */
@@ -12778,17 +13441,18 @@ export type $OpenApiTs = {
12778
13441
  parentJob?: string;
12779
13442
  path: string;
12780
13443
  /**
12781
- * script args
13444
+ * delay between polling for job updates in milliseconds
12782
13445
  */
12783
- requestBody: ScriptArgs;
13446
+ pollDelayMs?: number;
12784
13447
  /**
12785
- * when to schedule this job (leave empty for immediate run)
13448
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
13449
+ *
12786
13450
  */
12787
- scheduledFor?: string;
13451
+ queueLimit?: string;
12788
13452
  /**
12789
- * schedule the script to execute in the number of seconds starting now
13453
+ * script args
12790
13454
  */
12791
- scheduledInSecs?: number;
13455
+ requestBody: ScriptArgs;
12792
13456
  /**
12793
13457
  * skip the preprocessor
12794
13458
  */
@@ -12801,14 +13465,12 @@ export type $OpenApiTs = {
12801
13465
  };
12802
13466
  res: {
12803
13467
  /**
12804
- * job created
13468
+ * server-sent events stream of job updates
12805
13469
  */
12806
- 201: string;
13470
+ 200: string;
12807
13471
  };
12808
13472
  };
12809
- };
12810
- '/w/{workspace}/jobs/run_wait_result/p/{path}': {
12811
- post: {
13473
+ get: {
12812
13474
  req: {
12813
13475
  /**
12814
13476
  * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
@@ -12830,14 +13492,20 @@ export type $OpenApiTs = {
12830
13492
  parentJob?: string;
12831
13493
  path: string;
12832
13494
  /**
12833
- * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
13495
+ * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent
13496
+ * `encodeURIComponent(btoa(JSON.stringify({a: 2})))`
12834
13497
  *
12835
13498
  */
12836
- queueLimit?: string;
13499
+ payload?: string;
12837
13500
  /**
12838
- * script args
13501
+ * delay between polling for job updates in milliseconds
12839
13502
  */
12840
- requestBody: ScriptArgs;
13503
+ pollDelayMs?: number;
13504
+ /**
13505
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
13506
+ *
13507
+ */
13508
+ queueLimit?: string;
12841
13509
  /**
12842
13510
  * skip the preprocessor
12843
13511
  */
@@ -12850,17 +13518,20 @@ export type $OpenApiTs = {
12850
13518
  };
12851
13519
  res: {
12852
13520
  /**
12853
- * job result
13521
+ * server-sent events stream of job updates
12854
13522
  */
12855
- 200: unknown;
13523
+ 200: string;
12856
13524
  };
12857
13525
  };
12858
- get: {
13526
+ };
13527
+ '/w/{workspace}/jobs/run_and_stream/h/{hash}': {
13528
+ post: {
12859
13529
  req: {
12860
13530
  /**
12861
13531
  * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
12862
13532
  */
12863
13533
  cacheTtl?: string;
13534
+ hash: string;
12864
13535
  /**
12865
13536
  * List of headers's keys (separated with ',') whove value are added to the args
12866
13537
  * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
@@ -12875,18 +13546,19 @@ export type $OpenApiTs = {
12875
13546
  * The parent job that is at the origin and responsible for the execution of this script if any
12876
13547
  */
12877
13548
  parentJob?: string;
12878
- path: string;
12879
13549
  /**
12880
- * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent
12881
- * `encodeURIComponent(btoa(JSON.stringify({a: 2})))`
12882
- *
13550
+ * delay between polling for job updates in milliseconds
12883
13551
  */
12884
- payload?: string;
13552
+ pollDelayMs?: number;
12885
13553
  /**
12886
13554
  * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
12887
13555
  *
12888
13556
  */
12889
13557
  queueLimit?: string;
13558
+ /**
13559
+ * script args
13560
+ */
13561
+ requestBody: ScriptArgs;
12890
13562
  /**
12891
13563
  * skip the preprocessor
12892
13564
  */
@@ -12899,15 +13571,18 @@ export type $OpenApiTs = {
12899
13571
  };
12900
13572
  res: {
12901
13573
  /**
12902
- * job result
13574
+ * server-sent events stream of job updates
12903
13575
  */
12904
- 200: unknown;
13576
+ 200: string;
12905
13577
  };
12906
13578
  };
12907
- };
12908
- '/w/{workspace}/jobs/run_wait_result/f/{path}': {
12909
- post: {
13579
+ get: {
12910
13580
  req: {
13581
+ /**
13582
+ * Override the cache time to live (in seconds). Can not be used to disable caching, only override with a new cache ttl
13583
+ */
13584
+ cacheTtl?: string;
13585
+ hash: string;
12911
13586
  /**
12912
13587
  * List of headers's keys (separated with ',') whove value are added to the args
12913
13588
  * Header's key lowercased and '-'' replaced to '_' such that 'Content-Type' becomes the 'content_type' arg key
@@ -12918,27 +13593,40 @@ export type $OpenApiTs = {
12918
13593
  * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
12919
13594
  */
12920
13595
  jobId?: string;
12921
- path: string;
12922
13596
  /**
12923
- * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
13597
+ * The parent job that is at the origin and responsible for the execution of this script if any
13598
+ */
13599
+ parentJob?: string;
13600
+ /**
13601
+ * The base64 encoded payload that has been encoded as a JSON. e.g how to encode such payload encodeURIComponent
13602
+ * `encodeURIComponent(btoa(JSON.stringify({a: 2})))`
12924
13603
  *
12925
13604
  */
12926
- queueLimit?: string;
13605
+ payload?: string;
12927
13606
  /**
12928
- * script args
13607
+ * delay between polling for job updates in milliseconds
12929
13608
  */
12930
- requestBody: ScriptArgs;
13609
+ pollDelayMs?: number;
13610
+ /**
13611
+ * The maximum size of the queue for which the request would get rejected if that job would push it above that limit
13612
+ *
13613
+ */
13614
+ queueLimit?: string;
12931
13615
  /**
12932
13616
  * skip the preprocessor
12933
13617
  */
12934
13618
  skipPreprocessor?: boolean;
13619
+ /**
13620
+ * Override the tag to use
13621
+ */
13622
+ tag?: string;
12935
13623
  workspace: string;
12936
13624
  };
12937
13625
  res: {
12938
13626
  /**
12939
- * job result
13627
+ * server-sent events stream of job updates
12940
13628
  */
12941
- 200: unknown;
13629
+ 200: string;
12942
13630
  };
12943
13631
  };
12944
13632
  };
@@ -12974,6 +13662,10 @@ export type $OpenApiTs = {
12974
13662
  * The job id to assign to the created job. if missing, job is chosen randomly using the ULID scheme. If a job id already exists in the queue or as a completed job, the request to create one will fail (Bad Request)
12975
13663
  */
12976
13664
  jobId?: string;
13665
+ /**
13666
+ * memory ID for chat-enabled flows
13667
+ */
13668
+ memoryId?: string;
12977
13669
  /**
12978
13670
  * The parent job that is at the origin and responsible for the execution of this script if any
12979
13671
  */
@@ -14673,6 +15365,73 @@ export type $OpenApiTs = {
14673
15365
  };
14674
15366
  };
14675
15367
  };
15368
+ '/w/{workspace}/flow_conversations/list': {
15369
+ get: {
15370
+ req: {
15371
+ /**
15372
+ * filter conversations by flow path
15373
+ */
15374
+ flowPath?: string;
15375
+ /**
15376
+ * which page to return (start at 1, default 1)
15377
+ */
15378
+ page?: number;
15379
+ /**
15380
+ * number of items to return for a given page (default 30, max 100)
15381
+ */
15382
+ perPage?: number;
15383
+ workspace: string;
15384
+ };
15385
+ res: {
15386
+ /**
15387
+ * flow conversations list
15388
+ */
15389
+ 200: Array<FlowConversation>;
15390
+ };
15391
+ };
15392
+ };
15393
+ '/w/{workspace}/flow_conversations/delete/{conversation_id}': {
15394
+ delete: {
15395
+ req: {
15396
+ /**
15397
+ * conversation id
15398
+ */
15399
+ conversationId: string;
15400
+ workspace: string;
15401
+ };
15402
+ res: {
15403
+ /**
15404
+ * flow conversation deleted
15405
+ */
15406
+ 200: string;
15407
+ };
15408
+ };
15409
+ };
15410
+ '/w/{workspace}/flow_conversations/{conversation_id}/messages': {
15411
+ get: {
15412
+ req: {
15413
+ /**
15414
+ * conversation id
15415
+ */
15416
+ conversationId: string;
15417
+ /**
15418
+ * which page to return (start at 1, default 1)
15419
+ */
15420
+ page?: number;
15421
+ /**
15422
+ * number of items to return for a given page (default 30, max 100)
15423
+ */
15424
+ perPage?: number;
15425
+ workspace: string;
15426
+ };
15427
+ res: {
15428
+ /**
15429
+ * conversation messages
15430
+ */
15431
+ 200: Array<FlowConversationMessage>;
15432
+ };
15433
+ };
15434
+ };
14676
15435
  '/w/{workspace}/raw_apps/list': {
14677
15436
  get: {
14678
15437
  req: {