@lyxa.ai/core 1.4.184 → 1.4.185
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.
- package/dist/libraries/mongo/models/delivery-charges.model.d.ts +0 -2
- package/dist/libraries/mongo/models/delivery-charges.model.js +0 -10
- package/dist/libraries/mongo/models/delivery-charges.model.js.map +1 -1
- package/dist/types/README.md +1 -1
- package/dist/types/package.json +1 -1
- package/package.json +1 -1
|
@@ -21,9 +21,7 @@ let DeliveryCharges = class DeliveryCharges extends defaultClasses_1.TimeStamps
|
|
|
21
21
|
from;
|
|
22
22
|
to;
|
|
23
23
|
charge;
|
|
24
|
-
secondaryCharge;
|
|
25
24
|
riderCut;
|
|
26
|
-
secondaryRiderCut;
|
|
27
25
|
isActive;
|
|
28
26
|
};
|
|
29
27
|
exports.DeliveryCharges = DeliveryCharges;
|
|
@@ -51,18 +49,10 @@ __decorate([
|
|
|
51
49
|
(0, typegoose_1.prop)({ required: true, type: Number, min: 0 }),
|
|
52
50
|
__metadata("design:type", Number)
|
|
53
51
|
], DeliveryCharges.prototype, "charge", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, typegoose_1.prop)({ required: true, type: Number, min: 0 }),
|
|
56
|
-
__metadata("design:type", Number)
|
|
57
|
-
], DeliveryCharges.prototype, "secondaryCharge", void 0);
|
|
58
52
|
__decorate([
|
|
59
53
|
(0, typegoose_1.prop)({ required: true, type: Number, min: 0 }),
|
|
60
54
|
__metadata("design:type", Number)
|
|
61
55
|
], DeliveryCharges.prototype, "riderCut", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typegoose_1.prop)({ required: true, type: Number, min: 0 }),
|
|
64
|
-
__metadata("design:type", Number)
|
|
65
|
-
], DeliveryCharges.prototype, "secondaryRiderCut", void 0);
|
|
66
56
|
__decorate([
|
|
67
57
|
(0, typegoose_1.prop)({ type: Boolean, default: true }),
|
|
68
58
|
__metadata("design:type", Boolean)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery-charges.model.js","sourceRoot":"/","sources":["libraries/mongo/models/delivery-charges.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAwE;AACxE,6CAAoC;AAe7B,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAGvC,IAAI,CAAa;IAGjB,IAAI,CAAU;IAGd,UAAU,CAAU;IAGpB,IAAI,CAAU;IAGd,EAAE,CAAU;IAGZ,MAAM,CAAU;IAGhB,
|
|
1
|
+
{"version":3,"file":"delivery-charges.model.js","sourceRoot":"/","sources":["libraries/mongo/models/delivery-charges.model.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAsE;AACtE,4EAAqE;AACrE,kDAAwE;AACxE,6CAAoC;AAe7B,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,2BAAU;IAGvC,IAAI,CAAa;IAGjB,IAAI,CAAU;IAGd,UAAU,CAAU;IAGpB,IAAI,CAAU;IAGd,EAAE,CAAU;IAGZ,MAAM,CAAU;IAGhB,QAAQ,CAAU;IAIlB,QAAQ,CAAW;CAC1B,CAAA;AA1BY,0CAAe;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,iBAAI,EAAE,CAAC;;6CACF;AAGjB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAS,EAAE,OAAO,EAAE,gBAAS,CAAC,OAAO,EAAE,CAAC;;6CAC/C;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAkB,EAAE,OAAO,EAAE,yBAAkB,CAAC,cAAc,EAAE,CAAC;;mDAClE;AAGpB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;6CAC1B;AAGd;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;2CAC5B;AAGZ;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;+CACxB;AAGhB;IADN,IAAA,gBAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;;iDACtB;AAIlB;IADN,IAAA,gBAAI,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;iDACb;0BAzBd,eAAe;IAL3B,IAAA,wBAAY,EAAC,EAAE,aAAa,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,CAAC;IAIlE,IAAA,iBAAK,EAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;GAC/E,eAAe,CA0B3B","sourcesContent":["import { Index, modelOptions, prop, Ref } from '@typegoose/typegoose';\nimport { TimeStamps } from '@typegoose/typegoose/lib/defaultClasses';\nimport { DeliveryChargeType, OrderType } from '../../../utilities/enum';\nimport { Zone } from './zone.model';\n\n/**\n * Standalone delivery charge configuration, scoped to a single zone.\n *\n * This is the normalized counterpart of the embedded `Setting.deliveryCharges`\n * / `Zone.deliveryCharges` arrays. Each document represents one (zone, type)\n * combination so that delivery pricing can be managed, indexed and queried per\n * zone without rewriting the whole settings/zone document.\n */\n@modelOptions({ schemaOptions: { collection: 'deliveryCharges' } })\n// One active config per (zone, order type). A missing `zone` indexes as null, so\n// there is exactly one zone-less \"global\" config per type. `deletedAt` keeps\n// soft-deleted rows out of the uniqueness constraint so a row can be replaced.\n@Index({ zone: 1, type: 1 }, { unique: true, partialFilterExpression: { deletedAt: null } })\nexport class DeliveryCharges extends TimeStamps {\n\t// Optional: when absent this is the global/default config for the `type`.\n\t@prop({ ref: () => Zone })\n\tpublic zone?: Ref<Zone>;\n\n\t@prop({ type: String, enum: OrderType, default: OrderType.REGULAR })\n\tpublic type!: string;\n\n\t@prop({ type: String, enum: DeliveryChargeType, default: DeliveryChargeType.DISTANCE_BASED })\n\tpublic chargeType!: string;\n\n\t@prop({ required: true, type: Number, min: 0 })\n\tpublic from!: number;\n\n\t@prop({ required: true, type: Number, min: 0 })\n\tpublic to!: number;\n\n\t@prop({ required: true, type: Number, min: 0 })\n\tpublic charge!: number;\n\n\t@prop({ required: true, type: Number, min: 0 })\n\tpublic riderCut!: number;\n\n\t// Future-proofing: toggle a config without deleting it, e.g. seasonal pricing.\n\t@prop({ type: Boolean, default: true })\n\tpublic isActive?: boolean;\n}\n"]}
|
package/dist/types/README.md
CHANGED
package/dist/types/package.json
CHANGED