@floristcloud/api-lib 1.2.56 → 1.2.58
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/transaction/import-transaction.command.js +32 -0
- package/build/commands/transaction/index.js +1 -0
- package/build/constant/error-i18n-key.js +3 -0
- package/build/constant/error.js +14 -0
- package/build/constant/import.constant.js +2 -1
- package/build/enum/client-import-errors.enum.js +6 -0
- package/build/enum/index.js +3 -0
- package/build/enum/legal-identifier-field.enum.js +12 -0
- package/build/enum/transaction-import-entity-property.enum.js +16 -0
- package/build/enum/transaction-import-errors.enum.js +13 -0
- package/commands/transaction/import-transaction.command.ts +38 -0
- package/commands/transaction/index.ts +1 -0
- package/constant/error-i18n-key.ts +3 -0
- package/constant/error.ts +14 -0
- package/constant/import.constant.ts +1 -0
- package/enum/client-import-errors.enum.ts +6 -0
- package/enum/index.ts +3 -0
- package/enum/legal-identifier-field.enum.ts +8 -0
- package/enum/transaction-import-entity-property.enum.ts +12 -0
- package/enum/transaction-import-errors.enum.ts +9 -0
- package/package.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImportTransactionContractCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const schemas_1 = require("../../schemas");
|
|
6
|
+
const enum_1 = require("../../enum");
|
|
7
|
+
const ImportTransactionRequestSchema = zod_1.z.object({});
|
|
8
|
+
const TransactionImportRowErrorSchema = zod_1.z.object({
|
|
9
|
+
row: zod_1.z.number(),
|
|
10
|
+
errors: zod_1.z.array(zod_1.z.object({
|
|
11
|
+
path: zod_1.z.nativeEnum(enum_1.TransactionImportEntityPropertyEnum).optional(),
|
|
12
|
+
type: zod_1.z.nativeEnum(enum_1.TransactionImportErrorsEnum),
|
|
13
|
+
})),
|
|
14
|
+
});
|
|
15
|
+
const TransactionImportCreatedRowSchema = zod_1.z.object({
|
|
16
|
+
row: zod_1.z.number(),
|
|
17
|
+
uuid: zod_1.z.string(),
|
|
18
|
+
});
|
|
19
|
+
const ImportTransactionResponseSchema = zod_1.z.object({
|
|
20
|
+
message: zod_1.z.string().optional(),
|
|
21
|
+
data: zod_1.z.object({
|
|
22
|
+
rows: zod_1.z.number(),
|
|
23
|
+
created: zod_1.z.array(TransactionImportCreatedRowSchema),
|
|
24
|
+
errors: zod_1.z.array(TransactionImportRowErrorSchema),
|
|
25
|
+
globalErrors: zod_1.z.array(schemas_1.ErrorMessageSchema).optional(),
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
var ImportTransactionContractCommand;
|
|
29
|
+
(function (ImportTransactionContractCommand) {
|
|
30
|
+
ImportTransactionContractCommand.RequestSchema = ImportTransactionRequestSchema;
|
|
31
|
+
ImportTransactionContractCommand.ResponseSchema = ImportTransactionResponseSchema;
|
|
32
|
+
})(ImportTransactionContractCommand || (exports.ImportTransactionContractCommand = ImportTransactionContractCommand = {}));
|
|
@@ -26,3 +26,4 @@ __exportStar(require("./update-transaction.command"), exports);
|
|
|
26
26
|
__exportStar(require("./get-transaction-summary.query"), exports);
|
|
27
27
|
__exportStar(require("./generate-pre-payment-check.command"), exports);
|
|
28
28
|
__exportStar(require("./apply-prepayment-transaction.command"), exports);
|
|
29
|
+
__exportStar(require("./import-transaction.command"), exports);
|
|
@@ -22,4 +22,7 @@ exports.ErrorI18nKey = {
|
|
|
22
22
|
clientImportTooManyRows: 'clientImport.tooManyRows',
|
|
23
23
|
clientImportInvalidFileFormat: 'clientImport.invalidFileFormat',
|
|
24
24
|
clientImportMissingRequiredColumns: 'clientImport.missingRequiredColumns',
|
|
25
|
+
transactionImportTooManyRows: 'transactionImport.tooManyRows',
|
|
26
|
+
transactionImportInvalidFileFormat: 'transactionImport.invalidFileFormat',
|
|
27
|
+
transactionImportMissingRequiredColumns: 'transactionImport.missingRequiredColumns',
|
|
25
28
|
};
|
package/build/constant/error.js
CHANGED
|
@@ -134,6 +134,12 @@ exports.ERRORS = {
|
|
|
134
134
|
CLIENT_EMAIL_ALREADY_EXIST: { code: 'CL007', message: 'Client with this email already exist', httpCode: 409 },
|
|
135
135
|
CLIENT_PHONE_ALREADY_EXIST: { code: 'CL008', message: 'Client with this phone already exist', httpCode: 409 },
|
|
136
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 },
|
|
137
143
|
CLIENT_NOT_REGISTERED: { code: 'CL010', message: 'Failed to register client', httpCode: 500 },
|
|
138
144
|
CLIENT_ORDER_COUNTS_FETCH_FAILED: {
|
|
139
145
|
code: 'CL011',
|
|
@@ -459,6 +465,14 @@ exports.ERRORS = {
|
|
|
459
465
|
TRANSACTION_NOT_APPLIED: { code: 'TR011', message: 'Transaction not applied', httpCode: 500 },
|
|
460
466
|
MONEY_ACCOUNT_REQUIRED: { code: 'TR012', message: 'moneyAccountUUID is required to apply bank payment event', httpCode: 400 },
|
|
461
467
|
TRANSACTION_CREATE_FAILED: { code: 'TR013', message: 'Failed to create transaction', httpCode: 500 },
|
|
468
|
+
TRANSACTION_IMPORT_FAILED: { code: 'TR014', message: 'Ошибка при импорте транзакций', httpCode: 400 },
|
|
469
|
+
TRANSACTION_IMPORT_TOO_MANY_ROWS: { code: 'TR015', message: 'Too many rows for transaction import', httpCode: 400 },
|
|
470
|
+
TRANSACTION_IMPORT_INVALID_FILE_FORMAT: { code: 'TR016', message: 'Invalid file format for transaction import', httpCode: 400 },
|
|
471
|
+
TRANSACTION_IMPORT_MISSING_REQUIRED_COLUMNS: {
|
|
472
|
+
code: 'TR017',
|
|
473
|
+
message: 'Missing required columns in transaction import file',
|
|
474
|
+
httpCode: 400,
|
|
475
|
+
},
|
|
462
476
|
// CLIENT_PAYMENT_IDENTIFIER
|
|
463
477
|
CLIENT_PAYMENT_IDENTIFIER_NOT_CREATED: { code: 'CPI001', message: 'Failed to create client payment identifier', httpCode: 500 },
|
|
464
478
|
CLIENT_PAYMENT_IDENTIFIER_NOT_DELETED: { code: 'CPI002', message: 'Failed to delete client payment identifier', httpCode: 500 },
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CONSIGNMENT_IMPORT_LIMITS = exports.CLIENT_IMPORT_MAX_ROWS = exports.SPREADSHEET_IMPORT_MAX_FILE_SIZE_BYTES = void 0;
|
|
3
|
+
exports.CONSIGNMENT_IMPORT_LIMITS = exports.TRANSACTION_IMPORT_MAX_ROWS = exports.CLIENT_IMPORT_MAX_ROWS = exports.SPREADSHEET_IMPORT_MAX_FILE_SIZE_BYTES = void 0;
|
|
4
4
|
exports.SPREADSHEET_IMPORT_MAX_FILE_SIZE_BYTES = 5 * 1024 * 1024;
|
|
5
5
|
exports.CLIENT_IMPORT_MAX_ROWS = 1000;
|
|
6
|
+
exports.TRANSACTION_IMPORT_MAX_ROWS = 1000;
|
|
6
7
|
exports.CONSIGNMENT_IMPORT_LIMITS = {
|
|
7
8
|
MAX_ROWS_WITHOUT_IMAGES: 1200,
|
|
8
9
|
MAX_ROWS_WITH_FIND_IMAGE: 500,
|
|
@@ -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
|
@@ -64,6 +64,8 @@ __exportStar(require("./sales-unit.enum"), exports);
|
|
|
64
64
|
__exportStar(require("./sales-by-position-group-by.enum"), exports);
|
|
65
65
|
__exportStar(require("./client-import-entity-property.enum"), exports);
|
|
66
66
|
__exportStar(require("./client-import-errors.enum"), exports);
|
|
67
|
+
__exportStar(require("./transaction-import-entity-property.enum"), exports);
|
|
68
|
+
__exportStar(require("./transaction-import-errors.enum"), exports);
|
|
67
69
|
__exportStar(require("./pre-order-collection-item-import-entity-property.enum"), exports);
|
|
68
70
|
__exportStar(require("./report-period-type.enum"), exports);
|
|
69
71
|
__exportStar(require("./inventory-movement-type.enum"), exports);
|
|
@@ -97,3 +99,4 @@ __exportStar(require("./account-deletion-request-source.enum"), exports);
|
|
|
97
99
|
__exportStar(require("./bulk-create-product-image-alias-skip-reason.enum"), exports);
|
|
98
100
|
__exportStar(require("./bulk-create-product-image-alias-from-pre-order-collection-item-skip-reason.enum"), exports);
|
|
99
101
|
__exportStar(require("./moysklad-sync-status.enum"), exports);
|
|
102
|
+
__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,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionImportEntityPropertyEnum = void 0;
|
|
4
|
+
var TransactionImportEntityPropertyEnum;
|
|
5
|
+
(function (TransactionImportEntityPropertyEnum) {
|
|
6
|
+
TransactionImportEntityPropertyEnum["CLIENT_NAME"] = "clientName";
|
|
7
|
+
TransactionImportEntityPropertyEnum["CLIENT_PHONE"] = "clientPhone";
|
|
8
|
+
TransactionImportEntityPropertyEnum["CLIENT_TAX_ID"] = "clientTaxId";
|
|
9
|
+
TransactionImportEntityPropertyEnum["CLIENT_EMAIL"] = "clientEmail";
|
|
10
|
+
TransactionImportEntityPropertyEnum["CLIENT_CODE"] = "clientCode";
|
|
11
|
+
TransactionImportEntityPropertyEnum["MONEY_ACCOUNT"] = "moneyAccount";
|
|
12
|
+
TransactionImportEntityPropertyEnum["AMOUNT"] = "amount";
|
|
13
|
+
TransactionImportEntityPropertyEnum["TYPE"] = "type";
|
|
14
|
+
TransactionImportEntityPropertyEnum["DATE"] = "date";
|
|
15
|
+
TransactionImportEntityPropertyEnum["COMMENT"] = "comment";
|
|
16
|
+
})(TransactionImportEntityPropertyEnum || (exports.TransactionImportEntityPropertyEnum = TransactionImportEntityPropertyEnum = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TransactionImportErrorsEnum = void 0;
|
|
4
|
+
var TransactionImportErrorsEnum;
|
|
5
|
+
(function (TransactionImportErrorsEnum) {
|
|
6
|
+
TransactionImportErrorsEnum["REQUIRED"] = "REQUIRED";
|
|
7
|
+
TransactionImportErrorsEnum["INVALID_VALUE"] = "INVALID_VALUE";
|
|
8
|
+
TransactionImportErrorsEnum["CLIENT_NOT_FOUND"] = "CLIENT_NOT_FOUND";
|
|
9
|
+
TransactionImportErrorsEnum["CLIENT_AMBIGUOUS"] = "CLIENT_AMBIGUOUS";
|
|
10
|
+
TransactionImportErrorsEnum["MONEY_ACCOUNT_NOT_FOUND"] = "MONEY_ACCOUNT_NOT_FOUND";
|
|
11
|
+
TransactionImportErrorsEnum["MONEY_ACCOUNT_AMBIGUOUS"] = "MONEY_ACCOUNT_AMBIGUOUS";
|
|
12
|
+
TransactionImportErrorsEnum["CREATE_FAILED"] = "CREATE_FAILED";
|
|
13
|
+
})(TransactionImportErrorsEnum || (exports.TransactionImportErrorsEnum = TransactionImportErrorsEnum = {}));
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ErrorMessageSchema } from '../../schemas';
|
|
3
|
+
import { TransactionImportEntityPropertyEnum, TransactionImportErrorsEnum } from '../../enum';
|
|
4
|
+
|
|
5
|
+
const ImportTransactionRequestSchema = z.object({});
|
|
6
|
+
|
|
7
|
+
const TransactionImportRowErrorSchema = z.object({
|
|
8
|
+
row: z.number(),
|
|
9
|
+
errors: z.array(
|
|
10
|
+
z.object({
|
|
11
|
+
path: z.nativeEnum(TransactionImportEntityPropertyEnum).optional(),
|
|
12
|
+
type: z.nativeEnum(TransactionImportErrorsEnum),
|
|
13
|
+
}),
|
|
14
|
+
),
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
const TransactionImportCreatedRowSchema = z.object({
|
|
18
|
+
row: z.number(),
|
|
19
|
+
uuid: z.string(),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const ImportTransactionResponseSchema = z.object({
|
|
23
|
+
message: z.string().optional(),
|
|
24
|
+
data: z.object({
|
|
25
|
+
rows: z.number(),
|
|
26
|
+
created: z.array(TransactionImportCreatedRowSchema),
|
|
27
|
+
errors: z.array(TransactionImportRowErrorSchema),
|
|
28
|
+
globalErrors: z.array(ErrorMessageSchema).optional(),
|
|
29
|
+
}),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export namespace ImportTransactionContractCommand {
|
|
33
|
+
export const RequestSchema = ImportTransactionRequestSchema;
|
|
34
|
+
export type Request = z.infer<typeof RequestSchema>;
|
|
35
|
+
|
|
36
|
+
export const ResponseSchema = ImportTransactionResponseSchema;
|
|
37
|
+
export type Response = z.infer<typeof ResponseSchema>;
|
|
38
|
+
}
|
|
@@ -19,6 +19,9 @@ export const ErrorI18nKey = {
|
|
|
19
19
|
clientImportTooManyRows: 'clientImport.tooManyRows',
|
|
20
20
|
clientImportInvalidFileFormat: 'clientImport.invalidFileFormat',
|
|
21
21
|
clientImportMissingRequiredColumns: 'clientImport.missingRequiredColumns',
|
|
22
|
+
transactionImportTooManyRows: 'transactionImport.tooManyRows',
|
|
23
|
+
transactionImportInvalidFileFormat: 'transactionImport.invalidFileFormat',
|
|
24
|
+
transactionImportMissingRequiredColumns: 'transactionImport.missingRequiredColumns',
|
|
22
25
|
} as const;
|
|
23
26
|
|
|
24
27
|
export type ErrorI18nKeyType = (typeof ErrorI18nKey)[keyof typeof ErrorI18nKey];
|
package/constant/error.ts
CHANGED
|
@@ -139,6 +139,12 @@ export const ERRORS = {
|
|
|
139
139
|
CLIENT_EMAIL_ALREADY_EXIST: { code: 'CL007', message: 'Client with this email already exist', httpCode: 409 },
|
|
140
140
|
CLIENT_PHONE_ALREADY_EXIST: { code: 'CL008', message: 'Client with this phone already exist', httpCode: 409 },
|
|
141
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 },
|
|
142
148
|
CLIENT_NOT_REGISTERED: { code: 'CL010', message: 'Failed to register client', httpCode: 500 },
|
|
143
149
|
CLIENT_ORDER_COUNTS_FETCH_FAILED: {
|
|
144
150
|
code: 'CL011',
|
|
@@ -476,6 +482,14 @@ export const ERRORS = {
|
|
|
476
482
|
TRANSACTION_NOT_APPLIED: { code: 'TR011', message: 'Transaction not applied', httpCode: 500 },
|
|
477
483
|
MONEY_ACCOUNT_REQUIRED: { code: 'TR012', message: 'moneyAccountUUID is required to apply bank payment event', httpCode: 400 },
|
|
478
484
|
TRANSACTION_CREATE_FAILED: { code: 'TR013', message: 'Failed to create transaction', httpCode: 500 },
|
|
485
|
+
TRANSACTION_IMPORT_FAILED: { code: 'TR014', message: 'Ошибка при импорте транзакций', httpCode: 400 },
|
|
486
|
+
TRANSACTION_IMPORT_TOO_MANY_ROWS: { code: 'TR015', message: 'Too many rows for transaction import', httpCode: 400 },
|
|
487
|
+
TRANSACTION_IMPORT_INVALID_FILE_FORMAT: { code: 'TR016', message: 'Invalid file format for transaction import', httpCode: 400 },
|
|
488
|
+
TRANSACTION_IMPORT_MISSING_REQUIRED_COLUMNS: {
|
|
489
|
+
code: 'TR017',
|
|
490
|
+
message: 'Missing required columns in transaction import file',
|
|
491
|
+
httpCode: 400,
|
|
492
|
+
},
|
|
479
493
|
|
|
480
494
|
// CLIENT_PAYMENT_IDENTIFIER
|
|
481
495
|
CLIENT_PAYMENT_IDENTIFIER_NOT_CREATED: { code: 'CPI001', message: 'Failed to create client payment identifier', httpCode: 500 },
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export const SPREADSHEET_IMPORT_MAX_FILE_SIZE_BYTES = 5 * 1024 * 1024;
|
|
2
2
|
export const CLIENT_IMPORT_MAX_ROWS = 1000;
|
|
3
|
+
export const TRANSACTION_IMPORT_MAX_ROWS = 1000;
|
|
3
4
|
export const CONSIGNMENT_IMPORT_LIMITS = {
|
|
4
5
|
MAX_ROWS_WITHOUT_IMAGES: 1200,
|
|
5
6
|
MAX_ROWS_WITH_FIND_IMAGE: 500,
|
|
@@ -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
|
@@ -48,6 +48,8 @@ export * from './sales-unit.enum';
|
|
|
48
48
|
export * from './sales-by-position-group-by.enum';
|
|
49
49
|
export * from './client-import-entity-property.enum';
|
|
50
50
|
export * from './client-import-errors.enum';
|
|
51
|
+
export * from './transaction-import-entity-property.enum';
|
|
52
|
+
export * from './transaction-import-errors.enum';
|
|
51
53
|
export * from './pre-order-collection-item-import-entity-property.enum';
|
|
52
54
|
export * from './report-period-type.enum';
|
|
53
55
|
export * from './inventory-movement-type.enum';
|
|
@@ -81,3 +83,4 @@ export * from './account-deletion-request-source.enum';
|
|
|
81
83
|
export * from './bulk-create-product-image-alias-skip-reason.enum';
|
|
82
84
|
export * from './bulk-create-product-image-alias-from-pre-order-collection-item-skip-reason.enum';
|
|
83
85
|
export * from './moysklad-sync-status.enum';
|
|
86
|
+
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
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export enum TransactionImportEntityPropertyEnum {
|
|
2
|
+
CLIENT_NAME = 'clientName',
|
|
3
|
+
CLIENT_PHONE = 'clientPhone',
|
|
4
|
+
CLIENT_TAX_ID = 'clientTaxId',
|
|
5
|
+
CLIENT_EMAIL = 'clientEmail',
|
|
6
|
+
CLIENT_CODE = 'clientCode',
|
|
7
|
+
MONEY_ACCOUNT = 'moneyAccount',
|
|
8
|
+
AMOUNT = 'amount',
|
|
9
|
+
TYPE = 'type',
|
|
10
|
+
DATE = 'date',
|
|
11
|
+
COMMENT = 'comment',
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export enum TransactionImportErrorsEnum {
|
|
2
|
+
REQUIRED = 'REQUIRED',
|
|
3
|
+
INVALID_VALUE = 'INVALID_VALUE',
|
|
4
|
+
CLIENT_NOT_FOUND = 'CLIENT_NOT_FOUND',
|
|
5
|
+
CLIENT_AMBIGUOUS = 'CLIENT_AMBIGUOUS',
|
|
6
|
+
MONEY_ACCOUNT_NOT_FOUND = 'MONEY_ACCOUNT_NOT_FOUND',
|
|
7
|
+
MONEY_ACCOUNT_AMBIGUOUS = 'MONEY_ACCOUNT_AMBIGUOUS',
|
|
8
|
+
CREATE_FAILED = 'CREATE_FAILED',
|
|
9
|
+
}
|