@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.js
CHANGED
package/dist/internal.cjs
CHANGED
|
@@ -4945,6 +4945,85 @@ var Users = class {
|
|
|
4945
4945
|
async updateMemberExpiry(params) {
|
|
4946
4946
|
return this.request("POST", "/user/employees/update-expiry", { body: params });
|
|
4947
4947
|
}
|
|
4948
|
+
/**
|
|
4949
|
+
* Create a reusable team invitation link. `POST /user/employees/invitation-links`
|
|
4950
|
+
*
|
|
4951
|
+
* Each person who joins through it gets `role_id` on the target, up to
|
|
4952
|
+
* `max_uses` people, until `expires_at`, and only from the networks and
|
|
4953
|
+
* countries `restrictions` allow. Creating it grants nothing and sends
|
|
4954
|
+
* nothing. You may grant only what you could invite with; a shop-level
|
|
4955
|
+
* caller only for its own shop. The secret to share comes back once, in
|
|
4956
|
+
* `token`. A refusal is a `UR_72` error whose `data` is an `InvitationLinkRefusal`.
|
|
4957
|
+
*/
|
|
4958
|
+
async createInvitationLink(params) {
|
|
4959
|
+
return this.request("POST", "/user/employees/invitation-links", { body: params });
|
|
4960
|
+
}
|
|
4961
|
+
/**
|
|
4962
|
+
* Your merchant's team invitation links, newest first, with their usage and
|
|
4963
|
+
* status. A shop-level caller sees its own shop's.
|
|
4964
|
+
* `GET /user/employees/invitation-links`
|
|
4965
|
+
*/
|
|
4966
|
+
async listInvitationLinks() {
|
|
4967
|
+
return this.request("GET", "/user/employees/invitation-links");
|
|
4968
|
+
}
|
|
4969
|
+
/**
|
|
4970
|
+
* Change a link's name, limit, expiry, access expiry or restrictions.
|
|
4971
|
+
* `PUT /user/employees/invitation-links/{link_id}`
|
|
4972
|
+
*
|
|
4973
|
+
* Send the whole policy and the `modified_at` you read as `version`. Saving
|
|
4974
|
+
* also reconfirms the link under your authority.
|
|
4975
|
+
*/
|
|
4976
|
+
async updateInvitationLink(linkId, params) {
|
|
4977
|
+
return this.request("PUT", `/user/employees/invitation-links/${encodeURIComponent(linkId)}`, {
|
|
4978
|
+
body: params
|
|
4979
|
+
});
|
|
4980
|
+
}
|
|
4981
|
+
/**
|
|
4982
|
+
* Revoke a link: nobody joins through it from now on, and who already
|
|
4983
|
+
* joined keeps their access. Revoking a revoked link answers it unchanged.
|
|
4984
|
+
* `POST /user/employees/invitation-links/{link_id}/revoke`
|
|
4985
|
+
*/
|
|
4986
|
+
async revokeInvitationLink(linkId) {
|
|
4987
|
+
return this.request(
|
|
4988
|
+
"POST",
|
|
4989
|
+
`/user/employees/invitation-links/${encodeURIComponent(linkId)}/revoke`
|
|
4990
|
+
);
|
|
4991
|
+
}
|
|
4992
|
+
/**
|
|
4993
|
+
* What a shared link offers, before joining. No authentication; grants
|
|
4994
|
+
* nothing. `POST /user/invitation-link/preview`
|
|
4995
|
+
*/
|
|
4996
|
+
async previewInvitationLink(token) {
|
|
4997
|
+
return this.request("POST", "/user/invitation-link/preview", { body: { token } });
|
|
4998
|
+
}
|
|
4999
|
+
/**
|
|
5000
|
+
* Join through a shared link from a signed-in session.
|
|
5001
|
+
* `POST /user/invitation-link/join`
|
|
5002
|
+
*
|
|
5003
|
+
* Needs a verified email address. Joining twice answers `already_member`
|
|
5004
|
+
* and uses no second place.
|
|
5005
|
+
*/
|
|
5006
|
+
async joinInvitationLink(token) {
|
|
5007
|
+
return this.request("POST", "/user/invitation-link/join", { body: { token } });
|
|
5008
|
+
}
|
|
5009
|
+
/**
|
|
5010
|
+
* Join through a shared link during sign-in, for someone who holds no access
|
|
5011
|
+
* yet: call it with the `accept_invite` single-purpose token set on the
|
|
5012
|
+
* client. Answers the token for the next sign-in step.
|
|
5013
|
+
* `POST /user/invitation-link/join/pre-auth`
|
|
5014
|
+
*/
|
|
5015
|
+
async joinInvitationLinkPreAuth(token) {
|
|
5016
|
+
return this.request("POST", "/user/invitation-link/join/pre-auth", { body: { token } });
|
|
5017
|
+
}
|
|
5018
|
+
/**
|
|
5019
|
+
* Make an account through a shared link, for someone who has none. No
|
|
5020
|
+
* authentication. The account holds no access: its owner verifies the
|
|
5021
|
+
* address from the email this sends, signs in and joins.
|
|
5022
|
+
* `POST /user/invitation-link/register`
|
|
5023
|
+
*/
|
|
5024
|
+
async registerThroughInvitationLink(params) {
|
|
5025
|
+
return this.request("POST", "/user/invitation-link/register", { body: params });
|
|
5026
|
+
}
|
|
4948
5027
|
/**
|
|
4949
5028
|
* One member of your merchant, with the person fields the member list
|
|
4950
5029
|
* omits. `GET /user/employees/{user_id}/details`
|
|
@@ -7140,6 +7219,27 @@ var CheckoutMethods = class {
|
|
|
7140
7219
|
body
|
|
7141
7220
|
});
|
|
7142
7221
|
}
|
|
7222
|
+
/**
|
|
7223
|
+
* For a buyer in `country` paying `amount` `currency`: which placeable
|
|
7224
|
+
* items they are offered and every reason they are not, asked the way the
|
|
7225
|
+
* hosted checkout asks; and how each smart block of the layout evaluates
|
|
7226
|
+
* for them (`smart_blocks`). `test_mode` asks the Test environment.
|
|
7227
|
+
* `GET /checkout-methods/{profile_id}/availability`
|
|
7228
|
+
*/
|
|
7229
|
+
async availability(merchantId, profileId, params) {
|
|
7230
|
+
const { test_mode, ...order } = params;
|
|
7231
|
+
const query = { merchant_id: merchantId, ...order };
|
|
7232
|
+
if (test_mode) {
|
|
7233
|
+
return this.request(
|
|
7234
|
+
"GET",
|
|
7235
|
+
`/checkout-methods/${encodeURIComponent(profileId)}/test/availability`,
|
|
7236
|
+
{ query }
|
|
7237
|
+
);
|
|
7238
|
+
}
|
|
7239
|
+
return this.request("GET", `/checkout-methods/${encodeURIComponent(profileId)}/availability`, {
|
|
7240
|
+
query
|
|
7241
|
+
});
|
|
7242
|
+
}
|
|
7143
7243
|
/**
|
|
7144
7244
|
* What DeloPay confirms beneath each item the shop can place: the card
|
|
7145
7245
|
* networks the card form's accounts accept, and the methods or coins a
|