@endora-commerce/contracts 0.103.0 → 0.104.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 (63) hide show
  1. package/dist/admin-actions.d.ts +5 -0
  2. package/dist/admin-actions.d.ts.map +1 -1
  3. package/dist/admin-actions.js +5 -0
  4. package/dist/admin-actions.js.map +1 -1
  5. package/dist/admin-contributions.d.ts +41 -0
  6. package/dist/admin-contributions.d.ts.map +1 -1
  7. package/dist/admin-contributions.js +58 -0
  8. package/dist/admin-contributions.js.map +1 -1
  9. package/dist/admin-notifications.d.ts +37 -0
  10. package/dist/admin-notifications.d.ts.map +1 -1
  11. package/dist/assets-library.d.ts +8 -0
  12. package/dist/assets-library.d.ts.map +1 -1
  13. package/dist/assets-library.js +2 -0
  14. package/dist/assets-library.js.map +1 -1
  15. package/dist/auth.d.ts +17 -1
  16. package/dist/auth.d.ts.map +1 -1
  17. package/dist/carts.d.ts +26 -1
  18. package/dist/carts.d.ts.map +1 -1
  19. package/dist/catalog.d.ts +64 -3
  20. package/dist/catalog.d.ts.map +1 -1
  21. package/dist/catalog.js +92 -0
  22. package/dist/catalog.js.map +1 -1
  23. package/dist/common.d.ts +17 -0
  24. package/dist/common.d.ts.map +1 -1
  25. package/dist/common.js +22 -0
  26. package/dist/common.js.map +1 -1
  27. package/dist/crm.d.ts +2903 -0
  28. package/dist/crm.d.ts.map +1 -0
  29. package/dist/crm.js +1191 -0
  30. package/dist/crm.js.map +1 -0
  31. package/dist/custom-fields.d.ts +4 -0
  32. package/dist/custom-fields.d.ts.map +1 -1
  33. package/dist/custom-fields.js +4 -0
  34. package/dist/custom-fields.js.map +1 -1
  35. package/dist/errors.d.ts +29 -0
  36. package/dist/errors.d.ts.map +1 -1
  37. package/dist/errors.js +32 -0
  38. package/dist/errors.js.map +1 -1
  39. package/dist/index.d.ts +2 -0
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +3 -0
  42. package/dist/index.js.map +1 -1
  43. package/dist/languages.d.ts +39 -4
  44. package/dist/languages.d.ts.map +1 -1
  45. package/dist/modules.d.ts +3 -0
  46. package/dist/modules.d.ts.map +1 -1
  47. package/dist/orders.d.ts +15 -0
  48. package/dist/orders.d.ts.map +1 -1
  49. package/dist/orders.js +7 -1
  50. package/dist/orders.js.map +1 -1
  51. package/dist/pim-connector.d.ts +1 -1
  52. package/dist/product-feeds.d.ts +15 -15
  53. package/dist/quote-requests.d.ts +20 -0
  54. package/dist/quote-requests.d.ts.map +1 -1
  55. package/dist/quote-requests.js +9 -1
  56. package/dist/quote-requests.js.map +1 -1
  57. package/dist/storefront-cache-tags.d.ts +65 -0
  58. package/dist/storefront-cache-tags.d.ts.map +1 -0
  59. package/dist/storefront-cache-tags.js +47 -0
  60. package/dist/storefront-cache-tags.js.map +1 -0
  61. package/dist/webhooks.d.ts +40 -0
  62. package/dist/webhooks.d.ts.map +1 -1
  63. package/package.json +1 -1
@@ -66,4 +66,44 @@ export declare const webhookDeliverySchema: z.ZodObject<{
66
66
  createdAt: z.ZodString;
67
67
  }, z.core.$strip>;
68
68
  export type WebhookDelivery = z.infer<typeof webhookDeliverySchema>;
69
+ /** One event type a module offers for outbound delivery. */
70
+ export interface WebhookEventDescriptor {
71
+ /** The contributing module — an absent owner's event types are not offered. */
72
+ readonly ownerModuleId: string;
73
+ /** A versioned EventBus event name, e.g. `crm.opportunity.status_changed.v1`. */
74
+ readonly eventType: string;
75
+ }
76
+ /**
77
+ * Container name: `webhookEventRegistry`. Owner: `webhooks`.
78
+ *
79
+ * The registry a module pushes the event types it offers into. `webhooks`
80
+ * names no contributor's event: a pushed type is bridged to the delivery queue
81
+ * exactly as the built-in ones are, and offered on the subscription form.
82
+ *
83
+ * A **contribution seam**: contributors push from a contribution-only boot hook
84
+ * and read nothing back, so the registration is a plain `ctx.di.register`
85
+ * rather than a `providePort` — a boot hook that resolved a gate would stop the
86
+ * backend from starting whenever `webhooks` was switched off. The contributor
87
+ * declares the edge as `contributes-to`; nothing of the contributor degrades
88
+ * without it.
89
+ *
90
+ * **Owner off:** a pushed type is recorded all the same, and nothing is
91
+ * delivered — the bridge is `webhooks`' own gated subscription, so it does not
92
+ * run. Events emitted meanwhile are not delivered later.
93
+ *
94
+ * **Enumeration policy: an absent contributor's event types are not offered.**
95
+ * `list()` leaves out a type whose owner is not effectively present, so the
96
+ * subscription form does not offer an event nothing can emit. Existing
97
+ * subscriptions naming it stay stored and simply receive nothing; they receive
98
+ * again when the owner is back. `owners()` stays presence-blind, for
99
+ * diagnostics and for the composition tests that assert who contributed.
100
+ */
101
+ export interface WebhookEventRegistryPort {
102
+ /** Idempotent per event type: the same type pushed twice is bridged once. */
103
+ register(descriptor: WebhookEventDescriptor): void;
104
+ /** The contributing module of every registered type, in registration order, each once. */
105
+ owners(): readonly string[];
106
+ /** Event types whose owner is effectively present, in registration order. */
107
+ list(): readonly WebhookEventDescriptor[];
108
+ }
69
109
  //# sourceMappingURL=webhooks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../src/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AAEH,eAAO,MAAM,mBAAmB;;;EAA+B,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa;;;;;;;;;;;;iBAcxB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,eAAO,MAAM,0BAA0B;;;;;iBAMrC,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,0BAA0B;;;;;;;;;iBAErC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;EAMtC,CA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M,IAAI,SAAS,MAAM,EAAE,CAAC;IAC5B,6EAA6E;IAC7E,IAAI,IAAI,SAAS,sBAAsB,EAAE,CAAC;CAC3C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@endora-commerce/contracts",
3
- "version": "0.103.0",
3
+ "version": "0.104.0",
4
4
  "type": "module",
5
5
  "description": "Source-of-truth Zod schemas shared across backend, storefront, admin (Principle V). The backend regenerates its live OpenAPI document from these at startup.",
6
6
  "license": "MIT",