@verdocs/js-sdk 3.8.6 → 3.8.8
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.
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import { IGroup, IGroupDetail } from './Types';
|
|
11
11
|
import { VerdocsEndpoint } from '../VerdocsEndpoint';
|
|
12
|
+
import { IPermission } from '../Users/Types';
|
|
12
13
|
/**
|
|
13
14
|
* Get a list of groups for a given organization. The caller must have admin access to the organization.
|
|
14
15
|
*
|
|
@@ -42,5 +43,5 @@ export declare const getGroup: (endpoint: VerdocsEndpoint, organizationId: strin
|
|
|
42
43
|
export declare const getMembers: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string) => Promise<any>;
|
|
43
44
|
export declare const addMembers: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, params: any) => Promise<any>;
|
|
44
45
|
export declare const deleteMembers: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, params: any) => Promise<any>;
|
|
45
|
-
export declare const addPermission: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, permissionId: string
|
|
46
|
+
export declare const addPermission: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, permissionId: string) => Promise<IPermission>;
|
|
46
47
|
export declare const deletePermission: (endpoint: VerdocsEndpoint, organizationId: string, groupId: string, permissionId: string) => Promise<any>;
|
package/Organizations/Groups.js
CHANGED
|
@@ -64,9 +64,9 @@ export var deleteMembers = function (endpoint, organizationId, groupId, params)
|
|
|
64
64
|
.put("/organizations/".concat(organizationId, "/groups/").concat(groupId, "/delete_members"), params)
|
|
65
65
|
.then(function (r) { return r.data; });
|
|
66
66
|
};
|
|
67
|
-
export var addPermission = function (endpoint, organizationId, groupId, permissionId
|
|
67
|
+
export var addPermission = function (endpoint, organizationId, groupId, permissionId) {
|
|
68
68
|
return endpoint.api //
|
|
69
|
-
.post("/organizations/".concat(organizationId, "/groups/").concat(groupId, "/permissions/").concat(permissionId),
|
|
69
|
+
.post("/organizations/".concat(organizationId, "/groups/").concat(groupId, "/permissions/").concat(permissionId), {})
|
|
70
70
|
.then(function (r) { return r.data; });
|
|
71
71
|
};
|
|
72
72
|
export var deletePermission = function (endpoint, organizationId, groupId, permissionId) {
|
|
@@ -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>;
|
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
|
+
}
|