@lyxa.ai/core 1.4.318 → 1.4.320

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.
@@ -19,18 +19,18 @@ export declare const RiderLocationUpdateSocketOutputSchema: z.ZodObject<{
19
19
  bearing: z.ZodOptional<z.ZodNumber>;
20
20
  updatedAt: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
21
21
  }, "strip", z.ZodTypeAny, {
22
- _id: import("mongoose").Types.ObjectId;
23
22
  updatedAt: Date;
23
+ _id: import("mongoose").Types.ObjectId;
24
+ riderId: import("mongoose").Types.ObjectId;
24
25
  latitude: number;
25
26
  longitude: number;
26
- riderId: import("mongoose").Types.ObjectId;
27
27
  bearing?: number | undefined;
28
28
  }, {
29
- _id: string | import("mongoose").Types.ObjectId;
30
29
  updatedAt: string | Date;
30
+ _id: string | import("mongoose").Types.ObjectId;
31
+ riderId: string | import("mongoose").Types.ObjectId;
31
32
  latitude: number;
32
33
  longitude: number;
33
- riderId: string | import("mongoose").Types.ObjectId;
34
34
  bearing?: number | undefined;
35
35
  }>;
36
36
  export type RiderLocationUpdateSocketInputDTO = DTO<typeof RiderLocationUpdateSocketInputSchema>;
@@ -55,18 +55,18 @@ export declare class RiderLocationUpdateSocketEvent extends BaseSocketEvent<type
55
55
  bearing: z.ZodOptional<z.ZodNumber>;
56
56
  updatedAt: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
57
57
  }, "strip", z.ZodTypeAny, {
58
- _id: import("mongoose").Types.ObjectId;
59
58
  updatedAt: Date;
59
+ _id: import("mongoose").Types.ObjectId;
60
+ riderId: import("mongoose").Types.ObjectId;
60
61
  latitude: number;
61
62
  longitude: number;
62
- riderId: import("mongoose").Types.ObjectId;
63
63
  bearing?: number | undefined;
64
64
  }, {
65
- _id: string | import("mongoose").Types.ObjectId;
66
65
  updatedAt: string | Date;
66
+ _id: string | import("mongoose").Types.ObjectId;
67
+ riderId: string | import("mongoose").Types.ObjectId;
67
68
  latitude: number;
68
69
  longitude: number;
69
- riderId: string | import("mongoose").Types.ObjectId;
70
70
  bearing?: number | undefined;
71
71
  }>;
72
72
  };
@@ -12,19 +12,19 @@ export declare const TicketActionsSocketOutputSchema: z.ZodObject<{
12
12
  title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
13
13
  silent: z.ZodOptional<z.ZodBoolean>;
14
14
  }, "strip", z.ZodTypeAny, {
15
+ _id: import("mongoose").Types.ObjectId;
15
16
  status: TicketStatus;
16
17
  type: TicketType;
17
- _id: import("mongoose").Types.ObjectId;
18
- silent?: boolean | undefined;
19
18
  title?: string | undefined;
20
19
  content?: string | undefined;
20
+ silent?: boolean | undefined;
21
21
  }, {
22
+ _id: import("mongoose").Types.ObjectId;
22
23
  status: TicketStatus;
23
24
  type: TicketType;
24
- _id: import("mongoose").Types.ObjectId;
25
- silent?: boolean | undefined;
26
25
  title?: string | undefined;
27
26
  content?: string | undefined;
27
+ silent?: boolean | undefined;
28
28
  }>;
