@delopay/sdk 0.6.0 → 0.8.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.
@@ -283,30 +283,6 @@ var Billing = class {
283
283
  body: params
284
284
  });
285
285
  }
286
- /**
287
- * Admin: manually credit a merchant's balance (e.g. promotional credit).
288
- *
289
- * @param merchantId - The merchant account ID.
290
- * @param params - Credit amount and reason.
291
- * @returns The adjustment result.
292
- */
293
- async adminCredit(merchantId, params) {
294
- return this.request("POST", `/billing/${encodeURIComponent(merchantId)}/admin/credit`, {
295
- body: params
296
- });
297
- }
298
- /**
299
- * Admin: manually debit a merchant's balance.
300
- *
301
- * @param merchantId - The merchant account ID.
302
- * @param params - Debit amount and reason.
303
- * @returns The adjustment result.
304
- */
305
- async adminDebit(merchantId, params) {
306
- return this.request("POST", `/billing/${encodeURIComponent(merchantId)}/admin/debit`, {
307
- body: params
308
- });
309
- }
310
286
  };
311
287
 
312
288
  // src/resources/blocklist.ts
@@ -330,22 +306,6 @@ var Blocklist = class {
330
306
  }
331
307
  };
332
308
 
333
- // src/resources/cardIssuers.ts
334
- var CardIssuers = class {
335
- constructor(request) {
336
- this.request = request;
337
- }
338
- async create(params) {
339
- return this.request("POST", "/card_issuers", { body: params });
340
- }
341
- async update(issuerId, params) {
342
- return this.request("PUT", `/card_issuers/${encodeURIComponent(issuerId)}`, { body: params });
343
- }
344
- async list() {
345
- return this.request("GET", "/card_issuers");
346
- }
347
- };
348
-
349
309
  // src/resources/connectors.ts
