@verdocs/js-sdk 2.0.20 → 2.0.21
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 +22 -1
- package/Templates/Templates.js +9 -6
- package/Templates/Types.d.ts +1 -1
- package/package.json +1 -1
package/Templates/Templates.d.ts
CHANGED
|
@@ -74,6 +74,27 @@ export declare const updateTemplate: (endpoint: VerdocsEndpoint, templateId: str
|
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
76
|
export declare const searchTemplates: (endpoint: VerdocsEndpoint, params: any) => Promise<ITemplatesSearchResult>;
|
|
77
|
+
export interface ISearchTimeRange {
|
|
78
|
+
start_time: string;
|
|
79
|
+
end_time: string;
|
|
80
|
+
}
|
|
81
|
+
export interface IGetTemplateSummaryParams {
|
|
82
|
+
id?: string;
|
|
83
|
+
name?: string;
|
|
84
|
+
sender?: string;
|
|
85
|
+
profile_id?: string;
|
|
86
|
+
organization_id?: string;
|
|
87
|
+
description?: string;
|
|
88
|
+
created_at?: ISearchTimeRange;
|
|
89
|
+
updated_at?: ISearchTimeRange;
|
|
90
|
+
last_used_at?: ISearchTimeRange;
|
|
91
|
+
is_personal?: boolean;
|
|
92
|
+
is_public?: boolean;
|
|
93
|
+
sort_by?: 'created_at' | 'updated_at' | 'name' | 'last_used_at' | 'counter' | 'star_counter';
|
|
94
|
+
ascending?: boolean;
|
|
95
|
+
row?: number;
|
|
96
|
+
page?: number;
|
|
97
|
+
}
|
|
77
98
|
/**
|
|
78
99
|
* Get a summary of template data, typically used to populate admin panel dashboard pages.
|
|
79
100
|
*
|
|
@@ -83,4 +104,4 @@ export declare const searchTemplates: (endpoint: VerdocsEndpoint, params: any) =
|
|
|
83
104
|
* const summary = await Templates.getSummary(0);
|
|
84
105
|
* ```
|
|
85
106
|
*/
|
|
86
|
-
export declare const getSummary: (endpoint: VerdocsEndpoint,
|
|
107
|
+
export declare const getSummary: (endpoint: VerdocsEndpoint, params?: IGetTemplateSummaryParams) => Promise<ITemplatesSummary>;
|
package/Templates/Templates.js
CHANGED
|
@@ -138,10 +138,13 @@ export var searchTemplates = function (endpoint, params) { return __awaiter(void
|
|
|
138
138
|
* const summary = await Templates.getSummary(0);
|
|
139
139
|
* ```
|
|
140
140
|
*/
|
|
141
|
-
export var getSummary = function (endpoint,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
export var getSummary = function (endpoint, params) {
|
|
142
|
+
if (params === void 0) { params = {}; }
|
|
143
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
144
|
+
return __generator(this, function (_a) {
|
|
145
|
+
return [2 /*return*/, endpoint.api //
|
|
146
|
+
.post('/templates/summary', params)
|
|
147
|
+
.then(function (r) { return r.data; })];
|
|
148
|
+
});
|
|
146
149
|
});
|
|
147
|
-
}
|
|
150
|
+
};
|
package/Templates/Types.d.ts
CHANGED