@strimz/shared-types 0.7.0 → 0.9.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 (52) hide show
  1. package/dist/analytics.cjs +558 -0
  2. package/dist/analytics.cjs.map +1 -0
  3. package/dist/analytics.d.cts +1719 -0
  4. package/dist/analytics.d.ts +1719 -0
  5. package/dist/analytics.js +530 -0
  6. package/dist/analytics.js.map +1 -0
  7. package/dist/api-keys.d.cts +20 -20
  8. package/dist/api-keys.d.ts +20 -20
  9. package/dist/compliance.d.cts +6 -6
  10. package/dist/compliance.d.ts +6 -6
  11. package/dist/customers.d.cts +7 -7
  12. package/dist/customers.d.ts +7 -7
  13. package/dist/events.cjs +0 -10
  14. package/dist/events.cjs.map +1 -1
  15. package/dist/events.d.cts +1885 -1885
  16. package/dist/events.d.ts +1885 -1885
  17. package/dist/events.js +0 -10
  18. package/dist/events.js.map +1 -1
  19. package/dist/index.cjs +216 -11
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.d.cts +16 -15
  22. package/dist/index.d.ts +16 -15
  23. package/dist/index.js +190 -11
  24. package/dist/index.js.map +1 -1
  25. package/dist/invoices.d.cts +16 -16
  26. package/dist/invoices.d.ts +16 -16
  27. package/dist/merchants.d.cts +29 -29
  28. package/dist/merchants.d.ts +29 -29
  29. package/dist/payment-sessions.d.cts +19 -19
  30. package/dist/payment-sessions.d.ts +19 -19
  31. package/dist/refunds.d.cts +50 -50
  32. package/dist/refunds.d.ts +50 -50
  33. package/dist/storefronts.cjs +0 -10
  34. package/dist/storefronts.cjs.map +1 -1
  35. package/dist/storefronts.d.cts +24 -24
  36. package/dist/storefronts.d.ts +24 -24
  37. package/dist/storefronts.js +0 -10
  38. package/dist/storefronts.js.map +1 -1
  39. package/dist/subscriptions.cjs +0 -11
  40. package/dist/subscriptions.cjs.map +1 -1
  41. package/dist/subscriptions.d.cts +43 -81
  42. package/dist/subscriptions.d.ts +43 -81
  43. package/dist/subscriptions.js +1 -11
  44. package/dist/subscriptions.js.map +1 -1
  45. package/dist/transactions.d.cts +16 -16
  46. package/dist/transactions.d.ts +16 -16
  47. package/dist/webhooks.d.cts +28 -28
  48. package/dist/webhooks.d.ts +28 -28
  49. package/package.json +6 -1
  50. package/src/analytics.ts +275 -0
  51. package/src/index.ts +1 -0
  52. package/src/subscriptions.ts +0 -13
package/dist/index.d.cts CHANGED
@@ -4,7 +4,7 @@ export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput,
4
4
  export { Customer, UpsertCustomerInput, UpsertCustomerParsed, customerSchema, upsertCustomerInputSchema } from './customers.cjs';
