@lyxa.ai/core 1.2.35 → 1.2.36

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.
@@ -10,4 +10,5 @@ export declare class ShopAccessControl extends TimeStamps {
10
10
  parent?: Ref<Parent>;
11
11
  shops?: Ref<Shop>[];
12
12
  role: ShopRole;
13
+ status?: string;
13
14
  }
@@ -23,6 +23,7 @@ let ShopAccessControl = class ShopAccessControl extends defaultClasses_1.TimeSta
23
23
  parent;
24
24
  shops;
25
25
  role;
26
+ status;
26
27
  };
27
28
  exports.ShopAccessControl = ShopAccessControl;
28
29
  __decorate([
@@ -49,6 +50,10 @@ __decorate([
49
50
  (0, typegoose_1.prop)({ required: true, type: String, enum: enum_1.ShopRole }),
50
51
  __metadata("design:type", String)
51
52
  ], ShopAccessControl.prototype, "role", void 0);
53
+ __decorate([
54
+ (0, typegoose_1.prop)({ type: String, enum: enum_1.Status, default: enum_1.Status.ACTIVE }),
55
+ __metadata("design:type", String)
56
+ ], ShopAccessControl.prototype, "status", void 0);
52
57
  exports.ShopAccessControl = ShopAccessControl = __decorate([
53
58
  (0, typegoose_1.pre)('save', async function (next) {
54
59
  if (this.isModified('password')) {
@@ -1 +1 @@
1
- {"version":3,"file":"shop-access-control.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-access-control.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AAErE,kDAAmD;AACnD,iDAAwC;AACxC,6CAAoC;AACpC,0DAA2D;AAkBpD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2BAAU;IAEzC,IAAI,CAAU;IAGd,KAAK,CAAU;IAGf,QAAQ,CAAU;IAGlB,MAAM,CAAe;IAGrB,KAAK,CAAe;IAGpB,IAAI,CAAY;CACvB,CAAA;AAlBY,8CAAiB;AAEtB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,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AAE,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;IACnF,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;GACzD,iBAAiB,CAkB7B","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Query } from 'mongoose';\nimport { ShopRole } from '../../../utilities/enum';\nimport { Parent } from './parent.model';\nimport { Shop } from './shop.model';\nimport { hashPassword } from '../../../utilities/password';\n\n@pre<ShopAccessControl>('save', async function (next) {\n\tif (this.isModified('password')) {\n\t\tthis.password = await hashPassword(this.password);\n\t}\n\tnext();\n})\n@pre<Query<any, ShopAccessControl>>('findOneAndUpdate', async function (next) {\n\tconst update = this.getUpdate() as Record<string, any>;\n\tif (update?.password) {\n\t\tupdate.password = await hashPassword(update.password);\n\t\tthis.setUpdate(update);\n\t}\n\tnext();\n})\n@index({ email: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@modelOptions({ schemaOptions: { collection: 'shopAccessControls' } })\nexport class ShopAccessControl extends TimeStamps {\n\t@prop({ required: true, type: String, maxlength: 50 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: true, type: String, minlength: 8 })\n\tpublic password!: string;\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ required: true, type: String, enum: ShopRole })\n\tpublic role!: ShopRole;\n}\n"]}
1
+ {"version":3,"file":"shop-access-control.model.js","sourceRoot":"/","sources":["libraries/mongo/models/shop-access-control.model.ts"],"names":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EAAE,KAAK,WAAW,IAAI;QACnD,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnD,CAAC;QACD,IAAI,EAAE,CAAC;IACR,CAAC,CAAC;IACD,IAAA,eAAG,EAAgC,kBAAkB,EAAE,KAAK,WAAW,IAAI;QAC3E,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAyB,CAAC;QACvD,IAAI,MAAM,EAAE,QAAQ,EAAE,CAAC;YACtB,MAAM,CAAC,QAAQ,GAAG,MAAM,IAAA,uBAAY,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YACtD,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACxB,CAAC;QACD,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;IACnF,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;GACzD,iBAAiB,CAqB7B","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Query } from 'mongoose';\nimport { ShopRole, Status } from '../../../utilities/enum';\nimport { Parent } from './parent.model';\nimport { Shop } from './shop.model';\nimport { hashPassword } from '../../../utilities/password';\n\n@pre<ShopAccessControl>('save', async function (next) {\n\tif (this.isModified('password')) {\n\t\tthis.password = await hashPassword(this.password);\n\t}\n\tnext();\n})\n@pre<Query<any, ShopAccessControl>>('findOneAndUpdate', async function (next) {\n\tconst update = this.getUpdate() as Record<string, any>;\n\tif (update?.password) {\n\t\tupdate.password = await hashPassword(update.password);\n\t\tthis.setUpdate(update);\n\t}\n\tnext();\n})\n@index({ email: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\n@modelOptions({ schemaOptions: { collection: 'shopAccessControls' } })\nexport class ShopAccessControl extends TimeStamps {\n\t@prop({ required: true, type: String, maxlength: 50 })\n\tpublic name!: string;\n\n\t@prop({ required: true, type: String })\n\tpublic email!: string;\n\n\t@prop({ required: true, type: String, minlength: 8 })\n\tpublic password!: string;\n\n\t@prop({ required: true, ref: () => Parent })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop, default: [] })\n\tpublic shops?: Ref<Shop>[];\n\n\t@prop({ required: true, type: String, enum: ShopRole })\n\tpublic role!: ShopRole;\n\n\t@prop({ type: String, enum: Status, default: Status.ACTIVE })\n\tpublic status?: string;\n}\n"]}
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.2.35
25
+ Version: 1.2.36
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.2.35",
3
+ "version": "1.2.36",
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.2.35",
3
+ "version": "1.2.36",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",