@lyxa.ai/core 1.4.322-alpha.0 → 1.4.322-alpha.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.
@@ -2,4 +2,6 @@ import { CouponType } from '../../../../utilities/enum';
2
2
  import { BaseCoupon } from '../base/base-coupon.model';
3
3
  export declare class GlobalCoupon extends BaseCoupon {
4
4
  couponType: CouponType.GLOBAL;
5
+ isCouponDurationInDaysEnabled?: boolean;
6
+ couponDurationInDays?: number | null;
5
7
  }
@@ -1,10 +1,30 @@
1
1
  "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.GlobalCoupon = void 0;
13
+ const typegoose_1 = require("@typegoose/typegoose");
4
14
  const enum_1 = require("../../../../utilities/enum");
5
15
  const base_coupon_model_1 = require("../base/base-coupon.model");
6
16
  class GlobalCoupon extends base_coupon_model_1.BaseCoupon {
7
17
  couponType = enum_1.CouponType.GLOBAL;
18
+ isCouponDurationInDaysEnabled;
19
+ couponDurationInDays;
8
20
  }
9
21
  exports.GlobalCoupon = GlobalCoupon;
22
+ __decorate([
23
+ (0, typegoose_1.prop)({ type: Boolean, default: false }),
24
+ __metadata("design:type", Boolean)
25
+ ], GlobalCoupon.prototype, "isCouponDurationInDaysEnabled", void 0);
26
+ __decorate([
27
+ (0, typegoose_1.prop)({ type: Number, default: null }),
28
+ __metadata("design:type", Object)
29
+ ], GlobalCoupon.prototype, "couponDurationInDays", void 0);
10
30
  //# sourceMappingURL=global-coupon.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"global-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/global-coupon.model.ts"],"names":[],"mappings":";;;AAAA,qDAAwD;AACxD,iEAAuD;AAEvD,MAAa,YAAa,SAAQ,8BAAU;IACpC,UAAU,GAAG,iBAAU,CAAC,MAAe,CAAC;CAC/C;AAFD,oCAEC","sourcesContent":["import { CouponType } from '../../../../utilities/enum';\nimport { BaseCoupon } from '../base/base-coupon.model';\n\nexport class GlobalCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.GLOBAL as const;\n}\n"]}
1
+ {"version":3,"file":"global-coupon.model.js","sourceRoot":"/","sources":["libraries/mongo/models/providers/global-coupon.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA4C;AAC5C,qDAAwD;AACxD,iEAAuD;AAEvD,MAAa,YAAa,SAAQ,8BAAU;IACpC,UAAU,GAAG,iBAAU,CAAC,MAAe,CAAC;IAGxC,6BAA6B,CAAW;IAGxC,oBAAoB,CAAiB;CAC5C;AARD,oCAQC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;mEACO;AAGxC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;0DACM","sourcesContent":["import { prop } from '@typegoose/typegoose';\nimport { CouponType } from '../../../../utilities/enum';\nimport { BaseCoupon } from '../base/base-coupon.model';\n\nexport class GlobalCoupon extends BaseCoupon {\n\tpublic couponType = CouponType.GLOBAL as const;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isCouponDurationInDaysEnabled?: boolean;\n\n\t@prop({ type: Number, default: null })\n\tpublic couponDurationInDays?: number | null;\n}\n"]}
@@ -28,13 +28,13 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
28
28
  id: import("mongoose").Types.ObjectId;
29
29
  type: UserRef;
30
30
  }>;
