@klappay/types 2.0.3 → 3.0.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/index.d.mts CHANGED
@@ -32,9 +32,11 @@ type ErrorPayload = z.infer<typeof ErrorPayloadSchema>;
32
32
  declare const EnvironmentSchema: z.ZodEnum<["live", "test"]>;
33
33
  type Environment = z.infer<typeof EnvironmentSchema>;
34
34
 
35
- declare const ApiKeyScopeSchema: z.ZodEnum<["charges:read", "charges:write", "webhooks:read", "webhooks:write", "webhooks:manage_secret", "metrics:read", "metrics:charges:read", "metrics:transactions:read", "metrics:distributions:read", "sandbox:trigger"]>;
35
+ declare const ApiKeyScopeSchema: z.ZodEnum<["charges:read", "charges:write", "webhooks:read", "webhooks:write", "webhooks:manage_secret", "metrics:read", "metrics:charges:read", "metrics:transactions:read", "metrics:distributions:read", "sandbox:trigger", "charges:split_write", "recipients:read", "recipients:write", "recipients:manage_payout"]>;
36
36
  type ApiKeyScope = z.infer<typeof ApiKeyScopeSchema>;
37
- declare const API_KEY_SCOPES: ["charges:read", "charges:write", "webhooks:read", "webhooks:write", "webhooks:manage_secret", "metrics:read", "metrics:charges:read", "metrics:transactions:read", "metrics:distributions:read", "sandbox:trigger"];
37
+ declare const API_KEY_SCOPES: ["charges:read", "charges:write", "webhooks:read", "webhooks:write", "webhooks:manage_secret", "metrics:read", "metrics:charges:read", "metrics:transactions:read", "metrics:distributions:read", "sandbox:trigger", "charges:split_write", "recipients:read", "recipients:write", "recipients:manage_payout"];
38
+ declare const CONFLICTING_SCOPE_PAIRS: ReadonlyArray<readonly [ApiKeyScope, ApiKeyScope]>;
39
+ declare function findConflictingScopes(scopes: readonly ApiKeyScope[]): readonly [ApiKeyScope, ApiKeyScope] | null;
38
40
 
39
41
  declare const NetworkSchema: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
40
42
  type Network = z.infer<typeof NetworkSchema>;
@@ -112,6 +114,20 @@ declare const SplitRecipientSchema: z.ZodObject<{
112
114
  label?: string | undefined;
113
115
  }>;
114
116
  type SplitRecipient = z.infer<typeof SplitRecipientSchema>;
117
+ declare const SplitRecipientInputSchema: z.ZodObject<{
118
+ recipientId: z.ZodString;
119
+ percent: z.ZodNumber;
120
+ label: z.ZodOptional<z.ZodString>;
121
+ }, "strip", z.ZodTypeAny, {
122
+ percent: number;
123
+ recipientId: string;
124
+ label?: string | undefined;
125
+ }, {
126
+ percent: number;
127
+ recipientId: string;
128
+ label?: string | undefined;
129
+ }>;
130
+ type SplitRecipientInput = z.infer<typeof SplitRecipientInputSchema>;
115
131
  declare const CHARGE_AMOUNT_MAX = 999999999999;
116
132
  declare const CreateChargeSchema: z.ZodObject<{
117
133
  amount: z.ZodNumber;
@@ -223,24 +239,24 @@ declare const CreateChargeSchema: z.ZodObject<{
223
239
  }, z.ZodUnknown, "strip">>>;
224
240
  redirectUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
225
241
  splitRecipients: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
226
- address: z.ZodString;
242
+ recipientId: z.ZodString;
227
243
  percent: z.ZodNumber;
228
244
  label: z.ZodOptional<z.ZodString>;
229
245
  }, "strip", z.ZodTypeAny, {
230
- address: string;
231
246
  percent: number;
247
+ recipientId: string;
232
248
  label?: string | undefined;
233
249
  }, {
234
- address: string;
235
250
  percent: number;
251
+ recipientId: string;
236
252
  label?: string | undefined;
237
253
  }>, "many">, {
238
- address: string;
239
254
  percent: number;
255
+ recipientId: string;
240
256
  label?: string | undefined;
241
257
  }[], {
242
- address: string;
243
258
  percent: number;
259
+ recipientId: string;
244
260
  label?: string | undefined;
245
261
  }[]>>;
246
262
  }, "strip", z.ZodTypeAny, {
@@ -285,8 +301,8 @@ declare const CreateChargeSchema: z.ZodObject<{
285
301
  }, z.ZodUnknown, "strip"> | undefined;
286
302
  redirectUrl?: string | undefined;
287
303
  splitRecipients?: {
288
- address: string;
289
304
  percent: number;
305
+ recipientId: string;
290
306
  label?: string | undefined;
291
307
  }[] | undefined;
292
308
  }, {
@@ -331,8 +347,8 @@ declare const CreateChargeSchema: z.ZodObject<{
331
347
  }, z.ZodUnknown, "strip"> | undefined;
332
348
  redirectUrl?: string | undefined;
333
349
  splitRecipients?: {
334
- address: string;
335
350
  percent: number;
351
+ recipientId: string;
336
352
  label?: string | undefined;
337
353
  }[] | undefined;
338
354
  }>;
