@omni-commerce/sdk 0.18.0 → 0.20.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 +17 -0
- package/dist/index.cjs +661 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18018 -13264
- package/dist/index.d.ts +18018 -13264
- package/dist/index.js +661 -11
- 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.20.0 adds headless campaign import, validators, Full sync approval/run, lifecycle batches, and promotion publishing, modification, deletion and delivery checks. See [Campaign automation](https://docs.omnicommerce.sg/guides/campaign-automation). API clients can be explicitly named campaign approvers; browser cookies are unnecessary.
|
|
4
|
+
|
|
3
5
|
TypeScript / JavaScript client for the [OmniCommerce API](https://docs.omnicommerce.sg/api-reference).
|
|
4
6
|
|
|
5
7
|
The client is generated from the public OpenAPI spec so every documented REST endpoint is typed. The npm org is `@omni-commerce` because the unscoped `omnicommerce` name is reserved.
|
|
@@ -317,3 +319,18 @@ yarn sdk:generate
|
|
|
317
319
|
That refreshes `docs/openapi.json`, the OpenAPI TypeScript types, and `src/generated/resources.ts`.
|
|
318
320
|
|
|
319
321
|
With SDK 0.8.1, website widgets load saved Storefront appearance by deployment ID. Install the generated deployment-only snippet once; saving an agent or design change updates the next website load. Explicit appearance options override saved values. The `ready` promise resolves after configuration loads, or rejects on an error reported to `onError`.
|
|
322
|
+
|
|
323
|
+
## Commerce jobs and verification
|
|
324
|
+
|
|
325
|
+
SDK 0.19.0 adds the shared waiter and fresh marketplace state verifier. Pass every correlation returned by order/return submissions. Catalog jobs can join the wait batch; product state verification uses productIds/expected or per-product targets.
|
|
326
|
+
|
|
327
|
+
```ts
|
|
328
|
+
const correlations = submitted.data.correlations;
|
|
329
|
+
const progress = await client.commerce.awaitJobs({
|
|
330
|
+
correlations,
|
|
331
|
+
timeoutMs: 30000,
|
|
332
|
+
});
|
|
333
|
+
const verified = await client.commerce.verifyState({ correlations });
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
Inspect every result and pending/failed counts. Acceptance alone does not establish marketplace state; uncertain outcomes must not be automatically resubmitted. See [Commerce verification](https://docs.omnicommerce.sg/guides/commerce-verification).
|