windmill-client 1.871.0 → 1.872.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.
@@ -29,7 +29,7 @@ const OpenAPI = {
29
29
  PASSWORD: void 0,
30
30
  TOKEN: getEnv("WM_TOKEN"),
31
31
  USERNAME: void 0,
32
- VERSION: "1.871.0",
32
+ VERSION: "1.872.0",
33
33
  WITH_CREDENTIALS: !getEnv("WM_RAW_APP"),
34
34
  interceptors: {
35
35
  request: new Interceptors(),
package/dist/index.js CHANGED
@@ -126,7 +126,7 @@ const OpenAPI = {
126
126
  PASSWORD: void 0,
127
127
  TOKEN: getEnv$1("WM_TOKEN"),
128
128
  USERNAME: void 0,
129
- VERSION: "1.871.0",
129
+ VERSION: "1.872.0",
130
130
  WITH_CREDENTIALS: !getEnv$1("WM_RAW_APP"),
131
131
  interceptors: {
132
132
  request: new Interceptors(),
@@ -5951,6 +5951,22 @@ var OauthService = class {
5951
5951
  path: { client: data.client }
5952
5952
  });
5953
5953
  }
5954
+ /**
5955
+ * test an instance OAuth entry's client credentials
5956
+ * Runs the client-credentials token exchange with an instance OAuth entry, saved or not. Superadmin only.
5957
+ * @param data The data for the request.
5958
+ * @param data.requestBody
5959
+ * @returns string the exchange returned a token
5960
+ * @throws ApiError
5961
+ */
5962
+ static testOauthClientCredentials(data) {
5963
+ return request(OpenAPI, {
5964
+ method: "POST",
5965
+ url: "/oauth/test_client_credentials",
5966
+ body: data.requestBody,
5967
+ mediaType: "application/json"
5968
+ });
5969
+ }
5954
5970
  };
5955
5971
  var TeamsService = class {
5956
5972
  /**
@@ -9509,6 +9525,7 @@ var JobService = class {
9509
9525
  * @param data.jobId 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)
9510
9526
  * @param data.skipPreprocessor skip the preprocessor
9511
9527
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
9528
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
9512
9529
  * @returns unknown job result
9513
9530
  * @throws ApiError
9514
9531
  */
@@ -9525,11 +9542,12 @@ var JobService = class {
9525
9542
  queue_limit: data.queueLimit,
9526
9543
  job_id: data.jobId,
9527
9544
  skip_preprocessor: data.skipPreprocessor,
9528
- memory_id: data.memoryId
9545
+ memory_id: data.memoryId,
9546
+ take_over: data.takeOver
9529
9547
  },
9530
9548
  body: data.requestBody,
9531
9549
  mediaType: "application/json",
9532
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
9550
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
9533
9551
  });
9534
9552
  }
9535
9553
  /**
@@ -9546,6 +9564,7 @@ var JobService = class {
9546
9564
  * @param data.jobId 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)
9547
9565
  * @param data.skipPreprocessor skip the preprocessor
9548
9566
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
9567
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
9549
9568
  * @returns unknown job result
9550
9569
  * @throws ApiError
9551
9570
  */
@@ -9562,11 +9581,12 @@ var JobService = class {
9562
9581
  queue_limit: data.queueLimit,
9563
9582
  job_id: data.jobId,
9564
9583
  skip_preprocessor: data.skipPreprocessor,
9565
- memory_id: data.memoryId
9584
+ memory_id: data.memoryId,
9585
+ take_over: data.takeOver
9566
9586
  },
9567
9587
  body: data.requestBody,
9568
9588
  mediaType: "application/json",
9569
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
9589
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
9570
9590
  });
9571
9591
  }
9572
9592
  /**
@@ -9585,6 +9605,7 @@ var JobService = class {
9585
9605
  * @param data.jobId 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)
9586
9606
  * @param data.skipPreprocessor skip the preprocessor
9587
9607
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
9608
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
9588
9609
  * @returns unknown job result
9589
9610
  * @throws ApiError
9590
9611
  */
@@ -9602,9 +9623,10 @@ var JobService = class {
9602
9623
  payload: data.payload,
9603
9624
  job_id: data.jobId,
9604
9625
  skip_preprocessor: data.skipPreprocessor,
9605
- memory_id: data.memoryId
9626
+ memory_id: data.memoryId,
9627
+ take_over: data.takeOver
9606
9628
  },
9607
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
9629
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
9608
9630
  });
