@strimz/shared-types 0.13.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics.cjs +36 -0
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.d.cts +136 -136
- package/dist/analytics.d.ts +136 -136
- package/dist/analytics.js +36 -0
- package/dist/analytics.js.map +1 -1
- package/dist/api-keys.d.cts +20 -20
- package/dist/api-keys.d.ts +20 -20
- package/dist/compliance.d.cts +4 -4
- package/dist/compliance.d.ts +4 -4
- package/dist/customers.d.cts +6 -6
- package/dist/customers.d.ts +6 -6
- package/dist/events.cjs +37 -25
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +1397 -2203
- package/dist/events.d.ts +1397 -2203
- package/dist/events.js +38 -23
- package/dist/events.js.map +1 -1
- package/dist/index.cjs +40 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +37 -22
- package/dist/index.js.map +1 -1
- package/dist/invoices.d.cts +10 -10
- package/dist/invoices.d.ts +10 -10
- package/dist/merchants.d.cts +20 -20
- package/dist/merchants.d.ts +20 -20
- package/dist/payment-sessions.d.cts +16 -16
- package/dist/payment-sessions.d.ts +16 -16
- package/dist/refunds.d.cts +36 -36
- package/dist/refunds.d.ts +36 -36
- package/dist/storefronts.cjs +151 -0
- package/dist/storefronts.cjs.map +1 -1
- package/dist/storefronts.d.cts +27 -27
- package/dist/storefronts.d.ts +27 -27
- package/dist/storefronts.js +151 -0
- package/dist/storefronts.js.map +1 -1
- package/dist/subscriptions.cjs +153 -0
- package/dist/subscriptions.cjs.map +1 -1
- package/dist/subscriptions.d.cts +110 -33
- package/dist/subscriptions.d.ts +110 -33
- package/dist/subscriptions.js +150 -1
- package/dist/subscriptions.js.map +1 -1
- package/dist/transactions.d.cts +12 -12
- package/dist/transactions.d.ts +12 -12
- package/dist/webhooks.cjs +0 -3
- package/dist/webhooks.cjs.map +1 -1
- package/dist/webhooks.d.cts +40 -40
- package/dist/webhooks.d.ts +40 -40
- package/dist/webhooks.js +0 -3
- package/dist/webhooks.js.map +1 -1
- package/package.json +2 -2
- package/src/events.ts +1 -24
- package/src/subscriptions.ts +49 -0
- package/src/webhooks.ts +0 -3
package/dist/index.d.cts
CHANGED
|
@@ -4,14 +4,14 @@ export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput,
|
|
|
4
4
|
export { Customer, UpsertCustomerInput, UpsertCustomerParsed, customerSchema, upsertCustomerInputSchema } from './customers.cjs';
|
|
5
5
|
export { CheckoutResultErrorCode, CheckoutResultMessage, CreatePaymentSessionInput, CreatePaymentSessionParsed, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, SubmitPaymentSessionParsed, callbackUrlSchema, checkoutResultErrorCodeSchema, checkoutResultErrorCodes, checkoutResultMessageSchema, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.cjs';
|
|
6
6
|
export { Transaction, TransactionKind, TransactionStatus, transactionKindSchema, transactionSchema, transactionStatusSchema } from './transactions.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';
|
|
7
|
+
export { CancelSubscriptionInput, CancelSubscriptionParsed, CreateSubscriptionPlanInput, CreateSubscriptionPlanParsed, Subscription, SubscriptionCharge, SubscriptionChargeOutcome, SubscriptionChargeStatus, SubscriptionEnrolmentTerms, SubscriptionInterval, SubscriptionPlan, SubscriptionPlanStatus, SubscriptionResultErrorCode, SubscriptionResultMessage, SubscriptionStatus, SubscriptionStatusResult, UpdateSubscriptionPlanInput, UpdateSubscriptionPlanParsed, cancelSubscriptionInputSchema, createSubscriptionPlanInputSchema, subscriptionChargeOutcomeSchema, subscriptionChargeSchema, subscriptionChargeStatusSchema, subscriptionEnrolmentTermsSchema, subscriptionIntervalSchema, subscriptionPlanSchema, subscriptionPlanStatusSchema, subscriptionResultErrorCodeSchema, subscriptionResultErrorCodes, subscriptionResultMessageSchema, subscriptionSchema, subscriptionStatusResultSchema, subscriptionStatusSchema, updateSubscriptionPlanInputSchema } 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';
|
|
11
11
|
export { AgentActionOutcome, AgentActionType, AgentActivityLog, AgentCapability, AgentIdentity, AgentJob, AgentJobStatus, AgentMerchantConfig, CreateAgentJobInput, CreateAgentJobParsed, UpdateAgentConfigInput, UpdateAgentConfigParsed, agentActionOutcomeSchema, agentActionTypeSchema, agentActivityLogSchema, agentCapabilitySchema, agentIdentitySchema, agentJobSchema, agentJobStatusSchema, agentMerchantConfigSchema, createAgentJobInputSchema, updateAgentConfigInputSchema } from './agents.cjs';
|
|
12
12
|
export { CreateStorefrontInput, CreateStorefrontParsed, CreateStorefrontProductInput, CreateStorefrontProductParsed, Storefront, StorefrontCheckoutInput, StorefrontCheckoutParsed, StorefrontCheckoutResponse, StorefrontProduct, StorefrontProductType, StorefrontStatus, createStorefrontInputSchema, createStorefrontProductInputSchema, storefrontCheckoutInputSchema, storefrontCheckoutResponseSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema } from './storefronts.cjs';
|
|
13
13
|
export { CreateInvoiceInput, CreateInvoiceParsed, Invoice, InvoiceLineItem, InvoiceStatus, createInvoiceInputSchema, invoiceLineItemSchema, invoiceSchema, invoiceStatusSchema } from './invoices.cjs';
|
|
14
|
-
export {
|
|
14
|
+
export { AgentJobCompletedEvent, AgentJobDisputedEvent, AgentJobProposedEvent, ComplianceWalletBlockedEvent, ComplianceWalletFlaggedEvent, InvoiceCreatedEvent, InvoiceOverdueEvent, InvoicePaidEvent, PaymentCompletedEvent, PaymentCreatedEvent, PaymentFailedEvent, RefundCompletedEvent, RefundCreatedEvent, StrimzWebhookEvent, SubscriptionCancelledEvent, SubscriptionChargeFailedEvent, SubscriptionChargedEvent, SubscriptionCreatedEvent, SubscriptionLapsedEvent, SubscriptionRecoveryAttemptEvent, agentJobCompletedEventSchema, agentJobDisputedEventSchema, agentJobProposedEventSchema, complianceWalletBlockedEventSchema, complianceWalletFlaggedEventSchema, invoiceCreatedEventSchema, invoiceOverdueEventSchema, invoicePaidEventSchema, paymentCompletedEventSchema, paymentCreatedEventSchema, paymentFailedEventSchema, refundCompletedEventSchema, refundCreatedEventSchema, subscriptionCancelledEventSchema, subscriptionChargeFailedEventSchema, subscriptionChargedEventSchema, subscriptionCreatedEventSchema, subscriptionLapsedEventSchema, subscriptionRecoveryAttemptEventSchema, webhookEventSchema } from './events.cjs';
|
|
15
15
|
import { z } from 'zod';
|
|
16
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';
|
|
17
17
|
|
|
@@ -129,15 +129,15 @@ declare const contactRequestInputSchema: z.ZodObject<{
|
|
|
129
129
|
turnstileToken: z.ZodOptional<z.ZodString>;
|
|
130
130
|
}, "strip", z.ZodTypeAny, {
|
|
131
131
|
message: string;
|
|
132
|
-
name: string;
|
|
133
132
|
email: string;
|
|
133
|
+
name: string;
|
|
134
134
|
topic: "other" | "sales" | "support" | "partnership" | "security";
|
|
135
135
|
company?: string | undefined;
|
|
136
136
|
turnstileToken?: string | undefined;
|
|
137
137
|
}, {
|
|
138
138
|
message: string;
|
|
139
|
-
name: string;
|
|
140
139
|
email: string;
|
|
140
|
+
name: string;
|
|
141
141
|
topic: "other" | "sales" | "support" | "partnership" | "security";
|
|
142
142
|
company?: string | undefined;
|
|
143
143
|
turnstileToken?: string | undefined;
|
|
@@ -208,8 +208,8 @@ declare const broadcastSchema: z.ZodObject<{
|
|
|
208
208
|
emailedAt: z.ZodNullable<z.ZodString>;
|
|
209
209
|
createdAt: z.ZodString;
|
|
210
210
|
}, "strip", z.ZodTypeAny, {
|
|
211
|
-
id: string;
|
|
212
211
|
merchantId: string | null;
|
|
212
|
+
id: string;
|
|
213
213
|
createdAt: string;
|
|
214
214
|
title: string;
|
|
215
215
|
body: string;
|
|
@@ -219,8 +219,8 @@ declare const broadcastSchema: z.ZodObject<{
|
|
|
219
219
|
senderEmail: string;
|
|
220
220
|
emailedAt: string | null;
|
|
221
221
|
}, {
|
|
222
|
-
id: string;
|
|
223
222
|
merchantId: string | null;
|
|
223
|
+
id: string;
|
|
224
224
|
createdAt: string;
|
|
225
225
|
title: string;
|
|
226
226
|
body: string;
|
|
@@ -244,8 +244,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
244
244
|
emailedAt: z.ZodNullable<z.ZodString>;
|
|
245
245
|
createdAt: z.ZodString;
|
|
246
246
|
}, "strip", z.ZodTypeAny, {
|
|
247
|
-
id: string;
|
|
248
247
|
merchantId: string | null;
|
|
248
|
+
id: string;
|
|
249
249
|
createdAt: string;
|
|
250
250
|
title: string;
|
|
251
251
|
body: string;
|
|
@@ -255,8 +255,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
255
255
|
senderEmail: string;
|
|
256
256
|
emailedAt: string | null;
|
|
257
257
|
}, {
|
|
258
|
-
id: string;
|
|
259
258
|
merchantId: string | null;
|
|
259
|
+
id: string;
|
|
260
260
|
createdAt: string;
|
|
261
261
|
title: string;
|
|
262
262
|
body: string;
|
|
@@ -268,8 +268,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
268
268
|
}>, "many">;
|
|
269
269
|
}, "strip", z.ZodTypeAny, {
|
|
270
270
|
data: {
|
|
271
|
-
id: string;
|
|
272
271
|
merchantId: string | null;
|
|
272
|
+
id: string;
|
|
273
273
|
createdAt: string;
|
|
274
274
|
title: string;
|
|
275
275
|
body: string;
|
|
@@ -281,8 +281,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
281
281
|
}[];
|
|
282
282
|
}, {
|
|
283
283
|
data: {
|
|
284
|
-
id: string;
|
|
285
284
|
merchantId: string | null;
|
|
285
|
+
id: string;
|
|
286
286
|
createdAt: string;
|
|
287
287
|
title: string;
|
|
288
288
|
body: string;
|
|
@@ -310,8 +310,8 @@ declare const notificationSchema: z.ZodObject<{
|
|
|
310
310
|
sourceId: z.ZodOptional<z.ZodString>;
|
|
311
311
|
}, "strip", z.ZodTypeAny, {
|
|
312
312
|
id: string;
|
|
313
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
314
313
|
createdAt: string;
|
|
314
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
315
315
|
title: string;
|
|
316
316
|
detail: string;
|
|
317
317
|
href: string;
|
|
@@ -319,8 +319,8 @@ declare const notificationSchema: z.ZodObject<{
|
|
|
319
319
|
sourceId?: string | undefined;
|
|
320
320
|
}, {
|
|
321
321
|
id: string;
|
|
322
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
323
322
|
createdAt: string;
|
|
323
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
324
324
|
title: string;
|
|
325
325
|
detail: string;
|
|
326
326
|
href: string;
|
|
@@ -345,8 +345,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
|
|
|
345
345
|
sourceId: z.ZodOptional<z.ZodString>;
|
|
346
346
|
}, "strip", z.ZodTypeAny, {
|
|
347
347
|
id: string;
|
|
348
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
349
348
|
createdAt: string;
|
|
349
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
350
350
|
title: string;
|
|
351
351
|
detail: string;
|
|
352
352
|
href: string;
|
|
@@ -354,8 +354,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
|
|
|
354
354
|
sourceId?: string | undefined;
|
|
355
355
|
}, {
|
|
356
356
|
id: string;
|
|
357
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
358
357
|
createdAt: string;
|
|
358
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
359
359
|
title: string;
|
|
360
360
|
detail: string;
|
|
361
361
|
href: string;
|
|
@@ -367,8 +367,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
|
|
|
367
367
|
}, "strip", z.ZodTypeAny, {
|
|
368
368
|
data: {
|
|
369
369
|
id: string;
|
|
370
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
371
370
|
createdAt: string;
|
|
371
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
372
372
|
title: string;
|
|
373
373
|
detail: string;
|
|
374
374
|
href: string;
|
|
@@ -380,8 +380,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
|
|
|
380
380
|
}, {
|
|
381
381
|
data: {
|
|
382
382
|
id: string;
|
|
383
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
384
383
|
createdAt: string;
|
|
384
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
385
385
|
title: string;
|
|
386
386
|
detail: string;
|
|
387
387
|
href: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -4,14 +4,14 @@ export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput,
|
|
|
4
4
|
export { Customer, UpsertCustomerInput, UpsertCustomerParsed, customerSchema, upsertCustomerInputSchema } from './customers.js';
|
|
5
5
|
export { CheckoutResultErrorCode, CheckoutResultMessage, CreatePaymentSessionInput, CreatePaymentSessionParsed, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, SubmitPaymentSessionParsed, callbackUrlSchema, checkoutResultErrorCodeSchema, checkoutResultErrorCodes, checkoutResultMessageSchema, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.js';
|
|
6
6
|
export { Transaction, TransactionKind, TransactionStatus, transactionKindSchema, transactionSchema, transactionStatusSchema } from './transactions.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';
|
|
7
|
+
export { CancelSubscriptionInput, CancelSubscriptionParsed, CreateSubscriptionPlanInput, CreateSubscriptionPlanParsed, Subscription, SubscriptionCharge, SubscriptionChargeOutcome, SubscriptionChargeStatus, SubscriptionEnrolmentTerms, SubscriptionInterval, SubscriptionPlan, SubscriptionPlanStatus, SubscriptionResultErrorCode, SubscriptionResultMessage, SubscriptionStatus, SubscriptionStatusResult, UpdateSubscriptionPlanInput, UpdateSubscriptionPlanParsed, cancelSubscriptionInputSchema, createSubscriptionPlanInputSchema, subscriptionChargeOutcomeSchema, subscriptionChargeSchema, subscriptionChargeStatusSchema, subscriptionEnrolmentTermsSchema, subscriptionIntervalSchema, subscriptionPlanSchema, subscriptionPlanStatusSchema, subscriptionResultErrorCodeSchema, subscriptionResultErrorCodes, subscriptionResultMessageSchema, subscriptionSchema, subscriptionStatusResultSchema, subscriptionStatusSchema, updateSubscriptionPlanInputSchema } 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';
|
|
11
11
|
export { AgentActionOutcome, AgentActionType, AgentActivityLog, AgentCapability, AgentIdentity, AgentJob, AgentJobStatus, AgentMerchantConfig, CreateAgentJobInput, CreateAgentJobParsed, UpdateAgentConfigInput, UpdateAgentConfigParsed, agentActionOutcomeSchema, agentActionTypeSchema, agentActivityLogSchema, agentCapabilitySchema, agentIdentitySchema, agentJobSchema, agentJobStatusSchema, agentMerchantConfigSchema, createAgentJobInputSchema, updateAgentConfigInputSchema } from './agents.js';
|
|
12
12
|
export { CreateStorefrontInput, CreateStorefrontParsed, CreateStorefrontProductInput, CreateStorefrontProductParsed, Storefront, StorefrontCheckoutInput, StorefrontCheckoutParsed, StorefrontCheckoutResponse, StorefrontProduct, StorefrontProductType, StorefrontStatus, createStorefrontInputSchema, createStorefrontProductInputSchema, storefrontCheckoutInputSchema, storefrontCheckoutResponseSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema } from './storefronts.js';
|
|
13
13
|
export { CreateInvoiceInput, CreateInvoiceParsed, Invoice, InvoiceLineItem, InvoiceStatus, createInvoiceInputSchema, invoiceLineItemSchema, invoiceSchema, invoiceStatusSchema } from './invoices.js';
|
|
14
|
-
export {
|
|
14
|
+
export { AgentJobCompletedEvent, AgentJobDisputedEvent, AgentJobProposedEvent, ComplianceWalletBlockedEvent, ComplianceWalletFlaggedEvent, InvoiceCreatedEvent, InvoiceOverdueEvent, InvoicePaidEvent, PaymentCompletedEvent, PaymentCreatedEvent, PaymentFailedEvent, RefundCompletedEvent, RefundCreatedEvent, StrimzWebhookEvent, SubscriptionCancelledEvent, SubscriptionChargeFailedEvent, SubscriptionChargedEvent, SubscriptionCreatedEvent, SubscriptionLapsedEvent, SubscriptionRecoveryAttemptEvent, agentJobCompletedEventSchema, agentJobDisputedEventSchema, agentJobProposedEventSchema, complianceWalletBlockedEventSchema, complianceWalletFlaggedEventSchema, invoiceCreatedEventSchema, invoiceOverdueEventSchema, invoicePaidEventSchema, paymentCompletedEventSchema, paymentCreatedEventSchema, paymentFailedEventSchema, refundCompletedEventSchema, refundCreatedEventSchema, subscriptionCancelledEventSchema, subscriptionChargeFailedEventSchema, subscriptionChargedEventSchema, subscriptionCreatedEventSchema, subscriptionLapsedEventSchema, subscriptionRecoveryAttemptEventSchema, webhookEventSchema } from './events.js';
|
|
15
15
|
import { z } from 'zod';
|
|
16
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';
|
|
17
17
|
|
|
@@ -129,15 +129,15 @@ declare const contactRequestInputSchema: z.ZodObject<{
|
|
|
129
129
|
turnstileToken: z.ZodOptional<z.ZodString>;
|
|
130
130
|
}, "strip", z.ZodTypeAny, {
|
|
131
131
|
message: string;
|
|
132
|
-
name: string;
|
|
133
132
|
email: string;
|
|
133
|
+
name: string;
|
|
134
134
|
topic: "other" | "sales" | "support" | "partnership" | "security";
|
|
135
135
|
company?: string | undefined;
|
|
136
136
|
turnstileToken?: string | undefined;
|
|
137
137
|
}, {
|
|
138
138
|
message: string;
|
|
139
|
-
name: string;
|
|
140
139
|
email: string;
|
|
140
|
+
name: string;
|
|
141
141
|
topic: "other" | "sales" | "support" | "partnership" | "security";
|
|
142
142
|
company?: string | undefined;
|
|
143
143
|
turnstileToken?: string | undefined;
|
|
@@ -208,8 +208,8 @@ declare const broadcastSchema: z.ZodObject<{
|
|
|
208
208
|
emailedAt: z.ZodNullable<z.ZodString>;
|
|
209
209
|
createdAt: z.ZodString;
|
|
210
210
|
}, "strip", z.ZodTypeAny, {
|
|
211
|
-
id: string;
|
|
212
211
|
merchantId: string | null;
|
|
212
|
+
id: string;
|
|
213
213
|
createdAt: string;
|
|
214
214
|
title: string;
|
|
215
215
|
body: string;
|
|
@@ -219,8 +219,8 @@ declare const broadcastSchema: z.ZodObject<{
|
|
|
219
219
|
senderEmail: string;
|
|
220
220
|
emailedAt: string | null;
|
|
221
221
|
}, {
|
|
222
|
-
id: string;
|
|
223
222
|
merchantId: string | null;
|
|
223
|
+
id: string;
|
|
224
224
|
createdAt: string;
|
|
225
225
|
title: string;
|
|
226
226
|
body: string;
|
|
@@ -244,8 +244,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
244
244
|
emailedAt: z.ZodNullable<z.ZodString>;
|
|
245
245
|
createdAt: z.ZodString;
|
|
246
246
|
}, "strip", z.ZodTypeAny, {
|
|
247
|
-
id: string;
|
|
248
247
|
merchantId: string | null;
|
|
248
|
+
id: string;
|
|
249
249
|
createdAt: string;
|
|
250
250
|
title: string;
|
|
251
251
|
body: string;
|
|
@@ -255,8 +255,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
255
255
|
senderEmail: string;
|
|
256
256
|
emailedAt: string | null;
|
|
257
257
|
}, {
|
|
258
|
-
id: string;
|
|
259
258
|
merchantId: string | null;
|
|
259
|
+
id: string;
|
|
260
260
|
createdAt: string;
|
|
261
261
|
title: string;
|
|
262
262
|
body: string;
|
|
@@ -268,8 +268,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
268
268
|
}>, "many">;
|
|
269
269
|
}, "strip", z.ZodTypeAny, {
|
|
270
270
|
data: {
|
|
271
|
-
id: string;
|
|
272
271
|
merchantId: string | null;
|
|
272
|
+
id: string;
|
|
273
273
|
createdAt: string;
|
|
274
274
|
title: string;
|
|
275
275
|
body: string;
|
|
@@ -281,8 +281,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
281
281
|
}[];
|
|
282
282
|
}, {
|
|
283
283
|
data: {
|
|
284
|
-
id: string;
|
|
285
284
|
merchantId: string | null;
|
|
285
|
+
id: string;
|
|
286
286
|
createdAt: string;
|
|
287
287
|
title: string;
|
|
288
288
|
body: string;
|
|
@@ -310,8 +310,8 @@ declare const notificationSchema: z.ZodObject<{
|
|
|
310
310
|
sourceId: z.ZodOptional<z.ZodString>;
|
|
311
311
|
}, "strip", z.ZodTypeAny, {
|
|
312
312
|
id: string;
|
|
313
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
314
313
|
createdAt: string;
|
|
314
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
315
315
|
title: string;
|
|
316
316
|
detail: string;
|
|
317
317
|
href: string;
|
|
@@ -319,8 +319,8 @@ declare const notificationSchema: z.ZodObject<{
|
|
|
319
319
|
sourceId?: string | undefined;
|
|
320
320
|
}, {
|
|
321
321
|
id: string;
|
|
322
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
323
322
|
createdAt: string;
|
|
323
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
324
324
|
title: string;
|
|
325
325
|
detail: string;
|
|
326
326
|
href: string;
|
|
@@ -345,8 +345,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
|
|
|
345
345
|
sourceId: z.ZodOptional<z.ZodString>;
|
|
346
346
|
}, "strip", z.ZodTypeAny, {
|
|
347
347
|
id: string;
|
|
348
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
349
348
|
createdAt: string;
|
|
349
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
350
350
|
title: string;
|
|
351
351
|
detail: string;
|
|
352
352
|
href: string;
|
|
@@ -354,8 +354,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
|
|
|
354
354
|
sourceId?: string | undefined;
|
|
355
355
|
}, {
|
|
356
356
|
id: string;
|
|
357
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
358
357
|
createdAt: string;
|
|
358
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
359
359
|
title: string;
|
|
360
360
|
detail: string;
|
|
361
361
|
href: string;
|
|
@@ -367,8 +367,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
|
|
|
367
367
|
}, "strip", z.ZodTypeAny, {
|
|
368
368
|
data: {
|
|
369
369
|
id: string;
|
|
370
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
371
370
|
createdAt: string;
|
|
371
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
372
372
|
title: string;
|
|
373
373
|
detail: string;
|
|
374
374
|
href: string;
|
|
@@ -380,8 +380,8 @@ declare const notificationListResponseSchema: z.ZodObject<{
|
|
|
380
380
|
}, {
|
|
381
381
|
data: {
|
|
382
382
|
id: string;
|
|
383
|
-
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
384
383
|
createdAt: string;
|
|
384
|
+
kind: "payment_received" | "subscription_started" | "refund_processed" | "admin_broadcast";
|
|
385
385
|
title: string;
|
|
386
386
|
detail: string;
|
|
387
387
|
href: string;
|
package/dist/index.js
CHANGED
|
@@ -400,6 +400,9 @@ var subscriptionPlanSchema = z.object({
|
|
|
400
400
|
intervalCount: z.number().int().min(1).max(365),
|
|
401
401
|
trialPeriodDays: z.number().int().min(0).max(365).nullable(),
|
|
402
402
|
status: subscriptionPlanStatusSchema,
|
|
403
|
+
/** `{SUBSCRIPTION_ID}` and `{ON_CHAIN_TX_HASH}` are filled in on redirect. */
|
|
404
|
+
successUrl: callbackUrlSchema.nullable(),
|
|
405
|
+
cancelUrl: callbackUrlSchema.nullable(),
|
|
403
406
|
metadata: metadataSchema,
|
|
404
407
|
createdAt: isoTimestampSchema,
|
|
405
408
|
updatedAt: isoTimestampSchema
|
|
@@ -412,8 +415,41 @@ var createSubscriptionPlanInputSchema = z.object({
|
|
|
412
415
|
interval: subscriptionIntervalSchema,
|
|
413
416
|
intervalCount: z.number().int().min(1).max(365).default(1),
|
|
414
417
|
trialPeriodDays: z.number().int().min(0).max(365).optional(),
|
|
418
|
+
successUrl: callbackUrlSchema.optional(),
|
|
419
|
+
cancelUrl: callbackUrlSchema.optional(),
|
|
415
420
|
metadata: metadataSchema.optional()
|
|
416
421
|
});
|
|
422
|
+
var updateSubscriptionPlanInputSchema = z.object({
|
|
423
|
+
successUrl: callbackUrlSchema.nullable().optional(),
|
|
424
|
+
cancelUrl: callbackUrlSchema.nullable().optional()
|
|
425
|
+
}).strict().refine((v) => v.successUrl !== void 0 || v.cancelUrl !== void 0, {
|
|
426
|
+
message: "set successUrl or cancelUrl"
|
|
427
|
+
});
|
|
428
|
+
var subscriptionResultErrorCodes = [
|
|
429
|
+
"load_failed",
|
|
430
|
+
"merchant_not_ready",
|
|
431
|
+
"payment_reverted",
|
|
432
|
+
"already_subscribed"
|
|
433
|
+
];
|
|
434
|
+
var subscriptionResultErrorCodeSchema = z.enum(subscriptionResultErrorCodes);
|
|
435
|
+
var subscriptionResultMessageSchema = z.discriminatedUnion("type", [
|
|
436
|
+
z.object({
|
|
437
|
+
type: z.literal("strimz:subscription:success"),
|
|
438
|
+
planId: idSchema,
|
|
439
|
+
subscriptionId: idSchema.nullable(),
|
|
440
|
+
txHash: evmTxHashSchema
|
|
441
|
+
}),
|
|
442
|
+
z.object({
|
|
443
|
+
type: z.literal("strimz:subscription:cancel"),
|
|
444
|
+
planId: idSchema
|
|
445
|
+
}),
|
|
446
|
+
z.object({
|
|
447
|
+
type: z.literal("strimz:subscription:error"),
|
|
448
|
+
planId: idSchema,
|
|
449
|
+
code: subscriptionResultErrorCodeSchema,
|
|
450
|
+
message: z.string().min(1).max(500)
|
|
451
|
+
})
|
|
452
|
+
]);
|
|
417
453
|
var subscriptionStatusSchema = z.enum([
|
|
418
454
|
"trialing",
|
|
419
455
|
"active",
|
|
@@ -556,16 +592,13 @@ var webhookEventNameSchema = z.enum([
|
|
|
556
592
|
"subscription.charged",
|
|
557
593
|
"subscription.charge_failed",
|
|
558
594
|
"subscription.recovery_attempt",
|
|
559
|
-
"subscription.recovery_outcome",
|
|
560
595
|
"subscription.cancelled",
|
|
561
596
|
"subscription.lapsed",
|
|
562
597
|
"refund.created",
|
|
563
598
|
"refund.completed",
|
|
564
|
-
"refund.failed",
|
|
565
599
|
"invoice.created",
|
|
566
600
|
"invoice.paid",
|
|
567
601
|
"invoice.overdue",
|
|
568
|
-
"agent.action_executed",
|
|
569
602
|
"agent.job_proposed",
|
|
570
603
|
"agent.job_completed",
|
|
571
604
|
"agent.job_disputed",
|
|
@@ -931,13 +964,6 @@ var subscriptionRecoveryAttemptEventSchema = envelope(
|
|
|
931
964
|
"subscription.recovery_attempt",
|
|
932
965
|
z.object({ subscription: subscriptionSchema, attemptNumber: z.number().int().min(1) })
|
|
933
966
|
);
|
|
934
|
-
var subscriptionRecoveryOutcomeEventSchema = envelope(
|
|
935
|
-
"subscription.recovery_outcome",
|
|
936
|
-
z.object({
|
|
937
|
-
subscription: subscriptionSchema,
|
|
938
|
-
outcome: z.enum(["recovered", "churned"])
|
|
939
|
-
})
|
|
940
|
-
);
|
|
941
967
|
var subscriptionCancelledEventSchema = envelope(
|
|
942
968
|
"subscription.cancelled",
|
|
943
969
|
subscriptionSchema
|
|
@@ -948,20 +974,12 @@ var refundCompletedEventSchema = envelope(
|
|
|
948
974
|
"refund.completed",
|
|
949
975
|
z.object({ refund: refundSchema, transaction: transactionSchema })
|
|
950
976
|
);
|
|
951
|
-
var refundFailedEventSchema = envelope(
|
|
952
|
-
"refund.failed",
|
|
953
|
-
z.object({ refund: refundSchema, reason: z.string() })
|
|
954
|
-
);
|
|
955
977
|
var invoiceCreatedEventSchema = envelope("invoice.created", invoiceSchema);
|
|
956
978
|
var invoicePaidEventSchema = envelope(
|
|
957
979
|
"invoice.paid",
|
|
958
980
|
z.object({ invoice: invoiceSchema, transaction: transactionSchema })
|
|
959
981
|
);
|
|
960
982
|
var invoiceOverdueEventSchema = envelope("invoice.overdue", invoiceSchema);
|
|
961
|
-
var agentActionExecutedEventSchema = envelope(
|
|
962
|
-
"agent.action_executed",
|
|
963
|
-
agentActivityLogSchema
|
|
964
|
-
);
|
|
965
983
|
var agentJobProposedEventSchema = envelope("agent.job_proposed", agentJobSchema);
|
|
966
984
|
var agentJobCompletedEventSchema = envelope("agent.job_completed", agentJobSchema);
|
|
967
985
|
var agentJobDisputedEventSchema = envelope("agent.job_disputed", agentJobSchema);
|
|
@@ -981,16 +999,13 @@ var webhookEventSchema = z.discriminatedUnion("type", [
|
|
|
981
999
|
subscriptionChargedEventSchema,
|
|
982
1000
|
subscriptionChargeFailedEventSchema,
|
|
983
1001
|
subscriptionRecoveryAttemptEventSchema,
|
|
984
|
-
subscriptionRecoveryOutcomeEventSchema,
|
|
985
1002
|
subscriptionCancelledEventSchema,
|
|
986
1003
|
subscriptionLapsedEventSchema,
|
|
987
1004
|
refundCreatedEventSchema,
|
|
988
1005
|
refundCompletedEventSchema,
|
|
989
|
-
refundFailedEventSchema,
|
|
990
1006
|
invoiceCreatedEventSchema,
|
|
991
1007
|
invoicePaidEventSchema,
|
|
992
1008
|
invoiceOverdueEventSchema,
|
|
993
|
-
agentActionExecutedEventSchema,
|
|
994
1009
|
agentJobProposedEventSchema,
|
|
995
1010
|
agentJobCompletedEventSchema,
|
|
996
1011
|
agentJobDisputedEventSchema,
|
|
@@ -1279,6 +1294,6 @@ var adminTopMerchantsSchema = z.object({
|
|
|
1279
1294
|
data: z.array(adminTopMerchantSchema)
|
|
1280
1295
|
});
|
|
1281
1296
|
|
|
1282
|
-
export { DEFAULT_MERCHANT_EMAIL_PREFS, STATS_VOLUME_DEFAULT_DAYS, STATS_VOLUME_MAX_DAYS, adminMerchantStatsSchema, adminOverviewSchema, adminStatsModeQuerySchema, adminTopMerchantSchema, adminTopMerchantsQuerySchema, adminTopMerchantsSchema, adminVolumeDaySchema, adminVolumeQuerySchema, adminVolumeSeriesSchema,
|
|
1297
|
+
export { DEFAULT_MERCHANT_EMAIL_PREFS, STATS_VOLUME_DEFAULT_DAYS, STATS_VOLUME_MAX_DAYS, adminMerchantStatsSchema, adminOverviewSchema, adminStatsModeQuerySchema, adminTopMerchantSchema, adminTopMerchantsQuerySchema, adminTopMerchantsSchema, adminVolumeDaySchema, adminVolumeQuerySchema, adminVolumeSeriesSchema, agentActionOutcomeSchema, agentActionTypeSchema, agentActivityLogSchema, agentCapabilitySchema, agentIdentitySchema, agentJobCompletedEventSchema, agentJobDisputedEventSchema, agentJobProposedEventSchema, agentJobSchema, agentJobStatusSchema, agentMerchantConfigSchema, apiKeyKindSchema, apiKeySchema, apiKeyScopeSchema, arcEnvironmentSchema, broadcastAudienceSchema, broadcastListResponseSchema, broadcastSchema, callbackUrlSchema, cancelSubscriptionInputSchema, changeTierInputSchema, checkoutResultErrorCodeSchema, checkoutResultErrorCodes, checkoutResultMessageSchema, 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, 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, subscriptionResultErrorCodeSchema, subscriptionResultErrorCodes, subscriptionResultMessageSchema, subscriptionSchema, subscriptionStatusResultSchema, subscriptionStatusSchema, tokenAmountSchema, tokenCapabilitiesSchema, tokenMetadataSchema, tokenPermitNonceSchema, tokenSymbolSchema, transactionKindSchema, transactionSchema, transactionStatusSchema, uintSchema, updateAgentConfigInputSchema, updateMerchantInputSchema, updateSubscriptionPlanInputSchema, upsertCustomerInputSchema, volumeWindowSchema, webhookDeliveryDetailSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEndpointSchema, webhookEndpointStatusSchema, webhookEventNameSchema, webhookEventSchema };
|
|
1283
1298
|
//# sourceMappingURL=index.js.map
|
|
1284
1299
|
//# sourceMappingURL=index.js.map
|