@@ -1054,6 +1070,135 @@ declare const GetChargeQrCodeQuerySchema: z.ZodObject<{
1054
1070
  type GetChargeQrCodeQuery = z.infer<typeof GetChargeQrCodeQuerySchema>;
1055
1071
  type GetChargeQrCodeQueryRequest = z.input<typeof GetChargeQrCodeQuerySchema>;
1056
1072
 
1073
+ declare const CHECKOUT_PRODUCTS_MAX = 20;
1074
+ declare const CheckoutProductSchema: z.ZodObject<{
1075
+ name: z.ZodString;
1076
+ quantity: z.ZodOptional<z.ZodNumber>;
1077
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1078
+ }, "strip", z.ZodTypeAny, {
1079
+ name: string;
1080
+ quantity?: number | undefined;
1081
+ imageUrl?: string | undefined;
1082
+ }, {
1083
+ name: string;
1084
+ quantity?: number | undefined;
1085
+ imageUrl?: string | undefined;
1086
+ }>;
1087
+ type CheckoutProduct = z.infer<typeof CheckoutProductSchema>;
1088
+ declare const KlappayCheckoutMetadataSchema: z.ZodObject<{
1089
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
1090
+ name: z.ZodString;
1091
+ quantity: z.ZodOptional<z.ZodNumber>;
1092
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1093
+ }, "strip", z.ZodTypeAny, {
1094
+ name: string;
1095
+ quantity?: number | undefined;
1096
+ imageUrl?: string | undefined;
1097
+ }, {
1098
+ name: string;
1099
+ quantity?: number | undefined;
1100
+ imageUrl?: string | undefined;
1101
+ }>, "many">>;
1102
+ }, "strip", z.ZodTypeAny, {
1103
+ products?: {
1104
+ name: string;
1105
+ quantity?: number | undefined;
1106
+ imageUrl?: string | undefined;
1107
+ }[] | undefined;
1108
+ }, {
1109
+ products?: {
1110
+ name: string;
1111
+ quantity?: number | undefined;
1112
+ imageUrl?: string | undefined;
1113
+ }[] | undefined;
1114
+ }>;
1115
+ type KlappayCheckoutMetadata = z.infer<typeof KlappayCheckoutMetadataSchema>;
1116
+ declare const MetadataWithKlappaySchema: z.ZodObject<{
1117
+ klappay: z.ZodOptional<z.ZodObject<{
1118
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
1119
+ name: z.ZodString;
1120
+ quantity: z.ZodOptional<z.ZodNumber>;
1121
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1122
+ }, "strip", z.ZodTypeAny, {
1123
+ name: string;
1124
+ quantity?: number | undefined;
1125
+ imageUrl?: string | undefined;
1126
+ }, {
1127
+ name: string;
1128
+ quantity?: number | undefined;
1129
+ imageUrl?: string | undefined;
1130
+ }>, "many">>;
1131
+ }, "strip", z.ZodTypeAny, {
1132
+ products?: {
1133
+ name: string;
1134
+ quantity?: number | undefined;
1135
+ imageUrl?: string | undefined;
1136
+ }[] | undefined;
1137
+ }, {
1138
+ products?: {
1139
+ name: string;
1140
+ quantity?: number | undefined;
1141
+ imageUrl?: string | undefined;
1142
+ }[] | undefined;
1143
+ }>>;
1144
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
1145
+ klappay: z.ZodOptional<z.ZodObject<{
1146
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
1147
+ name: z.ZodString;
1148
+ quantity: z.ZodOptional<z.ZodNumber>;
1149
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1150
+ }, "strip", z.ZodTypeAny, {
1151
+ name: string;
1152
+ quantity?: number | undefined;
1153
+ imageUrl?: string | undefined;
1154
+ }, {
1155
+ name: string;
1156
+ quantity?: number | undefined;
1157
+ imageUrl?: string | undefined;
1158
+ }>, "many">>;
1159
+ }, "strip", z.ZodTypeAny, {
1160
+ products?: {
1161
+ name: string;
1162
+ quantity?: number | undefined;
1163
+ imageUrl?: string | undefined;
1164
+ }[] | undefined;
1165
+ }, {
1166
+ products?: {
1167
+ name: string;
1168
+ quantity?: number | undefined;
1169
+ imageUrl?: string | undefined;
1170
+ }[] | undefined;
1171
+ }>>;
1172
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
1173
+ klappay: z.ZodOptional<z.ZodObject<{
1174
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
1175
+ name: z.ZodString;
1176
+ quantity: z.ZodOptional<z.ZodNumber>;
1177
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1178
+ }, "strip", z.ZodTypeAny, {
1179
+ name: string;
1180
+ quantity?: number | undefined;
1181
+ imageUrl?: string | undefined;
1182
+ }, {
1183
+ name: string;
1184
+ quantity?: number | undefined;
1185
+ imageUrl?: string | undefined;
1186
+ }>, "many">>;
1187
+ }, "strip", z.ZodTypeAny, {
1188
+ products?: {
1189
+ name: string;
1190
+ quantity?: number | undefined;
1191
+ imageUrl?: string | undefined;
1192
+ }[] | undefined;
1193
+ }, {
1194
+ products?: {
1195
+ name: string;
1196
+ quantity?: number | undefined;
1197
+ imageUrl?: string | undefined;
1198
+ }[] | undefined;
1199
+ }>>;
1200
+ }, z.ZodUnknown, "strip">>;
1201
+
1057
1202
  declare const SplitDistributionStatusSchema: z.ZodEnum<["pending", "processing", "completed", "failed"]>;
1058
1203
  type SplitDistributionStatus = z.infer<typeof SplitDistributionStatusSchema>;
