@strimz/shared-types 0.1.1 → 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.
- package/dist/api-keys.cjs +6 -1
- package/dist/api-keys.cjs.map +1 -1
- package/dist/api-keys.d.cts +12 -12
- package/dist/api-keys.d.ts +12 -12
- package/dist/api-keys.js +6 -1
- package/dist/api-keys.js.map +1 -1
- package/dist/events.cjs +21 -3
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +12 -12
- package/dist/events.d.ts +12 -12
- package/dist/events.js +21 -3
- package/dist/events.js.map +1 -1
- package/dist/index.cjs +181 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +295 -10
- package/dist/index.d.ts +295 -10
- package/dist/index.js +160 -5
- package/dist/index.js.map +1 -1
- package/dist/merchants.cjs +59 -1
- package/dist/merchants.cjs.map +1 -1
- package/dist/merchants.d.cts +171 -1
- package/dist/merchants.d.ts +171 -1
- package/dist/merchants.js +55 -2
- package/dist/merchants.js.map +1 -1
- package/dist/payment-sessions.cjs +6 -2
- package/dist/payment-sessions.cjs.map +1 -1
- package/dist/payment-sessions.d.cts +19 -3
- package/dist/payment-sessions.d.ts +19 -3
- package/dist/payment-sessions.js +6 -3
- package/dist/payment-sessions.js.map +1 -1
- package/dist/refunds.cjs +12 -0
- package/dist/refunds.cjs.map +1 -1
- package/dist/refunds.d.cts +134 -1
- package/dist/refunds.d.ts +134 -1
- package/dist/refunds.js +11 -1
- package/dist/refunds.js.map +1 -1
- package/dist/storefronts.cjs +14 -0
- package/dist/storefronts.cjs.map +1 -1
- package/dist/storefronts.d.cts +37 -1
- package/dist/storefronts.d.ts +37 -1
- package/dist/storefronts.js +13 -1
- package/dist/storefronts.js.map +1 -1
- package/dist/webhooks.cjs +6 -0
- package/dist/webhooks.cjs.map +1 -1
- package/dist/webhooks.d.cts +60 -1
- package/dist/webhooks.d.ts +60 -1
- package/dist/webhooks.js +6 -1
- package/dist/webhooks.js.map +1 -1
- package/package.json +1 -1
- package/src/api-keys.ts +5 -0
- package/src/contact.ts +26 -0
- package/src/index.ts +2 -0
- package/src/merchants.ts +84 -0
- package/src/notifications.ts +88 -0
- package/src/payment-sessions.ts +24 -2
- package/src/refunds.ts +19 -0
- package/src/storefronts.ts +24 -0
- package/src/webhooks.ts +12 -0
package/dist/index.d.cts
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.cjs';
|
|
2
|
-
export { ChangeTierInput, CreateMerchantInput, InviteMemberInput, LoginInput, LoginOutput, Merchant, MerchantMember, MerchantRole, MerchantStatus, UpdateMerchantInput, changeTierInputSchema, createMerchantInputSchema, inviteMemberInputSchema, loginInputSchema, loginOutputSchema, merchantMemberSchema, merchantRoleSchema, merchantSchema, merchantStatusSchema, updateMerchantInputSchema } from './merchants.cjs';
|
|
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.cjs';
|
|
3
3
|
export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput, RotateApiKeyInput, apiKeyKindSchema, apiKeySchema, apiKeyScopeSchema, createApiKeyInputSchema, createApiKeyOutputSchema, rotateApiKeyInputSchema } from './api-keys.cjs';
|
|
4
4
|
export { Customer, UpsertCustomerInput, customerSchema, upsertCustomerInputSchema } from './customers.cjs';
|
|
5
|
-
export { CreatePaymentSessionInput, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.cjs';
|
|
5
|
+
export { CreatePaymentSessionInput, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, callbackUrlSchema, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.cjs';
|
|
6
6
|
export { Transaction, TransactionKind, TransactionStatus, transactionKindSchema, transactionSchema, transactionStatusSchema } from './transactions.cjs';
|
|
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.cjs';
|
|
8
|
-
export { CreateRefundInput, Refund, RefundReason, RefundStatus, SubmitRefundSignatureInput, createRefundInputSchema, refundReasonSchema, refundSchema, refundStatusSchema, submitRefundSignatureInputSchema } from './refunds.cjs';
|
|
9
|
-
export { CreateWebhookEndpointInput, CreateWebhookEndpointOutput, ReplayDeliveryInput, WebhookDelivery, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointStatus, WebhookEventName, createWebhookEndpointInputSchema, createWebhookEndpointOutputSchema, replayDeliveryInputSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEndpointSchema, webhookEndpointStatusSchema, webhookEventNameSchema } from './webhooks.cjs';
|
|
8
|
+
export { CreateRefundInput, Refund, RefundCreateOutput, RefundReason, RefundSigningInstructions, RefundStatus, SubmitRefundSignatureInput, createRefundInputSchema, refundCreateOutputSchema, refundReasonSchema, refundSchema, refundSigningInstructionsSchema, refundStatusSchema, submitRefundSignatureInputSchema } from './refunds.cjs';
|
|
9
|
+
export { CreateWebhookEndpointInput, CreateWebhookEndpointOutput, ReplayDeliveryInput, WebhookDelivery, WebhookDeliveryDetail, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointStatus, WebhookEventName, createWebhookEndpointInputSchema, createWebhookEndpointOutputSchema, replayDeliveryInputSchema, webhookDeliveryDetailSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEndpointSchema, webhookEndpointStatusSchema, webhookEventNameSchema } from './webhooks.cjs';
|
|
10
10
|
export { ComplianceLog, ComplianceProvider, ComplianceScreeningContext, ComplianceStatus, complianceLogSchema, complianceProviderSchema, complianceScreeningContextSchema, complianceStatusSchema } from './compliance.cjs';
|
|
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.cjs';
|
|
12
|
-
export { CreateStorefrontInput, CreateStorefrontProductInput, Storefront, StorefrontProduct, StorefrontProductType, StorefrontStatus, createStorefrontInputSchema, createStorefrontProductInputSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema } from './storefronts.cjs';
|
|
12
|
+
export { CreateStorefrontInput, CreateStorefrontProductInput, Storefront, StorefrontCheckoutInput, StorefrontCheckoutResponse, StorefrontProduct, StorefrontProductType, StorefrontStatus, createStorefrontInputSchema, createStorefrontProductInputSchema, storefrontCheckoutInputSchema, storefrontCheckoutResponseSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema } from './storefronts.cjs';
|
|
13
13
|
export { CreateInvoiceInput, Invoice, InvoiceLineItem, InvoiceStatus, createInvoiceInputSchema, invoiceLineItemSchema, invoiceSchema, invoiceStatusSchema } from './invoices.cjs';
|
|
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.cjs';
|
|
15
15
|
import { z } from 'zod';
|
|
@@ -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;
|
|
@@ -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
|
-
|
|
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 };
|