@verdocs/js-sdk 3.10.0 → 3.10.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.
- package/Envelopes/Envelopes.d.ts +5 -1
- package/Envelopes/Envelopes.js +11 -1
- package/Templates/Templates.d.ts +39 -1
- package/Templates/Templates.js +9 -0
- package/package.json +1 -1
package/Envelopes/Envelopes.d.ts
CHANGED
|
@@ -141,9 +141,13 @@ export declare const getEnvelopeRecipients: (endpoint: VerdocsEndpoint, envelope
|
|
|
141
141
|
*/
|
|
142
142
|
export declare const getEnvelope: (endpoint: VerdocsEndpoint, envelopeId: string) => Promise<IEnvelope>;
|
|
143
143
|
/**
|
|
144
|
-
* Get
|
|
144
|
+
* Get an Envelope Document
|
|
145
145
|
*/
|
|
146
146
|
export declare const getEnvelopeDocument: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<IEnvelopeDocument>;
|
|
147
|
+
/**
|
|
148
|
+
* Get a (temporary) pre-signed download link for and Envelope Document
|
|
149
|
+
*/
|
|
150
|
+
export declare const getEnvelopeDocumentLink: (endpoint: VerdocsEndpoint, envelopeId: string, documentId: string) => Promise<IEnvelopeDocument>;
|
|
147
151
|
/**
|
|
148
152
|
* Cancel an Envelope.
|
|
149
153
|
*/
|
package/Envelopes/Envelopes.js
CHANGED
|
@@ -144,7 +144,7 @@ export var getEnvelope = function (endpoint, envelopeId) { return __awaiter(void
|
|
|
144
144
|
});
|
|
145
145
|
}); };
|
|
146
146
|
/**
|
|
147
|
-
* Get
|
|
147
|
+
* Get an Envelope Document
|
|
148
148
|
*/
|
|
149
149
|
export var getEnvelopeDocument = function (endpoint, envelopeId, documentId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
150
150
|
return __generator(this, function (_a) {
|
|
@@ -153,6 +153,16 @@ export var getEnvelopeDocument = function (endpoint, envelopeId, documentId) { r
|
|
|
153
153
|
.then(function (r) { return r.data; })];
|
|
154
154
|
});
|
|
155
155
|
}); };
|
|
156
|
+
/**
|
|
157
|
+
* Get a (temporary) pre-signed download link for and Envelope Document
|
|
158
|
+
*/
|
|
159
|
+
export var getEnvelopeDocumentLink = function (endpoint, envelopeId, documentId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
160
|
+
return __generator(this, function (_a) {
|
|
161
|
+
return [2 /*return*/, endpoint.api //
|
|
162
|
+
.get("/envelopes/".concat(envelopeId, "/envelope_documents/").concat(documentId, "?link=true"))
|
|
163
|
+
.then(function (r) { return r.data; })];
|
|
164
|
+
});
|
|
165
|
+
}); };
|
|
156
166
|
/**
|
|
157
167
|
* Cancel an Envelope.
|
|
158
168
|
*/
|
package/Templates/Templates.d.ts
CHANGED
|
@@ -147,6 +147,43 @@ export declare const updateTemplate: (endpoint: VerdocsEndpoint, templateId: str
|
|
|
147
147
|
* ```
|
|
148
148
|
*/
|
|
149
149
|
export declare const deleteTemplate: (endpoint: VerdocsEndpoint, templateId: string) => Promise<any>;
|
|
150
|
+
export interface ITimePeriod {
|
|
151
|
+
start_time: string;
|
|
152
|
+
end_time: string;
|
|
153
|
+
}
|
|
154
|
+
declare enum SortOptions {
|
|
155
|
+
CREATED_AT = "created_at",
|
|
156
|
+
UPDATED_AT = "updated_at",
|
|
157
|
+
NAME = "name",
|
|
158
|
+
LAST_USED_AT = "last_used_at",
|
|
159
|
+
COUNTER = "counter",
|
|
160
|
+
STAR_COUNTER = "star_counter"
|
|
161
|
+
}
|
|
162
|
+
export interface ITemplateSearchParams {
|
|
163
|
+
id?: string;
|
|
164
|
+
name?: string;
|
|
165
|
+
sender?: string;
|
|
166
|
+
description?: string;
|
|
167
|
+
profile_id?: string;
|
|
168
|
+
organization_id?: string;
|
|
169
|
+
updated_at?: ITimePeriod;
|
|
170
|
+
created_at?: ITimePeriod;
|
|
171
|
+
last_used_at?: ITimePeriod;
|
|
172
|
+
is_personal?: boolean;
|
|
173
|
+
is_public?: boolean;
|
|
174
|
+
tags?: string[];
|
|
175
|
+
document_name?: string;
|
|
176
|
+
sort_by?: SortOptions;
|
|
177
|
+
ascending?: boolean;
|
|
178
|
+
row?: number;
|
|
179
|
+
page?: number;
|
|
180
|
+
}
|
|
181
|
+
export interface ITemplateSearchResult {
|
|
182
|
+
page: number;
|
|
183
|
+
row: number;
|
|
184
|
+
total: number;
|
|
185
|
+
result: ITemplate[];
|
|
186
|
+
}
|
|
150
187
|
/**
|
|
151
188
|
* Search for templates matching various criteria.
|
|
152
189
|
*
|
|
@@ -156,7 +193,7 @@ export declare const deleteTemplate: (endpoint: VerdocsEndpoint, templateId: str
|
|
|
156
193
|
* const {result, page, total} = await Templates.search((VerdocsEndpoint.getDefault(), { ... });
|
|
157
194
|
* ```
|
|
158
195
|
*/
|
|
159
|
-
export declare const searchTemplates: (endpoint: VerdocsEndpoint, params:
|
|
196
|
+
export declare const searchTemplates: (endpoint: VerdocsEndpoint, params: ITemplateSearchParams) => Promise<ITemplateSearchResult>;
|
|
160
197
|
export interface ISearchTimeRange {
|
|
161
198
|
start_time: string;
|
|
162
199
|
end_time: string;
|
|
@@ -196,3 +233,4 @@ export declare const getSummary: (endpoint: VerdocsEndpoint, params?: IGetTempla
|
|
|
196
233
|
* to avoid unnecessary repeat server calls.
|
|
197
234
|
*/
|
|
198
235
|
export declare const throttledGetTemplate: (endpoint: VerdocsEndpoint, templateId: string) => ITemplate | Promise<ITemplate>;
|
|
236
|
+
export {};
|
package/Templates/Templates.js
CHANGED
|
@@ -173,6 +173,15 @@ export var deleteTemplate = function (endpoint, templateId) {
|
|
|
173
173
|
.delete("/templates/".concat(templateId))
|
|
174
174
|
.then(function (r) { return r.data; });
|
|
175
175
|
};
|
|
176
|
+
var SortOptions;
|
|
177
|
+
(function (SortOptions) {
|
|
178
|
+
SortOptions["CREATED_AT"] = "created_at";
|
|
179
|
+
SortOptions["UPDATED_AT"] = "updated_at";
|
|
180
|
+
SortOptions["NAME"] = "name";
|
|
181
|
+
SortOptions["LAST_USED_AT"] = "last_used_at";
|
|
182
|
+
SortOptions["COUNTER"] = "counter";
|
|
183
|
+
SortOptions["STAR_COUNTER"] = "star_counter";
|
|
184
|
+
})(SortOptions || (SortOptions = {}));
|
|
176
185
|
/**
|
|
177
186
|
* Search for templates matching various criteria.
|
|
178
187
|
*
|