@purpleschool/gptbot 0.12.8 → 0.12.10

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.
@@ -6,10 +6,12 @@ const models_1 = require("../../models");
6
6
  var FindTeamAccountOperationsCommand;
7
7
  (function (FindTeamAccountOperationsCommand) {
8
8
  FindTeamAccountOperationsCommand.RequestSchema = zod_1.z.object({
9
- limit: zod_1.z.number().int().min(1).max(200).optional(),
10
- offset: zod_1.z.number().int().min(0).optional(),
9
+ limit: zod_1.z.number().int().min(1).max(200).default(20).optional(),
10
+ offset: zod_1.z.number().int().min(0).default(0).optional(),
11
11
  });
12
12
  FindTeamAccountOperationsCommand.ResponseSchema = zod_1.z.object({
13
13
  data: zod_1.z.array(models_1.TeamAccountOperationSchema),
14
+ page: zod_1.z.number(),
15
+ totalPages: zod_1.z.number(),
14
16
  });
15
17
  })(FindTeamAccountOperationsCommand || (exports.FindTeamAccountOperationsCommand = FindTeamAccountOperationsCommand = {}));
@@ -12,17 +12,14 @@ var GetInvoiceForPaymentCommand;
12
12
  teamAccountId: zod_1.z.string().uuid().optional(),
13
13
  inn: zod_1.z.string().optional(),
14
14
  invoiceNumber: zod_1.z.string().optional(),
15
- })
16
- .refine((value) => [
17
- value.invoiceId,
18
- value.userId,
19
- value.teamAccountId,
20
- value.inn,
21
- value.invoiceNumber,
22
- ].filter(Boolean).length === 1, {
23
- message: 'Must provide exactly one filter',
15
+ dateFrom: zod_1.z.coerce.date().optional(),
16
+ dateTo: zod_1.z.coerce.date().optional(),
17
+ limit: zod_1.z.coerce.number().int().min(1).max(100).default(20).optional(),
18
+ offset: zod_1.z.coerce.number().int().min(0).default(0).optional(),
24
19
  });
25
20
  GetInvoiceForPaymentCommand.ResponseSchema = zod_1.z.object({
26
21
  data: zod_1.z.array(models_1.InvoiceForPaymentSchema),
22
+ page: zod_1.z.number(),
23
+ totalPages: zod_1.z.number(),
27
24
  });
28
25
  })(GetInvoiceForPaymentCommand || (exports.GetInvoiceForPaymentCommand = GetInvoiceForPaymentCommand = {}));
@@ -3,14 +3,16 @@ import { TeamAccountOperationSchema } from '../../models';
3
3
 
4
4
  export namespace FindTeamAccountOperationsCommand {
5
5
  export const RequestSchema = z.object({
6
- limit: z.number().int().min(1).max(200).optional(),
7
- offset: z.number().int().min(0).optional(),
6
+ limit: z.number().int().min(1).max(200).default(20).optional(),
7
+ offset: z.number().int().min(0).default(0).optional(),
8
8
  });
9
9
 
10
10
  export type Request = z.infer<typeof RequestSchema>;
11
11
 
12
12
  export const ResponseSchema = z.object({
13
13
  data: z.array(TeamAccountOperationSchema),
14
+ page: z.number(),
15
+ totalPages: z.number(),
14
16
  });
15
17
 
16
18
  export type Response = z.infer<typeof ResponseSchema>;
@@ -9,25 +9,18 @@ export namespace GetInvoiceForPaymentCommand {
9
9
  teamAccountId: z.string().uuid().optional(),
10
10
  inn: z.string().optional(),
11
11
  invoiceNumber: z.string().optional(),
12
- })
13
- .refine(
14
- (value) =>
15
- [
16
- value.invoiceId,
17
- value.userId,
18
- value.teamAccountId,
19
- value.inn,
20
- value.invoiceNumber,
21
- ].filter(Boolean).length === 1,
22
- {
23
- message: 'Must provide exactly one filter',
24
- },
25
- );
12
+ dateFrom: z.coerce.date().optional(),
13
+ dateTo: z.coerce.date().optional(),
14
+ limit: z.coerce.number().int().min(1).max(100).default(20).optional(),
15
+ offset: z.coerce.number().int().min(0).default(0).optional(),
16
+ });
26
17
 
27
18
  export type RequestQuery = z.infer<typeof RequestQuerySchema>;
28
19
 
29
20
  export const ResponseSchema = z.object({
30
21
  data: z.array(InvoiceForPaymentSchema),
22
+ page: z.number(),
23
+ totalPages: z.number(),
31
24
  });
32
25
 
33
26
  export type Response = z.infer<typeof ResponseSchema>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.12.8",
3
+ "version": "0.12.10",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",