1059
1204
  declare const PendingDistributionRecipientSchema: z.ZodObject<{
@@ -2217,6 +2362,50 @@ declare const PaginatedWebhookDeliveriesSchema: z.ZodObject<{
2217
2362
  }>;
2218
2363
  type PaginatedWebhookDeliveries = z.infer<typeof PaginatedWebhookDeliveriesSchema>;
2219
2364
 
2365
+ declare const CreateRecipientSchema: z.ZodObject<{
2366
+ address: z.ZodString;
2367
+ label: z.ZodOptional<z.ZodString>;
2368
+ }, "strip", z.ZodTypeAny, {
2369
+ address: string;
2370
+ label?: string | undefined;
2371
+ }, {
2372
+ address: string;
2373
+ label?: string | undefined;
2374
+ }>;
2375
+ type CreateRecipientInput = z.infer<typeof CreateRecipientSchema>;
2376
+ type CreateRecipientRequest = z.input<typeof CreateRecipientSchema>;
2377
+ declare const RecipientSchema: z.ZodObject<{
2378
+ id: z.ZodString;
2379
+ environment: z.ZodEnum<["live", "test"]>;
2380
+ address: z.ZodString;
2381
+ label: z.ZodNullable<z.ZodString>;
2382
+ payout: z.ZodBoolean;
2383
+ createdAt: z.ZodString;
2384
+ }, "strip", z.ZodTypeAny, {
2385
+ address: string;
2386
+ label: string | null;
2387
+ id: string;
2388
+ environment: "live" | "test";
2389
+ createdAt: string;
2390
+ payout: boolean;
2391
+ }, {
2392
+ address: string;
2393
+ label: string | null;
2394
+ id: string;
2395
+ environment: "live" | "test";
2396
+ createdAt: string;
2397
+ payout: boolean;
2398
+ }>;
2399
+ type Recipient = z.infer<typeof RecipientSchema>;
2400
+ declare const SetRecipientPayoutSchema: z.ZodObject<{
2401
+ payout: z.ZodBoolean;
2402
+ }, "strip", z.ZodTypeAny, {
2403
+ payout: boolean;
2404
+ }, {
2405
+ payout: boolean;
2406
+ }>;
2407
+ type SetRecipientPayoutInput = z.infer<typeof SetRecipientPayoutSchema>;
2408
+
2220
2409
  declare const TransactionSourceSchema: z.ZodEnum<["moralis_webhook", "reconciliation_job", "sandbox"]>;
2221
2410
  type TransactionSource = z.infer<typeof TransactionSourceSchema>;
2222
2411
  declare const TimelineEventTypeSchema: z.ZodEnum<["charge.created", "charge.expired", "transaction.detected", "split.distributed", "webhook.dispatched", "webhook.delivered", "webhook.failed"]>;
@@ -2323,4 +2512,4 @@ declare const CapabilitiesSchema: z.ZodObject<{
2323
2512
  }>;
2324
2513
  type Capabilities = z.infer<typeof CapabilitiesSchema>;
2325
2514
 
2326
- export { API_KEY_SCOPES, type AcceptedPayment, AcceptedPaymentSchema, type ApiKeyScope, ApiKeyScopeSchema, CHARGE_ACCEPTED_PAYMENTS_MAX, CHARGE_AMOUNT_MAX, CHARGE_EXPIRES_IN_MAX_SECONDS, CHARGE_EXPIRES_IN_MIN_SECONDS, CHARGE_SPLIT_RECIPIENTS_MAX, type Capabilities, CapabilitiesSchema, type Charge, ChargeSchema, type ChargeStatus, ChargeStatusSchema, ChargeWebhookEventTypeSchema, type ChargesDateField, ChargesDateFieldSchema, type ChargesMetricField, ChargesMetricFieldSchema, type ChargesQueryField, ChargesQueryFieldSchema, type CreateChargeInput, type CreateChargeRequest, CreateChargeSchema, type CreateWebhookInput, type CreateWebhookRequest, CreateWebhookSchema, type DistributionsDateField, DistributionsDateFieldSchema, type DistributionsMetricField, DistributionsMetricFieldSchema, type DistributionsQueryField, DistributionsQueryFieldSchema, EVENT_CATEGORY_MAP, EVM_NETWORKS, type Environment, EnvironmentSchema, type ErrorPayload, ErrorPayloadSchema, type EvmNetwork, type GetChargeQrCodeQuery, type GetChargeQrCodeQueryRequest, GetChargeQrCodeQuerySchema, type Health, HealthSchema, type ListChargesInput, type ListChargesRequest, ListChargesSchema, type ListWebhookDeliveriesInput, type ListWebhookDeliveriesRequest, ListWebhookDeliveriesSchema, type ListenPendingDistributionsQuery, ListenPendingDistributionsQuerySchema, MAX_METRICS_QUERY_DATE_RANGE_DAYS, METRICS_QUERY_DEFAULT_ROW_LIMIT, METRICS_QUERY_MAX_FILTERS, METRICS_QUERY_MAX_GROUP_BY, METRICS_QUERY_MAX_METRICS, METRICS_QUERY_MAX_ROW_LIMIT, type MetricsAggregation, MetricsAggregationSchema, type MetricsDateGranularity, MetricsDateGranularitySchema, type MetricsFilterOperator, MetricsFilterOperatorSchema, type MetricsQuery, type MetricsQueryRequest, type MetricsQueryResult, type MetricsQueryResultRow, MetricsQueryResultRowSchema, MetricsQueryResultSchema, MetricsQuerySchema, type MetricsResource, MetricsResourceSchema, NETWORK_EXPLORERS, NETWORK_LABELS, type Network, NetworkSchema, OPERATIONAL_NETWORKS, type OperationalNetwork, PAGINATION_LIMIT_DEFAULT, PAGINATION_LIMIT_MAX, PAGINATION_LIMIT_MIN, type PaginatedCharges, PaginatedChargesSchema, type PaginatedPendingDistributions, PaginatedPendingDistributionsSchema, type PaginatedWebhookDeliveries, PaginatedWebhookDeliveriesSchema, type PaginationQuery, type PaginationQueryRequest, PaginationQuerySchema, type PendingDistribution, type PendingDistributionEvent, PendingDistributionEventSchema, PendingDistributionRecipientSchema, PendingDistributionSchema, type SandboxTriggerInput, SandboxTriggerSchema, type SettlementStatus, SettlementStatusSchema, type SplitDistributionStatus, SplitDistributionStatusSchema, type SplitRecipient, SplitRecipientSchema, TOKEN_ADDRESSES, TOKEN_DECIMALS, type TimelineEvent, TimelineEventSchema, type TimelineEventType, TimelineEventTypeSchema, type Token, TokenSchema, type TransactionSource, TransactionSourceSchema, type TransactionsDateField, TransactionsDateFieldSchema, type TransactionsMetricField, TransactionsMetricFieldSchema, type TransactionsQueryField, TransactionsQueryFieldSchema, type TriggerableChargeEvent, TriggerableChargeEventSchema, type TypedWebhookPayload, WEBHOOK_EVENTS_WILDCARD, WEBHOOK_EVENT_CATEGORIES, type Webhook, type WebhookCategory, WebhookCategorySchema, type WebhookDelivery, WebhookDeliveryEventTypeSchema, WebhookDeliverySchema, type WebhookDeliveryStatus, WebhookDeliveryStatusSchema, type WebhookEventDataMap, type WebhookEventType, WebhookEventTypeSchema, type WebhookHealthEventData, type WebhookListItem, WebhookListItemSchema, type WebhookPayload, WebhookPayloadSchema, WebhookSchema, paginatedSchema };
2515
+ export { API_KEY_SCOPES, type AcceptedPayment, AcceptedPaymentSchema, type ApiKeyScope, ApiKeyScopeSchema, CHARGE_ACCEPTED_PAYMENTS_MAX, CHARGE_AMOUNT_MAX, CHARGE_EXPIRES_IN_MAX_SECONDS, CHARGE_EXPIRES_IN_MIN_SECONDS, CHARGE_SPLIT_RECIPIENTS_MAX, CHECKOUT_PRODUCTS_MAX, CONFLICTING_SCOPE_PAIRS, type Capabilities, CapabilitiesSchema, type Charge, ChargeSchema, type ChargeStatus, ChargeStatusSchema, ChargeWebhookEventTypeSchema, type ChargesDateField, ChargesDateFieldSchema, type ChargesMetricField, ChargesMetricFieldSchema, type ChargesQueryField, ChargesQueryFieldSchema, type CheckoutProduct, CheckoutProductSchema, type CreateChargeInput, type CreateChargeRequest, CreateChargeSchema, type CreateRecipientInput, type CreateRecipientRequest, CreateRecipientSchema, type CreateWebhookInput, type CreateWebhookRequest, CreateWebhookSchema, type DistributionsDateField, DistributionsDateFieldSchema, type DistributionsMetricField, DistributionsMetricFieldSchema, type DistributionsQueryField, DistributionsQueryFieldSchema, EVENT_CATEGORY_MAP, EVM_NETWORKS, type Environment, EnvironmentSchema, type ErrorPayload, ErrorPayloadSchema, type EvmNetwork, type GetChargeQrCodeQuery, type GetChargeQrCodeQueryRequest, GetChargeQrCodeQuerySchema, type Health, HealthSchema, type KlappayCheckoutMetadata, KlappayCheckoutMetadataSchema, type ListChargesInput, type ListChargesRequest, ListChargesSchema, type ListWebhookDeliveriesInput, type ListWebhookDeliveriesRequest, ListWebhookDeliveriesSchema, type ListenPendingDistributionsQuery, ListenPendingDistributionsQuerySchema, MAX_METRICS_QUERY_DATE_RANGE_DAYS, METRICS_QUERY_DEFAULT_ROW_LIMIT, METRICS_QUERY_MAX_FILTERS, METRICS_QUERY_MAX_GROUP_BY, METRICS_QUERY_MAX_METRICS, METRICS_QUERY_MAX_ROW_LIMIT, MetadataWithKlappaySchema, type MetricsAggregation, MetricsAggregationSchema, type MetricsDateGranularity, MetricsDateGranularitySchema, type MetricsFilterOperator, MetricsFilterOperatorSchema, type MetricsQuery, type MetricsQueryRequest, type MetricsQueryResult, type MetricsQueryResultRow, MetricsQueryResultRowSchema, MetricsQueryResultSchema, MetricsQuerySchema, type MetricsResource, MetricsResourceSchema, NETWORK_EXPLORERS, NETWORK_LABELS, type Network, NetworkSchema, OPERATIONAL_NETWORKS, type OperationalNetwork, PAGINATION_LIMIT_DEFAULT, PAGINATION_LIMIT_MAX, PAGINATION_LIMIT_MIN, type PaginatedCharges, PaginatedChargesSchema, type PaginatedPendingDistributions, PaginatedPendingDistributionsSchema, type PaginatedWebhookDeliveries, PaginatedWebhookDeliveriesSchema, type PaginationQuery, type PaginationQueryRequest, PaginationQuerySchema, type PendingDistribution, type PendingDistributionEvent, PendingDistributionEventSchema, PendingDistributionRecipientSchema, PendingDistributionSchema, type Recipient, RecipientSchema, type SandboxTriggerInput, SandboxTriggerSchema, type SetRecipientPayoutInput, SetRecipientPayoutSchema, type SettlementStatus, SettlementStatusSchema, type SplitDistributionStatus, SplitDistributionStatusSchema, type SplitRecipient, type SplitRecipientInput, SplitRecipientInputSchema, SplitRecipientSchema, TOKEN_ADDRESSES, TOKEN_DECIMALS, type TimelineEvent, TimelineEventSchema, type TimelineEventType, TimelineEventTypeSchema, type Token, TokenSchema, type TransactionSource, TransactionSourceSchema, type TransactionsDateField, TransactionsDateFieldSchema, type TransactionsMetricField, TransactionsMetricFieldSchema, type TransactionsQueryField, TransactionsQueryFieldSchema, type TriggerableChargeEvent, TriggerableChargeEventSchema, type TypedWebhookPayload, WEBHOOK_EVENTS_WILDCARD, WEBHOOK_EVENT_CATEGORIES, type Webhook, type WebhookCategory, WebhookCategorySchema, type WebhookDelivery, WebhookDeliveryEventTypeSchema, WebhookDeliverySchema, type WebhookDeliveryStatus, WebhookDeliveryStatusSchema, type WebhookEventDataMap, type WebhookEventType, WebhookEventTypeSchema, type WebhookHealthEventData, type WebhookListItem, WebhookListItemSchema, type WebhookPayload, WebhookPayloadSchema, WebhookSchema, findConflictingScopes, paginatedSchema };
package/dist/index.d.ts CHANGED
@@ -32,9 +32,11 @@ type ErrorPayload = z.infer<typeof ErrorPayloadSchema>;
32
32
  declare const EnvironmentSchema: z.ZodEnum<["live", "test"]>;
33
33
  type Environment = z.infer<typeof EnvironmentSchema>;
34
34
 
35
- declare const ApiKeyScopeSchema: z.ZodEnum<["charges:read", "charges:write", "webhooks:read", "webhooks:write", "webhooks:manage_secret", "metrics:read", "metrics:charges:read", "metrics:transactions:read", "metrics:distributions:read", "sandbox:trigger"]>;
35
+ declare const ApiKeyScopeSchema: z.ZodEnum<["charges:read", "charges:write", "webhooks:read", "webhooks:write", "webhooks:manage_secret", "metrics:read", "metrics:charges:read", "metrics:transactions:read", "metrics:distributions:read", "sandbox:trigger", "charges:split_write", "recipients:read", "recipients:write", "recipients:manage_payout"]>;
36
36
  type ApiKeyScope = z.infer<typeof ApiKeyScopeSchema>;
37
- declare const API_KEY_SCOPES: ["charges:read", "charges:write", "webhooks:read", "webhooks:write", "webhooks:manage_secret", "metrics:read", "metrics:charges:read", "metrics:transactions:read", "metrics:distributions:read", "sandbox:trigger"];
37
+ declare const API_KEY_SCOPES: ["charges:read", "charges:write", "webhooks:read", "webhooks:write", "webhooks:manage_secret", "metrics:read", "metrics:charges:read", "metrics:transactions:read", "metrics:distributions:read", "sandbox:trigger", "charges:split_write", "recipients:read", "recipients:write", "recipients:manage_payout"];
38
+ declare const CONFLICTING_SCOPE_PAIRS: ReadonlyArray<readonly [ApiKeyScope, ApiKeyScope]>;
39
+ declare function findConflictingScopes(scopes: readonly ApiKeyScope[]): readonly [ApiKeyScope, ApiKeyScope] | null;
38
40
 
39
41
  declare const NetworkSchema: z.ZodEnum<["base", "optimism", "polygon", "ethereum", "arbitrum", "avalanche", "bnb"]>;
40
42
  type Network = z.infer<typeof NetworkSchema>;
@@ -112,6 +114,20 @@ declare const SplitRecipientSchema: z.ZodObject<{
112
114
  label?: string | undefined;
113
115
  }>;
114
116
  type SplitRecipient = z.infer<typeof SplitRecipientSchema>;
117
+ declare const SplitRecipientInputSchema: z.ZodObject<{
118
+ recipientId: z.ZodString;
119
+ percent: z.ZodNumber;
120
+ label: z.ZodOptional<z.ZodString>;
121
+ }, "strip", z.ZodTypeAny, {
122
+ percent: number;
123
+ recipientId: string;
124
+ label?: string | undefined;
125
+ }, {
126
+ percent: number;
127
+ recipientId: string;
128
+ label?: string | undefined;
129
+ }>;
130
+ type SplitRecipientInput = z.infer<typeof SplitRecipientInputSchema>;
115
131
  declare const CHARGE_AMOUNT_MAX = 999999999999;
116
132
  declare const CreateChargeSchema: z.ZodObject<{
117
133
  amount: z.ZodNumber;
@@ -223,24 +239,24 @@ declare const CreateChargeSchema: z.ZodObject<{
223
239
  }, z.ZodUnknown, "strip">>>;
224
240
  redirectUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
225
241
  splitRecipients: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
226
- address: z.ZodString;
242
+ recipientId: z.ZodString;
227
243
  percent: z.ZodNumber;
228
244
  label: z.ZodOptional<z.ZodString>;
229
245
  }, "strip", z.ZodTypeAny, {
230
- address: string;
231
246
  percent: number;
247
+ recipientId: string;
232
248
  label?: string | undefined;
233
249
  }, {
234
- address: string;
235
250
  percent: number;
251
+ recipientId: string;
236
252
  label?: string | undefined;
237
253
  }>, "many">, {
238
- address: string;
239
254
  percent: number;
255
+ recipientId: string;
240
256
  label?: string | undefined;
241
257
  }[], {
242
- address: string;
243
258
  percent: number;
259
+ recipientId: string;
244
260
  label?: string | undefined;
245
261
  }[]>>;
246
262
  }, "strip", z.ZodTypeAny, {
@@ -285,8 +301,8 @@ declare const CreateChargeSchema: z.ZodObject<{
285
301
  }, z.ZodUnknown, "strip"> | undefined;
286
302
  redirectUrl?: string | undefined;
287
303
  splitRecipients?: {
288
- address: string;
289
304
  percent: number;
305
+ recipientId: string;
290
306
  label?: string | undefined;
291
307
  }[] | undefined;
292
308
  }, {
@@ -331,8 +347,8 @@ declare const CreateChargeSchema: z.ZodObject<{
331
347
  }, z.ZodUnknown, "strip"> | undefined;
332
348
  redirectUrl?: string | undefined;
333
349
  splitRecipients?: {
334
- address: string;
335
350
  percent: number;
351
+ recipientId: string;
336
352
  label?: string | undefined;
337
353
  }[] | undefined;
338
354
  }>;
