@fesmex/models 0.1.10 → 0.1.13

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.
Files changed (54) hide show
  1. package/dist/announcements/index.js +8 -1
  2. package/dist/announcements/models/Announcements.js +10 -8
  3. package/dist/carts/index.js +8 -1
  4. package/dist/carts/models/Carts.js +8 -6
  5. package/dist/clients/index.js +20 -7
  6. package/dist/clients/models/Clients.js +5 -3
  7. package/dist/clients/models/ClientsAddress.js +6 -4
  8. package/dist/clients/models/ClientsContact.js +6 -4
  9. package/dist/clients/models/ClientsPaymentMethod.js +6 -4
  10. package/dist/clients/models/ClientsPaymentTerm.js +6 -4
  11. package/dist/clients/models/ClientsPriceList.js +6 -4
  12. package/dist/clients/models/ClientsSalesEmployee.js +6 -4
  13. package/dist/customers/index.js +10 -2
  14. package/dist/customers/models/Customers.js +14 -8
  15. package/dist/customers/models/FiscalProfileType.js +6 -4
  16. package/dist/index.d.ts +0 -1
  17. package/dist/index.js +24 -9
  18. package/dist/inventory/index.js +22 -8
  19. package/dist/inventory/models/Article.d.ts +1 -108
  20. package/dist/inventory/models/Article.js +6 -4
  21. package/dist/inventory/models/ArticleClasses.d.ts +1 -24
  22. package/dist/inventory/models/ArticleClasses.js +5 -3
  23. package/dist/inventory/models/ArticleGroups.d.ts +1 -24
  24. package/dist/inventory/models/ArticleGroups.js +5 -3
  25. package/dist/inventory/models/ArticlePrices.d.ts +1 -204
  26. package/dist/inventory/models/ArticlePrices.js +8 -6
  27. package/dist/inventory/models/Currencies.d.ts +1 -30
  28. package/dist/inventory/models/Currencies.js +5 -3
  29. package/dist/inventory/models/InventoryStocks.d.ts +1 -144
  30. package/dist/inventory/models/InventoryStocks.js +7 -5
  31. package/dist/inventory/models/PriceLists.d.ts +1 -36
  32. package/dist/inventory/models/PriceLists.js +5 -3
  33. package/dist/inventory/models/Warehouses.d.ts +1 -42
  34. package/dist/inventory/models/Warehouses.js +5 -3
  35. package/dist/orders/index.js +12 -3
  36. package/dist/orders/models/OrderStatusLogs.js +9 -7
  37. package/dist/orders/models/Orders.d.ts +1 -90
  38. package/dist/orders/models/Orders.js +11 -8
  39. package/dist/quotes/index.js +19 -5
  40. package/dist/quotes/models/Quote.d.ts +1 -191
  41. package/dist/quotes/models/Quote.js +19 -16
  42. package/dist/quotes/models/QuoteArticle.d.ts +1 -95
  43. package/dist/quotes/models/QuoteArticle.js +8 -6
  44. package/dist/quotes/models/QuoteArticleExtra.d.ts +1 -53
  45. package/dist/quotes/models/QuoteArticleExtra.js +6 -4
  46. package/dist/quotes/models/QuoteContact.d.ts +1 -48
  47. package/dist/quotes/models/QuoteContact.js +6 -4
  48. package/dist/quotes/models/QuoteTerm.d.ts +1 -53
  49. package/dist/quotes/models/QuoteTerm.js +5 -3
  50. package/dist/sap/index.js +8 -1
  51. package/dist/sap/models/SyncLog.js +17 -14
  52. package/dist/users/index.js +10 -1
  53. package/dist/users/models/Users.js +18 -12
  54. package/package.json +3 -10