29
29
  export declare const TicketActionsPushOutputSchema: z.ZodObject<{
30
30
  ticketId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
@@ -59,19 +59,19 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
59
59
  title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
60
60
  silent: z.ZodOptional<z.ZodBoolean>;
61
61
  }, "strip", z.ZodTypeAny, {
62
+ _id: import("mongoose").Types.ObjectId;
62
63
  status: TicketStatus;
63
64
  type: TicketType;
64
- _id: import("mongoose").Types.ObjectId;
65
- silent?: boolean | undefined;
66
65
  title?: string | undefined;
67
66
  content?: string | undefined;
67
+ silent?: boolean | undefined;
68
68
  }, {
69
+ _id: import("mongoose").Types.ObjectId;
69
70
  status: TicketStatus;
70
71
  type: TicketType;
71
- _id: import("mongoose").Types.ObjectId;
72
- silent?: boolean | undefined;
73
72
  title?: string | undefined;
74
73
  content?: string | undefined;
74
+ silent?: boolean | undefined;
75
75
  }>;
76
76
  pushNotificationOutput: z.ZodObject<{
77
77
  ticketId: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
@@ -13,14 +13,14 @@ export declare const TicketAssignSocketOutputSchema: z.ZodObject<{
13
13
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
14
14
  profilePhoto: z.ZodNullable<z.ZodString> | z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
15
15
  }, "strip", z.ZodTypeAny, {
16
- type: UserRef;
17
16
  _id: import("mongoose").Types.ObjectId;
18
17
  name: string;
18
+ type: UserRef;
19
19
  profilePhoto: string | null;
20
20
  }, {
21
- type: UserRef;
22
21
  _id: string | import("mongoose").Types.ObjectId;
23
22
  name: string;
23
+ type: UserRef;
24
24
  profilePhoto: string | null;
25
25
  }>;
26
26
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
@@ -39,41 +39,41 @@ export declare const TicketAssignSocketOutputSchema: z.ZodObject<{
39
39
  }>;
40
40
  unreadCount: z.ZodNumber;
41
41
  }, "strip", z.ZodTypeAny, {
42
- status: TicketStatus;
43
- type: TicketType;
44
- _id: import("mongoose").Types.ObjectId;
45
42
  createdAt: Date;
46
43
  updatedAt: Date;
44
+ _id: import("mongoose").Types.ObjectId;
45
+ status: TicketStatus;
46
+ type: TicketType;
47
47
  lastMessage: {
48
48
  createdAt: Date;
49
49
  content: string;
50
50
  };
51
- unreadCount: number;
52
51
  client: {
53
- type: UserRef;
54
52
  _id: import("mongoose").Types.ObjectId;
55
53
  name: string;
54
+ type: UserRef;
56
55
  profilePhoto: string | null;
57
56
  };
57
+ unreadCount: number;
58
58
  chatroomId: import("mongoose").Types.ObjectId;
59
59
  orderId?: import("mongoose").Types.ObjectId | undefined;
60
60
  }, {
61
- status: TicketStatus;
62
- type: TicketType;
63
- _id: string | import("mongoose").Types.ObjectId;
64
61
  createdAt: string | Date;
65
62
  updatedAt: string | Date;
63
+ _id: string | import("mongoose").Types.ObjectId;
64
+ status: TicketStatus;
65
+ type: TicketType;
66
66
  lastMessage: {
67
67
  createdAt: string | Date;
68
68
  content: string;
69
69
  };
70
- unreadCount: number;
71
70
  client: {
72
- type: UserRef;
73
71
  _id: string | import("mongoose").Types.ObjectId;
74
72
  name: string;
73
+ type: UserRef;
75
74
  profilePhoto: string | null;
76
75
  };
76
+ unreadCount: number;
77
77
  chatroomId: string | import("mongoose").Types.ObjectId;
78
78
  orderId?: string | import("mongoose").Types.ObjectId | undefined;
79
79
  }>;
@@ -91,14 +91,14 @@ export declare class TicketAssignEvent extends BaseSocketEvent<typeof TicketAssi
91
91
  name: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
92
92
  profilePhoto: z.ZodNullable<z.ZodString> | z.ZodNullable<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
