@lyxa.ai/core 1.4.104 → 1.4.106

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,9 +3,10 @@ import { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';
3
3
  import { BannerClickType, BannerLinkType, BannerUserType, Status, UserAppSectionItemType } from '../../../utilities/enum';
4
4
  import { Shop } from './shop.model';
5
5
  import { Product } from './product.model';
6
+ import { ServicePackage } from './service-package.model';
6
7
  import { Zone } from './zone.model';
7
8
  import { ListContainer } from './list-container.model';
8
- import { ServicePackage, UserAppSectionSetting } from '.';
9
+ import { UserAppSectionSetting } from '.';
9
10
  export declare class Banner extends TimeStamps {
10
11
  title: string;
11
12
  image: string;
@@ -15,6 +15,7 @@ const defaultClasses_1 = require("@typegoose/typegoose/lib/defaultClasses");
15
15
  const enum_1 = require("../../../utilities/enum");
16
16
  const shop_model_1 = require("./shop.model");
17
17
  const product_model_1 = require("./product.model");
18
+ const service_package_model_1 = require("./service-package.model");
18
19
  const zone_model_1 = require("./zone.model");
19
20
  const list_container_model_1 = require("./list-container.model");
20
21
  const _1 = require(".");
@@ -87,7 +88,7 @@ __decorate([
87
88
  __metadata("design:type", Object)
88
89
  ], Banner.prototype, "product", void 0);
89
90
  __decorate([
90
- (0, typegoose_1.prop)({ ref: () => _1.ServicePackage }),
91
+ (0, typegoose_1.prop)({ ref: () => service_package_model_1.ServicePackage }),
91
92
  __metadata("design:type", Object)
92
93
  ], Banner.prototype, "servicePackage", void 0);
93
94
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"banner.model.js","sourceRoot":"/","sources":["libraries/mongo/models/banner.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,kDAMiC;AACjC,6CAAoC;AACpC,mDAA0C;AAC1C,6CAAoC;AACpC,iEAAuD;AACvD,wBAAuE;AAEvE,0EAG0C;AAcnC,IAAM,MAAM,GAAZ,M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,MAAM,yDAAmC,CAAC,IAAI,CAAC,IAAI,EAAE,cAAW,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;QAEhF,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,iBAAK,EAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;GACvE,MAAM,CAgDlB","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport {\n\tBannerClickType,\n\tBannerLinkType,\n\tBannerUserType,\n\tStatus,\n\tUserAppSectionItemType,\n} from '../../../utilities/enum';\nimport { Shop } from './shop.model';\nimport { Product } from './product.model';\nimport { Zone } from './zone.model';\nimport { ListContainer } from './list-container.model';\nimport { BannerModel, ServicePackage, UserAppSectionSetting } from '.';\nimport { Query } from 'mongoose';\nimport {\n\thandlePreSaveForSortingWithStatus,\n\thandlePreUpdateForSortingWithStatus,\n} from '../utilities/sorting-order.hooks';\n\n@modelOptions({ schemaOptions: { collection: 'banners' } })\n@pre<Banner>('save', async function (next) {\n\tawait handlePreSaveForSortingWithStatus.call(this, BannerModel, { itemType: this.itemType });\n\n\tnext();\n})\n@pre<Banner>('findOneAndUpdate', async function (this: Query<any, Banner>, next) {\n\tawait handlePreUpdateForSortingWithStatus.call(this, BannerModel, ['itemType']);\n\n\tnext();\n})\n@index({ title: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\nexport class Banner extends TimeStamps {\n\t@prop({ required: true, type: String, trim: true, maxlength: 50 })\n\tpublic title!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic image!: string;\n\n\t@prop({ required: true, type: String, enum: UserAppSectionItemType })\n\tpublic itemType!: UserAppSectionItemType;\n \n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: String, enum: BannerUserType, default: BannerUserType.ALL })\n\tpublic visibility?: BannerUserType;\n\n\t@prop({ ref: () => Zone, default: [] })\n\tpublic zones?: Ref<Zone>[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isClickable?: boolean;\n \n\t@prop({ type: String, enum: BannerClickType })\n\tpublic clickType?: BannerClickType;\n\n\t@prop({ type: String, enum: BannerLinkType })\n\tpublic linkType?: BannerLinkType;\n \n\t@prop({ type: String, trim: true })\n\tpublic link?: string;\n\n\t@prop({ ref: () => Shop })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ ref: () => Product })\n\tpublic product?: Ref<Product>;\n\n\t@prop({ ref: () => ServicePackage })\n\tpublic servicePackage?: Ref<ServicePackage>;\n\n\t@prop({ ref: () => ListContainer })\n\tpublic listContainer?: Ref<ListContainer>;\n\n\t@prop({ ref: () => UserAppSectionSetting })\n\tpublic section?: Ref<UserAppSectionSetting>;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
1
+ {"version":3,"file":"banner.model.js","sourceRoot":"/","sources":["libraries/mongo/models/banner.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,kDAMiC;AACjC,6CAAoC;AACpC,mDAA0C;AAC1C,mEAAyD;AAEzD,6CAAoC;AACpC,iEAAuD;AACvD,wBAAuD;AAEvD,0EAG0C;AAcnC,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,2BAAU;IAE9B,KAAK,CAAU;IAGf,KAAK,CAAU;IAGf,QAAQ,CAA0B;IAGlC,MAAM,CAAU;IAGhB,UAAU,CAAkB;IAG5B,KAAK,CAAe;IAGpB,WAAW,CAAW;IAGtB,SAAS,CAAmB;IAG5B,QAAQ,CAAkB;IAG1B,IAAI,CAAU;IAGd,IAAI,CAAa;IAGjB,OAAO,CAAgB;IAGvB,cAAc,CAAuB;IAGrC,aAAa,CAAsB;IAGnC,OAAO,CAA8B;IAGrC,YAAY,CAAU;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egoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport {\n\tBannerClickType,\n\tBannerLinkType,\n\tBannerUserType,\n\tStatus,\n\tUserAppSectionItemType,\n} from '../../../utilities/enum';\nimport { Shop } from './shop.model';\nimport { Product } from './product.model';\nimport { ServicePackage } from './service-package.model';\n\nimport { Zone } from './zone.model';\nimport { ListContainer } from './list-container.model';\nimport { BannerModel, UserAppSectionSetting } from '.';\nimport { Query } from 'mongoose';\nimport {\n\thandlePreSaveForSortingWithStatus,\n\thandlePreUpdateForSortingWithStatus,\n} from '../utilities/sorting-order.hooks';\n\n@modelOptions({ schemaOptions: { collection: 'banners' } })\n@pre<Banner>('save', async function (next) {\n\tawait handlePreSaveForSortingWithStatus.call(this, BannerModel, { itemType: this.itemType });\n\n\tnext();\n})\n@pre<Banner>('findOneAndUpdate', async function (this: Query<any, Banner>, next) {\n\tawait handlePreUpdateForSortingWithStatus.call(this, BannerModel, ['itemType']);\n\n\tnext();\n})\n@index({ title: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\nexport class Banner extends TimeStamps {\n\t@prop({ required: true, type: String, trim: true, maxlength: 50 })\n\tpublic title!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic image!: string;\n\n\t@prop({ required: true, type: String, enum: UserAppSectionItemType })\n\tpublic itemType!: UserAppSectionItemType;\n \n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: Status;\n\n\t@prop({ type: String, enum: BannerUserType, default: BannerUserType.ALL })\n\tpublic visibility?: BannerUserType;\n\n\t@prop({ ref: () => Zone, default: [] })\n\tpublic zones?: Ref<Zone>[];\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isClickable?: boolean;\n \n\t@prop({ type: String, enum: BannerClickType })\n\tpublic clickType?: BannerClickType;\n\n\t@prop({ type: String, enum: BannerLinkType })\n\tpublic linkType?: BannerLinkType;\n \n\t@prop({ type: String, trim: true })\n\tpublic link?: string;\n\n\t@prop({ ref: () => Shop })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ ref: () => Product })\n\tpublic product?: Ref<Product>;\n\n\t@prop({ ref: () => ServicePackage })\n\tpublic servicePackage?: Ref<ServicePackage>;\n\n\t@prop({ ref: () => ListContainer })\n\tpublic listContainer?: Ref<ListContainer>;\n\n\t@prop({ ref: () => UserAppSectionSetting })\n\tpublic section?: Ref<UserAppSectionSetting>;\n\n\t@prop({ type: Number })\n\tpublic sortingOrder?: number;\n}\n"]}
@@ -5,9 +5,9 @@ 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
- req: import("http").IncomingMessage;
9
8
  res: import("http").ServerResponse<import("http").IncomingMessage>;
10
9
  tokenType: TokenType | undefined;
10
+ req: import("http").IncomingMessage;
11
11
  requestId: string | undefined;
12
12
  entity: import("../context").EntityContext | undefined;
13
13
  usedRefreshToken: boolean | undefined;
@@ -4,9 +4,9 @@ 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
- req: import("http").IncomingMessage;
8
7
  res: import("http").ServerResponse<import("http").IncomingMessage>;
9
8
  tokenType: import("../../auth").TokenType | undefined;
9
+ req: import("http").IncomingMessage;
10
10
  requestId: string | undefined;
11
11
  entity: import("../context").EntityContext | undefined;
12
12
  usedRefreshToken: boolean | undefined;
@@ -3,9 +3,9 @@ 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
- req: import("http").IncomingMessage;
7
6
  res: import("http").ServerResponse<import("http").IncomingMessage>;
8
7
  tokenType: import("../../auth").TokenType | undefined;
8
+ req: import("http").IncomingMessage;
9
9
  requestId: string | undefined;
10
10
  entity: import("../context").EntityContext | undefined;
11
11
  usedRefreshToken: boolean | undefined;
@@ -5,9 +5,9 @@ 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
- req: import("http").IncomingMessage;
9
8
  res: import("http").ServerResponse<import("http").IncomingMessage>;
10
9
  tokenType: TokenType | undefined;
10
+ req: import("http").IncomingMessage;
11
11
  requestId: string | undefined;
12
12
  entity: import("../context").EntityContext | undefined;
13
13
  usedRefreshToken: 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.104
25
+ Version: 1.4.106
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.4.104",
3
+ "version": "1.4.106",
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",
@@ -26,8 +26,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
26
26
  searchFields?: string[] | undefined;
27
27
  } | undefined;
28
28
  sort?: Record<string, 1 | -1> | undefined;
29
- populate?: any;
30
29
  select?: Record<string, 0 | 1> | undefined;
30
+ populate?: any;
31
31
  query?: Record<string, any> | undefined;
32
32
  }, {
33
33
  search?: {
@@ -36,8 +36,8 @@ export declare const FilterSchema: z.ZodOptional<z.ZodObject<{
36
36
  } | undefined;
37
37
  sort?: Record<string, 1 | -1> | undefined;
38
38
  size?: number | undefined;
39
- populate?: any;
40
39
  select?: Record<string, 0 | 1> | undefined;
40
+ populate?: any;
41
41
  query?: Record<string, any> | undefined;
42
42
  page?: number | undefined;
43
43
  }>>;
@@ -736,12 +736,12 @@ export declare const GetByIdInputSchema: z.ZodObject<{
736
736
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
737
737
  }, "strip", z.ZodTypeAny, {
738
738
  _id: import("mongoose").Types.ObjectId;
739
- populate?: any;
740
739
  select?: Record<string, 0 | 1> | undefined;
740
+ populate?: any;
741
741
  }, {
742
742
  _id: string | import("mongoose").Types.ObjectId;
743
- populate?: any;
744
743
  select?: Record<string, 0 | 1> | undefined;
744
+ populate?: any;
745
745
  }>;
746
746
  export type GetByIdInputDTO = DTO<typeof GetByIdInputSchema>;
747
747
  export declare const GetProductByIdInputSchema: z.ZodObject<{
@@ -754,12 +754,12 @@ export declare const GetProductByIdInputSchema: z.ZodObject<{
754
754
  _id: import("mongoose").Types.ObjectId;
755
755
  withAttributeHiddenItems: boolean;
756
756
  withAddonsHiddenItems: boolean;
757
- populate?: any;
758
757
  select?: Record<string, 0 | 1> | undefined;
758
+ populate?: any;
759
759
  }, {
760
760
  _id: string | import("mongoose").Types.ObjectId;
761
- populate?: any;
762
761
  select?: Record<string, 0 | 1> | undefined;
762
+ populate?: any;
763
763
  withAttributeHiddenItems?: boolean | undefined;
764
764
  withAddonsHiddenItems?: boolean | undefined;
765
765
  }>;
@@ -773,15 +773,15 @@ export declare const GetOrderByIdInputSchema: z.ZodObject<{
773
773
  userOrderCompletionScope: z.ZodOptional<z.ZodNativeEnum<typeof UserOrderCompletionScope>>;
774
774
  }, "strip", z.ZodTypeAny, {
775
775
  _id: import("mongoose").Types.ObjectId;
776
- populate?: any;
777
776
  select?: Record<string, 0 | 1> | undefined;
777
+ populate?: any;
778
778
  groupByCategories?: boolean | undefined;
779
779
  getParentCategory?: boolean | undefined;
780
780
  userOrderCompletionScope?: UserOrderCompletionScope | undefined;
781
781
  }, {
782
782
  _id: string | import("mongoose").Types.ObjectId;
783
- populate?: any;
784
783
  select?: Record<string, 0 | 1> | undefined;
784
+ populate?: any;
785
785
  groupByCategories?: boolean | undefined;
786
786
  getParentCategory?: boolean | undefined;
787
787
  userOrderCompletionScope?: UserOrderCompletionScope | undefined;
@@ -791,11 +791,11 @@ export declare const GetByTokenInputSchema: z.ZodOptional<z.ZodObject<{
791
791
  select: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>>>;
792
792
  populate: z.ZodOptional<z.ZodUnion<[z.ZodType<any, z.ZodTypeDef, any>, z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">]>>;
793
793
  }, "strip", z.ZodTypeAny, {
794
- populate?: any;
795
794
  select?: Record<string, 0 | 1> | undefined;
796
- }, {
797
795
  populate?: any;
796
+ }, {
798
797
  select?: Record<string, 0 | 1> | undefined;
798
+ populate?: any;
799
799
  }>>;
800
800
  export type GetByTokenInputDTO = DTO<typeof GetByTokenInputSchema>;
801
801
  export declare const GetOneQuerySchema: z.ZodObject<{
@@ -803,12 +803,12 @@ 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
- populate?: any;
807
806
  select?: Record<string, 0 | 1> | undefined;
807
+ populate?: any;
808
808
  query?: Record<string, any> | undefined;
809
809
  }, {
810
- populate?: any;
811
810
  select?: Record<string, 0 | 1> | undefined;
811
+ populate?: any;
812
812
  query?: Record<string, any> | undefined;
813
813
  }>;
814
814
  export type GetOneQueryDTO = DTO<typeof GetOneQuerySchema>;
@@ -10,11 +10,13 @@ const utc_1 = __importDefault(require("dayjs/plugin/utc"));
10
10
  const minMax_1 = __importDefault(require("dayjs/plugin/minMax"));
11
11
  const timezone_1 = __importDefault(require("dayjs/plugin/timezone"));
12
12
  const duration_1 = __importDefault(require("dayjs/plugin/duration"));
13
+ const isoWeek_1 = __importDefault(require("dayjs/plugin/isoWeek"));
13
14
  const time_1 = require("../time");
14
15
  dayjs_1.default.extend(utc_1.default);
15
16
  dayjs_1.default.extend(timezone_1.default);
16
17
  dayjs_1.default.extend(minMax_1.default);
17
18
  dayjs_1.default.extend(duration_1.default);
19
+ dayjs_1.default.extend(isoWeek_1.default);
18
20
  let DEFAULT_TIMEZONE = 'Asia/Beirut';
19
21
  const dayjsWithTimezone = ((date, format, tz) => {
20
22
  const targetTimezone = tz || DEFAULT_TIMEZONE;
@@ -1 +1 @@
1
- {"version":3,"file":"dayjs.js","sourceRoot":"/","sources":["utilities/dayjs/dayjs.ts"],"names":[],"mappings":";;;;;;AAoDA,8BAEC;AAtDD,kDAAqC;AACrC,2DAAmC;AACnC,iEAAyC;AACzC,qEAA6C;AAC7C,qEAA6C;AAC7C,kCAAmD;AAEnD,eAAK,CAAC,MAAM,CAAC,aAAG,CAAC,CAAC;AAClB,eAAK,CAAC,MAAM,CAAC,kBAAQ,CAAC,CAAC;AACvB,eAAK,CAAC,MAAM,CAAC,gBAAM,CAAC,CAAC;AACrB,eAAK,CAAC,MAAM,CAAC,kBAAQ,CAAC,CAAC;AAEvB,IAAI,gBAAgB,GAAG,aAAa,CAAC;AAWrC,MAAM,iBAAiB,GAAG,CAAC,CAAC,IAAU,EAAE,MAAY,EAAE,EAAW,EAAE,EAAE;IACpE,MAAM,cAAc,GAAG,EAAE,IAAI,gBAAgB,CAAC;IAE9C,IAAA,+BAAwB,EAAC,cAAc,CAAC,CAAC;IAEzC,IAAI,MAAM,EAAE,CAAC;QACZ,OAAO,IAAA,eAAK,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,IAAA,eAAK,EAAC,IAAI,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;AACvC,CAAC,CAAsB,CAAC;AAExB,MAAM,CAAC,IAAI,CAAC,eAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;IAC/B,iBAAyB,CAAC,GAAG,CAAC,GAAI,eAAa,CAAC,GAAG,CAAC,CAAC;AACvD,CAAC,CAAC,CAAC;AAEH,iBAAiB,CAAC,WAAW,GAAG,CAAC,QAAgB,EAAE,EAAE;IACpD,gBAAgB,GAAG,QAAQ,CAAC;AAC7B,CAAC,CAAC;AAEF,iBAAiB,CAAC,WAAW,GAAG,GAAG,EAAE,CAAC,gBAAgB,CAAC;AAEvD,iBAAiB,CAAC,GAAG,GAAG,eAAK,CAAC,GAAG,CAAC;AAClC,iBAAiB,CAAC,GAAG,GAAG,eAAK,CAAC,GAAG,CAAC;AAClC,iBAAiB,CAAC,QAAQ,GAAG,eAAK,CAAC,QAAQ,CAAC;AAErC,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;IAChD,gBAAgB,GAAG,QAAQ,CAAC;AAC7B,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEF,SAAgB,SAAS,CAAC,KAAW,EAAE,KAAW;IACjD,OAAO,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,eAAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;AACzD,CAAC;AAGD,kBAAe,iBAAiB,CAAC","sourcesContent":["import dayjs, { Dayjs } from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport minMax from 'dayjs/plugin/minMax';\nimport timezone from 'dayjs/plugin/timezone';\nimport duration from 'dayjs/plugin/duration';\nimport { _setLyxaTimezoneVariable } from '../time';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(minMax);\ndayjs.extend(duration);\n\nlet DEFAULT_TIMEZONE = 'Asia/Beirut';\n\ntype DayjsWithTimezone = {\n\t(date?: any, format?: any, tz?: string): Dayjs;\n\tsetTimezone(timezone: string): void;\n\tgetTimezone(): string;\n\tmax(...dates: (Dayjs | undefined)[]): Dayjs;\n\tmin(...dates: (Dayjs | undefined)[]): Dayjs;\n\tduration: typeof dayjs.duration;\n} & typeof dayjs;\n\nconst dayjsWithTimezone = ((date?: any, format?: any, tz?: string) => {\n\tconst targetTimezone = tz || DEFAULT_TIMEZONE;\n\n\t_setLyxaTimezoneVariable(targetTimezone);\n\n\tif (format) {\n\t\treturn dayjs(date, format).tz(targetTimezone);\n\t}\n\treturn dayjs(date).tz(targetTimezone);\n}) as DayjsWithTimezone;\n\nObject.keys(dayjs).forEach(key => {\n\t(dayjsWithTimezone as any)[key] = (dayjs as any)[key];\n});\n\ndayjsWithTimezone.setTimezone = (timezone: string) => {\n\tDEFAULT_TIMEZONE = timezone;\n};\n\ndayjsWithTimezone.getTimezone = () => DEFAULT_TIMEZONE;\n\ndayjsWithTimezone.max = dayjs.max;\ndayjsWithTimezone.min = dayjs.min;\ndayjsWithTimezone.duration = dayjs.duration;\n\nexport const _setTimezone = (timezone: string) => {\n\tDEFAULT_TIMEZONE = timezone;\n};\n\nexport function isSameDay(date1: Date, date2: Date): boolean {\n\treturn dayjs.utc(date1).isSame(dayjs.utc(date2), 'day');\n}\n\nexport type { Dayjs };\nexport default dayjsWithTimezone;\n"]}
1
+ {"version":3,"file":"dayjs.js","sourceRoot":"/","sources":["utilities/dayjs/dayjs.ts"],"names":[],"mappings":";;;;;;AAsDA,8BAEC;AAxDD,kDAAqC;AACrC,2DAAmC;AACnC,iEAAyC;AACzC,qEAA6C;AAC7C,qEAA6C;AAC7C,mEAA2C;AAC3C,kCAAmD;AAEnD,eAAK,CAAC,MAAM,CAAC,aAAG,CAAC,CAAC;AAClB,eAAK,CAAC,MAAM,CAAC,kBAAQ,CAAC,CAAC;AACvB,eAAK,CAAC,MAAM,CAAC,gBAAM,CAAC,CAAC;AACrB,eAAK,CAAC,MAAM,CAAC,kBAAQ,CAAC,CAAC;AACvB,eAAK,CAAC,MAAM,CAAC,iB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AAK,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC;AACzD,CAAC;AAGD,kBAAe,iBAAiB,CAAC","sourcesContent":["import dayjs, { Dayjs } from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport minMax from 'dayjs/plugin/minMax';\nimport timezone from 'dayjs/plugin/timezone';\nimport duration from 'dayjs/plugin/duration';\nimport isoWeek from 'dayjs/plugin/isoWeek';\nimport { _setLyxaTimezoneVariable } from '../time';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\ndayjs.extend(minMax);\ndayjs.extend(duration);\ndayjs.extend(isoWeek);\n\nlet DEFAULT_TIMEZONE = 'Asia/Beirut';\n\ntype DayjsWithTimezone = {\n\t(date?: any, format?: any, tz?: string): Dayjs;\n\tsetTimezone(timezone: string): void;\n\tgetTimezone(): string;\n\tmax(...dates: (Dayjs | undefined)[]): Dayjs;\n\tmin(...dates: (Dayjs | undefined)[]): Dayjs;\n\tduration: typeof dayjs.duration;\n} & typeof dayjs;\n\nconst dayjsWithTimezone = ((date?: any, format?: any, tz?: string) => {\n\tconst targetTimezone = tz || DEFAULT_TIMEZONE;\n\n\t_setLyxaTimezoneVariable(targetTimezone);\n\n\tif (format) {\n\t\treturn dayjs(date, format).tz(targetTimezone);\n\t}\n\treturn dayjs(date).tz(targetTimezone);\n}) as DayjsWithTimezone;\n\nObject.keys(dayjs).forEach(key => {\n\t(dayjsWithTimezone as any)[key] = (dayjs as any)[key];\n});\n\ndayjsWithTimezone.setTimezone = (timezone: string) => {\n\tDEFAULT_TIMEZONE = timezone;\n};\n\ndayjsWithTimezone.getTimezone = () => DEFAULT_TIMEZONE;\n\ndayjsWithTimezone.max = dayjs.max;\ndayjsWithTimezone.min = dayjs.min;\ndayjsWithTimezone.duration = dayjs.duration;\n\nexport const _setTimezone = (timezone: string) => {\n\tDEFAULT_TIMEZONE = timezone;\n};\n\nexport function isSameDay(date1: Date, date2: Date): boolean {\n\treturn dayjs.utc(date1).isSame(dayjs.utc(date2), 'day');\n}\n\nexport type { Dayjs };\nexport default dayjsWithTimezone;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.4.104",
3
+ "version": "1.4.106",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",