@verdocs/js-sdk 3.9.0 → 3.9.2

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.
@@ -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
- sharing?: 'all' | 'personal' | 'shared' | 'public';
205
- starred?: 'all' | 'starred' | 'unstarred';
206
- sort?: 'name' | 'created_at' | 'updated_at' | 'last_used_at' | 'counter' | 'star_counter';
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;
@@ -3,32 +3,32 @@
3
3
  *
4
4
  * @module
5
5
  */
6
- import { IEnvelope, IRecipient } from './Types';
6
+ import { IEnvelope, IEnvelopeSummary, IRecipient } from './Types';
7
7
  import { TSession } from '../Sessions/Types';
8
8
  /**
9
9
  * Check to see if the user owns the envelope.
10
10
  */
11
- export declare const userIsEnvelopeOwner: (session: TSession, envelope: IEnvelope) => boolean;
11
+ export declare const userIsEnvelopeOwner: (session: TSession, envelope: IEnvelope | IEnvelopeSummary) => boolean;
12
12
  /**
13
13
  * Check to see if the user owns the envelope.
14
14
  */
15
- export declare const userIsEnvelopeRecipient: (session: TSession, envelope: IEnvelope) => boolean;
15
+ export declare const userIsEnvelopeRecipient: (session: TSession, envelope: IEnvelope | IEnvelopeSummary) => boolean;
16
16
  /**
17
17
  * Check to see if the envelope has pending actions.
18
18
  */
19
- export declare const envelopeIsActive: (envelope: IEnvelope) => boolean;
19
+ export declare const envelopeIsActive: (envelope: IEnvelope | IEnvelopeSummary) => boolean;
20
20
  /**
21
21
  * Check to see if the envelope has been completed.
22
22
  */
23
- export declare const envelopeIsComplete: (envelope: IEnvelope) => boolean;
23
+ export declare const envelopeIsComplete: (envelope: IEnvelope | IEnvelopeSummary) => boolean;
24
24
  /**
25
25
  * Check to see if the user owns the envelope.
26
26
  */
27
- export declare const userCanCancelEnvelope: (session: TSession, envelope: IEnvelope) => boolean;
27
+ export declare const userCanCancelEnvelope: (session: TSession, envelope: IEnvelope | IEnvelopeSummary) => boolean;
28
28
  /**
29
29
  * Check to see if the user owns the envelope.
30
30
  */
31
- export declare const userCanFinishEnvelope: (session: TSession, envelope: IEnvelope) => boolean;
31
+ export declare const userCanFinishEnvelope: (session: TSession, envelope: IEnvelope | IEnvelopeSummary) => boolean;
32
32
  /**
33
33
  * Returns true if the recipient has a pending action. Note that this does not necessarily mean the recipient can act (yet).
34
34
  */
@@ -36,7 +36,7 @@ export declare const recipientHasAction: (recipient: IRecipient) => boolean;
36
36
  /**
37
37
  * Returns the recipients who still have a pending action. Note that not all of these recipients may be able to act (yet).
38
38
  */
39
- export declare const getRecipientsWithActions: (envelope: IEnvelope) => IRecipient[];
39
+ export declare const getRecipientsWithActions: (envelope: IEnvelope | IEnvelopeSummary) => IRecipient[];
40
40
  /**
41
41
  * Returns true if the recipient can act.
42
42
  */
@@ -48,5 +48,5 @@ export declare const userCanAct: (email: string, recipientsWithActions: IRecipie
48
48
  /**
49
49
  * Returns true if the user can act.
50
50
  */
51
- export declare const userCanSignNow: (session: TSession, envelope: IEnvelope) => boolean | undefined;
52
- export declare const getNextRecipient: (envelope: IEnvelope) => IRecipient;
51
+ export declare const userCanSignNow: (session: TSession, envelope: IEnvelope | IEnvelopeSummary) => boolean | undefined;
52
+ export declare const getNextRecipient: (envelope: IEnvelope | IEnvelopeSummary) => IRecipient;
@@ -7,11 +7,15 @@ import { EnvelopeStates } from './Types';
7
7
  /**
8
8
  * Check to see if the user owns the envelope.
9
9
  */
10
- export var userIsEnvelopeOwner = function (session, envelope) { return envelope.profile_id === (session === null || session === void 0 ? void 0 : session.profile_id); };
10
+ export var userIsEnvelopeOwner = function (session, envelope) {
11
+ return envelope.profile_id === (session === null || session === void 0 ? void 0 : session.profile_id);
12
+ };
11
13
  /**
12
14
  * Check to see if the user owns the envelope.
13
15
  */
14
- export var userIsEnvelopeRecipient = function (session, envelope) { return envelope.profile_id === (session === null || session === void 0 ? void 0 : session.profile_id); };
16
+ export var userIsEnvelopeRecipient = function (session, envelope) {
17
+ return envelope.profile_id === (session === null || session === void 0 ? void 0 : session.profile_id);
18
+ };
15
19
  /**
16
20
  * Check to see if the envelope has pending actions.
17
21
  */
@@ -31,7 +35,6 @@ export var userCanCancelEnvelope = function (session, envelope) {
31
35
  envelope.status !== EnvelopeStates.DECLINED &&
32
36
  envelope.status !== EnvelopeStates.CANCELED;
33
37
  };
34
- // export type TEnvelopeStatus = 'complete' | 'pending' | 'in progress' | 'declined' | 'canceled';
35
38
  /**
36
39
  * Check to see if the user owns the envelope.
37
40
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "3.9.0",
3
+ "version": "3.9.2",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",