@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.
@@ -4653,6 +4653,85 @@ var Users = class {
4653
4653
  async updateMemberExpiry(params) {
4654
4654
  return this.request("POST", "/user/employees/update-expiry", { body: params });
4655
4655
  }
4656
+ /**
4657
+ * Create a reusable team invitation link. `POST /user/employees/invitation-links`
4658
+ *
4659
+ * Each person who joins through it gets `role_id` on the target, up to
4660
+ * `max_uses` people, until `expires_at`, and only from the networks and
4661
+ * countries `restrictions` allow. Creating it grants nothing and sends
4662
+ * nothing. You may grant only what you could invite with; a shop-level
4663
+ * caller only for its own shop. The secret to share comes back once, in
4664
+ * `token`. A refusal is a `UR_72` error whose `data` is an `InvitationLinkRefusal`.
4665
+ */
4666
+ async createInvitationLink(params) {
4667
+ return this.request("POST", "/user/employees/invitation-links", { body: params });
4668
+ }
4669
+ /**
4670
+ * Your merchant's team invitation links, newest first, with their usage and
4671
+ * status. A shop-level caller sees its own shop's.
4672
+ * `GET /user/employees/invitation-links`
4673
+ */
4674
+ async listInvitationLinks() {
4675
+ return this.request("GET", "/user/employees/invitation-links");
4676
+ }
4677
+ /**
4678
+ * Change a link's name, limit, expiry, access expiry or restrictions.
4679
+ * `PUT /user/employees/invitation-links/{link_id}`
4680
+ *
4681
+ * Send the whole policy and the `modified_at` you read as `version`. Saving
4682
+ * also reconfirms the link under your authority.
4683
+ */
4684
+ async updateInvitationLink(linkId, params) {
4685
+ return this.request("PUT", `/user/employees/invitation-links/${encodeURIComponent(linkId)}`, {
4686
+ body: params
4687
+ });
4688
+ }
4689
+ /**
4690
+ * Revoke a link: nobody joins through it from now on, and who already
4691
+ * joined keeps their access. Revoking a revoked link answers it unchanged.
4692
+ * `POST /user/employees/invitation-links/{link_id}/revoke`
4693
+ */
4694
+ async revokeInvitationLink(linkId) {
4695
+ return this.request(
4696
+ "POST",
4697
+ `/user/employees/invitation-links/${encodeURIComponent(linkId)}/revoke`
4698
+ );
4699
+ }
4700
+ /**
4701
+ * What a shared link offers, before joining. No authentication; grants
4702
+ * nothing. `POST /user/invitation-link/preview`
4703
+ */
4704
+ async previewInvitationLink(token) {
4705
+ return this.request("POST", "/user/invitation-link/preview", { body: { token } });
4706
+ }
4707
+ /**
4708
+ * Join through a shared link from a signed-in session.
4709
+ * `POST /user/invitation-link/join`
4710
+ *
4711
+ * Needs a verified email address. Joining twice answers `already_member`
4712
+ * and uses no second place.
4713
+ */
4714
+ async joinInvitationLink(token) {
4715
+ return this.request("POST", "/user/invitation-link/join", { body: { token } });
4716
+ }
4717
+ /**
4718
+ * Join through a shared link during sign-in, for someone who holds no access
4719
+ * yet: call it with the `accept_invite` single-purpose token set on the
4720
+ * client. Answers the token for the next sign-in step.
4721
+ * `POST /user/invitation-link/join/pre-auth`
4722
+ */
4723
+ async joinInvitationLinkPreAuth(token) {
4724
+ return this.request("POST", "/user/invitation-link/join/pre-auth", { body: { token } });
4725
+ }
4726
+ /**
4727
+ * Make an account through a shared link, for someone who has none. No
4728
+ * authentication. The account holds no access: its owner verifies the
4729
+ * address from the email this sends, signs in and joins.
4730
+ * `POST /user/invitation-link/register`
4731
+ */
4732
+ async registerThroughInvitationLink(params) {
4733
+ return this.request("POST", "/user/invitation-link/register", { body: params });
4734
+ }
4656
4735
  /**
4657
4736
  * One member of your merchant, with the person fields the member list
4658
4737
  * omits. `GET /user/employees/{user_id}/details`
@@ -6848,6 +6927,31 @@ var CheckoutMethods = class {
6848
6927
  body
6849
6928
  });
6850
6929
  }
6930
+ /**
6931
+ * What DeloPay confirms beneath each item the shop can place: the card
6932
+ * networks the card form's accounts accept, and the methods or coins a
6933
+ * provider's page offers, per account, with source and freshness. A
6934
+ * provider that answers only per order reports `context_required` until
6935
+ * `currency` and `amount` are given. A layout item's `children` narrows
6936
+ * these lists and never adds to them.
6937
+ * `GET /checkout-methods/{profile_id}/children` (`/test/children` for Test)
6938
+ */
6939
+ async children(merchantId, profileId, params = {}) {
6940
+ const { environment, ...order } = params;
6941
+ const query = { merchant_id: merchantId, ...order };
6942
+ if (environment === "test") {
6943
+ return this.request(
6944
+ "GET",
6945
+ `/checkout-methods/${encodeURIComponent(profileId)}/test/children`,
6946
+ {
6947
+ query
6948
+ }
6949
+ );
6950
+ }
6951
+ return this.request("GET", `/checkout-methods/${encodeURIComponent(profileId)}/children`, {
6952
+ query
6953
+ });
6954
+ }
6851
6955
  /**
6852
6956
  * Delete the stored layout; the shop is back on the derived one.
6853
6957
  * `DELETE /checkout-methods/{profile_id}`
@@ -12791,6 +12895,9 @@ function presentationIconSrc(entry, color) {
12791
12895
  if (entry.fallback_icon) return builtinPaymentIconDataUri(entry.fallback_icon, color);
12792
12896
  return null;
12793
12897
  }
12898
+ function isConfirmedChild(child) {
12899
+ return child.source !== "merchant";
12900
+ }
12794
12901
  function isSupportedPresentation(response) {
12795
12902
  return response.contract_version === PRESENTATION_CONTRACT_VERSION;
12796
12903
  }
@@ -13517,6 +13624,7 @@ export {
13517
13624
  builtinPaymentIconDataUri,
13518
13625
  presentationIconDataUri,
13519
13626
  presentationIconSrc,
13627
+ isConfirmedChild,
13520
13628
  isSupportedPresentation,
13521
13629
  presentationTiers,
13522
13630
  selectableEntries,
@@ -13550,4 +13658,4 @@ export {
13550
13658
  decodeNativePanes,
13551
13659
  encodeNativePanes
13552
13660
  };
13553
- //# sourceMappingURL=chunk-BPDN5AIB.js.map
13661
+ //# sourceMappingURL=chunk-2MA2A66Y.js.map