@verdocs/js-sdk 3.10.10 → 3.10.12
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,5 +1,6 @@
|
|
|
1
1
|
import { VerdocsEndpoint } from '../VerdocsEndpoint';
|
|
2
2
|
import { IInvitation } from './Types';
|
|
3
|
+
import { IProfile } from '../Users/Types';
|
|
3
4
|
/**
|
|
4
5
|
* An invitation represents an opportunity for a Member to join an Organization.
|
|
5
6
|
*
|
|
@@ -15,5 +16,8 @@ export declare const createInvitation: (endpoint: VerdocsEndpoint, organizationI
|
|
|
15
16
|
export declare const deleteInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string) => Promise<any>;
|
|
16
17
|
export declare const updateInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, params: Partial<ICreateInvitationRequest>) => Promise<IInvitation>;
|
|
17
18
|
export declare const resendInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string) => Promise<any>;
|
|
18
|
-
export declare const
|
|
19
|
+
export declare const acceptInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<IProfile>;
|
|
20
|
+
export declare const declineInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<{
|
|
21
|
+
status: 'OK';
|
|
22
|
+
}>;
|
|
19
23
|
export declare const claimNewUser: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<any>;
|
|
@@ -23,9 +23,14 @@ export var resendInvitation = function (endpoint, organizationId, email) {
|
|
|
23
23
|
.post("/organizations/".concat(organizationId, "/invitation/").concat(email, "/resend"))
|
|
24
24
|
.then(function (r) { return r.data; });
|
|
25
25
|
};
|
|
26
|
-
export var
|
|
26
|
+
export var acceptInvitation = function (endpoint, organizationId, email, token) {
|
|
27
27
|
return endpoint.api //
|
|
28
|
-
.
|
|
28
|
+
.post("/organizations/".concat(organizationId, "/invitation/").concat(email, "/accept/").concat(token))
|
|
29
|
+
.then(function (r) { return r.data; });
|
|
30
|
+
};
|
|
31
|
+
export var declineInvitation = function (endpoint, organizationId, email, token) {
|
|
32
|
+
return endpoint.api //
|
|
33
|
+
.post("/organizations/".concat(organizationId, "/invitation/").concat(email, "/decline/").concat(token))
|
|
29
34
|
.then(function (r) { return r.data; });
|
|
30
35
|
};
|
|
31
36
|
export var claimNewUser = function (endpoint, organizationId, email, token) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VerdocsEndpoint } from '../VerdocsEndpoint';
|
|
2
|
-
interface ISetWebhookRequest {
|
|
2
|
+
export interface ISetWebhookRequest {
|
|
3
3
|
url: string;
|
|
4
4
|
active: boolean;
|
|
5
5
|
events: {
|
|
@@ -12,7 +12,7 @@ interface ISetWebhookRequest {
|
|
|
12
12
|
template_used: boolean;
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
interface IWebhook {
|
|
15
|
+
export interface IWebhook {
|
|
16
16
|
id: string;
|
|
17
17
|
organization_id: string;
|
|
18
18
|
url: string;
|
|
@@ -32,4 +32,3 @@ interface IWebhook {
|
|
|
32
32
|
}
|
|
33
33
|
export declare const getWebhooks: (endpoint: VerdocsEndpoint) => Promise<IWebhook>;
|
|
34
34
|
export declare const setWebhooks: (endpoint: VerdocsEndpoint, params: ISetWebhookRequest) => Promise<IWebhook>;
|
|
35
|
-
export {};
|