sim 2.2.12-preview.225.1 → 2.2.12-preview.227.1
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/dist/runtime.js
CHANGED
|
@@ -4601,6 +4601,7 @@ function formatClientInfo(info) {
|
|
|
4601
4601
|
var INTERNAL_AUTH_KINDS = new Set([
|
|
4602
4602
|
"internal_jwt",
|
|
4603
4603
|
"delegated",
|
|
4604
|
+
"resource_delegated",
|
|
4604
4605
|
"organization_delegated",
|
|
4605
4606
|
"system"
|
|
4606
4607
|
]);
|
|
@@ -9588,6 +9589,25 @@ var V2_OPERATIONS = {
|
|
|
9588
9589
|
}
|
|
9589
9590
|
}
|
|
9590
9591
|
},
|
|
9592
|
+
abortProjectFileUpload: {
|
|
9593
|
+
method: "DELETE",
|
|
9594
|
+
path: "/api/v2/projects/[projectId]/files/uploads/[uploadId]",
|
|
9595
|
+
pathParams: ["projectId", "uploadId"],
|
|
9596
|
+
pathParamDocs: {
|
|
9597
|
+
projectId: "Project identifier.",
|
|
9598
|
+
uploadId: "Upload session identifier within the Project."
|
|
9599
|
+
},
|
|
9600
|
+
responseMode: "json",
|
|
9601
|
+
summary: "Abort Project file upload",
|
|
9602
|
+
workspaceKeyUnsupported: true,
|
|
9603
|
+
headers: {
|
|
9604
|
+
"upload-token": {
|
|
9605
|
+
kind: "string",
|
|
9606
|
+
required: true,
|
|
9607
|
+
describe: "Signed upload control token returned when the upload session was created."
|
|
9608
|
+
}
|
|
9609
|
+
}
|
|
9610
|
+
},
|
|
9591
9611
|
activateWorkflowVersion: {
|
|
9592
9612
|
method: "POST",
|
|
9593
9613
|
path: "/api/v2/workflows/[workflowId]/versions/[version]/activate",
|
|
@@ -9740,6 +9760,23 @@ var V2_OPERATIONS = {
|
|
|
9740
9760
|
}
|
|
9741
9761
|
}
|
|
9742
9762
|
},
|
|
9763
|
+
archiveProjectFileItems: {
|
|
9764
|
+
method: "POST",
|
|
9765
|
+
path: "/api/v2/projects/[projectId]/files/archive",
|
|
9766
|
+
pathParams: ["projectId"],
|
|
9767
|
+
pathParamDocs: { projectId: "Project identifier." },
|
|
9768
|
+
responseMode: "json",
|
|
9769
|
+
summary: "Archive Project File Items",
|
|
9770
|
+
workspaceKeyUnsupported: true,
|
|
9771
|
+
body: {
|
|
9772
|
+
fileIds: { kind: "array", default: [], describe: "Identifiers of the files to archive." },
|
|
9773
|
+
folderIds: {
|
|
9774
|
+
kind: "array",
|
|
9775
|
+
default: [],
|
|
9776
|
+
describe: "Identifiers of folders to archive recursively, including their files and descendants."
|
|
9777
|
+
}
|
|
9778
|
+
}
|
|
9779
|
+
},
|
|
9743
9780
|
bulkAddPermissionGroupMembers: {
|
|
9744
9781
|
method: "POST",
|
|
9745
9782
|
path: "/api/v2/organizations/[organizationId]/permission-groups/[groupId]/members/bulk",
|
|
@@ -10114,6 +10151,25 @@ var V2_OPERATIONS = {
|
|
|
10114
10151
|
}
|
|
10115
10152
|
}
|
|
10116
10153
|
},
|
|
10154
|
+
completeProjectFileUpload: {
|
|
10155
|
+
method: "POST",
|
|
10156
|
+
path: "/api/v2/projects/[projectId]/files/uploads/[uploadId]/complete",
|
|
10157
|
+
pathParams: ["projectId", "uploadId"],
|
|
10158
|
+
pathParamDocs: {
|
|
10159
|
+
projectId: "Project identifier.",
|
|
10160
|
+
uploadId: "Upload session identifier within the Project."
|
|
10161
|
+
},
|
|
10162
|
+
responseMode: "json",
|
|
10163
|
+
summary: "Complete Project file upload",
|
|
10164
|
+
workspaceKeyUnsupported: true,
|
|
10165
|
+
headers: {
|
|
10166
|
+
"upload-token": {
|
|
10167
|
+
kind: "string",
|
|
10168
|
+
required: true,
|
|
10169
|
+
describe: "Signed upload control token returned when the upload session was created."
|
|
10170
|
+
}
|
|
10171
|
+
}
|
|
10172
|
+
},
|
|
10117
10173
|
completeTableImport: {
|
|
10118
10174
|
method: "POST",
|
|
10119
10175
|
path: "/api/v2/tables/imports/[importId]/complete",
|
|
@@ -10619,6 +10675,79 @@ var V2_OPERATIONS = {
|
|
|
10619
10675
|
}
|
|
10620
10676
|
}
|
|
10621
10677
|
},
|
|
10678
|
+
createProjectFile: {
|
|
10679
|
+
method: "POST",
|
|
10680
|
+
path: "/api/v2/projects/[projectId]/files",
|
|
10681
|
+
pathParams: ["projectId"],
|
|
10682
|
+
pathParamDocs: { projectId: "Project identifier." },
|
|
10683
|
+
responseMode: "json",
|
|
10684
|
+
summary: "Create Project File",
|
|
10685
|
+
workspaceKeyUnsupported: true,
|
|
10686
|
+
body: {
|
|
10687
|
+
name: {
|
|
10688
|
+
kind: "string",
|
|
10689
|
+
required: true,
|
|
10690
|
+
describe: "File name, including its extension. Path separators and dot segments are rejected."
|
|
10691
|
+
},
|
|
10692
|
+
contentType: {
|
|
10693
|
+
kind: "string",
|
|
10694
|
+
describe: "MIME type. When omitted, it is inferred from the file extension."
|
|
10695
|
+
},
|
|
10696
|
+
content: {
|
|
10697
|
+
kind: "string",
|
|
10698
|
+
default: "",
|
|
10699
|
+
describe: "Initial file content. Omit or send an empty string for a zero-byte file. The complete JSON request is capped at 70 MiB, including UTF-8 encoding, escaping, base64, and the envelope. The decoded-file limit is 50 MiB. Use an upload session for larger payloads."
|
|
10700
|
+
},
|
|
10701
|
+
encoding: {
|
|
10702
|
+
kind: "enum",
|
|
10703
|
+
values: ["utf-8", "base64"],
|
|
10704
|
+
default: "utf-8",
|
|
10705
|
+
describe: "Encoding of the content field."
|
|
10706
|
+
},
|
|
10707
|
+
folderPath: {
|
|
10708
|
+
kind: "string",
|
|
10709
|
+
describe: "Canonical containing-folder path. Omit for the Project root."
|
|
10710
|
+
}
|
|
10711
|
+
}
|
|
10712
|
+
},
|
|
10713
|
+
createProjectFileFolder: {
|
|
10714
|
+
method: "POST",
|
|
10715
|
+
path: "/api/v2/projects/[projectId]/files/folders",
|
|
10716
|
+
pathParams: ["projectId"],
|
|
10717
|
+
pathParamDocs: { projectId: "Project identifier." },
|
|
10718
|
+
responseMode: "json",
|
|
10719
|
+
summary: "Create Project file folder",
|
|
10720
|
+
workspaceKeyUnsupported: true,
|
|
10721
|
+
body: {
|
|
10722
|
+
name: { kind: "string", required: true, describe: "Name for the new folder." },
|
|
10723
|
+
parentId: {
|
|
10724
|
+
kind: "string",
|
|
10725
|
+
describe: "Parent folder identifier; omit or use null for the root."
|
|
10726
|
+
}
|
|
10727
|
+
}
|
|
10728
|
+
},
|
|
10729
|
+
createProjectFileUpload: {
|
|
10730
|
+
method: "POST",
|
|
10731
|
+
path: "/api/v2/projects/[projectId]/files/uploads",
|
|
10732
|
+
pathParams: ["projectId"],
|
|
10733
|
+
pathParamDocs: { projectId: "Project identifier." },
|
|
10734
|
+
responseMode: "json",
|
|
10735
|
+
summary: "Create Project file upload",
|
|
10736
|
+
workspaceKeyUnsupported: true,
|
|
10737
|
+
body: {
|
|
10738
|
+
name: { kind: "string", required: true, describe: "File name, including its extension." },
|
|
10739
|
+
contentType: { kind: "string", required: true, describe: "MIME type of the uploaded file." },
|
|
10740
|
+
size: { kind: "integer", required: true, describe: "Exact file size in bytes." },
|
|
10741
|
+
folderPath: {
|
|
10742
|
+
kind: "string",
|
|
10743
|
+
describe: "Canonical destination folder path. Specify either folderId or folderPath, not both."
|
|
10744
|
+
},
|
|
10745
|
+
folderId: {
|
|
10746
|
+
kind: "string",
|
|
10747
|
+
describe: "Destination folder identifier; omit or use null for the Project root."
|
|
10748
|
+
}
|
|
10749
|
+
}
|
|
10750
|
+
},
|
|
10622
10751
|
createSandbox: {
|
|
10623
10752
|
method: "POST",
|
|
10624
10753
|
path: "/api/v2/sandboxes",
|
|
@@ -11245,6 +11374,19 @@ var V2_OPERATIONS = {
|
|
|
11245
11374
|
summary: "Delete permission group",
|
|
11246
11375
|
workspaceKeyUnsupported: true
|
|
11247
11376
|
},
|
|
11377
|
+
deleteProjectFileVersion: {
|
|
11378
|
+
method: "DELETE",
|
|
11379
|
+
path: "/api/v2/projects/[projectId]/files/[fileId]/versions/[version]",
|
|
11380
|
+
pathParams: ["projectId", "fileId", "version"],
|
|
11381
|
+
pathParamDocs: {
|
|
11382
|
+
projectId: "Project identifier.",
|
|
11383
|
+
fileId: "File identifier within the Project.",
|
|
11384
|
+
version: "Version number."
|
|
11385
|
+
},
|
|
11386
|
+
responseMode: "json",
|
|
11387
|
+
summary: "Delete Project File Version",
|
|
11388
|
+
workspaceKeyUnsupported: true
|
|
11389
|
+
},
|
|
11248
11390
|
deleteSandbox: {
|
|
11249
11391
|
method: "DELETE",
|
|
11250
11392
|
path: "/api/v2/sandboxes/[sandboxId]",
|
|
@@ -12302,6 +12444,76 @@ var V2_OPERATIONS = {
|
|
|
12302
12444
|
summary: "Get permission group",
|
|
12303
12445
|
workspaceKeyUnsupported: true
|
|
12304
12446
|
},
|
|
12447
|
+
getProjectFileMetadata: {
|
|
12448
|
+
method: "GET",
|
|
12449
|
+
path: "/api/v2/projects/[projectId]/files/[fileId]/metadata",
|
|
12450
|
+
pathParams: ["projectId", "fileId"],
|
|
12451
|
+
pathParamDocs: {
|
|
12452
|
+
projectId: "Project identifier.",
|
|
12453
|
+
fileId: "File identifier within the Project."
|
|
12454
|
+
},
|
|
12455
|
+
responseMode: "json",
|
|
12456
|
+
summary: "Get Project File Metadata",
|
|
12457
|
+
workspaceKeyUnsupported: true
|
|
12458
|
+
},
|
|
12459
|
+
getProjectFileUpload: {
|
|
12460
|
+
method: "GET",
|
|
12461
|
+
path: "/api/v2/projects/[projectId]/files/uploads/[uploadId]",
|
|
12462
|
+
pathParams: ["projectId", "uploadId"],
|
|
12463
|
+
pathParamDocs: {
|
|
12464
|
+
projectId: "Project identifier.",
|
|
12465
|
+
uploadId: "Upload session identifier within the Project."
|
|
12466
|
+
},
|
|
12467
|
+
responseMode: "json",
|
|
12468
|
+
summary: "Get Project file upload",
|
|
12469
|
+
workspaceKeyUnsupported: true,
|
|
12470
|
+
headers: {
|
|
12471
|
+
"upload-token": {
|
|
12472
|
+
kind: "string",
|
|
12473
|
+
required: true,
|
|
12474
|
+
describe: "Signed upload control token returned when the upload session was created."
|
|
12475
|
+
}
|
|
12476
|
+
}
|
|
12477
|
+
},
|
|
12478
|
+
getProjectFileUploadPartUrls: {
|
|
12479
|
+
method: "POST",
|
|
12480
|
+
path: "/api/v2/projects/[projectId]/files/uploads/[uploadId]/parts",
|
|
12481
|
+
pathParams: ["projectId", "uploadId"],
|
|
12482
|
+
pathParamDocs: {
|
|
12483
|
+
projectId: "Project identifier.",
|
|
12484
|
+
uploadId: "Upload session identifier within the Project."
|
|
12485
|
+
},
|
|
12486
|
+
responseMode: "json",
|
|
12487
|
+
summary: "Get Project file upload part URLs",
|
|
12488
|
+
workspaceKeyUnsupported: true,
|
|
12489
|
+
body: {
|
|
12490
|
+
partNumbers: {
|
|
12491
|
+
kind: "array",
|
|
12492
|
+
required: true,
|
|
12493
|
+
describe: "Multipart part numbers for which signed URLs should be created."
|
|
12494
|
+
}
|
|
12495
|
+
},
|
|
12496
|
+
headers: {
|
|
12497
|
+
"upload-token": {
|
|
12498
|
+
kind: "string",
|
|
12499
|
+
required: true,
|
|
12500
|
+
describe: "Signed upload control token returned when the upload session was created."
|
|
12501
|
+
}
|
|
12502
|
+
}
|
|
12503
|
+
},
|
|
12504
|
+
getProjectFileVersion: {
|
|
12505
|
+
method: "GET",
|
|
12506
|
+
path: "/api/v2/projects/[projectId]/files/[fileId]/versions/[version]",
|
|
12507
|
+
pathParams: ["projectId", "fileId", "version"],
|
|
12508
|
+
pathParamDocs: {
|
|
12509
|
+
projectId: "Project identifier.",
|
|
12510
|
+
fileId: "File identifier within the Project.",
|
|
12511
|
+
version: "Version number."
|
|
12512
|
+
},
|
|
12513
|
+
responseMode: "json",
|
|
12514
|
+
summary: "Get Project File Version",
|
|
12515
|
+
workspaceKeyUnsupported: true
|
|
12516
|
+
},
|
|
12305
12517
|
getRowEnrichment: {
|
|
12306
12518
|
method: "GET",
|
|
12307
12519
|
path: "/api/v2/tables/[tableId]/rows/[rowId]/enrichment/[groupId]",
|
|
@@ -14310,6 +14522,122 @@ var V2_OPERATIONS = {
|
|
|
14310
14522
|
}
|
|
14311
14523
|
}
|
|
14312
14524
|
},
|
|
14525
|
+
listProjectFileFolders: {
|
|
14526
|
+
method: "GET",
|
|
14527
|
+
path: "/api/v2/projects/[projectId]/files/folders",
|
|
14528
|
+
pathParams: ["projectId"],
|
|
14529
|
+
pathParamDocs: { projectId: "Project identifier." },
|
|
14530
|
+
responseMode: "json",
|
|
14531
|
+
summary: "List Project file folders",
|
|
14532
|
+
workspaceKeyUnsupported: true,
|
|
14533
|
+
query: {
|
|
14534
|
+
scope: {
|
|
14535
|
+
kind: "enum",
|
|
14536
|
+
values: ["active", "archived", "all"],
|
|
14537
|
+
default: "active",
|
|
14538
|
+
describe: "Folder lifecycle scope."
|
|
14539
|
+
}
|
|
14540
|
+
}
|
|
14541
|
+
},
|
|
14542
|
+
listProjectFiles: {
|
|
14543
|
+
method: "GET",
|
|
14544
|
+
path: "/api/v2/projects/[projectId]/files",
|
|
14545
|
+
pathParams: ["projectId"],
|
|
14546
|
+
pathParamDocs: { projectId: "Project identifier." },
|
|
14547
|
+
responseMode: "json",
|
|
14548
|
+
summary: "List Project Files",
|
|
14549
|
+
workspaceKeyUnsupported: true,
|
|
14550
|
+
query: {
|
|
14551
|
+
folderPath: {
|
|
14552
|
+
kind: "string",
|
|
14553
|
+
describe: "Restrict files to this folder, including subfolders when `recursive` is true. Unknown folder paths contribute no matches."
|
|
14554
|
+
},
|
|
14555
|
+
recursive: {
|
|
14556
|
+
kind: "enum",
|
|
14557
|
+
values: [
|
|
14558
|
+
"true",
|
|
14559
|
+
"1",
|
|
14560
|
+
"yes",
|
|
14561
|
+
"on",
|
|
14562
|
+
"y",
|
|
14563
|
+
"enabled",
|
|
14564
|
+
"false",
|
|
14565
|
+
"0",
|
|
14566
|
+
"no",
|
|
14567
|
+
"off",
|
|
14568
|
+
"n",
|
|
14569
|
+
"disabled"
|
|
14570
|
+
],
|
|
14571
|
+
describe: "Include subfolders in the folder filter. Defaults to true when searching and false otherwise. Ignored without a folder filter."
|
|
14572
|
+
},
|
|
14573
|
+
scope: {
|
|
14574
|
+
kind: "enum",
|
|
14575
|
+
values: ["active", "archived"],
|
|
14576
|
+
default: "active",
|
|
14577
|
+
describe: "Which lifecycle set to list: `active` (default) for live files, `archived` for files a delete soft-deleted. `folderPath` resolves against active folders only, so pairing it with `scope=archived` returns an empty page when the containing folder was archived too."
|
|
14578
|
+
},
|
|
14579
|
+
search: {
|
|
14580
|
+
kind: "string",
|
|
14581
|
+
describe: "Case-insensitive substring match against the file name."
|
|
14582
|
+
},
|
|
14583
|
+
sortBy: {
|
|
14584
|
+
kind: "enum",
|
|
14585
|
+
values: ["name", "size", "uploadedAt", "updatedAt"],
|
|
14586
|
+
default: "uploadedAt",
|
|
14587
|
+
describe: "Field used to sort the result. Do not rely on case-insensitive ordering when sorting by `name`."
|
|
14588
|
+
},
|
|
14589
|
+
sortOrder: {
|
|
14590
|
+
kind: "enum",
|
|
14591
|
+
values: ["asc", "desc"],
|
|
14592
|
+
default: "asc",
|
|
14593
|
+
describe: "Sort direction."
|
|
14594
|
+
},
|
|
14595
|
+
limit: {
|
|
14596
|
+
kind: "integer",
|
|
14597
|
+
default: 100,
|
|
14598
|
+
describe: "Maximum files per page. Must be a whole number from 1 to 1000. Defaults to 100."
|
|
14599
|
+
},
|
|
14600
|
+
cursor: {
|
|
14601
|
+
kind: "string",
|
|
14602
|
+
describe: "Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor."
|
|
14603
|
+
}
|
|
14604
|
+
}
|
|
14605
|
+
},
|
|
14606
|
+
listProjectFileVersions: {
|
|
14607
|
+
method: "GET",
|
|
14608
|
+
path: "/api/v2/projects/[projectId]/files/[fileId]/versions",
|
|
14609
|
+
pathParams: ["projectId", "fileId"],
|
|
14610
|
+
pathParamDocs: {
|
|
14611
|
+
projectId: "Project identifier.",
|
|
14612
|
+
fileId: "File identifier within the Project."
|
|
14613
|
+
},
|
|
14614
|
+
responseMode: "json",
|
|
14615
|
+
summary: "List Project File Versions",
|
|
14616
|
+
workspaceKeyUnsupported: true,
|
|
14617
|
+
query: {
|
|
14618
|
+
sortBy: {
|
|
14619
|
+
kind: "enum",
|
|
14620
|
+
values: ["version"],
|
|
14621
|
+
default: "version",
|
|
14622
|
+
describe: "Field used to sort the result."
|
|
14623
|
+
},
|
|
14624
|
+
sortOrder: {
|
|
14625
|
+
kind: "enum",
|
|
14626
|
+
values: ["asc", "desc"],
|
|
14627
|
+
default: "desc",
|
|
14628
|
+
describe: "Sort direction."
|
|
14629
|
+
},
|
|
14630
|
+
limit: {
|
|
14631
|
+
kind: "integer",
|
|
14632
|
+
default: 50,
|
|
14633
|
+
describe: "Maximum versions to return per page. Must be a whole number from 1 to 100. Defaults to 50."
|
|
14634
|
+
},
|
|
14635
|
+
cursor: {
|
|
14636
|
+
kind: "string",
|
|
14637
|
+
describe: "Opaque cursor from the previous page. Send it back with the same sort and filters; only `limit` may change. Change anything else and pagination must restart without a cursor."
|
|
14638
|
+
}
|
|
14639
|
+
}
|
|
14640
|
+
},
|
|
14313
14641
|
listSandboxes: {
|
|
14314
14642
|
method: "GET",
|
|
14315
14643
|
path: "/api/v2/sandboxes",
|
|
@@ -15183,6 +15511,27 @@ var V2_OPERATIONS = {
|
|
|
15183
15511
|
}
|
|
15184
15512
|
}
|
|
15185
15513
|
},
|
|
15514
|
+
moveProjectFileItems: {
|
|
15515
|
+
method: "POST",
|
|
15516
|
+
path: "/api/v2/projects/[projectId]/files/move",
|
|
15517
|
+
pathParams: ["projectId"],
|
|
15518
|
+
pathParamDocs: { projectId: "Project identifier." },
|
|
15519
|
+
responseMode: "json",
|
|
15520
|
+
summary: "Move Project File Items",
|
|
15521
|
+
workspaceKeyUnsupported: true,
|
|
15522
|
+
body: {
|
|
15523
|
+
fileIds: { kind: "array", default: [], describe: "Identifiers of the files to move." },
|
|
15524
|
+
folderIds: {
|
|
15525
|
+
kind: "array",
|
|
15526
|
+
default: [],
|
|
15527
|
+
describe: "Identifiers of folders to move with their contents."
|
|
15528
|
+
},
|
|
15529
|
+
targetFolderPath: {
|
|
15530
|
+
kind: "string",
|
|
15531
|
+
describe: "Existing destination folder path within the Project. Omit to move items to the Project root."
|
|
15532
|
+
}
|
|
15533
|
+
}
|
|
15534
|
+
},
|
|
15186
15535
|
moveTables: {
|
|
15187
15536
|
method: "POST",
|
|
15188
15537
|
path: "/api/v2/tables/move",
|
|
@@ -15555,6 +15904,31 @@ var V2_OPERATIONS = {
|
|
|
15555
15904
|
}
|
|
15556
15905
|
}
|
|
15557
15906
|
},
|
|
15907
|
+
readProjectFileContent: {
|
|
15908
|
+
method: "GET",
|
|
15909
|
+
path: "/api/v2/projects/[projectId]/files/[fileId]/content",
|
|
15910
|
+
pathParams: ["projectId", "fileId"],
|
|
15911
|
+
pathParamDocs: {
|
|
15912
|
+
projectId: "Project identifier.",
|
|
15913
|
+
fileId: "File identifier within the Project."
|
|
15914
|
+
},
|
|
15915
|
+
responseMode: "binary",
|
|
15916
|
+
summary: "Read Project File Source",
|
|
15917
|
+
workspaceKeyUnsupported: true
|
|
15918
|
+
},
|
|
15919
|
+
readProjectFileVersionContent: {
|
|
15920
|
+
method: "GET",
|
|
15921
|
+
path: "/api/v2/projects/[projectId]/files/[fileId]/versions/[version]/content",
|
|
15922
|
+
pathParams: ["projectId", "fileId", "version"],
|
|
15923
|
+
pathParamDocs: {
|
|
15924
|
+
projectId: "Project identifier.",
|
|
15925
|
+
fileId: "File identifier within the Project.",
|
|
15926
|
+
version: "Version number."
|
|
15927
|
+
},
|
|
15928
|
+
responseMode: "binary",
|
|
15929
|
+
summary: "Read Project File Version Content",
|
|
15930
|
+
workspaceKeyUnsupported: true
|
|
15931
|
+
},
|
|
15558
15932
|
relocateFileFolder: {
|
|
15559
15933
|
method: "PATCH",
|
|
15560
15934
|
path: "/api/v2/files/folders",
|
|
@@ -15687,6 +16061,21 @@ var V2_OPERATIONS = {
|
|
|
15687
16061
|
name: { kind: "string", required: true, describe: "New file name, including its extension." }
|
|
15688
16062
|
}
|
|
15689
16063
|
},
|
|
16064
|
+
renameProjectFile: {
|
|
16065
|
+
method: "PATCH",
|
|
16066
|
+
path: "/api/v2/projects/[projectId]/files/[fileId]",
|
|
16067
|
+
pathParams: ["projectId", "fileId"],
|
|
16068
|
+
pathParamDocs: {
|
|
16069
|
+
projectId: "Project identifier.",
|
|
16070
|
+
fileId: "File identifier within the Project."
|
|
16071
|
+
},
|
|
16072
|
+
responseMode: "json",
|
|
16073
|
+
summary: "Rename Project File",
|
|
16074
|
+
workspaceKeyUnsupported: true,
|
|
16075
|
+
body: {
|
|
16076
|
+
name: { kind: "string", required: true, describe: "New file name, including its extension." }
|
|
16077
|
+
}
|
|
16078
|
+
},
|
|
15690
16079
|
replaceWorkflowChatDeployment: {
|
|
15691
16080
|
method: "PUT",
|
|
15692
16081
|
path: "/api/v2/workflows/[workflowId]/deployments/chat",
|
|
@@ -15897,6 +16286,32 @@ var V2_OPERATIONS = {
|
|
|
15897
16286
|
}
|
|
15898
16287
|
}
|
|
15899
16288
|
},
|
|
16289
|
+
restoreProjectFile: {
|
|
16290
|
+
method: "POST",
|
|
16291
|
+
path: "/api/v2/projects/[projectId]/files/[fileId]/restore",
|
|
16292
|
+
pathParams: ["projectId", "fileId"],
|
|
16293
|
+
pathParamDocs: {
|
|
16294
|
+
projectId: "Project identifier.",
|
|
16295
|
+
fileId: "File identifier within the Project."
|
|
16296
|
+
},
|
|
16297
|
+
responseMode: "json",
|
|
16298
|
+
summary: "Restore Project File",
|
|
16299
|
+
workspaceKeyUnsupported: true,
|
|
16300
|
+
body: {}
|
|
16301
|
+
},
|
|
16302
|
+
restoreProjectFileFolder: {
|
|
16303
|
+
method: "POST",
|
|
16304
|
+
path: "/api/v2/projects/[projectId]/files/folders/[folderId]/restore",
|
|
16305
|
+
pathParams: ["projectId", "folderId"],
|
|
16306
|
+
pathParamDocs: {
|
|
16307
|
+
projectId: "Project identifier.",
|
|
16308
|
+
folderId: "Folder identifier within the Project."
|
|
16309
|
+
},
|
|
16310
|
+
responseMode: "json",
|
|
16311
|
+
summary: "Restore Project file folder",
|
|
16312
|
+
workspaceKeyUnsupported: true,
|
|
16313
|
+
body: {}
|
|
16314
|
+
},
|
|
15900
16315
|
restoreTable: {
|
|
15901
16316
|
method: "POST",
|
|
15902
16317
|
path: "/api/v2/tables/[tableId]/restore",
|
|
@@ -15973,6 +16388,29 @@ var V2_OPERATIONS = {
|
|
|
15973
16388
|
}
|
|
15974
16389
|
}
|
|
15975
16390
|
},
|
|
16391
|
+
revertProjectFileVersion: {
|
|
16392
|
+
method: "POST",
|
|
16393
|
+
path: "/api/v2/projects/[projectId]/files/[fileId]/versions/[version]/revert",
|
|
16394
|
+
pathParams: ["projectId", "fileId", "version"],
|
|
16395
|
+
pathParamDocs: {
|
|
16396
|
+
projectId: "Project identifier.",
|
|
16397
|
+
fileId: "File identifier within the Project.",
|
|
16398
|
+
version: "Version number."
|
|
16399
|
+
},
|
|
16400
|
+
responseMode: "json",
|
|
16401
|
+
summary: "Revert Project File Version",
|
|
16402
|
+
workspaceKeyUnsupported: true,
|
|
16403
|
+
body: {
|
|
16404
|
+
expectedCurrentVersion: {
|
|
16405
|
+
kind: "integer",
|
|
16406
|
+
describe: "Revert only while this is still the current version; otherwise the request fails with `409`. Omit to revert whatever is current. Collaborative edits and repeated workflow writes that fold into the current version keep its number, so prefer `expectedRevision` to guard content."
|
|
16407
|
+
},
|
|
16408
|
+
expectedRevision: {
|
|
16409
|
+
kind: "string",
|
|
16410
|
+
describe: "Revert only while the file still holds the content this revision names, as returned by Get file metadata or an earlier write; otherwise the request fails with `409`. Unlike a version number, it also catches edits that folded into the current version."
|
|
16411
|
+
}
|
|
16412
|
+
}
|
|
16413
|
+
},
|
|
15976
16414
|
revertWorkflowVersion: {
|
|
15977
16415
|
method: "POST",
|
|
15978
16416
|
path: "/api/v2/workflows/[workflowId]/versions/[version]/revert",
|
|
@@ -16983,6 +17421,55 @@ var V2_OPERATIONS = {
|
|
|
16983
17421
|
}
|
|
16984
17422
|
}
|
|
16985
17423
|
},
|
|
17424
|
+
updateProjectFileContent: {
|
|
17425
|
+
method: "PUT",
|
|
17426
|
+
path: "/api/v2/projects/[projectId]/files/[fileId]/content",
|
|
17427
|
+
pathParams: ["projectId", "fileId"],
|
|
17428
|
+
pathParamDocs: {
|
|
17429
|
+
projectId: "Project identifier.",
|
|
17430
|
+
fileId: "File identifier within the Project."
|
|
17431
|
+
},
|
|
17432
|
+
responseMode: "json",
|
|
17433
|
+
summary: "Replace Project File Content",
|
|
17434
|
+
workspaceKeyUnsupported: true,
|
|
17435
|
+
body: {
|
|
17436
|
+
content: {
|
|
17437
|
+
kind: "string",
|
|
17438
|
+
required: true,
|
|
17439
|
+
describe: "Complete replacement content for the file. The complete JSON request is capped at 70 MiB, including UTF-8 encoding, escaping, base64, and the envelope. The decoded-file limit is 50 MiB."
|
|
17440
|
+
},
|
|
17441
|
+
encoding: {
|
|
17442
|
+
kind: "enum",
|
|
17443
|
+
values: ["utf-8", "base64"],
|
|
17444
|
+
default: "utf-8",
|
|
17445
|
+
describe: "Encoding of the content field."
|
|
17446
|
+
},
|
|
17447
|
+
expectedRevision: {
|
|
17448
|
+
kind: "string",
|
|
17449
|
+
describe: "Revision from Get file metadata or an earlier write; the request is refused with `409` when the content moved on."
|
|
17450
|
+
}
|
|
17451
|
+
}
|
|
17452
|
+
},
|
|
17453
|
+
updateProjectFileFolder: {
|
|
17454
|
+
method: "PATCH",
|
|
17455
|
+
path: "/api/v2/projects/[projectId]/files/folders/[folderId]",
|
|
17456
|
+
pathParams: ["projectId", "folderId"],
|
|
17457
|
+
pathParamDocs: {
|
|
17458
|
+
projectId: "Project identifier.",
|
|
17459
|
+
folderId: "Folder identifier within the Project."
|
|
17460
|
+
},
|
|
17461
|
+
responseMode: "json",
|
|
17462
|
+
summary: "Update Project file folder",
|
|
17463
|
+
workspaceKeyUnsupported: true,
|
|
17464
|
+
body: {
|
|
17465
|
+
name: { kind: "string", describe: "New folder name; omit to leave unchanged." },
|
|
17466
|
+
parentId: {
|
|
17467
|
+
kind: "string",
|
|
17468
|
+
describe: "New parent folder identifier; null moves to the root, omission leaves the parent unchanged."
|
|
17469
|
+
},
|
|
17470
|
+
sortOrder: { kind: "integer", describe: "New manual position; omit to leave unchanged." }
|
|
17471
|
+
}
|
|
17472
|
+
},
|
|
16986
17473
|
updateRowsByFilter: {
|
|
16987
17474
|
method: "PATCH",
|
|
16988
17475
|
path: "/api/v2/tables/[tableId]/rows",
|
|
@@ -18255,6 +18742,13 @@ var ACCESS_REQUEST_COLUMNS = [
|
|
|
18255
18742
|
{ header: "requester", path: "requester.email" },
|
|
18256
18743
|
{ header: "created", path: "createdAt", format: "timestamp" }
|
|
18257
18744
|
];
|
|
18745
|
+
var FILE_SHARE_FIELDS = [
|
|
18746
|
+
{ header: "shared", path: "isActive", format: "bool" },
|
|
18747
|
+
{ header: "URL", path: "url" },
|
|
18748
|
+
{ header: "auth", path: "authType" },
|
|
18749
|
+
{ header: "password set", path: "hasPassword", format: "bool" },
|
|
18750
|
+
{ header: "allowed emails", path: "allowedEmails", format: "count" }
|
|
18751
|
+
];
|
|
18258
18752
|
var TABLE_NAME_HELP = "Identifier: letters, numbers, and underscores; cannot start with a number";
|
|
18259
18753
|
var TABLE_FILTER_HELP = 'Predicate: {"all":[{"field":"status","op":"eq","value":"active"}]}; groups use all/any. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull';
|
|
18260
18754
|
var TABLE_READ_FILTER_HELP = 'Condition: {"field":"status","op":"eq","value":"active"}. Groups: {"all":[{"field":"status","op":"eq","value":"active"}]} or {"any":[{"field":"status","op":"eq","value":"active"}]}; group entries may also be nested groups. Operators: eq, ne, gt, gte, lt, lte, in, nin, contains, ncontains, startsWith, endsWith, like, ilike, nlike, nilike, isEmpty, isNotEmpty, isNull, isNotNull';
|
|
@@ -18306,6 +18800,39 @@ var FOLDER_LIST_COLUMNS = [
|
|
|
18306
18800
|
{ header: "parent", path: "parentPath", format: "folder-path" },
|
|
18307
18801
|
{ header: "updated", path: "updatedAt", format: "timestamp" }
|
|
18308
18802
|
];
|
|
18803
|
+
var FILE_VERSION_COLUMNS = [
|
|
18804
|
+
{ header: "version" },
|
|
18805
|
+
{ header: "current", path: "isCurrent", format: "bool" },
|
|
18806
|
+
{ header: "source" },
|
|
18807
|
+
{ header: "size", format: "bytes" },
|
|
18808
|
+
{ header: "authors", format: "people" },
|
|
18809
|
+
{ header: "created", path: "createdAt", format: "timestamp" },
|
|
18810
|
+
{ header: "superseded", path: "supersededAt", format: "timestamp" }
|
|
18811
|
+
];
|
|
18812
|
+
var FILE_VERSION_FIELDS = [
|
|
18813
|
+
{ header: "file", path: "fileId" },
|
|
18814
|
+
{ header: "version" },
|
|
18815
|
+
{ header: "current", path: "isCurrent", format: "bool" },
|
|
18816
|
+
{ header: "source" },
|
|
18817
|
+
{ header: "restored from", path: "restoredFromVersion" },
|
|
18818
|
+
{ header: "size", format: "bytes" },
|
|
18819
|
+
{ header: "type", path: "contentType" },
|
|
18820
|
+
{ header: "authors", format: "people" },
|
|
18821
|
+
{ header: "created", path: "createdAt", format: "timestamp" },
|
|
18822
|
+
{ header: "updated", path: "updatedAt", format: "timestamp" },
|
|
18823
|
+
{ header: "superseded", path: "supersededAt", format: "timestamp" }
|
|
18824
|
+
];
|
|
18825
|
+
var FILE_REVERT_FIELDS = [
|
|
18826
|
+
{ header: "reverted", format: "bool" },
|
|
18827
|
+
{ header: "file", path: "file.id" },
|
|
18828
|
+
{ header: "name", path: "file.name" },
|
|
18829
|
+
{ header: "version", path: "version.version" },
|
|
18830
|
+
{ header: "source", path: "version.source" },
|
|
18831
|
+
{ header: "restored from", path: "version.restoredFromVersion" },
|
|
18832
|
+
{ header: "size", path: "version.size", format: "bytes" },
|
|
18833
|
+
{ header: "authors", path: "version.authors", format: "people" },
|
|
18834
|
+
{ header: "created", path: "version.createdAt", format: "timestamp" }
|
|
18835
|
+
];
|
|
18309
18836
|
function moveResource(command, resource) {
|
|
18310
18837
|
return {
|
|
18311
18838
|
command,
|
|
@@ -18778,6 +19305,41 @@ var CLI_CONTRACT = {
|
|
|
18778
19305
|
}
|
|
18779
19306
|
}
|
|
18780
19307
|
},
|
|
19308
|
+
renameProjectFile: { command: "projects files rename" },
|
|
19309
|
+
listProjectFileFolders: {
|
|
19310
|
+
command: "projects files folders list",
|
|
19311
|
+
columns: [{ header: "id" }, { header: "name" }, { header: "parent", path: "parentId" }]
|
|
19312
|
+
},
|
|
19313
|
+
createProjectFileFolder: { command: "projects files folders create" },
|
|
19314
|
+
updateProjectFileFolder: { command: "projects files folders update" },
|
|
19315
|
+
restoreProjectFileFolder: { command: "projects files folders restore" },
|
|
19316
|
+
moveProjectFileItems: {
|
|
19317
|
+
command: "projects files move",
|
|
19318
|
+
flags: {
|
|
19319
|
+
fileIds: { list: true },
|
|
19320
|
+
folderIds: { list: true },
|
|
19321
|
+
targetFolderPath: TARGET_FOLDER_PATH_FLAG
|
|
19322
|
+
}
|
|
19323
|
+
},
|
|
19324
|
+
archiveProjectFileItems: {
|
|
19325
|
+
command: "projects files archive",
|
|
19326
|
+
confirm: "This archives the selected Project files and folders, including folder contents.",
|
|
19327
|
+
flags: { fileIds: { list: true }, folderIds: { list: true } }
|
|
19328
|
+
},
|
|
19329
|
+
restoreProjectFile: { command: "projects files restore" },
|
|
19330
|
+
createProjectFile: {
|
|
19331
|
+
command: "projects files create",
|
|
19332
|
+
flags: { folderPath: FOLDER_PATH_FLAG }
|
|
19333
|
+
},
|
|
19334
|
+
updateProjectFileContent: {
|
|
19335
|
+
command: "projects files set-content",
|
|
19336
|
+
describe: "Replace a shared Project file’s contents",
|
|
19337
|
+
flags: { encoding: { choices: ["utf-8", "base64"], describe: "Content encoding" } }
|
|
19338
|
+
},
|
|
19339
|
+
readProjectFileContent: {
|
|
19340
|
+
command: "projects files source",
|
|
19341
|
+
describe: "Download the stored source bytes of a Project file"
|
|
19342
|
+
},
|
|
18781
19343
|
createKnowledgeBase: { flags: { folderPath: FOLDER_PATH_FLAG } },
|
|
18782
19344
|
updateKnowledgeBase: {
|
|
18783
19345
|
variants: [moveResource("knowledge mv", "knowledge base")],
|
|
@@ -18905,6 +19467,26 @@ var CLI_CONTRACT = {
|
|
|
18905
19467
|
{ header: "uploaded", path: "uploadedAt", format: "timestamp" }
|
|
18906
19468
|
]
|
|
18907
19469
|
},
|
|
19470
|
+
listProjectFiles: {
|
|
19471
|
+
command: "projects files list",
|
|
19472
|
+
flags: {
|
|
19473
|
+
folderPath: FOLDER_PATH_FLAG,
|
|
19474
|
+
recursive: { boolean: true, negatable: true }
|
|
19475
|
+
},
|
|
19476
|
+
columns: [
|
|
19477
|
+
{ header: "id" },
|
|
19478
|
+
{ header: "name" },
|
|
19479
|
+
FOLDER_COLUMN,
|
|
19480
|
+
{ header: "size", format: "bytes" },
|
|
19481
|
+
{ header: "type" },
|
|
19482
|
+
{ header: "creator", path: "uploadedBy" },
|
|
19483
|
+
{ header: "uploaded", path: "uploadedAt", format: "timestamp" }
|
|
19484
|
+
]
|
|
19485
|
+
},
|
|
19486
|
+
getProjectFileMetadata: {
|
|
19487
|
+
command: "projects files describe",
|
|
19488
|
+
describe: "Show Project file metadata and ownership"
|
|
19489
|
+
},
|
|
18908
19490
|
listTableRows: { expand: "data" },
|
|
18909
19491
|
listKnowledgeBases: {
|
|
18910
19492
|
flags: { folderPath: FOLDER_PATH_FLAG },
|
|
@@ -19436,32 +20018,12 @@ var CLI_CONTRACT = {
|
|
|
19436
20018
|
listFileVersions: {
|
|
19437
20019
|
command: "files versions list",
|
|
19438
20020
|
describe: "List the recorded versions of a file",
|
|
19439
|
-
columns:
|
|
19440
|
-
{ header: "version" },
|
|
19441
|
-
{ header: "current", path: "isCurrent", format: "bool" },
|
|
19442
|
-
{ header: "source" },
|
|
19443
|
-
{ header: "size", format: "bytes" },
|
|
19444
|
-
{ header: "authors", format: "people" },
|
|
19445
|
-
{ header: "created", path: "createdAt", format: "timestamp" },
|
|
19446
|
-
{ header: "superseded", path: "supersededAt", format: "timestamp" }
|
|
19447
|
-
]
|
|
20021
|
+
columns: FILE_VERSION_COLUMNS
|
|
19448
20022
|
},
|
|
19449
20023
|
getFileVersion: {
|
|
19450
20024
|
command: "files versions describe",
|
|
19451
20025
|
describe: "Show the metadata of one version of a file",
|
|
19452
|
-
fields:
|
|
19453
|
-
{ header: "file", path: "fileId" },
|
|
19454
|
-
{ header: "version" },
|
|
19455
|
-
{ header: "current", path: "isCurrent", format: "bool" },
|
|
19456
|
-
{ header: "source" },
|
|
19457
|
-
{ header: "restored from", path: "restoredFromVersion" },
|
|
19458
|
-
{ header: "size", format: "bytes" },
|
|
19459
|
-
{ header: "type", path: "contentType" },
|
|
19460
|
-
{ header: "authors", format: "people" },
|
|
19461
|
-
{ header: "created", path: "createdAt", format: "timestamp" },
|
|
19462
|
-
{ header: "updated", path: "updatedAt", format: "timestamp" },
|
|
19463
|
-
{ header: "superseded", path: "supersededAt", format: "timestamp" }
|
|
19464
|
-
]
|
|
20026
|
+
fields: FILE_VERSION_FIELDS
|
|
19465
20027
|
},
|
|
19466
20028
|
readFileVersionText: {
|
|
19467
20029
|
command: "files versions read",
|
|
@@ -19471,23 +20033,37 @@ var CLI_CONTRACT = {
|
|
|
19471
20033
|
revertFileVersion: {
|
|
19472
20034
|
command: "files versions revert",
|
|
19473
20035
|
describe: "Make a previous version of a file current again",
|
|
19474
|
-
fields:
|
|
19475
|
-
{ header: "reverted", format: "bool" },
|
|
19476
|
-
{ header: "file", path: "file.id" },
|
|
19477
|
-
{ header: "name", path: "file.name" },
|
|
19478
|
-
{ header: "version", path: "version.version" },
|
|
19479
|
-
{ header: "source", path: "version.source" },
|
|
19480
|
-
{ header: "restored from", path: "version.restoredFromVersion" },
|
|
19481
|
-
{ header: "size", path: "version.size", format: "bytes" },
|
|
19482
|
-
{ header: "authors", path: "version.authors", format: "people" },
|
|
19483
|
-
{ header: "created", path: "version.createdAt", format: "timestamp" }
|
|
19484
|
-
]
|
|
20036
|
+
fields: FILE_REVERT_FIELDS
|
|
19485
20037
|
},
|
|
19486
20038
|
deleteFileVersion: {
|
|
19487
20039
|
command: "files versions delete",
|
|
19488
20040
|
describe: "Permanently delete a previous version of a file",
|
|
19489
20041
|
confirm: "This permanently removes the version from history and schedules deletion of its stored content; storage cleanup may retry in the background."
|
|
19490
20042
|
},
|
|
20043
|
+
listProjectFileVersions: {
|
|
20044
|
+
command: "projects files versions list",
|
|
20045
|
+
describe: "List the recorded versions of a shared Project file",
|
|
20046
|
+
columns: FILE_VERSION_COLUMNS
|
|
20047
|
+
},
|
|
20048
|
+
getProjectFileVersion: {
|
|
20049
|
+
command: "projects files versions describe",
|
|
20050
|
+
describe: "Show the metadata of one version of a shared Project file",
|
|
20051
|
+
fields: FILE_VERSION_FIELDS
|
|
20052
|
+
},
|
|
20053
|
+
readProjectFileVersionContent: {
|
|
20054
|
+
command: "projects files versions source",
|
|
20055
|
+
describe: "Download the stored source bytes of a Project file version"
|
|
20056
|
+
},
|
|
20057
|
+
revertProjectFileVersion: {
|
|
20058
|
+
command: "projects files versions revert",
|
|
20059
|
+
describe: "Make a previous version of a shared Project file current again",
|
|
20060
|
+
fields: FILE_REVERT_FIELDS
|
|
20061
|
+
},
|
|
20062
|
+
deleteProjectFileVersion: {
|
|
20063
|
+
command: "projects files versions delete",
|
|
20064
|
+
describe: "Permanently delete a previous version of a shared Project file",
|
|
20065
|
+
confirm: "This permanently deletes the version and its stored content."
|
|
20066
|
+
},
|
|
19491
20067
|
restoreFileFolder: {
|
|
19492
20068
|
command: "files folders restore",
|
|
19493
20069
|
positionals: ["path"],
|
|
@@ -19576,13 +20152,7 @@ var CLI_CONTRACT = {
|
|
|
19576
20152
|
getFileShare: {
|
|
19577
20153
|
command: "files share get",
|
|
19578
20154
|
describe: "Show a file’s share settings",
|
|
19579
|
-
fields:
|
|
19580
|
-
{ header: "shared", path: "isActive", format: "bool" },
|
|
19581
|
-
{ header: "URL", path: "url" },
|
|
19582
|
-
{ header: "auth", path: "authType" },
|
|
19583
|
-
{ header: "password set", path: "hasPassword", format: "bool" },
|
|
19584
|
-
{ header: "allowed emails", path: "allowedEmails", format: "count" }
|
|
19585
|
-
]
|
|
20155
|
+
fields: FILE_SHARE_FIELDS
|
|
19586
20156
|
},
|
|
19587
20157
|
upsertFileShare: {
|
|
19588
20158
|
command: "files share set",
|
|
@@ -19590,13 +20160,7 @@ var CLI_CONTRACT = {
|
|
|
19590
20160
|
flags: {
|
|
19591
20161
|
allowedEmails: { list: true }
|
|
19592
20162
|
},
|
|
19593
|
-
fields:
|
|
19594
|
-
{ header: "shared", path: "isActive", format: "bool" },
|
|
19595
|
-
{ header: "URL", path: "url" },
|
|
19596
|
-
{ header: "auth", path: "authType" },
|
|
19597
|
-
{ header: "password set", path: "hasPassword", format: "bool" },
|
|
19598
|
-
{ header: "allowed emails", path: "allowedEmails", format: "count" }
|
|
19599
|
-
]
|
|
20163
|
+
fields: FILE_SHARE_FIELDS
|
|
19600
20164
|
},
|
|
19601
20165
|
listFileFolders: {
|
|
19602
20166
|
describe: "List folders",
|
|
@@ -19939,6 +20503,11 @@ var CLI_CONTRACT = {
|
|
|
19939
20503
|
completeKnowledgeDocumentUpload: { hidden: true },
|
|
19940
20504
|
abortKnowledgeDocumentUpload: { hidden: true },
|
|
19941
20505
|
createFileUpload: { hidden: true },
|
|
20506
|
+
createProjectFileUpload: { hidden: true },
|
|
20507
|
+
getProjectFileUpload: { hidden: true },
|
|
20508
|
+
abortProjectFileUpload: { hidden: true },
|
|
20509
|
+
completeProjectFileUpload: { hidden: true },
|
|
20510
|
+
getProjectFileUploadPartUrls: { hidden: true },
|
|
19942
20511
|
createFileUploadPartUrls: { hidden: true },
|
|
19943
20512
|
completeFileUpload: { hidden: true },
|
|
19944
20513
|
abortFileUpload: { hidden: true },
|
|
@@ -20873,6 +21442,7 @@ var COMPLETE_LIST_OPERATIONS = new Set([
|
|
|
20873
21442
|
"listOrganizationMembers",
|
|
20874
21443
|
"listOrganizationWorkspaces",
|
|
20875
21444
|
"listFiles",
|
|
21445
|
+
"listProjectFiles",
|
|
20876
21446
|
"listKnowledgeBases",
|
|
20877
21447
|
"listKnowledgeConnectors",
|
|
20878
21448
|
"listMcpServers",
|
|
@@ -21073,6 +21643,15 @@ var BULK_OUTCOME_CHECKS = {
|
|
|
21073
21643
|
return null;
|
|
21074
21644
|
return `Deleted nothing: none of the ${requested} requested ${requested === 1 ? "file was" : "files were"} deleted.`;
|
|
21075
21645
|
},
|
|
21646
|
+
archiveProjectFileItems: (payload, body) => {
|
|
21647
|
+
const items = payload.deletedItems;
|
|
21648
|
+
if (countOf(items?.files) + countOf(items?.folders) > 0)
|
|
21649
|
+
return null;
|
|
21650
|
+
const requested = lengthOf(body?.fileIds) + lengthOf(body?.folderIds);
|
|
21651
|
+
if (requested === 0)
|
|
21652
|
+
return null;
|
|
21653
|
+
return `Archived nothing: none of the ${requested} requested ${requested === 1 ? "item was" : "items were"} archived.`;
|
|
21654
|
+
},
|
|
21076
21655
|
addWorkspaceFilesToKnowledgeBase: (payload) => {
|
|
21077
21656
|
if (lengthOf(payload.added) > 0)
|
|
21078
21657
|
return null;
|
|
@@ -22157,17 +22736,17 @@ function isTerminalSafeContentType(contentType) {
|
|
|
22157
22736
|
"image/svg+xml"
|
|
22158
22737
|
].includes(mediaType);
|
|
22159
22738
|
}
|
|
22160
|
-
async function downloadToOutput(
|
|
22739
|
+
async function downloadToOutput(connect, operation, pathParams, options, scope, requestInput = {}) {
|
|
22161
22740
|
const target = options.outputFile;
|
|
22162
22741
|
const writesToStdout = target === undefined || target === "-";
|
|
22163
22742
|
if (writesToStdout && options.force) {
|
|
22164
22743
|
throw new SimApiError("--force requires --output-file <path>", 0);
|
|
22165
22744
|
}
|
|
22166
|
-
const { client, profile } =
|
|
22167
|
-
const workspaceId = client.requireWorkspace();
|
|
22745
|
+
const { client, profile } = connect();
|
|
22168
22746
|
const response = await client.requestRaw(operation, {
|
|
22169
|
-
params,
|
|
22170
|
-
|
|
22747
|
+
params: pathParams,
|
|
22748
|
+
...requestInput,
|
|
22749
|
+
...scope === "workspace" ? { query: { workspaceId: client.requireWorkspace() } } : {}
|
|
22171
22750
|
});
|
|
22172
22751
|
if (!response.body) {
|
|
22173
22752
|
throw new SimApiError("File content response was empty.", response.status);
|
|
@@ -22184,18 +22763,26 @@ async function downloadToOutput(connectDownload, operation, params, options) {
|
|
|
22184
22763
|
}
|
|
22185
22764
|
const savedTarget = await saveToFile(response.body, target, Boolean(options.force));
|
|
22186
22765
|
printProtocolResult(profile.output, {
|
|
22187
|
-
id:
|
|
22766
|
+
...pathParams.fileId ? { id: pathParams.fileId } : {},
|
|
22188
22767
|
path: savedTarget,
|
|
22189
22768
|
status: "saved"
|
|
22190
22769
|
});
|
|
22191
22770
|
}
|
|
22192
22771
|
function attachFileGet(files) {
|
|
22193
|
-
const [
|
|
22194
|
-
|
|
22772
|
+
const [command, connect] = apiCommand(files, "get", ["downloadFile"]);
|
|
22773
|
+
command.argument("<fileId>", "File whose content to read").allowExcessArguments(false).description("Download a file’s content to stdout or a local file").option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((fileId, options) => downloadToOutput(connect, "downloadFile", { fileId }, options, "workspace"));
|
|
22195
22774
|
}
|
|
22196
22775
|
function attachFileVersionDownload(versions) {
|
|
22197
|
-
const [
|
|
22198
|
-
|
|
22776
|
+
const [command, connect] = apiCommand(versions, "download", ["downloadFileVersion"]);
|
|
22777
|
+
command.argument("<fileId>", "File identifier.").argument("<version>", "Version number.").allowExcessArguments(false).description("Download the content of one version of a file").option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((fileId, version, options) => downloadToOutput(connect, "downloadFileVersion", { fileId, version }, options, "workspace"));
|
|
22778
|
+
}
|
|
22779
|
+
function attachProjectFileSource(files) {
|
|
22780
|
+
const [command, connect] = apiCommand(files, "source", ["readProjectFileContent"]);
|
|
22781
|
+
command.argument("<projectId>", "Project that owns the file").argument("<fileId>", "File whose stored source to read").allowExcessArguments(false).description(describeOperation(V2_OPERATIONS.readProjectFileContent, "Download a Project file’s stored source to stdout or a local file")).option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((projectId, fileId, options) => downloadToOutput(connect, "readProjectFileContent", { projectId, fileId }, options, "owner"));
|
|
22782
|
+
}
|
|
22783
|
+
function attachProjectFileVersionSource(versions) {
|
|
22784
|
+
const [command, connect] = apiCommand(versions, "source", ["readProjectFileVersionContent"]);
|
|
22785
|
+
command.argument("<projectId>", "Project that owns the file").argument("<fileId>", "File identifier.").argument("<version>", "Version number.").allowExcessArguments(false).description(describeOperation(V2_OPERATIONS.readProjectFileVersionContent, "Download a Project file version’s stored source to stdout or a local file")).option("-o, --output-file <path>", "Write content to a file instead of stdout").option("--force", "Overwrite --output-file if it already exists").action((projectId, fileId, version, options) => downloadToOutput(connect, "readProjectFileVersionContent", { projectId, fileId, version }, options, "owner"));
|
|
22199
22786
|
}
|
|
22200
22787
|
|
|
22201
22788
|
// src/transfer/upload-session.ts
|
|
@@ -22323,7 +22910,7 @@ async function uploadParts(client, workspaceId, session, transfer, file) {
|
|
|
22323
22910
|
}
|
|
22324
22911
|
const signed = await client.request(session.operations.parts, {
|
|
22325
22912
|
params: session.params,
|
|
22326
|
-
query: { workspaceId },
|
|
22913
|
+
query: workspaceId ? { workspaceId } : undefined,
|
|
22327
22914
|
headers: { "upload-token": session.uploadToken },
|
|
22328
22915
|
body: { partNumbers }
|
|
22329
22916
|
});
|
|
@@ -22372,7 +22959,7 @@ async function finishUploadSession(client, workspaceId, session, path) {
|
|
|
22372
22959
|
await snapshot?.dispose().catch(() => {});
|
|
22373
22960
|
const completed = await client.request(session.operations.complete, {
|
|
22374
22961
|
params: session.params,
|
|
22375
|
-
query: { workspaceId },
|
|
22962
|
+
query: workspaceId ? { workspaceId } : undefined,
|
|
22376
22963
|
headers: { "upload-token": session.uploadToken }
|
|
22377
22964
|
});
|
|
22378
22965
|
return completed.data;
|
|
@@ -22382,7 +22969,7 @@ async function finishUploadSession(client, workspaceId, session, path) {
|
|
|
22382
22969
|
const cleanupClient = profile ? client.over(new SimClient({ ...profile, signal: AbortSignal.timeout(5000) })) : client;
|
|
22383
22970
|
await cleanupClient.request(session.operations.abort, {
|
|
22384
22971
|
params: session.params,
|
|
22385
|
-
query: { workspaceId },
|
|
22972
|
+
query: workspaceId ? { workspaceId } : undefined,
|
|
22386
22973
|
headers: { "upload-token": session.uploadToken }
|
|
22387
22974
|
}).catch(() => {
|
|
22388
22975
|
return;
|
|
@@ -22395,43 +22982,51 @@ async function finishUploadSession(client, workspaceId, session, path) {
|
|
|
22395
22982
|
}
|
|
22396
22983
|
|
|
22397
22984
|
// src/commands/protocol/files-upload.ts
|
|
22398
|
-
|
|
22399
|
-
|
|
22400
|
-
|
|
22401
|
-
|
|
22402
|
-
|
|
22403
|
-
|
|
22404
|
-
|
|
22405
|
-
|
|
22406
|
-
|
|
22407
|
-
|
|
22408
|
-
|
|
22409
|
-
|
|
22410
|
-
|
|
22411
|
-
|
|
22412
|
-
|
|
22413
|
-
|
|
22414
|
-
|
|
22415
|
-
|
|
22416
|
-
|
|
22417
|
-
|
|
22418
|
-
|
|
22419
|
-
|
|
22420
|
-
|
|
22421
|
-
|
|
22422
|
-
complete: "completeFileUpload",
|
|
22423
|
-
abort: "abortFileUpload"
|
|
22424
|
-
},
|
|
22425
|
-
params: { uploadId: session.id },
|
|
22426
|
-
uploadToken,
|
|
22427
|
-
transfer,
|
|
22428
|
-
size
|
|
22429
|
-
}, path);
|
|
22430
|
-
if (!completed.file) {
|
|
22431
|
-
throw new Error(`File upload ${session.id} completed without a file`);
|
|
22985
|
+
var WORKSPACE_UPLOAD_OPERATIONS = [
|
|
22986
|
+
"createFileUpload",
|
|
22987
|
+
"createFileUploadPartUrls",
|
|
22988
|
+
"completeFileUpload",
|
|
22989
|
+
"abortFileUpload"
|
|
22990
|
+
];
|
|
22991
|
+
var PROJECT_UPLOAD_OPERATIONS = [
|
|
22992
|
+
"createProjectFileUpload",
|
|
22993
|
+
"getProjectFileUploadPartUrls",
|
|
22994
|
+
"completeProjectFileUpload",
|
|
22995
|
+
"abortProjectFileUpload"
|
|
22996
|
+
];
|
|
22997
|
+
async function uploadFile(connect, path, options, operations, projectId) {
|
|
22998
|
+
const { client, profile } = connect();
|
|
22999
|
+
const workspaceId = projectId ? undefined : client.requireWorkspace();
|
|
23000
|
+
const { name, size } = await localFile(path, options.name);
|
|
23001
|
+
const created = await client.request(operations[0], {
|
|
23002
|
+
params: projectId ? { projectId } : undefined,
|
|
23003
|
+
body: {
|
|
23004
|
+
...workspaceId ? { workspaceId } : {},
|
|
23005
|
+
name,
|
|
23006
|
+
contentType: contentTypeFor(name),
|
|
23007
|
+
size,
|
|
23008
|
+
...options.folder !== undefined ? { folderPath: encodeFolderPath(options.folder) } : {}
|
|
22432
23009
|
}
|
|
22433
|
-
printProtocolResult(profile.output, completed.file);
|
|
22434
23010
|
});
|
|
23011
|
+
const { session, uploadToken, transfer } = created.data;
|
|
23012
|
+
const completed = await finishUploadSession(client, workspaceId, {
|
|
23013
|
+
operations: { parts: operations[1], complete: operations[2], abort: operations[3] },
|
|
23014
|
+
params: { uploadId: session.id, ...projectId ? { projectId } : {} },
|
|
23015
|
+
uploadToken,
|
|
23016
|
+
transfer,
|
|
23017
|
+
size
|
|
23018
|
+
}, path);
|
|
23019
|
+
if (!completed.file)
|
|
23020
|
+
throw new Error(`File upload ${session.id} completed without a file`);
|
|
23021
|
+
printProtocolResult(profile.output, completed.file);
|
|
23022
|
+
}
|
|
23023
|
+
function attachFileUpload(files) {
|
|
23024
|
+
const [upload, connect] = apiCommand(files, "upload", WORKSPACE_UPLOAD_OPERATIONS);
|
|
23025
|
+
upload.argument("<path>", "Local file to upload").allowExcessArguments(false).description("Upload a file to the workspace").option("--folder <path>", "Folder path as shown in the app; defaults to the root folder").option("--name <name>", "Store it under a different name").action((path, options) => uploadFile(connect, path, options, WORKSPACE_UPLOAD_OPERATIONS));
|
|
23026
|
+
}
|
|
23027
|
+
function attachProjectFileUpload(files) {
|
|
23028
|
+
const [upload, connect] = apiCommand(files, "upload", PROJECT_UPLOAD_OPERATIONS);
|
|
23029
|
+
upload.argument("<projectId>", "Project that will own the file").argument("<path>", "Local file to upload").allowExcessArguments(false).description("Upload a shared Project file").option("--folder <path>", "Folder path as shown in the app; defaults to the Project root").option("--name <name>", "Store it under a different name").action((projectId, path, options) => uploadFile(connect, path, options, PROJECT_UPLOAD_OPERATIONS, projectId));
|
|
22435
23030
|
}
|
|
22436
23031
|
|
|
22437
23032
|
// src/commands/protocol/knowledge-document-upload.ts
|
|
@@ -23621,6 +24216,10 @@ function group(program, name) {
|
|
|
23621
24216
|
return created;
|
|
23622
24217
|
}
|
|
23623
24218
|
function attachProtocolCommands(program) {
|
|
24219
|
+
const projectFiles = group(group(program, "projects"), "files");
|
|
24220
|
+
attachProjectFileUpload(projectFiles);
|
|
24221
|
+
attachProjectFileSource(projectFiles);
|
|
24222
|
+
attachProjectFileVersionSource(group(projectFiles, "versions"));
|
|
23624
24223
|
const files = group(program, "files");
|
|
23625
24224
|
attachFileUpload(files);
|
|
23626
24225
|
attachFileGet(files);
|