@@ -1,4 +1,3 @@
1
- import { Schema } from "mongoose";
2
1
  export declare enum OrderStatus {
3
2
  PENDING = "pending",
4
3
  CONFIRMED = "confirmed",
@@ -6,93 +5,5 @@ export declare enum OrderStatus {
6
5
  CANCELLED = "cancelled",
7
6
  COMPLETED = "completed"
8
7
  }
9
- declare const _default: import("mongoose").Model<{
10
- created_at: Date;
11
- status: OrderStatus;
12
- total: number;
13
- customer_id: import("mongoose").Types.ObjectId;
14
- items: import("mongoose").Types.DocumentArray<{
15
- article_id: import("mongoose").Types.ObjectId;
16
- quantity: number;
17
- unit_price: number;
18
- total: number;
19
- }>;
20
- updated_at?: Date;
21
- notes?: string;
22
- tracking_number?: string;
23
- }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
24
- created_at: Date;
25
- status: OrderStatus;
26
- total: number;
27
- customer_id: import("mongoose").Types.ObjectId;
28
- items: import("mongoose").Types.DocumentArray<{
29
- article_id: import("mongoose").Types.ObjectId;
30
- quantity: number;
31
- unit_price: number;
32
- total: number;
33
- }>;
34
- updated_at?: Date;
35
- notes?: string;
36
- tracking_number?: string;
37
- }> & {
38
- created_at: Date;
39
- status: OrderStatus;
40
- total: number;
41
- customer_id: import("mongoose").Types.ObjectId;
42
- items: import("mongoose").Types.DocumentArray<{
43
- article_id: import("mongoose").Types.ObjectId;
44
- quantity: number;
45
- unit_price: number;
46
- total: number;
47
- }>;
48
- updated_at?: Date;
49
- notes?: string;
50
- tracking_number?: string;
51
- } & {
52
- _id: import("mongoose").Types.ObjectId;
53
- }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
54
- created_at: Date;
55
- status: OrderStatus;
56
- total: number;
57
- customer_id: import("mongoose").Types.ObjectId;
58
- items: import("mongoose").Types.DocumentArray<{
59
- article_id: import("mongoose").Types.ObjectId;
60
- quantity: number;
61
- unit_price: number;
62
- total: number;
63
- }>;
64
- updated_at?: Date;
65
- notes?: string;
66
- tracking_number?: string;
67
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
68
- created_at: Date;
69
- status: OrderStatus;
70
- total: number;
71
- customer_id: import("mongoose").Types.ObjectId;
72
- items: import("mongoose").Types.DocumentArray<{
73
- article_id: import("mongoose").Types.ObjectId;
74
- quantity: number;
75
- unit_price: number;
76
- total: number;
77
- }>;
78
- updated_at?: Date;
79
- notes?: string;
80
- tracking_number?: string;
81
- }>> & import("mongoose").FlatRecord<{
82
- created_at: Date;
83
- status: OrderStatus;
84
- total: number;
85
- customer_id: import("mongoose").Types.ObjectId;
86
- items: import("mongoose").Types.DocumentArray<{
87
- article_id: import("mongoose").Types.ObjectId;
88
- quantity: number;
89
- unit_price: number;
90
- total: number;
91
- }>;
92
- updated_at?: Date;
93
- notes?: string;
94
- tracking_number?: string;
95
- }> & {
96
- _id: import("mongoose").Types.ObjectId;
97
- }>>;
8
+ declare const _default: import("mongoose").Model<any, {}, {}, {}, any, any>;
98
9
  export default _default;
@@ -1,20 +1,23 @@
1
- import { Schema, model } from "mongoose";
2
- export var OrderStatus;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OrderStatus = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ var OrderStatus;
3
6
  (function (OrderStatus) {
4
7
  OrderStatus["PENDING"] = "pending";
5
8
  OrderStatus["CONFIRMED"] = "confirmed";
6
9
  OrderStatus["SHIPPED"] = "shipped";
7
10
  OrderStatus["CANCELLED"] = "cancelled";
8
11
  OrderStatus["COMPLETED"] = "completed";
9
- })(OrderStatus || (OrderStatus = {}));
10
- const orderItemSchema = new Schema({
11
- article_id: { type: Schema.Types.ObjectId, ref: "Article", required: true },
12
+ })(OrderStatus || (exports.OrderStatus = OrderStatus = {}));
13
+ const orderItemSchema = new mongoose_1.Schema({
14
+ article_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Article", required: true },
12
15
  quantity: { type: Number, required: true },
13
16
  unit_price: { type: Number, required: true },
14
17
  total: { type: Number, required: true },
15
18
  }, { _id: false });
