@delopay/sdk 0.44.0 → 0.46.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.cjs CHANGED
@@ -22,6 +22,7 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  Analytics: () => Analytics,
24
24
  AnalyticsDashboard: () => AnalyticsDashboard,
25
+ AvailabilityOverrides: () => AvailabilityOverrides,
25
26
  BRANDING_EXPORT_FORMAT: () => BRANDING_EXPORT_FORMAT,
26
27
  BRANDING_EXPORT_VERSION: () => BRANDING_EXPORT_VERSION,
27
28
  CUSTOM_CSS_MAX_LENGTH: () => CUSTOM_CSS_MAX_LENGTH,
@@ -1751,10 +1752,7 @@ var Routing = class {
1751
1752
  * `GET /routing/connector-restrictions/{profileId}`
1752
1753
  */
1753
1754
  async connectorRestrictions(profileId) {
1754
- return this.request(
1755
- "GET",
1756
- `/routing/connector-restrictions/${encodeURIComponent(profileId)}`
1757
- );
1755
+ return this.request("GET", `/routing/connector-restrictions/${encodeURIComponent(profileId)}`);
1758
1756
  }
1759
1757
  // --- Advanced operations (Task 3.4) ---
1760
1758
  /** Get active routing config. `GET /routing/active` */
@@ -2663,25 +2661,73 @@ var Regions = class {
2663
2661
  constructor(request) {
2664
2662
  this.request = request;
2665
2663
  }
2666
- /** Create a region. `POST /regions` */
2667
- async create(params) {
2668
- return this.request("POST", "/regions", { body: params });
2664
+ /** Create a region. `POST /regions?profile_id=` */
2665
+ async create(profileId, params) {
2666
+ return this.request("POST", "/regions", {
2667
+ body: params,
2668
+ query: { profile_id: profileId }
2669
+ });
2670
+ }
2671
+ /** List all regions for a profile. `GET /regions/list?profile_id=` */
2672
+ async list(profileId) {
2673
+ return this.request("GET", "/regions/list", { query: { profile_id: profileId } });
2674
+ }
2675
+ /** List the built-in (global) region groups (EU/EEA/SEPA/LATAM/APAC). `GET /regions/groups` */
2676
+ async groups() {
2677
+ return this.request("GET", "/regions/groups");
2669
2678
  }
2670
- /** Retrieve a region by ID. `GET /regions/{regionId}` */
2671
- async retrieve(regionId) {
2672
- return this.request("GET", `/regions/${encodeURIComponent(regionId)}`);
2679
+ /** Retrieve a region by id. `GET /regions/{regionId}?profile_id=` */
2680
+ async retrieve(regionId, profileId) {
2681
+ return this.request("GET", `/regions/${encodeURIComponent(regionId)}`, {
2682
+ query: { profile_id: profileId }
2683
+ });
2673
2684
  }
2674
- /** Update a region. `PUT /regions/{regionId}` */
2675
- async update(regionId, params) {
2676
- return this.request("PUT", `/regions/${encodeURIComponent(regionId)}`, { body: params });
2685
+ /** Update a region. `PUT /regions/{regionId}?profile_id=` */
2686
+ async update(regionId, profileId, params) {
2687
+ return this.request("PUT", `/regions/${encodeURIComponent(regionId)}`, {
2688
+ body: params,
2689
+ query: { profile_id: profileId }
2690
+ });
2677
2691
  }
2678
- /** Delete a region. `DELETE /regions/{regionId}` */
2679
- async delete(regionId) {
2680
- return this.request("DELETE", `/regions/${encodeURIComponent(regionId)}`);
2692
+ /** Delete a region. `DELETE /regions/{regionId}?profile_id=` */
2693
+ async delete(regionId, profileId) {
2694
+ return this.request("DELETE", `/regions/${encodeURIComponent(regionId)}`, {
2695
+ query: { profile_id: profileId }
2696
+ });
2681
2697
  }
2682
- /** List all regions. `GET /regions/list` */
2683
- async list() {
2684
- return this.request("GET", "/regions/list");
2698
+ /** Get the countries that belong to a region. `GET /regions/{regionId}/countries?profile_id=` */
2699
+ async getCountries(regionId, profileId) {
2700
+ return this.request("GET", `/regions/${encodeURIComponent(regionId)}/countries`, {
2701
+ query: { profile_id: profileId }
2702
+ });
2703
+ }
2704
+ /** Replace the full country membership of a region. `PUT /regions/{regionId}/countries?profile_id=` */
2705
+ async setCountries(regionId, profileId, params) {
2706
+ return this.request("PUT", `/regions/${encodeURIComponent(regionId)}/countries`, {
2707
+ body: params,
2708
+ query: { profile_id: profileId }
2709
+ });
2710
+ }
2711
+ };
2712
+
2713
+ // src/resources/availabilityOverrides.ts
2714
+ var AvailabilityOverrides = class {
2715
+ constructor(request) {
2716
+ this.request = request;
2717
+ }
2718
+ /** Create an availability override. `POST /availability-overrides` */
2719
+ async create(params) {
2720
+ return this.request("POST", "/availability-overrides", { body: params });
2721
+ }
2722
+ /** List a merchant's availability overrides. `GET /availability-overrides` */
2723
+ async list(merchantId) {
2724
+ return this.request("GET", "/availability-overrides", {
2725
+ query: { merchant_id: merchantId }
2726
+ });
2727
+ }
2728
+ /** Delete an availability override by id. `DELETE /availability-overrides/{id}` */
2729
+ async delete(id) {
2730
+ return this.request("DELETE", `/availability-overrides/${encodeURIComponent(id)}`);
2685
2731
  }
2686
2732
  };
2687
2733
 
@@ -2910,6 +2956,7 @@ var Delopay = class {
2910
2956
  this.export = new Export(request);
2911
2957
  this.forex = new Forex(request);
2912
2958
  this.regions = new Regions(request);
2959
+ this.availabilityOverrides = new AvailabilityOverrides(request);
2913
2960
  this.analytics = new Analytics(request);
2914
2961
  this.analyticsDashboard = new AnalyticsDashboard(request);
2915
2962
  this.featureMatrix = new FeatureMatrix(request);
@@ -3882,6 +3929,7 @@ function shadowFor(style) {
3882
3929
  0 && (module.exports = {
3883
3930
  Analytics,
3884
3931
  AnalyticsDashboard,
3932
+ AvailabilityOverrides,
3885
3933
  BRANDING_EXPORT_FORMAT,
3886
3934
  BRANDING_EXPORT_VERSION,
3887
3935
  CUSTOM_CSS_MAX_LENGTH,