@omni-commerce/cli 0.24.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # @omni-commerce/cli
2
2
 
3
+ CLI 0.25.0 adds `review-queue list-items`, `diagnose`, `apply`, `repair-products`, `retry` and `enable-automation`, plus exact-store publishing and publish progress. Requires the matching server release. See the [Review queue guide](https://docs.omnicommerce.sg/guides/review-queue).
4
+
3
5
  CLI 0.24.0 adds `omni ads` for marketplace Ads capabilities, drafts, approval, scheduled delivery, stopping, retries, evidence and reports. Ads approval requires an explicit `ads:approve` grant. See the [Marketplace Ads guide](https://docs.omnicommerce.sg/guides/marketplace-ads).
4
6
 
5
7
  CLI 0.23.0 adds `omni bulk upload-records`, `omni bulk upload-pricing`, and `omni bulk upload-enrichment` for durable JSONL uploads. See the [Catalog operations guide](https://docs.omnicommerce.sg/sdk/catalog-operations).
package/dist/index.js CHANGED
@@ -84,7 +84,7 @@ async function openBrowser(url) {
84
84
  }
85
85
 
86
86
  // src/version.ts
87
- var CLI_VERSION = "0.24.0";
87
+ var CLI_VERSION = "0.25.0";
88
88
 
89
89
  // src/browser-login.ts
90
90
  function loginOrigin(baseUrl) {
@@ -5580,6 +5580,26 @@ var COMMANDS = [
5580
5580
  acceptsFile: false,
5581
5581
  bodyRequired: true
5582
5582
  },
5583
+ {
5584
+ trail: ["review-queue", "apply"],
5585
+ resourcePath: ["reviewQueue"],
5586
+ methodName: "apply",
5587
+ httpMethod: "POST",
5588
+ path: "/api/v1/review-queue/{batchId}/apply",
5589
+ summary: "Apply Review Queue Corrections",
5590
+ description: "Requires `catalog:write`. Apply up to 100 item corrections across this job's linked scopes using each workflow's existing proposal validation. editedProposal follows the saved workflow proposal shape returned by items; images select existing candidate IDs. Duplicate item corrections are rejected. Product version and gallery checks remain enforced. Once all scopes commit, saved auto-publish requests continue automatically. Use repair-products for corrections to already approved catalog data.",
5591
+ flags: [
5592
+ {
5593
+ name: "batchId",
5594
+ flag: "batch-id",
5595
+ required: true,
5596
+ source: "path"
5597
+ }
5598
+ ],
5599
+ acceptsJsonBody: true,
5600
+ acceptsFile: false,
5601
+ bodyRequired: true
5602
+ },
5583
5603
  {
5584
5604
  trail: ["review-queue", "approve"],
5585
5605
  resourcePath: ["reviewQueue"],
@@ -5587,7 +5607,7 @@ var COMMANDS = [
5587
5607
  httpMethod: "POST",
5588
5608
  path: "/api/v1/review-queue/{batchId}/approve",
5589
5609
  summary: "Approve Review Queue Items",
5590
- description: "Requires `catalog:write`.\n\nApplies up to 100 explicitly selected review item IDs from the job and its linked batches. Approves the saved proposals through the catalog's normal stale-product and gallery checks. Set allowProductChangedOverride explicitly to approve despite an intervening product change. Already applied items are safe to resubmit. Call the publish endpoint separately to release approved changes.",
5610
+ description: "Requires `catalog:write`.\n\nApplies up to 100 explicitly selected review item IDs from the job and its linked batches through the normal stale-product and gallery checks. Already applied items are safe to resubmit. Saved auto-publish requests continue after approval commits and all scopes for that product are applied. Otherwise use publish explicitly. Approval is not confirmation of marketplace publication.",
5591
5611
  flags: [
5592
5612
  {
5593
5613
  name: "batchId",
@@ -5600,6 +5620,83 @@ var COMMANDS = [
5600
5620
  acceptsFile: false,
5601
5621
  bodyRequired: true
5602
5622
  },
5623
+ {
5624
+ trail: ["review-queue", "diagnose"],
5625
+ resourcePath: ["reviewQueue"],
5626
+ methodName: "diagnose",
5627
+ httpMethod: "POST",
5628
+ path: "/api/v1/review-queue/{batchId}/diagnose",
5629
+ summary: "Diagnose Review Product Publishing",
5630
+ description: "Requires `catalog:read`. Diagnose 1\u201325 exact review product or physical variant IDs. Returns current canonical shipping measurements (grams and cm), product facts and images, variant values, exact store/category fields, required/missing attributes, allowed options and the latest publish job's message, code and request ID. No raw provider request bodies or credentials are exposed. Store, variant and attribute-option pages have explicit continuation offsets. success means diagnosis completed; publishReady describes saved catalog validation and does not promise marketplace acceptance. Use product.updatedAt unchanged for repairs. Only targets belonging to this organization and review are accessible.",
5631
+ flags: [
5632
+ {
5633
+ name: "batchId",
5634
+ flag: "batch-id",
5635
+ required: true,
5636
+ source: "path"
5637
+ }
5638
+ ],
5639
+ acceptsJsonBody: true,
5640
+ acceptsFile: false,
5641
+ bodyRequired: true
5642
+ },
5643
+ {
5644
+ trail: ["review-queue", "list-items"],
5645
+ resourcePath: ["reviewQueue"],
5646
+ methodName: "listItems",
5647
+ httpMethod: "GET",
5648
+ path: "/api/v1/review-queue/{batchId}/items",
5649
+ summary: "List Review Queue Item Details",
5650
+ description: "Requires `catalog:read`. Pages through saved proposals, issues, current/baseline/applied snapshots and publish receipts across every scope in this review job. Limit 1\u201350; follow nextOffset until hasMore is false. Repeat productIds to filter up to 50 products. Automation state reports each scope separately; fullyAutomatic describes configuration, not successful approval or publication.",
5651
+ flags: [
5652
+ {
5653
+ name: "batchId",
5654
+ flag: "batch-id",
5655
+ required: true,
5656
+ source: "path"
5657
+ },
5658
+ {
5659
+ name: "organizationId",
5660
+ flag: "organization-id",
5661
+ required: false,
5662
+ source: "query"
5663
+ },
5664
+ {
5665
+ name: "limit",
5666
+ flag: "limit",
5667
+ required: false,
5668
+ source: "query"
5669
+ },
5670
+ {
5671
+ name: "offset",
5672
+ flag: "offset",
5673
+ required: false,
5674
+ source: "query"
5675
+ },
5676
+ {
5677
+ name: "status",
5678
+ flag: "status",
5679
+ required: false,
5680
+ source: "query"
5681
+ },
5682
+ {
5683
+ name: "workflow",
5684
+ flag: "workflow",
5685
+ required: false,
5686
+ source: "query"
5687
+ },
5688
+ {
5689
+ name: "productIds",
5690
+ flag: "product-ids",
5691
+ required: false,
5692
+ source: "query",
5693
+ queryArray: true
5694
+ }
5695
+ ],
5696
+ acceptsJsonBody: false,
5697
+ acceptsFile: false,
5698
+ bodyRequired: false
5699
+ },
5603
5700
  {
5604
5701
  trail: ["review-queue", "publish"],
5605
5702
  resourcePath: ["reviewQueue"],
@@ -5607,7 +5704,7 @@ var COMMANDS = [
5607
5704
  httpMethod: "POST",
5608
5705
  path: "/api/v1/review-queue/{batchId}/publish",
5609
5706
  summary: "Publish Review Queue Products",
5610
- description: "Requires `catalog:sync`.\n\nSpecify productIds and visibility. Only products with all review scopes applied and outstanding releases to assigned marketplace stores are eligible. Optionally filter by marketplaces. Inspect every product and listing result for preparation failures. HTTP 202 confirms queue acceptance. Pass every returned correlation to POST /api/v1/commerce/jobs/await to check marketplace outcomes.",
5707
+ description: "Requires `catalog:sync`.\n\nSpecify productIds and visibility. Only products with all review scopes applied and outstanding releases to assigned marketplace stores are eligible. Optionally filter by marketplaces and exact storeTargets to publish only repaired or failed stores. Inspect every product and listing result for preparation failures. HTTP 202 confirms queue acceptance. Pass every returned correlation to POST /api/v1/commerce/jobs/await and verify marketplace state before reporting publication.",
5611
5708
  flags: [
5612
5709
  {
5613
5710
  name: "batchId",
@@ -5620,6 +5717,59 @@ var COMMANDS = [
5620
5717
  acceptsFile: false,
5621
5718
  bodyRequired: true
5622
5719
  },
5720
+ {
5721
+ trail: ["review-queue", "repair-products"],
5722
+ resourcePath: ["reviewQueue"],
5723
+ methodName: "repairProducts",
5724
+ httpMethod: "POST",
5725
+ path: "/api/v1/review-queue/{batchId}/repair-products",
5726
+ summary: "Repair Approved Review Products",
5727
+ description: "Requires `catalog:write`. Correct 1\u201325 already approved products with expectedUpdatedAt copied exactly from diagnosis. Patches only supplied weight (grams), complete package dimensions (cm) and exact assigned-store category attributes. Validates keys and fixed-choice values against current marketplace metadata. Records evidence URLs and the initiating actor in review history. Conflicting versions and pending review scopes fail explicitly; correct pending proposals through apply first. Shared category attributes belong to the parent; variant values use the variant API. Does not approve or publish implicitly. Reload diagnosis and publish exact repaired stores after success. Duplicate product corrections are rejected.",
5728
+ flags: [
5729
+ {
5730
+ name: "batchId",
5731
+ flag: "batch-id",
5732
+ required: true,
5733
+ source: "path"
5734
+ }
5735
+ ],
5736
+ acceptsJsonBody: true,
5737
+ acceptsFile: false,
5738
+ bodyRequired: true
5739
+ },
5740
+ {
5741
+ trail: ["review-queue", "retry"],
5742
+ resourcePath: ["reviewQueue"],
5743
+ methodName: "retry",
5744
+ httpMethod: "POST",
5745
+ path: "/api/v1/review-queue/{batchId}/retry",
5746
+ summary: "Retry Review Queue Processing",
5747
+ description: "Requires `catalog:write`. Explicitly restart existing durable review processing. scope defaults to failed; unfinished also includes unapplied work; all may regenerate applied proposals. Optionally restrict workflow and use a supported review model. No polling schedule is created. Read items to observe processing; this does not confirm publication.",
5748
+ flags: [
5749
+ {
5750
+ name: "batchId",
5751
+ flag: "batch-id",
5752
+ required: true,
5753
+ source: "path"
5754
+ }
5755
+ ],
5756
+ acceptsJsonBody: true,
5757
+ acceptsFile: false,
5758
+ bodyRequired: true
5759
+ },
5760
+ {
5761
+ trail: ["review-queue", "enable-automation"],
5762
+ resourcePath: ["reviewQueue"],
5763
+ methodName: "enableAutomation",
5764
+ httpMethod: "POST",
5765
+ path: "/api/v1/review-queue/automation",
5766
+ summary: "Enable Review Queue Automation",
5767
+ description: "Requires both `catalog:write` and `catalog:sync`. Enable auto approval for enrichment, taxonomy and images plus saved auto-publish requests on 1\u2013100 existing root review jobs, through the same durable worker as the app. Applies eligible proposals and continues publishing after all scopes commit. Blocked or unverified facts remain visible for the bot to diagnose and correct. Read items.automation for per-scope configuration and publishing for actual outcomes. Inspect every batch result; acceptance does not mean the job is already fully automatic or published.",
5768
+ flags: [],
5769
+ acceptsJsonBody: true,
5770
+ acceptsFile: false,
5771
+ bodyRequired: true
5772
+ },
5623
5773
  {
5624
5774
  trail: ["review-queue", "get-settings"],
5625
5775
  resourcePath: ["reviewQueue"],
@@ -5627,7 +5777,7 @@ var COMMANDS = [
5627
5777
  httpMethod: "GET",
5628
5778
  path: "/api/v1/review-queue/settings",
5629
5779
  summary: "Get Review Queue Settings",
5630
- description: "Requires catalog:review-settings for bearer credentials and company settings read permission for delegated users.\n\nReturns the organization defaults for enrichment and taxonomy auto-apply confidence.",
5780
+ description: "Requires catalog:review-settings for bearer credentials and company settings read permission for delegated users.\n\nReturns the organization auto-apply switch and enrichment/taxonomy confidence defaults.",
5631
5781
  flags: [
5632
5782
  {
5633
5783
  name: "organizationId",
@@ -5647,7 +5797,7 @@ var COMMANDS = [
5647
5797
  httpMethod: "PATCH",
5648
5798
  path: "/api/v1/review-queue/settings",
5649
5799
  summary: "Update Review Queue Settings",
5650
- description: "Requires catalog:review-settings for bearer credentials and company settings write permission for delegated users.\n\nUpdate either or both thresholds from 0.50 to 1.00. Existing review jobs retain their saved settings.",
5800
+ description: "Requires catalog:review-settings for bearer credentials and company settings write permission for delegated users.\n\nSet autoApplyHighConfidence and/or confidence thresholds from 0.50 to 1.00. Existing review jobs retain their saved settings.",
5651
5801
  flags: [],
5652
5802
  acceptsJsonBody: true,
5653
5803
  acceptsFile: false,