@delopay/sdk 0.263.0 → 0.265.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-YZCDGNZL.js → chunk-SW4N2WY4.js} +101 -1
- package/dist/chunk-SW4N2WY4.js.map +1 -0
- package/dist/index.cjs +100 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +592 -6
- package/dist/index.d.ts +592 -6
- package/dist/index.js +1 -1
- package/dist/internal.cjs +100 -0
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-YZCDGNZL.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -4929,6 +4929,85 @@ var Users = class {
|
|
|
4929
4929
|
async updateMemberExpiry(params) {
|
|
4930
4930
|
return this.request("POST", "/user/employees/update-expiry", { body: params });
|
|
4931
4931
|
}
|
|
4932
|
+
/**
|
|
4933
|
+
* Create a reusable team invitation link. `POST /user/employees/invitation-links`
|
|
4934
|
+
*
|
|
4935
|
+
* Each person who joins through it gets `role_id` on the target, up to
|
|
4936
|
+
* `max_uses` people, until `expires_at`, and only from the networks and
|
|
4937
|
+
* countries `restrictions` allow. Creating it grants nothing and sends
|
|
4938
|
+
* nothing. You may grant only what you could invite with; a shop-level
|
|
4939
|
+
* caller only for its own shop. The secret to share comes back once, in
|
|
4940
|
+
* `token`. A refusal is a `UR_72` error whose `data` is an `InvitationLinkRefusal`.
|
|
4941
|
+
*/
|
|
4942
|
+
async createInvitationLink(params) {
|
|
4943
|
+
return this.request("POST", "/user/employees/invitation-links", { body: params });
|
|
4944
|
+
}
|
|
4945
|
+
/**
|
|
4946
|
+
* Your merchant's team invitation links, newest first, with their usage and
|
|
4947
|
+
* status. A shop-level caller sees its own shop's.
|
|
4948
|
+
* `GET /user/employees/invitation-links`
|
|
4949
|
+
*/
|
|
4950
|
+
async listInvitationLinks() {
|
|
4951
|
+
return this.request("GET", "/user/employees/invitation-links");
|
|
4952
|
+
}
|
|
4953
|
+
/**
|
|
4954
|
+
* Change a link's name, limit, expiry, access expiry or restrictions.
|
|
4955
|
+
* `PUT /user/employees/invitation-links/{link_id}`
|
|
4956
|
+
*
|
|
4957
|
+
* Send the whole policy and the `modified_at` you read as `version`. Saving
|
|
4958
|
+
* also reconfirms the link under your authority.
|
|
4959
|
+
*/
|
|
4960
|
+
async updateInvitationLink(linkId, params) {
|
|
4961
|
+
return this.request("PUT", `/user/employees/invitation-links/${encodeURIComponent(linkId)}`, {
|
|
4962
|
+
body: params
|
|
4963
|
+
});
|
|
4964
|
+
}
|
|
4965
|
+
/**
|
|
4966
|
+
* Revoke a link: nobody joins through it from now on, and who already
|
|
4967
|
+
* joined keeps their access. Revoking a revoked link answers it unchanged.
|
|
4968
|
+
* `POST /user/employees/invitation-links/{link_id}/revoke`
|
|
4969
|
+
*/
|
|
4970
|
+
async revokeInvitationLink(linkId) {
|
|
4971
|
+
return this.request(
|
|
4972
|
+
"POST",
|
|
4973
|
+
`/user/employees/invitation-links/${encodeURIComponent(linkId)}/revoke`
|
|
4974
|
+
);
|
|
4975
|
+
}
|
|
4976
|
+
/**
|
|
4977
|
+
* What a shared link offers, before joining. No authentication; grants
|
|
4978
|
+
* nothing. `POST /user/invitation-link/preview`
|
|
4979
|
+
*/
|
|
4980
|
+
async previewInvitationLink(token) {
|
|
4981
|
+
return this.request("POST", "/user/invitation-link/preview", { body: { token } });
|
|
4982
|
+
}
|
|
4983
|
+
/**
|
|
4984
|
+
* Join through a shared link from a signed-in session.
|
|
4985
|
+
* `POST /user/invitation-link/join`
|
|
4986
|
+
*
|
|
4987
|
+
* Needs a verified email address. Joining twice answers `already_member`
|
|
4988
|
+
* and uses no second place.
|
|
4989
|
+
*/
|
|
4990
|
+
async joinInvitationLink(token) {
|
|
4991
|
+
return this.request("POST", "/user/invitation-link/join", { body: { token } });
|
|
4992
|
+
}
|
|
4993
|
+
/**
|
|
4994
|
+
* Join through a shared link during sign-in, for someone who holds no access
|
|
4995
|
+
* yet: call it with the `accept_invite` single-purpose token set on the
|
|
4996
|
+
* client. Answers the token for the next sign-in step.
|
|
4997
|
+
* `POST /user/invitation-link/join/pre-auth`
|
|
4998
|
+
*/
|
|
4999
|
+
async joinInvitationLinkPreAuth(token) {
|
|
5000
|
+
return this.request("POST", "/user/invitation-link/join/pre-auth", { body: { token } });
|
|
5001
|
+
}
|
|
5002
|
+
/**
|
|
5003
|
+
* Make an account through a shared link, for someone who has none. No
|
|
5004
|
+
* authentication. The account holds no access: its owner verifies the
|
|
5005
|
+
* address from the email this sends, signs in and joins.
|
|
5006
|
+
* `POST /user/invitation-link/register`
|
|
5007
|
+
*/
|
|
5008
|
+
async registerThroughInvitationLink(params) {
|
|
5009
|
+
return this.request("POST", "/user/invitation-link/register", { body: params });
|
|
5010
|
+
}
|
|
4932
5011
|
/**
|
|
4933
5012
|
* One member of your merchant, with the person fields the member list
|
|
4934
5013
|
* omits. `GET /user/employees/{user_id}/details`
|
|
@@ -7124,6 +7203,27 @@ var CheckoutMethods = class {
|
|
|
7124
7203
|
body
|
|
7125
7204
|
});
|
|
7126
7205
|
}
|
|
7206
|
+
/**
|
|
7207
|
+
* For a buyer in `country` paying `amount` `currency`: which placeable
|
|
7208
|
+
* items they are offered and every reason they are not, asked the way the
|
|
7209
|
+
* hosted checkout asks; and how each smart block of the layout evaluates
|
|
7210
|
+
* for them (`smart_blocks`). `test_mode` asks the Test environment.
|
|
7211
|
+
* `GET /checkout-methods/{profile_id}/availability`
|
|
7212
|
+
*/
|
|
7213
|
+
async availability(merchantId, profileId, params) {
|
|
7214
|
+
const { test_mode, ...order } = params;
|
|
7215
|
+
const query = { merchant_id: merchantId, ...order };
|
|
7216
|
+
if (test_mode) {
|
|
7217
|
+
return this.request(
|
|
7218
|
+
"GET",
|
|
7219
|
+
`/checkout-methods/${encodeURIComponent(profileId)}/test/availability`,
|
|
7220
|
+
{ query }
|
|
7221
|
+
);
|
|
7222
|
+
}
|
|
7223
|
+
return this.request("GET", `/checkout-methods/${encodeURIComponent(profileId)}/availability`, {
|
|
7224
|
+
query
|
|
7225
|
+
});
|
|
7226
|
+
}
|
|
7127
7227
|
/**
|
|
7128
7228
|
* What DeloPay confirms beneath each item the shop can place: the card
|
|
7129
7229
|
* networks the card form's accounts accept, and the methods or coins a
|