@floristcloud/api-lib 1.2.55 → 1.2.57
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/build/commands/report/export-sales-by-client.query.js +11 -21
- package/build/commands/report/export-sales-by-position.query.js +31 -0
- package/build/commands/report/index.js +1 -0
- package/build/constant/error.js +7 -0
- package/build/enum/client-import-errors.enum.js +6 -0
- package/build/enum/index.js +2 -0
- package/build/enum/legal-identifier-field.enum.js +12 -0
- package/build/enum/sales-by-position-group-by.enum.js +8 -0
- package/commands/report/export-sales-by-client.query.ts +15 -30
- package/commands/report/export-sales-by-position.query.ts +33 -0
- package/commands/report/index.ts +1 -0
- package/constant/error.ts +7 -0
- package/enum/client-import-errors.enum.ts +6 -0
- package/enum/index.ts +2 -0
- package/enum/legal-identifier-field.enum.ts +8 -0
- package/enum/sales-by-position-group-by.enum.ts +4 -0
- package/package.json +1 -1
|
@@ -5,32 +5,22 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const date_helper_1 = require("../../helpers/date.helper");
|
|
6
6
|
const ExportSalesByClientRequestSchema = zod_1.z
|
|
7
7
|
.object({
|
|
8
|
-
startDate: zod_1.z.coerce.date()
|
|
9
|
-
endDate: zod_1.z.coerce.date()
|
|
8
|
+
startDate: zod_1.z.coerce.date(),
|
|
9
|
+
endDate: zod_1.z.coerce.date(),
|
|
10
10
|
})
|
|
11
|
-
.refine(value => {
|
|
12
|
-
const { startDate, endDate } = value;
|
|
13
|
-
if (startDate && endDate) {
|
|
14
|
-
return (0, date_helper_1.dateRangeCheck)(startDate, endDate);
|
|
15
|
-
}
|
|
16
|
-
return true;
|
|
17
|
-
}, {
|
|
11
|
+
.refine(value => (0, date_helper_1.dateRangeCheck)(value.startDate, value.endDate), {
|
|
18
12
|
message: 'End date must be greater than start date',
|
|
19
13
|
path: ['endDate', 'startDate'],
|
|
14
|
+
})
|
|
15
|
+
.refine(value => (0, date_helper_1.isStatementPeriodWithinLimit)(value.startDate, value.endDate), {
|
|
16
|
+
message: 'Report period must not exceed 1 year',
|
|
17
|
+
path: ['endDate', 'startDate'],
|
|
20
18
|
});
|
|
21
19
|
const ExportSalesByClientResponseSchema = zod_1.z.object({
|
|
22
|
-
data: zod_1.z.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
totalOrders: zod_1.z.number(),
|
|
27
|
-
soldUnits: zod_1.z.number(),
|
|
28
|
-
totalSales: zod_1.z.number(),
|
|
29
|
-
avgCheck: zod_1.z.number(),
|
|
30
|
-
totalWriteOff: zod_1.z.number(),
|
|
31
|
-
grossProfit: zod_1.z.number(),
|
|
32
|
-
marginality: zod_1.z.number(),
|
|
33
|
-
})),
|
|
20
|
+
data: zod_1.z.object({
|
|
21
|
+
fileUrl: zod_1.z.string(),
|
|
22
|
+
fileKey: zod_1.z.string(),
|
|
23
|
+
}),
|
|
34
24
|
});
|
|
35
25
|
var ExportSalesByClientContractQuery;
|
|
36
26
|
(function (ExportSalesByClientContractQuery) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExportSalesByPositionContractQuery = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const date_helper_1 = require("../../helpers/date.helper");
|
|
6
|
+
const sales_by_position_group_by_enum_1 = require("../../enum/sales-by-position-group-by.enum");
|
|
7
|
+
const ExportSalesByPositionRequestSchema = zod_1.z
|
|
8
|
+
.object({
|
|
9
|
+
startDate: zod_1.z.coerce.date(),
|
|
10
|
+
endDate: zod_1.z.coerce.date(),
|
|
11
|
+
groupBy: zod_1.z.nativeEnum(sales_by_position_group_by_enum_1.SalesByPositionGroupByEnum).default(sales_by_position_group_by_enum_1.SalesByPositionGroupByEnum.PRODUCT),
|
|
12
|
+
})
|
|
13
|
+
.refine(value => (0, date_helper_1.dateRangeCheck)(value.startDate, value.endDate), {
|
|
14
|
+
message: 'End date must be greater than start date',
|
|
15
|
+
path: ['endDate', 'startDate'],
|
|
16
|
+
})
|
|
17
|
+
.refine(value => (0, date_helper_1.isStatementPeriodWithinLimit)(value.startDate, value.endDate), {
|
|
18
|
+
message: 'Report period must not exceed 1 year',
|
|
19
|
+
path: ['endDate', 'startDate'],
|
|
20
|
+
});
|
|
21
|
+
const ExportSalesByPositionResponseSchema = zod_1.z.object({
|
|
22
|
+
data: zod_1.z.object({
|
|
23
|
+
fileUrl: zod_1.z.string(),
|
|
24
|
+
fileKey: zod_1.z.string(),
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
var ExportSalesByPositionContractQuery;
|
|
28
|
+
(function (ExportSalesByPositionContractQuery) {
|
|
29
|
+
ExportSalesByPositionContractQuery.RequestSchema = ExportSalesByPositionRequestSchema;
|
|
30
|
+
ExportSalesByPositionContractQuery.ResponseSchema = ExportSalesByPositionResponseSchema;
|
|
31
|
+
})(ExportSalesByPositionContractQuery || (exports.ExportSalesByPositionContractQuery = ExportSalesByPositionContractQuery = {}));
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./get-report-group-by-client.query"), exports);
|
|
|
19
19
|
__exportStar(require("./get-report-group-by-position.query"), exports);
|
|
20
20
|
__exportStar(require("./export-sales-revenue.query"), exports);
|
|
21
21
|
__exportStar(require("./export-sales-by-client.query"), exports);
|
|
22
|
+
__exportStar(require("./export-sales-by-position.query"), exports);
|
|
22
23
|
__exportStar(require("./export-inventory-stock.query"), exports);
|
|
23
24
|
__exportStar(require("./export-inventory-movement.query"), exports);
|
|
24
25
|
__exportStar(require("./export-inventory-turnover.query"), exports);
|
package/build/constant/error.js
CHANGED
|
@@ -96,6 +96,7 @@ exports.ERRORS = {
|
|
|
96
96
|
USER_ROLE_MISMATCH_EMPLOYEE: { code: 'U014', message: 'User does not have employee role required for employee login', httpCode: 403 },
|
|
97
97
|
USER_CANNOT_DEACTIVATE_SELF: { code: 'U015', message: 'You cannot deactivate your own account', httpCode: 400 },
|
|
98
98
|
USER_CANNOT_REMOVE_OWN_ADMIN_ROLE: { code: 'U016', message: 'You cannot remove the ADMIN role from your own account', httpCode: 400 },
|
|
99
|
+
USER_CANNOT_REMOVE_LAST_ADMIN: { code: 'U017', message: 'The company must keep at least one active administrator', httpCode: 400 },
|
|
99
100
|
//AUTH
|
|
100
101
|
FAILED_TO_UPDATE: { code: 'A010', message: 'User update failed', httpCode: 500 },
|
|
101
102
|
RESTORE_TOKEN_ERROR: { code: 'A012', message: 'Invalid recovery token', httpCode: 500 },
|
|
@@ -133,6 +134,12 @@ exports.ERRORS = {
|
|
|
133
134
|
CLIENT_EMAIL_ALREADY_EXIST: { code: 'CL007', message: 'Client with this email already exist', httpCode: 409 },
|
|
134
135
|
CLIENT_PHONE_ALREADY_EXIST: { code: 'CL008', message: 'Client with this phone already exist', httpCode: 409 },
|
|
135
136
|
CLIENT_WITH_SAME_USER_ALREADY_EXIST: { code: 'CL009', message: 'Client with same user already exist', httpCode: 409 },
|
|
137
|
+
CLIENT_CODE_ALREADY_EXIST: { code: 'CL037', message: 'Client with this code already exist', httpCode: 409 },
|
|
138
|
+
CLIENT_ADDITIONAL_PHONE_ALREADY_EXIST: { code: 'CL038', message: 'Client with this additional phone already exist', httpCode: 409 },
|
|
139
|
+
CLIENT_TAX_ID_ALREADY_EXIST: { code: 'CL039', message: 'Client with this tax ID already exist', httpCode: 409 },
|
|
140
|
+
CLIENT_OGRN_ALREADY_EXIST: { code: 'CL040', message: 'Client with this OGRN already exist', httpCode: 409 },
|
|
141
|
+
CLIENT_OGRNIP_ALREADY_EXIST: { code: 'CL041', message: 'Client with this OGRNIP already exist', httpCode: 409 },
|
|
142
|
+
CLIENT_EDO_ID_ALREADY_EXIST: { code: 'CL042', message: 'Client with this EDO ID already exist', httpCode: 409 },
|
|
136
143
|
CLIENT_NOT_REGISTERED: { code: 'CL010', message: 'Failed to register client', httpCode: 500 },
|
|
137
144
|
CLIENT_ORDER_COUNTS_FETCH_FAILED: {
|
|
138
145
|
code: 'CL011',
|
|
@@ -8,7 +8,13 @@ var ClientImportErrorsEnum;
|
|
|
8
8
|
ClientImportErrorsEnum["DUPLICATE_NAME"] = "DUPLICATE_NAME";
|
|
9
9
|
ClientImportErrorsEnum["DUPLICATE_EMAIL"] = "DUPLICATE_EMAIL";
|
|
10
10
|
ClientImportErrorsEnum["DUPLICATE_PHONE"] = "DUPLICATE_PHONE";
|
|
11
|
+
ClientImportErrorsEnum["DUPLICATE_CODE"] = "DUPLICATE_CODE";
|
|
12
|
+
ClientImportErrorsEnum["DUPLICATE_TAX_ID"] = "DUPLICATE_TAX_ID";
|
|
13
|
+
ClientImportErrorsEnum["DUPLICATE_OGRN"] = "DUPLICATE_OGRN";
|
|
11
14
|
ClientImportErrorsEnum["NAME_ALREADY_EXISTS_IN_DB"] = "NAME_ALREADY_EXISTS_IN_DB";
|
|
12
15
|
ClientImportErrorsEnum["EMAIL_ALREADY_EXISTS_IN_DB"] = "EMAIL_ALREADY_EXISTS_IN_DB";
|
|
13
16
|
ClientImportErrorsEnum["PHONE_ALREADY_EXISTS_IN_DB"] = "PHONE_ALREADY_EXISTS_IN_DB";
|
|
17
|
+
ClientImportErrorsEnum["CODE_ALREADY_EXISTS_IN_DB"] = "CODE_ALREADY_EXISTS_IN_DB";
|
|
18
|
+
ClientImportErrorsEnum["TAX_ID_ALREADY_EXISTS_IN_DB"] = "TAX_ID_ALREADY_EXISTS_IN_DB";
|
|
19
|
+
ClientImportErrorsEnum["OGRN_ALREADY_EXISTS_IN_DB"] = "OGRN_ALREADY_EXISTS_IN_DB";
|
|
14
20
|
})(ClientImportErrorsEnum || (exports.ClientImportErrorsEnum = ClientImportErrorsEnum = {}));
|
package/build/enum/index.js
CHANGED
|
@@ -61,6 +61,7 @@ __exportStar(require("./write-off-status.enum"), exports);
|
|
|
61
61
|
__exportStar(require("./position-report-type.enum"), exports);
|
|
62
62
|
__exportStar(require("./discount-price-routing.enum"), exports);
|
|
63
63
|
__exportStar(require("./sales-unit.enum"), exports);
|
|
64
|
+
__exportStar(require("./sales-by-position-group-by.enum"), exports);
|
|
64
65
|
__exportStar(require("./client-import-entity-property.enum"), exports);
|
|
65
66
|
__exportStar(require("./client-import-errors.enum"), exports);
|
|
66
67
|
__exportStar(require("./pre-order-collection-item-import-entity-property.enum"), exports);
|
|
@@ -96,3 +97,4 @@ __exportStar(require("./account-deletion-request-source.enum"), exports);
|
|
|
96
97
|
__exportStar(require("./bulk-create-product-image-alias-skip-reason.enum"), exports);
|
|
97
98
|
__exportStar(require("./bulk-create-product-image-alias-from-pre-order-collection-item-skip-reason.enum"), exports);
|
|
98
99
|
__exportStar(require("./moysklad-sync-status.enum"), exports);
|
|
100
|
+
__exportStar(require("./legal-identifier-field.enum"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LegalIdentifierFieldEnum = void 0;
|
|
4
|
+
// Legal-profile identifier fields that must be unique per company (FC-194).
|
|
5
|
+
// Values match the ClientLegalProfile field names exactly — they index domain objects and Prisma where filters.
|
|
6
|
+
var LegalIdentifierFieldEnum;
|
|
7
|
+
(function (LegalIdentifierFieldEnum) {
|
|
8
|
+
LegalIdentifierFieldEnum["TAX_ID"] = "taxId";
|
|
9
|
+
LegalIdentifierFieldEnum["OGRN"] = "ogrn";
|
|
10
|
+
LegalIdentifierFieldEnum["OGRNIP"] = "ogrnip";
|
|
11
|
+
LegalIdentifierFieldEnum["EDO_ID"] = "edoId";
|
|
12
|
+
})(LegalIdentifierFieldEnum || (exports.LegalIdentifierFieldEnum = LegalIdentifierFieldEnum = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SalesByPositionGroupByEnum = void 0;
|
|
4
|
+
var SalesByPositionGroupByEnum;
|
|
5
|
+
(function (SalesByPositionGroupByEnum) {
|
|
6
|
+
SalesByPositionGroupByEnum["CATEGORY"] = "CATEGORY";
|
|
7
|
+
SalesByPositionGroupByEnum["PRODUCT"] = "PRODUCT";
|
|
8
|
+
})(SalesByPositionGroupByEnum || (exports.SalesByPositionGroupByEnum = SalesByPositionGroupByEnum = {}));
|
|
@@ -1,40 +1,25 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { dateRangeCheck } from '../../helpers/date.helper';
|
|
2
|
+
import { dateRangeCheck, isStatementPeriodWithinLimit } from '../../helpers/date.helper';
|
|
3
3
|
|
|
4
4
|
const ExportSalesByClientRequestSchema = z
|
|
5
5
|
.object({
|
|
6
|
-
startDate: z.coerce.date()
|
|
7
|
-
endDate: z.coerce.date()
|
|
6
|
+
startDate: z.coerce.date(),
|
|
7
|
+
endDate: z.coerce.date(),
|
|
8
8
|
})
|
|
9
|
-
.refine(
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
message: 'End date must be greater than start date',
|
|
19
|
-
path: ['endDate', 'startDate'],
|
|
20
|
-
},
|
|
21
|
-
);
|
|
9
|
+
.refine(value => dateRangeCheck(value.startDate, value.endDate), {
|
|
10
|
+
message: 'End date must be greater than start date',
|
|
11
|
+
path: ['endDate', 'startDate'],
|
|
12
|
+
})
|
|
13
|
+
.refine(value => isStatementPeriodWithinLimit(value.startDate, value.endDate), {
|
|
14
|
+
message: 'Report period must not exceed 1 year',
|
|
15
|
+
path: ['endDate', 'startDate'],
|
|
16
|
+
});
|
|
22
17
|
|
|
23
18
|
const ExportSalesByClientResponseSchema = z.object({
|
|
24
|
-
data: z.
|
|
25
|
-
z.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
responsibleUserName: z.string().optional(),
|
|
29
|
-
totalOrders: z.number(),
|
|
30
|
-
soldUnits: z.number(),
|
|
31
|
-
totalSales: z.number(),
|
|
32
|
-
avgCheck: z.number(),
|
|
33
|
-
totalWriteOff: z.number(),
|
|
34
|
-
grossProfit: z.number(),
|
|
35
|
-
marginality: z.number(),
|
|
36
|
-
}),
|
|
37
|
-
),
|
|
19
|
+
data: z.object({
|
|
20
|
+
fileUrl: z.string(),
|
|
21
|
+
fileKey: z.string(),
|
|
22
|
+
}),
|
|
38
23
|
});
|
|
39
24
|
|
|
40
25
|
export namespace ExportSalesByClientContractQuery {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { dateRangeCheck, isStatementPeriodWithinLimit } from '../../helpers/date.helper';
|
|
3
|
+
import { SalesByPositionGroupByEnum } from '../../enum/sales-by-position-group-by.enum';
|
|
4
|
+
|
|
5
|
+
const ExportSalesByPositionRequestSchema = z
|
|
6
|
+
.object({
|
|
7
|
+
startDate: z.coerce.date(),
|
|
8
|
+
endDate: z.coerce.date(),
|
|
9
|
+
groupBy: z.nativeEnum(SalesByPositionGroupByEnum).default(SalesByPositionGroupByEnum.PRODUCT),
|
|
10
|
+
})
|
|
11
|
+
.refine(value => dateRangeCheck(value.startDate, value.endDate), {
|
|
12
|
+
message: 'End date must be greater than start date',
|
|
13
|
+
path: ['endDate', 'startDate'],
|
|
14
|
+
})
|
|
15
|
+
.refine(value => isStatementPeriodWithinLimit(value.startDate, value.endDate), {
|
|
16
|
+
message: 'Report period must not exceed 1 year',
|
|
17
|
+
path: ['endDate', 'startDate'],
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const ExportSalesByPositionResponseSchema = z.object({
|
|
21
|
+
data: z.object({
|
|
22
|
+
fileUrl: z.string(),
|
|
23
|
+
fileKey: z.string(),
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export namespace ExportSalesByPositionContractQuery {
|
|
28
|
+
export const RequestSchema = ExportSalesByPositionRequestSchema;
|
|
29
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
30
|
+
|
|
31
|
+
export const ResponseSchema = ExportSalesByPositionResponseSchema;
|
|
32
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
33
|
+
}
|
package/commands/report/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './get-report-group-by-client.query';
|
|
|
3
3
|
export * from './get-report-group-by-position.query';
|
|
4
4
|
export * from './export-sales-revenue.query';
|
|
5
5
|
export * from './export-sales-by-client.query';
|
|
6
|
+
export * from './export-sales-by-position.query';
|
|
6
7
|
export * from './export-inventory-stock.query';
|
|
7
8
|
export * from './export-inventory-movement.query';
|
|
8
9
|
export * from './export-inventory-turnover.query';
|
package/constant/error.ts
CHANGED
|
@@ -99,6 +99,7 @@ export const ERRORS = {
|
|
|
99
99
|
USER_ROLE_MISMATCH_EMPLOYEE: { code: 'U014', message: 'User does not have employee role required for employee login', httpCode: 403 },
|
|
100
100
|
USER_CANNOT_DEACTIVATE_SELF: { code: 'U015', message: 'You cannot deactivate your own account', httpCode: 400 },
|
|
101
101
|
USER_CANNOT_REMOVE_OWN_ADMIN_ROLE: { code: 'U016', message: 'You cannot remove the ADMIN role from your own account', httpCode: 400 },
|
|
102
|
+
USER_CANNOT_REMOVE_LAST_ADMIN: { code: 'U017', message: 'The company must keep at least one active administrator', httpCode: 400 },
|
|
102
103
|
|
|
103
104
|
//AUTH
|
|
104
105
|
FAILED_TO_UPDATE: { code: 'A010', message: 'User update failed', httpCode: 500 },
|
|
@@ -138,6 +139,12 @@ export const ERRORS = {
|
|
|
138
139
|
CLIENT_EMAIL_ALREADY_EXIST: { code: 'CL007', message: 'Client with this email already exist', httpCode: 409 },
|
|
139
140
|
CLIENT_PHONE_ALREADY_EXIST: { code: 'CL008', message: 'Client with this phone already exist', httpCode: 409 },
|
|
140
141
|
CLIENT_WITH_SAME_USER_ALREADY_EXIST: { code: 'CL009', message: 'Client with same user already exist', httpCode: 409 },
|
|
142
|
+
CLIENT_CODE_ALREADY_EXIST: { code: 'CL037', message: 'Client with this code already exist', httpCode: 409 },
|
|
143
|
+
CLIENT_ADDITIONAL_PHONE_ALREADY_EXIST: { code: 'CL038', message: 'Client with this additional phone already exist', httpCode: 409 },
|
|
144
|
+
CLIENT_TAX_ID_ALREADY_EXIST: { code: 'CL039', message: 'Client with this tax ID already exist', httpCode: 409 },
|
|
145
|
+
CLIENT_OGRN_ALREADY_EXIST: { code: 'CL040', message: 'Client with this OGRN already exist', httpCode: 409 },
|
|
146
|
+
CLIENT_OGRNIP_ALREADY_EXIST: { code: 'CL041', message: 'Client with this OGRNIP already exist', httpCode: 409 },
|
|
147
|
+
CLIENT_EDO_ID_ALREADY_EXIST: { code: 'CL042', message: 'Client with this EDO ID already exist', httpCode: 409 },
|
|
141
148
|
CLIENT_NOT_REGISTERED: { code: 'CL010', message: 'Failed to register client', httpCode: 500 },
|
|
142
149
|
CLIENT_ORDER_COUNTS_FETCH_FAILED: {
|
|
143
150
|
code: 'CL011',
|
|
@@ -4,7 +4,13 @@ export enum ClientImportErrorsEnum {
|
|
|
4
4
|
DUPLICATE_NAME = 'DUPLICATE_NAME',
|
|
5
5
|
DUPLICATE_EMAIL = 'DUPLICATE_EMAIL',
|
|
6
6
|
DUPLICATE_PHONE = 'DUPLICATE_PHONE',
|
|
7
|
+
DUPLICATE_CODE = 'DUPLICATE_CODE',
|
|
8
|
+
DUPLICATE_TAX_ID = 'DUPLICATE_TAX_ID',
|
|
9
|
+
DUPLICATE_OGRN = 'DUPLICATE_OGRN',
|
|
7
10
|
NAME_ALREADY_EXISTS_IN_DB = 'NAME_ALREADY_EXISTS_IN_DB',
|
|
8
11
|
EMAIL_ALREADY_EXISTS_IN_DB = 'EMAIL_ALREADY_EXISTS_IN_DB',
|
|
9
12
|
PHONE_ALREADY_EXISTS_IN_DB = 'PHONE_ALREADY_EXISTS_IN_DB',
|
|
13
|
+
CODE_ALREADY_EXISTS_IN_DB = 'CODE_ALREADY_EXISTS_IN_DB',
|
|
14
|
+
TAX_ID_ALREADY_EXISTS_IN_DB = 'TAX_ID_ALREADY_EXISTS_IN_DB',
|
|
15
|
+
OGRN_ALREADY_EXISTS_IN_DB = 'OGRN_ALREADY_EXISTS_IN_DB',
|
|
10
16
|
}
|
package/enum/index.ts
CHANGED
|
@@ -45,6 +45,7 @@ export * from './write-off-status.enum';
|
|
|
45
45
|
export * from './position-report-type.enum';
|
|
46
46
|
export * from './discount-price-routing.enum';
|
|
47
47
|
export * from './sales-unit.enum';
|
|
48
|
+
export * from './sales-by-position-group-by.enum';
|
|
48
49
|
export * from './client-import-entity-property.enum';
|
|
49
50
|
export * from './client-import-errors.enum';
|
|
50
51
|
export * from './pre-order-collection-item-import-entity-property.enum';
|
|
@@ -80,3 +81,4 @@ export * from './account-deletion-request-source.enum';
|
|
|
80
81
|
export * from './bulk-create-product-image-alias-skip-reason.enum';
|
|
81
82
|
export * from './bulk-create-product-image-alias-from-pre-order-collection-item-skip-reason.enum';
|
|
82
83
|
export * from './moysklad-sync-status.enum';
|
|
84
|
+
export * from './legal-identifier-field.enum';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Legal-profile identifier fields that must be unique per company (FC-194).
|
|
2
|
+
// Values match the ClientLegalProfile field names exactly — they index domain objects and Prisma where filters.
|
|
3
|
+
export enum LegalIdentifierFieldEnum {
|
|
4
|
+
TAX_ID = 'taxId',
|
|
5
|
+
OGRN = 'ogrn',
|
|
6
|
+
OGRNIP = 'ogrnip',
|
|
7
|
+
EDO_ID = 'edoId',
|
|
8
|
+
}
|