@verdocs/js-sdk 2.0.7 → 2.0.10
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/Documents/Documents.d.ts +8 -0
- package/Organizations/Groups.d.ts +10 -0
- package/Organizations/Groups.js +14 -0
- package/Organizations/Types.d.ts +22 -3
- package/package.json +4 -4
package/Documents/Documents.d.ts
CHANGED
|
@@ -8,9 +8,17 @@ export declare type TRecipientType = 'signer' | 'cc' | 'approver';
|
|
|
8
8
|
export interface IDocumentsSearchResultEntry {
|
|
9
9
|
id: string;
|
|
10
10
|
canceled_at: string;
|
|
11
|
+
certificate_document_id: string;
|
|
11
12
|
created_at: string;
|
|
13
|
+
envelope_document_id: string;
|
|
14
|
+
histories: IHistory[];
|
|
15
|
+
indexed_at: string;
|
|
12
16
|
name: string;
|
|
17
|
+
no_contact: boolean;
|
|
18
|
+
organization_id: string;
|
|
13
19
|
profile_id: string;
|
|
20
|
+
recipients: string;
|
|
21
|
+
reminder_id: string | null;
|
|
14
22
|
status: TDocumentStatus;
|
|
15
23
|
next_recipient: {
|
|
16
24
|
claimed: boolean;
|
|
@@ -19,6 +19,16 @@ import { VerdocsEndpoint } from '../VerdocsEndpoint';
|
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
21
|
export declare const getGroups: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IGroup[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Get a single group by name. Returns a detail record.
|
|
24
|
+
*
|
|
25
|
+
* ```typescript
|
|
26
|
+
* import {Groups} from '@verdocs/js-sdk/Organizations';
|
|
27
|
+
*
|
|
28
|
+
* const groups = await Groups.getGroups(ORGID);
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const getGroupByName: (endpoint: VerdocsEndpoint, organizationId: string, name?: string) => Promise<IGroupDetail>;
|
|
22
32
|
/**
|
|
23
33
|
* Get the details for a group.
|
|
24
34
|
*
|
package/Organizations/Groups.js
CHANGED
|
@@ -21,6 +21,20 @@ export var getGroups = function (endpoint, organizationId) {
|
|
|
21
21
|
.get("/organizations/".concat(organizationId, "/groups"))
|
|
22
22
|
.then(function (r) { return r.data; });
|
|
23
23
|
};
|
|
24
|
+
/**
|
|
25
|
+
* Get a single group by name. Returns a detail record.
|
|
26
|
+
*
|
|
27
|
+
* ```typescript
|
|
28
|
+
* import {Groups} from '@verdocs/js-sdk/Organizations';
|
|
29
|
+
*
|
|
30
|
+
* const groups = await Groups.getGroups(ORGID);
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export var getGroupByName = function (endpoint, organizationId, name) {
|
|
34
|
+
return endpoint.api //
|
|
35
|
+
.get("/organizations/".concat(organizationId, "/groups"), { params: { name: name } })
|
|
36
|
+
.then(function (r) { return r.data; });
|
|
37
|
+
};
|
|
24
38
|
/**
|
|
25
39
|
* Get the details for a group.
|
|
26
40
|
*
|
package/Organizations/Types.d.ts
CHANGED
|
@@ -41,6 +41,8 @@ export interface IGroup {
|
|
|
41
41
|
name: string;
|
|
42
42
|
organization_id: string;
|
|
43
43
|
/** For future expansion. In the future, Verdocs may support group hierarchies. Until then this field is always null. */
|
|
44
|
+
parent: IGroup | null;
|
|
45
|
+
/** For future expansion. In the future, Verdocs may support group hierarchies. Until then this field is always null. */
|
|
44
46
|
parent_id: string | null;
|
|
45
47
|
/** Some operations will additionally return a list of permissions. */
|
|
46
48
|
permissions?: TPermission[];
|
|
@@ -49,8 +51,25 @@ export interface IGroup {
|
|
|
49
51
|
/** Some operations will additionally return a list of profiles. */
|
|
50
52
|
profiles?: IProfile[];
|
|
51
53
|
}
|
|
52
|
-
export interface
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
export interface IPermissionDetail {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
client_id: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IRoleDetail {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
client_id: string;
|
|
63
|
+
}
|
|
64
|
+
export interface IGroupDetail {
|
|
65
|
+
id: string;
|
|
66
|
+
name: string;
|
|
67
|
+
organization_id: string;
|
|
68
|
+
permissions: IPermissionDetail[];
|
|
69
|
+
roles: IRoleDetail[];
|
|
55
70
|
profiles: IProfile[];
|
|
71
|
+
/** For future expansion. In the future, Verdocs may support group hierarchies. Until then this field is always null. */
|
|
72
|
+
parent: IGroup | null;
|
|
73
|
+
/** For future expansion. In the future, Verdocs may support group hierarchies. Until then this field is always null. */
|
|
74
|
+
parent_id: string | null;
|
|
56
75
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdocs/js-sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
4
4
|
"private": false,
|
|
5
5
|
"homepage": "https://github.com/Verdocs/js-sdk",
|
|
6
6
|
"description": "Verdocs JS SDK",
|
|
@@ -53,13 +53,13 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@jest/globals": "^28.1.2",
|
|
55
55
|
"@types/jest": "^28.1.4",
|
|
56
|
-
"axios-mock-adapter": "^1.21.
|
|
56
|
+
"axios-mock-adapter": "^1.21.2",
|
|
57
57
|
"jest": "^28.1.2",
|
|
58
58
|
"prettier": "^2.7.1",
|
|
59
|
-
"ts-jest": "^28.0.
|
|
59
|
+
"ts-jest": "^28.0.8",
|
|
60
60
|
"tslint": "^6.1.3",
|
|
61
61
|
"tslint-config-prettier": "^1.18.0",
|
|
62
|
-
"typedoc": "^0.23.
|
|
62
|
+
"typedoc": "^0.23.11",
|
|
63
63
|
"typedoc-plugin-markdown": "^3.13.4",
|
|
64
64
|
"typescript": "^4.7.4"
|
|
65
65
|
}
|