@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.
@@ -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, page: number) => Promise<ITemplatesSummary>;
107
+ export declare const getSummary: (endpoint: VerdocsEndpoint, params?: IGetTemplateSummaryParams) => Promise<ITemplatesSummary>;
@@ -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, page) { return __awaiter(void 0, void 0, void 0, function () {
142
- return __generator(this, function (_a) {
143
- return [2 /*return*/, endpoint.api //
144
- .post('/templates/summary', { page: page })
145
- .then(function (r) { return r.data; })];
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
+ };
@@ -6,7 +6,7 @@ export interface ITemplate {
6
6
  counter?: number;
7
7
  star_counter?: number;
8
8
  name: string;
9
- id?: string;
9
+ id: string;
10
10
  profile_id?: string;
11
11
  created_at?: string;
12
12
  updated_at?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/js-sdk",
3
- "version": "2.0.20",
3
+ "version": "2.0.21",
4
4
  "private": false,
5
5
  "homepage": "https://github.com/Verdocs/js-sdk",
6
6
  "description": "Verdocs JS SDK",