16
- const orderSchema = new Schema({
17
- customer_id: { type: Schema.Types.ObjectId, ref: "Customer", required: true },
19
+ const orderSchema = new mongoose_1.Schema({
20
+ customer_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Customer", required: true },
18
21
  items: [orderItemSchema],
19
22
  status: {
20
23
  type: String,
@@ -27,4 +30,4 @@ const orderSchema = new Schema({
27
30
  created_at: { type: Date, default: Date.now },
28
31
  updated_at: { type: Date },
29
32
  });
30
- export default model("Order", orderSchema, "orders");
33
+ exports.default = mongoose_1.models.Order || (0, mongoose_1.model)("Order", orderSchema, "orders");
@@ -1,5 +1,19 @@
1
- export { default as Quote, QuoteStatus, Status, CreatedMethod } from "./models/Quote";
2
- export { default as QuoteArticle } from "./models/QuoteArticle";
3
- export { default as QuoteArticleExtra } from "./models/QuoteArticleExtra";
4
- export { default as QuoteContact } from "./models/QuoteContact";
5
- export { default as QuoteTerm } from "./models/QuoteTerm";
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.QuoteTerm = exports.QuoteContact = exports.QuoteArticleExtra = exports.QuoteArticle = exports.CreatedMethod = exports.Status = exports.QuoteStatus = exports.Quote = void 0;
7
+ var Quote_1 = require("./models/Quote");
8
+ Object.defineProperty(exports, "Quote", { enumerable: true, get: function () { return __importDefault(Quote_1).default; } });
9
+ Object.defineProperty(exports, "QuoteStatus", { enumerable: true, get: function () { return Quote_1.QuoteStatus; } });
10
+ Object.defineProperty(exports, "Status", { enumerable: true, get: function () { return Quote_1.Status; } });
11
+ Object.defineProperty(exports, "CreatedMethod", { enumerable: true, get: function () { return Quote_1.CreatedMethod; } });
12
+ var QuoteArticle_1 = require("./models/QuoteArticle");
13
+ Object.defineProperty(exports, "QuoteArticle", { enumerable: true, get: function () { return __importDefault(QuoteArticle_1).default; } });
14
+ var QuoteArticleExtra_1 = require("./models/QuoteArticleExtra");
15
+ Object.defineProperty(exports, "QuoteArticleExtra", { enumerable: true, get: function () { return __importDefault(QuoteArticleExtra_1).default; } });
16
+ var QuoteContact_1 = require("./models/QuoteContact");
17
+ Object.defineProperty(exports, "QuoteContact", { enumerable: true, get: function () { return __importDefault(QuoteContact_1).default; } });
18
+ var QuoteTerm_1 = require("./models/QuoteTerm");
19
+ Object.defineProperty(exports, "QuoteTerm", { enumerable: true, get: function () { return __importDefault(QuoteTerm_1).default; } });
@@ -1,4 +1,3 @@
1
- import { Schema } from "mongoose";
2
1
  export declare enum QuoteStatus {
3
2
  OPPORTUNITY = "OPPORTUNITY",
4
3
  QUOTE = "QUOTE",
@@ -15,194 +14,5 @@ export declare enum CreatedMethod {
15
14
  MANUAL = "MANUAL",
16
15
  CSV = "CSV"
17
16
  }
18
- declare const _default: import("mongoose").Model<{
19
- quote_number: number;
20
- quote_revision: number;
21
- company_id: import("mongoose").Types.ObjectId;
22
- terms_ids: import("mongoose").Types.ObjectId[];
23
- status: Status;
24
- quote_status: QuoteStatus;
25
- should_sync: boolean;
26
- created_method: CreatedMethod;
27
- pipedrive_id?: string;
28
- sap_id?: string;
29
- deleted_at?: Date;
30
- deleted_by?: import("mongoose").Types.ObjectId;
31
- date?: Date;
32
- currency_id?: import("mongoose").Types.ObjectId;
33
- quote_ref?: string;
34
- company?: string;
35
- company_pipedrive_id?: string;
36
- contact_id?: import("mongoose").Types.ObjectId;
37
- project_name?: string;
38
- project_lab?: string;
39
- payment_condition?: string;
40
- payment_exp?: string;
41
- iva?: string;
42
- sap_quotation_entry?: number;
43
- sap_order_entry?: number;
44
- pdf_download_link?: string;
45
- notes?: string;
46
- created_by?: import("mongoose").Types.ObjectId;
47
- updated_by?: import("mongoose").Types.ObjectId;
48
- }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
49
- quote_number: number;
50
- quote_revision: number;
51
- company_id: import("mongoose").Types.ObjectId;
52
- terms_ids: import("mongoose").Types.ObjectId[];
53
- status: Status;
54
- quote_status: QuoteStatus;
55
- should_sync: boolean;
56
- created_method: CreatedMethod;
57
- pipedrive_id?: string;
58
- sap_id?: string;
59
- deleted_at?: Date;
60
- deleted_by?: import("mongoose").Types.ObjectId;
61
- date?: Date;
62
- currency_id?: import("mongoose").Types.ObjectId;
63
- quote_ref?: string;
64
- company?: string;
65
- company_pipedrive_id?: string;
66
- contact_id?: import("mongoose").Types.ObjectId;
67
- project_name?: string;
68
- project_lab?: string;
69
- payment_condition?: string;
70
- payment_exp?: string;
71
- iva?: string;
72
- sap_quotation_entry?: number;
73
- sap_order_entry?: number;
74
- pdf_download_link?: string;
75
- notes?: string;
76
- created_by?: import("mongoose").Types.ObjectId;
77
- updated_by?: import("mongoose").Types.ObjectId;
78
- }> & {
79
- quote_number: number;
80
- quote_revision: number;
81
- company_id: import("mongoose").Types.ObjectId;
82
- terms_ids: import("mongoose").Types.ObjectId[];
83
- status: Status;
84
- quote_status: QuoteStatus;
85
- should_sync: boolean;
86
- created_method: CreatedMethod;
87
- pipedrive_id?: string;
88
- sap_id?: string;
89
- deleted_at?: Date;
90
- deleted_by?: import("mongoose").Types.ObjectId;
91
- date?: Date;
92
- currency_id?: import("mongoose").Types.ObjectId;
93
- quote_ref?: string;
94
- company?: string;
95
- company_pipedrive_id?: string;
96
- contact_id?: import("mongoose").Types.ObjectId;
97
- project_name?: string;
98
- project_lab?: string;
99
- payment_condition?: string;
100
- payment_exp?: string;
101
- iva?: string;
102
- sap_quotation_entry?: number;
103
- sap_order_entry?: number;
104
- pdf_download_link?: string;
105
- notes?: string;
106
- created_by?: import("mongoose").Types.ObjectId;
107
- updated_by?: import("mongoose").Types.ObjectId;
108
- } & {
109
- _id: import("mongoose").Types.ObjectId;
110
- }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
111
- timestamps: {
112
- createdAt: string;
113
- updatedAt: string;
114
- };
115
- }, {
116
- quote_number: number;
117
- quote_revision: number;
118
- company_id: import("mongoose").Types.ObjectId;
119
- terms_ids: import("mongoose").Types.ObjectId[];
120
- status: Status;
121
- quote_status: QuoteStatus;
122
- should_sync: boolean;
123
- created_method: CreatedMethod;
124
- pipedrive_id?: string;
125
- sap_id?: string;
126
- deleted_at?: Date;
127
- deleted_by?: import("mongoose").Types.ObjectId;
128
- date?: Date;
129
- currency_id?: import("mongoose").Types.ObjectId;
130
- quote_ref?: string;
131
- company?: string;
132
- company_pipedrive_id?: string;
133
- contact_id?: import("mongoose").Types.ObjectId;
134
- project_name?: string;
135
- project_lab?: string;
136
- payment_condition?: string;
137
- payment_exp?: string;
138
- iva?: string;
139
- sap_quotation_entry?: number;
140
- sap_order_entry?: number;
141
- pdf_download_link?: string;
142
- notes?: string;
143
- created_by?: import("mongoose").Types.ObjectId;
144
- updated_by?: import("mongoose").Types.ObjectId;
145
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
146
- quote_number: number;
147
- quote_revision: number;
148
- company_id: import("mongoose").Types.ObjectId;
149
- terms_ids: import("mongoose").Types.ObjectId[];
150
- status: Status;
151
- quote_status: QuoteStatus;
152
- should_sync: boolean;
153
- created_method: CreatedMethod;
154
- pipedrive_id?: string;
155
- sap_id?: string;
156
- deleted_at?: Date;
157
- deleted_by?: import("mongoose").Types.ObjectId;
158
- date?: Date;
159
- currency_id?: import("mongoose").Types.ObjectId;
160
- quote_ref?: string;
161
- company?: string;
162
- company_pipedrive_id?: string;
163
- contact_id?: import("mongoose").Types.ObjectId;
164
- project_name?: string;
165
- project_lab?: string;
166
- payment_condition?: string;
167
- payment_exp?: string;
168
- iva?: string;
169
- sap_quotation_entry?: number;
170
- sap_order_entry?: number;
171
- pdf_download_link?: string;
172
- notes?: string;
173
- created_by?: import("mongoose").Types.ObjectId;
174
- updated_by?: import("mongoose").Types.ObjectId;
175
- }>> & import("mongoose").FlatRecord<{
176
- quote_number: number;
177
- quote_revision: number;
178
- company_id: import("mongoose").Types.ObjectId;
179
- terms_ids: import("mongoose").Types.ObjectId[];
180
- status: Status;
181
- quote_status: QuoteStatus;
182
- should_sync: boolean;
183
- created_method: CreatedMethod;
184
- pipedrive_id?: string;
185
- sap_id?: string;
186
- deleted_at?: Date;
187
- deleted_by?: import("mongoose").Types.ObjectId;
188
- date?: Date;
189
- currency_id?: import("mongoose").Types.ObjectId;
190
- quote_ref?: string;
191
- company?: string;
192
- company_pipedrive_id?: string;
193
- contact_id?: import("mongoose").Types.ObjectId;
194
- project_name?: string;
195
- project_lab?: string;
196
- payment_condition?: string;
197
- payment_exp?: string;
198
- iva?: string;
199
- sap_quotation_entry?: number;
200
- sap_order_entry?: number;
201
- pdf_download_link?: string;
202
- notes?: string;
203
- created_by?: import("mongoose").Types.ObjectId;
204
- updated_by?: import("mongoose").Types.ObjectId;
205
- }> & {
206
- _id: import("mongoose").Types.ObjectId;
207
- }>>;
17
+ declare const _default: import("mongoose").Model<any, {}, {}, {}, any, any>;
208
18
  export default _default;
@@ -1,37 +1,40 @@
1
- import { Schema, model } from "mongoose";
2
- export var QuoteStatus;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CreatedMethod = exports.Status = exports.QuoteStatus = void 0;
4
+ const mongoose_1 = require("mongoose");
5
+ var QuoteStatus;
3
6
  (function (QuoteStatus) {
4
7
  QuoteStatus["OPPORTUNITY"] = "OPPORTUNITY";
5
8
  QuoteStatus["QUOTE"] = "QUOTE";
6
9
  QuoteStatus["FOLLOWING"] = "FOLLOWING";
7
10
  QuoteStatus["NEGOTIATION"] = "NEGOTIATION";
8
- })(QuoteStatus || (QuoteStatus = {}));
9
- export var Status;
11
+ })(QuoteStatus || (exports.QuoteStatus = QuoteStatus = {}));
12
+ var Status;
10
13
  (function (Status) {
11
14
  Status["OPEN"] = "OPEN";
12
15
  Status["WIN"] = "WIN";
13
16
  Status["LOST"] = "LOST";
14
17
  Status["DELETE"] = "DELETE";
15
- })(Status || (Status = {}));
16
- export var CreatedMethod;
18
+ })(Status || (exports.Status = Status = {}));
19
+ var CreatedMethod;
17
20
  (function (CreatedMethod) {
18
21
  CreatedMethod["MANUAL"] = "MANUAL";
19
22
  CreatedMethod["CSV"] = "CSV";
20
- })(CreatedMethod || (CreatedMethod = {}));
21
- const quoteSchema = new Schema({
23
+ })(CreatedMethod || (exports.CreatedMethod = CreatedMethod = {}));
24
+ const quoteSchema = new mongoose_1.Schema({
22
25
  quote_number: { type: Number, required: true },
23
26
  quote_revision: { type: Number, default: 0 },
24
27
  quote_ref: { type: String },
25
28
  company: { type: String },
26
- company_id: { type: Schema.Types.ObjectId, ref: "Client", required: true },
29
+ company_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Client", required: true },
27
30
  company_pipedrive_id: { type: String },
28
- contact_id: { type: Schema.Types.ObjectId, ref: "ClientContact" },
31
+ contact_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "ClientContact" },
29
32
  project_name: { type: String },
30
33
  project_lab: { type: String },
31
34
  payment_condition: { type: String },
32
35
  payment_exp: { type: String },
33
- terms_ids: [{ type: Schema.Types.ObjectId, ref: "QuoteTerm" }],
34
- currency_id: { type: Schema.Types.ObjectId, ref: "Currency" },
36
+ terms_ids: [{ type: mongoose_1.Schema.Types.ObjectId, ref: "QuoteTerm" }],
37
+ currency_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Currency" },
35
38
  iva: { type: String },
36
39
  date: { type: Date },
37
40
  status: { type: String, enum: Object.values(Status), default: Status.OPEN },
@@ -52,9 +55,9 @@ const quoteSchema = new Schema({
52
55
  enum: Object.values(CreatedMethod),
53
56
  default: CreatedMethod.MANUAL,
54
57
  },
55
- created_by: { type: Schema.Types.ObjectId, ref: "User" },
56
- updated_by: { type: Schema.Types.ObjectId, ref: "User" },
57
- deleted_by: { type: Schema.Types.ObjectId, ref: "User" },
58
+ created_by: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
59
+ updated_by: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
60
+ deleted_by: { type: mongoose_1.Schema.Types.ObjectId, ref: "User" },
58
61
  deleted_at: { type: Date },
59
62
  }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
60
- export default model("Quote", quoteSchema, "quotes");
63
+ exports.default = mongoose_1.models.Quote || (0, mongoose_1.model)("Quote", quoteSchema, "quotes");
@@ -1,96 +1,2 @@
1
- import { Schema } from "mongoose";
2
- declare const _default: import("mongoose").Model<{
3
- quote_id: import("mongoose").Types.ObjectId;
4
- type?: string;
5
- description?: string;
6
- article_number?: string;
7
- article_id?: import("mongoose").Types.ObjectId;
8
- price?: number;
9
- delivery?: string;
10
- quantity?: number;
11
- unit_price?: number;
12
- original_price?: number;
13
- total?: number;
14
- utility?: number;
15
- extra_id?: import("mongoose").Types.ObjectId;
16
- }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
17
- quote_id: import("mongoose").Types.ObjectId;
18
- type?: string;
19
- description?: string;
20
- article_number?: string;
21
- article_id?: import("mongoose").Types.ObjectId;
22
- price?: number;
23
- delivery?: string;
24
- quantity?: number;
25
- unit_price?: number;
26
- original_price?: number;
27
- total?: number;
28
- utility?: number;
29
- extra_id?: import("mongoose").Types.ObjectId;
30
- }> & {
31
- quote_id: import("mongoose").Types.ObjectId;
32
- type?: string;
33
- description?: string;
34
- article_number?: string;
35
- article_id?: import("mongoose").Types.ObjectId;
36
- price?: number;
37
- delivery?: string;
38
- quantity?: number;
39
- unit_price?: number;
40
- original_price?: number;
41
- total?: number;
42
- utility?: number;
43
- extra_id?: import("mongoose").Types.ObjectId;
44
- } & {
45
- _id: import("mongoose").Types.ObjectId;
46
- }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
47
- timestamps: {
48
- createdAt: string;
49
- updatedAt: string;
50
- };
51
- }, {
52
- quote_id: import("mongoose").Types.ObjectId;
53
- type?: string;
54
- description?: string;
55
- article_number?: string;
56
- article_id?: import("mongoose").Types.ObjectId;
57
- price?: number;
58
- delivery?: string;
59
- quantity?: number;
60
- unit_price?: number;
61
- original_price?: number;
62
- total?: number;
63
- utility?: number;
64
- extra_id?: import("mongoose").Types.ObjectId;
65
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
66
- quote_id: import("mongoose").Types.ObjectId;
67
- type?: string;
68
- description?: string;
69
- article_number?: string;
70
- article_id?: import("mongoose").Types.ObjectId;
71
- price?: number;
72
- delivery?: string;
73
- quantity?: number;
74
- unit_price?: number;
75
- original_price?: number;
76
- total?: number;
77
- utility?: number;
78
- extra_id?: import("mongoose").Types.ObjectId;
79
- }>> & import("mongoose").FlatRecord<{
80
- quote_id: import("mongoose").Types.ObjectId;
81
- type?: string;
82
- description?: string;
83
- article_number?: string;
84
- article_id?: import("mongoose").Types.ObjectId;
85
- price?: number;
86
- delivery?: string;
87
- quantity?: number;
88
- unit_price?: number;
89
- original_price?: number;
90
- total?: number;
91
- utility?: number;
92
- extra_id?: import("mongoose").Types.ObjectId;
93
- }> & {
94
- _id: import("mongoose").Types.ObjectId;
95
- }>>;
1
+ declare const _default: import("mongoose").Model<any, {}, {}, {}, any, any>;
96
2
  export default _default;
