@floristcloud/api-lib 1.2.56 → 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/constant/error.js +6 -0
- package/build/enum/client-import-errors.enum.js +6 -0
- package/build/enum/index.js +1 -0
- package/build/enum/legal-identifier-field.enum.js +12 -0
- package/constant/error.ts +6 -0
- package/enum/client-import-errors.enum.ts +6 -0
- package/enum/index.ts +1 -0
- package/enum/legal-identifier-field.enum.ts +8 -0
- package/package.json +1 -1
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',
|
|
@@ -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
|
@@ -97,3 +97,4 @@ __exportStar(require("./account-deletion-request-source.enum"), exports);
|
|
|
97
97
|
__exportStar(require("./bulk-create-product-image-alias-skip-reason.enum"), exports);
|
|
98
98
|
__exportStar(require("./bulk-create-product-image-alias-from-pre-order-collection-item-skip-reason.enum"), exports);
|
|
99
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 = {}));
|
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',
|
|
@@ -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
|
@@ -81,3 +81,4 @@ export * from './account-deletion-request-source.enum';
|
|
|
81
81
|
export * from './bulk-create-product-image-alias-skip-reason.enum';
|
|
82
82
|
export * from './bulk-create-product-image-alias-from-pre-order-collection-item-skip-reason.enum';
|
|
83
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
|
+
}
|