@lyxa.ai/core 1.2.19 → 1.2.20

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,13 +3,18 @@ import { AdjustmentReason } from '../../../../utilities/enum';
3
3
  import { Product } from '../product.model';
4
4
  import { LineItem } from '../line-item.model';
5
5
  import { Admin } from '../admin.model';
6
+ import { User } from '../user.model';
6
7
  export declare class AdjustedLineItem {
7
8
  lineItem: Ref<LineItem>;
8
9
  note?: string;
9
10
  }
11
+ export declare class SuggestedProduct {
12
+ user: Ref<User>;
13
+ products: Ref<Product>[];
14
+ }
10
15
  export declare class AdjustmentInformation {
11
16
  reason?: AdjustmentReason;
12
- suggestedProduct?: Ref<Product>[];
17
+ suggestedProduct?: SuggestedProduct[];
13
18
  adjustedLineItems?: AdjustedLineItem[];
14
19
  requestedAt?: Date;
15
20
  resolvedAt?: Date;
@@ -9,12 +9,13 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.AdjustmentInformation = exports.AdjustedLineItem = void 0;
12
+ exports.AdjustmentInformation = exports.SuggestedProduct = exports.AdjustedLineItem = void 0;
13
13
  const typegoose_1 = require("@typegoose/typegoose");
14
14
  const enum_1 = require("../../../../utilities/enum");
15
15
  const product_model_1 = require("../product.model");
16
16
  const line_item_model_1 = require("../line-item.model");
17
17
  const admin_model_1 = require("../admin.model");
18
+ const user_model_1 = require("../user.model");
18
19
  class AdjustedLineItem {
19
20
  lineItem;
20
21
  note;
@@ -28,6 +29,19 @@ __decorate([
28
29
  (0, typegoose_1.prop)({ type: String, maxlength: 150 }),
29
30
  __metadata("design:type", String)
30
31
  ], AdjustedLineItem.prototype, "note", void 0);
32
+ class SuggestedProduct {
33
+ user;
34
+ products;
35
+ }
36
+ exports.SuggestedProduct = SuggestedProduct;
37
+ __decorate([
38
+ (0, typegoose_1.prop)({ required: true, ref: () => user_model_1.User }),
39
+ __metadata("design:type", Object)
40
+ ], SuggestedProduct.prototype, "user", void 0);
41
+ __decorate([
42
+ (0, typegoose_1.prop)({ ref: () => product_model_1.Product, default: [] }),
43
+ __metadata("design:type", Array)
44
+ ], SuggestedProduct.prototype, "products", void 0);
31
45
  class AdjustmentInformation {
32
46
  reason;
33
47
  suggestedProduct;
@@ -43,7 +57,7 @@ __decorate([
43
57
  __metadata("design:type", String)
44
58
  ], AdjustmentInformation.prototype, "reason", void 0);
45
59
  __decorate([
46
- (0, typegoose_1.prop)({ ref: () => product_model_1.Product, default: [] }),
60
+ (0, typegoose_1.prop)({ type: () => [SuggestedProduct], default: [] }),
47
61
  __metadata("design:type", Array)
48
62
  ], AdjustmentInformation.prototype, "suggestedProduct", void 0);
49
63
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"adjustment-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/adjustment-information.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAA8D;AAC9D,oDAA2C;AAC3C,wDAA8C;AAC9C,gDAAuC;AAEvC,MAAa,gBAAgB;IAErB,QAAQ,CAAiB;IAGzB,IAAI,CAAU;CACrB;AAND,4CAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC;;kDACd;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;8CAClB;AAEtB,MAAa,qBAAqB;IAE1B,MAAM,CAAoB;IAG1B,gBAAgB,CAAkB;IAGlC,iBAAiB,CAAsB;IAGvC,WAAW,CAAQ;IAGnB,UAAU,CAAQ;IAGlB,KAAK,CAAc;IAGnB,eAAe,CAAW;CACjC;AArBD,sDAqBC;AAnBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAgB,EAAE,CAAC;;qDACd;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,uBAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;+DACD;AAGlC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;gEACR;AAGvC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAC3B,IAAI;0DAAC;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;8BACP,IAAI;yDAAC;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;oDACD;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACP","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { AdjustmentReason } from '../../../../utilities/enum';\nimport { Product } from '../product.model';\nimport { LineItem } from '../line-item.model';\nimport { Admin } from '../admin.model';\n\nexport class AdjustedLineItem {\n\t@prop({ required: true, ref: () => LineItem })\n\tpublic lineItem!: Ref<LineItem>;\n\n\t@prop({ type: String, maxlength: 150 })\n\tpublic note?: string;\n}\nexport class AdjustmentInformation {\n\t@prop({ type: String, enum: AdjustmentReason })\n\tpublic reason?: AdjustmentReason;\n\n\t@prop({ ref: () => Product, default: [] })\n\tpublic suggestedProduct?: Ref<Product>[];\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic adjustedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: Date, default: () => new Date() })\n\tpublic requestedAt?: Date;\n\n\t@prop({ type: () => Date })\n\tpublic resolvedAt?: Date;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRequestByShop?: boolean;\n}\n"]}
1
+ {"version":3,"file":"adjustment-information.model.js","sourceRoot":"/","sources":["libraries/mongo/models/embedded/adjustment-information.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAiD;AACjD,qDAA8D;AAC9D,oDAA2C;AAC3C,wDAA8C;AAC9C,gDAAuC;AACvC,8CAAqC;AAErC,MAAa,gBAAgB;IAErB,QAAQ,CAAiB;IAGzB,IAAI,CAAU;CACrB;AAND,4CAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,0BAAQ,EAAE,CAAC;;kDACd;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;8CAClB;AAGtB,MAAa,gBAAgB;IAErB,IAAI,CAAY;IAGhB,QAAQ,CAAiB;CAChC;AAND,4CAMC;AAJO;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;8CACnB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,uBAAO,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;kDACV;AAEjC,MAAa,qBAAqB;IAE1B,MAAM,CAAoB;IAG1B,gBAAgB,CAAsB;IAGtC,iBAAiB,CAAsB;IAGvC,WAAW,CAAQ;IAGnB,UAAU,CAAQ;IAGlB,KAAK,CAAc;IAGnB,eAAe,CAAW;CACjC;AArBD,sDAqBC;AAnBO;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAgB,EAAE,CAAC;;qDACd;AAG1B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;+DACT;AAGtC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;gEACR;AAGvC;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;8BAC3B,IAAI;0DAAC;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;8BACP,IAAI;yDAAC;AAGlB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;oDACD;AAGnB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8DACP","sourcesContent":["import { prop, Ref } from '@typegoose/typegoose';\nimport { AdjustmentReason } from '../../../../utilities/enum';\nimport { Product } from '../product.model';\nimport { LineItem } from '../line-item.model';\nimport { Admin } from '../admin.model';\nimport { User } from '../user.model';\n\nexport class AdjustedLineItem {\n\t@prop({ required: true, ref: () => LineItem })\n\tpublic lineItem!: Ref<LineItem>;\n\n\t@prop({ type: String, maxlength: 150 })\n\tpublic note?: string;\n}\n\nexport class SuggestedProduct {\n\t@prop({ required: true, ref: () => User })\n\tpublic user: Ref<User>;\n\n\t@prop({ ref: () => Product, default: [] })\n\tpublic products: Ref<Product>[];\n}\nexport class AdjustmentInformation {\n\t@prop({ type: String, enum: AdjustmentReason })\n\tpublic reason?: AdjustmentReason;\n\n\t@prop({ type: () => [SuggestedProduct], default: [] })\n\tpublic suggestedProduct?: SuggestedProduct[];\n\n\t@prop({ type: () => [AdjustedLineItem], default: [] })\n\tpublic adjustedLineItems?: AdjustedLineItem[];\n\n\t@prop({ type: Date, default: () => new Date() })\n\tpublic requestedAt?: Date;\n\n\t@prop({ type: () => Date })\n\tpublic resolvedAt?: Date;\n\n\t@prop({ ref: () => Admin })\n\tpublic admin?: Ref<Admin>;\n\n\t@prop({ type: Boolean, default: false })\n\tpublic isRequestByShop?: boolean;\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.19
25
+ Version: 1.2.20
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.2.19",
3
+ "version": "1.2.20",
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.19",
3
+ "version": "1.2.20",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",