@delopay/sdk 0.6.0 → 0.7.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-LCF7ILAH.js → chunk-NKSNI5HS.js} +6 -148
- package/dist/chunk-NKSNI5HS.js.map +1 -0
- package/dist/index.cjs +5 -149
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -343
- package/dist/index.d.ts +10 -343
- package/dist/index.js +1 -5
- package/dist/internal.cjs +120 -148
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +322 -10
- package/dist/internal.d.ts +322 -10
- package/dist/internal.js +113 -6
- package/dist/internal.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-LCF7ILAH.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -22,9 +22,7 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
Analytics: () => Analytics,
|
|
24
24
|
AnalyticsDashboard: () => AnalyticsDashboard,
|
|
25
|
-
Cache: () => Cache,
|
|
26
25
|
Cards: () => Cards,
|
|
27
|
-
Configs: () => Configs,
|
|
28
26
|
Delopay: () => Delopay,
|
|
29
27
|
DelopayAuthenticationError: () => DelopayAuthenticationError,
|
|
30
28
|
DelopayError: () => DelopayError,
|
|
@@ -370,22 +368,6 @@ var Blocklist = class {
|
|
|
370
368
|
}
|
|
371
369
|
};
|
|
372
370
|
|
|
373
|
-
// src/resources/cardIssuers.ts
|
|
374
|
-
var CardIssuers = class {
|
|
375
|
-
constructor(request) {
|
|
376
|
-
this.request = request;
|
|
377
|
-
}
|
|
378
|
-
async create(params) {
|
|
379
|
-
return this.request("POST", "/card_issuers", { body: params });
|
|
380
|
-
}
|
|
381
|
-
async update(issuerId, params) {
|
|
382
|
-
return this.request("PUT", `/card_issuers/${encodeURIComponent(issuerId)}`, { body: params });
|
|
383
|
-
}
|
|
384
|
-
async list() {
|
|
385
|
-
return this.request("GET", "/card_issuers");
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
|
|
389
371
|
// src/resources/connectors.ts
|
|
390
372
|
var Connectors = class {
|
|
391
373
|
constructor(request) {
|
|
@@ -689,73 +671,15 @@ var Events = class {
|
|
|
689
671
|
};
|
|
690
672
|
|
|
691
673
|
// src/resources/fees.ts
|
|
692
|
-
var
|
|
693
|
-
constructor(request) {
|
|
694
|
-
this.request = request;
|
|
695
|
-
}
|
|
696
|
-
/**
|
|
697
|
-
* Create a new platform fee schedule for a merchant (admin only).
|
|
698
|
-
*
|
|
699
|
-
* @param params - Fee schedule parameters (percentage, flat fee, min/max).
|
|
700
|
-
* @param merchantId - The merchant account to attach the schedule to.
|
|
701
|
-
* @returns The created fee schedule.
|
|
702
|
-
*/
|
|
703
|
-
async create(params, merchantId) {
|
|
704
|
-
return this.request("POST", "/admin/fees", {
|
|
705
|
-
body: params,
|
|
706
|
-
query: { merchant_id: merchantId }
|
|
707
|
-
});
|
|
708
|
-
}
|
|
709
|
-
/**
|
|
710
|
-
* List all platform fee schedules for a merchant (admin only).
|
|
711
|
-
*
|
|
712
|
-
* @param merchantId - The merchant account ID.
|
|
713
|
-
* @returns Array of fee schedules.
|
|
714
|
-
*/
|
|
715
|
-
async list(merchantId) {
|
|
716
|
-
return this.request("GET", "/admin/fees/list", {
|
|
717
|
-
query: { merchant_id: merchantId }
|
|
718
|
-
});
|
|
719
|
-
}
|
|
720
|
-
/**
|
|
721
|
-
* Retrieve a single fee schedule by ID (admin only).
|
|
722
|
-
*
|
|
723
|
-
* @param feeId - The fee schedule ID.
|
|
724
|
-
* @returns The fee schedule.
|
|
725
|
-
*/
|
|
726
|
-
async retrieve(feeId) {
|
|
727
|
-
return this.request("GET", `/admin/fees/${encodeURIComponent(feeId)}`);
|
|
728
|
-
}
|
|
729
|
-
/**
|
|
730
|
-
* Update a fee schedule (admin only).
|
|
731
|
-
*
|
|
732
|
-
* @param feeId - The fee schedule ID to update.
|
|
733
|
-
* @param params - Fields to update.
|
|
734
|
-
* @returns The updated fee schedule.
|
|
735
|
-
*/
|
|
736
|
-
async update(feeId, params) {
|
|
737
|
-
return this.request("PUT", `/admin/fees/${encodeURIComponent(feeId)}`, { body: params });
|
|
738
|
-
}
|
|
739
|
-
/**
|
|
740
|
-
* Delete a fee schedule (admin only).
|
|
741
|
-
*
|
|
742
|
-
* @param feeId - The fee schedule ID to delete.
|
|
743
|
-
* @returns The deleted fee schedule.
|
|
744
|
-
*/
|
|
745
|
-
async delete(feeId) {
|
|
746
|
-
return this.request("DELETE", `/admin/fees/${encodeURIComponent(feeId)}`);
|
|
747
|
-
}
|
|
748
|
-
};
|
|
749
|
-
var MerchantFees = class {
|
|
674
|
+
var Fees = class {
|
|
750
675
|
constructor(request) {
|
|
751
676
|
this.request = request;
|
|
752
677
|
}
|
|
753
678
|
/**
|
|
754
|
-
* Create a merchant-scoped fee schedule
|
|
679
|
+
* Create a merchant-scoped fee schedule (optionally per-shop).
|
|
755
680
|
*
|
|
756
681
|
* @param params - Fee schedule parameters.
|
|
757
682
|
* @param merchantId - The merchant account ID.
|
|
758
|
-
* @returns The created fee schedule.
|
|
759
683
|
*/
|
|
760
684
|
async create(params, merchantId) {
|
|
761
685
|
return this.request("POST", "/merchant_fees", {
|
|
@@ -764,10 +688,9 @@ var MerchantFees = class {
|
|
|
764
688
|
});
|
|
765
689
|
}
|
|
766
690
|
/**
|
|
767
|
-
* List merchant
|
|
691
|
+
* List the merchant's own fee schedules.
|
|
768
692
|
*
|
|
769
693
|
* @param merchantId - The merchant account ID.
|
|
770
|
-
* @returns Array of fee schedules.
|
|
771
694
|
*/
|
|
772
695
|
async list(merchantId) {
|
|
773
696
|
return this.request("GET", "/merchant_fees/list", {
|
|
@@ -777,9 +700,8 @@ var MerchantFees = class {
|
|
|
777
700
|
/**
|
|
778
701
|
* Update a merchant-scoped fee schedule.
|
|
779
702
|
*
|
|
780
|
-
* @param feeId - The fee schedule ID
|
|
703
|
+
* @param feeId - The fee schedule ID.
|
|
781
704
|
* @param params - Fields to update.
|
|
782
|
-
* @returns The updated fee schedule.
|
|
783
705
|
*/
|
|
784
706
|
async update(feeId, params) {
|
|
785
707
|
return this.request("PUT", `/merchant_fees/${encodeURIComponent(feeId)}`, { body: params });
|
|
@@ -787,38 +709,12 @@ var MerchantFees = class {
|
|
|
787
709
|
/**
|
|
788
710
|
* Delete a merchant-scoped fee schedule.
|
|
789
711
|
*
|
|
790
|
-
* @param feeId - The fee schedule ID
|
|
791
|
-
* @returns The deleted fee schedule.
|
|
712
|
+
* @param feeId - The fee schedule ID.
|
|
792
713
|
*/
|
|
793
714
|
async delete(feeId) {
|
|
794
715
|
return this.request("DELETE", `/merchant_fees/${encodeURIComponent(feeId)}`);
|
|
795
716
|
}
|
|
796
717
|
};
|
|
797
|
-
var Fees = class {
|
|
798
|
-
constructor(request) {
|
|
799
|
-
this.platform = new PlatformFees(request);
|
|
800
|
-
this.merchant = new MerchantFees(request);
|
|
801
|
-
}
|
|
802
|
-
};
|
|
803
|
-
|
|
804
|
-
// src/resources/gsm.ts
|
|
805
|
-
var Gsm = class {
|
|
806
|
-
constructor(request) {
|
|
807
|
-
this.request = request;
|
|
808
|
-
}
|
|
809
|
-
async create(params) {
|
|
810
|
-
return this.request("POST", "/gsm", { body: params });
|
|
811
|
-
}
|
|
812
|
-
async retrieve(params) {
|
|
813
|
-
return this.request("POST", "/gsm/get", { body: params });
|
|
814
|
-
}
|
|
815
|
-
async update(params) {
|
|
816
|
-
return this.request("POST", "/gsm/update", { body: params });
|
|
817
|
-
}
|
|
818
|
-
async delete(params) {
|
|
819
|
-
return this.request("POST", "/gsm/delete", { body: params });
|
|
820
|
-
}
|
|
821
|
-
};
|
|
822
718
|
|
|
823
719
|
// src/resources/mandates.ts
|
|
824
720
|
var Mandates = class {
|
|
@@ -2420,17 +2316,6 @@ var AnalyticsDashboard = class {
|
|
|
2420
2316
|
}
|
|
2421
2317
|
};
|
|
2422
2318
|
|
|
2423
|
-
// src/resources/cache.ts
|
|
2424
|
-
var Cache = class {
|
|
2425
|
-
constructor(request) {
|
|
2426
|
-
this.request = request;
|
|
2427
|
-
}
|
|
2428
|
-
/** Invalidate a cache entry by key. `POST /cache/invalidate/{key}` */
|
|
2429
|
-
async invalidate(key) {
|
|
2430
|
-
return this.request("POST", `/cache/invalidate/${encodeURIComponent(key)}`);
|
|
2431
|
-
}
|
|
2432
|
-
};
|
|
2433
|
-
|
|
2434
2319
|
// src/resources/cards.ts
|
|
2435
2320
|
var Cards = class {
|
|
2436
2321
|
constructor(request) {
|
|
@@ -2450,29 +2335,6 @@ var Cards = class {
|
|
|
2450
2335
|
}
|
|
2451
2336
|
};
|
|
2452
2337
|
|
|
2453
|
-
// src/resources/configs.ts
|
|
2454
|
-
var Configs = class {
|
|
2455
|
-
constructor(request) {
|
|
2456
|
-
this.request = request;
|
|
2457
|
-
}
|
|
2458
|
-
/** Create a config. `POST /configs` */
|
|
2459
|
-
async create(params) {
|
|
2460
|
-
return this.request("POST", "/configs", { body: params });
|
|
2461
|
-
}
|
|
2462
|
-
/** Retrieve a config by key. `GET /configs/{key}` */
|
|
2463
|
-
async retrieve(key) {
|
|
2464
|
-
return this.request("GET", `/configs/${encodeURIComponent(key)}`);
|
|
2465
|
-
}
|
|
2466
|
-
/** Update a config. `PUT /configs/{key}` */
|
|
2467
|
-
async update(key, params) {
|
|
2468
|
-
return this.request("PUT", `/configs/${encodeURIComponent(key)}`, { body: params });
|
|
2469
|
-
}
|
|
2470
|
-
/** Delete a config. `DELETE /configs/{key}` */
|
|
2471
|
-
async delete(key) {
|
|
2472
|
-
return this.request("DELETE", `/configs/${encodeURIComponent(key)}`);
|
|
2473
|
-
}
|
|
2474
|
-
};
|
|
2475
|
-
|
|
2476
2338
|
// src/resources/export.ts
|
|
2477
2339
|
var Export = class {
|
|
2478
2340
|
constructor(request) {
|
|
@@ -2734,9 +2596,7 @@ var Delopay = class {
|
|
|
2734
2596
|
this.apiKeys = new ApiKeys(request);
|
|
2735
2597
|
this.billing = new Billing(request);
|
|
2736
2598
|
this.blocklist = new Blocklist(request);
|
|
2737
|
-
this.cardIssuers = new CardIssuers(request);
|
|
2738
2599
|
this.fees = new Fees(request);
|
|
2739
|
-
this.gsm = new Gsm(request);
|
|
2740
2600
|
this.merchantAccounts = new MerchantAccounts(request);
|
|
2741
2601
|
this.projects = new Projects(request);
|
|
2742
2602
|
this.relay = new Relay(request);
|
|
@@ -2751,8 +2611,6 @@ var Delopay = class {
|
|
|
2751
2611
|
this.analyticsDashboard = new AnalyticsDashboard(request);
|
|
2752
2612
|
this.featureMatrix = new FeatureMatrix(request);
|
|
2753
2613
|
this.cards = new Cards(request);
|
|
2754
|
-
this.configs = new Configs(request);
|
|
2755
|
-
this.cache = new Cache(request);
|
|
2756
2614
|
}
|
|
2757
2615
|
/**
|
|
2758
2616
|
* Set a JWT token for subsequent requests.
|
|
@@ -2982,9 +2840,7 @@ Delopay.webhooks = Webhooks;
|
|
|
2982
2840
|
0 && (module.exports = {
|
|
2983
2841
|
Analytics,
|
|
2984
2842
|
AnalyticsDashboard,
|
|
2985
|
-
Cache,
|
|
2986
2843
|
Cards,
|
|
2987
|
-
Configs,
|
|
2988
2844
|
Delopay,
|
|
2989
2845
|
DelopayAuthenticationError,
|
|
2990
2846
|
DelopayError,
|