@verdocs/js-sdk 3.9.1 → 3.9.3
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/Envelopes/Envelopes.d.ts +18 -3
- package/Users/Auth.d.ts +19 -2
- package/Users/Auth.js +17 -0
- package/Users/Types.d.ts +1 -1
- package/package.json +1 -1
package/Envelopes/Envelopes.d.ts
CHANGED
|
@@ -199,11 +199,26 @@ export declare const getEnvelopeDocumentPageDisplayUri: (endpoint: VerdocsEndpoi
|
|
|
199
199
|
* to avoid unnecessary repeat server calls.
|
|
200
200
|
*/
|
|
201
201
|
export declare const throttledGetEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) => IEnvelope | Promise<IEnvelope>;
|
|
202
|
+
export interface ITimeRange {
|
|
203
|
+
start: string;
|
|
204
|
+
end: string;
|
|
205
|
+
}
|
|
202
206
|
export interface IListEnvelopesParams {
|
|
207
|
+
match?: string;
|
|
203
208
|
name?: string;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
209
|
+
recipient_name?: string;
|
|
210
|
+
field_value?: string;
|
|
211
|
+
visibility?: 'private' | 'shared';
|
|
212
|
+
status?: ('pending' | 'in progress' | 'complete' | 'declined' | 'canceled')[];
|
|
213
|
+
recipient_status?: ('pending' | 'invited' | 'declined' | 'opened' | 'signed' | 'submitted' | 'canceled')[];
|
|
214
|
+
recipient_id?: string;
|
|
215
|
+
updated_at?: ITimeRange;
|
|
216
|
+
canceled_at?: ITimeRange;
|
|
217
|
+
created_at?: ITimeRange;
|
|
218
|
+
is_owner?: boolean;
|
|
219
|
+
is_recipient?: boolean;
|
|
220
|
+
template_id?: string;
|
|
221
|
+
sort?: 'name' | 'created_at' | 'updated_at' | 'canceled_at' | 'status';
|
|
207
222
|
direction?: 'asc' | 'desc';
|
|
208
223
|
page?: number;
|
|
209
224
|
rows?: number;
|
package/Users/Auth.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IAuthenticateAppRequest, IAuthenticateUserRequest } from './Types';
|
|
2
|
-
import { TokenValidationRequest, UpdateEmailRequest,
|
|
2
|
+
import { TokenValidationRequest, UpdateEmailRequest, IUpdatePasswordRequest } from './Types';
|
|
3
3
|
import { IAuthenticateResponse, TokenValidationResponse, UpdateEmailResponse, UpdatePasswordResponse } from './Types';
|
|
4
4
|
import { VerdocsEndpoint } from '../VerdocsEndpoint';
|
|
5
5
|
/**
|
|
@@ -69,7 +69,24 @@ export declare const refreshTokens: (endpoint: VerdocsEndpoint) => Promise<IAuth
|
|
|
69
69
|
* }
|
|
70
70
|
* ```
|
|
71
71
|
*/
|
|
72
|
-
export declare const updatePassword: (endpoint: VerdocsEndpoint, params:
|
|
72
|
+
export declare const updatePassword: (endpoint: VerdocsEndpoint, params: IUpdatePasswordRequest) => Promise<UpdatePasswordResponse>;
|
|
73
|
+
/**
|
|
74
|
+
* Reset the caller's password.
|
|
75
|
+
*
|
|
76
|
+
* ```typescript
|
|
77
|
+
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
78
|
+
*
|
|
79
|
+
* const {success} = await Auth.resetPassword({ email });
|
|
80
|
+
* if (status !== 'OK') {
|
|
81
|
+
* window.alert(`Please check your email for instructions on how to reset your password.`);
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export declare const resetPassword: (endpoint: VerdocsEndpoint, params: {
|
|
86
|
+
email: string;
|
|
87
|
+
}) => Promise<{
|
|
88
|
+
success: boolean;
|
|
89
|
+
}>;
|
|
73
90
|
/**
|
|
74
91
|
* Update the caller's email address.
|
|
75
92
|
*
|
package/Users/Auth.js
CHANGED
|
@@ -86,6 +86,23 @@ export var updatePassword = function (endpoint, params) {
|
|
|
86
86
|
.put('/user/update_password', params)
|
|
87
87
|
.then(function (r) { return r.data; });
|
|
88
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* Reset the caller's password.
|
|
91
|
+
*
|
|
92
|
+
* ```typescript
|
|
93
|
+
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
94
|
+
*
|
|
95
|
+
* const {success} = await Auth.resetPassword({ email });
|
|
96
|
+
* if (status !== 'OK') {
|
|
97
|
+
* window.alert(`Please check your email for instructions on how to reset your password.`);
|
|
98
|
+
* }
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
export var resetPassword = function (endpoint, params) {
|
|
102
|
+
return endpoint.api //
|
|
103
|
+
.put('/user/reset_password', params)
|
|
104
|
+
.then(function (r) { return r.data; });
|
|
105
|
+
};
|
|
89
106
|
/**
|
|
90
107
|
* Update the caller's email address.
|
|
91
108
|
*
|
package/Users/Types.d.ts
CHANGED
|
@@ -128,7 +128,7 @@ export interface TokenValidationResponse {
|
|
|
128
128
|
/** The decoded and validated body of the JWT */
|
|
129
129
|
payload: any;
|
|
130
130
|
}
|
|
131
|
-
export interface
|
|
131
|
+
export interface IUpdatePasswordRequest {
|
|
132
132
|
email: string;
|
|
133
133
|
oldPassword: string;
|
|
134
134
|
newPassword: string;
|