@@ -1054,6 +1070,135 @@ declare const GetChargeQrCodeQuerySchema: z.ZodObject<{
1054
1070
  type GetChargeQrCodeQuery = z.infer<typeof GetChargeQrCodeQuerySchema>;
1055
1071
  type GetChargeQrCodeQueryRequest = z.input<typeof GetChargeQrCodeQuerySchema>;
1056
1072
 
1073
+ declare const CHECKOUT_PRODUCTS_MAX = 20;
1074
+ declare const CheckoutProductSchema: z.ZodObject<{
1075
+ name: z.ZodString;
1076
+ quantity: z.ZodOptional<z.ZodNumber>;
1077
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1078
+ }, "strip", z.ZodTypeAny, {
1079
+ name: string;
1080
+ quantity?: number | undefined;
1081
+ imageUrl?: string | undefined;
1082
+ }, {
1083
+ name: string;
1084
+ quantity?: number | undefined;
1085
+ imageUrl?: string | undefined;
1086
+ }>;
1087
+ type CheckoutProduct = z.infer<typeof CheckoutProductSchema>;
1088
+ declare const KlappayCheckoutMetadataSchema: z.ZodObject<{
1089
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
1090
+ name: z.ZodString;
1091
+ quantity: z.ZodOptional<z.ZodNumber>;
1092
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1093
+ }, "strip", z.ZodTypeAny, {
1094
+ name: string;
1095
+ quantity?: number | undefined;
1096
+ imageUrl?: string | undefined;
1097
+ }, {
1098
+ name: string;
1099
+ quantity?: number | undefined;
1100
+ imageUrl?: string | undefined;
1101
+ }>, "many">>;
1102
+ }, "strip", z.ZodTypeAny, {
1103
+ products?: {
1104
+ name: string;
1105
+ quantity?: number | undefined;
1106
+ imageUrl?: string | undefined;
1107
+ }[] | undefined;
1108
+ }, {
1109
+ products?: {
1110
+ name: string;
1111
+ quantity?: number | undefined;
1112
+ imageUrl?: string | undefined;
1113
+ }[] | undefined;
1114
+ }>;
1115
+ type KlappayCheckoutMetadata = z.infer<typeof KlappayCheckoutMetadataSchema>;
1116
+ declare const MetadataWithKlappaySchema: z.ZodObject<{
1117
+ klappay: z.ZodOptional<z.ZodObject<{
1118
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
1119
+ name: z.ZodString;
1120
+ quantity: z.ZodOptional<z.ZodNumber>;
1121
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1122
+ }, "strip", z.ZodTypeAny, {
1123
+ name: string;
1124
+ quantity?: number | undefined;
1125
+ imageUrl?: string | undefined;
1126
+ }, {
1127
+ name: string;
1128
+ quantity?: number | undefined;
1129
+ imageUrl?: string | undefined;
1130
+ }>, "many">>;
1131
+ }, "strip", z.ZodTypeAny, {
1132
+ products?: {
1133
+ name: string;
1134
+ quantity?: number | undefined;
1135
+ imageUrl?: string | undefined;
1136
+ }[] | undefined;
1137
+ }, {
1138
+ products?: {
1139
+ name: string;
1140
+ quantity?: number | undefined;
1141
+ imageUrl?: string | undefined;
1142
+ }[] | undefined;
1143
+ }>>;
1144
+ }, "strip", z.ZodUnknown, z.objectOutputType<{
1145
+ klappay: z.ZodOptional<z.ZodObject<{
1146
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
1147
+ name: z.ZodString;
1148
+ quantity: z.ZodOptional<z.ZodNumber>;
1149
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1150
+ }, "strip", z.ZodTypeAny, {
1151
+ name: string;
1152
+ quantity?: number | undefined;
1153
+ imageUrl?: string | undefined;
1154
+ }, {
1155
+ name: string;
1156
+ quantity?: number | undefined;
1157
+ imageUrl?: string | undefined;
1158
+ }>, "many">>;
1159
+ }, "strip", z.ZodTypeAny, {
1160
+ products?: {
1161
+ name: string;
1162
+ quantity?: number | undefined;
1163
+ imageUrl?: string | undefined;
1164
+ }[] | undefined;
1165
+ }, {
1166
+ products?: {
1167
+ name: string;
1168
+ quantity?: number | undefined;
1169
+ imageUrl?: string | undefined;
1170
+ }[] | undefined;
1171
+ }>>;
1172
+ }, z.ZodUnknown, "strip">, z.objectInputType<{
1173
+ klappay: z.ZodOptional<z.ZodObject<{
1174
+ products: z.ZodOptional<z.ZodArray<z.ZodObject<{
1175
+ name: z.ZodString;
1176
+ quantity: z.ZodOptional<z.ZodNumber>;
1177
+ imageUrl: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
1178
+ }, "strip", z.ZodTypeAny, {
1179
+ name: string;
1180
+ quantity?: number | undefined;
1181
+ imageUrl?: string | undefined;
1182
+ }, {
1183
+ name: string;
1184
+ quantity?: number | undefined;
1185
+ imageUrl?: string | undefined;
1186
+ }>, "many">>;
1187
+ }, "strip", z.ZodTypeAny, {
1188
+ products?: {
1189
+ name: string;
1190
+ quantity?: number | undefined;
1191
+ imageUrl?: string | undefined;
1192
+ }[] | undefined;
1193
+ }, {
1194
+ products?: {
1195
+ name: string;
1196
+ quantity?: number | undefined;
1197
+ imageUrl?: string | undefined;
1198
+ }[] | undefined;
1199
+ }>>;
1200
+ }, z.ZodUnknown, "strip">>;
1201
+
1057
1202
  declare const SplitDistributionStatusSchema: z.ZodEnum<["pending", "processing", "completed", "failed"]>;
