@strimz/shared-types 0.8.0 → 0.10.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/agents.cjs +42 -13
- package/dist/agents.cjs.map +1 -1
- package/dist/agents.d.cts +37 -37
- package/dist/agents.d.ts +37 -37
- package/dist/agents.js +42 -13
- package/dist/agents.js.map +1 -1
- package/dist/analytics.cjs +1 -11
- package/dist/analytics.cjs.map +1 -1
- package/dist/analytics.d.cts +78 -78
- package/dist/analytics.d.ts +78 -78
- package/dist/analytics.js +1 -11
- package/dist/analytics.js.map +1 -1
- package/dist/api-keys.cjs +1 -1
- package/dist/api-keys.cjs.map +1 -1
- package/dist/api-keys.js +1 -1
- package/dist/api-keys.js.map +1 -1
- package/dist/common.cjs +1 -1
- package/dist/common.cjs.map +1 -1
- package/dist/common.d.cts +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/common.js.map +1 -1
- package/dist/compliance.cjs +1 -1
- package/dist/compliance.cjs.map +1 -1
- package/dist/compliance.js +1 -1
- package/dist/compliance.js.map +1 -1
- package/dist/customers.cjs +1 -1
- package/dist/customers.cjs.map +1 -1
- package/dist/customers.js +1 -1
- package/dist/customers.js.map +1 -1
- package/dist/events.cjs +43 -24
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +90 -90
- package/dist/events.d.ts +90 -90
- package/dist/events.js +43 -24
- package/dist/events.js.map +1 -1
- package/dist/index.cjs +42 -24
- 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 +43 -24
- package/dist/index.js.map +1 -1
- package/dist/invoices.cjs +1 -1
- package/dist/invoices.cjs.map +1 -1
- package/dist/invoices.d.cts +5 -5
- package/dist/invoices.d.ts +5 -5
- package/dist/invoices.js +1 -1
- package/dist/invoices.js.map +1 -1
- package/dist/merchants.cjs +1 -1
- package/dist/merchants.cjs.map +1 -1
- package/dist/merchants.js +1 -1
- package/dist/merchants.js.map +1 -1
- package/dist/payment-sessions.cjs +1 -1
- package/dist/payment-sessions.cjs.map +1 -1
- package/dist/payment-sessions.d.cts +4 -4
- package/dist/payment-sessions.d.ts +4 -4
- package/dist/payment-sessions.js +1 -1
- package/dist/payment-sessions.js.map +1 -1
- package/dist/refunds.cjs +1 -1
- package/dist/refunds.cjs.map +1 -1
- package/dist/refunds.d.cts +5 -5
- package/dist/refunds.d.ts +5 -5
- package/dist/refunds.js +1 -1
- package/dist/refunds.js.map +1 -1
- package/dist/storefronts.cjs +1 -11
- package/dist/storefronts.cjs.map +1 -1
- package/dist/storefronts.d.cts +2 -2
- package/dist/storefronts.d.ts +2 -2
- package/dist/storefronts.js +1 -11
- package/dist/storefronts.js.map +1 -1
- package/dist/subscriptions.cjs +1 -12
- package/dist/subscriptions.cjs.map +1 -1
- package/dist/subscriptions.d.cts +5 -43
- package/dist/subscriptions.d.ts +5 -43
- package/dist/subscriptions.js +2 -12
- package/dist/subscriptions.js.map +1 -1
- package/dist/transactions.cjs +1 -1
- package/dist/transactions.cjs.map +1 -1
- package/dist/transactions.d.cts +3 -3
- package/dist/transactions.d.ts +3 -3
- package/dist/transactions.js +1 -1
- package/dist/transactions.js.map +1 -1
- package/dist/webhooks.cjs +1 -1
- package/dist/webhooks.cjs.map +1 -1
- package/dist/webhooks.js +1 -1
- package/dist/webhooks.js.map +1 -1
- package/package.json +1 -1
- package/src/agents.ts +49 -14
- package/src/common.ts +0 -1
- package/src/subscriptions.ts +0 -13
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var httpsUrlSchema = z.string().url().refine((v) => v.startsWith("https://"), {
|
|
|
9
9
|
message: "must be an https:// URL"
|
|
10
10
|
});
|
|
11
11
|
var httpUrlSchema = z.string().url();
|
|
12
|
-
var tokenAmountSchema = z.string().regex(/^[0-9]+$/, "must be a non-negative integer string (base-10)")
|
|
12
|
+
var tokenAmountSchema = z.string().regex(/^[0-9]+$/, "must be a non-negative integer string (base-10)");
|
|
13
13
|
var uintSchema = z.number().int().min(0).max(Number.MAX_SAFE_INTEGER);
|
|
14
14
|
var isoTimestampSchema = z.string().datetime({ offset: true, message: "must be an ISO-8601 timestamp" });
|
|
15
15
|
var countryCodeSchema = z.string().length(2).regex(/^[A-Z]{2}$/, "must be an ISO-3166 alpha-2 country code");
|
|
@@ -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()
|
|
@@ -653,28 +643,57 @@ var agentCapabilitySchema = z.enum([
|
|
|
653
643
|
"commerce",
|
|
654
644
|
"pricing_intelligence"
|
|
655
645
|
]);
|
|
646
|
+
var enabledCapabilitiesSchema = z.array(agentCapabilitySchema);
|
|
647
|
+
var recoveryGracePeriodHoursSchema = z.union([z.literal(24), z.literal(48), z.literal(72)]);
|
|
648
|
+
var recoveryStrategySchema = z.enum(["once", "twice", "until_grace_ends"]);
|
|
649
|
+
var recoveryNotificationTemplateSchema = z.string().max(2e3).nullable();
|
|
650
|
+
var cashflowDigestEnabledSchema = z.boolean();
|
|
651
|
+
var cashflowAnomalySensitivitySchema = z.enum(["low", "medium", "high"]);
|
|
652
|
+
var cashflowAutoConvertToYieldSchema = z.boolean();
|
|
653
|
+
var cashflowMinimumLiquidReserveCentsSchema = z.number().int().nonnegative();
|
|
654
|
+
var commerceRequireHumanApprovalAboveUsdCentsSchema = z.number().int().nonnegative();
|
|
655
|
+
var commerceApprovedVendorsSchema = z.array(evmAddressSchema);
|
|
656
|
+
var commerceMonthlySpendCapUsdCentsSchema = z.number().int().nonnegative().nullable();
|
|
656
657
|
var agentMerchantConfigSchema = z.object({
|
|
657
658
|
merchantId: idSchema,
|
|
658
|
-
enabledCapabilities:
|
|
659
|
+
enabledCapabilities: enabledCapabilitiesSchema.default([]),
|
|
659
660
|
recovery: z.object({
|
|
660
|
-
gracePeriodHours:
|
|
661
|
-
strategy:
|
|
662
|
-
notificationTemplate:
|
|
661
|
+
gracePeriodHours: recoveryGracePeriodHoursSchema.default(48),
|
|
662
|
+
strategy: recoveryStrategySchema.default("twice"),
|
|
663
|
+
notificationTemplate: recoveryNotificationTemplateSchema
|
|
663
664
|
}),
|
|
664
665
|
cashflow: z.object({
|
|
665
|
-
digestEnabled:
|
|
666
|
-
anomalySensitivity:
|
|
667
|
-
autoConvertToYield:
|
|
668
|
-
minimumLiquidReserveCents:
|
|
666
|
+
digestEnabled: cashflowDigestEnabledSchema.default(false),
|
|
667
|
+
anomalySensitivity: cashflowAnomalySensitivitySchema.default("medium"),
|
|
668
|
+
autoConvertToYield: cashflowAutoConvertToYieldSchema.default(false),
|
|
669
|
+
minimumLiquidReserveCents: cashflowMinimumLiquidReserveCentsSchema.default(1e5)
|
|
669
670
|
}),
|
|
670
671
|
commerce: z.object({
|
|
671
|
-
requireHumanApprovalAboveUsdCents:
|
|
672
|
-
approvedVendors:
|
|
673
|
-
monthlySpendCapUsdCents:
|
|
672
|
+
requireHumanApprovalAboveUsdCents: commerceRequireHumanApprovalAboveUsdCentsSchema.default(1e5),
|
|
673
|
+
approvedVendors: commerceApprovedVendorsSchema.default([]),
|
|
674
|
+
monthlySpendCapUsdCents: commerceMonthlySpendCapUsdCentsSchema
|
|
674
675
|
}),
|
|
675
676
|
updatedAt: isoTimestampSchema
|
|
676
677
|
});
|
|
677
|
-
var updateAgentConfigInputSchema =
|
|
678
|
+
var updateAgentConfigInputSchema = z.object({
|
|
679
|
+
enabledCapabilities: enabledCapabilitiesSchema.optional(),
|
|
680
|
+
recovery: z.object({
|
|
681
|
+
gracePeriodHours: recoveryGracePeriodHoursSchema.optional(),
|
|
682
|
+
strategy: recoveryStrategySchema.optional(),
|
|
683
|
+
notificationTemplate: recoveryNotificationTemplateSchema.optional()
|
|
684
|
+
}).optional(),
|
|
685
|
+
cashflow: z.object({
|
|
686
|
+
digestEnabled: cashflowDigestEnabledSchema.optional(),
|
|
687
|
+
anomalySensitivity: cashflowAnomalySensitivitySchema.optional(),
|
|
688
|
+
autoConvertToYield: cashflowAutoConvertToYieldSchema.optional(),
|
|
689
|
+
minimumLiquidReserveCents: cashflowMinimumLiquidReserveCentsSchema.optional()
|
|
690
|
+
}).optional(),
|
|
691
|
+
commerce: z.object({
|
|
692
|
+
requireHumanApprovalAboveUsdCents: commerceRequireHumanApprovalAboveUsdCentsSchema.optional(),
|
|
693
|
+
approvedVendors: commerceApprovedVendorsSchema.optional(),
|
|
694
|
+
monthlySpendCapUsdCents: commerceMonthlySpendCapUsdCentsSchema.optional()
|
|
695
|
+
}).optional()
|
|
696
|
+
});
|
|
678
697
|
var agentActionTypeSchema = z.enum([
|
|
679
698
|
"recovery_notification_sent",
|
|
680
699
|
"recovery_retry_scheduled",
|
|
@@ -1235,6 +1254,6 @@ var adminTopMerchantsSchema = z.object({
|
|
|
1235
1254
|
data: z.array(adminTopMerchantSchema)
|
|
1236
1255
|
});
|
|
1237
1256
|
|
|
1238
|
-
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,
|
|
1257
|
+
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 };
|
|
1239
1258
|
//# sourceMappingURL=index.js.map
|
|
1240
1259
|
//# sourceMappingURL=index.js.map
|