@verdocs/js-sdk 3.10.0 → 3.10.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.
- package/Templates/Templates.d.ts +39 -1
- package/Templates/Templates.js +9 -0
- package/package.json +1 -1
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
|
*
|