@getmodus/sdk 0.12.0 → 0.13.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.
- package/CHANGELOG.md +7 -1
- package/dist/{_client-base-DvrAQWuU.d.cts → _client-base-CGqIZtrm.d.cts} +75 -256
- package/dist/{_client-base-DvrAQWuU.d.ts → _client-base-CGqIZtrm.d.ts} +75 -256
- package/dist/{chunk-3CKUUDEJ.js → chunk-KX2P3TAH.js} +3 -13
- package/dist/chunk-KX2P3TAH.js.map +1 -0
- package/dist/{chunk-QHA3LF2Q.cjs → chunk-RK4NLJIN.cjs} +3 -13
- package/dist/chunk-RK4NLJIN.cjs.map +1 -0
- package/dist/index.cjs +118 -164
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -36
- package/dist/index.d.ts +5 -36
- package/dist/index.js +1 -47
- package/dist/index.js.map +1 -1
- package/dist/management/index.cjs +258 -258
- package/dist/management/index.cjs.map +1 -1
- package/dist/management/index.d.cts +4 -2
- package/dist/management/index.d.ts +4 -2
- package/dist/management/index.js +1 -1
- package/dist/management/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-3CKUUDEJ.js.map +0 -1
- package/dist/chunk-QHA3LF2Q.cjs.map +0 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkRK4NLJINcjs = require('../chunk-RK4NLJIN.cjs');
|
|
15
15
|
|
|
16
16
|
// src/_generated/resources/management/workflows.ts
|
|
17
17
|
var WorkflowsResourceBase = class {
|
|
@@ -50,7 +50,7 @@ var WorkflowsResourceBase = class {
|
|
|
50
50
|
*/
|
|
51
51
|
list(options = {}) {
|
|
52
52
|
const pageSize = _nullishCoalesce(options.pageSize, () => ( 25));
|
|
53
|
-
|
|
53
|
+
_chunkRK4NLJINcjs.validatePageSize.call(void 0, pageSize);
|
|
54
54
|
return this.listPage(pageSize, options.pageToken, options.search, options.type, options.view, options.includeVariation);
|
|
55
55
|
}
|
|
56
56
|
async listPage(pageSize, pageToken, search, type, view, includeVariation) {
|
|
@@ -59,12 +59,12 @@ var WorkflowsResourceBase = class {
|
|
|
59
59
|
if (type !== void 0) extra.type = type;
|
|
60
60
|
if (view !== void 0) extra.view = view;
|
|
61
61
|
if (includeVariation !== void 0) extra.includeVariation = includeVariation;
|
|
62
|
-
const data =
|
|
63
|
-
await
|
|
64
|
-
query:
|
|
62
|
+
const data = _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
63
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "WorkflowsController_list", {
|
|
64
|
+
query: _chunkRK4NLJINcjs.aipListParams.call(void 0, pageSize, pageToken, extra)
|
|
65
65
|
})
|
|
66
66
|
);
|
|
67
|
-
return
|
|
67
|
+
return _chunkRK4NLJINcjs.buildAipPage.call(void 0,
|
|
68
68
|
data,
|
|
69
69
|
"workflows",
|
|
70
70
|
(raw) => raw,
|
|
@@ -88,8 +88,8 @@ var WorkflowsResourceBase = class {
|
|
|
88
88
|
* ```
|
|
89
89
|
*/
|
|
90
90
|
async delete(workflowId) {
|
|
91
|
-
|
|
92
|
-
await
|
|
91
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, workflowId, "workflow_id");
|
|
92
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "WorkflowsController_delete", {
|
|
93
93
|
pathParams: { id: workflowId }
|
|
94
94
|
});
|
|
95
95
|
}
|
|
@@ -105,8 +105,8 @@ var WorkflowsResourceBase = class {
|
|
|
105
105
|
* @param workflowId - Numeric workflow id.
|
|
106
106
|
*/
|
|
107
107
|
async restore(workflowId) {
|
|
108
|
-
|
|
109
|
-
const data = await
|
|
108
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, workflowId, "workflow_id");
|
|
109
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "WorkflowsController_restore", {
|
|
110
110
|
pathParams: { id: workflowId },
|
|
111
111
|
jsonBody: {}
|
|
112
112
|
});
|
|
@@ -123,8 +123,8 @@ var WorkflowsResourceBase = class {
|
|
|
123
123
|
* @param workflowId - Numeric workflow id.
|
|
124
124
|
*/
|
|
125
125
|
async cancelOwnershipTransfer(workflowId) {
|
|
126
|
-
|
|
127
|
-
const data = await
|
|
126
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, workflowId, "workflow_id");
|
|
127
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "WorkflowsController_cancelOwnershipTransfer", {
|
|
128
128
|
pathParams: { id: workflowId }
|
|
129
129
|
});
|
|
130
130
|
return data;
|
|
@@ -139,8 +139,8 @@ var WorkflowsResourceBase = class {
|
|
|
139
139
|
* @param workflowId - Numeric workflow id.
|
|
140
140
|
*/
|
|
141
141
|
async acceptOwnershipTransfer(workflowId) {
|
|
142
|
-
|
|
143
|
-
const data = await
|
|
142
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, workflowId, "workflow_id");
|
|
143
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "WorkflowsController_acceptOwnershipTransfer", {
|
|
144
144
|
pathParams: { id: workflowId },
|
|
145
145
|
jsonBody: {}
|
|
146
146
|
});
|
|
@@ -152,7 +152,7 @@ var WorkflowsResourceBase = class {
|
|
|
152
152
|
function updateMaskQuery(updateMask) {
|
|
153
153
|
if (updateMask === void 0) return void 0;
|
|
154
154
|
if (!updateMask.trim()) {
|
|
155
|
-
throw new (0,
|
|
155
|
+
throw new (0, _chunkRK4NLJINcjs.ValidationError)("update_mask must be a non-empty comma-separated list of field names");
|
|
156
156
|
}
|
|
157
157
|
return { updateMask };
|
|
158
158
|
}
|
|
@@ -184,8 +184,8 @@ var WorkflowsInterfacesResourceBase = class {
|
|
|
184
184
|
* **Requires:** `workflows:read`
|
|
185
185
|
*/
|
|
186
186
|
async list() {
|
|
187
|
-
|
|
188
|
-
const data = await
|
|
187
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.workflowId, "workflow_id");
|
|
188
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "WorkflowInterfacesController_list", {
|
|
189
189
|
pathParams: { id: this.workflowId }
|
|
190
190
|
});
|
|
191
191
|
return data.interfaces;
|
|
@@ -199,8 +199,8 @@ var WorkflowsInterfacesResourceBase = class {
|
|
|
199
199
|
* **Requires:** `workflows:write`
|
|
200
200
|
*/
|
|
201
201
|
async deleteAll() {
|
|
202
|
-
|
|
203
|
-
await
|
|
202
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.workflowId, "workflow_id");
|
|
203
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "WorkflowInterfacesController_deleteAll", {
|
|
204
204
|
pathParams: { id: this.workflowId }
|
|
205
205
|
});
|
|
206
206
|
}
|
|
@@ -214,9 +214,9 @@ var WorkflowsInterfacesResourceBase = class {
|
|
|
214
214
|
* @param interfaceId - Interface row id (UUID).
|
|
215
215
|
*/
|
|
216
216
|
async delete(interfaceId) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
await
|
|
217
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.workflowId, "workflow_id");
|
|
218
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, interfaceId, "interface_id");
|
|
219
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "WorkflowInterfacesController_delete", {
|
|
220
220
|
pathParams: { id: this.workflowId, interfaceId }
|
|
221
221
|
});
|
|
222
222
|
}
|
|
@@ -231,10 +231,10 @@ var WorkflowInterfacesResource = class extends WorkflowsInterfacesResourceBase {
|
|
|
231
231
|
* @returns The created interface.
|
|
232
232
|
*/
|
|
233
233
|
async create(options) {
|
|
234
|
-
|
|
235
|
-
return await
|
|
234
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.workflowId, "workflow_id");
|
|
235
|
+
return await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "WorkflowInterfacesController_add", {
|
|
236
236
|
pathParams: { id: this.workflowId },
|
|
237
|
-
jsonBody:
|
|
237
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, options)
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
240
|
/**
|
|
@@ -246,9 +246,9 @@ var WorkflowInterfacesResource = class extends WorkflowsInterfacesResourceBase {
|
|
|
246
246
|
* @returns The updated interface.
|
|
247
247
|
*/
|
|
248
248
|
async update(interfaceId, options, updateMask) {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
return await
|
|
249
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.workflowId, "workflow_id");
|
|
250
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, interfaceId, "interface_id");
|
|
251
|
+
return await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "WorkflowInterfacesController_update", {
|
|
252
252
|
pathParams: { id: this.workflowId, interfaceId },
|
|
253
253
|
query: updateMaskQuery(updateMask),
|
|
254
254
|
jsonBody: updateBody(options, updateMask)
|
|
@@ -293,9 +293,9 @@ var ManagementWorkflowsResource = class extends WorkflowsResourceBase {
|
|
|
293
293
|
* ```
|
|
294
294
|
*/
|
|
295
295
|
async get(workflowId, options = {}) {
|
|
296
|
-
|
|
296
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, workflowId, "workflow_id");
|
|
297
297
|
const query = options.view !== void 0 ? { view: options.view } : void 0;
|
|
298
|
-
const data = await
|
|
298
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.get, {
|
|
299
299
|
pathParams: { id: workflowId },
|
|
300
300
|
query
|
|
301
301
|
});
|
|
@@ -324,7 +324,7 @@ var ManagementWorkflowsResource = class extends WorkflowsResourceBase {
|
|
|
324
324
|
* ```
|
|
325
325
|
*/
|
|
326
326
|
async create(options) {
|
|
327
|
-
const body =
|
|
327
|
+
const body = _chunkRK4NLJINcjs.omitUndefined.call(void 0, {
|
|
328
328
|
name: options.name,
|
|
329
329
|
type: options.type,
|
|
330
330
|
description: options.description,
|
|
@@ -332,7 +332,7 @@ var ManagementWorkflowsResource = class extends WorkflowsResourceBase {
|
|
|
332
332
|
agentSelection: options.agentSelection,
|
|
333
333
|
workflowStructure: options.workflowStructure
|
|
334
334
|
});
|
|
335
|
-
const data = await
|
|
335
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.create, {
|
|
336
336
|
jsonBody: body
|
|
337
337
|
});
|
|
338
338
|
return parseWorkflow(data);
|
|
@@ -354,7 +354,7 @@ var ManagementWorkflowsResource = class extends WorkflowsResourceBase {
|
|
|
354
354
|
* ```
|
|
355
355
|
*/
|
|
356
356
|
async update(workflowId, options = {}) {
|
|
357
|
-
|
|
357
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, workflowId, "workflow_id");
|
|
358
358
|
const fields = {
|
|
359
359
|
name: options.name,
|
|
360
360
|
type: options.type,
|
|
@@ -364,7 +364,7 @@ var ManagementWorkflowsResource = class extends WorkflowsResourceBase {
|
|
|
364
364
|
workflowStructure: options.workflowStructure
|
|
365
365
|
};
|
|
366
366
|
const body = updateBody(fields, options.updateMask);
|
|
367
|
-
const data = await
|
|
367
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.update, {
|
|
368
368
|
pathParams: { id: workflowId },
|
|
369
369
|
query: updateMaskQuery(options.updateMask),
|
|
370
370
|
jsonBody: body
|
|
@@ -384,9 +384,9 @@ var ManagementWorkflowsResource = class extends WorkflowsResourceBase {
|
|
|
384
384
|
* ```
|
|
385
385
|
*/
|
|
386
386
|
async deploy(workflowId) {
|
|
387
|
-
|
|
388
|
-
const data =
|
|
389
|
-
await
|
|
387
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, workflowId, "workflow_id");
|
|
388
|
+
const data = _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
389
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.deploy, {
|
|
390
390
|
pathParams: { id: workflowId },
|
|
391
391
|
jsonBody: {}
|
|
392
392
|
})
|
|
@@ -401,8 +401,8 @@ var ManagementWorkflowsResource = class extends WorkflowsResourceBase {
|
|
|
401
401
|
* @returns The updated workflow.
|
|
402
402
|
*/
|
|
403
403
|
async toggle(workflowId, options) {
|
|
404
|
-
|
|
405
|
-
const data = await
|
|
404
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, workflowId, "workflow_id");
|
|
405
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.toggle, {
|
|
406
406
|
pathParams: { id: workflowId },
|
|
407
407
|
jsonBody: { active: options.active }
|
|
408
408
|
});
|
|
@@ -416,14 +416,14 @@ var ManagementWorkflowsResource = class extends WorkflowsResourceBase {
|
|
|
416
416
|
* @returns The workflow with a pending ownership transfer.
|
|
417
417
|
*/
|
|
418
418
|
async requestOwnershipTransfer(workflowId, options) {
|
|
419
|
-
|
|
420
|
-
const data = await
|
|
419
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, workflowId, "workflow_id");
|
|
420
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0,
|
|
421
421
|
this.config,
|
|
422
422
|
this.http,
|
|
423
423
|
this.ops.requestOwnershipTransfer,
|
|
424
424
|
{
|
|
425
425
|
pathParams: { id: workflowId },
|
|
426
|
-
jsonBody:
|
|
426
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, { newOwnerUserId: options.newOwnerUserId })
|
|
427
427
|
}
|
|
428
428
|
);
|
|
429
429
|
return parseWorkflow(data);
|
|
@@ -438,10 +438,10 @@ function withCreatedUid(data) {
|
|
|
438
438
|
// src/management/context/_content-merge.ts
|
|
439
439
|
function requireContentDict(item, contextType) {
|
|
440
440
|
if (item.contextType !== contextType) {
|
|
441
|
-
throw new (0,
|
|
441
|
+
throw new (0, _chunkRK4NLJINcjs.ValidationError)(`Expected contextType ${contextType}, got ${item.contextType}.`);
|
|
442
442
|
}
|
|
443
443
|
if (!item.content || typeof item.content !== "object" || Array.isArray(item.content)) {
|
|
444
|
-
throw new (0,
|
|
444
|
+
throw new (0, _chunkRK4NLJINcjs.ValidationError)(`Context item ${item.uid} has no object content; cannot merge ${contextType} fields.`);
|
|
445
445
|
}
|
|
446
446
|
return item.content;
|
|
447
447
|
}
|
|
@@ -498,7 +498,7 @@ async function resolveAndUpdateSavedQuery(items, uid, options) {
|
|
|
498
498
|
}
|
|
499
499
|
async function resolveAndUpdateLink(items, uid, options) {
|
|
500
500
|
if (options.title === void 0 && options.url === void 0 && options.description === void 0 && options.userFeedback === void 0 && options.topics === void 0) {
|
|
501
|
-
throw new (0,
|
|
501
|
+
throw new (0, _chunkRK4NLJINcjs.ValidationError)("Provide at least one field to update.");
|
|
502
502
|
}
|
|
503
503
|
if (options.title === void 0 && options.url === void 0) {
|
|
504
504
|
return items.update(uid, {
|
|
@@ -541,8 +541,8 @@ var ContextDashboardsResourceBase = class {
|
|
|
541
541
|
* ```
|
|
542
542
|
*/
|
|
543
543
|
async delete(dashboardId) {
|
|
544
|
-
|
|
545
|
-
await
|
|
544
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
545
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_delete", {
|
|
546
546
|
pathParams: { dashboardId }
|
|
547
547
|
});
|
|
548
548
|
}
|
|
@@ -562,11 +562,11 @@ var ContextDashboardsResourceBase = class {
|
|
|
562
562
|
* ```
|
|
563
563
|
*/
|
|
564
564
|
async listDraftSnapshots(dashboardId) {
|
|
565
|
-
|
|
566
|
-
const data = await
|
|
565
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
566
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_listDraftSnapshots", {
|
|
567
567
|
pathParams: { dashboardId }
|
|
568
568
|
});
|
|
569
|
-
return
|
|
569
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0, data).snapshots;
|
|
570
570
|
}
|
|
571
571
|
/**
|
|
572
572
|
* Cancel an ownership transfer.
|
|
@@ -583,11 +583,11 @@ var ContextDashboardsResourceBase = class {
|
|
|
583
583
|
* ```
|
|
584
584
|
*/
|
|
585
585
|
async cancelOwnershipTransfer(dashboardId) {
|
|
586
|
-
|
|
587
|
-
const data = await
|
|
586
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
587
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_cancelOwnership", {
|
|
588
588
|
pathParams: { dashboardId }
|
|
589
589
|
});
|
|
590
|
-
return
|
|
590
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0, data);
|
|
591
591
|
}
|
|
592
592
|
/**
|
|
593
593
|
* Accept an ownership transfer.
|
|
@@ -604,11 +604,11 @@ var ContextDashboardsResourceBase = class {
|
|
|
604
604
|
* ```
|
|
605
605
|
*/
|
|
606
606
|
async acceptOwnershipTransfer(dashboardId) {
|
|
607
|
-
|
|
608
|
-
const data = await
|
|
607
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
608
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_acceptOwnership", {
|
|
609
609
|
pathParams: { dashboardId }
|
|
610
610
|
});
|
|
611
|
-
return
|
|
611
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0, data);
|
|
612
612
|
}
|
|
613
613
|
/**
|
|
614
614
|
* List dashboard versions.
|
|
@@ -627,11 +627,11 @@ var ContextDashboardsResourceBase = class {
|
|
|
627
627
|
* ```
|
|
628
628
|
*/
|
|
629
629
|
async listVersions(dashboardId) {
|
|
630
|
-
|
|
631
|
-
const data = await
|
|
630
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
631
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_listVersions", {
|
|
632
632
|
pathParams: { dashboardId }
|
|
633
633
|
});
|
|
634
|
-
return
|
|
634
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0, data).versions;
|
|
635
635
|
}
|
|
636
636
|
/**
|
|
637
637
|
* Get a dashboard version.
|
|
@@ -651,12 +651,12 @@ var ContextDashboardsResourceBase = class {
|
|
|
651
651
|
* ```
|
|
652
652
|
*/
|
|
653
653
|
async getVersion(dashboardId, versionId) {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
const data = await
|
|
654
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
655
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, versionId, "versionId");
|
|
656
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_getVersion", {
|
|
657
657
|
pathParams: { dashboardId, versionId }
|
|
658
658
|
});
|
|
659
|
-
return
|
|
659
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0, data);
|
|
660
660
|
}
|
|
661
661
|
/**
|
|
662
662
|
* Restore a dashboard version.
|
|
@@ -675,12 +675,12 @@ var ContextDashboardsResourceBase = class {
|
|
|
675
675
|
* ```
|
|
676
676
|
*/
|
|
677
677
|
async restoreVersion(dashboardId, versionId) {
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
const data = await
|
|
678
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
679
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, versionId, "versionId");
|
|
680
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_restore", {
|
|
681
681
|
pathParams: { dashboardId, versionId }
|
|
682
682
|
});
|
|
683
|
-
return
|
|
683
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0, data);
|
|
684
684
|
}
|
|
685
685
|
};
|
|
686
686
|
|
|
@@ -708,10 +708,10 @@ var ContextDashboardsElementsResourceBase = class {
|
|
|
708
708
|
* ```
|
|
709
709
|
*/
|
|
710
710
|
async list() {
|
|
711
|
-
const data = await
|
|
711
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_listElements", {
|
|
712
712
|
pathParams: { dashboardId: this.dashboardId }
|
|
713
713
|
});
|
|
714
|
-
return
|
|
714
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0, data);
|
|
715
715
|
}
|
|
716
716
|
/**
|
|
717
717
|
* Get a dashboard element.
|
|
@@ -730,11 +730,11 @@ var ContextDashboardsElementsResourceBase = class {
|
|
|
730
730
|
* ```
|
|
731
731
|
*/
|
|
732
732
|
async get(elementId) {
|
|
733
|
-
|
|
734
|
-
const data = await
|
|
733
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, elementId, "elementId");
|
|
734
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_getElement", {
|
|
735
735
|
pathParams: { dashboardId: this.dashboardId, elementId }
|
|
736
736
|
});
|
|
737
|
-
return
|
|
737
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0, data);
|
|
738
738
|
}
|
|
739
739
|
};
|
|
740
740
|
|
|
@@ -767,8 +767,8 @@ var ManagementDashboardElementsResource = class extends ContextDashboardsElement
|
|
|
767
767
|
* ```
|
|
768
768
|
*/
|
|
769
769
|
async create(input) {
|
|
770
|
-
return
|
|
771
|
-
await
|
|
770
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
771
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_createElement", {
|
|
772
772
|
pathParams: { dashboardId: this.dashboardId },
|
|
773
773
|
jsonBody: {
|
|
774
774
|
expectedRevision: input.expectedRevision,
|
|
@@ -798,9 +798,9 @@ var ManagementDashboardElementsResource = class extends ContextDashboardsElement
|
|
|
798
798
|
* ```
|
|
799
799
|
*/
|
|
800
800
|
async update(elementId, input) {
|
|
801
|
-
|
|
802
|
-
return
|
|
803
|
-
await
|
|
801
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, elementId, "elementId");
|
|
802
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
803
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_updateElement", {
|
|
804
804
|
pathParams: { dashboardId: this.dashboardId, elementId },
|
|
805
805
|
jsonBody: { expectedRevision: input.expectedRevision, patch: input.patch }
|
|
806
806
|
})
|
|
@@ -825,8 +825,8 @@ var ManagementDashboardsResource = class extends ContextDashboardsResourceBase {
|
|
|
825
825
|
* ```
|
|
826
826
|
*/
|
|
827
827
|
async list(options = {}) {
|
|
828
|
-
const data =
|
|
829
|
-
await
|
|
828
|
+
const data = _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
829
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_list", {
|
|
830
830
|
query: { view: options.view }
|
|
831
831
|
})
|
|
832
832
|
);
|
|
@@ -847,9 +847,9 @@ var ManagementDashboardsResource = class extends ContextDashboardsResourceBase {
|
|
|
847
847
|
* ```
|
|
848
848
|
*/
|
|
849
849
|
async get(dashboardId, options = {}) {
|
|
850
|
-
|
|
851
|
-
return
|
|
852
|
-
await
|
|
850
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
851
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
852
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_get", {
|
|
853
853
|
pathParams: { dashboardId },
|
|
854
854
|
query: { view: options.view }
|
|
855
855
|
})
|
|
@@ -878,8 +878,8 @@ var ManagementDashboardsResource = class extends ContextDashboardsResourceBase {
|
|
|
878
878
|
* ```
|
|
879
879
|
*/
|
|
880
880
|
async create(input) {
|
|
881
|
-
return
|
|
882
|
-
await
|
|
881
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
882
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_create", {
|
|
883
883
|
jsonBody: {
|
|
884
884
|
title: input.title,
|
|
885
885
|
description: input.description,
|
|
@@ -913,9 +913,9 @@ var ManagementDashboardsResource = class extends ContextDashboardsResourceBase {
|
|
|
913
913
|
* ```
|
|
914
914
|
*/
|
|
915
915
|
async updateDraft(dashboardId, input) {
|
|
916
|
-
|
|
917
|
-
return
|
|
918
|
-
await
|
|
916
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
917
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
918
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_updateDraft", {
|
|
919
919
|
pathParams: { dashboardId },
|
|
920
920
|
jsonBody: {
|
|
921
921
|
expectedRevision: input.expectedRevision,
|
|
@@ -943,9 +943,9 @@ var ManagementDashboardsResource = class extends ContextDashboardsResourceBase {
|
|
|
943
943
|
* ```
|
|
944
944
|
*/
|
|
945
945
|
async publish(dashboardId, input) {
|
|
946
|
-
|
|
947
|
-
return
|
|
948
|
-
await
|
|
946
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
947
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
948
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_publish", {
|
|
949
949
|
pathParams: { dashboardId },
|
|
950
950
|
jsonBody: { expectedRevision: input.expectedRevision }
|
|
951
951
|
})
|
|
@@ -975,9 +975,9 @@ var ManagementDashboardsResource = class extends ContextDashboardsResourceBase {
|
|
|
975
975
|
* ```
|
|
976
976
|
*/
|
|
977
977
|
async updateAccess(dashboardId, input) {
|
|
978
|
-
|
|
979
|
-
return
|
|
980
|
-
await
|
|
978
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
979
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
980
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_updateAccess", {
|
|
981
981
|
pathParams: { dashboardId },
|
|
982
982
|
jsonBody: {
|
|
983
983
|
visibility: input.visibility,
|
|
@@ -1006,10 +1006,10 @@ var ManagementDashboardsResource = class extends ContextDashboardsResourceBase {
|
|
|
1006
1006
|
* ```
|
|
1007
1007
|
*/
|
|
1008
1008
|
async requestOwnershipTransfer(dashboardId, input) {
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
return
|
|
1012
|
-
await
|
|
1009
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
1010
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, input.newOwnerUserId, "newOwnerUserId");
|
|
1011
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
1012
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_transferOwnership", {
|
|
1013
1013
|
pathParams: { dashboardId },
|
|
1014
1014
|
jsonBody: { newOwnerUserId: input.newOwnerUserId }
|
|
1015
1015
|
})
|
|
@@ -1026,7 +1026,7 @@ var ManagementDashboardsResource = class extends ContextDashboardsResourceBase {
|
|
|
1026
1026
|
* ```
|
|
1027
1027
|
*/
|
|
1028
1028
|
elements(dashboardId) {
|
|
1029
|
-
|
|
1029
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
1030
1030
|
return new ManagementDashboardElementsResource(this.http, this.config, dashboardId);
|
|
1031
1031
|
}
|
|
1032
1032
|
/**
|
|
@@ -1047,9 +1047,9 @@ var ManagementDashboardsResource = class extends ContextDashboardsResourceBase {
|
|
|
1047
1047
|
* ```
|
|
1048
1048
|
*/
|
|
1049
1049
|
async updateLayout(dashboardId, input) {
|
|
1050
|
-
|
|
1051
|
-
return
|
|
1052
|
-
await
|
|
1050
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, dashboardId, "dashboardId");
|
|
1051
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
1052
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "DashboardsController_updateLayout", {
|
|
1053
1053
|
pathParams: { dashboardId },
|
|
1054
1054
|
jsonBody: { expectedRevision: input.expectedRevision, elements: input.elements }
|
|
1055
1055
|
})
|
|
@@ -1083,16 +1083,16 @@ var ContextFilesResourceBase = class {
|
|
|
1083
1083
|
*/
|
|
1084
1084
|
list(options = {}) {
|
|
1085
1085
|
const pageSize = _nullishCoalesce(options.pageSize, () => ( 50));
|
|
1086
|
-
|
|
1086
|
+
_chunkRK4NLJINcjs.validatePageSize.call(void 0, pageSize, 200);
|
|
1087
1087
|
return this.listPage(pageSize, options.pageToken);
|
|
1088
1088
|
}
|
|
1089
1089
|
async listPage(pageSize, pageToken) {
|
|
1090
|
-
const data =
|
|
1091
|
-
await
|
|
1092
|
-
query:
|
|
1090
|
+
const data = _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
1091
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextFilesController_list", {
|
|
1092
|
+
query: _chunkRK4NLJINcjs.aipListParams.call(void 0, pageSize, pageToken)
|
|
1093
1093
|
})
|
|
1094
1094
|
);
|
|
1095
|
-
return
|
|
1095
|
+
return _chunkRK4NLJINcjs.buildAipPage.call(void 0,
|
|
1096
1096
|
data,
|
|
1097
1097
|
"files",
|
|
1098
1098
|
(raw) => raw,
|
|
@@ -1110,11 +1110,11 @@ var ContextFilesResourceBase = class {
|
|
|
1110
1110
|
* @param uploadId - Upload id returned by `createUploadUrl` / `createUploadUrls`.
|
|
1111
1111
|
*/
|
|
1112
1112
|
async get(uploadId) {
|
|
1113
|
-
|
|
1114
|
-
const data = await
|
|
1113
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, uploadId, "uploadId");
|
|
1114
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextFilesController_get", {
|
|
1115
1115
|
pathParams: { uploadId }
|
|
1116
1116
|
});
|
|
1117
|
-
return
|
|
1117
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0, data);
|
|
1118
1118
|
}
|
|
1119
1119
|
};
|
|
1120
1120
|
|
|
@@ -1132,19 +1132,19 @@ async function statInput(path) {
|
|
|
1132
1132
|
return await _promises.stat.call(void 0, path);
|
|
1133
1133
|
} catch (error) {
|
|
1134
1134
|
const code = error.code;
|
|
1135
|
-
if (code === "ENOENT" || code === "ENOTDIR") throw new (0,
|
|
1135
|
+
if (code === "ENOENT" || code === "ENOTDIR") throw new (0, _chunkRK4NLJINcjs.ValidationError)(`No such file or directory: ${path}`);
|
|
1136
1136
|
throw error;
|
|
1137
1137
|
}
|
|
1138
1138
|
}
|
|
1139
1139
|
function validateWaitUntil(waitUntil) {
|
|
1140
1140
|
if (!WAIT_UNTIL_VALUES.has(waitUntil)) {
|
|
1141
|
-
throw new (0,
|
|
1141
|
+
throw new (0, _chunkRK4NLJINcjs.ValidationError)(`waitUntil must be one of ${[...WAIT_UNTIL_VALUES].join(", ")}, got ${waitUntil}`);
|
|
1142
1142
|
}
|
|
1143
1143
|
}
|
|
1144
1144
|
function validateBulkSize(count, name) {
|
|
1145
|
-
if (count === 0) throw new (0,
|
|
1145
|
+
if (count === 0) throw new (0, _chunkRK4NLJINcjs.ValidationError)(`${name} must not be empty`);
|
|
1146
1146
|
if (count > MAX_BULK_UPLOAD_FILES) {
|
|
1147
|
-
throw new (0,
|
|
1147
|
+
throw new (0, _chunkRK4NLJINcjs.ValidationError)(`${name} must have at most ${MAX_BULK_UPLOAD_FILES} entries, got ${count}`);
|
|
1148
1148
|
}
|
|
1149
1149
|
}
|
|
1150
1150
|
function statusSatisfies(status, waitUntil) {
|
|
@@ -1207,7 +1207,7 @@ async function putBytes(fetchImpl, slot, data, timeoutMs) {
|
|
|
1207
1207
|
});
|
|
1208
1208
|
if (!response.ok) {
|
|
1209
1209
|
const text = await response.text().catch(() => "");
|
|
1210
|
-
throw new (0,
|
|
1210
|
+
throw new (0, _chunkRK4NLJINcjs.ModusError)(`Upload PUT to presigned URL failed with HTTP ${response.status}.`, {
|
|
1211
1211
|
statusCode: response.status,
|
|
1212
1212
|
body: text ? text.slice(0, 500) : void 0
|
|
1213
1213
|
});
|
|
@@ -1265,8 +1265,8 @@ var ManagementContextFilesResource = class extends ContextFilesResourceBase {
|
|
|
1265
1265
|
* re-derives the key from `uploadId` and `fileName`.
|
|
1266
1266
|
*/
|
|
1267
1267
|
async createUploadUrl(input) {
|
|
1268
|
-
return
|
|
1269
|
-
await
|
|
1268
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
1269
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextFilesController_uploadUrl", {
|
|
1270
1270
|
jsonBody: { fileName: input.fileName, contentType: input.contentType, fileSize: input.fileSize }
|
|
1271
1271
|
})
|
|
1272
1272
|
);
|
|
@@ -1280,8 +1280,8 @@ var ManagementContextFilesResource = class extends ContextFilesResourceBase {
|
|
|
1280
1280
|
*/
|
|
1281
1281
|
async createUploadUrls(files) {
|
|
1282
1282
|
validateBulkSize(files.length, "files");
|
|
1283
|
-
return
|
|
1284
|
-
await
|
|
1283
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
1284
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextFilesController_uploadUrls", {
|
|
1285
1285
|
jsonBody: createSlotsPayload(files)
|
|
1286
1286
|
})
|
|
1287
1287
|
);
|
|
@@ -1296,8 +1296,8 @@ var ManagementContextFilesResource = class extends ContextFilesResourceBase {
|
|
|
1296
1296
|
* @returns File upload resource with status `processing` — parsing continues async.
|
|
1297
1297
|
*/
|
|
1298
1298
|
async uploadFromUrl(url, options = {}) {
|
|
1299
|
-
return
|
|
1300
|
-
await
|
|
1299
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
1300
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextFilesController_uploadFromUrl", {
|
|
1301
1301
|
jsonBody: {
|
|
1302
1302
|
url,
|
|
1303
1303
|
...options.fileName !== void 0 ? { fileName: options.fileName } : {},
|
|
@@ -1315,8 +1315,8 @@ var ManagementContextFilesResource = class extends ContextFilesResourceBase {
|
|
|
1315
1315
|
*/
|
|
1316
1316
|
async uploadFromUrls(urls) {
|
|
1317
1317
|
validateBulkSize(urls.length, "urls");
|
|
1318
|
-
return
|
|
1319
|
-
await
|
|
1318
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
1319
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextFilesController_uploadFromUrls", {
|
|
1320
1320
|
jsonBody: uploadFromUrlsPayload(urls)
|
|
1321
1321
|
})
|
|
1322
1322
|
);
|
|
@@ -1333,9 +1333,9 @@ var ManagementContextFilesResource = class extends ContextFilesResourceBase {
|
|
|
1333
1333
|
* @returns The file upload resource, status `"processing"`.
|
|
1334
1334
|
*/
|
|
1335
1335
|
async finalize(uploadId, fileName, options = {}) {
|
|
1336
|
-
|
|
1337
|
-
return
|
|
1338
|
-
await
|
|
1336
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, uploadId, "uploadId");
|
|
1337
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
1338
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextFilesController_finalize", {
|
|
1339
1339
|
pathParams: { uploadId },
|
|
1340
1340
|
jsonBody: { fileName, ...options.folderPath !== void 0 ? { folderPath: options.folderPath } : {} }
|
|
1341
1341
|
})
|
|
@@ -1353,8 +1353,8 @@ var ManagementContextFilesResource = class extends ContextFilesResourceBase {
|
|
|
1353
1353
|
*/
|
|
1354
1354
|
async finalizeMany(uploads) {
|
|
1355
1355
|
validateBulkSize(uploads.length, "uploads");
|
|
1356
|
-
return
|
|
1357
|
-
await
|
|
1356
|
+
return _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
1357
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextFilesController_finalizeMany", {
|
|
1358
1358
|
jsonBody: {
|
|
1359
1359
|
uploads: uploads.map((u) => ({
|
|
1360
1360
|
uploadId: u.uploadId,
|
|
@@ -1414,7 +1414,7 @@ var ManagementContextFilesResource = class extends ContextFilesResourceBase {
|
|
|
1414
1414
|
const waitUntil = _nullishCoalesce(options.waitUntil, () => ( "processing"));
|
|
1415
1415
|
validateWaitUntil(waitUntil);
|
|
1416
1416
|
const fileStat = await statInput(path);
|
|
1417
|
-
if (!fileStat.isFile()) throw new (0,
|
|
1417
|
+
if (!fileStat.isFile()) throw new (0, _chunkRK4NLJINcjs.ValidationError)(`Not a file: ${path}`);
|
|
1418
1418
|
const fileName = path.split(/[/\\]/).pop();
|
|
1419
1419
|
const slot = await this.createUploadUrl({
|
|
1420
1420
|
fileName,
|
|
@@ -1440,7 +1440,7 @@ var ManagementContextFilesResource = class extends ContextFilesResourceBase {
|
|
|
1440
1440
|
const item = await this.get(uploadId);
|
|
1441
1441
|
if (statusSatisfies(item.status, waitUntil)) return item;
|
|
1442
1442
|
if (Date.now() >= deadline) {
|
|
1443
|
-
throw new (0,
|
|
1443
|
+
throw new (0, _chunkRK4NLJINcjs.ModusError)(
|
|
1444
1444
|
`Timed out after ${timeoutMs}ms waiting for upload ${JSON.stringify(uploadId)} to reach status ${JSON.stringify(waitUntil)}; last status was ${JSON.stringify(item.status)}.`
|
|
1445
1445
|
);
|
|
1446
1446
|
}
|
|
@@ -1476,9 +1476,9 @@ var ManagementContextFilesResource = class extends ContextFilesResourceBase {
|
|
|
1476
1476
|
const waitUntil = _nullishCoalesce(options.waitUntil, () => ( "processing"));
|
|
1477
1477
|
validateWaitUntil(waitUntil);
|
|
1478
1478
|
const concurrency = _nullishCoalesce(options.concurrency, () => ( DEFAULT_CONCURRENCY));
|
|
1479
|
-
if (concurrency < 1) throw new (0,
|
|
1479
|
+
if (concurrency < 1) throw new (0, _chunkRK4NLJINcjs.ValidationError)(`concurrency must be >= 1, got ${concurrency}`);
|
|
1480
1480
|
const dirStat = await statInput(path);
|
|
1481
|
-
if (!dirStat.isDirectory()) throw new (0,
|
|
1481
|
+
if (!dirStat.isDirectory()) throw new (0, _chunkRK4NLJINcjs.ValidationError)(`Not a directory: ${path}`);
|
|
1482
1482
|
const files = await walkFiles(path, _nullishCoalesce(options.recursive, () => ( true)));
|
|
1483
1483
|
return this.uploadPaths(files.map((file) => {
|
|
1484
1484
|
const folderPath = _path.relative.call(void 0, path, _path.dirname.call(void 0, file)).replace(/\\/g, "/");
|
|
@@ -1491,7 +1491,7 @@ var ManagementContextFilesResource = class extends ContextFilesResourceBase {
|
|
|
1491
1491
|
const waitUntil = _nullishCoalesce(options.waitUntil, () => ( "processing"));
|
|
1492
1492
|
validateWaitUntil(waitUntil);
|
|
1493
1493
|
const concurrency = _nullishCoalesce(options.concurrency, () => ( DEFAULT_CONCURRENCY));
|
|
1494
|
-
if (concurrency < 1) throw new (0,
|
|
1494
|
+
if (concurrency < 1) throw new (0, _chunkRK4NLJINcjs.ValidationError)(`concurrency must be >= 1, got ${concurrency}`);
|
|
1495
1495
|
const prefixed = files.map((file) => {
|
|
1496
1496
|
const folderPath = joinDestination(options.folderPath, file.folderPath);
|
|
1497
1497
|
return { path: file.path, ...folderPath !== void 0 ? { folderPath } : {} };
|
|
@@ -1628,12 +1628,12 @@ function contextListParams(pageSize, pageToken, filters = {}) {
|
|
|
1628
1628
|
if (filters.connectionIds !== void 0) {
|
|
1629
1629
|
extra.connectionIds = filters.connectionIds.length === 0 ? "" : [...filters.connectionIds];
|
|
1630
1630
|
}
|
|
1631
|
-
return
|
|
1631
|
+
return _chunkRK4NLJINcjs.aipListParams.call(void 0, pageSize, pageToken, extra);
|
|
1632
1632
|
}
|
|
1633
1633
|
function moveBody(options) {
|
|
1634
1634
|
if (options.destinationFolderPath === void 0) return { destinationFolderUid: options.destinationFolderUid };
|
|
1635
1635
|
if (options.destinationFolderUid !== void 0) {
|
|
1636
|
-
throw new (0,
|
|
1636
|
+
throw new (0, _chunkRK4NLJINcjs.ValidationError)("Pass destinationFolderUid or destinationFolderPath, not both");
|
|
1637
1637
|
}
|
|
1638
1638
|
return { destinationFolderPath: options.destinationFolderPath };
|
|
1639
1639
|
}
|
|
@@ -1674,7 +1674,7 @@ var ManagementContextItemsResource = class {
|
|
|
1674
1674
|
*/
|
|
1675
1675
|
list(options = {}) {
|
|
1676
1676
|
const pageSize = _nullishCoalesce(options.pageSize, () => ( 25));
|
|
1677
|
-
|
|
1677
|
+
_chunkRK4NLJINcjs.validatePageSize.call(void 0, pageSize);
|
|
1678
1678
|
return this.listPage(pageSize, options.pageToken, {
|
|
1679
1679
|
contextType: options.contextType,
|
|
1680
1680
|
parentUids: options.parentUids,
|
|
@@ -1683,12 +1683,12 @@ var ManagementContextItemsResource = class {
|
|
|
1683
1683
|
});
|
|
1684
1684
|
}
|
|
1685
1685
|
async listPage(pageSize, pageToken, filters) {
|
|
1686
|
-
const data =
|
|
1687
|
-
await
|
|
1686
|
+
const data = _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
1687
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextItemsController_list", {
|
|
1688
1688
|
query: contextListParams(pageSize, pageToken, filters)
|
|
1689
1689
|
})
|
|
1690
1690
|
);
|
|
1691
|
-
return
|
|
1691
|
+
return _chunkRK4NLJINcjs.buildAipPage.call(void 0,
|
|
1692
1692
|
data,
|
|
1693
1693
|
"contextItems",
|
|
1694
1694
|
parseContextItem,
|
|
@@ -1702,7 +1702,7 @@ var ManagementContextItemsResource = class {
|
|
|
1702
1702
|
* @returns The context item.
|
|
1703
1703
|
*/
|
|
1704
1704
|
async get(uid) {
|
|
1705
|
-
const data = await
|
|
1705
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextItemsController_get", {
|
|
1706
1706
|
pathParams: { uid }
|
|
1707
1707
|
});
|
|
1708
1708
|
return parseContextItem(data);
|
|
@@ -1730,7 +1730,7 @@ var ManagementContextItemsResource = class {
|
|
|
1730
1730
|
userFeedback: options.userFeedback,
|
|
1731
1731
|
topics: options.topics
|
|
1732
1732
|
}, options.updateMask);
|
|
1733
|
-
await
|
|
1733
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextItemsController_update", {
|
|
1734
1734
|
pathParams: { uid },
|
|
1735
1735
|
query: updateMaskQuery(options.updateMask),
|
|
1736
1736
|
jsonBody: body
|
|
@@ -1744,7 +1744,7 @@ var ManagementContextItemsResource = class {
|
|
|
1744
1744
|
* @returns Deletion confirmation details.
|
|
1745
1745
|
*/
|
|
1746
1746
|
async delete(uid) {
|
|
1747
|
-
const data = await
|
|
1747
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ContextItemsController_delete", {
|
|
1748
1748
|
pathParams: { uid }
|
|
1749
1749
|
});
|
|
1750
1750
|
return data;
|
|
@@ -1778,7 +1778,7 @@ var ManagementContextItemsResource = class {
|
|
|
1778
1778
|
* ```
|
|
1779
1779
|
*/
|
|
1780
1780
|
async move(uid, options) {
|
|
1781
|
-
const data = await
|
|
1781
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0,
|
|
1782
1782
|
this.config,
|
|
1783
1783
|
this.http,
|
|
1784
1784
|
"ContextItemsController_move",
|
|
@@ -1818,7 +1818,7 @@ var ManagementContextItemsResource = class {
|
|
|
1818
1818
|
* ```
|
|
1819
1819
|
*/
|
|
1820
1820
|
async updateAccess(uid, input) {
|
|
1821
|
-
const data = await
|
|
1821
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0,
|
|
1822
1822
|
this.config,
|
|
1823
1823
|
this.http,
|
|
1824
1824
|
"ContextItemAccessController_updateAccess",
|
|
@@ -1842,7 +1842,7 @@ var ManagementContextResource = class {
|
|
|
1842
1842
|
this.http = http;
|
|
1843
1843
|
this.config = config;
|
|
1844
1844
|
this.items = new ManagementContextItemsResource(http, config);
|
|
1845
|
-
this.customItems = new (0,
|
|
1845
|
+
this.customItems = new (0, _chunkRK4NLJINcjs.CustomContextItemsResource)(http, config);
|
|
1846
1846
|
this.files = new ManagementContextFilesResource(http, config);
|
|
1847
1847
|
this.dashboards = new ManagementDashboardsResource(http, config);
|
|
1848
1848
|
}
|
|
@@ -1859,7 +1859,7 @@ var ManagementContextResource = class {
|
|
|
1859
1859
|
* ```
|
|
1860
1860
|
*/
|
|
1861
1861
|
createNote(title, content) {
|
|
1862
|
-
return this.create("ContextCreatorsController_createNote",
|
|
1862
|
+
return this.create("ContextCreatorsController_createNote", _chunkRK4NLJINcjs.omitUndefined.call(void 0, { title, content }));
|
|
1863
1863
|
}
|
|
1864
1864
|
/**
|
|
1865
1865
|
* Update a note's title and markdown body.
|
|
@@ -1904,7 +1904,7 @@ var ManagementContextResource = class {
|
|
|
1904
1904
|
createSavedQuery(name, options) {
|
|
1905
1905
|
return this.create(
|
|
1906
1906
|
"ContextCreatorsController_createSavedQuery",
|
|
1907
|
-
|
|
1907
|
+
_chunkRK4NLJINcjs.omitUndefined.call(void 0, {
|
|
1908
1908
|
name,
|
|
1909
1909
|
query: options.query,
|
|
1910
1910
|
connectionId: options.connectionId,
|
|
@@ -1952,7 +1952,7 @@ var ManagementContextResource = class {
|
|
|
1952
1952
|
createLink(url, options = {}) {
|
|
1953
1953
|
return this.create(
|
|
1954
1954
|
"ContextCreatorsController_createLink",
|
|
1955
|
-
|
|
1955
|
+
_chunkRK4NLJINcjs.omitUndefined.call(void 0, {
|
|
1956
1956
|
url,
|
|
1957
1957
|
title: options.title,
|
|
1958
1958
|
isCrawl: options.isCrawl,
|
|
@@ -1983,7 +1983,7 @@ var ManagementContextResource = class {
|
|
|
1983
1983
|
}
|
|
1984
1984
|
/** @internal */
|
|
1985
1985
|
async create(operationId, payload) {
|
|
1986
|
-
const data = await
|
|
1986
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, operationId, {
|
|
1987
1987
|
jsonBody: payload
|
|
1988
1988
|
});
|
|
1989
1989
|
return withCreatedUid(data);
|
|
@@ -2025,7 +2025,7 @@ var ScopesResourceBase = class {
|
|
|
2025
2025
|
*/
|
|
2026
2026
|
list(options = {}) {
|
|
2027
2027
|
const pageSize = _nullishCoalesce(options.pageSize, () => ( 25));
|
|
2028
|
-
|
|
2028
|
+
_chunkRK4NLJINcjs.validatePageSize.call(void 0, pageSize);
|
|
2029
2029
|
return this.listPage(pageSize, options.pageToken, options.search, options.view, options.managerId);
|
|
2030
2030
|
}
|
|
2031
2031
|
async listPage(pageSize, pageToken, search, view, managerId) {
|
|
@@ -2033,12 +2033,12 @@ var ScopesResourceBase = class {
|
|
|
2033
2033
|
if (search !== void 0) extra.search = search;
|
|
2034
2034
|
if (view !== void 0) extra.view = view;
|
|
2035
2035
|
if (managerId !== void 0) extra.managerId = managerId;
|
|
2036
|
-
const data =
|
|
2037
|
-
await
|
|
2038
|
-
query:
|
|
2036
|
+
const data = _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
2037
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopesController_list", {
|
|
2038
|
+
query: _chunkRK4NLJINcjs.aipListParams.call(void 0, pageSize, pageToken, extra)
|
|
2039
2039
|
})
|
|
2040
2040
|
);
|
|
2041
|
-
return
|
|
2041
|
+
return _chunkRK4NLJINcjs.buildAipPage.call(void 0,
|
|
2042
2042
|
data,
|
|
2043
2043
|
"scopes",
|
|
2044
2044
|
(raw) => raw,
|
|
@@ -2066,8 +2066,8 @@ var ScopesResourceBase = class {
|
|
|
2066
2066
|
* ```
|
|
2067
2067
|
*/
|
|
2068
2068
|
async get(scopeId, options = {}) {
|
|
2069
|
-
|
|
2070
|
-
const data = await
|
|
2069
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2070
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopesController_get", {
|
|
2071
2071
|
pathParams: { id: scopeId },
|
|
2072
2072
|
query: { view: options.view }
|
|
2073
2073
|
});
|
|
@@ -2090,8 +2090,8 @@ var ScopesResourceBase = class {
|
|
|
2090
2090
|
* ```
|
|
2091
2091
|
*/
|
|
2092
2092
|
async delete(scopeId) {
|
|
2093
|
-
|
|
2094
|
-
await
|
|
2093
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2094
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopesController_delete", {
|
|
2095
2095
|
pathParams: { id: scopeId }
|
|
2096
2096
|
});
|
|
2097
2097
|
}
|
|
@@ -2114,10 +2114,10 @@ var ScopesResourceBase = class {
|
|
|
2114
2114
|
* ```
|
|
2115
2115
|
*/
|
|
2116
2116
|
async mcpExposureCatalog(scopeId, request) {
|
|
2117
|
-
|
|
2118
|
-
const data = await
|
|
2117
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2118
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopesController_mcpExposureCatalog", {
|
|
2119
2119
|
pathParams: { id: scopeId },
|
|
2120
|
-
jsonBody:
|
|
2120
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, request)
|
|
2121
2121
|
});
|
|
2122
2122
|
return data;
|
|
2123
2123
|
}
|
|
@@ -2132,8 +2132,8 @@ var ScopesResourceBase = class {
|
|
|
2132
2132
|
* @param scopeId - Numeric scope id.
|
|
2133
2133
|
*/
|
|
2134
2134
|
async restore(scopeId) {
|
|
2135
|
-
|
|
2136
|
-
const data = await
|
|
2135
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2136
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopesController_restore", {
|
|
2137
2137
|
pathParams: { id: scopeId },
|
|
2138
2138
|
jsonBody: {}
|
|
2139
2139
|
});
|
|
@@ -2150,8 +2150,8 @@ var ScopesResourceBase = class {
|
|
|
2150
2150
|
* @param scopeId - Numeric scope id.
|
|
2151
2151
|
*/
|
|
2152
2152
|
async cancelOwnershipTransfer(scopeId) {
|
|
2153
|
-
|
|
2154
|
-
const data = await
|
|
2153
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2154
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopesController_cancelOwnershipTransfer", {
|
|
2155
2155
|
pathParams: { id: scopeId }
|
|
2156
2156
|
});
|
|
2157
2157
|
return data;
|
|
@@ -2166,8 +2166,8 @@ var ScopesResourceBase = class {
|
|
|
2166
2166
|
* @param scopeId - Numeric scope id.
|
|
2167
2167
|
*/
|
|
2168
2168
|
async acceptOwnershipTransfer(scopeId) {
|
|
2169
|
-
|
|
2170
|
-
const data = await
|
|
2169
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2170
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopesController_acceptOwnershipTransfer", {
|
|
2171
2171
|
pathParams: { id: scopeId },
|
|
2172
2172
|
jsonBody: {}
|
|
2173
2173
|
});
|
|
@@ -2232,20 +2232,20 @@ var ScopesMemoriesResourceBase = class {
|
|
|
2232
2232
|
*/
|
|
2233
2233
|
list(options = {}) {
|
|
2234
2234
|
const pageSize = _nullishCoalesce(options.pageSize, () => ( 25));
|
|
2235
|
-
|
|
2235
|
+
_chunkRK4NLJINcjs.validatePageSize.call(void 0, pageSize);
|
|
2236
2236
|
return this.listPage(pageSize, options.pageToken, options.userId);
|
|
2237
2237
|
}
|
|
2238
2238
|
async listPage(pageSize, pageToken, userId) {
|
|
2239
|
-
|
|
2239
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2240
2240
|
const extra = {};
|
|
2241
2241
|
if (userId !== void 0) extra.userId = userId;
|
|
2242
|
-
const data =
|
|
2243
|
-
await
|
|
2242
|
+
const data = _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
2243
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeMemoriesController_list", {
|
|
2244
2244
|
pathParams: { id: this.scopeId },
|
|
2245
|
-
query:
|
|
2245
|
+
query: _chunkRK4NLJINcjs.aipListParams.call(void 0, pageSize, pageToken, extra)
|
|
2246
2246
|
})
|
|
2247
2247
|
);
|
|
2248
|
-
return
|
|
2248
|
+
return _chunkRK4NLJINcjs.buildAipPage.call(void 0,
|
|
2249
2249
|
data,
|
|
2250
2250
|
"memories",
|
|
2251
2251
|
(raw) => raw,
|
|
@@ -2264,10 +2264,10 @@ var ScopesMemoriesResourceBase = class {
|
|
|
2264
2264
|
* @param request - Request body; see `MemorySearchRequest`.
|
|
2265
2265
|
*/
|
|
2266
2266
|
async search(request) {
|
|
2267
|
-
|
|
2268
|
-
const data = await
|
|
2267
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2268
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeMemoriesController_search", {
|
|
2269
2269
|
pathParams: { id: this.scopeId },
|
|
2270
|
-
jsonBody:
|
|
2270
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, request)
|
|
2271
2271
|
});
|
|
2272
2272
|
return data;
|
|
2273
2273
|
}
|
|
@@ -2285,12 +2285,12 @@ var ScopesMemoriesResourceBase = class {
|
|
|
2285
2285
|
* provided fields.
|
|
2286
2286
|
*/
|
|
2287
2287
|
async update(memoryId, update, options = {}) {
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
await
|
|
2288
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, memoryId, "memory_id");
|
|
2289
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2290
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeMemoriesController_update", {
|
|
2291
2291
|
pathParams: { id: this.scopeId, memoryId },
|
|
2292
2292
|
query: updateMaskQuery(options.updateMask),
|
|
2293
|
-
jsonBody:
|
|
2293
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, update)
|
|
2294
2294
|
});
|
|
2295
2295
|
}
|
|
2296
2296
|
/**
|
|
@@ -2303,9 +2303,9 @@ var ScopesMemoriesResourceBase = class {
|
|
|
2303
2303
|
* @param memoryId - Opaque memory id as returned by the list / search endpoints.
|
|
2304
2304
|
*/
|
|
2305
2305
|
async delete(memoryId) {
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
await
|
|
2306
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, memoryId, "memory_id");
|
|
2307
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2308
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeMemoriesController_delete", {
|
|
2309
2309
|
pathParams: { id: this.scopeId, memoryId }
|
|
2310
2310
|
});
|
|
2311
2311
|
}
|
|
@@ -2335,8 +2335,8 @@ var ScopesEvaluationsResourceBase = class {
|
|
|
2335
2335
|
* **Requires:** `scopes:read`
|
|
2336
2336
|
*/
|
|
2337
2337
|
async getConfig() {
|
|
2338
|
-
|
|
2339
|
-
const data = await
|
|
2338
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2339
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "EvaluationsController_getConfig", {
|
|
2340
2340
|
pathParams: { id: this.scopeId }
|
|
2341
2341
|
});
|
|
2342
2342
|
return data;
|
|
@@ -2352,10 +2352,10 @@ var ScopesEvaluationsResourceBase = class {
|
|
|
2352
2352
|
* @param update - Request body; see `UpdateEvaluationConfig`.
|
|
2353
2353
|
*/
|
|
2354
2354
|
async updateConfig(update) {
|
|
2355
|
-
|
|
2356
|
-
const data = await
|
|
2355
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2356
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "EvaluationsController_updateConfig", {
|
|
2357
2357
|
pathParams: { id: this.scopeId },
|
|
2358
|
-
jsonBody:
|
|
2358
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, update)
|
|
2359
2359
|
});
|
|
2360
2360
|
return data;
|
|
2361
2361
|
}
|
|
@@ -2370,8 +2370,8 @@ var ScopesEvaluationsResourceBase = class {
|
|
|
2370
2370
|
* /scopes/{id}/evaluations/runs/{runId}` for status.
|
|
2371
2371
|
*/
|
|
2372
2372
|
async triggerRun() {
|
|
2373
|
-
|
|
2374
|
-
const data = await
|
|
2373
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2374
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "EvaluationsController_triggerRun", {
|
|
2375
2375
|
pathParams: { id: this.scopeId }
|
|
2376
2376
|
});
|
|
2377
2377
|
return data;
|
|
@@ -2390,18 +2390,18 @@ var ScopesEvaluationsResourceBase = class {
|
|
|
2390
2390
|
*/
|
|
2391
2391
|
listRuns(options = {}) {
|
|
2392
2392
|
const pageSize = _nullishCoalesce(options.pageSize, () => ( 25));
|
|
2393
|
-
|
|
2393
|
+
_chunkRK4NLJINcjs.validatePageSize.call(void 0, pageSize);
|
|
2394
2394
|
return this.listRunsPage(pageSize, options.pageToken);
|
|
2395
2395
|
}
|
|
2396
2396
|
async listRunsPage(pageSize, pageToken) {
|
|
2397
|
-
|
|
2398
|
-
const data =
|
|
2399
|
-
await
|
|
2397
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2398
|
+
const data = _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
2399
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "EvaluationsController_listRuns", {
|
|
2400
2400
|
pathParams: { id: this.scopeId },
|
|
2401
|
-
query:
|
|
2401
|
+
query: _chunkRK4NLJINcjs.aipListParams.call(void 0, pageSize, pageToken)
|
|
2402
2402
|
})
|
|
2403
2403
|
);
|
|
2404
|
-
return
|
|
2404
|
+
return _chunkRK4NLJINcjs.buildAipPage.call(void 0,
|
|
2405
2405
|
data,
|
|
2406
2406
|
"runs",
|
|
2407
2407
|
(raw) => raw,
|
|
@@ -2418,9 +2418,9 @@ var ScopesEvaluationsResourceBase = class {
|
|
|
2418
2418
|
* @param runId - Run ID.
|
|
2419
2419
|
*/
|
|
2420
2420
|
async getRun(runId) {
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
const data = await
|
|
2421
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2422
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, runId, "run_id");
|
|
2423
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "EvaluationsController_getRun", {
|
|
2424
2424
|
pathParams: { id: this.scopeId, runId }
|
|
2425
2425
|
});
|
|
2426
2426
|
return data;
|
|
@@ -2448,12 +2448,12 @@ var ScopeEvaluationsResource = class extends ScopesEvaluationsResourceBase {
|
|
|
2448
2448
|
* ```
|
|
2449
2449
|
*/
|
|
2450
2450
|
async addCase(input) {
|
|
2451
|
-
|
|
2451
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2452
2452
|
const id = _nullishCoalesce(input.id, () => ( _crypto.randomUUID.call(void 0, )));
|
|
2453
|
-
|
|
2454
|
-
return await
|
|
2453
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, id, "id");
|
|
2454
|
+
return await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopesController_addEvaluationCase", {
|
|
2455
2455
|
pathParams: { id: this.scopeId },
|
|
2456
|
-
jsonBody:
|
|
2456
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, { ...input, id })
|
|
2457
2457
|
});
|
|
2458
2458
|
}
|
|
2459
2459
|
/**
|
|
@@ -2473,11 +2473,11 @@ var ScopeEvaluationsResource = class extends ScopesEvaluationsResourceBase {
|
|
|
2473
2473
|
* ```
|
|
2474
2474
|
*/
|
|
2475
2475
|
async updateCase(caseId, patch) {
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
return await
|
|
2476
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2477
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, caseId, "case_id");
|
|
2478
|
+
return await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopesController_updateEvaluationCase", {
|
|
2479
2479
|
pathParams: { id: this.scopeId, caseId },
|
|
2480
|
-
jsonBody:
|
|
2480
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, patch)
|
|
2481
2481
|
});
|
|
2482
2482
|
}
|
|
2483
2483
|
/**
|
|
@@ -2491,9 +2491,9 @@ var ScopeEvaluationsResource = class extends ScopesEvaluationsResourceBase {
|
|
|
2491
2491
|
* ```
|
|
2492
2492
|
*/
|
|
2493
2493
|
async deleteCase(caseId) {
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
await
|
|
2494
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2495
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, caseId, "case_id");
|
|
2496
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopesController_deleteEvaluationCase", {
|
|
2497
2497
|
pathParams: { id: this.scopeId, caseId }
|
|
2498
2498
|
});
|
|
2499
2499
|
}
|
|
@@ -2516,8 +2516,8 @@ var ScopesInterfacesResourceBase = class {
|
|
|
2516
2516
|
* **Requires:** `scopes:read`
|
|
2517
2517
|
*/
|
|
2518
2518
|
async list() {
|
|
2519
|
-
|
|
2520
|
-
const data = await
|
|
2519
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2520
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeInterfacesController_list", {
|
|
2521
2521
|
pathParams: { id: this.scopeId }
|
|
2522
2522
|
});
|
|
2523
2523
|
return data.interfaces;
|
|
@@ -2533,9 +2533,9 @@ var ScopesInterfacesResourceBase = class {
|
|
|
2533
2533
|
* @param interfaceId - Interface id (UUID).
|
|
2534
2534
|
*/
|
|
2535
2535
|
async delete(interfaceId) {
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
await
|
|
2536
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2537
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, interfaceId, "interface_id");
|
|
2538
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeInterfacesController_delete", {
|
|
2539
2539
|
pathParams: { id: this.scopeId, interfaceId }
|
|
2540
2540
|
});
|
|
2541
2541
|
}
|
|
@@ -2550,10 +2550,10 @@ var ScopeInterfacesResource = class extends ScopesInterfacesResourceBase {
|
|
|
2550
2550
|
* @returns The created interface.
|
|
2551
2551
|
*/
|
|
2552
2552
|
async create(options) {
|
|
2553
|
-
|
|
2554
|
-
return await
|
|
2553
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2554
|
+
return await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeInterfacesController_add", {
|
|
2555
2555
|
pathParams: { id: this.scopeId },
|
|
2556
|
-
jsonBody:
|
|
2556
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, options)
|
|
2557
2557
|
});
|
|
2558
2558
|
}
|
|
2559
2559
|
/**
|
|
@@ -2565,9 +2565,9 @@ var ScopeInterfacesResource = class extends ScopesInterfacesResourceBase {
|
|
|
2565
2565
|
* @returns The updated interface.
|
|
2566
2566
|
*/
|
|
2567
2567
|
async update(interfaceId, options, updateMask) {
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
return await
|
|
2568
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2569
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, interfaceId, "interface_id");
|
|
2570
|
+
return await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeInterfacesController_update", {
|
|
2571
2571
|
pathParams: { id: this.scopeId, interfaceId },
|
|
2572
2572
|
query: updateMaskQuery(updateMask),
|
|
2573
2573
|
jsonBody: updateBody(options, updateMask)
|
|
@@ -2595,8 +2595,8 @@ var ScopesSupervisionResourceBase = class {
|
|
|
2595
2595
|
* @param options.view - Which variation snapshot to read. Defaults to `active`.
|
|
2596
2596
|
*/
|
|
2597
2597
|
async get(options = {}) {
|
|
2598
|
-
|
|
2599
|
-
const data = await
|
|
2598
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2599
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeSupervisionController_get", {
|
|
2600
2600
|
pathParams: { id: this.scopeId },
|
|
2601
2601
|
query: { view: options.view }
|
|
2602
2602
|
});
|
|
@@ -2614,8 +2614,8 @@ var ScopesSupervisionResourceBase = class {
|
|
|
2614
2614
|
* @param request - Request body; see `SetSupervisionRequest`.
|
|
2615
2615
|
*/
|
|
2616
2616
|
async set(request) {
|
|
2617
|
-
|
|
2618
|
-
const data = await
|
|
2617
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2618
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeSupervisionController_set", {
|
|
2619
2619
|
pathParams: { id: this.scopeId },
|
|
2620
2620
|
jsonBody: request
|
|
2621
2621
|
});
|
|
@@ -2633,8 +2633,8 @@ var ScopesSupervisionResourceBase = class {
|
|
|
2633
2633
|
* @param request - Request body; see `SetSupervisionRequest`.
|
|
2634
2634
|
*/
|
|
2635
2635
|
async setActive(request) {
|
|
2636
|
-
|
|
2637
|
-
const data = await
|
|
2636
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, this.scopeId, "scope_id");
|
|
2637
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ScopeSupervisionController_setActive", {
|
|
2638
2638
|
pathParams: { id: this.scopeId },
|
|
2639
2639
|
jsonBody: request
|
|
2640
2640
|
});
|
|
@@ -2677,7 +2677,7 @@ var ManagementScopesResource = class extends ScopesResourceBase {
|
|
|
2677
2677
|
* @returns A conversations resource scoped to the scope.
|
|
2678
2678
|
*/
|
|
2679
2679
|
conversations(scopeId) {
|
|
2680
|
-
return new (0,
|
|
2680
|
+
return new (0, _chunkRK4NLJINcjs.ScopeConversationsResource)(this.http, this.config, scopeId);
|
|
2681
2681
|
}
|
|
2682
2682
|
/**
|
|
2683
2683
|
* Long-term memories for a scope.
|
|
@@ -2735,7 +2735,7 @@ var ManagementScopesResource = class extends ScopesResourceBase {
|
|
|
2735
2735
|
* ```
|
|
2736
2736
|
*/
|
|
2737
2737
|
async create(options) {
|
|
2738
|
-
const body =
|
|
2738
|
+
const body = _chunkRK4NLJINcjs.omitUndefined.call(void 0, {
|
|
2739
2739
|
name: options.name,
|
|
2740
2740
|
description: options.description,
|
|
2741
2741
|
expectedOutput: options.expectedOutput,
|
|
@@ -2749,7 +2749,7 @@ var ManagementScopesResource = class extends ScopesResourceBase {
|
|
|
2749
2749
|
interfaces: options.interfaces,
|
|
2750
2750
|
accessConfig: accessConfigBodyForCreate(options.guardrails)
|
|
2751
2751
|
});
|
|
2752
|
-
const data = await
|
|
2752
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.create, {
|
|
2753
2753
|
jsonBody: body
|
|
2754
2754
|
});
|
|
2755
2755
|
return parseScope(data);
|
|
@@ -2776,11 +2776,11 @@ var ManagementScopesResource = class extends ScopesResourceBase {
|
|
|
2776
2776
|
* ```
|
|
2777
2777
|
*/
|
|
2778
2778
|
async update(scopeId, options = {}) {
|
|
2779
|
-
|
|
2779
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2780
2780
|
const accessConfig = await accessConfigBodyForUpdate(
|
|
2781
2781
|
options.guardrails,
|
|
2782
|
-
async () =>
|
|
2783
|
-
await
|
|
2782
|
+
async () => _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
2783
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.get, {
|
|
2784
2784
|
pathParams: { id: scopeId }
|
|
2785
2785
|
})
|
|
2786
2786
|
)
|
|
@@ -2801,7 +2801,7 @@ var ManagementScopesResource = class extends ScopesResourceBase {
|
|
|
2801
2801
|
supervisionSubordinateDescriptions: options.supervisionSubordinateDescriptions
|
|
2802
2802
|
};
|
|
2803
2803
|
const body = updateBody(fields, options.updateMask);
|
|
2804
|
-
const data = await
|
|
2804
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.update, {
|
|
2805
2805
|
pathParams: { id: scopeId },
|
|
2806
2806
|
query: updateMaskQuery(options.updateMask),
|
|
2807
2807
|
jsonBody: body
|
|
@@ -2822,9 +2822,9 @@ var ManagementScopesResource = class extends ScopesResourceBase {
|
|
|
2822
2822
|
* ```
|
|
2823
2823
|
*/
|
|
2824
2824
|
async deploy(scopeId) {
|
|
2825
|
-
|
|
2826
|
-
const data =
|
|
2827
|
-
await
|
|
2825
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2826
|
+
const data = _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
2827
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.deploy, {
|
|
2828
2828
|
pathParams: { id: scopeId },
|
|
2829
2829
|
jsonBody: {}
|
|
2830
2830
|
})
|
|
@@ -2855,10 +2855,10 @@ var ManagementScopesResource = class extends ScopesResourceBase {
|
|
|
2855
2855
|
* ```
|
|
2856
2856
|
*/
|
|
2857
2857
|
async applySelectionOps(scopeId, ops, options) {
|
|
2858
|
-
|
|
2859
|
-
const data = await
|
|
2858
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2859
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.applySelectionOps, {
|
|
2860
2860
|
pathParams: { id: scopeId },
|
|
2861
|
-
jsonBody:
|
|
2861
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, {
|
|
2862
2862
|
ops,
|
|
2863
2863
|
toolset: _optionalChain([options, 'optionalAccess', _17 => _17.toolset]),
|
|
2864
2864
|
validateOnly: _optionalChain([options, 'optionalAccess', _18 => _18.validateOnly]) ? true : void 0
|
|
@@ -2878,14 +2878,14 @@ var ManagementScopesResource = class extends ScopesResourceBase {
|
|
|
2878
2878
|
* @returns The scope with a pending ownership transfer.
|
|
2879
2879
|
*/
|
|
2880
2880
|
async requestOwnershipTransfer(scopeId, options) {
|
|
2881
|
-
|
|
2882
|
-
const data = await
|
|
2881
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2882
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0,
|
|
2883
2883
|
this.config,
|
|
2884
2884
|
this.http,
|
|
2885
2885
|
this.ops.requestOwnershipTransfer,
|
|
2886
2886
|
{
|
|
2887
2887
|
pathParams: { id: scopeId },
|
|
2888
|
-
jsonBody:
|
|
2888
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, { newOwnerUserId: options.newOwnerUserId })
|
|
2889
2889
|
}
|
|
2890
2890
|
);
|
|
2891
2891
|
return parseScope(data);
|
|
@@ -2897,10 +2897,10 @@ var ManagementScopesResource = class extends ScopesResourceBase {
|
|
|
2897
2897
|
* @param options.mcpConfig - MCP configuration object.
|
|
2898
2898
|
*/
|
|
2899
2899
|
async patchMcpConfig(scopeId, options) {
|
|
2900
|
-
|
|
2901
|
-
await
|
|
2900
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2901
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.patchMcpConfig, {
|
|
2902
2902
|
pathParams: { id: scopeId },
|
|
2903
|
-
jsonBody:
|
|
2903
|
+
jsonBody: _chunkRK4NLJINcjs.omitUndefined.call(void 0, { config: options.mcpConfig })
|
|
2904
2904
|
});
|
|
2905
2905
|
}
|
|
2906
2906
|
/**
|
|
@@ -2911,9 +2911,9 @@ var ManagementScopesResource = class extends ScopesResourceBase {
|
|
|
2911
2911
|
* @returns The scope variation.
|
|
2912
2912
|
*/
|
|
2913
2913
|
async getVariation(scopeId, options) {
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
const data = await
|
|
2914
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, scopeId, "scope_id");
|
|
2915
|
+
_chunkRK4NLJINcjs.validateId.call(void 0, options.variationUid, "variation_uid");
|
|
2916
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, this.ops.getVariation, {
|
|
2917
2917
|
pathParams: { id: scopeId, variationUid: options.variationUid }
|
|
2918
2918
|
});
|
|
2919
2919
|
return parseScope(data);
|
|
@@ -2940,7 +2940,7 @@ var UsageResourceBase = class {
|
|
|
2940
2940
|
* @param options.until - ISO8601 end of the query window (exclusive).
|
|
2941
2941
|
*/
|
|
2942
2942
|
async listUsers(options) {
|
|
2943
|
-
const data = await
|
|
2943
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "UsageController_listUsers", {
|
|
2944
2944
|
query: { since: options.since, until: options.until }
|
|
2945
2945
|
});
|
|
2946
2946
|
return data;
|
|
@@ -2969,7 +2969,7 @@ var ManagementUsageResource = class extends UsageResourceBase {
|
|
|
2969
2969
|
};
|
|
2970
2970
|
if (options.model !== void 0) query.model = options.model;
|
|
2971
2971
|
if (options.userEmail !== void 0) query.user_email = [...options.userEmail];
|
|
2972
|
-
const data = await
|
|
2972
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "UsageController_list", { query });
|
|
2973
2973
|
return data;
|
|
2974
2974
|
}
|
|
2975
2975
|
};
|
|
@@ -2996,16 +2996,16 @@ var ToolsResourceBase = class {
|
|
|
2996
2996
|
*/
|
|
2997
2997
|
list(options = {}) {
|
|
2998
2998
|
const pageSize = _nullishCoalesce(options.pageSize, () => ( 25));
|
|
2999
|
-
|
|
2999
|
+
_chunkRK4NLJINcjs.validatePageSize.call(void 0, pageSize);
|
|
3000
3000
|
return this.listPage(pageSize, options.pageToken);
|
|
3001
3001
|
}
|
|
3002
3002
|
async listPage(pageSize, pageToken) {
|
|
3003
|
-
const data =
|
|
3004
|
-
await
|
|
3005
|
-
query:
|
|
3003
|
+
const data = _chunkRK4NLJINcjs.asRecord.call(void 0,
|
|
3004
|
+
await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0, this.config, this.http, "ToolsController_list", {
|
|
3005
|
+
query: _chunkRK4NLJINcjs.aipListParams.call(void 0, pageSize, pageToken)
|
|
3006
3006
|
})
|
|
3007
3007
|
);
|
|
3008
|
-
return
|
|
3008
|
+
return _chunkRK4NLJINcjs.buildAipPage.call(void 0,
|
|
3009
3009
|
data,
|
|
3010
3010
|
"tools",
|
|
3011
3011
|
(raw) => raw,
|
|
@@ -3026,7 +3026,7 @@ var ManagementUsersResource = class {
|
|
|
3026
3026
|
}
|
|
3027
3027
|
/** List member groups in the organization. */
|
|
3028
3028
|
async listMemberGroups() {
|
|
3029
|
-
const data = await
|
|
3029
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0,
|
|
3030
3030
|
this.config,
|
|
3031
3031
|
this.http,
|
|
3032
3032
|
"MemberGroupsController_list"
|
|
@@ -3035,7 +3035,7 @@ var ManagementUsersResource = class {
|
|
|
3035
3035
|
}
|
|
3036
3036
|
/** List organization members. */
|
|
3037
3037
|
async listOrgMembers() {
|
|
3038
|
-
const data = await
|
|
3038
|
+
const data = await _chunkRK4NLJINcjs.invokeWithRetry.call(void 0,
|
|
3039
3039
|
this.config,
|
|
3040
3040
|
this.http,
|
|
3041
3041
|
"OrgMembersController_list"
|
|
@@ -3045,7 +3045,7 @@ var ManagementUsersResource = class {
|
|
|
3045
3045
|
};
|
|
3046
3046
|
|
|
3047
3047
|
// src/management/index.ts
|
|
3048
|
-
var ModusManagement = class extends
|
|
3048
|
+
var ModusManagement = class extends _chunkRK4NLJINcjs.ModusClientBase {
|
|
3049
3049
|
constructor(options = {}) {
|
|
3050
3050
|
super(options);
|
|
3051
3051
|
this.scopes = new ManagementScopesResource(this.http, this.config);
|