93
93
  }, "strip", z.ZodTypeAny, {
94
- type: UserRef;
95
94
  _id: import("mongoose").Types.ObjectId;
96
95
  name: string;
96
+ type: UserRef;
97
97
  profilePhoto: string | null;
98
98
  }, {
99
- type: UserRef;
100
99
  _id: string | import("mongoose").Types.ObjectId;
101
100
  name: string;
101
+ type: UserRef;
102
102
  profilePhoto: string | null;
103
103
  }>;
104
104
  createdAt: z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, Date, string>, z.ZodDate]>, Date, string | Date>, Date, string | Date>;
@@ -117,41 +117,41 @@ export declare class TicketAssignEvent extends BaseSocketEvent<typeof TicketAssi
117
117
  }>;
118
118
  unreadCount: z.ZodNumber;
119
119
  }, "strip", z.ZodTypeAny, {
120
- status: TicketStatus;
121
- type: TicketType;
122
- _id: import("mongoose").Types.ObjectId;
123
120
  createdAt: Date;
124
121
  updatedAt: Date;
122
+ _id: import("mongoose").Types.ObjectId;
123
+ status: TicketStatus;
124
+ type: TicketType;
125
125
  lastMessage: {
126
126
  createdAt: Date;
127
127
  content: string;
128
128
  };
129
- unreadCount: number;
130
129
  client: {
131
- type: UserRef;
132
130
  _id: import("mongoose").Types.ObjectId;
133
131
  name: string;
132
+ type: UserRef;
134
133
  profilePhoto: string | null;
135
134
  };
135
+ unreadCount: number;
136
136
  chatroomId: import("mongoose").Types.ObjectId;
137
137
  orderId?: import("mongoose").Types.ObjectId | undefined;
138
138
  }, {
139
- status: TicketStatus;
140
- type: TicketType;
141
- _id: string | import("mongoose").Types.ObjectId;
142
139
  createdAt: string | Date;
143
140
  updatedAt: string | Date;
141
+ _id: string | import("mongoose").Types.ObjectId;
142
+ status: TicketStatus;
143
+ type: TicketType;
144
144
  lastMessage: {
145
145
  createdAt: string | Date;
146
146
  content: string;
147
147
  };
148
- unreadCount: number;
149
148
  client: {
150
- type: UserRef;
151
149
  _id: string | import("mongoose").Types.ObjectId;
152
150
  name: string;
151
+ type: UserRef;
153
152
  profilePhoto: string | null;
154
153
  };
154
+ unreadCount: number;
155
155
  chatroomId: string | import("mongoose").Types.ObjectId;
156
156
  orderId?: string | import("mongoose").Types.ObjectId | undefined;
157
157
  }>;
@@ -5,12 +5,12 @@ interface AuthOptions {
5
5
  autoRefresh?: boolean;
6
6
  }
7
7
  export declare function createAuthenticatedProcedure(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
8
- requestId: string | undefined;
9
8
  entity: import("../context").EntityContext | undefined;
9
+ requestId: string | undefined;
10
10
  req: import("http").IncomingMessage;
11
11
  res: import("http").ServerResponse<import("http").IncomingMessage>;
12
- tokenType: TokenType | undefined;
13
12
  usedRefreshToken: boolean | undefined;
14
13
  tokenRenewed: boolean | undefined;
14
+ tokenType: TokenType | undefined;
15
15
  }, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
16
16
  export {};
@@ -4,12 +4,12 @@ interface RoleProtectedOptions {
4
4
  allowedRoles: string[];
5
5
  }
6
6
  export declare function createRoleProtectedProcedure(options: RoleProtectedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
7
- requestId: string | undefined;
8
7
  entity: import("../context").EntityContext | undefined;
8
+ requestId: string | undefined;
9
9
  req: import("http").IncomingMessage;
10
10
  res: import("http").ServerResponse<import("http").IncomingMessage>;
11
- tokenType: import("../../auth").TokenType | undefined;
12
11
  usedRefreshToken: boolean | undefined;
13
12
  tokenRenewed: boolean | undefined;
13
+ tokenType: import("../../auth").TokenType | undefined;
14
14
  }, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
