@verdocs/js-sdk 3.8.5 → 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
|
|
8
|
-
|
|
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:
|
|
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>;
|
|
@@ -20,11 +20,11 @@ export declare const deleteOrganization: (endpoint: VerdocsEndpoint, organizatio
|
|
|
20
20
|
/**
|
|
21
21
|
* Get an organization by ID.
|
|
22
22
|
*/
|
|
23
|
-
export declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<
|
|
23
|
+
export declare const getOrganization: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IOrganization>;
|
|
24
24
|
/**
|
|
25
25
|
* Update an organization.
|
|
26
26
|
*/
|
|
27
|
-
export declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: any) => Promise<
|
|
27
|
+
export declare const updateOrganization: (endpoint: VerdocsEndpoint, organizationId: string, params: any) => Promise<IOrganization>;
|
|
28
28
|
/**
|
|
29
29
|
* Check if an organization name is available. Typically used during the sign-up process. This endpoint is rate-limited
|
|
30
30
|
* to prevent abuse. Developers experiencing problems with testing new applications should contact support.
|
package/Organizations/Types.d.ts
CHANGED
|
@@ -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
|
+
}
|