@verdocs/js-sdk 1.0.1 → 1.0.5
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/README.md +29 -9
- package/dist/Documents/Documents.d.ts +1 -0
- package/dist/Organizations/ApiKeys.d.ts +12 -0
- package/dist/Organizations/ApiKeys.js +12 -0
- package/dist/Organizations/Groups.d.ts +35 -7
- package/dist/Organizations/Groups.js +32 -5
- package/dist/Organizations/Types.d.ts +19 -0
- package/dist/Organizations/index.d.ts +8 -0
- package/dist/Organizations/index.js +8 -0
- package/dist/Search/Content.d.ts +4 -0
- package/dist/Search/Content.js +57 -0
- package/dist/Search/Types.d.ts +68 -0
- package/dist/Search/Types.js +1 -0
- package/dist/Search/index.d.ts +2 -0
- package/dist/Search/index.js +2 -0
- package/dist/Signatures.d.ts +11 -0
- package/dist/Signatures.js +7 -0
- package/dist/Tags.d.ts +8 -0
- package/dist/Tags.js +4 -0
- package/dist/Templates/Documents.d.ts +4 -0
- package/dist/Templates/Documents.js +13 -0
- package/dist/Templates/Fields.d.ts +3 -0
- package/dist/Templates/Fields.js +10 -0
- package/dist/Templates/Pages.d.ts +4 -0
- package/dist/Templates/Pages.js +13 -0
- package/dist/Templates/Reminders.d.ts +4 -0
- package/dist/Templates/Reminders.js +13 -0
- package/dist/Templates/Roles.d.ts +6 -0
- package/dist/Templates/Roles.js +19 -0
- package/dist/Templates/Stars.d.ts +2 -0
- package/dist/Templates/Stars.js +7 -0
- package/dist/Templates/Tags.d.ts +3 -0
- package/dist/Templates/Tags.js +10 -0
- package/dist/Templates/Templates.d.ts +7 -0
- package/dist/Templates/Templates.js +45 -0
- package/dist/Templates/Types.d.ts +23 -0
- package/dist/Templates/Types.js +1 -0
- package/dist/Templates/index.d.ts +9 -0
- package/dist/Templates/index.js +9 -0
- package/dist/Users/Profiles.d.ts +2 -1
- package/dist/Users/Types.d.ts +1 -7
- package/dist/Validators.d.ts +6 -0
- package/dist/Validators.js +5 -0
- package/dist/Whitelabel.d.ts +2 -0
- package/dist/Whitelabel.js +3 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +17 -0
- package/package.json +18 -7
package/README.md
CHANGED
|
@@ -2,15 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
> Verdocs SDK for Javascript / Typescript
|
|
4
4
|
|
|
5
|
-
This SDK provides convenience wrappers for both Browser-based and NodeJS applications with strong typing and
|
|
6
|
-
you get started quickly developing for the Verdocs platform.
|
|
5
|
+
This SDK provides convenience wrappers for both Browser-based and NodeJS applications to call the Verdocs API, with strong typing and
|
|
6
|
+
documentation to help you get started quickly developing for the Verdocs platform.
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Getting Started
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
First add this module to your project:
|
|
11
|
+
|
|
12
|
+
npm install --save @verdocs/js-sdk
|
|
13
|
+
|
|
14
|
+
or:
|
|
15
|
+
|
|
16
|
+
yarn add @verdocs/js-sdk
|
|
17
|
+
|
|
18
|
+
This package is namespaced into packages that organize API calls into functional groups. A top-level `export *` is provided for simplicity,
|
|
19
|
+
but to enable Tree Shaking to do its job, it is recommended that you only import the package required for a given task. For example, to
|
|
20
|
+
perform a simple authentication request:
|
|
14
21
|
|
|
15
22
|
```typescript
|
|
16
23
|
import {Auth} from '@verdocs/js-sdk/Auth';
|
|
@@ -20,6 +27,19 @@ const {accessToken} = await Auth.authenticateUser({username: 'MY_USERNAME', pass
|
|
|
20
27
|
Endpoint.setAuthToken(accessToken);
|
|
21
28
|
```
|
|
22
29
|
|
|
30
|
+
## Documentation
|
|
31
|
+
|
|
32
|
+
Verdocs functions are organized into high-level modules that represent the main objects within the platform:
|
|
33
|
+
|
|
34
|
+
- Documents - An individual document to be signed. Documents are created from templates.
|
|
35
|
+
- HTTP - General support functionality for Verdocs' REST endpoints. Typically not used directly.
|
|
36
|
+
- Organizations - An Organization is a container for user profiles, templates, documents, billing, and other related objects.
|
|
37
|
+
- Templates - A template for a document containing a PDF file, metadata for signature fields, and other information.
|
|
38
|
+
- Users - All operations related to authentication and user-related operations.
|
|
39
|
+
- Utils - General support functions used by the other modules and exported for convenience.
|
|
40
|
+
|
|
41
|
+
Please see the [API Docs](https://github.com/Verdocs/js-sdk/tree/main/docs) for details on the functions provided by each module.
|
|
42
|
+
|
|
23
43
|
## HTTP Transport
|
|
24
44
|
|
|
25
45
|
The underlying transport uses `axios`, a cross-environment (NodeJS vs. Browser) HTTP transport layer. When this SDK is included in a
|
|
@@ -35,5 +55,5 @@ Endpoint.defaults.timeout = 5000;
|
|
|
35
55
|
|
|
36
56
|
## Contributing
|
|
37
57
|
|
|
38
|
-
|
|
39
|
-
with any change requests and we will review them as soon as possible.
|
|
58
|
+
This repository is actively maintained and supported by [Verdocs](https://verdocs.com/). We welcome community contributions and
|
|
59
|
+
suggestions! Please file a pull request with any change requests and we will review them as soon as possible.
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API keys are used to authenticate server-to-server calls. (API keys should **never** be used for client-to-server operations!)
|
|
3
|
+
* To generate a key, either use the Verdocs admin interface and make note of the client_id and client_secret generated, or call
|
|
4
|
+
* createKey as shown below. Then call {@link Users.Auth.authenticateApp} to obtain an access token using the provided ID and
|
|
5
|
+
* secret. Note that server-to-server authentication requests return shorter-lived tokens, so it is important to check the `exp`
|
|
6
|
+
* field and re-authenticate as needed for subsequent calls.
|
|
7
|
+
*
|
|
8
|
+
* API keys may be updated or rotated at any time. Regular rotation is recommended. Rotation will not expire or invalidate
|
|
9
|
+
* existing server-to-server sessions, so it may be done at any time without disrupting your application.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
1
13
|
import { IApiKey, IApiKeyWithSecret, ICreateApiKeyRequest, IUpdateApiKeyRequest } from './Types';
|
|
2
14
|
/**
|
|
3
15
|
* Get a list of keys for a given organization. The caller must have admin access to the organization.
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API keys are used to authenticate server-to-server calls. (API keys should **never** be used for client-to-server operations!)
|
|
3
|
+
* To generate a key, either use the Verdocs admin interface and make note of the client_id and client_secret generated, or call
|
|
4
|
+
* createKey as shown below. Then call {@link Users.Auth.authenticateApp} to obtain an access token using the provided ID and
|
|
5
|
+
* secret. Note that server-to-server authentication requests return shorter-lived tokens, so it is important to check the `exp`
|
|
6
|
+
* field and re-authenticate as needed for subsequent calls.
|
|
7
|
+
*
|
|
8
|
+
* API keys may be updated or rotated at any time. Regular rotation is recommended. Rotation will not expire or invalidate
|
|
9
|
+
* existing server-to-server sessions, so it may be done at any time without disrupting your application.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
1
13
|
import { Endpoint } from '../HTTP/Transport';
|
|
2
14
|
/**
|
|
3
15
|
* Get a list of keys for a given organization. The caller must have admin access to the organization.
|
|
@@ -1,7 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Organizations may contain "Groups" of user profiles, called Members. Groups may have permissions assigned that
|
|
3
|
+
* apply to all Members, making it easy to configure role-based access control (RBAC) within an Organization. Note
|
|
4
|
+
* that permissions are **additive**. A user may be a member of more than one group, and may also have permissions
|
|
5
|
+
* assigned directly. In that case, the user will have the combined set of all permissions inherited from all
|
|
6
|
+
* sources.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
import { IGroup, IGroupDetail } from './Types';
|
|
11
|
+
/**
|
|
12
|
+
* Get a list of groups for a given organization. The caller must have admin access to the organization.
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import {Groups} from '@verdocs/js-sdk/Organizations';
|
|
16
|
+
*
|
|
17
|
+
* const groups = await Groups.getGroups(ORGID);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare const getGroups: (organizationId: string) => Promise<IGroup[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Get the details for a group.
|
|
23
|
+
*
|
|
24
|
+
* ```typescript
|
|
25
|
+
* import {Groups} from '@verdocs/js-sdk/Organizations';
|
|
26
|
+
*
|
|
27
|
+
* const groups = await Groups.getGroups(ORGID);
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare const getGroup: (organizationId: string, groupId: string) => Promise<IGroupDetail>;
|
|
31
|
+
export declare const getMembers: (organizationId: string, groupId: string) => Promise<any>;
|
|
32
|
+
export declare const addMembers: (organizationId: string, groupId: string, params: any) => Promise<any>;
|
|
33
|
+
export declare const deleteMembers: (organizationId: string, groupId: string, params: any) => Promise<any>;
|
|
34
|
+
export declare const addPermission: (organizationId: string, groupId: string, permissionId: string, params: any) => Promise<any>;
|
|
35
|
+
export declare const deletePermission: (organizationId: string, groupId: string, permissionId: string) => Promise<any>;
|
|
@@ -1,22 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Organizations may contain "Groups" of user profiles, called Members. Groups may have permissions assigned that
|
|
3
|
+
* apply to all Members, making it easy to configure role-based access control (RBAC) within an Organization. Note
|
|
4
|
+
* that permissions are **additive**. A user may be a member of more than one group, and may also have permissions
|
|
5
|
+
* assigned directly. In that case, the user will have the combined set of all permissions inherited from all
|
|
6
|
+
* sources.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
1
10
|
import { Endpoint } from '../HTTP/Transport';
|
|
11
|
+
/**
|
|
12
|
+
* Get a list of groups for a given organization. The caller must have admin access to the organization.
|
|
13
|
+
*
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import {Groups} from '@verdocs/js-sdk/Organizations';
|
|
16
|
+
*
|
|
17
|
+
* const groups = await Groups.getGroups(ORGID);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
2
20
|
export var getGroups = function (organizationId) {
|
|
3
21
|
return Endpoint.get("/organizations/" + organizationId + "/groups").then(function (r) { return r.data; });
|
|
4
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Get the details for a group.
|
|
25
|
+
*
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import {Groups} from '@verdocs/js-sdk/Organizations';
|
|
28
|
+
*
|
|
29
|
+
* const groups = await Groups.getGroups(ORGID);
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
5
32
|
export var getGroup = function (organizationId, groupId) {
|
|
6
33
|
return Endpoint.get("/organizations/" + organizationId + "/groups/" + groupId).then(function (r) { return r.data; });
|
|
7
34
|
};
|
|
8
|
-
export var
|
|
35
|
+
export var getMembers = function (organizationId, groupId) {
|
|
9
36
|
return Endpoint.get("/organizations/" + organizationId + "/groups/" + groupId + "/members").then(function (r) { return r.data; });
|
|
10
37
|
};
|
|
11
|
-
export var
|
|
38
|
+
export var addMembers = function (organizationId, groupId, params) {
|
|
12
39
|
return Endpoint.post("/organizations/" + organizationId + "/groups/" + groupId + "/members", params).then(function (r) { return r.data; });
|
|
13
40
|
};
|
|
14
|
-
export var
|
|
41
|
+
export var deleteMembers = function (organizationId, groupId, params) {
|
|
15
42
|
return Endpoint.put("/organizations/" + organizationId + "/groups/" + groupId + "/delete_members", params).then(function (r) { return r.data; });
|
|
16
43
|
};
|
|
17
|
-
export var
|
|
44
|
+
export var addPermission = function (organizationId, groupId, permissionId, params) {
|
|
18
45
|
return Endpoint.post("/organizations/" + organizationId + "/groups/" + groupId + "/permissions/" + permissionId, params).then(function (r) { return r.data; });
|
|
19
46
|
};
|
|
20
|
-
export var
|
|
47
|
+
export var deletePermission = function (organizationId, groupId, permissionId) {
|
|
21
48
|
return Endpoint.delete("/organizations/" + organizationId + "/groups/" + groupId + "/permissions/" + permissionId).then(function (r) { return r.data; });
|
|
22
49
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { IProfile, TPermission, TRole } from '../Users/Types';
|
|
1
2
|
export interface IOrganization {
|
|
2
3
|
/** The unique ID of the organization */
|
|
3
4
|
id: string;
|
|
@@ -35,3 +36,21 @@ export interface IApiKeyWithSecret extends IApiKey {
|
|
|
35
36
|
profile_id: string;
|
|
36
37
|
organization_id: string;
|
|
37
38
|
}
|
|
39
|
+
export interface IGroup {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
organization_id: string;
|
|
43
|
+
/** For future expansion. In the future, Verdocs may support group hierarchies. Until then this field is always null. */
|
|
44
|
+
parent_id: string | null;
|
|
45
|
+
/** Some operations will additionally return a list of permissions. */
|
|
46
|
+
permissions?: TPermission[];
|
|
47
|
+
/** Some operations will additionally return a list of roles. */
|
|
48
|
+
roles?: TRole[];
|
|
49
|
+
/** Some operations will additionally return a list of profiles. */
|
|
50
|
+
profiles?: IProfile[];
|
|
51
|
+
}
|
|
52
|
+
export interface IGroupDetail extends IGroup {
|
|
53
|
+
permissions: TPermission[];
|
|
54
|
+
roles: TRole[];
|
|
55
|
+
profiles: IProfile[];
|
|
56
|
+
}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An Organization is a high-level container within Verdocs that groups together Templates, Documents, Profiles, Billing, and
|
|
3
|
+
* other settings. A User may be a member of more than one Organization. Each membership is tracked by a Profile representing
|
|
4
|
+
* that user's settings within that organization. It is important to select the correct Profile before performing operations
|
|
5
|
+
* against the Verdocs API, as this also sets the Organization that will be operated on, and the user's permissions within it.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
1
9
|
export * as ApiKeys from './ApiKeys';
|
|
2
10
|
export * as Groups from './Groups';
|
|
3
11
|
export * as Invitations from './Invitations';
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An Organization is a high-level container within Verdocs that groups together Templates, Documents, Profiles, Billing, and
|
|
3
|
+
* other settings. A User may be a member of more than one Organization. Each membership is tracked by a Profile representing
|
|
4
|
+
* that user's settings within that organization. It is important to select the correct Profile before performing operations
|
|
5
|
+
* against the Verdocs API, as this also sets the Organization that will be operated on, and the user's permissions within it.
|
|
6
|
+
*
|
|
7
|
+
* @module
|
|
8
|
+
*/
|
|
1
9
|
export * as ApiKeys from './ApiKeys';
|
|
2
10
|
export * as Groups from './Groups';
|
|
3
11
|
export * as Invitations from './Invitations';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ISavedSearch, ISearchHistory, ISearchParams, ISearchResult } from './Types';
|
|
2
|
+
export declare const getSearchHistory: () => Promise<ISearchHistory>;
|
|
3
|
+
export declare const saveSearch: (name: string, params: ISearchParams) => Promise<ISavedSearch>;
|
|
4
|
+
export declare const searchContent: (params: ISearchParams) => Promise<ISearchResult>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
22
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
23
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
24
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
|
+
function step(op) {
|
|
26
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
+
while (_) try {
|
|
28
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
|
+
switch (op[0]) {
|
|
31
|
+
case 0: case 1: t = op; break;
|
|
32
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
33
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
34
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
35
|
+
default:
|
|
36
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
37
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
38
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
39
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
40
|
+
if (t[2]) _.ops.pop();
|
|
41
|
+
_.trys.pop(); continue;
|
|
42
|
+
}
|
|
43
|
+
op = body.call(thisArg, _);
|
|
44
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
45
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
import { Endpoint } from '../HTTP/Transport';
|
|
49
|
+
export var getSearchHistory = function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
50
|
+
return [2 /*return*/, Endpoint.get('/search/history').then(function (r) { return r.data; })];
|
|
51
|
+
}); }); };
|
|
52
|
+
export var saveSearch = function (name, params) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
53
|
+
return [2 /*return*/, Endpoint.post('/search/saved', __assign(__assign({}, params), { name: name })).then(function (r) { return r.data; })];
|
|
54
|
+
}); }); };
|
|
55
|
+
export var searchContent = function (params) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
56
|
+
return [2 /*return*/, Endpoint.post('/search/content').then(function (r) { return r.data; })];
|
|
57
|
+
}); }); };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { IDocumentStatus } from '../Documents/Documents';
|
|
2
|
+
export interface IDocumentFile {
|
|
3
|
+
id: string;
|
|
4
|
+
url: string;
|
|
5
|
+
name: string;
|
|
6
|
+
created_at: string;
|
|
7
|
+
updated_at: string;
|
|
8
|
+
page_numbers: number;
|
|
9
|
+
mime: string;
|
|
10
|
+
}
|
|
11
|
+
export interface IDocumentResult {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
status: IDocumentStatus;
|
|
15
|
+
profile_id: string;
|
|
16
|
+
template_id: string;
|
|
17
|
+
organization_id: string;
|
|
18
|
+
created_at: string;
|
|
19
|
+
updated_at: string;
|
|
20
|
+
canceled_at: string | null;
|
|
21
|
+
no_contact: boolean;
|
|
22
|
+
instrument: IDocumentFile;
|
|
23
|
+
certificate: IDocumentFile | null;
|
|
24
|
+
}
|
|
25
|
+
export interface ITemplateResult {
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
status: IDocumentStatus;
|
|
29
|
+
profile_id: string;
|
|
30
|
+
template_id: string;
|
|
31
|
+
organization_id: string;
|
|
32
|
+
created_at: string;
|
|
33
|
+
updated_at: string;
|
|
34
|
+
canceled_at: string | null;
|
|
35
|
+
no_contact: boolean;
|
|
36
|
+
instrument: IDocumentFile;
|
|
37
|
+
certificate: IDocumentFile | null;
|
|
38
|
+
}
|
|
39
|
+
export interface ISearchParams {
|
|
40
|
+
page?: number;
|
|
41
|
+
limit?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface IRecentSearch {
|
|
44
|
+
id: string;
|
|
45
|
+
created_at: string;
|
|
46
|
+
updated_at: string;
|
|
47
|
+
profile_id: string;
|
|
48
|
+
organization_id: string;
|
|
49
|
+
params: ISearchParams;
|
|
50
|
+
}
|
|
51
|
+
export interface ISavedSearch {
|
|
52
|
+
id: string;
|
|
53
|
+
created_at: string;
|
|
54
|
+
updated_at: string;
|
|
55
|
+
profile_id: string;
|
|
56
|
+
organization_id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
params: ISearchParams;
|
|
59
|
+
}
|
|
60
|
+
export interface ISearchHistory {
|
|
61
|
+
recent: IRecentSearch[];
|
|
62
|
+
saved: ISavedSearch[];
|
|
63
|
+
}
|
|
64
|
+
export interface ISearchResult {
|
|
65
|
+
matches: number;
|
|
66
|
+
templates: any[];
|
|
67
|
+
documents: IDocumentResult[];
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ISignature {
|
|
2
|
+
id?: string;
|
|
3
|
+
profile_id: string;
|
|
4
|
+
url: string;
|
|
5
|
+
created_at?: Date;
|
|
6
|
+
updated_at?: Date;
|
|
7
|
+
}
|
|
8
|
+
export declare const createSignature: () => Promise<ISignature>;
|
|
9
|
+
export declare const getSignatures: () => Promise<ISignature[]>;
|
|
10
|
+
export declare const getSignature: (signatureId: string) => Promise<any>;
|
|
11
|
+
export declare const deleteSignature: (signatureId: string) => Promise<any>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Endpoint } from './HTTP/Transport';
|
|
2
|
+
export var createSignature = function () { return Endpoint.post('/signatures').then(function (r) { return r.data; }); };
|
|
3
|
+
export var getSignatures = function () { return Endpoint.get('/signatures').then(function (r) { return r.data; }); };
|
|
4
|
+
export var getSignature = function (signatureId) { return Endpoint.get("/signatures/" + signatureId).then(function (r) { return r.data; }); };
|
|
5
|
+
export var deleteSignature = function (signatureId) {
|
|
6
|
+
return Endpoint.delete("/signatures/" + signatureId).then(function (r) { return r.data; });
|
|
7
|
+
};
|
package/dist/Tags.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ITags {
|
|
2
|
+
name: string;
|
|
3
|
+
featured?: boolean;
|
|
4
|
+
created_at?: Date;
|
|
5
|
+
}
|
|
6
|
+
export declare const createTag: () => Promise<ITags>;
|
|
7
|
+
export declare const getTag: (tagName: string) => Promise<ITags>;
|
|
8
|
+
export declare const searchTag: () => Promise<ITags[]>;
|
package/dist/Tags.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Endpoint } from './HTTP/Transport';
|
|
2
|
+
export var createTag = function () { return Endpoint.post('/tags').then(function (r) { return r.data; }); };
|
|
3
|
+
export var getTag = function (tagName) { return Endpoint.get("/tags/" + tagName).then(function (r) { return r.data; }); };
|
|
4
|
+
export var searchTag = function () { return Endpoint.get('/tags').then(function (r) { return r.data; }); };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const getTemplateDocuments: (templateId: string) => Promise<any>;
|
|
2
|
+
export declare const createTemplateDocument: (templateId: string) => Promise<any>;
|
|
3
|
+
export declare const getTemplateDocument: (templateId: string, documentId: string) => Promise<any>;
|
|
4
|
+
export declare const deleteTemplateDocument: (templateId: string, documentId: string) => Promise<any>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Endpoint } from '../HTTP/Transport';
|
|
2
|
+
export var getTemplateDocuments = function (templateId) {
|
|
3
|
+
return Endpoint.get("/templates/" + templateId + "/documents/").then(function (r) { return r.data; });
|
|
4
|
+
};
|
|
5
|
+
export var createTemplateDocument = function (templateId) {
|
|
6
|
+
return Endpoint.post("/templates/" + templateId + "/documents/").then(function (r) { return r.data; });
|
|
7
|
+
};
|
|
8
|
+
export var getTemplateDocument = function (templateId, documentId) {
|
|
9
|
+
return Endpoint.get("/templates/" + templateId + "/documents/" + documentId).then(function (r) { return r.data; });
|
|
10
|
+
};
|
|
11
|
+
export var deleteTemplateDocument = function (templateId, documentId) {
|
|
12
|
+
return Endpoint.delete("/templates/" + templateId + "/documents/" + documentId).then(function (r) { return r.data; });
|
|
13
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const createTemplateField: (templateId: string) => Promise<any>;
|
|
2
|
+
export declare const editTemplateField: (templateId: string, fieldName: string) => Promise<any>;
|
|
3
|
+
export declare const deleteTemplateField: (templateId: string, fieldName: string) => Promise<any>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Endpoint } from '../HTTP/Transport';
|
|
2
|
+
export var createTemplateField = function (templateId) {
|
|
3
|
+
return Endpoint.post("/templates/" + templateId + "/pages/").then(function (r) { return r.data; });
|
|
4
|
+
};
|
|
5
|
+
export var editTemplateField = function (templateId, fieldName) {
|
|
6
|
+
return Endpoint.put("/templates/" + templateId + "/pages/" + fieldName).then(function (r) { return r.data; });
|
|
7
|
+
};
|
|
8
|
+
export var deleteTemplateField = function (templateId, fieldName) {
|
|
9
|
+
return Endpoint.delete("/templates/" + templateId + "/pages/" + fieldName).then(function (r) { return r.data; });
|
|
10
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const createTemplatePage: (templateId: string) => Promise<any>;
|
|
2
|
+
export declare const editTemplatePage: (templateId: string, sequence: string) => Promise<any>;
|
|
3
|
+
export declare const getTemplatePage: (templateId: string, sequence: string) => Promise<any>;
|
|
4
|
+
export declare const deleteTemplatePage: (templateId: string, sequence: string) => Promise<any>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Endpoint } from '../HTTP/Transport';
|
|
2
|
+
export var createTemplatePage = function (templateId) {
|
|
3
|
+
return Endpoint.post("/templates/" + templateId + "/pages/").then(function (r) { return r.data; });
|
|
4
|
+
};
|
|
5
|
+
export var editTemplatePage = function (templateId, sequence) {
|
|
6
|
+
return Endpoint.put("/templates/" + templateId + "/pages/" + sequence).then(function (r) { return r.data; });
|
|
7
|
+
};
|
|
8
|
+
export var getTemplatePage = function (templateId, sequence) {
|
|
9
|
+
return Endpoint.get("/templates/" + templateId + "/pages/" + sequence).then(function (r) { return r.data; });
|
|
10
|
+
};
|
|
11
|
+
export var deleteTemplatePage = function (templateId, sequence) {
|
|
12
|
+
return Endpoint.delete("/templates/" + templateId + "/pages/" + sequence).then(function (r) { return r.data; });
|
|
13
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const createTemplateReminder: (templateId: string) => Promise<any>;
|
|
2
|
+
export declare const getTemplateReminder: (templateId: string, reminderId: string) => Promise<any>;
|
|
3
|
+
export declare const editTemplateReminder: (templateId: string, reminderId: string) => Promise<any>;
|
|
4
|
+
export declare const deleteTemplateReminder: (templateId: string, reminderId: string) => Promise<any>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Endpoint } from '../HTTP/Transport';
|
|
2
|
+
export var createTemplateReminder = function (templateId) {
|
|
3
|
+
return Endpoint.post("/templates/" + templateId + "/reminder/").then(function (r) { return r.data; });
|
|
4
|
+
};
|
|
5
|
+
export var getTemplateReminder = function (templateId, reminderId) {
|
|
6
|
+
return Endpoint.get("/templates/" + templateId + "/reminder/" + reminderId).then(function (r) { return r.data; });
|
|
7
|
+
};
|
|
8
|
+
export var editTemplateReminder = function (templateId, reminderId) {
|
|
9
|
+
return Endpoint.put("/templates/" + templateId + "/reminder/" + reminderId).then(function (r) { return r.data; });
|
|
10
|
+
};
|
|
11
|
+
export var deleteTemplateReminder = function (templateId, reminderId) {
|
|
12
|
+
return Endpoint.delete("/templates/" + templateId + "/reminder/" + reminderId).then(function (r) { return r.data; });
|
|
13
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const createTemplateRole: (templateId: string) => Promise<any>;
|
|
2
|
+
export declare const getTemplateRoles: (templateId: string) => Promise<any>;
|
|
3
|
+
export declare const getTemplateRole: (templateId: string, roleName: string) => Promise<any>;
|
|
4
|
+
export declare const editTemplateRole: (templateId: string, roleName: string) => Promise<any>;
|
|
5
|
+
export declare const deleteTemplateRole: (templateId: string, roleName: string) => Promise<any>;
|
|
6
|
+
export declare const deleteTemplateSequence: (templateId: string) => Promise<any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Endpoint } from '../HTTP/Transport';
|
|
2
|
+
export var createTemplateRole = function (templateId) {
|
|
3
|
+
return Endpoint.post("/templates/" + templateId + "/roles/").then(function (r) { return r.data; });
|
|
4
|
+
};
|
|
5
|
+
export var getTemplateRoles = function (templateId) {
|
|
6
|
+
return Endpoint.get("/templates/" + templateId + "/roles/").then(function (r) { return r.data; });
|
|
7
|
+
};
|
|
8
|
+
export var getTemplateRole = function (templateId, roleName) {
|
|
9
|
+
return Endpoint.get("/templates/" + templateId + "/roles/" + roleName).then(function (r) { return r.data; });
|
|
10
|
+
};
|
|
11
|
+
export var editTemplateRole = function (templateId, roleName) {
|
|
12
|
+
return Endpoint.put("/templates/" + templateId + "/roles/" + roleName).then(function (r) { return r.data; });
|
|
13
|
+
};
|
|
14
|
+
export var deleteTemplateRole = function (templateId, roleName) {
|
|
15
|
+
return Endpoint.delete("/templates/" + templateId + "/roles/" + roleName).then(function (r) { return r.data; });
|
|
16
|
+
};
|
|
17
|
+
export var deleteTemplateSequence = function (templateId) {
|
|
18
|
+
return Endpoint.post("/templates/" + templateId + "/roles/").then(function (r) { return r.data; });
|
|
19
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Endpoint } from '../HTTP/Transport';
|
|
2
|
+
export var getTemplateStars = function (templateId) {
|
|
3
|
+
return Endpoint.get("/templates/" + templateId + "/stars/").then(function (r) { return r.data; });
|
|
4
|
+
};
|
|
5
|
+
export var toggleTemplateStar = function (templateId) {
|
|
6
|
+
return Endpoint.get("/templates/" + templateId + "/stars/toggle").then(function (r) { return r.data; });
|
|
7
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Endpoint } from '../HTTP/Transport';
|
|
2
|
+
export var createTemplateTag = function (templateId) {
|
|
3
|
+
return Endpoint.post("/templates/" + templateId + "/tags/").then(function (r) { return r.data; });
|
|
4
|
+
};
|
|
5
|
+
export var getTemplateTags = function (templateId) {
|
|
6
|
+
return Endpoint.get("/templates/" + templateId + "/tags/").then(function (r) { return r.data; });
|
|
7
|
+
};
|
|
8
|
+
export var deleteTemplateTag = function (templateId, tagName) {
|
|
9
|
+
return Endpoint.post("/templates/" + templateId + "/tags/" + tagName).then(function (r) { return r.data; });
|
|
10
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ITemplatesSummary } from './Types';
|
|
2
|
+
export declare const getTemplates: () => Promise<any>;
|
|
3
|
+
export declare const getTemplate: (templateId: string) => Promise<any>;
|
|
4
|
+
export declare const createTemplate: () => Promise<any>;
|
|
5
|
+
export declare const editTemplate: (templateId: string) => Promise<any>;
|
|
6
|
+
export declare const searchTemplate: () => Promise<any>;
|
|
7
|
+
export declare const getSummary: (page: number) => Promise<ITemplatesSummary>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
12
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
+
function step(op) {
|
|
15
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
+
while (_) try {
|
|
17
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
+
switch (op[0]) {
|
|
20
|
+
case 0: case 1: t = op; break;
|
|
21
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
+
default:
|
|
25
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
+
if (t[2]) _.ops.pop();
|
|
30
|
+
_.trys.pop(); continue;
|
|
31
|
+
}
|
|
32
|
+
op = body.call(thisArg, _);
|
|
33
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
import { Endpoint } from '../HTTP/Transport';
|
|
38
|
+
export var getTemplates = function () { return Endpoint.get('/templates/').then(function (r) { return r.data; }); };
|
|
39
|
+
export var getTemplate = function (templateId) { return Endpoint.get("/templates/" + templateId).then(function (r) { return r.data; }); };
|
|
40
|
+
export var createTemplate = function () { return Endpoint.post('/templates/').then(function (r) { return r.data; }); };
|
|
41
|
+
export var editTemplate = function (templateId) { return Endpoint.put("/templates/" + templateId).then(function (r) { return r.data; }); };
|
|
42
|
+
export var searchTemplate = function () { return Endpoint.post('/templates/search').then(function (r) { return r.data; }); };
|
|
43
|
+
export var getSummary = function (page) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
|
|
44
|
+
return [2 /*return*/, Endpoint.post('/templates/summary', { page: page }).then(function (r) { return r.data; })];
|
|
45
|
+
}); }); };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ITemplateSummaryEntry {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
sender: string;
|
|
5
|
+
counter: number;
|
|
6
|
+
description: string | null;
|
|
7
|
+
created_at: string;
|
|
8
|
+
updated_at: string;
|
|
9
|
+
is_personal: boolean;
|
|
10
|
+
is_public: boolean;
|
|
11
|
+
profile_id: string;
|
|
12
|
+
organization_id: string;
|
|
13
|
+
last_used_at: string | null;
|
|
14
|
+
document_name: string | null;
|
|
15
|
+
star_counter: number;
|
|
16
|
+
tag_name: string | null;
|
|
17
|
+
is_starred: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ITemplatesSummary {
|
|
20
|
+
page: number;
|
|
21
|
+
total: number;
|
|
22
|
+
result: ITemplateSummaryEntry[];
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * as Documents from './Documents';
|
|
2
|
+
export * as Fields from './Fields';
|
|
3
|
+
export * as Pages from './Pages';
|
|
4
|
+
export * as Reminders from './Reminders';
|
|
5
|
+
export * as Roles from './Roles';
|
|
6
|
+
export * as Stars from './Stars';
|
|
7
|
+
export * as Tags from './Tags';
|
|
8
|
+
export * as Templates from './Templates';
|
|
9
|
+
export * as Types from './Types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * as Documents from './Documents';
|
|
2
|
+
export * as Fields from './Fields';
|
|
3
|
+
export * as Pages from './Pages';
|
|
4
|
+
export * as Reminders from './Reminders';
|
|
5
|
+
export * as Roles from './Roles';
|
|
6
|
+
export * as Stars from './Stars';
|
|
7
|
+
export * as Tags from './Tags';
|
|
8
|
+
export * as Templates from './Templates';
|
|
9
|
+
export * as Types from './Types';
|
package/dist/Users/Profiles.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { ICreateProfileRequest,
|
|
1
|
+
import { ICreateProfileRequest, IPermission, IProfile, IRole, ISwitchProfileResponse, IUpdateProfileRequest } from './Types';
|
|
2
|
+
import { IGroup } from '../Organizations/Types';
|
|
2
3
|
/**
|
|
3
4
|
* Get the user's available profiles. The current profile will be marked with `current: true`.
|
|
4
5
|
*
|
package/dist/Users/Types.d.ts
CHANGED
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
import { IOrganization } from '../Organizations/Types';
|
|
1
|
+
import { IGroup, IOrganization } from '../Organizations/Types';
|
|
2
2
|
import { TRequestStatus } from '../HTTP/Types';
|
|
3
3
|
export declare type TPermission = 'org:view' | 'member:view' | 'org:update' | 'member:add' | 'member:remove' | 'admin:add' | 'admin:remove' | 'org:delete' | 'org:transfer' | 'owner:add' | 'owner:remove' | 'template:creator:create:personal' | 'template:creator:visibility' | 'template:creator:create:org' | 'template:member:read' | 'template:member:write' | 'template:member:visibility' | 'template:creator:delete' | 'template:member:delete' | 'template:creator:create:public' | 'rform:access' | 'rcommon:access' | 'org:list' | 'org:create';
|
|
4
4
|
export declare type TPlan = 'env:essential' | 'org:standard';
|
|
5
5
|
export declare type TRole = 'owner' | 'basic_user' | 'member';
|
|
6
|
-
export interface IGroup {
|
|
7
|
-
id: string;
|
|
8
|
-
name: string;
|
|
9
|
-
organization_id: string;
|
|
10
|
-
parent_id: string | null;
|
|
11
|
-
}
|
|
12
6
|
export interface IProfile {
|
|
13
7
|
/** The unique ID of the profile */
|
|
14
8
|
id: string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Endpoint } from './HTTP/Transport';
|
|
2
|
+
export var getValidators = function () { return Endpoint.get('/validators').then(function (r) { return r.data; }); };
|
|
3
|
+
export var getValidator = function (validatorName) {
|
|
4
|
+
return Endpoint.get("/validators/" + validatorName).then(function (r) { return r.data; });
|
|
5
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Endpoint } from './HTTP/Transport';
|
|
2
|
+
export var createWhitelabel = function () { return Endpoint.post('/whitelabel').then(function (r) { return r.data; }); };
|
|
3
|
+
export var getWhitelabel = function () { return Endpoint.get('/whitelabel').then(function (r) { return r.data; }); };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verdocs functions are organized into high-level modules that represent the main objects within Verdocs:
|
|
3
|
+
*
|
|
4
|
+
* - Documents - An individual document to be signed. Documents are created from templates.
|
|
5
|
+
* - HTTP - General support functionality for Verdocs' REST endpoints. Typically not used directly.
|
|
6
|
+
* - Organizations - An Organization is a container for user profiles, templates, documents, billing, and other related objects.
|
|
7
|
+
* - Templates - A template for a document containing a PDF file, metadata for signature fields, and other information.
|
|
8
|
+
* - Users - All operations related to authentication and user-related operations.
|
|
9
|
+
* - Utils - General support functions used by the other modules and exported for convenience.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
1
13
|
export * as Documents from './Documents';
|
|
14
|
+
export * as Templates from './Templates';
|
|
2
15
|
export * as HTTP from './HTTP';
|
|
3
16
|
export * as Organizations from './Organizations';
|
|
17
|
+
export * as Signatures from './Signatures';
|
|
18
|
+
export * as Tags from './Tags';
|
|
4
19
|
export * as Users from './Users';
|
|
5
20
|
export * as Utils from './Utils';
|
|
21
|
+
export * as Validators from './Validators';
|
|
22
|
+
export * as Whitelabel from './Whitelabel';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verdocs functions are organized into high-level modules that represent the main objects within Verdocs:
|
|
3
|
+
*
|
|
4
|
+
* - Documents - An individual document to be signed. Documents are created from templates.
|
|
5
|
+
* - HTTP - General support functionality for Verdocs' REST endpoints. Typically not used directly.
|
|
6
|
+
* - Organizations - An Organization is a container for user profiles, templates, documents, billing, and other related objects.
|
|
7
|
+
* - Templates - A template for a document containing a PDF file, metadata for signature fields, and other information.
|
|
8
|
+
* - Users - All operations related to authentication and user-related operations.
|
|
9
|
+
* - Utils - General support functions used by the other modules and exported for convenience.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
1
13
|
export * as Documents from './Documents';
|
|
14
|
+
export * as Templates from './Templates';
|
|
2
15
|
export * as HTTP from './HTTP';
|
|
3
16
|
export * as Organizations from './Organizations';
|
|
17
|
+
export * as Signatures from './Signatures';
|
|
18
|
+
export * as Tags from './Tags';
|
|
4
19
|
export * as Users from './Users';
|
|
5
20
|
export * as Utils from './Utils';
|
|
21
|
+
export * as Validators from './Validators';
|
|
22
|
+
export * as Whitelabel from './Whitelabel';
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdocs/js-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"private": false,
|
|
5
|
+
"homepage": "https://github.com/Verdocs/js-sdk",
|
|
5
6
|
"description": "Verdocs JS SDK",
|
|
6
7
|
"keywords": [
|
|
7
|
-
"
|
|
8
|
+
"pdf",
|
|
8
9
|
"document",
|
|
9
10
|
"signing",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
11
|
+
"Verdocs",
|
|
12
|
+
"embed"
|
|
12
13
|
],
|
|
13
14
|
"author": "Verdocs, LLC",
|
|
14
15
|
"license": "MIT",
|
|
@@ -17,6 +18,13 @@
|
|
|
17
18
|
"files": [
|
|
18
19
|
"dist/**/*"
|
|
19
20
|
],
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git://github.com/Verdocs/js-sdk.git"
|
|
24
|
+
},
|
|
25
|
+
"bugs": {
|
|
26
|
+
"url": "https://github.com/Verdocs/js-sdk/issues"
|
|
27
|
+
},
|
|
20
28
|
"scripts": {
|
|
21
29
|
"build": "tsc",
|
|
22
30
|
"prepare": "npm run build",
|
|
@@ -29,7 +37,7 @@
|
|
|
29
37
|
"lint": "tslint -p tsconfig.json",
|
|
30
38
|
"docs-md": "typedoc && git add --all docs",
|
|
31
39
|
"docs-html": "typedoc --plugin none --out docs-html",
|
|
32
|
-
"docs": "npm run docs-md && npm run docs-html"
|
|
40
|
+
"docs": "npm run docs-md && npm run docs-html && cp -aR docs-html/* ../partner-portal/site/static/js-sdk/"
|
|
33
41
|
},
|
|
34
42
|
"publishConfig": {
|
|
35
43
|
"access": "public"
|
|
@@ -37,15 +45,18 @@
|
|
|
37
45
|
"dependencies": {
|
|
38
46
|
"axios": "^0.21.1"
|
|
39
47
|
},
|
|
48
|
+
"peerDependencies": {
|
|
49
|
+
"typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x"
|
|
50
|
+
},
|
|
40
51
|
"devDependencies": {
|
|
41
52
|
"@types/jest": "^27.0.1",
|
|
42
|
-
"jest": "^27.
|
|
53
|
+
"jest": "^27.2.1",
|
|
43
54
|
"jest-mock-axios": "^4.4.0",
|
|
44
55
|
"prettier": "^2.4.1",
|
|
45
56
|
"ts-jest": "^27.0.3",
|
|
46
57
|
"tslint": "^6.1.3",
|
|
47
58
|
"tslint-config-prettier": "^1.18.0",
|
|
48
|
-
"typedoc": "^0.22.
|
|
59
|
+
"typedoc": "^0.22.4",
|
|
49
60
|
"typedoc-plugin-markdown": "^3.11.0",
|
|
50
61
|
"typescript": "^4.3.5"
|
|
51
62
|
}
|