simple-strapi 1.0.0-alpha.21 → 1.0.0-alpha.23

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 CHANGED
@@ -94,6 +94,7 @@ declare class Client {
94
94
  page?: number;
95
95
  pageSize?: number;
96
96
  };
97
+ sort?: string | string[];
97
98
  populate?: any;
98
99
  filters?: Record<string, any>;
99
100
  }>): Promise<{
@@ -105,6 +106,7 @@ declare class Client {
105
106
  page?: number;
106
107
  pageSize?: number;
107
108
  };
109
+ sort?: string | string[];
108
110
  populate?: any;
109
111
  filters?: Record<string, any>;
110
112
  }>): Promise<{
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;
@@ -6,7 +6,7 @@ export declare const zodMediaSchema: z.ZodObject<{
6
6
  caption: z.ZodNullable<z.ZodString>;
7
7
  width: z.ZodNullable<z.ZodNumber>;
8
8
  height: z.ZodNullable<z.ZodNumber>;
9
- formats: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
9
+ formats: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
10
10
  name: z.ZodString;
11
11
  hash: z.ZodOptional<z.ZodString>;
12
12
  ext: z.ZodOptional<z.ZodString>;
@@ -16,7 +16,7 @@ export declare const zodMediaSchema: z.ZodObject<{
16
16
  url: z.ZodString;
17
17
  width: z.ZodNumber;
18
18
  height: z.ZodNumber;
19
- }, z.core.$strip>>>;
19
+ }, z.core.$strip>>>>;
20
20
  hash: z.ZodString;
21
21
  ext: z.ZodString;
22
22
  mime: z.ZodString;
@@ -18,6 +18,7 @@ export const zodMediaSchema = z.object({
18
18
  width: z.number(),
19
19
  height: z.number(),
20
20
  }))
21
+ .nullable()
21
22
  .optional(),
22
23
  hash: z.string(),
23
24
  ext: z.string(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simple-strapi",
3
- "version": "1.0.0-alpha.21",
3
+ "version": "1.0.0-alpha.23",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",