@verdocs/js-sdk 4.1.11 → 4.1.13

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.js CHANGED
@@ -1724,27 +1724,61 @@ const updateGroup = (endpoint, groupId, params) => endpoint.api //
1724
1724
  *
1725
1725
  * @module
1726
1726
  */
1727
+ /**
1728
+ * Get a list of invitations pending for the caller's organization. The caller must be an admin or owner.
1729
+ */
1727
1730
  const getOrganizationInvitations = (endpoint) => endpoint.api //
1728
1731
  .get(`/v2/organization-invitations`)
1729
1732
  .then((r) => r.data);
1733
+ /**
1734
+ * Invite a new user to join the organization.
1735
+ */
1730
1736
  const createOrganizationInvitation = (endpoint, params) => endpoint.api //
1731
1737
  .post(`/v2/organization-invitations`, params)
1732
1738
  .then((r) => r.data);
1739
+ /**
1740
+ * Delete an invitation. Note that no cancellation message will be sent. Invitations are also one-time-use.
1741
+ * If the invitee attempts to join after the invitation is deleted, accepted, or decline, they will be
1742
+ * shown an error.
1743
+ */
1733
1744
  const deleteOrganizationInvitation = (endpoint, email) => endpoint.api //
1734
1745
  .delete(`/v2/organization-invitations/${email}`)
1735
1746
  .then((r) => r.data);
1747
+ /**
1748
+ * Update an invitation. Note that email may not be changed after the invite is sent. To change
1749
+ * an invitee's email, delete the incorrect entry and create one with the correct value.
1750
+ */
1736
1751
  const updateOrganizationInvitation = (endpoint, email, params) => endpoint.api //
1737
1752
  .patch(`/v2/organization-invitations/${email}`, params)
1738
1753
  .then((r) => r.data);
1754
+ /**
1755
+ * Send a reminder to the invitee to join the organization.
1756
+ */
1739
1757
  const resendOrganizationInvitation = (endpoint, email) => endpoint.api //
1740
1758
  .post('/v2/organization-invitations/resend', { email })
1741
1759
  .then((r) => r.data);
1760
+ /**
1761
+ * Get an invitation's details. This is generally used as the first step of accepting the invite.
1762
+ * A successful response will indicate that the invite token is still valid, and include some
1763
+ * metadata for the organization to style the acceptance screen.
1764
+ */
1742
1765
  const getOrganizationInvitation = (endpoint, email, token) => endpoint.api //
1743
1766
  .get(`/v2/organization-invitations/${email}/${token}`)
1744
1767
  .then((r) => r.data);
1745
- const acceptOrganizationInvitation = (endpoint, email, token) => endpoint.api //
1746
- .post('/v2/organization-invitations/accept', { email, token })
1768
+ /**
1769
+ * Accept an invitation. This will automatically create an Auth0 user for the caller as well as a profile
1770
+ * with the appropriate role as specified in the invite. The profile will be set as "current" for the caller,
1771
+ * and session tokens will be returned to access the new profile. The profile's email_verified flag will
1772
+ * also be set to true.
1773
+ */
1774
+ const acceptOrganizationInvitation = (endpoint, params) => endpoint.api //
1775
+ .post('/v2/organization-invitations/accept', params)
1747
1776
  .then((r) => r.data);
1777
+ /**
1778
+ * Decline an invitation. This will mark the status "declined," providing a visual indication to the
1779
+ * organization's admins that the invite was declined, preventing further invites from being created
1780
+ * to the same email address, and also preventing the invitee from receiving reminders to join.
1781
+ */
1748
1782
  const declineOrganizationInvitation = (endpoint, email, token) => endpoint.api //
1749
1783
  .post('/v2/organization-invitations/decline', { email, token })
1750
1784
  .then((r) => r.data);
@@ -1754,12 +1788,22 @@ const declineOrganizationInvitation = (endpoint, email, token) => endpoint.api /
1754
1788
  *
1755
1789
  * @module
1756
1790
  */
1791
+ /**
1792
+ * Get a list of the members in the caller's organization.
1793
+ */
1757
1794
  const getOrganizationMembers = (endpoint) => endpoint.api //
1758
1795
  .get(`/v2/organization-members`)
1759
1796
  .then((r) => r.data);
1797
+ /**
1798
+ * Delete a member from the caller's organization. Note that the caller must be an admin or owner,
1799
+ * may not delete him/herself
1800
+ */
1760
1801
  const deleteOrganizationMember = (endpoint, profileId) => endpoint.api //
1761
1802
  .delete(`/v2/organization-members/${profileId}`)
1762
1803
  .then((r) => r.data);
1804
+ /**
1805
+ * Update a member.
1806
+ */
1763
1807
  const updateOrganizationMember = (endpoint, profileId, params) => endpoint.api //
1764
1808
  .patch(`/v2/organization-members/${profileId}`, params)
1765
1809
  .then((r) => r.data);