@strimz/shared-types 0.6.0 → 0.8.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/README.md +7 -4
- package/dist/agents.cjs.map +1 -1
- package/dist/agents.d.cts +7 -5
- package/dist/agents.d.ts +7 -5
- package/dist/agents.js.map +1 -1
- package/dist/analytics.cjs +568 -0
- package/dist/analytics.cjs.map +1 -0
- package/dist/analytics.d.cts +1719 -0
- package/dist/analytics.d.ts +1719 -0
- package/dist/analytics.js +540 -0
- package/dist/analytics.js.map +1 -0
- package/dist/api-keys.cjs.map +1 -1
- package/dist/api-keys.d.cts +19 -17
- package/dist/api-keys.d.ts +19 -17
- package/dist/api-keys.js.map +1 -1
- package/dist/common.cjs.map +1 -1
- package/dist/common.d.cts +3 -2
- package/dist/common.d.ts +3 -2
- package/dist/common.js.map +1 -1
- package/dist/compliance.cjs.map +1 -1
- package/dist/compliance.d.cts +8 -8
- package/dist/compliance.d.ts +8 -8
- package/dist/compliance.js.map +1 -1
- package/dist/customers.cjs.map +1 -1
- package/dist/customers.d.cts +10 -9
- package/dist/customers.d.ts +10 -9
- package/dist/customers.js.map +1 -1
- package/dist/events.cjs.map +1 -1
- package/dist/events.d.cts +1936 -1936
- package/dist/events.d.ts +1936 -1936
- package/dist/events.js.map +1 -1
- package/dist/index.cjs +216 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -22
- package/dist/index.d.ts +25 -22
- package/dist/index.js +190 -1
- package/dist/index.js.map +1 -1
- package/dist/invoices.cjs.map +1 -1
- package/dist/invoices.d.cts +19 -18
- package/dist/invoices.d.ts +19 -18
- package/dist/invoices.js.map +1 -1
- package/dist/merchants.cjs.map +1 -1
- package/dist/merchants.d.cts +42 -36
- package/dist/merchants.d.ts +42 -36
- package/dist/merchants.js.map +1 -1
- package/dist/payment-sessions.cjs.map +1 -1
- package/dist/payment-sessions.d.cts +24 -22
- package/dist/payment-sessions.d.ts +24 -22
- package/dist/payment-sessions.js.map +1 -1
- package/dist/refunds.cjs.map +1 -1
- package/dist/refunds.d.cts +55 -53
- package/dist/refunds.d.ts +55 -53
- package/dist/refunds.js.map +1 -1
- package/dist/storefronts.cjs.map +1 -1
- package/dist/storefronts.d.cts +31 -28
- package/dist/storefronts.d.ts +31 -28
- package/dist/storefronts.js.map +1 -1
- package/dist/subscriptions.cjs.map +1 -1
- package/dist/subscriptions.d.cts +49 -46
- package/dist/subscriptions.d.ts +49 -46
- package/dist/subscriptions.js.map +1 -1
- package/dist/transactions.cjs.map +1 -1
- package/dist/transactions.d.cts +14 -14
- package/dist/transactions.d.ts +14 -14
- package/dist/transactions.js.map +1 -1
- package/dist/webhooks.cjs.map +1 -1
- package/dist/webhooks.d.cts +33 -31
- package/dist/webhooks.d.ts +33 -31
- package/dist/webhooks.js.map +1 -1
- package/package.json +6 -1
- package/src/agents.ts +4 -2
- package/src/analytics.ts +275 -0
- package/src/api-keys.ts +4 -2
- package/src/common.ts +2 -1
- package/src/contact.ts +2 -1
- package/src/customers.ts +2 -1
- package/src/index.ts +1 -0
- package/src/invoices.ts +2 -1
- package/src/merchants.ts +12 -6
- package/src/notifications.ts +2 -1
- package/src/payment-sessions.ts +4 -2
- package/src/refunds.ts +4 -2
- package/src/storefronts.ts +6 -3
- package/src/subscriptions.ts +6 -3
- package/src/webhooks.ts +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
export { ArcEnvironment, EvmAddress, EvmTxHash, Id, IsoTimestamp, MerchantTier, Metadata, Mode, PaginationInput, PaymentCurrency, TokenAmount, TokenSymbol, arcEnvironmentSchema, countryCodeSchema, emailSchema, evmAddressSchema, evmTxHashSchema, httpUrlSchema, httpsUrlSchema, idSchema, isoTimestampSchema, makePaginatedSchema, merchantTierSchema, metadataSchema, modeSchema, paginationInputSchema, paymentCurrencySchema, tokenAmountSchema, tokenSymbolSchema, uintSchema } from './common.cjs';
|
|
2
|
-
export { ChangeTierInput, CreateMerchantInput, DEFAULT_MERCHANT_EMAIL_PREFS, InviteMemberInput, LoginInput, LoginOutput, Merchant, MerchantBalanceView, MerchantEmailPrefs, MerchantMember, MerchantPublicBrand, MerchantRole, MerchantStatus, OnboardMerchantInput, UpdateMerchantInput, changeTierInputSchema, createMerchantInputSchema, inviteMemberInputSchema, loginInputSchema, loginOutputSchema, merchantBalanceSchema, merchantEmailPrefsSchema, merchantMemberSchema, merchantPublicBrandSchema, merchantRoleSchema, merchantSchema, merchantStatusSchema, onboardMerchantInputSchema, updateMerchantInputSchema } from './merchants.cjs';
|
|
3
|
-
export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput, RotateApiKeyInput, apiKeyKindSchema, apiKeySchema, apiKeyScopeSchema, createApiKeyInputSchema, createApiKeyOutputSchema, rotateApiKeyInputSchema } from './api-keys.cjs';
|
|
4
|
-
export { Customer, UpsertCustomerInput, customerSchema, upsertCustomerInputSchema } from './customers.cjs';
|
|
5
|
-
export { CreatePaymentSessionInput, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, callbackUrlSchema, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.cjs';
|
|
1
|
+
export { ArcEnvironment, EvmAddress, EvmTxHash, Id, IsoTimestamp, MerchantTier, Metadata, Mode, PaginationInput, PaginationParsed, PaymentCurrency, TokenAmount, TokenSymbol, arcEnvironmentSchema, countryCodeSchema, emailSchema, evmAddressSchema, evmTxHashSchema, httpUrlSchema, httpsUrlSchema, idSchema, isoTimestampSchema, makePaginatedSchema, merchantTierSchema, metadataSchema, modeSchema, paginationInputSchema, paymentCurrencySchema, tokenAmountSchema, tokenSymbolSchema, uintSchema } from './common.cjs';
|
|
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.cjs';
|
|
3
|
+
export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput, CreateApiKeyParsed, RotateApiKeyInput, RotateApiKeyParsed, apiKeyKindSchema, apiKeySchema, apiKeyScopeSchema, createApiKeyInputSchema, createApiKeyOutputSchema, rotateApiKeyInputSchema } from './api-keys.cjs';
|
|
4
|
+
export { Customer, UpsertCustomerInput, UpsertCustomerParsed, customerSchema, upsertCustomerInputSchema } from './customers.cjs';
|
|
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, CreateSubscriptionInput, CreateSubscriptionPlanInput, 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';
|
|
8
|
-
export { CreateRefundInput, Refund, RefundCreateOutput, RefundReason, RefundSigningInstructions, RefundStatus, SubmitRefundSignatureInput, createRefundInputSchema, refundCreateOutputSchema, refundReasonSchema, refundSchema, refundSigningInstructionsSchema, refundStatusSchema, submitRefundSignatureInputSchema } from './refunds.cjs';
|
|
9
|
-
export { CreateWebhookEndpointInput, CreateWebhookEndpointOutput, ReplayDeliveryInput, WebhookDelivery, WebhookDeliveryDetail, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointStatus, WebhookEventName, createWebhookEndpointInputSchema, createWebhookEndpointOutputSchema, replayDeliveryInputSchema, webhookDeliveryDetailSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEndpointSchema, webhookEndpointStatusSchema, webhookEventNameSchema } from './webhooks.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';
|
|
8
|
+
export { CreateRefundInput, CreateRefundParsed, Refund, RefundCreateOutput, RefundReason, RefundSigningInstructions, RefundStatus, SubmitRefundSignatureInput, SubmitRefundSignatureParsed, createRefundInputSchema, refundCreateOutputSchema, refundReasonSchema, refundSchema, refundSigningInstructionsSchema, refundStatusSchema, submitRefundSignatureInputSchema } from './refunds.cjs';
|
|
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
|
-
export { AgentActionOutcome, AgentActionType, AgentActivityLog, AgentCapability, AgentIdentity, AgentJob, AgentJobStatus, AgentMerchantConfig, CreateAgentJobInput, UpdateAgentConfigInput, agentActionOutcomeSchema, agentActionTypeSchema, agentActivityLogSchema, agentCapabilitySchema, agentIdentitySchema, agentJobSchema, agentJobStatusSchema, agentMerchantConfigSchema, createAgentJobInputSchema, updateAgentConfigInputSchema } from './agents.cjs';
|
|
12
|
-
export { CreateStorefrontInput, CreateStorefrontProductInput, Storefront, StorefrontCheckoutInput, StorefrontCheckoutResponse, StorefrontProduct, StorefrontProductType, StorefrontStatus, createStorefrontInputSchema, createStorefrontProductInputSchema, storefrontCheckoutInputSchema, storefrontCheckoutResponseSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema } from './storefronts.cjs';
|
|
13
|
-
export { CreateInvoiceInput, Invoice, InvoiceLineItem, InvoiceStatus, createInvoiceInputSchema, invoiceLineItemSchema, invoiceSchema, invoiceStatusSchema } from './invoices.cjs';
|
|
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
|
+
export { CreateStorefrontInput, CreateStorefrontParsed, CreateStorefrontProductInput, CreateStorefrontProductParsed, Storefront, StorefrontCheckoutInput, StorefrontCheckoutParsed, StorefrontCheckoutResponse, StorefrontProduct, StorefrontProductType, StorefrontStatus, createStorefrontInputSchema, createStorefrontProductInputSchema, storefrontCheckoutInputSchema, storefrontCheckoutResponseSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema } from './storefronts.cjs';
|
|
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,18 +128,19 @@ 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
|
}>;
|
|
141
|
-
type ContactRequestInput = z.
|
|
142
|
+
type ContactRequestInput = z.input<typeof contactRequestInputSchema>;
|
|
143
|
+
type ContactRequestParsed = z.output<typeof contactRequestInputSchema>;
|
|
142
144
|
declare const contactRequestOutputSchema: z.ZodObject<{
|
|
143
145
|
ok: z.ZodLiteral<true>;
|
|
144
146
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -189,7 +191,8 @@ declare const createBroadcastInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
189
191
|
merchantId?: string | undefined;
|
|
190
192
|
audience?: "merchant" | "all" | undefined;
|
|
191
193
|
}>;
|
|
192
|
-
type CreateBroadcastInput = z.
|
|
194
|
+
type CreateBroadcastInput = z.input<typeof createBroadcastInputSchema>;
|
|
195
|
+
type CreateBroadcastParsed = z.output<typeof createBroadcastInputSchema>;
|
|
193
196
|
declare const broadcastSchema: z.ZodObject<{
|
|
194
197
|
id: z.ZodString;
|
|
195
198
|
title: z.ZodString;
|
|
@@ -202,8 +205,8 @@ declare const broadcastSchema: z.ZodObject<{
|
|
|
202
205
|
emailedAt: z.ZodNullable<z.ZodString>;
|
|
203
206
|
createdAt: z.ZodString;
|
|
204
207
|
}, "strip", z.ZodTypeAny, {
|
|
205
|
-
id: string;
|
|
206
208
|
merchantId: string | null;
|
|
209
|
+
id: string;
|
|
207
210
|
createdAt: string;
|
|
208
211
|
title: string;
|
|
209
212
|
body: string;
|
|
@@ -213,8 +216,8 @@ declare const broadcastSchema: z.ZodObject<{
|
|
|
213
216
|
senderEmail: string;
|
|
214
217
|
emailedAt: string | null;
|
|
215
218
|
}, {
|
|
216
|
-
id: string;
|
|
217
219
|
merchantId: string | null;
|
|
220
|
+
id: string;
|
|
218
221
|
createdAt: string;
|
|
219
222
|
title: string;
|
|
220
223
|
body: string;
|
|
@@ -238,8 +241,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
238
241
|
emailedAt: z.ZodNullable<z.ZodString>;
|
|
239
242
|
createdAt: z.ZodString;
|
|
240
243
|
}, "strip", z.ZodTypeAny, {
|
|
241
|
-
id: string;
|
|
242
244
|
merchantId: string | null;
|
|
245
|
+
id: string;
|
|
243
246
|
createdAt: string;
|
|
244
247
|
title: string;
|
|
245
248
|
body: string;
|
|
@@ -249,8 +252,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
249
252
|
senderEmail: string;
|
|
250
253
|
emailedAt: string | null;
|
|
251
254
|
}, {
|
|
252
|
-
id: string;
|
|
253
255
|
merchantId: string | null;
|
|
256
|
+
id: string;
|
|
254
257
|
createdAt: string;
|
|
255
258
|
title: string;
|
|
256
259
|
body: string;
|
|
@@ -262,8 +265,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
262
265
|
}>, "many">;
|
|
263
266
|
}, "strip", z.ZodTypeAny, {
|
|
264
267
|
data: {
|
|
265
|
-
id: string;
|
|
266
268
|
merchantId: string | null;
|
|
269
|
+
id: string;
|
|
267
270
|
createdAt: string;
|
|
268
271
|
title: string;
|
|
269
272
|
body: string;
|
|
@@ -275,8 +278,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
275
278
|
}[];
|
|
276
279
|
}, {
|
|
277
280
|
data: {
|
|
278
|
-
id: string;
|
|
279
281
|
merchantId: string | null;
|
|
282
|
+
id: string;
|
|
280
283
|
createdAt: string;
|
|
281
284
|
title: string;
|
|
282
285
|
body: string;
|
|
@@ -395,4 +398,4 @@ declare const markNotificationsReadResponseSchema: z.ZodObject<{
|
|
|
395
398
|
}>;
|
|
396
399
|
type MarkNotificationsReadResponse = z.infer<typeof markNotificationsReadResponseSchema>;
|
|
397
400
|
|
|
398
|
-
export { type Broadcast, type BroadcastAudience, type BroadcastListResponse, type ContactRequestInput, type ContactRequestOutput, type ContactTopic, type CreateBroadcastInput, type MarkNotificationsReadResponse, type NotificationKind, type NotificationListResponse, type NotificationView, type TokenCapabilities, type TokenMetadata, type TokenPermitNonce, broadcastAudienceSchema, broadcastListResponseSchema, broadcastSchema, contactRequestInputSchema, contactRequestOutputSchema, contactTopicSchema, createBroadcastInputSchema, markNotificationsReadResponseSchema, notificationKindSchema, notificationListResponseSchema, notificationSchema, tokenCapabilitiesSchema, tokenMetadataSchema, tokenPermitNonceSchema };
|
|
401
|
+
export { type Broadcast, type BroadcastAudience, type BroadcastListResponse, type ContactRequestInput, type ContactRequestOutput, type ContactRequestParsed, type ContactTopic, type CreateBroadcastInput, type CreateBroadcastParsed, type MarkNotificationsReadResponse, type NotificationKind, type NotificationListResponse, type NotificationView, type TokenCapabilities, type TokenMetadata, type TokenPermitNonce, broadcastAudienceSchema, broadcastListResponseSchema, broadcastSchema, contactRequestInputSchema, contactRequestOutputSchema, contactTopicSchema, createBroadcastInputSchema, markNotificationsReadResponseSchema, notificationKindSchema, notificationListResponseSchema, notificationSchema, tokenCapabilitiesSchema, tokenMetadataSchema, tokenPermitNonceSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
export { ArcEnvironment, EvmAddress, EvmTxHash, Id, IsoTimestamp, MerchantTier, Metadata, Mode, PaginationInput, PaymentCurrency, TokenAmount, TokenSymbol, arcEnvironmentSchema, countryCodeSchema, emailSchema, evmAddressSchema, evmTxHashSchema, httpUrlSchema, httpsUrlSchema, idSchema, isoTimestampSchema, makePaginatedSchema, merchantTierSchema, metadataSchema, modeSchema, paginationInputSchema, paymentCurrencySchema, tokenAmountSchema, tokenSymbolSchema, uintSchema } from './common.js';
|
|
2
|
-
export { ChangeTierInput, CreateMerchantInput, DEFAULT_MERCHANT_EMAIL_PREFS, InviteMemberInput, LoginInput, LoginOutput, Merchant, MerchantBalanceView, MerchantEmailPrefs, MerchantMember, MerchantPublicBrand, MerchantRole, MerchantStatus, OnboardMerchantInput, UpdateMerchantInput, changeTierInputSchema, createMerchantInputSchema, inviteMemberInputSchema, loginInputSchema, loginOutputSchema, merchantBalanceSchema, merchantEmailPrefsSchema, merchantMemberSchema, merchantPublicBrandSchema, merchantRoleSchema, merchantSchema, merchantStatusSchema, onboardMerchantInputSchema, updateMerchantInputSchema } from './merchants.js';
|
|
3
|
-
export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput, RotateApiKeyInput, apiKeyKindSchema, apiKeySchema, apiKeyScopeSchema, createApiKeyInputSchema, createApiKeyOutputSchema, rotateApiKeyInputSchema } from './api-keys.js';
|
|
4
|
-
export { Customer, UpsertCustomerInput, customerSchema, upsertCustomerInputSchema } from './customers.js';
|
|
5
|
-
export { CreatePaymentSessionInput, PaymentSession, PaymentSessionStatus, SubmitPaymentSessionInput, callbackUrlSchema, createPaymentSessionInputSchema, paymentSessionSchema, paymentSessionStatusSchema, submitPaymentSessionInputSchema } from './payment-sessions.js';
|
|
1
|
+
export { ArcEnvironment, EvmAddress, EvmTxHash, Id, IsoTimestamp, MerchantTier, Metadata, Mode, PaginationInput, PaginationParsed, PaymentCurrency, TokenAmount, TokenSymbol, arcEnvironmentSchema, countryCodeSchema, emailSchema, evmAddressSchema, evmTxHashSchema, httpUrlSchema, httpsUrlSchema, idSchema, isoTimestampSchema, makePaginatedSchema, merchantTierSchema, metadataSchema, modeSchema, paginationInputSchema, paymentCurrencySchema, tokenAmountSchema, tokenSymbolSchema, uintSchema } from './common.js';
|
|
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
|
+
export { ApiKey, ApiKeyKind, ApiKeyScope, CreateApiKeyInput, CreateApiKeyOutput, CreateApiKeyParsed, RotateApiKeyInput, RotateApiKeyParsed, apiKeyKindSchema, apiKeySchema, apiKeyScopeSchema, createApiKeyInputSchema, createApiKeyOutputSchema, rotateApiKeyInputSchema } from './api-keys.js';
|
|
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';
|
|
6
6
|
export { Transaction, TransactionKind, TransactionStatus, transactionKindSchema, transactionSchema, transactionStatusSchema } from './transactions.js';
|
|
7
|
-
export { CancelSubscriptionInput, CreateSubscriptionInput, CreateSubscriptionPlanInput, 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';
|
|
8
|
-
export { CreateRefundInput, Refund, RefundCreateOutput, RefundReason, RefundSigningInstructions, RefundStatus, SubmitRefundSignatureInput, createRefundInputSchema, refundCreateOutputSchema, refundReasonSchema, refundSchema, refundSigningInstructionsSchema, refundStatusSchema, submitRefundSignatureInputSchema } from './refunds.js';
|
|
9
|
-
export { CreateWebhookEndpointInput, CreateWebhookEndpointOutput, ReplayDeliveryInput, WebhookDelivery, WebhookDeliveryDetail, WebhookDeliveryStatus, WebhookEndpoint, WebhookEndpointStatus, WebhookEventName, createWebhookEndpointInputSchema, createWebhookEndpointOutputSchema, replayDeliveryInputSchema, webhookDeliveryDetailSchema, webhookDeliverySchema, webhookDeliveryStatusSchema, webhookEndpointSchema, webhookEndpointStatusSchema, webhookEventNameSchema } from './webhooks.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';
|
|
8
|
+
export { CreateRefundInput, CreateRefundParsed, Refund, RefundCreateOutput, RefundReason, RefundSigningInstructions, RefundStatus, SubmitRefundSignatureInput, SubmitRefundSignatureParsed, createRefundInputSchema, refundCreateOutputSchema, refundReasonSchema, refundSchema, refundSigningInstructionsSchema, refundStatusSchema, submitRefundSignatureInputSchema } from './refunds.js';
|
|
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
|
-
export { AgentActionOutcome, AgentActionType, AgentActivityLog, AgentCapability, AgentIdentity, AgentJob, AgentJobStatus, AgentMerchantConfig, CreateAgentJobInput, UpdateAgentConfigInput, agentActionOutcomeSchema, agentActionTypeSchema, agentActivityLogSchema, agentCapabilitySchema, agentIdentitySchema, agentJobSchema, agentJobStatusSchema, agentMerchantConfigSchema, createAgentJobInputSchema, updateAgentConfigInputSchema } from './agents.js';
|
|
12
|
-
export { CreateStorefrontInput, CreateStorefrontProductInput, Storefront, StorefrontCheckoutInput, StorefrontCheckoutResponse, StorefrontProduct, StorefrontProductType, StorefrontStatus, createStorefrontInputSchema, createStorefrontProductInputSchema, storefrontCheckoutInputSchema, storefrontCheckoutResponseSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema } from './storefronts.js';
|
|
13
|
-
export { CreateInvoiceInput, Invoice, InvoiceLineItem, InvoiceStatus, createInvoiceInputSchema, invoiceLineItemSchema, invoiceSchema, invoiceStatusSchema } from './invoices.js';
|
|
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
|
+
export { CreateStorefrontInput, CreateStorefrontParsed, CreateStorefrontProductInput, CreateStorefrontProductParsed, Storefront, StorefrontCheckoutInput, StorefrontCheckoutParsed, StorefrontCheckoutResponse, StorefrontProduct, StorefrontProductType, StorefrontStatus, createStorefrontInputSchema, createStorefrontProductInputSchema, storefrontCheckoutInputSchema, storefrontCheckoutResponseSchema, storefrontProductSchema, storefrontProductTypeSchema, storefrontSchema, storefrontStatusSchema } from './storefronts.js';
|
|
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,18 +128,19 @@ 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
|
}>;
|
|
141
|
-
type ContactRequestInput = z.
|
|
142
|
+
type ContactRequestInput = z.input<typeof contactRequestInputSchema>;
|
|
143
|
+
type ContactRequestParsed = z.output<typeof contactRequestInputSchema>;
|
|
142
144
|
declare const contactRequestOutputSchema: z.ZodObject<{
|
|
143
145
|
ok: z.ZodLiteral<true>;
|
|
144
146
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -189,7 +191,8 @@ declare const createBroadcastInputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
189
191
|
merchantId?: string | undefined;
|
|
190
192
|
audience?: "merchant" | "all" | undefined;
|
|
191
193
|
}>;
|
|
192
|
-
type CreateBroadcastInput = z.
|
|
194
|
+
type CreateBroadcastInput = z.input<typeof createBroadcastInputSchema>;
|
|
195
|
+
type CreateBroadcastParsed = z.output<typeof createBroadcastInputSchema>;
|
|
193
196
|
declare const broadcastSchema: z.ZodObject<{
|
|
194
197
|
id: z.ZodString;
|
|
195
198
|
title: z.ZodString;
|
|
@@ -202,8 +205,8 @@ declare const broadcastSchema: z.ZodObject<{
|
|
|
202
205
|
emailedAt: z.ZodNullable<z.ZodString>;
|
|
203
206
|
createdAt: z.ZodString;
|
|
204
207
|
}, "strip", z.ZodTypeAny, {
|
|
205
|
-
id: string;
|
|
206
208
|
merchantId: string | null;
|
|
209
|
+
id: string;
|
|
207
210
|
createdAt: string;
|
|
208
211
|
title: string;
|
|
209
212
|
body: string;
|
|
@@ -213,8 +216,8 @@ declare const broadcastSchema: z.ZodObject<{
|
|
|
213
216
|
senderEmail: string;
|
|
214
217
|
emailedAt: string | null;
|
|
215
218
|
}, {
|
|
216
|
-
id: string;
|
|
217
219
|
merchantId: string | null;
|
|
220
|
+
id: string;
|
|
218
221
|
createdAt: string;
|
|
219
222
|
title: string;
|
|
220
223
|
body: string;
|
|
@@ -238,8 +241,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
238
241
|
emailedAt: z.ZodNullable<z.ZodString>;
|
|
239
242
|
createdAt: z.ZodString;
|
|
240
243
|
}, "strip", z.ZodTypeAny, {
|
|
241
|
-
id: string;
|
|
242
244
|
merchantId: string | null;
|
|
245
|
+
id: string;
|
|
243
246
|
createdAt: string;
|
|
244
247
|
title: string;
|
|
245
248
|
body: string;
|
|
@@ -249,8 +252,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
249
252
|
senderEmail: string;
|
|
250
253
|
emailedAt: string | null;
|
|
251
254
|
}, {
|
|
252
|
-
id: string;
|
|
253
255
|
merchantId: string | null;
|
|
256
|
+
id: string;
|
|
254
257
|
createdAt: string;
|
|
255
258
|
title: string;
|
|
256
259
|
body: string;
|
|
@@ -262,8 +265,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
262
265
|
}>, "many">;
|
|
263
266
|
}, "strip", z.ZodTypeAny, {
|
|
264
267
|
data: {
|
|
265
|
-
id: string;
|
|
266
268
|
merchantId: string | null;
|
|
269
|
+
id: string;
|
|
267
270
|
createdAt: string;
|
|
268
271
|
title: string;
|
|
269
272
|
body: string;
|
|
@@ -275,8 +278,8 @@ declare const broadcastListResponseSchema: z.ZodObject<{
|
|
|
275
278
|
}[];
|
|
276
279
|
}, {
|
|
277
280
|
data: {
|
|
278
|
-
id: string;
|
|
279
281
|
merchantId: string | null;
|
|
282
|
+
id: string;
|
|
280
283
|
createdAt: string;
|
|
281
284
|
title: string;
|
|
282
285
|
body: string;
|
|
@@ -395,4 +398,4 @@ declare const markNotificationsReadResponseSchema: z.ZodObject<{
|
|
|
395
398
|
}>;
|
|
396
399
|
type MarkNotificationsReadResponse = z.infer<typeof markNotificationsReadResponseSchema>;
|
|
397
400
|
|
|
398
|
-
export { type Broadcast, type BroadcastAudience, type BroadcastListResponse, type ContactRequestInput, type ContactRequestOutput, type ContactTopic, type CreateBroadcastInput, type MarkNotificationsReadResponse, type NotificationKind, type NotificationListResponse, type NotificationView, type TokenCapabilities, type TokenMetadata, type TokenPermitNonce, broadcastAudienceSchema, broadcastListResponseSchema, broadcastSchema, contactRequestInputSchema, contactRequestOutputSchema, contactTopicSchema, createBroadcastInputSchema, markNotificationsReadResponseSchema, notificationKindSchema, notificationListResponseSchema, notificationSchema, tokenCapabilitiesSchema, tokenMetadataSchema, tokenPermitNonceSchema };
|
|
401
|
+
export { type Broadcast, type BroadcastAudience, type BroadcastListResponse, type ContactRequestInput, type ContactRequestOutput, type ContactRequestParsed, type ContactTopic, type CreateBroadcastInput, type CreateBroadcastParsed, type MarkNotificationsReadResponse, type NotificationKind, type NotificationListResponse, type NotificationView, type TokenCapabilities, type TokenMetadata, type TokenPermitNonce, broadcastAudienceSchema, broadcastListResponseSchema, broadcastSchema, contactRequestInputSchema, contactRequestOutputSchema, contactTopicSchema, createBroadcastInputSchema, markNotificationsReadResponseSchema, notificationKindSchema, notificationListResponseSchema, notificationSchema, tokenCapabilitiesSchema, tokenMetadataSchema, tokenPermitNonceSchema };
|
package/dist/index.js
CHANGED
|
@@ -1045,7 +1045,196 @@ var notificationListResponseSchema = z.object({
|
|
|
1045
1045
|
var markNotificationsReadResponseSchema = z.object({
|
|
1046
1046
|
lastReadAt: isoTimestampSchema
|
|
1047
1047
|
});
|
|
1048
|
+
var paymentCurrencies = paymentCurrencySchema.options;
|
|
1049
|
+
var currencyAmountsShape = {
|
|
1050
|
+
USDC: tokenAmountSchema,
|
|
1051
|
+
EURC: tokenAmountSchema
|
|
1052
|
+
};
|
|
1053
|
+
var currencyAmountsSchema = z.object(currencyAmountsShape).strict();
|
|
1054
|
+
function countsByStatusSchema(statuses) {
|
|
1055
|
+
const shape = Object.fromEntries(statuses.options.map((s) => [s, uintSchema]));
|
|
1056
|
+
return z.object(shape).strict();
|
|
1057
|
+
}
|
|
1058
|
+
var moneySchema = z.object({
|
|
1059
|
+
count: uintSchema,
|
|
1060
|
+
amount: currencyAmountsSchema
|
|
1061
|
+
});
|
|
1062
|
+
var volumeWindowSchema = z.object({
|
|
1063
|
+
count: uintSchema,
|
|
1064
|
+
gross: currencyAmountsSchema,
|
|
1065
|
+
fees: currencyAmountsSchema,
|
|
1066
|
+
net: currencyAmountsSchema
|
|
1067
|
+
});
|
|
1068
|
+
var statsSummarySchema = z.object({
|
|
1069
|
+
mode: modeSchema,
|
|
1070
|
+
generatedAt: isoTimestampSchema,
|
|
1071
|
+
volume: z.object({
|
|
1072
|
+
last7d: volumeWindowSchema,
|
|
1073
|
+
last30d: volumeWindowSchema,
|
|
1074
|
+
allTime: volumeWindowSchema
|
|
1075
|
+
}),
|
|
1076
|
+
paymentSessions: z.object({
|
|
1077
|
+
total: uintSchema,
|
|
1078
|
+
byStatus: countsByStatusSchema(paymentSessionStatusSchema),
|
|
1079
|
+
confirmed: moneySchema
|
|
1080
|
+
}),
|
|
1081
|
+
invoices: z.object({
|
|
1082
|
+
byStatus: countsByStatusSchema(invoiceStatusSchema),
|
|
1083
|
+
outstanding: moneySchema,
|
|
1084
|
+
overdue: moneySchema,
|
|
1085
|
+
paidLast30d: moneySchema
|
|
1086
|
+
}),
|
|
1087
|
+
refunds: z.object({
|
|
1088
|
+
byStatus: countsByStatusSchema(refundStatusSchema),
|
|
1089
|
+
completed: moneySchema
|
|
1090
|
+
}),
|
|
1091
|
+
subscriptions: z.object({
|
|
1092
|
+
total: uintSchema,
|
|
1093
|
+
byStatus: countsByStatusSchema(subscriptionStatusSchema)
|
|
1094
|
+
}),
|
|
1095
|
+
customers: z.object({
|
|
1096
|
+
total: uintSchema
|
|
1097
|
+
})
|
|
1098
|
+
});
|
|
1099
|
+
var STATS_VOLUME_MAX_DAYS = 366;
|
|
1100
|
+
var STATS_VOLUME_DEFAULT_DAYS = 30;
|
|
1101
|
+
function resolveStatsVolumeRange(query, now = Date.now()) {
|
|
1102
|
+
const to = query.to ? new Date(query.to) : new Date(now);
|
|
1103
|
+
const from = query.from ? new Date(query.from) : new Date(to.getTime() - STATS_VOLUME_DEFAULT_DAYS * 864e5);
|
|
1104
|
+
return { from, to };
|
|
1105
|
+
}
|
|
1106
|
+
var statsVolumeQuerySchema = z.object({
|
|
1107
|
+
from: isoTimestampSchema.optional(),
|
|
1108
|
+
to: isoTimestampSchema.optional()
|
|
1109
|
+
}).strict().superRefine((q, ctx) => {
|
|
1110
|
+
const { from, to } = resolveStatsVolumeRange(q);
|
|
1111
|
+
if (from.getTime() > to.getTime()) {
|
|
1112
|
+
ctx.addIssue({
|
|
1113
|
+
code: z.ZodIssueCode.custom,
|
|
1114
|
+
message: "from must not be after to",
|
|
1115
|
+
path: ["from"]
|
|
1116
|
+
});
|
|
1117
|
+
} else if (to.getTime() - from.getTime() > STATS_VOLUME_MAX_DAYS * 864e5) {
|
|
1118
|
+
ctx.addIssue({
|
|
1119
|
+
code: z.ZodIssueCode.custom,
|
|
1120
|
+
message: `from and to must be at most ${STATS_VOLUME_MAX_DAYS} days apart`,
|
|
1121
|
+
path: ["to"]
|
|
1122
|
+
});
|
|
1123
|
+
}
|
|
1124
|
+
});
|
|
1125
|
+
var dayKeySchema = z.string().regex(/^\d{4}-\d{2}-\d{2}$/, "must be a YYYY-MM-DD day");
|
|
1126
|
+
var statsVolumeDaySchema = z.object({
|
|
1127
|
+
day: dayKeySchema,
|
|
1128
|
+
currency: paymentCurrencySchema,
|
|
1129
|
+
count: uintSchema,
|
|
1130
|
+
gross: tokenAmountSchema,
|
|
1131
|
+
fees: tokenAmountSchema,
|
|
1132
|
+
net: tokenAmountSchema
|
|
1133
|
+
});
|
|
1134
|
+
var statsVolumeSchema = z.object({
|
|
1135
|
+
from: isoTimestampSchema,
|
|
1136
|
+
to: isoTimestampSchema,
|
|
1137
|
+
data: z.array(statsVolumeDaySchema)
|
|
1138
|
+
});
|
|
1139
|
+
var statsMrrSchema = z.object({
|
|
1140
|
+
mrr: currencyAmountsSchema,
|
|
1141
|
+
activeSubscribers: uintSchema
|
|
1142
|
+
});
|
|
1143
|
+
var statsLtvQuerySchema = z.object({
|
|
1144
|
+
currency: paymentCurrencySchema,
|
|
1145
|
+
limit: z.coerce.number().int().min(1).max(100).default(25),
|
|
1146
|
+
cursor: z.string().min(1).max(200).optional()
|
|
1147
|
+
}).strict();
|
|
1148
|
+
var statsLtvRowSchema = z.object({
|
|
1149
|
+
customerId: idSchema,
|
|
1150
|
+
totalSpend: tokenAmountSchema,
|
|
1151
|
+
transactionCount: uintSchema
|
|
1152
|
+
});
|
|
1153
|
+
var statsLtvSchema = z.object({
|
|
1154
|
+
currency: paymentCurrencySchema,
|
|
1155
|
+
data: z.array(statsLtvRowSchema),
|
|
1156
|
+
nextCursor: z.string().nullable(),
|
|
1157
|
+
hasMore: z.boolean()
|
|
1158
|
+
});
|
|
1159
|
+
var forecastConfidenceSchema = z.enum(["low", "medium", "high"]);
|
|
1160
|
+
var forecastSchema = z.object({
|
|
1161
|
+
confidence: forecastConfidenceSchema,
|
|
1162
|
+
last90DayRevenue: tokenAmountSchema,
|
|
1163
|
+
next30: tokenAmountSchema,
|
|
1164
|
+
next60: tokenAmountSchema,
|
|
1165
|
+
next90: tokenAmountSchema
|
|
1166
|
+
});
|
|
1167
|
+
var forecastByCurrencyShape = {
|
|
1168
|
+
USDC: forecastSchema,
|
|
1169
|
+
EURC: forecastSchema
|
|
1170
|
+
};
|
|
1171
|
+
var statsForecastSchema = z.object({
|
|
1172
|
+
byCurrency: z.object(forecastByCurrencyShape).strict()
|
|
1173
|
+
});
|
|
1174
|
+
var adminStatsModeQuerySchema = z.object({
|
|
1175
|
+
mode: modeSchema.default("live")
|
|
1176
|
+
}).strict();
|
|
1177
|
+
var adminOverviewSchema = z.object({
|
|
1178
|
+
mode: modeSchema,
|
|
1179
|
+
merchants: z.object({
|
|
1180
|
+
total: uintSchema,
|
|
1181
|
+
byStatus: z.record(z.string(), uintSchema),
|
|
1182
|
+
last30dSignups: uintSchema
|
|
1183
|
+
}),
|
|
1184
|
+
volume: z.object({
|
|
1185
|
+
lifetime: currencyAmountsSchema,
|
|
1186
|
+
lifetimeFees: currencyAmountsSchema,
|
|
1187
|
+
last30d: currencyAmountsSchema,
|
|
1188
|
+
confirmedSessions: uintSchema
|
|
1189
|
+
}),
|
|
1190
|
+
subscriptions: z.object({
|
|
1191
|
+
active: uintSchema,
|
|
1192
|
+
mrr: currencyAmountsSchema
|
|
1193
|
+
})
|
|
1194
|
+
});
|
|
1195
|
+
var adminMerchantStatsSchema = z.object({
|
|
1196
|
+
mode: modeSchema,
|
|
1197
|
+
confirmedPayments: uintSchema,
|
|
1198
|
+
activeSubscriptions: uintSchema,
|
|
1199
|
+
lifetimeVolume: currencyAmountsSchema,
|
|
1200
|
+
last30dVolume: currencyAmountsSchema
|
|
1201
|
+
});
|
|
1202
|
+
var adminVolumeQuerySchema = z.object({
|
|
1203
|
+
from: isoTimestampSchema.optional(),
|
|
1204
|
+
to: isoTimestampSchema.optional(),
|
|
1205
|
+
mode: modeSchema.default("live")
|
|
1206
|
+
}).strict();
|
|
1207
|
+
var adminVolumeDaySchema = z.object({
|
|
1208
|
+
day: dayKeySchema,
|
|
1209
|
+
currency: paymentCurrencySchema,
|
|
1210
|
+
volume: tokenAmountSchema,
|
|
1211
|
+
fees: tokenAmountSchema,
|
|
1212
|
+
count: uintSchema
|
|
1213
|
+
});
|
|
1214
|
+
var adminVolumeSeriesSchema = z.object({
|
|
1215
|
+
mode: modeSchema,
|
|
1216
|
+
from: isoTimestampSchema,
|
|
1217
|
+
to: isoTimestampSchema,
|
|
1218
|
+
data: z.array(adminVolumeDaySchema)
|
|
1219
|
+
});
|
|
1220
|
+
var adminTopMerchantsQuerySchema = z.object({
|
|
1221
|
+
currency: paymentCurrencySchema,
|
|
1222
|
+
mode: modeSchema.default("live"),
|
|
1223
|
+
limit: z.coerce.number().int().min(1).max(50).default(10)
|
|
1224
|
+
}).strict();
|
|
1225
|
+
var adminTopMerchantSchema = z.object({
|
|
1226
|
+
merchantId: idSchema,
|
|
1227
|
+
businessName: z.string().nullable(),
|
|
1228
|
+
email: z.string(),
|
|
1229
|
+
volume: tokenAmountSchema,
|
|
1230
|
+
transactionCount: uintSchema
|
|
1231
|
+
});
|
|
1232
|
+
var adminTopMerchantsSchema = z.object({
|
|
1233
|
+
mode: modeSchema,
|
|
1234
|
+
currency: paymentCurrencySchema,
|
|
1235
|
+
data: z.array(adminTopMerchantSchema)
|
|
1236
|
+
});
|
|
1048
1237
|
|
|
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 };
|
|
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, createSubscriptionInputSchema, 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
1239
|
//# sourceMappingURL=index.js.map
|
|
1051
1240
|
//# sourceMappingURL=index.js.map
|