@delopay/sdk 0.72.0 → 0.74.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
@@ -2300,6 +2300,12 @@ interface ConnectorResponse {
2300
2300
  connector_label?: string | null;
2301
2301
  connector_account_details?: Record<string, unknown> | null;
2302
2302
  payment_methods_enabled?: Record<string, unknown>[] | null;
2303
+ /**
2304
+ * PaymentMethodType strings this connector's Stripe account cannot use
2305
+ * (region/activation). The dashboard greys these out in the picker. Present
2306
+ * only for Stripe; absent/null means "gate nothing" (fail-open).
2307
+ */
2308
+ unsupported_payment_method_types?: string[] | null;
2303
2309
  metadata?: Record<string, unknown> | null;
2304
2310
  test_mode?: boolean | null;
2305
2311
  disabled?: boolean | null;
@@ -2939,6 +2945,22 @@ interface AvailabilityOverrideCreateRequest {
2939
2945
  country?: string;
2940
2946
  /** Target a built-in group code (e.g. `"EU"`) or a custom region id. Mutually exclusive with `country`. */
2941
2947
  region_code?: string;
2948
+ /**
2949
+ * Inclusive lower bound on the order value, in minor units. `null`/omitted is
2950
+ * unbounded. Requires `currency`.
2951
+ */
2952
+ min_amount?: number;
2953
+ /**
2954
+ * Inclusive upper bound on the order value, in minor units. `null`/omitted is
2955
+ * unbounded. Requires `currency`.
2956
+ */
2957
+ max_amount?: number;
2958
+ /**
2959
+ * Currency the amount bounds are expressed in. Required when either bound is
2960
+ * set. There is no FX conversion — the rule applies only to payments in this
2961
+ * currency.
2962
+ */
2963
+ currency?: Currency;
2942
2964
  action: OverrideAction;
2943
2965
  }
2944
2966
  interface AvailabilityOverrideResponse {
@@ -2950,6 +2972,9 @@ interface AvailabilityOverrideResponse {
2950
2972
  payment_method_type?: PaymentMethodType | null;
2951
2973
  country?: string | null;
2952
2974
  region_code?: string | null;
2975
+ min_amount?: number | null;
2976
+ max_amount?: number | null;
2977
+ currency?: Currency | null;
2953
2978
  action: OverrideAction;
2954
2979
  }
2955
2980
  /** Query for {@link AvailabilityOverrides.preview}. */
@@ -2959,6 +2984,10 @@ interface AvailabilityPreviewParams {
2959
2984
  profile_id: string;
2960
2985
  /** ISO 3166-1 alpha-2 country to preview for; omit for no country signal. */
2961
2986
  country?: string;
2987
+ /** Order value to preview for, in minor units. Requires `currency`. */
2988
+ amount?: number;
2989
+ /** Currency of `amount`. */
2990
+ currency?: Currency;
2962
2991
  }
2963
2992
  /** One payment method available in the previewed country, with its types. */
2964
2993
  interface AvailabilityPreviewMethod {
@@ -2967,12 +2996,17 @@ interface AvailabilityPreviewMethod {
2967
2996
  }
2968
2997
  /**
2969
2998
  * The methods a customer in the previewed country would be shown — the connector
2970
- * ceiling narrowed by the curated smart defaults and the merchant overrides
2971
- * (amount/currency narrowing is not applied, so this is an upper bound).
2999
+ * ceiling narrowed by the curated smart defaults and the merchant overrides,
3000
+ * including their order-value rules when `amount` + `currency` are supplied. The
3001
+ * connector's own amount limits are not applied, so this stays an upper bound.
2972
3002
  */
2973
3003
  interface AvailabilityPreviewResponse {
2974
3004
  /** The country the preview resolved for (echoes the request). */
2975
3005
  country?: string | null;
3006
+ /** The order value the preview resolved for (echoes the request). */
3007
+ amount?: number | null;
3008
+ /** The currency the preview resolved for (echoes the request). */
3009
+ currency?: Currency | null;
2976
3010
  payment_methods: AvailabilityPreviewMethod[];
2977
3011
  }
2978
3012
  /**
@@ -5098,7 +5132,8 @@ declare class AvailabilityOverrides {
5098
5132
  /**
5099
5133
  * Preview the methods a customer in `country` would be shown for a shop —
5100
5134
  * the connector ceiling narrowed by the smart country defaults and the
5101
- * merchant overrides, without an active payment.
5135
+ * merchant overrides, without an active payment. Pass `amount` + `currency`
5136
+ * to also evaluate order-value rules.
5102
5137
  * `GET /availability-overrides/preview`
5103
5138
  */
5104
5139
  preview(params: AvailabilityPreviewParams): Promise<AvailabilityPreviewResponse>;
package/dist/index.d.ts CHANGED
@@ -2300,6 +2300,12 @@ interface ConnectorResponse {
2300
2300
  connector_label?: string | null;
2301
2301
  connector_account_details?: Record<string, unknown> | null;
2302
2302
  payment_methods_enabled?: Record<string, unknown>[] | null;
2303
+ /**
2304
+ * PaymentMethodType strings this connector's Stripe account cannot use
2305
+ * (region/activation). The dashboard greys these out in the picker. Present
2306
+ * only for Stripe; absent/null means "gate nothing" (fail-open).
2307
+ */
2308
+ unsupported_payment_method_types?: string[] | null;
2303
2309
  metadata?: Record<string, unknown> | null;
2304
2310
  test_mode?: boolean | null;
2305
2311
  disabled?: boolean | null;
@@ -2939,6 +2945,22 @@ interface AvailabilityOverrideCreateRequest {
2939
2945
  country?: string;
2940
2946
  /** Target a built-in group code (e.g. `"EU"`) or a custom region id. Mutually exclusive with `country`. */
2941
2947
  region_code?: string;
2948
+ /**
2949
+ * Inclusive lower bound on the order value, in minor units. `null`/omitted is
2950
+ * unbounded. Requires `currency`.
2951
+ */
2952
+ min_amount?: number;
2953
+ /**
2954
+ * Inclusive upper bound on the order value, in minor units. `null`/omitted is
2955
+ * unbounded. Requires `currency`.
2956
+ */
2957
+ max_amount?: number;
2958
+ /**
2959
+ * Currency the amount bounds are expressed in. Required when either bound is
2960
+ * set. There is no FX conversion — the rule applies only to payments in this
2961
+ * currency.
2962
+ */
2963
+ currency?: Currency;
2942
2964
  action: OverrideAction;
2943
2965
  }
2944
2966
  interface AvailabilityOverrideResponse {
@@ -2950,6 +2972,9 @@ interface AvailabilityOverrideResponse {
2950
2972
  payment_method_type?: PaymentMethodType | null;
2951
2973
  country?: string | null;
2952
2974
  region_code?: string | null;
2975
+ min_amount?: number | null;
2976
+ max_amount?: number | null;
2977
+ currency?: Currency | null;
2953
2978
  action: OverrideAction;
2954
2979
  }
2955
2980
  /** Query for {@link AvailabilityOverrides.preview}. */
@@ -2959,6 +2984,10 @@ interface AvailabilityPreviewParams {
2959
2984
  profile_id: string;
2960
2985
  /** ISO 3166-1 alpha-2 country to preview for; omit for no country signal. */
2961
2986
  country?: string;
2987
+ /** Order value to preview for, in minor units. Requires `currency`. */
2988
+ amount?: number;
2989
+ /** Currency of `amount`. */
2990
+ currency?: Currency;
2962
2991
  }
2963
2992
  /** One payment method available in the previewed country, with its types. */
2964
2993
  interface AvailabilityPreviewMethod {
@@ -2967,12 +2996,17 @@ interface AvailabilityPreviewMethod {
2967
2996
  }
2968
2997
  /**
2969
2998
  * The methods a customer in the previewed country would be shown — the connector
2970
- * ceiling narrowed by the curated smart defaults and the merchant overrides
2971
- * (amount/currency narrowing is not applied, so this is an upper bound).
2999
+ * ceiling narrowed by the curated smart defaults and the merchant overrides,
3000
+ * including their order-value rules when `amount` + `currency` are supplied. The
3001
+ * connector's own amount limits are not applied, so this stays an upper bound.
2972
3002
  */
2973
3003
  interface AvailabilityPreviewResponse {
2974
3004
  /** The country the preview resolved for (echoes the request). */
2975
3005
  country?: string | null;
3006
+ /** The order value the preview resolved for (echoes the request). */
3007
+ amount?: number | null;
3008
+ /** The currency the preview resolved for (echoes the request). */
3009
+ currency?: Currency | null;
2976
3010
  payment_methods: AvailabilityPreviewMethod[];
2977
3011
  }
2978
3012
  /**
@@ -5098,7 +5132,8 @@ declare class AvailabilityOverrides {
5098
5132
  /**
5099
5133
  * Preview the methods a customer in `country` would be shown for a shop —
5100
5134
  * the connector ceiling narrowed by the smart country defaults and the
5101
- * merchant overrides, without an active payment.
5135
+ * merchant overrides, without an active payment. Pass `amount` + `currency`
5136
+ * to also evaluate order-value rules.
5102
5137
  * `GET /availability-overrides/preview`
5103
5138
  */
5104
5139
  preview(params: AvailabilityPreviewParams): Promise<AvailabilityPreviewResponse>;
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ import {
58
58
  shadowFor,
59
59
  surfacePadValue,
60
60
  verticalGapValue
61
- } from "./chunk-RGA6KEKL.js";
61
+ } from "./chunk-5FA2IFIU.js";
62
62
  export {
63
63
  ALL_CUSTOM_FIELD_TYPES,
64
64
  Analytics,
package/dist/internal.cjs CHANGED
@@ -3117,7 +3117,8 @@ var AvailabilityOverrides = class {
3117
3117
  /**
3118
3118
  * Preview the methods a customer in `country` would be shown for a shop —
3119
3119
  * the connector ceiling narrowed by the smart country defaults and the
3120
- * merchant overrides, without an active payment.
3120
+ * merchant overrides, without an active payment. Pass `amount` + `currency`
3121
+ * to also evaluate order-value rules.
3121
3122
  * `GET /availability-overrides/preview`
3122
3123
  */
3123
3124
  async preview(params) {
@@ -3125,7 +3126,10 @@ var AvailabilityOverrides = class {
3125
3126
  query: {
3126
3127
  merchant_id: params.merchant_id,
3127
3128
  profile_id: params.profile_id,
3128
- ...params.country ? { country: params.country } : {}
3129
+ ...params.country ? { country: params.country } : {},
3130
+ // `0` is a legitimate order value, so test for presence, not truthiness.
3131
+ ...params.amount !== void 0 ? { amount: params.amount } : {},
3132
+ ...params.currency ? { currency: params.currency } : {}
3129
3133
  }
3130
3134
  });
3131
3135
  }