@sanity/cli 8.35.0 → 8.36.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.
Files changed (38) hide show
  1. package/dist/actions/build/buildApp.js +1 -4
  2. package/dist/actions/build/buildApp.js.map +1 -1
  3. package/dist/actions/build/buildStudio.js +1 -0
  4. package/dist/actions/build/buildStudio.js.map +1 -1
  5. package/dist/actions/deploy/deployApp.js +15 -8
  6. package/dist/actions/deploy/deployApp.js.map +1 -1
  7. package/dist/actions/deploy/deployDashboardConfig.js +118 -0
  8. package/dist/actions/deploy/deployDashboardConfig.js.map +1 -0
  9. package/dist/actions/deploy/deployStudio.js +2 -2
  10. package/dist/actions/deploy/deployStudio.js.map +1 -1
  11. package/dist/actions/dev/servers/getDevServerConfig.js +2 -5
  12. package/dist/actions/dev/servers/getDevServerConfig.js.map +1 -1
  13. package/dist/actions/graphql/extractGraphQLAPIs.js +6 -4
  14. package/dist/actions/graphql/extractGraphQLAPIs.js.map +1 -1
  15. package/dist/actions/graphql/extractGraphQLAPIs.worker.js +2 -1
  16. package/dist/actions/graphql/extractGraphQLAPIs.worker.js.map +1 -1
  17. package/dist/actions/preview/previewAction.js +2 -2
  18. package/dist/actions/preview/previewAction.js.map +1 -1
  19. package/dist/actions/undeploy/runUndeploy.js +16 -4
  20. package/dist/actions/undeploy/runUndeploy.js.map +1 -1
  21. package/dist/actions/undeploy/undeployPlan.js +2 -2
  22. package/dist/actions/undeploy/undeployPlan.js.map +1 -1
  23. package/dist/commands/deploy.js +15 -3
  24. package/dist/commands/deploy.js.map +1 -1
  25. package/dist/commands/media/prune-aspect-data.js +1 -1
  26. package/dist/commands/media/prune-aspect-data.js.map +1 -1
  27. package/dist/commands/media/pull-aspects.js +1 -1
  28. package/dist/commands/media/pull-aspects.js.map +1 -1
  29. package/dist/exports/index.d.ts +2 -2
  30. package/dist/exports/index.js +1 -1
  31. package/dist/exports/index.js.map +1 -1
  32. package/dist/exports/runtime.d.ts +2 -2
  33. package/dist/exports/runtime.js +1 -1
  34. package/dist/exports/runtime.js.map +1 -1
  35. package/dist/generated/apiRoutes.js +37 -0
  36. package/dist/generated/apiRoutes.js.map +1 -1
  37. package/oclif.manifest.json +1272 -1272
  38. package/package.json +16 -16
@@ -2505,6 +2505,179 @@
2505
2505
  "update.js"
2506
2506
  ]
2507
2507
  },
2508
+ "cors:add": {
2509
+ "aliases": [],
2510
+ "args": {
2511
+ "origin": {
2512
+ "description": "Origin to allow (e.g., https://example.com)",
2513
+ "name": "origin",
2514
+ "required": true
2515
+ }
2516
+ },
2517
+ "description": "Add a CORS origin to the project",
2518
+ "examples": [
2519
+ {
2520
+ "command": "<%= config.bin %> <%= command.id %>",
2521
+ "description": "Interactively add a CORS origin"
2522
+ },
2523
+ {
2524
+ "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
2525
+ "description": "Add a localhost origin without credentials"
2526
+ },
2527
+ {
2528
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
2529
+ "description": "Add a production origin with credentials allowed"
2530
+ },
2531
+ {
2532
+ "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project abc123",
2533
+ "description": "Add a CORS origin for a specific project"
2534
+ }
2535
+ ],
2536
+ "flags": {
2537
+ "project": {
2538
+ "aliases": [
2539
+ "project-id"
2540
+ ],
2541
+ "char": "p",
2542
+ "deprecateAliases": true,
2543
+ "description": "Project ID to add CORS origin to (overrides CLI configuration)",
2544
+ "helpGroup": "OVERRIDE",
2545
+ "name": "project",
2546
+ "hasDynamicHelp": false,
2547
+ "helpValue": "<id>",
2548
+ "multiple": false,
2549
+ "type": "option"
2550
+ },
2551
+ "credentials": {
2552
+ "description": "Allow credentials (token/cookie) to be sent from this origin",
2553
+ "name": "credentials",
2554
+ "required": false,
2555
+ "allowNo": true,
2556
+ "type": "boolean"
2557
+ },
2558
+ "yes": {
2559
+ "char": "y",
2560
+ "description": "Confirm risky wildcard origins without prompting",
2561
+ "name": "yes",
2562
+ "allowNo": false,
2563
+ "type": "boolean"
2564
+ }
2565
+ },
2566
+ "hasDynamicHelp": false,
2567
+ "hiddenAliases": [],
2568
+ "id": "cors:add",
2569
+ "pluginAlias": "@sanity/cli",
2570
+ "pluginName": "@sanity/cli",
2571
+ "pluginType": "core",
2572
+ "strict": true,
2573
+ "isESM": true,
2574
+ "relativePath": [
2575
+ "dist",
2576
+ "commands",
2577
+ "cors",
2578
+ "add.js"
2579
+ ]
2580
+ },
2581
+ "cors:delete": {
2582
+ "aliases": [],
2583
+ "args": {
2584
+ "origin": {
2585
+ "description": "Origin to delete (will prompt if not provided)",
2586
+ "name": "origin",
2587
+ "required": false
2588
+ }
2589
+ },
2590
+ "description": "Delete a CORS origin from the project",
2591
+ "examples": [
2592
+ {
2593
+ "command": "<%= config.bin %> <%= command.id %>",
2594
+ "description": "Interactively select and delete a CORS origin"
2595
+ },
2596
+ {
2597
+ "command": "<%= config.bin %> <%= command.id %> https://example.com",
2598
+ "description": "Delete a specific CORS origin"
2599
+ },
2600
+ {
2601
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
2602
+ "description": "Delete a CORS origin from a specific project"
2603
+ }
2604
+ ],
2605
+ "flags": {
2606
+ "project": {
2607
+ "aliases": [
2608
+ "project-id"
2609
+ ],
2610
+ "char": "p",
2611
+ "deprecateAliases": true,
2612
+ "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
2613
+ "helpGroup": "OVERRIDE",
2614
+ "name": "project",
2615
+ "hasDynamicHelp": false,
2616
+ "helpValue": "<id>",
2617
+ "multiple": false,
2618
+ "type": "option"
2619
+ }
2620
+ },
2621
+ "hasDynamicHelp": false,
2622
+ "hiddenAliases": [],
2623
+ "id": "cors:delete",
2624
+ "pluginAlias": "@sanity/cli",
2625
+ "pluginName": "@sanity/cli",
2626
+ "pluginType": "core",
2627
+ "strict": true,
2628
+ "isESM": true,
2629
+ "relativePath": [
2630
+ "dist",
2631
+ "commands",
2632
+ "cors",
2633
+ "delete.js"
2634
+ ]
2635
+ },
2636
+ "cors:list": {
2637
+ "aliases": [],
2638
+ "args": {},
2639
+ "description": "List CORS origins for the project",
2640
+ "examples": [
2641
+ {
2642
+ "command": "<%= config.bin %> <%= command.id %>",
2643
+ "description": "List CORS origins for the project"
2644
+ },
2645
+ {
2646
+ "command": "<%= config.bin %> <%= command.id %> --project abc123",
2647
+ "description": "List CORS origins for a specific project"
2648
+ }
2649
+ ],
2650
+ "flags": {
2651
+ "project": {
2652
+ "aliases": [
2653
+ "project-id"
2654
+ ],
2655
+ "char": "p",
2656
+ "deprecateAliases": true,
2657
+ "description": "Project ID to list CORS origins for (overrides CLI configuration)",
2658
+ "helpGroup": "OVERRIDE",
2659
+ "name": "project",
2660
+ "hasDynamicHelp": false,
2661
+ "helpValue": "<id>",
2662
+ "multiple": false,
2663
+ "type": "option"
2664
+ }
2665
+ },
2666
+ "hasDynamicHelp": false,
2667
+ "hiddenAliases": [],
2668
+ "id": "cors:list",
2669
+ "pluginAlias": "@sanity/cli",
2670
+ "pluginName": "@sanity/cli",
2671
+ "pluginType": "core",
2672
+ "strict": true,
2673
+ "isESM": true,
2674
+ "relativePath": [
2675
+ "dist",
2676
+ "commands",
2677
+ "cors",
2678
+ "list.js"
2679
+ ]
2680
+ },
2508
2681
  "datasets:copy": {
2509
2682
  "aliases": [],
2510
2683
  "args": {
@@ -3161,67 +3334,69 @@
3161
3334
  "list.js"
3162
3335
  ]
3163
3336
  },
