@strimz/shared-types 0.12.2 → 0.13.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 +26 -2
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.js +26 -2
- package/dist/analytics.js.map +1 -1
- package/dist/events.cjs +26 -2
- package/dist/events.cjs.map +1 -1
- package/dist/events.js +26 -2
- package/dist/events.js.map +1 -1
- package/dist/index.cjs +29 -2
- 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 +27 -3
- package/dist/index.js.map +1 -1
- package/dist/payment-sessions.cjs +29 -2
- package/dist/payment-sessions.cjs.map +1 -1
- package/dist/payment-sessions.d.cts +44 -3
- package/dist/payment-sessions.d.ts +44 -3
- package/dist/payment-sessions.js +27 -3
- package/dist/payment-sessions.js.map +1 -1
- package/package.json +2 -2
- package/src/payment-sessions.ts +30 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { ArcEnvironment, EvmAddress, EvmTxHash, Id, IsoTimestamp, MerchantTier,
|
|
|
2
2
|
export { ChangeTierInput, ChangeTierParsed, CreateMerchantInput, CreateMerchantParsed, DEFAULT_MERCHANT_EMAIL_PREFS, InviteMemberInput, InviteMemberParsed, LoginInput, LoginOutput, LoginParsed, Merchant, MerchantBalanceView, MerchantEmailPrefs, MerchantMember, MerchantPublicBrand, MerchantRole, MerchantStatus, OnboardMerchantInput, OnboardMerchantParsed, UpdateMerchantInput, UpdateMerchantParsed, changeTierInputSchema, createMerchantInputSchema, inviteMemberInputSchema, loginInputSchema, loginOutputSchema, merchantBalanceSchema, merchantEmailPrefsSchema, merchantMemberSchema, merchantPublicBrandSchema, merchantRoleSchema, merchantSchema, merchantStatusSchema, onboardMerchantInputSchema, updateMerchantInputSchema } from './merchants.js';
|
|
3
3
|
export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput, CreateApiKeyParsed, RotateApiKeyInput, RotateApiKeyParsed, apiKeyKindSchema, apiKeySchema, apiKeyScopeSchema, createApiKeyInputSchema, createApiKeyOutputSchema, rotateApiKeyInputSchema } from './api-keys.js';
|
|
4
4
|
export { Customer, UpsertCustomerInput, UpsertCustomerParsed, customerSchema, upsertCustomerInputSchema } from './customers.js';
|
|
5
|
-
export { CreatePaymentSessionInput, CreatePaymentSessionParsed, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, SubmitPaymentSessionParsed, callbackUrlSchema, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.js';
|
|
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
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';
|
package/dist/index.js
CHANGED
|
@@ -282,8 +282,8 @@ var createPaymentSessionInputSchema = z.object({
|
|
|
282
282
|
email: z.string().email().optional(),
|
|
283
283
|
externalRef: z.string().max(120).optional()
|
|
284
284
|
}).optional(),
|
|
285
|
-
successUrl:
|
|
286
|
-
cancelUrl:
|
|
285
|
+
successUrl: callbackUrlSchema.optional(),
|
|
286
|
+
cancelUrl: callbackUrlSchema.optional(),
|
|
287
287
|
/** Minutes until the session expires. Default 30, max 60*24 (one day). */
|
|
288
288
|
expiresInMinutes: z.number().int().min(1).max(60 * 24).default(30),
|
|
289
289
|
/**
|
|
@@ -310,6 +310,30 @@ var submitPaymentSessionInputSchema = z.object({
|
|
|
310
310
|
bridgeTxHash: evmTxHashSchema.optional(),
|
|
311
311
|
payerWalletAddress: evmAddressSchema
|
|
312
312
|
});
|
|
313
|
+
var checkoutResultErrorCodes = [
|
|
314
|
+
"load_failed",
|
|
315
|
+
"merchant_not_ready",
|
|
316
|
+
"payment_reverted",
|
|
317
|
+
"unsupported_wallet"
|
|
318
|
+
];
|
|
319
|
+
var checkoutResultErrorCodeSchema = z.enum(checkoutResultErrorCodes);
|
|
320
|
+
var checkoutResultMessageSchema = z.discriminatedUnion("type", [
|
|
321
|
+
z.object({
|
|
322
|
+
type: z.literal("strimz:checkout:success"),
|
|
323
|
+
sessionId: idSchema,
|
|
324
|
+
txHash: evmTxHashSchema
|
|
325
|
+
}),
|
|
326
|
+
z.object({
|
|
327
|
+
type: z.literal("strimz:checkout:cancel"),
|
|
328
|
+
sessionId: idSchema
|
|
329
|
+
}),
|
|
330
|
+
z.object({
|
|
331
|
+
type: z.literal("strimz:checkout:error"),
|
|
332
|
+
sessionId: idSchema,
|
|
333
|
+
code: checkoutResultErrorCodeSchema,
|
|
334
|
+
message: z.string().min(1).max(500)
|
|
335
|
+
})
|
|
336
|
+
]);
|
|
313
337
|
var transactionKindSchema = z.enum([
|
|
314
338
|
"one_shot",
|
|
315
339
|
"subscription_charge",
|
|
@@ -1255,6 +1279,6 @@ var adminTopMerchantsSchema = z.object({
|
|
|
1255
1279
|
data: z.array(adminTopMerchantSchema)
|
|
1256
1280
|
});
|
|
1257
1281
|
|
|
1258
|
-
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 };
|
|
1282
|
+
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, 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, 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 };
|
|
1259
1283
|
//# sourceMappingURL=index.js.map
|
|
1260
1284
|
//# sourceMappingURL=index.js.map
|