@strimz/shared-types 0.5.0 → 0.7.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/README.md +7 -4
- package/dist/agents.cjs.map +1 -1
- package/dist/agents.d.cts +5 -3
- package/dist/agents.d.ts +5 -3
- package/dist/agents.js.map +1 -1
- package/dist/api-keys.cjs +5 -1
- package/dist/api-keys.cjs.map +1 -1
- package/dist/api-keys.d.cts +17 -15
- package/dist/api-keys.d.ts +17 -15
- package/dist/api-keys.js +5 -1
- package/dist/api-keys.js.map +1 -1
- package/dist/common.cjs.map +1 -1
- package/dist/common.d.cts +3 -2
- package/dist/common.d.ts +3 -2
- package/dist/common.js.map +1 -1
- package/dist/compliance.cjs.map +1 -1
- package/dist/compliance.js.map +1 -1
- package/dist/customers.cjs.map +1 -1
- package/dist/customers.d.cts +3 -2
- package/dist/customers.d.ts +3 -2
- package/dist/customers.js.map +1 -1
- package/dist/events.cjs.map +1 -1
- package/dist/events.js.map +1 -1
- package/dist/index.cjs +5 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -14
- package/dist/index.d.ts +16 -14
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/invoices.cjs.map +1 -1
- package/dist/invoices.d.cts +3 -2
- package/dist/invoices.d.ts +3 -2
- package/dist/invoices.js.map +1 -1
- package/dist/merchants.cjs.map +1 -1
- package/dist/merchants.d.cts +13 -7
- package/dist/merchants.d.ts +13 -7
- package/dist/merchants.js.map +1 -1
- package/dist/payment-sessions.cjs.map +1 -1
- package/dist/payment-sessions.d.cts +5 -3
- package/dist/payment-sessions.d.ts +5 -3
- package/dist/payment-sessions.js.map +1 -1
- package/dist/refunds.cjs.map +1 -1
- package/dist/refunds.d.cts +5 -3
- package/dist/refunds.d.ts +5 -3
- package/dist/refunds.js.map +1 -1
- package/dist/storefronts.cjs.map +1 -1
- package/dist/storefronts.d.cts +7 -4
- package/dist/storefronts.d.ts +7 -4
- package/dist/storefronts.js.map +1 -1
- package/dist/subscriptions.cjs.map +1 -1
- package/dist/subscriptions.d.cts +7 -4
- package/dist/subscriptions.d.ts +7 -4
- package/dist/subscriptions.js.map +1 -1
- package/dist/transactions.cjs.map +1 -1
- package/dist/transactions.js.map +1 -1
- package/dist/webhooks.cjs.map +1 -1
- package/dist/webhooks.d.cts +5 -3
- package/dist/webhooks.d.ts +5 -3
- package/dist/webhooks.js.map +1 -1
- package/package.json +1 -1
- package/src/agents.ts +4 -2
- package/src/api-keys.ts +8 -2
- package/src/common.ts +2 -1
- package/src/contact.ts +2 -1
- package/src/customers.ts +2 -1
- package/src/invoices.ts +2 -1
- package/src/merchants.ts +12 -6
- package/src/notifications.ts +2 -1
- package/src/payment-sessions.ts +4 -2
- package/src/refunds.ts +4 -2
- package/src/storefronts.ts +6 -3
- package/src/subscriptions.ts +6 -3
- package/src/webhooks.ts +4 -2
package/src/common.ts
CHANGED
|
@@ -66,7 +66,8 @@ export const paginationInputSchema = z.object({
|
|
|
66
66
|
limit: z.number().int().min(1).max(100).default(25),
|
|
67
67
|
cursor: z.string().min(1).max(200).nullish(),
|
|
68
68
|
})
|
|
69
|
-
export type PaginationInput = z.
|
|
69
|
+
export type PaginationInput = z.input<typeof paginationInputSchema>
|
|
70
|
+
export type PaginationParsed = z.output<typeof paginationInputSchema>
|
|
70
71
|
|
|
71
72
|
/** Pagination envelope used by every list response. */
|
|
72
73
|
export const makePaginatedSchema = <T extends z.ZodTypeAny>(item: T) =>
|
package/src/contact.ts
CHANGED
|
@@ -18,7 +18,8 @@ export const contactRequestInputSchema = z.object({
|
|
|
18
18
|
topic: contactTopicSchema,
|
|
19
19
|
message: z.string().min(20).max(4000),
|
|
20
20
|
})
|
|
21
|
-
export type ContactRequestInput = z.
|
|
21
|
+
export type ContactRequestInput = z.input<typeof contactRequestInputSchema>
|
|
22
|
+
export type ContactRequestParsed = z.output<typeof contactRequestInputSchema>
|
|
22
23
|
|
|
23
24
|
export const contactRequestOutputSchema = z.object({
|
|
24
25
|
ok: z.literal(true),
|
package/src/customers.ts
CHANGED
|
@@ -37,4 +37,5 @@ export const upsertCustomerInputSchema = z.object({
|
|
|
37
37
|
displayName: z.string().min(1).max(120).optional(),
|
|
38
38
|
metadata: metadataSchema.optional(),
|
|
39
39
|
})
|
|
40
|
-
export type UpsertCustomerInput = z.
|
|
40
|
+
export type UpsertCustomerInput = z.input<typeof upsertCustomerInputSchema>
|
|
41
|
+
export type UpsertCustomerParsed = z.output<typeof upsertCustomerInputSchema>
|
package/src/invoices.ts
CHANGED
|
@@ -50,4 +50,5 @@ export const createInvoiceInputSchema = z.object({
|
|
|
50
50
|
note: z.string().max(2000).optional(),
|
|
51
51
|
dueInDays: z.number().int().min(1).max(90).default(7),
|
|
52
52
|
})
|
|
53
|
-
export type CreateInvoiceInput = z.
|
|
53
|
+
export type CreateInvoiceInput = z.input<typeof createInvoiceInputSchema>
|
|
54
|
+
export type CreateInvoiceParsed = z.output<typeof createInvoiceInputSchema>
|
package/src/merchants.ts
CHANGED
|
@@ -52,7 +52,8 @@ export const createMerchantInputSchema = z.object({
|
|
|
52
52
|
countryCode: z.string().length(2).optional(),
|
|
53
53
|
websiteUrl: z.string().url().optional(),
|
|
54
54
|
})
|
|
55
|
-
export type CreateMerchantInput = z.
|
|
55
|
+
export type CreateMerchantInput = z.input<typeof createMerchantInputSchema>
|
|
56
|
+
export type CreateMerchantParsed = z.output<typeof createMerchantInputSchema>
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
59
|
* Merchant email opt-outs, persisted at `Merchant.metadata.emailPrefs`.
|
|
@@ -83,12 +84,14 @@ export const updateMerchantInputSchema = z
|
|
|
83
84
|
emailPrefs: merchantEmailPrefsSchema.partial(),
|
|
84
85
|
})
|
|
85
86
|
.partial()
|
|
86
|
-
export type UpdateMerchantInput = z.
|
|
87
|
+
export type UpdateMerchantInput = z.input<typeof updateMerchantInputSchema>
|
|
88
|
+
export type UpdateMerchantParsed = z.output<typeof updateMerchantInputSchema>
|
|
87
89
|
|
|
88
90
|
export const changeTierInputSchema = z.object({
|
|
89
91
|
tier: merchantTierSchema,
|
|
90
92
|
})
|
|
91
|
-
export type ChangeTierInput = z.
|
|
93
|
+
export type ChangeTierInput = z.input<typeof changeTierInputSchema>
|
|
94
|
+
export type ChangeTierParsed = z.output<typeof changeTierInputSchema>
|
|
92
95
|
|
|
93
96
|
/**
|
|
94
97
|
* Self-attested onboarding form the dashboard collects after a
|
|
@@ -110,7 +113,8 @@ export const onboardMerchantInputSchema = z.object({
|
|
|
110
113
|
payoutAddress: evmAddressSchema,
|
|
111
114
|
defaultCurrency: z.enum(['USDC', 'EURC']).optional(),
|
|
112
115
|
})
|
|
113
|
-
export type OnboardMerchantInput = z.
|
|
116
|
+
export type OnboardMerchantInput = z.input<typeof onboardMerchantInputSchema>
|
|
117
|
+
export type OnboardMerchantParsed = z.output<typeof onboardMerchantInputSchema>
|
|
114
118
|
|
|
115
119
|
export const merchantPublicBrandSchema = z.object({
|
|
116
120
|
id: idSchema,
|
|
@@ -170,7 +174,8 @@ export const inviteMemberInputSchema = z.object({
|
|
|
170
174
|
email: emailSchema,
|
|
171
175
|
role: merchantRoleSchema,
|
|
172
176
|
})
|
|
173
|
-
export type InviteMemberInput = z.
|
|
177
|
+
export type InviteMemberInput = z.input<typeof inviteMemberInputSchema>
|
|
178
|
+
export type InviteMemberParsed = z.output<typeof inviteMemberInputSchema>
|
|
174
179
|
|
|
175
180
|
// ---------- Auth ----------
|
|
176
181
|
|
|
@@ -178,7 +183,8 @@ export const loginInputSchema = z.object({
|
|
|
178
183
|
email: emailSchema,
|
|
179
184
|
password: z.string().min(1).max(128),
|
|
180
185
|
})
|
|
181
|
-
export type LoginInput = z.
|
|
186
|
+
export type LoginInput = z.input<typeof loginInputSchema>
|
|
187
|
+
export type LoginParsed = z.output<typeof loginInputSchema>
|
|
182
188
|
|
|
183
189
|
export const loginOutputSchema = z.object({
|
|
184
190
|
accessToken: z.string(),
|
package/src/notifications.ts
CHANGED
|
@@ -37,7 +37,8 @@ export const createBroadcastInputSchema = z
|
|
|
37
37
|
message: 'merchantId is required when audience is merchant',
|
|
38
38
|
path: ['merchantId'],
|
|
39
39
|
})
|
|
40
|
-
export type CreateBroadcastInput = z.
|
|
40
|
+
export type CreateBroadcastInput = z.input<typeof createBroadcastInputSchema>
|
|
41
|
+
export type CreateBroadcastParsed = z.output<typeof createBroadcastInputSchema>
|
|
41
42
|
|
|
42
43
|
export const broadcastSchema = z.object({
|
|
43
44
|
id: idSchema,
|
package/src/payment-sessions.ts
CHANGED
|
@@ -133,7 +133,8 @@ export const createPaymentSessionInputSchema = z.object({
|
|
|
133
133
|
.optional(),
|
|
134
134
|
metadata: metadataSchema.optional(),
|
|
135
135
|
})
|
|
136
|
-
export type CreatePaymentSessionInput = z.
|
|
136
|
+
export type CreatePaymentSessionInput = z.input<typeof createPaymentSessionInputSchema>
|
|
137
|
+
export type CreatePaymentSessionParsed = z.output<typeof createPaymentSessionInputSchema>
|
|
137
138
|
|
|
138
139
|
export const submitPaymentSessionInputSchema = z.object({
|
|
139
140
|
sourceChain: z.enum([
|
|
@@ -150,4 +151,5 @@ export const submitPaymentSessionInputSchema = z.object({
|
|
|
150
151
|
bridgeTxHash: evmTxHashSchema.optional(),
|
|
151
152
|
payerWalletAddress: evmAddressSchema,
|
|
152
153
|
})
|
|
153
|
-
export type SubmitPaymentSessionInput = z.
|
|
154
|
+
export type SubmitPaymentSessionInput = z.input<typeof submitPaymentSessionInputSchema>
|
|
155
|
+
export type SubmitPaymentSessionParsed = z.output<typeof submitPaymentSessionInputSchema>
|
package/src/refunds.ts
CHANGED
|
@@ -59,13 +59,15 @@ export const createRefundInputSchema = z.object({
|
|
|
59
59
|
reason: refundReasonSchema,
|
|
60
60
|
note: z.string().max(500).optional(),
|
|
61
61
|
})
|
|
62
|
-
export type CreateRefundInput = z.
|
|
62
|
+
export type CreateRefundInput = z.input<typeof createRefundInputSchema>
|
|
63
|
+
export type CreateRefundParsed = z.output<typeof createRefundInputSchema>
|
|
63
64
|
|
|
64
65
|
export const submitRefundSignatureInputSchema = z.object({
|
|
65
66
|
id: idSchema,
|
|
66
67
|
refundTxHash: evmTxHashSchema,
|
|
67
68
|
})
|
|
68
|
-
export type SubmitRefundSignatureInput = z.
|
|
69
|
+
export type SubmitRefundSignatureInput = z.input<typeof submitRefundSignatureInputSchema>
|
|
70
|
+
export type SubmitRefundSignatureParsed = z.output<typeof submitRefundSignatureInputSchema>
|
|
69
71
|
|
|
70
72
|
/**
|
|
71
73
|
* Response envelope for `POST /v1/refunds`. The API returns the newly
|
package/src/storefronts.ts
CHANGED
|
@@ -47,7 +47,8 @@ export const createStorefrontInputSchema = storefrontSchema.pick({
|
|
|
47
47
|
accentColor: true,
|
|
48
48
|
socialLinks: true,
|
|
49
49
|
})
|
|
50
|
-
export type CreateStorefrontInput = z.
|
|
50
|
+
export type CreateStorefrontInput = z.input<typeof createStorefrontInputSchema>
|
|
51
|
+
export type CreateStorefrontParsed = z.output<typeof createStorefrontInputSchema>
|
|
51
52
|
|
|
52
53
|
// ---------- Products ----------
|
|
53
54
|
|
|
@@ -103,7 +104,8 @@ export const createStorefrontProductInputSchema = storefrontProductSchema
|
|
|
103
104
|
})
|
|
104
105
|
}
|
|
105
106
|
})
|
|
106
|
-
export type CreateStorefrontProductInput = z.
|
|
107
|
+
export type CreateStorefrontProductInput = z.input<typeof createStorefrontProductInputSchema>
|
|
108
|
+
export type CreateStorefrontProductParsed = z.output<typeof createStorefrontProductInputSchema>
|
|
107
109
|
|
|
108
110
|
/**
|
|
109
111
|
* Payload for the public `/store/:slug/products/:id/checkout` endpoint.
|
|
@@ -116,7 +118,8 @@ export const storefrontCheckoutInputSchema = z.object({
|
|
|
116
118
|
customerEmail: z.string().email().optional(),
|
|
117
119
|
returnPath: z.string().max(200).optional(),
|
|
118
120
|
})
|
|
119
|
-
export type StorefrontCheckoutInput = z.
|
|
121
|
+
export type StorefrontCheckoutInput = z.input<typeof storefrontCheckoutInputSchema>
|
|
122
|
+
export type StorefrontCheckoutParsed = z.output<typeof storefrontCheckoutInputSchema>
|
|
120
123
|
|
|
121
124
|
/** Response shape from the public product-checkout endpoint. */
|
|
122
125
|
export const storefrontCheckoutResponseSchema = z.object({
|
package/src/subscriptions.ts
CHANGED
|
@@ -81,7 +81,8 @@ export const createSubscriptionPlanInputSchema = z.object({
|
|
|
81
81
|
trialPeriodDays: z.number().int().min(0).max(365).optional(),
|
|
82
82
|
metadata: metadataSchema.optional(),
|
|
83
83
|
})
|
|
84
|
-
export type CreateSubscriptionPlanInput = z.
|
|
84
|
+
export type CreateSubscriptionPlanInput = z.input<typeof createSubscriptionPlanInputSchema>
|
|
85
|
+
export type CreateSubscriptionPlanParsed = z.output<typeof createSubscriptionPlanInputSchema>
|
|
85
86
|
|
|
86
87
|
// ---------- Subscriptions ----------
|
|
87
88
|
|
|
@@ -143,13 +144,15 @@ export const createSubscriptionInputSchema = z.object({
|
|
|
143
144
|
gracePeriodHours: z.union([z.literal(24), z.literal(48), z.literal(72)]).default(48),
|
|
144
145
|
metadata: metadataSchema.optional(),
|
|
145
146
|
})
|
|
146
|
-
export type CreateSubscriptionInput = z.
|
|
147
|
+
export type CreateSubscriptionInput = z.input<typeof createSubscriptionInputSchema>
|
|
148
|
+
export type CreateSubscriptionParsed = z.output<typeof createSubscriptionInputSchema>
|
|
147
149
|
|
|
148
150
|
export const cancelSubscriptionInputSchema = z.object({
|
|
149
151
|
id: idSchema,
|
|
150
152
|
reason: z.string().max(500).optional(),
|
|
151
153
|
})
|
|
152
|
-
export type CancelSubscriptionInput = z.
|
|
154
|
+
export type CancelSubscriptionInput = z.input<typeof cancelSubscriptionInputSchema>
|
|
155
|
+
export type CancelSubscriptionParsed = z.output<typeof cancelSubscriptionInputSchema>
|
|
153
156
|
|
|
154
157
|
// ---------- Charges ----------
|
|
155
158
|
|
package/src/webhooks.ts
CHANGED
|
@@ -67,7 +67,8 @@ export const createWebhookEndpointInputSchema = z.object({
|
|
|
67
67
|
description: z.string().max(200).optional(),
|
|
68
68
|
mode: modeSchema,
|
|
69
69
|
})
|
|
70
|
-
export type CreateWebhookEndpointInput = z.
|
|
70
|
+
export type CreateWebhookEndpointInput = z.input<typeof createWebhookEndpointInputSchema>
|
|
71
|
+
export type CreateWebhookEndpointParsed = z.output<typeof createWebhookEndpointInputSchema>
|
|
71
72
|
|
|
72
73
|
export const createWebhookEndpointOutputSchema = z.object({
|
|
73
74
|
endpoint: webhookEndpointSchema,
|
|
@@ -118,4 +119,5 @@ export type WebhookDeliveryDetail = z.infer<typeof webhookDeliveryDetailSchema>
|
|
|
118
119
|
export const replayDeliveryInputSchema = z.object({
|
|
119
120
|
id: idSchema,
|
|
120
121
|
})
|
|
121
|
-
export type ReplayDeliveryInput = z.
|
|
122
|
+
export type ReplayDeliveryInput = z.input<typeof replayDeliveryInputSchema>
|
|
123
|
+
export type ReplayDeliveryParsed = z.output<typeof replayDeliveryInputSchema>
|