@delopay/sdk 0.261.0 → 0.264.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-BPDN5AIB.js → chunk-2MA2A66Y.js} +109 -1
- package/dist/chunk-2MA2A66Y.js.map +1 -0
- package/dist/index.cjs +109 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +498 -11
- package/dist/index.d.ts +498 -11
- package/dist/index.js +3 -1
- package/dist/internal.cjs +109 -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 +3 -1
- package/dist/internal.js.map +1 -1
- package/package.json +17 -18
- package/dist/chunk-BPDN5AIB.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -192,6 +192,7 @@ import {
|
|
|
192
192
|
fontWeightValue,
|
|
193
193
|
inputPadValue,
|
|
194
194
|
isCheckboxChecked,
|
|
195
|
+
isConfirmedChild,
|
|
195
196
|
isDarkSurface,
|
|
196
197
|
isDefaultBadgeSet,
|
|
197
198
|
isHexColor,
|
|
@@ -249,7 +250,7 @@ import {
|
|
|
249
250
|
visibleCustomFields,
|
|
250
251
|
whopAccentSwatch,
|
|
251
252
|
whopCardElement
|
|
252
|
-
} from "./chunk-
|
|
253
|
+
} from "./chunk-2MA2A66Y.js";
|
|
253
254
|
export {
|
|
254
255
|
AIRWALLEX_AUTOFILL_TREATMENTS,
|
|
255
256
|
AIRWALLEX_CARD_LAYOUTS,
|
|
@@ -444,6 +445,7 @@ export {
|
|
|
444
445
|
fontWeightValue,
|
|
445
446
|
inputPadValue,
|
|
446
447
|
isCheckboxChecked,
|
|
448
|
+
isConfirmedChild,
|
|
447
449
|
isDarkSurface,
|
|
448
450
|
isDefaultBadgeSet,
|
|
449
451
|
isHexColor,
|
package/dist/internal.cjs
CHANGED
|
@@ -229,6 +229,7 @@ __export(internal_exports, {
|
|
|
229
229
|
fontWeightValue: () => fontWeightValue,
|
|
230
230
|
inputPadValue: () => inputPadValue,
|
|
231
231
|
isCheckboxChecked: () => isCheckboxChecked,
|
|
232
|
+
isConfirmedChild: () => isConfirmedChild,
|
|
232
233
|
isDarkSurface: () => isDarkSurface,
|
|
233
234
|
isDefaultBadgeSet: () => isDefaultBadgeSet,
|
|
234
235
|
isHexColor: () => isHexColor,
|
|
@@ -4944,6 +4945,85 @@ var Users = class {
|
|
|
4944
4945
|
async updateMemberExpiry(params) {
|
|
4945
4946
|
return this.request("POST", "/user/employees/update-expiry", { body: params });
|
|
4946
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
|
+
}
|
|
4947
5027
|
/**
|
|
4948
5028
|
* One member of your merchant, with the person fields the member list
|
|
4949
5029
|
* omits. `GET /user/employees/{user_id}/details`
|
|
@@ -7139,6 +7219,31 @@ var CheckoutMethods = class {
|
|
|
7139
7219
|
body
|
|
7140
7220
|
});
|
|
7141
7221
|
}
|
|
7222
|
+
/**
|
|
7223
|
+
* What DeloPay confirms beneath each item the shop can place: the card
|
|
7224
|
+
* networks the card form's accounts accept, and the methods or coins a
|
|
7225
|
+
* provider's page offers, per account, with source and freshness. A
|
|
7226
|
+
* provider that answers only per order reports `context_required` until
|
|
7227
|
+
* `currency` and `amount` are given. A layout item's `children` narrows
|
|
7228
|
+
* these lists and never adds to them.
|
|
7229
|
+
* `GET /checkout-methods/{profile_id}/children` (`/test/children` for Test)
|
|
7230
|
+
*/
|
|
7231
|
+
async children(merchantId, profileId, params = {}) {
|
|
7232
|
+
const { environment, ...order } = params;
|
|
7233
|
+
const query = { merchant_id: merchantId, ...order };
|
|
7234
|
+
if (environment === "test") {
|
|
7235
|
+
return this.request(
|
|
7236
|
+
"GET",
|
|
7237
|
+
`/checkout-methods/${encodeURIComponent(profileId)}/test/children`,
|
|
7238
|
+
{
|
|
7239
|
+
query
|
|
7240
|
+
}
|
|
7241
|
+
);
|
|
7242
|
+
}
|
|
7243
|
+
return this.request("GET", `/checkout-methods/${encodeURIComponent(profileId)}/children`, {
|
|
7244
|
+
query
|
|
7245
|
+
});
|
|
7246
|
+
}
|
|
7142
7247
|
/**
|
|
7143
7248
|
* Delete the stored layout; the shop is back on the derived one.
|
|
7144
7249
|
* `DELETE /checkout-methods/{profile_id}`
|
|
@@ -13082,6 +13187,9 @@ function presentationIconSrc(entry, color) {
|
|
|
13082
13187
|
if (entry.fallback_icon) return builtinPaymentIconDataUri(entry.fallback_icon, color);
|
|
13083
13188
|
return null;
|
|
13084
13189
|
}
|
|
13190
|
+
function isConfirmedChild(child) {
|
|
13191
|
+
return child.source !== "merchant";
|
|
13192
|
+
}
|
|
13085
13193
|
function isSupportedPresentation(response) {
|
|
13086
13194
|
return response.contract_version === PRESENTATION_CONTRACT_VERSION;
|
|
13087
13195
|
}
|
|
@@ -15427,6 +15535,7 @@ var DelopayInternal = class extends Delopay {
|
|
|
15427
15535
|
fontWeightValue,
|
|
15428
15536
|
inputPadValue,
|
|
15429
15537
|
isCheckboxChecked,
|
|
15538
|
+
isConfirmedChild,
|
|
15430
15539
|
isDarkSurface,
|
|
15431
15540
|
isDefaultBadgeSet,
|
|
15432
15541
|
isHexColor,
|