@delopay/sdk 0.81.0 → 0.83.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.cts CHANGED
@@ -694,6 +694,20 @@ interface CustomerResponse {
694
694
  tax_registration_id?: string | null;
695
695
  /** Structured identity / KYC documents attached to the customer. */
696
696
  document_details?: Record<string, unknown> | null;
697
+ /**
698
+ * Shops (business profiles) this customer has transacted in, derived from
699
+ * their payments — the same rule the `profile_ids` list filter applies. A
700
+ * customer created but never charged belongs to no shop.
701
+ *
702
+ * Returned by `customers.retrieve` only. Deriving it costs a query per
703
+ * customer, so the list endpoints omit it: **absent means "not computed",
704
+ * not "no shops"**. An empty array is a real answer and stays
705
+ * distinguishable from a field nobody filled in.
706
+ *
707
+ * A shop-scoped caller only sees their own shop here — the server narrows
708
+ * the list to the caller's scope.
709
+ */
710
+ profile_ids?: string[] | null;
697
711
  }
698
712
  interface CustomerListParams {
699
713
  limit?: number | null;
@@ -705,6 +719,16 @@ interface CustomerListParams {
705
719
  * transacted appears under no shop.
706
720
  */
707
721
  profile_id?: string | null;
722
+ /**
723
+ * Filter customers by several shops at once. Unions with `profile_id` and
724
+ * `project_id` — a customer matches if they transacted in any of the
725
+ * resolved shops.
726
+ *
727
+ * Sent as a single comma-separated value (`profile_ids=pro_a,pro_b`); the
728
+ * SDK joins the array for you. Every id must belong to the calling
729
+ * merchant, otherwise the request is rejected with `AccessForbidden`.
730
+ */
731
+ profile_ids?: string[] | null;
708
732
  /**
709
733
  * Filter customers by project; expands to all shops (business profiles)
710
734
  * under that project.
@@ -1293,6 +1317,20 @@ interface ConnectorWebhookEntry {
1293
1317
  status?: string;
1294
1318
  /** Events the endpoint is subscribed to at the connector. */
1295
1319
  enabled_events?: string[];
1320
+ /**
1321
+ * Events Delopay handles that this endpoint is NOT subscribed to. A PSP
1322
+ * freezes an endpoint's event list at registration time, so an endpoint
1323
+ * registered before an event type was added keeps missing it — nothing
1324
+ * errors, the events simply never arrive.
1325
+ *
1326
+ * Empty means the subscription is current. Non-empty means those events are
1327
+ * being silently dropped; call
1328
+ * {@link Connectors.syncWebhookEvents | syncWebhookEvents} to fix it.
1329
+ * Absent when the subscription can't be inspected (non-Stripe connectors, or
1330
+ * a list reconstructed from stored metadata) — which is not the same as
1331
+ * "checked and healthy".
1332
+ */
1333
+ missing_events?: string[];
1296
1334
  /** Unix timestamp (seconds) the endpoint was created at the connector. */
1297
1335
  created_at?: number;
1298
1336
  }
@@ -1300,6 +1338,33 @@ interface ConnectorWebhookListResponse {
1300
1338
  connector: string;
1301
1339
  webhooks: ConnectorWebhookEntry[];
1302
1340
  }
1341
+ /** One endpoint's outcome from `syncWebhookEvents`. */
1342
+ interface ConnectorWebhookSyncResult {
1343
+ connector_webhook_id: string;
1344
+ environment?: WebhookRegistrationEnvironment;
1345
+ webhook_url?: string;
1346
+ /** Endpoint status as the connector reports it (e.g. `enabled`/`disabled`). */
1347
+ status?: string;
1348
+ /**
1349
+ * Whether the subscription was actually rewritten. `false` with an empty
1350
+ * `added_events` means it was already current.
1351
+ */
1352
+ updated: boolean;
1353
+ /** Events that were missing and have now been subscribed. */
1354
+ added_events: string[];
1355
+ /** Set when this endpoint could not be updated; the others are unaffected. */
1356
+ error_message?: string;
1357
+ }
1358
+ interface ConnectorWebhookSyncResponse {
1359
+ connector: string;
1360
+ /** The full event set Delopay expects to be subscribed to. */
1361
+ expected_events: string[];
1362
+ /**
1363
+ * One entry per endpoint registered at this connector account, across every
1364
+ * credential set whose endpoints could be listed.
1365
+ */
1366
+ endpoints: ConnectorWebhookSyncResult[];
1367
+ }
1303
1368
  /**
1304
1369
  * Body for
1305
1370
  * `POST /account/{merchantId}/connectors/{connectorId}/stripe/payment-method-domains`.
@@ -3298,7 +3363,14 @@ interface AvailabilityPreviewResponse {
3298
3363
  * dashboard (or any client) uses these to hide UI elements for actions
3299
3364
  * the caller's role cannot perform, via `getRolePermissions()`.
3300
3365
  */
3301
- type ParentGroup = 'Operations' | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails';
3366
+ type ParentGroup = 'Operations' | 'Refunds' | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails' | 'ApiKeys' | 'Impersonation' | 'Settlement'
3367
+ /**
3368
+ * Whether the caller may open a transaction in the payment provider's own
3369
+ * dashboard. Gates discoverability of the deep link, not access — the id it
3370
+ * is built from is already on every payment, and the provider authenticates
3371
+ * the user itself. `Read` is the only scope.
3372
+ */
3373
+ | 'ConnectorDashboard';
3302
3374
  /** Two scopes — `Read` allows viewing, `Write` is required for any mutation. */
3303
3375
  type PermissionScope = 'Read' | 'Write';
3304
3376
  /**
@@ -3757,6 +3829,31 @@ declare class Connectors {
3757
3829
  registerStripePaymentMethodDomains(merchantId: string, connectorId: string, params: StripePaymentMethodDomainsRegisterRequest): Promise<StripePaymentMethodDomainsRegisterResponse>;
3758
3830
  /** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
3759
3831
  getWebhook(merchantId: string, connectorId: string): Promise<ConnectorWebhookListResponse>;
3832
+ /**
3833
+ * Bring an already-registered webhook's event subscription up to date with
3834
+ * the events Delopay handles.
3835
+ * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/sync-events`
3836
+ *
3837
+ * A PSP freezes an endpoint's event list at registration time, so an endpoint
3838
+ * created before an event type was added never receives it — silently, with
3839
+ * no error anywhere. {@link getWebhook} reports the gap as `missing_events`;
3840
+ * this repairs it.
3841
+ *
3842
+ * Unlike re-registering, the endpoints are updated in place: the endpoint id
3843
+ * and its signing secret are preserved, so signature verification keeps
3844
+ * working across the change. Stripe connectors only; idempotent, so it is
3845
+ * safe to call on a schedule or after every deploy.
3846
+ *
3847
+ * @example
3848
+ * ```typescript
3849
+ * const sync = await delopay.connectors.syncWebhookEvents('mer_abc', 'mca_xyz');
3850
+ * for (const endpoint of sync.endpoints) {
3851
+ * if (endpoint.error_message) console.warn(endpoint.connector_webhook_id, endpoint.error_message);
3852
+ * else if (endpoint.updated) console.log('subscribed', endpoint.added_events);
3853
+ * }
3854
+ * ```
3855
+ */
3856
+ syncWebhookEvents(merchantId: string, connectorId: string): Promise<ConnectorWebhookSyncResponse>;
3760
3857
  /** List available payment methods. `GET /account/payment-methods` */
3761
3858
  listPaymentMethods(): Promise<Record<string, unknown>[]>;
3762
3859
  }