15
15
  export {};
@@ -3,12 +3,12 @@ interface PhoneVerifiedOptions {
3
3
  entityTypes: AuthEntityType[];
4
4
  }
5
5
  export declare function createPhoneVerifiedProcedure(options: PhoneVerifiedOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
6
- requestId: string | undefined;
7
6
  entity: import("../context").EntityContext | undefined;
7
+ requestId: string | undefined;
8
8
  req: import("http").IncomingMessage;
9
9
  res: import("http").ServerResponse<import("http").IncomingMessage>;
10
- tokenType: import("../../auth").TokenType | undefined;
11
10
  usedRefreshToken: boolean | undefined;
12
11
  tokenRenewed: boolean | undefined;
12
+ tokenType: import("../../auth").TokenType | undefined;
13
13
  }, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
14
14
  export {};
@@ -5,12 +5,12 @@ interface AuthOptions {
5
5
  autoRefresh?: boolean;
6
6
  }
7
7
  export declare function publicUserDecoder(options: AuthOptions): import("@trpc/server").TRPCProcedureBuilder<import("../context").LyxaHTTPContext, object, {
8
- requestId: string | undefined;
9
8
  entity: import("../context").EntityContext | undefined;
9
+ requestId: string | undefined;
10
10
  req: import("http").IncomingMessage;
11
11
  res: import("http").ServerResponse<import("http").IncomingMessage>;
12
- tokenType: TokenType | undefined;
13
12
  usedRefreshToken: boolean | undefined;
14
13
  tokenRenewed: boolean | undefined;
14
+ tokenType: TokenType | undefined;
15
15
  }, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, import("@trpc/server").TRPCUnsetMarker, false>;
16
16
  export {};
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.4.318
25
+ Version: 1.4.320
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.4.318",
3
+ "version": "1.4.320",
4
4
  "description": "Lyxa type definitions and validation schemas for both frontend and backend",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -22,24 +22,24 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
22
22
  size: number;
23
23
  page: number;
24
24
  sort?: Record<string, 1 | -1> | undefined;
25
+ query?: Record<string, any> | undefined;
26
+ select?: Record<string, 0 | 1> | undefined;
27
+ populate?: any;
25
28
  search?: {
26
29
  searchKey: string;
27
30
  searchFields?: string[] | undefined;
28
31
  } | undefined;
29
- select?: Record<string, 0 | 1> | undefined;
30
- populate?: any;
31
- query?: Record<string, any> | undefined;
32
32
  }, {
33
+ size?: number | undefined;
34
+ page?: number | undefined;
33
35
  sort?: Record<string, 1 | -1> | undefined;
36
+ query?: Record<string, any> | undefined;
37
+ select?: Record<string, 0 | 1> | undefined;
38
+ populate?: any;
34
39
  search?: {
35
40
  searchKey: string;
36
41
  searchFields?: string[] | undefined;
37
42
  } | undefined;
38
- select?: Record<string, 0 | 1> | undefined;
39
- populate?: any;
40
- size?: number | undefined;
41
- page?: number | undefined;
42
- query?: Record<string, any> | undefined;
43
43
  }>>;
44
44
  export type FilterDTO = z.infer<typeof FilterSchema>;
45
45
  export declare const StringSchema: z.ZodString;
@@ -181,7 +181,6 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
181
181
  } & {
182
182
  _id: z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, import("mongoose").Types.ObjectId, string>, z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>]>;
