@verdocs/js-sdk 3.8.6 → 3.8.7

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.
@@ -1,13 +1,19 @@
1
1
  import { VerdocsEndpoint } from '../VerdocsEndpoint';
2
+ import { IInvitation } from './Types';
2
3
  /**
3
4
  * An invitation represents an opportunity for a Member to join an Organization.
4
5
  *
5
6
  * @module
6
7
  */
7
- export declare const getInvitations: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<any>;
8
- export declare const createInvitation: (endpoint: VerdocsEndpoint, organizationId: string, params: any) => Promise<any>;
8
+ export interface ICreateInvitationRequest {
9
+ email: string;
10
+ role_id: string;
11
+ organization_id: string;
12
+ }
13
+ export declare const getInvitations: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IInvitation[]>;
14
+ export declare const createInvitation: (endpoint: VerdocsEndpoint, organizationId: string, params: ICreateInvitationRequest) => Promise<IInvitation>;
9
15
  export declare const deleteInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string) => Promise<any>;
10
- export declare const updateInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, params: any) => Promise<any>;
16
+ export declare const updateInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, params: Partial<ICreateInvitationRequest>) => Promise<IInvitation>;
11
17
  export declare const resendInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string) => Promise<any>;
12
18
  export declare const claimInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, params: any) => Promise<any>;
13
19
  export declare const claimNewUser: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<any>;
@@ -1,8 +1,3 @@
1
- /**
2
- * An invitation represents an opportunity for a Member to join an Organization.
3
- *
4
- * @module
5
- */
6
1
  export var getInvitations = function (endpoint, organizationId) {
7
2
  return endpoint.api //
8
3
  .get("/organizations/".concat(organizationId, "/invitation"))
@@ -93,3 +93,11 @@ export interface IGroupDetail {
93
93
  /** For future expansion. In the future, Verdocs may support group hierarchies. Until then this field is always null. */
94
94
  parent_id: string | null;
95
95
  }
96
+ export interface IInvitation {
97
+ organization_id: string;
98
+ email: string;
99
+ token: string;
100
+ generated_at: string;
101
+ role_id: string;
102
+ status: 'pending';
103
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "3.8.6",
3
+ "version": "3.8.7",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",