@fesmex/models 0.1.23 → 0.1.25
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/index.cjs +51 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -19
- package/dist/index.d.ts +38 -19
- package/dist/index.js +56 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -34,6 +34,7 @@ __export(index_exports, {
|
|
|
34
34
|
ArticleClass: () => ArticleClasses_default,
|
|
35
35
|
ArticleGroup: () => ArticleGroups_default,
|
|
36
36
|
ArticlePrice: () => ArticlePrices_default,
|
|
37
|
+
Cart: () => Carts_default,
|
|
37
38
|
Client: () => Clients_default,
|
|
38
39
|
ClientAddress: () => ClientsAddress_default,
|
|
39
40
|
ClientContact: () => ClientsContact_default,
|
|
@@ -56,6 +57,7 @@ __export(index_exports, {
|
|
|
56
57
|
QuoteContact: () => QuoteContact_default,
|
|
57
58
|
QuoteStatus: () => QuoteStatus,
|
|
58
59
|
QuoteTerm: () => QuoteTerm_default,
|
|
60
|
+
RefreshToken: () => RefreshTokens_default,
|
|
59
61
|
Status: () => Status,
|
|
60
62
|
SyncLog: () => SyncLog,
|
|
61
63
|
SyncLogAction: () => SyncLogAction,
|
|
@@ -470,7 +472,8 @@ customerSchema.pre("save", async function(next) {
|
|
|
470
472
|
}
|
|
471
473
|
next();
|
|
472
474
|
});
|
|
473
|
-
var
|
|
475
|
+
var Customer = import_mongoose21.default.models.Customer || (0, import_mongoose21.model)("Customer", customerSchema, "customers");
|
|
476
|
+
var Customers_default = Customer;
|
|
474
477
|
|
|
475
478
|
// src/customers/models/FiscalProfileType.ts
|
|
476
479
|
var import_mongoose22 = __toESM(require("mongoose"), 1);
|
|
@@ -484,7 +487,8 @@ var fiscalProfileSchema = new import_mongoose22.Schema({
|
|
|
484
487
|
created_at: { type: Date, default: Date.now },
|
|
485
488
|
updated_at: { type: Date }
|
|
486
489
|
});
|
|
487
|
-
var
|
|
490
|
+
var FiscalProfile = import_mongoose22.default.models.FiscalProfile || (0, import_mongoose22.model)("FiscalProfile", fiscalProfileSchema, "fiscal_profiles");
|
|
491
|
+
var FiscalProfileType_default = FiscalProfile;
|
|
488
492
|
|
|
489
493
|
// src/orders/models/Orders.ts
|
|
490
494
|
var import_mongoose23 = __toESM(require("mongoose"), 1);
|
|
@@ -715,6 +719,49 @@ var announcementSchema = new import_mongoose27.Schema({
|
|
|
715
719
|
}
|
|
716
720
|
});
|
|
717
721
|
var Announcements_default = import_mongoose27.default.models.Announcement || (0, import_mongoose27.model)("Announcement", announcementSchema, "announcements");
|
|
722
|
+
|
|
723
|
+
// src/carts/models/Carts.ts
|
|
724
|
+
var import_mongoose28 = __toESM(require("mongoose"), 1);
|
|
725
|
+
var cartItemSchema = new import_mongoose28.Schema(
|
|
726
|
+
{
|
|
727
|
+
article_id: { type: import_mongoose28.Types.ObjectId, ref: "Article", required: true },
|
|
728
|
+
quantity: { type: Number, required: true }
|
|
729
|
+
},
|
|
730
|
+
{ _id: false }
|
|
731
|
+
);
|
|
732
|
+
var cartSchema = new import_mongoose28.Schema({
|
|
733
|
+
customer_id: {
|
|
734
|
+
type: import_mongoose28.Types.ObjectId,
|
|
735
|
+
ref: "Customer",
|
|
736
|
+
required: true,
|
|
737
|
+
unique: true
|
|
738
|
+
},
|
|
739
|
+
items: [cartItemSchema],
|
|
740
|
+
updated_at: { type: Date, default: Date.now }
|
|
741
|
+
});
|
|
742
|
+
var Carts_default = import_mongoose28.default.models.Cart || (0, import_mongoose28.model)("Cart", cartSchema, "carts");
|
|
743
|
+
|
|
744
|
+
// src/auth/models/RefreshTokens.ts
|
|
745
|
+
var import_mongoose29 = __toESM(require("mongoose"), 1);
|
|
746
|
+
var refreshTokenSchema = new import_mongoose29.Schema({
|
|
747
|
+
customer_id: { type: import_mongoose29.Schema.Types.ObjectId, ref: "Customer", required: true },
|
|
748
|
+
// Store only SHA-256 hash of the opaque refresh token (base64url). Never store the raw token.
|
|
749
|
+
token_hash: { type: String, required: true },
|
|
750
|
+
expires_at: { type: Date, required: true },
|
|
751
|
+
revoked_at: { type: Date },
|
|
752
|
+
replaced_by_token_hash: { type: String },
|
|
753
|
+
created_at: { type: Date, default: Date.now },
|
|
754
|
+
updated_at: { type: Date }
|
|
755
|
+
});
|
|
756
|
+
refreshTokenSchema.index({ token_hash: 1 }, { unique: true });
|
|
757
|
+
refreshTokenSchema.index({ expires_at: 1 }, { expireAfterSeconds: 0 });
|
|
758
|
+
refreshTokenSchema.index({ customer_id: 1, expires_at: 1 });
|
|
759
|
+
refreshTokenSchema.pre("save", function(next) {
|
|
760
|
+
this.updated_at = /* @__PURE__ */ new Date();
|
|
761
|
+
next();
|
|
762
|
+
});
|
|
763
|
+
var RefreshToken = import_mongoose29.default.models.RefreshToken || (0, import_mongoose29.model)("RefreshToken", refreshTokenSchema, "refresh_tokens");
|
|
764
|
+
var RefreshTokens_default = RefreshToken;
|
|
718
765
|
// Annotate the CommonJS export names for ESM import in node:
|
|
719
766
|
0 && (module.exports = {
|
|
720
767
|
Announcement,
|
|
@@ -722,6 +769,7 @@ var Announcements_default = import_mongoose27.default.models.Announcement || (0,
|
|
|
722
769
|
ArticleClass,
|
|
723
770
|
ArticleGroup,
|
|
724
771
|
ArticlePrice,
|
|
772
|
+
Cart,
|
|
725
773
|
Client,
|
|
726
774
|
ClientAddress,
|
|
727
775
|
ClientContact,
|
|
@@ -744,6 +792,7 @@ var Announcements_default = import_mongoose27.default.models.Announcement || (0,
|
|
|
744
792
|
QuoteContact,
|
|
745
793
|
QuoteStatus,
|
|
746
794
|
QuoteTerm,
|
|
795
|
+
RefreshToken,
|
|
747
796
|
Status,
|
|
748
797
|
SyncLog,
|
|
749
798
|
SyncLogAction,
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/clients/models/Clients.ts","../src/clients/models/ClientsContact.ts","../src/clients/models/ClientsAddress.ts","../src/clients/models/ClientsPaymentMethod.ts","../src/clients/models/ClientsPaymentTerm.ts","../src/clients/models/ClientsPriceList.ts","../src/clients/models/ClientsSalesEmployee.ts","../src/inventory/models/Article.ts","../src/inventory/models/ArticleGroups.ts","../src/inventory/models/ArticleClasses.ts","../src/inventory/models/ArticlePrices.ts","../src/inventory/models/Currencies.ts","../src/inventory/models/Warehouses.ts","../src/inventory/models/InventoryStocks.ts","../src/inventory/models/PriceLists.ts","../src/quotes/models/Quote.ts","../src/quotes/models/QuoteArticle.ts","../src/quotes/models/QuoteArticleExtra.ts","../src/quotes/models/QuoteContact.ts","../src/quotes/models/QuoteTerm.ts","../src/customers/models/Customers.ts","../src/customers/models/FiscalProfileType.ts","../src/orders/models/Orders.ts","../src/orders/models/OrderStatusLogs.ts","../src/sap/models/SyncLog.ts","../src/announcements/models/Announcements.ts","../src/users/models/Users.ts"],"sourcesContent":["export * from \"./clients\"\nexport * from \"./inventory\"\nexport * from \"./quotes\"\nexport * from \"./customers\"\nexport * from \"./orders\"\nexport * from \"./sap\"\nexport * from \"./announcements\"\nexport * from \"./users\"\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport interface ClientType {\n\tsn_code?: string | null\n\tsn_name?: string | null\n\ttax_id?: string | null\n\tcurrency?: string | null\n\tphone_1?: string | null\n\temail?: string | null\n\tcomments?: string | null\n\tpipedrive_id?: string | null\n\tsap_id?: string | null\n\tdeleted_at?: Date | null\n\tdeleted_by?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientSchema = new Schema<ClientType>(\n\t{\n\t\tsn_code: { type: String, index: true },\n\t\tsn_name: { type: String, required: true },\n\t\ttax_id: { type: String },\n\t\tcurrency: { type: String },\n\t\tphone_1: { type: String },\n\t\temail: { type: String },\n\t\tcomments: { type: String },\n\t\tpipedrive_id: { type: String },\n\t\tsap_id: { type: String },\n\t\tdeleted_at: { type: Date, default: null },\n\t\tdeleted_by: { type: String, default: null },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.Client || model<ClientType>(\"Client\", clientSchema, \"clients\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientContactType {\n\tclient_id: Types.ObjectId\n\tcontact_person_name?: string | null\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\tcontact_phone?: string | null\n\tcontact_email?: string | null\n\tpipedrive_id?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientContactSchema = new Schema<ClientContactType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tcontact_person_name: { type: String },\n\t\tfirst_name: { type: String },\n\t\tlast_name: { type: String },\n\t\tcontact_phone: { type: String },\n\t\tcontact_email: { type: String },\n\t\tpipedrive_id: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientContact || model<ClientContactType>(\"ClientContact\", clientContactSchema, \"client_contacts\")","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientAddressType {\n\tclient_id: Types.ObjectId\n\taddress_name?: string | null\n\tstreet?: string | null\n\tneighborhood?: string | null\n\tpostal_code?: string | null\n\tcity?: string | null\n\tstate?: string | null\n\tcountry?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientAddressSchema = new Schema<ClientAddressType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\taddress_name: { type: String },\n\t\tstreet: { type: String },\n\t\tneighborhood: { type: String },\n\t\tpostal_code: { type: String },\n\t\tcity: { type: String },\n\t\tstate: { type: String },\n\t\tcountry: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientAddress || model<ClientAddressType>(\n\t\"ClientAddress\",\n\tclientAddressSchema,\n\t\"client_addresses\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPaymentMethodType {\n\tclient_id: Types.ObjectId\n\tcode?: string | null\n\tdescription?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPaymentMethodSchema = new Schema<ClientPaymentMethodType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tcode: { type: String },\n\t\tdescription: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPaymentMethod || model<ClientPaymentMethodType>(\n\t\"ClientPaymentMethod\",\n\tclientPaymentMethodSchema,\n\t\"client_payment_methods\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPaymentTermType {\n\tclient_id: Types.ObjectId\n\tcode?: string | null\n\tname?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPaymentTermSchema = new Schema<ClientPaymentTermType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tcode: { type: String },\n\t\tname: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPaymentTerm || model<ClientPaymentTermType>(\n\t\"ClientPaymentTerm\",\n\tclientPaymentTermSchema,\n\t\"client_payment_terms\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPriceListType {\n\tclient_id: Types.ObjectId\n\tnumber?: string | null\n\tname?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPriceListSchema = new Schema<ClientPriceListType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tnumber: { type: String },\n\t\tname: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPriceList || model<ClientPriceListType>(\n\t\"ClientPriceList\",\n\tclientPriceListSchema,\n\t\"client_price_lists\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientSalesEmployeeType {\n\tclient_id: Types.ObjectId\n\temployee_code?: string | null\n\temployee_name?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientSalesEmployeeSchema = new Schema<ClientSalesEmployeeType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\temployee_code: { type: String },\n\t\temployee_name: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientSalesEmployee || model<ClientSalesEmployeeType>(\n\t\"ClientSalesEmployee\",\n\tclientSalesEmployeeSchema,\n\t\"client_sales_employees\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst articleSchema = new Schema({\n\tarticle_number: { type: String, required: true, unique: true }, // SAP ItemCode\n\tdescription: { type: String, required: true },\n\tunit: { type: String, required: true },\n\tbrand: { type: String },\n\tmodel: { type: String },\n\tgroup_id: { type: Types.ObjectId, ref: \"ArticleGroup\", required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Article || model(\"Article\", articleSchema, \"articles\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst articleGroupSchema = new Schema({\n\tname: { type: String, required: true },\n\tdescription: { type: String },\n})\n\nexport default mongoose.models.ArticleGroup || model(\"ArticleGroup\", articleGroupSchema, \"article_groups\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst articleClassSchema = new Schema({\n\tname: { type: String, required: true },\n\tdescription: { type: String },\n})\n\nexport default mongoose.models.ArticleClass || model(\"ArticleClass\", articleClassSchema, \"article_classes\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst articlePriceSchema = new Schema({\n\tarticle_id: { type: Types.ObjectId, ref: \"Article\", required: true },\n\tprice_list_id: { type: Types.ObjectId, ref: \"PriceList\", required: true },\n\tcurrency_id: { type: Types.ObjectId, ref: \"Currency\", required: true },\n\tprice: { type: Number, required: true },\n\tvalid_from: { type: Date },\n\tvalid_to: { type: Date },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.ArticlePrice || model(\"ArticlePrice\", articlePriceSchema, \"article_prices\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst currencySchema = new Schema({\n\tcode: { type: String, required: true, unique: true },\n\tsymbol: { type: String, required: true },\n\tname: { type: String, required: true },\n})\n\nexport default mongoose.models.Currency || model(\"Currency\", currencySchema, \"currencies\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst warehouseSchema = new Schema({\n\tcode: { type: String, required: true, unique: true },\n\tname: { type: String, required: true },\n\tlocation: { type: String },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Warehouse || model(\"Warehouse\", warehouseSchema, \"warehouses\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst inventoryStockSchema = new Schema({\n\tarticle_id: { type: Types.ObjectId, ref: \"Article\", required: true },\n\twarehouse_id: { type: Types.ObjectId, ref: \"Warehouse\", required: true },\n\tcount: { type: Number, required: true },\n\tmin_stock: { type: Number },\n\tmax_stock: { type: Number },\n\tupdated_at: { type: Date, default: Date.now },\n})\n\nexport default mongoose.models.InventoryStock || model(\"InventoryStock\", inventoryStockSchema, \"inventory_stocks\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst priceListSchema = new Schema({\n\tnumber: { type: String, required: true, unique: true },\n\tname: { type: String, required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.PriceList || model(\"PriceList\", priceListSchema, \"price_lists\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport enum QuoteStatus {\n\tOPPORTUNITY = \"OPPORTUNITY\",\n\tQUOTE = \"QUOTE\",\n\tFOLLOWING = \"FOLLOWING\",\n\tNEGOTIATION = \"NEGOTIATION\",\n}\n\nexport enum Status {\n\tOPEN = \"OPEN\",\n\tWIN = \"WIN\",\n\tLOST = \"LOST\",\n\tDELETE = \"DELETE\",\n}\n\nexport enum CreatedMethod {\n\tMANUAL = \"MANUAL\",\n\tCSV = \"CSV\",\n}\n\nconst quoteSchema = new Schema(\n\t{\n\t\tquote_number: { type: Number, required: true },\n\t\tquote_revision: { type: Number, default: 0 },\n\t\tquote_ref: { type: String },\n\t\tcompany: { type: String },\n\t\tcompany_id: { type: Schema.Types.ObjectId, ref: \"Client\", required: true },\n\t\tcompany_pipedrive_id: { type: String },\n\t\tcontact_id: { type: Schema.Types.ObjectId, ref: \"ClientContact\" },\n\t\tproject_name: { type: String },\n\t\tproject_lab: { type: String },\n\t\tpayment_condition: { type: String },\n\t\tpayment_exp: { type: String },\n\t\tterms_ids: [{ type: Schema.Types.ObjectId, ref: \"QuoteTerm\" }],\n\t\tcurrency_id: { type: Schema.Types.ObjectId, ref: \"Currency\" },\n\t\tiva: { type: String },\n\t\tdate: { type: Date },\n\t\tstatus: { type: String, enum: Object.values(Status), default: Status.OPEN },\n\t\tquote_status: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(QuoteStatus),\n\t\t\tdefault: QuoteStatus.OPPORTUNITY,\n\t\t},\n\t\tsap_id: { type: String },\n\t\tsap_quotation_entry: { type: Number },\n\t\tsap_order_entry: { type: Number },\n\t\tpipedrive_id: { type: String },\n\t\tshould_sync: { type: Boolean, default: false },\n\t\tpdf_download_link: { type: String },\n\t\tnotes: { type: String },\n\t\tcreated_method: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(CreatedMethod),\n\t\t\tdefault: CreatedMethod.MANUAL,\n\t\t},\n\t\tcreated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tupdated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tdeleted_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tdeleted_at: { type: Date },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.Quote || model(\"Quote\", quoteSchema, \"quotes\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteArticleSchema = new Schema(\n\t{\n\t\tquote_id: { type: Schema.Types.ObjectId, ref: \"Quote\", required: true },\n\t\tarticle_id: { type: Schema.Types.ObjectId, ref: \"Article\" },\n\t\tarticle_number: { type: String },\n\t\tdescription: { type: String },\n\t\tdelivery: { type: String },\n\t\tquantity: { type: Number },\n\t\tprice: { type: Number },\n\t\tunit_price: { type: Number },\n\t\toriginal_price: { type: Number },\n\t\ttotal: { type: Number },\n\t\tutility: { type: Number },\n\t\ttype: { type: String },\n\t\textra_id: { type: Schema.Types.ObjectId, ref: \"QuoteArticleExtra\" },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteArticle || model(\"QuoteArticle\", quoteArticleSchema, \"quote_articles\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteArticleExtraSchema = new Schema(\n\t{\n\t\tquote_article_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"QuoteArticle\",\n\t\t\trequired: true,\n\t\t},\n\t\tmultiplier: Number,\n\t\tusa_freight: Number,\n\t\tusa_expenses: Number,\n\t\tduty: Number,\n\t\tmex_freight: Number,\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteArticleExtra || model(\"QuoteArticleExtra\", quoteArticleExtraSchema, \"quote_article_extras\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteContactSchema = new Schema({\n\tquote_id: { type: Schema.Types.ObjectId, ref: \"Quote\", required: true },\n\tname: String,\n\temail: String,\n\tmobile: String,\n\tpipedrive_id: String,\n\tcreated_at: { type: Date, default: Date.now },\n})\n\nexport default mongoose.models.QuoteContact || model(\"QuoteContact\", quoteContactSchema, \"quote_contacts\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteTermSchema = new Schema(\n\t{\n\t\ttitle: String,\n\t\tcontent: { type: String, required: true },\n\t\tcategory: String,\n\t\tis_active: { type: Boolean, default: true },\n\t\tcreated_by: String,\n\t\tupdated_by: String,\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteTerm || model(\"QuoteTerm\", quoteTermSchema, \"quote_terms\")\n","import mongoose, { Schema, model } from \"mongoose\"\nimport bcrypt from \"bcryptjs\"\n\nexport enum CustomerStatus {\n\tACTIVE = \"active\",\n\tINACTIVE = \"inactive\",\n\tBANNED = \"banned\",\n}\n\nexport interface CustomerType {\n\tfirst_name: string\n\tlast_name: string\n\temail: string\n\tmobile?: string\n\tpassword: string\n\tstatus: CustomerStatus\n\tfiscal_profile_id?: mongoose.Types.ObjectId\n\tcreated_at: Date\n\tupdated_at?: Date\n\tdeleted_at?: Date\n}\n\nconst customerSchema = new Schema<CustomerType>({\n\tfirst_name: { type: String, required: true },\n\tlast_name: { type: String, required: true },\n\temail: { type: String, required: true, unique: true },\n\tmobile: { type: String },\n\tpassword: { type: String, required: true, select: false },\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(CustomerStatus),\n\t\tdefault: CustomerStatus.ACTIVE,\n\t},\n\tfiscal_profile_id: { type: Schema.Types.ObjectId, ref: \"FiscalProfile\" },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n\tdeleted_at: { type: Date },\n})\n\n// Hash password\ncustomerSchema.pre(\"save\", async function (next) {\n\tif (this.isModified(\"password\")) {\n\t\tthis.password = await bcrypt.hash(this.password, 12)\n\t}\n\tnext()\n})\n\nexport default mongoose.models.Customer || model<CustomerType>(\"Customer\", customerSchema, \"customers\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport interface FiscalProfileType {\n\tcustomer_id: mongoose.Types.ObjectId\n\trfc: string\n\trazon_social: string\n\tuso_cfdi: string\n\tregimen_fiscal: string\n\tcp: string // código postal\n\tcreated_at: Date\n\tupdated_at?: Date\n}\n\nconst fiscalProfileSchema = new Schema<FiscalProfileType>({\n\tcustomer_id: { type: Schema.Types.ObjectId, ref: \"Customer\", required: true },\n\trfc: { type: String, required: true },\n\trazon_social: { type: String, required: true },\n\tuso_cfdi: { type: String, required: true },\n\tregimen_fiscal: { type: String, required: true },\n\tcp: { type: String, required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.FiscalProfile || model<FiscalProfileType>(\"FiscalProfile\", fiscalProfileSchema, \"fiscal_profiles\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport enum OrderStatus {\n\tPENDING = \"pending\",\n\tCONFIRMED = \"confirmed\",\n\tSHIPPED = \"shipped\",\n\tCANCELLED = \"cancelled\",\n\tCOMPLETED = \"completed\",\n}\n\nconst orderItemSchema = new Schema(\n\t{\n\t\tarticle_id: { type: Schema.Types.ObjectId, ref: \"Article\", required: true },\n\t\tquantity: { type: Number, required: true },\n\t\tunit_price: { type: Number, required: true },\n\t\ttotal: { type: Number, required: true },\n\t},\n\t{ _id: false }\n)\n\nconst orderSchema = new Schema({\n\tcustomer_id: { type: Schema.Types.ObjectId, ref: \"Customer\", required: true },\n\titems: [orderItemSchema],\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(OrderStatus),\n\t\tdefault: OrderStatus.PENDING,\n\t},\n\ttracking_number: { type: String },\n\ttotal: { type: Number, required: true },\n\tnotes: { type: String },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Order || model(\"Order\", orderSchema, \"orders\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\nimport { OrderStatus } from \"./Orders\"\n\nexport interface OrderStatusLogType {\n\torder_id: Types.ObjectId\n\tstatus: OrderStatus\n\tchanged_by: Types.ObjectId\n\tchanged_at: Date\n\tnote?: string\n}\n\nconst orderStatusLogSchema = new Schema<OrderStatusLogType>({\n\torder_id: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"Order\",\n\t\trequired: true,\n\t},\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(OrderStatus),\n\t\trequired: true,\n\t},\n\tchanged_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t\trequired: true,\n\t},\n\tchanged_at: {\n\t\ttype: Date,\n\t\tdefault: Date.now,\n\t},\n\tnote: {\n\t\ttype: String,\n\t},\n})\n\nexport default mongoose.models.OrderStatusLog || model<OrderStatusLogType>(\"OrderStatusLog\", orderStatusLogSchema, \"order_status_logs\")\n","import mongoose, { Schema, model, Document, Types } from \"mongoose\"\n\n/**\n * Sync Log Types\n */\nexport enum SyncLogType {\n\tSAP_QUOTATION = \"SAP_QUOTATION\",\n\tSAP_SALES_ORDER = \"SAP_SALES_ORDER\",\n\tPIPEDRIVE = \"PIPEDRIVE\",\n}\n\nexport enum SyncLogStatus {\n\tPENDING = \"PENDING\",\n\tSUCCESS = \"SUCCESS\",\n\tFAILED = \"FAILED\",\n\tRETRYING = \"RETRYING\",\n}\n\nexport enum SyncLogAction {\n\tCREATE = \"CREATE\",\n\tUPDATE = \"UPDATE\",\n\tDELETE = \"DELETE\",\n}\n\nexport interface ISyncLog extends Document {\n\t_id: Types.ObjectId\n\tentity_type: string\n\tentity_id: Types.ObjectId\n\tsync_type: SyncLogType\n\taction: SyncLogAction\n\tstatus: SyncLogStatus\n\terror_message?: string\n\terror_code?: string\n\terror_details?: Record<string, any>\n\trequest_payload?: Record<string, any>\n\tresponse_payload?: Record<string, any>\n\tretry_count: number\n\tmax_retries: number\n\tnext_retry_at?: Date\n\tcreated_at: Date\n\tupdated_at: Date\n\tresolved_at?: Date\n\tresolved_by?: Types.ObjectId\n}\n\nconst syncLogSchema = new Schema(\n\t{\n\t\tentity_type: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tentity_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tsync_type: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogType),\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\taction: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogAction),\n\t\t\trequired: true,\n\t\t},\n\t\tstatus: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogStatus),\n\t\t\tdefault: SyncLogStatus.PENDING,\n\t\t\tindex: true,\n\t\t},\n\t\terror_message: { type: String },\n\t\terror_code: { type: String },\n\t\terror_details: { type: Schema.Types.Mixed },\n\t\trequest_payload: { type: Schema.Types.Mixed },\n\t\tresponse_payload: { type: Schema.Types.Mixed },\n\t\tretry_count: { type: Number, default: 0 },\n\t\tmax_retries: { type: Number, default: 3 },\n\t\tnext_retry_at: { type: Date },\n\t\tresolved_at: { type: Date },\n\t\tresolved_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t},\n\t{\n\t\ttimestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" },\n\t}\n)\n\nsyncLogSchema.index({ entity_type: 1, entity_id: 1, status: 1 })\nsyncLogSchema.index({ status: 1, next_retry_at: 1 })\n\nexport const SyncLog = mongoose.models.SyncLog || model<ISyncLog>(\"SyncLog\", syncLogSchema, \"sync_logs\")\n","import mongoose, { Schema, model } from \"mongoose\"\nimport { UserRole } from \"../../users/models/Users\"\n\nexport interface AnnouncementType {\n\tcreated_by: mongoose.Types.ObjectId\n\tupdated_by?: mongoose.Types.ObjectId\n\tdeleted_by?: mongoose.Types.ObjectId\n\n\tcreated_at: Date\n\tupdated_at?: Date\n\tdeleted_at?: Date\n\n\ttitle: string\n\ttext: string\n\troles: UserRole[]\n}\n\nconst announcementSchema = new Schema<AnnouncementType>({\n\tcreated_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t\trequired: true,\n\t},\n\tupdated_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t},\n\tdeleted_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t},\n\n\tcreated_at: {\n\t\ttype: Date,\n\t\tdefault: Date.now,\n\t},\n\tupdated_at: Date,\n\tdeleted_at: Date,\n\n\ttitle: {\n\t\ttype: String,\n\t\trequired: true,\n\t\ttrim: true,\n\t},\n\ttext: {\n\t\ttype: String,\n\t\trequired: true,\n\t\ttrim: true,\n\t},\n\troles: {\n\t\ttype: [String],\n\t\tenum: Object.values(UserRole),\n\t\trequired: true,\n\t\tvalidate: {\n\t\t\tvalidator: (roles: UserRole[]) => roles.length > 0,\n\t\t\tmessage: \"At least one user role must be assigned.\",\n\t\t},\n\t},\n})\n\nexport default mongoose.models.Announcement || model<AnnouncementType>(\"Announcement\", announcementSchema, \"announcements\")\n","import mongoose, { Schema, model } from \"mongoose\"\nimport bcrypt from \"bcryptjs\"\n\nexport enum UserRole {\n ADMIN = \"admin\",\n SALES = \"sales\",\n TECHNICIAN = \"technician\",\n WAREHOUSEMAN = \"warehouseman\",\n}\n\nexport enum UserStatus {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n SUSPENDED = \"suspended\",\n}\n\nexport interface UserType {\n first_name: string\n middle_name?: string\n last_name: string\n username: string\n password: string\n role: UserRole\n status: UserStatus\n email?: string\n mobile?: string\n pipedrive_id?: string\n sap_employee_id?: string\n sap_id?: string\n created_at: Date\n created_by?: mongoose.Types.ObjectId | string\n updated_at?: Date\n updated_by?: mongoose.Types.ObjectId\n deleted_at?: Date\n deleted_by?: mongoose.Types.ObjectId\n}\n\nconst usersSchema = new Schema<UserType>({\n first_name: { type: String, required: true },\n middle_name: { type: String },\n last_name: { type: String, required: true },\n username: { type: String, required: true, unique: true },\n password: { type: String, required: true, select: false },\n role: {\n type: String,\n enum: Object.values(UserRole),\n default: UserRole.SALES,\n },\n status: {\n type: String,\n enum: Object.values(UserStatus),\n default: UserStatus.ACTIVE,\n },\n email: { type: String },\n mobile: { type: String },\n pipedrive_id: { type: String },\n sap_id: { type: String },\n sap_employee_id: { type: String },\n created_at: { type: Date, default: Date.now },\n created_by: { type: Schema.Types.Mixed, ref: \"User\" },\n updated_at: { type: Date },\n updated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n deleted_at: { type: Date },\n deleted_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n})\n\nusersSchema.pre(\"save\", async function (next) {\n if (this.isModified(\"password\")) {\n this.password = await bcrypt.hash(this.password, 12)\n }\n next()\n})\n\nexport default mongoose.models.User || model<UserType>(\"User\", usersSchema, \"users\")\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAAwC;AAkBxC,IAAM,eAAe,IAAI;AAAA,EACxB;AAAA,IACC,SAAS,EAAE,MAAM,QAAQ,OAAO,KAAK;AAAA,IACrC,SAAS,EAAE,MAAM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BAAO,MAAM;AAAA,IACnB,KAAK;AAAA,EACN;AAAA,EACA,YAAY;AAAA,IACX,MAAM,yBAAO,MAAM;AAAA,IACnB,KAAK;AAAA,EACN;AAAA,EAEA,YAAY;AAAA,IACX,MAAM;AAAA,IACN,SAAS,KAAK;AAAA,EACf;AAAA,EACA,YAAY;AAAA,EACZ,YAAY;AAAA,EAEZ,OAAO;AAAA,IACN,MAAM;AAAA,IACN,UAAU;AAAA,IACV,MAAM;AAAA,EACP;AAAA,EACA,MAAM;AAAA,IACL,MAAM;AAAA,IACN,UAAU;AAAA,IACV,MAAM;AAAA,EACP;AAAA,EACA,OAAO;AAAA,IACN,MAAM,CAAC,MAAM;AAAA,IACb,MAAM,OAAO,OAAO,QAAQ;AAAA,IAC5B,UAAU;AAAA,IACV,UAAU;AAAA,MACT,WAAW,CAAC,UAAsB,MAAM,SAAS;AAAA,MACjD,SAAS;AAAA,IACV;AAAA,EACD;AACD,CAAC;AAED,IAAO,wBAAQ,kBAAAC,QAAS,OAAO,oBAAgB,yBAAwB,gBAAgB,oBAAoB,eAAe;","names":["mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","QuoteStatus","Status","CreatedMethod","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","CustomerStatus","bcrypt","mongoose","import_mongoose","mongoose","import_mongoose","OrderStatus","mongoose","import_mongoose","mongoose","import_mongoose","SyncLogType","SyncLogStatus","SyncLogAction","mongoose","import_mongoose","import_mongoose","import_bcryptjs","UserRole","UserStatus","bcrypt","mongoose","mongoose"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/clients/models/Clients.ts","../src/clients/models/ClientsContact.ts","../src/clients/models/ClientsAddress.ts","../src/clients/models/ClientsPaymentMethod.ts","../src/clients/models/ClientsPaymentTerm.ts","../src/clients/models/ClientsPriceList.ts","../src/clients/models/ClientsSalesEmployee.ts","../src/inventory/models/Article.ts","../src/inventory/models/ArticleGroups.ts","../src/inventory/models/ArticleClasses.ts","../src/inventory/models/ArticlePrices.ts","../src/inventory/models/Currencies.ts","../src/inventory/models/Warehouses.ts","../src/inventory/models/InventoryStocks.ts","../src/inventory/models/PriceLists.ts","../src/quotes/models/Quote.ts","../src/quotes/models/QuoteArticle.ts","../src/quotes/models/QuoteArticleExtra.ts","../src/quotes/models/QuoteContact.ts","../src/quotes/models/QuoteTerm.ts","../src/customers/models/Customers.ts","../src/customers/models/FiscalProfileType.ts","../src/orders/models/Orders.ts","../src/orders/models/OrderStatusLogs.ts","../src/sap/models/SyncLog.ts","../src/announcements/models/Announcements.ts","../src/users/models/Users.ts","../src/carts/models/Carts.ts","../src/auth/models/RefreshTokens.ts"],"sourcesContent":["export * from \"./clients\"\nexport * from \"./inventory\"\nexport * from \"./quotes\"\nexport * from \"./customers\"\nexport * from \"./orders\"\nexport * from \"./sap\"\nexport * from \"./announcements\"\nexport * from \"./users\"\nexport * from \"./carts\"\nexport * from \"./auth\"\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport interface ClientType {\n\tsn_code?: string | null\n\tsn_name?: string | null\n\ttax_id?: string | null\n\tcurrency?: string | null\n\tphone_1?: string | null\n\temail?: string | null\n\tcomments?: string | null\n\tpipedrive_id?: string | null\n\tsap_id?: string | null\n\tdeleted_at?: Date | null\n\tdeleted_by?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientSchema = new Schema<ClientType>(\n\t{\n\t\tsn_code: { type: String, index: true },\n\t\tsn_name: { type: String, required: true },\n\t\ttax_id: { type: String },\n\t\tcurrency: { type: String },\n\t\tphone_1: { type: String },\n\t\temail: { type: String },\n\t\tcomments: { type: String },\n\t\tpipedrive_id: { type: String },\n\t\tsap_id: { type: String },\n\t\tdeleted_at: { type: Date, default: null },\n\t\tdeleted_by: { type: String, default: null },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.Client || model<ClientType>(\"Client\", clientSchema, \"clients\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientContactType {\n\tclient_id: Types.ObjectId\n\tcontact_person_name?: string | null\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\tcontact_phone?: string | null\n\tcontact_email?: string | null\n\tpipedrive_id?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientContactSchema = new Schema<ClientContactType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tcontact_person_name: { type: String },\n\t\tfirst_name: { type: String },\n\t\tlast_name: { type: String },\n\t\tcontact_phone: { type: String },\n\t\tcontact_email: { type: String },\n\t\tpipedrive_id: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientContact || model<ClientContactType>(\"ClientContact\", clientContactSchema, \"client_contacts\")","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientAddressType {\n\tclient_id: Types.ObjectId\n\taddress_name?: string | null\n\tstreet?: string | null\n\tneighborhood?: string | null\n\tpostal_code?: string | null\n\tcity?: string | null\n\tstate?: string | null\n\tcountry?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientAddressSchema = new Schema<ClientAddressType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\taddress_name: { type: String },\n\t\tstreet: { type: String },\n\t\tneighborhood: { type: String },\n\t\tpostal_code: { type: String },\n\t\tcity: { type: String },\n\t\tstate: { type: String },\n\t\tcountry: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientAddress || model<ClientAddressType>(\n\t\"ClientAddress\",\n\tclientAddressSchema,\n\t\"client_addresses\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPaymentMethodType {\n\tclient_id: Types.ObjectId\n\tcode?: string | null\n\tdescription?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPaymentMethodSchema = new Schema<ClientPaymentMethodType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tcode: { type: String },\n\t\tdescription: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPaymentMethod || model<ClientPaymentMethodType>(\n\t\"ClientPaymentMethod\",\n\tclientPaymentMethodSchema,\n\t\"client_payment_methods\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPaymentTermType {\n\tclient_id: Types.ObjectId\n\tcode?: string | null\n\tname?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPaymentTermSchema = new Schema<ClientPaymentTermType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tcode: { type: String },\n\t\tname: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPaymentTerm || model<ClientPaymentTermType>(\n\t\"ClientPaymentTerm\",\n\tclientPaymentTermSchema,\n\t\"client_payment_terms\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPriceListType {\n\tclient_id: Types.ObjectId\n\tnumber?: string | null\n\tname?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPriceListSchema = new Schema<ClientPriceListType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tnumber: { type: String },\n\t\tname: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPriceList || model<ClientPriceListType>(\n\t\"ClientPriceList\",\n\tclientPriceListSchema,\n\t\"client_price_lists\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientSalesEmployeeType {\n\tclient_id: Types.ObjectId\n\temployee_code?: string | null\n\temployee_name?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientSalesEmployeeSchema = new Schema<ClientSalesEmployeeType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\temployee_code: { type: String },\n\t\temployee_name: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientSalesEmployee || model<ClientSalesEmployeeType>(\n\t\"ClientSalesEmployee\",\n\tclientSalesEmployeeSchema,\n\t\"client_sales_employees\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst articleSchema = new Schema({\n\tarticle_number: { type: String, required: true, unique: true }, // SAP ItemCode\n\tdescription: { type: String, required: true },\n\tunit: { type: String, required: true },\n\tbrand: { type: String },\n\tmodel: { type: String },\n\tgroup_id: { type: Types.ObjectId, ref: \"ArticleGroup\", required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Article || model(\"Article\", articleSchema, \"articles\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst articleGroupSchema = new Schema({\n\tname: { type: String, required: true },\n\tdescription: { type: String },\n})\n\nexport default mongoose.models.ArticleGroup || model(\"ArticleGroup\", articleGroupSchema, \"article_groups\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst articleClassSchema = new Schema({\n\tname: { type: String, required: true },\n\tdescription: { type: String },\n})\n\nexport default mongoose.models.ArticleClass || model(\"ArticleClass\", articleClassSchema, \"article_classes\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst articlePriceSchema = new Schema({\n\tarticle_id: { type: Types.ObjectId, ref: \"Article\", required: true },\n\tprice_list_id: { type: Types.ObjectId, ref: \"PriceList\", required: true },\n\tcurrency_id: { type: Types.ObjectId, ref: \"Currency\", required: true },\n\tprice: { type: Number, required: true },\n\tvalid_from: { type: Date },\n\tvalid_to: { type: Date },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.ArticlePrice || model(\"ArticlePrice\", articlePriceSchema, \"article_prices\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst currencySchema = new Schema({\n\tcode: { type: String, required: true, unique: true },\n\tsymbol: { type: String, required: true },\n\tname: { type: String, required: true },\n})\n\nexport default mongoose.models.Currency || model(\"Currency\", currencySchema, \"currencies\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst warehouseSchema = new Schema({\n\tcode: { type: String, required: true, unique: true },\n\tname: { type: String, required: true },\n\tlocation: { type: String },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Warehouse || model(\"Warehouse\", warehouseSchema, \"warehouses\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst inventoryStockSchema = new Schema({\n\tarticle_id: { type: Types.ObjectId, ref: \"Article\", required: true },\n\twarehouse_id: { type: Types.ObjectId, ref: \"Warehouse\", required: true },\n\tcount: { type: Number, required: true },\n\tmin_stock: { type: Number },\n\tmax_stock: { type: Number },\n\tupdated_at: { type: Date, default: Date.now },\n})\n\nexport default mongoose.models.InventoryStock || model(\"InventoryStock\", inventoryStockSchema, \"inventory_stocks\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst priceListSchema = new Schema({\n\tnumber: { type: String, required: true, unique: true },\n\tname: { type: String, required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.PriceList || model(\"PriceList\", priceListSchema, \"price_lists\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport enum QuoteStatus {\n\tOPPORTUNITY = \"OPPORTUNITY\",\n\tQUOTE = \"QUOTE\",\n\tFOLLOWING = \"FOLLOWING\",\n\tNEGOTIATION = \"NEGOTIATION\",\n}\n\nexport enum Status {\n\tOPEN = \"OPEN\",\n\tWIN = \"WIN\",\n\tLOST = \"LOST\",\n\tDELETE = \"DELETE\",\n}\n\nexport enum CreatedMethod {\n\tMANUAL = \"MANUAL\",\n\tCSV = \"CSV\",\n}\n\nconst quoteSchema = new Schema(\n\t{\n\t\tquote_number: { type: Number, required: true },\n\t\tquote_revision: { type: Number, default: 0 },\n\t\tquote_ref: { type: String },\n\t\tcompany: { type: String },\n\t\tcompany_id: { type: Schema.Types.ObjectId, ref: \"Client\", required: true },\n\t\tcompany_pipedrive_id: { type: String },\n\t\tcontact_id: { type: Schema.Types.ObjectId, ref: \"ClientContact\" },\n\t\tproject_name: { type: String },\n\t\tproject_lab: { type: String },\n\t\tpayment_condition: { type: String },\n\t\tpayment_exp: { type: String },\n\t\tterms_ids: [{ type: Schema.Types.ObjectId, ref: \"QuoteTerm\" }],\n\t\tcurrency_id: { type: Schema.Types.ObjectId, ref: \"Currency\" },\n\t\tiva: { type: String },\n\t\tdate: { type: Date },\n\t\tstatus: { type: String, enum: Object.values(Status), default: Status.OPEN },\n\t\tquote_status: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(QuoteStatus),\n\t\t\tdefault: QuoteStatus.OPPORTUNITY,\n\t\t},\n\t\tsap_id: { type: String },\n\t\tsap_quotation_entry: { type: Number },\n\t\tsap_order_entry: { type: Number },\n\t\tpipedrive_id: { type: String },\n\t\tshould_sync: { type: Boolean, default: false },\n\t\tpdf_download_link: { type: String },\n\t\tnotes: { type: String },\n\t\tcreated_method: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(CreatedMethod),\n\t\t\tdefault: CreatedMethod.MANUAL,\n\t\t},\n\t\tcreated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tupdated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tdeleted_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tdeleted_at: { type: Date },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.Quote || model(\"Quote\", quoteSchema, \"quotes\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteArticleSchema = new Schema(\n\t{\n\t\tquote_id: { type: Schema.Types.ObjectId, ref: \"Quote\", required: true },\n\t\tarticle_id: { type: Schema.Types.ObjectId, ref: \"Article\" },\n\t\tarticle_number: { type: String },\n\t\tdescription: { type: String },\n\t\tdelivery: { type: String },\n\t\tquantity: { type: Number },\n\t\tprice: { type: Number },\n\t\tunit_price: { type: Number },\n\t\toriginal_price: { type: Number },\n\t\ttotal: { type: Number },\n\t\tutility: { type: Number },\n\t\ttype: { type: String },\n\t\textra_id: { type: Schema.Types.ObjectId, ref: \"QuoteArticleExtra\" },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteArticle || model(\"QuoteArticle\", quoteArticleSchema, \"quote_articles\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteArticleExtraSchema = new Schema(\n\t{\n\t\tquote_article_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"QuoteArticle\",\n\t\t\trequired: true,\n\t\t},\n\t\tmultiplier: Number,\n\t\tusa_freight: Number,\n\t\tusa_expenses: Number,\n\t\tduty: Number,\n\t\tmex_freight: Number,\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteArticleExtra || model(\"QuoteArticleExtra\", quoteArticleExtraSchema, \"quote_article_extras\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteContactSchema = new Schema({\n\tquote_id: { type: Schema.Types.ObjectId, ref: \"Quote\", required: true },\n\tname: String,\n\temail: String,\n\tmobile: String,\n\tpipedrive_id: String,\n\tcreated_at: { type: Date, default: Date.now },\n})\n\nexport default mongoose.models.QuoteContact || model(\"QuoteContact\", quoteContactSchema, \"quote_contacts\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteTermSchema = new Schema(\n\t{\n\t\ttitle: String,\n\t\tcontent: { type: String, required: true },\n\t\tcategory: String,\n\t\tis_active: { type: Boolean, default: true },\n\t\tcreated_by: String,\n\t\tupdated_by: String,\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteTerm || model(\"QuoteTerm\", quoteTermSchema, \"quote_terms\")\n","import mongoose, {\n\tSchema,\n\tmodel,\n\ttype Model,\n\ttype HydratedDocument,\n\ttype Types,\n} from \"mongoose\";\nimport bcrypt from \"bcryptjs\";\n\nexport enum CustomerStatus {\n\tACTIVE = \"active\",\n\tINACTIVE = \"inactive\",\n\tBANNED = \"banned\",\n}\n\nexport interface CustomerType {\n\tfirst_name: string;\n\tlast_name: string;\n\temail: string;\n\tmobile?: string;\n\tpassword: string;\n\tstatus: CustomerStatus;\n\tfiscal_profile_id?: Types.ObjectId;\n\tcreated_at: Date;\n\tupdated_at?: Date;\n\tdeleted_at?: Date;\n}\n\nexport type CustomerDoc = HydratedDocument<CustomerType>;\nexport type CustomerModel = Model<CustomerType>;\n\nconst customerSchema = new Schema<CustomerType>({\n\tfirst_name: { type: String, required: true },\n\tlast_name: { type: String, required: true },\n\temail: { type: String, required: true, unique: true },\n\tmobile: { type: String },\n\tpassword: { type: String, required: true, select: false },\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(CustomerStatus),\n\t\tdefault: CustomerStatus.ACTIVE,\n\t},\n\tfiscal_profile_id: { type: Schema.Types.ObjectId, ref: \"FiscalProfile\" },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n\tdeleted_at: { type: Date },\n});\n\ncustomerSchema.pre(\"save\", async function (next) {\n\tif (this.isModified(\"password\")) {\n\t\tthis.password = await bcrypt.hash(this.password, 12);\n\t}\n\tnext();\n});\n\nconst Customer: CustomerModel =\n\t(mongoose.models.Customer as CustomerModel) ||\n\tmodel<CustomerType>(\"Customer\", customerSchema, \"customers\");\n\nexport default Customer;\n","import mongoose, { Schema, model, type Model, type HydratedDocument, type Types } from \"mongoose\";\n\nexport interface FiscalProfileType {\n\tcustomer_id: Types.ObjectId;\n\trfc: string;\n\trazon_social: string;\n\tuso_cfdi: string;\n\tregimen_fiscal: string;\n\tcp: string;\n\tcreated_at: Date;\n\tupdated_at?: Date;\n}\n\nexport type FiscalProfileDoc = HydratedDocument<FiscalProfileType>;\nexport type FiscalProfileModel = Model<FiscalProfileType>;\n\nconst fiscalProfileSchema = new Schema<FiscalProfileType>({\n\tcustomer_id: { type: Schema.Types.ObjectId, ref: \"Customer\", required: true },\n\trfc: { type: String, required: true },\n\trazon_social: { type: String, required: true },\n\tuso_cfdi: { type: String, required: true },\n\tregimen_fiscal: { type: String, required: true },\n\tcp: { type: String, required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n});\n\nconst FiscalProfile: FiscalProfileModel =\n\t(mongoose.models.FiscalProfile as FiscalProfileModel) ||\n\tmodel<FiscalProfileType>(\"FiscalProfile\", fiscalProfileSchema, \"fiscal_profiles\");\n\nexport default FiscalProfile;\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport enum OrderStatus {\n\tPENDING = \"pending\",\n\tCONFIRMED = \"confirmed\",\n\tSHIPPED = \"shipped\",\n\tCANCELLED = \"cancelled\",\n\tCOMPLETED = \"completed\",\n}\n\nconst orderItemSchema = new Schema(\n\t{\n\t\tarticle_id: { type: Schema.Types.ObjectId, ref: \"Article\", required: true },\n\t\tquantity: { type: Number, required: true },\n\t\tunit_price: { type: Number, required: true },\n\t\ttotal: { type: Number, required: true },\n\t},\n\t{ _id: false }\n)\n\nconst orderSchema = new Schema({\n\tcustomer_id: { type: Schema.Types.ObjectId, ref: \"Customer\", required: true },\n\titems: [orderItemSchema],\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(OrderStatus),\n\t\tdefault: OrderStatus.PENDING,\n\t},\n\ttracking_number: { type: String },\n\ttotal: { type: Number, required: true },\n\tnotes: { type: String },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Order || model(\"Order\", orderSchema, \"orders\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\nimport { OrderStatus } from \"./Orders\"\n\nexport interface OrderStatusLogType {\n\torder_id: Types.ObjectId\n\tstatus: OrderStatus\n\tchanged_by: Types.ObjectId\n\tchanged_at: Date\n\tnote?: string\n}\n\nconst orderStatusLogSchema = new Schema<OrderStatusLogType>({\n\torder_id: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"Order\",\n\t\trequired: true,\n\t},\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(OrderStatus),\n\t\trequired: true,\n\t},\n\tchanged_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t\trequired: true,\n\t},\n\tchanged_at: {\n\t\ttype: Date,\n\t\tdefault: Date.now,\n\t},\n\tnote: {\n\t\ttype: String,\n\t},\n})\n\nexport default mongoose.models.OrderStatusLog || model<OrderStatusLogType>(\"OrderStatusLog\", orderStatusLogSchema, \"order_status_logs\")\n","import mongoose, { Schema, model, Document, Types } from \"mongoose\"\n\n/**\n * Sync Log Types\n */\nexport enum SyncLogType {\n\tSAP_QUOTATION = \"SAP_QUOTATION\",\n\tSAP_SALES_ORDER = \"SAP_SALES_ORDER\",\n\tPIPEDRIVE = \"PIPEDRIVE\",\n}\n\nexport enum SyncLogStatus {\n\tPENDING = \"PENDING\",\n\tSUCCESS = \"SUCCESS\",\n\tFAILED = \"FAILED\",\n\tRETRYING = \"RETRYING\",\n}\n\nexport enum SyncLogAction {\n\tCREATE = \"CREATE\",\n\tUPDATE = \"UPDATE\",\n\tDELETE = \"DELETE\",\n}\n\nexport interface ISyncLog extends Document {\n\t_id: Types.ObjectId\n\tentity_type: string\n\tentity_id: Types.ObjectId\n\tsync_type: SyncLogType\n\taction: SyncLogAction\n\tstatus: SyncLogStatus\n\terror_message?: string\n\terror_code?: string\n\terror_details?: Record<string, any>\n\trequest_payload?: Record<string, any>\n\tresponse_payload?: Record<string, any>\n\tretry_count: number\n\tmax_retries: number\n\tnext_retry_at?: Date\n\tcreated_at: Date\n\tupdated_at: Date\n\tresolved_at?: Date\n\tresolved_by?: Types.ObjectId\n}\n\nconst syncLogSchema = new Schema(\n\t{\n\t\tentity_type: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tentity_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tsync_type: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogType),\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\taction: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogAction),\n\t\t\trequired: true,\n\t\t},\n\t\tstatus: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogStatus),\n\t\t\tdefault: SyncLogStatus.PENDING,\n\t\t\tindex: true,\n\t\t},\n\t\terror_message: { type: String },\n\t\terror_code: { type: String },\n\t\terror_details: { type: Schema.Types.Mixed },\n\t\trequest_payload: { type: Schema.Types.Mixed },\n\t\tresponse_payload: { type: Schema.Types.Mixed },\n\t\tretry_count: { type: Number, default: 0 },\n\t\tmax_retries: { type: Number, default: 3 },\n\t\tnext_retry_at: { type: Date },\n\t\tresolved_at: { type: Date },\n\t\tresolved_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t},\n\t{\n\t\ttimestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" },\n\t}\n)\n\nsyncLogSchema.index({ entity_type: 1, entity_id: 1, status: 1 })\nsyncLogSchema.index({ status: 1, next_retry_at: 1 })\n\nexport const SyncLog = mongoose.models.SyncLog || model<ISyncLog>(\"SyncLog\", syncLogSchema, \"sync_logs\")\n","import mongoose, { Schema, model } from \"mongoose\"\nimport { UserRole } from \"../../users/models/Users\"\n\nexport interface AnnouncementType {\n\tcreated_by: mongoose.Types.ObjectId\n\tupdated_by?: mongoose.Types.ObjectId\n\tdeleted_by?: mongoose.Types.ObjectId\n\n\tcreated_at: Date\n\tupdated_at?: Date\n\tdeleted_at?: Date\n\n\ttitle: string\n\ttext: string\n\troles: UserRole[]\n}\n\nconst announcementSchema = new Schema<AnnouncementType>({\n\tcreated_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t\trequired: true,\n\t},\n\tupdated_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t},\n\tdeleted_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t},\n\n\tcreated_at: {\n\t\ttype: Date,\n\t\tdefault: Date.now,\n\t},\n\tupdated_at: Date,\n\tdeleted_at: Date,\n\n\ttitle: {\n\t\ttype: String,\n\t\trequired: true,\n\t\ttrim: true,\n\t},\n\ttext: {\n\t\ttype: String,\n\t\trequired: true,\n\t\ttrim: true,\n\t},\n\troles: {\n\t\ttype: [String],\n\t\tenum: Object.values(UserRole),\n\t\trequired: true,\n\t\tvalidate: {\n\t\t\tvalidator: (roles: UserRole[]) => roles.length > 0,\n\t\t\tmessage: \"At least one user role must be assigned.\",\n\t\t},\n\t},\n})\n\nexport default mongoose.models.Announcement || model<AnnouncementType>(\"Announcement\", announcementSchema, \"announcements\")\n","import mongoose, { Schema, model } from \"mongoose\"\nimport bcrypt from \"bcryptjs\"\n\nexport enum UserRole {\n ADMIN = \"admin\",\n SALES = \"sales\",\n TECHNICIAN = \"technician\",\n WAREHOUSEMAN = \"warehouseman\",\n}\n\nexport enum UserStatus {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n SUSPENDED = \"suspended\",\n}\n\nexport interface UserType {\n first_name: string\n middle_name?: string\n last_name: string\n username: string\n password: string\n role: UserRole\n status: UserStatus\n email?: string\n mobile?: string\n pipedrive_id?: string\n sap_employee_id?: string\n sap_id?: string\n created_at: Date\n created_by?: mongoose.Types.ObjectId | string\n updated_at?: Date\n updated_by?: mongoose.Types.ObjectId\n deleted_at?: Date\n deleted_by?: mongoose.Types.ObjectId\n}\n\nconst usersSchema = new Schema<UserType>({\n first_name: { type: String, required: true },\n middle_name: { type: String },\n last_name: { type: String, required: true },\n username: { type: String, required: true, unique: true },\n password: { type: String, required: true, select: false },\n role: {\n type: String,\n enum: Object.values(UserRole),\n default: UserRole.SALES,\n },\n status: {\n type: String,\n enum: Object.values(UserStatus),\n default: UserStatus.ACTIVE,\n },\n email: { type: String },\n mobile: { type: String },\n pipedrive_id: { type: String },\n sap_id: { type: String },\n sap_employee_id: { type: String },\n created_at: { type: Date, default: Date.now },\n created_by: { type: Schema.Types.Mixed, ref: \"User\" },\n updated_at: { type: Date },\n updated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n deleted_at: { type: Date },\n deleted_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n})\n\nusersSchema.pre(\"save\", async function (next) {\n if (this.isModified(\"password\")) {\n this.password = await bcrypt.hash(this.password, 12)\n }\n next()\n})\n\nexport default mongoose.models.User || model<UserType>(\"User\", usersSchema, \"users\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface CartItem {\n\tarticle_id: Schema.Types.ObjectId\n\tquantity: number\n}\n\nexport interface CartType {\n\tcustomer_id: Schema.Types.ObjectId\n\titems: CartItem[]\n\tupdated_at?: Date\n}\n\nconst cartItemSchema = new Schema<CartItem>(\n\t{\n\t\tarticle_id: { type: Types.ObjectId, ref: \"Article\", required: true },\n\t\tquantity: { type: Number, required: true },\n\t},\n\t{ _id: false }\n)\n\nconst cartSchema = new Schema<CartType>({\n\tcustomer_id: {\n\t\ttype: Types.ObjectId,\n\t\tref: \"Customer\",\n\t\trequired: true,\n\t\tunique: true,\n\t},\n\titems: [cartItemSchema],\n\tupdated_at: { type: Date, default: Date.now },\n})\n\nexport default mongoose.models.Cart || model<CartType>(\"Cart\", cartSchema, \"carts\")\n","import mongoose, {\n\tSchema,\n\tmodel,\n\ttype Model,\n\ttype HydratedDocument,\n\ttype Types,\n} from \"mongoose\";\n\nexport interface RefreshTokenType {\n\tcustomer_id: Types.ObjectId;\n\ttoken_hash: string;\n\texpires_at: Date;\n\trevoked_at?: Date;\n\treplaced_by_token_hash?: string;\n\tcreated_at: Date;\n\tupdated_at?: Date;\n}\n\nexport type RefreshTokenDoc = HydratedDocument<RefreshTokenType>;\nexport type RefreshTokenModel = Model<RefreshTokenType>;\n\nconst refreshTokenSchema = new Schema<RefreshTokenType>({\n\tcustomer_id: { type: Schema.Types.ObjectId, ref: \"Customer\", required: true },\n\t// Store only SHA-256 hash of the opaque refresh token (base64url). Never store the raw token.\n\ttoken_hash: { type: String, required: true },\n\texpires_at: { type: Date, required: true },\n\trevoked_at: { type: Date },\n\treplaced_by_token_hash: { type: String },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n});\n\nrefreshTokenSchema.index({ token_hash: 1 }, { unique: true });\nrefreshTokenSchema.index({ expires_at: 1 }, { expireAfterSeconds: 0 });\nrefreshTokenSchema.index({ customer_id: 1, expires_at: 1 });\n\nrefreshTokenSchema.pre(\"save\", function (next) {\n\tthis.updated_at = new Date();\n\tnext();\n});\n\nconst RefreshToken: RefreshTokenModel =\n\t(mongoose.models.RefreshToken as RefreshTokenModel) ||\n\tmodel<RefreshTokenType>(\"RefreshToken\", refreshTokenSchema, \"refresh_tokens\");\n\nexport default RefreshToken;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,sBAAwC;AAkBxC,IAAM,eAAe,IAAI;AAAA,EACxB;AAAA,IACC,SAAS,EAAE,MAAM,QAAQ,OAAO,KAAK;AAAA,IACrC,SAAS,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,IACxC,QAAQ,EAAE,MAAM,OAAO;AAAA,IACvB,UAAU,EAAE,MAAM,OAAO;AAAA,IACzB,SAAS,EAAE,MAAM,OAAO;AAAA,IACxB,OAAO,EAAE,MAAM,OAAO;AAAA,IACtB,UAAU,EAAE,MAAM,OAAO;AAAA,IACzB,cAAc,EAAE,MAAM,OAAO;AAAA,IAC7B,QAAQ,EAAE,MAAM,OAAO;AAAA,IACvB,YAAY,EAAE,MAAM,MAAM,SAAS,KAAK;AAAA,IACxC,YAAY,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,EAC3C;AAAA,EACA,EAAE,YAAY,EAAE,WAAW,cAAc,WAAW,aAAa,EAAE;AACpE;AAEA,IAAO,kBAAQ,gBAAAA,QAAS,OAAO,cAAU,uBAAkB,UAAU,cAAc,SAAS;;;ACnC5F,IAAAC,mBAA+C;AAc/C,IAAM,sBAAsB,IAAI;AAAA,EAC/B;AAAA,IACC,WAAW;AA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,EAAE,CAAC;AAE1D,mBAAmB,IAAI,QAAQ,SAAU,MAAM;AAC9C,OAAK,aAAa,oBAAI,KAAK;AAC3B,OAAK;AACN,CAAC;AAED,IAAM,eACJ,kBAAAC,QAAS,OAAO,oBACjB,yBAAwB,gBAAgB,oBAAoB,gBAAgB;AAE7E,IAAO,wBAAQ;","names":["mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","QuoteStatus","Status","CreatedMethod","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose","import_mongoose","CustomerStatus","bcrypt","mongoose","import_mongoose","mongoose","import_mongoose","OrderStatus","mongoose","import_mongoose","mongoose","import_mongoose","SyncLogType","SyncLogStatus","SyncLogAction","mongoose","import_mongoose","import_mongoose","import_bcryptjs","UserRole","UserStatus","bcrypt","mongoose","mongoose","import_mongoose","mongoose","import_mongoose","mongoose"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import mongoose, { Types, Document } from 'mongoose';
|
|
1
|
+
import mongoose, { Types, Model, HydratedDocument, Document } from 'mongoose';
|
|
2
2
|
|
|
3
3
|
interface ClientType {
|
|
4
4
|
sn_code?: string | null;
|
|
@@ -15,7 +15,7 @@ interface ClientType {
|
|
|
15
15
|
created_at?: Date;
|
|
16
16
|
updated_at?: Date;
|
|
17
17
|
}
|
|
18
|
-
declare const _default$
|
|
18
|
+
declare const _default$o: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
19
19
|
|
|
20
20
|
interface ClientContactType {
|
|
21
21
|
client_id: Types.ObjectId;
|
|
@@ -28,7 +28,7 @@ interface ClientContactType {
|
|
|
28
28
|
created_at?: Date;
|
|
29
29
|
updated_at?: Date;
|
|
30
30
|
}
|
|
31
|
-
declare const _default$
|
|
31
|
+
declare const _default$n: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
32
32
|
|
|
33
33
|
interface ClientAddressType {
|
|
34
34
|
client_id: Types.ObjectId;
|
|
@@ -42,7 +42,7 @@ interface ClientAddressType {
|
|
|
42
42
|
created_at?: Date;
|
|
43
43
|
updated_at?: Date;
|
|
44
44
|
}
|
|
45
|
-
declare const _default$
|
|
45
|
+
declare const _default$m: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
46
46
|
|
|
47
47
|
interface ClientPaymentMethodType {
|
|
48
48
|
client_id: Types.ObjectId;
|
|
@@ -51,7 +51,7 @@ interface ClientPaymentMethodType {
|
|
|
51
51
|
created_at?: Date;
|
|
52
52
|
updated_at?: Date;
|
|
53
53
|
}
|
|
54
|
-
declare const _default$
|
|
54
|
+
declare const _default$l: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
55
55
|
|
|
56
56
|
interface ClientPaymentTermType {
|
|
57
57
|
client_id: Types.ObjectId;
|
|
@@ -60,7 +60,7 @@ interface ClientPaymentTermType {
|
|
|
60
60
|
created_at?: Date;
|
|
61
61
|
updated_at?: Date;
|
|
62
62
|
}
|
|
63
|
-
declare const _default$
|
|
63
|
+
declare const _default$k: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
64
64
|
|
|
65
65
|
interface ClientPriceListType {
|
|
66
66
|
client_id: Types.ObjectId;
|
|
@@ -69,7 +69,7 @@ interface ClientPriceListType {
|
|
|
69
69
|
created_at?: Date;
|
|
70
70
|
updated_at?: Date;
|
|
71
71
|
}
|
|
72
|
-
declare const _default$
|
|
72
|
+
declare const _default$j: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
73
73
|
|
|
74
74
|
interface ClientSalesEmployeeType {
|
|
75
75
|
client_id: Types.ObjectId;
|
|
@@ -78,8 +78,6 @@ interface ClientSalesEmployeeType {
|
|
|
78
78
|
created_at?: Date;
|
|
79
79
|
updated_at?: Date;
|
|
80
80
|
}
|
|
81
|
-
declare const _default$j: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
82
|
-
|
|
83
81
|
declare const _default$i: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
84
82
|
|
|
85
83
|
declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
@@ -96,6 +94,8 @@ declare const _default$c: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
|
96
94
|
|
|
97
95
|
declare const _default$b: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
98
96
|
|
|
97
|
+
declare const _default$a: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
98
|
+
|
|
99
99
|
declare enum QuoteStatus {
|
|
100
100
|
OPPORTUNITY = "OPPORTUNITY",
|
|
101
101
|
QUOTE = "QUOTE",
|
|
@@ -112,8 +112,6 @@ declare enum CreatedMethod {
|
|
|
112
112
|
MANUAL = "MANUAL",
|
|
113
113
|
CSV = "CSV"
|
|
114
114
|
}
|
|
115
|
-
declare const _default$a: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
116
|
-
|
|
117
115
|
declare const _default$9: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
118
116
|
|
|
119
117
|
declare const _default$8: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
@@ -122,6 +120,8 @@ declare const _default$7: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
|
122
120
|
|
|
123
121
|
declare const _default$6: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
124
122
|
|
|
123
|
+
declare const _default$5: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
124
|
+
|
|
125
125
|
declare enum CustomerStatus {
|
|
126
126
|
ACTIVE = "active",
|
|
127
127
|
INACTIVE = "inactive",
|
|
@@ -134,15 +134,17 @@ interface CustomerType {
|
|
|
134
134
|
mobile?: string;
|
|
135
135
|
password: string;
|
|
136
136
|
status: CustomerStatus;
|
|
137
|
-
fiscal_profile_id?:
|
|
137
|
+
fiscal_profile_id?: Types.ObjectId;
|
|
138
138
|
created_at: Date;
|
|
139
139
|
updated_at?: Date;
|
|
140
140
|
deleted_at?: Date;
|
|
141
141
|
}
|
|
142
|
-
|
|
142
|
+
type CustomerDoc = HydratedDocument<CustomerType>;
|
|
143
|
+
type CustomerModel = Model<CustomerType>;
|
|
144
|
+
declare const Customer: CustomerModel;
|
|
143
145
|
|
|
144
146
|
interface FiscalProfileType {
|
|
145
|
-
customer_id:
|
|
147
|
+
customer_id: Types.ObjectId;
|
|
146
148
|
rfc: string;
|
|
147
149
|
razon_social: string;
|
|
148
150
|
uso_cfdi: string;
|
|
@@ -151,7 +153,9 @@ interface FiscalProfileType {
|
|
|
151
153
|
created_at: Date;
|
|
152
154
|
updated_at?: Date;
|
|
153
155
|
}
|
|
154
|
-
|
|
156
|
+
type FiscalProfileDoc = HydratedDocument<FiscalProfileType>;
|
|
157
|
+
type FiscalProfileModel = Model<FiscalProfileType>;
|
|
158
|
+
declare const FiscalProfile: FiscalProfileModel;
|
|
155
159
|
|
|
156
160
|
declare enum OrderStatus {
|
|
157
161
|
PENDING = "pending",
|
|
@@ -160,7 +164,7 @@ declare enum OrderStatus {
|
|
|
160
164
|
CANCELLED = "cancelled",
|
|
161
165
|
COMPLETED = "completed"
|
|
162
166
|
}
|
|
163
|
-
declare const _default$
|
|
167
|
+
declare const _default$4: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
164
168
|
|
|
165
169
|
interface OrderStatusLogType {
|
|
166
170
|
order_id: Types.ObjectId;
|
|
@@ -169,7 +173,7 @@ interface OrderStatusLogType {
|
|
|
169
173
|
changed_at: Date;
|
|
170
174
|
note?: string;
|
|
171
175
|
}
|
|
172
|
-
declare const _default$
|
|
176
|
+
declare const _default$3: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
173
177
|
|
|
174
178
|
/**
|
|
175
179
|
* Sync Log Types
|
|
@@ -243,7 +247,7 @@ interface UserType {
|
|
|
243
247
|
deleted_at?: Date;
|
|
244
248
|
deleted_by?: mongoose.Types.ObjectId;
|
|
245
249
|
}
|
|
246
|
-
declare const _default$
|
|
250
|
+
declare const _default$2: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
247
251
|
|
|
248
252
|
interface AnnouncementType {
|
|
249
253
|
created_by: mongoose.Types.ObjectId;
|
|
@@ -256,6 +260,21 @@ interface AnnouncementType {
|
|
|
256
260
|
text: string;
|
|
257
261
|
roles: UserRole[];
|
|
258
262
|
}
|
|
263
|
+
declare const _default$1: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
264
|
+
|
|
259
265
|
declare const _default: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
260
266
|
|
|
261
|
-
|
|
267
|
+
interface RefreshTokenType {
|
|
268
|
+
customer_id: Types.ObjectId;
|
|
269
|
+
token_hash: string;
|
|
270
|
+
expires_at: Date;
|
|
271
|
+
revoked_at?: Date;
|
|
272
|
+
replaced_by_token_hash?: string;
|
|
273
|
+
created_at: Date;
|
|
274
|
+
updated_at?: Date;
|
|
275
|
+
}
|
|
276
|
+
type RefreshTokenDoc = HydratedDocument<RefreshTokenType>;
|
|
277
|
+
type RefreshTokenModel = Model<RefreshTokenType>;
|
|
278
|
+
declare const RefreshToken: RefreshTokenModel;
|
|
279
|
+
|
|
280
|
+
export { _default$1 as Announcement, type AnnouncementType, _default$h as Article, _default$f as ArticleClass, _default$g as ArticleGroup, _default$e as ArticlePrice, _default as Cart, _default$o as Client, _default$m as ClientAddress, type ClientAddressType, _default$n as ClientContact, type ClientContactType, _default$l as ClientPaymentMethod, type ClientPaymentMethodType, _default$k as ClientPaymentTerm, type ClientPaymentTermType, _default$j as ClientPriceList, type ClientPriceListType, _default$i as ClientSalesEmployee, type ClientSalesEmployeeType, type ClientType, CreatedMethod, _default$d as Currency, Customer, type CustomerDoc, type CustomerModel, CustomerStatus, type CustomerType, FiscalProfile, type FiscalProfileDoc, type FiscalProfileModel, type FiscalProfileType, type ISyncLog, _default$b as InventoryStock, _default$4 as Order, OrderStatus, _default$3 as OrderStatusLog, type OrderStatusLogType, _default$a as PriceList, _default$9 as Quote, _default$8 as QuoteArticle, _default$7 as QuoteArticleExtra, _default$6 as QuoteContact, QuoteStatus, _default$5 as QuoteTerm, RefreshToken, type RefreshTokenDoc, type RefreshTokenModel, type RefreshTokenType, Status, SyncLog, SyncLogAction, SyncLogStatus, SyncLogType, UserRole, UserStatus, type UserType, _default$2 as Users, _default$c as Warehouse };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import mongoose, { Types, Document } from 'mongoose';
|
|
1
|
+
import mongoose, { Types, Model, HydratedDocument, Document } from 'mongoose';
|
|
2
2
|
|
|
3
3
|
interface ClientType {
|
|
4
4
|
sn_code?: string | null;
|
|
@@ -15,7 +15,7 @@ interface ClientType {
|
|
|
15
15
|
created_at?: Date;
|
|
16
16
|
updated_at?: Date;
|
|
17
17
|
}
|
|
18
|
-
declare const _default$
|
|
18
|
+
declare const _default$o: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
19
19
|
|
|
20
20
|
interface ClientContactType {
|
|
21
21
|
client_id: Types.ObjectId;
|
|
@@ -28,7 +28,7 @@ interface ClientContactType {
|
|
|
28
28
|
created_at?: Date;
|
|
29
29
|
updated_at?: Date;
|
|
30
30
|
}
|
|
31
|
-
declare const _default$
|
|
31
|
+
declare const _default$n: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
32
32
|
|
|
33
33
|
interface ClientAddressType {
|
|
34
34
|
client_id: Types.ObjectId;
|
|
@@ -42,7 +42,7 @@ interface ClientAddressType {
|
|
|
42
42
|
created_at?: Date;
|
|
43
43
|
updated_at?: Date;
|
|
44
44
|
}
|
|
45
|
-
declare const _default$
|
|
45
|
+
declare const _default$m: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
46
46
|
|
|
47
47
|
interface ClientPaymentMethodType {
|
|
48
48
|
client_id: Types.ObjectId;
|
|
@@ -51,7 +51,7 @@ interface ClientPaymentMethodType {
|
|
|
51
51
|
created_at?: Date;
|
|
52
52
|
updated_at?: Date;
|
|
53
53
|
}
|
|
54
|
-
declare const _default$
|
|
54
|
+
declare const _default$l: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
55
55
|
|
|
56
56
|
interface ClientPaymentTermType {
|
|
57
57
|
client_id: Types.ObjectId;
|
|
@@ -60,7 +60,7 @@ interface ClientPaymentTermType {
|
|
|
60
60
|
created_at?: Date;
|
|
61
61
|
updated_at?: Date;
|
|
62
62
|
}
|
|
63
|
-
declare const _default$
|
|
63
|
+
declare const _default$k: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
64
64
|
|
|
65
65
|
interface ClientPriceListType {
|
|
66
66
|
client_id: Types.ObjectId;
|
|
@@ -69,7 +69,7 @@ interface ClientPriceListType {
|
|
|
69
69
|
created_at?: Date;
|
|
70
70
|
updated_at?: Date;
|
|
71
71
|
}
|
|
72
|
-
declare const _default$
|
|
72
|
+
declare const _default$j: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
73
73
|
|
|
74
74
|
interface ClientSalesEmployeeType {
|
|
75
75
|
client_id: Types.ObjectId;
|
|
@@ -78,8 +78,6 @@ interface ClientSalesEmployeeType {
|
|
|
78
78
|
created_at?: Date;
|
|
79
79
|
updated_at?: Date;
|
|
80
80
|
}
|
|
81
|
-
declare const _default$j: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
82
|
-
|
|
83
81
|
declare const _default$i: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
84
82
|
|
|
85
83
|
declare const _default$h: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
@@ -96,6 +94,8 @@ declare const _default$c: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
|
96
94
|
|
|
97
95
|
declare const _default$b: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
98
96
|
|
|
97
|
+
declare const _default$a: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
98
|
+
|
|
99
99
|
declare enum QuoteStatus {
|
|
100
100
|
OPPORTUNITY = "OPPORTUNITY",
|
|
101
101
|
QUOTE = "QUOTE",
|
|
@@ -112,8 +112,6 @@ declare enum CreatedMethod {
|
|
|
112
112
|
MANUAL = "MANUAL",
|
|
113
113
|
CSV = "CSV"
|
|
114
114
|
}
|
|
115
|
-
declare const _default$a: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
116
|
-
|
|
117
115
|
declare const _default$9: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
118
116
|
|
|
119
117
|
declare const _default$8: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
@@ -122,6 +120,8 @@ declare const _default$7: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
|
122
120
|
|
|
123
121
|
declare const _default$6: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
124
122
|
|
|
123
|
+
declare const _default$5: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
124
|
+
|
|
125
125
|
declare enum CustomerStatus {
|
|
126
126
|
ACTIVE = "active",
|
|
127
127
|
INACTIVE = "inactive",
|
|
@@ -134,15 +134,17 @@ interface CustomerType {
|
|
|
134
134
|
mobile?: string;
|
|
135
135
|
password: string;
|
|
136
136
|
status: CustomerStatus;
|
|
137
|
-
fiscal_profile_id?:
|
|
137
|
+
fiscal_profile_id?: Types.ObjectId;
|
|
138
138
|
created_at: Date;
|
|
139
139
|
updated_at?: Date;
|
|
140
140
|
deleted_at?: Date;
|
|
141
141
|
}
|
|
142
|
-
|
|
142
|
+
type CustomerDoc = HydratedDocument<CustomerType>;
|
|
143
|
+
type CustomerModel = Model<CustomerType>;
|
|
144
|
+
declare const Customer: CustomerModel;
|
|
143
145
|
|
|
144
146
|
interface FiscalProfileType {
|
|
145
|
-
customer_id:
|
|
147
|
+
customer_id: Types.ObjectId;
|
|
146
148
|
rfc: string;
|
|
147
149
|
razon_social: string;
|
|
148
150
|
uso_cfdi: string;
|
|
@@ -151,7 +153,9 @@ interface FiscalProfileType {
|
|
|
151
153
|
created_at: Date;
|
|
152
154
|
updated_at?: Date;
|
|
153
155
|
}
|
|
154
|
-
|
|
156
|
+
type FiscalProfileDoc = HydratedDocument<FiscalProfileType>;
|
|
157
|
+
type FiscalProfileModel = Model<FiscalProfileType>;
|
|
158
|
+
declare const FiscalProfile: FiscalProfileModel;
|
|
155
159
|
|
|
156
160
|
declare enum OrderStatus {
|
|
157
161
|
PENDING = "pending",
|
|
@@ -160,7 +164,7 @@ declare enum OrderStatus {
|
|
|
160
164
|
CANCELLED = "cancelled",
|
|
161
165
|
COMPLETED = "completed"
|
|
162
166
|
}
|
|
163
|
-
declare const _default$
|
|
167
|
+
declare const _default$4: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
164
168
|
|
|
165
169
|
interface OrderStatusLogType {
|
|
166
170
|
order_id: Types.ObjectId;
|
|
@@ -169,7 +173,7 @@ interface OrderStatusLogType {
|
|
|
169
173
|
changed_at: Date;
|
|
170
174
|
note?: string;
|
|
171
175
|
}
|
|
172
|
-
declare const _default$
|
|
176
|
+
declare const _default$3: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
173
177
|
|
|
174
178
|
/**
|
|
175
179
|
* Sync Log Types
|
|
@@ -243,7 +247,7 @@ interface UserType {
|
|
|
243
247
|
deleted_at?: Date;
|
|
244
248
|
deleted_by?: mongoose.Types.ObjectId;
|
|
245
249
|
}
|
|
246
|
-
declare const _default$
|
|
250
|
+
declare const _default$2: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
247
251
|
|
|
248
252
|
interface AnnouncementType {
|
|
249
253
|
created_by: mongoose.Types.ObjectId;
|
|
@@ -256,6 +260,21 @@ interface AnnouncementType {
|
|
|
256
260
|
text: string;
|
|
257
261
|
roles: UserRole[];
|
|
258
262
|
}
|
|
263
|
+
declare const _default$1: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
264
|
+
|
|
259
265
|
declare const _default: mongoose.Model<any, {}, {}, {}, any, any>;
|
|
260
266
|
|
|
261
|
-
|
|
267
|
+
interface RefreshTokenType {
|
|
268
|
+
customer_id: Types.ObjectId;
|
|
269
|
+
token_hash: string;
|
|
270
|
+
expires_at: Date;
|
|
271
|
+
revoked_at?: Date;
|
|
272
|
+
replaced_by_token_hash?: string;
|
|
273
|
+
created_at: Date;
|
|
274
|
+
updated_at?: Date;
|
|
275
|
+
}
|
|
276
|
+
type RefreshTokenDoc = HydratedDocument<RefreshTokenType>;
|
|
277
|
+
type RefreshTokenModel = Model<RefreshTokenType>;
|
|
278
|
+
declare const RefreshToken: RefreshTokenModel;
|
|
279
|
+
|
|
280
|
+
export { _default$1 as Announcement, type AnnouncementType, _default$h as Article, _default$f as ArticleClass, _default$g as ArticleGroup, _default$e as ArticlePrice, _default as Cart, _default$o as Client, _default$m as ClientAddress, type ClientAddressType, _default$n as ClientContact, type ClientContactType, _default$l as ClientPaymentMethod, type ClientPaymentMethodType, _default$k as ClientPaymentTerm, type ClientPaymentTermType, _default$j as ClientPriceList, type ClientPriceListType, _default$i as ClientSalesEmployee, type ClientSalesEmployeeType, type ClientType, CreatedMethod, _default$d as Currency, Customer, type CustomerDoc, type CustomerModel, CustomerStatus, type CustomerType, FiscalProfile, type FiscalProfileDoc, type FiscalProfileModel, type FiscalProfileType, type ISyncLog, _default$b as InventoryStock, _default$4 as Order, OrderStatus, _default$3 as OrderStatusLog, type OrderStatusLogType, _default$a as PriceList, _default$9 as Quote, _default$8 as QuoteArticle, _default$7 as QuoteArticleExtra, _default$6 as QuoteContact, QuoteStatus, _default$5 as QuoteTerm, RefreshToken, type RefreshTokenDoc, type RefreshTokenModel, type RefreshTokenType, Status, SyncLog, SyncLogAction, SyncLogStatus, SyncLogType, UserRole, UserStatus, type UserType, _default$2 as Users, _default$c as Warehouse };
|
package/dist/index.js
CHANGED
|
@@ -370,7 +370,10 @@ var quoteTermSchema = new Schema20(
|
|
|
370
370
|
var QuoteTerm_default = mongoose20.models.QuoteTerm || model20("QuoteTerm", quoteTermSchema, "quote_terms");
|
|
371
371
|
|
|
372
372
|
// src/customers/models/Customers.ts
|
|
373
|
-
import mongoose21, {
|
|
373
|
+
import mongoose21, {
|
|
374
|
+
Schema as Schema21,
|
|
375
|
+
model as model21
|
|
376
|
+
} from "mongoose";
|
|
374
377
|
import bcrypt from "bcryptjs";
|
|
375
378
|
var CustomerStatus = /* @__PURE__ */ ((CustomerStatus2) => {
|
|
376
379
|
CustomerStatus2["ACTIVE"] = "active";
|
|
@@ -400,7 +403,8 @@ customerSchema.pre("save", async function(next) {
|
|
|
400
403
|
}
|
|
401
404
|
next();
|
|
402
405
|
});
|
|
403
|
-
var
|
|
406
|
+
var Customer = mongoose21.models.Customer || model21("Customer", customerSchema, "customers");
|
|
407
|
+
var Customers_default = Customer;
|
|
404
408
|
|
|
405
409
|
// src/customers/models/FiscalProfileType.ts
|
|
406
410
|
import mongoose22, { Schema as Schema22, model as model22 } from "mongoose";
|
|
@@ -414,7 +418,8 @@ var fiscalProfileSchema = new Schema22({
|
|
|
414
418
|
created_at: { type: Date, default: Date.now },
|
|
415
419
|
updated_at: { type: Date }
|
|
416
420
|
});
|
|
417
|
-
var
|
|
421
|
+
var FiscalProfile = mongoose22.models.FiscalProfile || model22("FiscalProfile", fiscalProfileSchema, "fiscal_profiles");
|
|
422
|
+
var FiscalProfileType_default = FiscalProfile;
|
|
418
423
|
|
|
419
424
|
// src/orders/models/Orders.ts
|
|
420
425
|
import mongoose23, { Schema as Schema23, model as model23 } from "mongoose";
|
|
@@ -645,12 +650,59 @@ var announcementSchema = new Schema27({
|
|
|
645
650
|
}
|
|
646
651
|
});
|
|
647
652
|
var Announcements_default = mongoose27.models.Announcement || model27("Announcement", announcementSchema, "announcements");
|
|
653
|
+
|
|
654
|
+
// src/carts/models/Carts.ts
|
|
655
|
+
import mongoose28, { Schema as Schema28, model as model28, Types as Types12 } from "mongoose";
|
|
656
|
+
var cartItemSchema = new Schema28(
|
|
657
|
+
{
|
|
658
|
+
article_id: { type: Types12.ObjectId, ref: "Article", required: true },
|
|
659
|
+
quantity: { type: Number, required: true }
|
|
660
|
+
},
|
|
661
|
+
{ _id: false }
|
|
662
|
+
);
|
|
663
|
+
var cartSchema = new Schema28({
|
|
664
|
+
customer_id: {
|
|
665
|
+
type: Types12.ObjectId,
|
|
666
|
+
ref: "Customer",
|
|
667
|
+
required: true,
|
|
668
|
+
unique: true
|
|
669
|
+
},
|
|
670
|
+
items: [cartItemSchema],
|
|
671
|
+
updated_at: { type: Date, default: Date.now }
|
|
672
|
+
});
|
|
673
|
+
var Carts_default = mongoose28.models.Cart || model28("Cart", cartSchema, "carts");
|
|
674
|
+
|
|
675
|
+
// src/auth/models/RefreshTokens.ts
|
|
676
|
+
import mongoose29, {
|
|
677
|
+
Schema as Schema29,
|
|
678
|
+
model as model29
|
|
679
|
+
} from "mongoose";
|
|
680
|
+
var refreshTokenSchema = new Schema29({
|
|
681
|
+
customer_id: { type: Schema29.Types.ObjectId, ref: "Customer", required: true },
|
|
682
|
+
// Store only SHA-256 hash of the opaque refresh token (base64url). Never store the raw token.
|
|
683
|
+
token_hash: { type: String, required: true },
|
|
684
|
+
expires_at: { type: Date, required: true },
|
|
685
|
+
revoked_at: { type: Date },
|
|
686
|
+
replaced_by_token_hash: { type: String },
|
|
687
|
+
created_at: { type: Date, default: Date.now },
|
|
688
|
+
updated_at: { type: Date }
|
|
689
|
+
});
|
|
690
|
+
refreshTokenSchema.index({ token_hash: 1 }, { unique: true });
|
|
691
|
+
refreshTokenSchema.index({ expires_at: 1 }, { expireAfterSeconds: 0 });
|
|
692
|
+
refreshTokenSchema.index({ customer_id: 1, expires_at: 1 });
|
|
693
|
+
refreshTokenSchema.pre("save", function(next) {
|
|
694
|
+
this.updated_at = /* @__PURE__ */ new Date();
|
|
695
|
+
next();
|
|
696
|
+
});
|
|
697
|
+
var RefreshToken = mongoose29.models.RefreshToken || model29("RefreshToken", refreshTokenSchema, "refresh_tokens");
|
|
698
|
+
var RefreshTokens_default = RefreshToken;
|
|
648
699
|
export {
|
|
649
700
|
Announcements_default as Announcement,
|
|
650
701
|
Article_default as Article,
|
|
651
702
|
ArticleClasses_default as ArticleClass,
|
|
652
703
|
ArticleGroups_default as ArticleGroup,
|
|
653
704
|
ArticlePrices_default as ArticlePrice,
|
|
705
|
+
Carts_default as Cart,
|
|
654
706
|
Clients_default as Client,
|
|
655
707
|
ClientsAddress_default as ClientAddress,
|
|
656
708
|
ClientsContact_default as ClientContact,
|
|
@@ -673,6 +725,7 @@ export {
|
|
|
673
725
|
QuoteContact_default as QuoteContact,
|
|
674
726
|
QuoteStatus,
|
|
675
727
|
QuoteTerm_default as QuoteTerm,
|
|
728
|
+
RefreshTokens_default as RefreshToken,
|
|
676
729
|
Status,
|
|
677
730
|
SyncLog,
|
|
678
731
|
SyncLogAction,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/clients/models/Clients.ts","../src/clients/models/ClientsContact.ts","../src/clients/models/ClientsAddress.ts","../src/clients/models/ClientsPaymentMethod.ts","../src/clients/models/ClientsPaymentTerm.ts","../src/clients/models/ClientsPriceList.ts","../src/clients/models/ClientsSalesEmployee.ts","../src/inventory/models/Article.ts","../src/inventory/models/ArticleGroups.ts","../src/inventory/models/ArticleClasses.ts","../src/inventory/models/ArticlePrices.ts","../src/inventory/models/Currencies.ts","../src/inventory/models/Warehouses.ts","../src/inventory/models/InventoryStocks.ts","../src/inventory/models/PriceLists.ts","../src/quotes/models/Quote.ts","../src/quotes/models/QuoteArticle.ts","../src/quotes/models/QuoteArticleExtra.ts","../src/quotes/models/QuoteContact.ts","../src/quotes/models/QuoteTerm.ts","../src/customers/models/Customers.ts","../src/customers/models/FiscalProfileType.ts","../src/orders/models/Orders.ts","../src/orders/models/OrderStatusLogs.ts","../src/sap/models/SyncLog.ts","../src/announcements/models/Announcements.ts","../src/users/models/Users.ts"],"sourcesContent":["import mongoose, { Schema, model } from \"mongoose\"\n\nexport interface ClientType {\n\tsn_code?: string | null\n\tsn_name?: string | null\n\ttax_id?: string | null\n\tcurrency?: string | null\n\tphone_1?: string | null\n\temail?: string | null\n\tcomments?: string | null\n\tpipedrive_id?: string | null\n\tsap_id?: string | null\n\tdeleted_at?: Date | null\n\tdeleted_by?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientSchema = new Schema<ClientType>(\n\t{\n\t\tsn_code: { type: String, index: true },\n\t\tsn_name: { type: String, required: true },\n\t\ttax_id: { type: String },\n\t\tcurrency: { type: String },\n\t\tphone_1: { type: String },\n\t\temail: { type: String },\n\t\tcomments: { type: String },\n\t\tpipedrive_id: { type: String },\n\t\tsap_id: { type: String },\n\t\tdeleted_at: { type: Date, default: null },\n\t\tdeleted_by: { type: String, default: null },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.Client || model<ClientType>(\"Client\", clientSchema, \"clients\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientContactType {\n\tclient_id: Types.ObjectId\n\tcontact_person_name?: string | null\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\tcontact_phone?: string | null\n\tcontact_email?: string | null\n\tpipedrive_id?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientContactSchema = new Schema<ClientContactType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tcontact_person_name: { type: String },\n\t\tfirst_name: { type: String },\n\t\tlast_name: { type: String },\n\t\tcontact_phone: { type: String },\n\t\tcontact_email: { type: String },\n\t\tpipedrive_id: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientContact || model<ClientContactType>(\"ClientContact\", clientContactSchema, \"client_contacts\")","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientAddressType {\n\tclient_id: Types.ObjectId\n\taddress_name?: string | null\n\tstreet?: string | null\n\tneighborhood?: string | null\n\tpostal_code?: string | null\n\tcity?: string | null\n\tstate?: string | null\n\tcountry?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientAddressSchema = new Schema<ClientAddressType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\taddress_name: { type: String },\n\t\tstreet: { type: String },\n\t\tneighborhood: { type: String },\n\t\tpostal_code: { type: String },\n\t\tcity: { type: String },\n\t\tstate: { type: String },\n\t\tcountry: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientAddress || model<ClientAddressType>(\n\t\"ClientAddress\",\n\tclientAddressSchema,\n\t\"client_addresses\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPaymentMethodType {\n\tclient_id: Types.ObjectId\n\tcode?: string | null\n\tdescription?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPaymentMethodSchema = new Schema<ClientPaymentMethodType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tcode: { type: String },\n\t\tdescription: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPaymentMethod || model<ClientPaymentMethodType>(\n\t\"ClientPaymentMethod\",\n\tclientPaymentMethodSchema,\n\t\"client_payment_methods\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPaymentTermType {\n\tclient_id: Types.ObjectId\n\tcode?: string | null\n\tname?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPaymentTermSchema = new Schema<ClientPaymentTermType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tcode: { type: String },\n\t\tname: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPaymentTerm || model<ClientPaymentTermType>(\n\t\"ClientPaymentTerm\",\n\tclientPaymentTermSchema,\n\t\"client_payment_terms\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPriceListType {\n\tclient_id: Types.ObjectId\n\tnumber?: string | null\n\tname?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPriceListSchema = new Schema<ClientPriceListType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tnumber: { type: String },\n\t\tname: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPriceList || model<ClientPriceListType>(\n\t\"ClientPriceList\",\n\tclientPriceListSchema,\n\t\"client_price_lists\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientSalesEmployeeType {\n\tclient_id: Types.ObjectId\n\temployee_code?: string | null\n\temployee_name?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientSalesEmployeeSchema = new Schema<ClientSalesEmployeeType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\temployee_code: { type: String },\n\t\temployee_name: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientSalesEmployee || model<ClientSalesEmployeeType>(\n\t\"ClientSalesEmployee\",\n\tclientSalesEmployeeSchema,\n\t\"client_sales_employees\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst articleSchema = new Schema({\n\tarticle_number: { type: String, required: true, unique: true }, // SAP ItemCode\n\tdescription: { type: String, required: true },\n\tunit: { type: String, required: true },\n\tbrand: { type: String },\n\tmodel: { type: String },\n\tgroup_id: { type: Types.ObjectId, ref: \"ArticleGroup\", required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Article || model(\"Article\", articleSchema, \"articles\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst articleGroupSchema = new Schema({\n\tname: { type: String, required: true },\n\tdescription: { type: String },\n})\n\nexport default mongoose.models.ArticleGroup || model(\"ArticleGroup\", articleGroupSchema, \"article_groups\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst articleClassSchema = new Schema({\n\tname: { type: String, required: true },\n\tdescription: { type: String },\n})\n\nexport default mongoose.models.ArticleClass || model(\"ArticleClass\", articleClassSchema, \"article_classes\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst articlePriceSchema = new Schema({\n\tarticle_id: { type: Types.ObjectId, ref: \"Article\", required: true },\n\tprice_list_id: { type: Types.ObjectId, ref: \"PriceList\", required: true },\n\tcurrency_id: { type: Types.ObjectId, ref: \"Currency\", required: true },\n\tprice: { type: Number, required: true },\n\tvalid_from: { type: Date },\n\tvalid_to: { type: Date },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.ArticlePrice || model(\"ArticlePrice\", articlePriceSchema, \"article_prices\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst currencySchema = new Schema({\n\tcode: { type: String, required: true, unique: true },\n\tsymbol: { type: String, required: true },\n\tname: { type: String, required: true },\n})\n\nexport default mongoose.models.Currency || model(\"Currency\", currencySchema, \"currencies\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst warehouseSchema = new Schema({\n\tcode: { type: String, required: true, unique: true },\n\tname: { type: String, required: true },\n\tlocation: { type: String },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Warehouse || model(\"Warehouse\", warehouseSchema, \"warehouses\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst inventoryStockSchema = new Schema({\n\tarticle_id: { type: Types.ObjectId, ref: \"Article\", required: true },\n\twarehouse_id: { type: Types.ObjectId, ref: \"Warehouse\", required: true },\n\tcount: { type: Number, required: true },\n\tmin_stock: { type: Number },\n\tmax_stock: { type: Number },\n\tupdated_at: { type: Date, default: Date.now },\n})\n\nexport default mongoose.models.InventoryStock || model(\"InventoryStock\", inventoryStockSchema, \"inventory_stocks\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst priceListSchema = new Schema({\n\tnumber: { type: String, required: true, unique: true },\n\tname: { type: String, required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.PriceList || model(\"PriceList\", priceListSchema, \"price_lists\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport enum QuoteStatus {\n\tOPPORTUNITY = \"OPPORTUNITY\",\n\tQUOTE = \"QUOTE\",\n\tFOLLOWING = \"FOLLOWING\",\n\tNEGOTIATION = \"NEGOTIATION\",\n}\n\nexport enum Status {\n\tOPEN = \"OPEN\",\n\tWIN = \"WIN\",\n\tLOST = \"LOST\",\n\tDELETE = \"DELETE\",\n}\n\nexport enum CreatedMethod {\n\tMANUAL = \"MANUAL\",\n\tCSV = \"CSV\",\n}\n\nconst quoteSchema = new Schema(\n\t{\n\t\tquote_number: { type: Number, required: true },\n\t\tquote_revision: { type: Number, default: 0 },\n\t\tquote_ref: { type: String },\n\t\tcompany: { type: String },\n\t\tcompany_id: { type: Schema.Types.ObjectId, ref: \"Client\", required: true },\n\t\tcompany_pipedrive_id: { type: String },\n\t\tcontact_id: { type: Schema.Types.ObjectId, ref: \"ClientContact\" },\n\t\tproject_name: { type: String },\n\t\tproject_lab: { type: String },\n\t\tpayment_condition: { type: String },\n\t\tpayment_exp: { type: String },\n\t\tterms_ids: [{ type: Schema.Types.ObjectId, ref: \"QuoteTerm\" }],\n\t\tcurrency_id: { type: Schema.Types.ObjectId, ref: \"Currency\" },\n\t\tiva: { type: String },\n\t\tdate: { type: Date },\n\t\tstatus: { type: String, enum: Object.values(Status), default: Status.OPEN },\n\t\tquote_status: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(QuoteStatus),\n\t\t\tdefault: QuoteStatus.OPPORTUNITY,\n\t\t},\n\t\tsap_id: { type: String },\n\t\tsap_quotation_entry: { type: Number },\n\t\tsap_order_entry: { type: Number },\n\t\tpipedrive_id: { type: String },\n\t\tshould_sync: { type: Boolean, default: false },\n\t\tpdf_download_link: { type: String },\n\t\tnotes: { type: String },\n\t\tcreated_method: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(CreatedMethod),\n\t\t\tdefault: CreatedMethod.MANUAL,\n\t\t},\n\t\tcreated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tupdated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tdeleted_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tdeleted_at: { type: Date },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.Quote || model(\"Quote\", quoteSchema, \"quotes\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteArticleSchema = new Schema(\n\t{\n\t\tquote_id: { type: Schema.Types.ObjectId, ref: \"Quote\", required: true },\n\t\tarticle_id: { type: Schema.Types.ObjectId, ref: \"Article\" },\n\t\tarticle_number: { type: String },\n\t\tdescription: { type: String },\n\t\tdelivery: { type: String },\n\t\tquantity: { type: Number },\n\t\tprice: { type: Number },\n\t\tunit_price: { type: Number },\n\t\toriginal_price: { type: Number },\n\t\ttotal: { type: Number },\n\t\tutility: { type: Number },\n\t\ttype: { type: String },\n\t\textra_id: { type: Schema.Types.ObjectId, ref: \"QuoteArticleExtra\" },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteArticle || model(\"QuoteArticle\", quoteArticleSchema, \"quote_articles\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteArticleExtraSchema = new Schema(\n\t{\n\t\tquote_article_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"QuoteArticle\",\n\t\t\trequired: true,\n\t\t},\n\t\tmultiplier: Number,\n\t\tusa_freight: Number,\n\t\tusa_expenses: Number,\n\t\tduty: Number,\n\t\tmex_freight: Number,\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteArticleExtra || model(\"QuoteArticleExtra\", quoteArticleExtraSchema, \"quote_article_extras\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteContactSchema = new Schema({\n\tquote_id: { type: Schema.Types.ObjectId, ref: \"Quote\", required: true },\n\tname: String,\n\temail: String,\n\tmobile: String,\n\tpipedrive_id: String,\n\tcreated_at: { type: Date, default: Date.now },\n})\n\nexport default mongoose.models.QuoteContact || model(\"QuoteContact\", quoteContactSchema, \"quote_contacts\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteTermSchema = new Schema(\n\t{\n\t\ttitle: String,\n\t\tcontent: { type: String, required: true },\n\t\tcategory: String,\n\t\tis_active: { type: Boolean, default: true },\n\t\tcreated_by: String,\n\t\tupdated_by: String,\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteTerm || model(\"QuoteTerm\", quoteTermSchema, \"quote_terms\")\n","import mongoose, { Schema, model } from \"mongoose\"\nimport bcrypt from \"bcryptjs\"\n\nexport enum CustomerStatus {\n\tACTIVE = \"active\",\n\tINACTIVE = \"inactive\",\n\tBANNED = \"banned\",\n}\n\nexport interface CustomerType {\n\tfirst_name: string\n\tlast_name: string\n\temail: string\n\tmobile?: string\n\tpassword: string\n\tstatus: CustomerStatus\n\tfiscal_profile_id?: mongoose.Types.ObjectId\n\tcreated_at: Date\n\tupdated_at?: Date\n\tdeleted_at?: Date\n}\n\nconst customerSchema = new Schema<CustomerType>({\n\tfirst_name: { type: String, required: true },\n\tlast_name: { type: String, required: true },\n\temail: { type: String, required: true, unique: true },\n\tmobile: { type: String },\n\tpassword: { type: String, required: true, select: false },\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(CustomerStatus),\n\t\tdefault: CustomerStatus.ACTIVE,\n\t},\n\tfiscal_profile_id: { type: Schema.Types.ObjectId, ref: \"FiscalProfile\" },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n\tdeleted_at: { type: Date },\n})\n\n// Hash password\ncustomerSchema.pre(\"save\", async function (next) {\n\tif (this.isModified(\"password\")) {\n\t\tthis.password = await bcrypt.hash(this.password, 12)\n\t}\n\tnext()\n})\n\nexport default mongoose.models.Customer || model<CustomerType>(\"Customer\", customerSchema, \"customers\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport interface FiscalProfileType {\n\tcustomer_id: mongoose.Types.ObjectId\n\trfc: string\n\trazon_social: string\n\tuso_cfdi: string\n\tregimen_fiscal: string\n\tcp: string // código postal\n\tcreated_at: Date\n\tupdated_at?: Date\n}\n\nconst fiscalProfileSchema = new Schema<FiscalProfileType>({\n\tcustomer_id: { type: Schema.Types.ObjectId, ref: \"Customer\", required: true },\n\trfc: { type: String, required: true },\n\trazon_social: { type: String, required: true },\n\tuso_cfdi: { type: String, required: true },\n\tregimen_fiscal: { type: String, required: true },\n\tcp: { type: String, required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.FiscalProfile || model<FiscalProfileType>(\"FiscalProfile\", fiscalProfileSchema, \"fiscal_profiles\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport enum OrderStatus {\n\tPENDING = \"pending\",\n\tCONFIRMED = \"confirmed\",\n\tSHIPPED = \"shipped\",\n\tCANCELLED = \"cancelled\",\n\tCOMPLETED = \"completed\",\n}\n\nconst orderItemSchema = new Schema(\n\t{\n\t\tarticle_id: { type: Schema.Types.ObjectId, ref: \"Article\", required: true },\n\t\tquantity: { type: Number, required: true },\n\t\tunit_price: { type: Number, required: true },\n\t\ttotal: { type: Number, required: true },\n\t},\n\t{ _id: false }\n)\n\nconst orderSchema = new Schema({\n\tcustomer_id: { type: Schema.Types.ObjectId, ref: \"Customer\", required: true },\n\titems: [orderItemSchema],\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(OrderStatus),\n\t\tdefault: OrderStatus.PENDING,\n\t},\n\ttracking_number: { type: String },\n\ttotal: { type: Number, required: true },\n\tnotes: { type: String },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Order || model(\"Order\", orderSchema, \"orders\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\nimport { OrderStatus } from \"./Orders\"\n\nexport interface OrderStatusLogType {\n\torder_id: Types.ObjectId\n\tstatus: OrderStatus\n\tchanged_by: Types.ObjectId\n\tchanged_at: Date\n\tnote?: string\n}\n\nconst orderStatusLogSchema = new Schema<OrderStatusLogType>({\n\torder_id: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"Order\",\n\t\trequired: true,\n\t},\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(OrderStatus),\n\t\trequired: true,\n\t},\n\tchanged_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t\trequired: true,\n\t},\n\tchanged_at: {\n\t\ttype: Date,\n\t\tdefault: Date.now,\n\t},\n\tnote: {\n\t\ttype: String,\n\t},\n})\n\nexport default mongoose.models.OrderStatusLog || model<OrderStatusLogType>(\"OrderStatusLog\", orderStatusLogSchema, \"order_status_logs\")\n","import mongoose, { Schema, model, Document, Types } from \"mongoose\"\n\n/**\n * Sync Log Types\n */\nexport enum SyncLogType {\n\tSAP_QUOTATION = \"SAP_QUOTATION\",\n\tSAP_SALES_ORDER = \"SAP_SALES_ORDER\",\n\tPIPEDRIVE = \"PIPEDRIVE\",\n}\n\nexport enum SyncLogStatus {\n\tPENDING = \"PENDING\",\n\tSUCCESS = \"SUCCESS\",\n\tFAILED = \"FAILED\",\n\tRETRYING = \"RETRYING\",\n}\n\nexport enum SyncLogAction {\n\tCREATE = \"CREATE\",\n\tUPDATE = \"UPDATE\",\n\tDELETE = \"DELETE\",\n}\n\nexport interface ISyncLog extends Document {\n\t_id: Types.ObjectId\n\tentity_type: string\n\tentity_id: Types.ObjectId\n\tsync_type: SyncLogType\n\taction: SyncLogAction\n\tstatus: SyncLogStatus\n\terror_message?: string\n\terror_code?: string\n\terror_details?: Record<string, any>\n\trequest_payload?: Record<string, any>\n\tresponse_payload?: Record<string, any>\n\tretry_count: number\n\tmax_retries: number\n\tnext_retry_at?: Date\n\tcreated_at: Date\n\tupdated_at: Date\n\tresolved_at?: Date\n\tresolved_by?: Types.ObjectId\n}\n\nconst syncLogSchema = new Schema(\n\t{\n\t\tentity_type: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tentity_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tsync_type: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogType),\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\taction: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogAction),\n\t\t\trequired: true,\n\t\t},\n\t\tstatus: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogStatus),\n\t\t\tdefault: SyncLogStatus.PENDING,\n\t\t\tindex: true,\n\t\t},\n\t\terror_message: { type: String },\n\t\terror_code: { type: String },\n\t\terror_details: { type: Schema.Types.Mixed },\n\t\trequest_payload: { type: Schema.Types.Mixed },\n\t\tresponse_payload: { type: Schema.Types.Mixed },\n\t\tretry_count: { type: Number, default: 0 },\n\t\tmax_retries: { type: Number, default: 3 },\n\t\tnext_retry_at: { type: Date },\n\t\tresolved_at: { type: Date },\n\t\tresolved_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t},\n\t{\n\t\ttimestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" },\n\t}\n)\n\nsyncLogSchema.index({ entity_type: 1, entity_id: 1, status: 1 })\nsyncLogSchema.index({ status: 1, next_retry_at: 1 })\n\nexport const SyncLog = mongoose.models.SyncLog || model<ISyncLog>(\"SyncLog\", syncLogSchema, \"sync_logs\")\n","import mongoose, { Schema, model } from \"mongoose\"\nimport { UserRole } from \"../../users/models/Users\"\n\nexport interface AnnouncementType {\n\tcreated_by: mongoose.Types.ObjectId\n\tupdated_by?: mongoose.Types.ObjectId\n\tdeleted_by?: mongoose.Types.ObjectId\n\n\tcreated_at: Date\n\tupdated_at?: Date\n\tdeleted_at?: Date\n\n\ttitle: string\n\ttext: string\n\troles: UserRole[]\n}\n\nconst announcementSchema = new Schema<AnnouncementType>({\n\tcreated_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t\trequired: true,\n\t},\n\tupdated_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t},\n\tdeleted_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t},\n\n\tcreated_at: {\n\t\ttype: Date,\n\t\tdefault: Date.now,\n\t},\n\tupdated_at: Date,\n\tdeleted_at: Date,\n\n\ttitle: {\n\t\ttype: String,\n\t\trequired: true,\n\t\ttrim: true,\n\t},\n\ttext: {\n\t\ttype: String,\n\t\trequired: true,\n\t\ttrim: true,\n\t},\n\troles: {\n\t\ttype: [String],\n\t\tenum: Object.values(UserRole),\n\t\trequired: true,\n\t\tvalidate: {\n\t\t\tvalidator: (roles: UserRole[]) => roles.length > 0,\n\t\t\tmessage: \"At least one user role must be assigned.\",\n\t\t},\n\t},\n})\n\nexport default mongoose.models.Announcement || model<AnnouncementType>(\"Announcement\", announcementSchema, \"announcements\")\n","import mongoose, { Schema, model } from \"mongoose\"\nimport bcrypt from \"bcryptjs\"\n\nexport enum UserRole {\n ADMIN = \"admin\",\n SALES = \"sales\",\n TECHNICIAN = \"technician\",\n WAREHOUSEMAN = \"warehouseman\",\n}\n\nexport enum UserStatus {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n SUSPENDED = \"suspended\",\n}\n\nexport interface UserType {\n first_name: string\n middle_name?: string\n last_name: string\n username: string\n password: string\n role: UserRole\n status: UserStatus\n email?: string\n mobile?: string\n pipedrive_id?: string\n sap_employee_id?: string\n sap_id?: string\n created_at: Date\n created_by?: mongoose.Types.ObjectId | string\n updated_at?: Date\n updated_by?: mongoose.Types.ObjectId\n deleted_at?: Date\n deleted_by?: mongoose.Types.ObjectId\n}\n\nconst usersSchema = new Schema<UserType>({\n first_name: { type: String, required: true },\n middle_name: { type: String },\n last_name: { type: String, required: true },\n username: { type: String, required: true, unique: true },\n password: { type: String, required: true, select: false },\n role: {\n type: String,\n enum: Object.values(UserRole),\n default: UserRole.SALES,\n },\n status: {\n type: String,\n enum: Object.values(UserStatus),\n default: UserStatus.ACTIVE,\n },\n email: { type: String },\n mobile: { type: String },\n pipedrive_id: { type: String },\n sap_id: { type: String },\n sap_employee_id: { type: String },\n created_at: { type: Date, default: Date.now },\n created_by: { type: Schema.Types.Mixed, ref: \"User\" },\n updated_at: { type: Date },\n updated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n deleted_at: { type: Date },\n deleted_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n})\n\nusersSchema.pre(\"save\", async function (next) {\n if (this.isModified(\"password\")) {\n this.password = await bcrypt.hash(this.password, 12)\n }\n next()\n})\n\nexport default mongoose.models.User || model<UserType>(\"User\", usersSchema, \"users\")\n"],"mappings":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BAAgBC,QAAwB,gBAAgB,oBAAoB,eAAe;","names":["mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","Types","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","Types","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","Types","mongoose","Schema","model","mongoose","Schema","model","QuoteStatus","Status","CreatedMethod","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","CustomerStatus","mongoose","Schema","model","mongoose","Schema","model","OrderStatus","mongoose","Schema","model","Schema","mongoose","model","mongoose","Schema","model","SyncLogType","SyncLogStatus","SyncLogAction","mongoose","Schema","model","mongoose","Schema","model","bcrypt","UserRole","UserStatus","Schema","mongoose","model"]}
|
|
1
|
+
{"version":3,"sources":["../src/clients/models/Clients.ts","../src/clients/models/ClientsContact.ts","../src/clients/models/ClientsAddress.ts","../src/clients/models/ClientsPaymentMethod.ts","../src/clients/models/ClientsPaymentTerm.ts","../src/clients/models/ClientsPriceList.ts","../src/clients/models/ClientsSalesEmployee.ts","../src/inventory/models/Article.ts","../src/inventory/models/ArticleGroups.ts","../src/inventory/models/ArticleClasses.ts","../src/inventory/models/ArticlePrices.ts","../src/inventory/models/Currencies.ts","../src/inventory/models/Warehouses.ts","../src/inventory/models/InventoryStocks.ts","../src/inventory/models/PriceLists.ts","../src/quotes/models/Quote.ts","../src/quotes/models/QuoteArticle.ts","../src/quotes/models/QuoteArticleExtra.ts","../src/quotes/models/QuoteContact.ts","../src/quotes/models/QuoteTerm.ts","../src/customers/models/Customers.ts","../src/customers/models/FiscalProfileType.ts","../src/orders/models/Orders.ts","../src/orders/models/OrderStatusLogs.ts","../src/sap/models/SyncLog.ts","../src/announcements/models/Announcements.ts","../src/users/models/Users.ts","../src/carts/models/Carts.ts","../src/auth/models/RefreshTokens.ts"],"sourcesContent":["import mongoose, { Schema, model } from \"mongoose\"\n\nexport interface ClientType {\n\tsn_code?: string | null\n\tsn_name?: string | null\n\ttax_id?: string | null\n\tcurrency?: string | null\n\tphone_1?: string | null\n\temail?: string | null\n\tcomments?: string | null\n\tpipedrive_id?: string | null\n\tsap_id?: string | null\n\tdeleted_at?: Date | null\n\tdeleted_by?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientSchema = new Schema<ClientType>(\n\t{\n\t\tsn_code: { type: String, index: true },\n\t\tsn_name: { type: String, required: true },\n\t\ttax_id: { type: String },\n\t\tcurrency: { type: String },\n\t\tphone_1: { type: String },\n\t\temail: { type: String },\n\t\tcomments: { type: String },\n\t\tpipedrive_id: { type: String },\n\t\tsap_id: { type: String },\n\t\tdeleted_at: { type: Date, default: null },\n\t\tdeleted_by: { type: String, default: null },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.Client || model<ClientType>(\"Client\", clientSchema, \"clients\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientContactType {\n\tclient_id: Types.ObjectId\n\tcontact_person_name?: string | null\n\tfirst_name?: string | null\n\tlast_name?: string | null\n\tcontact_phone?: string | null\n\tcontact_email?: string | null\n\tpipedrive_id?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientContactSchema = new Schema<ClientContactType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tcontact_person_name: { type: String },\n\t\tfirst_name: { type: String },\n\t\tlast_name: { type: String },\n\t\tcontact_phone: { type: String },\n\t\tcontact_email: { type: String },\n\t\tpipedrive_id: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientContact || model<ClientContactType>(\"ClientContact\", clientContactSchema, \"client_contacts\")","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientAddressType {\n\tclient_id: Types.ObjectId\n\taddress_name?: string | null\n\tstreet?: string | null\n\tneighborhood?: string | null\n\tpostal_code?: string | null\n\tcity?: string | null\n\tstate?: string | null\n\tcountry?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientAddressSchema = new Schema<ClientAddressType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\taddress_name: { type: String },\n\t\tstreet: { type: String },\n\t\tneighborhood: { type: String },\n\t\tpostal_code: { type: String },\n\t\tcity: { type: String },\n\t\tstate: { type: String },\n\t\tcountry: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientAddress || model<ClientAddressType>(\n\t\"ClientAddress\",\n\tclientAddressSchema,\n\t\"client_addresses\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPaymentMethodType {\n\tclient_id: Types.ObjectId\n\tcode?: string | null\n\tdescription?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPaymentMethodSchema = new Schema<ClientPaymentMethodType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tcode: { type: String },\n\t\tdescription: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPaymentMethod || model<ClientPaymentMethodType>(\n\t\"ClientPaymentMethod\",\n\tclientPaymentMethodSchema,\n\t\"client_payment_methods\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPaymentTermType {\n\tclient_id: Types.ObjectId\n\tcode?: string | null\n\tname?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPaymentTermSchema = new Schema<ClientPaymentTermType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tcode: { type: String },\n\t\tname: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPaymentTerm || model<ClientPaymentTermType>(\n\t\"ClientPaymentTerm\",\n\tclientPaymentTermSchema,\n\t\"client_payment_terms\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientPriceListType {\n\tclient_id: Types.ObjectId\n\tnumber?: string | null\n\tname?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientPriceListSchema = new Schema<ClientPriceListType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\tnumber: { type: String },\n\t\tname: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientPriceList || model<ClientPriceListType>(\n\t\"ClientPriceList\",\n\tclientPriceListSchema,\n\t\"client_price_lists\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface ClientSalesEmployeeType {\n\tclient_id: Types.ObjectId\n\temployee_code?: string | null\n\temployee_name?: string | null\n\tcreated_at?: Date\n\tupdated_at?: Date\n}\n\nconst clientSalesEmployeeSchema = new Schema<ClientSalesEmployeeType>(\n\t{\n\t\tclient_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"Client\",\n\t\t\trequired: true,\n\t\t\tunique: true,\n\t\t},\n\t\temployee_code: { type: String },\n\t\temployee_name: { type: String },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.ClientSalesEmployee || model<ClientSalesEmployeeType>(\n\t\"ClientSalesEmployee\",\n\tclientSalesEmployeeSchema,\n\t\"client_sales_employees\"\n)\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst articleSchema = new Schema({\n\tarticle_number: { type: String, required: true, unique: true }, // SAP ItemCode\n\tdescription: { type: String, required: true },\n\tunit: { type: String, required: true },\n\tbrand: { type: String },\n\tmodel: { type: String },\n\tgroup_id: { type: Types.ObjectId, ref: \"ArticleGroup\", required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Article || model(\"Article\", articleSchema, \"articles\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst articleGroupSchema = new Schema({\n\tname: { type: String, required: true },\n\tdescription: { type: String },\n})\n\nexport default mongoose.models.ArticleGroup || model(\"ArticleGroup\", articleGroupSchema, \"article_groups\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst articleClassSchema = new Schema({\n\tname: { type: String, required: true },\n\tdescription: { type: String },\n})\n\nexport default mongoose.models.ArticleClass || model(\"ArticleClass\", articleClassSchema, \"article_classes\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst articlePriceSchema = new Schema({\n\tarticle_id: { type: Types.ObjectId, ref: \"Article\", required: true },\n\tprice_list_id: { type: Types.ObjectId, ref: \"PriceList\", required: true },\n\tcurrency_id: { type: Types.ObjectId, ref: \"Currency\", required: true },\n\tprice: { type: Number, required: true },\n\tvalid_from: { type: Date },\n\tvalid_to: { type: Date },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.ArticlePrice || model(\"ArticlePrice\", articlePriceSchema, \"article_prices\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst currencySchema = new Schema({\n\tcode: { type: String, required: true, unique: true },\n\tsymbol: { type: String, required: true },\n\tname: { type: String, required: true },\n})\n\nexport default mongoose.models.Currency || model(\"Currency\", currencySchema, \"currencies\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst warehouseSchema = new Schema({\n\tcode: { type: String, required: true, unique: true },\n\tname: { type: String, required: true },\n\tlocation: { type: String },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Warehouse || model(\"Warehouse\", warehouseSchema, \"warehouses\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nconst inventoryStockSchema = new Schema({\n\tarticle_id: { type: Types.ObjectId, ref: \"Article\", required: true },\n\twarehouse_id: { type: Types.ObjectId, ref: \"Warehouse\", required: true },\n\tcount: { type: Number, required: true },\n\tmin_stock: { type: Number },\n\tmax_stock: { type: Number },\n\tupdated_at: { type: Date, default: Date.now },\n})\n\nexport default mongoose.models.InventoryStock || model(\"InventoryStock\", inventoryStockSchema, \"inventory_stocks\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst priceListSchema = new Schema({\n\tnumber: { type: String, required: true, unique: true },\n\tname: { type: String, required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.PriceList || model(\"PriceList\", priceListSchema, \"price_lists\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport enum QuoteStatus {\n\tOPPORTUNITY = \"OPPORTUNITY\",\n\tQUOTE = \"QUOTE\",\n\tFOLLOWING = \"FOLLOWING\",\n\tNEGOTIATION = \"NEGOTIATION\",\n}\n\nexport enum Status {\n\tOPEN = \"OPEN\",\n\tWIN = \"WIN\",\n\tLOST = \"LOST\",\n\tDELETE = \"DELETE\",\n}\n\nexport enum CreatedMethod {\n\tMANUAL = \"MANUAL\",\n\tCSV = \"CSV\",\n}\n\nconst quoteSchema = new Schema(\n\t{\n\t\tquote_number: { type: Number, required: true },\n\t\tquote_revision: { type: Number, default: 0 },\n\t\tquote_ref: { type: String },\n\t\tcompany: { type: String },\n\t\tcompany_id: { type: Schema.Types.ObjectId, ref: \"Client\", required: true },\n\t\tcompany_pipedrive_id: { type: String },\n\t\tcontact_id: { type: Schema.Types.ObjectId, ref: \"ClientContact\" },\n\t\tproject_name: { type: String },\n\t\tproject_lab: { type: String },\n\t\tpayment_condition: { type: String },\n\t\tpayment_exp: { type: String },\n\t\tterms_ids: [{ type: Schema.Types.ObjectId, ref: \"QuoteTerm\" }],\n\t\tcurrency_id: { type: Schema.Types.ObjectId, ref: \"Currency\" },\n\t\tiva: { type: String },\n\t\tdate: { type: Date },\n\t\tstatus: { type: String, enum: Object.values(Status), default: Status.OPEN },\n\t\tquote_status: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(QuoteStatus),\n\t\t\tdefault: QuoteStatus.OPPORTUNITY,\n\t\t},\n\t\tsap_id: { type: String },\n\t\tsap_quotation_entry: { type: Number },\n\t\tsap_order_entry: { type: Number },\n\t\tpipedrive_id: { type: String },\n\t\tshould_sync: { type: Boolean, default: false },\n\t\tpdf_download_link: { type: String },\n\t\tnotes: { type: String },\n\t\tcreated_method: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(CreatedMethod),\n\t\t\tdefault: CreatedMethod.MANUAL,\n\t\t},\n\t\tcreated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tupdated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tdeleted_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t\tdeleted_at: { type: Date },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.Quote || model(\"Quote\", quoteSchema, \"quotes\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteArticleSchema = new Schema(\n\t{\n\t\tquote_id: { type: Schema.Types.ObjectId, ref: \"Quote\", required: true },\n\t\tarticle_id: { type: Schema.Types.ObjectId, ref: \"Article\" },\n\t\tarticle_number: { type: String },\n\t\tdescription: { type: String },\n\t\tdelivery: { type: String },\n\t\tquantity: { type: Number },\n\t\tprice: { type: Number },\n\t\tunit_price: { type: Number },\n\t\toriginal_price: { type: Number },\n\t\ttotal: { type: Number },\n\t\tutility: { type: Number },\n\t\ttype: { type: String },\n\t\textra_id: { type: Schema.Types.ObjectId, ref: \"QuoteArticleExtra\" },\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteArticle || model(\"QuoteArticle\", quoteArticleSchema, \"quote_articles\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteArticleExtraSchema = new Schema(\n\t{\n\t\tquote_article_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\tref: \"QuoteArticle\",\n\t\t\trequired: true,\n\t\t},\n\t\tmultiplier: Number,\n\t\tusa_freight: Number,\n\t\tusa_expenses: Number,\n\t\tduty: Number,\n\t\tmex_freight: Number,\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteArticleExtra || model(\"QuoteArticleExtra\", quoteArticleExtraSchema, \"quote_article_extras\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteContactSchema = new Schema({\n\tquote_id: { type: Schema.Types.ObjectId, ref: \"Quote\", required: true },\n\tname: String,\n\temail: String,\n\tmobile: String,\n\tpipedrive_id: String,\n\tcreated_at: { type: Date, default: Date.now },\n})\n\nexport default mongoose.models.QuoteContact || model(\"QuoteContact\", quoteContactSchema, \"quote_contacts\")\n","import mongoose, { Schema, model } from \"mongoose\"\n\nconst quoteTermSchema = new Schema(\n\t{\n\t\ttitle: String,\n\t\tcontent: { type: String, required: true },\n\t\tcategory: String,\n\t\tis_active: { type: Boolean, default: true },\n\t\tcreated_by: String,\n\t\tupdated_by: String,\n\t},\n\t{ timestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" } }\n)\n\nexport default mongoose.models.QuoteTerm || model(\"QuoteTerm\", quoteTermSchema, \"quote_terms\")\n","import mongoose, {\n\tSchema,\n\tmodel,\n\ttype Model,\n\ttype HydratedDocument,\n\ttype Types,\n} from \"mongoose\";\nimport bcrypt from \"bcryptjs\";\n\nexport enum CustomerStatus {\n\tACTIVE = \"active\",\n\tINACTIVE = \"inactive\",\n\tBANNED = \"banned\",\n}\n\nexport interface CustomerType {\n\tfirst_name: string;\n\tlast_name: string;\n\temail: string;\n\tmobile?: string;\n\tpassword: string;\n\tstatus: CustomerStatus;\n\tfiscal_profile_id?: Types.ObjectId;\n\tcreated_at: Date;\n\tupdated_at?: Date;\n\tdeleted_at?: Date;\n}\n\nexport type CustomerDoc = HydratedDocument<CustomerType>;\nexport type CustomerModel = Model<CustomerType>;\n\nconst customerSchema = new Schema<CustomerType>({\n\tfirst_name: { type: String, required: true },\n\tlast_name: { type: String, required: true },\n\temail: { type: String, required: true, unique: true },\n\tmobile: { type: String },\n\tpassword: { type: String, required: true, select: false },\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(CustomerStatus),\n\t\tdefault: CustomerStatus.ACTIVE,\n\t},\n\tfiscal_profile_id: { type: Schema.Types.ObjectId, ref: \"FiscalProfile\" },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n\tdeleted_at: { type: Date },\n});\n\ncustomerSchema.pre(\"save\", async function (next) {\n\tif (this.isModified(\"password\")) {\n\t\tthis.password = await bcrypt.hash(this.password, 12);\n\t}\n\tnext();\n});\n\nconst Customer: CustomerModel =\n\t(mongoose.models.Customer as CustomerModel) ||\n\tmodel<CustomerType>(\"Customer\", customerSchema, \"customers\");\n\nexport default Customer;\n","import mongoose, { Schema, model, type Model, type HydratedDocument, type Types } from \"mongoose\";\n\nexport interface FiscalProfileType {\n\tcustomer_id: Types.ObjectId;\n\trfc: string;\n\trazon_social: string;\n\tuso_cfdi: string;\n\tregimen_fiscal: string;\n\tcp: string;\n\tcreated_at: Date;\n\tupdated_at?: Date;\n}\n\nexport type FiscalProfileDoc = HydratedDocument<FiscalProfileType>;\nexport type FiscalProfileModel = Model<FiscalProfileType>;\n\nconst fiscalProfileSchema = new Schema<FiscalProfileType>({\n\tcustomer_id: { type: Schema.Types.ObjectId, ref: \"Customer\", required: true },\n\trfc: { type: String, required: true },\n\trazon_social: { type: String, required: true },\n\tuso_cfdi: { type: String, required: true },\n\tregimen_fiscal: { type: String, required: true },\n\tcp: { type: String, required: true },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n});\n\nconst FiscalProfile: FiscalProfileModel =\n\t(mongoose.models.FiscalProfile as FiscalProfileModel) ||\n\tmodel<FiscalProfileType>(\"FiscalProfile\", fiscalProfileSchema, \"fiscal_profiles\");\n\nexport default FiscalProfile;\n","import mongoose, { Schema, model } from \"mongoose\"\n\nexport enum OrderStatus {\n\tPENDING = \"pending\",\n\tCONFIRMED = \"confirmed\",\n\tSHIPPED = \"shipped\",\n\tCANCELLED = \"cancelled\",\n\tCOMPLETED = \"completed\",\n}\n\nconst orderItemSchema = new Schema(\n\t{\n\t\tarticle_id: { type: Schema.Types.ObjectId, ref: \"Article\", required: true },\n\t\tquantity: { type: Number, required: true },\n\t\tunit_price: { type: Number, required: true },\n\t\ttotal: { type: Number, required: true },\n\t},\n\t{ _id: false }\n)\n\nconst orderSchema = new Schema({\n\tcustomer_id: { type: Schema.Types.ObjectId, ref: \"Customer\", required: true },\n\titems: [orderItemSchema],\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(OrderStatus),\n\t\tdefault: OrderStatus.PENDING,\n\t},\n\ttracking_number: { type: String },\n\ttotal: { type: Number, required: true },\n\tnotes: { type: String },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n})\n\nexport default mongoose.models.Order || model(\"Order\", orderSchema, \"orders\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\nimport { OrderStatus } from \"./Orders\"\n\nexport interface OrderStatusLogType {\n\torder_id: Types.ObjectId\n\tstatus: OrderStatus\n\tchanged_by: Types.ObjectId\n\tchanged_at: Date\n\tnote?: string\n}\n\nconst orderStatusLogSchema = new Schema<OrderStatusLogType>({\n\torder_id: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"Order\",\n\t\trequired: true,\n\t},\n\tstatus: {\n\t\ttype: String,\n\t\tenum: Object.values(OrderStatus),\n\t\trequired: true,\n\t},\n\tchanged_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t\trequired: true,\n\t},\n\tchanged_at: {\n\t\ttype: Date,\n\t\tdefault: Date.now,\n\t},\n\tnote: {\n\t\ttype: String,\n\t},\n})\n\nexport default mongoose.models.OrderStatusLog || model<OrderStatusLogType>(\"OrderStatusLog\", orderStatusLogSchema, \"order_status_logs\")\n","import mongoose, { Schema, model, Document, Types } from \"mongoose\"\n\n/**\n * Sync Log Types\n */\nexport enum SyncLogType {\n\tSAP_QUOTATION = \"SAP_QUOTATION\",\n\tSAP_SALES_ORDER = \"SAP_SALES_ORDER\",\n\tPIPEDRIVE = \"PIPEDRIVE\",\n}\n\nexport enum SyncLogStatus {\n\tPENDING = \"PENDING\",\n\tSUCCESS = \"SUCCESS\",\n\tFAILED = \"FAILED\",\n\tRETRYING = \"RETRYING\",\n}\n\nexport enum SyncLogAction {\n\tCREATE = \"CREATE\",\n\tUPDATE = \"UPDATE\",\n\tDELETE = \"DELETE\",\n}\n\nexport interface ISyncLog extends Document {\n\t_id: Types.ObjectId\n\tentity_type: string\n\tentity_id: Types.ObjectId\n\tsync_type: SyncLogType\n\taction: SyncLogAction\n\tstatus: SyncLogStatus\n\terror_message?: string\n\terror_code?: string\n\terror_details?: Record<string, any>\n\trequest_payload?: Record<string, any>\n\tresponse_payload?: Record<string, any>\n\tretry_count: number\n\tmax_retries: number\n\tnext_retry_at?: Date\n\tcreated_at: Date\n\tupdated_at: Date\n\tresolved_at?: Date\n\tresolved_by?: Types.ObjectId\n}\n\nconst syncLogSchema = new Schema(\n\t{\n\t\tentity_type: {\n\t\t\ttype: String,\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tentity_id: {\n\t\t\ttype: Schema.Types.ObjectId,\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\tsync_type: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogType),\n\t\t\trequired: true,\n\t\t\tindex: true,\n\t\t},\n\t\taction: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogAction),\n\t\t\trequired: true,\n\t\t},\n\t\tstatus: {\n\t\t\ttype: String,\n\t\t\tenum: Object.values(SyncLogStatus),\n\t\t\tdefault: SyncLogStatus.PENDING,\n\t\t\tindex: true,\n\t\t},\n\t\terror_message: { type: String },\n\t\terror_code: { type: String },\n\t\terror_details: { type: Schema.Types.Mixed },\n\t\trequest_payload: { type: Schema.Types.Mixed },\n\t\tresponse_payload: { type: Schema.Types.Mixed },\n\t\tretry_count: { type: Number, default: 0 },\n\t\tmax_retries: { type: Number, default: 3 },\n\t\tnext_retry_at: { type: Date },\n\t\tresolved_at: { type: Date },\n\t\tresolved_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n\t},\n\t{\n\t\ttimestamps: { createdAt: \"created_at\", updatedAt: \"updated_at\" },\n\t}\n)\n\nsyncLogSchema.index({ entity_type: 1, entity_id: 1, status: 1 })\nsyncLogSchema.index({ status: 1, next_retry_at: 1 })\n\nexport const SyncLog = mongoose.models.SyncLog || model<ISyncLog>(\"SyncLog\", syncLogSchema, \"sync_logs\")\n","import mongoose, { Schema, model } from \"mongoose\"\nimport { UserRole } from \"../../users/models/Users\"\n\nexport interface AnnouncementType {\n\tcreated_by: mongoose.Types.ObjectId\n\tupdated_by?: mongoose.Types.ObjectId\n\tdeleted_by?: mongoose.Types.ObjectId\n\n\tcreated_at: Date\n\tupdated_at?: Date\n\tdeleted_at?: Date\n\n\ttitle: string\n\ttext: string\n\troles: UserRole[]\n}\n\nconst announcementSchema = new Schema<AnnouncementType>({\n\tcreated_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t\trequired: true,\n\t},\n\tupdated_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t},\n\tdeleted_by: {\n\t\ttype: Schema.Types.ObjectId,\n\t\tref: \"User\",\n\t},\n\n\tcreated_at: {\n\t\ttype: Date,\n\t\tdefault: Date.now,\n\t},\n\tupdated_at: Date,\n\tdeleted_at: Date,\n\n\ttitle: {\n\t\ttype: String,\n\t\trequired: true,\n\t\ttrim: true,\n\t},\n\ttext: {\n\t\ttype: String,\n\t\trequired: true,\n\t\ttrim: true,\n\t},\n\troles: {\n\t\ttype: [String],\n\t\tenum: Object.values(UserRole),\n\t\trequired: true,\n\t\tvalidate: {\n\t\t\tvalidator: (roles: UserRole[]) => roles.length > 0,\n\t\t\tmessage: \"At least one user role must be assigned.\",\n\t\t},\n\t},\n})\n\nexport default mongoose.models.Announcement || model<AnnouncementType>(\"Announcement\", announcementSchema, \"announcements\")\n","import mongoose, { Schema, model } from \"mongoose\"\nimport bcrypt from \"bcryptjs\"\n\nexport enum UserRole {\n ADMIN = \"admin\",\n SALES = \"sales\",\n TECHNICIAN = \"technician\",\n WAREHOUSEMAN = \"warehouseman\",\n}\n\nexport enum UserStatus {\n ACTIVE = \"active\",\n INACTIVE = \"inactive\",\n SUSPENDED = \"suspended\",\n}\n\nexport interface UserType {\n first_name: string\n middle_name?: string\n last_name: string\n username: string\n password: string\n role: UserRole\n status: UserStatus\n email?: string\n mobile?: string\n pipedrive_id?: string\n sap_employee_id?: string\n sap_id?: string\n created_at: Date\n created_by?: mongoose.Types.ObjectId | string\n updated_at?: Date\n updated_by?: mongoose.Types.ObjectId\n deleted_at?: Date\n deleted_by?: mongoose.Types.ObjectId\n}\n\nconst usersSchema = new Schema<UserType>({\n first_name: { type: String, required: true },\n middle_name: { type: String },\n last_name: { type: String, required: true },\n username: { type: String, required: true, unique: true },\n password: { type: String, required: true, select: false },\n role: {\n type: String,\n enum: Object.values(UserRole),\n default: UserRole.SALES,\n },\n status: {\n type: String,\n enum: Object.values(UserStatus),\n default: UserStatus.ACTIVE,\n },\n email: { type: String },\n mobile: { type: String },\n pipedrive_id: { type: String },\n sap_id: { type: String },\n sap_employee_id: { type: String },\n created_at: { type: Date, default: Date.now },\n created_by: { type: Schema.Types.Mixed, ref: \"User\" },\n updated_at: { type: Date },\n updated_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n deleted_at: { type: Date },\n deleted_by: { type: Schema.Types.ObjectId, ref: \"User\" },\n})\n\nusersSchema.pre(\"save\", async function (next) {\n if (this.isModified(\"password\")) {\n this.password = await bcrypt.hash(this.password, 12)\n }\n next()\n})\n\nexport default mongoose.models.User || model<UserType>(\"User\", usersSchema, \"users\")\n","import mongoose, { Schema, model, Types } from \"mongoose\"\n\nexport interface CartItem {\n\tarticle_id: Schema.Types.ObjectId\n\tquantity: number\n}\n\nexport interface CartType {\n\tcustomer_id: Schema.Types.ObjectId\n\titems: CartItem[]\n\tupdated_at?: Date\n}\n\nconst cartItemSchema = new Schema<CartItem>(\n\t{\n\t\tarticle_id: { type: Types.ObjectId, ref: \"Article\", required: true },\n\t\tquantity: { type: Number, required: true },\n\t},\n\t{ _id: false }\n)\n\nconst cartSchema = new Schema<CartType>({\n\tcustomer_id: {\n\t\ttype: Types.ObjectId,\n\t\tref: \"Customer\",\n\t\trequired: true,\n\t\tunique: true,\n\t},\n\titems: [cartItemSchema],\n\tupdated_at: { type: Date, default: Date.now },\n})\n\nexport default mongoose.models.Cart || model<CartType>(\"Cart\", cartSchema, \"carts\")\n","import mongoose, {\n\tSchema,\n\tmodel,\n\ttype Model,\n\ttype HydratedDocument,\n\ttype Types,\n} from \"mongoose\";\n\nexport interface RefreshTokenType {\n\tcustomer_id: Types.ObjectId;\n\ttoken_hash: string;\n\texpires_at: Date;\n\trevoked_at?: Date;\n\treplaced_by_token_hash?: string;\n\tcreated_at: Date;\n\tupdated_at?: Date;\n}\n\nexport type RefreshTokenDoc = HydratedDocument<RefreshTokenType>;\nexport type RefreshTokenModel = Model<RefreshTokenType>;\n\nconst refreshTokenSchema = new Schema<RefreshTokenType>({\n\tcustomer_id: { type: Schema.Types.ObjectId, ref: \"Customer\", required: true },\n\t// Store only SHA-256 hash of the opaque refresh token (base64url). Never store the raw token.\n\ttoken_hash: { type: String, required: true },\n\texpires_at: { type: Date, required: true },\n\trevoked_at: { type: Date },\n\treplaced_by_token_hash: { type: String },\n\tcreated_at: { type: Date, default: Date.now },\n\tupdated_at: { type: Date },\n});\n\nrefreshTokenSchema.index({ token_hash: 1 }, { unique: true });\nrefreshTokenSchema.index({ expires_at: 1 }, { expireAfterSeconds: 0 });\nrefreshTokenSchema.index({ customer_id: 1, expires_at: 1 });\n\nrefreshTokenSchema.pre(\"save\", function (next) {\n\tthis.updated_at = new Date();\n\tnext();\n});\n\nconst RefreshToken: RefreshTokenModel =\n\t(mongoose.models.RefreshToken as RefreshTokenModel) ||\n\tmodel<RefreshTokenType>(\"RefreshToken\", refreshTokenSchema, \"refresh_tokens\");\n\nexport default RefreshToken;\n"],"mappings":";AAAA,OAAO,YAAY,QAAQ,aAAa;AAkBxC,IAAM,eAAe,IAAI;AAAA,EACxB;AAAA,IACC,SAAS,EAAE,MAAM,QAAQ,OAAO,KAAK;AAAA,IACrC,SAAS,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,IACxC,QAAQ,EAAE,MAAM,OAAO;AAAA,IACvB,UAAU,EAAE,MAAM,OAAO;AAAA,IACzB,SAAS,EAAE,MAAM,OAAO;AAAA,IACxB,OAAO,EAAE,MAAM,OAAO;AAAA,IACtB,UAAU,EAAE,MAAM,OAAO;AAAA,IACzB,cAAc,EAAE,MAAM,OAAO;AAAA,IAC7B,QAAQ,EAAE,MAAM,OAAO;AAAA,IACvB,YAAY,EAAE,MAAM,MAAM,SAAS,KAAK;AAAA,IACxC,YAAY,EAAE,MAAM,QAAQ,SAAS,KAAK;AAAA,EAC3C;AAAA,EACA,EAAE,YAAY,EAAE,WAAW,cAAc,WAAW,aAAa,EAAE;AACpE;AAEA,IAAO,kBAA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,OAAO,QAAQE,QAAgB,QAAQ,YAAY,OAAO;;;AChClF,OAAOE;AAAA,EACN,UAAAC;AAAA,EACA,SAAAC;AAAA,OAIM;AAeP,IAAM,qBAAqB,IAAID,SAAyB;AAAA,EACvD,aAAa,EAAE,MAAMA,SAAO,MAAM,UAAU,KAAK,YAAY,UAAU,KAAK;AAAA;AAAA,EAE5E,YAAY,EAAE,MAAM,QAAQ,UAAU,KAAK;AAAA,EAC3C,YAAY,EAAE,MAAM,MAAM,UAAU,KAAK;AAAA,EACzC,YAAY,EAAE,MAAM,KAAK;AAAA,EACzB,wBAAwB,EAAE,MAAM,OAAO;AAAA,EACvC,YAAY,EAAE,MAAM,MAAM,SAAS,KAAK,IAAI;AAAA,EAC5C,YAAY,EAAE,MAAM,KAAK;AAC1B,CAAC;AAED,mBAAmB,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,QAAQ,KAAK,CAAC;AAC5D,mBAAmB,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,oBAAoB,EAAE,CAAC;AACrE,mBAAmB,MAAM,EAAE,aAAa,GAAG,YAAY,EAAE,CAAC;AAE1D,mBAAmB,IAAI,QAAQ,SAAU,MAAM;AAC9C,OAAK,aAAa,oBAAI,KAAK;AAC3B,OAAK;AACN,CAAC;AAED,IAAM,eACJD,WAAS,OAAO,gBACjBE,QAAwB,gBAAgB,oBAAoB,gBAAgB;AAE7E,IAAO,wBAAQ;","names":["mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","Types","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","Types","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","Types","mongoose","Schema","model","mongoose","Schema","model","QuoteStatus","Status","CreatedMethod","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","mongoose","Schema","model","CustomerStatus","mongoose","Schema","model","mongoose","Schema","model","OrderStatus","mongoose","Schema","model","Schema","mongoose","model","mongoose","Schema","model","SyncLogType","SyncLogStatus","SyncLogAction","mongoose","Schema","model","mongoose","Schema","model","bcrypt","UserRole","UserStatus","Schema","mongoose","model","mongoose","Schema","model","Types","mongoose","Schema","model"]}
|