@verdocs/js-sdk 3.10.30 → 4.0.0
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/dist/README.md +75 -0
- package/dist/index.d.mts +41294 -0
- package/dist/index.d.ts +41294 -0
- package/dist/index.js +3045 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3036 -0
- package/dist/index.mjs.map +1 -0
- package/dist/package.json +85 -0
- package/dist/tsconfig.json +16 -0
- package/package.json +29 -12
- package/.github/workflows/generate-docs.yml +0 -41
- package/Envelopes/Envelopes.d.ts +0 -242
- package/Envelopes/Envelopes.js +0 -339
- package/Envelopes/Initials.d.ts +0 -15
- package/Envelopes/Initials.js +0 -13
- package/Envelopes/Permissions.d.ts +0 -52
- package/Envelopes/Permissions.js +0 -84
- package/Envelopes/Recipients.d.ts +0 -89
- package/Envelopes/Recipients.js +0 -112
- package/Envelopes/Reminders.d.ts +0 -23
- package/Envelopes/Reminders.js +0 -33
- package/Envelopes/Signatures.d.ts +0 -28
- package/Envelopes/Signatures.js +0 -37
- package/Envelopes/Types.d.ts +0 -390
- package/Envelopes/Types.js +0 -45
- package/Envelopes/index.d.ts +0 -7
- package/Envelopes/index.js +0 -7
- package/Organizations/ApiKeys.d.ts +0 -64
- package/Organizations/ApiKeys.js +0 -82
- package/Organizations/Groups.d.ts +0 -47
- package/Organizations/Groups.js +0 -76
- package/Organizations/Invitations.d.ts +0 -24
- package/Organizations/Invitations.js +0 -45
- package/Organizations/Members.d.ts +0 -12
- package/Organizations/Members.js +0 -30
- package/Organizations/Organizations.d.ts +0 -27
- package/Organizations/Organizations.js +0 -45
- package/Organizations/Types.d.ts +0 -104
- package/Organizations/Types.js +0 -1
- package/Organizations/Webhooks.d.ts +0 -34
- package/Organizations/Webhooks.js +0 -10
- package/Organizations/Whitelabel.d.ts +0 -31
- package/Organizations/Whitelabel.js +0 -38
- package/Organizations/index.d.ts +0 -16
- package/Organizations/index.js +0 -16
- package/Sessions/Types.d.ts +0 -54
- package/Sessions/Types.js +0 -1
- package/Sessions/index.d.ts +0 -6
- package/Sessions/index.js +0 -7
- package/Templates/Actions.d.ts +0 -26
- package/Templates/Actions.js +0 -104
- package/Templates/Fields.d.ts +0 -14
- package/Templates/Fields.js +0 -24
- package/Templates/Pages.d.ts +0 -30
- package/Templates/Pages.js +0 -41
- package/Templates/Permissions.d.ts +0 -73
- package/Templates/Permissions.js +0 -124
- package/Templates/Reminders.d.ts +0 -23
- package/Templates/Reminders.js +0 -33
- package/Templates/Roles.d.ts +0 -16
- package/Templates/Roles.js +0 -42
- package/Templates/Stars.d.ts +0 -10
- package/Templates/Stars.js +0 -16
- package/Templates/Tags.d.ts +0 -33
- package/Templates/Tags.js +0 -55
- package/Templates/TemplateDocuments.d.ts +0 -66
- package/Templates/TemplateDocuments.js +0 -139
- package/Templates/Templates.d.ts +0 -284
- package/Templates/Templates.js +0 -309
- package/Templates/Types.d.ts +0 -346
- package/Templates/Types.js +0 -29
- package/Templates/Validators.d.ts +0 -21
- package/Templates/Validators.js +0 -27
- package/Templates/index.d.ts +0 -11
- package/Templates/index.js +0 -11
- package/Users/Auth.d.ts +0 -123
- package/Users/Auth.js +0 -142
- package/Users/Billing.d.ts +0 -1
- package/Users/Billing.js +0 -2
- package/Users/Notifications.d.ts +0 -2
- package/Users/Notifications.js +0 -43
- package/Users/Profiles.d.ts +0 -151
- package/Users/Profiles.js +0 -179
- package/Users/Types.d.ts +0 -146
- package/Users/Types.js +0 -47
- package/Users/index.d.ts +0 -5
- package/Users/index.js +0 -5
- package/Utils/Colors.d.ts +0 -18
- package/Utils/Colors.js +0 -102
- package/Utils/DateTime.d.ts +0 -6
- package/Utils/DateTime.js +0 -79
- package/Utils/Fields.d.ts +0 -5
- package/Utils/Fields.js +0 -24
- package/Utils/Files.d.ts +0 -16
- package/Utils/Files.js +0 -42
- package/Utils/Locales.d.ts +0 -17
- package/Utils/Locales.js +0 -1358
- package/Utils/Primitives.d.ts +0 -18
- package/Utils/Primitives.js +0 -31
- package/Utils/Strings.d.ts +0 -9
- package/Utils/Strings.js +0 -28
- package/Utils/Token.d.ts +0 -19
- package/Utils/Token.js +0 -67
- package/Utils/globalThis.d.ts +0 -2
- package/Utils/globalThis.js +0 -52
- package/Utils/index.d.ts +0 -8
- package/Utils/index.js +0 -8
- package/VerdocsEndpoint.d.ts +0 -199
- package/VerdocsEndpoint.js +0 -319
- package/index.d.ts +0 -18
- package/index.js +0 -18
- package/tsconfig-typedoc.json +0 -26
package/dist/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Verdocs JS SDK
|
|
2
|
+
|
|
3
|
+
> Verdocs SDK for Javascript / Typescript
|
|
4
|
+
|
|
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
|
+
|
|
8
|
+
## Getting Started
|
|
9
|
+
|
|
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:
|
|
21
|
+
|
|
22
|
+
```typescript
|
|
23
|
+
import {Auth} from '@verdocs/js-sdk/Auth';
|
|
24
|
+
import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
25
|
+
|
|
26
|
+
const {accessToken} = await Auth.authenticateUser({username: 'MY_USERNAME', password: 'MY_PASSWORD'});
|
|
27
|
+
Transport.setAuthToken(accessToken);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Once you are authenticated, you can use the rest of the controls and embeds within an app. For instance, to provide a simple PDF
|
|
31
|
+
viewer for a document stored within Verdocs:
|
|
32
|
+
|
|
33
|
+
## Documentation
|
|
34
|
+
|
|
35
|
+
Verdocs functions are organized into high-level modules that represent the main objects within the platform:
|
|
36
|
+
|
|
37
|
+
- Documents - An individual document to be signed. Documents are created from templates.
|
|
38
|
+
- HTTP - General support functionality for Verdocs' REST endpoints. Typically not used directly.
|
|
39
|
+
- Organizations - An Organization is a container for user profiles, templates, documents, billing, and other related objects.
|
|
40
|
+
- Templates - A template for a document containing a PDF file, metadata for signature fields, and other information.
|
|
41
|
+
- Users - All operations related to authentication and user-related operations.
|
|
42
|
+
- Utils - General support functions used by the other modules and exported for convenience.
|
|
43
|
+
|
|
44
|
+
Please see the [API Docs](https://github.com/Verdocs/js-sdk/tree/main/docs) for details on the functions provided by each module.
|
|
45
|
+
|
|
46
|
+
## Contributing
|
|
47
|
+
|
|
48
|
+
To avoid the presence of the `dist/` distribution directory appearing in package imports, when this project is built, this `README.md`
|
|
49
|
+
and other support files are copied there. Be sure to run `npm version patch` from THIS directory, but the publish command from within
|
|
50
|
+
the `dist` folder.
|
|
51
|
+
|
|
52
|
+
## HTTP Transport
|
|
53
|
+
|
|
54
|
+
The underlying transport uses `axios`, a cross-environment (NodeJS vs. Browser) HTTP transport layer. When this SDK is included in a
|
|
55
|
+
project, a `Transport` singleton Axios Instance will be created to support the API calls to Verdocs servers. This endpoint's operation
|
|
56
|
+
may be configured by importing it. Please see the [Axios Documentation](https://github.com/axios/axios) for more information on the
|
|
57
|
+
options available. For example, to override the default API call timeout of 3s:
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import {Transport} from '@verdocs/js-sdk/Auth/HTTP';
|
|
61
|
+
|
|
62
|
+
Transport.setTimeout(5000);
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Contributing
|
|
66
|
+
|
|
67
|
+
This repository is actively maintained and supported by [Verdocs](https://verdocs.com/). We welcome community contributions and
|
|
68
|
+
suggestions! Please file a pull request with any change requests and we will review them as soon as possible.
|
|
69
|
+
|
|
70
|
+
## TODO
|
|
71
|
+
|
|
72
|
+
Currently, we have placeholder tests for a number of functions but had to disable the test suite. See
|
|
73
|
+
https://jestjs.io/docs/ecmascript-modules and https://github.com/facebook/jest/issues/10025 for more information. Since we manage our
|
|
74
|
+
own transport endpoint, we can probably do this mocking ourselves and eliminate the dependency in the first place.
|
|
75
|
+
|