3164
- "cors:add": {
3337
+ "docs:browse": {
3338
+ "aliases": [],
3339
+ "args": {},
3340
+ "description": "Open Sanity docs in your browser",
3341
+ "flags": {},
3342
+ "hasDynamicHelp": false,
3343
+ "hiddenAliases": [],
3344
+ "id": "docs:browse",
3345
+ "pluginAlias": "@sanity/cli",
3346
+ "pluginName": "@sanity/cli",
3347
+ "pluginType": "core",
3348
+ "strict": true,
3349
+ "enableJsonFlag": false,
3350
+ "isESM": true,
3351
+ "relativePath": [
3352
+ "dist",
3353
+ "commands",
3354
+ "docs",
3355
+ "browse.js"
3356
+ ]
3357
+ },
3358
+ "docs:read": {
3165
3359
  "aliases": [],
3166
3360
  "args": {
3167
- "origin": {
3168
- "description": "Origin to allow (e.g., https://example.com)",
3169
- "name": "origin",
3361
+ "path": {
3362
+ "description": "Path or URL to article, found in search results and docs content as links",
3363
+ "name": "path",
3170
3364
  "required": true
3171
3365
  }
3172
3366
  },
3173
- "description": "Add a CORS origin to the project",
3367
+ "description": "Read an article in terminal",
3174
3368
  "examples": [
3175
3369
  {
3176
- "command": "<%= config.bin %> <%= command.id %>",
3177
- "description": "Interactively add a CORS origin"
3370
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
3371
+ "description": "Read as markdown in terminal"
3178
3372
  },
3179
3373
  {
3180
- "command": "<%= config.bin %> <%= command.id %> http://localhost:3000 --no-credentials",
3181
- "description": "Add a localhost origin without credentials"
3374
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
3375
+ "description": "Read using full URL"
3182
3376
  },
3183
3377
  {
3184
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --credentials",
3185
- "description": "Add a production origin with credentials allowed"
3378
+ "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
3379
+ "description": "Open in web browser"
3186
3380
  },
3187
3381
  {
3188
- "command": "<%= config.bin %> <%= command.id %> https://myapp.com --project abc123",
3189
- "description": "Add a CORS origin for a specific project"
3382
+ "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
3383
+ "description": "Open using full URL in web browser"
3190
3384
  }
3191
3385
  ],
3192
3386
  "flags": {
3193
- "project": {
3387
+ "web": {
3194
3388
  "aliases": [
3195
- "project-id"
3389
+ "w"
3196
3390
  ],
3197
- "char": "p",
3198
- "deprecateAliases": true,
3199
- "description": "Project ID to add CORS origin to (overrides CLI configuration)",
3200
- "helpGroup": "OVERRIDE",
3201
- "name": "project",
3202
- "hasDynamicHelp": false,
3203
- "helpValue": "<id>",
3204
- "multiple": false,
3205
- "type": "option"
3206
- },
3207
- "credentials": {
3208
- "description": "Allow credentials (token/cookie) to be sent from this origin",
3209
- "name": "credentials",
3210
- "required": false,
3211
- "allowNo": true,
3212
- "type": "boolean"
3213
- },
3214
- "yes": {
3215
- "char": "y",
3216
- "description": "Confirm risky wildcard origins without prompting",
3217
- "name": "yes",
3391
+ "description": "Open in a web browser",
3392
+ "name": "web",
3218
3393
  "allowNo": false,
3219
3394
  "type": "boolean"
3220
3395
  }
3221
3396
  },
3222
3397
  "hasDynamicHelp": false,
3223
3398
  "hiddenAliases": [],
3224
- "id": "cors:add",
3399
+ "id": "docs:read",
3225
3400
  "pluginAlias": "@sanity/cli",
3226
3401
  "pluginName": "@sanity/cli",
3227
3402
  "pluginType": "core",
@@ -3230,98 +3405,47 @@
3230
3405
  "relativePath": [
3231
3406
  "dist",
3232
3407
  "commands",
3233
- "cors",
3234
- "add.js"
3408
+ "docs",
3409
+ "read.js"
3235
3410
  ]
3236
3411
  },
3237
- "cors:delete": {
3412
+ "docs:search": {
3238
3413
  "aliases": [],
3239
3414
  "args": {
3240
- "origin": {
3241
- "description": "Origin to delete (will prompt if not provided)",
3242
- "name": "origin",
3243
- "required": false
3415
+ "query": {
3416
+ "description": "Search query for documentation",
3417
+ "name": "query",
3418
+ "required": true
3244
3419
  }
3245
3420
  },
3246
- "description": "Delete a CORS origin from the project",
3421
+ "description": "Search Sanity docs",
3247
3422
  "examples": [
3248
3423
  {
3249
- "command": "<%= config.bin %> <%= command.id %>",
3250
- "description": "Interactively select and delete a CORS origin"
3251
- },
3252
- {
3253
- "command": "<%= config.bin %> <%= command.id %> https://example.com",
3254
- "description": "Delete a specific CORS origin"
3424
+ "command": "<%= config.bin %> <%= command.id %> schema",
3425
+ "description": "Search for documentation about schemas"
3255
3426
  },
3256
3427
  {
3257
- "command": "<%= config.bin %> <%= command.id %> --project abc123",
3258
- "description": "Delete a CORS origin from a specific project"
3259
- }
3260
- ],
3261
- "flags": {
3262
- "project": {
3263
- "aliases": [
3264
- "project-id"
3265
- ],
3266
- "char": "p",
3267
- "deprecateAliases": true,
3268
- "description": "Project ID to delete CORS origin from (overrides CLI configuration)",
3269
- "helpGroup": "OVERRIDE",
3270
- "name": "project",
3271
- "hasDynamicHelp": false,
3272
- "helpValue": "<id>",
3273
- "multiple": false,
3274
- "type": "option"
3275
- }
3276
- },
3277
- "hasDynamicHelp": false,
3278
- "hiddenAliases": [],
3279
- "id": "cors:delete",
3280
- "pluginAlias": "@sanity/cli",
3281
- "pluginName": "@sanity/cli",
3282
- "pluginType": "core",
3283
- "strict": true,
3284
- "isESM": true,
3285
- "relativePath": [
3286
- "dist",
3287
- "commands",
3288
- "cors",
3289
- "delete.js"
3290
- ]
3291
- },
3292
- "cors:list": {
3293
- "aliases": [],
3294
- "args": {},
3295
- "description": "List CORS origins for the project",
3296
- "examples": [
3297
- {
3298
- "command": "<%= config.bin %> <%= command.id %>",
3299
- "description": "List CORS origins for the project"
3428
+ "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
3429
+ "description": "Search with phrase"
3300
3430
  },
3301
3431
  {
3302
- "command": "<%= config.bin %> <%= command.id %> --project abc123",
3303
- "description": "List CORS origins for a specific project"
3432
+ "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
3433
+ "description": "Limit search results"
3304
3434
  }
3305
3435
  ],
3306
3436
  "flags": {
3307
- "project": {
3308
- "aliases": [
3309
- "project-id"
3310
- ],
3311
- "char": "p",
3312
- "deprecateAliases": true,
3313
- "description": "Project ID to list CORS origins for (overrides CLI configuration)",
3314
- "helpGroup": "OVERRIDE",
3315
- "name": "project",
3437
+ "limit": {
3438
+ "description": "Maximum number of results to return",
3439
+ "name": "limit",
3440
+ "default": 10,
3316
3441
  "hasDynamicHelp": false,
3317
- "helpValue": "<id>",
3318
3442
  "multiple": false,
3319
3443
  "type": "option"
3320
3444
  }
3321
3445
  },
3322
3446
  "hasDynamicHelp": false,
3323
3447
  "hiddenAliases": [],
3324
- "id": "cors:list",
3448
+ "id": "docs:search",
3325
3449
  "pluginAlias": "@sanity/cli",
3326
3450
  "pluginName": "@sanity/cli",
3327
3451
  "pluginType": "core",
@@ -3330,8 +3454,8 @@
3330
3454
  "relativePath": [
3331
3455
  "dist",
3332
3456
  "commands",
3333
- "cors",
3334
- "list.js"
3457
+ "docs",
3458
+ "search.js"
3335
3459
  ]
3336
3460
  },
3337
3461
  "documents:create": {
@@ -3826,130 +3950,6 @@
3826
3950
  "validate.js"
3827
3951
  ]
3828
3952
  },
3829
- "docs:browse": {
3830
- "aliases": [],
3831
- "args": {},
3832
- "description": "Open Sanity docs in your browser",
3833
- "flags": {},
3834
- "hasDynamicHelp": false,
3835
- "hiddenAliases": [],
3836
- "id": "docs:browse",
3837
- "pluginAlias": "@sanity/cli",
3838
- "pluginName": "@sanity/cli",
3839
- "pluginType": "core",
3840
- "strict": true,
3841
- "enableJsonFlag": false,
3842
- "isESM": true,
3843
- "relativePath": [
3844
- "dist",
3845
- "commands",
3846
- "docs",
3847
- "browse.js"
3848
- ]
3849
- },
3850
- "docs:read": {
3851
- "aliases": [],
3852
- "args": {
3853
- "path": {
3854
- "description": "Path or URL to article, found in search results and docs content as links",
3855
- "name": "path",
3856
- "required": true
3857
- }
3858
- },
3859
- "description": "Read an article in terminal",
3860
- "examples": [
3861
- {
3862
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation",
3863
- "description": "Read as markdown in terminal"
3864
- },
3865
- {
3866
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation",
3867
- "description": "Read using full URL"
3868
- },
3869
- {
3870
- "command": "<%= config.bin %> <%= command.id %> /docs/studio/installation --web",
3871
- "description": "Open in web browser"
3872
- },
3873
- {
3874
- "command": "<%= config.bin %> <%= command.id %> https://www.sanity.io/docs/studio/installation -w",
3875
- "description": "Open using full URL in web browser"
3876
- }
3877
- ],
3878
- "flags": {
3879
- "web": {
3880
- "aliases": [
3881
- "w"
3882
- ],
3883
- "description": "Open in a web browser",
3884
- "name": "web",
3885
- "allowNo": false,
3886
- "type": "boolean"
3887
- }
3888
- },
3889
- "hasDynamicHelp": false,
3890
- "hiddenAliases": [],
3891
- "id": "docs:read",
3892
- "pluginAlias": "@sanity/cli",
3893
- "pluginName": "@sanity/cli",
3894
- "pluginType": "core",
3895
- "strict": true,
3896
- "isESM": true,
3897
- "relativePath": [
3898
- "dist",
3899
- "commands",
3900
- "docs",
3901
- "read.js"
3902
- ]
3903
- },
3904
- "docs:search": {
3905
- "aliases": [],
3906
- "args": {
3907
- "query": {
3908
- "description": "Search query for documentation",
3909
- "name": "query",
3910
- "required": true
3911
- }
3912
- },
3913
- "description": "Search Sanity docs",
3914
- "examples": [
3915
- {
3916
- "command": "<%= config.bin %> <%= command.id %> schema",
3917
- "description": "Search for documentation about schemas"
3918
- },
3919
- {
3920
- "command": "<%= config.bin %> <%= command.id %> \"groq functions\"",
3921
- "description": "Search with phrase"
3922
- },
3923
- {
3924
- "command": "<%= config.bin %> <%= command.id %> \"deployment\" --limit=5",
3925
- "description": "Limit search results"
3926
- }
3927
- ],
3928
- "flags": {
3929
- "limit": {
3930
- "description": "Maximum number of results to return",
3931
- "name": "limit",
3932
- "default": 10,
3933
- "hasDynamicHelp": false,
3934
- "multiple": false,
3935
- "type": "option"
3936
- }
3937
- },
3938
- "hasDynamicHelp": false,
3939
- "hiddenAliases": [],
3940
- "id": "docs:search",
3941
- "pluginAlias": "@sanity/cli",
3942
- "pluginName": "@sanity/cli",
3943
- "pluginType": "core",
3944
- "strict": true,
3945
- "isESM": true,
3946
- "relativePath": [
3947
- "dist",
3948
- "commands",
3949
- "docs",
3950
- "search.js"
3951
- ]
3952
- },
3953
3953
  "graphql:deploy": {
3954
3954
  "aliases": [],
3955
3955
  "args": {},
@@ -4539,215 +4539,35 @@
4539
4539
  "configure.js"
4540
4540
  ]
4541
4541
  },
4542
- "migrations:create": {
4542
+ "media:create-aspect": {
4543
4543
  "aliases": [],
4544
- "args": {
4545
- "title": {
4546
- "description": "Title of migration",
4547
- "name": "title",
4548
- "required": false
4549
- }
4550
- },
4551
- "description": "Create a new migration within your project",
4544
+ "args": {},
4545
+ "description": "Create a new aspect definition file",
4552
4546
  "examples": [
4553
4547
  {
4554
4548
  "command": "<%= config.bin %> <%= command.id %>",
4555
- "description": "Create a new migration, prompting for title and options"
4556
- },
4557
- {
4558
- "command": "<%= config.bin %> <%= command.id %> \"Rename field from location to address\"",
4559
- "description": "Create a new migration with the provided title, prompting for options"
4549
+ "description": "Create a new aspect definition file"
4560
4550
  }
4561
4551
  ],
4562
- "flags": {},
4552
+ "flags": {
4553
+ "name": {
4554
+ "description": "Aspect name. Defaults to the title in camel case",
4555
+ "name": "name",
4556
+ "hasDynamicHelp": false,
4557
+ "multiple": false,
4558
+ "type": "option"
4559
+ },
4560
+ "title": {
4561
+ "description": "Aspect title",
4562
+ "name": "title",
4563
+ "hasDynamicHelp": false,
4564
+ "multiple": false,
4565
+ "type": "option"
4566
+ }
4567
+ },
4563
4568
  "hasDynamicHelp": false,
4564
- "hiddenAliases": [
4565
- "migration:create"
4566
- ],
4567
- "id": "migrations:create",
4568
- "pluginAlias": "@sanity/cli",
4569
- "pluginName": "@sanity/cli",
4570
- "pluginType": "core",
4571
- "strict": true,
4572
- "isESM": true,
4573
- "relativePath": [
4574
- "dist",
4575
- "commands",
4576
- "migrations",
4577
- "create.js"
4578
- ]
4579
- },
4580
- "migrations:list": {
4581
- "aliases": [],
4582
- "args": {},
4583
- "description": "List available migrations",
4584
- "examples": [
4585
- {
4586
- "command": "<%= config.bin %> <%= command.id %>",
4587
- "description": "List all available migrations in the project"
4588
- }
4589
- ],
4590
- "flags": {},
4591
- "hasDynamicHelp": false,
4592
- "hiddenAliases": [
4593
- "migration:list"
4594
- ],
4595
- "id": "migrations:list",
4596
- "pluginAlias": "@sanity/cli",
4597
- "pluginName": "@sanity/cli",
4598
- "pluginType": "core",
4599
- "strict": true,
4600
- "isESM": true,
4601
- "relativePath": [
4602
- "dist",
4603
- "commands",
4604
- "migrations",
4605
- "list.js"
4606
- ]
4607
- },
4608
- "migrations:run": {
4609
- "aliases": [],
4610
- "args": {
4611
- "id": {
4612
- "description": "ID",
4613
- "name": "id",
4614
- "required": false
4615
- }
4616
- },
4617
- "description": "Run a migration against a dataset",
4618
- "examples": [
4619
- {
4620
- "command": "<%= config.bin %> <%= command.id %> <id>",
4621
- "description": "dry run the migration"
4622
- },
4623
- {
4624
- "command": "<%= config.bin %> <%= command.id %> <id> --no-dry-run --project xyz --dataset staging",
4625
- "description": "execute the migration against a dataset"
4626
- },
4627
- {
4628
- "command": "<%= config.bin %> <%= command.id %> <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging",
4629
- "description": "execute the migration using a dataset export as the source"
4630
- }
4631
- ],
4632
- "flags": {
4633
- "api-version": {
4634
- "description": "API version to use when migrating. Defaults to v2024-01-29.",
4635
- "name": "api-version",
4636
- "hasDynamicHelp": false,
4637
- "multiple": false,
4638
- "type": "option"
4639
- },
4640
- "concurrency": {
4641
- "description": "How many mutation requests to run in parallel. Must be between 1 and 10. Default: 6.",
4642
- "name": "concurrency",
4643
- "default": 6,
4644
- "hasDynamicHelp": false,
4645
- "multiple": false,
4646
- "type": "option"
4647
- },
4648
- "confirm": {
4649
- "description": "Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.",
4650
- "name": "confirm",
4651
- "allowNo": true,
4652
- "type": "boolean"
4653
- },
4654
- "dataset": {
4655
- "description": "Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.",
4656
- "name": "dataset",
4657
- "hasDynamicHelp": false,
4658
- "multiple": false,
4659
- "type": "option"
4660
- },
4661
- "dry-run": {
4662
- "description": "By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.",
4663
- "name": "dry-run",
4664
- "allowNo": true,
4665
- "type": "boolean"
4666
- },
4667
- "from-export": {
4668
- "description": "Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.",
4669
- "name": "from-export",
4670
- "hasDynamicHelp": false,
4671
- "multiple": false,
4672
- "type": "option"
4673
- },
4674
- "progress": {
4675
- "description": "Display progress during migration (default: true). Use --no-progress to hide output.",
4676
- "name": "progress",
4677
- "allowNo": true,
4678
- "type": "boolean"
4679
- },
4680
- "project": {
4681
- "aliases": [
4682
- "project-id"
4683
- ],
4684
- "char": "p",
4685
- "deprecateAliases": true,
4686
- "description": "Project ID of the dataset to migrate (overrides CLI configuration)",
4687
- "helpGroup": "OVERRIDE",
4688
- "name": "project",
4689
- "hasDynamicHelp": false,
4690
- "helpValue": "<id>",
4691
- "multiple": false,
4692
- "type": "option"
4693
- }
4694
- },
4695
- "hasDynamicHelp": false,
4696
- "hiddenAliases": [
4697
- "migration:run"
4698
- ],
4699
- "id": "migrations:run",
4700
- "pluginAlias": "@sanity/cli",
4701
- "pluginName": "@sanity/cli",
4702
- "pluginType": "core",
4703
- "strict": true,
4704
- "telemetry": {
4705
- "redactedFlags": [
4706
- {
4707
- "canonical": "--from-export",
4708
- "flags": [
4709
- "--from-export"
4710
- ]
4711
- }
4712
- ]
4713
- },
4714
- "isESM": true,
4715
- "relativePath": [
4716
- "dist",
4717
- "commands",
4718
- "migrations",
4719
- "run.js"
4720
- ]
4721
- },
4722
- "media:create-aspect": {
4723
- "aliases": [],
4724
- "args": {},
4725
- "description": "Create a new aspect definition file",
4726
- "examples": [
4727
- {
4728
- "command": "<%= config.bin %> <%= command.id %>",
4729
- "description": "Create a new aspect definition file"
4730
- }
4731
- ],
4732
- "flags": {
4733
- "name": {
4734
- "description": "Aspect name. Defaults to the title in camel case",
4735
- "name": "name",
4736
- "hasDynamicHelp": false,
4737
- "multiple": false,
4738
- "type": "option"
4739
- },
4740
- "title": {
4741
- "description": "Aspect title",
4742
- "name": "title",
4743
- "hasDynamicHelp": false,
4744
- "multiple": false,
4745
- "type": "option"
4746
- }
4747
- },
4748
- "hasDynamicHelp": false,
4749
- "hiddenAliases": [],
4750
- "id": "media:create-aspect",
4569
+ "hiddenAliases": [],
4570
+ "id": "media:create-aspect",
4751
4571
  "pluginAlias": "@sanity/cli",
4752
4572
  "pluginName": "@sanity/cli",
4753
4573
  "pluginType": "core",
@@ -5212,199 +5032,60 @@
5212
5032
  "pull-aspects.js"
5213
5033
  ]
5214
5034
  },
5215
- "organizations:create": {
5035
+ "migrations:create": {
5216
5036
  "aliases": [],
5217
- "args": {},
5218
- "description": "Create a new organization",
5037
+ "args": {
5038
+ "title": {
5039
+ "description": "Title of migration",
5040
+ "name": "title",
5041
+ "required": false
5042
+ }
5043
+ },
5044
+ "description": "Create a new migration within your project",
5219
5045
  "examples": [
5220
5046
  {
5221
5047
  "command": "<%= config.bin %> <%= command.id %>",
5222
- "description": "Interactively create an organization"
5223
- },
5224
- {
5225
- "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\"",
5226
- "description": "Create an organization named \"Acme Corp\""
5227
- },
5228
- {
5229
- "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --default-role member",
5230
- "description": "Create an organization with a default member role"
5048
+ "description": "Create a new migration, prompting for title and options"
5231
5049
  },
5232
5050
  {
5233
- "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --logo ./logo.png",
5234
- "description": "Create an organization with a logo"
5051
+ "command": "<%= config.bin %> <%= command.id %> \"Rename field from location to address\"",
5052
+ "description": "Create a new migration with the provided title, prompting for options"
5235
5053
  }
5236
5054
  ],
5237
- "flags": {
5238
- "default-role": {
5239
- "description": "Default role assigned to new members",
5240
- "name": "default-role",
5241
- "required": false,
5242
- "hasDynamicHelp": false,
5243
- "multiple": false,
5244
- "type": "option"
5245
- },
5246
- "logo": {
5247
- "description": "Image file to use as the logo: PNG, JPEG, GIF, WebP, SVG, BMP, TIFF, HEIF or AVIF, at most 5 MB",
5248
- "name": "logo",
5249
- "required": false,
5250
- "hasDynamicHelp": false,
5251
- "helpValue": "<path>",
5252
- "multiple": false,
5253
- "type": "option"
5254
- },
5255
- "name": {
5256
- "description": "Organization name",
5257
- "name": "name",
5258
- "hasDynamicHelp": false,
5259
- "multiple": false,
5260
- "type": "option"
5261
- }
5262
- },
5055
+ "flags": {},
5263
5056
  "hasDynamicHelp": false,
5264
5057
  "hiddenAliases": [
5265
- "organization:create",
5266
- "organisations:create",
5267
- "organisation:create",
5268
- "org:create",
5269
- "orgs:create"
5058
+ "migration:create"
5270
5059
  ],
5271
- "id": "organizations:create",
5060
+ "id": "migrations:create",
5272
5061
  "pluginAlias": "@sanity/cli",
5273
5062
  "pluginName": "@sanity/cli",
5274
5063
  "pluginType": "core",
5275
5064
  "strict": true,
5276
- "telemetry": {
5277
- "redactedFlags": [
5278
- {
5279
- "canonical": "--logo",
5280
- "flags": [
5281
- "--logo"
5282
- ]
5283
- },
5284
- {
5285
- "canonical": "--name",
5286
- "flags": [
5287
- "--name"
5288
- ]
5289
- }
5290
- ]
5291
- },
5292
5065
  "isESM": true,
5293
5066
  "relativePath": [
5294
5067
  "dist",
5295
5068
  "commands",
5296
- "organizations",
5069
+ "migrations",
5297
5070
  "create.js"
5298
5071
  ]
5299
5072
  },
5300
- "organizations:delete": {
5301
- "aliases": [],
5302
- "args": {
5303
- "organizationId": {
5304
- "description": "Organization ID to delete",
5305
- "name": "organizationId",
5306
- "required": true
5307
- }
5308
- },
5309
- "description": "Delete an organization",
5310
- "examples": [
5311
- {
5312
- "command": "<%= config.bin %> <%= command.id %> org-abc123",
5313
- "description": "Delete an organization (prompts for confirmation)"
5314
- },
5315
- {
5316
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --force",
5317
- "description": "Delete an organization without confirmation"
5318
- }
5319
- ],
5320
- "flags": {
5321
- "force": {
5322
- "description": "Do not prompt for delete confirmation - forcefully delete",
5323
- "name": "force",
5324
- "required": false,
5325
- "allowNo": false,
5326
- "type": "boolean"
5327
- }
5328
- },
5329
- "hasDynamicHelp": false,
5330
- "hiddenAliases": [
5331
- "organization:delete",
5332
- "organisations:delete",
5333
- "organisation:delete",
5334
- "org:delete",
5335
- "orgs:delete"
5336
- ],
5337
- "id": "organizations:delete",
5338
- "pluginAlias": "@sanity/cli",
5339
- "pluginName": "@sanity/cli",
5340
- "pluginType": "core",
5341
- "strict": true,
5342
- "isESM": true,
5343
- "relativePath": [
5344
- "dist",
5345
- "commands",
5346
- "organizations",
5347
- "delete.js"
5348
- ]
5349
- },
5350
- "organizations:get": {
5351
- "aliases": [],
5352
- "args": {
5353
- "organizationId": {
5354
- "description": "Organization ID",
5355
- "name": "organizationId",
5356
- "required": true
5357
- }
5358
- },
5359
- "description": "Get details of an organization",
5360
- "examples": [
5361
- {
5362
- "command": "<%= config.bin %> <%= command.id %> org-abc123",
5363
- "description": "Get details of a specific organization"
5364
- }
5365
- ],
5366
- "flags": {},
5367
- "hasDynamicHelp": false,
5368
- "hiddenAliases": [
5369
- "organization:get",
5370
- "organisations:get",
5371
- "organisation:get",
5372
- "org:get",
5373
- "orgs:get"
5374
- ],
5375
- "id": "organizations:get",
5376
- "pluginAlias": "@sanity/cli",
5377
- "pluginName": "@sanity/cli",
5378
- "pluginType": "core",
5379
- "strict": true,
5380
- "isESM": true,
5381
- "relativePath": [
5382
- "dist",
5383
- "commands",
5384
- "organizations",
5385
- "get.js"
5386
- ]
5387
- },
5388
- "organizations:list": {
5073
+ "migrations:list": {
5389
5074
  "aliases": [],
5390
5075
  "args": {},
5391
- "description": "List organizations you are a member of",
5076
+ "description": "List available migrations",
5392
5077
  "examples": [
5393
5078
  {
5394
5079
  "command": "<%= config.bin %> <%= command.id %>",
5395
- "description": "List all your organizations"
5080
+ "description": "List all available migrations in the project"
5396
5081
  }
5397
5082
  ],
5398
5083
  "flags": {},
5399
5084
  "hasDynamicHelp": false,
5400
5085
  "hiddenAliases": [
5401
- "organization:list",
5402
- "organisations:list",
5403
- "organisation:list",
5404
- "org:list",
5405
- "orgs:list"
5086
+ "migration:list"
5406
5087
  ],
5407
- "id": "organizations:list",
5088
+ "id": "migrations:list",
5408
5089
  "pluginAlias": "@sanity/cli",
5409
5090
  "pluginName": "@sanity/cli",
5410
5091
  "pluginType": "core",
@@ -5413,86 +5094,102 @@
5413
5094
  "relativePath": [
5414
5095
  "dist",
5415
5096
  "commands",
5416
- "organizations",
5097
+ "migrations",
5417
5098
  "list.js"
5418
5099
  ]
5419
5100
  },
5420
- "organizations:update": {
5101
+ "migrations:run": {
5421
5102
  "aliases": [],
5422
5103
  "args": {
5423
- "organizationId": {
5424
- "description": "Organization ID",
5425
- "name": "organizationId",
5426
- "required": true
5104
+ "id": {
5105
+ "description": "ID",
5106
+ "name": "id",
5107
+ "required": false
5427
5108
  }
5428
5109
  },
5429
- "description": "Update an organization",
5110
+ "description": "Run a migration against a dataset",
5430
5111
  "examples": [
5431
5112
  {
5432
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --name \"New Name\"",
5433
- "description": "Rename an organization"
5434
- },
5435
- {
5436
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --slug new-slug",
5437
- "description": "Set the organization slug (requires authSAML feature)"
5438
- },
5439
- {
5440
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --default-role viewer",
5441
- "description": "Change the default member role"
5113
+ "command": "<%= config.bin %> <%= command.id %> <id>",
5114
+ "description": "dry run the migration"
5442
5115
  },
5443
5116
  {
5444
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --logo ./logo.png",
5445
- "description": "Set or replace the organization logo"
5117
+ "command": "<%= config.bin %> <%= command.id %> <id> --no-dry-run --project xyz --dataset staging",
5118
+ "description": "execute the migration against a dataset"
5446
5119
  },
5447
5120
  {
5448
- "command": "<%= config.bin %> <%= command.id %> org-abc123 --logo \"\"",
5449
- "description": "Remove the organization logo"
5121
+ "command": "<%= config.bin %> <%= command.id %> <id> --from-export=production.tar.gz --no-dry-run --project xyz --dataset staging",
5122
+ "description": "execute the migration using a dataset export as the source"
5450
5123
  }
5451
5124
  ],
5452
5125
  "flags": {
5453
- "default-role": {
5454
- "description": "New default role for new members",
5455
- "name": "default-role",
5456
- "required": false,
5126
+ "api-version": {
5127
+ "description": "API version to use when migrating. Defaults to v2024-01-29.",
5128
+ "name": "api-version",
5457
5129
  "hasDynamicHelp": false,
5458
5130
  "multiple": false,
5459
5131
  "type": "option"
5460
5132
  },
5461
- "logo": {
5462
- "description": "Image file to use as the logo: PNG, JPEG, GIF, WebP, SVG, BMP, TIFF, HEIF or AVIF, at most 5 MB (\"\" removes it)",
5463
- "name": "logo",
5464
- "required": false,
5133
+ "concurrency": {
5134
+ "description": "How many mutation requests to run in parallel. Must be between 1 and 10. Default: 6.",
5135
+ "name": "concurrency",
5136
+ "default": 6,
5465
5137
  "hasDynamicHelp": false,
5466
- "helpValue": "<path>",
5467
5138
  "multiple": false,
5468
5139
  "type": "option"
5469
5140
  },
5470
- "name": {
5471
- "description": "New organization name",
5472
- "name": "name",
5473
- "required": false,
5141
+ "confirm": {
5142
+ "description": "Prompt for confirmation before running the migration (default: true). Use --no-confirm to skip.",
5143
+ "name": "confirm",
5144
+ "allowNo": true,
5145
+ "type": "boolean"
5146
+ },
5147
+ "dataset": {
5148
+ "description": "Dataset to migrate. Defaults to the dataset configured in your Sanity CLI config.",
5149
+ "name": "dataset",
5474
5150
  "hasDynamicHelp": false,
5475
5151
  "multiple": false,
5476
5152
  "type": "option"
5477
5153
  },
5478
- "slug": {
5479
- "description": "New URL slug (requires authSAML feature on the organization)",
5480
- "name": "slug",
5481
- "required": false,
5154
+ "dry-run": {
5155
+ "description": "By default the migration runs in dry mode. Use --no-dry-run to migrate dataset.",
5156
+ "name": "dry-run",
5157
+ "allowNo": true,
5158
+ "type": "boolean"
5159
+ },
5160
+ "from-export": {
5161
+ "description": "Use a local dataset export as source for migration instead of calling the Sanity API. Note: this is only supported for dry runs.",
5162
+ "name": "from-export",
5163
+ "hasDynamicHelp": false,
5164
+ "multiple": false,
5165
+ "type": "option"
5166
+ },
5167
+ "progress": {
5168
+ "description": "Display progress during migration (default: true). Use --no-progress to hide output.",
5169
+ "name": "progress",
5170
+ "allowNo": true,
5171
+ "type": "boolean"
5172
+ },
5173
+ "project": {
5174
+ "aliases": [
5175
+ "project-id"
5176
+ ],
5177
+ "char": "p",
5178
+ "deprecateAliases": true,
5179
+ "description": "Project ID of the dataset to migrate (overrides CLI configuration)",
5180
+ "helpGroup": "OVERRIDE",
5181
+ "name": "project",
5482
5182
  "hasDynamicHelp": false,
5183
+ "helpValue": "<id>",
5483
5184
  "multiple": false,
5484
5185
  "type": "option"
5485
5186
  }
5486
5187
  },
5487
5188
  "hasDynamicHelp": false,
5488
5189
  "hiddenAliases": [
5489
- "organization:update",
5490
- "organisations:update",
5491
- "organisation:update",
5492
- "org:update",
5493
- "orgs:update"
5190
+ "migration:run"
5494
5191
  ],
5495
- "id": "organizations:update",
5192
+ "id": "migrations:run",
5496
5193
  "pluginAlias": "@sanity/cli",
5497
5194
  "pluginName": "@sanity/cli",
5498
5195
  "pluginType": "core",
@@ -5500,15 +5197,9 @@
5500
5197
  "telemetry": {
5501
5198
  "redactedFlags": [
5502
5199
  {
5503
- "canonical": "--logo",
5504
- "flags": [
5505
- "--logo"
5506
- ]
5507
- },
5508
- {
5509
- "canonical": "--name",
5200
+ "canonical": "--from-export",
5510
5201
  "flags": [
5511
- "--name"
5202
+ "--from-export"
5512
5203
  ]
5513
5204
  }
5514
5205
  ]
@@ -5517,8 +5208,8 @@
5517
5208
  "relativePath": [
5518
5209
  "dist",
5519
5210
  "commands",
5520
- "organizations",
5521
- "update.js"
5211
+ "migrations",
5212
+ "run.js"
5522
5213
  ]
5523
5214
  },
5524
5215
  "openapi:get": {
@@ -5635,44 +5326,353 @@
5635
5326
  "list.js"
5636
5327
  ]
5637
5328
  },
5638
- "projects:create": {
5329
+ "organizations:create": {
5639
5330
  "aliases": [],
5640
- "args": {
5641
- "projectName": {
5642
- "description": "Name of the project to create",
5643
- "name": "projectName",
5644
- "required": false
5645
- }
5646
- },
5647
- "description": "Create a new Sanity project",
5331
+ "args": {},
5332
+ "description": "Create a new organization",
5648
5333
  "examples": [
5649
5334
  {
5650
5335
  "command": "<%= config.bin %> <%= command.id %>",
5651
- "description": "Interactively create a project"
5652
- },
5653
- {
5654
- "command": "<%= config.bin %> <%= command.id %> \"My New Project\"",
5655
- "description": "Create a project named \"My New Project\""
5656
- },
5657
- {
5658
- "command": "<%= config.bin %> <%= command.id %> \"My Project\" --organization=my-org",
5659
- "description": "Create a project in a specific organization"
5336
+ "description": "Interactively create an organization"
5660
5337
  },
5661
5338
  {
5662
- "command": "<%= config.bin %> <%= command.id %> \"My Project\" --dataset=staging --dataset-visibility=private",
5663
- "description": "Create a project with a private dataset named \"staging\""
5339
+ "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\"",
5340
+ "description": "Create an organization named \"Acme Corp\""
5664
5341
  },
5665
5342
  {
5666
- "command": "<%= config.bin %> <%= command.id %> \"My Project\" --logo ./logo.png",
5667
- "description": "Create a project with a logo"
5343
+ "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --default-role member",
5344
+ "description": "Create an organization with a default member role"
5668
5345
  },
5669
5346
  {
5670
- "command": "<%= config.bin %> <%= command.id %> \"CI Project\" --yes --json",
5671
- "description": "Create a project non-interactively with JSON output"
5347
+ "command": "<%= config.bin %> <%= command.id %> --name \"Acme Corp\" --logo ./logo.png",
5348
+ "description": "Create an organization with a logo"
5672
5349
  }
5673
5350
  ],
5674
5351
  "flags": {
5675
- "json": {
5352
+ "default-role": {
5353
+ "description": "Default role assigned to new members",
5354
+ "name": "default-role",
5355
+ "required": false,
5356
+ "hasDynamicHelp": false,
5357
+ "multiple": false,
5358
+ "type": "option"
5359
+ },
5360
+ "logo": {
5361
+ "description": "Image file to use as the logo: PNG, JPEG, GIF, WebP, SVG, BMP, TIFF, HEIF or AVIF, at most 5 MB",
5362
+ "name": "logo",
5363
+ "required": false,
5364
+ "hasDynamicHelp": false,
5365
+ "helpValue": "<path>",
5366
+ "multiple": false,
5367
+ "type": "option"
5368
+ },
5369
+ "name": {
5370
+ "description": "Organization name",
5371
+ "name": "name",
5372
+ "hasDynamicHelp": false,
5373
+ "multiple": false,
5374
+ "type": "option"
5375
+ }
5376
+ },
5377
+ "hasDynamicHelp": false,
5378
+ "hiddenAliases": [
5379
+ "organization:create",
5380
+ "organisations:create",
5381
+ "organisation:create",
5382
+ "org:create",
5383
+ "orgs:create"
5384
+ ],
5385
+ "id": "organizations:create",
5386
+ "pluginAlias": "@sanity/cli",
5387
+ "pluginName": "@sanity/cli",
5388
+ "pluginType": "core",
5389
+ "strict": true,
5390
+ "telemetry": {
5391
+ "redactedFlags": [
5392
+ {
5393
+ "canonical": "--logo",
5394
+ "flags": [
5395
+ "--logo"
5396
+ ]
5397
+ },
5398
+ {
5399
+ "canonical": "--name",
5400
+ "flags": [
5401
+ "--name"
5402
+ ]
5403
+ }
5404
+ ]
5405
+ },
5406
+ "isESM": true,
5407
+ "relativePath": [
5408
+ "dist",
5409
+ "commands",
5410
+ "organizations",
5411
+ "create.js"
5412
+ ]
5413
+ },
5414
+ "organizations:delete": {
5415
+ "aliases": [],
5416
+ "args": {
5417
+ "organizationId": {
5418
+ "description": "Organization ID to delete",
5419
+ "name": "organizationId",
5420
+ "required": true
5421
+ }
5422
+ },
5423
+ "description": "Delete an organization",
5424
+ "examples": [
5425
+ {
5426
+ "command": "<%= config.bin %> <%= command.id %> org-abc123",
5427
+ "description": "Delete an organization (prompts for confirmation)"
5428
+ },
5429
+ {
5430
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --force",
5431
+ "description": "Delete an organization without confirmation"
5432
+ }
5433
+ ],
5434
+ "flags": {
5435
+ "force": {
5436
+ "description": "Do not prompt for delete confirmation - forcefully delete",
5437
+ "name": "force",
5438
+ "required": false,
5439
+ "allowNo": false,
5440
+ "type": "boolean"
5441
+ }
5442
+ },
5443
+ "hasDynamicHelp": false,
5444
+ "hiddenAliases": [
5445
+ "organization:delete",
5446
+ "organisations:delete",
5447
+ "organisation:delete",
5448
+ "org:delete",
5449
+ "orgs:delete"
5450
+ ],
5451
+ "id": "organizations:delete",
5452
+ "pluginAlias": "@sanity/cli",
5453
+ "pluginName": "@sanity/cli",
5454
+ "pluginType": "core",
5455
+ "strict": true,
5456
+ "isESM": true,
5457
+ "relativePath": [
5458
+ "dist",
5459
+ "commands",
5460
+ "organizations",
5461
+ "delete.js"
5462
+ ]
5463
+ },
5464
+ "organizations:get": {
5465
+ "aliases": [],
5466
+ "args": {
5467
+ "organizationId": {
5468
+ "description": "Organization ID",
5469
+ "name": "organizationId",
5470
+ "required": true
5471
+ }
5472
+ },
5473
+ "description": "Get details of an organization",
5474
+ "examples": [
5475
+ {
5476
+ "command": "<%= config.bin %> <%= command.id %> org-abc123",
5477
+ "description": "Get details of a specific organization"
5478
+ }
5479
+ ],
5480
+ "flags": {},
5481
+ "hasDynamicHelp": false,
5482
+ "hiddenAliases": [
5483
+ "organization:get",
5484
+ "organisations:get",
5485
+ "organisation:get",
5486
+ "org:get",
5487
+ "orgs:get"
5488
+ ],
5489
+ "id": "organizations:get",
5490
+ "pluginAlias": "@sanity/cli",
5491
+ "pluginName": "@sanity/cli",
5492
+ "pluginType": "core",
5493
+ "strict": true,
5494
+ "isESM": true,
5495
+ "relativePath": [
5496
+ "dist",
5497
+ "commands",
5498
+ "organizations",
5499
+ "get.js"
5500
+ ]
5501
+ },
5502
+ "organizations:list": {
5503
+ "aliases": [],
5504
+ "args": {},
5505
+ "description": "List organizations you are a member of",
5506
+ "examples": [
5507
+ {
5508
+ "command": "<%= config.bin %> <%= command.id %>",
5509
+ "description": "List all your organizations"
5510
+ }
5511
+ ],
5512
+ "flags": {},
5513
+ "hasDynamicHelp": false,
5514
+ "hiddenAliases": [
5515
+ "organization:list",
5516
+ "organisations:list",
5517
+ "organisation:list",
5518
+ "org:list",
5519
+ "orgs:list"
5520
+ ],
5521
+ "id": "organizations:list",
5522
+ "pluginAlias": "@sanity/cli",
5523
+ "pluginName": "@sanity/cli",
5524
+ "pluginType": "core",
5525
+ "strict": true,
5526
+ "isESM": true,
5527
+ "relativePath": [
5528
+ "dist",
5529
+ "commands",
5530
+ "organizations",
5531
+ "list.js"
5532
+ ]
5533
+ },
5534
+ "organizations:update": {
5535
+ "aliases": [],
5536
+ "args": {
5537
+ "organizationId": {
5538
+ "description": "Organization ID",
5539
+ "name": "organizationId",
5540
+ "required": true
5541
+ }
5542
+ },
5543
+ "description": "Update an organization",
5544
+ "examples": [
5545
+ {
5546
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --name \"New Name\"",
5547
+ "description": "Rename an organization"
5548
+ },
5549
+ {
5550
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --slug new-slug",
5551
+ "description": "Set the organization slug (requires authSAML feature)"
5552
+ },
5553
+ {
5554
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --default-role viewer",
5555
+ "description": "Change the default member role"
5556
+ },
5557
+ {
5558
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --logo ./logo.png",
5559
+ "description": "Set or replace the organization logo"
5560
+ },
5561
+ {
5562
+ "command": "<%= config.bin %> <%= command.id %> org-abc123 --logo \"\"",
5563
+ "description": "Remove the organization logo"
5564
+ }
5565
+ ],
5566
+ "flags": {
5567
+ "default-role": {
5568
+ "description": "New default role for new members",
5569
+ "name": "default-role",
5570
+ "required": false,
5571
+ "hasDynamicHelp": false,
5572
+ "multiple": false,
5573
+ "type": "option"
5574
+ },
5575
+ "logo": {
5576
+ "description": "Image file to use as the logo: PNG, JPEG, GIF, WebP, SVG, BMP, TIFF, HEIF or AVIF, at most 5 MB (\"\" removes it)",
5577
+ "name": "logo",
5578
+ "required": false,
5579
+ "hasDynamicHelp": false,
5580
+ "helpValue": "<path>",
5581
+ "multiple": false,
5582
+ "type": "option"
5583
+ },
5584
+ "name": {
5585
+ "description": "New organization name",
5586
+ "name": "name",
5587
+ "required": false,
5588
+ "hasDynamicHelp": false,
5589
+ "multiple": false,
5590
+ "type": "option"
5591
+ },
5592
+ "slug": {
5593
+ "description": "New URL slug (requires authSAML feature on the organization)",
5594
+ "name": "slug",
5595
+ "required": false,
5596
+ "hasDynamicHelp": false,
5597
+ "multiple": false,
5598
+ "type": "option"
5599
+ }
5600
+ },
5601
+ "hasDynamicHelp": false,
5602
+ "hiddenAliases": [
5603
+ "organization:update",
5604
+ "organisations:update",
5605
+ "organisation:update",
5606
+ "org:update",
5607
+ "orgs:update"
5608
+ ],
5609
+ "id": "organizations:update",
5610
+ "pluginAlias": "@sanity/cli",
5611
+ "pluginName": "@sanity/cli",
5612
+ "pluginType": "core",
5613
+ "strict": true,
5614
+ "telemetry": {
5615
+ "redactedFlags": [
5616
+ {
5617
+ "canonical": "--logo",
5618
+ "flags": [
5619
+ "--logo"
5620
+ ]
5621
+ },
5622
+ {
5623
+ "canonical": "--name",
5624
+ "flags": [
5625
+ "--name"
5626
+ ]
5627
+ }
5628
+ ]
5629
+ },
5630
+ "isESM": true,
5631
+ "relativePath": [
5632
+ "dist",
5633
+ "commands",
5634
+ "organizations",
5635
+ "update.js"
5636
+ ]
5637
+ },
5638
+ "projects:create": {
5639
+ "aliases": [],
5640
+ "args": {
5641
+ "projectName": {
5642
+ "description": "Name of the project to create",
5643
+ "name": "projectName",
5644
+ "required": false
5645
+ }
5646
+ },
5647
+ "description": "Create a new Sanity project",
5648
+ "examples": [
5649
+ {
5650
+ "command": "<%= config.bin %> <%= command.id %>",
5651
+ "description": "Interactively create a project"
5652
+ },
5653
+ {
5654
+ "command": "<%= config.bin %> <%= command.id %> \"My New Project\"",
5655
+ "description": "Create a project named \"My New Project\""
5656
+ },
5657
+ {
5658
+ "command": "<%= config.bin %> <%= command.id %> \"My Project\" --organization=my-org",
5659
+ "description": "Create a project in a specific organization"
5660
+ },
5661
+ {
5662
+ "command": "<%= config.bin %> <%= command.id %> \"My Project\" --dataset=staging --dataset-visibility=private",
5663
+ "description": "Create a project with a private dataset named \"staging\""
5664
+ },
5665
+ {
5666
+ "command": "<%= config.bin %> <%= command.id %> \"My Project\" --logo ./logo.png",
5667
+ "description": "Create a project with a logo"
5668
+ },
5669
+ {
5670
+ "command": "<%= config.bin %> <%= command.id %> \"CI Project\" --yes --json",
5671
+ "description": "Create a project non-interactively with JSON output"
5672
+ }
5673
+ ],
5674
+ "flags": {
5675
+ "json": {
5676
5676
  "description": "Format output as json.",
5677
5677
  "helpGroup": "GLOBAL",
5678
5678
  "name": "json",
@@ -7359,56 +7359,220 @@
7359
7359
  },
7360
7360
  "hasDynamicHelp": false,
7361
7361
  "hiddenAliases": [],
7362
- "id": "context:documents:list",
7362
+ "id": "context:documents:list",
7363
+ "pluginAlias": "@sanity/cli",
7364
+ "pluginName": "@sanity/cli",
7365
+ "pluginType": "core",
7366
+ "strict": true,
7367
+ "summary": "List documents",
7368
+ "enableJsonFlag": true,
7369
+ "telemetry": {
7370
+ "redactedFlags": [
7371
+ {
7372
+ "canonical": "--source",
7373
+ "flags": [
7374
+ "--source"
7375
+ ]
7376
+ },
7377
+ {
7378
+ "canonical": "--ids",
7379
+ "flags": [
7380
+ "--ids"
7381
+ ]
7382
+ }
7383
+ ]
7384
+ },
7385
+ "isESM": true,
7386
+ "relativePath": [
7387
+ "dist",
7388
+ "commands",
7389
+ "context",
7390
+ "documents",
7391
+ "list.js"
7392
+ ]
7393
+ },
7394
+ "context:entries:get": {
7395
+ "aliases": [],
7396
+ "args": {
7397
+ "knowledgeBaseId": {
7398
+ "description": "Knowledge base ID",
7399
+ "name": "knowledgeBaseId",
7400
+ "required": true
7401
+ },
7402
+ "path": {
7403
+ "description": "Entry path, as listed by `sanity context entries list`",
7404
+ "name": "path",
7405
+ "required": true
7406
+ }
7407
+ },
7408
+ "description": "Get an entry and its content",
7409
+ "examples": [
7410
+ {
7411
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 billing/refunds",
7412
+ "description": "Print an entry and its content"
7413
+ },
7414
+ {
7415
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 billing/refunds --json",
7416
+ "description": "Output the entry, including citations, as JSON"
7417
+ }
7418
+ ],
7419
+ "flags": {
7420
+ "json": {
7421
+ "description": "Format output as json.",
7422
+ "helpGroup": "GLOBAL",
7423
+ "name": "json",
7424
+ "allowNo": false,
7425
+ "type": "boolean"
7426
+ }
7427
+ },
7428
+ "hasDynamicHelp": false,
7429
+ "hiddenAliases": [],
7430
+ "id": "context:entries:get",
7431
+ "pluginAlias": "@sanity/cli",
7432
+ "pluginName": "@sanity/cli",
7433
+ "pluginType": "core",
7434
+ "strict": true,
7435
+ "enableJsonFlag": true,
7436
+ "isESM": true,
7437
+ "relativePath": [
7438
+ "dist",
7439
+ "commands",
7440
+ "context",
7441
+ "entries",
7442
+ "get.js"
7443
+ ]
7444
+ },
7445
+ "context:entries:list": {
7446
+ "aliases": [],
7447
+ "args": {
7448
+ "knowledgeBaseId": {
7449
+ "description": "Knowledge base ID",
7450
+ "name": "knowledgeBaseId",
7451
+ "required": true
7452
+ }
7453
+ },
7454
+ "description": "List the entries a knowledge base build produced",
7455
+ "examples": [
7456
+ {
7457
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
7458
+ "description": "List all entries for a knowledge base"
7459
+ },
7460
+ {
7461
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
7462
+ "description": "Output entries as JSON"
7463
+ }
7464
+ ],
7465
+ "flags": {
7466
+ "json": {
7467
+ "description": "Format output as json.",
7468
+ "helpGroup": "GLOBAL",
7469
+ "name": "json",
7470
+ "allowNo": false,
7471
+ "type": "boolean"
7472
+ }
7473
+ },
7474
+ "hasDynamicHelp": false,
7475
+ "hiddenAliases": [],
7476
+ "id": "context:entries:list",
7477
+ "pluginAlias": "@sanity/cli",
7478
+ "pluginName": "@sanity/cli",
7479
+ "pluginType": "core",
7480
+ "strict": true,
7481
+ "enableJsonFlag": true,
7482
+ "isESM": true,
7483
+ "relativePath": [
7484
+ "dist",
7485
+ "commands",
7486
+ "context",
7487
+ "entries",
7488
+ "list.js"
7489
+ ]
7490
+ },
7491
+ "context:entries:rebuild": {
7492
+ "aliases": [],
7493
+ "args": {
7494
+ "knowledgeBaseId": {
7495
+ "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7496
+ "name": "knowledgeBaseId",
7497
+ "required": true
7498
+ },
7499
+ "entryPath": {
7500
+ "description": "The entry's slash-delimited path, such as `pricing/plans/free`, URL-encoded.",
7501
+ "name": "entryPath",
7502
+ "required": true
7503
+ }
7504
+ },
7505
+ "description": "Queues a rewrite of the entry at `entryPath` from its cited sources and the active instructions, and returns a job ID immediately. The response also lists the other entries built from any of the same sources. An instruction applies to every entry built from its sources, so those entries can change too. Returns `422` with code `entryDocumentInvalid` if the entry document was edited into a shape the API cannot read.",
7506
+ "examples": [
7507
+ {
7508
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <entryPath>",
7509
+ "description": "Rebuild an entry from its sources"
7510
+ },
7511
+ {
7512
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <entryPath> --json",
7513
+ "description": "Rebuild an entry from its sources, as JSON"
7514
+ }
7515
+ ],
7516
+ "flags": {
7517
+ "json": {
7518
+ "description": "Format output as json.",
7519
+ "helpGroup": "GLOBAL",
7520
+ "name": "json",
7521
+ "allowNo": false,
7522
+ "type": "boolean"
7523
+ },
7524
+ "watch": {
7525
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
7526
+ "name": "watch",
7527
+ "allowNo": false,
7528
+ "type": "boolean"
7529
+ }
7530
+ },
7531
+ "hasDynamicHelp": false,
7532
+ "hiddenAliases": [],
7533
+ "id": "context:entries:rebuild",
7363
7534
  "pluginAlias": "@sanity/cli",
7364
7535
  "pluginName": "@sanity/cli",
7365
7536
  "pluginType": "core",
7366
7537
  "strict": true,
7367
- "summary": "List documents",
7538
+ "summary": "Rebuild an entry from its sources",
7368
7539
  "enableJsonFlag": true,
7369
7540
  "telemetry": {
7370
- "redactedFlags": [
7371
- {
7372
- "canonical": "--source",
7373
- "flags": [
7374
- "--source"
7375
- ]
7376
- },
7377
- {
7378
- "canonical": "--ids",
7379
- "flags": [
7380
- "--ids"
7381
- ]
7382
- }
7383
- ]
7541
+ "redactedFlags": []
7384
7542
  },
7385
7543
  "isESM": true,
7386
7544
  "relativePath": [
7387
7545
  "dist",
7388
7546
  "commands",
7389
7547
  "context",
7390
- "documents",
7391
- "list.js"
7548
+ "entries",
7549
+ "rebuild.js"
7392
7550
  ]
7393
7551
  },
7394
- "context:instructions:create": {
7552
+ "context:issues:apply": {
7395
7553
  "aliases": [],
7396
7554
  "args": {
7397
7555
  "knowledgeBaseId": {
7398
7556
  "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7399
7557
  "name": "knowledgeBaseId",
7400
7558
  "required": true
7559
+ },
7560
+ "issueIds": {
7561
+ "description": "The IDs of the issues to accept and apply.",
7562
+ "multiple": true,
7563
+ "name": "issueIds",
7564
+ "required": true
7401
7565
  }
7402
7566
  },
7403
- "description": "Creates a standing instruction for how entries built from its documents are written. Every instruction applies to specific documents, set in `scopeDocumentIds`. To rebuild entries under the new instruction right away, pass their paths in `rebuildPaths`. The response includes the rebuild job ID, or `null` if the rebuild could not start. The instruction is saved either way. After the instruction is saved, a background check files issues for entries that contradict it. If you already checked the instruction for contradictions, set `verified` to skip the background check. If the requested rebuild does not start, the background check runs even when `verified` is set.",
7567
+ "description": "Accepts the issues in `issueIds`, then queues a job that applies them, rewrites the affected entries, and saves a new revision. Returns a job ID. IDs of issues that no longer exist are skipped. Returns `409` with code `issueNotAutoApplicable`, and accepts none of the issues, if any of them cannot be applied: a `conflict` (resolve it with `POST .../issues/{issueId}/resolve`), or an `update_required` issue whose `scopePath` is `*` or names an entry that no longer exists. Dismiss those instead.",
7404
7568
  "examples": [
7405
7569
  {
7406
7570
  "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId>",
7407
- "description": "Create an instruction"
7571
+ "description": "Accept and apply issues"
7408
7572
  },
7409
7573
  {
7410
7574
  "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> --json",
7411
- "description": "Create an instruction, as JSON"
7575
+ "description": "Accept and apply issues, as JSON"
7412
7576
  }
7413
7577
  ],
7414
7578
  "flags": {
@@ -7419,77 +7583,35 @@
7419
7583
  "allowNo": false,
7420
7584
  "type": "boolean"
7421
7585
  },
7422
- "statement": {
7423
- "description": "The instruction in plain language. Builds follow it over what the sources say.",
7424
- "name": "statement",
7425
- "required": true,
7426
- "hasDynamicHelp": false,
7427
- "multiple": false,
7428
- "type": "option"
7429
- },
7430
- "scope-document-ids": {
7431
- "description": "IDs of the documents the instruction applies to. Builds apply it when they write entries built from these documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
7432
- "name": "scope-document-ids",
7433
- "required": true,
7434
- "hasDynamicHelp": false,
7435
- "multiple": true,
7436
- "type": "option"
7437
- },
7438
- "rebuild-paths": {
7439
- "description": "Paths of entries to rebuild under the new instruction right away. The response returns the rebuild job ID in `rebuildJobId`.",
7440
- "name": "rebuild-paths",
7441
- "hasDynamicHelp": false,
7442
- "multiple": true,
7443
- "type": "option"
7444
- },
7445
- "verified": {
7446
- "description": "Whether you already checked the instruction for entries that contradict it. When `true`, the background check that files issues for those entries is skipped. It still runs if the rebuild you requested in `rebuildPaths` does not start.",
7447
- "name": "verified",
7448
- "allowNo": true,
7586
+ "watch": {
7587
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
7588
+ "name": "watch",
7589
+ "allowNo": false,
7449
7590
  "type": "boolean"
7450
7591
  }
7451
7592
  },
7452
7593
  "hasDynamicHelp": false,
7453
7594
  "hiddenAliases": [],
7454
- "id": "context:instructions:create",
7595
+ "id": "context:issues:apply",
7455
7596
  "pluginAlias": "@sanity/cli",
7456
7597
  "pluginName": "@sanity/cli",
7457
7598
  "pluginType": "core",
7458
7599
  "strict": true,
7459
- "summary": "Create an instruction",
7600
+ "summary": "Accept and apply issues",
7460
7601
  "enableJsonFlag": true,
7461
7602
  "telemetry": {
7462
- "redactedFlags": [
7463
- {
7464
- "canonical": "--statement",
7465
- "flags": [
7466
- "--statement"
7467
- ]
7468
- },
7469
- {
7470
- "canonical": "--scope-document-ids",
7471
- "flags": [
7472
- "--scope-document-ids"
7473
- ]
7474
- },
7475
- {
7476
- "canonical": "--rebuild-paths",
7477
- "flags": [
7478
- "--rebuild-paths"
7479
- ]
7480
- }
7481
- ]
7603
+ "redactedFlags": []
7482
7604
  },
7483
7605
  "isESM": true,
7484
7606
  "relativePath": [
7485
7607
  "dist",
7486
7608
  "commands",
7487
7609
  "context",
7488
- "instructions",
7489
- "create.js"
7610
+ "issues",
7611
+ "apply.js"
7490
7612
  ]
7491
7613
  },
7492
- "context:instructions:delete": {
7614
+ "context:issues:dismiss": {
7493
7615
  "aliases": [],
7494
7616
  "args": {
7495
7617
  "knowledgeBaseId": {
@@ -7497,21 +7619,21 @@
7497
7619
  "name": "knowledgeBaseId",
7498
7620
  "required": true
7499
7621
  },
7500
- "instructionId": {
7501
- "description": "The instruction's ID.",
7502
- "name": "instructionId",
7622
+ "issueId": {
7623
+ "description": "The issue's document ID.",
7624
+ "name": "issueId",
7503
7625
  "required": true
7504
7626
  }
7505
7627
  },
7506
- "description": "Deletes the instruction. Builds stop applying it from the next run. Entries already written under it keep their text until they are rebuilt; pass `rebuild=true` to rebuild every entry built from its documents right away.",
7628
+ "description": "Marks the issue as rejected. If the issue already left triage, the request returns it unchanged. Returns `422` with code `issueDocumentInvalid` if the issue document was edited into a shape the API cannot verify. Returns `409` with code `issueTransitionConflict` if another change to the issue happened at the same time. You can safely retry a `409`.",
7507
7629
  "examples": [
7508
7630
  {
7509
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
7510
- "description": "Delete an instruction"
7631
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
7632
+ "description": "Dismiss an issue"
7511
7633
  },
7512
7634
  {
7513
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
7514
- "description": "Delete an instruction, as JSON"
7635
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
7636
+ "description": "Dismiss an issue, as JSON"
7515
7637
  }
7516
7638
  ],
7517
7639
  "flags": {
@@ -7521,29 +7643,16 @@
7521
7643
  "name": "json",
7522
7644
  "allowNo": false,
7523
7645
  "type": "boolean"
7524
- },
7525
- "rebuild": {
7526
- "description": "Set to `true` to rebuild every entry built from the instruction's documents once it is deleted, so pages written under the instruction reflect their documents again. The response returns the rebuild job ID in `rebuildJobId`.",
7527
- "name": "rebuild",
7528
- "allowNo": true,
7529
- "type": "boolean"
7530
- },
7531
- "yes": {
7532
- "char": "y",
7533
- "description": "Skip confirmation prompt (unattended mode)",
7534
- "name": "yes",
7535
- "allowNo": false,
7536
- "type": "boolean"
7537
7646
  }
7538
7647
  },
7539
7648
  "hasDynamicHelp": false,
7540
7649
  "hiddenAliases": [],
7541
- "id": "context:instructions:delete",
7650
+ "id": "context:issues:dismiss",
7542
7651
  "pluginAlias": "@sanity/cli",
7543
7652
  "pluginName": "@sanity/cli",
7544
7653
  "pluginType": "core",
7545
7654
  "strict": true,
7546
- "summary": "Delete an instruction",
7655
+ "summary": "Dismiss an issue",
7547
7656
  "enableJsonFlag": true,
7548
7657
  "telemetry": {
7549
7658
  "redactedFlags": []
@@ -7553,33 +7662,33 @@
7553
7662
  "dist",
7554
7663
  "commands",
7555
7664
  "context",
7556
- "instructions",
7557
- "delete.js"
7665
+ "issues",
7666
+ "dismiss.js"
7558
7667
  ]
7559
7668
  },
7560
- "context:instructions:edit": {
7669
+ "context:issues:get": {
7561
7670
  "aliases": [],
7562
7671
  "args": {
7563
7672
  "knowledgeBaseId": {
7564
- "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7673
+ "description": "Knowledge base ID",
7565
7674
  "name": "knowledgeBaseId",
7566
7675
  "required": true
7567
7676
  },
7568
- "instructionId": {
7569
- "description": "The instruction's ID.",
7570
- "name": "instructionId",
7677
+ "issueId": {
7678
+ "description": "Issue ID",
7679
+ "name": "issueId",
7571
7680
  "required": true
7572
7681
  }
7573
7682
  },
7574
- "description": "Updates the instruction's statement or documents. The change applies from the next build. Any update also reactivates an archived instruction and ties it to the current content of its documents.",
7683
+ "description": "Get details of an issue",
7575
7684
  "examples": [
7576
7685
  {
7577
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
7578
- "description": "Update an instruction"
7686
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456",
7687
+ "description": "Get details of a specific issue"
7579
7688
  },
7580
7689
  {
7581
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
7582
- "description": "Update an instruction, as JSON"
7690
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456 --json",
7691
+ "description": "Output the issue as JSON"
7583
7692
  }
7584
7693
  ],
7585
7694
  "flags": {
@@ -7589,79 +7698,55 @@
7589
7698
  "name": "json",
7590
7699
  "allowNo": false,
7591
7700
  "type": "boolean"
7592
- },
7593
- "statement": {
7594
- "description": "The new instruction text. Omit it to keep the current text.",
7595
- "name": "statement",
7596
- "hasDynamicHelp": false,
7597
- "multiple": false,
7598
- "type": "option"
7599
- },
7600
- "scope-document-ids": {
7601
- "description": "IDs of the documents the instruction applies to. Replaces the current list. Omit it to keep the current documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
7602
- "name": "scope-document-ids",
7603
- "hasDynamicHelp": false,
7604
- "multiple": true,
7605
- "type": "option"
7606
7701
  }
7607
7702
  },
7608
7703
  "hasDynamicHelp": false,
7609
7704
  "hiddenAliases": [],
7610
- "id": "context:instructions:edit",
7705
+ "id": "context:issues:get",
7611
7706
  "pluginAlias": "@sanity/cli",
7612
7707
  "pluginName": "@sanity/cli",
7613
7708
  "pluginType": "core",
7614
7709
  "strict": true,
7615
- "summary": "Update an instruction",
7616
7710
  "enableJsonFlag": true,
7617
- "telemetry": {
7618
- "redactedFlags": [
7619
- {
7620
- "canonical": "--statement",
7621
- "flags": [
7622
- "--statement"
7623
- ]
7624
- },
7625
- {
7626
- "canonical": "--scope-document-ids",
7627
- "flags": [
7628
- "--scope-document-ids"
7629
- ]
7630
- }
7631
- ]
7632
- },
7633
7711
  "isESM": true,
7634
7712
  "relativePath": [
7635
7713
  "dist",
7636
7714
  "commands",
7637
7715
  "context",
7638
- "instructions",
7639
- "edit.js"
7716
+ "issues",
7717
+ "get.js"
7640
7718
  ]
7641
7719
  },
7642
- "context:jobs:get": {
7720
+ "context:issues:list": {
7643
7721
  "aliases": [],
7644
7722
  "args": {
7645
7723
  "knowledgeBaseId": {
7646
- "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7724
+ "description": "Knowledge base ID",
7647
7725
  "name": "knowledgeBaseId",
7648
7726
  "required": true
7649
- },
7650
- "jobId": {
7651
- "description": "The job ID returned by the endpoint that started the work.",
7652
- "name": "jobId",
7653
- "required": true
7654
7727
  }
7655
7728
  },
7656
- "description": "Returns the status of a background job, such as a build, sync, or refresh. The endpoint that starts the work returns the job ID. A job cancelled before it started never ran, so it returns 404.",
7729
+ "description": "List issues found by knowledge base builds",
7657
7730
  "examples": [
7658
7731
  {
7659
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId>",
7660
- "description": "Get a job"
7732
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123",
7733
+ "description": "List all issues for a knowledge base"
7661
7734
  },
7662
7735
  {
7663
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId> --json",
7664
- "description": "Get a job, as JSON"
7736
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --status open",
7737
+ "description": "List issues awaiting triage"
7738
+ },
7739
+ {
7740
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --kind conflict --severity critical",
7741
+ "description": "List critical conflicts"
7742
+ },
7743
+ {
7744
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --scope billing",
7745
+ "description": "List issues about entries under billing/"
7746
+ },
7747
+ {
7748
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
7749
+ "description": "Output issues as JSON"
7665
7750
  }
7666
7751
  ],
7667
7752
  "flags": {
@@ -7672,35 +7757,67 @@
7672
7757
  "allowNo": false,
7673
7758
  "type": "boolean"
7674
7759
  },
7675
- "watch": {
7676
- "description": "Wait for the job to finish, exiting non-zero if it fails",
7677
- "name": "watch",
7678
- "allowNo": false,
7679
- "type": "boolean"
7760
+ "kind": {
7761
+ "description": "Only list issues of this kind",
7762
+ "name": "kind",
7763
+ "hasDynamicHelp": false,
7764
+ "multiple": false,
7765
+ "options": [
7766
+ "conflict",
7767
+ "update_required"
7768
+ ],
7769
+ "type": "option"
7770
+ },
7771
+ "scope": {
7772
+ "description": "Only list issues about this entry path or anything under it (`*` for knowledge-base-wide issues)",
7773
+ "name": "scope",
7774
+ "hasDynamicHelp": false,
7775
+ "helpValue": "<path>",
7776
+ "multiple": false,
7777
+ "type": "option"
7778
+ },
7779
+ "severity": {
7780
+ "description": "Only list issues of this severity",
7781
+ "name": "severity",
7782
+ "hasDynamicHelp": false,
7783
+ "multiple": false,
7784
+ "options": [
7785
+ "critical",
7786
+ "suggestion"
7787
+ ],
7788
+ "type": "option"
7789
+ },
7790
+ "status": {
7791
+ "description": "Only list issues with this status (rejected = dismissed, accepted = resolved or applied)",
7792
+ "name": "status",
7793
+ "hasDynamicHelp": false,
7794
+ "multiple": false,
7795
+ "options": [
7796
+ "open",
7797
+ "accepted",
7798
+ "rejected"
7799
+ ],
7800
+ "type": "option"
7680
7801
  }
7681
7802
  },
7682
7803
  "hasDynamicHelp": false,
7683
7804
  "hiddenAliases": [],
7684
- "id": "context:jobs:get",
7805
+ "id": "context:issues:list",
7685
7806
  "pluginAlias": "@sanity/cli",
7686
7807
  "pluginName": "@sanity/cli",
7687
7808
  "pluginType": "core",
7688
7809
  "strict": true,
7689
- "summary": "Get a job",
7690
7810
  "enableJsonFlag": true,
7691
- "telemetry": {
7692
- "redactedFlags": []
7693
- },
7694
7811
  "isESM": true,
7695
7812
  "relativePath": [
7696
7813
  "dist",
7697
7814
  "commands",
7698
7815
  "context",
7699
- "jobs",
7700
- "get.js"
7816
+ "issues",
7817
+ "list.js"
7701
7818
  ]
7702
7819
  },
7703
- "context:issues:apply": {
7820
+ "context:issues:reopen": {
7704
7821
  "aliases": [],
7705
7822
  "args": {
7706
7823
  "knowledgeBaseId": {
@@ -7708,22 +7825,21 @@
7708
7825
  "name": "knowledgeBaseId",
7709
7826
  "required": true
7710
7827
  },
7711
- "issueIds": {
7712
- "description": "The IDs of the issues to accept and apply.",
7713
- "multiple": true,
7714
- "name": "issueIds",
7828
+ "issueId": {
7829
+ "description": "The issue's document ID.",
7830
+ "name": "issueId",
7715
7831
  "required": true
7716
7832
  }
7717
7833
  },
7718
- "description": "Accepts the issues in `issueIds`, then queues a job that applies them, rewrites the affected entries, and saves a new revision. Returns a job ID. IDs of issues that no longer exist are skipped. Returns `409` with code `issueNotAutoApplicable`, and accepts none of the issues, if any of them cannot be applied: a `conflict` (resolve it with `POST .../issues/{issueId}/resolve`), or an `update_required` issue whose `scopePath` is `*` or names an entry that no longer exists. Dismiss those instead.",
7834
+ "description": "Returns an accepted conflict issue to triage, clears its resolution, and deletes the instruction the resolution created. Reopening an open or dismissed conflict returns it unchanged. Other issue types return `422` with code `issueNotResolvable`.",
7719
7835
  "examples": [
7720
7836
  {
7721
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId>",
7722
- "description": "Accept and apply issues"
7837
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
7838
+ "description": "Reopen an accepted conflict"
7723
7839
  },
7724
7840
  {
7725
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> --json",
7726
- "description": "Accept and apply issues, as JSON"
7841
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
7842
+ "description": "Reopen an accepted conflict, as JSON"
7727
7843
  }
7728
7844
  ],
7729
7845
  "flags": {
@@ -7733,22 +7849,16 @@
7733
7849
  "name": "json",
7734
7850
  "allowNo": false,
7735
7851
  "type": "boolean"
7736
- },
7737
- "watch": {
7738
- "description": "Wait for the job to finish, exiting non-zero if it fails",
7739
- "name": "watch",
7740
- "allowNo": false,
7741
- "type": "boolean"
7742
7852
  }
7743
7853
  },
7744
7854
  "hasDynamicHelp": false,
7745
7855
  "hiddenAliases": [],
7746
- "id": "context:issues:apply",
7856
+ "id": "context:issues:reopen",
7747
7857
  "pluginAlias": "@sanity/cli",
7748
7858
  "pluginName": "@sanity/cli",
7749
7859
  "pluginType": "core",
7750
7860
  "strict": true,
7751
- "summary": "Accept and apply issues",
7861
+ "summary": "Reopen an accepted conflict",
7752
7862
  "enableJsonFlag": true,
7753
7863
  "telemetry": {
7754
7864
  "redactedFlags": []
@@ -7759,10 +7869,10 @@
7759
7869
  "commands",
7760
7870
  "context",
7761
7871
  "issues",
7762
- "apply.js"
7872
+ "reopen.js"
7763
7873
  ]
7764
7874
  },
7765
- "context:issues:dismiss": {
7875
+ "context:issues:resolve": {
7766
7876
  "aliases": [],
7767
7877
  "args": {
7768
7878
  "knowledgeBaseId": {
@@ -7776,15 +7886,15 @@
7776
7886
  "required": true
7777
7887
  }
7778
7888
  },
7779
- "description": "Marks the issue as rejected. If the issue already left triage, the request returns it unchanged. Returns `422` with code `issueDocumentInvalid` if the issue document was edited into a shape the API cannot verify. Returns `409` with code `issueTransitionConflict` if another change to the issue happened at the same time. You can safely retry a `409`.",
7889
+ "description": "Resolves a conflict issue by choosing one of its sides. Set `resolution` to the index of a side in `content.sides`. For a conflict on a single entry, index `0` is the entry's current content, so choosing it keeps the entry as it is. Choosing any other side rewrites the entry, and the returned `jobId` tracks the rewrite. The decision becomes a standing instruction for every future build, and `resolvedBy` records who made it. To change a decision, resolve the accepted conflict again. Other issue types, dismissed conflicts, and out-of-range indexes return `422` with code `issueNotResolvable`.",
7780
7890
  "examples": [
7781
7891
  {
7782
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
7783
- "description": "Dismiss an issue"
7892
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456",
7893
+ "description": "Choose the correct side interactively"
7784
7894
  },
7785
7895
  {
7786
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
7787
- "description": "Dismiss an issue, as JSON"
7896
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456 --side 1 --watch",
7897
+ "description": "Choose side 1 and wait for the entry rewrite"
7788
7898
  }
7789
7899
  ],
7790
7900
  "flags": {
@@ -7794,16 +7904,28 @@
7794
7904
  "name": "json",
7795
7905
  "allowNo": false,
7796
7906
  "type": "boolean"
7907
+ },
7908
+ "watch": {
7909
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
7910
+ "name": "watch",
7911
+ "allowNo": false,
7912
+ "type": "boolean"
7913
+ },
7914
+ "side": {
7915
+ "description": "Index of the correct side, as listed by `sanity context issues get`",
7916
+ "name": "side",
7917
+ "hasDynamicHelp": false,
7918
+ "multiple": false,
7919
+ "type": "option"
7797
7920
  }
7798
7921
  },
7799
7922
  "hasDynamicHelp": false,
7800
7923
  "hiddenAliases": [],
7801
- "id": "context:issues:dismiss",
7924
+ "id": "context:issues:resolve",
7802
7925
  "pluginAlias": "@sanity/cli",
7803
7926
  "pluginName": "@sanity/cli",
7804
7927
  "pluginType": "core",
7805
- "strict": true,
7806
- "summary": "Dismiss an issue",
7928
+ "summary": "Resolve a conflict issue",
7807
7929
  "enableJsonFlag": true,
7808
7930
  "telemetry": {
7809
7931
  "redactedFlags": []
@@ -7814,32 +7936,32 @@
7814
7936
  "commands",
7815
7937
  "context",
7816
7938
  "issues",
7817
- "dismiss.js"
7939
+ "resolve.js"
7818
7940
  ]
7819
7941
  },
7820
- "context:issues:get": {
7942
+ "context:jobs:get": {
7821
7943
  "aliases": [],
7822
7944
  "args": {
7823
7945
  "knowledgeBaseId": {
7824
- "description": "Knowledge base ID",
7946
+ "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7825
7947
  "name": "knowledgeBaseId",
7826
7948
  "required": true
7827
7949
  },
7828
- "issueId": {
7829
- "description": "Issue ID",
7830
- "name": "issueId",
7950
+ "jobId": {
7951
+ "description": "The job ID returned by the endpoint that started the work.",
7952
+ "name": "jobId",
7831
7953
  "required": true
7832
7954
  }
7833
7955
  },
7834
- "description": "Get details of an issue",
7956
+ "description": "Returns the status of a background job, such as a build, sync, or refresh. The endpoint that starts the work returns the job ID. A job cancelled before it started never ran, so it returns 404.",
7835
7957
  "examples": [
7836
7958
  {
7837
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456",
7838
- "description": "Get details of a specific issue"
7959
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId>",
7960
+ "description": "Get a job"
7839
7961
  },
7840
7962
  {
7841
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue.def456 --json",
7842
- "description": "Output the issue as JSON"
7963
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <jobId> --json",
7964
+ "description": "Get a job, as JSON"
7843
7965
  }
7844
7966
  ],
7845
7967
  "flags": {
@@ -7849,55 +7971,53 @@
7849
7971
  "name": "json",
7850
7972
  "allowNo": false,
7851
7973
  "type": "boolean"
7974
+ },
7975
+ "watch": {
7976
+ "description": "Wait for the job to finish, exiting non-zero if it fails",
7977
+ "name": "watch",
7978
+ "allowNo": false,
7979
+ "type": "boolean"
7852
7980
  }
7853
7981
  },
7854
7982
  "hasDynamicHelp": false,
7855
7983
  "hiddenAliases": [],
7856
- "id": "context:issues:get",
7984
+ "id": "context:jobs:get",
7857
7985
  "pluginAlias": "@sanity/cli",
7858
7986
  "pluginName": "@sanity/cli",
7859
7987
  "pluginType": "core",
7860
7988
  "strict": true,
7989
+ "summary": "Get a job",
7861
7990
  "enableJsonFlag": true,
7991
+ "telemetry": {
7992
+ "redactedFlags": []
7993
+ },
7862
7994
  "isESM": true,
7863
7995
  "relativePath": [
7864
7996
  "dist",
7865
7997
  "commands",
7866
7998
  "context",
7867
- "issues",
7999
+ "jobs",
7868
8000
  "get.js"
7869
8001
  ]
7870
8002
  },
7871
- "context:issues:list": {
8003
+ "context:instructions:create": {
7872
8004
  "aliases": [],
7873
8005
  "args": {
7874
8006
  "knowledgeBaseId": {
7875
- "description": "Knowledge base ID",
8007
+ "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
7876
8008
  "name": "knowledgeBaseId",
7877
8009
  "required": true
7878
8010
  }
7879
8011
  },
7880
- "description": "List issues found by knowledge base builds",
8012
+ "description": "Creates a standing instruction for how entries built from its documents are written. Every instruction applies to specific documents, set in `scopeDocumentIds`. To rebuild entries under the new instruction right away, pass their paths in `rebuildPaths`. The response includes the rebuild job ID, or `null` if the rebuild could not start. The instruction is saved either way. After the instruction is saved, a background check files issues for entries that contradict it. If you already checked the instruction for contradictions, set `verified` to skip the background check. If the requested rebuild does not start, the background check runs even when `verified` is set.",
7881
8013
  "examples": [
7882
8014
  {
7883
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
7884
- "description": "List all issues for a knowledge base"
7885
- },
7886
- {
7887
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --status open",
7888
- "description": "List issues awaiting triage"
7889
- },
7890
- {
7891
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --kind conflict --severity critical",
7892
- "description": "List critical conflicts"
7893
- },
7894
- {
7895
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --scope billing",
7896
- "description": "List issues about entries under billing/"
8015
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId>",
8016
+ "description": "Create an instruction"
7897
8017
  },
7898
8018
  {
7899
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
7900
- "description": "Output issues as JSON"
8019
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> --json",
8020
+ "description": "Create an instruction, as JSON"
7901
8021
  }
7902
8022
  ],
7903
8023
  "flags": {
@@ -7908,67 +8028,77 @@
7908
8028
  "allowNo": false,
7909
8029
  "type": "boolean"
7910
8030
  },
7911
- "kind": {
7912
- "description": "Only list issues of this kind",
7913
- "name": "kind",
8031
+ "statement": {
8032
+ "description": "The instruction in plain language. Builds follow it over what the sources say.",
8033
+ "name": "statement",
8034
+ "required": true,
7914
8035
  "hasDynamicHelp": false,
7915
8036
  "multiple": false,
7916
- "options": [
7917
- "conflict",
7918
- "update_required"
7919
- ],
7920
8037
  "type": "option"
7921
8038
  },
7922
- "scope": {
7923
- "description": "Only list issues about this entry path or anything under it (`*` for knowledge-base-wide issues)",
7924
- "name": "scope",
8039
+ "scope-document-ids": {
8040
+ "description": "IDs of the documents the instruction applies to. Builds apply it when they write entries built from these documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
8041
+ "name": "scope-document-ids",
8042
+ "required": true,
7925
8043
  "hasDynamicHelp": false,
7926
- "helpValue": "<path>",
7927
- "multiple": false,
8044
+ "multiple": true,
7928
8045
  "type": "option"
7929
8046
  },
7930
- "severity": {
7931
- "description": "Only list issues of this severity",
7932
- "name": "severity",
8047
+ "rebuild-paths": {
8048
+ "description": "Paths of entries to rebuild under the new instruction right away. The response returns the rebuild job ID in `rebuildJobId`.",
8049
+ "name": "rebuild-paths",
7933
8050
  "hasDynamicHelp": false,
7934
- "multiple": false,
7935
- "options": [
7936
- "critical",
7937
- "suggestion"
7938
- ],
8051
+ "multiple": true,
7939
8052
  "type": "option"
7940
8053
  },
7941
- "status": {
7942
- "description": "Only list issues with this status (rejected = dismissed, accepted = resolved or applied)",
7943
- "name": "status",
7944
- "hasDynamicHelp": false,
7945
- "multiple": false,
7946
- "options": [
7947
- "open",
7948
- "accepted",
7949
- "rejected"
7950
- ],
7951
- "type": "option"
8054
+ "verified": {
8055
+ "description": "Whether you already checked the instruction for entries that contradict it. When `true`, the background check that files issues for those entries is skipped. It still runs if the rebuild you requested in `rebuildPaths` does not start.",
8056
+ "name": "verified",
8057
+ "allowNo": true,
8058
+ "type": "boolean"
7952
8059
  }
7953
8060
  },
7954
8061
  "hasDynamicHelp": false,
7955
8062
  "hiddenAliases": [],
7956
- "id": "context:issues:list",
8063
+ "id": "context:instructions:create",
7957
8064
  "pluginAlias": "@sanity/cli",
7958
8065
  "pluginName": "@sanity/cli",
7959
8066
  "pluginType": "core",
7960
8067
  "strict": true,
8068
+ "summary": "Create an instruction",
7961
8069
  "enableJsonFlag": true,
8070
+ "telemetry": {
8071
+ "redactedFlags": [
8072
+ {
8073
+ "canonical": "--statement",
8074
+ "flags": [
8075
+ "--statement"
8076
+ ]
8077
+ },
8078
+ {
8079
+ "canonical": "--scope-document-ids",
8080
+ "flags": [
8081
+ "--scope-document-ids"
8082
+ ]
8083
+ },
8084
+ {
8085
+ "canonical": "--rebuild-paths",
8086
+ "flags": [
8087
+ "--rebuild-paths"
8088
+ ]
8089
+ }
8090
+ ]
8091
+ },
7962
8092
  "isESM": true,
7963
8093
  "relativePath": [
7964
8094
  "dist",
7965
8095
  "commands",
7966
8096
  "context",
7967
- "issues",
7968
- "list.js"
8097
+ "instructions",
8098
+ "create.js"
7969
8099
  ]
7970
8100
  },
7971
- "context:issues:reopen": {
8101
+ "context:instructions:delete": {
7972
8102
  "aliases": [],
7973
8103
  "args": {
7974
8104
  "knowledgeBaseId": {
@@ -7976,21 +8106,21 @@
7976
8106
  "name": "knowledgeBaseId",
7977
8107
  "required": true
7978
8108
  },
7979
- "issueId": {
7980
- "description": "The issue's document ID.",
7981
- "name": "issueId",
8109
+ "instructionId": {
8110
+ "description": "The instruction's ID.",
8111
+ "name": "instructionId",
7982
8112
  "required": true
7983
8113
  }
7984
8114
  },
7985
- "description": "Returns an accepted conflict issue to triage, clears its resolution, and deletes the instruction the resolution created. Reopening an open or dismissed conflict returns it unchanged. Other issue types return `422` with code `issueNotResolvable`.",
8115
+ "description": "Deletes the instruction. Builds stop applying it from the next run. Entries already written under it keep their text until they are rebuilt; pass `rebuild=true` to rebuild every entry built from its documents right away.",
7986
8116
  "examples": [
7987
8117
  {
7988
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId>",
7989
- "description": "Reopen an accepted conflict"
8118
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
8119
+ "description": "Delete an instruction"
7990
8120
  },
7991
8121
  {
7992
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <issueId> --json",
7993
- "description": "Reopen an accepted conflict, as JSON"
8122
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
8123
+ "description": "Delete an instruction, as JSON"
7994
8124
  }
7995
8125
  ],
7996
8126
  "flags": {
@@ -8000,16 +8130,29 @@
8000
8130
  "name": "json",
8001
8131
  "allowNo": false,
8002
8132
  "type": "boolean"
8133
+ },
8134
+ "rebuild": {
8135
+ "description": "Set to `true` to rebuild every entry built from the instruction's documents once it is deleted, so pages written under the instruction reflect their documents again. The response returns the rebuild job ID in `rebuildJobId`.",
8136
+ "name": "rebuild",
8137
+ "allowNo": true,
8138
+ "type": "boolean"
8139
+ },
8140
+ "yes": {
8141
+ "char": "y",
8142
+ "description": "Skip confirmation prompt (unattended mode)",
8143
+ "name": "yes",
8144
+ "allowNo": false,
8145
+ "type": "boolean"
8003
8146
  }
8004
8147
  },
8005
8148
  "hasDynamicHelp": false,
8006
8149
  "hiddenAliases": [],
8007
- "id": "context:issues:reopen",
8150
+ "id": "context:instructions:delete",
8008
8151
  "pluginAlias": "@sanity/cli",
8009
8152
  "pluginName": "@sanity/cli",
8010
8153
  "pluginType": "core",
8011
8154
  "strict": true,
8012
- "summary": "Reopen an accepted conflict",
8155
+ "summary": "Delete an instruction",
8013
8156
  "enableJsonFlag": true,
8014
8157
  "telemetry": {
8015
8158
  "redactedFlags": []
@@ -8019,11 +8162,11 @@
8019
8162
  "dist",
8020
8163
  "commands",
8021
8164
  "context",
8022
- "issues",
8023
- "reopen.js"
8165
+ "instructions",
8166
+ "delete.js"
8024
8167
  ]
8025
8168
  },
8026
- "context:issues:resolve": {
8169
+ "context:instructions:edit": {
8027
8170
  "aliases": [],
8028
8171
  "args": {
8029
8172
  "knowledgeBaseId": {
@@ -8031,21 +8174,21 @@
8031
8174
  "name": "knowledgeBaseId",
8032
8175
  "required": true
8033
8176
  },
8034
- "issueId": {
8035
- "description": "The issue's document ID.",
8036
- "name": "issueId",
8177
+ "instructionId": {
8178
+ "description": "The instruction's ID.",
8179
+ "name": "instructionId",
8037
8180
  "required": true
8038
8181
  }
8039
8182
  },
8040
- "description": "Resolves a conflict issue by choosing one of its sides. Set `resolution` to the index of a side in `content.sides`. For a conflict on a single entry, index `0` is the entry's current content, so choosing it keeps the entry as it is. Choosing any other side rewrites the entry, and the returned `jobId` tracks the rewrite. The decision becomes a standing instruction for every future build, and `resolvedBy` records who made it. To change a decision, resolve the accepted conflict again. Other issue types, dismissed conflicts, and out-of-range indexes return `422` with code `issueNotResolvable`.",
8183
+ "description": "Updates the instruction's statement or documents. The change applies from the next build. Any update also reactivates an archived instruction and ties it to the current content of its documents.",
8041
8184
  "examples": [
8042
8185
  {
8043
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456",
8044
- "description": "Choose the correct side interactively"
8186
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId>",
8187
+ "description": "Update an instruction"
8045
8188
  },
8046
8189
  {
8047
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 issue-def456 --side 1 --watch",
8048
- "description": "Choose side 1 and wait for the entry rewrite"
8190
+ "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <instructionId> --json",
8191
+ "description": "Update an instruction, as JSON"
8049
8192
  }
8050
8193
  ],
8051
8194
  "flags": {
@@ -8056,38 +8199,53 @@
8056
8199
  "allowNo": false,
8057
8200
  "type": "boolean"
8058
8201
  },
8059
- "watch": {
8060
- "description": "Wait for the job to finish, exiting non-zero if it fails",
8061
- "name": "watch",
8062
- "allowNo": false,
8063
- "type": "boolean"
8064
- },
8065
- "side": {
8066
- "description": "Index of the correct side, as listed by `sanity context issues get`",
8067
- "name": "side",
8202
+ "statement": {
8203
+ "description": "The new instruction text. Omit it to keep the current text.",
8204
+ "name": "statement",
8068
8205
  "hasDynamicHelp": false,
8069
8206
  "multiple": false,
8070
8207
  "type": "option"
8208
+ },
8209
+ "scope-document-ids": {
8210
+ "description": "IDs of the documents the instruction applies to. Replaces the current list. Omit it to keep the current documents. IDs of documents that no longer exist are dropped. If none exist, the request returns `422` with code `instructionScopeVanished`.",
8211
+ "name": "scope-document-ids",
8212
+ "hasDynamicHelp": false,
8213
+ "multiple": true,
8214
+ "type": "option"
8071
8215
  }
8072
8216
  },
8073
8217
  "hasDynamicHelp": false,
8074
8218
  "hiddenAliases": [],
8075
- "id": "context:issues:resolve",
8219
+ "id": "context:instructions:edit",
8076
8220
  "pluginAlias": "@sanity/cli",
8077
8221
  "pluginName": "@sanity/cli",
8078
8222
  "pluginType": "core",
8079
- "summary": "Resolve a conflict issue",
8223
+ "strict": true,
8224
+ "summary": "Update an instruction",
8080
8225
  "enableJsonFlag": true,
8081
8226
  "telemetry": {
8082
- "redactedFlags": []
8227
+ "redactedFlags": [
8228
+ {
8229
+ "canonical": "--statement",
8230
+ "flags": [
8231
+ "--statement"
8232
+ ]
8233
+ },
8234
+ {
8235
+ "canonical": "--scope-document-ids",
8236
+ "flags": [
8237
+ "--scope-document-ids"
8238
+ ]
8239
+ }
8240
+ ]
8083
8241
  },
8084
8242
  "isESM": true,
8085
8243
  "relativePath": [
8086
8244
  "dist",
8087
8245
  "commands",
8088
8246
  "context",
8089
- "issues",
8090
- "resolve.js"
8247
+ "instructions",
8248
+ "edit.js"
8091
8249
  ]
8092
8250
  },
8093
8251
  "context:mcp:create": {
@@ -9353,214 +9511,33 @@
9353
9511
  },
9354
9512
  "watch": {
9355
9513
  "description": "Wait for the sync to settle, exiting non-zero unless it completes: when it fails, is cancelled or is held for confirmation",
9356
- "name": "watch",
9357
- "allowNo": false,
9358
- "type": "boolean"
9359
- }
9360
- },
9361
- "hasDynamicHelp": false,
9362
- "hiddenAliases": [],
9363
- "id": "context:sources:sync",
9364
- "pluginAlias": "@sanity/cli",
9365
- "pluginName": "@sanity/cli",
9366
- "pluginType": "core",
9367
- "strict": true,
9368
- "summary": "Sync a source",
9369
- "enableJsonFlag": true,
9370
- "telemetry": {
9371
- "redactedFlags": []
9372
- },
9373
- "isESM": true,
9374
- "relativePath": [
9375
- "dist",
9376
- "commands",
9377
- "context",
9378
- "sources",
9379
- "sync.js"
9380
- ]
9381
- },
9382
- "context:sources:upload": {
9383
- "aliases": [],
9384
- "args": {
9385
- "knowledgeBaseId": {
9386
- "description": "The knowledge base's ID (`kb...`), its `publicId`. Its UUID `id` is also accepted.",
9387
- "name": "knowledgeBaseId",
9388
- "required": true
9389
- },
9390
- "sourceId": {
9391
- "description": "The source's ID.",
9392
- "name": "sourceId",
9393
- "required": true
9394
- }
9395
- },
9396
- "description": "Upload a new file to a files source, replacing the one it holds, and sync it",
9397
- "examples": [
9398
- {
9399
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 source-def456 --file ./handbook.pdf",
9400
- "description": "Replace the file a source holds"
9401
- },
9402
- {
9403
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 source-def456 --file ./handbook.pdf --watch",
9404
- "description": "Replace the file and wait for its sync to finish"
9405
- }
9406
- ],
9407
- "flags": {
9408
- "json": {
9409
- "description": "Format output as json.",
9410
- "helpGroup": "GLOBAL",
9411
- "name": "json",
9412
- "allowNo": false,
9413
- "type": "boolean"
9414
- },
9415
- "watch": {
9416
- "description": "Wait for the sync to settle, exiting non-zero unless it completes: when it fails, is cancelled or is held for confirmation",
9417
- "name": "watch",
9418
- "allowNo": false,
9419
- "type": "boolean"
9420
- },
9421
- "content-type": {
9422
- "description": "MIME type of the file, inferred from the file extension when omitted",
9423
- "name": "content-type",
9424
- "hasDynamicHelp": false,
9425
- "helpValue": "<type>",
9426
- "multiple": false,
9427
- "type": "option"
9428
- },
9429
- "file": {
9430
- "description": "Local file to upload: a document, or a zip, tar or gzip archive of them",
9431
- "name": "file",
9432
- "required": true,
9433
- "hasDynamicHelp": false,
9434
- "helpValue": "<path>",
9435
- "multiple": false,
9436
- "type": "option"
9437
- }
9438
- },
9439
- "hasDynamicHelp": false,
9440
- "hiddenAliases": [],
9441
- "id": "context:sources:upload",
9442
- "pluginAlias": "@sanity/cli",
9443
- "pluginName": "@sanity/cli",
9444
- "pluginType": "core",
9445
- "summary": "Upload a file to a source",
9446
- "enableJsonFlag": true,
9447
- "telemetry": {
9448
- "redactedFlags": [
9449
- {
9450
- "canonical": "--file",
9451
- "flags": [
9452
- "--file"
9453
- ]
9454
- }
9455
- ]
9456
- },
9457
- "isESM": true,
9458
- "relativePath": [
9459
- "dist",
9460
- "commands",
9461
- "context",
9462
- "sources",
9463
- "upload.js"
9464
- ]
9465
- },
9466
- "context:entries:get": {
9467
- "aliases": [],
9468
- "args": {
9469
- "knowledgeBaseId": {
9470
- "description": "Knowledge base ID",
9471
- "name": "knowledgeBaseId",
9472
- "required": true
9473
- },
9474
- "path": {
9475
- "description": "Entry path, as listed by `sanity context entries list`",
9476
- "name": "path",
9477
- "required": true
9478
- }
9479
- },
9480
- "description": "Get an entry and its content",
9481
- "examples": [
9482
- {
9483
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 billing/refunds",
9484
- "description": "Print an entry and its content"
9485
- },
9486
- {
9487
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 billing/refunds --json",
9488
- "description": "Output the entry, including citations, as JSON"
9489
- }
9490
- ],
9491
- "flags": {
9492
- "json": {
9493
- "description": "Format output as json.",
9494
- "helpGroup": "GLOBAL",
9495
- "name": "json",
9496
- "allowNo": false,
9497
- "type": "boolean"
9498
- }
9499
- },
9500
- "hasDynamicHelp": false,
9501
- "hiddenAliases": [],
9502
- "id": "context:entries:get",
9503
- "pluginAlias": "@sanity/cli",
9504
- "pluginName": "@sanity/cli",
9505
- "pluginType": "core",
9506
- "strict": true,
9507
- "enableJsonFlag": true,
9508
- "isESM": true,
9509
- "relativePath": [
9510
- "dist",
9511
- "commands",
9512
- "context",
9513
- "entries",
9514
- "get.js"
9515
- ]
9516
- },
9517
- "context:entries:list": {
9518
- "aliases": [],
9519
- "args": {
9520
- "knowledgeBaseId": {
9521
- "description": "Knowledge base ID",
9522
- "name": "knowledgeBaseId",
9523
- "required": true
9524
- }
9525
- },
9526
- "description": "List the entries a knowledge base build produced",
9527
- "examples": [
9528
- {
9529
- "command": "<%= config.bin %> <%= command.id %> kb-abc123",
9530
- "description": "List all entries for a knowledge base"
9531
- },
9532
- {
9533
- "command": "<%= config.bin %> <%= command.id %> kb-abc123 --json",
9534
- "description": "Output entries as JSON"
9535
- }
9536
- ],
9537
- "flags": {
9538
- "json": {
9539
- "description": "Format output as json.",
9540
- "helpGroup": "GLOBAL",
9541
- "name": "json",
9514
+ "name": "watch",
9542
9515
  "allowNo": false,
9543
9516
  "type": "boolean"
9544
9517
  }
9545
9518
  },
9546
9519
  "hasDynamicHelp": false,
9547
9520
  "hiddenAliases": [],
9548
- "id": "context:entries:list",
9521
+ "id": "context:sources:sync",
9549
9522
  "pluginAlias": "@sanity/cli",
9550
9523
  "pluginName": "@sanity/cli",
9551
9524
  "pluginType": "core",
9552
9525
  "strict": true,
9526
+ "summary": "Sync a source",
9553
9527
  "enableJsonFlag": true,
9528
+ "telemetry": {
9529
+ "redactedFlags": []
9530
+ },
9554
9531
  "isESM": true,
9555
9532
  "relativePath": [
9556
9533
  "dist",
9557
9534
  "commands",
9558
9535
  "context",
9559
- "entries",
9560
- "list.js"
9536
+ "sources",
9537
+ "sync.js"
9561
9538
  ]
9562
9539
  },
9563
- "context:entries:rebuild": {
9540
+ "context:sources:upload": {
9564
9541
  "aliases": [],
9565
9542
  "args": {
9566
9543
  "knowledgeBaseId": {
@@ -9568,21 +9545,21 @@
9568
9545
  "name": "knowledgeBaseId",
9569
9546
  "required": true
9570
9547
  },
9571
- "entryPath": {
9572
- "description": "The entry's slash-delimited path, such as `pricing/plans/free`, URL-encoded.",
9573
- "name": "entryPath",
9548
+ "sourceId": {
9549
+ "description": "The source's ID.",
9550
+ "name": "sourceId",
9574
9551
  "required": true
9575
9552
  }
9576
9553
  },
9577
- "description": "Queues a rewrite of the entry at `entryPath` from its cited sources and the active instructions, and returns a job ID immediately. The response also lists the other entries built from any of the same sources. An instruction applies to every entry built from its sources, so those entries can change too. Returns `422` with code `entryDocumentInvalid` if the entry document was edited into a shape the API cannot read.",
9554
+ "description": "Upload a new file to a files source, replacing the one it holds, and sync it",
9578
9555
  "examples": [
9579
9556
  {
9580
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <entryPath>",
9581
- "description": "Rebuild an entry from its sources"
9557
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 source-def456 --file ./handbook.pdf",
9558
+ "description": "Replace the file a source holds"
9582
9559
  },
9583
9560
  {
9584
- "command": "<%= config.bin %> <%= command.id %> <knowledgeBaseId> <entryPath> --json",
9585
- "description": "Rebuild an entry from its sources, as JSON"
9561
+ "command": "<%= config.bin %> <%= command.id %> kb-abc123 source-def456 --file ./handbook.pdf --watch",
9562
+ "description": "Replace the file and wait for its sync to finish"
9586
9563
  }
9587
9564
  ],
9588
9565
  "flags": {
@@ -9594,31 +9571,54 @@
9594
9571
  "type": "boolean"
9595
9572
  },
9596
9573
  "watch": {
9597
- "description": "Wait for the job to finish, exiting non-zero if it fails",
9574
+ "description": "Wait for the sync to settle, exiting non-zero unless it completes: when it fails, is cancelled or is held for confirmation",
9598
9575
  "name": "watch",
9599
9576
  "allowNo": false,
9600
9577
  "type": "boolean"
9578
+ },
9579
+ "content-type": {
9580
+ "description": "MIME type of the file, inferred from the file extension when omitted",
9581
+ "name": "content-type",
9582
+ "hasDynamicHelp": false,
9583
+ "helpValue": "<type>",
9584
+ "multiple": false,
9585
+ "type": "option"
9586
+ },
9587
+ "file": {
9588
+ "description": "Local file to upload: a document, or a zip, tar or gzip archive of them",
9589
+ "name": "file",
9590
+ "required": true,
9591
+ "hasDynamicHelp": false,
9592
+ "helpValue": "<path>",
9593
+ "multiple": false,
9594
+ "type": "option"
9601
9595
  }
9602
9596
  },
9603
9597
  "hasDynamicHelp": false,
9604
9598
  "hiddenAliases": [],
9605
- "id": "context:entries:rebuild",
9599
+ "id": "context:sources:upload",
9606
9600
  "pluginAlias": "@sanity/cli",
9607
9601
  "pluginName": "@sanity/cli",
9608
9602
  "pluginType": "core",
9609
- "strict": true,
9610
- "summary": "Rebuild an entry from its sources",
9603
+ "summary": "Upload a file to a source",
9611
9604
  "enableJsonFlag": true,
9612
9605
  "telemetry": {
9613
- "redactedFlags": []
9606
+ "redactedFlags": [
9607
+ {
9608
+ "canonical": "--file",
9609
+ "flags": [
9610
+ "--file"
9611
+ ]
9612
+ }
9613
+ ]
9614
9614
  },
9615
9615
  "isESM": true,
9616
9616
  "relativePath": [
9617
9617
  "dist",
9618
9618
  "commands",
9619
9619
  "context",
9620
- "entries",
9621
- "rebuild.js"
9620
+ "sources",
9621
+ "upload.js"
9622
9622
  ]
9623
9623
  },
9624
9624
  "datasets:alias:create": {
@@ -9886,20 +9886,20 @@
9886
9886
  "unlink.js"
9887
9887
  ]
9888
9888
  },
9889
- "datasets:embeddings:disable": {
9889
+ "datasets:visibility:get": {
9890
9890
  "aliases": [],
9891
9891
  "args": {
9892
9892
  "dataset": {
9893
- "description": "Dataset name to disable embeddings for",
9893
+ "description": "The name of the dataset to get visibility for",
9894
9894
  "name": "dataset",
9895
- "required": false
9895
+ "required": true
9896
9896
  }
9897
9897
  },
9898
- "description": "Disable embeddings for a dataset",
9898
+ "description": "Get the visibility of a dataset",
9899
9899
  "examples": [
9900
9900
  {
9901
- "command": "<%= config.bin %> <%= command.id %> production",
9902
- "description": "Disable embeddings for the production dataset"
9901
+ "command": "<%= config.bin %> <%= command.id %> my-dataset",
9902
+ "description": "Check the visibility of a dataset"
9903
9903
  }
9904
9904
  ],
9905
9905
  "flags": {
@@ -9909,7 +9909,7 @@
9909
9909
  ],
9910
9910
  "char": "p",
9911
9911
  "deprecateAliases": true,
9912
- "description": "Project ID to disable embeddings for (overrides CLI configuration)",
9912
+ "description": "Project ID to get dataset visibility for (overrides CLI configuration)",
9913
9913
  "helpGroup": "OVERRIDE",
9914
9914
  "name": "project",
9915
9915
  "hasDynamicHelp": false,
@@ -9920,9 +9920,9 @@
9920
9920
  },
9921
9921
  "hasDynamicHelp": false,
9922
9922
  "hiddenAliases": [
9923
- "dataset:embeddings:disable"
9923
+ "dataset:visibility:get"
9924
9924
  ],
9925
- "id": "datasets:embeddings:disable",
9925
+ "id": "datasets:visibility:get",
9926
9926
  "pluginAlias": "@sanity/cli",
9927
9927
  "pluginName": "@sanity/cli",
9928
9928
  "pluginType": "core",
@@ -9932,32 +9932,37 @@
9932
9932
  "dist",
9933
9933
  "commands",
9934
9934
  "datasets",
9935
- "embeddings",
9936
- "disable.js"
9935
+ "visibility",
9936
+ "get.js"
9937
9937
  ]
9938
9938
  },
9939
- "datasets:embeddings:enable": {
9939
+ "datasets:visibility:set": {
9940
9940
  "aliases": [],
9941
9941
  "args": {
9942
9942
  "dataset": {
9943
- "description": "Dataset name to enable embeddings for",
9943
+ "description": "The name of the dataset to set visibility for",
9944
9944
  "name": "dataset",
9945
- "required": false
9945
+ "required": true
9946
+ },
9947
+ "mode": {
9948
+ "description": "The visibility mode to set",
9949
+ "name": "mode",
9950
+ "options": [
9951
+ "public",
9952
+ "private"
9953
+ ],
9954
+ "required": true
9946
9955
  }
9947
9956
  },
9948
- "description": "Enable embeddings for a dataset",
9957
+ "description": "Set the visibility of a dataset",
9949
9958
  "examples": [
9950
9959
  {
9951
- "command": "<%= config.bin %> <%= command.id %> production",
9952
- "description": "Enable embeddings for the production dataset"
9953
- },
9954
- {
9955
- "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
9956
- "description": "Enable embeddings with a specific projection"
9960
+ "command": "<%= config.bin %> <%= command.id %> my-dataset private",
9961
+ "description": "Make a dataset private"
9957
9962
  },
9958
9963
  {
9959
- "command": "<%= config.bin %> <%= command.id %> production --wait",
9960
- "description": "Enable embeddings and wait for processing to complete"
9964
+ "command": "<%= config.bin %> <%= command.id %> my-dataset public",
9965
+ "description": "Make a dataset public"
9961
9966
  }
9962
9967
  ],
9963
9968
  "flags": {
@@ -9967,71 +9972,47 @@
9967
9972
  ],
9968
9973
  "char": "p",
9969
9974
  "deprecateAliases": true,
9970
- "description": "Project ID to enable embeddings for (overrides CLI configuration)",
9975
+ "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
9971
9976
  "helpGroup": "OVERRIDE",
9972
9977
  "name": "project",
9973
9978
  "hasDynamicHelp": false,
9974
9979
  "helpValue": "<id>",
9975
9980
  "multiple": false,
9976
9981
  "type": "option"
9977
- },
9978
- "projection": {
9979
- "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
9980
- "name": "projection",
9981
- "required": false,
9982
- "hasDynamicHelp": false,
9983
- "multiple": false,
9984
- "type": "option"
9985
- },
9986
- "wait": {
9987
- "description": "Wait for embeddings processing to complete before returning",
9988
- "name": "wait",
9989
- "allowNo": false,
9990
- "type": "boolean"
9991
9982
  }
9992
9983
  },
9993
9984
  "hasDynamicHelp": false,
9994
9985
  "hiddenAliases": [
9995
- "dataset:embeddings:enable"
9986
+ "dataset:visibility:set"
9996
9987
  ],
9997
- "id": "datasets:embeddings:enable",
9988
+ "id": "datasets:visibility:set",
9998
9989
  "pluginAlias": "@sanity/cli",
9999
9990
  "pluginName": "@sanity/cli",
10000
9991
  "pluginType": "core",
10001
9992
  "strict": true,
10002
- "telemetry": {
10003
- "redactedFlags": [
10004
- {
10005
- "canonical": "--projection",
10006
- "flags": [
10007
- "--projection"
10008
- ]
10009
- }
10010
- ]
10011
- },
10012
9993
  "isESM": true,
10013
9994
  "relativePath": [
10014
9995
  "dist",
10015
9996
  "commands",
10016
9997
  "datasets",
10017
- "embeddings",
10018
- "enable.js"
9998
+ "visibility",
9999
+ "set.js"
10019
10000
  ]
10020
10001
  },
10021
- "datasets:embeddings:status": {
10002
+ "datasets:embeddings:disable": {
10022
10003
  "aliases": [],
10023
10004
  "args": {
10024
10005
  "dataset": {
10025
- "description": "The name of the dataset to check embeddings status for",
10006
+ "description": "Dataset name to disable embeddings for",
10026
10007
  "name": "dataset",
10027
10008
  "required": false
10028
10009
  }
10029
10010
  },
10030
- "description": "Show embeddings settings and status for a dataset",
10011
+ "description": "Disable embeddings for a dataset",
10031
10012
  "examples": [
10032
10013
  {
10033
10014
  "command": "<%= config.bin %> <%= command.id %> production",
10034
- "description": "Show embeddings status for the production dataset"
10015
+ "description": "Disable embeddings for the production dataset"
10035
10016
  }
10036
10017
  ],
10037
10018
  "flags": {
@@ -10041,7 +10022,7 @@
10041
10022
  ],
10042
10023
  "char": "p",
10043
10024
  "deprecateAliases": true,
10044
- "description": "Project ID to check embeddings status for (overrides CLI configuration)",
10025
+ "description": "Project ID to disable embeddings for (overrides CLI configuration)",
10045
10026
  "helpGroup": "OVERRIDE",
10046
10027
  "name": "project",
10047
10028
  "hasDynamicHelp": false,
@@ -10052,9 +10033,9 @@
10052
10033
  },
10053
10034
  "hasDynamicHelp": false,
10054
10035
  "hiddenAliases": [
10055
- "dataset:embeddings:status"
10036
+ "dataset:embeddings:disable"
10056
10037
  ],
10057
- "id": "datasets:embeddings:status",
10038
+ "id": "datasets:embeddings:disable",
10058
10039
  "pluginAlias": "@sanity/cli",
10059
10040
  "pluginName": "@sanity/cli",
10060
10041
  "pluginType": "core",
@@ -10065,23 +10046,31 @@
10065
10046
  "commands",
10066
10047
  "datasets",
10067
10048
  "embeddings",
10068
- "status.js"
10049
+ "disable.js"
10069
10050
  ]
10070
10051
  },
10071
- "datasets:visibility:get": {
10052
+ "datasets:embeddings:enable": {
10072
10053
  "aliases": [],
10073
10054
  "args": {
10074
10055
  "dataset": {
10075
- "description": "The name of the dataset to get visibility for",
10056
+ "description": "Dataset name to enable embeddings for",
10076
10057
  "name": "dataset",
10077
- "required": true
10058
+ "required": false
10078
10059
  }
10079
10060
  },
10080
- "description": "Get the visibility of a dataset",
10061
+ "description": "Enable embeddings for a dataset",
10081
10062
  "examples": [
10082
10063
  {
10083
- "command": "<%= config.bin %> <%= command.id %> my-dataset",
10084
- "description": "Check the visibility of a dataset"
10064
+ "command": "<%= config.bin %> <%= command.id %> production",
10065
+ "description": "Enable embeddings for the production dataset"
10066
+ },
10067
+ {
10068
+ "command": "<%= config.bin %> <%= command.id %> production --projection \"{ title, body }\"",
10069
+ "description": "Enable embeddings with a specific projection"
10070
+ },
10071
+ {
10072
+ "command": "<%= config.bin %> <%= command.id %> production --wait",
10073
+ "description": "Enable embeddings and wait for processing to complete"
10085
10074
  }
10086
10075
  ],
10087
10076
  "flags": {
@@ -10091,60 +10080,71 @@
10091
10080
  ],
10092
10081
  "char": "p",
10093
10082
  "deprecateAliases": true,
10094
- "description": "Project ID to get dataset visibility for (overrides CLI configuration)",
10083
+ "description": "Project ID to enable embeddings for (overrides CLI configuration)",
10095
10084
  "helpGroup": "OVERRIDE",
10096
10085
  "name": "project",
10097
10086
  "hasDynamicHelp": false,
10098
10087
  "helpValue": "<id>",
10099
10088
  "multiple": false,
10100
10089
  "type": "option"
10090
+ },
10091
+ "projection": {
10092
+ "description": "GROQ projection defining which fields to embed (e.g. \"{ title, body }\")",
10093
+ "name": "projection",
10094
+ "required": false,
10095
+ "hasDynamicHelp": false,
10096
+ "multiple": false,
10097
+ "type": "option"
10098
+ },
10099
+ "wait": {
10100
+ "description": "Wait for embeddings processing to complete before returning",
10101
+ "name": "wait",
10102
+ "allowNo": false,
10103
+ "type": "boolean"
10101
10104
  }
10102
10105
  },
10103
10106
  "hasDynamicHelp": false,
10104
10107
  "hiddenAliases": [
10105
- "dataset:visibility:get"
10108
+ "dataset:embeddings:enable"
10106
10109
  ],
10107
- "id": "datasets:visibility:get",
10110
+ "id": "datasets:embeddings:enable",
10108
10111
  "pluginAlias": "@sanity/cli",
10109
10112
  "pluginName": "@sanity/cli",
10110
10113
  "pluginType": "core",
10111
10114
  "strict": true,
10115
+ "telemetry": {
10116
+ "redactedFlags": [
10117
+ {
10118
+ "canonical": "--projection",
10119
+ "flags": [
10120
+ "--projection"
10121
+ ]
10122
+ }
10123
+ ]
10124
+ },
10112
10125
  "isESM": true,
10113
10126
  "relativePath": [
10114
10127
  "dist",
10115
10128
  "commands",
10116
10129
  "datasets",
10117
- "visibility",
10118
- "get.js"
10130
+ "embeddings",
10131
+ "enable.js"
10119
10132
  ]
10120
10133
  },
10121
- "datasets:visibility:set": {
10134
+ "datasets:embeddings:status": {
10122
10135
  "aliases": [],
10123
10136
  "args": {
10124
10137
  "dataset": {
10125
- "description": "The name of the dataset to set visibility for",
10138
+ "description": "The name of the dataset to check embeddings status for",
10126
10139
  "name": "dataset",
10127
- "required": true
10128
- },
10129
- "mode": {
10130
- "description": "The visibility mode to set",
10131
- "name": "mode",
10132
- "options": [
10133
- "public",
10134
- "private"
10135
- ],
10136
- "required": true
10140
+ "required": false
10137
10141
  }
10138
10142
  },
10139
- "description": "Set the visibility of a dataset",
10143
+ "description": "Show embeddings settings and status for a dataset",
10140
10144
  "examples": [
10141
10145
  {
10142
- "command": "<%= config.bin %> <%= command.id %> my-dataset private",
10143
- "description": "Make a dataset private"
10144
- },
10145
- {
10146
- "command": "<%= config.bin %> <%= command.id %> my-dataset public",
10147
- "description": "Make a dataset public"
10146
+ "command": "<%= config.bin %> <%= command.id %> production",
10147
+ "description": "Show embeddings status for the production dataset"
10148
10148
  }
10149
10149
  ],
10150
10150
  "flags": {
@@ -10154,7 +10154,7 @@
10154
10154
  ],
10155
10155
  "char": "p",
10156
10156
  "deprecateAliases": true,
10157
- "description": "Project ID to set dataset visibility for (overrides CLI configuration)",
10157
+ "description": "Project ID to check embeddings status for (overrides CLI configuration)",
10158
10158
  "helpGroup": "OVERRIDE",
10159
10159
  "name": "project",
10160
10160
  "hasDynamicHelp": false,
@@ -10165,9 +10165,9 @@
10165
10165
  },
10166
10166
  "hasDynamicHelp": false,
10167
10167
  "hiddenAliases": [
10168
- "dataset:visibility:set"
10168
+ "dataset:embeddings:status"
10169
10169
  ],
10170
- "id": "datasets:visibility:set",
10170
+ "id": "datasets:embeddings:status",
10171
10171
  "pluginAlias": "@sanity/cli",
10172
10172
  "pluginName": "@sanity/cli",
10173
10173
  "pluginType": "core",
@@ -10177,8 +10177,8 @@
10177
10177
  "dist",
10178
10178
  "commands",
10179
10179
  "datasets",
10180
- "visibility",
10181
- "set.js"
10180
+ "embeddings",
10181
+ "status.js"
10182
10182
  ]
10183
10183
  },
10184
10184
  "context:sources:syncs:confirm": {
@@ -10428,5 +10428,5 @@
10428
10428
  ]
10429
10429
  }
10430
10430
  },
10431
- "version": "8.35.0"
10431
+ "version": "8.36.0"
10432
10432
  }