@strimz/shared-types 0.16.0 → 0.17.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 +141 -141
- package/dist/analytics.d.ts +141 -141
- package/dist/api-keys.d.cts +14 -14
- package/dist/api-keys.d.ts +14 -14
- package/dist/compliance.d.cts +8 -8
- package/dist/compliance.d.ts +8 -8
- package/dist/customers.d.cts +7 -7
- package/dist/customers.d.ts +7 -7
- package/dist/events.d.cts +1460 -1460
- package/dist/events.d.ts +1460 -1460
- package/dist/index.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -7
- package/dist/index.d.ts +25 -7
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/invoices.d.cts +12 -12
- package/dist/invoices.d.ts +12 -12
- package/dist/merchants.d.cts +26 -26
- package/dist/merchants.d.ts +26 -26
- 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 +13 -13
- package/dist/storefronts.d.ts +13 -13
- package/dist/subscriptions.d.cts +32 -32
- package/dist/subscriptions.d.ts +32 -32
- package/dist/transactions.d.cts +10 -10
- package/dist/transactions.d.ts +10 -10
- package/dist/webhooks.d.cts +28 -28
- package/dist/webhooks.d.ts +28 -28
- package/package.json +2 -2
- package/src/notifications.ts +9 -0
package/dist/subscriptions.d.ts
CHANGED
|
@@ -51,15 +51,15 @@ declare const subscriptionPlanSchema: z.ZodObject<{
|
|
|
51
51
|
updatedAt: z.ZodString;
|
|
52
52
|
}, "strip", z.ZodTypeAny, {
|
|
53
53
|
status: "active" | "archived";
|
|
54
|
-
amount: string;
|
|
55
|
-
currency: "USDC" | "EURC";
|
|
56
|
-
merchantId: string;
|
|
57
|
-
description: string | null;
|
|
58
54
|
id: string;
|
|
55
|
+
merchantId: string;
|
|
59
56
|
createdAt: string;
|
|
57
|
+
description: string | null;
|
|
58
|
+
currency: "USDC" | "EURC";
|
|
60
59
|
updatedAt: string;
|
|
61
60
|
chainMerchantId: string | null;
|
|
62
61
|
tokenAddress: string | null;
|
|
62
|
+
amount: string;
|
|
63
63
|
successUrl: string | null;
|
|
64
64
|
cancelUrl: string | null;
|
|
65
65
|
metadata: Record<string, string | number | boolean | null>;
|
|
@@ -70,15 +70,15 @@ declare const subscriptionPlanSchema: z.ZodObject<{
|
|
|
70
70
|
trialPeriodDays: number | null;
|
|
71
71
|
}, {
|
|
72
72
|
status: "active" | "archived";
|
|
73
|
-
amount: string;
|
|
74
|
-
currency: "USDC" | "EURC";
|
|
75
|
-
merchantId: string;
|
|
76
|
-
description: string | null;
|
|
77
73
|
id: string;
|
|
74
|
+
merchantId: string;
|
|
78
75
|
createdAt: string;
|
|
76
|
+
description: string | null;
|
|
77
|
+
currency: "USDC" | "EURC";
|
|
79
78
|
updatedAt: string;
|
|
80
79
|
chainMerchantId: string | null;
|
|
81
80
|
tokenAddress: string | null;
|
|
81
|
+
amount: string;
|
|
82
82
|
successUrl: string | null;
|
|
83
83
|
cancelUrl: string | null;
|
|
84
84
|
intervalSeconds: number;
|
|
@@ -101,8 +101,8 @@ declare const createSubscriptionPlanInputSchema: z.ZodObject<{
|
|
|
101
101
|
cancelUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
102
102
|
metadata: z.ZodOptional<z.ZodDefault<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>, Record<string, string | number | boolean | null>, Record<string, string | number | boolean | null>>>>;
|
|
103
103
|
}, "strip", z.ZodTypeAny, {
|
|
104
|
-
amount: string;
|
|
105
104
|
currency: "USDC" | "EURC";
|
|
105
|
+
amount: string;
|
|
106
106
|
name: string;
|
|
107
107
|
interval: "daily" | "weekly" | "monthly" | "quarterly" | "yearly";
|
|
108
108
|
intervalCount: number;
|
|
@@ -112,8 +112,8 @@ declare const createSubscriptionPlanInputSchema: z.ZodObject<{
|
|
|
112
112
|
metadata?: Record<string, string | number | boolean | null> | undefined;
|
|
113
113
|
trialPeriodDays?: number | undefined;
|
|
114
114
|
}, {
|
|
115
|
-
amount: string;
|
|
116
115
|
currency: "USDC" | "EURC";
|
|
116
|
+
amount: string;
|
|
117
117
|
name: string;
|
|
118
118
|
interval: "daily" | "weekly" | "monthly" | "quarterly" | "yearly";
|
|
119
119
|
description?: string | undefined;
|
|
@@ -155,14 +155,14 @@ declare const subscriptionResultMessageSchema: z.ZodDiscriminatedUnion<"type", [
|
|
|
155
155
|
txHash: z.ZodString;
|
|
156
156
|
}, "strip", z.ZodTypeAny, {
|
|
157
157
|
type: "strimz:subscription:success";
|
|
158
|
+
subscriptionId: string | null;
|
|
158
159
|
txHash: string;
|
|
159
160
|
planId: string;
|
|
160
|
-
subscriptionId: string | null;
|
|
161
161
|
}, {
|
|
162
162
|
type: "strimz:subscription:success";
|
|
163
|
+
subscriptionId: string | null;
|
|
163
164
|
txHash: string;
|
|
164
165
|
planId: string;
|
|
165
|
-
subscriptionId: string | null;
|
|
166
166
|
}>, z.ZodObject<{
|
|
167
167
|
type: z.ZodLiteral<"strimz:subscription:cancel">;
|
|
168
168
|
planId: z.ZodString;
|
|
@@ -213,14 +213,14 @@ declare const subscriptionSchema: z.ZodObject<{
|
|
|
213
213
|
createdAt: z.ZodString;
|
|
214
214
|
updatedAt: z.ZodString;
|
|
215
215
|
}, "strip", z.ZodTypeAny, {
|
|
216
|
-
status: "cancelled" | "
|
|
217
|
-
amount: string;
|
|
218
|
-
currency: "USDC" | "EURC";
|
|
219
|
-
customerId: string;
|
|
220
|
-
merchantId: string;
|
|
216
|
+
status: "cancelled" | "active" | "trialing" | "at_risk" | "paused" | "lapsed";
|
|
221
217
|
id: string;
|
|
218
|
+
merchantId: string;
|
|
222
219
|
createdAt: string;
|
|
220
|
+
currency: "USDC" | "EURC";
|
|
223
221
|
updatedAt: string;
|
|
222
|
+
customerId: string;
|
|
223
|
+
amount: string;
|
|
224
224
|
metadata: Record<string, string | number | boolean | null>;
|
|
225
225
|
payerAddress: string;
|
|
226
226
|
interval: "daily" | "weekly" | "monthly" | "quarterly" | "yearly";
|
|
@@ -234,14 +234,14 @@ declare const subscriptionSchema: z.ZodObject<{
|
|
|
234
234
|
gracePeriodHours: number;
|
|
235
235
|
cancelledAt: string | null;
|
|
236
236
|
}, {
|
|
237
|
-
status: "cancelled" | "
|
|
238
|
-
amount: string;
|
|
239
|
-
currency: "USDC" | "EURC";
|
|
240
|
-
customerId: string;
|
|
241
|
-
merchantId: string;
|
|
237
|
+
status: "cancelled" | "active" | "trialing" | "at_risk" | "paused" | "lapsed";
|
|
242
238
|
id: string;
|
|
239
|
+
merchantId: string;
|
|
243
240
|
createdAt: string;
|
|
241
|
+
currency: "USDC" | "EURC";
|
|
244
242
|
updatedAt: string;
|
|
243
|
+
customerId: string;
|
|
244
|
+
amount: string;
|
|
245
245
|
payerAddress: string;
|
|
246
246
|
interval: "daily" | "weekly" | "monthly" | "quarterly" | "yearly";
|
|
247
247
|
intervalCount: number;
|
|
@@ -261,11 +261,11 @@ declare const subscriptionStatusResultSchema: z.ZodObject<{
|
|
|
261
261
|
active: z.ZodBoolean;
|
|
262
262
|
subscriptionId: z.ZodNullable<z.ZodString>;
|
|
263
263
|
}, "strip", z.ZodTypeAny, {
|
|
264
|
-
active: boolean;
|
|
265
264
|
subscriptionId: string | null;
|
|
266
|
-
}, {
|
|
267
265
|
active: boolean;
|
|
266
|
+
}, {
|
|
268
267
|
subscriptionId: string | null;
|
|
268
|
+
active: boolean;
|
|
269
269
|
}>;
|
|
270
270
|
type SubscriptionStatusResult = z.infer<typeof subscriptionStatusResultSchema>;
|
|
271
271
|
declare const subscriptionEnrolmentTermsSchema: z.ZodObject<{
|
|
@@ -318,15 +318,15 @@ declare const subscriptionChargeSchema: z.ZodObject<{
|
|
|
318
318
|
updatedAt: z.ZodString;
|
|
319
319
|
}, "strip", z.ZodTypeAny, {
|
|
320
320
|
status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
|
|
321
|
-
amount: string;
|
|
322
|
-
currency: "USDC" | "EURC";
|
|
323
|
-
merchantId: string;
|
|
324
321
|
id: string;
|
|
322
|
+
merchantId: string;
|
|
323
|
+
subscriptionId: string;
|
|
325
324
|
createdAt: string;
|
|
325
|
+
currency: "USDC" | "EURC";
|
|
326
326
|
updatedAt: string;
|
|
327
|
+
amount: string;
|
|
327
328
|
onchainTxHash: string | null;
|
|
328
329
|
failureReason: string | null;
|
|
329
|
-
subscriptionId: string;
|
|
330
330
|
chargeAttemptId: string;
|
|
331
331
|
periodStartAt: string;
|
|
332
332
|
periodEndAt: string;
|
|
@@ -336,15 +336,15 @@ declare const subscriptionChargeSchema: z.ZodObject<{
|
|
|
336
336
|
executedAt: string | null;
|
|
337
337
|
}, {
|
|
338
338
|
status: "failed" | "pending" | "in_flight" | "succeeded" | "retrying" | "abandoned";
|
|
339
|
-
amount: string;
|
|
340
|
-
currency: "USDC" | "EURC";
|
|
341
|
-
merchantId: string;
|
|
342
339
|
id: string;
|
|
340
|
+
merchantId: string;
|
|
341
|
+
subscriptionId: string;
|
|
343
342
|
createdAt: string;
|
|
343
|
+
currency: "USDC" | "EURC";
|
|
344
344
|
updatedAt: string;
|
|
345
|
+
amount: string;
|
|
345
346
|
onchainTxHash: string | null;
|
|
346
347
|
failureReason: string | null;
|
|
347
|
-
subscriptionId: string;
|
|
348
348
|
chargeAttemptId: string;
|
|
349
349
|
periodStartAt: string;
|
|
350
350
|
periodEndAt: string;
|
package/dist/transactions.d.cts
CHANGED
|
@@ -34,18 +34,18 @@ declare const transactionSchema: z.ZodObject<{
|
|
|
34
34
|
createdAt: z.ZodString;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
status: "confirmed" | "failed" | "pending";
|
|
37
|
-
amount: string;
|
|
38
|
-
currency: "USDC" | "EURC";
|
|
39
|
-
customerId: string | null;
|
|
40
|
-
merchantId: string;
|
|
41
37
|
id: string;
|
|
38
|
+
merchantId: string;
|
|
42
39
|
sessionId: string | null;
|
|
40
|
+
subscriptionId: string | null;
|
|
43
41
|
createdAt: string;
|
|
42
|
+
currency: "USDC" | "EURC";
|
|
43
|
+
customerId: string | null;
|
|
44
|
+
amount: string;
|
|
44
45
|
feeAmount: string;
|
|
45
46
|
netAmount: string;
|
|
46
47
|
onchainTxHash: string;
|
|
47
48
|
payerAddress: string;
|
|
48
|
-
subscriptionId: string | null;
|
|
49
49
|
kind: "refund" | "one_shot" | "subscription_charge" | "invoice_payment" | "storefront_purchase";
|
|
50
50
|
subscriptionChargeId: string | null;
|
|
51
51
|
refundId: string | null;
|
|
@@ -54,18 +54,18 @@ declare const transactionSchema: z.ZodObject<{
|
|
|
54
54
|
blockTimestamp: string;
|
|
55
55
|
}, {
|
|
56
56
|
status: "confirmed" | "failed" | "pending";
|
|
57
|
-
amount: string;
|
|
58
|
-
currency: "USDC" | "EURC";
|
|
59
|
-
customerId: string | null;
|
|
60
|
-
merchantId: string;
|
|
61
57
|
id: string;
|
|
58
|
+
merchantId: string;
|
|
62
59
|
sessionId: string | null;
|
|
60
|
+
subscriptionId: string | null;
|
|
63
61
|
createdAt: string;
|
|
62
|
+
currency: "USDC" | "EURC";
|
|
63
|
+
customerId: string | null;
|
|
64
|
+
amount: string;
|
|
64
65
|
feeAmount: string;
|
|
65
66
|
netAmount: string;
|
|
66
67
|
onchainTxHash: string;
|
|
67
68
|
payerAddress: string;
|
|
68
|
-
subscriptionId: string | null;
|
|
69
69
|
kind: "refund" | "one_shot" | "subscription_charge" | "invoice_payment" | "storefront_purchase";
|
|
70
70
|
subscriptionChargeId: string | null;
|
|
71
71
|
refundId: string | null;
|
package/dist/transactions.d.ts
CHANGED
|
@@ -34,18 +34,18 @@ declare const transactionSchema: z.ZodObject<{
|
|
|
34
34
|
createdAt: z.ZodString;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
36
|
status: "confirmed" | "failed" | "pending";
|
|
37
|
-
amount: string;
|
|
38
|
-
currency: "USDC" | "EURC";
|
|
39
|
-
customerId: string | null;
|
|
40
|
-
merchantId: string;
|
|
41
37
|
id: string;
|
|
38
|
+
merchantId: string;
|
|
42
39
|
sessionId: string | null;
|
|
40
|
+
subscriptionId: string | null;
|
|
43
41
|
createdAt: string;
|
|
42
|
+
currency: "USDC" | "EURC";
|
|
43
|
+
customerId: string | null;
|
|
44
|
+
amount: string;
|
|
44
45
|
feeAmount: string;
|
|
45
46
|
netAmount: string;
|
|
46
47
|
onchainTxHash: string;
|
|
47
48
|
payerAddress: string;
|
|
48
|
-
subscriptionId: string | null;
|
|
49
49
|
kind: "refund" | "one_shot" | "subscription_charge" | "invoice_payment" | "storefront_purchase";
|
|
50
50
|
subscriptionChargeId: string | null;
|
|
51
51
|
refundId: string | null;
|
|
@@ -54,18 +54,18 @@ declare const transactionSchema: z.ZodObject<{
|
|
|
54
54
|
blockTimestamp: string;
|
|
55
55
|
}, {
|
|
56
56
|
status: "confirmed" | "failed" | "pending";
|
|
57
|
-
amount: string;
|
|
58
|
-
currency: "USDC" | "EURC";
|
|
59
|
-
customerId: string | null;
|
|
60
|
-
merchantId: string;
|
|
61
57
|
id: string;
|
|
58
|
+
merchantId: string;
|
|
62
59
|
sessionId: string | null;
|
|
60
|
+
subscriptionId: string | null;
|
|
63
61
|
createdAt: string;
|
|
62
|
+
currency: "USDC" | "EURC";
|
|
63
|
+
customerId: string | null;
|
|
64
|
+
amount: string;
|
|
64
65
|
feeAmount: string;
|
|
65
66
|
netAmount: string;
|
|
66
67
|
onchainTxHash: string;
|
|
67
68
|
payerAddress: string;
|
|
68
|
-
subscriptionId: string | null;
|
|
69
69
|
kind: "refund" | "one_shot" | "subscription_charge" | "invoice_payment" | "storefront_purchase";
|
|
70
70
|
subscriptionChargeId: string | null;
|
|
71
71
|
refundId: string | null;
|
package/dist/webhooks.d.cts
CHANGED
|
@@ -29,25 +29,25 @@ declare const webhookEndpointSchema: z.ZodObject<{
|
|
|
29
29
|
createdAt: z.ZodString;
|
|
30
30
|
updatedAt: z.ZodString;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
status: "
|
|
33
|
-
mode: "test" | "live";
|
|
34
|
-
merchantId: string;
|
|
35
|
-
description: string | null;
|
|
32
|
+
status: "disabled" | "active";
|
|
36
33
|
id: string;
|
|
34
|
+
merchantId: string;
|
|
37
35
|
createdAt: string;
|
|
36
|
+
description: string | null;
|
|
38
37
|
updatedAt: string;
|
|
38
|
+
mode: "test" | "live";
|
|
39
39
|
url: string;
|
|
40
40
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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
|
-
status: "
|
|
45
|
-
mode: "test" | "live";
|
|
46
|
-
merchantId: string;
|
|
47
|
-
description: string | null;
|
|
44
|
+
status: "disabled" | "active";
|
|
48
45
|
id: string;
|
|
46
|
+
merchantId: string;
|
|
49
47
|
createdAt: string;
|
|
48
|
+
description: string | null;
|
|
50
49
|
updatedAt: string;
|
|
50
|
+
mode: "test" | "live";
|
|
51
51
|
url: string;
|
|
52
52
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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;
|
|
@@ -86,25 +86,25 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
86
86
|
createdAt: z.ZodString;
|
|
87
87
|
updatedAt: z.ZodString;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
status: "
|
|
90
|
-
mode: "test" | "live";
|
|
91
|
-
merchantId: string;
|
|
92
|
-
description: string | null;
|
|
89
|
+
status: "disabled" | "active";
|
|
93
90
|
id: string;
|
|
91
|
+
merchantId: string;
|
|
94
92
|
createdAt: string;
|
|
93
|
+
description: string | null;
|
|
95
94
|
updatedAt: string;
|
|
95
|
+
mode: "test" | "live";
|
|
96
96
|
url: string;
|
|
97
97
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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
|
-
status: "
|
|
102
|
-
mode: "test" | "live";
|
|
103
|
-
merchantId: string;
|
|
104
|
-
description: string | null;
|
|
101
|
+
status: "disabled" | "active";
|
|
105
102
|
id: string;
|
|
103
|
+
merchantId: string;
|
|
106
104
|
createdAt: string;
|
|
105
|
+
description: string | null;
|
|
107
106
|
updatedAt: string;
|
|
107
|
+
mode: "test" | "live";
|
|
108
108
|
url: string;
|
|
109
109
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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;
|
|
@@ -114,13 +114,13 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
114
114
|
signingSecret: z.ZodString;
|
|
115
115
|
}, "strip", z.ZodTypeAny, {
|
|
116
116
|
endpoint: {
|
|
117
|
-
status: "
|
|
118
|
-
mode: "test" | "live";
|
|
119
|
-
merchantId: string;
|
|
120
|
-
description: string | null;
|
|
117
|
+
status: "disabled" | "active";
|
|
121
118
|
id: string;
|
|
119
|
+
merchantId: string;
|
|
122
120
|
createdAt: string;
|
|
121
|
+
description: string | null;
|
|
123
122
|
updatedAt: string;
|
|
123
|
+
mode: "test" | "live";
|
|
124
124
|
url: string;
|
|
125
125
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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;
|
|
@@ -129,13 +129,13 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
129
129
|
signingSecret: string;
|
|
130
130
|
}, {
|
|
131
131
|
endpoint: {
|
|
132
|
-
status: "
|
|
133
|
-
mode: "test" | "live";
|
|
134
|
-
merchantId: string;
|
|
135
|
-
description: string | null;
|
|
132
|
+
status: "disabled" | "active";
|
|
136
133
|
id: string;
|
|
134
|
+
merchantId: string;
|
|
137
135
|
createdAt: string;
|
|
136
|
+
description: string | null;
|
|
138
137
|
updatedAt: string;
|
|
138
|
+
mode: "test" | "live";
|
|
139
139
|
url: string;
|
|
140
140
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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;
|
|
@@ -162,8 +162,8 @@ declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
162
162
|
createdAt: z.ZodString;
|
|
163
163
|
}, "strip", z.ZodTypeAny, {
|
|
164
164
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
165
|
-
merchantId: string;
|
|
166
165
|
id: string;
|
|
166
|
+
merchantId: string;
|
|
167
167
|
createdAt: string;
|
|
168
168
|
endpointId: string;
|
|
169
169
|
eventId: string;
|
|
@@ -176,8 +176,8 @@ declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
176
176
|
deliveredAt: string | null;
|
|
177
177
|
}, {
|
|
178
178
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
179
|
-
merchantId: string;
|
|
180
179
|
id: string;
|
|
180
|
+
merchantId: string;
|
|
181
181
|
createdAt: string;
|
|
182
182
|
endpointId: string;
|
|
183
183
|
eventId: string;
|
|
@@ -215,8 +215,8 @@ 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
|
-
merchantId: string;
|
|
219
218
|
id: string;
|
|
219
|
+
merchantId: string;
|
|
220
220
|
createdAt: string;
|
|
221
221
|
endpointId: string;
|
|
222
222
|
eventId: string;
|
|
@@ -232,8 +232,8 @@ declare const webhookDeliveryDetailSchema: z.ZodObject<{
|
|
|
232
232
|
requestPayload: Record<string, unknown>;
|
|
233
233
|
}, {
|
|
234
234
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
235
|
-
merchantId: string;
|
|
236
235
|
id: string;
|
|
236
|
+
merchantId: string;
|
|
237
237
|
createdAt: string;
|
|
238
238
|
endpointId: string;
|
|
239
239
|
eventId: string;
|
package/dist/webhooks.d.ts
CHANGED
|
@@ -29,25 +29,25 @@ declare const webhookEndpointSchema: z.ZodObject<{
|
|
|
29
29
|
createdAt: z.ZodString;
|
|
30
30
|
updatedAt: z.ZodString;
|
|
31
31
|
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
status: "
|
|
33
|
-
mode: "test" | "live";
|
|
34
|
-
merchantId: string;
|
|
35
|
-
description: string | null;
|
|
32
|
+
status: "disabled" | "active";
|
|
36
33
|
id: string;
|
|
34
|
+
merchantId: string;
|
|
37
35
|
createdAt: string;
|
|
36
|
+
description: string | null;
|
|
38
37
|
updatedAt: string;
|
|
38
|
+
mode: "test" | "live";
|
|
39
39
|
url: string;
|
|
40
40
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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
|
-
status: "
|
|
45
|
-
mode: "test" | "live";
|
|
46
|
-
merchantId: string;
|
|
47
|
-
description: string | null;
|
|
44
|
+
status: "disabled" | "active";
|
|
48
45
|
id: string;
|
|
46
|
+
merchantId: string;
|
|
49
47
|
createdAt: string;
|
|
48
|
+
description: string | null;
|
|
50
49
|
updatedAt: string;
|
|
50
|
+
mode: "test" | "live";
|
|
51
51
|
url: string;
|
|
52
52
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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;
|
|
@@ -86,25 +86,25 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
86
86
|
createdAt: z.ZodString;
|
|
87
87
|
updatedAt: z.ZodString;
|
|
88
88
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
status: "
|
|
90
|
-
mode: "test" | "live";
|
|
91
|
-
merchantId: string;
|
|
92
|
-
description: string | null;
|
|
89
|
+
status: "disabled" | "active";
|
|
93
90
|
id: string;
|
|
91
|
+
merchantId: string;
|
|
94
92
|
createdAt: string;
|
|
93
|
+
description: string | null;
|
|
95
94
|
updatedAt: string;
|
|
95
|
+
mode: "test" | "live";
|
|
96
96
|
url: string;
|
|
97
97
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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
|
-
status: "
|
|
102
|
-
mode: "test" | "live";
|
|
103
|
-
merchantId: string;
|
|
104
|
-
description: string | null;
|
|
101
|
+
status: "disabled" | "active";
|
|
105
102
|
id: string;
|
|
103
|
+
merchantId: string;
|
|
106
104
|
createdAt: string;
|
|
105
|
+
description: string | null;
|
|
107
106
|
updatedAt: string;
|
|
107
|
+
mode: "test" | "live";
|
|
108
108
|
url: string;
|
|
109
109
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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;
|
|
@@ -114,13 +114,13 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
114
114
|
signingSecret: z.ZodString;
|
|
115
115
|
}, "strip", z.ZodTypeAny, {
|
|
116
116
|
endpoint: {
|
|
117
|
-
status: "
|
|
118
|
-
mode: "test" | "live";
|
|
119
|
-
merchantId: string;
|
|
120
|
-
description: string | null;
|
|
117
|
+
status: "disabled" | "active";
|
|
121
118
|
id: string;
|
|
119
|
+
merchantId: string;
|
|
122
120
|
createdAt: string;
|
|
121
|
+
description: string | null;
|
|
123
122
|
updatedAt: string;
|
|
123
|
+
mode: "test" | "live";
|
|
124
124
|
url: string;
|
|
125
125
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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;
|
|
@@ -129,13 +129,13 @@ declare const createWebhookEndpointOutputSchema: z.ZodObject<{
|
|
|
129
129
|
signingSecret: string;
|
|
130
130
|
}, {
|
|
131
131
|
endpoint: {
|
|
132
|
-
status: "
|
|
133
|
-
mode: "test" | "live";
|
|
134
|
-
merchantId: string;
|
|
135
|
-
description: string | null;
|
|
132
|
+
status: "disabled" | "active";
|
|
136
133
|
id: string;
|
|
134
|
+
merchantId: string;
|
|
137
135
|
createdAt: string;
|
|
136
|
+
description: string | null;
|
|
138
137
|
updatedAt: string;
|
|
138
|
+
mode: "test" | "live";
|
|
139
139
|
url: string;
|
|
140
140
|
events: ["payment.created" | "payment.completed" | "payment.failed" | "subscription.created" | "subscription.charged" | "subscription.charge_failed" | "subscription.recovery_attempt" | "subscription.cancelled" | "subscription.lapsed" | "subscription.reactivated" | "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" | "subscription.reactivated" | "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;
|
|
@@ -162,8 +162,8 @@ declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
162
162
|
createdAt: z.ZodString;
|
|
163
163
|
}, "strip", z.ZodTypeAny, {
|
|
164
164
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
165
|
-
merchantId: string;
|
|
166
165
|
id: string;
|
|
166
|
+
merchantId: string;
|
|
167
167
|
createdAt: string;
|
|
168
168
|
endpointId: string;
|
|
169
169
|
eventId: string;
|
|
@@ -176,8 +176,8 @@ declare const webhookDeliverySchema: z.ZodObject<{
|
|
|
176
176
|
deliveredAt: string | null;
|
|
177
177
|
}, {
|
|
178
178
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
179
|
-
merchantId: string;
|
|
180
179
|
id: string;
|
|
180
|
+
merchantId: string;
|
|
181
181
|
createdAt: string;
|
|
182
182
|
endpointId: string;
|
|
183
183
|
eventId: string;
|
|
@@ -215,8 +215,8 @@ 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
|
-
merchantId: string;
|
|
219
218
|
id: string;
|
|
219
|
+
merchantId: string;
|
|
220
220
|
createdAt: string;
|
|
221
221
|
endpointId: string;
|
|
222
222
|
eventId: string;
|
|
@@ -232,8 +232,8 @@ declare const webhookDeliveryDetailSchema: z.ZodObject<{
|
|
|
232
232
|
requestPayload: Record<string, unknown>;
|
|
233
233
|
}, {
|
|
234
234
|
status: "pending" | "retrying" | "delivered" | "permanently_failed";
|
|
235
|
-
merchantId: string;
|
|
236
235
|
id: string;
|
|
236
|
+
merchantId: string;
|
|
237
237
|
createdAt: string;
|
|
238
238
|
endpointId: string;
|
|
239
239
|
eventId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strimz/shared-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Zod schemas and inferred TypeScript types for every Strimz platform entity, API input, and webhook event.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Strimz <hello@strimz.finance>",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
],
|
|
119
119
|
"dependencies": {
|
|
120
120
|
"zod": "^3.24.1",
|
|
121
|
-
"@strimz/shared-config": "0.9.
|
|
121
|
+
"@strimz/shared-config": "0.9.1"
|
|
122
122
|
},
|
|
123
123
|
"devDependencies": {
|
|
124
124
|
"eslint": "^9.18.0",
|
package/src/notifications.ts
CHANGED
|
@@ -59,6 +59,15 @@ export const broadcastListResponseSchema = z.object({
|
|
|
59
59
|
})
|
|
60
60
|
export type BroadcastListResponse = z.infer<typeof broadcastListResponseSchema>
|
|
61
61
|
|
|
62
|
+
/** One broadcast as a merchant reads it. `html` is already sanitized by the API. */
|
|
63
|
+
export const notificationBroadcastSchema = z.object({
|
|
64
|
+
id: idSchema,
|
|
65
|
+
title: z.string(),
|
|
66
|
+
html: z.string(),
|
|
67
|
+
createdAt: isoTimestampSchema,
|
|
68
|
+
})
|
|
69
|
+
export type NotificationBroadcast = z.infer<typeof notificationBroadcastSchema>
|
|
70
|
+
|
|
62
71
|
export const notificationSchema = z.object({
|
|
63
72
|
/** Deterministic client id — `{kind}:{sourceId}`. Safe for React keys. */
|
|
64
73
|
id: z.string().min(1),
|