@omni-commerce/sdk 0.33.0 → 0.34.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 +2 -0
- package/dist/index.cjs +115 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1140 -74
- package/dist/index.d.ts +1140 -74
- package/dist/index.js +115 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @omni-commerce/sdk
|
|
2
2
|
|
|
3
|
+
SDK 0.34.0 adds paginated review details, structured publish diagnosis, version-checked product repairs, exact-store publishing and full review automation. See the [Review queue guide](https://docs.omnicommerce.sg/guides/review-queue). These methods require the matching server release.
|
|
4
|
+
|
|
3
5
|
TypeScript SDK 0.33.0 adds `client.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
|
SDK 0.32.0 adds resumable catalog plans and iterable helpers for large pricing, record import, and enrichment jobs. See the [Catalog operations guide](https://docs.omnicommerce.sg/sdk/catalog-operations).
|
package/dist/index.cjs
CHANGED
|
@@ -35,7 +35,7 @@ function normalizeClientOptions(options = {}) {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
// src/version.ts
|
|
38
|
-
var SDK_VERSION = "0.
|
|
38
|
+
var SDK_VERSION = "0.34.0";
|
|
39
39
|
var SDK_USER_AGENT = `omnicommerce-js/${SDK_VERSION}`;
|
|
40
40
|
|
|
41
41
|
// src/environments.ts
|
|
@@ -5296,12 +5296,29 @@ var ReviewQueueClient = class {
|
|
|
5296
5296
|
...mergeRequestOptions(requestOptions)
|
|
5297
5297
|
});
|
|
5298
5298
|
}
|
|
5299
|
+
/**
|
|
5300
|
+
* Apply Review Queue Corrections
|
|
5301
|
+
*
|
|
5302
|
+
* 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.
|
|
5303
|
+
*
|
|
5304
|
+
* `POST /api/v1/review-queue/{batchId}/apply`
|
|
5305
|
+
*/
|
|
5306
|
+
apply(request, requestOptions) {
|
|
5307
|
+
const { batchId, ...body } = request ?? {};
|
|
5308
|
+
return this._http.request({
|
|
5309
|
+
method: "POST",
|
|
5310
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/apply`,
|
|
5311
|
+
query: void 0,
|
|
5312
|
+
body,
|
|
5313
|
+
...mergeRequestOptions(requestOptions)
|
|
5314
|
+
});
|
|
5315
|
+
}
|
|
5299
5316
|
/**
|
|
5300
5317
|
* Approve Review Queue Items
|
|
5301
5318
|
*
|
|
5302
5319
|
* Requires `catalog:write`.
|
|
5303
5320
|
|
|
5304
|
-
Applies up to 100 explicitly selected review item IDs from the job and its linked batches
|
|
5321
|
+
Applies 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.
|
|
5305
5322
|
*
|
|
5306
5323
|
* `POST /api/v1/review-queue/{batchId}/approve`
|
|
5307
5324
|
*/
|
|
@@ -5315,12 +5332,54 @@ var ReviewQueueClient = class {
|
|
|
5315
5332
|
...mergeRequestOptions(requestOptions)
|
|
5316
5333
|
});
|
|
5317
5334
|
}
|
|
5335
|
+
/**
|
|
5336
|
+
* Diagnose Review Product Publishing
|
|
5337
|
+
*
|
|
5338
|
+
* Requires `catalog:read`. Diagnose 1–25 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.
|
|
5339
|
+
*
|
|
5340
|
+
* `POST /api/v1/review-queue/{batchId}/diagnose`
|
|
5341
|
+
*/
|
|
5342
|
+
diagnose(request, requestOptions) {
|
|
5343
|
+
const { batchId, ...body } = request ?? {};
|
|
5344
|
+
return this._http.request({
|
|
5345
|
+
method: "POST",
|
|
5346
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/diagnose`,
|
|
5347
|
+
query: void 0,
|
|
5348
|
+
body,
|
|
5349
|
+
...mergeRequestOptions(requestOptions)
|
|
5350
|
+
});
|
|
5351
|
+
}
|
|
5352
|
+
/**
|
|
5353
|
+
* List Review Queue Item Details
|
|
5354
|
+
*
|
|
5355
|
+
* Requires `catalog:read`. Pages through saved proposals, issues, current/baseline/applied snapshots and publish receipts across every scope in this review job. Limit 1–50; 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.
|
|
5356
|
+
*
|
|
5357
|
+
* `GET /api/v1/review-queue/{batchId}/items`
|
|
5358
|
+
*/
|
|
5359
|
+
listItems(request, requestOptions) {
|
|
5360
|
+
const {
|
|
5361
|
+
batchId,
|
|
5362
|
+
organizationId,
|
|
5363
|
+
limit,
|
|
5364
|
+
offset,
|
|
5365
|
+
status,
|
|
5366
|
+
workflow,
|
|
5367
|
+
productIds
|
|
5368
|
+
} = request ?? {};
|
|
5369
|
+
return this._http.request({
|
|
5370
|
+
method: "GET",
|
|
5371
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/items`,
|
|
5372
|
+
query: { organizationId, limit, offset, status, workflow, productIds },
|
|
5373
|
+
body: void 0,
|
|
5374
|
+
...mergeRequestOptions(requestOptions)
|
|
5375
|
+
});
|
|
5376
|
+
}
|
|
5318
5377
|
/**
|
|
5319
5378
|
* Publish Review Queue Products
|
|
5320
5379
|
*
|
|
5321
5380
|
* Requires `catalog:sync`.
|
|
5322
5381
|
|
|
5323
|
-
Specify 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
|
|
5382
|
+
Specify 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.
|
|
5324
5383
|
*
|
|
5325
5384
|
* `POST /api/v1/review-queue/{batchId}/publish`
|
|
5326
5385
|
*/
|
|
@@ -5334,12 +5393,63 @@ var ReviewQueueClient = class {
|
|
|
5334
5393
|
...mergeRequestOptions(requestOptions)
|
|
5335
5394
|
});
|
|
5336
5395
|
}
|
|
5396
|
+
/**
|
|
5397
|
+
* Repair Approved Review Products
|
|
5398
|
+
*
|
|
5399
|
+
* Requires `catalog:write`. Correct 1–25 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.
|
|
5400
|
+
*
|
|
5401
|
+
* `POST /api/v1/review-queue/{batchId}/repair-products`
|
|
5402
|
+
*/
|
|
5403
|
+
repairProducts(request, requestOptions) {
|
|
5404
|
+
const { batchId, ...body } = request ?? {};
|
|
5405
|
+
return this._http.request({
|
|
5406
|
+
method: "POST",
|
|
5407
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/repair-products`,
|
|
5408
|
+
query: void 0,
|
|
5409
|
+
body,
|
|
5410
|
+
...mergeRequestOptions(requestOptions)
|
|
5411
|
+
});
|
|
5412
|
+
}
|
|
5413
|
+
/**
|
|
5414
|
+
* Retry Review Queue Processing
|
|
5415
|
+
*
|
|
5416
|
+
* 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.
|
|
5417
|
+
*
|
|
5418
|
+
* `POST /api/v1/review-queue/{batchId}/retry`
|
|
5419
|
+
*/
|
|
5420
|
+
retry(request, requestOptions) {
|
|
5421
|
+
const { batchId, ...body } = request ?? {};
|
|
5422
|
+
return this._http.request({
|
|
5423
|
+
method: "POST",
|
|
5424
|
+
path: `/api/v1/review-queue/${encodePathParam("batchId", batchId)}/retry`,
|
|
5425
|
+
query: void 0,
|
|
5426
|
+
body,
|
|
5427
|
+
...mergeRequestOptions(requestOptions)
|
|
5428
|
+
});
|
|
5429
|
+
}
|
|
5430
|
+
/**
|
|
5431
|
+
* Enable Review Queue Automation
|
|
5432
|
+
*
|
|
5433
|
+
* Requires both `catalog:write` and `catalog:sync`. Enable auto approval for enrichment, taxonomy and images plus saved auto-publish requests on 1–100 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.
|
|
5434
|
+
*
|
|
5435
|
+
* `POST /api/v1/review-queue/automation`
|
|
5436
|
+
*/
|
|
5437
|
+
enableAutomation(request, requestOptions) {
|
|
5438
|
+
const { ...body } = request ?? {};
|
|
5439
|
+
return this._http.request({
|
|
5440
|
+
method: "POST",
|
|
5441
|
+
path: "/api/v1/review-queue/automation",
|
|
5442
|
+
query: void 0,
|
|
5443
|
+
body,
|
|
5444
|
+
...mergeRequestOptions(requestOptions)
|
|
5445
|
+
});
|
|
5446
|
+
}
|
|
5337
5447
|
/**
|
|
5338
5448
|
* Get Review Queue Settings
|
|
5339
5449
|
*
|
|
5340
5450
|
* Requires catalog:review-settings for bearer credentials and company settings read permission for delegated users.
|
|
5341
5451
|
|
|
5342
|
-
Returns the organization
|
|
5452
|
+
Returns the organization auto-apply switch and enrichment/taxonomy confidence defaults.
|
|
5343
5453
|
*
|
|
5344
5454
|
* `GET /api/v1/review-queue/settings`
|
|
5345
5455
|
*/
|
|
@@ -5358,7 +5468,7 @@ var ReviewQueueClient = class {
|
|
|
5358
5468
|
*
|
|
5359
5469
|
* Requires catalog:review-settings for bearer credentials and company settings write permission for delegated users.
|
|
5360
5470
|
|
|
5361
|
-
|
|
5471
|
+
Set autoApplyHighConfidence and/or confidence thresholds from 0.50 to 1.00. Existing review jobs retain their saved settings.
|
|
5362
5472
|
*
|
|
5363
5473
|
* `PATCH /api/v1/review-queue/settings`
|
|
5364
5474
|
*/
|