@flipdish/events 1.26027.0 → 1.26037.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/events",
3
- "version": "1.26027.0",
3
+ "version": "1.26037.0",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --max-old-space-size=4096 --max-semi-space-size=512 ./node_modules/.bin/jest --config=jest.config.ts --verbose",
@@ -13,14 +13,6 @@ export const PublicGetSnoozedItemsSchema = z
13
13
  description: 'The type of the item to un-snooze',
14
14
  example: SnoozeTypes.MenuItem,
15
15
  }),
16
- itemName: z.string().openapi({
17
- description: 'The name of the item to un-snooze',
18
- example: 'Item 1',
19
- }),
20
- isSnoozed: z.boolean().openapi({
21
- description: 'Whether the item is snoozed',
22
- example: true,
23
- }),
24
16
  snoozeStart: z.string().datetime().nullable().optional().openapi({
25
17
  description: 'The start date of the snooze',
26
18
  example: '2025-06-01T16:00:00Z',
@@ -30,6 +22,18 @@ export const PublicGetSnoozedItemsSchema = z
30
22
  description: 'Time period of the snooze in seconds',
31
23
  example: 3600,
32
24
  }),
25
+ propertyIds: z
26
+ .array(propertyIdSchema)
27
+ .nullable()
28
+ .optional()
29
+ .openapi({
30
+ description: 'List of property IDs the snooze applies to. If omitted, the snooze applies to all properties using the menu.',
31
+ example: ['p001', 'p002'],
32
+ }),
33
+ isSnoozed: z.boolean().openapi({
34
+ description: 'Whether the item is snoozed',
35
+ example: true,
36
+ }),
33
37
  })
34
38
  .openapi('PublicGetSnoozedItemsSchema', {
35
39
  description: 'Response schema describing snooze status for menu items and options.',
@@ -15,14 +15,6 @@ export const PublicGetSnoozedItemsSchema = z
15
15
  description: 'The type of the item to un-snooze',
16
16
  example: SnoozeTypes.MenuItem,
17
17
  }),
18
- itemName: z.string().openapi({
19
- description: 'The name of the item to un-snooze',
20
- example: 'Item 1',
21
- }),
22
- isSnoozed: z.boolean().openapi({
23
- description: 'Whether the item is snoozed',
24
- example: true,
25
- }),
26
18
  snoozeStart: z.string().datetime().nullable().optional().openapi({
27
19
  description: 'The start date of the snooze',
28
20
  example: '2025-06-01T16:00:00Z',
@@ -32,6 +24,19 @@ export const PublicGetSnoozedItemsSchema = z
32
24
  description: 'Time period of the snooze in seconds',
33
25
  example: 3600,
34
26
  }),
27
+ propertyIds: z
28
+ .array(propertyIdSchema)
29
+ .nullable()
30
+ .optional()
31
+ .openapi({
32
+ description:
33
+ 'List of property IDs the snooze applies to. If omitted, the snooze applies to all properties using the menu.',
34
+ example: ['p001', 'p002'],
35
+ }),
36
+ isSnoozed: z.boolean().openapi({
37
+ description: 'Whether the item is snoozed',
38
+ example: true,
39
+ }),
35
40
  })
