@01.software/sdk 0.51.0 → 0.56.1

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 (51) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/README.md +54 -11
  3. package/dist/client.cjs +420 -53
  4. package/dist/client.cjs.map +1 -1
  5. package/dist/client.d.cts +6 -6
  6. package/dist/client.d.ts +6 -6
  7. package/dist/client.js +420 -53
  8. package/dist/client.js.map +1 -1
  9. package/dist/{collection-client-hYvVfHIm.d.ts → collection-client-Bmr53saa.d.ts} +4 -4
  10. package/dist/{collection-client-CWAeuzV4.d.cts → collection-client-DxuBDso_.d.cts} +4 -4
  11. package/dist/{const-D8LixhAJ.d.cts → const-BKUqg96Q.d.ts} +2 -2
  12. package/dist/{const-JD8obaKg.d.ts → const-Cv1DCsp6.d.cts} +2 -2
  13. package/dist/{index-Bu0kCc6o.d.cts → index-CGsT4AQ8.d.cts} +24 -7
  14. package/dist/{index-B0Hjh3Ey.d.ts → index-DFHLLqYu.d.ts} +24 -7
  15. package/dist/index.cjs +434 -55
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +11 -10
  18. package/dist/index.d.ts +11 -10
  19. package/dist/index.js +434 -55
  20. package/dist/index.js.map +1 -1
  21. package/dist/{payload-types-BOsckg8B.d.cts → payload-types-Bk-duc5k.d.cts} +295 -100
  22. package/dist/{payload-types-BOsckg8B.d.ts → payload-types-Bk-duc5k.d.ts} +295 -100
  23. package/dist/query.cjs +14 -1
  24. package/dist/query.cjs.map +1 -1
  25. package/dist/query.d.cts +5 -5
  26. package/dist/query.d.ts +5 -5
  27. package/dist/query.js +14 -1
  28. package/dist/query.js.map +1 -1
  29. package/dist/realtime.d.cts +2 -2
  30. package/dist/realtime.d.ts +2 -2
  31. package/dist/server.cjs +98 -13
  32. package/dist/server.cjs.map +1 -1
  33. package/dist/server.d.cts +9 -8
  34. package/dist/server.d.ts +9 -8
  35. package/dist/server.js +98 -13
  36. package/dist/server.js.map +1 -1
  37. package/dist/{types-Bj8j7VHU.d.ts → types-CEK8uTvU.d.ts} +212 -11
  38. package/dist/{types-B14sEt1z.d.cts → types-CNdpj2fI.d.cts} +2 -2
  39. package/dist/{types-5ZlcAFuU.d.ts → types-D4mjGFj4.d.ts} +2 -2
  40. package/dist/{types-CM5qiR2k.d.cts → types-Dhk5NX7Z.d.cts} +212 -11
  41. package/dist/ui/form.d.cts +1 -1
  42. package/dist/ui/form.d.ts +1 -1
  43. package/dist/ui/video.d.cts +1 -1
  44. package/dist/ui/video.d.ts +1 -1
  45. package/dist/webhook.cjs +13 -2
  46. package/dist/webhook.cjs.map +1 -1
  47. package/dist/webhook.d.cts +5 -5
  48. package/dist/webhook.d.ts +5 -5
  49. package/dist/webhook.js +13 -2
  50. package/dist/webhook.js.map +1 -1
  51. package/package.json +6 -5
@@ -1,8 +1,8 @@
1
- import { G as DebugConfig, ak as RetryConfig, i as ApiQueryOptions, P as PayloadFindResponse, L as PayloadMutationResponse, c3 as ApiDeleteOptions, c4 as PublicReadQueryOptions } from './types-Bj8j7VHU.js';
2
- import './payload-types-BOsckg8B.js';
1
+ import { G as DebugConfig, ak as RetryConfig, i as ApiQueryOptions, P as PayloadFindResponse, L as PayloadMutationResponse, cf as ApiDeleteOptions, cg as PublicReadQueryOptions } from './types-CEK8uTvU.js';
2
+ import './payload-types-Bk-duc5k.js';
3
3
  import { GenerateMetadataOptions, Metadata } from './metadata.js';
