@verdocs/js-sdk 3.10.12 → 3.10.14

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.
@@ -16,6 +16,7 @@ export declare const createInvitation: (endpoint: VerdocsEndpoint, organizationI
16
16
  export declare const deleteInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string) => Promise<any>;
17
17
  export declare const updateInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, params: Partial<ICreateInvitationRequest>) => Promise<IInvitation>;
18
18
  export declare const resendInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string) => Promise<any>;
19
+ export declare const getInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<IInvitation>;
19
20
  export declare const acceptInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<IProfile>;
20
21
  export declare const declineInvitation: (endpoint: VerdocsEndpoint, organizationId: string, email: string, token: string) => Promise<{
21
22
  status: 'OK';
@@ -23,6 +23,11 @@ export var resendInvitation = function (endpoint, organizationId, email) {
23
23
  .post("/organizations/".concat(organizationId, "/invitation/").concat(email, "/resend"))
24
24
  .then(function (r) { return r.data; });
25
25
  };
26
+ export var getInvitation = function (endpoint, organizationId, email, token) {
27
+ return endpoint.api //
28
+ .get("/organizations/".concat(organizationId, "/invitation/").concat(email, "/accept/").concat(token))
29
+ .then(function (r) { return r.data; });
30
+ };
26
31
  export var acceptInvitation = function (endpoint, organizationId, email, token) {
27
32
  return endpoint.api //
28
33
  .post("/organizations/".concat(organizationId, "/invitation/").concat(email, "/accept/").concat(token))
@@ -100,4 +100,5 @@ export interface IInvitation {
100
100
  generated_at: string;
101
101
  role_id: string;
102
102
  status: 'pending';
103
+ organization?: IOrganization;
103
104
  }
package/Users/Auth.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { IAuthenticateAppRequest, IAuthenticateUserRequest } from './Types';
1
+ import { IAuthenticateAppRequest, IAuthenticateUserRequest, IProfile } from './Types';
2
2
  import { TokenValidationRequest, UpdateEmailRequest, IUpdatePasswordRequest } from './Types';
3
3
  import { IAuthenticateResponse, TokenValidationResponse, UpdateEmailResponse, UpdatePasswordResponse } from './Types';
4
4
  import { VerdocsEndpoint } from '../VerdocsEndpoint';
@@ -113,3 +113,11 @@ export declare const updateEmail: (endpoint: VerdocsEndpoint, params: UpdateEmai
113
113
  export declare const resendVerification: (endpoint: VerdocsEndpoint, accessToken?: string) => Promise<{
114
114
  result: 'done';
115
115
  }>;
116
+ export interface ICreateUserRequest {
117
+ firstName: string;
118
+ lastName: string;
119
+ email: string;
120
+ password: string;
121
+ fromInviteCode: string;
122
+ }
123
+ export declare const createUser: (endpoint: VerdocsEndpoint, params: ICreateUserRequest) => Promise<IProfile>;
package/Users/Auth.js CHANGED
@@ -135,3 +135,8 @@ export var resendVerification = function (endpoint, accessToken) {
135
135
  .post('/user/email_verification', {}, accessToken ? { headers: { Authorization: "Bearer ".concat(accessToken) } } : {})
136
136
  .then(function (r) { return r.data; });
137
137
  };
138
+ export var createUser = function (endpoint, params) {
139
+ return endpoint.api //
140
+ .post('/user', params)
141
+ .then(function (r) { return r.data; });
142
+ };
@@ -120,13 +120,6 @@ export interface ICreateBusinessAccountRequest {
120
120
  firstName: string;
121
121
  lastName: string;
122
122
  orgName: string;
123
- industry?: string;
124
- size?: string;
125
- source?: string;
126
- referral?: string;
127
- coupon?: string;
128
- reason?: string;
129
- hearabout?: string;
130
123
  }
131
124
  /**
132
125
  * Create a user account and parent organization. This endpoint is for creating a new organization. Users joining an
@@ -144,3 +137,15 @@ export declare const createBusinessAccount: (endpoint: VerdocsEndpoint, params:
144
137
  profile: IProfile;
145
138
  organization: IOrganization;
146
139
  }>;
140
+ export interface ISignupSurvey {
141
+ industry?: string;
142
+ size?: string;
143
+ source?: string;
144
+ referral?: string;
145
+ coupon?: string;
146
+ reason?: string;
147
+ hearabout?: string;
148
+ }
149
+ export declare const recordSignupSurvey: (endpoint: VerdocsEndpoint, params: ISignupSurvey) => Promise<{
150
+ status: 'OK';
151
+ }>;
package/Users/Profiles.js CHANGED
@@ -172,3 +172,8 @@ export var createBusinessAccount = function (endpoint, params) {
172
172
  .post('/user/business', params)
173
173
  .then(function (r) { return r.data; });
174
174
  };
175
+ export var recordSignupSurvey = function (endpoint, params) {
176
+ return endpoint.api //
177
+ .post('/user/signup', params)
178
+ .then(function (r) { return r.data; });
179
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "3.10.12",
3
+ "version": "3.10.14",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",