@tokenoftrust/cli 6.12.4 → 6.12.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/cli",
3
- "version": "6.12.4",
3
+ "version": "6.12.5",
4
4
  "description": "Token of Trust developer CLI — clone a tenant store, run it locally with save→reload, and submit it for preview. Installs the `tot` command.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Token of Trust",
@@ -248,8 +248,11 @@ export const MANIFEST_WEBHOOK_TOPICS = [
248
248
  "catalog.product.updated",
249
249
  "inventory.changed",
250
250
  "order.created",
251
+ "order.paid",
251
252
  "order.fulfilled",
252
253
  "order.partially_fulfilled",
254
+ "order.cancelled",
255
+ "order.updated",
253
256
  "customer.marketing_consent.updated",
254
257
  "attribution.finalized",
255
258
  "fulfillment.assignment.created",
@@ -264,7 +267,7 @@ export const MANIFEST_TELEMETRY_MODES = ["errors-only", "sampled", "full"];
264
267
 
265
268
  export const MANIFEST_PII_REDACTIONS = ["default", "strict"];
266
269
 
267
- export const INVENTORY_CHANGED_KEYS = ["sku", "locationId", "balance", "asOf"];
270
+ export const INVENTORY_CHANGED_KEYS = ["sku", "locationId", "balance", "available", "asOf"];
268
271
 
269
272
  const LOCATION_ID_PATTERN = /^[A-Za-z0-9._:-]{1,128}$/;
270
273
  const ISO_DATE_TIME_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/;
@@ -580,6 +583,10 @@ export function validateInventoryChangedData(input) {
580
583
  if (typeof balance !== "number" || !Number.isSafeInteger(balance)) {
581
584
  errors.push("data.balance: must be a safe integer");
582
585
  }
586
+ const available = input.available;
587
+ if (typeof available !== "number" || !Number.isSafeInteger(available)) {
588
+ errors.push("data.available: must be a safe integer");
589
+ }
583
590
  const asOf = requireString(input, "asOf", "data", errors);
584
591
  if (asOf !== undefined && (!ISO_DATE_TIME_PATTERN.test(asOf) || Number.isNaN(Date.parse(asOf)))) {
585
592
  errors.push("data.asOf: must be an ISO-8601 date-time string");
@@ -591,6 +598,7 @@ export function validateInventoryChangedData(input) {
591
598
  sku,
592
599
  locationId,
593
600
  balance,
601
+ available,
594
602
  asOf,
595
603
  },
596
604
  };