simple-strapi 1.0.0-alpha.20 → 1.0.0-alpha.22
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/dist/client.d.ts +4 -0
- package/dist/client.js +3 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -94,7 +94,9 @@ declare class Client {
|
|
|
94
94
|
page?: number;
|
|
95
95
|
pageSize?: number;
|
|
96
96
|
};
|
|
97
|
+
sort?: string | string[];
|
|
97
98
|
populate?: any;
|
|
99
|
+
filters?: Record<string, any>;
|
|
98
100
|
}>): Promise<{
|
|
99
101
|
data: InferSchemaWithDefaults<S>[];
|
|
100
102
|
meta: any;
|
|
@@ -104,7 +106,9 @@ declare class Client {
|
|
|
104
106
|
page?: number;
|
|
105
107
|
pageSize?: number;
|
|
106
108
|
};
|
|
109
|
+
sort?: string | string[];
|
|
107
110
|
populate?: any;
|
|
111
|
+
filters?: Record<string, any>;
|
|
108
112
|
}>): Promise<{
|
|
109
113
|
data: any[];
|
|
110
114
|
meta: any;
|
package/dist/client.js
CHANGED
|
@@ -208,6 +208,9 @@ class Client {
|
|
|
208
208
|
else if ("populate" in options) {
|
|
209
209
|
params.populate = options.populate;
|
|
210
210
|
}
|
|
211
|
+
if ("sort" in options) {
|
|
212
|
+
params.sort = options.sort;
|
|
213
|
+
}
|
|
211
214
|
const fetchPage = async (page = 1, acc = []) => {
|
|
212
215
|
params.pagination = { page, pageSize: 100 };
|
|
213
216
|
params.filters = options.filters;
|