@delopay/sdk 0.74.0 → 0.76.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/{chunk-5FA2IFIU.js → chunk-D7DPAKI2.js} +231 -11
- package/dist/{chunk-5FA2IFIU.js.map → chunk-D7DPAKI2.js.map} +1 -1
- package/dist/index.cjs +248 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +61 -2
- package/dist/index.d.ts +61 -2
- package/dist/index.js +35 -3
- package/dist/internal.cjs +248 -12
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +35 -3
- package/dist/internal.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.cts
CHANGED
|
@@ -5717,13 +5717,27 @@ interface TrustBadge {
|
|
|
5717
5717
|
backgroundColor: string;
|
|
5718
5718
|
borderColor: string | null;
|
|
5719
5719
|
}
|
|
5720
|
-
type CustomFieldType = 'text' | 'textarea' | 'password' | 'email' | 'select';
|
|
5720
|
+
type CustomFieldType = 'text' | 'textarea' | 'password' | 'email' | 'select' | 'checkbox';
|
|
5721
5721
|
type CustomFieldTranslations = Record<string, string>;
|
|
5722
5722
|
interface CustomFieldOption {
|
|
5723
5723
|
value: string;
|
|
5724
5724
|
label: string;
|
|
5725
5725
|
labelTranslations: CustomFieldTranslations;
|
|
5726
5726
|
}
|
|
5727
|
+
type CustomFieldConditionSource = 'metadata' | 'currency' | 'amount';
|
|
5728
|
+
type CustomFieldOperator = 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'not_exists' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
5729
|
+
interface CustomFieldCondition {
|
|
5730
|
+
id: string;
|
|
5731
|
+
source: CustomFieldConditionSource;
|
|
5732
|
+
key: string;
|
|
5733
|
+
operator: CustomFieldOperator;
|
|
5734
|
+
value: string;
|
|
5735
|
+
}
|
|
5736
|
+
interface CustomFieldVisibility {
|
|
5737
|
+
mode: 'always' | 'match';
|
|
5738
|
+
match: 'all' | 'any';
|
|
5739
|
+
conditions: CustomFieldCondition[];
|
|
5740
|
+
}
|
|
5727
5741
|
interface CheckoutCustomField {
|
|
5728
5742
|
id: string;
|
|
5729
5743
|
key: string;
|
|
@@ -5740,6 +5754,7 @@ interface CheckoutCustomField {
|
|
|
5740
5754
|
maxLength: number | null;
|
|
5741
5755
|
defaultValue: string;
|
|
5742
5756
|
options: CustomFieldOption[];
|
|
5757
|
+
visibility: CustomFieldVisibility;
|
|
5743
5758
|
}
|
|
5744
5759
|
interface CheckoutBranding {
|
|
5745
5760
|
displayName: string;
|
|
@@ -5834,9 +5849,53 @@ declare function encodeBadges(badges: TrustBadge[]): string;
|
|
|
5834
5849
|
declare const CUSTOM_FIELDS_MAX = 20;
|
|
5835
5850
|
declare const CUSTOM_FIELD_KEY_PATTERN: RegExp;
|
|
5836
5851
|
declare const ALL_CUSTOM_FIELD_TYPES: readonly CustomFieldType[];
|
|
5852
|
+
declare const CHECKBOX_CHECKED = "true";
|
|
5853
|
+
declare const CHECKBOX_UNCHECKED = "false";
|
|
5854
|
+
/** Whether a stored/submitted checkbox value counts as ticked. Tolerant of
|
|
5855
|
+
* case and padding so a value round-tripped through a shop integration
|
|
5856
|
+
* ('True', ' true ') still reads correctly. */
|
|
5857
|
+
declare function isCheckboxChecked(value: string | null | undefined): boolean;
|
|
5858
|
+
/** Types whose value is free text, so length bounds and a placeholder apply.
|
|
5859
|
+
* `select` and `checkbox` are choice controls and have neither. */
|
|
5860
|
+
declare function customFieldIsTextLike(type: CustomFieldType): boolean;
|
|
5861
|
+
declare const CUSTOM_FIELD_CONDITIONS_MAX = 10;
|
|
5862
|
+
declare const ALL_CUSTOM_FIELD_CONDITION_SOURCES: readonly CustomFieldConditionSource[];
|
|
5863
|
+
declare const ALL_CUSTOM_FIELD_OPERATORS: readonly CustomFieldOperator[];
|
|
5864
|
+
declare const CUSTOM_FIELD_OPERATORS_BY_SOURCE: Record<CustomFieldConditionSource, readonly CustomFieldOperator[]>;
|
|
5865
|
+
declare const CUSTOM_FIELD_VALUELESS_OPERATORS: readonly CustomFieldOperator[];
|
|
5866
|
+
declare function customFieldOperatorTakesValue(operator: CustomFieldOperator): boolean;
|
|
5867
|
+
declare function defaultOperatorForSource(source: CustomFieldConditionSource): CustomFieldOperator;
|
|
5868
|
+
declare function defaultCustomFieldVisibility(): CustomFieldVisibility;
|
|
5837
5869
|
declare function parseCustomFieldsLoose(raw: unknown): CheckoutCustomField[] | null;
|
|
5838
5870
|
declare function decodeCustomFields(raw: string | undefined): CheckoutCustomField[] | null;
|
|
5839
5871
|
declare function encodeCustomFields(fields: CheckoutCustomField[]): string;
|
|
5872
|
+
/** Facts a rule can read. `amount` is in the currency's minor unit (what
|
|
5873
|
+
* the payment intent stores); `metadata` values are already flattened to
|
|
5874
|
+
* strings by `customFieldContextFromMetadata`. */
|
|
5875
|
+
interface CustomFieldContext {
|
|
5876
|
+
amount: number;
|
|
5877
|
+
currency: string;
|
|
5878
|
+
metadata: Record<string, string>;
|
|
5879
|
+
}
|
|
5880
|
+
/** Flatten a payment's raw `metadata` object into the string map a rule
|
|
5881
|
+
* compares against. Arrays join on `,` so a list-shaped value stays usable
|
|
5882
|
+
* with `contains` / `in`; objects fall back to JSON. Mirrors the Rust
|
|
5883
|
+
* side's `flatten_metadata`. */
|
|
5884
|
+
declare function customFieldContextFromMetadata(raw: unknown): Record<string, string>;
|
|
5885
|
+
declare function evaluateCustomFieldCondition(condition: CustomFieldCondition, ctx: CustomFieldContext): boolean;
|
|
5886
|
+
/**
|
|
5887
|
+
* Whether a field's rule matches the payment.
|
|
5888
|
+
*
|
|
5889
|
+
* Fail-open in two spots, deliberately: `mode: 'always'` and a `match` rule
|
|
5890
|
+
* with no conditions both resolve to visible. A half-authored rule should
|
|
5891
|
+
* never silently swallow a field the merchant needs collected — the
|
|
5892
|
+
* control-center flags the empty rule as a validation issue instead.
|
|
5893
|
+
*/
|
|
5894
|
+
declare function evaluateCustomFieldVisibility(field: CheckoutCustomField, ctx: CustomFieldContext): boolean;
|
|
5895
|
+
/** Filter a field list to what the buyer should see for this payment.
|
|
5896
|
+
* Disabled fields are dropped here too — the two reasons a field doesn't
|
|
5897
|
+
* render are the same to every consumer. */
|
|
5898
|
+
declare function visibleCustomFields(fields: CheckoutCustomField[], ctx: CustomFieldContext): CheckoutCustomField[];
|
|
5840
5899
|
declare function customFieldText(field: CheckoutCustomField, part: 'label' | 'placeholder' | 'helpText', locale?: string): string;
|
|
5841
5900
|
declare function customFieldOptionLabel(option: CustomFieldOption, locale?: string): string;
|
|
5842
5901
|
declare function decodeBranding(source: BrandingSource | null | undefined): CheckoutBranding;
|
|
@@ -5869,4 +5928,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
5869
5928
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
5870
5929
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
5871
5930
|
|
|
5872
|
-
export { ALL_CUSTOM_FIELD_TYPES, type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, 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 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, CUSTOM_CSS_MAX_LENGTH, CUSTOM_FIELDS_MAX, CUSTOM_FIELD_KEY_PATTERN, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type CheckoutCustomField, 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 CustomFieldOption, type CustomFieldTranslations, type CustomFieldType, 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 FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, 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, 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 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 PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, 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 ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, 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 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 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, customFieldOptionLabel, customFieldText, decodeBadges, decodeBranding, decodeCustomFields, defaultBranding, encodeBadges, encodeBranding, encodeCustomFields, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, leaf, logoDimensions, parseCustomFieldsLoose, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
|
5931
|
+
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, 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 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, 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, Cards, type ChangePasswordRequest, type CheckoutBranding, type CheckoutCustomField, 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 FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, 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, 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 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 PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, 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 ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, 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 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 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, customFieldContextFromMetadata, customFieldIsTextLike, customFieldOperatorTakesValue, customFieldOptionLabel, customFieldText, decodeBadges, decodeBranding, decodeCustomFields, defaultBranding, defaultCustomFieldVisibility, defaultOperatorForSource, encodeBadges, encodeBranding, encodeCustomFields, evaluateCustomFieldCondition, evaluateCustomFieldVisibility, feeProgram, fontStack, fontWeightValue, inputPadValue, isCheckboxChecked, isDarkSurface, isHexColor, leaf, logoDimensions, parseCustomFieldsLoose, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue, visibleCustomFields };
|
package/dist/index.d.ts
CHANGED
|
@@ -5717,13 +5717,27 @@ interface TrustBadge {
|
|
|
5717
5717
|
backgroundColor: string;
|
|
5718
5718
|
borderColor: string | null;
|
|
5719
5719
|
}
|
|
5720
|
-
type CustomFieldType = 'text' | 'textarea' | 'password' | 'email' | 'select';
|
|
5720
|
+
type CustomFieldType = 'text' | 'textarea' | 'password' | 'email' | 'select' | 'checkbox';
|
|
5721
5721
|
type CustomFieldTranslations = Record<string, string>;
|
|
5722
5722
|
interface CustomFieldOption {
|
|
5723
5723
|
value: string;
|
|
5724
5724
|
label: string;
|
|
5725
5725
|
labelTranslations: CustomFieldTranslations;
|
|
5726
5726
|
}
|
|
5727
|
+
type CustomFieldConditionSource = 'metadata' | 'currency' | 'amount';
|
|
5728
|
+
type CustomFieldOperator = 'equals' | 'not_equals' | 'contains' | 'not_contains' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'exists' | 'not_exists' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
5729
|
+
interface CustomFieldCondition {
|
|
5730
|
+
id: string;
|
|
5731
|
+
source: CustomFieldConditionSource;
|
|
5732
|
+
key: string;
|
|
5733
|
+
operator: CustomFieldOperator;
|
|
5734
|
+
value: string;
|
|
5735
|
+
}
|
|
5736
|
+
interface CustomFieldVisibility {
|
|
5737
|
+
mode: 'always' | 'match';
|
|
5738
|
+
match: 'all' | 'any';
|
|
5739
|
+
conditions: CustomFieldCondition[];
|
|
5740
|
+
}
|
|
5727
5741
|
interface CheckoutCustomField {
|
|
5728
5742
|
id: string;
|
|
5729
5743
|
key: string;
|
|
@@ -5740,6 +5754,7 @@ interface CheckoutCustomField {
|
|
|
5740
5754
|
maxLength: number | null;
|
|
5741
5755
|
defaultValue: string;
|
|
5742
5756
|
options: CustomFieldOption[];
|
|
5757
|
+
visibility: CustomFieldVisibility;
|
|
5743
5758
|
}
|
|
5744
5759
|
interface CheckoutBranding {
|
|
5745
5760
|
displayName: string;
|
|
@@ -5834,9 +5849,53 @@ declare function encodeBadges(badges: TrustBadge[]): string;
|
|
|
5834
5849
|
declare const CUSTOM_FIELDS_MAX = 20;
|
|
5835
5850
|
declare const CUSTOM_FIELD_KEY_PATTERN: RegExp;
|
|
5836
5851
|
declare const ALL_CUSTOM_FIELD_TYPES: readonly CustomFieldType[];
|
|
5852
|
+
declare const CHECKBOX_CHECKED = "true";
|
|
5853
|
+
declare const CHECKBOX_UNCHECKED = "false";
|
|
5854
|
+
/** Whether a stored/submitted checkbox value counts as ticked. Tolerant of
|
|
5855
|
+
* case and padding so a value round-tripped through a shop integration
|
|
5856
|
+
* ('True', ' true ') still reads correctly. */
|
|
5857
|
+
declare function isCheckboxChecked(value: string | null | undefined): boolean;
|
|
5858
|
+
/** Types whose value is free text, so length bounds and a placeholder apply.
|
|
5859
|
+
* `select` and `checkbox` are choice controls and have neither. */
|
|
5860
|
+
declare function customFieldIsTextLike(type: CustomFieldType): boolean;
|
|
5861
|
+
declare const CUSTOM_FIELD_CONDITIONS_MAX = 10;
|
|
5862
|
+
declare const ALL_CUSTOM_FIELD_CONDITION_SOURCES: readonly CustomFieldConditionSource[];
|
|
5863
|
+
declare const ALL_CUSTOM_FIELD_OPERATORS: readonly CustomFieldOperator[];
|
|
5864
|
+
declare const CUSTOM_FIELD_OPERATORS_BY_SOURCE: Record<CustomFieldConditionSource, readonly CustomFieldOperator[]>;
|
|
5865
|
+
declare const CUSTOM_FIELD_VALUELESS_OPERATORS: readonly CustomFieldOperator[];
|
|
5866
|
+
declare function customFieldOperatorTakesValue(operator: CustomFieldOperator): boolean;
|
|
5867
|
+
declare function defaultOperatorForSource(source: CustomFieldConditionSource): CustomFieldOperator;
|
|
5868
|
+
declare function defaultCustomFieldVisibility(): CustomFieldVisibility;
|
|
5837
5869
|
declare function parseCustomFieldsLoose(raw: unknown): CheckoutCustomField[] | null;
|
|
5838
5870
|
declare function decodeCustomFields(raw: string | undefined): CheckoutCustomField[] | null;
|
|
5839
5871
|
declare function encodeCustomFields(fields: CheckoutCustomField[]): string;
|
|
5872
|
+
/** Facts a rule can read. `amount` is in the currency's minor unit (what
|
|
5873
|
+
* the payment intent stores); `metadata` values are already flattened to
|
|
5874
|
+
* strings by `customFieldContextFromMetadata`. */
|
|
5875
|
+
interface CustomFieldContext {
|
|
5876
|
+
amount: number;
|
|
5877
|
+
currency: string;
|
|
5878
|
+
metadata: Record<string, string>;
|
|
5879
|
+
}
|
|
5880
|
+
/** Flatten a payment's raw `metadata` object into the string map a rule
|
|
5881
|
+
* compares against. Arrays join on `,` so a list-shaped value stays usable
|
|
5882
|
+
* with `contains` / `in`; objects fall back to JSON. Mirrors the Rust
|
|
5883
|
+
* side's `flatten_metadata`. */
|
|
5884
|
+
declare function customFieldContextFromMetadata(raw: unknown): Record<string, string>;
|
|
5885
|
+
declare function evaluateCustomFieldCondition(condition: CustomFieldCondition, ctx: CustomFieldContext): boolean;
|
|
5886
|
+
/**
|
|
5887
|
+
* Whether a field's rule matches the payment.
|
|
5888
|
+
*
|
|
5889
|
+
* Fail-open in two spots, deliberately: `mode: 'always'` and a `match` rule
|
|
5890
|
+
* with no conditions both resolve to visible. A half-authored rule should
|
|
5891
|
+
* never silently swallow a field the merchant needs collected — the
|
|
5892
|
+
* control-center flags the empty rule as a validation issue instead.
|
|
5893
|
+
*/
|
|
5894
|
+
declare function evaluateCustomFieldVisibility(field: CheckoutCustomField, ctx: CustomFieldContext): boolean;
|
|
5895
|
+
/** Filter a field list to what the buyer should see for this payment.
|
|
5896
|
+
* Disabled fields are dropped here too — the two reasons a field doesn't
|
|
5897
|
+
* render are the same to every consumer. */
|
|
5898
|
+
declare function visibleCustomFields(fields: CheckoutCustomField[], ctx: CustomFieldContext): CheckoutCustomField[];
|
|
5840
5899
|
declare function customFieldText(field: CheckoutCustomField, part: 'label' | 'placeholder' | 'helpText', locale?: string): string;
|
|
5841
5900
|
declare function customFieldOptionLabel(option: CustomFieldOption, locale?: string): string;
|
|
5842
5901
|
declare function decodeBranding(source: BrandingSource | null | undefined): CheckoutBranding;
|
|
@@ -5869,4 +5928,4 @@ declare function parseImportedBranding(raw: unknown): CheckoutBranding;
|
|
|
5869
5928
|
declare function applyBrandingVariables(el: HTMLElement, b: CheckoutBranding): void;
|
|
5870
5929
|
declare function shadowFor(style: SurfaceStyle): string;
|
|
5871
5930
|
|
|
5872
|
-
export { ALL_CUSTOM_FIELD_TYPES, type AddUserRequest, type AddUserResponse, type Address, type AddressDetails, type AllocationListResponse, type AllocationResponse, type AllocationTransferRequest, type AllocationTransferResponse, 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 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, CUSTOM_CSS_MAX_LENGTH, CUSTOM_FIELDS_MAX, CUSTOM_FIELD_KEY_PATTERN, type CancelSubscriptionRequest, type CancelSubscriptionResponse, type CaptureMethod, type CardDetail, type CardDetailFromLocker, Cards, type ChangePasswordRequest, type CheckoutBranding, type CheckoutCustomField, 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 CustomFieldOption, type CustomFieldTranslations, type CustomFieldType, 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 FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, 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, 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 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 PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, 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 ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, 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 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 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, customFieldOptionLabel, customFieldText, decodeBadges, decodeBranding, decodeCustomFields, defaultBranding, encodeBadges, encodeBranding, encodeCustomFields, feeProgram, fontStack, fontWeightValue, inputPadValue, isDarkSurface, isHexColor, leaf, logoDimensions, parseCustomFieldsLoose, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue };
|
|
5931
|
+
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, 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 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, 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, Cards, type ChangePasswordRequest, type CheckoutBranding, type CheckoutCustomField, 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 FeeRuleInput, type FeeRulePreviewRequest, type FeeRulePreviewResponse, type FeeScheduleCreateRequest, type FeeScheduleResponse, type FeeScheduleUpdateRequest, type FeeSpecInput, type FeeType, Files, 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, 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 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 PaymentMethodCreateRequest, type PaymentMethodDeleteResponse, type PaymentMethodListParams, 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 ResetPasswordRequest, type ResumeSubscriptionRequest, type ResumeSubscriptionResponse, type RoutableConnectorChoice, type RoutingActivatePayload, type RoutingConfigCreateRequest, type RoutingConfigResponse, type RoutingDeactivateRequest, type RoutingDictionary, type RoutingDictionaryRecord, type RuleConnectorSelection, 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 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 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, customFieldContextFromMetadata, customFieldIsTextLike, customFieldOperatorTakesValue, customFieldOptionLabel, customFieldText, decodeBadges, decodeBranding, decodeCustomFields, defaultBranding, defaultCustomFieldVisibility, defaultOperatorForSource, encodeBadges, encodeBranding, encodeCustomFields, evaluateCustomFieldCondition, evaluateCustomFieldVisibility, feeProgram, fontStack, fontWeightValue, inputPadValue, isCheckboxChecked, isDarkSurface, isHexColor, leaf, logoDimensions, parseCustomFieldsLoose, parseImportedBranding, programToTree, radiusValue, ruleMatchToTree, sanitizeCustomCss, shadowFor, surfacePadValue, verticalGapValue, visibleCustomFields };
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ALL_CUSTOM_FIELD_CONDITION_SOURCES,
|
|
3
|
+
ALL_CUSTOM_FIELD_OPERATORS,
|
|
2
4
|
ALL_CUSTOM_FIELD_TYPES,
|
|
3
5
|
Analytics,
|
|
4
6
|
AnalyticsDashboard,
|
|
5
7
|
AvailabilityOverrides,
|
|
6
8
|
BRANDING_EXPORT_FORMAT,
|
|
7
9
|
BRANDING_EXPORT_VERSION,
|
|
10
|
+
CHECKBOX_CHECKED,
|
|
11
|
+
CHECKBOX_UNCHECKED,
|
|
8
12
|
CUSTOM_CSS_MAX_LENGTH,
|
|
9
13
|
CUSTOM_FIELDS_MAX,
|
|
14
|
+
CUSTOM_FIELD_CONDITIONS_MAX,
|
|
10
15
|
CUSTOM_FIELD_KEY_PATTERN,
|
|
16
|
+
CUSTOM_FIELD_OPERATORS_BY_SOURCE,
|
|
17
|
+
CUSTOM_FIELD_VALUELESS_OPERATORS,
|
|
11
18
|
Cards,
|
|
12
19
|
DEFAULT_BADGES,
|
|
13
20
|
DEFAULT_BADGES_DARK,
|
|
@@ -32,19 +39,27 @@ import {
|
|
|
32
39
|
buttonPadValue,
|
|
33
40
|
cloneBranding,
|
|
34
41
|
cloneCustomField,
|
|
42
|
+
customFieldContextFromMetadata,
|
|
43
|
+
customFieldIsTextLike,
|
|
44
|
+
customFieldOperatorTakesValue,
|
|
35
45
|
customFieldOptionLabel,
|
|
36
46
|
customFieldText,
|
|
37
47
|
decodeBadges,
|
|
38
48
|
decodeBranding,
|
|
39
49
|
decodeCustomFields,
|
|
40
50
|
defaultBranding,
|
|
51
|
+
defaultCustomFieldVisibility,
|
|
52
|
+
defaultOperatorForSource,
|
|
41
53
|
encodeBadges,
|
|
42
54
|
encodeBranding,
|
|
43
55
|
encodeCustomFields,
|
|
56
|
+
evaluateCustomFieldCondition,
|
|
57
|
+
evaluateCustomFieldVisibility,
|
|
44
58
|
feeProgram,
|
|
45
59
|
fontStack,
|
|
46
60
|
fontWeightValue,
|
|
47
61
|
inputPadValue,
|
|
62
|
+
isCheckboxChecked,
|
|
48
63
|
isDarkSurface,
|
|
49
64
|
isHexColor,
|
|
50
65
|
leaf,
|
|
@@ -57,18 +72,26 @@ import {
|
|
|
57
72
|
sanitizeCustomCss,
|
|
58
73
|
shadowFor,
|
|
59
74
|
surfacePadValue,
|
|
60
|
-
verticalGapValue
|
|
61
|
-
|
|
75
|
+
verticalGapValue,
|
|
76
|
+
visibleCustomFields
|
|
77
|
+
} from "./chunk-D7DPAKI2.js";
|
|
62
78
|
export {
|
|
79
|
+
ALL_CUSTOM_FIELD_CONDITION_SOURCES,
|
|
80
|
+
ALL_CUSTOM_FIELD_OPERATORS,
|
|
63
81
|
ALL_CUSTOM_FIELD_TYPES,
|
|
64
82
|
Analytics,
|
|
65
83
|
AnalyticsDashboard,
|
|
66
84
|
AvailabilityOverrides,
|
|
67
85
|
BRANDING_EXPORT_FORMAT,
|
|
68
86
|
BRANDING_EXPORT_VERSION,
|
|
87
|
+
CHECKBOX_CHECKED,
|
|
88
|
+
CHECKBOX_UNCHECKED,
|
|
69
89
|
CUSTOM_CSS_MAX_LENGTH,
|
|
70
90
|
CUSTOM_FIELDS_MAX,
|
|
91
|
+
CUSTOM_FIELD_CONDITIONS_MAX,
|
|
71
92
|
CUSTOM_FIELD_KEY_PATTERN,
|
|
93
|
+
CUSTOM_FIELD_OPERATORS_BY_SOURCE,
|
|
94
|
+
CUSTOM_FIELD_VALUELESS_OPERATORS,
|
|
72
95
|
Cards,
|
|
73
96
|
DEFAULT_BADGES,
|
|
74
97
|
DEFAULT_BADGES_DARK,
|
|
@@ -93,19 +116,27 @@ export {
|
|
|
93
116
|
buttonPadValue,
|
|
94
117
|
cloneBranding,
|
|
95
118
|
cloneCustomField,
|
|
119
|
+
customFieldContextFromMetadata,
|
|
120
|
+
customFieldIsTextLike,
|
|
121
|
+
customFieldOperatorTakesValue,
|
|
96
122
|
customFieldOptionLabel,
|
|
97
123
|
customFieldText,
|
|
98
124
|
decodeBadges,
|
|
99
125
|
decodeBranding,
|
|
100
126
|
decodeCustomFields,
|
|
101
127
|
defaultBranding,
|
|
128
|
+
defaultCustomFieldVisibility,
|
|
129
|
+
defaultOperatorForSource,
|
|
102
130
|
encodeBadges,
|
|
103
131
|
encodeBranding,
|
|
104
132
|
encodeCustomFields,
|
|
133
|
+
evaluateCustomFieldCondition,
|
|
134
|
+
evaluateCustomFieldVisibility,
|
|
105
135
|
feeProgram,
|
|
106
136
|
fontStack,
|
|
107
137
|
fontWeightValue,
|
|
108
138
|
inputPadValue,
|
|
139
|
+
isCheckboxChecked,
|
|
109
140
|
isDarkSurface,
|
|
110
141
|
isHexColor,
|
|
111
142
|
leaf,
|
|
@@ -118,6 +149,7 @@ export {
|
|
|
118
149
|
sanitizeCustomCss,
|
|
119
150
|
shadowFor,
|
|
120
151
|
surfacePadValue,
|
|
121
|
-
verticalGapValue
|
|
152
|
+
verticalGapValue,
|
|
153
|
+
visibleCustomFields
|
|
122
154
|
};
|
|
123
155
|
//# sourceMappingURL=index.js.map
|