@01.software/sdk 0.51.0 → 0.65.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/CHANGELOG.md +313 -0
- package/README.md +228 -102
- package/dist/client.cjs +556 -60
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +6 -6
- package/dist/client.d.ts +6 -6
- package/dist/client.js +556 -60
- package/dist/client.js.map +1 -1
- package/dist/{collection-client-CWAeuzV4.d.cts → collection-client-B7rsTtVj.d.cts} +6 -6
- package/dist/{collection-client-hYvVfHIm.d.ts → collection-client-C2sMvfme.d.ts} +6 -6
- package/dist/{const-JD8obaKg.d.ts → const-CRxPTDGt.d.ts} +2 -2
- package/dist/{const-D8LixhAJ.d.cts → const-D6ZRQLxI.d.cts} +2 -2
- package/dist/{index-B0Hjh3Ey.d.ts → index-1auUEYrl.d.ts} +24 -7
- package/dist/{index-Bu0kCc6o.d.cts → index-Bbpf5t-l.d.cts} +24 -7
- package/dist/index.cjs +573 -260
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -12
- package/dist/index.d.ts +19 -12
- package/dist/index.js +573 -260
- package/dist/index.js.map +1 -1
- package/dist/{payload-types-BOsckg8B.d.cts → payload-types-BnIET0xU.d.cts} +567 -438
- package/dist/{payload-types-BOsckg8B.d.ts → payload-types-BnIET0xU.d.ts} +567 -438
- package/dist/query.cjs +62 -3
- package/dist/query.cjs.map +1 -1
- package/dist/query.d.cts +5 -5
- package/dist/query.d.ts +5 -5
- package/dist/query.js +62 -3
- package/dist/query.js.map +1 -1
- package/dist/realtime.d.cts +2 -2
- package/dist/realtime.d.ts +2 -2
- package/dist/server.cjs +557 -20
- package/dist/server.cjs.map +1 -1
- package/dist/server.d.cts +14 -8
- package/dist/server.d.ts +14 -8
- package/dist/server.js +557 -20
- package/dist/server.js.map +1 -1
- package/dist/{types-5ZlcAFuU.d.ts → types-D1y4TgQm.d.ts} +2 -2
- package/dist/{types-Bj8j7VHU.d.ts → types-DnRC3nLG.d.ts} +464 -16
- package/dist/{types-B14sEt1z.d.cts → types-Dp1oYpD3.d.cts} +2 -2
- package/dist/{types-CM5qiR2k.d.cts → types-Dzn0LD2N.d.cts} +464 -16
- package/dist/ui/form.d.cts +1 -1
- package/dist/ui/form.d.ts +1 -1
- package/dist/ui/video.cjs +4 -2
- package/dist/ui/video.cjs.map +1 -1
- package/dist/ui/video.d.cts +4 -2
- package/dist/ui/video.d.ts +4 -2
- package/dist/ui/video.js +4 -2
- package/dist/ui/video.js.map +1 -1
- package/dist/webhook.cjs +13 -2
- package/dist/webhook.cjs.map +1 -1
- package/dist/webhook.d.cts +5 -5
- package/dist/webhook.d.ts +5 -5
- package/dist/webhook.js +13 -2
- package/dist/webhook.js.map +1 -1
- package/package.json +9 -28
- package/dist/analytics/react.cjs +0 -344
- package/dist/analytics/react.cjs.map +0 -1
- package/dist/analytics/react.d.cts +0 -24
- package/dist/analytics/react.d.ts +0 -24
- package/dist/analytics/react.js +0 -319
- package/dist/analytics/react.js.map +0 -1
- package/dist/analytics.cjs +0 -238
- package/dist/analytics.cjs.map +0 -1
- package/dist/analytics.d.cts +0 -39
- package/dist/analytics.d.ts +0 -39
- package/dist/analytics.js +0 -215
- package/dist/analytics.js.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { G as DebugConfig, ak as RetryConfig, i as ApiQueryOptions, P as PayloadFindResponse, L as PayloadMutationResponse,
|
|
2
|
-
import './payload-types-
|
|
1
|
+
import { G as DebugConfig, ak as RetryConfig, i as ApiQueryOptions, P as PayloadFindResponse, L as PayloadMutationResponse, cM as ApiDeleteOptions, cN as PublicReadQueryOptions } from './types-Dzn0LD2N.cjs';
|
|
2
|
+
import './payload-types-BnIET0xU.cjs';
|
|
3
3
|
import { GenerateMetadataOptions, Metadata } from './metadata.cjs';
|
|
4
|
-
import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-
|
|
5
|
-
import { C as CollectionType } from './types-
|
|
4
|
+
import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-D6ZRQLxI.cjs';
|
|
5
|
+
import { C as CollectionType } from './types-Dp1oYpD3.cjs';
|
|
6
6
|
|
|
7
7
|
interface FetchOptions extends RequestInit {
|
|
8
8
|
apiUrl?: string;
|
|
@@ -190,7 +190,7 @@ declare class CollectionClient<TCollection extends Collection = PublicCollection
|
|
|
190
190
|
* PATCH /api/{collection}
|
|
191
191
|
*/
|
|
192
192
|
requestUpdateMany<T = unknown>(endpoint: string, data: {
|
|
193
|
-
where?:
|
|
193
|
+
where?: ApiQueryOptions['where'];
|
|
194
194
|
data: unknown;
|
|
195
195
|
}): Promise<PayloadFindResponse<T>>;
|
|
196
196
|
/**
|
|
@@ -203,7 +203,7 @@ declare class CollectionClient<TCollection extends Collection = PublicCollection
|
|
|
203
203
|
* DELETE /api/{collection}
|
|
204
204
|
*/
|
|
205
205
|
requestDeleteMany<T = unknown>(endpoint: string, data: {
|
|
206
|
-
where?:
|
|
206
|
+
where?: ApiQueryOptions['where'];
|
|
207
207
|
}): Promise<PayloadFindResponse<T>>;
|
|
208
208
|
/**
|
|
209
209
|
* Create document with file upload
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { G as DebugConfig, ak as RetryConfig, i as ApiQueryOptions, P as PayloadFindResponse, L as PayloadMutationResponse,
|
|
2
|
-
import './payload-types-
|
|
1
|
+
import { G as DebugConfig, ak as RetryConfig, i as ApiQueryOptions, P as PayloadFindResponse, L as PayloadMutationResponse, cM as ApiDeleteOptions, cN as PublicReadQueryOptions } from './types-DnRC3nLG.js';
|
|
2
|
+
import './payload-types-BnIET0xU.js';
|
|
3
3
|
import { GenerateMetadataOptions, Metadata } from './metadata.js';
|
|
4
|
-
import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-
|
|
5
|
-
import { C as CollectionType } from './types-
|
|
4
|
+
import { C as Collection, S as ServerCollection, P as PublicCollection } from './const-CRxPTDGt.js';
|
|
5
|
+
import { C as CollectionType } from './types-D1y4TgQm.js';
|
|
6
6
|
|
|
7
7
|
interface FetchOptions extends RequestInit {
|
|
8
8
|
apiUrl?: string;
|
|
@@ -190,7 +190,7 @@ declare class CollectionClient<TCollection extends Collection = PublicCollection
|
|
|
190
190
|
* PATCH /api/{collection}
|
|
191
191
|
*/
|
|
192
192
|
requestUpdateMany<T = unknown>(endpoint: string, data: {
|
|
193
|
-
where?:
|
|
193
|
+
where?: ApiQueryOptions['where'];
|
|
194
194
|
data: unknown;
|
|
195
195
|
}): Promise<PayloadFindResponse<T>>;
|
|
196
196
|
/**
|
|
@@ -203,7 +203,7 @@ declare class CollectionClient<TCollection extends Collection = PublicCollection
|
|
|
203
203
|
* DELETE /api/{collection}
|
|
204
204
|
*/
|
|
205
205
|
requestDeleteMany<T = unknown>(endpoint: string, data: {
|
|
206
|
-
where?:
|
|
206
|
+
where?: ApiQueryOptions['where'];
|
|
207
207
|
}): Promise<PayloadFindResponse<T>>;
|
|
208
208
|
/**
|
|
209
209
|
* Create document with file upload
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import './payload-types-
|
|
1
|
+
import './payload-types-BnIET0xU.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-
|
|
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-mcp-usage-daily", "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-consent-receipts", "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", "membership-unapplied-paid-evidence", "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-
|
|
1
|
+
import './payload-types-BnIET0xU.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-
|
|
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-mcp-usage-daily", "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-consent-receipts", "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", "membership-unapplied-paid-evidence", "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-
|
|
2
|
-
import { C as CollectionType } from './types-
|
|
3
|
-
import './payload-types-
|
|
1
|
+
import { C as Collection } from './const-CRxPTDGt.js';
|
|
2
|
+
import { C as CollectionType } from './types-D1y4TgQm.js';
|
|
3
|
+
import './payload-types-BnIET0xU.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 {
|
|
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-
|
|
2
|
-
import { C as CollectionType } from './types-
|
|
3
|
-
import './payload-types-
|
|
1
|
+
import { C as Collection } from './const-D6ZRQLxI.cjs';
|
|
2
|
+
import { C as CollectionType } from './types-Dp1oYpD3.cjs';
|
|
3
|
+
import './payload-types-BnIET0xU.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 {
|
|
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 };
|