183
183
  }, "strip", z.ZodTypeAny, {
184
- _id: import("mongoose").Types.ObjectId;
185
184
  address: string;
186
185
  country: string;
187
186
  location: {
@@ -193,6 +192,7 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
193
192
  addressLabel: string;
194
193
  apartment: string;
195
194
  buildingName: string;
195
+ _id: import("mongoose").Types.ObjectId;
196
196
  description?: string | undefined;
197
197
  city?: string | undefined;
198
198
  state?: string | undefined;
@@ -200,7 +200,6 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
200
200
  deliveryOption?: string | undefined;
201
201
  instructions?: string | undefined;
202
202
  }, {
203
- _id: string | import("mongoose").Types.ObjectId;
204
203
  address: string;
205
204
  country: string;
206
205
  location: {
@@ -212,6 +211,7 @@ export declare const RegularOrderAddressSchema: z.ZodObject<{
212
211
  addressLabel: string;
213
212
  apartment: string;
214
213
  buildingName: string;
214
+ _id: string | import("mongoose").Types.ObjectId;
215
215
  description?: string | undefined;
216
216
  city?: string | undefined;
217
217
  state?: string | undefined;
@@ -803,13 +803,13 @@ export declare const GetOneQuerySchema: z.ZodObject<{
803
803
  select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
804
804
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
805
805
  }, "strip", z.ZodTypeAny, {
806
+ query?: Record<string, any> | undefined;
806
807
  select?: Record<string, 0 | 1> | undefined;
807
808
  populate?: any;
808
- query?: Record<string, any> | undefined;
809
809
  }, {
810
+ query?: Record<string, any> | undefined;
810
811
  select?: Record<string, 0 | 1> | undefined;
811
812
  populate?: any;
812
- query?: Record<string, any> | undefined;
813
813
  }>;
814
814
  export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
815
815
  declare const ShareableLinkSchema: z.ZodObject<{
@@ -22,7 +22,6 @@ export declare function createPaginatedSchema<ItemType extends z.ZodTypeAny>(ite
22
22
  }, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodNumber]>, z.ZodBoolean]>, z.ZodNull]>, z.ZodUndefined]>, "strip">>;
23
23
  items: z.ZodArray<ItemType, "many">;
24
24
  }, "strip", z.ZodTypeAny, {
25
- items: ItemType["_output"][];
26
25
  metadata: {
27
26
  size: number;
28
27
  page: number;
@@ -31,8 +30,8 @@ export declare function createPaginatedSchema<ItemType extends z.ZodTypeAny>(ite
31
30
  } & {
32
31
  [k: string]: string | number | boolean | null | undefined;
33
32
  };
33
+ items: ItemType["_output"][];
34
34
  }, {
35
- items: ItemType["_input"][];
36
35
  metadata: {
37
36
  size: number;
38
37
  page: number;
@@ -41,6 +40,7 @@ export declare function createPaginatedSchema<ItemType extends z.ZodTypeAny>(ite
41
40
  } & {
42
41
  [k: string]: string | number | boolean | null | undefined;
43
42
  };
43
+ items: ItemType["_input"][];
44
44
  }>;
45
45
  export interface RawPaginatedResult<T extends AnyParamConstructor<any>> {
46
46
  metadata: {
@@ -62,7 +62,6 @@ export interface PaginatorOptions<TClass extends AnyParamConstructor<any>> {
62
62
  }
63
63
  export declare function createRawDocumentPaginatorObject<T extends AnyParamConstructor<any>>(model: ReturnModelType<T>): (options: PaginatorOptions<T>) => Promise<RawPaginatedResult<T>>;
64
64
  export declare function createPaginatorObject<T extends AnyParamConstructor<any>>(model: ReturnModelType<T>, itemSchema: z.ZodTypeAny, transformFn?: (doc: DocumentType<T>) => z.infer<typeof itemSchema>): (options: PaginatorOptions<T>) => Promise<{
65
- items: any[];
66
65
  metadata: {
67
66
  size: number;
68
67
  page: number;
@@ -71,6 +70,7 @@ export declare function createPaginatorObject<T extends AnyParamConstructor<any>
71
70
  } & {
72
71
  [k: string]: string | number | boolean | null | undefined;
73
72
  };
73
+ items: any[];
74
74
  }>;
75
75
  export declare function paginateAggregation(model: any, pipeline: any[], page?: number, size?: number, sort?: any, populateOptions?: any): Promise<{
76
76
  metadata: {