31
- content: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
31
+ content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
32
32
  media: z.ZodArray<z.ZodObject<{
33
33
  mimeType: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
34
34
  mediaType: z.ZodNativeEnum<typeof MediaType>;
35
35
  mediaUrl: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
36
- thumbnailUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
37
- name: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
36
+ thumbnailUrl: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
37
+ name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
38
38
  }, "strip", z.ZodTypeAny, {
39
39
  mediaType: MediaType;
40
40
  mediaUrl: string;
@@ -116,7 +116,7 @@ export declare const ChatroomMessageSendOutputSchema: z.ZodObject<{
116
116
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
117
117
  }>;
118
118
  export declare const ChatroomMessageSendPushOutputSchema: z.ZodObject<{
119
- lastMessage: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
119
+ lastMessage: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
120
120
  chatroomId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
121
121
  ticketId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
122
122
  orderId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
@@ -164,13 +164,13 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
164
164
  id: import("mongoose").Types.ObjectId;
165
165
  type: UserRef;
166
166
  }>;
167
- content: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
167
+ content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
168
168
  media: z.ZodArray<z.ZodObject<{
169
169
  mimeType: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
170
170
  mediaType: z.ZodNativeEnum<typeof MediaType>;
171
171
  mediaUrl: z.ZodString | z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
172
- thumbnailUrl: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
173
- name: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
172
+ thumbnailUrl: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
173
+ name: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
174
174
  }, "strip", z.ZodTypeAny, {
175
175
  mediaType: MediaType;
176
176
  mediaUrl: string;
@@ -252,7 +252,7 @@ export declare class ChatroomMessageSendSocketEvent extends BaseSocketEvent<type
252
252
  chatroomId?: import("mongoose").Types.ObjectId | undefined;
253
253
  }>;
254
254
  pushNotificationOutput: z.ZodObject<{
255
- lastMessage: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
255
+ lastMessage: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
256
256
  chatroomId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
257
257
  ticketId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
258
258
  orderId: z.ZodOptional<z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>>;
@@ -8,8 +8,8 @@ export declare const TicketActionsSocketOutputSchema: z.ZodObject<{
8
8
  _id: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
9
9
  status: z.ZodNativeEnum<typeof TicketStatus>;
10
10
  type: z.ZodNativeEnum<typeof TicketType>;
11
- content: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
12
- title: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
11
+ content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
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
15
  status: TicketStatus;
@@ -30,8 +30,8 @@ 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>;
31
31
  status: z.ZodNativeEnum<typeof TicketStatus>;
32
32
  type: z.ZodNativeEnum<typeof TicketType>;
33
- content: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
34
- title: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
33
+ content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
34
+ title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
35
35
  }, "strip", z.ZodTypeAny, {
36
36
  status: TicketStatus;
37
37
  type: TicketType;
@@ -55,8 +55,8 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
55
55
  _id: z.ZodEffects<z.ZodType<import("mongoose").Types.ObjectId, z.ZodTypeDef, import("mongoose").Types.ObjectId>, import("mongoose").Types.ObjectId, import("mongoose").Types.ObjectId>;
56
56
  status: z.ZodNativeEnum<typeof TicketStatus>;
57
57
  type: z.ZodNativeEnum<typeof TicketType>;
58
- content: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
59
- title: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
58
+ content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
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
62
  status: TicketStatus;
@@ -77,8 +77,8 @@ export declare class TicketActionsSocketEvent extends BaseSocketEvent<typeof Tic
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>;
78
78
  status: z.ZodNativeEnum<typeof TicketStatus>;
79
79
  type: z.ZodNativeEnum<typeof TicketType>;
80
- content: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
81
- title: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>> | z.ZodOptional<z.ZodString>;
80
+ content: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
81
+ title: z.ZodOptional<z.ZodString> | z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>>;
82
82
  }, "strip", z.ZodTypeAny, {
83
83
  status: TicketStatus;
84
84
  type: TicketType;
@@ -5,10 +5,10 @@ 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
+ entity: import("../context").EntityContext | undefined;
8
10
  req: import("http").IncomingMessage;
9
11
  res: import("http").ServerResponse<import("http").IncomingMessage>;
10
- entity: import("../context").EntityContext | undefined;
11
- requestId: string | undefined;
12
12
  tokenType: TokenType | undefined;
13
13
  usedRefreshToken: boolean | undefined;
14
14
  tokenRenewed: boolean | undefined;
@@ -4,10 +4,10 @@ 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
+ entity: import("../context").EntityContext | undefined;
7
9
  req: import("http").IncomingMessage;
8
10
  res: import("http").ServerResponse<import("http").IncomingMessage>;
9
- entity: import("../context").EntityContext | undefined;
10
- requestId: string | undefined;
11
11
  tokenType: import("../../auth").TokenType | undefined;
12
12
  usedRefreshToken: boolean | undefined;
13
13
  tokenRenewed: boolean | undefined;
@@ -3,10 +3,10 @@ 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
+ entity: import("../context").EntityContext | undefined;
6
8
  req: import("http").IncomingMessage;
7
9
  res: import("http").ServerResponse<import("http").IncomingMessage>;
8
- entity: import("../context").EntityContext | undefined;
9
- requestId: string | undefined;
10
10
  tokenType: import("../../auth").TokenType | undefined;
11
11
  usedRefreshToken: boolean | undefined;
12
12
  tokenRenewed: boolean | undefined;
@@ -5,10 +5,10 @@ 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
+ entity: import("../context").EntityContext | undefined;
8
10
  req: import("http").IncomingMessage;
9
11
  res: import("http").ServerResponse<import("http").IncomingMessage>;
10
- entity: import("../context").EntityContext | undefined;
11
- requestId: string | undefined;
12
12
  tokenType: TokenType | undefined;
13
13
  usedRefreshToken: boolean | undefined;
14
14
  tokenRenewed: boolean | undefined;
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.4.322-alpha.0
25
+ Version: 1.4.322-alpha.2
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.4.322-alpha.0",
3
+ "version": "1.4.322-alpha.2",
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",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.4.322-alpha.0",
3
+ "version": "1.4.322-alpha.2",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",