@idapt/cli 1.11.0 → 1.12.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.
@@ -5712,6 +5712,8 @@ var noteBoxSchema = z.object({
5712
5712
  var noteSchema = z.object({
5713
5713
  /** Public resourceId of the note. */
5714
5714
  id: z.string(),
5715
+ /** Containing folder's resourceId, or null at the box root. */
5716
+ folder_id: z.string().nullable(),
5715
5717
  title: z.string(),
5716
5718
  content: z.string(),
5717
5719
  /** "note" or "index". */
@@ -5721,6 +5723,38 @@ var noteSchema = z.object({
5721
5723
  created_at: z.string(),
5722
5724
  updated_at: z.string()
5723
5725
  }).meta({ id: "Note" });
5726
+ var noteFolderSchema = z.object({
5727
+ /** Public resourceId of the folder. */
5728
+ id: z.string(),
5729
+ /** Parent folder's resourceId, or null at the box root. */
5730
+ parent_id: z.string().nullable(),
5731
+ name: z.string(),
5732
+ created_at: z.string(),
5733
+ updated_at: z.string()
5734
+ }).meta({ id: "NoteFolder" });
5735
+ var noteTreeSchema = z.object({
5736
+ folders: z.array(noteFolderSchema),
5737
+ notes: z.array(noteSchema)
5738
+ }).meta({ id: "NoteTree" });
5739
+ var noteTrashEntrySchema = z.object({
5740
+ /** "note", "folder", or "box". */
5741
+ kind: z.string(),
5742
+ /** Public resourceId of the trashed root. */
5743
+ id: z.string(),
5744
+ /** Owning box resourceId (null for a box entry). */
5745
+ note_box_id: z.string().nullable(),
5746
+ /** Note title / folder name / box name. */
5747
+ name: z.string(),
5748
+ /** Location hint (box name for notes/folders). */
5749
+ path: z.string().nullable(),
5750
+ child_count: z.number().int(),
5751
+ trashed_at: z.string()
5752
+ }).meta({ id: "NoteTrashEntry" });
5753
+ var noteImportResultSchema = z.object({
5754
+ imported_notes: z.number().int(),
5755
+ created_folders: z.number().int(),
5756
+ skipped: z.number().int()
5757
+ }).meta({ id: "NoteImportResult" });
5724
5758
  var noteHitSchema = z.object({
5725
5759
  id: z.string(),
5726
5760
  title: z.string(),
@@ -5801,6 +5835,47 @@ var noteRenameRequestSchema = z.object({
5801
5835
  retarget_wikilinks: z.coerce.boolean().optional()
5802
5836
  });
5803
5837
  var noteRenameResponseSchema = z.object({ note: noteSchema, retargeted_count: z.number().int() }).meta({ id: "NoteRenameResult" });
5838
+ var folderCreateRequestSchema = z.object({
5839
+ name: z.string().min(1).max(100),
5840
+ /** Parent folder resourceId (null/omitted = box root). */
5841
+ parent_id: z.string().max(64).nullable().optional()
5842
+ });
5843
+ var folderRenameRequestSchema = z.object({
5844
+ name: z.string().min(1).max(100)
5845
+ });
5846
+ var folderMoveRequestSchema = z.object({
5847
+ /** New parent folder resourceId (null/omitted = box root). */
5848
+ parent_id: z.string().max(64).nullable().optional()
5849
+ });
5850
+ var noteMoveRequestSchema = z.object({
5851
+ /** The note's title (identifies it within the box). */
5852
+ title: z.string().min(1).max(200),
5853
+ /** Destination folder resourceId (null/omitted = box root). */
5854
+ folder_id: z.string().max(64).nullable().optional()
5855
+ });
5856
+ var noteImportRequestSchema = z.object({
5857
+ /** Text files to import; folders are derived from the `/`-separated path. */
5858
+ items: z.array(
5859
+ z.object({
5860
+ /** Relative path incl. filename, e.g. `sub/dir/Readme.md`. */
5861
+ path: z.string().min(1).max(1024),
5862
+ content: z.string().max(262144)
5863
+ })
5864
+ ).min(1).max(5e3)
5865
+ });
5866
+ var trashListRequestSchema = z.object({
5867
+ workspace_id: z.string().max(64).optional()
5868
+ });
5869
+ var trashActionRequestSchema = z.object({
5870
+ /** "note", "folder", or "box". */
5871
+ kind: z.enum(["note", "folder", "box"]),
5872
+ /** The trashed root's public resourceId. */
5873
+ id: z.string().max(64)
5874
+ });
5875
+ var trashEmptyRequestSchema = z.object({
5876
+ workspace_id: z.string().max(64).optional()
5877
+ });
5878
+ var trashCountResponseSchema = z.object({ purged_count: z.number().int() }).meta({ id: "NoteTrashPurgeResult" });
5804
5879
  var notesCommands = [
5805
5880
  cmd({
5806
5881
  resource: "notes",
@@ -6052,6 +6127,167 @@ var notesCommands = [
6052
6127
  responseKind: "single",
6053
6128
  request: noteRenameRequestSchema,
6054
6129
  response: noteRenameResponseSchema
6130
+ }),
6131
+ cmd({
6132
+ resource: "notes",
6133
+ verb: "note-move",
6134
+ method: "POST",
6135
+ path: "/notes/boxes/:id/notes/move",
6136
+ permission: ["notes", "write"],
6137
+ summary: "Move a note into a folder (or the box root).",
6138
+ tags: ["Notes"],
6139
+ errors: [404, 422],
6140
+ responseKind: "single",
6141
+ request: noteMoveRequestSchema,
6142
+ response: noteSchema
6143
+ }),
6144
+ cmd({
6145
+ resource: "notes",
6146
+ verb: "tree",
6147
+ method: "GET",
6148
+ path: "/notes/boxes/:id/tree",
6149
+ permission: ["notes", "read"],
6150
+ summary: "Get a box's full tree (folders + notes) in one call.",
6151
+ tags: ["Notes"],
6152
+ errors: [404],
6153
+ responseKind: "single",
6154
+ response: noteTreeSchema
6155
+ }),
6156
+ cmd({
6157
+ resource: "notes",
6158
+ verb: "folder-list",
6159
+ method: "GET",
6160
+ path: "/notes/boxes/:id/folders",
6161
+ permission: ["notes", "read"],
6162
+ summary: "List a box's folders.",
6163
+ tags: ["Notes"],
6164
+ errors: [404],
6165
+ responseKind: "list",
6166
+ response: noteFolderSchema,
6167
+ columns: [
6168
+ { header: "Name", field: "name" },
6169
+ { header: "ID", field: "id" }
6170
+ ]
6171
+ }),
6172
+ cmd({
6173
+ resource: "notes",
6174
+ verb: "folder-create",
6175
+ method: "POST",
6176
+ path: "/notes/boxes/:id/folders",
6177
+ permission: ["notes", "write"],
6178
+ summary: "Create a folder in a box (optionally under a parent folder).",
6179
+ tags: ["Notes"],
6180
+ errors: [404, 409, 422],
6181
+ responseKind: "created",
6182
+ request: folderCreateRequestSchema,
6183
+ response: noteFolderSchema
6184
+ }),
6185
+ cmd({
6186
+ resource: "notes",
6187
+ verb: "folder-rename",
6188
+ method: "PATCH",
6189
+ path: "/notes/folders/:folderId",
6190
+ permission: ["notes", "write"],
6191
+ summary: "Rename a folder.",
6192
+ tags: ["Notes"],
6193
+ errors: [404, 409, 422],
6194
+ responseKind: "single",
6195
+ request: folderRenameRequestSchema,
6196
+ response: noteFolderSchema
6197
+ }),
6198
+ cmd({
6199
+ resource: "notes",
6200
+ verb: "folder-move",
6201
+ method: "POST",
6202
+ path: "/notes/folders/:folderId/move",
6203
+ permission: ["notes", "write"],
6204
+ summary: "Move a folder under another folder (or the box root).",
6205
+ tags: ["Notes"],
6206
+ errors: [404, 409, 422],
6207
+ responseKind: "single",
6208
+ request: folderMoveRequestSchema,
6209
+ response: noteFolderSchema
6210
+ }),
6211
+ cmd({
6212
+ resource: "notes",
6213
+ verb: "folder-delete",
6214
+ method: "DELETE",
6215
+ path: "/notes/folders/:folderId",
6216
+ permission: ["notes", "write"],
6217
+ summary: "Delete a folder \u2192 moves it and its contents to the trash.",
6218
+ tags: ["Notes"],
6219
+ errors: [404],
6220
+ responseKind: "deleted",
6221
+ response: deletedEnvelopeSchema
6222
+ }),
6223
+ cmd({
6224
+ resource: "notes",
6225
+ verb: "import",
6226
+ method: "POST",
6227
+ path: "/notes/boxes/:id/import",
6228
+ permission: ["notes", "write"],
6229
+ summary: "Import text files into a box, recreating their folder hierarchy. 413 over quota.",
6230
+ tags: ["Notes"],
6231
+ errors: [404, 413, 422],
6232
+ responseKind: "single",
6233
+ request: noteImportRequestSchema,
6234
+ response: noteImportResultSchema
6235
+ }),
6236
+ cmd({
6237
+ resource: "notes",
6238
+ verb: "trash-list",
6239
+ method: "GET",
6240
+ path: "/notes/trash",
6241
+ permission: ["notes", "read"],
6242
+ summary: "List the trashed notes, folders, and boxes in a workspace.",
6243
+ tags: ["Notes"],
6244
+ responseKind: "list",
6245
+ request: trashListRequestSchema,
6246
+ response: noteTrashEntrySchema,
6247
+ argLocation: "query",
6248
+ columns: [
6249
+ { header: "Kind", field: "kind" },
6250
+ { header: "Name", field: "name" }
6251
+ ]
6252
+ }),
6253
+ cmd({
6254
+ resource: "notes",
6255
+ verb: "restore",
6256
+ method: "POST",
6257
+ path: "/notes/trash/restore",
6258
+ permission: ["notes", "write"],
6259
+ summary: "Restore a trashed note, folder, or box.",
6260
+ tags: ["Notes"],
6261
+ errors: [404],
6262
+ responseKind: "deleted",
6263
+ request: trashActionRequestSchema,
6264
+ response: deletedEnvelopeSchema
6265
+ }),
6266
+ cmd({
6267
+ resource: "notes",
6268
+ verb: "purge",
6269
+ method: "POST",
6270
+ path: "/notes/trash/purge",
6271
+ permission: ["notes", "write"],
6272
+ summary: "Permanently delete a trashed note, folder, or box (irreversible).",
6273
+ tags: ["Notes"],
6274
+ errors: [404, 422],
6275
+ responseKind: "deleted",
6276
+ request: trashActionRequestSchema,
6277
+ response: deletedEnvelopeSchema
6278
+ }),
6279
+ cmd({
6280
+ resource: "notes",
6281
+ verb: "trash-empty",
6282
+ method: "DELETE",
6283
+ path: "/notes/trash",
6284
+ permission: ["notes", "write"],
6285
+ summary: "Permanently delete every trashed item in a workspace (irreversible).",
6286
+ tags: ["Notes"],
6287
+ responseKind: "single",
6288
+ request: trashEmptyRequestSchema,
6289
+ response: trashCountResponseSchema,
6290
+ argLocation: "query"
6055
6291
  })
6056
6292
  ];
6057
6293
  var notesPlaybook = {
@@ -6073,6 +6309,14 @@ var notesPlaybook = {
6073
6309
  " references a note. Search BEFORE writing to avoid duplicates.",
6074
6310
  "- After adding a note worth surfacing, update the Index with `notes",
6075
6311
  " index-write` so the map stays accurate. The Index cannot be deleted.",
6312
+ "- Organize with FOLDERS: `notes folder-create --box <box> --name` (optionally",
6313
+ " `--parent-id`), then `notes note-move --box <box> --title --folder-id` to",
6314
+ " place a note. Folders are organizational only \u2014 titles stay unique per box,",
6315
+ " so `[[wikilinks]]` resolve the same regardless of folder. `notes tree` returns",
6316
+ " the whole folders+notes hierarchy in one call.",
6317
+ "- Deleting a note/folder/box moves it to the TRASH (recoverable). `notes",
6318
+ " trash-list` shows trashed roots; `notes restore --kind --id` brings one back;",
6319
+ " `notes purge --kind --id` deletes it forever. Trash auto-purges after 30 days.",
6076
6320
  "- Writes that would exceed your account's Notes size quota fail with 413 \u2014",
6077
6321
  " prune or consolidate notes."
6078
6322
  ].join("\n")
@@ -26100,6 +26344,336 @@ var commandCatalog = [
26100
26344
  422
26101
26345
  ]
26102
26346
  },
26347
+ {
26348
+ "command": "notes folder-create",
26349
+ "resource": "notes",
26350
+ "verb": "folder-create",
26351
+ "summary": "Create a folder in a box (optionally under a parent folder).",
26352
+ "method": "POST",
26353
+ "path": "/notes/boxes/:id/folders",
26354
+ "pathParams": [
26355
+ "id"
26356
+ ],
26357
+ "argLocation": "body",
26358
+ "responseKind": "created",
26359
+ "permission": [
26360
+ "notes",
26361
+ "write"
26362
+ ],
26363
+ "async": false,
26364
+ "inputSchema": {
26365
+ "type": "object",
26366
+ "properties": {
26367
+ "name": {
26368
+ "type": "string",
26369
+ "minLength": 1,
26370
+ "maxLength": 100
26371
+ },
26372
+ "parent_id": {
26373
+ "anyOf": [
26374
+ {
26375
+ "type": "string",
26376
+ "maxLength": 64
26377
+ },
26378
+ {
26379
+ "type": "null"
26380
+ }
26381
+ ]
26382
+ }
26383
+ },
26384
+ "required": [
26385
+ "name"
26386
+ ]
26387
+ },
26388
+ "outputSchema": {
26389
+ "type": "object",
26390
+ "properties": {
26391
+ "id": {
26392
+ "type": "string"
26393
+ },
26394
+ "parent_id": {
26395
+ "anyOf": [
26396
+ {
26397
+ "type": "string"
26398
+ },
26399
+ {
26400
+ "type": "null"
26401
+ }
26402
+ ]
26403
+ },
26404
+ "name": {
26405
+ "type": "string"
26406
+ },
26407
+ "created_at": {
26408
+ "type": "string"
26409
+ },
26410
+ "updated_at": {
26411
+ "type": "string"
26412
+ }
26413
+ },
26414
+ "required": [
26415
+ "id",
26416
+ "parent_id",
26417
+ "name",
26418
+ "created_at",
26419
+ "updated_at"
26420
+ ],
26421
+ "additionalProperties": false
26422
+ },
26423
+ "errors": [
26424
+ 404,
26425
+ 409,
26426
+ 422
26427
+ ]
26428
+ },
26429
+ {
26430
+ "command": "notes folder-delete",
26431
+ "resource": "notes",
26432
+ "verb": "folder-delete",
26433
+ "summary": "Delete a folder \u2192 moves it and its contents to the trash.",
26434
+ "method": "DELETE",
26435
+ "path": "/notes/folders/:folderId",
26436
+ "pathParams": [
26437
+ "folderId"
26438
+ ],
26439
+ "argLocation": "body",
26440
+ "responseKind": "deleted",
26441
+ "permission": [
26442
+ "notes",
26443
+ "write"
26444
+ ],
26445
+ "async": false,
26446
+ "inputSchema": {
26447
+ "type": "object",
26448
+ "properties": {},
26449
+ "additionalProperties": {}
26450
+ },
26451
+ "outputSchema": {
26452
+ "type": "object",
26453
+ "properties": {
26454
+ "deleted": {
26455
+ "type": "boolean",
26456
+ "const": true
26457
+ },
26458
+ "id": {
26459
+ "type": "string"
26460
+ }
26461
+ },
26462
+ "required": [
26463
+ "deleted",
26464
+ "id"
26465
+ ],
26466
+ "additionalProperties": false
26467
+ },
26468
+ "errors": [
26469
+ 404
26470
+ ]
26471
+ },
26472
+ {
26473
+ "command": "notes folder-list",
26474
+ "resource": "notes",
26475
+ "verb": "folder-list",
26476
+ "summary": "List a box's folders.",
26477
+ "method": "GET",
26478
+ "path": "/notes/boxes/:id/folders",
26479
+ "pathParams": [
26480
+ "id"
26481
+ ],
26482
+ "argLocation": "query",
26483
+ "responseKind": "list",
26484
+ "permission": [
26485
+ "notes",
26486
+ "read"
26487
+ ],
26488
+ "async": false,
26489
+ "inputSchema": {
26490
+ "type": "object",
26491
+ "properties": {}
26492
+ },
26493
+ "outputSchema": {
26494
+ "type": "object",
26495
+ "properties": {
26496
+ "id": {
26497
+ "type": "string"
26498
+ },
26499
+ "parent_id": {
26500
+ "anyOf": [
26501
+ {
26502
+ "type": "string"
26503
+ },
26504
+ {
26505
+ "type": "null"
26506
+ }
26507
+ ]
26508
+ },
26509
+ "name": {
26510
+ "type": "string"
26511
+ },
26512
+ "created_at": {
26513
+ "type": "string"
26514
+ },
26515
+ "updated_at": {
26516
+ "type": "string"
26517
+ }
26518
+ },
26519
+ "required": [
26520
+ "id",
26521
+ "parent_id",
26522
+ "name",
26523
+ "created_at",
26524
+ "updated_at"
26525
+ ],
26526
+ "additionalProperties": false
26527
+ },
26528
+ "errors": [
26529
+ 404
26530
+ ]
26531
+ },
26532
+ {
26533
+ "command": "notes folder-move",
26534
+ "resource": "notes",
26535
+ "verb": "folder-move",
26536
+ "summary": "Move a folder under another folder (or the box root).",
26537
+ "method": "POST",
26538
+ "path": "/notes/folders/:folderId/move",
26539
+ "pathParams": [
26540
+ "folderId"
26541
+ ],
26542
+ "argLocation": "body",
26543
+ "responseKind": "single",
26544
+ "permission": [
26545
+ "notes",
26546
+ "write"
26547
+ ],
26548
+ "async": false,
26549
+ "inputSchema": {
26550
+ "type": "object",
26551
+ "properties": {
26552
+ "parent_id": {
26553
+ "anyOf": [
26554
+ {
26555
+ "type": "string",
26556
+ "maxLength": 64
26557
+ },
26558
+ {
26559
+ "type": "null"
26560
+ }
26561
+ ]
26562
+ }
26563
+ }
26564
+ },
26565
+ "outputSchema": {
26566
+ "type": "object",
26567
+ "properties": {
26568
+ "id": {
26569
+ "type": "string"
26570
+ },
26571
+ "parent_id": {
26572
+ "anyOf": [
26573
+ {
26574
+ "type": "string"
26575
+ },
26576
+ {
26577
+ "type": "null"
26578
+ }
26579
+ ]
26580
+ },
26581
+ "name": {
26582
+ "type": "string"
26583
+ },
26584
+ "created_at": {
26585
+ "type": "string"
26586
+ },
26587
+ "updated_at": {
26588
+ "type": "string"
26589
+ }
26590
+ },
26591
+ "required": [
26592
+ "id",
26593
+ "parent_id",
26594
+ "name",
26595
+ "created_at",
26596
+ "updated_at"
26597
+ ],
26598
+ "additionalProperties": false
26599
+ },
26600
+ "errors": [
26601
+ 404,
26602
+ 409,
26603
+ 422
26604
+ ]
26605
+ },
26606
+ {
26607
+ "command": "notes folder-rename",
26608
+ "resource": "notes",
26609
+ "verb": "folder-rename",
26610
+ "summary": "Rename a folder.",
26611
+ "method": "PATCH",
26612
+ "path": "/notes/folders/:folderId",
26613
+ "pathParams": [
26614
+ "folderId"
26615
+ ],
26616
+ "argLocation": "body",
26617
+ "responseKind": "single",
26618
+ "permission": [
26619
+ "notes",
26620
+ "write"
26621
+ ],
26622
+ "async": false,
26623
+ "inputSchema": {
26624
+ "type": "object",
26625
+ "properties": {
26626
+ "name": {
26627
+ "type": "string",
26628
+ "minLength": 1,
26629
+ "maxLength": 100
26630
+ }
26631
+ },
26632
+ "required": [
26633
+ "name"
26634
+ ]
26635
+ },
26636
+ "outputSchema": {
26637
+ "type": "object",
26638
+ "properties": {
26639
+ "id": {
26640
+ "type": "string"
26641
+ },
26642
+ "parent_id": {
26643
+ "anyOf": [
26644
+ {
26645
+ "type": "string"
26646
+ },
26647
+ {
26648
+ "type": "null"
26649
+ }
26650
+ ]
26651
+ },
26652
+ "name": {
26653
+ "type": "string"
26654
+ },
26655
+ "created_at": {
26656
+ "type": "string"
26657
+ },
26658
+ "updated_at": {
26659
+ "type": "string"
26660
+ }
26661
+ },
26662
+ "required": [
26663
+ "id",
26664
+ "parent_id",
26665
+ "name",
26666
+ "created_at",
26667
+ "updated_at"
26668
+ ],
26669
+ "additionalProperties": false
26670
+ },
26671
+ "errors": [
26672
+ 404,
26673
+ 409,
26674
+ 422
26675
+ ]
26676
+ },
26103
26677
  {
26104
26678
  "command": "notes graph",
26105
26679
  "resource": "notes",
@@ -26177,6 +26751,86 @@ var commandCatalog = [
26177
26751
  404
26178
26752
  ]
26179
26753
  },
26754
+ {
26755
+ "command": "notes import",
26756
+ "resource": "notes",
26757
+ "verb": "import",
26758
+ "summary": "Import text files into a box, recreating their folder hierarchy. 413 over quota.",
26759
+ "method": "POST",
26760
+ "path": "/notes/boxes/:id/import",
26761
+ "pathParams": [
26762
+ "id"
26763
+ ],
26764
+ "argLocation": "body",
26765
+ "responseKind": "single",
26766
+ "permission": [
26767
+ "notes",
26768
+ "write"
26769
+ ],
26770
+ "async": false,
26771
+ "inputSchema": {
26772
+ "type": "object",
26773
+ "properties": {
26774
+ "items": {
26775
+ "minItems": 1,
26776
+ "maxItems": 5e3,
26777
+ "type": "array",
26778
+ "items": {
26779
+ "type": "object",
26780
+ "properties": {
26781
+ "path": {
26782
+ "type": "string",
26783
+ "minLength": 1,
26784
+ "maxLength": 1024
26785
+ },
26786
+ "content": {
26787
+ "type": "string",
26788
+ "maxLength": 262144
26789
+ }
26790
+ },
26791
+ "required": [
26792
+ "path",
26793
+ "content"
26794
+ ]
26795
+ }
26796
+ }
26797
+ },
26798
+ "required": [
26799
+ "items"
26800
+ ]
26801
+ },
26802
+ "outputSchema": {
26803
+ "type": "object",
26804
+ "properties": {
26805
+ "imported_notes": {
26806
+ "type": "integer",
26807
+ "minimum": -9007199254740991,
26808
+ "maximum": 9007199254740991
26809
+ },
26810
+ "created_folders": {
26811
+ "type": "integer",
26812
+ "minimum": -9007199254740991,
26813
+ "maximum": 9007199254740991
26814
+ },
26815
+ "skipped": {
26816
+ "type": "integer",
26817
+ "minimum": -9007199254740991,
26818
+ "maximum": 9007199254740991
26819
+ }
26820
+ },
26821
+ "required": [
26822
+ "imported_notes",
26823
+ "created_folders",
26824
+ "skipped"
26825
+ ],
26826
+ "additionalProperties": false
26827
+ },
26828
+ "errors": [
26829
+ 404,
26830
+ 413,
26831
+ 422
26832
+ ]
26833
+ },
26180
26834
  {
26181
26835
  "command": "notes index-read",
26182
26836
  "resource": "notes",
@@ -26204,6 +26858,16 @@ var commandCatalog = [
26204
26858
  "id": {
26205
26859
  "type": "string"
26206
26860
  },
26861
+ "folder_id": {
26862
+ "anyOf": [
26863
+ {
26864
+ "type": "string"
26865
+ },
26866
+ {
26867
+ "type": "null"
26868
+ }
26869
+ ]
26870
+ },
26207
26871
  "title": {
26208
26872
  "type": "string"
26209
26873
  },
@@ -26227,6 +26891,7 @@ var commandCatalog = [
26227
26891
  },
26228
26892
  "required": [
26229
26893
  "id",
26894
+ "folder_id",
26230
26895
  "title",
26231
26896
  "content",
26232
26897
  "kind",
@@ -26275,6 +26940,16 @@ var commandCatalog = [
26275
26940
  "id": {
26276
26941
  "type": "string"
26277
26942
  },
26943
+ "folder_id": {
26944
+ "anyOf": [
26945
+ {
26946
+ "type": "string"
26947
+ },
26948
+ {
26949
+ "type": "null"
26950
+ }
26951
+ ]
26952
+ },
26278
26953
  "title": {
26279
26954
  "type": "string"
26280
26955
  },
@@ -26298,6 +26973,7 @@ var commandCatalog = [
26298
26973
  },
26299
26974
  "required": [
26300
26975
  "id",
26976
+ "folder_id",
26301
26977
  "title",
26302
26978
  "content",
26303
26979
  "kind",
@@ -26413,6 +27089,16 @@ var commandCatalog = [
26413
27089
  "id": {
26414
27090
  "type": "string"
26415
27091
  },
27092
+ "folder_id": {
27093
+ "anyOf": [
27094
+ {
27095
+ "type": "string"
27096
+ },
27097
+ {
27098
+ "type": "null"
27099
+ }
27100
+ ]
27101
+ },
26416
27102
  "title": {
26417
27103
  "type": "string"
26418
27104
  },
@@ -26436,6 +27122,7 @@ var commandCatalog = [
26436
27122
  },
26437
27123
  "required": [
26438
27124
  "id",
27125
+ "folder_id",
26439
27126
  "title",
26440
27127
  "content",
26441
27128
  "kind",
@@ -26449,6 +27136,101 @@ var commandCatalog = [
26449
27136
  404
26450
27137
  ]
26451
27138
  },
27139
+ {
27140
+ "command": "notes note-move",
27141
+ "resource": "notes",
27142
+ "verb": "note-move",
27143
+ "summary": "Move a note into a folder (or the box root).",
27144
+ "method": "POST",
27145
+ "path": "/notes/boxes/:id/notes/move",
27146
+ "pathParams": [
27147
+ "id"
27148
+ ],
27149
+ "argLocation": "body",
27150
+ "responseKind": "single",
27151
+ "permission": [
27152
+ "notes",
27153
+ "write"
27154
+ ],
27155
+ "async": false,
27156
+ "inputSchema": {
27157
+ "type": "object",
27158
+ "properties": {
27159
+ "title": {
27160
+ "type": "string",
27161
+ "minLength": 1,
27162
+ "maxLength": 200
27163
+ },
27164
+ "folder_id": {
27165
+ "anyOf": [
27166
+ {
27167
+ "type": "string",
27168
+ "maxLength": 64
27169
+ },
27170
+ {
27171
+ "type": "null"
27172
+ }
27173
+ ]
27174
+ }
27175
+ },
27176
+ "required": [
27177
+ "title"
27178
+ ]
27179
+ },
27180
+ "outputSchema": {
27181
+ "type": "object",
27182
+ "properties": {
27183
+ "id": {
27184
+ "type": "string"
27185
+ },
27186
+ "folder_id": {
27187
+ "anyOf": [
27188
+ {
27189
+ "type": "string"
27190
+ },
27191
+ {
27192
+ "type": "null"
27193
+ }
27194
+ ]
27195
+ },
27196
+ "title": {
27197
+ "type": "string"
27198
+ },
27199
+ "content": {
27200
+ "type": "string"
27201
+ },
27202
+ "kind": {
27203
+ "type": "string"
27204
+ },
27205
+ "version": {
27206
+ "type": "integer",
27207
+ "minimum": -9007199254740991,
27208
+ "maximum": 9007199254740991
27209
+ },
27210
+ "created_at": {
27211
+ "type": "string"
27212
+ },
27213
+ "updated_at": {
27214
+ "type": "string"
27215
+ }
27216
+ },
27217
+ "required": [
27218
+ "id",
27219
+ "folder_id",
27220
+ "title",
27221
+ "content",
27222
+ "kind",
27223
+ "version",
27224
+ "created_at",
27225
+ "updated_at"
27226
+ ],
27227
+ "additionalProperties": false
27228
+ },
27229
+ "errors": [
27230
+ 404,
27231
+ 422
27232
+ ]
27233
+ },
26452
27234
  {
26453
27235
  "command": "notes note-rename",
26454
27236
  "resource": "notes",
@@ -26512,6 +27294,16 @@ var commandCatalog = [
26512
27294
  "id": {
26513
27295
  "type": "string"
26514
27296
  },
27297
+ "folder_id": {
27298
+ "anyOf": [
27299
+ {
27300
+ "type": "string"
27301
+ },
27302
+ {
27303
+ "type": "null"
27304
+ }
27305
+ ]
27306
+ },
26515
27307
  "title": {
26516
27308
  "type": "string"
26517
27309
  },
@@ -26535,6 +27327,7 @@ var commandCatalog = [
26535
27327
  },
26536
27328
  "required": [
26537
27329
  "id",
27330
+ "folder_id",
26538
27331
  "title",
26539
27332
  "content",
26540
27333
  "kind",
@@ -26552,6 +27345,64 @@ var commandCatalog = [
26552
27345
  422
26553
27346
  ]
26554
27347
  },
27348
+ {
27349
+ "command": "notes purge",
27350
+ "resource": "notes",
27351
+ "verb": "purge",
27352
+ "summary": "Permanently delete a trashed note, folder, or box (irreversible).",
27353
+ "method": "POST",
27354
+ "path": "/notes/trash/purge",
27355
+ "pathParams": [],
27356
+ "argLocation": "body",
27357
+ "responseKind": "deleted",
27358
+ "permission": [
27359
+ "notes",
27360
+ "write"
27361
+ ],
27362
+ "async": false,
27363
+ "inputSchema": {
27364
+ "type": "object",
27365
+ "properties": {
27366
+ "kind": {
27367
+ "type": "string",
27368
+ "enum": [
27369
+ "note",
27370
+ "folder",
27371
+ "box"
27372
+ ]
27373
+ },
27374
+ "id": {
27375
+ "type": "string",
27376
+ "maxLength": 64
27377
+ }
27378
+ },
27379
+ "required": [
27380
+ "kind",
27381
+ "id"
27382
+ ]
27383
+ },
27384
+ "outputSchema": {
27385
+ "type": "object",
27386
+ "properties": {
27387
+ "deleted": {
27388
+ "type": "boolean",
27389
+ "const": true
27390
+ },
27391
+ "id": {
27392
+ "type": "string"
27393
+ }
27394
+ },
27395
+ "required": [
27396
+ "deleted",
27397
+ "id"
27398
+ ],
27399
+ "additionalProperties": false
27400
+ },
27401
+ "errors": [
27402
+ 404,
27403
+ 422
27404
+ ]
27405
+ },
26555
27406
  {
26556
27407
  "command": "notes read",
26557
27408
  "resource": "notes",
@@ -26588,6 +27439,16 @@ var commandCatalog = [
26588
27439
  "id": {
26589
27440
  "type": "string"
26590
27441
  },
27442
+ "folder_id": {
27443
+ "anyOf": [
27444
+ {
27445
+ "type": "string"
27446
+ },
27447
+ {
27448
+ "type": "null"
27449
+ }
27450
+ ]
27451
+ },
26591
27452
  "title": {
26592
27453
  "type": "string"
26593
27454
  },
@@ -26611,6 +27472,7 @@ var commandCatalog = [
26611
27472
  },
26612
27473
  "required": [
26613
27474
  "id",
27475
+ "folder_id",
26614
27476
  "title",
26615
27477
  "content",
26616
27478
  "kind",
@@ -26624,6 +27486,63 @@ var commandCatalog = [
26624
27486
  404
26625
27487
  ]
26626
27488
  },
27489
+ {
27490
+ "command": "notes restore",
27491
+ "resource": "notes",
27492
+ "verb": "restore",
27493
+ "summary": "Restore a trashed note, folder, or box.",
27494
+ "method": "POST",
27495
+ "path": "/notes/trash/restore",
27496
+ "pathParams": [],
27497
+ "argLocation": "body",
27498
+ "responseKind": "deleted",
27499
+ "permission": [
27500
+ "notes",
27501
+ "write"
27502
+ ],
27503
+ "async": false,
27504
+ "inputSchema": {
27505
+ "type": "object",
27506
+ "properties": {
27507
+ "kind": {
27508
+ "type": "string",
27509
+ "enum": [
27510
+ "note",
27511
+ "folder",
27512
+ "box"
27513
+ ]
27514
+ },
27515
+ "id": {
27516
+ "type": "string",
27517
+ "maxLength": 64
27518
+ }
27519
+ },
27520
+ "required": [
27521
+ "kind",
27522
+ "id"
27523
+ ]
27524
+ },
27525
+ "outputSchema": {
27526
+ "type": "object",
27527
+ "properties": {
27528
+ "deleted": {
27529
+ "type": "boolean",
27530
+ "const": true
27531
+ },
27532
+ "id": {
27533
+ "type": "string"
27534
+ }
27535
+ },
27536
+ "required": [
27537
+ "deleted",
27538
+ "id"
27539
+ ],
27540
+ "additionalProperties": false
27541
+ },
27542
+ "errors": [
27543
+ 404
27544
+ ]
27545
+ },
26627
27546
  {
26628
27547
  "command": "notes search",
26629
27548
  "resource": "notes",
@@ -26897,6 +27816,255 @@ var commandCatalog = [
26897
27816
  422
26898
27817
  ]
26899
27818
  },
27819
+ {
27820
+ "command": "notes trash-empty",
27821
+ "resource": "notes",
27822
+ "verb": "trash-empty",
27823
+ "summary": "Permanently delete every trashed item in a workspace (irreversible).",
27824
+ "method": "DELETE",
27825
+ "path": "/notes/trash",
27826
+ "pathParams": [],
27827
+ "argLocation": "query",
27828
+ "responseKind": "single",
27829
+ "permission": [
27830
+ "notes",
27831
+ "write"
27832
+ ],
27833
+ "async": false,
27834
+ "inputSchema": {
27835
+ "type": "object",
27836
+ "properties": {
27837
+ "workspace_id": {
27838
+ "type": "string",
27839
+ "maxLength": 64
27840
+ }
27841
+ }
27842
+ },
27843
+ "outputSchema": {
27844
+ "type": "object",
27845
+ "properties": {
27846
+ "purged_count": {
27847
+ "type": "integer",
27848
+ "minimum": -9007199254740991,
27849
+ "maximum": 9007199254740991
27850
+ }
27851
+ },
27852
+ "required": [
27853
+ "purged_count"
27854
+ ],
27855
+ "additionalProperties": false
27856
+ }
27857
+ },
27858
+ {
27859
+ "command": "notes trash-list",
27860
+ "resource": "notes",
27861
+ "verb": "trash-list",
27862
+ "summary": "List the trashed notes, folders, and boxes in a workspace.",
27863
+ "method": "GET",
27864
+ "path": "/notes/trash",
27865
+ "pathParams": [],
27866
+ "argLocation": "query",
27867
+ "responseKind": "list",
27868
+ "permission": [
27869
+ "notes",
27870
+ "read"
27871
+ ],
27872
+ "async": false,
27873
+ "inputSchema": {
27874
+ "type": "object",
27875
+ "properties": {
27876
+ "workspace_id": {
27877
+ "type": "string",
27878
+ "maxLength": 64
27879
+ }
27880
+ }
27881
+ },
27882
+ "outputSchema": {
27883
+ "type": "object",
27884
+ "properties": {
27885
+ "kind": {
27886
+ "type": "string"
27887
+ },
27888
+ "id": {
27889
+ "type": "string"
27890
+ },
27891
+ "note_box_id": {
27892
+ "anyOf": [
27893
+ {
27894
+ "type": "string"
27895
+ },
27896
+ {
27897
+ "type": "null"
27898
+ }
27899
+ ]
27900
+ },
27901
+ "name": {
27902
+ "type": "string"
27903
+ },
27904
+ "path": {
27905
+ "anyOf": [
27906
+ {
27907
+ "type": "string"
27908
+ },
27909
+ {
27910
+ "type": "null"
27911
+ }
27912
+ ]
27913
+ },
27914
+ "child_count": {
27915
+ "type": "integer",
27916
+ "minimum": -9007199254740991,
27917
+ "maximum": 9007199254740991
27918
+ },
27919
+ "trashed_at": {
27920
+ "type": "string"
27921
+ }
27922
+ },
27923
+ "required": [
27924
+ "kind",
27925
+ "id",
27926
+ "note_box_id",
27927
+ "name",
27928
+ "path",
27929
+ "child_count",
27930
+ "trashed_at"
27931
+ ],
27932
+ "additionalProperties": false
27933
+ }
27934
+ },
27935
+ {
27936
+ "command": "notes tree",
27937
+ "resource": "notes",
27938
+ "verb": "tree",
27939
+ "summary": "Get a box's full tree (folders + notes) in one call.",
27940
+ "method": "GET",
27941
+ "path": "/notes/boxes/:id/tree",
27942
+ "pathParams": [
27943
+ "id"
27944
+ ],
27945
+ "argLocation": "query",
27946
+ "responseKind": "single",
27947
+ "permission": [
27948
+ "notes",
27949
+ "read"
27950
+ ],
27951
+ "async": false,
27952
+ "inputSchema": {
27953
+ "type": "object",
27954
+ "properties": {}
27955
+ },
27956
+ "outputSchema": {
27957
+ "type": "object",
27958
+ "properties": {
27959
+ "folders": {
27960
+ "type": "array",
27961
+ "items": {
27962
+ "$ref": "#/$defs/NoteFolder"
27963
+ }
27964
+ },
27965
+ "notes": {
27966
+ "type": "array",
27967
+ "items": {
27968
+ "$ref": "#/$defs/Note"
27969
+ }
27970
+ }
27971
+ },
27972
+ "required": [
27973
+ "folders",
27974
+ "notes"
27975
+ ],
27976
+ "additionalProperties": false,
27977
+ "$defs": {
27978
+ "NoteFolder": {
27979
+ "type": "object",
27980
+ "properties": {
27981
+ "id": {
27982
+ "type": "string"
27983
+ },
27984
+ "parent_id": {
27985
+ "anyOf": [
27986
+ {
27987
+ "type": "string"
27988
+ },
27989
+ {
27990
+ "type": "null"
27991
+ }
27992
+ ]
27993
+ },
27994
+ "name": {
27995
+ "type": "string"
27996
+ },
27997
+ "created_at": {
27998
+ "type": "string"
27999
+ },
28000
+ "updated_at": {
28001
+ "type": "string"
28002
+ }
28003
+ },
28004
+ "required": [
28005
+ "id",
28006
+ "parent_id",
28007
+ "name",
28008
+ "created_at",
28009
+ "updated_at"
28010
+ ],
28011
+ "additionalProperties": false
28012
+ },
28013
+ "Note": {
28014
+ "type": "object",
28015
+ "properties": {
28016
+ "id": {
28017
+ "type": "string"
28018
+ },
28019
+ "folder_id": {
28020
+ "anyOf": [
28021
+ {
28022
+ "type": "string"
28023
+ },
28024
+ {
28025
+ "type": "null"
28026
+ }
28027
+ ]
28028
+ },
28029
+ "title": {
28030
+ "type": "string"
28031
+ },
28032
+ "content": {
28033
+ "type": "string"
28034
+ },
28035
+ "kind": {
28036
+ "type": "string"
28037
+ },
28038
+ "version": {
28039
+ "type": "integer",
28040
+ "minimum": -9007199254740991,
28041
+ "maximum": 9007199254740991
28042
+ },
28043
+ "created_at": {
28044
+ "type": "string"
28045
+ },
28046
+ "updated_at": {
28047
+ "type": "string"
28048
+ }
28049
+ },
28050
+ "required": [
28051
+ "id",
28052
+ "folder_id",
28053
+ "title",
28054
+ "content",
28055
+ "kind",
28056
+ "version",
28057
+ "created_at",
28058
+ "updated_at"
28059
+ ],
28060
+ "additionalProperties": false
28061
+ }
28062
+ }
28063
+ },
28064
+ "errors": [
28065
+ 404
28066
+ ]
28067
+ },
26900
28068
  {
26901
28069
  "command": "notes write",
26902
28070
  "resource": "notes",
@@ -26943,6 +28111,16 @@ var commandCatalog = [
26943
28111
  "id": {
26944
28112
  "type": "string"
26945
28113
  },
28114
+ "folder_id": {
28115
+ "anyOf": [
28116
+ {
28117
+ "type": "string"
28118
+ },
28119
+ {
28120
+ "type": "null"
28121
+ }
28122
+ ]
28123
+ },
26946
28124
  "title": {
26947
28125
  "type": "string"
26948
28126
  },
@@ -26966,6 +28144,7 @@ var commandCatalog = [
26966
28144
  },
26967
28145
  "required": [
26968
28146
  "id",
28147
+ "folder_id",
26969
28148
  "title",
26970
28149
  "content",
26971
28150
  "kind",
@@ -45457,6 +46636,11 @@ function mapArgsToV1(path, pathParams, args) {
45457
46636
  delete out.content;
45458
46637
  delete out.path;
45459
46638
  }
46639
+ if (path === "drive create-folder" && out.name === void 0 && typeof out.path === "string") {
46640
+ const target = out.path;
46641
+ out.name = target.split("/").pop() || target;
46642
+ delete out.path;
46643
+ }
45460
46644
  const resolvedParent = out.resolved_parent_id;
45461
46645
  for (const [from, to] of Object.entries(RESOLVED_FIELD_TO_V1)) {
45462
46646
  const val = out[from];
@@ -45494,6 +46678,13 @@ function mapArgsToV1(path, pathParams, args) {
45494
46678
  }
45495
46679
 
45496
46680
  // src/execute.ts
46681
+ function requestDeclaresWorkspaceId(request) {
46682
+ const shape = request?.shape;
46683
+ return !!shape && Object.hasOwn(shape, "workspace_id");
46684
+ }
46685
+ function hasWorkspaceArg(args) {
46686
+ return args.workspace_id !== void 0 || args.workspace !== void 0;
46687
+ }
45497
46688
  var TERMINAL = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
45498
46689
  function isOperationHandle(data) {
45499
46690
  return typeof data === "object" && data !== null && typeof data.id === "string" && typeof data.status === "string";
@@ -45590,10 +46781,11 @@ async function execute(cmd2, opts) {
45590
46781
  rendered: renderInstructions(spec.resource)
45591
46782
  };
45592
46783
  }
46784
+ const mergedArgs = opts.defaultWorkspaceRef && !hasWorkspaceArg(mappedArgs) && requestDeclaresWorkspaceId(spec.request) ? { ...mappedArgs, workspace_id: opts.defaultWorkspaceRef } : mappedArgs;
45593
46785
  return runSpec(
45594
46786
  spec,
45595
46787
  positionals,
45596
- mappedArgs,
46788
+ mergedArgs,
45597
46789
  opts,
45598
46790
  mode,
45599
46791
  opts.background ?? inv.background
@@ -45766,5 +46958,5 @@ function createFetchTransport(opts) {
45766
46958
  }
45767
46959
 
45768
46960
  export { VERB_OVERRIDES, autoMode, commandCatalog, commandsForResource, createFetchTransport, execute, executeCommand, findCommand, getResourcePlaybook, listCommands, listResources, mapArgsToV1, parseInvocation, quoteToken, reconcileToV1, render, renderHelp, renderInstructions, resolveCommand, toSnakeKey };
45769
- //# sourceMappingURL=chunk-3CWHRMLZ.js.map
45770
- //# sourceMappingURL=chunk-3CWHRMLZ.js.map
46961
+ //# sourceMappingURL=chunk-GISKSK4V.js.map
46962
+ //# sourceMappingURL=chunk-GISKSK4V.js.map