@verdocs/js-sdk 3.0.39 → 3.1.1

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,4 +1,4 @@
1
- import { IEnvelope, IEnvelopesSummary, IRecipient, ISigningSession, TEnvelopeUpdateResult, IDocumentFieldSettings, IEnvelopeDocument } from './Types';
1
+ import { IEnvelope, IEnvelopesSummary, IRecipient, ISigningSession, TEnvelopeUpdateResult, IDocumentFieldSettings, IEnvelopeDocument, TEnvelopeStatus, TRecipientStatus } from './Types';
2
2
  import { ICreateEnvelopeRole, IEnvelopesSearchResult, ISigningSessionRequest } from './Types';
3
3
  import { VerdocsEndpoint } from '../VerdocsEndpoint';
4
4
  export interface ICreateEnvelopeRequest {
@@ -50,6 +50,61 @@ export declare const createEnvelope: (endpoint: VerdocsEndpoint, request: ICreat
50
50
  * ```
51
51
  */
52
52
  export declare const getSummary: (endpoint: VerdocsEndpoint, page: number) => Promise<IEnvelopesSummary>;
53
+ export interface IEnvelopeSearchParams {
54
+ /** The envelope must have been created via the specified template ID. */
55
+ template_id?: string;
56
+ /** The envelope must match one of the specified statuses. */
57
+ envelope_status?: TEnvelopeStatus[];
58
+ /** At least one of the recipients must match one of the specified statuses. */
59
+ recipient_status?: TRecipientStatus[];
60
+ /** The envelope's name (inherited from the template) must match the specified string. */
61
+ envelope_name?: string;
62
+ /** At least one of the envelope's recipients must match the specified name. */
63
+ recipient_name?: string;
64
+ /** At least one of the envelope's recipients must match the specified email address. */
65
+ recipient_email?: string;
66
+ /** At least one of the envelope's recipients must match the specified ID. */
67
+ recipient_id?: string;
68
+ /** The date-range in which the envelope was created. Values should be specified in ISO8601 "UTC" format. */
69
+ created_at: {
70
+ start_time: string;
71
+ end_time: string;
72
+ };
73
+ /**
74
+ * The date-range in which the envelope was last updated. Values should be specified in ISO8601 "UTC" format.
75
+ * Note that any operations that alter the envelope are considered "updates", including status changes (cancellation),
76
+ * recipient actions (opening/signing), etc.
77
+ */
78
+ updated_at: {
79
+ start_time: string;
80
+ end_time: string;
81
+ };
82
+ /** The date-range in which the envelope was canceled. Values should be specified in ISO8601 "UTC" format. */
83
+ canceled_at: {
84
+ start_time: string;
85
+ end_time: string;
86
+ };
87
+ /** Perform a "contains" search where any of the attached documents' fields contains the specified value. */
88
+ text_field_value?: string;
89
+ /** Set to true to retrieve only summary records (IEnvelopeSummary). */
90
+ summary?: boolean;
91
+ /** Set to true to retrieve only those envelopes owned by the caller. */
92
+ is_owner?: boolean;
93
+ /** Set to true to retrieve only those envelopes in which the caller is one of the recipients. */
94
+ is_recipient?: boolean;
95
+ /** Whether the recipient has "claimed" the envelope. */
96
+ recipient_claimed?: boolean;
97
+ /** @deprecated. Use `limit`. */
98
+ row?: number;
99
+ /** The maximum number of records to return. Should be used in place of `row`. */
100
+ limit?: number;
101
+ /** The page number to return. Page numbers are 0-based. */
102
+ page?: number;
103
+ /** The field to sort the results by. */
104
+ sort_by?: 'created_at' | 'updated_at' | 'envelope_name' | 'canceled_at' | 'envelope_status';
105
+ /** Whether to sort in ascending (default) or descending order. */
106
+ ascending?: boolean;
107
+ }
53
108
  /**
54
109
  * Search for envelopes matching various criteria.
55
110
  *
@@ -59,7 +114,7 @@ export declare const getSummary: (endpoint: VerdocsEndpoint, page: number) => Pr
59
114
  * const {result, page, total} = await Envelopes.search(VerdocsEndpoint.getDefault(), { ... });
60
115
  * ```
61
116
  */
62
- export declare const searchEnvelopes: (endpoint: VerdocsEndpoint, params: any) => Promise<IEnvelopesSearchResult>;
117
+ export declare const searchEnvelopes: (endpoint: VerdocsEndpoint, params: IEnvelopeSearchParams) => Promise<IEnvelopesSearchResult>;
63
118
  export interface ISigningSessionResult {
64
119
  recipient: IRecipient;
65
120
  session: ISigningSession;
@@ -132,3 +187,9 @@ export declare const getFieldAttachment: (endpoint: VerdocsEndpoint, envelopeId:
132
187
  * @deprecated
133
188
  */
134
189
  export declare const getEnvelopesByTemplateId: (endpoint: VerdocsEndpoint, templateId: string) => Promise<IEnvelope[]>;
190
+ /**
191
+ * Get a display URI for a given page in a file attached to an envelope document. These pages are rendered server-side
192
+ * into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
193
+ * for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants.
194
+ */
195
+ export declare const getEnvelopeDocumentPageDisplayUri: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string, page: number) => Promise<string>;
@@ -250,3 +250,11 @@ export var getEnvelopesByTemplateId = function (endpoint, templateId) { return _
250
250
  .then(function (r) { return r.data; })];
251
251
  });
252
252
  }); };
