@verdocs/js-sdk 1.0.8 → 1.0.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.
- package/.gitignore +4 -0
- package/.idea/.gitignore +8 -0
- package/.idea/inspectionProfiles/Project_Default.xml +12 -0
- package/.idea/js-sdk.iml +11 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.prettierrc.js +11 -0
- package/LICENSE +21 -0
- package/README.md +8 -5
- package/__mocks__/axios.ts +3 -0
- package/dist/.npmignore +5 -0
- package/{Documents → dist/Documents}/Documents.d.ts +9 -0
- package/{Documents → dist/Documents}/Documents.js +24 -7
- package/{Documents → dist/Documents}/Stars.d.ts +0 -0
- package/{Documents → dist/Documents}/Stars.js +2 -2
- package/{Documents → dist/Documents}/Templates.d.ts +0 -0
- package/{Documents → dist/Documents}/Templates.js +22 -10
- package/{Documents → dist/Documents}/Types.d.ts +0 -0
- package/{Api → dist/Documents}/Types.js +0 -0
- package/{Documents → dist/Documents}/index.d.ts +0 -0
- package/{Documents → dist/Documents}/index.js +0 -0
- package/dist/HTTP/Transport.d.ts +51 -0
- package/dist/HTTP/Transport.js +88 -0
- package/{HTTP → dist/HTTP}/Types.d.ts +0 -0
- package/{Documents → dist/HTTP}/Types.js +0 -0
- package/{HTTP → dist/HTTP}/index.d.ts +0 -0
- package/{HTTP → dist/HTTP}/index.js +0 -0
- package/{Organizations → dist/Organizations}/ApiKeys.d.ts +0 -0
- package/{Organizations → dist/Organizations}/ApiKeys.js +16 -6
- package/{Organizations → dist/Organizations}/Groups.d.ts +0 -0
- package/{Organizations → dist/Organizations}/Groups.js +22 -8
- package/{Organizations → dist/Organizations}/Invitations.d.ts +0 -0
- package/dist/Organizations/Invitations.js +36 -0
- package/{Organizations → dist/Organizations}/Members.d.ts +0 -0
- package/dist/Organizations/Members.js +26 -0
- package/{Organizations → dist/Organizations}/Organizations.d.ts +0 -0
- package/dist/Organizations/Organizations.js +31 -0
- package/{Organizations → dist/Organizations}/Types.d.ts +0 -0
- package/{HTTP → dist/Organizations}/Types.js +0 -0
- package/{Organizations → dist/Organizations}/Webhooks.d.ts +0 -0
- package/dist/Organizations/Webhooks.js +11 -0
- package/{Organizations → dist/Organizations}/index.d.ts +0 -0
- package/{Organizations → dist/Organizations}/index.js +0 -0
- package/dist/README.md +68 -0
- package/{Search → dist/Search}/Content.d.ts +0 -0
- package/{Search → dist/Search}/Content.js +22 -10
- package/{Search → dist/Search}/Types.d.ts +0 -0
- package/{Organizations → dist/Search}/Types.js +0 -0
- package/{Search → dist/Search}/index.d.ts +0 -0
- package/{Search → dist/Search}/index.js +0 -0
- package/{Signatures.d.ts → dist/Signatures.d.ts} +0 -0
- package/dist/Signatures.js +21 -0
- package/{Tags.d.ts → dist/Tags.d.ts} +0 -0
- package/dist/Tags.js +16 -0
- package/{Templates → dist/Templates}/Documents.d.ts +0 -0
- package/{Templates → dist/Templates}/Documents.js +13 -5
- package/{Templates → dist/Templates}/Fields.d.ts +0 -0
- package/dist/Templates/Fields.js +16 -0
- package/{Templates → dist/Templates}/Pages.d.ts +0 -0
- package/dist/Templates/Pages.js +21 -0
- package/{Templates → dist/Templates}/Reminders.d.ts +0 -0
- package/dist/Templates/Reminders.js +21 -0
- package/{Templates → dist/Templates}/Roles.d.ts +0 -0
- package/dist/Templates/Roles.js +36 -0
- package/{Templates → dist/Templates}/Stars.d.ts +0 -0
- package/dist/Templates/Stars.js +11 -0
- package/{Templates → dist/Templates}/Tags.d.ts +0 -0
- package/dist/Templates/Tags.js +16 -0
- package/{Templates → dist/Templates}/Templates.d.ts +0 -0
- package/{Templates → dist/Templates}/Templates.js +33 -11
- package/{Templates → dist/Templates}/Types.d.ts +0 -0
- package/{Templates → dist/Templates}/Types.js +0 -0
- package/{Templates → dist/Templates}/index.d.ts +0 -0
- package/{Templates → dist/Templates}/index.js +0 -0
- package/{Users → dist/Users}/Auth.d.ts +6 -6
- package/{Users → dist/Users}/Auth.js +27 -13
- package/{Users → dist/Users}/Billing.d.ts +0 -0
- package/{Users → dist/Users}/Billing.js +0 -0
- package/{Api → dist/Users}/Notifications.d.ts +0 -0
- package/{Api → dist/Users}/Notifications.js +8 -4
- package/{Users → dist/Users}/Profiles.d.ts +0 -0
- package/{Users → dist/Users}/Profiles.js +41 -11
- package/{Users → dist/Users}/Types.d.ts +13 -0
- package/{Search → dist/Users}/Types.js +0 -0
- package/{Users → dist/Users}/index.d.ts +0 -0
- package/{Users → dist/Users}/index.js +0 -0
- package/{Utils → dist/Utils}/DateTime.d.ts +0 -0
- package/{Utils → dist/Utils}/DateTime.js +0 -0
- package/{Utils → dist/Utils}/index.d.ts +0 -0
- package/{Utils → dist/Utils}/index.js +0 -0
- package/{Validators.d.ts → dist/Validators.d.ts} +0 -0
- package/dist/Validators.js +11 -0
- package/{Whitelabel.d.ts → dist/Whitelabel.d.ts} +0 -0
- package/dist/Whitelabel.js +11 -0
- package/{index.d.ts → dist/index.d.ts} +0 -0
- package/{index.js → dist/index.js} +0 -0
- package/dist/package.json +64 -0
- package/docs/.nojekyll +1 -0
- package/docs/README.md +70 -0
- package/docs/enums/Templates.Types.SortOptions.md +76 -0
- package/docs/enums/Templates.Types.Template.md +153 -0
- package/docs/enums/Templates.Types.TemplatePermissions.md +109 -0
- package/docs/enums/Templates.Types.TemplateSenderTypes.md +65 -0
- package/docs/interfaces/Documents.Documents-1.IActivityEntry.md +120 -0
- package/docs/interfaces/Documents.Documents-1.IDocument.md +175 -0
- package/docs/interfaces/Documents.Documents-1.IDocumentSearchOptions.md +98 -0
- package/docs/interfaces/Documents.Documents-1.IDocumentsSearchResult.md +43 -0
- package/docs/interfaces/Documents.Documents-1.IDocumentsSearchResultEntry.md +131 -0
- package/docs/interfaces/Documents.Documents-1.IDocumentsSummary.md +67 -0
- package/docs/interfaces/Documents.Documents-1.IHistory.md +76 -0
- package/docs/interfaces/Documents.Documents-1.IRecipient.md +208 -0
- package/docs/interfaces/Documents.Types.ITemplateSummaryEntry.md +186 -0
- package/docs/interfaces/Documents.Types.ITemplatesSummary.md +43 -0
- package/docs/interfaces/Organizations.Types.IApiKey.md +60 -0
- package/docs/interfaces/Organizations.Types.IApiKeyWithSecret.md +87 -0
- package/docs/interfaces/Organizations.Types.ICreateApiKeyRequest.md +32 -0
- package/docs/interfaces/Organizations.Types.IGroup.md +101 -0
- package/docs/interfaces/Organizations.Types.IGroupDetail.md +129 -0
- package/docs/interfaces/Organizations.Types.IOrganization.md +128 -0
- package/docs/interfaces/Organizations.Types.IUpdateApiKeyRequest.md +32 -0
- package/docs/interfaces/Signatures.ISignature.md +65 -0
- package/docs/interfaces/Tags.ITags.md +43 -0
- package/docs/interfaces/Templates.Types.IDocument.md +109 -0
- package/docs/interfaces/Templates.Types.IField.md +109 -0
- package/docs/interfaces/Templates.Types.IPage.md +87 -0
- package/docs/interfaces/Templates.Types.IReminder.md +109 -0
- package/docs/interfaces/Templates.Types.IRole.md +120 -0
- package/docs/interfaces/Templates.Types.ISetting.md +98 -0
- package/docs/interfaces/Templates.Types.IStar.md +32 -0
- package/docs/interfaces/Templates.Types.ITag.md +32 -0
- package/docs/interfaces/Templates.Types.ITemplate.md +219 -0
- package/docs/interfaces/Templates.Types.ITemplateSearchParams.md +197 -0
- package/docs/interfaces/Templates.Types.ITemplateSummaryEntry.md +186 -0
- package/docs/interfaces/Templates.Types.ITemplatesSearchResult.md +43 -0
- package/docs/interfaces/Templates.Types.ITemplatesSummary.md +43 -0
- package/docs/interfaces/Templates.Types.ITimePeriod.md +32 -0
- package/docs/interfaces/Users.Types.IActiveSession.md +131 -0
- package/docs/interfaces/Users.Types.IAuthenticateAppRequest.md +32 -0
- package/docs/interfaces/Users.Types.IAuthenticateResponse.md +43 -0
- package/docs/interfaces/Users.Types.IAuthenticateUserRequest.md +32 -0
- package/docs/interfaces/Users.Types.ICreateProfileRequest.md +54 -0
- package/docs/interfaces/Users.Types.IPermission.md +36 -0
- package/docs/interfaces/Users.Types.IProfile.md +173 -0
- package/docs/interfaces/Users.Types.IRole.md +36 -0
- package/docs/interfaces/Users.Types.ISwitchProfileResponse.md +54 -0
- package/docs/interfaces/Users.Types.IUpdateProfileRequest.md +43 -0
- package/docs/interfaces/Users.Types.TokenValidationRequest.md +21 -0
- package/docs/interfaces/Users.Types.TokenValidationResponse.md +36 -0
- package/docs/interfaces/Users.Types.UpdateEmailRequest.md +21 -0
- package/docs/interfaces/Users.Types.UpdateEmailResponse.md +21 -0
- package/docs/interfaces/Users.Types.UpdatePasswordRequest.md +43 -0
- package/docs/interfaces/Users.Types.UpdatePasswordResponse.md +34 -0
- package/docs/interfaces/Validators.IValidator.md +32 -0
- package/docs/modules/Documents.Documents-1.md +137 -0
- package/docs/modules/Documents.Stars.md +31 -0
- package/docs/modules/Documents.Templates.md +61 -0
- package/docs/modules/Documents.Types.md +12 -0
- package/docs/modules/Documents.md +12 -0
- package/docs/modules/HTTP.Transport.md +150 -0
- package/docs/modules/HTTP.Types.md +21 -0
- package/docs/modules/HTTP.md +10 -0
- package/docs/modules/Organizations.ApiKeys.md +169 -0
- package/docs/modules/Organizations.Groups.md +190 -0
- package/docs/modules/Organizations.Invitations.md +166 -0
- package/docs/modules/Organizations.Members.md +121 -0
- package/docs/modules/Organizations.Organizations-1.md +119 -0
- package/docs/modules/Organizations.Types.md +17 -0
- package/docs/modules/Organizations.Webhooks.md +53 -0
- package/docs/modules/Organizations.md +20 -0
- package/docs/modules/Signatures.md +90 -0
- package/docs/modules/Tags.md +75 -0
- package/docs/modules/Templates.Documents.md +129 -0
- package/docs/modules/Templates.Fields.md +77 -0
- package/docs/modules/Templates.Pages.md +98 -0
- package/docs/modules/Templates.Reminders.md +98 -0
- package/docs/modules/Templates.Roles.md +163 -0
- package/docs/modules/Templates.Stars.md +52 -0
- package/docs/modules/Templates.Tags.md +75 -0
- package/docs/modules/Templates.Templates-1.md +139 -0
- package/docs/modules/Templates.Types.md +31 -0
- package/docs/modules/Templates.md +17 -0
- package/docs/modules/Users.Auth.md +196 -0
- package/docs/modules/Users.Billing.md +5 -0
- package/docs/modules/Users.Notifications.md +25 -0
- package/docs/modules/Users.Profiles.md +286 -0
- package/docs/modules/Users.Types.md +62 -0
- package/docs/modules/Users.md +13 -0
- package/docs/modules/Utils.DateTime.md +31 -0
- package/docs/modules/Utils.md +9 -0
- package/docs/modules/Validators.md +48 -0
- package/docs/modules/Whitelabel.md +38 -0
- package/docs/modules.md +27 -0
- package/docs-html/.nojekyll +1 -0
- package/docs-html/assets/highlight.css +85 -0
- package/docs-html/assets/icons.css +1043 -0
- package/docs-html/assets/icons.png +0 -0
- package/docs-html/assets/icons@2x.png +0 -0
- package/docs-html/assets/main.js +52 -0
- package/docs-html/assets/search.js +1 -0
- package/docs-html/assets/style.css +1384 -0
- package/docs-html/assets/widgets.png +0 -0
- package/docs-html/assets/widgets@2x.png +0 -0
- package/docs-html/enums/Templates.Types.SortOptions.html +1 -0
- package/docs-html/enums/Templates.Types.Template.html +1 -0
- package/docs-html/enums/Templates.Types.TemplatePermissions.html +1 -0
- package/docs-html/enums/Templates.Types.TemplateSenderTypes.html +1 -0
- package/docs-html/index.html +64 -0
- package/docs-html/interfaces/Documents.Documents-1.IActivityEntry.html +1 -0
- package/docs-html/interfaces/Documents.Documents-1.IDocument.html +1 -0
- package/docs-html/interfaces/Documents.Documents-1.IDocumentSearchOptions.html +1 -0
- package/docs-html/interfaces/Documents.Documents-1.IDocumentsSearchResult.html +1 -0
- package/docs-html/interfaces/Documents.Documents-1.IDocumentsSearchResultEntry.html +1 -0
- package/docs-html/interfaces/Documents.Documents-1.IDocumentsSummary.html +1 -0
- package/docs-html/interfaces/Documents.Documents-1.IHistory.html +1 -0
- package/docs-html/interfaces/Documents.Documents-1.IRecipient.html +1 -0
- package/docs-html/interfaces/Documents.Types.ITemplateSummaryEntry.html +1 -0
- package/docs-html/interfaces/Documents.Types.ITemplatesSummary.html +1 -0
- package/docs-html/interfaces/Organizations.Types.IApiKey.html +1 -0
- package/docs-html/interfaces/Organizations.Types.IApiKeyWithSecret.html +1 -0
- package/docs-html/interfaces/Organizations.Types.ICreateApiKeyRequest.html +1 -0
- package/docs-html/interfaces/Organizations.Types.IGroup.html +9 -0
- package/docs-html/interfaces/Organizations.Types.IGroupDetail.html +9 -0
- package/docs-html/interfaces/Organizations.Types.IOrganization.html +9 -0
- package/docs-html/interfaces/Organizations.Types.IUpdateApiKeyRequest.html +1 -0
- package/docs-html/interfaces/Signatures.ISignature.html +1 -0
- package/docs-html/interfaces/Tags.ITags.html +1 -0
- package/docs-html/interfaces/Templates.Types.IDocument.html +1 -0
- package/docs-html/interfaces/Templates.Types.IField.html +1 -0
- package/docs-html/interfaces/Templates.Types.IPage.html +1 -0
- package/docs-html/interfaces/Templates.Types.IReminder.html +1 -0
- package/docs-html/interfaces/Templates.Types.IRole.html +1 -0
- package/docs-html/interfaces/Templates.Types.ISetting.html +1 -0
- package/docs-html/interfaces/Templates.Types.IStar.html +1 -0
- package/docs-html/interfaces/Templates.Types.ITag.html +1 -0
- package/docs-html/interfaces/Templates.Types.ITemplate.html +1 -0
- package/docs-html/interfaces/Templates.Types.ITemplateSearchParams.html +1 -0
- package/docs-html/interfaces/Templates.Types.ITemplateSummaryEntry.html +1 -0
- package/docs-html/interfaces/Templates.Types.ITemplatesSearchResult.html +1 -0
- package/docs-html/interfaces/Templates.Types.ITemplatesSummary.html +1 -0
- package/docs-html/interfaces/Templates.Types.ITimePeriod.html +1 -0
- package/docs-html/interfaces/Users.Types.IActiveSession.html +1 -0
- package/docs-html/interfaces/Users.Types.IAuthenticateAppRequest.html +1 -0
- package/docs-html/interfaces/Users.Types.IAuthenticateResponse.html +1 -0
- package/docs-html/interfaces/Users.Types.IAuthenticateUserRequest.html +1 -0
- package/docs-html/interfaces/Users.Types.ICreateProfileRequest.html +1 -0
- package/docs-html/interfaces/Users.Types.IPermission.html +5 -0
- package/docs-html/interfaces/Users.Types.IProfile.html +21 -0
- package/docs-html/interfaces/Users.Types.IRole.html +5 -0
- package/docs-html/interfaces/Users.Types.ISwitchProfileResponse.html +1 -0
- package/docs-html/interfaces/Users.Types.IUpdateProfileRequest.html +1 -0
- package/docs-html/interfaces/Users.Types.TokenValidationRequest.html +1 -0
- package/docs-html/interfaces/Users.Types.TokenValidationResponse.html +5 -0
- package/docs-html/interfaces/Users.Types.UpdateEmailRequest.html +1 -0
- package/docs-html/interfaces/Users.Types.UpdateEmailResponse.html +1 -0
- package/docs-html/interfaces/Users.Types.UpdatePasswordRequest.html +1 -0
- package/docs-html/interfaces/Users.Types.UpdatePasswordResponse.html +3 -0
- package/docs-html/interfaces/Validators.IValidator.html +1 -0
- package/docs-html/modules/Documents.Documents-1.html +9 -0
- package/docs-html/modules/Documents.Stars.html +1 -0
- package/docs-html/modules/Documents.Templates.html +1 -0
- package/docs-html/modules/Documents.Types.html +1 -0
- package/docs-html/modules/Documents.html +1 -0
- package/docs-html/modules/HTTP.Transport.html +22 -0
- package/docs-html/modules/HTTP.Types.html +1 -0
- package/docs-html/modules/HTTP.html +1 -0
- package/docs-html/modules/Organizations.ApiKeys.html +29 -0
- package/docs-html/modules/Organizations.Groups.html +15 -0
- package/docs-html/modules/Organizations.Invitations.html +1 -0
- package/docs-html/modules/Organizations.Members.html +1 -0
- package/docs-html/modules/Organizations.Organizations-1.html +1 -0
- package/docs-html/modules/Organizations.Types.html +1 -0
- package/docs-html/modules/Organizations.Webhooks.html +1 -0
- package/docs-html/modules/Organizations.html +6 -0
- package/docs-html/modules/Signatures.html +1 -0
- package/docs-html/modules/Tags.html +1 -0
- package/docs-html/modules/Templates.Documents.html +17 -0
- package/docs-html/modules/Templates.Fields.html +1 -0
- package/docs-html/modules/Templates.Pages.html +1 -0
- package/docs-html/modules/Templates.Reminders.html +1 -0
- package/docs-html/modules/Templates.Roles.html +1 -0
- package/docs-html/modules/Templates.Stars.html +1 -0
- package/docs-html/modules/Templates.Tags.html +1 -0
- package/docs-html/modules/Templates.Templates-1.html +5 -0
- package/docs-html/modules/Templates.Types.html +1 -0
- package/docs-html/modules/Templates.html +1 -0
- package/docs-html/modules/Users.Auth.html +31 -0
- package/docs-html/modules/Users.Billing.html +1 -0
- package/docs-html/modules/Users.Notifications.html +1 -0
- package/docs-html/modules/Users.Profiles.html +44 -0
- package/docs-html/modules/Users.Types.html +1 -0
- package/docs-html/modules/Users.html +1 -0
- package/docs-html/modules/Utils.DateTime.html +1 -0
- package/docs-html/modules/Utils.html +1 -0
- package/docs-html/modules/Validators.html +1 -0
- package/docs-html/modules/Whitelabel.html +1 -0
- package/docs-html/modules.html +11 -0
- package/jestconfig.json +11 -0
- package/package-lock.json +3421 -0
- package/package.json +6 -3
- package/src/Documents/Documents.ts +166 -0
- package/src/Documents/Stars.ts +5 -0
- package/src/Documents/Templates.ts +17 -0
- package/src/Documents/Types.ts +24 -0
- package/src/Documents/index.ts +4 -0
- package/src/HTTP/Transport.ts +95 -0
- package/src/HTTP/Types.ts +1 -0
- package/src/HTTP/index.ts +2 -0
- package/src/Organizations/ApiKeys.ts +85 -0
- package/src/Organizations/Groups.ts +65 -0
- package/src/Organizations/Invitations.ts +36 -0
- package/src/Organizations/Members.ts +26 -0
- package/src/Organizations/Organizations.ts +32 -0
- package/src/Organizations/Types.ts +63 -0
- package/src/Organizations/Webhooks.ts +11 -0
- package/src/Organizations/index.ts +16 -0
- package/src/Search/Content.ts +45 -0
- package/src/Search/Types.ts +83 -0
- package/src/Search/index.ts +2 -0
- package/src/Signatures.ts +29 -0
- package/src/Tags.ts +22 -0
- package/src/Templates/Documents.ts +58 -0
- package/src/Templates/Fields.ts +17 -0
- package/src/Templates/Pages.ts +22 -0
- package/src/Templates/Reminders.ts +22 -0
- package/src/Templates/Roles.ts +37 -0
- package/src/Templates/Stars.ts +12 -0
- package/src/Templates/Tags.ts +17 -0
- package/src/Templates/Templates.ts +42 -0
- package/src/Templates/Types.ts +201 -0
- package/src/Templates/index.ts +9 -0
- package/src/Users/Auth.ts +114 -0
- package/src/Users/Billing.ts +3 -0
- package/src/Users/Notifications.ts +6 -0
- package/src/Users/Profiles.ts +153 -0
- package/src/Users/Types.ts +156 -0
- package/src/Users/index.ts +5 -0
- package/src/Utils/DateTime.ts +43 -0
- package/src/Utils/index.ts +1 -0
- package/src/Validators.ts +16 -0
- package/src/Whitelabel.ts +11 -0
- package/src/__tests__/Organizations/Apikeys.spec.ts +84 -0
- package/src/__tests__/Users/Auth.spec.ts +89 -0
- package/src/__tests__/Users/Profiles.spec.ts +162 -0
- package/src/index.ts +23 -0
- package/tsconfig.json +20 -0
- package/tslint.json +3 -0
- package/Api/Auth.d.ts +0 -71
- package/Api/Auth.js +0 -24
- package/Api/Documents.d.ts +0 -124
- package/Api/Documents.js +0 -47
- package/Api/Endpoint.d.ts +0 -2
- package/Api/Endpoint.js +0 -9
- package/Api/Templates.d.ts +0 -33
- package/Api/Templates.js +0 -55
- package/Api/Types.d.ts +0 -182
- package/Api/index.d.ts +0 -2
- package/Api/index.js +0 -2
- package/AuthManager.d.ts +0 -14
- package/AuthManager.js +0 -53
- package/HTTP/Endpoint.d.ts +0 -4
- package/HTTP/Endpoint.js +0 -12
- package/HTTP/Transport.d.ts +0 -3
- package/HTTP/Transport.js +0 -12
- package/Organizations/Invitations.js +0 -22
- package/Organizations/Members.js +0 -16
- package/Organizations/Organizations.js +0 -13
- package/Organizations/Webhooks.js +0 -7
- package/Signatures.js +0 -7
- package/Tags.js +0 -4
- package/Templates/Fields.js +0 -10
- package/Templates/Pages.js +0 -13
- package/Templates/Reminders.js +0 -13
- package/Templates/Roles.js +0 -22
- package/Templates/Stars.js +0 -7
- package/Templates/Tags.js +0 -10
- package/Users/Notifications.d.ts +0 -1
- package/Users/Notifications.js +0 -40
- package/Users/Types.js +0 -1
- package/Validators.js +0 -5
- package/Whitelabel.js +0 -3
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
*/
|
|
9
|
+
|
|
10
|
+
export * as ApiKeys from './ApiKeys';
|
|
11
|
+
export * as Groups from './Groups';
|
|
12
|
+
export * as Invitations from './Invitations';
|
|
13
|
+
export * as Members from './Members';
|
|
14
|
+
export * as Organizations from './Organizations';
|
|
15
|
+
export * as Types from './Types';
|
|
16
|
+
export * as Webhooks from './Webhooks';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {ISavedSearch, ISearchHistory, ISearchParams, ISearchResult} from './Types';
|
|
2
|
+
import {getEndpoint} from '../HTTP/Transport';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Retrieve recent and saved searches. Note that result counts will be limited to a maximum of 20 entries for each
|
|
6
|
+
* type but this may be expanded in the future. Client UI's should self-limit display counts as needed.
|
|
7
|
+
*
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import {Content} from '@verdocs/js-sdk/Search';
|
|
10
|
+
*
|
|
11
|
+
* const {recent, saved} = await Content.getSearchHistory();
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export const getSearchHistory = async () =>
|
|
15
|
+
getEndpoint()
|
|
16
|
+
.get<ISearchHistory>('/search/history')
|
|
17
|
+
.then((r) => r.data);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Save a search. If a name is re-used, that saved search will be overwritten with the new parameters.
|
|
21
|
+
*
|
|
22
|
+
* ```typescript
|
|
23
|
+
* import {Content} from '@verdocs/js-sdk/Search';
|
|
24
|
+
*
|
|
25
|
+
* const entry = await Documents.saveSearch('W9 Forms', {q: 'w9', type: 'template});
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export const saveSearch = async (name: string, params: ISearchParams) =>
|
|
29
|
+
getEndpoint()
|
|
30
|
+
.post<ISavedSearch>('/search/saved', {name, params})
|
|
31
|
+
.then((r) => r.data);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Search for documents matching various criteria.
|
|
35
|
+
*
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import {Content} from '@verdocs/js-sdk/Search';
|
|
38
|
+
*
|
|
39
|
+
* const {result, page, total} = await Documents.search({ ... });
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export const searchContent = async (params: ISearchParams) =>
|
|
43
|
+
getEndpoint()
|
|
44
|
+
.post<ISearchResult>('/search/content')
|
|
45
|
+
.then((r) => r.data);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import {IDocumentStatus, IRecipientStatus} from '../Documents/Documents';
|
|
2
|
+
|
|
3
|
+
export interface IDocumentFile {
|
|
4
|
+
id: string;
|
|
5
|
+
url: string;
|
|
6
|
+
name: string;
|
|
7
|
+
created_at: string;
|
|
8
|
+
updated_at: string;
|
|
9
|
+
page_numbers: number;
|
|
10
|
+
mime: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface IDocumentResult {
|
|
14
|
+
id: string;
|
|
15
|
+
name: string;
|
|
16
|
+
status: IDocumentStatus;
|
|
17
|
+
profile_id: string;
|
|
18
|
+
template_id: string;
|
|
19
|
+
organization_id: string;
|
|
20
|
+
created_at: string;
|
|
21
|
+
updated_at: string;
|
|
22
|
+
canceled_at: string | null;
|
|
23
|
+
no_contact: boolean;
|
|
24
|
+
instrument: IDocumentFile;
|
|
25
|
+
certificate: IDocumentFile | null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ITemplateResult {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
status: IDocumentStatus;
|
|
32
|
+
profile_id: string;
|
|
33
|
+
template_id: string;
|
|
34
|
+
organization_id: string;
|
|
35
|
+
created_at: string;
|
|
36
|
+
updated_at: string;
|
|
37
|
+
canceled_at: string | null;
|
|
38
|
+
no_contact: boolean;
|
|
39
|
+
instrument: IDocumentFile;
|
|
40
|
+
certificate: IDocumentFile | null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ISearchParams {
|
|
44
|
+
page?: number;
|
|
45
|
+
limit?: number;
|
|
46
|
+
q?: string;
|
|
47
|
+
tags?: string[];
|
|
48
|
+
type?: 'template' | 'document' | 'organization';
|
|
49
|
+
shared?: 'private' | 'shared' | 'public';
|
|
50
|
+
mine?: boolean;
|
|
51
|
+
status?: IDocumentStatus | IRecipientStatus;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface IRecentSearch {
|
|
55
|
+
id: string;
|
|
56
|
+
created_at: string;
|
|
57
|
+
updated_at: string;
|
|
58
|
+
profile_id: string;
|
|
59
|
+
organization_id: string;
|
|
60
|
+
params: ISearchParams;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface ISavedSearch {
|
|
64
|
+
id: string;
|
|
65
|
+
created_at: string;
|
|
66
|
+
updated_at: string;
|
|
67
|
+
profile_id: string;
|
|
68
|
+
organization_id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
params: ISearchParams;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface ISearchHistory {
|
|
74
|
+
recent: IRecentSearch[];
|
|
75
|
+
saved: ISavedSearch[];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface ISearchResult {
|
|
79
|
+
matches: number;
|
|
80
|
+
templates: any[];
|
|
81
|
+
documents: IDocumentResult[];
|
|
82
|
+
organizations: any[];
|
|
83
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {getEndpoint} from './HTTP/Transport';
|
|
2
|
+
|
|
3
|
+
export interface ISignature {
|
|
4
|
+
id?: string;
|
|
5
|
+
profile_id: string;
|
|
6
|
+
url: string;
|
|
7
|
+
created_at?: Date;
|
|
8
|
+
updated_at?: Date;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const createSignature = (params: any) =>
|
|
12
|
+
getEndpoint()
|
|
13
|
+
.post<ISignature>('/signatures', params)
|
|
14
|
+
.then((r) => r.data);
|
|
15
|
+
|
|
16
|
+
export const getSignatures = () =>
|
|
17
|
+
getEndpoint()
|
|
18
|
+
.get<ISignature[]>('/signatures')
|
|
19
|
+
.then((r) => r.data);
|
|
20
|
+
|
|
21
|
+
export const getSignature = (signatureId: string) =>
|
|
22
|
+
getEndpoint()
|
|
23
|
+
.get(`/signatures/${signatureId}`)
|
|
24
|
+
.then((r) => r.data);
|
|
25
|
+
|
|
26
|
+
export const deleteSignature = (signatureId: string) =>
|
|
27
|
+
getEndpoint()
|
|
28
|
+
.delete(`/signatures/${signatureId}`)
|
|
29
|
+
.then((r) => r.data);
|
package/src/Tags.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {getEndpoint} from './HTTP/Transport';
|
|
2
|
+
|
|
3
|
+
export interface ITags {
|
|
4
|
+
name: string;
|
|
5
|
+
featured?: boolean;
|
|
6
|
+
created_at?: Date;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const createTag = (params: ITags) =>
|
|
10
|
+
getEndpoint()
|
|
11
|
+
.post<ITags>('/tags', params)
|
|
12
|
+
.then((r) => r.data);
|
|
13
|
+
|
|
14
|
+
export const getTag = (tagName: string) =>
|
|
15
|
+
getEndpoint()
|
|
16
|
+
.get<ITags>(`/tags/${tagName}`)
|
|
17
|
+
.then((r) => r.data);
|
|
18
|
+
|
|
19
|
+
export const searchTag = (params: any) =>
|
|
20
|
+
getEndpoint()
|
|
21
|
+
.get<ITags[]>('/tags', params)
|
|
22
|
+
.then((r) => r.data);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {getEndpoint} from '../HTTP/Transport';
|
|
2
|
+
import {IDocument} from './Types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Get all the Documents associated to a particular Template.
|
|
6
|
+
*
|
|
7
|
+
* ```typescript
|
|
8
|
+
* import {Documents} from '@verdocs/js-sdk/Templates';
|
|
9
|
+
*
|
|
10
|
+
* await Documents.getDocuments(templateID);
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export const getDocuments = (templateId: string) =>
|
|
14
|
+
getEndpoint()
|
|
15
|
+
.get(`/templates/${templateId}/documents/`)
|
|
16
|
+
.then((r) => r.data);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a Document for a particular Template.
|
|
20
|
+
*
|
|
21
|
+
* ```typescript
|
|
22
|
+
* import {Documents} from '@verdocs/js-sdk/Templates';
|
|
23
|
+
*
|
|
24
|
+
* await Documents.createDocument(templateID, params);
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export const createDocument = (templateId: string, params: any) =>
|
|
28
|
+
getEndpoint()
|
|
29
|
+
.post<IDocument>(`/templates/${templateId}/documents/`, params)
|
|
30
|
+
.then((r) => r.data);
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get a specific Document.
|
|
34
|
+
*
|
|
35
|
+
* ```typescript
|
|
36
|
+
* import {Documents} from '@verdocs/js-sdk/Templates';
|
|
37
|
+
*
|
|
38
|
+
* await Documents.getDocument(templateID, documentID);
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export const getDocument = (templateId: string, documentId: string) =>
|
|
42
|
+
getEndpoint()
|
|
43
|
+
.get<IDocument>(`/templates/${templateId}/documents/${documentId}`)
|
|
44
|
+
.then((r) => r.data);
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Delete a specific Document.
|
|
48
|
+
*
|
|
49
|
+
* ```typescript
|
|
50
|
+
* import {Documents} from '@verdocs/js-sdk/Templates';
|
|
51
|
+
*
|
|
52
|
+
* await Documents.deleteDocument(templateID, documentID);
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export const deleteDocument = (templateId: string, documentId: string) =>
|
|
56
|
+
getEndpoint()
|
|
57
|
+
.delete(`/templates/${templateId}/documents/${documentId}`)
|
|
58
|
+
.then((r) => r.data);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {getEndpoint} from '../HTTP/Transport';
|
|
2
|
+
import {IField} from './Types';
|
|
3
|
+
|
|
4
|
+
export const createField = (templateId: string, params: IField) =>
|
|
5
|
+
getEndpoint()
|
|
6
|
+
.post<IField>(`/templates/${templateId}/pages/`, params)
|
|
7
|
+
.then((r) => r.data);
|
|
8
|
+
|
|
9
|
+
export const editField = (templateId: string, fieldName: string, params: IField) =>
|
|
10
|
+
getEndpoint()
|
|
11
|
+
.put<IField>(`/templates/${templateId}/pages/${fieldName}`, params)
|
|
12
|
+
.then((r) => r.data);
|
|
13
|
+
|
|
14
|
+
export const deleteField = (templateId: string, fieldName: string) =>
|
|
15
|
+
getEndpoint()
|
|
16
|
+
.delete(`/templates/${templateId}/pages/${fieldName}`)
|
|
17
|
+
.then((r) => r.data);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {getEndpoint} from '../HTTP/Transport';
|
|
2
|
+
import {IPage} from './Types';
|
|
3
|
+
|
|
4
|
+
export const createPage = (templateId: string, params: IPage) =>
|
|
5
|
+
getEndpoint()
|
|
6
|
+
.post<IPage>(`/templates/${templateId}/pages/`, params)
|
|
7
|
+
.then((r) => r.data);
|
|
8
|
+
|
|
9
|
+
export const editPage = (templateId: string, sequence: string) =>
|
|
10
|
+
getEndpoint()
|
|
11
|
+
.put(`/templates/${templateId}/pages/${sequence}`)
|
|
12
|
+
.then((r) => r.data);
|
|
13
|
+
|
|
14
|
+
export const getPage = (templateId: string, sequence: string) =>
|
|
15
|
+
getEndpoint()
|
|
16
|
+
.get(`/templates/${templateId}/pages/${sequence}`)
|
|
17
|
+
.then((r) => r.data);
|
|
18
|
+
|
|
19
|
+
export const deletePage = (templateId: string, sequence: string) =>
|
|
20
|
+
getEndpoint()
|
|
21
|
+
.delete(`/templates/${templateId}/pages/${sequence}`)
|
|
22
|
+
.then((r) => r.data);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {getEndpoint} from '../HTTP/Transport';
|
|
2
|
+
import {IReminder, ITemplate} from './Types';
|
|
3
|
+
|
|
4
|
+
export const createReminder = (templateId: string, params: any) =>
|
|
5
|
+
getEndpoint()
|
|
6
|
+
.post<ITemplate>(`/templates/${templateId}/reminder/`, params)
|
|
7
|
+
.then((r) => r.data);
|
|
8
|
+
|
|
9
|
+
export const getReminder = (templateId: string, reminderId: string) =>
|
|
10
|
+
getEndpoint()
|
|
11
|
+
.get<IReminder>(`/templates/${templateId}/reminder/${reminderId}`)
|
|
12
|
+
.then((r) => r.data);
|
|
13
|
+
|
|
14
|
+
export const editReminder = (templateId: string, reminderId: string) =>
|
|
15
|
+
getEndpoint()
|
|
16
|
+
.put<IReminder>(`/templates/${templateId}/reminder/${reminderId}`)
|
|
17
|
+
.then((r) => r.data);
|
|
18
|
+
|
|
19
|
+
export const deleteReminder = (templateId: string, reminderId: string) =>
|
|
20
|
+
getEndpoint()
|
|
21
|
+
.delete(`/templates/${templateId}/reminder/${reminderId}`)
|
|
22
|
+
.then((r) => r.data);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import {getEndpoint} from '../HTTP/Transport';
|
|
2
|
+
import {IField, IRole} from './Types';
|
|
3
|
+
|
|
4
|
+
export const createRole = (templateId: string, params: IRole) =>
|
|
5
|
+
getEndpoint()
|
|
6
|
+
.post<IRole>(`/templates/${templateId}/roles/`, params)
|
|
7
|
+
.then((r) => r.data);
|
|
8
|
+
|
|
9
|
+
export const getRoles = (templateId: string) =>
|
|
10
|
+
getEndpoint()
|
|
11
|
+
.get<IRole[]>(`/templates/${templateId}/roles/`)
|
|
12
|
+
.then((r) => r.data);
|
|
13
|
+
|
|
14
|
+
export const getRole = (templateId: string, roleName: string) =>
|
|
15
|
+
getEndpoint()
|
|
16
|
+
.get<IRole>(`/templates/${templateId}/roles/${roleName}`)
|
|
17
|
+
.then((r) => r.data);
|
|
18
|
+
|
|
19
|
+
export const editRole = (templateId: string, roleName: string, params: IRole) =>
|
|
20
|
+
getEndpoint()
|
|
21
|
+
.put<IRole>(`/templates/${templateId}/roles/${roleName}`, params)
|
|
22
|
+
.then((r) => r.data);
|
|
23
|
+
|
|
24
|
+
export const deleteRole = (templateId: string, roleName: string) =>
|
|
25
|
+
getEndpoint()
|
|
26
|
+
.delete(`/templates/${templateId}/roles/${roleName}`)
|
|
27
|
+
.then((r) => r.data);
|
|
28
|
+
|
|
29
|
+
export const getRoleFields = (templateId: string, roleName: string) =>
|
|
30
|
+
getEndpoint()
|
|
31
|
+
.get<IField[]>(`/templates/${templateId}/roles/${roleName}/fields`)
|
|
32
|
+
.then((r) => r.data);
|
|
33
|
+
|
|
34
|
+
export const deleteSequence = (templateId: string) =>
|
|
35
|
+
getEndpoint()
|
|
36
|
+
.delete<IRole[]>(`/templates/${templateId}/roles/`)
|
|
37
|
+
.then((r) => r.data);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {getEndpoint} from '../HTTP/Transport';
|
|
2
|
+
import {IStar, ITemplatesSummary} from './Types';
|
|
3
|
+
|
|
4
|
+
export const getStars = (templateId: string) =>
|
|
5
|
+
getEndpoint()
|
|
6
|
+
.get<IStar[]>(`/templates/${templateId}/stars/`)
|
|
7
|
+
.then((r) => r.data);
|
|
8
|
+
|
|
9
|
+
export const toggleStar = (templateId: string) =>
|
|
10
|
+
getEndpoint()
|
|
11
|
+
.get<ITemplatesSummary>(`/templates/${templateId}/stars/toggle`)
|
|
12
|
+
.then((r) => r.data);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {getEndpoint} from '../HTTP/Transport';
|
|
2
|
+
import {ITag} from './Types';
|
|
3
|
+
|
|
4
|
+
export const createTag = (templateId: string, params: any) =>
|
|
5
|
+
getEndpoint()
|
|
6
|
+
.post<ITag>(`/templates/${templateId}/tags/`, params)
|
|
7
|
+
.then((r) => r.data);
|
|
8
|
+
|
|
9
|
+
export const getTags = (templateId: string) =>
|
|
10
|
+
getEndpoint()
|
|
11
|
+
.get<ITag[]>(`/templates/${templateId}/tags/`)
|
|
12
|
+
.then((r) => r.data);
|
|
13
|
+
|
|
14
|
+
export const deleteTag = (templateId: string, tagName: string) =>
|
|
15
|
+
getEndpoint()
|
|
16
|
+
.post(`/templates/${templateId}/tags/${tagName}`)
|
|
17
|
+
.then((r) => r.data);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {getEndpoint} from '../HTTP/Transport';
|
|
2
|
+
|
|
3
|
+
import {ITemplate, ITemplatesSearchResult, ITemplatesSummary} from './Types';
|
|
4
|
+
|
|
5
|
+
export const getTemplates = () =>
|
|
6
|
+
getEndpoint()
|
|
7
|
+
.get<any[]>('/templates/')
|
|
8
|
+
.then((r) => r.data);
|
|
9
|
+
|
|
10
|
+
export const getTemplate = (templateId: string) =>
|
|
11
|
+
getEndpoint()
|
|
12
|
+
.get(`/templates/${templateId}`)
|
|
13
|
+
.then((r) => r.data);
|
|
14
|
+
|
|
15
|
+
export const createTemplate = (params: any) =>
|
|
16
|
+
getEndpoint()
|
|
17
|
+
.post<ITemplate>('/templates/', params)
|
|
18
|
+
.then((r) => r.data);
|
|
19
|
+
|
|
20
|
+
export const editTemplate = (templateId: string, params: any) =>
|
|
21
|
+
getEndpoint()
|
|
22
|
+
.put<ITemplate>(`/templates/${templateId}`, params)
|
|
23
|
+
.then((r) => r.data);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Search for templates matching various criteria.
|
|
27
|
+
*
|
|
28
|
+
* ```typescript
|
|
29
|
+
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
30
|
+
*
|
|
31
|
+
* const {result, page, total} = await Templates.search({ ... });
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export const searchTemplate = async (params: any): Promise<ITemplatesSearchResult> =>
|
|
35
|
+
getEndpoint()
|
|
36
|
+
.post('/templates/search', params)
|
|
37
|
+
.then((r) => r.data);
|
|
38
|
+
|
|
39
|
+
export const getSummary = async (page: number): Promise<ITemplatesSummary> =>
|
|
40
|
+
getEndpoint()
|
|
41
|
+
.post('/templates/summary', {page})
|
|
42
|
+
.then((r) => r.data);
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
export interface ITemplate {
|
|
2
|
+
template_document?: IDocument;
|
|
3
|
+
pages?: IPage[];
|
|
4
|
+
roles?: IRole[];
|
|
5
|
+
counter?: number;
|
|
6
|
+
star_counter?: number;
|
|
7
|
+
name: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
profile_id?: string;
|
|
10
|
+
created_at?: Date;
|
|
11
|
+
updated_at?: Date;
|
|
12
|
+
last_used_at?: Date;
|
|
13
|
+
token?: string;
|
|
14
|
+
reminder_id?: string;
|
|
15
|
+
reminder?: IReminder;
|
|
16
|
+
organization_id?: string;
|
|
17
|
+
is_personal?: boolean;
|
|
18
|
+
is_public?: boolean;
|
|
19
|
+
sender?: TemplateSenderTypes;
|
|
20
|
+
description?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ITemplateSummaryEntry {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
sender: string;
|
|
27
|
+
counter: number;
|
|
28
|
+
description: string | null;
|
|
29
|
+
created_at: string;
|
|
30
|
+
updated_at: string;
|
|
31
|
+
is_personal: boolean;
|
|
32
|
+
is_public: boolean;
|
|
33
|
+
profile_id: string;
|
|
34
|
+
organization_id: string;
|
|
35
|
+
last_used_at: string | null;
|
|
36
|
+
document_name: string | null;
|
|
37
|
+
star_counter: number;
|
|
38
|
+
tag_name: string | null;
|
|
39
|
+
is_starred: boolean;
|
|
40
|
+
}
|
|
41
|
+
export enum Template {
|
|
42
|
+
ID = 'id',
|
|
43
|
+
PROFILE_ID = 'profile_id',
|
|
44
|
+
NAME = 'name',
|
|
45
|
+
COUNTER = 'counter',
|
|
46
|
+
CREATED_AT = 'created_at',
|
|
47
|
+
UPDATED_AT = 'updated_at',
|
|
48
|
+
TOKEN = 'token',
|
|
49
|
+
REMINDER_ID = 'reminder_id',
|
|
50
|
+
ORGANIZATION_ID = 'organization_id',
|
|
51
|
+
IS_PERSONAL = 'is_personal',
|
|
52
|
+
IS_PUBLIC = 'is_public',
|
|
53
|
+
SENDER = 'sender',
|
|
54
|
+
DESCRIPTION = 'description',
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export enum TemplateSenderTypes {
|
|
58
|
+
CREATOR = 'creator',
|
|
59
|
+
ORGANIZATION_MEMBER = 'organization_member',
|
|
60
|
+
ORGANIZATION_MEMBER_AS_CREATOR = 'organization_member_as_creator',
|
|
61
|
+
EVERYONE = 'everyone',
|
|
62
|
+
EVERYONE_AS_CREATOR = 'everyone_as_creator',
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export enum TemplatePermissions {
|
|
66
|
+
TEMPLATE_CREATOR_CREATE_PUBLIC = 'template:creator:create:public',
|
|
67
|
+
TEMPLATE_CREATOR_CREATE_ORG = 'template:creator:create:org',
|
|
68
|
+
TEMPLATE_CREATOR_CREATE_PERSONAL = 'template:creator:create:personal',
|
|
69
|
+
TEMPLATE_CREATOR_DELETE = 'template:creator:delete',
|
|
70
|
+
TEMPLATE_CREATOR_VISIBILITY = 'template:creator:visibility',
|
|
71
|
+
TEMPLATE_MEMBER_READ = 'template:member:read',
|
|
72
|
+
TEMPLATE_MEMBER_WRITE = 'template:member:write',
|
|
73
|
+
TEMPLATE_MEMBER_DELETE = 'template:member:delete',
|
|
74
|
+
TEMPLATE_MEMBER_VISIBILITY = 'template:member:visibility',
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface ITemplateSearchParams {
|
|
78
|
+
id?: string;
|
|
79
|
+
name?: string;
|
|
80
|
+
sender?: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
profile_id?: string;
|
|
83
|
+
organization_id?: string;
|
|
84
|
+
updated_at?: ITimePeriod;
|
|
85
|
+
created_at?: ITimePeriod;
|
|
86
|
+
last_used_at?: ITimePeriod;
|
|
87
|
+
is_personal?: boolean;
|
|
88
|
+
is_public?: boolean;
|
|
89
|
+
tags?: string[];
|
|
90
|
+
document_name?: string;
|
|
91
|
+
sort_by?: SortOptions;
|
|
92
|
+
ascending?: boolean;
|
|
93
|
+
row?: number;
|
|
94
|
+
page?: number;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface ITimePeriod {
|
|
98
|
+
start_time: string; // Date
|
|
99
|
+
end_time: string; // Date
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export enum SortOptions {
|
|
103
|
+
CREATED_AT = 'created_at',
|
|
104
|
+
UPDATED_AT = 'updated_at',
|
|
105
|
+
NAME = 'name',
|
|
106
|
+
LAST_USED_AT = 'last_used_at',
|
|
107
|
+
COUNTER = 'counter',
|
|
108
|
+
STAR_COUNTER = 'star_counter',
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface ITemplatesSummary {
|
|
112
|
+
page: number;
|
|
113
|
+
total: number;
|
|
114
|
+
result: ITemplateSummaryEntry[];
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface ITemplatesSearchResult {
|
|
118
|
+
page: number;
|
|
119
|
+
total: number;
|
|
120
|
+
result: ITemplate[];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface ITag {
|
|
124
|
+
tag_name: string;
|
|
125
|
+
template_id: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface IStar {
|
|
129
|
+
template_id: string;
|
|
130
|
+
profile_id: string;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface IRole {
|
|
134
|
+
template_id: string;
|
|
135
|
+
name: string;
|
|
136
|
+
full_name?: string;
|
|
137
|
+
email?: string;
|
|
138
|
+
type: string;
|
|
139
|
+
sequence: number;
|
|
140
|
+
fields?: IField[];
|
|
141
|
+
delegator?: boolean;
|
|
142
|
+
message?: string;
|
|
143
|
+
phone?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface IDocument {
|
|
147
|
+
url: string;
|
|
148
|
+
name: string;
|
|
149
|
+
page_numbers: number;
|
|
150
|
+
id?: string;
|
|
151
|
+
updated_at?: Date;
|
|
152
|
+
created_at?: Date;
|
|
153
|
+
template_id: string;
|
|
154
|
+
mime: string;
|
|
155
|
+
thumbnail_url: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface IField {
|
|
159
|
+
name: string;
|
|
160
|
+
role_name: string;
|
|
161
|
+
template_id: string;
|
|
162
|
+
type: string;
|
|
163
|
+
required: boolean;
|
|
164
|
+
setting?: ISetting;
|
|
165
|
+
page_sequence: number;
|
|
166
|
+
validator?: string;
|
|
167
|
+
label?: string;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export interface ISetting {
|
|
171
|
+
x?: number;
|
|
172
|
+
y?: number;
|
|
173
|
+
width?: number;
|
|
174
|
+
height?: number;
|
|
175
|
+
result?: string;
|
|
176
|
+
type?: string;
|
|
177
|
+
options?: any[];
|
|
178
|
+
value?: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface IPage {
|
|
182
|
+
template_id: string;
|
|
183
|
+
document_id: string;
|
|
184
|
+
template_document?: IDocument;
|
|
185
|
+
sequence: number;
|
|
186
|
+
page_number: number;
|
|
187
|
+
thumbnail_url: string;
|
|
188
|
+
fields?: IField[];
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface IReminder {
|
|
192
|
+
id?: string;
|
|
193
|
+
created_at?: Date;
|
|
194
|
+
is_on: boolean;
|
|
195
|
+
setup_time: number;
|
|
196
|
+
interval_time: number;
|
|
197
|
+
last_time: number;
|
|
198
|
+
next_time: number;
|
|
199
|
+
envelope_id: string;
|
|
200
|
+
template_id: string;
|
|
201
|
+
}
|
|
@@ -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';
|