@verdocs/js-sdk 3.10.13 → 3.10.15

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.
@@ -1,5 +1,5 @@
1
1
  import { VerdocsEndpoint } from '../VerdocsEndpoint';
2
- import { IProfile } from '../Users/Types';
2
+ import { IProfile, IRole } from '../Users/Types';
3
3
  /**
4
4
  * An Organization Member (aka Profile) is an individual user with access to an organization.
5
5
  *
@@ -7,6 +7,6 @@ import { IProfile } from '../Users/Types';
7
7
  */
8
8
  export declare const getMembers: (endpoint: VerdocsEndpoint, organizationId: string) => Promise<IProfile[]>;
9
9
  export declare const deleteMember: (endpoint: VerdocsEndpoint, organizationId: string, profileId: string) => Promise<any>;
10
- export declare const addMemberRole: (endpoint: VerdocsEndpoint, organizationId: string, profileId: string, roleId: string) => Promise<any>;
10
+ export declare const addMemberRole: (endpoint: VerdocsEndpoint, organizationId: string, profileId: string, roleId: string) => Promise<IRole>;
11
11
  export declare const deleteMemberRole: (endpoint: VerdocsEndpoint, organizationId: string, profileId: string, roleId: string) => Promise<any>;
12
12
  export declare const getMemberPlans: (endpoint: VerdocsEndpoint, organizationId: string, profileId: string) => Promise<any>;
@@ -15,12 +15,12 @@ export var deleteMember = function (endpoint, organizationId, profileId) {
15
15
  };
16
16
  export var addMemberRole = function (endpoint, organizationId, profileId, roleId) {
17
17
  return endpoint.api //
18
- .post("/organizations/".concat(organizationId, "/profiles/").concat(profileId, "/roles/").concat(roleId))
18
+ .post("/organizations/".concat(organizationId, "/profiles/").concat(profileId, "/role/").concat(roleId))
19
19
  .then(function (r) { return r.data; });
20
20
  };
21
21
  export var deleteMemberRole = function (endpoint, organizationId, profileId, roleId) {
22
22
  return endpoint.api //
23
- .delete("/organizations/".concat(organizationId, "/profiles/").concat(profileId, "/roles/").concat(roleId))
23
+ .delete("/organizations/".concat(organizationId, "/profiles/").concat(profileId, "/role/").concat(roleId))
24
24
  .then(function (r) { return r.data; });
25
25
  };
26
26
  export var getMemberPlans = function (endpoint, organizationId, profileId) {
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.13",
3
+ "version": "3.10.15",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",