@strimz/shared-types 0.1.0 → 0.2.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.
Files changed (97) hide show
  1. package/README.md +66 -36
  2. package/dist/agents.cjs.map +1 -1
  3. package/dist/agents.d.cts +1 -1
  4. package/dist/agents.d.ts +1 -1
  5. package/dist/agents.js.map +1 -1
  6. package/dist/api-keys.cjs +8 -3
  7. package/dist/api-keys.cjs.map +1 -1
  8. package/dist/api-keys.d.cts +15 -16
  9. package/dist/api-keys.d.ts +15 -16
  10. package/dist/api-keys.js +8 -3
  11. package/dist/api-keys.js.map +1 -1
  12. package/dist/common.cjs.map +1 -1
  13. package/dist/common.d.cts +2 -2
  14. package/dist/common.d.ts +2 -2
  15. package/dist/common.js.map +1 -1
  16. package/dist/compliance.cjs.map +1 -1
  17. package/dist/compliance.d.cts +1 -1
  18. package/dist/compliance.d.ts +1 -1
  19. package/dist/compliance.js.map +1 -1
  20. package/dist/customers.cjs.map +1 -1
  21. package/dist/customers.d.cts +1 -1
  22. package/dist/customers.d.ts +1 -1
  23. package/dist/customers.js.map +1 -1
  24. package/dist/events.cjs +24 -6
  25. package/dist/events.cjs.map +1 -1
  26. package/dist/events.d.cts +12 -12
  27. package/dist/events.d.ts +12 -12
  28. package/dist/events.js +24 -6
  29. package/dist/events.js.map +1 -1
  30. package/dist/index.cjs +188 -11
  31. package/dist/index.cjs.map +1 -1
  32. package/dist/index.d.cts +302 -17
  33. package/dist/index.d.ts +302 -17
  34. package/dist/index.js +167 -12
  35. package/dist/index.js.map +1 -1
  36. package/dist/invoices.cjs.map +1 -1
  37. package/dist/invoices.d.cts +1 -1
  38. package/dist/invoices.d.ts +1 -1
  39. package/dist/invoices.js.map +1 -1
  40. package/dist/merchants.cjs +59 -1
  41. package/dist/merchants.cjs.map +1 -1
  42. package/dist/merchants.d.cts +171 -1
  43. package/dist/merchants.d.ts +171 -1
  44. package/dist/merchants.js +55 -2
  45. package/dist/merchants.js.map +1 -1
  46. package/dist/payment-sessions.cjs +6 -2
  47. package/dist/payment-sessions.cjs.map +1 -1
  48. package/dist/payment-sessions.d.cts +20 -4
  49. package/dist/payment-sessions.d.ts +20 -4
  50. package/dist/payment-sessions.js +6 -3
  51. package/dist/payment-sessions.js.map +1 -1
  52. package/dist/refunds.cjs +12 -0
  53. package/dist/refunds.cjs.map +1 -1
  54. package/dist/refunds.d.cts +135 -2
  55. package/dist/refunds.d.ts +135 -2
  56. package/dist/refunds.js +11 -1
  57. package/dist/refunds.js.map +1 -1
  58. package/dist/storefronts.cjs +16 -2
  59. package/dist/storefronts.cjs.map +1 -1
  60. package/dist/storefronts.d.cts +38 -2
  61. package/dist/storefronts.d.ts +38 -2
  62. package/dist/storefronts.js +15 -3
  63. package/dist/storefronts.js.map +1 -1
  64. package/dist/subscriptions.cjs +2 -2
  65. package/dist/subscriptions.cjs.map +1 -1
  66. package/dist/subscriptions.d.cts +3 -3
  67. package/dist/subscriptions.d.ts +3 -3
  68. package/dist/subscriptions.js +2 -2
  69. package/dist/subscriptions.js.map +1 -1
  70. package/dist/transactions.cjs.map +1 -1
  71. package/dist/transactions.d.cts +2 -2
  72. package/dist/transactions.d.ts +2 -2
  73. package/dist/transactions.js.map +1 -1
  74. package/dist/webhooks.cjs +7 -1
  75. package/dist/webhooks.cjs.map +1 -1
  76. package/dist/webhooks.d.cts +63 -4
  77. package/dist/webhooks.d.ts +63 -4
  78. package/dist/webhooks.js +7 -2
  79. package/dist/webhooks.js.map +1 -1
  80. package/package.json +2 -2
  81. package/src/agents.ts +1 -1
  82. package/src/api-keys.ts +9 -5
  83. package/src/common.ts +2 -2
  84. package/src/compliance.ts +1 -1
  85. package/src/contact.ts +26 -0
  86. package/src/customers.ts +1 -1
  87. package/src/index.ts +2 -0
  88. package/src/invoices.ts +1 -1
  89. package/src/merchants.ts +84 -0
  90. package/src/notifications.ts +88 -0
  91. package/src/payment-sessions.ts +25 -3
  92. package/src/refunds.ts +20 -1
  93. package/src/storefronts.ts +25 -1
  94. package/src/subscriptions.ts +3 -3
  95. package/src/tokens.ts +7 -7
  96. package/src/transactions.ts +2 -2
  97. package/src/webhooks.ts +15 -3
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  export { ArcEnvironment, EvmAddress, EvmTxHash, Id, IsoTimestamp, MerchantTier, Metadata, Mode, PaginationInput, PaymentCurrency, TokenAmount, TokenSymbol, arcEnvironmentSchema, countryCodeSchema, emailSchema, evmAddressSchema, evmTxHashSchema, httpUrlSchema, httpsUrlSchema, idSchema, isoTimestampSchema, makePaginatedSchema, merchantTierSchema, metadataSchema, modeSchema, paginationInputSchema, paymentCurrencySchema, tokenAmountSchema, tokenSymbolSchema, uintSchema } from './common.js';
2
- export { ChangeTierInput, CreateMerchantInput, InviteMemberInput, LoginInput, LoginOutput, Merchant, MerchantMember, MerchantRole, MerchantStatus, UpdateMerchantInput, changeTierInputSchema, createMerchantInputSchema, inviteMemberInputSchema, loginInputSchema, loginOutputSchema, merchantMemberSchema, merchantRoleSchema, merchantSchema, merchantStatusSchema, updateMerchantInputSchema } from './merchants.js';
2
+ export { ChangeTierInput, CreateMerchantInput, DEFAULT_MERCHANT_EMAIL_PREFS, InviteMemberInput, LoginInput, LoginOutput, Merchant, MerchantBalanceView, MerchantEmailPrefs, MerchantMember, MerchantPublicBrand, MerchantRole, MerchantStatus, OnboardMerchantInput, UpdateMerchantInput, changeTierInputSchema, createMerchantInputSchema, inviteMemberInputSchema, loginInputSchema, loginOutputSchema, merchantBalanceSchema, merchantEmailPrefsSchema, merchantMemberSchema, merchantPublicBrandSchema, merchantRoleSchema, merchantSchema, merchantStatusSchema, onboardMerchantInputSchema, updateMerchantInputSchema } from './merchants.js';
3
3
  export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput, RotateApiKeyInput, apiKeyKindSchema, apiKeySchema, apiKeyScopeSchema, createApiKeyInputSchema, createApiKeyOutputSchema, rotateApiKeyInputSchema } from './api-keys.js';
