@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.
- package/dist/announcements/index.js +8 -1
- package/dist/announcements/models/Announcements.js +10 -8
- package/dist/carts/index.js +8 -1
- package/dist/carts/models/Carts.js +8 -6
- package/dist/clients/index.js +20 -7
- package/dist/clients/models/Clients.js +5 -3
- package/dist/clients/models/ClientsAddress.js +6 -4
- package/dist/clients/models/ClientsContact.js +6 -4
- package/dist/clients/models/ClientsPaymentMethod.js +6 -4
- package/dist/clients/models/ClientsPaymentTerm.js +6 -4
- package/dist/clients/models/ClientsPriceList.js +6 -4
- package/dist/clients/models/ClientsSalesEmployee.js +6 -4
- package/dist/customers/index.js +10 -2
- package/dist/customers/models/Customers.js +14 -8
- package/dist/customers/models/FiscalProfileType.js +6 -4
- package/dist/index.d.ts +0 -1
- package/dist/index.js +24 -9
- package/dist/inventory/index.js +22 -8
- package/dist/inventory/models/Article.d.ts +1 -108
- package/dist/inventory/models/Article.js +6 -4
- package/dist/inventory/models/ArticleClasses.d.ts +1 -24
- package/dist/inventory/models/ArticleClasses.js +5 -3
- package/dist/inventory/models/ArticleGroups.d.ts +1 -24
- package/dist/inventory/models/ArticleGroups.js +5 -3
- package/dist/inventory/models/ArticlePrices.d.ts +1 -204
- package/dist/inventory/models/ArticlePrices.js +8 -6
- package/dist/inventory/models/Currencies.d.ts +1 -30
- package/dist/inventory/models/Currencies.js +5 -3
- package/dist/inventory/models/InventoryStocks.d.ts +1 -144
- package/dist/inventory/models/InventoryStocks.js +7 -5
- package/dist/inventory/models/PriceLists.d.ts +1 -36
- package/dist/inventory/models/PriceLists.js +5 -3
- package/dist/inventory/models/Warehouses.d.ts +1 -42
- package/dist/inventory/models/Warehouses.js +5 -3
- package/dist/orders/index.js +12 -3
- package/dist/orders/models/OrderStatusLogs.js +9 -7
- package/dist/orders/models/Orders.d.ts +1 -90
- package/dist/orders/models/Orders.js +11 -8
- package/dist/quotes/index.js +19 -5
- package/dist/quotes/models/Quote.d.ts +1 -191
- package/dist/quotes/models/Quote.js +19 -16
- package/dist/quotes/models/QuoteArticle.d.ts +1 -95
- package/dist/quotes/models/QuoteArticle.js +8 -6
- package/dist/quotes/models/QuoteArticleExtra.d.ts +1 -53
- package/dist/quotes/models/QuoteArticleExtra.js +6 -4
- package/dist/quotes/models/QuoteContact.d.ts +1 -48
- package/dist/quotes/models/QuoteContact.js +6 -4
- package/dist/quotes/models/QuoteTerm.d.ts +1 -53
- package/dist/quotes/models/QuoteTerm.js +5 -3
- package/dist/sap/index.js +8 -1
- package/dist/sap/models/SyncLog.js +17 -14
- package/dist/users/index.js +10 -1
- package/dist/users/models/Users.js +18 -12
- package/package.json +3 -10
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
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.Announcement = void 0;
|
|
7
|
+
var Announcements_1 = require("./models/Announcements");
|
|
8
|
+
Object.defineProperty(exports, "Announcement", { enumerable: true, get: function () { return __importDefault(Announcements_1).default; } });
|
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const Users_1 = require("../../users/models/Users");
|
|
5
|
+
const announcementSchema = new mongoose_1.Schema({
|
|
4
6
|
created_by: {
|
|
5
|
-
type: Schema.Types.ObjectId,
|
|
7
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
6
8
|
ref: "User",
|
|
7
9
|
required: true,
|
|
8
10
|
},
|
|
9
11
|
updated_by: {
|
|
10
|
-
type: Schema.Types.ObjectId,
|
|
12
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
11
13
|
ref: "User",
|
|
12
14
|
},
|
|
13
15
|
deleted_by: {
|
|
14
|
-
type: Schema.Types.ObjectId,
|
|
16
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
15
17
|
ref: "User",
|
|
16
18
|
},
|
|
17
19
|
created_at: {
|
|
@@ -32,7 +34,7 @@ const announcementSchema = new Schema({
|
|
|
32
34
|
},
|
|
33
35
|
roles: {
|
|
34
36
|
type: [String],
|
|
35
|
-
enum: Object.values(UserRole),
|
|
37
|
+
enum: Object.values(Users_1.UserRole),
|
|
36
38
|
required: true,
|
|
37
39
|
validate: {
|
|
38
40
|
validator: (roles) => roles.length > 0,
|
|
@@ -40,4 +42,4 @@ const announcementSchema = new Schema({
|
|
|
40
42
|
},
|
|
41
43
|
},
|
|
42
44
|
});
|
|
43
|
-
|
|
45
|
+
exports.default = (0, mongoose_1.model)("Announcement", announcementSchema, "announcements");
|
package/dist/carts/index.js
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
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.Cart = void 0;
|
|
7
|
+
var Carts_1 = require("./models/Carts");
|
|
8
|
+
Object.defineProperty(exports, "Cart", { enumerable: true, get: function () { return __importDefault(Carts_1).default; } });
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const cartItemSchema = new mongoose_1.Schema({
|
|
5
|
+
article_id: { type: mongoose_1.Types.ObjectId, ref: "Article", required: true },
|
|
4
6
|
quantity: { type: Number, required: true },
|
|
5
7
|
}, { _id: false });
|
|
6
|
-
const cartSchema = new Schema({
|
|
8
|
+
const cartSchema = new mongoose_1.Schema({
|
|
7
9
|
customer_id: {
|
|
8
|
-
type: Types.ObjectId,
|
|
10
|
+
type: mongoose_1.Types.ObjectId,
|
|
9
11
|
ref: "Customer",
|
|
10
12
|
required: true,
|
|
11
13
|
unique: true,
|
|
@@ -13,4 +15,4 @@ const cartSchema = new Schema({
|
|
|
13
15
|
items: [cartItemSchema],
|
|
14
16
|
updated_at: { type: Date, default: Date.now },
|
|
15
17
|
});
|
|
16
|
-
|
|
18
|
+
exports.default = (0, mongoose_1.model)("Cart", cartSchema, "carts");
|
package/dist/clients/index.js
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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.ClientSalesEmployee = exports.ClientPriceList = exports.ClientPaymentTerm = exports.ClientPaymentMethod = exports.ClientAddress = exports.ClientContact = exports.Client = void 0;
|
|
7
|
+
var Clients_1 = require("./models/Clients");
|
|
8
|
+
Object.defineProperty(exports, "Client", { enumerable: true, get: function () { return __importDefault(Clients_1).default; } });
|
|
9
|
+
var ClientsContact_1 = require("./models/ClientsContact");
|
|
10
|
+
Object.defineProperty(exports, "ClientContact", { enumerable: true, get: function () { return __importDefault(ClientsContact_1).default; } });
|
|
11
|
+
var ClientsAddress_1 = require("./models/ClientsAddress");
|
|
12
|
+
Object.defineProperty(exports, "ClientAddress", { enumerable: true, get: function () { return __importDefault(ClientsAddress_1).default; } });
|
|
13
|
+
var ClientsPaymentMethod_1 = require("./models/ClientsPaymentMethod");
|
|
14
|
+
Object.defineProperty(exports, "ClientPaymentMethod", { enumerable: true, get: function () { return __importDefault(ClientsPaymentMethod_1).default; } });
|
|
15
|
+
var ClientsPaymentTerm_1 = require("./models/ClientsPaymentTerm");
|
|
16
|
+
Object.defineProperty(exports, "ClientPaymentTerm", { enumerable: true, get: function () { return __importDefault(ClientsPaymentTerm_1).default; } });
|
|
17
|
+
var ClientsPriceList_1 = require("./models/ClientsPriceList");
|
|
18
|
+
Object.defineProperty(exports, "ClientPriceList", { enumerable: true, get: function () { return __importDefault(ClientsPriceList_1).default; } });
|
|
19
|
+
var ClientsSalesEmployee_1 = require("./models/ClientsSalesEmployee");
|
|
20
|
+
Object.defineProperty(exports, "ClientSalesEmployee", { enumerable: true, get: function () { return __importDefault(ClientsSalesEmployee_1).default; } });
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const clientSchema = new mongoose_1.Schema({
|
|
3
5
|
sn_code: { type: String, index: true },
|
|
4
6
|
sn_name: { type: String, required: true },
|
|
5
7
|
tax_id: { type: String },
|
|
@@ -12,4 +14,4 @@ const clientSchema = new Schema({
|
|
|
12
14
|
deleted_at: { type: Date, default: null },
|
|
13
15
|
deleted_by: { type: String, default: null },
|
|
14
16
|
}, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
|
|
15
|
-
|
|
17
|
+
exports.default = (0, mongoose_1.model)("Client", clientSchema, "clients");
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const clientAddressSchema = new mongoose_1.Schema({
|
|
3
5
|
client_id: {
|
|
4
|
-
type: Schema.Types.ObjectId,
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
5
7
|
ref: "Client",
|
|
6
8
|
required: true,
|
|
7
9
|
index: true,
|
|
@@ -14,4 +16,4 @@ const clientAddressSchema = new Schema({
|
|
|
14
16
|
state: { type: String },
|
|
15
17
|
country: { type: String },
|
|
16
18
|
}, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
|
|
17
|
-
|
|
19
|
+
exports.default = (0, mongoose_1.model)("ClientAddress", clientAddressSchema, "client_addresses");
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const clientContactSchema = new mongoose_1.Schema({
|
|
3
5
|
client_id: {
|
|
4
|
-
type: Schema.Types.ObjectId,
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
5
7
|
ref: "Client",
|
|
6
8
|
required: true,
|
|
7
9
|
index: true,
|
|
@@ -13,4 +15,4 @@ const clientContactSchema = new Schema({
|
|
|
13
15
|
contact_email: { type: String },
|
|
14
16
|
pipedrive_id: { type: String },
|
|
15
17
|
}, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
|
|
16
|
-
|
|
18
|
+
exports.default = (0, mongoose_1.model)("ClientContact", clientContactSchema, "client_contacts");
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const clientPaymentMethodSchema = new mongoose_1.Schema({
|
|
3
5
|
client_id: {
|
|
4
|
-
type: Schema.Types.ObjectId,
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
5
7
|
ref: "Client",
|
|
6
8
|
required: true,
|
|
7
9
|
unique: true,
|
|
@@ -9,4 +11,4 @@ const clientPaymentMethodSchema = new Schema({
|
|
|
9
11
|
code: { type: String },
|
|
10
12
|
description: { type: String },
|
|
11
13
|
}, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
|
|
12
|
-
|
|
14
|
+
exports.default = (0, mongoose_1.model)("ClientPaymentMethod", clientPaymentMethodSchema, "client_payment_methods");
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const clientPaymentTermSchema = new mongoose_1.Schema({
|
|
3
5
|
client_id: {
|
|
4
|
-
type: Schema.Types.ObjectId,
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
5
7
|
ref: "Client",
|
|
6
8
|
required: true,
|
|
7
9
|
unique: true,
|
|
@@ -9,4 +11,4 @@ const clientPaymentTermSchema = new Schema({
|
|
|
9
11
|
code: { type: String },
|
|
10
12
|
name: { type: String },
|
|
11
13
|
}, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
|
|
12
|
-
|
|
14
|
+
exports.default = (0, mongoose_1.model)("ClientPaymentTerm", clientPaymentTermSchema, "client_payment_terms");
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const clientPriceListSchema = new mongoose_1.Schema({
|
|
3
5
|
client_id: {
|
|
4
|
-
type: Schema.Types.ObjectId,
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
5
7
|
ref: "Client",
|
|
6
8
|
required: true,
|
|
7
9
|
unique: true,
|
|
@@ -9,4 +11,4 @@ const clientPriceListSchema = new Schema({
|
|
|
9
11
|
number: { type: String },
|
|
10
12
|
name: { type: String },
|
|
11
13
|
}, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
|
|
12
|
-
|
|
14
|
+
exports.default = (0, mongoose_1.model)("ClientPriceList", clientPriceListSchema, "client_price_lists");
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const clientSalesEmployeeSchema = new mongoose_1.Schema({
|
|
3
5
|
client_id: {
|
|
4
|
-
type: Schema.Types.ObjectId,
|
|
6
|
+
type: mongoose_1.Schema.Types.ObjectId,
|
|
5
7
|
ref: "Client",
|
|
6
8
|
required: true,
|
|
7
9
|
unique: true,
|
|
@@ -9,4 +11,4 @@ const clientSalesEmployeeSchema = new Schema({
|
|
|
9
11
|
employee_code: { type: String },
|
|
10
12
|
employee_name: { type: String },
|
|
11
13
|
}, { timestamps: { createdAt: "created_at", updatedAt: "updated_at" } });
|
|
12
|
-
|
|
14
|
+
exports.default = (0, mongoose_1.model)("ClientSalesEmployee", clientSalesEmployeeSchema, "client_sales_employees");
|
package/dist/customers/index.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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.FiscalProfile = exports.Customer = void 0;
|
|
7
|
+
var Customers_1 = require("./models/Customers");
|
|
8
|
+
Object.defineProperty(exports, "Customer", { enumerable: true, get: function () { return __importDefault(Customers_1).default; } });
|
|
9
|
+
var FiscalProfileType_1 = require("./models/FiscalProfileType");
|
|
10
|
+
Object.defineProperty(exports, "FiscalProfile", { enumerable: true, get: function () { return __importDefault(FiscalProfileType_1).default; } });
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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.CustomerStatus = void 0;
|
|
7
|
+
const mongoose_1 = require("mongoose");
|
|
8
|
+
const bcryptjs_1 = __importDefault(require("bcryptjs"));
|
|
9
|
+
var CustomerStatus;
|
|
4
10
|
(function (CustomerStatus) {
|
|
5
11
|
CustomerStatus["ACTIVE"] = "active";
|
|
6
12
|
CustomerStatus["INACTIVE"] = "inactive";
|
|
7
13
|
CustomerStatus["BANNED"] = "banned";
|
|
8
|
-
})(CustomerStatus || (CustomerStatus = {}));
|
|
9
|
-
const customerSchema = new Schema({
|
|
14
|
+
})(CustomerStatus || (exports.CustomerStatus = CustomerStatus = {}));
|
|
15
|
+
const customerSchema = new mongoose_1.Schema({
|
|
10
16
|
first_name: { type: String, required: true },
|
|
11
17
|
last_name: { type: String, required: true },
|
|
12
18
|
email: { type: String, required: true, unique: true },
|
|
@@ -17,7 +23,7 @@ const customerSchema = new Schema({
|
|
|
17
23
|
enum: Object.values(CustomerStatus),
|
|
18
24
|
default: CustomerStatus.ACTIVE,
|
|
19
25
|
},
|
|
20
|
-
fiscal_profile_id: { type: Schema.Types.ObjectId, ref: "FiscalProfile" },
|
|
26
|
+
fiscal_profile_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "FiscalProfile" },
|
|
21
27
|
created_at: { type: Date, default: Date.now },
|
|
22
28
|
updated_at: { type: Date },
|
|
23
29
|
deleted_at: { type: Date },
|
|
@@ -25,8 +31,8 @@ const customerSchema = new Schema({
|
|
|
25
31
|
// Hash password
|
|
26
32
|
customerSchema.pre("save", async function (next) {
|
|
27
33
|
if (this.isModified("password")) {
|
|
28
|
-
this.password = await
|
|
34
|
+
this.password = await bcryptjs_1.default.hash(this.password, 12);
|
|
29
35
|
}
|
|
30
36
|
next();
|
|
31
37
|
});
|
|
32
|
-
|
|
38
|
+
exports.default = (0, mongoose_1.model)("Cart", customerSchema, "carts");
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const fiscalProfileSchema = new mongoose_1.Schema({
|
|
5
|
+
customer_id: { type: mongoose_1.Schema.Types.ObjectId, ref: "Customer", required: true },
|
|
4
6
|
rfc: { type: String, required: true },
|
|
5
7
|
razon_social: { type: String, required: true },
|
|
6
8
|
uso_cfdi: { type: String, required: true },
|
|
@@ -9,4 +11,4 @@ const fiscalProfileSchema = new Schema({
|
|
|
9
11
|
created_at: { type: Date, default: Date.now },
|
|
10
12
|
updated_at: { type: Date },
|
|
11
13
|
});
|
|
12
|
-
|
|
14
|
+
exports.default = (0, mongoose_1.model)("FiscalProfile", fiscalProfileSchema, "fiscal_profiles");
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./clients"), exports);
|
|
18
|
+
__exportStar(require("./inventory"), exports);
|
|
19
|
+
__exportStar(require("./quotes"), exports);
|
|
20
|
+
__exportStar(require("./customers"), exports);
|
|
21
|
+
__exportStar(require("./orders"), exports);
|
|
22
|
+
__exportStar(require("./sap"), exports);
|
|
23
|
+
__exportStar(require("./announcements"), exports);
|
|
24
|
+
__exportStar(require("./users"), exports);
|
package/dist/inventory/index.js
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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.PriceList = exports.InventoryStock = exports.Warehouse = exports.Currency = exports.ArticlePrice = exports.ArticleClass = exports.ArticleGroup = exports.Article = void 0;
|
|
7
|
+
var Article_1 = require("./models/Article");
|
|
8
|
+
Object.defineProperty(exports, "Article", { enumerable: true, get: function () { return __importDefault(Article_1).default; } });
|
|
9
|
+
var ArticleGroups_1 = require("./models/ArticleGroups");
|
|
10
|
+
Object.defineProperty(exports, "ArticleGroup", { enumerable: true, get: function () { return __importDefault(ArticleGroups_1).default; } });
|
|
11
|
+
var ArticleClasses_1 = require("./models/ArticleClasses");
|
|
12
|
+
Object.defineProperty(exports, "ArticleClass", { enumerable: true, get: function () { return __importDefault(ArticleClasses_1).default; } });
|
|
13
|
+
var ArticlePrices_1 = require("./models/ArticlePrices");
|
|
14
|
+
Object.defineProperty(exports, "ArticlePrice", { enumerable: true, get: function () { return __importDefault(ArticlePrices_1).default; } });
|
|
15
|
+
var Currencies_1 = require("./models/Currencies");
|
|
16
|
+
Object.defineProperty(exports, "Currency", { enumerable: true, get: function () { return __importDefault(Currencies_1).default; } });
|
|
17
|
+
var Warehouses_1 = require("./models/Warehouses");
|
|
18
|
+
Object.defineProperty(exports, "Warehouse", { enumerable: true, get: function () { return __importDefault(Warehouses_1).default; } });
|
|
19
|
+
var InventoryStocks_1 = require("./models/InventoryStocks");
|
|
20
|
+
Object.defineProperty(exports, "InventoryStock", { enumerable: true, get: function () { return __importDefault(InventoryStocks_1).default; } });
|
|
21
|
+
var PriceLists_1 = require("./models/PriceLists");
|
|
22
|
+
Object.defineProperty(exports, "PriceList", { enumerable: true, get: function () { return __importDefault(PriceLists_1).default; } });
|
|
@@ -1,109 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: import("mongoose").Model<{
|
|
3
|
-
created_at: Date;
|
|
4
|
-
description: string;
|
|
5
|
-
article_number: string;
|
|
6
|
-
unit: string;
|
|
7
|
-
group_id: {
|
|
8
|
-
prototype?: Types.ObjectId;
|
|
9
|
-
cacheHexString?: unknown;
|
|
10
|
-
generate?: {};
|
|
11
|
-
createFromTime?: {};
|
|
12
|
-
createFromHexString?: {};
|
|
13
|
-
createFromBase64?: {};
|
|
14
|
-
isValid?: {};
|
|
15
|
-
};
|
|
16
|
-
updated_at?: Date;
|
|
17
|
-
model?: string;
|
|
18
|
-
brand?: string;
|
|
19
|
-
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
20
|
-
created_at: Date;
|
|
21
|
-
description: string;
|
|
22
|
-
article_number: string;
|
|
23
|
-
unit: string;
|
|
24
|
-
group_id: {
|
|
25
|
-
prototype?: Types.ObjectId;
|
|
26
|
-
cacheHexString?: unknown;
|
|
27
|
-
generate?: {};
|
|
28
|
-
createFromTime?: {};
|
|
29
|
-
createFromHexString?: {};
|
|
30
|
-
createFromBase64?: {};
|
|
31
|
-
isValid?: {};
|
|
32
|
-
};
|
|
33
|
-
updated_at?: Date;
|
|
34
|
-
model?: string;
|
|
35
|
-
brand?: string;
|
|
36
|
-
}> & {
|
|
37
|
-
created_at: Date;
|
|
38
|
-
description: string;
|
|
39
|
-
article_number: string;
|
|
40
|
-
unit: string;
|
|
41
|
-
group_id: {
|
|
42
|
-
prototype?: Types.ObjectId;
|
|
43
|
-
cacheHexString?: unknown;
|
|
44
|
-
generate?: {};
|
|
45
|
-
createFromTime?: {};
|
|
46
|
-
createFromHexString?: {};
|
|
47
|
-
createFromBase64?: {};
|
|
48
|
-
isValid?: {};
|
|
49
|
-
};
|
|
50
|
-
updated_at?: Date;
|
|
51
|
-
model?: string;
|
|
52
|
-
brand?: string;
|
|
53
|
-
} & {
|
|
54
|
-
_id: Types.ObjectId;
|
|
55
|
-
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
56
|
-
created_at: Date;
|
|
57
|
-
description: string;
|
|
58
|
-
article_number: string;
|
|
59
|
-
unit: string;
|
|
60
|
-
group_id: {
|
|
61
|
-
prototype?: Types.ObjectId;
|
|
62
|
-
cacheHexString?: unknown;
|
|
63
|
-
generate?: {};
|
|
64
|
-
createFromTime?: {};
|
|
65
|
-
createFromHexString?: {};
|
|
66
|
-
createFromBase64?: {};
|
|
67
|
-
isValid?: {};
|
|
68
|
-
};
|
|
69
|
-
updated_at?: Date;
|
|
70
|
-
model?: string;
|
|
71
|
-
brand?: string;
|
|
72
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
73
|
-
created_at: Date;
|
|
74
|
-
description: string;
|
|
75
|
-
article_number: string;
|
|
76
|
-
unit: string;
|
|
77
|
-
group_id: {
|
|
78
|
-
prototype?: Types.ObjectId;
|
|
79
|
-
cacheHexString?: unknown;
|
|
80
|
-
generate?: {};
|
|
81
|
-
createFromTime?: {};
|
|
82
|
-
createFromHexString?: {};
|
|
83
|
-
createFromBase64?: {};
|
|
84
|
-
isValid?: {};
|
|
85
|
-
};
|
|
86
|
-
updated_at?: Date;
|
|
87
|
-
model?: string;
|
|
88
|
-
brand?: string;
|
|
89
|
-
}>> & import("mongoose").FlatRecord<{
|
|
90
|
-
created_at: Date;
|
|
91
|
-
description: string;
|
|
92
|
-
article_number: string;
|
|
93
|
-
unit: string;
|
|
94
|
-
group_id: {
|
|
95
|
-
prototype?: Types.ObjectId;
|
|
96
|
-
cacheHexString?: unknown;
|
|
97
|
-
generate?: {};
|
|
98
|
-
createFromTime?: {};
|
|
99
|
-
createFromHexString?: {};
|
|
100
|
-
createFromBase64?: {};
|
|
101
|
-
isValid?: {};
|
|
102
|
-
};
|
|
103
|
-
updated_at?: Date;
|
|
104
|
-
model?: string;
|
|
105
|
-
brand?: string;
|
|
106
|
-
}> & {
|
|
107
|
-
_id: Types.ObjectId;
|
|
108
|
-
}>>;
|
|
1
|
+
declare const _default: import("mongoose").Model<any, {}, {}, {}, any, any>;
|
|
109
2
|
export default _default;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const articleSchema = new mongoose_1.Schema({
|
|
3
5
|
article_number: { type: String, required: true, unique: true }, // SAP ItemCode
|
|
4
6
|
description: { type: String, required: true },
|
|
5
7
|
unit: { type: String, required: true },
|
|
6
8
|
brand: { type: String },
|
|
7
9
|
model: { type: String },
|
|
8
|
-
group_id: { type: Types.ObjectId, ref: "ArticleGroup", required: true },
|
|
10
|
+
group_id: { type: mongoose_1.Types.ObjectId, ref: "ArticleGroup", required: true },
|
|
9
11
|
created_at: { type: Date, default: Date.now },
|
|
10
12
|
updated_at: { type: Date },
|
|
11
13
|
});
|
|
12
|
-
|
|
14
|
+
exports.default = mongoose_1.models.Article || (0, mongoose_1.model)("Article", articleSchema, "articles");
|
|
@@ -1,25 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: import("mongoose").Model<{
|
|
3
|
-
name: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
6
|
-
name: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
}> & {
|
|
9
|
-
name: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
} & {
|
|
12
|
-
_id: import("mongoose").Types.ObjectId;
|
|
13
|
-
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
14
|
-
name: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
17
|
-
name: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
}>> & import("mongoose").FlatRecord<{
|
|
20
|
-
name: string;
|
|
21
|
-
description?: string;
|
|
22
|
-
}> & {
|
|
23
|
-
_id: import("mongoose").Types.ObjectId;
|
|
24
|
-
}>>;
|
|
1
|
+
declare const _default: import("mongoose").Model<any, {}, {}, {}, any, any>;
|
|
25
2
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const articleClassSchema = new mongoose_1.Schema({
|
|
3
5
|
name: { type: String, required: true },
|
|
4
6
|
description: { type: String },
|
|
5
7
|
});
|
|
6
|
-
|
|
8
|
+
exports.default = mongoose_1.models.ArticleClass || (0, mongoose_1.model)("ArticleClass", articleClassSchema, "article_classes");
|
|
@@ -1,25 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
declare const _default: import("mongoose").Model<{
|
|
3
|
-
name: string;
|
|
4
|
-
description?: string;
|
|
5
|
-
}, {}, {}, {}, import("mongoose").Document<unknown, {}, {
|
|
6
|
-
name: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
}> & {
|
|
9
|
-
name: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
} & {
|
|
12
|
-
_id: import("mongoose").Types.ObjectId;
|
|
13
|
-
}, Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, {
|
|
14
|
-
name: string;
|
|
15
|
-
description?: string;
|
|
16
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
17
|
-
name: string;
|
|
18
|
-
description?: string;
|
|
19
|
-
}>> & import("mongoose").FlatRecord<{
|
|
20
|
-
name: string;
|
|
21
|
-
description?: string;
|
|
22
|
-
}> & {
|
|
23
|
-
_id: import("mongoose").Types.ObjectId;
|
|
24
|
-
}>>;
|
|
1
|
+
declare const _default: import("mongoose").Model<any, {}, {}, {}, any, any>;
|
|
25
2
|
export default _default;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const mongoose_1 = require("mongoose");
|
|
4
|
+
const articleGroupSchema = new mongoose_1.Schema({
|
|
3
5
|
name: { type: String, required: true },
|
|
4
6
|
description: { type: String },
|
|
5
7
|
});
|
|
6
|
-
|
|
8
|
+
exports.default = mongoose_1.models.ArticleGroup || (0, mongoose_1.model)("ArticleGroup", articleGroupSchema, "article_groups");
|