9609
9631
  }
9610
9632
  /**
@@ -9621,6 +9643,7 @@ var JobService = class {
9621
9643
  * @param data.jobId 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)
9622
9644
  * @param data.skipPreprocessor skip the preprocessor
9623
9645
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
9646
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
9624
9647
  * @param data.pollDelayMs delay between polling for job updates in milliseconds
9625
9648
  * @returns string server-sent events stream of job updates
9626
9649
  * @throws ApiError
@@ -9639,11 +9662,12 @@ var JobService = class {
9639
9662
  job_id: data.jobId,
9640
9663
  skip_preprocessor: data.skipPreprocessor,
9641
9664
  memory_id: data.memoryId,
9665
+ take_over: data.takeOver,
9642
9666
  poll_delay_ms: data.pollDelayMs
9643
9667
  },
9644
9668
  body: data.requestBody,
9645
9669
  mediaType: "application/json",
9646
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
9670
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
9647
9671
  });
9648
9672
  }
9649
9673
  /**
@@ -9662,6 +9686,7 @@ var JobService = class {
9662
9686
  * @param data.jobId 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)
9663
9687
  * @param data.skipPreprocessor skip the preprocessor
9664
9688
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
9689
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
9665
9690
  * @param data.pollDelayMs delay between polling for job updates in milliseconds
9666
9691
  * @returns string server-sent events stream of job updates
9667
9692
  * @throws ApiError
@@ -9681,9 +9706,10 @@ var JobService = class {
9681
9706
  job_id: data.jobId,
9682
9707
  skip_preprocessor: data.skipPreprocessor,
9683
9708
  memory_id: data.memoryId,
9709
+ take_over: data.takeOver,
9684
9710
  poll_delay_ms: data.pollDelayMs
9685
9711
  },
9686
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
9712
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
9687
9713
  });
9688
9714
  }
9689
9715
  /**
@@ -9700,6 +9726,7 @@ var JobService = class {
9700
9726
  * @param data.jobId 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)
9701
9727
  * @param data.skipPreprocessor skip the preprocessor
9702
9728
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
9729
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
9703
9730
  * @param data.pollDelayMs delay between polling for job updates in milliseconds
9704
9731
  * @returns string server-sent events stream of job updates
9705
9732
  * @throws ApiError
@@ -9718,11 +9745,12 @@ var JobService = class {
9718
9745
  job_id: data.jobId,
9719
9746
  skip_preprocessor: data.skipPreprocessor,
9720
9747
  memory_id: data.memoryId,
9748
+ take_over: data.takeOver,
9721
9749
  poll_delay_ms: data.pollDelayMs
9722
9750
  },
9723
9751
  body: data.requestBody,
9724
9752
  mediaType: "application/json",
9725
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
9753
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
9726
9754
  });
9727
9755
  }
9728
9756
  /**
@@ -9741,6 +9769,7 @@ var JobService = class {
9741
9769
  * @param data.jobId 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)
9742
9770
  * @param data.skipPreprocessor skip the preprocessor
9743
9771
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
9772
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
9744
9773
  * @param data.pollDelayMs delay between polling for job updates in milliseconds
9745
9774
  * @returns string server-sent events stream of job updates
9746
9775
  * @throws ApiError
@@ -9760,9 +9789,10 @@ var JobService = class {
9760
9789
  job_id: data.jobId,
9761
9790
  skip_preprocessor: data.skipPreprocessor,
9762
9791
  memory_id: data.memoryId,
9792
+ take_over: data.takeOver,
9763
9793
  poll_delay_ms: data.pollDelayMs
9764
9794
  },
9765
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
9795
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
9766
9796
  });
9767
9797
  }
9768
9798
  /**
@@ -10012,6 +10042,7 @@ var JobService = class {
10012
10042
  *
10013
10043
  * @param data.invisibleToOwner make the run invisible to the the flow owner (default false)
10014
10044
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
10045
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
10015
10046
  * @returns string job created
10016
10047
  * @throws ApiError
10017
10048
  */
@@ -10032,11 +10063,12 @@ var JobService = class {
10032
10063
  job_id: data.jobId,
10033
10064
  include_header: data.includeHeader,
10034
10065
  invisible_to_owner: data.invisibleToOwner,
10035
- memory_id: data.memoryId
10066
+ memory_id: data.memoryId,
10067
+ take_over: data.takeOver
10036
10068
  },
10037
10069
  body: data.requestBody,
10038
10070
  mediaType: "application/json",