@@ -3818,6 +3915,11 @@ declare class Customers {
3818
3915
  * ```typescript
3819
3916
  * // Customers who have transacted in a specific shop.
3820
3917
  * const customers = await delopay.customers.list({ profile_id: 'pro_abc123' });
3918
+ *
3919
+ * // Several shops at once (unions with profile_id / project_id).
3920
+ * const many = await delopay.customers.list({
3921
+ * profile_ids: ['pro_abc123', 'pro_def456'],
3922
+ * });
3821
3923
  * ```
3822
3924
  */
3823
3925
  list(params?: CustomerListParams): Promise<CustomerResponse[]>;
@@ -6498,4 +6600,4 @@ declare function focusedCheckoutUrl(params: FocusedCheckoutUrlParams): string;
6498
6600
  declare const CHECKOUT_EVENT_KINDS: readonly ["native_pane_selected", "native_pane_tab_opened", "native_pane_tab_blocked", "native_pane_abandoned", "native_pane_returned"];
6499
6601
  type CheckoutEventKind = (typeof CHECKOUT_EVENT_KINDS)[number];
6500
6602
 
6501
- export { ALL_CUSTOM_FIELD_CONDITION_SOURCES, ALL_CUSTOM_FIELD_OPERATORS, ALL_CUSTOM_FIELD_TYPES, type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, type AmountRange, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BankCodeResponse, type BankDebitTypes, type BankTransferTypes, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CHECKBOX_CHECKED, CHECKBOX_UNCHECKED, CHECKOUT_EVENT_KINDS, CUSTOM_CSS_MAX_LENGTH, CUSTOM_FIELDS_MAX, CUSTOM_FIELD_CONDITIONS_MAX, CUSTOM_FIELD_KEY_PATTERN, CUSTOM_FIELD_OPERATORS_BY_SOURCE, CUSTOM_FIELD_VALUELESS_OPERATORS, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, type CardNetworkTypes, Cards, type ChangePasswordRequest, type CheckoutBranding, type CheckoutCustomField, type CheckoutEventKind, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomFieldCondition, type CustomFieldConditionSource, type CustomFieldContext, type CustomFieldOperator, type CustomFieldOption, type CustomFieldTranslations, type CustomFieldType, type CustomFieldVisibility, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceBlock, type DisputeEvidenceRequest, type DisputeEvidenceType, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleDefaultPrecedence, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FocusedCheckoutUrlParams, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type MethodSurcharge, type MinimalRoleInfo, NATIVE_PANES_MAX, NATIVE_PANE_CATEGORY_KEYS, NATIVE_PANE_ICON_KEYS, type NativePaneMethodInfo, type NativePaneOpenTarget, type NativePaneRail, type NativePaneView, type NativePaneVisibility, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentExperienceTypes, type PaymentIdFormatConfig, type PaymentIdStyle, type PaymentIntentStateMetadata, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodAmountLimits, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodDisplayInfo, type PaymentMethodListInstallmentAmountDetails, type PaymentMethodListInstallmentOption, type PaymentMethodListInstallmentPlan, type PaymentMethodListIntentData, type PaymentMethodListParams, type PaymentMethodListResponse, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentStatusHistoryEntityType, type PaymentStatusHistoryEvent, type PaymentStatusHistoryResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundAggregateResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type RequiredFieldInfo, type ResetPasswordRequest, type ResponsePaymentMethodTypes, type ResponsePaymentMethodsEnabled, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, STRIPE_NATIVE_PANE_METHODS, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type StripeNativePane, type StripePaymentMethodDomainResult, type StripePaymentMethodDomainStatus, type StripePaymentMethodDomainsRegisterRequest, type StripePaymentMethodDomainsRegisterResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeDetailsResponse, type SurchargeResponse, type SurchargeRuleRequest, type SurchargeRuleResponse, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, cloneCustomField, cloneNativePane, customFieldContextFromMetadata, customFieldIsTextLike, customFieldOperatorTakesValue, customFieldOptionLabel, customFieldText, decodeBadges, decodeBranding, decodeCustomFields, decodeNativePanes, defaultBranding, defaultCustomFieldVisibility, defaultNativePane, defaultOperatorForSource, encodeBadges, encodeBranding, encodeCustomFields, encodeNativePanes, evaluateCustomFieldCondition, evaluateCustomFieldVisibility, feeProgram, focusedCheckoutUrl, fontStack, fontWeightValue, inputPadValue, isCheckboxChecked, isDarkSurface, isHexColor, leaf, logoDimensions, nativePaneMethodInfo, parseCustomFieldsLoose, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue, visibleCustomFields };
6603
+ export { ALL_CUSTOM_FIELD_CONDITION_SOURCES, ALL_CUSTOM_FIELD_OPERATORS, ALL_CUSTOM_FIELD_TYPES, type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, type AmountRange, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BankCodeResponse, type BankDebitTypes, type BankTransferTypes, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CHECKBOX_CHECKED, CHECKBOX_UNCHECKED, CHECKOUT_EVENT_KINDS, CUSTOM_CSS_MAX_LENGTH, CUSTOM_FIELDS_MAX, CUSTOM_FIELD_CONDITIONS_MAX, CUSTOM_FIELD_KEY_PATTERN, CUSTOM_FIELD_OPERATORS_BY_SOURCE, CUSTOM_FIELD_VALUELESS_OPERATORS, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, type CardNetworkTypes, Cards, type ChangePasswordRequest, type CheckoutBranding, type CheckoutCustomField, type CheckoutEventKind, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type ConnectorWebhookSyncResponse, type ConnectorWebhookSyncResult, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomFieldCondition, type CustomFieldConditionSource, type CustomFieldContext, type CustomFieldOperator, type CustomFieldOption, type CustomFieldTranslations, type CustomFieldType, type CustomFieldVisibility, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceBlock, type DisputeEvidenceRequest, type DisputeEvidenceType, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleDefaultPrecedence, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FocusedCheckoutUrlParams, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type MethodSurcharge, type MinimalRoleInfo, NATIVE_PANES_MAX, NATIVE_PANE_CATEGORY_KEYS, NATIVE_PANE_ICON_KEYS, type NativePaneMethodInfo, type NativePaneOpenTarget, type NativePaneRail, type NativePaneView, type NativePaneVisibility, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentExperienceTypes, type PaymentIdFormatConfig, type PaymentIdStyle, type PaymentIntentStateMetadata, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodAmountLimits, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodDisplayInfo, type PaymentMethodListInstallmentAmountDetails, type PaymentMethodListInstallmentOption, type PaymentMethodListInstallmentPlan, type PaymentMethodListIntentData, type PaymentMethodListParams, type PaymentMethodListResponse, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentStatusHistoryEntityType, type PaymentStatusHistoryEvent, type PaymentStatusHistoryResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundAggregateResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type RequiredFieldInfo, type ResetPasswordRequest, type ResponsePaymentMethodTypes, type ResponsePaymentMethodsEnabled, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, STRIPE_NATIVE_PANE_METHODS, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type StripeNativePane, type StripePaymentMethodDomainResult, type StripePaymentMethodDomainStatus, type StripePaymentMethodDomainsRegisterRequest, type StripePaymentMethodDomainsRegisterResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeDetailsResponse, type SurchargeResponse, type SurchargeRuleRequest, type SurchargeRuleResponse, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, cloneCustomField, cloneNativePane, customFieldContextFromMetadata, customFieldIsTextLike, customFieldOperatorTakesValue, customFieldOptionLabel, customFieldText, decodeBadges, decodeBranding, decodeCustomFields, decodeNativePanes, defaultBranding, defaultCustomFieldVisibility, defaultNativePane, defaultOperatorForSource, encodeBadges, encodeBranding, encodeCustomFields, encodeNativePanes, evaluateCustomFieldCondition, evaluateCustomFieldVisibility, feeProgram, focusedCheckoutUrl, fontStack, fontWeightValue, inputPadValue, isCheckboxChecked, isDarkSurface, isHexColor, leaf, logoDimensions, nativePaneMethodInfo, parseCustomFieldsLoose, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue, visibleCustomFields };
package/dist/index.d.ts CHANGED
@@ -694,6 +694,20 @@ interface CustomerResponse {
694
694
  tax_registration_id?: string | null;
695
695
  /** Structured identity / KYC documents attached to the customer. */
696
696
  document_details?: Record<string, unknown> | null;
697
+ /**
698
+ * Shops (business profiles) this customer has transacted in, derived from
699
+ * their payments — the same rule the `profile_ids` list filter applies. A
700
+ * customer created but never charged belongs to no shop.
701
+ *
702
+ * Returned by `customers.retrieve` only. Deriving it costs a query per
703
+ * customer, so the list endpoints omit it: **absent means "not computed",
704
+ * not "no shops"**. An empty array is a real answer and stays
705
+ * distinguishable from a field nobody filled in.
706
+ *
707
+ * A shop-scoped caller only sees their own shop here — the server narrows
708
+ * the list to the caller's scope.
709
+ */
710
+ profile_ids?: string[] | null;
697
711
  }
698
712
  interface CustomerListParams {
699
713
  limit?: number | null;
@@ -705,6 +719,16 @@ interface CustomerListParams {
705
719
  * transacted appears under no shop.
706
720
  */
707
721
  profile_id?: string | null;
722
+ /**
723
+ * Filter customers by several shops at once. Unions with `profile_id` and
724
+ * `project_id` — a customer matches if they transacted in any of the
725
+ * resolved shops.
726
+ *
727
+ * Sent as a single comma-separated value (`profile_ids=pro_a,pro_b`); the
728
+ * SDK joins the array for you. Every id must belong to the calling
729
+ * merchant, otherwise the request is rejected with `AccessForbidden`.
730
+ */
731
+ profile_ids?: string[] | null;
708
732
  /**
709
733
  * Filter customers by project; expands to all shops (business profiles)
710
734
  * under that project.
@@ -1293,6 +1317,20 @@ interface ConnectorWebhookEntry {
1293
1317
  status?: string;
1294
1318
  /** Events the endpoint is subscribed to at the connector. */
1295
1319
  enabled_events?: string[];
1320
+ /**
1321
+ * Events Delopay handles that this endpoint is NOT subscribed to. A PSP
1322
+ * freezes an endpoint's event list at registration time, so an endpoint
1323
+ * registered before an event type was added keeps missing it — nothing
1324
+ * errors, the events simply never arrive.
1325
+ *
1326
+ * Empty means the subscription is current. Non-empty means those events are
1327
+ * being silently dropped; call
1328
+ * {@link Connectors.syncWebhookEvents | syncWebhookEvents} to fix it.
1329
+ * Absent when the subscription can't be inspected (non-Stripe connectors, or
1330
+ * a list reconstructed from stored metadata) — which is not the same as
1331
+ * "checked and healthy".
1332
+ */
1333
+ missing_events?: string[];
1296
1334
  /** Unix timestamp (seconds) the endpoint was created at the connector. */
1297
1335
  created_at?: number;
1298
1336
  }
@@ -1300,6 +1338,33 @@ interface ConnectorWebhookListResponse {
1300
1338
  connector: string;
1301
1339
  webhooks: ConnectorWebhookEntry[];
1302
1340
  }
1341
+ /** One endpoint's outcome from `syncWebhookEvents`. */
1342
+ interface ConnectorWebhookSyncResult {
1343
+ connector_webhook_id: string;
1344
+ environment?: WebhookRegistrationEnvironment;
1345
+ webhook_url?: string;
1346
+ /** Endpoint status as the connector reports it (e.g. `enabled`/`disabled`). */
1347
+ status?: string;
1348
+ /**
1349
+ * Whether the subscription was actually rewritten. `false` with an empty
1350
+ * `added_events` means it was already current.
1351
+ */
1352
+ updated: boolean;
1353
+ /** Events that were missing and have now been subscribed. */
1354
+ added_events: string[];
1355
+ /** Set when this endpoint could not be updated; the others are unaffected. */
1356
+ error_message?: string;
1357
+ }
1358
+ interface ConnectorWebhookSyncResponse {
1359
+ connector: string;
1360
+ /** The full event set Delopay expects to be subscribed to. */
1361
+ expected_events: string[];
1362
+ /**
1363
+ * One entry per endpoint registered at this connector account, across every
1364
+ * credential set whose endpoints could be listed.
1365
+ */
1366
+ endpoints: ConnectorWebhookSyncResult[];
1367
+ }
1303
1368
  /**
1304
1369
  * Body for
1305
1370
  * `POST /account/{merchantId}/connectors/{connectorId}/stripe/payment-method-domains`.
@@ -3298,7 +3363,14 @@ interface AvailabilityPreviewResponse {
3298
3363
  * dashboard (or any client) uses these to hide UI elements for actions
3299
3364
  * the caller's role cannot perform, via `getRolePermissions()`.
3300
3365
  */
3301
- type ParentGroup = 'Operations' | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails';
3366
+ type ParentGroup = 'Operations' | 'Refunds' | 'Connectors' | 'Workflows' | 'Analytics' | 'Users' | 'Account' | 'ReconOps' | 'ReconReports' | 'Internal' | 'Theme' | 'ShopDetails' | 'ApiKeys' | 'Impersonation' | 'Settlement'
3367
+ /**
3368
+ * Whether the caller may open a transaction in the payment provider's own
3369
+ * dashboard. Gates discoverability of the deep link, not access — the id it
3370
+ * is built from is already on every payment, and the provider authenticates
3371
+ * the user itself. `Read` is the only scope.
3372
+ */
3373
+ | 'ConnectorDashboard';
3302
3374
  /** Two scopes — `Read` allows viewing, `Write` is required for any mutation. */
3303
3375
  type PermissionScope = 'Read' | 'Write';
3304
3376
  /**
@@ -3757,6 +3829,31 @@ declare class Connectors {
3757
3829
  registerStripePaymentMethodDomains(merchantId: string, connectorId: string, params: StripePaymentMethodDomainsRegisterRequest): Promise<StripePaymentMethodDomainsRegisterResponse>;
3758
3830
  /** Get registered webhooks for a connector. `GET /account/{merchantId}/connectors/webhooks/{connectorId}` */
3759
3831
  getWebhook(merchantId: string, connectorId: string): Promise<ConnectorWebhookListResponse>;
3832
+ /**
3833
+ * Bring an already-registered webhook's event subscription up to date with
3834
+ * the events Delopay handles.
3835
+ * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/sync-events`
3836
+ *
3837
+ * A PSP freezes an endpoint's event list at registration time, so an endpoint
3838
+ * created before an event type was added never receives it — silently, with
3839
+ * no error anywhere. {@link getWebhook} reports the gap as `missing_events`;
3840
+ * this repairs it.
3841
+ *
3842
+ * Unlike re-registering, the endpoints are updated in place: the endpoint id
3843
+ * and its signing secret are preserved, so signature verification keeps
3844
+ * working across the change. Stripe connectors only; idempotent, so it is
3845
+ * safe to call on a schedule or after every deploy.
3846
+ *
3847
+ * @example
3848
+ * ```typescript
3849
+ * const sync = await delopay.connectors.syncWebhookEvents('mer_abc', 'mca_xyz');
3850
+ * for (const endpoint of sync.endpoints) {
3851
+ * if (endpoint.error_message) console.warn(endpoint.connector_webhook_id, endpoint.error_message);
3852
+ * else if (endpoint.updated) console.log('subscribed', endpoint.added_events);
3853
+ * }
3854
+ * ```
3855
+ */
3856
+ syncWebhookEvents(merchantId: string, connectorId: string): Promise<ConnectorWebhookSyncResponse>;
3760
3857
  /** List available payment methods. `GET /account/payment-methods` */
3761
3858
  listPaymentMethods(): Promise<Record<string, unknown>[]>;
3762
3859
  }
@@ -3818,6 +3915,11 @@ declare class Customers {
3818
3915
  * ```typescript
3819
3916
  * // Customers who have transacted in a specific shop.
3820
3917
  * const customers = await delopay.customers.list({ profile_id: 'pro_abc123' });
3918
+ *
3919
+ * // Several shops at once (unions with profile_id / project_id).
3920
+ * const many = await delopay.customers.list({
3921
+ * profile_ids: ['pro_abc123', 'pro_def456'],
3922
+ * });
3821
3923
  * ```
3822
3924
  */
3823
3925
  list(params?: CustomerListParams): Promise<CustomerResponse[]>;
@@ -6498,4 +6600,4 @@ declare function focusedCheckoutUrl(params: FocusedCheckoutUrlParams): string;
6498
6600
  declare const CHECKOUT_EVENT_KINDS: readonly ["native_pane_selected", "native_pane_tab_opened", "native_pane_tab_blocked", "native_pane_abandoned", "native_pane_returned"];
6499
6601
  type CheckoutEventKind = (typeof CHECKOUT_EVENT_KINDS)[number];
6500
6602
 
6501
- export { ALL_CUSTOM_FIELD_CONDITION_SOURCES, ALL_CUSTOM_FIELD_OPERATORS, ALL_CUSTOM_FIELD_TYPES, type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, type AmountRange, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BankCodeResponse, type BankDebitTypes, type BankTransferTypes, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CHECKBOX_CHECKED, CHECKBOX_UNCHECKED, CHECKOUT_EVENT_KINDS, CUSTOM_CSS_MAX_LENGTH, CUSTOM_FIELDS_MAX, CUSTOM_FIELD_CONDITIONS_MAX, CUSTOM_FIELD_KEY_PATTERN, CUSTOM_FIELD_OPERATORS_BY_SOURCE, CUSTOM_FIELD_VALUELESS_OPERATORS, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, type CardNetworkTypes, Cards, type ChangePasswordRequest, type CheckoutBranding, type CheckoutCustomField, type CheckoutEventKind, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomFieldCondition, type CustomFieldConditionSource, type CustomFieldContext, type CustomFieldOperator, type CustomFieldOption, type CustomFieldTranslations, type CustomFieldType, type CustomFieldVisibility, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceBlock, type DisputeEvidenceRequest, type DisputeEvidenceType, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleDefaultPrecedence, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FocusedCheckoutUrlParams, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type MethodSurcharge, type MinimalRoleInfo, NATIVE_PANES_MAX, NATIVE_PANE_CATEGORY_KEYS, NATIVE_PANE_ICON_KEYS, type NativePaneMethodInfo, type NativePaneOpenTarget, type NativePaneRail, type NativePaneView, type NativePaneVisibility, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentExperienceTypes, type PaymentIdFormatConfig, type PaymentIdStyle, type PaymentIntentStateMetadata, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodAmountLimits, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodDisplayInfo, type PaymentMethodListInstallmentAmountDetails, type PaymentMethodListInstallmentOption, type PaymentMethodListInstallmentPlan, type PaymentMethodListIntentData, type PaymentMethodListParams, type PaymentMethodListResponse, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentStatusHistoryEntityType, type PaymentStatusHistoryEvent, type PaymentStatusHistoryResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundAggregateResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type RequiredFieldInfo, type ResetPasswordRequest, type ResponsePaymentMethodTypes, type ResponsePaymentMethodsEnabled, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, STRIPE_NATIVE_PANE_METHODS, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type StripeNativePane, type StripePaymentMethodDomainResult, type StripePaymentMethodDomainStatus, type StripePaymentMethodDomainsRegisterRequest, type StripePaymentMethodDomainsRegisterResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeDetailsResponse, type SurchargeResponse, type SurchargeRuleRequest, type SurchargeRuleResponse, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, cloneCustomField, cloneNativePane, customFieldContextFromMetadata, customFieldIsTextLike, customFieldOperatorTakesValue, customFieldOptionLabel, customFieldText, decodeBadges, decodeBranding, decodeCustomFields, decodeNativePanes, defaultBranding, defaultCustomFieldVisibility, defaultNativePane, defaultOperatorForSource, encodeBadges, encodeBranding, encodeCustomFields, encodeNativePanes, evaluateCustomFieldCondition, evaluateCustomFieldVisibility, feeProgram, focusedCheckoutUrl, fontStack, fontWeightValue, inputPadValue, isCheckboxChecked, isDarkSurface, isHexColor, leaf, logoDimensions, nativePaneMethodInfo, parseCustomFieldsLoose, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue, visibleCustomFields };
6603
+ export { ALL_CUSTOM_FIELD_CONDITION_SOURCES, ALL_CUSTOM_FIELD_OPERATORS, ALL_CUSTOM_FIELD_TYPES, type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, type AmountRange, Analytics, type AnalyticsChild, type AnalyticsConnectorDay, type AnalyticsConnectorSeries, AnalyticsDashboard, type AnalyticsDayBucket, type AnalyticsMethodSlice, type AnalyticsScopeRequest, type AnalyticsScopeResponse, type ApiKeyCreateRequest, type ApiKeyCreateResponse, type ApiKeyExpiration, type ApiKeyListConstraints, type ApiKeyResponse, type ApiKeyRevokeResponse, type ApiKeyUpdateRequest, type ApplePayVerificationRequest, type ApplePayVerificationResponse, type ApplePayVerifiedDomainsResponse, type AttemptStatus, type AuthResponse, type AuthenticationCreateRequest, type AuthenticationResponse, type AuthenticationStatus, type AuthenticationType, type AutoRechargeConfig, type AutoRechargeUpdateRequest, type AvailabilityOverrideCreateRequest, type AvailabilityOverrideResponse, AvailabilityOverrides, type AvailabilityPreviewMethod, type AvailabilityPreviewParams, type AvailabilityPreviewResponse, BRANDING_EXPORT_FORMAT, BRANDING_EXPORT_VERSION, type BankCodeResponse, type BankDebitTypes, type BankTransferTypes, type BillingCompleteSetupRequest, type BillingProfileResponse, type BillingSetupRequest, type BillingSetupResponse, type BlockedAttempt, type BlockedAttemptListParams, type BlockedAttemptListResponse, type BlocklistAddRequest, type BlocklistDataKind, type BlocklistResponse, type BrandingExport, type BrandingSource, type BuiltInRegionGroupResponse, type BusinessPaymentLinkConfig, CHECKBOX_CHECKED, CHECKBOX_UNCHECKED, CHECKOUT_EVENT_KINDS, CUSTOM_CSS_MAX_LENGTH, CUSTOM_FIELDS_MAX, CUSTOM_FIELD_CONDITIONS_MAX, CUSTOM_FIELD_KEY_PATTERN, CUSTOM_FIELD_OPERATORS_BY_SOURCE, CUSTOM_FIELD_VALUELESS_OPERATORS, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, type CardNetworkTypes, Cards, type ChangePasswordRequest, type CheckoutBranding, type CheckoutCustomField, type CheckoutEventKind, type ConditionNode, type ConfirmSubscriptionPaymentDetails, type ConfirmSubscriptionRequest, type ConfirmSubscriptionResponse, type Connector, type ConnectorCloneRequest, type ConnectorCreateRequest, type ConnectorListResponse, type ConnectorResponse, type ConnectorSelection, type ConnectorType, type ConnectorUpdateRequest, type ConnectorVolumeSplit, type ConnectorWebhookEntry, type ConnectorWebhookEventType, type ConnectorWebhookListResponse, type ConnectorWebhookRegisterRequest, type ConnectorWebhookRegisterResponse, type ConnectorWebhookSyncResponse, type ConnectorWebhookSyncResult, type CornerRadius, type CreateAndConfirmSubscriptionRequest, type CreateSubscriptionPaymentDetails, type CreateSubscriptionRequest, type Currency, type CurrencyRevenue, type CustomFieldCondition, type CustomFieldConditionSource, type CustomFieldContext, type CustomFieldOperator, type CustomFieldOption, type CustomFieldTranslations, type CustomFieldType, type CustomFieldVisibility, type CustomerCreateRequest, type CustomerListParams, type CustomerPaymentMethodsListParams, type CustomerPaymentMethodsListResponse, type CustomerResponse, type CustomerUpdateRequest, DEFAULT_BADGES, DEFAULT_BADGES_DARK, DEFAULT_BRANDING, DEFAULT_BRANDING_DARK, type DeleteAccountRequest, type DeleteUserRoleRequest, Delopay, DelopayAuthenticationError, DelopayError, type DelopayLogger, type DelopayOptions, type DisputeEvidenceBlock, type DisputeEvidenceRequest, type DisputeEvidenceType, type DisputeListParams, type DisputeResponse, type DisputeStage, type DisputeStatus, type EncodedBranding, type EphemeralKeyCreateRequest, type EphemeralKeyCreateResponse, type EuclidComparison, type EuclidComparisonType, type EuclidIfStatement, type EuclidValue, type EventClass, type EventDeliveryAttemptResponse, type EventDetailResponse, type EventListParams, type EventListResponse, type EventResponse, type EventType, Export, FeatureMatrix, type FeeOwner, FeeProgramBuilder, type FeeRuleConditions, type FeeRuleDefaultPrecedence, type FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, type FocusedCheckoutUrlParams, type FontFamily, type FontWeight, Forex, type ForgotPasswordRequest, type FromEmailRequest, type FutureUsage, type GatewayConnectRequest, type GatewayResponse, type GetSubscriptionItemsParams, type GetSubscriptionItemsResponse, type GlobalSearchRequest, type GroupNode, type ImpersonateEmployeeRequest, type IntentStatus, type InviteUsersRequest, type InviteUsersResponse, type InvoiceStatus, type LabelStyle, type LayoutStyle, type LeafNode, type LedgerEntry, type LedgerListParams, type LedgerResponse, type LinkedRoutingConfigRetrieveResponse, type ListInvitableRolesParams, type ListUsersInLineageParams, type LoginHistoryEntry, type LoginHistoryParams, type LoginHistoryResponse, type LogoShape, type LogoSize, type MandateListParams, type MandateResponse, type MandateRevokedResponse, type MandateStatus, type MandateType, type MerchantAccountCreateRequest, type MerchantAccountResponse, type MerchantAccountType, type MerchantAccountUpdateRequest, type MerchantOverviewResponse, type MerchantOverviewStat, type MerchantRoutingAlgorithm, type MethodSurcharge, type MinimalRoleInfo, NATIVE_PANES_MAX, NATIVE_PANE_CATEGORY_KEYS, NATIVE_PANE_ICON_KEYS, type NativePaneMethodInfo, type NativePaneOpenTarget, type NativePaneRail, type NativePaneView, type NativePaneVisibility, type NonPillRadius, type OverrideAction, type OverrideScope, type ParentGroup, type ParentGroupInfo, type PauseSubscriptionRequest, type PauseSubscriptionResponse, type PaymentAttemptResponse, type PaymentAttemptsListResponse, type PaymentCancelRequest, type PaymentCaptureRequest, type PaymentConfirmRequest, type PaymentCreateRequest, type PaymentErrorDetails, type PaymentExperience, type PaymentExperienceTypes, type PaymentIdFormatConfig, type PaymentIdStyle, type PaymentIntentStateMetadata, type PaymentLayout, type PaymentLinkBackgroundImageConfig, type PaymentLinkConfigRequest, type PaymentLinkListParams, type PaymentLinkListResponse, type PaymentLinkResponse, type PaymentLinkTransactionDetails, type PaymentListParams, type PaymentListResponse, type PaymentMethod, type PaymentMethodAmountLimits, type PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodDisplayInfo, type PaymentMethodListInstallmentAmountDetails, type PaymentMethodListInstallmentOption, type PaymentMethodListInstallmentPlan, type PaymentMethodListIntentData, type PaymentMethodListParams, type PaymentMethodListResponse, type PaymentMethodResponse, type PaymentMethodType, type PaymentMethodUpdateRequest, type PaymentResponse, type PaymentRetrieveOptions, type PaymentStatusHistoryEntityType, type PaymentStatusHistoryEvent, type PaymentStatusHistoryResponse, type PaymentUpdateRequest, type PayoutCreateRequest, type PayoutListParams, type PayoutListResponse, type PayoutResponse, type PayoutStatus, type PayoutType, type PayoutUpdateRequest, type PerMethodSurchargeItem, type PermissionScope, type PhoneDetails, type PhoneOtpRequest, type PhoneOtpResponse, type PhoneOtpVerifyRequest, type PhoneOtpVerifyResponse, type PlatformFeeKind, type PlatformFeeOutput, type PlatformFeeProgram, type PlatformFeeRule, type PlatformFeeRuleInput, type PlatformFeeRuleOutput, type PlatformFeeRuleRecord, type PlatformFeeRuleRequest, type PollStatus, type PollStatusResponse, type ProfileAcquirerCreateRequest, type ProfileAcquirerResponse, type ProfileAcquirerUpdateRequest, type ProfileCreateRequest, type ProfileDefaultRoutingConfig, type ProfileDeniedConnectorsResponse, type ProfileLogoUploadResponse, type ProfileResponse, type ProfileUpdateRequest, type ProgramConnectorSelection, type ProjectCreateRequest, type ProjectResponse, type ProjectStats, type ProjectStatsResponse, type ProjectUpdateRequest, type RecoveryCodesResponse, type RefundAggregateResponse, type RefundCreateRequest, type RefundListParams, type RefundListResponse, type RefundResponse, type RefundStatus, type RefundType, type RefundUpdateRequest, type RegionCountriesResponse, type RegionCreateRequest, type RegionResponse, type RegionSetCountriesRequest, type RegionUpdateRequest, Regions, type RelayRequest, type RelayResponse, type RelayStatus, type RelayType, type RequestExtras, type RequestFn, type RequestOptions, type RequiredFieldInfo, type ResetPasswordRequest, type ResponsePaymentMethodTypes, type ResponsePaymentMethodsEnabled, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, STRIPE_NATIVE_PANE_METHODS, Search, type SearchGroupResponse, type SearchIndex, type SearchStatus, type ShopCreateRequest, type ShopResponse, type ShopStats, type ShopStatsResponse, type ShopUpdateRequest, type SignInRequest, type SignUpRequest, type SignUpWithMerchantIdRequest, type SignUpWithMerchantRequest, type SizeScale, type SpacingScale, type StaticRoutingAlgorithm, type StatsPeriod, type StripeConnectAccountRequest, type StripeConnectAccountResponse, type StripeConnectLinkRequest, type StripeConnectLinkResponse, type StripeNativePane, type StripePaymentMethodDomainResult, type StripePaymentMethodDomainStatus, type StripePaymentMethodDomainsRegisterRequest, type StripePaymentMethodDomainsRegisterResponse, type SubscriptionEstimateParams, type SubscriptionEstimateResponse, type SubscriptionInvoice, type SubscriptionItem, type SubscriptionItemPrice, type SubscriptionItemType, type SubscriptionLineItem, type SubscriptionListParams, type SubscriptionPaymentData, type SubscriptionPaymentDetails, type SubscriptionPeriodUnit, type SubscriptionResponse, type SubscriptionStatus, Subscriptions, type SummaryPosition, type SurchargeDetailsResponse, type SurchargeResponse, type SurchargeRuleRequest, type SurchargeRuleResponse, type SurfaceStyle, type SwitchMerchantRequest, type SwitchProfileRequest, type Terminate2faQueryParams, type ThreeDSDecision, type ThreeDsRuleExecuteRequest, type ThreeDsRuleResponse, type TierSummary, type TokenPurpose, type TokenResponse, type TopupRequest, type TopupResponse, type TotpResponse, type TransactionType, type TrustBadge, type UpdateSubscriptionRequest, type UpdateUserDetailsRequest, type UpdateUserRoleRequest, type UserInLineage, type UserResponse, type UserSessionEntry, type UserSessionListResponse, type UserSessionRevokeResponse, type VerifyTotpRequest, type WebhookDeliveryAttempt, type WebhookEvent, type WebhookRegistrationEnvironment, Webhooks, allOf, anyOf, applyBrandingVariables, buildBrandingExport, buttonPadValue, cloneBranding, cloneCustomField, cloneNativePane, customFieldContextFromMetadata, customFieldIsTextLike, customFieldOperatorTakesValue, customFieldOptionLabel, customFieldText, decodeBadges, decodeBranding, decodeCustomFields, decodeNativePanes, defaultBranding, defaultCustomFieldVisibility, defaultNativePane, defaultOperatorForSource, encodeBadges, encodeBranding, encodeCustomFields, encodeNativePanes, evaluateCustomFieldCondition, evaluateCustomFieldVisibility, feeProgram, focusedCheckoutUrl, fontStack, fontWeightValue, inputPadValue, isCheckboxChecked, isDarkSurface, isHexColor, leaf, logoDimensions, nativePaneMethodInfo, parseCustomFieldsLoose, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue, visibleCustomFields };
package/dist/index.js CHANGED
@@ -85,7 +85,7 @@ import {
85
85
  surfacePadValue,
86
86
  verticalGapValue,
87
87
  visibleCustomFields
88
- } from "./chunk-PHKXFVHZ.js";
88
+ } from "./chunk-G44EQT6Q.js";
89
89
  export {
90
90
  ALL_CUSTOM_FIELD_CONDITION_SOURCES,
91
91
  ALL_CUSTOM_FIELD_OPERATORS,
package/dist/internal.cjs CHANGED
@@ -630,6 +630,36 @@ var Connectors = class {
630
630
  `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}`
631
631
  );
632
632
  }
633
+ /**
634
+ * Bring an already-registered webhook's event subscription up to date with
635
+ * the events Delopay handles.
636
+ * `POST /account/{merchantId}/connectors/webhooks/{connectorId}/sync-events`
637
+ *
638
+ * A PSP freezes an endpoint's event list at registration time, so an endpoint
639
+ * created before an event type was added never receives it — silently, with
640
+ * no error anywhere. {@link getWebhook} reports the gap as `missing_events`;
641
+ * this repairs it.
642
+ *
643
+ * Unlike re-registering, the endpoints are updated in place: the endpoint id
644
+ * and its signing secret are preserved, so signature verification keeps
645
+ * working across the change. Stripe connectors only; idempotent, so it is
646
+ * safe to call on a schedule or after every deploy.
647
+ *
648
+ * @example
649
+ * ```typescript
650
+ * const sync = await delopay.connectors.syncWebhookEvents('mer_abc', 'mca_xyz');
651
+ * for (const endpoint of sync.endpoints) {
652
+ * if (endpoint.error_message) console.warn(endpoint.connector_webhook_id, endpoint.error_message);
653
+ * else if (endpoint.updated) console.log('subscribed', endpoint.added_events);
654
+ * }
655
+ * ```
656
+ */
657
+ async syncWebhookEvents(merchantId, connectorId) {
658
+ return this.request(
659
+ "POST",
660
+ `/account/${encodeURIComponent(merchantId)}/connectors/webhooks/${encodeURIComponent(connectorId)}/sync-events`
661
+ );
662
+ }
633
663
  /** List available payment methods. `GET /account/payment-methods` */
634
664
  async listPaymentMethods() {
635
665
  return this.request("GET", "/account/payment-methods");
@@ -637,6 +667,15 @@ var Connectors = class {
637
667
  };
638
668
 
639
669
  // src/resources/customers.ts
670
+ function toQuery(params) {
671
+ if (!params) return void 0;
672
+ const { profile_ids, ...rest } = params;
673
+ const query = rest;
674
+ if (profile_ids && profile_ids.length > 0) {
675
+ query.profile_ids = profile_ids.join(",");
676
+ }
677
+ return query;
678
+ }
640
679
  var Customers = class {
641
680
  constructor(request) {
642
681
  this.request = request;
@@ -702,11 +741,16 @@ var Customers = class {
702
741
  * ```typescript
703
742
  * // Customers who have transacted in a specific shop.
704
743
  * const customers = await delopay.customers.list({ profile_id: 'pro_abc123' });
744
+ *
745
+ * // Several shops at once (unions with profile_id / project_id).
746
+ * const many = await delopay.customers.list({
747
+ * profile_ids: ['pro_abc123', 'pro_def456'],
748
+ * });
705
749
  * ```
706
750
  */
707
751
  async list(params) {
708
752
  return this.request("GET", "/customers/list", {
709
- query: params
753
+ query: toQuery(params)
710
754
  });
711
755
  }
712
756
  // --- OLAP extensions (Task 4.6) ---
@@ -716,7 +760,7 @@ var Customers = class {
716
760
  */
717
761
  async listWithCount(params) {
718
762
  return this.request("GET", "/customers/list-with-count", {
719
- query: params
763
+ query: toQuery(params)
720
764
  });
721
765
  }
722
766
  /**
@@ -730,7 +774,7 @@ var Customers = class {
730
774
  */
731
775
  async listByProfile(params) {
732
776
  return this.request("GET", "/customers/profile/list", {
733
- query: params
777
+ query: toQuery(params)
734
778
  });
735
779
  }
736
780
  /**
@@ -739,7 +783,7 @@ var Customers = class {
739
783
  */
740
784
  async listByProfileWithCount(params) {
741
785
  return this.request("GET", "/customers/profile/list-with-count", {
742
- query: params
786
+ query: toQuery(params)
743
787
  });
744
788
  }
745
789
  /** List mandates for a customer. `GET /customers/{customerId}/mandates` */