253
+ /**
254
+ * Get a display URI for a given page in a file attached to an envelope document. These pages are rendered server-side
255
+ * into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
256
+ * for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants.
257
+ */
258
+ export var getEnvelopeDocumentPageDisplayUri = function (endpoint, envelopeId, documentId, page) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
259
+ return [2 /*return*/, endpoint.api.get("/envelopes/".concat(envelopeId, "/envelope_documents/").concat(documentId, "/pages/").concat(page, "/image")).then(function (r) { return r.data; })];
260
+ }); }); };
@@ -59,8 +59,8 @@ export declare const getTemplateDocumentFile: (endpoint: VerdocsEndpoint, templa
59
59
  export declare const getTemplateDocumentThumbnail: (endpoint: VerdocsEndpoint, templateId: string, documentId: string) => Promise<any>;
60
60
  /**
61
61
  * Get a display URI for a given page in a file attached to a template document. These pages are rendered server-side
62
- * into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are
63
- * intended for DISPLAY ONLY, and do not contain any encoded metadata from participants. The original asset may be
64
- * obtained by calling `getTemplateDocumentFile()` or similar.
62
+ * into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
63
+ * for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants. The
64
+ * original asset may be obtained by calling `getTemplateDocumentFile()` or similar.
65
65
  */
66
66
  export declare const getTemplateDocumentPageDisplayUri: (endpoint: VerdocsEndpoint, templateId: string, documentId: string, page: number) => Promise<string>;
@@ -130,9 +130,9 @@ export var getTemplateDocumentThumbnail = function (endpoint, templateId, docume
130
130
  }); };
131
131
  /**
132
132
  * Get a display URI for a given page in a file attached to a template document. These pages are rendered server-side
133
- * into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are
134
- * intended for DISPLAY ONLY, and do not contain any encoded metadata from participants. The original asset may be
135
- * obtained by calling `getTemplateDocumentFile()` or similar.
133
+ * into PNG resources suitable for display in IMG tags although they may be used elsewhere. Note that these are intended
134
+ * for DISPLAY ONLY, are not legally binding documents, and do not contain any encoded metadata from participants. The
135
+ * original asset may be obtained by calling `getTemplateDocumentFile()` or similar.
136
136
  */
137
137
  export var getTemplateDocumentPageDisplayUri = function (endpoint, templateId, documentId, page) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
138
138
  return [2 /*return*/, endpoint.api.get("/templates/".concat(templateId, "/documents/").concat(documentId, "/pages/").concat(page, "/image")).then(function (r) { return r.data; })];
@@ -266,9 +266,19 @@ export interface ITemplateField {
266
266
  validator?: string;
267
267
  label?: string;
268
268
  }
269
- export interface ITemplateFieldSetting {
269
+ export interface ITextFieldSetting {
270
270
  x: number;
271
271
  y: number;
272
+ width: number;
273
+ height: number;
274
+ result: string;
275
+ leading: number;
276
+ alignment: number;
277
+ upperCase: boolean;
278
+ }
279
+ export interface ITemplateFieldSetting {
280
+ x?: number;
281
+ y?: number;
272
282
  result?: string;
273
283
  width?: number;
274
284
  height?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "3.0.39",
3
+ "version": "3.1.1",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",
@@ -46,21 +46,21 @@
46
46
  "access": "public"
47
47
  },
48
48
  "dependencies": {
49
- "axios": "^1.3.3"
49
+ "axios": "^1.3.4"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "typescript": "^4.7.3"
53
53
  },
54
54
  "devDependencies": {
55
- "@jest/globals": "^29.4.1",
55
+ "@jest/globals": "^29.5.0",
56
56
  "@types/jest": "^29.4.0",
57
57
  "axios-mock-adapter": "^1.21.2",
58
- "jest": "^29.4.1",
59
- "prettier": "^2.8.3",
58
+ "jest": "^29.5.0",
59
+ "prettier": "^2.8.4",
60
60
  "ts-jest": "^29.0.5",
61
61
  "tslint": "^6.1.3",
62
62
  "tslint-config-prettier": "^1.18.0",
63
- "typedoc": "^0.23.25",
63
+ "typedoc": "^0.23.26",
64
64
  "typedoc-plugin-markdown": "^3.14.0",
65
65
  "typescript": "^4.9.5"
66
66
  }