5
5
  export { CreatePaymentSessionInput, CreatePaymentSessionParsed, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, SubmitPaymentSessionParsed, callbackUrlSchema, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.cjs';
6
6
  export { Transaction, TransactionKind, TransactionStatus, transactionKindSchema, transactionSchema, transactionStatusSchema } from './transactions.cjs';
7
- export { CancelSubscriptionInput, CancelSubscriptionParsed, CreateSubscriptionInput, CreateSubscriptionParsed, CreateSubscriptionPlanInput, CreateSubscriptionPlanParsed, Subscription, SubscriptionCharge, SubscriptionChargeOutcome, SubscriptionChargeStatus, SubscriptionEnrolmentTerms, SubscriptionInterval, SubscriptionPlan, SubscriptionPlanStatus, SubscriptionStatus, SubscriptionStatusResult, cancelSubscriptionInputSchema, createSubscriptionInputSchema, createSubscriptionPlanInputSchema, subscriptionChargeOutcomeSchema, subscriptionChargeSchema, subscriptionChargeStatusSchema, subscriptionEnrolmentTermsSchema, subscriptionIntervalSchema, subscriptionPlanSchema, subscriptionPlanStatusSchema, subscriptionSchema, subscriptionStatusResultSchema, subscriptionStatusSchema } from './subscriptions.cjs';
7
+ export { CancelSubscriptionInput, CancelSubscriptionParsed, CreateSubscriptionPlanInput, CreateSubscriptionPlanParsed, Subscription, SubscriptionCharge, SubscriptionChargeOutcome, SubscriptionChargeStatus, SubscriptionEnrolmentTerms, SubscriptionInterval, SubscriptionPlan, SubscriptionPlanStatus, SubscriptionStatus, SubscriptionStatusResult, cancelSubscriptionInputSchema, createSubscriptionPlanInputSchema, subscriptionChargeOutcomeSchema, subscriptionChargeSchema, subscriptionChargeStatusSchema, subscriptionEnrolmentTermsSchema, subscriptionIntervalSchema, subscriptionPlanSchema, subscriptionPlanStatusSchema, subscriptionSchema, subscriptionStatusResultSchema, subscriptionStatusSchema } from './subscriptions.cjs';
8
8
  export { CreateRefundInput, CreateRefundParsed, Refund, RefundCreateOutput, RefundReason, RefundSigningInstructions, RefundStatus, SubmitRefundSignatureInput, SubmitRefundSignatureParsed, createRefundInputSchema, refundCreateOutputSchema, refundReasonSchema, refundSchema, refundSigningInstructionsSchema, refundStatusSchema, submitRefundSignatureInputSchema } from './refunds.cjs';
9
9
  export { CreateWebhookEndpointInput, CreateWebhookEndpointOutput, CreateWebhookEndpointParsed, ReplayDeliveryInput, ReplayDeliveryParsed, 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';
@@ -13,6 +13,7 @@ export { CreateStorefrontInput, CreateStorefrontParsed, CreateStorefrontProductI
13
13
  export { CreateInvoiceInput, CreateInvoiceParsed, 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';
16
+ export { AdminMerchantStats, AdminOverview, AdminStatsModeQuery, AdminTopMerchant, AdminTopMerchants, AdminTopMerchantsQuery, AdminVolumeDay, AdminVolumeQuery, AdminVolumeSeries, CurrencyAmounts, Forecast, ForecastConfidence, Money, STATS_VOLUME_DEFAULT_DAYS, STATS_VOLUME_MAX_DAYS, StatsForecast, StatsLtv, StatsLtvQuery, StatsLtvQueryParsed, StatsLtvRow, StatsMrr, StatsSummary, StatsVolume, StatsVolumeDay, StatsVolumeQuery, VolumeWindow, adminMerchantStatsSchema, adminOverviewSchema, adminStatsModeQuerySchema, adminTopMerchantSchema, adminTopMerchantsQuerySchema, adminTopMerchantsSchema, adminVolumeDaySchema, adminVolumeQuerySchema, adminVolumeSeriesSchema, currencyAmountsSchema, forecastConfidenceSchema, forecastSchema, moneySchema, paymentCurrencies, resolveStatsVolumeRange, statsForecastSchema, statsLtvQuerySchema, statsLtvRowSchema, statsLtvSchema, statsMrrSchema, statsSummarySchema, statsVolumeDaySchema, statsVolumeQuerySchema, statsVolumeSchema, volumeWindowSchema } from './analytics.cjs';
16
17
 
17
18
  /**
18
19
  * Token metadata + capability descriptor.
@@ -127,14 +128,14 @@ declare const contactRequestInputSchema: z.ZodObject<{
127
128
  message: z.ZodString;
128
129
  }, "strip", z.ZodTypeAny, {
129
130
  message: string;
130
- name: string;
131
131
  email: string;
132
+ name: string;
132
133
  topic: "other" | "sales" | "support" | "partnership" | "security";
133
134
  company?: string | undefined;
134
135
  }, {
135
136
  message: string;
136
- name: string;
137
137
  email: string;
138
+ name: string;
138
139
  topic: "other" | "sales" | "support" | "partnership" | "security";
139
140
  company?: string | undefined;
140
141
  }>;
@@ -204,8 +205,8 @@ declare const broadcastSchema: z.ZodObject<{
204
205
  emailedAt: z.ZodNullable<z.ZodString>;
205
206
  createdAt: z.ZodString;
206
207
  }, "strip", z.ZodTypeAny, {
207
- id: string;
208
208
  merchantId: string | null;
209
+ id: string;
209
210
  createdAt: string;
210
211
  title: string;
211
212
  body: string;
@@ -215,8 +216,8 @@ declare const broadcastSchema: z.ZodObject<{
215
216
  senderEmail: string;
216
217
  emailedAt: string | null;
217
218
  }, {
218
- id: string;
219
219
  merchantId: string | null;
220
+ id: string;
220
221
  createdAt: string;
221
222
  title: string;
222
223
  body: string;
@@ -240,8 +241,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
240
241
  emailedAt: z.ZodNullable<z.ZodString>;
241
242
  createdAt: z.ZodString;
242
243
  }, "strip", z.ZodTypeAny, {
243
- id: string;
244
244
  merchantId: string | null;
245
+ id: string;
245
246
  createdAt: string;
246
247
  title: string;
247
248
  body: string;
@@ -251,8 +252,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
251
252
  senderEmail: string;
252
253
  emailedAt: string | null;
253
254
  }, {
254
- id: string;
255
255
  merchantId: string | null;
256
+ id: string;
256
257
  createdAt: string;
257
258
  title: string;
258
259
  body: string;
@@ -264,8 +265,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
264
265
  }>, "many">;
265
266
  }, "strip", z.ZodTypeAny, {
266
267
  data: {
267
- id: string;
268
268
  merchantId: string | null;
269
+ id: string;
269
270
  createdAt: string;
270
271
  title: string;
271
272
  body: string;
@@ -277,8 +278,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
277
278
  }[];
278
279
  }, {
279
280
  data: {
280
- id: string;
281
281
  merchantId: string | null;
282
+ id: string;
282
283
  createdAt: string;
283
284
  title: string;
284
285
  body: string;
@@ -306,8 +307,8 @@ declare const notificationSchema: z.ZodObject<{
306
307
  sourceId: z.ZodOptional<z.ZodString>;
307
308
  }, "strip", z.ZodTypeAny, {
308
309
  id: string;
309
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
310
310
  createdAt: string;
311
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
311
312
  title: string;
312
313
  detail: string;
313
314
  href: string;
@@ -315,8 +316,8 @@ declare const notificationSchema: z.ZodObject<{
315
316
  sourceId?: string | undefined;
316
317
  }, {
317
318
  id: string;
318
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
319
319
  createdAt: string;
320
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
320
321
  title: string;
321
322
  detail: string;
322
323
  href: string;
@@ -341,8 +342,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
341
342
  sourceId: z.ZodOptional<z.ZodString>;
342
343
  }, "strip", z.ZodTypeAny, {
343
344
  id: string;
344
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
345
345
  createdAt: string;
346
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
346
347
  title: string;
347
348
  detail: string;
348
349
  href: string;
@@ -350,8 +351,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
350
351
  sourceId?: string | undefined;
351
352
  }, {
352
353
  id: string;
353
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
354
354
  createdAt: string;
355
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
355
356
  title: string;
356
357
  detail: string;
357
358
  href: string;
@@ -363,8 +364,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
363
364
  }, "strip", z.ZodTypeAny, {
364
365
  data: {
365
366
  id: string;
366
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
367
367
  createdAt: string;
368
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
368
369
  title: string;
369
370
  detail: string;
370
371
  href: string;
@@ -376,8 +377,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
376
377
  }, {
377
378
  data: {
378
379
  id: string;
379
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
380
380
  createdAt: string;
381
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
381
382
  title: string;
382
383
  detail: string;
383
384
  href: string;
package/dist/index.d.ts CHANGED
@@ -4,7 +4,7 @@ export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput,
4
4
  export { Customer, UpsertCustomerInput, UpsertCustomerParsed, customerSchema, upsertCustomerInputSchema } from './customers.js';
5
5
  export { CreatePaymentSessionInput, CreatePaymentSessionParsed, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, SubmitPaymentSessionParsed, callbackUrlSchema, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.js';
6
6
  export { Transaction, TransactionKind, TransactionStatus, transactionKindSchema, transactionSchema, transactionStatusSchema } from './transactions.js';
7
- export { CancelSubscriptionInput, CancelSubscriptionParsed, CreateSubscriptionInput, CreateSubscriptionParsed, CreateSubscriptionPlanInput, CreateSubscriptionPlanParsed, Subscription, SubscriptionCharge, SubscriptionChargeOutcome, SubscriptionChargeStatus, SubscriptionEnrolmentTerms, SubscriptionInterval, SubscriptionPlan, SubscriptionPlanStatus, SubscriptionStatus, SubscriptionStatusResult, cancelSubscriptionInputSchema, createSubscriptionInputSchema, createSubscriptionPlanInputSchema, subscriptionChargeOutcomeSchema, subscriptionChargeSchema, subscriptionChargeStatusSchema, subscriptionEnrolmentTermsSchema, subscriptionIntervalSchema, subscriptionPlanSchema, subscriptionPlanStatusSchema, subscriptionSchema, subscriptionStatusResultSchema, subscriptionStatusSchema } from './subscriptions.js';
7
+ export { CancelSubscriptionInput, CancelSubscriptionParsed, CreateSubscriptionPlanInput, CreateSubscriptionPlanParsed, Subscription, SubscriptionCharge, SubscriptionChargeOutcome, SubscriptionChargeStatus, SubscriptionEnrolmentTerms, SubscriptionInterval, SubscriptionPlan, SubscriptionPlanStatus, SubscriptionStatus, SubscriptionStatusResult, cancelSubscriptionInputSchema, createSubscriptionPlanInputSchema, subscriptionChargeOutcomeSchema, subscriptionChargeSchema, subscriptionChargeStatusSchema, subscriptionEnrolmentTermsSchema, subscriptionIntervalSchema, subscriptionPlanSchema, subscriptionPlanStatusSchema, subscriptionSchema, subscriptionStatusResultSchema, subscriptionStatusSchema } from './subscriptions.js';
8
8
  export { CreateRefundInput, CreateRefundParsed, Refund, RefundCreateOutput, RefundReason, RefundSigningInstructions, RefundStatus, SubmitRefundSignatureInput, SubmitRefundSignatureParsed, createRefundInputSchema, refundCreateOutputSchema, refundReasonSchema, refundSchema, refundSigningInstructionsSchema, refundStatusSchema, submitRefundSignatureInputSchema } from './refunds.js';
9
9
  export { CreateWebhookEndpointInput, CreateWebhookEndpointOutput, CreateWebhookEndpointParsed, ReplayDeliveryInput, ReplayDeliveryParsed, 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';
@@ -13,6 +13,7 @@ export { CreateStorefrontInput, CreateStorefrontParsed, CreateStorefrontProductI
13
13
  export { CreateInvoiceInput, CreateInvoiceParsed, 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';
16
+ export { AdminMerchantStats, AdminOverview, AdminStatsModeQuery, AdminTopMerchant, AdminTopMerchants, AdminTopMerchantsQuery, AdminVolumeDay, AdminVolumeQuery, AdminVolumeSeries, CurrencyAmounts, Forecast, ForecastConfidence, Money, STATS_VOLUME_DEFAULT_DAYS, STATS_VOLUME_MAX_DAYS, StatsForecast, StatsLtv, StatsLtvQuery, StatsLtvQueryParsed, StatsLtvRow, StatsMrr, StatsSummary, StatsVolume, StatsVolumeDay, StatsVolumeQuery, VolumeWindow, adminMerchantStatsSchema, adminOverviewSchema, adminStatsModeQuerySchema, adminTopMerchantSchema, adminTopMerchantsQuerySchema, adminTopMerchantsSchema, adminVolumeDaySchema, adminVolumeQuerySchema, adminVolumeSeriesSchema, currencyAmountsSchema, forecastConfidenceSchema, forecastSchema, moneySchema, paymentCurrencies, resolveStatsVolumeRange, statsForecastSchema, statsLtvQuerySchema, statsLtvRowSchema, statsLtvSchema, statsMrrSchema, statsSummarySchema, statsVolumeDaySchema, statsVolumeQuerySchema, statsVolumeSchema, volumeWindowSchema } from './analytics.js';
16
17
 
17
18
  /**
18
19
  * Token metadata + capability descriptor.
@@ -127,14 +128,14 @@ declare const contactRequestInputSchema: z.ZodObject<{
127
128
  message: z.ZodString;
128
129
  }, "strip", z.ZodTypeAny, {
129
130
  message: string;
130
- name: string;
131
131
  email: string;
132
+ name: string;
132
133
  topic: "other" | "sales" | "support" | "partnership" | "security";
133
134
  company?: string | undefined;
134
135
  }, {
135
136
  message: string;
136
- name: string;
137
137
  email: string;
138
+ name: string;
138
139
  topic: "other" | "sales" | "support" | "partnership" | "security";
139
140
  company?: string | undefined;
140
141
  }>;
@@ -204,8 +205,8 @@ declare const broadcastSchema: z.ZodObject<{
204
205
  emailedAt: z.ZodNullable<z.ZodString>;
205
206
  createdAt: z.ZodString;
206
207
  }, "strip", z.ZodTypeAny, {
207
- id: string;
208
208
  merchantId: string | null;
209
+ id: string;
209
210
  createdAt: string;
210
211
  title: string;
211
212
  body: string;
@@ -215,8 +216,8 @@ declare const broadcastSchema: z.ZodObject<{
215
216
  senderEmail: string;
216
217
  emailedAt: string | null;
217
218
  }, {
218
- id: string;
219
219
  merchantId: string | null;
220
+ id: string;
220
221
  createdAt: string;
221
222
  title: string;
222
223
  body: string;
@@ -240,8 +241,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
240
241
  emailedAt: z.ZodNullable<z.ZodString>;
241
242
  createdAt: z.ZodString;
242
243
  }, "strip", z.ZodTypeAny, {
243
- id: string;
244
244
  merchantId: string | null;
245
+ id: string;
245
246
  createdAt: string;
246
247
  title: string;
247
248
  body: string;
@@ -251,8 +252,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
251
252
  senderEmail: string;
252
253
  emailedAt: string | null;
253
254
  }, {
254
- id: string;
255
255
  merchantId: string | null;
256
+ id: string;
256
257
  createdAt: string;
257
258
  title: string;
258
259
  body: string;
@@ -264,8 +265,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
264
265
  }>, "many">;
265
266
  }, "strip", z.ZodTypeAny, {
266
267
  data: {
267
- id: string;
268
268
  merchantId: string | null;
269
+ id: string;
269
270
  createdAt: string;
270
271
  title: string;
271
272
  body: string;
@@ -277,8 +278,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
277
278
  }[];
278
279
  }, {
279
280
  data: {
280
- id: string;
281
281
  merchantId: string | null;
282
+ id: string;
282
283
  createdAt: string;
283
284
  title: string;
284
285
  body: string;
@@ -306,8 +307,8 @@ declare const notificationSchema: z.ZodObject<{
306
307
  sourceId: z.ZodOptional<z.ZodString>;
307
308
  }, "strip", z.ZodTypeAny, {
308
309
  id: string;
309
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
310
310
  createdAt: string;
311
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
311
312
  title: string;
312
313
  detail: string;
313
314
  href: string;
@@ -315,8 +316,8 @@ declare const notificationSchema: z.ZodObject<{
315
316
  sourceId?: string | undefined;
316
317
  }, {
317
318
  id: string;
318
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
319
319
  createdAt: string;
320
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
320
321
  title: string;
321
322
  detail: string;
322
323
  href: string;
@@ -341,8 +342,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
341
342
  sourceId: z.ZodOptional<z.ZodString>;
342
343
  }, "strip", z.ZodTypeAny, {
343
344
  id: string;
344
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
345
345
  createdAt: string;
346
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
346
347
  title: string;
347
348
  detail: string;
348
349
  href: string;
@@ -350,8 +351,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
350
351
  sourceId?: string | undefined;
351
352
  }, {
352
353
  id: string;
353
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
354
354
  createdAt: string;
355
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
355
356
  title: string;
356
357
  detail: string;
357
358
  href: string;
@@ -363,8 +364,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
363
364
  }, "strip", z.ZodTypeAny, {
364
365
  data: {
365
366
  id: string;
366
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
367
367
  createdAt: string;
368
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
368
369
  title: string;
369
370
  detail: string;
370
371
  href: string;
@@ -376,8 +377,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
376
377
  }, {
377
378
  data: {
378
379
  id: string;
379
- kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
380
380
  createdAt: string;
381
+ kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
381
382
  title: string;
382
383
  detail: string;
383
384
  href: string;
package/dist/index.js CHANGED
@@ -429,16 +429,6 @@ var subscriptionEnrolmentTermsSchema = z.object({
429
429
  trialDays: z.number().int().min(0),
430
430
  trialEndsAt: isoTimestampSchema.nullable()
431
431
  });
432
- var createSubscriptionInputSchema = z.object({
433
- planId: idSchema,
434
- customer: z.object({
435
- walletAddress: evmAddressSchema,
436
- email: z.string().email().optional(),
437
- externalRef: z.string().max(120).optional()
438
- }),
439
- gracePeriodHours: z.union([z.literal(24), z.literal(48), z.literal(72)]).default(48),
440
- metadata: metadataSchema.optional()
441
- });
442
432
  var cancelSubscriptionInputSchema = z.object({
443
433
  id: idSchema,
444
434
  reason: z.string().max(500).optional()
@@ -1045,7 +1035,196 @@ var notificationListResponseSchema = z.object({
1045
1035
  var markNotificationsReadResponseSchema = z.object({
1046
1036
  lastReadAt: isoTimestampSchema
1047
1037
  });
1038
+ var paymentCurrencies = paymentCurrencySchema.options;
1039
+ var currencyAmountsShape = {
1040
+ USDC: tokenAmountSchema,
1041
+ EURC: tokenAmountSchema
1042
+ };
1043
+ var currencyAmountsSchema = z.object(currencyAmountsShape).strict();
1044
+ function countsByStatusSchema(statuses) {
1045
+ const shape = Object.fromEntries(statuses.options.map((s) => [s, uintSchema]));
1046
+ return z.object(shape).strict();
1047
+ }
1048
+ var moneySchema = z.object({
1049
+ count: uintSchema,
1050
+ amount: currencyAmountsSchema
1051
+ });
1052
+ var volumeWindowSchema = z.object({
1053
+ count: uintSchema,
1054
+ gross: currencyAmountsSchema,
1055
+ fees: currencyAmountsSchema,
1056
+ net: currencyAmountsSchema
1057
+ });
1058
+ var statsSummarySchema = z.object({
1059
+ mode: modeSchema,
1060
+ generatedAt: isoTimestampSchema,
1061
+ volume: z.object({
1062
+ last7d: volumeWindowSchema,
1063
+ last30d: volumeWindowSchema,
1064
+ allTime: volumeWindowSchema
1065
+ }),
1066
+ paymentSessions: z.object({
1067
+ total: uintSchema,
1068
+ byStatus: countsByStatusSchema(paymentSessionStatusSchema),
1069
+ confirmed: moneySchema
1070
+ }),
1071
+ invoices: z.object({
1072
+ byStatus: countsByStatusSchema(invoiceStatusSchema),
1073
+ outstanding: moneySchema,
1074
+ overdue: moneySchema,
1075
+ paidLast30d: moneySchema
1076
+ }),
1077
+ refunds: z.object({
1078
+ byStatus: countsByStatusSchema(refundStatusSchema),
1079
+ completed: moneySchema
1080
+ }),
1081
+ subscriptions: z.object({
1082
+ total: uintSchema,
1083
+ byStatus: countsByStatusSchema(subscriptionStatusSchema)
1084
+ }),
1085
+ customers: z.object({
1086
+ total: uintSchema
1087
+ })
1088
+ });
1089
+ var STATS_VOLUME_MAX_DAYS = 366;
1090
+ var STATS_VOLUME_DEFAULT_DAYS = 30;
1091
+ function resolveStatsVolumeRange(query, now = Date.now()) {
1092
+ const to = query.to ? new Date(query.to) : new Date(now);
1093
+ const from = query.from ? new Date(query.from) : new Date(to.getTime() - STATS_VOLUME_DEFAULT_DAYS * 864e5);
1094
+ return { from, to };
1095
+ }
1096
+ var statsVolumeQuerySchema = z.object({
1097
+ from: isoTimestampSchema.optional(),
1098
+ to: isoTimestampSchema.optional()
1099
+ }).strict().superRefine((q, ctx) => {
1100
+ const { from, to } = resolveStatsVolumeRange(q);
1101
+ if (from.getTime() > to.getTime()) {
1102
+ ctx.addIssue({
1103
+ code: z.ZodIssueCode.custom,
1104
+ message: "from must not be after to",
1105
+ path: ["from"]
1106
+ });
1107
+ } else if (to.getTime() - from.getTime() > STATS_VOLUME_MAX_DAYS * 864e5) {
1108
+ ctx.addIssue({
1109
+ code: z.ZodIssueCode.custom,
1110
+ message: `from and to must be at most ${STATS_VOLUME_MAX_DAYS} days apart`,
1111
+ path: ["to"]
1112
+ });
1113
+ }
1114
+ });
1115
+ var dayKeySchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "must be a YYYY-MM-DD day");
1116
+ var statsVolumeDaySchema = z.object({
1117
+ day: dayKeySchema,
1118
+ currency: paymentCurrencySchema,
1119
+ count: uintSchema,
1120
+ gross: tokenAmountSchema,
1121
+ fees: tokenAmountSchema,
1122
+ net: tokenAmountSchema
1123
+ });
1124
+ var statsVolumeSchema = z.object({
1125
+ from: isoTimestampSchema,
1126
+ to: isoTimestampSchema,
1127
+ data: z.array(statsVolumeDaySchema)
1128
+ });
1129
+ var statsMrrSchema = z.object({
1130
+ mrr: currencyAmountsSchema,
1131
+ activeSubscribers: uintSchema
1132
+ });
1133
+ var statsLtvQuerySchema = z.object({
1134
+ currency: paymentCurrencySchema,
1135
+ limit: z.coerce.number().int().min(1).max(100).default(25),
1136
+ cursor: z.string().min(1).max(200).optional()
1137
+ }).strict();
1138
+ var statsLtvRowSchema = z.object({
1139
+ customerId: idSchema,
1140
+ totalSpend: tokenAmountSchema,
1141
+ transactionCount: uintSchema
1142
+ });
1143
+ var statsLtvSchema = z.object({
1144
+ currency: paymentCurrencySchema,
1145
+ data: z.array(statsLtvRowSchema),
1146
+ nextCursor: z.string().nullable(),
1147
+ hasMore: z.boolean()
1148
+ });
1149
+ var forecastConfidenceSchema = z.enum(["low", "medium", "high"]);
1150
+ var forecastSchema = z.object({
1151
+ confidence: forecastConfidenceSchema,
1152
+ last90DayRevenue: tokenAmountSchema,
1153
+ next30: tokenAmountSchema,
1154
+ next60: tokenAmountSchema,
1155
+ next90: tokenAmountSchema
1156
+ });
1157
+ var forecastByCurrencyShape = {
1158
+ USDC: forecastSchema,
1159
+ EURC: forecastSchema
1160
+ };
1161
+ var statsForecastSchema = z.object({
1162
+ byCurrency: z.object(forecastByCurrencyShape).strict()
1163
+ });
1164
+ var adminStatsModeQuerySchema = z.object({
1165
+ mode: modeSchema.default("live")
1166
+ }).strict();
1167
+ var adminOverviewSchema = z.object({
1168
+ mode: modeSchema,
1169
+ merchants: z.object({
1170
+ total: uintSchema,
1171
+ byStatus: z.record(z.string(), uintSchema),
1172
+ last30dSignups: uintSchema
1173
+ }),
1174
+ volume: z.object({
1175
+ lifetime: currencyAmountsSchema,
1176
+ lifetimeFees: currencyAmountsSchema,
1177
+ last30d: currencyAmountsSchema,
1178
+ confirmedSessions: uintSchema
1179
+ }),
1180
+ subscriptions: z.object({
1181
+ active: uintSchema,
1182
+ mrr: currencyAmountsSchema
1183
+ })
1184
+ });
1185
+ var adminMerchantStatsSchema = z.object({
1186
+ mode: modeSchema,
1187
+ confirmedPayments: uintSchema,
1188
+ activeSubscriptions: uintSchema,
1189
+ lifetimeVolume: currencyAmountsSchema,
1190
+ last30dVolume: currencyAmountsSchema
1191
+ });
1192
+ var adminVolumeQuerySchema = z.object({
1193
+ from: isoTimestampSchema.optional(),
1194
+ to: isoTimestampSchema.optional(),
1195
+ mode: modeSchema.default("live")
1196
+ }).strict();
1197
+ var adminVolumeDaySchema = z.object({
1198
+ day: dayKeySchema,
1199
+ currency: paymentCurrencySchema,
1200
+ volume: tokenAmountSchema,
1201
+ fees: tokenAmountSchema,
1202
+ count: uintSchema
1203
+ });
1204
+ var adminVolumeSeriesSchema = z.object({
1205
+ mode: modeSchema,
1206
+ from: isoTimestampSchema,
1207
+ to: isoTimestampSchema,
1208
+ data: z.array(adminVolumeDaySchema)
1209
+ });
1210
+ var adminTopMerchantsQuerySchema = z.object({
1211
+ currency: paymentCurrencySchema,
1212
+ mode: modeSchema.default("live"),
1213
+ limit: z.coerce.number().int().min(1).max(50).default(10)
1214
+ }).strict();
1215
+ var adminTopMerchantSchema = z.object({
1216
+ merchantId: idSchema,
1217
+ businessName: z.string().nullable(),
1218
+ email: z.string(),
1219
+ volume: tokenAmountSchema,
1220
+ transactionCount: uintSchema
1221
+ });
1222
+ var adminTopMerchantsSchema = z.object({
1223
+ mode: modeSchema,
1224
+ currency: paymentCurrencySchema,
1225
+ data: z.array(adminTopMerchantSchema)
1226
+ });
1048
1227
 
1049
- export { DEFAULT_MERCHANT_EMAIL_PREFS, agentActionExecutedEventSchema, agentActionOutcomeSchema, agentActionTypeSchema, agentActivityLogSchema, agentCapabilitySchema, agentIdentitySchema, agentJobCompletedEventSchema, agentJobDisputedEventSchema, agentJobProposedEventSchema, agentJobSchema, agentJobStatusSchema, agentMerchantConfigSchema, apiKeyKindSchema, apiKeySchema, apiKeyScopeSchema, arcEnvironmentSchema, broadcastAudienceSchema, broadcastListResponseSchema, broadcastSchema, callbackUrlSchema, cancelSubscriptionInputSchema, changeTierInputSchema, complianceLogSchema, complianceProviderSchema, complianceScreeningContextSchema, complianceStatusSchema, complianceWalletBlockedEventSchema, complianceWalletFlaggedEventSchema, contactRequestInputSchema, contactRequestOutputSchema, contactTopicSchema, countryCodeSchema, createAgentJobInputSchema, createApiKeyInputSchema, createApiKeyOutputSchema, createBroadcastInputSchema, createInvoiceInputSchema, createMerchantInputSchema, createPaymentSessionInputSchema, createRefundInputSchema, createStorefrontInputSchema, createStorefrontProductInputSchema, createSubscriptionInputSchema, createSubscriptionPlanInputSchema, createWebhookEndpointInputSchema, createWebhookEndpointOutputSchema, customerSchema, emailSchema, evmAddressSchema, evmTxHashSchema, httpUrlSchema, httpsUrlSchema, idSchema, inviteMemberInputSchema, invoiceCreatedEventSchema, invoiceLineItemSchema, invoiceOverdueEventSchema, invoicePaidEventSchema, invoiceSchema, invoiceStatusSchema, isoTimestampSchema, loginInputSchema, loginOutputSchema, makePaginatedSchema, markNotificationsReadResponseSchema, merchantBalanceSchema, merchantEmailPrefsSchema, merchantMemberSchema, merchantPublicBrandSchema, merchantRoleSchema, merchantSchema, merchantStatusSchema, merchantTierSchema, metadataSchema, modeSchema, notificationKindSchema, notificationListResponseSchema, notificationSchema, onboardMerchantInputSchema, paginationInputSchema, paymentCompletedEventSchema, paymentCreatedEventSchema, paymentCurrencySchema, paymentFailedEventSchema, paymentSessionSchema, paymentSessionStatusSchema, refundCompletedEventSchema, refundCreateOutputSchema, refundCreatedEventSchema, refundFailedEventSchema, refundReasonSchema, refundSchema, refundSigningInstructionsSchema, refundStatusSchema, replayDeliveryInputSchema, rotateApiKeyInputSchema, storefrontCheckoutInputSchema, storefrontCheckoutResponseSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema, submitPaymentSessionInputSchema, submitRefundSignatureInputSchema, subscriptionCancelledEventSchema, subscriptionChargeFailedEventSchema, subscriptionChargeOutcomeSchema, subscriptionChargeSchema, subscriptionChargeStatusSchema, subscriptionChargedEventSchema, subscriptionCreatedEventSchema, subscriptionEnrolmentTermsSchema, subscriptionIntervalSchema, subscriptionLapsedEventSchema, subscriptionPlanSchema, subscriptionPlanStatusSchema, subscriptionRecoveryAttemptEventSchema, subscriptionRecoveryOutcomeEventSchema, subscriptionSchema, subscriptionStatusResultSchema, subscriptionStatusSchema, tokenAmountSchema, tokenCapabilitiesSchema, tokenMetadataSchema, tokenPermitNonceSchema, tokenSymbolSchema, transactionKindSchema, transactionSchema, transactionStatusSchema, uintSchema, updateAgentConfigInputSchema, updateMerchantInputSchema, upsertCustomerInputSchema, webhookDeliveryDetailSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEndpointSchema, webhookEndpointStatusSchema, webhookEventNameSchema, webhookEventSchema };
1228
+ export { DEFAULT_MERCHANT_EMAIL_PREFS, STATS_VOLUME_DEFAULT_DAYS, STATS_VOLUME_MAX_DAYS, adminMerchantStatsSchema, adminOverviewSchema, adminStatsModeQuerySchema, adminTopMerchantSchema, adminTopMerchantsQuerySchema, adminTopMerchantsSchema, adminVolumeDaySchema, adminVolumeQuerySchema, adminVolumeSeriesSchema, agentActionExecutedEventSchema, agentActionOutcomeSchema, agentActionTypeSchema, agentActivityLogSchema, agentCapabilitySchema, agentIdentitySchema, agentJobCompletedEventSchema, agentJobDisputedEventSchema, agentJobProposedEventSchema, agentJobSchema, agentJobStatusSchema, agentMerchantConfigSchema, apiKeyKindSchema, apiKeySchema, apiKeyScopeSchema, arcEnvironmentSchema, broadcastAudienceSchema, broadcastListResponseSchema, broadcastSchema, callbackUrlSchema, cancelSubscriptionInputSchema, changeTierInputSchema, complianceLogSchema, complianceProviderSchema, complianceScreeningContextSchema, complianceStatusSchema, complianceWalletBlockedEventSchema, complianceWalletFlaggedEventSchema, contactRequestInputSchema, contactRequestOutputSchema, contactTopicSchema, countryCodeSchema, createAgentJobInputSchema, createApiKeyInputSchema, createApiKeyOutputSchema, createBroadcastInputSchema, createInvoiceInputSchema, createMerchantInputSchema, createPaymentSessionInputSchema, createRefundInputSchema, createStorefrontInputSchema, createStorefrontProductInputSchema, createSubscriptionPlanInputSchema, createWebhookEndpointInputSchema, createWebhookEndpointOutputSchema, currencyAmountsSchema, customerSchema, emailSchema, evmAddressSchema, evmTxHashSchema, forecastConfidenceSchema, forecastSchema, httpUrlSchema, httpsUrlSchema, idSchema, inviteMemberInputSchema, invoiceCreatedEventSchema, invoiceLineItemSchema, invoiceOverdueEventSchema, invoicePaidEventSchema, invoiceSchema, invoiceStatusSchema, isoTimestampSchema, loginInputSchema, loginOutputSchema, makePaginatedSchema, markNotificationsReadResponseSchema, merchantBalanceSchema, merchantEmailPrefsSchema, merchantMemberSchema, merchantPublicBrandSchema, merchantRoleSchema, merchantSchema, merchantStatusSchema, merchantTierSchema, metadataSchema, modeSchema, moneySchema, notificationKindSchema, notificationListResponseSchema, notificationSchema, onboardMerchantInputSchema, paginationInputSchema, paymentCompletedEventSchema, paymentCreatedEventSchema, paymentCurrencies, paymentCurrencySchema, paymentFailedEventSchema, paymentSessionSchema, paymentSessionStatusSchema, refundCompletedEventSchema, refundCreateOutputSchema, refundCreatedEventSchema, refundFailedEventSchema, refundReasonSchema, refundSchema, refundSigningInstructionsSchema, refundStatusSchema, replayDeliveryInputSchema, resolveStatsVolumeRange, rotateApiKeyInputSchema, statsForecastSchema, statsLtvQuerySchema, statsLtvRowSchema, statsLtvSchema, statsMrrSchema, statsSummarySchema, statsVolumeDaySchema, statsVolumeQuerySchema, statsVolumeSchema, storefrontCheckoutInputSchema, storefrontCheckoutResponseSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema, submitPaymentSessionInputSchema, submitRefundSignatureInputSchema, subscriptionCancelledEventSchema, subscriptionChargeFailedEventSchema, subscriptionChargeOutcomeSchema, subscriptionChargeSchema, subscriptionChargeStatusSchema, subscriptionChargedEventSchema, subscriptionCreatedEventSchema, subscriptionEnrolmentTermsSchema, subscriptionIntervalSchema, subscriptionLapsedEventSchema, subscriptionPlanSchema, subscriptionPlanStatusSchema, subscriptionRecoveryAttemptEventSchema, subscriptionRecoveryOutcomeEventSchema, subscriptionSchema, subscriptionStatusResultSchema, subscriptionStatusSchema, tokenAmountSchema, tokenCapabilitiesSchema, tokenMetadataSchema, tokenPermitNonceSchema, tokenSymbolSchema, transactionKindSchema, transactionSchema, transactionStatusSchema, uintSchema, updateAgentConfigInputSchema, updateMerchantInputSchema, upsertCustomerInputSchema, volumeWindowSchema, webhookDeliveryDetailSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEndpointSchema, webhookEndpointStatusSchema, webhookEventNameSchema, webhookEventSchema };
1050
1229
  //# sourceMappingURL=index.js.map
1051
1230
  //# sourceMappingURL=index.js.map