@strimz/shared-types 0.13.1 → 0.14.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/dist/analytics.d.cts +136 -136
- package/dist/analytics.d.ts +136 -136
- package/dist/api-keys.d.cts +20 -20
- package/dist/api-keys.d.ts +20 -20
- package/dist/compliance.d.cts +4 -4
- package/dist/compliance.d.ts +4 -4
- package/dist/customers.d.cts +6 -6
- package/dist/customers.d.ts +6 -6
- package/dist/events.cjs +1 -25
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +1343 -2149
- package/dist/events.d.ts +1343 -2149
- package/dist/events.js +2 -23
- package/dist/events.js.map +1 -1
- package/dist/index.cjs +0 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +1 -22
- package/dist/index.js.map +1 -1
- package/dist/invoices.d.cts +10 -10
- package/dist/invoices.d.ts +10 -10
- package/dist/merchants.d.cts +20 -20
- package/dist/merchants.d.ts +20 -20
- package/dist/payment-sessions.d.cts +16 -16
- package/dist/payment-sessions.d.ts +16 -16
- package/dist/refunds.d.cts +36 -36
- package/dist/refunds.d.ts +36 -36
- package/dist/storefronts.d.cts +27 -27
- package/dist/storefronts.d.ts +27 -27
- package/dist/subscriptions.d.cts +30 -30
- package/dist/subscriptions.d.ts +30 -30
- package/dist/transactions.d.cts +12 -12
- package/dist/transactions.d.ts +12 -12
- package/dist/webhooks.cjs +0 -3
- package/dist/webhooks.cjs.map +1 -1
- package/dist/webhooks.d.cts +40 -40
- package/dist/webhooks.d.ts +40 -40
- package/dist/webhooks.js +0 -3
- package/dist/webhooks.js.map +1 -1
- package/package.json +2 -2
- package/src/events.ts +1 -24
- package/src/webhooks.ts +0 -3
package/dist/webhooks.d.cts
CHANGED
|
@@ -12,7 +12,7 @@ import { z } from 'zod';
|
|
|
12
12
|
* Every webhook event name in the system. Listed inline so Zod can
|
|
13
13
|
* produce a concrete string union.
|
|
14
14
|
*/
|
|
15
|
-
declare const webhookEventNameSchema: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
15
|
+
declare const webhookEventNameSchema: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>;
|
|
16
16
|
type WebhookEventName = z.infer<typeof webhookEventNameSchema>;
|
|
17
17
|
declare const webhookEndpointStatusSchema: z.ZodEnum<["active", "disabled"]>;
|
|
18
18
|
type WebhookEndpointStatus = z.infer<typeof webhookEndpointStatusSchema>;
|
|
@@ -22,7 +22,7 @@ declare const webhookEndpointSchema: z.ZodObject<{
|
|
|
22
22
|
mode: z.ZodEnum<["test", "live"]>;
|
|
23
23
|
url: z.ZodEffects<z.ZodString, string, string>;
|
|
24
24
|
description: z.ZodNullable<z.ZodString>;
|
|
25
|
-
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
25
|
+
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>, "atleastone">;
|
|
26
26
|
status: z.ZodEnum<["active", "disabled"]>;
|
|
27
27
|
signingSecretPrefix: z.ZodString;
|
|
28
28
|
lastDeliveredAt: z.ZodNullable<z.ZodString>;
|
|
@@ -30,44 +30,44 @@ declare const webhookEndpointSchema: z.ZodObject<{
|
|
|
30
30
|
updatedAt: z.ZodString;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
32
|
status: "active" | "disabled";
|
|
33
|
-
id: string;
|
|
34
|
-
merchantId: string;
|
|
35
33
|
mode: "test" | "live";
|
|
36
|
-
|
|
34
|
+
merchantId: string;
|
|
37
35
|
description: string | null;
|
|
36
|
+
id: string;
|
|
37
|
+
createdAt: string;
|
|
38
38
|
updatedAt: string;
|
|
39
39
|
url: string;
|
|
40
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
40
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
41
41
|
signingSecretPrefix: string;
|
|
42
42
|
lastDeliveredAt: string | null;
|
|
43
43
|
}, {
|
|
44
44
|
status: "active" | "disabled";
|
|
45
|
-
id: string;
|
|
46
|
-
merchantId: string;
|
|
47
45
|
mode: "test" | "live";
|
|
48
|
-
|
|
46
|
+
merchantId: string;
|
|
49
47
|
description: string | null;
|
|
48
|
+
id: string;
|
|
49
|
+
createdAt: string;
|
|
50
50
|
updatedAt: string;
|
|
51
51
|
url: string;
|
|
52
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
52
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
53
53
|
signingSecretPrefix: string;
|
|
54
54
|
lastDeliveredAt: string | null;
|
|
55
55
|
}>;
|
|
56
56
|
type WebhookEndpoint = z.infer<typeof webhookEndpointSchema>;
|
|
57
57
|
declare const createWebhookEndpointInputSchema: z.ZodObject<{
|
|
58
58
|
url: z.ZodEffects<z.ZodString, string, string>;
|
|
59
|
-
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
59
|
+
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>, "atleastone">;
|
|
60
60
|
description: z.ZodOptional<z.ZodString>;
|
|
61
61
|
mode: z.ZodEnum<["test", "live"]>;
|
|
62
62
|
}, "strip", z.ZodTypeAny, {
|
|
63
63
|
mode: "test" | "live";
|
|
64
64
|
url: string;
|
|
65
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
65
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
66
66
|
description?: string | undefined;
|
|
67
67
|
}, {
|
|
68
68
|
mode: "test" | "live";
|
|
69
69
|
url: string;
|
|
70
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
70
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
71
71
|
description?: string | undefined;
|
|
72
72
|
}>;
|
|
73
73
|
type CreateWebhookEndpointInput = z.input<typeof createWebhookEndpointInputSchema>;
|
|
@@ -79,7 +79,7 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
79
79
|
mode: z.ZodEnum<["test", "live"]>;
|
|
80
80
|
url: z.ZodEffects<z.ZodString, string, string>;
|
|
81
81
|
description: z.ZodNullable<z.ZodString>;
|
|
82
|
-
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
82
|
+
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>, "atleastone">;
|
|
83
83
|
status: z.ZodEnum<["active", "disabled"]>;
|
|
84
84
|
signingSecretPrefix: z.ZodString;
|
|
85
85
|
lastDeliveredAt: z.ZodNullable<z.ZodString>;
|
|
@@ -87,26 +87,26 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
87
87
|
updatedAt: z.ZodString;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
89
|
status: "active" | "disabled";
|
|
90
|
-
id: string;
|
|
91
|
-
merchantId: string;
|
|
92
90
|
mode: "test" | "live";
|
|
93
|
-
|
|
91
|
+
merchantId: string;
|
|
94
92
|
description: string | null;
|
|
93
|
+
id: string;
|
|
94
|
+
createdAt: string;
|
|
95
95
|
updatedAt: string;
|
|
96
96
|
url: string;
|
|
97
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
97
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
98
98
|
signingSecretPrefix: string;
|
|
99
99
|
lastDeliveredAt: string | null;
|
|
100
100
|
}, {
|
|
101
101
|
status: "active" | "disabled";
|
|
102
|
-
id: string;
|
|
103
|
-
merchantId: string;
|
|
104
102
|
mode: "test" | "live";
|
|
105
|
-
|
|
103
|
+
merchantId: string;
|
|
106
104
|
description: string | null;
|
|
105
|
+
id: string;
|
|
106
|
+
createdAt: string;
|
|
107
107
|
updatedAt: string;
|
|
108
108
|
url: string;
|
|
109
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
109
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
110
110
|
signingSecretPrefix: string;
|
|
111
111
|
lastDeliveredAt: string | null;
|
|
112
112
|
}>;
|
|
@@ -115,14 +115,14 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
115
115
|
}, "strip", z.ZodTypeAny, {
|
|
116
116
|
endpoint: {
|
|
117
117
|
status: "active" | "disabled";
|
|
118
|
-
id: string;
|
|
119
|
-
merchantId: string;
|
|
120
118
|
mode: "test" | "live";
|
|
121
|
-
|
|
119
|
+
merchantId: string;
|
|
122
120
|
description: string | null;
|
|
121
|
+
id: string;
|
|
122
|
+
createdAt: string;
|
|
123
123
|
updatedAt: string;
|
|
124
124
|
url: string;
|
|
125
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
125
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
126
126
|
signingSecretPrefix: string;
|
|
127
127
|
lastDeliveredAt: string | null;
|
|
128
128
|
};
|
|
@@ -130,14 +130,14 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
130
130
|
}, {
|
|
131
131
|
endpoint: {
|
|
132
132
|
status: "active" | "disabled";
|
|
133
|
-
id: string;
|
|
134
|
-
merchantId: string;
|
|
135
133
|
mode: "test" | "live";
|
|
136
|
-
|
|
134
|
+
merchantId: string;
|
|
137
135
|
description: string | null;
|
|
136
|
+
id: string;
|
|
137
|
+
createdAt: string;
|
|
138
138
|
updatedAt: string;
|
|
139
139
|
url: string;
|
|
140
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
140
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
141
141
|
signingSecretPrefix: string;
|
|
142
142
|
lastDeliveredAt: string | null;
|
|
143
143
|
};
|
|
@@ -151,7 +151,7 @@ declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
151
151
|
merchantId: z.ZodString;
|
|
152
152
|
endpointId: z.ZodString;
|
|
153
153
|
eventId: z.ZodString;
|
|
154
|
-
eventName: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
154
|
+
eventName: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>;
|
|
155
155
|
status: z.ZodEnum<["pending", "delivered", "retrying", "permanently_failed"]>;
|
|
156
156
|
attempt: z.ZodNumber;
|
|
157
157
|
responseCode: z.ZodNullable<z.ZodNumber>;
|
|
@@ -162,12 +162,12 @@ declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
162
162
|
createdAt: z.ZodString;
|
|
163
163
|
}, "strip", z.ZodTypeAny, {
|
|
164
164
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
165
|
-
id: string;
|
|
166
165
|
merchantId: string;
|
|
166
|
+
id: string;
|
|
167
167
|
createdAt: string;
|
|
168
168
|
endpointId: string;
|
|
169
169
|
eventId: string;
|
|
170
|
-
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
170
|
+
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked";
|
|
171
171
|
attempt: number;
|
|
172
172
|
responseCode: number | null;
|
|
173
173
|
responseMs: number | null;
|
|
@@ -176,12 +176,12 @@ declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
176
176
|
deliveredAt: string | null;
|
|
177
177
|
}, {
|
|
178
178
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
179
|
-
id: string;
|
|
180
179
|
merchantId: string;
|
|
180
|
+
id: string;
|
|
181
181
|
createdAt: string;
|
|
182
182
|
endpointId: string;
|
|
183
183
|
eventId: string;
|
|
184
|
-
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
184
|
+
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked";
|
|
185
185
|
attempt: number;
|
|
186
186
|
responseCode: number | null;
|
|
187
187
|
responseMs: number | null;
|
|
@@ -200,7 +200,7 @@ declare const webhookDeliveryDetailSchema: z.ZodObject<{
|
|
|
200
200
|
merchantId: z.ZodString;
|
|
201
201
|
endpointId: z.ZodString;
|
|
202
202
|
eventId: z.ZodString;
|
|
203
|
-
eventName: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
203
|
+
eventName: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>;
|
|
204
204
|
status: z.ZodEnum<["pending", "delivered", "retrying", "permanently_failed"]>;
|
|
205
205
|
attempt: z.ZodNumber;
|
|
206
206
|
responseCode: z.ZodNullable<z.ZodNumber>;
|
|
@@ -215,12 +215,12 @@ declare const webhookDeliveryDetailSchema: z.ZodObject<{
|
|
|
215
215
|
requestPayload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
216
216
|
}, "strip", z.ZodTypeAny, {
|
|
217
217
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
218
|
-
id: string;
|
|
219
218
|
merchantId: string;
|
|
219
|
+
id: string;
|
|
220
220
|
createdAt: string;
|
|
221
221
|
endpointId: string;
|
|
222
222
|
eventId: string;
|
|
223
|
-
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
223
|
+
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked";
|
|
224
224
|
attempt: number;
|
|
225
225
|
responseCode: number | null;
|
|
226
226
|
responseMs: number | null;
|
|
@@ -232,12 +232,12 @@ declare const webhookDeliveryDetailSchema: z.ZodObject<{
|
|
|
232
232
|
requestPayload: Record<string, unknown>;
|
|
233
233
|
}, {
|
|
234
234
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
235
|
-
id: string;
|
|
236
235
|
merchantId: string;
|
|
236
|
+
id: string;
|
|
237
237
|
createdAt: string;
|
|
238
238
|
endpointId: string;
|
|
239
239
|
eventId: string;
|
|
240
|
-
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
240
|
+
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked";
|
|
241
241
|
attempt: number;
|
|
242
242
|
responseCode: number | null;
|
|
243
243
|
responseMs: number | null;
|
package/dist/webhooks.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import { z } from 'zod';
|
|
|
12
12
|
* Every webhook event name in the system. Listed inline so Zod can
|
|
13
13
|
* produce a concrete string union.
|
|
14
14
|
*/
|
|
15
|
-
declare const webhookEventNameSchema: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
15
|
+
declare const webhookEventNameSchema: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>;
|
|
16
16
|
type WebhookEventName = z.infer<typeof webhookEventNameSchema>;
|
|
17
17
|
declare const webhookEndpointStatusSchema: z.ZodEnum<["active", "disabled"]>;
|
|
18
18
|
type WebhookEndpointStatus = z.infer<typeof webhookEndpointStatusSchema>;
|
|
@@ -22,7 +22,7 @@ declare const webhookEndpointSchema: z.ZodObject<{
|
|
|
22
22
|
mode: z.ZodEnum<["test", "live"]>;
|
|
23
23
|
url: z.ZodEffects<z.ZodString, string, string>;
|
|
24
24
|
description: z.ZodNullable<z.ZodString>;
|
|
25
|
-
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
25
|
+
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>, "atleastone">;
|
|
26
26
|
status: z.ZodEnum<["active", "disabled"]>;
|
|
27
27
|
signingSecretPrefix: z.ZodString;
|
|
28
28
|
lastDeliveredAt: z.ZodNullable<z.ZodString>;
|
|
@@ -30,44 +30,44 @@ declare const webhookEndpointSchema: z.ZodObject<{
|
|
|
30
30
|
updatedAt: z.ZodString;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
32
|
status: "active" | "disabled";
|
|
33
|
-
id: string;
|
|
34
|
-
merchantId: string;
|
|
35
33
|
mode: "test" | "live";
|
|
36
|
-
|
|
34
|
+
merchantId: string;
|
|
37
35
|
description: string | null;
|
|
36
|
+
id: string;
|
|
37
|
+
createdAt: string;
|
|
38
38
|
updatedAt: string;
|
|
39
39
|
url: string;
|
|
40
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
40
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
41
41
|
signingSecretPrefix: string;
|
|
42
42
|
lastDeliveredAt: string | null;
|
|
43
43
|
}, {
|
|
44
44
|
status: "active" | "disabled";
|
|
45
|
-
id: string;
|
|
46
|
-
merchantId: string;
|
|
47
45
|
mode: "test" | "live";
|
|
48
|
-
|
|
46
|
+
merchantId: string;
|
|
49
47
|
description: string | null;
|
|
48
|
+
id: string;
|
|
49
|
+
createdAt: string;
|
|
50
50
|
updatedAt: string;
|
|
51
51
|
url: string;
|
|
52
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
52
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
53
53
|
signingSecretPrefix: string;
|
|
54
54
|
lastDeliveredAt: string | null;
|
|
55
55
|
}>;
|
|
56
56
|
type WebhookEndpoint = z.infer<typeof webhookEndpointSchema>;
|
|
57
57
|
declare const createWebhookEndpointInputSchema: z.ZodObject<{
|
|
58
58
|
url: z.ZodEffects<z.ZodString, string, string>;
|
|
59
|
-
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
59
|
+
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>, "atleastone">;
|
|
60
60
|
description: z.ZodOptional<z.ZodString>;
|
|
61
61
|
mode: z.ZodEnum<["test", "live"]>;
|
|
62
62
|
}, "strip", z.ZodTypeAny, {
|
|
63
63
|
mode: "test" | "live";
|
|
64
64
|
url: string;
|
|
65
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
65
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
66
66
|
description?: string | undefined;
|
|
67
67
|
}, {
|
|
68
68
|
mode: "test" | "live";
|
|
69
69
|
url: string;
|
|
70
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
70
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
71
71
|
description?: string | undefined;
|
|
72
72
|
}>;
|
|
73
73
|
type CreateWebhookEndpointInput = z.input<typeof createWebhookEndpointInputSchema>;
|
|
@@ -79,7 +79,7 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
79
79
|
mode: z.ZodEnum<["test", "live"]>;
|
|
80
80
|
url: z.ZodEffects<z.ZodString, string, string>;
|
|
81
81
|
description: z.ZodNullable<z.ZodString>;
|
|
82
|
-
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
82
|
+
events: z.ZodArray<z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>, "atleastone">;
|
|
83
83
|
status: z.ZodEnum<["active", "disabled"]>;
|
|
84
84
|
signingSecretPrefix: z.ZodString;
|
|
85
85
|
lastDeliveredAt: z.ZodNullable<z.ZodString>;
|
|
@@ -87,26 +87,26 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
87
87
|
updatedAt: z.ZodString;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
89
|
status: "active" | "disabled";
|
|
90
|
-
id: string;
|
|
91
|
-
merchantId: string;
|
|
92
90
|
mode: "test" | "live";
|
|
93
|
-
|
|
91
|
+
merchantId: string;
|
|
94
92
|
description: string | null;
|
|
93
|
+
id: string;
|
|
94
|
+
createdAt: string;
|
|
95
95
|
updatedAt: string;
|
|
96
96
|
url: string;
|
|
97
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
97
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
98
98
|
signingSecretPrefix: string;
|
|
99
99
|
lastDeliveredAt: string | null;
|
|
100
100
|
}, {
|
|
101
101
|
status: "active" | "disabled";
|
|
102
|
-
id: string;
|
|
103
|
-
merchantId: string;
|
|
104
102
|
mode: "test" | "live";
|
|
105
|
-
|
|
103
|
+
merchantId: string;
|
|
106
104
|
description: string | null;
|
|
105
|
+
id: string;
|
|
106
|
+
createdAt: string;
|
|
107
107
|
updatedAt: string;
|
|
108
108
|
url: string;
|
|
109
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
109
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
110
110
|
signingSecretPrefix: string;
|
|
111
111
|
lastDeliveredAt: string | null;
|
|
112
112
|
}>;
|
|
@@ -115,14 +115,14 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
115
115
|
}, "strip", z.ZodTypeAny, {
|
|
116
116
|
endpoint: {
|
|
117
117
|
status: "active" | "disabled";
|
|
118
|
-
id: string;
|
|
119
|
-
merchantId: string;
|
|
120
118
|
mode: "test" | "live";
|
|
121
|
-
|
|
119
|
+
merchantId: string;
|
|
122
120
|
description: string | null;
|
|
121
|
+
id: string;
|
|
122
|
+
createdAt: string;
|
|
123
123
|
updatedAt: string;
|
|
124
124
|
url: string;
|
|
125
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
125
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
126
126
|
signingSecretPrefix: string;
|
|
127
127
|
lastDeliveredAt: string | null;
|
|
128
128
|
};
|
|
@@ -130,14 +130,14 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
130
130
|
}, {
|
|
131
131
|
endpoint: {
|
|
132
132
|
status: "active" | "disabled";
|
|
133
|
-
id: string;
|
|
134
|
-
merchantId: string;
|
|
135
133
|
mode: "test" | "live";
|
|
136
|
-
|
|
134
|
+
merchantId: string;
|
|
137
135
|
description: string | null;
|
|
136
|
+
id: string;
|
|
137
|
+
createdAt: string;
|
|
138
138
|
updatedAt: string;
|
|
139
139
|
url: string;
|
|
140
|
-
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
140
|
+
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked", ...("payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked")[]];
|
|
141
141
|
signingSecretPrefix: string;
|
|
142
142
|
lastDeliveredAt: string | null;
|
|
143
143
|
};
|
|
@@ -151,7 +151,7 @@ declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
151
151
|
merchantId: z.ZodString;
|
|
152
152
|
endpointId: z.ZodString;
|
|
153
153
|
eventId: z.ZodString;
|
|
154
|
-
eventName: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
154
|
+
eventName: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>;
|
|
155
155
|
status: z.ZodEnum<["pending", "delivered", "retrying", "permanently_failed"]>;
|
|
156
156
|
attempt: z.ZodNumber;
|
|
157
157
|
responseCode: z.ZodNullable<z.ZodNumber>;
|
|
@@ -162,12 +162,12 @@ declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
162
162
|
createdAt: z.ZodString;
|
|
163
163
|
}, "strip", z.ZodTypeAny, {
|
|
164
164
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
165
|
-
id: string;
|
|
166
165
|
merchantId: string;
|
|
166
|
+
id: string;
|
|
167
167
|
createdAt: string;
|
|
168
168
|
endpointId: string;
|
|
169
169
|
eventId: string;
|
|
170
|
-
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
170
|
+
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked";
|
|
171
171
|
attempt: number;
|
|
172
172
|
responseCode: number | null;
|
|
173
173
|
responseMs: number | null;
|
|
@@ -176,12 +176,12 @@ declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
176
176
|
deliveredAt: string | null;
|
|
177
177
|
}, {
|
|
178
178
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
179
|
-
id: string;
|
|
180
179
|
merchantId: string;
|
|
180
|
+
id: string;
|
|
181
181
|
createdAt: string;
|
|
182
182
|
endpointId: string;
|
|
183
183
|
eventId: string;
|
|
184
|
-
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
184
|
+
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked";
|
|
185
185
|
attempt: number;
|
|
186
186
|
responseCode: number | null;
|
|
187
187
|
responseMs: number | null;
|
|
@@ -200,7 +200,7 @@ declare const webhookDeliveryDetailSchema: z.ZodObject<{
|
|
|
200
200
|
merchantId: z.ZodString;
|
|
201
201
|
endpointId: z.ZodString;
|
|
202
202
|
eventId: z.ZodString;
|
|
203
|
-
eventName: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.
|
|
203
|
+
eventName: z.ZodEnum<["payment.created", "payment.completed", "payment.failed", "subscription.created", "subscription.charged", "subscription.charge_failed", "subscription.recovery_attempt", "subscription.cancelled", "subscription.lapsed", "refund.created", "refund.completed", "invoice.created", "invoice.paid", "invoice.overdue", "agent.job_proposed", "agent.job_completed", "agent.job_disputed", "compliance.wallet_flagged", "compliance.wallet_blocked"]>;
|
|
204
204
|
status: z.ZodEnum<["pending", "delivered", "retrying", "permanently_failed"]>;
|
|
205
205
|
attempt: z.ZodNumber;
|
|
206
206
|
responseCode: z.ZodNullable<z.ZodNumber>;
|
|
@@ -215,12 +215,12 @@ declare const webhookDeliveryDetailSchema: z.ZodObject<{
|
|
|
215
215
|
requestPayload: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
216
216
|
}, "strip", z.ZodTypeAny, {
|
|
217
217
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
218
|
-
id: string;
|
|
219
218
|
merchantId: string;
|
|
219
|
+
id: string;
|
|
220
220
|
createdAt: string;
|
|
221
221
|
endpointId: string;
|
|
222
222
|
eventId: string;
|
|
223
|
-
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
223
|
+
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked";
|
|
224
224
|
attempt: number;
|
|
225
225
|
responseCode: number | null;
|
|
226
226
|
responseMs: number | null;
|
|
@@ -232,12 +232,12 @@ declare const webhookDeliveryDetailSchema: z.ZodObject<{
|
|
|
232
232
|
requestPayload: Record<string, unknown>;
|
|
233
233
|
}, {
|
|
234
234
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
235
|
-
id: string;
|
|
236
235
|
merchantId: string;
|
|
236
|
+
id: string;
|
|
237
237
|
createdAt: string;
|
|
238
238
|
endpointId: string;
|
|
239
239
|
eventId: string;
|
|
240
|
-
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.
|
|
240
|
+
eventName: "payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "refund.created" | "refund.completed" | "invoice.created" | "invoice.paid" | "invoice.overdue" | "agent.job_proposed" | "agent.job_completed" | "agent.job_disputed" | "compliance.wallet_flagged" | "compliance.wallet_blocked";
|
|
241
241
|
attempt: number;
|
|
242
242
|
responseCode: number | null;
|
|
243
243
|
responseMs: number | null;
|
package/dist/webhooks.js
CHANGED
|
@@ -36,16 +36,13 @@ var webhookEventNameSchema = z.enum([
|
|
|
36
36
|
"subscription.charged",
|
|
37
37
|
"subscription.charge_failed",
|
|
38
38
|
"subscription.recovery_attempt",
|
|
39
|
-
"subscription.recovery_outcome",
|
|
40
39
|
"subscription.cancelled",
|
|
41
40
|
"subscription.lapsed",
|
|
42
41
|
"refund.created",
|
|
43
42
|
"refund.completed",
|
|
44
|
-
"refund.failed",
|
|
45
43
|
"invoice.created",
|
|
46
44
|
"invoice.paid",
|
|
47
45
|
"invoice.overdue",
|
|
48
|
-
"agent.action_executed",
|
|
49
46
|
"agent.job_proposed",
|
|
50
47
|
"agent.job_completed",
|
|
51
48
|
"agent.job_disputed",
|