4
- import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-JD8obaKg.js';
5
- import { C as CollectionType } from './types-5ZlcAFuU.js';
4
+ import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-BKUqg96Q.js';
5
+ import { C as CollectionType } from './types-D4mjGFj4.js';
6
6
 
7
7
  interface FetchOptions extends RequestInit {
8
8
  apiUrl?: string;
@@ -1,8 +1,8 @@
1
- import { G as DebugConfig, ak as RetryConfig, i as ApiQueryOptions, P as PayloadFindResponse, L as PayloadMutationResponse, c3 as ApiDeleteOptions, c4 as PublicReadQueryOptions } from './types-CM5qiR2k.cjs';
2
- import './payload-types-BOsckg8B.cjs';
1
+ import { G as DebugConfig, ak as RetryConfig, i as ApiQueryOptions, P as PayloadFindResponse, L as PayloadMutationResponse, cf as ApiDeleteOptions, cg as PublicReadQueryOptions } from './types-Dhk5NX7Z.cjs';
2
+ import './payload-types-Bk-duc5k.cjs';
3
3
  import { GenerateMetadataOptions, Metadata } from './metadata.cjs';
4
- import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-D8LixhAJ.cjs';
5
- import { C as CollectionType } from './types-B14sEt1z.cjs';
4
+ import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-Cv1DCsp6.cjs';
5
+ import { C as CollectionType } from './types-CNdpj2fI.cjs';
6
6
 
7
7
  interface FetchOptions extends RequestInit {
8
8
  apiUrl?: string;
@@ -1,10 +1,10 @@
1
- import './payload-types-BOsckg8B.cjs';
1
+ import './payload-types-Bk-duc5k.js';
2
2
 
3
3
  /**
4
4
  * Internal collections that should not be exposed via SDK.
5
5
  * Includes Payload system collections and admin-only collections.
6
6
  */
7
- declare const INTERNAL_COLLECTIONS: readonly ["users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations", "payload-folders", "field-configs", "system-media", "track-assets", "audiences", "email-logs", "api-usage", "tenant-analytics-daily", "tenant-web-analytics-config", "analytics-event-schemas", "subscriptions", "billing-history", "usage-rate-cards", "usage-invoices", "inventory-reservations", "inventory-adjustments", "payment-sessions", "payment-event-inbox", "payment-refund-attempts", "portone-payment-interactions", "commerce-payment-webhook-routes", "commerce-notification-intents", "commerce-idempotency-records", "product-collection-items", "order-status-logs", "fulfillment-events", "tenant-commerce-config", "customer-oauth-clients", "api-keys", "personal-access-tokens", "tenant-entitlements", "tenant-purge-jobs", "direct-upload-sessions", "webhook-events", "webhook-deliveries", "webhook-outbox-deliveries", "audit-logs", "plans", "webhooks", "custom-field-definitions", "event-registrations", "event-admission-holds", "event-admission-types", "customer-payment-methods", "tenant-payment-credentials", "commerce-payment-accounts", "payment-provider-customer-aliases"];
7
+ declare const INTERNAL_COLLECTIONS: readonly ["users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations", "payload-folders", "field-configs", "system-media", "track-assets", "audiences", "email-logs", "api-usage", "tenant-analytics-daily", "tenant-web-analytics-config", "analytics-event-schemas", "subscriptions", "billing-history", "usage-rate-cards", "usage-invoices", "inventory-reservations", "inventory-adjustments", "payment-sessions", "payment-event-inbox", "payment-refund-attempts", "portone-payment-interactions", "commerce-payment-webhook-routes", "commerce-notification-intents", "commerce-idempotency-records", "product-collection-items", "order-status-logs", "fulfillment-events", "tenant-commerce-config", "customer-oauth-clients", "customer-group-grants", "api-keys", "personal-access-tokens", "tenant-entitlements", "tenant-purge-jobs", "direct-upload-sessions", "webhook-events", "webhook-deliveries", "webhook-outbox-deliveries", "audit-logs", "plans", "webhooks", "custom-field-definitions", "event-registrations", "event-admission-holds", "event-admission-types", "customer-payment-methods", "tenant-payment-credentials", "commerce-payment-accounts", "payment-provider-customer-aliases"];
8
8
  type InternalCollection = (typeof INTERNAL_COLLECTIONS)[number];
9
9
  /**
10
10
  * Array of browser-public collection names for runtime use (e.g., Zod enum validation).
@@ -1,10 +1,10 @@
1
- import './payload-types-BOsckg8B.js';
1
+ import './payload-types-Bk-duc5k.cjs';
2
2
 
3
3
  /**
4
4
  * Internal collections that should not be exposed via SDK.
5
5
  * Includes Payload system collections and admin-only collections.
6
6
  */
7
- declare const INTERNAL_COLLECTIONS: readonly ["users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations", "payload-folders", "field-configs", "system-media", "track-assets", "audiences", "email-logs", "api-usage", "tenant-analytics-daily", "tenant-web-analytics-config", "analytics-event-schemas", "subscriptions", "billing-history", "usage-rate-cards", "usage-invoices", "inventory-reservations", "inventory-adjustments", "payment-sessions", "payment-event-inbox", "payment-refund-attempts", "portone-payment-interactions", "commerce-payment-webhook-routes", "commerce-notification-intents", "commerce-idempotency-records", "product-collection-items", "order-status-logs", "fulfillment-events", "tenant-commerce-config", "customer-oauth-clients", "api-keys", "personal-access-tokens", "tenant-entitlements", "tenant-purge-jobs", "direct-upload-sessions", "webhook-events", "webhook-deliveries", "webhook-outbox-deliveries", "audit-logs", "plans", "webhooks", "custom-field-definitions", "event-registrations", "event-admission-holds", "event-admission-types", "customer-payment-methods", "tenant-payment-credentials", "commerce-payment-accounts", "payment-provider-customer-aliases"];
7
+ declare const INTERNAL_COLLECTIONS: readonly ["users", "payload-kv", "payload-locked-documents", "payload-preferences", "payload-migrations", "payload-folders", "field-configs", "system-media", "track-assets", "audiences", "email-logs", "api-usage", "tenant-analytics-daily", "tenant-web-analytics-config", "analytics-event-schemas", "subscriptions", "billing-history", "usage-rate-cards", "usage-invoices", "inventory-reservations", "inventory-adjustments", "payment-sessions", "payment-event-inbox", "payment-refund-attempts", "portone-payment-interactions", "commerce-payment-webhook-routes", "commerce-notification-intents", "commerce-idempotency-records", "product-collection-items", "order-status-logs", "fulfillment-events", "tenant-commerce-config", "customer-oauth-clients", "customer-group-grants", "api-keys", "personal-access-tokens", "tenant-entitlements", "tenant-purge-jobs", "direct-upload-sessions", "webhook-events", "webhook-deliveries", "webhook-outbox-deliveries", "audit-logs", "plans", "webhooks", "custom-field-definitions", "event-registrations", "event-admission-holds", "event-admission-types", "customer-payment-methods", "tenant-payment-credentials", "commerce-payment-accounts", "payment-provider-customer-aliases"];
8
8
  type InternalCollection = (typeof INTERNAL_COLLECTIONS)[number];
9
9
  /**
10
10
  * Array of browser-public collection names for runtime use (e.g., Zod enum validation).
@@ -1,6 +1,6 @@
1
- import { C as Collection } from './const-D8LixhAJ.cjs';
2
- import { C as CollectionType } from './types-B14sEt1z.cjs';
3
- import './payload-types-BOsckg8B.cjs';
1
+ import { C as Collection } from './const-Cv1DCsp6.cjs';
2
+ import { C as CollectionType } from './types-CNdpj2fI.cjs';
3
+ import './payload-types-Bk-duc5k.cjs';
4
4
 
5
5
  type WebhookOperation = string;
6
6
  /**
@@ -76,15 +76,25 @@ type OrderChangedWebhookEvent<T extends Collection | string = Collection, TData
76
76
  change: WebhookOrderChange;
77
77
  };
78
78
  declare const COMMERCE_NOTIFICATION_OPERATION: "notification";
79
- declare const COMMERCE_NOTIFICATION_EVENTS: readonly ["orderPaid", "orderCanceled", "fulfillmentShipped", "orderDelivered", "returnRequested", "returnApproved", "returnRejected", "returnCanceled", "returnCompleted", "paymentReconciliationRequired", "paymentRefundRequiresAttention"];
79
+ declare const COMMERCE_NOTIFICATION_EVENTS: readonly ["orderPaid", "orderCanceled", "fulfillmentShipped", "orderDelivered", "returnRequested", "returnApproved", "returnRejected", "returnCanceled", "returnCompleted", "paymentReconciliationRequired", "paymentRefundRequiresAttention", "membershipActivated", "membershipPastDue", "membershipExpired", "membershipCancelled"];
80
80
  type CommerceNotificationEventName = (typeof COMMERCE_NOTIFICATION_EVENTS)[number];
81
- type CustomerCommerceNotificationEventName = Exclude<CommerceNotificationEventName, PaymentIncidentNotificationEventName>;
82
- type CommerceNotificationSourceCollection = 'orders' | 'fulfillments' | 'returns' | 'payment-sessions' | 'payment-refund-attempts';
81
+ type CustomerCommerceNotificationEventName = Exclude<CommerceNotificationEventName, PaymentIncidentNotificationEventName | MembershipNotificationEventName>;
82
+ type CommerceNotificationSourceCollection = 'orders' | 'fulfillments' | 'returns' | 'payment-sessions' | 'payment-refund-attempts' | 'customer-memberships';
83
83
  type CommerceNotificationSource = {
84
84
  collection: CommerceNotificationSourceCollection;
85
85
  id: string | number;
86
86
  };
87
87
  type PaymentIncidentNotificationEventName = 'paymentReconciliationRequired' | 'paymentRefundRequiresAttention';
88
+ type MembershipNotificationEventName = 'membershipActivated' | 'membershipPastDue' | 'membershipExpired' | 'membershipCancelled';
89
+ type MembershipNotificationData = {
90
+ membershipId: string;
91
+ planId: string;
92
+ /** Tenant-scoped pseudonymous identifier; this is not a PII-free claim. */
93
+ customerId: string;
94
+ fromStatus: string;
95
+ toStatus: 'active' | 'past_due' | 'expired' | 'cancelled';
96
+ occurredAt: string;
97
+ };
88
98
  type PaymentIncidentNotificationSourceCollection = 'payment-sessions' | 'payment-refund-attempts';
89
99
  type PaymentIncidentNotificationReason = 'orderless_capture' | 'local_commit_ambiguous';
90
100
  type PaymentIncidentNotificationStatus = 'reconciliation_required' | 'requires_attention';
@@ -148,6 +158,12 @@ type CommerceNotificationData = {
148
158
  money?: PaymentIncidentMoney;
149
159
  reason?: PaymentIncidentNotificationReason;
150
160
  observedAt?: string;
161
+ membershipId?: string;
162
+ planId?: string;
163
+ customerId?: string;
164
+ fromStatus?: string;
165
+ toStatus?: string;
166
+ occurredAt?: string;
151
167
  };
152
168
  type CommerceNotification = {
153
169
  event: CommerceNotificationEventName;
@@ -158,6 +174,7 @@ type CommerceNotification = {
158
174
  returnId?: string;
159
175
  paymentSessionId?: string;
160
176
  refundAttemptId?: string;
177
+ membershipId?: string;
161
178
  };
162
179
  type WebhookCommerceNotificationChange = {
163
180
  type: 'notification';
@@ -248,4 +265,4 @@ declare function createCustomerAuthWebhookHandler(handlers: CustomerAuthWebhookH
248
265
  declare function handleWebhook<T extends Collection | string = Collection, TData = T extends Collection ? CollectionType<T> : Record<string, unknown>>(request: Request, handler: WebhookHandler<T, TData>, options: WebhookOptions): Promise<Response>;
249
266
  declare function createTypedWebhookHandler<T extends Collection>(collection: T, handler: (event: WebhookEvent<T>) => Promise<void> | void): WebhookHandler<T>;
250
267
 
251
- export { isWebhookOperation as $, type PaymentIncidentNotificationStatus as A, type PaymentIncidentProviderObject as B, COMMERCE_NOTIFICATION_EVENTS as C, type WebhookChange as D, type WebhookCommerceNotificationChange as E, type WebhookEvent as F, type WebhookKnownOperation as G, type WebhookOperation as H, type WebhookOptions as I, type WebhookOrderChange as J, type WebhookOrderMoved as K, type WebhookOrderScope as L, createCommerceEmailWebhookHandler as M, createCommerceNotificationWebhookHandler as N, ORDER_CHANGED_EVENT_TYPE as O, type PaymentIncidentMoney as P, createCustomerAuthWebhookHandler as Q, createTypedWebhookHandler as R, defineCommerceEmailConfig as S, getCommerceNotificationIdempotencyKey as T, handleWebhook as U, isCommerceNotificationWebhookEvent as V, type WebhookHandler as W, isCustomerPasswordResetWebhookEvent as X, isOrderChangedWebhookEvent as Y, isValidWebhookEvent as Z, isWebhookCollection as _, COMMERCE_NOTIFICATION_EVENT_TYPE as a, type CustomerCommerceNotificationEventName as a0, type PaymentReconciliationRequiredNotificationData as a1, type PaymentRefundRequiresAttentionNotificationData as a2, COMMERCE_NOTIFICATION_OPERATION as b, CUSTOMER_PASSWORD_RESET_OPERATION as c, type CollectionWebhookOperation as d, type CommerceEmailChannel as e, type CommerceEmailConfig as f, type CommerceEmailEventConfig as g, type CommerceEmailEventHandlers as h, type CommerceEmailHandlerContext as i, type CommerceNotification as j, type CommerceNotificationData as k, type CommerceNotificationEventHandlers as l, type CommerceNotificationEventName as m, type CommerceNotificationHandlerContext as n, type CommerceNotificationSource as o, type CommerceNotificationSourceCollection as p, type CommerceNotificationWebhookEvent as q, type CustomerAuthWebhookEvent as r, type CustomerAuthWebhookHandlers as s, type CustomerPasswordResetWebhookData as t, type CustomerPasswordResetWebhookEvent as u, type OrderChangedWebhookEvent as v, type PaymentIncidentNotificationData as w, type PaymentIncidentNotificationEventName as x, type PaymentIncidentNotificationReason as y, type PaymentIncidentNotificationSourceCollection as z };
268
+ export { isValidWebhookEvent as $, type PaymentIncidentNotificationSourceCollection as A, type PaymentIncidentNotificationStatus as B, COMMERCE_NOTIFICATION_EVENTS as C, type PaymentIncidentProviderObject as D, type WebhookChange as E, type WebhookCommerceNotificationChange as F, type WebhookEvent as G, type WebhookKnownOperation as H, type WebhookOperation as I, type WebhookOptions as J, type WebhookOrderChange as K, type WebhookOrderMoved as L, type MembershipNotificationData as M, type WebhookOrderScope as N, ORDER_CHANGED_EVENT_TYPE as O, type PaymentIncidentMoney as P, createCommerceEmailWebhookHandler as Q, createCommerceNotificationWebhookHandler as R, createCustomerAuthWebhookHandler as S, createTypedWebhookHandler as T, defineCommerceEmailConfig as U, getCommerceNotificationIdempotencyKey as V, type WebhookHandler as W, handleWebhook as X, isCommerceNotificationWebhookEvent as Y, isCustomerPasswordResetWebhookEvent as Z, isOrderChangedWebhookEvent as _, COMMERCE_NOTIFICATION_EVENT_TYPE as a, isWebhookCollection as a0, isWebhookOperation as a1, type CustomerCommerceNotificationEventName as a2, type PaymentReconciliationRequiredNotificationData as a3, type PaymentRefundRequiresAttentionNotificationData as a4, COMMERCE_NOTIFICATION_OPERATION as b, CUSTOMER_PASSWORD_RESET_OPERATION as c, type CollectionWebhookOperation as d, type CommerceEmailChannel as e, type CommerceEmailConfig as f, type CommerceEmailEventConfig as g, type CommerceEmailEventHandlers as h, type CommerceEmailHandlerContext as i, type CommerceNotification as j, type CommerceNotificationData as k, type CommerceNotificationEventHandlers as l, type CommerceNotificationEventName as m, type CommerceNotificationHandlerContext as n, type CommerceNotificationSource as o, type CommerceNotificationSourceCollection as p, type CommerceNotificationWebhookEvent as q, type CustomerAuthWebhookEvent as r, type CustomerAuthWebhookHandlers as s, type CustomerPasswordResetWebhookData as t, type CustomerPasswordResetWebhookEvent as u, type MembershipNotificationEventName as v, type OrderChangedWebhookEvent as w, type PaymentIncidentNotificationData as x, type PaymentIncidentNotificationEventName as y, type PaymentIncidentNotificationReason as z };
@@ -1,6 +1,6 @@
1
- import { C as Collection } from './const-JD8obaKg.js';
2
- import { C as CollectionType } from './types-5ZlcAFuU.js';
3
- import './payload-types-BOsckg8B.js';
1
+ import { C as Collection } from './const-BKUqg96Q.js';
2
+ import { C as CollectionType } from './types-D4mjGFj4.js';
3
+ import './payload-types-Bk-duc5k.js';
4
4
 
5
5
  type WebhookOperation = string;
6
6
  /**
@@ -76,15 +76,25 @@ type OrderChangedWebhookEvent<T extends Collection | string = Collection, TData
76
76
  change: WebhookOrderChange;
77
77
  };
78
78
  declare const COMMERCE_NOTIFICATION_OPERATION: "notification";
79
- declare const COMMERCE_NOTIFICATION_EVENTS: readonly ["orderPaid", "orderCanceled", "fulfillmentShipped", "orderDelivered", "returnRequested", "returnApproved", "returnRejected", "returnCanceled", "returnCompleted", "paymentReconciliationRequired", "paymentRefundRequiresAttention"];
79
+ declare const COMMERCE_NOTIFICATION_EVENTS: readonly ["orderPaid", "orderCanceled", "fulfillmentShipped", "orderDelivered", "returnRequested", "returnApproved", "returnRejected", "returnCanceled", "returnCompleted", "paymentReconciliationRequired", "paymentRefundRequiresAttention", "membershipActivated", "membershipPastDue", "membershipExpired", "membershipCancelled"];
80
80
  type CommerceNotificationEventName = (typeof COMMERCE_NOTIFICATION_EVENTS)[number];
81
- type CustomerCommerceNotificationEventName = Exclude<CommerceNotificationEventName, PaymentIncidentNotificationEventName>;
82
- type CommerceNotificationSourceCollection = 'orders' | 'fulfillments' | 'returns' | 'payment-sessions' | 'payment-refund-attempts';
81
+ type CustomerCommerceNotificationEventName = Exclude<CommerceNotificationEventName, PaymentIncidentNotificationEventName | MembershipNotificationEventName>;
82
+ type CommerceNotificationSourceCollection = 'orders' | 'fulfillments' | 'returns' | 'payment-sessions' | 'payment-refund-attempts' | 'customer-memberships';
83
83
  type CommerceNotificationSource = {
84
84
  collection: CommerceNotificationSourceCollection;
85
85
  id: string | number;
86
86
  };
87
87
  type PaymentIncidentNotificationEventName = 'paymentReconciliationRequired' | 'paymentRefundRequiresAttention';
88
+ type MembershipNotificationEventName = 'membershipActivated' | 'membershipPastDue' | 'membershipExpired' | 'membershipCancelled';
89
+ type MembershipNotificationData = {
90
+ membershipId: string;
91
+ planId: string;
92
+ /** Tenant-scoped pseudonymous identifier; this is not a PII-free claim. */
93
+ customerId: string;
94
+ fromStatus: string;
95
+ toStatus: 'active' | 'past_due' | 'expired' | 'cancelled';
96
+ occurredAt: string;
97
+ };
88
98
  type PaymentIncidentNotificationSourceCollection = 'payment-sessions' | 'payment-refund-attempts';
89
99
  type PaymentIncidentNotificationReason = 'orderless_capture' | 'local_commit_ambiguous';
90
100
  type PaymentIncidentNotificationStatus = 'reconciliation_required' | 'requires_attention';
@@ -148,6 +158,12 @@ type CommerceNotificationData = {
148
158
  money?: PaymentIncidentMoney;
149
159
  reason?: PaymentIncidentNotificationReason;
150
160
  observedAt?: string;
161
+ membershipId?: string;
162
+ planId?: string;
163
+ customerId?: string;
164
+ fromStatus?: string;
165
+ toStatus?: string;
166
+ occurredAt?: string;
151
167
  };
152
168
  type CommerceNotification = {
153
169
  event: CommerceNotificationEventName;
@@ -158,6 +174,7 @@ type CommerceNotification = {
158
174
  returnId?: string;
159
175
  paymentSessionId?: string;
160
176
  refundAttemptId?: string;
177
+ membershipId?: string;
161
178
  };
162
179
  type WebhookCommerceNotificationChange = {
163
180
  type: 'notification';
@@ -248,4 +265,4 @@ declare function createCustomerAuthWebhookHandler(handlers: CustomerAuthWebhookH
248
265
  declare function handleWebhook<T extends Collection | string = Collection, TData = T extends Collection ? CollectionType<T> : Record<string, unknown>>(request: Request, handler: WebhookHandler<T, TData>, options: WebhookOptions): Promise<Response>;
249
266
  declare function createTypedWebhookHandler<T extends Collection>(collection: T, handler: (event: WebhookEvent<T>) => Promise<void> | void): WebhookHandler<T>;
250
267
 
251
- export { isWebhookOperation as $, type PaymentIncidentNotificationStatus as A, type PaymentIncidentProviderObject as B, COMMERCE_NOTIFICATION_EVENTS as C, type WebhookChange as D, type WebhookCommerceNotificationChange as E, type WebhookEvent as F, type WebhookKnownOperation as G, type WebhookOperation as H, type WebhookOptions as I, type WebhookOrderChange as J, type WebhookOrderMoved as K, type WebhookOrderScope as L, createCommerceEmailWebhookHandler as M, createCommerceNotificationWebhookHandler as N, ORDER_CHANGED_EVENT_TYPE as O, type PaymentIncidentMoney as P, createCustomerAuthWebhookHandler as Q, createTypedWebhookHandler as R, defineCommerceEmailConfig as S, getCommerceNotificationIdempotencyKey as T, handleWebhook as U, isCommerceNotificationWebhookEvent as V, type WebhookHandler as W, isCustomerPasswordResetWebhookEvent as X, isOrderChangedWebhookEvent as Y, isValidWebhookEvent as Z, isWebhookCollection as _, COMMERCE_NOTIFICATION_EVENT_TYPE as a, type CustomerCommerceNotificationEventName as a0, type PaymentReconciliationRequiredNotificationData as a1, type PaymentRefundRequiresAttentionNotificationData as a2, COMMERCE_NOTIFICATION_OPERATION as b, CUSTOMER_PASSWORD_RESET_OPERATION as c, type CollectionWebhookOperation as d, type CommerceEmailChannel as e, type CommerceEmailConfig as f, type CommerceEmailEventConfig as g, type CommerceEmailEventHandlers as h, type CommerceEmailHandlerContext as i, type CommerceNotification as j, type CommerceNotificationData as k, type CommerceNotificationEventHandlers as l, type CommerceNotificationEventName as m, type CommerceNotificationHandlerContext as n, type CommerceNotificationSource as o, type CommerceNotificationSourceCollection as p, type CommerceNotificationWebhookEvent as q, type CustomerAuthWebhookEvent as r, type CustomerAuthWebhookHandlers as s, type CustomerPasswordResetWebhookData as t, type CustomerPasswordResetWebhookEvent as u, type OrderChangedWebhookEvent as v, type PaymentIncidentNotificationData as w, type PaymentIncidentNotificationEventName as x, type PaymentIncidentNotificationReason as y, type PaymentIncidentNotificationSourceCollection as z };
268
+ export { isValidWebhookEvent as $, type PaymentIncidentNotificationSourceCollection as A, type PaymentIncidentNotificationStatus as B, COMMERCE_NOTIFICATION_EVENTS as C, type PaymentIncidentProviderObject as D, type WebhookChange as E, type WebhookCommerceNotificationChange as F, type WebhookEvent as G, type WebhookKnownOperation as H, type WebhookOperation as I, type WebhookOptions as J, type WebhookOrderChange as K, type WebhookOrderMoved as L, type MembershipNotificationData as M, type WebhookOrderScope as N, ORDER_CHANGED_EVENT_TYPE as O, type PaymentIncidentMoney as P, createCommerceEmailWebhookHandler as Q, createCommerceNotificationWebhookHandler as R, createCustomerAuthWebhookHandler as S, createTypedWebhookHandler as T, defineCommerceEmailConfig as U, getCommerceNotificationIdempotencyKey as V, type WebhookHandler as W, handleWebhook as X, isCommerceNotificationWebhookEvent as Y, isCustomerPasswordResetWebhookEvent as Z, isOrderChangedWebhookEvent as _, COMMERCE_NOTIFICATION_EVENT_TYPE as a, isWebhookCollection as a0, isWebhookOperation as a1, type CustomerCommerceNotificationEventName as a2, type PaymentReconciliationRequiredNotificationData as a3, type PaymentRefundRequiresAttentionNotificationData as a4, COMMERCE_NOTIFICATION_OPERATION as b, CUSTOMER_PASSWORD_RESET_OPERATION as c, type CollectionWebhookOperation as d, type CommerceEmailChannel as e, type CommerceEmailConfig as f, type CommerceEmailEventConfig as g, type CommerceEmailEventHandlers as h, type CommerceEmailHandlerContext as i, type CommerceNotification as j, type CommerceNotificationData as k, type CommerceNotificationEventHandlers as l, type CommerceNotificationEventName as m, type CommerceNotificationHandlerContext as n, type CommerceNotificationSource as o, type CommerceNotificationSourceCollection as p, type CommerceNotificationWebhookEvent as q, type CustomerAuthWebhookEvent as r, type CustomerAuthWebhookHandlers as s, type CustomerPasswordResetWebhookData as t, type CustomerPasswordResetWebhookEvent as u, type MembershipNotificationEventName as v, type OrderChangedWebhookEvent as w, type PaymentIncidentNotificationData as x, type PaymentIncidentNotificationEventName as y, type PaymentIncidentNotificationReason as z };