4
4
  export { Customer, UpsertCustomerInput, customerSchema, upsertCustomerInputSchema } from './customers.js';
5
- export { CreatePaymentSessionInput, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.js';
5
+ export { CreatePaymentSessionInput, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, callbackUrlSchema, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.js';
6
6
  export { Transaction, TransactionKind, TransactionStatus, transactionKindSchema, transactionSchema, transactionStatusSchema } from './transactions.js';
7
7
  export { CancelSubscriptionInput, CreateSubscriptionInput, CreateSubscriptionPlanInput, Subscription, SubscriptionCharge, SubscriptionChargeOutcome, SubscriptionChargeStatus, SubscriptionInterval, SubscriptionPlan, SubscriptionPlanStatus, SubscriptionStatus, cancelSubscriptionInputSchema, createSubscriptionInputSchema, createSubscriptionPlanInputSchema, subscriptionChargeOutcomeSchema, subscriptionChargeSchema, subscriptionChargeStatusSchema, subscriptionIntervalSchema, subscriptionPlanSchema, subscriptionPlanStatusSchema, subscriptionSchema, subscriptionStatusSchema } from './subscriptions.js';
8
- export { CreateRefundInput, Refund, RefundReason, RefundStatus, SubmitRefundSignatureInput, createRefundInputSchema, refundReasonSchema, refundSchema, refundStatusSchema, submitRefundSignatureInputSchema } from './refunds.js';
9
- export { CreateWebhookEndpointInput, CreateWebhookEndpointOutput, ReplayDeliveryInput, WebhookDelivery, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointStatus, WebhookEventName, createWebhookEndpointInputSchema, createWebhookEndpointOutputSchema, replayDeliveryInputSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEndpointSchema, webhookEndpointStatusSchema, webhookEventNameSchema } from './webhooks.js';
8
+ export { CreateRefundInput, Refund, RefundCreateOutput, RefundReason, RefundSigningInstructions, RefundStatus, SubmitRefundSignatureInput, createRefundInputSchema, refundCreateOutputSchema, refundReasonSchema, refundSchema, refundSigningInstructionsSchema, refundStatusSchema, submitRefundSignatureInputSchema } from './refunds.js';
9
+ export { CreateWebhookEndpointInput, CreateWebhookEndpointOutput, ReplayDeliveryInput, WebhookDelivery, WebhookDeliveryDetail, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointStatus, WebhookEventName, createWebhookEndpointInputSchema, createWebhookEndpointOutputSchema, replayDeliveryInputSchema, webhookDeliveryDetailSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEndpointSchema, webhookEndpointStatusSchema, webhookEventNameSchema } from './webhooks.js';
10
10
  export { ComplianceLog, ComplianceProvider, ComplianceScreeningContext, ComplianceStatus, complianceLogSchema, complianceProviderSchema, complianceScreeningContextSchema, complianceStatusSchema } from './compliance.js';
11
11
  export { AgentActionOutcome, AgentActionType, AgentActivityLog, AgentCapability, AgentIdentity, AgentJob, AgentJobStatus, AgentMerchantConfig, CreateAgentJobInput, UpdateAgentConfigInput, agentActionOutcomeSchema, agentActionTypeSchema, agentActivityLogSchema, agentCapabilitySchema, agentIdentitySchema, agentJobSchema, agentJobStatusSchema, agentMerchantConfigSchema, createAgentJobInputSchema, updateAgentConfigInputSchema } from './agents.js';
12
- export { CreateStorefrontInput, CreateStorefrontProductInput, Storefront, StorefrontProduct, StorefrontProductType, StorefrontStatus, createStorefrontInputSchema, createStorefrontProductInputSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema } from './storefronts.js';
12
+ export { CreateStorefrontInput, CreateStorefrontProductInput, Storefront, StorefrontCheckoutInput, StorefrontCheckoutResponse, StorefrontProduct, StorefrontProductType, StorefrontStatus, createStorefrontInputSchema, createStorefrontProductInputSchema, storefrontCheckoutInputSchema, storefrontCheckoutResponseSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema } from './storefronts.js';
13
13
  export { CreateInvoiceInput, Invoice, InvoiceLineItem, InvoiceStatus, createInvoiceInputSchema, invoiceLineItemSchema, invoiceSchema, invoiceStatusSchema } from './invoices.js';
14
14
  export { AgentActionExecutedEvent, AgentJobCompletedEvent, AgentJobDisputedEvent, AgentJobProposedEvent, ComplianceWalletBlockedEvent, ComplianceWalletFlaggedEvent, InvoiceCreatedEvent, InvoiceOverdueEvent, InvoicePaidEvent, PaymentCompletedEvent, PaymentCreatedEvent, PaymentFailedEvent, RefundCompletedEvent, RefundCreatedEvent, RefundFailedEvent, StrimzWebhookEvent, SubscriptionCancelledEvent, SubscriptionChargeFailedEvent, SubscriptionChargedEvent, SubscriptionCreatedEvent, SubscriptionLapsedEvent, SubscriptionRecoveryAttemptEvent, SubscriptionRecoveryOutcomeEvent, agentActionExecutedEventSchema, agentJobCompletedEventSchema, agentJobDisputedEventSchema, agentJobProposedEventSchema, complianceWalletBlockedEventSchema, complianceWalletFlaggedEventSchema, invoiceCreatedEventSchema, invoiceOverdueEventSchema, invoicePaidEventSchema, paymentCompletedEventSchema, paymentCreatedEventSchema, paymentFailedEventSchema, refundCompletedEventSchema, refundCreatedEventSchema, refundFailedEventSchema, subscriptionCancelledEventSchema, subscriptionChargeFailedEventSchema, subscriptionChargedEventSchema, subscriptionCreatedEventSchema, subscriptionLapsedEventSchema, subscriptionRecoveryAttemptEventSchema, subscriptionRecoveryOutcomeEventSchema, webhookEventSchema } from './events.js';
15
15
  import { z } from 'zod';
@@ -19,16 +19,16 @@ import { z } from 'zod';
19
19
  *
20
20
  * Read by the SDK's BrowserClient to (1) pick the right meta-tx path
21
21
  * for a given token and (2) build the EIP-712 typed-data domain. The
22
- * shape is intentionally derived from on-chain reads — name / version
23
- * from the token's ERC-5267 `eip712Domain()` (falling back to a
24
- * default), capabilities from Strimz's TokenWhitelist contract.
22
+ * shape is derived from on-chain reads. Name and version come from the
23
+ * token's ERC-5267 `eip712Domain()` (falling back to a default), and
24
+ * capabilities come from Strimz's TokenWhitelist contract.
25
25
  *
26
26
  * `capabilities.permit2612` means the token implements EIP-2612 (the
27
27
  * gasless allowance + subscription enrolment path).
28
28
  * `capabilities.transferAuth3009` means the token implements EIP-3009
29
29
  * (the gasless one-shot payment path).
30
30
  *
31
- * Tokens may have one capability or both — USDC and EURC on Arc
31
+ * Tokens may have one capability or both. USDC and EURC on Arc
32
32
  * advertise both.
33
33
  */
34
34
 
@@ -49,8 +49,8 @@ declare const tokenMetadataSchema: z.ZodObject<{
49
49
  symbol: z.ZodString;
50
50
  /**
51
51
  * EIP-712 domain version. Read from ERC-5267 `eip712Domain()` when
52
- * available; otherwise defaults to "1". Used by typed-data builders
53
- * — domain mismatch produces a different digest and the contract's
52
+ * available; otherwise defaults to "1". Used by typed-data builders.
53
+ * A domain mismatch produces a different digest, so the contract's
54
54
  * ecrecover would recover a different address.
55
55
  */
56
56
  version: z.ZodString;
@@ -69,8 +69,8 @@ declare const tokenMetadataSchema: z.ZodObject<{
69
69
  symbol: string;
70
70
  name: string;
71
71
  version: string;
72
- address: string;
73
72
  decimals: number;
73
+ address: string;
74
74
  capabilities: {
75
75
  permit2612: boolean;
76
76
  transferAuth3009: boolean;
@@ -79,8 +79,8 @@ declare const tokenMetadataSchema: z.ZodObject<{
79
79
  symbol: string;
80
80
  name: string;
81
81
  version: string;
82
- address: string;
83
82
  decimals: number;
83
+ address: string;
84
84
  capabilities: {
85
85
  permit2612: boolean;
86
86
  transferAuth3009: boolean;
@@ -89,7 +89,7 @@ declare const tokenMetadataSchema: z.ZodObject<{
89
89
  type TokenMetadata = z.infer<typeof tokenMetadataSchema>;
90
90
  /**
91
91
  * Owner-specific permit nonce. The EIP-2612 standard tracks a per-
92
- * owner monotonic counter — every successful permit consumes one,
92
+ * owner monotonic counter, and every successful permit consumes one,
93
93
  * so signers must read the current value immediately before signing.
94
94
  *
95
95
  * Returned as a decimal string to avoid JS number truncation on the
@@ -100,14 +100,299 @@ declare const tokenPermitNonceSchema: z.ZodObject<{
100
100
  owner: z.ZodString;
101
101
  nonce: z.ZodString;
102
102
  }, "strip", z.ZodTypeAny, {
103
- owner: string;
104
103
  token: string;
104
+ owner: string;
105
105
  nonce: string;
106
106
  }, {
107
- owner: string;
108
107
  token: string;
108
+ owner: string;
109
109
  nonce: string;
110
110
  }>;
111
111
  type TokenPermitNonce = z.infer<typeof tokenPermitNonceSchema>;
112
112
 
113
- export { type TokenCapabilities, type TokenMetadata, type TokenPermitNonce, tokenCapabilitiesSchema, tokenMetadataSchema, tokenPermitNonceSchema };
113
+ /**
114
+ * Public marketing contact form. Not an authenticated API resource —
115
+ * routed straight to a support inbox by the contact module in
116
+ * `apps/api`. Kept shape-compatible with what the marketing form on
117
+ * the Strimz landing page already validates client-side.
118
+ */
119
+
120
+ declare const contactTopicSchema: z.ZodEnum<["sales", "support", "partnership", "security", "other"]>;
121
+ type ContactTopic = z.infer<typeof contactTopicSchema>;
122
+ declare const contactRequestInputSchema: z.ZodObject<{
123
+ name: z.ZodString;
124
+ email: z.ZodString;
125
+ company: z.ZodOptional<z.ZodString>;
126
+ topic: z.ZodEnum<["sales", "support", "partnership", "security", "other"]>;
127
+ message: z.ZodString;
128
+ }, "strip", z.ZodTypeAny, {
129
+ message: string;
130
+ name: string;
131
+ email: string;
132
+ topic: "other" | "sales" | "support" | "partnership" | "security";
133
+ company?: string | undefined;
134
+ }, {
135
+ message: string;
136
+ name: string;
137
+ email: string;
138
+ topic: "other" | "sales" | "support" | "partnership" | "security";
139
+ company?: string | undefined;
140
+ }>;
141
+ type ContactRequestInput = z.infer<typeof contactRequestInputSchema>;
142
+ declare const contactRequestOutputSchema: z.ZodObject<{
143
+ ok: z.ZodLiteral<true>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ ok: true;
146
+ }, {
147
+ ok: true;
148
+ }>;
149
+ type ContactRequestOutput = z.infer<typeof contactRequestOutputSchema>;
150
+
151
+ /**
152
+ * Dashboard notifications. Derived server-side from recent activity
153
+ * (confirmed payment sessions, new subscribers, processed refunds).
154
+ * Read state is tracked on the merchant record via
155
+ * `notificationsLastReadAt` — `event.createdAt <= that timestamp` is
156
+ * "read", anything newer is "unread". No dedicated notifications
157
+ * table because the source rows already exist; a separate table would
158
+ * just be a denormalised copy.
159
+ */
160
+
161
+ declare const notificationKindSchema: z.ZodEnum<["payment_received", "subscription_started", "refund_processed", "admin_broadcast"]>;
162
+ type NotificationKind = z.infer<typeof notificationKindSchema>;
163
+ declare const broadcastAudienceSchema: z.ZodEnum<["all", "merchant"]>;
164
+ type BroadcastAudience = z.infer<typeof broadcastAudienceSchema>;
165
+ declare const createBroadcastInputSchema: z.ZodEffects<z.ZodObject<{
166
+ title: z.ZodString;
167
+ body: z.ZodString;
168
+ audience: z.ZodDefault<z.ZodEnum<["all", "merchant"]>>;
169
+ /** Required when `audience === 'merchant'`; ignored otherwise. */
170
+ merchantId: z.ZodOptional<z.ZodString>;
171
+ }, "strip", z.ZodTypeAny, {
172
+ title: string;
173
+ body: string;
174
+ audience: "merchant" | "all";
175
+ merchantId?: string | undefined;
176
+ }, {
177
+ title: string;
178
+ body: string;
179
+ merchantId?: string | undefined;
180
+ audience?: "merchant" | "all" | undefined;
181
+ }>, {
182
+ title: string;
183
+ body: string;
184
+ audience: "merchant" | "all";
185
+ merchantId?: string | undefined;
186
+ }, {
187
+ title: string;
188
+ body: string;
189
+ merchantId?: string | undefined;
190
+ audience?: "merchant" | "all" | undefined;
191
+ }>;
192
+ type CreateBroadcastInput = z.infer<typeof createBroadcastInputSchema>;
193
+ declare const broadcastSchema: z.ZodObject<{
194
+ id: z.ZodString;
195
+ title: z.ZodString;
196
+ body: z.ZodString;
197
+ audience: z.ZodEnum<["all", "merchant"]>;
198
+ merchantId: z.ZodNullable<z.ZodString>;
199
+ merchantEmail: z.ZodNullable<z.ZodString>;
200
+ senderId: z.ZodString;
201
+ senderEmail: z.ZodString;
202
+ emailedAt: z.ZodNullable<z.ZodString>;
203
+ createdAt: z.ZodString;
204
+ }, "strip", z.ZodTypeAny, {
205
+ id: string;
206
+ merchantId: string | null;
207
+ createdAt: string;
208
+ title: string;
209
+ body: string;
210
+ audience: "merchant" | "all";
211
+ merchantEmail: string | null;
212
+ senderId: string;
213
+ senderEmail: string;
214
+ emailedAt: string | null;
215
+ }, {
216
+ id: string;
217
+ merchantId: string | null;
218
+ createdAt: string;
219
+ title: string;
220
+ body: string;
221
+ audience: "merchant" | "all";
222
+ merchantEmail: string | null;
223
+ senderId: string;
224
+ senderEmail: string;
225
+ emailedAt: string | null;
226
+ }>;
227
+ type Broadcast = z.infer<typeof broadcastSchema>;
228
+ declare const broadcastListResponseSchema: z.ZodObject<{
229
+ data: z.ZodArray<z.ZodObject<{
230
+ id: z.ZodString;
231
+ title: z.ZodString;
232
+ body: z.ZodString;
233
+ audience: z.ZodEnum<["all", "merchant"]>;
234
+ merchantId: z.ZodNullable<z.ZodString>;
235
+ merchantEmail: z.ZodNullable<z.ZodString>;
236
+ senderId: z.ZodString;
237
+ senderEmail: z.ZodString;
238
+ emailedAt: z.ZodNullable<z.ZodString>;
239
+ createdAt: z.ZodString;
240
+ }, "strip", z.ZodTypeAny, {
241
+ id: string;
242
+ merchantId: string | null;
243
+ createdAt: string;
244
+ title: string;
245
+ body: string;
246
+ audience: "merchant" | "all";
247
+ merchantEmail: string | null;
248
+ senderId: string;
249
+ senderEmail: string;
250
+ emailedAt: string | null;
251
+ }, {
252
+ id: string;
253
+ merchantId: string | null;
254
+ createdAt: string;
255
+ title: string;
256
+ body: string;
257
+ audience: "merchant" | "all";
258
+ merchantEmail: string | null;
259
+ senderId: string;
260
+ senderEmail: string;
261
+ emailedAt: string | null;
262
+ }>, "many">;
263
+ }, "strip", z.ZodTypeAny, {
264
+ data: {
265
+ id: string;
266
+ merchantId: string | null;
267
+ createdAt: string;
268
+ title: string;
269
+ body: string;
270
+ audience: "merchant" | "all";
271
+ merchantEmail: string | null;
272
+ senderId: string;
273
+ senderEmail: string;
274
+ emailedAt: string | null;
275
+ }[];
276
+ }, {
277
+ data: {
278
+ id: string;
279
+ merchantId: string | null;
280
+ createdAt: string;
281
+ title: string;
282
+ body: string;
283
+ audience: "merchant" | "all";
284
+ merchantEmail: string | null;
285
+ senderId: string;
286
+ senderEmail: string;
287
+ emailedAt: string | null;
288
+ }[];
289
+ }>;
290
+ type BroadcastListResponse = z.infer<typeof broadcastListResponseSchema>;
291
+ declare const notificationSchema: z.ZodObject<{
292
+ /** Deterministic client id — `{kind}:{sourceId}`. Safe for React keys. */
293
+ id: z.ZodString;
294
+ kind: z.ZodEnum<["payment_received", "subscription_started", "refund_processed", "admin_broadcast"]>;
295
+ title: z.ZodString;
296
+ detail: z.ZodString;
297
+ /** Dashboard route the tray links to. */
298
+ href: z.ZodString;
299
+ /** ISO timestamp of the source event; drives sort + read comparison. */
300
+ createdAt: z.ZodString;
301
+ /** Server-derived from the merchant's `notificationsLastReadAt`. */
302
+ read: z.ZodBoolean;
303
+ /** Optional foreign key back to the source row (for deep-linking). */
304
+ sourceId: z.ZodOptional<z.ZodString>;
305
+ }, "strip", z.ZodTypeAny, {
306
+ id: string;
307
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
308
+ createdAt: string;
309
+ title: string;
310
+ detail: string;
311
+ href: string;
312
+ read: boolean;
313
+ sourceId?: string | undefined;
314
+ }, {
315
+ id: string;
316
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
317
+ createdAt: string;
318
+ title: string;
319
+ detail: string;
320
+ href: string;
321
+ read: boolean;
322
+ sourceId?: string | undefined;
323
+ }>;
324
+ type NotificationView = z.infer<typeof notificationSchema>;
325
+ declare const notificationListResponseSchema: z.ZodObject<{
326
+ data: z.ZodArray<z.ZodObject<{
327
+ /** Deterministic client id — `{kind}:{sourceId}`. Safe for React keys. */
328
+ id: z.ZodString;
329
+ kind: z.ZodEnum<["payment_received", "subscription_started", "refund_processed", "admin_broadcast"]>;
330
+ title: z.ZodString;
331
+ detail: z.ZodString;
332
+ /** Dashboard route the tray links to. */
333
+ href: z.ZodString;
334
+ /** ISO timestamp of the source event; drives sort + read comparison. */
335
+ createdAt: z.ZodString;
336
+ /** Server-derived from the merchant's `notificationsLastReadAt`. */
337
+ read: z.ZodBoolean;
338
+ /** Optional foreign key back to the source row (for deep-linking). */
339
+ sourceId: z.ZodOptional<z.ZodString>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ id: string;
342
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
343
+ createdAt: string;
344
+ title: string;
345
+ detail: string;
346
+ href: string;
347
+ read: boolean;
348
+ sourceId?: string | undefined;
349
+ }, {
350
+ id: string;
351
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
352
+ createdAt: string;
353
+ title: string;
354
+ detail: string;
355
+ href: string;
356
+ read: boolean;
357
+ sourceId?: string | undefined;
358
+ }>, "many">;
359
+ unreadCount: z.ZodNumber;
360
+ lastReadAt: z.ZodNullable<z.ZodString>;
361
+ }, "strip", z.ZodTypeAny, {
362
+ data: {
363
+ id: string;
364
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
365
+ createdAt: string;
366
+ title: string;
367
+ detail: string;
368
+ href: string;
369
+ read: boolean;
370
+ sourceId?: string | undefined;
371
+ }[];
372
+ unreadCount: number;
373
+ lastReadAt: string | null;
374
+ }, {
375
+ data: {
376
+ id: string;
377
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
378
+ createdAt: string;
379
+ title: string;
380
+ detail: string;
381
+ href: string;
382
+ read: boolean;
383
+ sourceId?: string | undefined;
384
+ }[];
385
+ unreadCount: number;
386
+ lastReadAt: string | null;
387
+ }>;
388
+ type NotificationListResponse = z.infer<typeof notificationListResponseSchema>;
389
+ declare const markNotificationsReadResponseSchema: z.ZodObject<{
390
+ lastReadAt: z.ZodString;
391
+ }, "strip", z.ZodTypeAny, {
392
+ lastReadAt: string;
393
+ }, {
394
+ lastReadAt: string;
395
+ }>;
396
+ type MarkNotificationsReadResponse = z.infer<typeof markNotificationsReadResponseSchema>;
397
+
398
+ export { type Broadcast, type BroadcastAudience, type BroadcastListResponse, type ContactRequestInput, type ContactRequestOutput, type ContactTopic, type CreateBroadcastInput, type MarkNotificationsReadResponse, type NotificationKind, type NotificationListResponse, type NotificationView, type TokenCapabilities, type TokenMetadata, type TokenPermitNonce, broadcastAudienceSchema, broadcastListResponseSchema, broadcastSchema, contactRequestInputSchema, contactRequestOutputSchema, contactTopicSchema, createBroadcastInputSchema, markNotificationsReadResponseSchema, notificationKindSchema, notificationListResponseSchema, notificationSchema, tokenCapabilitiesSchema, tokenMetadataSchema, tokenPermitNonceSchema };