@delopay/sdk 0.240.0 → 0.244.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-K6P7MQ7K.js → chunk-LT6DP5KX.js} +101 -1
- package/dist/chunk-LT6DP5KX.js.map +1 -0
- package/dist/index.cjs +100 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +329 -3
- package/dist/index.d.ts +329 -3
- package/dist/index.js +1 -1
- package/dist/internal.cjs +113 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +10 -3
- package/dist/internal.d.ts +10 -3
- package/dist/internal.js +14 -1
- package/dist/internal.js.map +1 -1
- package/package.json +18 -17
- package/dist/chunk-K6P7MQ7K.js.map +0 -1
|
@@ -655,6 +655,43 @@ var Connectors = class {
|
|
|
655
655
|
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}`
|
|
656
656
|
);
|
|
657
657
|
}
|
|
658
|
+
/**
|
|
659
|
+
* Read the transaction currencies a connector may process: its own list,
|
|
660
|
+
* what the provider is known to accept with its methods, and the effective
|
|
661
|
+
* currencies in each shop it serves (todos#333).
|
|
662
|
+
* `GET /account/{accountId}/connectors/{connectorId}/currencies`
|
|
663
|
+
*/
|
|
664
|
+
async getCurrencies(accountId, connectorId) {
|
|
665
|
+
return this.request(
|
|
666
|
+
"GET",
|
|
667
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* Set the transaction currencies a connector may process in every shop it
|
|
672
|
+
* serves. `allowed_currencies: null` allows every currency the provider
|
|
673
|
+
* supports. With `dry_run`, nothing is saved and `impact` reports the effect.
|
|
674
|
+
* `PUT /account/{accountId}/connectors/{connectorId}/currencies`
|
|
675
|
+
*/
|
|
676
|
+
async setCurrencies(accountId, connectorId, params) {
|
|
677
|
+
return this.request(
|
|
678
|
+
"PUT",
|
|
679
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/currencies`,
|
|
680
|
+
{ body: params }
|
|
681
|
+
);
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Narrow a connector's currencies in one shop it serves, within the
|
|
685
|
+
* connector's own list. `allowed_currencies: null` returns the shop to it.
|
|
686
|
+
* `PUT /account/{accountId}/connectors/{connectorId}/shops/{profileId}/currencies`
|
|
687
|
+
*/
|
|
688
|
+
async setShopCurrencies(accountId, connectorId, profileId, params) {
|
|
689
|
+
return this.request(
|
|
690
|
+
"PUT",
|
|
691
|
+
`/account/${encodeURIComponent(accountId)}/connectors/${encodeURIComponent(connectorId)}/shops/${encodeURIComponent(profileId)}/currencies`,
|
|
692
|
+
{ body: params }
|
|
693
|
+
);
|
|
694
|
+
}
|
|
658
695
|
// --- Advanced operations (Task 4.8) ---
|
|
659
696
|
/**
|
|
660
697
|
* Run the configuration checks for a vault (VGS) connector account:
|
|
@@ -6864,6 +6901,68 @@ var Subscriptions = class {
|
|
|
6864
6901
|
}
|
|
6865
6902
|
};
|
|
6866
6903
|
|
|
6904
|
+
// src/resources/buyerAccount.ts
|
|
6905
|
+
var BuyerAccount = class {
|
|
6906
|
+
constructor(request) {
|
|
6907
|
+
this.request = request;
|
|
6908
|
+
}
|
|
6909
|
+
/** Whether buyers can sign in by email on this platform, and how. */
|
|
6910
|
+
async availability(options) {
|
|
6911
|
+
return this.request("GET", "/buyer-account/availability", { ...options });
|
|
6912
|
+
}
|
|
6913
|
+
/**
|
|
6914
|
+
* Mail a sign-in code, a link, or both to the address, as the platform
|
|
6915
|
+
* offers. The answer is the same whether or not the address has purchases.
|
|
6916
|
+
*/
|
|
6917
|
+
async startSignIn(params, options) {
|
|
6918
|
+
return this.request("POST", "/buyer-account/sign-in", { body: params, ...options });
|
|
6919
|
+
}
|
|
6920
|
+
/** Complete a sign-in with the code from the message. */
|
|
6921
|
+
async verifyCode(params, options) {
|
|
6922
|
+
return this.request("POST", "/buyer-account/sign-in/code", { body: params, ...options });
|
|
6923
|
+
}
|
|
6924
|
+
/** Complete a sign-in with the token of the link in the message. */
|
|
6925
|
+
async verifyLink(params, options) {
|
|
6926
|
+
return this.request("POST", "/buyer-account/sign-in/link", { body: params, ...options });
|
|
6927
|
+
}
|
|
6928
|
+
/** The current session: the address signed in with, masked, and its expiry. */
|
|
6929
|
+
async getSession(options) {
|
|
6930
|
+
return this.request("GET", "/buyer-account/session", { ...options });
|
|
6931
|
+
}
|
|
6932
|
+
/** End the current session. */
|
|
6933
|
+
async signOut(options) {
|
|
6934
|
+
return this.request("DELETE", "/buyer-account/session", { ...options });
|
|
6935
|
+
}
|
|
6936
|
+
/**
|
|
6937
|
+
* The buyer's purchases across merchants, newest first, as receipts: shop,
|
|
6938
|
+
* date, amount, items and status. Page with `next_cursor`.
|
|
6939
|
+
*/
|
|
6940
|
+
async listPurchases(params, options) {
|
|
6941
|
+
return this.request("GET", "/buyer-account/purchases", {
|
|
6942
|
+
query: params,
|
|
6943
|
+
...options
|
|
6944
|
+
});
|
|
6945
|
+
}
|
|
6946
|
+
/**
|
|
6947
|
+
* Confirm the record of a shop's customer portal link for the signed-in
|
|
6948
|
+
* buyer. The link's customer must carry the address the buyer signed in
|
|
6949
|
+
* with.
|
|
6950
|
+
*/
|
|
6951
|
+
async confirm(params, options) {
|
|
6952
|
+
return this.request("POST", "/buyer-account/confirmations", { body: params, ...options });
|
|
6953
|
+
}
|
|
6954
|
+
/**
|
|
6955
|
+
* Open the shop's customer portal for a confirmed record, named by the
|
|
6956
|
+
* `record` its purchases carry. Opening another one for the same record
|
|
6957
|
+
* ends the previous one.
|
|
6958
|
+
*/
|
|
6959
|
+
async openPortal(record, options) {
|
|
6960
|
+
return this.request("POST", `/buyer-account/records/${encodeURIComponent(record)}/portal`, {
|
|
6961
|
+
...options
|
|
6962
|
+
});
|
|
6963
|
+
}
|
|
6964
|
+
};
|
|
6965
|
+
|
|
6867
6966
|
// src/resources/buyerPortal.ts
|
|
6868
6967
|
var BuyerPortal = class {
|
|
6869
6968
|
constructor(request) {
|
|
@@ -7991,6 +8090,7 @@ var Delopay = class {
|
|
|
7991
8090
|
this.risk = new Risk(request);
|
|
7992
8091
|
this.subscriptions = new Subscriptions(request);
|
|
7993
8092
|
this.buyerPortal = new BuyerPortal(request);
|
|
8093
|
+
this.buyerAccount = new BuyerAccount(request);
|
|
7994
8094
|
this.files = new Files(request);
|
|
7995
8095
|
this.export = new Export(request);
|
|
7996
8096
|
this.forex = new Forex(request);
|
|
@@ -12813,4 +12913,4 @@ export {
|
|
|
12813
12913
|
decodeNativePanes,
|
|
12814
12914
|
encodeNativePanes
|
|
12815
12915
|
};
|
|
12816
|
-
//# sourceMappingURL=chunk-
|
|
12916
|
+
//# sourceMappingURL=chunk-LT6DP5KX.js.map
|