@lyxa.ai/core 1.4.54 → 1.4.55

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.
@@ -7,7 +7,9 @@ import { AccountType, ItemType, ServiceType, SettlementType } from '../../../uti
7
7
  import { User } from './user.model';
8
8
  import { Admin } from './admin.model';
9
9
  import { Parent } from './parent.model';
10
- import { ServiceBooking, Vendor, VendorParent } from '.';
10
+ import { ServiceBooking } from './service-booking.model';
11
+ import { Vendor } from './vendor.model';
12
+ import { VendorParent } from './vendor-parent.model';
11
13
  export declare class FinanceSettlement extends TimeStamps {
12
14
  settlementId: string;
13
15
  accountType: AccountType;
@@ -20,6 +20,9 @@ const user_model_1 = require("./user.model");
20
20
  const admin_model_1 = require("./admin.model");
21
21
  const parent_model_1 = require("./parent.model");
22
22
  const _1 = require(".");
23
+ const service_booking_model_1 = require("./service-booking.model");
24
+ const vendor_model_1 = require("./vendor.model");
25
+ const vendor_parent_model_1 = require("./vendor-parent.model");
23
26
  const id_generator_1 = require("../../../utilities/id-generator");
24
27
  let FinanceSettlement = class FinanceSettlement extends defaultClasses_1.TimeStamps {
25
28
  settlementId;
@@ -64,7 +67,7 @@ __decorate([
64
67
  __metadata("design:type", Object)
65
68
  ], FinanceSettlement.prototype, "order", void 0);
66
69
  __decorate([
67
- (0, typegoose_1.prop)({ ref: () => _1.ServiceBooking, index: true }),
70
+ (0, typegoose_1.prop)({ ref: () => service_booking_model_1.ServiceBooking, index: true }),
68
71
  __metadata("design:type", Object)
69
72
  ], FinanceSettlement.prototype, "serviceBooking", void 0);
70
73
  __decorate([
@@ -84,11 +87,11 @@ __decorate([
84
87
  __metadata("design:type", String)
85
88
  ], FinanceSettlement.prototype, "itemType", void 0);
86
89
  __decorate([
87
- (0, typegoose_1.prop)({ ref: () => _1.VendorParent, index: true }),
90
+ (0, typegoose_1.prop)({ ref: () => vendor_parent_model_1.VendorParent, index: true }),
88
91
  __metadata("design:type", Object)
89
92
  ], FinanceSettlement.prototype, "vendorParent", void 0);
90
93
  __decorate([
91
- (0, typegoose_1.prop)({ ref: () => _1.Vendor, index: true }),
94
+ (0, typegoose_1.prop)({ ref: () => vendor_model_1.Vendor, index: true }),
92
95
  __metadata("design:type", Object)
93
96
  ], FinanceSettlement.prototype, "vendor", void 0);
94
97
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"finance-settlement.model.js","sourceRoot":"/","sources":["libraries/mongo/models/finance-settlement.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,+CAAsC;AACtC,6CAAoC;AACpC,+CAAsC;AACtC,kDAA0G;AAC1G,6CAAoC;AACpC,+CAAsC;AACtC,iDAAwC;AACxC,wBAAuE;AACvE,kEAA6D;AAUtD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2BAAU;IAEzC,YAAY,CAAS;IAGrB,WAAW,CAAe;IAG1B,KAAK,CAAc;IAGnB,cAAc,CAAuB;IAGrC,OAAO,CAAU;IAGjB,MAAM,CAAe;IAGrB,IAAI,CAAa;IAGjB,QAAQ,CAAY;IAGpB,YAAY,CAAqB;IAGjC,MAAM,CAAe;IAGrB,WAAW,CAAe;IAG1B,KAAK,CAAc;IAGnB,IAAI,CAAa;IAGjB,cAAc,CAAkB;IAGhC,MAAM,CAAU;IAGhB,eAAe,CAAU;IAGzB,eAAe,CAAU;IAGzB,wBAAwB,CAAU;IAGlC,kBAAkB,CAAU;IAG5B,2BAA2B,CAAU;IAGrC,cAAc,CAAU;IAGxB,uBAAuB,CAAU;IAGjC,UAAU,CAAU;IAGpB,mBAAmB,CAAU;IAG7B,eAAe,CAAU;IAGzB,QAAQ,CAAc;IAGtB,SAAS,CAAU;CAC1B,CAAA;AAjFY,8CAAiB;AAEtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;uDACtB;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,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;;8DACC;AAG7B;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;0DACS;AAGzB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,mBAAK,EAAE,CAAC;;mDACE;AAGtB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;;oDACb;4BAhFd,iBAAiB;IAR7B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;IACrE,IAAA,iBAAK,EAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3C,IAAA,iBAAK,EAAC,EAAE,WAAW,EAAE,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;IAC3D,IAAA,eAAG,EAAoB,MAAM,EAAE,KAAK;QACpC,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,YAAY,GAAG,MAAM,IAAA,yBAAU,EAAC,eAAY,EAAE,kBAAW,CAAC,WAAW,CAAC,CAAC;QAC7E,CAAC;IACF,CAAC,CAAC;GACW,iBAAiB,CAiF7B","sourcesContent":["import { index, modelOptions, pre, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { Order } from './order.model';\nimport { Shop } from './shop.model';\nimport { Rider } from './rider.model';\nimport { AccountType, CounterType, ItemType, ServiceType, SettlementType } from '../../../utilities/enum';\nimport { User } from './user.model';\nimport { Admin } from './admin.model';\nimport { Parent } from './parent.model';\nimport { CounterModel, ServiceBooking, Vendor, VendorParent } from '.';\nimport { generateId } from '../../../utilities/id-generator';\n\n@modelOptions({ schemaOptions: { collection: 'financeSettlements' } })\n@index({ settlementType: 1, createdAt: -1 })\n@index({ accountType: 1, settlementType: 1, createdAt: -1 })\n@pre<FinanceSettlement>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.settlementId = await generateId(CounterModel, CounterType.TRANSACTION);\n\t}\n})\nexport class FinanceSettlement extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic settlementId: string;\n\n\t@prop({ required: true, type: String, enum: AccountType })\n\tpublic accountType!: AccountType;\n\n\t@prop({ ref: () => Order, index: true })\n\tpublic order?: Ref<Order>;\n\n\t@prop({ ref: () => ServiceBooking, index: true })\n\tpublic serviceBooking?: Ref<ServiceBooking>;\n\n\t@prop({ type: String, index: true })\n\tpublic orderId?: string;\n\n\t@prop({ ref: () => Parent, index: true })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop, index: true })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ type: String, enum: ItemType, index: true })\n\tpublic itemType?: ItemType;\n\n\t@prop({ ref: () => VendorParent, index: true })\n\tpublic vendorParent?: Ref<VendorParent>;\n\n\t@prop({ ref: () => Vendor, index: true })\n\tpublic vendor?: Ref<Vendor>;\n\n\t@prop({ type: String, enum: ServiceType, index: true })\n\tpublic serviceType?: ServiceType;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ ref: () => User, index: true })\n\tpublic user?: Ref<User>;\n\n\t@prop({ required: true, type: String, enum: SettlementType })\n\tpublic settlementType!: SettlementType;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic cashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic secondaryCashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic companyVat?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic secondaryCompanyVat?: number;\n\n\t@prop({ type: String })\n\tpublic paymentIntentId?: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic settleBy?: Ref<Admin>;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic adminNote?: string;\n}\n"]}
1
+ {"version":3,"file":"finance-settlement.model.js","sourceRoot":"/","sources":["libraries/mongo/models/finance-settlement.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAA2E;AAC3E,4EAAqE;AACrE,+CAAsC;AACtC,6CAAoC;AACpC,+CAAsC;AACtC,kDAA0G;AAC1G,6CAAoC;AACpC,+CAAsC;AACtC,iDAAwC;AACxC,wBAAiC;AACjC,mEAAyD;AACzD,iDAAwC;AACxC,+DAAqD;AACrD,kEAA6D;AAUtD,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,2BAAU;IAEzC,YAAY,CAAS;IAGrB,WAAW,CAAe;IAG1B,KAAK,CAAc;IAGnB,cAAc,CAAuB;IAGrC,OAAO,CAAU;IAGjB,MAAM,CAAe;IAGrB,IAAI,CAAa;IAGjB,QAAQ,CAAY;IAGpB,YAAY,CAAqB;IAGjC,MAAM,CAAe;IAGrB,WAAW,CAAe;IAG1B,KAAK,CAAc;IAGnB,IAAI,CAAa;IAGjB,cAAc,CAAkB;IAGhC,MAAM,CAAU;IAGhB,eAAe,CAAU;IAGzB,eAAe,CAAU;IAGzB,wBAAwB,CAAU;IAGlC,kBAAkB,CAAU;IAG5B,2BAA2B,CAAU;IAGrC,cAAc,CAAU;IAGxB,uBAAuB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defaultClasses';\nimport { Order } from './order.model';\nimport { Shop } from './shop.model';\nimport { Rider } from './rider.model';\nimport { AccountType, CounterType, ItemType, ServiceType, SettlementType } from '../../../utilities/enum';\nimport { User } from './user.model';\nimport { Admin } from './admin.model';\nimport { Parent } from './parent.model';\nimport { CounterModel } from '.';\nimport { ServiceBooking } from './service-booking.model';\nimport { Vendor } from './vendor.model';\nimport { VendorParent } from './vendor-parent.model';\nimport { generateId } from '../../../utilities/id-generator';\n\n@modelOptions({ schemaOptions: { collection: 'financeSettlements' } })\n@index({ settlementType: 1, createdAt: -1 })\n@index({ accountType: 1, settlementType: 1, createdAt: -1 })\n@pre<FinanceSettlement>('save', async function () {\n\tif (this.isNew) {\n\t\tthis.settlementId = await generateId(CounterModel, CounterType.TRANSACTION);\n\t}\n})\nexport class FinanceSettlement extends TimeStamps {\n\t@prop({ type: String, unique: true, index: true })\n\tpublic settlementId: string;\n\n\t@prop({ required: true, type: String, enum: AccountType })\n\tpublic accountType!: AccountType;\n\n\t@prop({ ref: () => Order, index: true })\n\tpublic order?: Ref<Order>;\n\n\t@prop({ ref: () => ServiceBooking, index: true })\n\tpublic serviceBooking?: Ref<ServiceBooking>;\n\n\t@prop({ type: String, index: true })\n\tpublic orderId?: string;\n\n\t@prop({ ref: () => Parent, index: true })\n\tpublic parent?: Ref<Parent>;\n\n\t@prop({ ref: () => Shop, index: true })\n\tpublic shop?: Ref<Shop>;\n\n\t@prop({ type: String, enum: ItemType, index: true })\n\tpublic itemType?: ItemType;\n\n\t@prop({ ref: () => VendorParent, index: true })\n\tpublic vendorParent?: Ref<VendorParent>;\n\n\t@prop({ ref: () => Vendor, index: true })\n\tpublic vendor?: Ref<Vendor>;\n\n\t@prop({ type: String, enum: ServiceType, index: true })\n\tpublic serviceType?: ServiceType;\n\n\t@prop({ ref: () => Rider, index: true })\n\tpublic rider?: Ref<Rider>;\n\n\t@prop({ ref: () => User, index: true })\n\tpublic user?: Ref<User>;\n\n\t@prop({ required: true, type: String, enum: SettlementType })\n\tpublic settlementType!: SettlementType;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmount?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromItems?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic amountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 })\n\tpublic secondaryAmountFromDelivery?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic cashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for removing cashback when refund order\n\tpublic secondaryCashbackAmount?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic companyVat?: number;\n\n\t@prop({ type: Number, default: 0 }) // used for adding to shop and removing from company VAT when refund order\n\tpublic secondaryCompanyVat?: number;\n\n\t@prop({ type: String })\n\tpublic paymentIntentId?: string;\n\n\t@prop({ ref: () => Admin })\n\tpublic settleBy?: Ref<Admin>;\n\n\t@prop({ type: String, maxlength: 250 })\n\tpublic adminNote?: 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.4.54
25
+ Version: 1.4.55
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.4.54",
3
+ "version": "1.4.55",
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.54",
3
+ "version": "1.4.55",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",