@strimz/shared-types 0.14.0 → 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.js +36 -0
- package/dist/analytics.js.map +1 -1
- package/dist/events.cjs +36 -0
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +60 -60
- package/dist/events.d.ts +60 -60
- package/dist/events.js +36 -0
- package/dist/events.js.map +1 -1
- package/dist/index.cjs +40 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +37 -1
- package/dist/index.js.map +1 -1
- package/dist/storefronts.cjs +151 -0
- package/dist/storefronts.cjs.map +1 -1
- 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 +80 -3
- package/dist/subscriptions.d.ts +80 -3
- package/dist/subscriptions.js +150 -1
- package/dist/subscriptions.js.map +1 -1
- package/package.json +1 -1
- package/src/subscriptions.ts +49 -0
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 { 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';
|
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",
|
|
@@ -1258,6 +1294,6 @@ var adminTopMerchantsSchema = z.object({
|
|
|
1258
1294
|
data: z.array(adminTopMerchantSchema)
|
|
1259
1295
|
});
|
|
1260
1296
|
|
|
1261
|
-
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, subscriptionSchema, subscriptionStatusResultSchema, subscriptionStatusSchema, tokenAmountSchema, tokenCapabilitiesSchema, tokenMetadataSchema, tokenPermitNonceSchema, tokenSymbolSchema, transactionKindSchema, transactionSchema, transactionStatusSchema, uintSchema, updateAgentConfigInputSchema, updateMerchantInputSchema, upsertCustomerInputSchema, volumeWindowSchema, webhookDeliveryDetailSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEndpointSchema, webhookEndpointStatusSchema, webhookEventNameSchema, webhookEventSchema };
|
|
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 };
|
|
1262
1298
|
//# sourceMappingURL=index.js.map
|
|
1263
1299
|
//# sourceMappingURL=index.js.map
|