1058
1203
  type SplitDistributionStatus = z.infer<typeof SplitDistributionStatusSchema>;
1059
1204
  declare const PendingDistributionRecipientSchema: z.ZodObject<{
@@ -2217,6 +2362,50 @@ declare const PaginatedWebhookDeliveriesSchema: z.ZodObject<{
2217
2362
  }>;
2218
2363
  type PaginatedWebhookDeliveries = z.infer<typeof PaginatedWebhookDeliveriesSchema>;
2219
2364
 
2365
+ declare const CreateRecipientSchema: z.ZodObject<{
2366
+ address: z.ZodString;
2367
+ label: z.ZodOptional<z.ZodString>;
2368
+ }, "strip", z.ZodTypeAny, {
2369
+ address: string;
2370
+ label?: string | undefined;
2371
+ }, {
2372
+ address: string;
2373
+ label?: string | undefined;
2374
+ }>;
2375
+ type CreateRecipientInput = z.infer<typeof CreateRecipientSchema>;
2376
+ type CreateRecipientRequest = z.input<typeof CreateRecipientSchema>;
2377
+ declare const RecipientSchema: z.ZodObject<{
2378
+ id: z.ZodString;
2379
+ environment: z.ZodEnum<["live", "test"]>;
2380
+ address: z.ZodString;
2381
+ label: z.ZodNullable<z.ZodString>;
2382
+ payout: z.ZodBoolean;
2383
+ createdAt: z.ZodString;
2384
+ }, "strip", z.ZodTypeAny, {
2385
+ address: string;
2386
+ label: string | null;
2387
+ id: string;
2388
+ environment: "live" | "test";
2389
+ createdAt: string;
2390
+ payout: boolean;
2391
+ }, {
2392
+ address: string;
2393
+ label: string | null;
2394
+ id: string;
2395
+ environment: "live" | "test";
2396
+ createdAt: string;
2397
+ payout: boolean;
2398
+ }>;
2399
+ type Recipient = z.infer<typeof RecipientSchema>;
2400
+ declare const SetRecipientPayoutSchema: z.ZodObject<{
2401
+ payout: z.ZodBoolean;
2402
+ }, "strip", z.ZodTypeAny, {
2403
+ payout: boolean;
2404
+ }, {
2405
+ payout: boolean;
2406
+ }>;
2407
+ type SetRecipientPayoutInput = z.infer<typeof SetRecipientPayoutSchema>;
2408
+
2220
2409
  declare const TransactionSourceSchema: z.ZodEnum<["moralis_webhook", "reconciliation_job", "sandbox"]>;
2221
2410
  type TransactionSource = z.infer<typeof TransactionSourceSchema>;
2222
2411
  declare const TimelineEventTypeSchema: z.ZodEnum<["charge.created", "charge.expired", "transaction.detected", "split.distributed", "webhook.dispatched", "webhook.delivered", "webhook.failed"]>;
@@ -2323,4 +2512,4 @@ declare const CapabilitiesSchema: z.ZodObject<{
2323
2512
  }>;
2324
2513
  type Capabilities = z.infer<typeof CapabilitiesSchema>;
2325
2514
 
2326
- export { API_KEY_SCOPES, type AcceptedPayment, AcceptedPaymentSchema, type ApiKeyScope, ApiKeyScopeSchema, CHARGE_ACCEPTED_PAYMENTS_MAX, CHARGE_AMOUNT_MAX, CHARGE_EXPIRES_IN_MAX_SECONDS, CHARGE_EXPIRES_IN_MIN_SECONDS, CHARGE_SPLIT_RECIPIENTS_MAX, type Capabilities, CapabilitiesSchema, type Charge, ChargeSchema, type ChargeStatus, ChargeStatusSchema, ChargeWebhookEventTypeSchema, type ChargesDateField, ChargesDateFieldSchema, type ChargesMetricField, ChargesMetricFieldSchema, type ChargesQueryField, ChargesQueryFieldSchema, type CreateChargeInput, type CreateChargeRequest, CreateChargeSchema, type CreateWebhookInput, type CreateWebhookRequest, CreateWebhookSchema, type DistributionsDateField, DistributionsDateFieldSchema, type DistributionsMetricField, DistributionsMetricFieldSchema, type DistributionsQueryField, DistributionsQueryFieldSchema, EVENT_CATEGORY_MAP, EVM_NETWORKS, type Environment, EnvironmentSchema, type ErrorPayload, ErrorPayloadSchema, type EvmNetwork, type GetChargeQrCodeQuery, type GetChargeQrCodeQueryRequest, GetChargeQrCodeQuerySchema, type Health, HealthSchema, type ListChargesInput, type ListChargesRequest, ListChargesSchema, type ListWebhookDeliveriesInput, type ListWebhookDeliveriesRequest, ListWebhookDeliveriesSchema, type ListenPendingDistributionsQuery, ListenPendingDistributionsQuerySchema, MAX_METRICS_QUERY_DATE_RANGE_DAYS, METRICS_QUERY_DEFAULT_ROW_LIMIT, METRICS_QUERY_MAX_FILTERS, METRICS_QUERY_MAX_GROUP_BY, METRICS_QUERY_MAX_METRICS, METRICS_QUERY_MAX_ROW_LIMIT, type MetricsAggregation, MetricsAggregationSchema, type MetricsDateGranularity, MetricsDateGranularitySchema, type MetricsFilterOperator, MetricsFilterOperatorSchema, type MetricsQuery, type MetricsQueryRequest, type MetricsQueryResult, type MetricsQueryResultRow, MetricsQueryResultRowSchema, MetricsQueryResultSchema, MetricsQuerySchema, type MetricsResource, MetricsResourceSchema, NETWORK_EXPLORERS, NETWORK_LABELS, type Network, NetworkSchema, OPERATIONAL_NETWORKS, type OperationalNetwork, PAGINATION_LIMIT_DEFAULT, PAGINATION_LIMIT_MAX, PAGINATION_LIMIT_MIN, type PaginatedCharges, PaginatedChargesSchema, type PaginatedPendingDistributions, PaginatedPendingDistributionsSchema, type PaginatedWebhookDeliveries, PaginatedWebhookDeliveriesSchema, type PaginationQuery, type PaginationQueryRequest, PaginationQuerySchema, type PendingDistribution, type PendingDistributionEvent, PendingDistributionEventSchema, PendingDistributionRecipientSchema, PendingDistributionSchema, type SandboxTriggerInput, SandboxTriggerSchema, type SettlementStatus, SettlementStatusSchema, type SplitDistributionStatus, SplitDistributionStatusSchema, type SplitRecipient, SplitRecipientSchema, TOKEN_ADDRESSES, TOKEN_DECIMALS, type TimelineEvent, TimelineEventSchema, type TimelineEventType, TimelineEventTypeSchema, type Token, TokenSchema, type TransactionSource, TransactionSourceSchema, type TransactionsDateField, TransactionsDateFieldSchema, type TransactionsMetricField, TransactionsMetricFieldSchema, type TransactionsQueryField, TransactionsQueryFieldSchema, type TriggerableChargeEvent, TriggerableChargeEventSchema, type TypedWebhookPayload, WEBHOOK_EVENTS_WILDCARD, WEBHOOK_EVENT_CATEGORIES, type Webhook, type WebhookCategory, WebhookCategorySchema, type WebhookDelivery, WebhookDeliveryEventTypeSchema, WebhookDeliverySchema, type WebhookDeliveryStatus, WebhookDeliveryStatusSchema, type WebhookEventDataMap, type WebhookEventType, WebhookEventTypeSchema, type WebhookHealthEventData, type WebhookListItem, WebhookListItemSchema, type WebhookPayload, WebhookPayloadSchema, WebhookSchema, paginatedSchema };
2515
+ export { API_KEY_SCOPES, type AcceptedPayment, AcceptedPaymentSchema, type ApiKeyScope, ApiKeyScopeSchema, CHARGE_ACCEPTED_PAYMENTS_MAX, CHARGE_AMOUNT_MAX, CHARGE_EXPIRES_IN_MAX_SECONDS, CHARGE_EXPIRES_IN_MIN_SECONDS, CHARGE_SPLIT_RECIPIENTS_MAX, CHECKOUT_PRODUCTS_MAX, CONFLICTING_SCOPE_PAIRS, type Capabilities, CapabilitiesSchema, type Charge, ChargeSchema, type ChargeStatus, ChargeStatusSchema, ChargeWebhookEventTypeSchema, type ChargesDateField, ChargesDateFieldSchema, type ChargesMetricField, ChargesMetricFieldSchema, type ChargesQueryField, ChargesQueryFieldSchema, type CheckoutProduct, CheckoutProductSchema, type CreateChargeInput, type CreateChargeRequest, CreateChargeSchema, type CreateRecipientInput, type CreateRecipientRequest, CreateRecipientSchema, type CreateWebhookInput, type CreateWebhookRequest, CreateWebhookSchema, type DistributionsDateField, DistributionsDateFieldSchema, type DistributionsMetricField, DistributionsMetricFieldSchema, type DistributionsQueryField, DistributionsQueryFieldSchema, EVENT_CATEGORY_MAP, EVM_NETWORKS, type Environment, EnvironmentSchema, type ErrorPayload, ErrorPayloadSchema, type EvmNetwork, type GetChargeQrCodeQuery, type GetChargeQrCodeQueryRequest, GetChargeQrCodeQuerySchema, type Health, HealthSchema, type KlappayCheckoutMetadata, KlappayCheckoutMetadataSchema, type ListChargesInput, type ListChargesRequest, ListChargesSchema, type ListWebhookDeliveriesInput, type ListWebhookDeliveriesRequest, ListWebhookDeliveriesSchema, type ListenPendingDistributionsQuery, ListenPendingDistributionsQuerySchema, MAX_METRICS_QUERY_DATE_RANGE_DAYS, METRICS_QUERY_DEFAULT_ROW_LIMIT, METRICS_QUERY_MAX_FILTERS, METRICS_QUERY_MAX_GROUP_BY, METRICS_QUERY_MAX_METRICS, METRICS_QUERY_MAX_ROW_LIMIT, MetadataWithKlappaySchema, type MetricsAggregation, MetricsAggregationSchema, type MetricsDateGranularity, MetricsDateGranularitySchema, type MetricsFilterOperator, MetricsFilterOperatorSchema, type MetricsQuery, type MetricsQueryRequest, type MetricsQueryResult, type MetricsQueryResultRow, MetricsQueryResultRowSchema, MetricsQueryResultSchema, MetricsQuerySchema, type MetricsResource, MetricsResourceSchema, NETWORK_EXPLORERS, NETWORK_LABELS, type Network, NetworkSchema, OPERATIONAL_NETWORKS, type OperationalNetwork, PAGINATION_LIMIT_DEFAULT, PAGINATION_LIMIT_MAX, PAGINATION_LIMIT_MIN, type PaginatedCharges, PaginatedChargesSchema, type PaginatedPendingDistributions, PaginatedPendingDistributionsSchema, type PaginatedWebhookDeliveries, PaginatedWebhookDeliveriesSchema, type PaginationQuery, type PaginationQueryRequest, PaginationQuerySchema, type PendingDistribution, type PendingDistributionEvent, PendingDistributionEventSchema, PendingDistributionRecipientSchema, PendingDistributionSchema, type Recipient, RecipientSchema, type SandboxTriggerInput, SandboxTriggerSchema, type SetRecipientPayoutInput, SetRecipientPayoutSchema, type SettlementStatus, SettlementStatusSchema, type SplitDistributionStatus, SplitDistributionStatusSchema, type SplitRecipient, type SplitRecipientInput, SplitRecipientInputSchema, SplitRecipientSchema, TOKEN_ADDRESSES, TOKEN_DECIMALS, type TimelineEvent, TimelineEventSchema, type TimelineEventType, TimelineEventTypeSchema, type Token, TokenSchema, type TransactionSource, TransactionSourceSchema, type TransactionsDateField, TransactionsDateFieldSchema, type TransactionsMetricField, TransactionsMetricFieldSchema, type TransactionsQueryField, TransactionsQueryFieldSchema, type TriggerableChargeEvent, TriggerableChargeEventSchema, type TypedWebhookPayload, WEBHOOK_EVENTS_WILDCARD, WEBHOOK_EVENT_CATEGORIES, type Webhook, type WebhookCategory, WebhookCategorySchema, type WebhookDelivery, WebhookDeliveryEventTypeSchema, WebhookDeliverySchema, type WebhookDeliveryStatus, WebhookDeliveryStatusSchema, type WebhookEventDataMap, type WebhookEventType, WebhookEventTypeSchema, type WebhookHealthEventData, type WebhookListItem, WebhookListItemSchema, type WebhookPayload, WebhookPayloadSchema, WebhookSchema, findConflictingScopes, paginatedSchema };