10039
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
10071
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
10040
10072
  });
10041
10073
  }
10042
10074
  /**
@@ -10056,6 +10088,7 @@ var JobService = class {
10056
10088
  *
10057
10089
  * @param data.invisibleToOwner make the run invisible to the the flow owner (default false)
10058
10090
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
10091
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
10059
10092
  * @returns string job created
10060
10093
  * @throws ApiError
10061
10094
  */
@@ -10076,11 +10109,12 @@ var JobService = class {
10076
10109
  job_id: data.jobId,
10077
10110
  include_header: data.includeHeader,
10078
10111
  invisible_to_owner: data.invisibleToOwner,
10079
- memory_id: data.memoryId
10112
+ memory_id: data.memoryId,
10113
+ take_over: data.takeOver
10080
10114
  },
10081
10115
  body: data.requestBody,
10082
10116
  mediaType: "application/json",
10083
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
10117
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
10084
10118
  });
10085
10119
  }
10086
10120
  /**
@@ -10375,6 +10409,7 @@ var JobService = class {
10375
10409
  * @param data.invisibleToOwner make the run invisible to the the script owner (default false)
10376
10410
  * @param data.jobId 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)
10377
10411
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
10412
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
10378
10413
  * @returns string job created
10379
10414
  * @throws ApiError
10380
10415
  */
@@ -10387,11 +10422,12 @@ var JobService = class {
10387
10422
  include_header: data.includeHeader,
10388
10423
  invisible_to_owner: data.invisibleToOwner,
10389
10424
  job_id: data.jobId,
10390
- memory_id: data.memoryId
10425
+ memory_id: data.memoryId,
10426
+ take_over: data.takeOver
10391
10427
  },
10392
10428
  body: data.requestBody,
10393
10429
  mediaType: "application/json",
10394
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
10430
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
10395
10431
  });
10396
10432
  }
10397
10433
  /**
@@ -10407,6 +10443,7 @@ var JobService = class {
10407
10443
  * @param data.path
10408
10444
  * @param data.requestBody the run's inputs
10409
10445
  * @param data.memoryId The conversation this turn belongs to. A uuid is used as is; any other string is hashed within the workspace and agent.
10446
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
10410
10447
  * @returns string job created
10411
10448
  * @throws ApiError
10412
10449
  */
@@ -10418,7 +10455,10 @@ var JobService = class {
10418
10455
  workspace: data.workspace,
10419
10456
  path: data.path
10420
10457
  },
10421
- query: { memory_id: data.memoryId },
10458
+ query: {
10459
+ memory_id: data.memoryId,
10460
+ take_over: data.takeOver
10461
+ },
10422
10462
  body: data.requestBody,
10423
10463
  mediaType: "application/json"
10424
10464
  });
@@ -10429,6 +10469,7 @@ var JobService = class {
10429
10469
  * @param data.workspace
10430
10470
  * @param data.requestBody preview
10431
10471
  * @param data.memoryId Memory id for the flow's AI agent steps. A uuid is used as is; any other string is hashed within the workspace and flow, so the same string always names the same memory of that flow.
10472
+ * @param data.takeOver Stop the run that holds `memory_id`, if any, and run this one instead of being refused with a 409. Only who started that run, or an admin, can stop it; a restricted token also needs an unconfined `jobs:cancel` scope.
10432
10473
  * @returns unknown job result
10433
10474
  * @throws ApiError
10434
10475
  */
@@ -10437,10 +10478,13 @@ var JobService = class {
10437
10478
  method: "POST",
10438
10479
  url: "/w/{workspace}/jobs/run_wait_result/preview_flow",
10439
10480
  path: { workspace: data.workspace },
10440
- query: { memory_id: data.memoryId },
10481
+ query: {
10482
+ memory_id: data.memoryId,
10483
+ take_over: data.takeOver
10484
+ },
10441
10485
  body: data.requestBody,
10442
10486
  mediaType: "application/json",
10443
- errors: { 409: "Chat-enabled flow only: the conversation named by `memory_id` is still answering a message. The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\" } }`." }
10487
+ errors: { 409: "Another run with this `memory_id` is still running (for a chat-enabled flow, the conversation is still answering a message). The body is JSON: `{ \"error\": string, \"running_turn\": { \"job_id\", \"user_seq\"? } }`, `user_seq` for a chat conversation. Pass `take_over=true` to stop it instead." }
10444
10488
  });
10445
10489
  }
10446
10490
  /**