windmill-client 1.850.0 → 1.851.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.
@@ -12000,6 +12000,279 @@ var SlackAgentsService = class {
12000
12000
  });
12001
12001
  }
12002
12002
  };
12003
+ var AiService = class {
12004
+ /**
12005
+ * one text completion with the workspace's AI config
12006
+ * Sends a system and a user message to the configured provider and returns the text of the answer, with no tools and no streaming. For callers that do not speak a provider's own API through the proxy, such as the CLI and jobs.
12007
+ *
12008
+ * @param data The data for the request.
12009
+ * @param data.workspace
12010
+ * @param data.requestBody
12011
+ * @returns unknown the answer, and the model that wrote it
12012
+ * @throws ApiError
12013
+ */
12014
+ static completeAi(data) {
12015
+ return request(OpenAPI, {
12016
+ method: "POST",
12017
+ url: "/w/{workspace}/ai/complete",
12018
+ path: { workspace: data.workspace },
12019
+ body: data.requestBody,
12020
+ mediaType: "application/json"
12021
+ });
12022
+ }
12023
+ /**
12024
+ * record AI token usage for the calling user
12025
+ * @param data The data for the request.
12026
+ * @param data.workspace
12027
+ * @param data.requestBody
12028
+ * @returns void usage recorded
12029
+ * @throws ApiError
12030
+ */
12031
+ static recordAiUsage(data) {
12032
+ return request(OpenAPI, {
12033
+ method: "POST",
12034
+ url: "/w/{workspace}/ai/usage",
12035
+ path: { workspace: data.workspace },
12036
+ body: data.requestBody,
12037
+ mediaType: "application/json"
12038
+ });
12039
+ }
12040
+ /**
12041
+ * list aggregated AI token usage
12042
+ * @param data The data for the request.
12043
+ * @param data.workspace
12044
+ * @param data.days
12045
+ * @param data.groupBy
12046
+ * @param data.scope workspace-wide usage (admin only) or the calling user's own
12047
+ * @returns unknown usage buckets
12048
+ * @throws ApiError
12049
+ */
12050
+ static listAiUsage(data) {
12051
+ return request(OpenAPI, {
12052
+ method: "GET",
12053
+ url: "/w/{workspace}/ai/usage",
12054
+ path: { workspace: data.workspace },
12055
+ query: {
12056
+ days: data.days,
12057
+ group_by: data.groupBy,
12058
+ scope: data.scope
12059
+ }
12060
+ });
12061
+ }
12062
+ /**
12063
+ * list the calling user's AI session backups in the workspace object storage
12064
+ * @param data The data for the request.
12065
+ * @param data.workspace
12066
+ * @returns unknown backups, newest first; `enabled` is false when the workspace has no storage for them
12067
+ * @throws ApiError
12068
+ */
12069
+ static listAiSessionBackups(data) {
12070
+ return request(OpenAPI, {
12071
+ method: "GET",
12072
+ url: "/w/{workspace}/ai/sessions/list",
12073
+ path: { workspace: data.workspace }
12074
+ });
12075
+ }
12076
+ /**
12077
+ * fetch whole AI session backups
12078
+ * @param data The data for the request.
12079
+ * @param data.workspace
12080
+ * @param data.requestBody
12081
+ * @returns unknown the backups found; `deferred` lists ids that did not fit the response budget
12082
+ * @throws ApiError
12083
+ */
12084
+ static pullAiSessionBackups(data) {
12085
+ return request(OpenAPI, {
12086
+ method: "POST",
12087
+ url: "/w/{workspace}/ai/sessions/pull",
12088
+ path: { workspace: data.workspace },
12089
+ body: data.requestBody,
12090
+ mediaType: "application/json"
12091
+ });
12092
+ }
12093
+ /**
12094
+ * write changed pieces of AI sessions to their backups, and remove deleted ones
12095
+ * @param data The data for the request.
12096
+ * @param data.workspace
12097
+ * @param data.requestBody
12098
+ * @returns unknown one result per session written or removed, in request order
12099
+ * @throws ApiError
12100
+ */
12101
+ static pushAiSessionBackups(data) {
12102
+ return request(OpenAPI, {
12103
+ method: "POST",
12104
+ url: "/w/{workspace}/ai/sessions/push",
12105
+ path: { workspace: data.workspace },
12106
+ body: data.requestBody,
12107
+ mediaType: "application/json"
12108
+ });
12109
+ }
12110
+ /**
12111
+ * share an AI session artifact with the workspace
12112
+ * Stores a read-only copy that any member of the workspace can open by id. Sharing the same artifact again updates that copy, keeps its id, and restarts its retention window.
12113
+ *
12114
+ * @param data The data for the request.
12115
+ * @param data.workspace
12116
+ * @param data.requestBody
12117
+ * @returns SharedAiArtifactInfo the shared copy
12118
+ * @throws ApiError
12119
+ */
12120
+ static shareAiArtifact(data) {
12121
+ return request(OpenAPI, {
12122
+ method: "POST",
12123
+ url: "/w/{workspace}/ai/shared_artifacts/share",
12124
+ path: { workspace: data.workspace },
12125
+ body: data.requestBody,
12126
+ mediaType: "application/json"
12127
+ });
12128
+ }
12129
+ /**
12130
+ * get the calling user's share of one of their AI session artifacts
12131
+ * @param data The data for the request.
12132
+ * @param data.workspace
12133
+ * @param data.artifactId
12134
+ * @returns unknown the live share, if any, and how long shares last
12135
+ * @throws ApiError
12136
+ */
12137
+ static getAiArtifactShareStatus(data) {
12138
+ return request(OpenAPI, {
12139
+ method: "GET",
12140
+ url: "/w/{workspace}/ai/shared_artifacts/status",
12141
+ path: { workspace: data.workspace },
12142
+ query: { artifact_id: data.artifactId }
12143
+ });
12144
+ }
12145
+ /**
12146
+ * get a shared AI session artifact
12147
+ * @param data The data for the request.
12148
+ * @param data.workspace
12149
+ * @param data.id
12150
+ * @returns unknown the shared artifact
12151
+ * @throws ApiError
12152
+ */
12153
+ static getSharedAiArtifact(data) {
12154
+ return request(OpenAPI, {
12155
+ method: "GET",
12156
+ url: "/w/{workspace}/ai/shared_artifacts/get/{id}",
12157
+ path: {
12158
+ workspace: data.workspace,
12159
+ id: data.id
12160
+ }
12161
+ });
12162
+ }
12163
+ /**
12164
+ * stop sharing an AI session artifact
12165
+ * @param data The data for the request.
12166
+ * @param data.workspace
12167
+ * @param data.id
12168
+ * @returns string share deleted
12169
+ * @throws ApiError
12170
+ */
12171
+ static unshareAiArtifact(data) {
12172
+ return request(OpenAPI, {
12173
+ method: "DELETE",
12174
+ url: "/w/{workspace}/ai/shared_artifacts/delete/{id}",
12175
+ path: {
12176
+ workspace: data.workspace,
12177
+ id: data.id
12178
+ }
12179
+ });
12180
+ }
12181
+ /**
12182
+ * share an AI session transcript by link
12183
+ * Stores a read-only snapshot of the session that members of the workspace can open by id, or anyone with the link once it is public. Sharing the same session again updates that snapshot and keeps its id.
12184
+ *
12185
+ * @param data The data for the request.
12186
+ * @param data.workspace
12187
+ * @param data.requestBody
12188
+ * @returns SharedAiSessionInfo the shared snapshot
12189
+ * @throws ApiError
12190
+ */
12191
+ static shareAiSession(data) {
12192
+ return request(OpenAPI, {
12193
+ method: "POST",
12194
+ url: "/w/{workspace}/ai/shared_sessions/share",
12195
+ path: { workspace: data.workspace },
12196
+ body: data.requestBody,
12197
+ mediaType: "application/json"
12198
+ });
12199
+ }
12200
+ /**
12201
+ * get the calling user's share of one of their AI sessions
12202
+ * @param data The data for the request.
12203
+ * @param data.workspace
12204
+ * @param data.sessionId
12205
+ * @returns unknown the share, if any
12206
+ * @throws ApiError
12207
+ */
12208
+ static getAiSessionShareStatus(data) {
12209
+ return request(OpenAPI, {
12210
+ method: "GET",
12211
+ url: "/w/{workspace}/ai/shared_sessions/status",
12212
+ path: { workspace: data.workspace },
12213
+ query: { session_id: data.sessionId }
12214
+ });
12215
+ }
12216
+ /**
12217
+ * make a shared AI session public, or reserve it to workspace members
12218
+ * @param data The data for the request.
12219
+ * @param data.workspace
12220
+ * @param data.id
12221
+ * @param data.requestBody
12222
+ * @returns SharedAiSessionInfo the updated share
12223
+ * @throws ApiError
12224
+ */
12225
+ static setAiSessionSharePublic(data) {
12226
+ return request(OpenAPI, {
12227
+ method: "POST",
12228
+ url: "/w/{workspace}/ai/shared_sessions/set_public/{id}",
12229
+ path: {
12230
+ workspace: data.workspace,
12231
+ id: data.id
12232
+ },
12233
+ body: data.requestBody,
12234
+ mediaType: "application/json"
12235
+ });
12236
+ }
12237
+ /**
12238
+ * get a shared AI session
12239
+ * A public share is served without authentication; any other one only to a member of the workspace.
12240
+ *
12241
+ * @param data The data for the request.
12242
+ * @param data.workspace
12243
+ * @param data.id
12244
+ * @returns unknown the shared session
12245
+ * @throws ApiError
12246
+ */
12247
+ static getSharedAiSession(data) {
12248
+ return request(OpenAPI, {
12249
+ method: "GET",
12250
+ url: "/w/{workspace}/ai_u/shared_sessions/get/{id}",
12251
+ path: {
12252
+ workspace: data.workspace,
12253
+ id: data.id
12254
+ }
12255
+ });
12256
+ }
12257
+ /**
12258
+ * stop sharing an AI session
12259
+ * @param data The data for the request.
12260
+ * @param data.workspace
12261
+ * @param data.id
12262
+ * @returns string share deleted
12263
+ * @throws ApiError
12264
+ */
12265
+ static unshareAiSession(data) {
12266
+ return request(OpenAPI, {
12267
+ method: "DELETE",
12268
+ url: "/w/{workspace}/ai/shared_sessions/delete/{id}",
12269
+ path: {
12270
+ workspace: data.workspace,
12271
+ id: data.id
12272
+ }
12273
+ });
12274
+ }
12275
+ };
12003
12276
  var AiEvalsService = class {
12004
12277
  /**
12005
12278
  * list eval datasets
@@ -12331,260 +12604,6 @@ var RawAppService = class {
12331
12604
  });
12332
12605
  }
12333
12606
  };
12334
- var AiService = class {
12335
- /**
12336
- * record AI token usage for the calling user
12337
- * @param data The data for the request.
12338
- * @param data.workspace
12339
- * @param data.requestBody
12340
- * @returns void usage recorded
12341
- * @throws ApiError
12342
- */
12343
- static recordAiUsage(data) {
12344
- return request(OpenAPI, {
12345
- method: "POST",
12346
- url: "/w/{workspace}/ai/usage",
12347
- path: { workspace: data.workspace },
12348
- body: data.requestBody,
12349
- mediaType: "application/json"
12350
- });
12351
- }
12352
- /**
12353
- * list aggregated AI token usage
12354
- * @param data The data for the request.
12355
- * @param data.workspace
12356
- * @param data.days
12357
- * @param data.groupBy
12358
- * @param data.scope workspace-wide usage (admin only) or the calling user's own
12359
- * @returns unknown usage buckets
12360
- * @throws ApiError
12361
- */
12362
- static listAiUsage(data) {
12363
- return request(OpenAPI, {
12364
- method: "GET",
12365
- url: "/w/{workspace}/ai/usage",
12366
- path: { workspace: data.workspace },
12367
- query: {
12368
- days: data.days,
12369
- group_by: data.groupBy,
12370
- scope: data.scope
12371
- }
12372
- });
12373
- }
12374
- /**
12375
- * list the calling user's AI session backups in the workspace object storage
12376
- * @param data The data for the request.
12377
- * @param data.workspace
12378
- * @returns unknown backups, newest first; `enabled` is false when the workspace has no storage for them
12379
- * @throws ApiError
12380
- */
12381
- static listAiSessionBackups(data) {
12382
- return request(OpenAPI, {
12383
- method: "GET",
12384
- url: "/w/{workspace}/ai/sessions/list",
12385
- path: { workspace: data.workspace }
12386
- });
12387
- }
12388
- /**
12389
- * fetch whole AI session backups
12390
- * @param data The data for the request.
12391
- * @param data.workspace
12392
- * @param data.requestBody
12393
- * @returns unknown the backups found; `deferred` lists ids that did not fit the response budget
12394
- * @throws ApiError
12395
- */
12396
- static pullAiSessionBackups(data) {
12397
- return request(OpenAPI, {
12398
- method: "POST",
12399
- url: "/w/{workspace}/ai/sessions/pull",
12400
- path: { workspace: data.workspace },
12401
- body: data.requestBody,
12402
- mediaType: "application/json"
12403
- });
12404
- }
12405
- /**
12406
- * write changed pieces of AI sessions to their backups, and remove deleted ones
12407
- * @param data The data for the request.
12408
- * @param data.workspace
12409
- * @param data.requestBody
12410
- * @returns unknown one result per session written or removed, in request order
12411
- * @throws ApiError
12412
- */
12413
- static pushAiSessionBackups(data) {
12414
- return request(OpenAPI, {
12415
- method: "POST",
12416
- url: "/w/{workspace}/ai/sessions/push",
12417
- path: { workspace: data.workspace },
12418
- body: data.requestBody,
12419
- mediaType: "application/json"
12420
- });
12421
- }
12422
- /**
12423
- * share an AI session artifact with the workspace
12424
- * Stores a read-only copy that any member of the workspace can open by id. Sharing the same artifact again updates that copy, keeps its id, and restarts its retention window.
12425
- *
12426
- * @param data The data for the request.
12427
- * @param data.workspace
12428
- * @param data.requestBody
12429
- * @returns SharedAiArtifactInfo the shared copy
12430
- * @throws ApiError
12431
- */
12432
- static shareAiArtifact(data) {
12433
- return request(OpenAPI, {
12434
- method: "POST",
12435
- url: "/w/{workspace}/ai/shared_artifacts/share",
12436
- path: { workspace: data.workspace },
12437
- body: data.requestBody,
12438
- mediaType: "application/json"
12439
- });
12440
- }
12441
- /**
12442
- * get the calling user's share of one of their AI session artifacts
12443
- * @param data The data for the request.
12444
- * @param data.workspace
12445
- * @param data.artifactId
12446
- * @returns unknown the live share, if any, and how long shares last
12447
- * @throws ApiError
12448
- */
12449
- static getAiArtifactShareStatus(data) {
12450
- return request(OpenAPI, {
12451
- method: "GET",
12452
- url: "/w/{workspace}/ai/shared_artifacts/status",
12453
- path: { workspace: data.workspace },
12454
- query: { artifact_id: data.artifactId }
12455
- });
12456
- }
12457
- /**
12458
- * get a shared AI session artifact
12459
- * @param data The data for the request.
12460
- * @param data.workspace
12461
- * @param data.id
12462
- * @returns unknown the shared artifact
12463
- * @throws ApiError
12464
- */
12465
- static getSharedAiArtifact(data) {
12466
- return request(OpenAPI, {
12467
- method: "GET",
12468
- url: "/w/{workspace}/ai/shared_artifacts/get/{id}",
12469
- path: {
12470
- workspace: data.workspace,
12471
- id: data.id
12472
- }
12473
- });
12474
- }
12475
- /**
12476
- * stop sharing an AI session artifact
12477
- * @param data The data for the request.
12478
- * @param data.workspace
12479
- * @param data.id
12480
- * @returns string share deleted
12481
- * @throws ApiError
12482
- */
12483
- static unshareAiArtifact(data) {
12484
- return request(OpenAPI, {
12485
- method: "DELETE",
12486
- url: "/w/{workspace}/ai/shared_artifacts/delete/{id}",
12487
- path: {
12488
- workspace: data.workspace,
12489
- id: data.id
12490
- }
12491
- });
12492
- }
12493
- /**
12494
- * share an AI session transcript by link
12495
- * Stores a read-only snapshot of the session that members of the workspace can open by id, or anyone with the link once it is public. Sharing the same session again updates that snapshot and keeps its id.
12496
- *
12497
- * @param data The data for the request.
12498
- * @param data.workspace
12499
- * @param data.requestBody
12500
- * @returns SharedAiSessionInfo the shared snapshot
12501
- * @throws ApiError
12502
- */
12503
- static shareAiSession(data) {
12504
- return request(OpenAPI, {
12505
- method: "POST",
12506
- url: "/w/{workspace}/ai/shared_sessions/share",
12507
- path: { workspace: data.workspace },
12508
- body: data.requestBody,
12509
- mediaType: "application/json"
12510
- });
12511
- }
12512
- /**
12513
- * get the calling user's share of one of their AI sessions
12514
- * @param data The data for the request.
12515
- * @param data.workspace
12516
- * @param data.sessionId
12517
- * @returns unknown the share, if any
12518
- * @throws ApiError
12519
- */
12520
- static getAiSessionShareStatus(data) {
12521
- return request(OpenAPI, {
12522
- method: "GET",
12523
- url: "/w/{workspace}/ai/shared_sessions/status",
12524
- path: { workspace: data.workspace },
12525
- query: { session_id: data.sessionId }
12526
- });
12527
- }
12528
- /**
12529
- * make a shared AI session public, or reserve it to workspace members
12530
- * @param data The data for the request.
12531
- * @param data.workspace
12532
- * @param data.id
12533
- * @param data.requestBody
12534
- * @returns SharedAiSessionInfo the updated share
12535
- * @throws ApiError
12536
- */
12537
- static setAiSessionSharePublic(data) {
12538
- return request(OpenAPI, {
12539
- method: "POST",
12540
- url: "/w/{workspace}/ai/shared_sessions/set_public/{id}",
12541
- path: {
12542
- workspace: data.workspace,
12543
- id: data.id
12544
- },
12545
- body: data.requestBody,
12546
- mediaType: "application/json"
12547
- });
12548
- }
12549
- /**
12550
- * get a shared AI session
12551
- * A public share is served without authentication; any other one only to a member of the workspace.
12552
- *
12553
- * @param data The data for the request.
12554
- * @param data.workspace
12555
- * @param data.id
12556
- * @returns unknown the shared session
12557
- * @throws ApiError
12558
- */
12559
- static getSharedAiSession(data) {
12560
- return request(OpenAPI, {
12561
- method: "GET",
12562
- url: "/w/{workspace}/ai_u/shared_sessions/get/{id}",
12563
- path: {
12564
- workspace: data.workspace,
12565
- id: data.id
12566
- }
12567
- });
12568
- }
12569
- /**
12570
- * stop sharing an AI session
12571
- * @param data The data for the request.
12572
- * @param data.workspace
12573
- * @param data.id
12574
- * @returns string share deleted
12575
- * @throws ApiError
12576
- */
12577
- static unshareAiSession(data) {
12578
- return request(OpenAPI, {
12579
- method: "DELETE",
12580
- url: "/w/{workspace}/ai/shared_sessions/delete/{id}",
12581
- path: {
12582
- workspace: data.workspace,
12583
- id: data.id
12584
- }
12585
- });
12586
- }
12587
- };
12588
12607
  var TriggerService = class {
12589
12608
  /**
12590
12609
  * resume all suspended jobs for a specific trigger