@gigapay-dev/contracts 1.0.1 → 1.0.2

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.
@@ -3,12 +3,12 @@ import { PromoCodeStatus, PromoCodeType } from "./enums";
3
3
 
4
4
  export const PromoCodeUpdateSchema = z.object({
5
5
  value: z.string().optional(),
6
- discountValue: z.string(),
6
+ discountValue: z.string().optional(),
7
7
  expiredAt: z.coerce.date().nullable().optional(),
8
8
  activationLimit: z.number().positive().nullable().optional(),
9
9
  activationPerUserLimit: z.number().positive().nullable().optional(),
10
- type: PromoCodeType,
11
- status: PromoCodeStatus,
10
+ type: PromoCodeType.optional(),
11
+ status: PromoCodeStatus.optional(),
12
12
  })
13
13
 
14
14
  export type PromoCodeUpdate = z.infer<typeof PromoCodeUpdateSchema>;
@@ -1,4 +1,4 @@
1
1
  import z from "zod";
2
2
 
3
- export const RefreshSessionStatus = z.enum(['ACTIVE', 'EXPIRED', 'BLOCKED']);
3
+ export const RefreshSessionStatus = z.enum(['ACTIVE', 'EXPIRED', 'BLOCKED', 'TERMINATED']);
4
4
  export type RefreshSessionStatus = z.infer<typeof RefreshSessionStatus>;
@@ -2,10 +2,10 @@ import z from "zod";
2
2
  import { RefreshSessionStatus } from "./enums";
3
3
 
4
4
  export const RefreshSessionUpdateSchema = z.object({
5
- userId: z.number(),
6
- refreshToken: z.string(),
5
+ userId: z.number().optional(),
6
+ refreshToken: z.string().optional(),
7
7
  expiredAt: z.coerce.date().nullable().optional(),
8
- status: RefreshSessionStatus,
8
+ status: RefreshSessionStatus.optional(),
9
9
  IP: z.string().nullable().optional(),
10
10
  UA: z.string().nullable().optional(),
11
11
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gigapay-dev/contracts",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "main": "./build/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1",