350
310
  var Connectors = class {
351
311
  constructor(request) {
@@ -649,73 +609,15 @@ var Events = class {
649
609
  };
650
610
 
651
611
  // src/resources/fees.ts
652
- var PlatformFees = class {
653
- constructor(request) {
654
- this.request = request;
655
- }
656
- /**
657
- * Create a new platform fee schedule for a merchant (admin only).
658
- *
659
- * @param params - Fee schedule parameters (percentage, flat fee, min/max).
660
- * @param merchantId - The merchant account to attach the schedule to.
661
- * @returns The created fee schedule.
662
- */
663
- async create(params, merchantId) {
664
- return this.request("POST", "/admin/fees", {
665
- body: params,
666
- query: { merchant_id: merchantId }
667
- });
668
- }
669
- /**
670
- * List all platform fee schedules for a merchant (admin only).
671
- *
672
- * @param merchantId - The merchant account ID.
673
- * @returns Array of fee schedules.
674
- */
675
- async list(merchantId) {
676
- return this.request("GET", "/admin/fees/list", {
677
- query: { merchant_id: merchantId }
678
- });
679
- }
680
- /**
681
- * Retrieve a single fee schedule by ID (admin only).
682
- *
683
- * @param feeId - The fee schedule ID.
684
- * @returns The fee schedule.
685
- */
686
- async retrieve(feeId) {
687
- return this.request("GET", `/admin/fees/${encodeURIComponent(feeId)}`);
688
- }
689
- /**
690
- * Update a fee schedule (admin only).
691
- *
692
- * @param feeId - The fee schedule ID to update.
693
- * @param params - Fields to update.
694
- * @returns The updated fee schedule.
695
- */
696
- async update(feeId, params) {
697
- return this.request("PUT", `/admin/fees/${encodeURIComponent(feeId)}`, { body: params });
698
- }
699
- /**
700
- * Delete a fee schedule (admin only).
701
- *
702
- * @param feeId - The fee schedule ID to delete.
703
- * @returns The deleted fee schedule.
704
- */
705
- async delete(feeId) {
706
- return this.request("DELETE", `/admin/fees/${encodeURIComponent(feeId)}`);
707
- }
708
- };
709
- var MerchantFees = class {
612
+ var Fees = class {
710
613
  constructor(request) {
711
614
  this.request = request;
712
615
  }
713
616
  /**
714
- * Create a merchant-scoped fee schedule override for a specific shop.
617
+ * Create a merchant-scoped fee schedule (optionally per-shop).
715
618
  *
716
619
  * @param params - Fee schedule parameters.
717
620
  * @param merchantId - The merchant account ID.
718
- * @returns The created fee schedule.
719
621
  */
720
622
  async create(params, merchantId) {
721
623
  return this.request("POST", "/merchant_fees", {
@@ -724,10 +626,9 @@ var MerchantFees = class {
724
626
  });
725
627
  }
726
628
  /**
727
- * List merchant-scoped fee schedules.
629
+ * List the merchant's own fee schedules.
728
630
  *
729
631
  * @param merchantId - The merchant account ID.
730
- * @returns Array of fee schedules.
731
632
  */
732
633
  async list(merchantId) {
733
634
  return this.request("GET", "/merchant_fees/list", {
@@ -737,9 +638,8 @@ var MerchantFees = class {
737
638
  /**
738
639
  * Update a merchant-scoped fee schedule.
739
640
  *
740
- * @param feeId - The fee schedule ID to update.
641
+ * @param feeId - The fee schedule ID.
741
642
  * @param params - Fields to update.
742
- * @returns The updated fee schedule.
743
643
  */
744
644
  async update(feeId, params) {
745
645
  return this.request("PUT", `/merchant_fees/${encodeURIComponent(feeId)}`, { body: params });
@@ -747,38 +647,12 @@ var MerchantFees = class {
747
647
  /**
748
648
  * Delete a merchant-scoped fee schedule.
749
649
  *
750
- * @param feeId - The fee schedule ID to delete.
751
- * @returns The deleted fee schedule.
650
+ * @param feeId - The fee schedule ID.
752
651
  */
753
652
  async delete(feeId) {
754
653
  return this.request("DELETE", `/merchant_fees/${encodeURIComponent(feeId)}`);
755
654
  }
756
655
  };
757
- var Fees = class {
758
- constructor(request) {
759
- this.platform = new PlatformFees(request);
760
- this.merchant = new MerchantFees(request);
761
- }
762
- };
763
-
764
- // src/resources/gsm.ts
765
- var Gsm = class {
766
- constructor(request) {
767
- this.request = request;
768
- }
769
- async create(params) {
770
- return this.request("POST", "/gsm", { body: params });
771
- }
772
- async retrieve(params) {
773
- return this.request("POST", "/gsm/get", { body: params });
774
- }
775
- async update(params) {
776
- return this.request("POST", "/gsm/update", { body: params });
777
- }
778
- async delete(params) {
779
- return this.request("POST", "/gsm/delete", { body: params });
780
- }
781
- };
782
656
 
783
657
  // src/resources/mandates.ts
784
658
  var Mandates = class {
@@ -2380,17 +2254,6 @@ var AnalyticsDashboard = class {
2380
2254
  }
2381
2255
  };
2382
2256
 
2383
- // src/resources/cache.ts
2384
- var Cache = class {
2385
- constructor(request) {
2386
- this.request = request;
2387
- }
2388
- /** Invalidate a cache entry by key. `POST /cache/invalidate/{key}` */
2389
- async invalidate(key) {
2390
- return this.request("POST", `/cache/invalidate/${encodeURIComponent(key)}`);
2391
- }
2392
- };
2393
-
2394
2257
  // src/resources/cards.ts
2395
2258
  var Cards = class {
2396
2259
  constructor(request) {
@@ -2410,29 +2273,6 @@ var Cards = class {
2410
2273
  }
2411
2274
  };
2412
2275
 
2413
- // src/resources/configs.ts
2414
- var Configs = class {
2415
- constructor(request) {
2416
- this.request = request;
2417
- }
2418
- /** Create a config. `POST /configs` */
2419
- async create(params) {
2420
- return this.request("POST", "/configs", { body: params });
2421
- }
2422
- /** Retrieve a config by key. `GET /configs/{key}` */
2423
- async retrieve(key) {
2424
- return this.request("GET", `/configs/${encodeURIComponent(key)}`);
2425
- }
2426
- /** Update a config. `PUT /configs/{key}` */
2427
- async update(key, params) {
2428
- return this.request("PUT", `/configs/${encodeURIComponent(key)}`, { body: params });
2429
- }
2430
- /** Delete a config. `DELETE /configs/{key}` */
2431
- async delete(key) {
2432
- return this.request("DELETE", `/configs/${encodeURIComponent(key)}`);
2433
- }
2434
- };
2435
-
2436
2276
  // src/resources/export.ts
2437
2277
  var Export = class {
2438
2278
  constructor(request) {
@@ -2694,9 +2534,7 @@ var Delopay = class {
2694
2534
  this.apiKeys = new ApiKeys(request);
2695
2535
  this.billing = new Billing(request);
2696
2536
  this.blocklist = new Blocklist(request);
2697
- this.cardIssuers = new CardIssuers(request);
2698
2537
  this.fees = new Fees(request);
2699
- this.gsm = new Gsm(request);
2700
2538
  this.merchantAccounts = new MerchantAccounts(request);
2701
2539
  this.projects = new Projects(request);
2702
2540
  this.relay = new Relay(request);
@@ -2711,8 +2549,6 @@ var Delopay = class {
2711
2549
  this.analyticsDashboard = new AnalyticsDashboard(request);
2712
2550
  this.featureMatrix = new FeatureMatrix(request);
2713
2551
  this.cards = new Cards(request);
2714
- this.configs = new Configs(request);
2715
- this.cache = new Cache(request);
2716
2552
  }
2717
2553
  /**
2718
2554
  * Set a JWT token for subsequent requests.
@@ -2945,9 +2781,7 @@ export {
2945
2781
  Webhooks,
2946
2782
  Analytics,
2947
2783
  AnalyticsDashboard,
2948
- Cache,
2949
2784
  Cards,
2950
- Configs,
2951
2785
  Export,
2952
2786
  FeatureMatrix,
2953
2787
  Files,
@@ -2956,4 +2790,4 @@ export {
2956
2790
  Subscriptions,
2957
2791
  Delopay
2958
2792
  };
2959
- //# sourceMappingURL=chunk-LCF7ILAH.js.map
2793
+ //# sourceMappingURL=chunk-SPWI4Z6T.js.map