@@ -1,7 +1,9 @@
1
- import { Schema, model } from "mongoose";
2
- const quoteArticleSchema = new Schema({
3
- quote_id: { type: Schema.Types.ObjectId, ref: "Quote", required: true },
4
- article_id: { type: Schema.Types.ObjectId, ref: "Article" },
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const quoteArticleSchema = new mongoose_1.Schema({
5
+ quote_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Quote", required: true },
6
+ article_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Article" },
5
7
  article_number: { type: String },
6
8
  description: { type: String },
7
9
  delivery: { type: String },
@@ -12,6 +14,6 @@ const quoteArticleSchema = new Schema({
12
14
  total: { type: Number },
13
15
  utility: { type: Number },
14
16
  type: { type: String },
15
- extra_id: { type: Schema.Types.ObjectId, ref: "QuoteArticleExtra" },
17
+ extra_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "QuoteArticleExtra" },
16
18
  }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
17
- export default model("QuoteArticle", quoteArticleSchema, "quote_articles");
19
+ exports.default = mongoose_1.models.QuoteArticle || (0, mongoose_1.model)("QuoteArticle", quoteArticleSchema, "quote_articles");
@@ -1,54 +1,2 @@
1
- import { Schema } from "mongoose";
2
- declare const _default: import("mongoose").Model<{
3
- quote_article_id: import("mongoose").Types.ObjectId;
4
- multiplier?: number;
5
- usa_freight?: number;
6
- usa_expenses?: number;
7
- duty?: number;
8
- mex_freight?: number;
9
- }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
10
- quote_article_id: import("mongoose").Types.ObjectId;
11
- multiplier?: number;
12
- usa_freight?: number;
13
- usa_expenses?: number;
14
- duty?: number;
15
- mex_freight?: number;
16
- }> & {
17
- quote_article_id: import("mongoose").Types.ObjectId;
18
- multiplier?: number;
19
- usa_freight?: number;
20
- usa_expenses?: number;
21
- duty?: number;
22
- mex_freight?: number;
23
- } & {
24
- _id: import("mongoose").Types.ObjectId;
25
- }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
26
- timestamps: {
27
- createdAt: string;
28
- updatedAt: string;
29
- };
30
- }, {
31
- quote_article_id: import("mongoose").Types.ObjectId;
32
- multiplier?: number;
33
- usa_freight?: number;
34
- usa_expenses?: number;
35
- duty?: number;
36
- mex_freight?: number;
37
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
38
- quote_article_id: import("mongoose").Types.ObjectId;
39
- multiplier?: number;
40
- usa_freight?: number;
41
- usa_expenses?: number;
42
- duty?: number;
43
- mex_freight?: number;
44
- }>> & import("mongoose").FlatRecord<{
45
- quote_article_id: import("mongoose").Types.ObjectId;
46
- multiplier?: number;
47
- usa_freight?: number;
48
- usa_expenses?: number;
49
- duty?: number;
50
- mex_freight?: number;
51
- }> & {
52
- _id: import("mongoose").Types.ObjectId;
53
- }>>;
1
+ declare const _default: import("mongoose").Model<any, {}, {}, {}, any, any>;
54
2
  export default _default;
@@ -1,7 +1,9 @@
1
- import { Schema, model } from "mongoose";
2
- const quoteArticleExtraSchema = new Schema({
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const mongoose_1 = require("mongoose");
4
+ const quoteArticleExtraSchema = new mongoose_1.Schema({
3
5
  quote_article_id: {
4
- type: Schema.Types.ObjectId,
6
+ type: mongoose_1.Schema.Types.ObjectId,
5
7
  ref: "QuoteArticle",
6
8
  required: true,
7
9
  },
@@ -11,4 +13,4 @@ const quoteArticleExtraSchema = new Schema({
11
13
  duty: Number,
12
14
  mex_freight: Number,
13
15
  }, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
14
- export default model("QuoteArticleExtra", quoteArticleExtraSchema, "quote_article_extras");
16
+ exports.default = mongoose_1.models.QuoteArticleExtra || (0, mongoose_1.model)("QuoteArticleExtra", quoteArticleExtraSchema, "quote_article_extras");
@@ -1,49 +1,2 @@
1
- import { Schema } from "mongoose";
2
- declare const _default: import("mongoose").Model<{
3
- created_at: Date;
4
- quote_id: import("mongoose").Types.ObjectId;
5
- email?: string;
6
- pipedrive_id?: string;
7
- name?: string;
8
- mobile?: string;
9
- }, {}, {}, {}, import("mongoose").Document<unknown, {}, {
10
- created_at: Date;
11
- quote_id: import("mongoose").Types.ObjectId;
12
- email?: string;
13
- pipedrive_id?: string;
14
- name?: string;
15
- mobile?: string;
16
- }> & {
17
- created_at: Date;
18
- quote_id: import("mongoose").Types.ObjectId;
19
- email?: string;
20
- pipedrive_id?: string;
21
- name?: string;
22
- mobile?: string;
23
- } & {
24
- _id: import("mongoose").Types.ObjectId;
25
- }, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
26
- created_at: Date;
27
- quote_id: import("mongoose").Types.ObjectId;
28
- email?: string;
29
- pipedrive_id?: string;
30
- name?: string;
31
- mobile?: string;
32
- }, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
33
- created_at: Date;
34
- quote_id: import("mongoose").Types.ObjectId;
35
- email?: string;
36
- pipedrive_id?: string;
37
- name?: string;
38
- mobile?: string;
39
- }>> & import("mongoose").FlatRecord<{
40
- created_at: Date;
41
- quote_id: import("mongoose").Types.ObjectId;
42
- email?: string;
43
- pipedrive_id?: string;
44
- name?: string;
45
- mobile?: string;
46
- }> & {
47
- _id: import("mongoose").Types.ObjectId;
48
- }>>;
1
+ declare const _default: import("mongoose").Model<any, {}, {}, {}, any, any>;
49
2
  export default _default;