36
41
  .openapi('PublicGetSnoozedItemsSchema', {
37
42
  description: 'Response schema describing snooze status for menu items and options.',
@@ -1,10 +1,14 @@
1
1
  import { eventType as LOGIN_REQUESTPHONELOGINCODESMS_V3, Login_requestphonelogincodesms_v3Schema, } from './login.requestphonelogincodesms.v3.js';
2
+ import { eventType as LOGIN_WITHPHONECODE_V3, Login_withphonecode_v3Schema, } from './login.withphonecode.v3.js';
2
3
  // Export schemas
3
4
  export { Login_requestphonelogincodesms_v3Schema };
5
+ export { Login_withphonecode_v3Schema };
4
6
  // Export event types
5
7
  export const eventTypes = {
6
8
  LOGIN_REQUESTPHONELOGINCODESMS_V3,
9
+ LOGIN_WITHPHONECODE_V3,
7
10
  };
8
11
  export const eventSchemaMap = Object.fromEntries([
9
12
  [LOGIN_REQUESTPHONELOGINCODESMS_V3, Login_requestphonelogincodesms_v3Schema],
13
+ [LOGIN_WITHPHONECODE_V3, Login_withphonecode_v3Schema],
10
14
  ]);
@@ -2,18 +2,26 @@ import {
2
2
  eventType as LOGIN_REQUESTPHONELOGINCODESMS_V3,
3
3
  Login_requestphonelogincodesms_v3Schema,
4
4
  } from './login.requestphonelogincodesms.v3.js';
5
+ import {
6
+ eventType as LOGIN_WITHPHONECODE_V3,
7
+ Login_withphonecode_v3Schema,
8
+ } from './login.withphonecode.v3.js';
5
9
 
6
10
  // Export schemas
7
11
  export { Login_requestphonelogincodesms_v3Schema };
12
+ export { Login_withphonecode_v3Schema };
8
13
 
9
14
  // Re-export specific types from each module with renamed exports to avoid conflicts
10
15
  export { LoginRequestPhoneLoginCodeSmsV3 } from './login.requestphonelogincodesms.v3.js';
16
+ export { LoginWithPhoneCodeV3 } from './login.withphonecode.v3.js';
11
17
 
12
18
  // Export event types
13
19
  export const eventTypes = {
14
20
  LOGIN_REQUESTPHONELOGINCODESMS_V3,
21
+ LOGIN_WITHPHONECODE_V3,
15
22
  };
16
23
 
17
24
  export const eventSchemaMap = Object.fromEntries([
18
25
  [LOGIN_REQUESTPHONELOGINCODESMS_V3, Login_requestphonelogincodesms_v3Schema],
26
+ [LOGIN_WITHPHONECODE_V3, Login_withphonecode_v3Schema],
19
27
  ]);
@@ -4,7 +4,7 @@ export const eventType = 'login.requestphonelogincodesms.v3';
4
4
  export const Login_requestphonelogincodesms_v3Schema = z.object({
5
5
  HCaptcha: z.object({
6
6
  Score: z.number().nullable(),
7
- Reasons: z.string().nullable(),
7
+ Reasons: z.string().optional(),
8
8
  Token: z.string().nullable(),
9
9
  }),
10
10
  UserAgent: z.string().nullable(),
@@ -6,7 +6,7 @@ export const eventType = 'login.requestphonelogincodesms.v3';
6
6
  export const Login_requestphonelogincodesms_v3Schema = z.object({
7
7
  HCaptcha: z.object({
8
8
  Score: z.number().nullable(),
9
- Reasons: z.string().nullable(),
9
+ Reasons: z.string().optional(),
10
10
  Token: z.string().nullable(),
11
11
  }),
12
12
  UserAgent: z.string().nullable(),
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ import { UserSchema } from '../common-schemas.js';
3
+ export const eventType = 'login.withphonecode.v3';
4
+ export const Login_withphonecode_v3Schema = z.object({
5
+ User: UserSchema.nullable(),
6
+ SignInStatus: z.string().nullable(),
7
+ WhiteLabelId: z.number().nullable(),
8
+ IpAddress: z.string().nullable(),
9
+ UserAgent: z.string().nullable(),
10
+ AppType: z.string().nullable(),
11
+ DeviceId: z.string().nullable(),
12
+ Cloudflare: z.object({
13
+ RayId: z.string().nullable(),
14
+ IPCountry: z.string().nullable(),
15
+ ConnectingIpAddress: z.string().nullable(),
16
+ Ja4: z.string().nullable(),
17
+ }),
18
+ EventName: z.string(),
19
+ FlipdishEventId: z.string(),
20
+ CreateTime: z.string().datetime(),
21
+ Position: z.number(),
22
+ AppId: z.string(),
23
+ OrgId: z.string(),
24
+ });
@@ -0,0 +1,30 @@
1
+ import { z } from 'zod';
2
+ import { UserSchema } from '../common-schemas.js';
3
+
4
+ export const eventType = 'login.withphonecode.v3';
5
+
6
+ export const Login_withphonecode_v3Schema = z.object({
7
+ User: UserSchema.nullable(),
8
+ SignInStatus: z.string().nullable(),
9
+ WhiteLabelId: z.number().nullable(),
10
+ IpAddress: z.string().nullable(),
11
+ UserAgent: z.string().nullable(),
12
+ AppType: z.string().nullable(),
13
+ DeviceId: z.string().nullable(),
14
+ Cloudflare: z.object({
15
+ RayId: z.string().nullable(),
16
+ IPCountry: z.string().nullable(),
17
+ ConnectingIpAddress: z.string().nullable(),
18
+ Ja4: z.string().nullable(),
19
+ }),
20
+ EventName: z.string(),
21
+ FlipdishEventId: z.string(),
22
+ CreateTime: z.string().datetime(),
23
+ Position: z.number(),
24
+ AppId: z.string(),
25
+ OrgId: z.string(),
26
+ });
27
+
28
+ export type LoginWithPhoneCodeV3 = z.infer<
29
+ typeof Login_withphonecode_v3Schema
30
+ >;