@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/index.cjs CHANGED
@@ -213,6 +213,7 @@ __export(index_exports, {
213
213
  fontWeightValue: () => fontWeightValue,
214
214
  inputPadValue: () => inputPadValue,
215
215
  isCheckboxChecked: () => isCheckboxChecked,
216
+ isConfirmedChild: () => isConfirmedChild,
216
217
  isDarkSurface: () => isDarkSurface,
217
218
  isDefaultBadgeSet: () => isDefaultBadgeSet,
218
219
  isHexColor: () => isHexColor,
@@ -4928,6 +4929,85 @@ var Users = class {
4928
4929
  async updateMemberExpiry(params) {
4929
4930
  return this.request("POST", "/user/employees/update-expiry", { body: params });
4930
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
+ }
4931
5011
  /**
4932
5012
  * One member of your merchant, with the person fields the member list
4933
5013
  * omits. `GET /user/employees/{user_id}/details`
@@ -7123,6 +7203,31 @@ var CheckoutMethods = class {
7123
7203
  body
7124
7204
  });
7125
7205
  }
7206
+ /**
7207
+ * What DeloPay confirms beneath each item the shop can place: the card
7208
+ * networks the card form's accounts accept, and the methods or coins a
7209
+ * provider's page offers, per account, with source and freshness. A
7210
+ * provider that answers only per order reports `context_required` until
7211
+ * `currency` and `amount` are given. A layout item's `children` narrows
7212
+ * these lists and never adds to them.
7213
+ * `GET /checkout-methods/{profile_id}/children` (`/test/children` for Test)
7214
+ */
7215
+ async children(merchantId, profileId, params = {}) {
7216
+ const { environment, ...order } = params;
7217
+ const query = { merchant_id: merchantId, ...order };
7218
+ if (environment === "test") {
7219
+ return this.request(
7220
+ "GET",
7221
+ `/checkout-methods/${encodeURIComponent(profileId)}/test/children`,
7222
+ {
7223
+ query
7224
+ }
7225
+ );
7226
+ }
7227
+ return this.request("GET", `/checkout-methods/${encodeURIComponent(profileId)}/children`, {
7228
+ query
7229
+ });
7230
+ }
7126
7231
  /**
7127
7232
  * Delete the stored layout; the shop is back on the derived one.
7128
7233
  * `DELETE /checkout-methods/{profile_id}`
@@ -13066,6 +13171,9 @@ function presentationIconSrc(entry, color) {
13066
13171
  if (entry.fallback_icon) return builtinPaymentIconDataUri(entry.fallback_icon, color);
13067
13172
  return null;
13068
13173
  }
13174
+ function isConfirmedChild(child) {
13175
+ return child.source !== "merchant";
13176
+ }
13069
13177
  function isSupportedPresentation(response) {
13070
13178
  return response.contract_version === PRESENTATION_CONTRACT_VERSION;
13071
13179
  }
@@ -13766,6 +13874,7 @@ var encodeNativePanes = encodePanes;
13766
13874
  fontWeightValue,
13767
13875
  inputPadValue,
13768
13876
  isCheckboxChecked,
13877
+ isConfirmedChild,
13769
13878
  isDarkSurface,
13770
13879
  isDefaultBadgeSet,
13771
13880
  isHexColor,