@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,196 @@
|
|
|
1
|
+
[@verdocs/js-sdk - v1.0.12](../README.md) / [Exports](../modules.md) / [Users](Users.md) / Auth
|
|
2
|
+
|
|
3
|
+
# Namespace: Auth
|
|
4
|
+
|
|
5
|
+
[Users](Users.md).Auth
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Functions
|
|
10
|
+
|
|
11
|
+
- [authenticateApp](Users.Auth.md#authenticateapp)
|
|
12
|
+
- [authenticateUser](Users.Auth.md#authenticateuser)
|
|
13
|
+
- [refreshTokens](Users.Auth.md#refreshtokens)
|
|
14
|
+
- [updateEmail](Users.Auth.md#updateemail)
|
|
15
|
+
- [updatePassword](Users.Auth.md#updatepassword)
|
|
16
|
+
- [validateToken](Users.Auth.md#validatetoken)
|
|
17
|
+
|
|
18
|
+
## Functions
|
|
19
|
+
|
|
20
|
+
### authenticateApp
|
|
21
|
+
|
|
22
|
+
▸ `Const` **authenticateApp**(`params`): `Promise`<[`IAuthenticateResponse`](../interfaces/Users.Types.IAuthenticateResponse.md)\>
|
|
23
|
+
|
|
24
|
+
Authenticate to Verdocs via client ID / Secret authentication. **NOTE: This is only suitable for
|
|
25
|
+
NodeJS server-side applications. Never expose your Client Secret in a Web or Mobile app!** Also note
|
|
26
|
+
that access tokens may be cached by server-side apps (and this is recommended) but do expire after 2
|
|
27
|
+
hours. This expiration may change based on future security needs. Application developers are encouraged
|
|
28
|
+
to check the `exp` expiration field in the response accessToken and renew tokens after they expire.
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import {Auth} from '@verdocs/js-sdk/Auth';
|
|
32
|
+
import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
33
|
+
|
|
34
|
+
const {accessToken} = await Auth.authenticateApp({ client_id: 'CLIENTID', client_secret: 'SECRET' });
|
|
35
|
+
Transport.setAuthToken(accessToken);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
#### Parameters
|
|
39
|
+
|
|
40
|
+
| Name | Type |
|
|
41
|
+
| :------ | :------ |
|
|
42
|
+
| `params` | [`IAuthenticateAppRequest`](../interfaces/Users.Types.IAuthenticateAppRequest.md) |
|
|
43
|
+
|
|
44
|
+
#### Returns
|
|
45
|
+
|
|
46
|
+
`Promise`<[`IAuthenticateResponse`](../interfaces/Users.Types.IAuthenticateResponse.md)\>
|
|
47
|
+
|
|
48
|
+
#### Defined in
|
|
49
|
+
|
|
50
|
+
[Users/Auth.ts:45](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Auth.ts#L45)
|
|
51
|
+
|
|
52
|
+
___
|
|
53
|
+
|
|
54
|
+
### authenticateUser
|
|
55
|
+
|
|
56
|
+
▸ `Const` **authenticateUser**(`params`): `Promise`<[`IAuthenticateResponse`](../interfaces/Users.Types.IAuthenticateResponse.md)\>
|
|
57
|
+
|
|
58
|
+
Authenticate to Verdocs via user/password authentication
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
import {Auth} from '@verdocs/js-sdk/Auth';
|
|
62
|
+
import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
63
|
+
|
|
64
|
+
const {accessToken} = await Auth.authenticateUser({ username: 'test@test.com', password: 'PASSWORD' });
|
|
65
|
+
Transport.setAuthToken(accessToken);
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
#### Parameters
|
|
69
|
+
|
|
70
|
+
| Name | Type |
|
|
71
|
+
| :------ | :------ |
|
|
72
|
+
| `params` | [`IAuthenticateUserRequest`](../interfaces/Users.Types.IAuthenticateUserRequest.md) |
|
|
73
|
+
|
|
74
|
+
#### Returns
|
|
75
|
+
|
|
76
|
+
`Promise`<[`IAuthenticateResponse`](../interfaces/Users.Types.IAuthenticateResponse.md)\>
|
|
77
|
+
|
|
78
|
+
#### Defined in
|
|
79
|
+
|
|
80
|
+
[Users/Auth.ts:25](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Auth.ts#L25)
|
|
81
|
+
|
|
82
|
+
___
|
|
83
|
+
|
|
84
|
+
### refreshTokens
|
|
85
|
+
|
|
86
|
+
▸ `Const` **refreshTokens**(): `Promise`<[`IAuthenticateResponse`](../interfaces/Users.Types.IAuthenticateResponse.md)\>
|
|
87
|
+
|
|
88
|
+
If called before the session expires, this will refresh the caller's session and tokens.
|
|
89
|
+
|
|
90
|
+
```typescript
|
|
91
|
+
import {Auth} from '@verdocs/js-sdk/Auth';
|
|
92
|
+
import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
93
|
+
|
|
94
|
+
const {accessToken} = await Auth.refreshTokens();
|
|
95
|
+
Transport.setAuthToken(accessToken);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
#### Returns
|
|
99
|
+
|
|
100
|
+
`Promise`<[`IAuthenticateResponse`](../interfaces/Users.Types.IAuthenticateResponse.md)\>
|
|
101
|
+
|
|
102
|
+
#### Defined in
|
|
103
|
+
|
|
104
|
+
[Users/Auth.ts:80](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Auth.ts#L80)
|
|
105
|
+
|
|
106
|
+
___
|
|
107
|
+
|
|
108
|
+
### updateEmail
|
|
109
|
+
|
|
110
|
+
▸ `Const` **updateEmail**(`params`): `Promise`<[`UpdateEmailResponse`](../interfaces/Users.Types.UpdateEmailResponse.md)\>
|
|
111
|
+
|
|
112
|
+
Update the caller's email address.
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import {Auth} from '@verdocs/js-sdk/Auth';
|
|
116
|
+
|
|
117
|
+
const {profiles} = await Auth.updateEmail({ email: newEmail });
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### Parameters
|
|
121
|
+
|
|
122
|
+
| Name | Type |
|
|
123
|
+
| :------ | :------ |
|
|
124
|
+
| `params` | [`UpdateEmailRequest`](../interfaces/Users.Types.UpdateEmailRequest.md) |
|
|
125
|
+
|
|
126
|
+
#### Returns
|
|
127
|
+
|
|
128
|
+
`Promise`<[`UpdateEmailResponse`](../interfaces/Users.Types.UpdateEmailResponse.md)\>
|
|
129
|
+
|
|
130
|
+
#### Defined in
|
|
131
|
+
|
|
132
|
+
[Users/Auth.ts:111](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Auth.ts#L111)
|
|
133
|
+
|
|
134
|
+
___
|
|
135
|
+
|
|
136
|
+
### updatePassword
|
|
137
|
+
|
|
138
|
+
▸ `Const` **updatePassword**(`params`): `Promise`<[`UpdatePasswordResponse`](../interfaces/Users.Types.UpdatePasswordResponse.md)\>
|
|
139
|
+
|
|
140
|
+
Update the caller's password. To help prevent CSRF attack vectors, the user's old password and email address are required.
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import {Auth} from '@verdocs/js-sdk/Auth';
|
|
144
|
+
|
|
145
|
+
const {status, message} = await Auth.updatePassword({ email, oldPassword, newPassword });
|
|
146
|
+
if (status !== 'OK') {
|
|
147
|
+
window.alert(`Password reset error: ${message}`);
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
#### Parameters
|
|
152
|
+
|
|
153
|
+
| Name | Type |
|
|
154
|
+
| :------ | :------ |
|
|
155
|
+
| `params` | [`UpdatePasswordRequest`](../interfaces/Users.Types.UpdatePasswordRequest.md) |
|
|
156
|
+
|
|
157
|
+
#### Returns
|
|
158
|
+
|
|
159
|
+
`Promise`<[`UpdatePasswordResponse`](../interfaces/Users.Types.UpdatePasswordResponse.md)\>
|
|
160
|
+
|
|
161
|
+
#### Defined in
|
|
162
|
+
|
|
163
|
+
[Users/Auth.ts:97](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Auth.ts#L97)
|
|
164
|
+
|
|
165
|
+
___
|
|
166
|
+
|
|
167
|
+
### validateToken
|
|
168
|
+
|
|
169
|
+
▸ `Const` **validateToken**(`params`): `Promise`<[`TokenValidationResponse`](../interfaces/Users.Types.TokenValidationResponse.md)\>
|
|
170
|
+
|
|
171
|
+
Validate a token. Only Verdocs tokens will be accepted. Most applications can decode tokens locally,
|
|
172
|
+
because tokens will be validated when API calls are made anyway. However, high-security applications
|
|
173
|
+
may use this endpoint to check if a token has been revoked.
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
import {Auth} from '@verdocs/js-sdk/Auth';
|
|
177
|
+
|
|
178
|
+
const {valid} = await Auth.validateToken({ token });
|
|
179
|
+
if (!valid) {
|
|
180
|
+
window.alert('Session invalid or expired. Please re-authenticate.');
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
#### Parameters
|
|
185
|
+
|
|
186
|
+
| Name | Type |
|
|
187
|
+
| :------ | :------ |
|
|
188
|
+
| `params` | [`TokenValidationRequest`](../interfaces/Users.Types.TokenValidationRequest.md) |
|
|
189
|
+
|
|
190
|
+
#### Returns
|
|
191
|
+
|
|
192
|
+
`Promise`<[`TokenValidationResponse`](../interfaces/Users.Types.TokenValidationResponse.md)\>
|
|
193
|
+
|
|
194
|
+
#### Defined in
|
|
195
|
+
|
|
196
|
+
[Users/Auth.ts:64](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Auth.ts#L64)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[@verdocs/js-sdk - v1.0.12](../README.md) / [Exports](../modules.md) / [Users](Users.md) / Notifications
|
|
2
|
+
|
|
3
|
+
# Namespace: Notifications
|
|
4
|
+
|
|
5
|
+
[Users](Users.md).Notifications
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Functions
|
|
10
|
+
|
|
11
|
+
- [getNotifications](Users.Notifications.md#getnotifications)
|
|
12
|
+
|
|
13
|
+
## Functions
|
|
14
|
+
|
|
15
|
+
### getNotifications
|
|
16
|
+
|
|
17
|
+
▸ `Const` **getNotifications**(): `Promise`<`any`\>
|
|
18
|
+
|
|
19
|
+
#### Returns
|
|
20
|
+
|
|
21
|
+
`Promise`<`any`\>
|
|
22
|
+
|
|
23
|
+
#### Defined in
|
|
24
|
+
|
|
25
|
+
[Users/Notifications.ts:3](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Notifications.ts#L3)
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
[@verdocs/js-sdk - v1.0.12](../README.md) / [Exports](../modules.md) / [Users](Users.md) / Profiles
|
|
2
|
+
|
|
3
|
+
# Namespace: Profiles
|
|
4
|
+
|
|
5
|
+
[Users](Users.md).Profiles
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Functions
|
|
10
|
+
|
|
11
|
+
- [createProfile](Users.Profiles.md#createprofile)
|
|
12
|
+
- [deleteProfile](Users.Profiles.md#deleteprofile)
|
|
13
|
+
- [getPermissions](Users.Profiles.md#getpermissions)
|
|
14
|
+
- [getProfile](Users.Profiles.md#getprofile)
|
|
15
|
+
- [getProfileGroups](Users.Profiles.md#getprofilegroups)
|
|
16
|
+
- [getProfilePermissions](Users.Profiles.md#getprofilepermissions)
|
|
17
|
+
- [getProfiles](Users.Profiles.md#getprofiles)
|
|
18
|
+
- [getRoles](Users.Profiles.md#getroles)
|
|
19
|
+
- [switchProfile](Users.Profiles.md#switchprofile)
|
|
20
|
+
- [updateProfile](Users.Profiles.md#updateprofile)
|
|
21
|
+
|
|
22
|
+
## Functions
|
|
23
|
+
|
|
24
|
+
### createProfile
|
|
25
|
+
|
|
26
|
+
▸ `Const` **createProfile**(`params`): `Promise`<[`IProfile`](../interfaces/Users.Types.IProfile.md)\>
|
|
27
|
+
|
|
28
|
+
Create a profile. If the caller does not have a "current" profile set, the new profile will be made current.
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import {Profiles} from '@verdocs/js-sdk/Users';
|
|
32
|
+
|
|
33
|
+
const newProfile = await Profiles.createProfile({ first_name: 'FIRST', last_name: 'LAST', email: 'EMAIL' });
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### Parameters
|
|
37
|
+
|
|
38
|
+
| Name | Type |
|
|
39
|
+
| :------ | :------ |
|
|
40
|
+
| `params` | [`ICreateProfileRequest`](../interfaces/Users.Types.ICreateProfileRequest.md) |
|
|
41
|
+
|
|
42
|
+
#### Returns
|
|
43
|
+
|
|
44
|
+
`Promise`<[`IProfile`](../interfaces/Users.Types.IProfile.md)\>
|
|
45
|
+
|
|
46
|
+
#### Defined in
|
|
47
|
+
|
|
48
|
+
[Users/Profiles.ts:63](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Profiles.ts#L63)
|
|
49
|
+
|
|
50
|
+
___
|
|
51
|
+
|
|
52
|
+
### deleteProfile
|
|
53
|
+
|
|
54
|
+
▸ `Const` **deleteProfile**(`profileId`): `Promise`<`any`\>
|
|
55
|
+
|
|
56
|
+
Delete a profile. If the requested profile is the caller's curent profile, the next available profile will be selected.
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import {Profiles} from '@verdocs/js-sdk/Users';
|
|
60
|
+
|
|
61
|
+
await Profiles.deleteProfile('PROFILEID');
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
#### Parameters
|
|
65
|
+
|
|
66
|
+
| Name | Type |
|
|
67
|
+
| :------ | :------ |
|
|
68
|
+
| `profileId` | `string` |
|
|
69
|
+
|
|
70
|
+
#### Returns
|
|
71
|
+
|
|
72
|
+
`Promise`<`any`\>
|
|
73
|
+
|
|
74
|
+
#### Defined in
|
|
75
|
+
|
|
76
|
+
[Users/Profiles.ts:150](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Profiles.ts#L150)
|
|
77
|
+
|
|
78
|
+
___
|
|
79
|
+
|
|
80
|
+
### getPermissions
|
|
81
|
+
|
|
82
|
+
▸ `Const` **getPermissions**(): `Promise`<[`IPermission`](../interfaces/Users.Types.IPermission.md)[]\>
|
|
83
|
+
|
|
84
|
+
Get a list of system roles.
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
import {Profiles} from '@verdocs/js-sdk/Users';
|
|
88
|
+
|
|
89
|
+
const permissions = await Profiles.getPermissions();
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### Returns
|
|
93
|
+
|
|
94
|
+
`Promise`<[`IPermission`](../interfaces/Users.Types.IPermission.md)[]\>
|
|
95
|
+
|
|
96
|
+
#### Defined in
|
|
97
|
+
|
|
98
|
+
[Users/Profiles.ts:49](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Profiles.ts#L49)
|
|
99
|
+
|
|
100
|
+
___
|
|
101
|
+
|
|
102
|
+
### getProfile
|
|
103
|
+
|
|
104
|
+
▸ `Const` **getProfile**(`profileId`): `Promise`<[`IProfile`](../interfaces/Users.Types.IProfile.md)\>
|
|
105
|
+
|
|
106
|
+
Get a profile. The caller must have admin access to the given profile.
|
|
107
|
+
TODO: Add a "public" profile endpoint for public pages
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
import {Profiles} from '@verdocs/js-sdk/Users';
|
|
111
|
+
|
|
112
|
+
const profile = await Profiles.getProfile('PROFILEID');
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
#### Parameters
|
|
116
|
+
|
|
117
|
+
| Name | Type |
|
|
118
|
+
| :------ | :------ |
|
|
119
|
+
| `profileId` | `string` |
|
|
120
|
+
|
|
121
|
+
#### Returns
|
|
122
|
+
|
|
123
|
+
`Promise`<[`IProfile`](../interfaces/Users.Types.IProfile.md)\>
|
|
124
|
+
|
|
125
|
+
#### Defined in
|
|
126
|
+
|
|
127
|
+
[Users/Profiles.ts:78](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Profiles.ts#L78)
|
|
128
|
+
|
|
129
|
+
___
|
|
130
|
+
|
|
131
|
+
### getProfileGroups
|
|
132
|
+
|
|
133
|
+
▸ `Const` **getProfileGroups**(`profileId`): `Promise`<[`IGroup`](../interfaces/Organizations.Types.IGroup.md)[]\>
|
|
134
|
+
|
|
135
|
+
Get a profile's groups.
|
|
136
|
+
|
|
137
|
+
```typescript
|
|
138
|
+
import {Profiles} from '@verdocs/js-sdk/Users';
|
|
139
|
+
|
|
140
|
+
const groups = await Profiles.getProfileGroups('PROFILEID');
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
#### Parameters
|
|
144
|
+
|
|
145
|
+
| Name | Type |
|
|
146
|
+
| :------ | :------ |
|
|
147
|
+
| `profileId` | `string` |
|
|
148
|
+
|
|
149
|
+
#### Returns
|
|
150
|
+
|
|
151
|
+
`Promise`<[`IGroup`](../interfaces/Organizations.Types.IGroup.md)[]\>
|
|
152
|
+
|
|
153
|
+
#### Defined in
|
|
154
|
+
|
|
155
|
+
[Users/Profiles.ts:106](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Profiles.ts#L106)
|
|
156
|
+
|
|
157
|
+
___
|
|
158
|
+
|
|
159
|
+
### getProfilePermissions
|
|
160
|
+
|
|
161
|
+
▸ `Const` **getProfilePermissions**(`profileId`): `Promise`<[`IPermission`](../interfaces/Users.Types.IPermission.md)[]\>
|
|
162
|
+
|
|
163
|
+
Get a profile's permissions. The caller must have admin access to the given profile.
|
|
164
|
+
|
|
165
|
+
```typescript
|
|
166
|
+
import {Profiles} from '@verdocs/js-sdk/Users';
|
|
167
|
+
|
|
168
|
+
const permissions = await Profiles.getProfilePermissions('PROFILEID');
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
#### Parameters
|
|
172
|
+
|
|
173
|
+
| Name | Type |
|
|
174
|
+
| :------ | :------ |
|
|
175
|
+
| `profileId` | `string` |
|
|
176
|
+
|
|
177
|
+
#### Returns
|
|
178
|
+
|
|
179
|
+
`Promise`<[`IPermission`](../interfaces/Users.Types.IPermission.md)[]\>
|
|
180
|
+
|
|
181
|
+
#### Defined in
|
|
182
|
+
|
|
183
|
+
[Users/Profiles.ts:92](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Profiles.ts#L92)
|
|
184
|
+
|
|
185
|
+
___
|
|
186
|
+
|
|
187
|
+
### getProfiles
|
|
188
|
+
|
|
189
|
+
▸ `Const` **getProfiles**(): `Promise`<[`IProfile`](../interfaces/Users.Types.IProfile.md)[]\>
|
|
190
|
+
|
|
191
|
+
Get the user's available profiles. The current profile will be marked with `current: true`.
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
import {Profiles} from '@verdocs/js-sdk/Users';
|
|
195
|
+
|
|
196
|
+
const profiles = await Profiles.getProfiles()
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
#### Returns
|
|
200
|
+
|
|
201
|
+
`Promise`<[`IProfile`](../interfaces/Users.Types.IProfile.md)[]\>
|
|
202
|
+
|
|
203
|
+
#### Defined in
|
|
204
|
+
|
|
205
|
+
[Users/Profiles.ts:21](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Profiles.ts#L21)
|
|
206
|
+
|
|
207
|
+
___
|
|
208
|
+
|
|
209
|
+
### getRoles
|
|
210
|
+
|
|
211
|
+
▸ `Const` **getRoles**(): `Promise`<[`IRole`](../interfaces/Users.Types.IRole.md)[]\>
|
|
212
|
+
|
|
213
|
+
Get a list of system roles.
|
|
214
|
+
|
|
215
|
+
```typescript
|
|
216
|
+
import {Profiles} from '@verdocs/js-sdk/Users';
|
|
217
|
+
|
|
218
|
+
const roles = await Profiles.getRoles();
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
#### Returns
|
|
222
|
+
|
|
223
|
+
`Promise`<[`IRole`](../interfaces/Users.Types.IRole.md)[]\>
|
|
224
|
+
|
|
225
|
+
#### Defined in
|
|
226
|
+
|
|
227
|
+
[Users/Profiles.ts:35](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Profiles.ts#L35)
|
|
228
|
+
|
|
229
|
+
___
|
|
230
|
+
|
|
231
|
+
### switchProfile
|
|
232
|
+
|
|
233
|
+
▸ `Const` **switchProfile**(`profileId`): `Promise`<[`ISwitchProfileResponse`](../interfaces/Users.Types.ISwitchProfileResponse.md)\>
|
|
234
|
+
|
|
235
|
+
Switch the caller's "current" profile. The current profile is used for permissions checking and profile_id field settings
|
|
236
|
+
for most operations in Verdocs. It is important to select the appropropriate profile before calling other API functions.
|
|
237
|
+
|
|
238
|
+
```typescript
|
|
239
|
+
import {Profiles} from '@verdocs/js-sdk/Users';
|
|
240
|
+
|
|
241
|
+
const newProfile = await Profiles.switchProfile('PROFILEID');
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
#### Parameters
|
|
245
|
+
|
|
246
|
+
| Name | Type |
|
|
247
|
+
| :------ | :------ |
|
|
248
|
+
| `profileId` | `string` |
|
|
249
|
+
|
|
250
|
+
#### Returns
|
|
251
|
+
|
|
252
|
+
`Promise`<[`ISwitchProfileResponse`](../interfaces/Users.Types.ISwitchProfileResponse.md)\>
|
|
253
|
+
|
|
254
|
+
#### Defined in
|
|
255
|
+
|
|
256
|
+
[Users/Profiles.ts:121](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Profiles.ts#L121)
|
|
257
|
+
|
|
258
|
+
___
|
|
259
|
+
|
|
260
|
+
### updateProfile
|
|
261
|
+
|
|
262
|
+
▸ `Const` **updateProfile**(`profileId`, `params`): `Promise`<[`IProfile`](../interfaces/Users.Types.IProfile.md)\>
|
|
263
|
+
|
|
264
|
+
Update a profile. For future expansion, the profile ID to update is required, but currently this must also be the
|
|
265
|
+
"current" profile for the caller.
|
|
266
|
+
|
|
267
|
+
```typescript
|
|
268
|
+
import {Profiles} from '@verdocs/js-sdk/Users';
|
|
269
|
+
|
|
270
|
+
const newProfile = await Profiles.updateProfile('PROFILEID');
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
#### Parameters
|
|
274
|
+
|
|
275
|
+
| Name | Type |
|
|
276
|
+
| :------ | :------ |
|
|
277
|
+
| `profileId` | `string` |
|
|
278
|
+
| `params` | [`IUpdateProfileRequest`](../interfaces/Users.Types.IUpdateProfileRequest.md) |
|
|
279
|
+
|
|
280
|
+
#### Returns
|
|
281
|
+
|
|
282
|
+
`Promise`<[`IProfile`](../interfaces/Users.Types.IProfile.md)\>
|
|
283
|
+
|
|
284
|
+
#### Defined in
|
|
285
|
+
|
|
286
|
+
[Users/Profiles.ts:136](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Profiles.ts#L136)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
[@verdocs/js-sdk - v1.0.12](../README.md) / [Exports](../modules.md) / [Users](Users.md) / Types
|
|
2
|
+
|
|
3
|
+
# Namespace: Types
|
|
4
|
+
|
|
5
|
+
[Users](Users.md).Types
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Interfaces
|
|
10
|
+
|
|
11
|
+
- [IActiveSession](../interfaces/Users.Types.IActiveSession.md)
|
|
12
|
+
- [IAuthenticateAppRequest](../interfaces/Users.Types.IAuthenticateAppRequest.md)
|
|
13
|
+
- [IAuthenticateResponse](../interfaces/Users.Types.IAuthenticateResponse.md)
|
|
14
|
+
- [IAuthenticateUserRequest](../interfaces/Users.Types.IAuthenticateUserRequest.md)
|
|
15
|
+
- [ICreateProfileRequest](../interfaces/Users.Types.ICreateProfileRequest.md)
|
|
16
|
+
- [IPermission](../interfaces/Users.Types.IPermission.md)
|
|
17
|
+
- [IProfile](../interfaces/Users.Types.IProfile.md)
|
|
18
|
+
- [IRole](../interfaces/Users.Types.IRole.md)
|
|
19
|
+
- [ISwitchProfileResponse](../interfaces/Users.Types.ISwitchProfileResponse.md)
|
|
20
|
+
- [IUpdateProfileRequest](../interfaces/Users.Types.IUpdateProfileRequest.md)
|
|
21
|
+
- [TokenValidationRequest](../interfaces/Users.Types.TokenValidationRequest.md)
|
|
22
|
+
- [TokenValidationResponse](../interfaces/Users.Types.TokenValidationResponse.md)
|
|
23
|
+
- [UpdateEmailRequest](../interfaces/Users.Types.UpdateEmailRequest.md)
|
|
24
|
+
- [UpdateEmailResponse](../interfaces/Users.Types.UpdateEmailResponse.md)
|
|
25
|
+
- [UpdatePasswordRequest](../interfaces/Users.Types.UpdatePasswordRequest.md)
|
|
26
|
+
- [UpdatePasswordResponse](../interfaces/Users.Types.UpdatePasswordResponse.md)
|
|
27
|
+
|
|
28
|
+
### Type aliases
|
|
29
|
+
|
|
30
|
+
- [TPermission](Users.Types.md#tpermission)
|
|
31
|
+
- [TPlan](Users.Types.md#tplan)
|
|
32
|
+
- [TRole](Users.Types.md#trole)
|
|
33
|
+
|
|
34
|
+
## Type aliases
|
|
35
|
+
|
|
36
|
+
### TPermission
|
|
37
|
+
|
|
38
|
+
Ƭ **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"``
|
|
39
|
+
|
|
40
|
+
#### Defined in
|
|
41
|
+
|
|
42
|
+
[Users/Types.ts:4](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Types.ts#L4)
|
|
43
|
+
|
|
44
|
+
___
|
|
45
|
+
|
|
46
|
+
### TPlan
|
|
47
|
+
|
|
48
|
+
Ƭ **TPlan**: ``"env:essential"`` \| ``"org:standard"``
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[Users/Types.ts:30](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Types.ts#L30)
|
|
53
|
+
|
|
54
|
+
___
|
|
55
|
+
|
|
56
|
+
### TRole
|
|
57
|
+
|
|
58
|
+
Ƭ **TRole**: ``"owner"`` \| ``"basic_user"`` \| ``"member"``
|
|
59
|
+
|
|
60
|
+
#### Defined in
|
|
61
|
+
|
|
62
|
+
[Users/Types.ts:32](https://github.com/Verdocs/js-sdk/blob/main/src/Users/Types.ts#L32)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
[@verdocs/js-sdk - v1.0.12](../README.md) / [Exports](../modules.md) / Users
|
|
2
|
+
|
|
3
|
+
# Namespace: Users
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Namespaces
|
|
8
|
+
|
|
9
|
+
- [Auth](Users.Auth.md)
|
|
10
|
+
- [Billing](Users.Billing.md)
|
|
11
|
+
- [Notifications](Users.Notifications.md)
|
|
12
|
+
- [Profiles](Users.Profiles.md)
|
|
13
|
+
- [Types](Users.Types.md)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[@verdocs/js-sdk - v1.0.12](../README.md) / [Exports](../modules.md) / [Utils](Utils.md) / DateTime
|
|
2
|
+
|
|
3
|
+
# Namespace: DateTime
|
|
4
|
+
|
|
5
|
+
[Utils](Utils.md).DateTime
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Functions
|
|
10
|
+
|
|
11
|
+
- [formatShortTimeAgo](Utils.DateTime.md#formatshorttimeago)
|
|
12
|
+
|
|
13
|
+
## Functions
|
|
14
|
+
|
|
15
|
+
### formatShortTimeAgo
|
|
16
|
+
|
|
17
|
+
▸ `Const` **formatShortTimeAgo**(`val`): `string`
|
|
18
|
+
|
|
19
|
+
#### Parameters
|
|
20
|
+
|
|
21
|
+
| Name | Type |
|
|
22
|
+
| :------ | :------ |
|
|
23
|
+
| `val` | `any` |
|
|
24
|
+
|
|
25
|
+
#### Returns
|
|
26
|
+
|
|
27
|
+
`string`
|
|
28
|
+
|
|
29
|
+
#### Defined in
|
|
30
|
+
|
|
31
|
+
[Utils/DateTime.ts:8](https://github.com/Verdocs/js-sdk/blob/main/src/Utils/DateTime.ts#L8)
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[@verdocs/js-sdk - v1.0.12](../README.md) / [Exports](../modules.md) / Validators
|
|
2
|
+
|
|
3
|
+
# Namespace: Validators
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Interfaces
|
|
8
|
+
|
|
9
|
+
- [IValidator](../interfaces/Validators.IValidator.md)
|
|
10
|
+
|
|
11
|
+
### Functions
|
|
12
|
+
|
|
13
|
+
- [getValidator](Validators.md#getvalidator)
|
|
14
|
+
- [getValidators](Validators.md#getvalidators)
|
|
15
|
+
|
|
16
|
+
## Functions
|
|
17
|
+
|
|
18
|
+
### getValidator
|
|
19
|
+
|
|
20
|
+
▸ `Const` **getValidator**(`validatorName`): `Promise`<[`IValidator`](../interfaces/Validators.IValidator.md)\>
|
|
21
|
+
|
|
22
|
+
#### Parameters
|
|
23
|
+
|
|
24
|
+
| Name | Type |
|
|
25
|
+
| :------ | :------ |
|
|
26
|
+
| `validatorName` | `string` |
|
|
27
|
+
|
|
28
|
+
#### Returns
|
|
29
|
+
|
|
30
|
+
`Promise`<[`IValidator`](../interfaces/Validators.IValidator.md)\>
|
|
31
|
+
|
|
32
|
+
#### Defined in
|
|
33
|
+
|
|
34
|
+
[Validators.ts:13](https://github.com/Verdocs/js-sdk/blob/main/src/Validators.ts#L13)
|
|
35
|
+
|
|
36
|
+
___
|
|
37
|
+
|
|
38
|
+
### getValidators
|
|
39
|
+
|
|
40
|
+
▸ `Const` **getValidators**(): `Promise`<[`IValidator`](../interfaces/Validators.IValidator.md)[]\>
|
|
41
|
+
|
|
42
|
+
#### Returns
|
|
43
|
+
|
|
44
|
+
`Promise`<[`IValidator`](../interfaces/Validators.IValidator.md)[]\>
|
|
45
|
+
|
|
46
|
+
#### Defined in
|
|
47
|
+
|
|
48
|
+
[Validators.ts:8](https://github.com/Verdocs/js-sdk/blob/main/src/Validators.ts#L8)
|