@delopay/sdk 0.263.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
@@ -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`