From 1a9df34e240b9bd8278a9f5d57c9e1e95b5d1809 Mon Sep 17 00:00:00 2001 From: YEgorLu <99907142+YEgorLu@users.noreply.github.com> Date: Wed, 2 Oct 2024 21:11:38 +0500 Subject: [PATCH] fix(global): DOMA-10345 format eror translations (#5305) * fix(condorb): DOMA-10345 format errors * fix(dev-api): DOMA-10345 format errors * fix(condorb): DOMA-10345 format errors * fix(eps): DOMA-10345 format errors * fix(pass): DOMA-10345 format errors * test(pass): fix wrong error message interpolation * test(condo): fix wrong error message translation key * fix(condo): fix message interpolation in test --- .../domains/acquiring/constants/errors.js | 4 +- .../schema/CreatePaymentByLinkService.js | 2 +- .../domains/acquiring/schema/MultiPayment.js | 2 +- .../acquiring/schema/MultiPayment.test.js | 2 +- .../schema/RegisterMultiPaymentService.js | 2 +- .../RegisterMultiPaymentService.test.js | 2 +- .../schema/GetOverviewDashboardService.js | 2 +- apps/condo/domains/banking/constants.js | 6 +- .../domains/banking/schema/BankSyncTask.js | 6 +- .../billing/schema/ValidateQRCodeService.js | 2 +- apps/condo/domains/contact/schema/Contact.js | 4 +- .../domains/marketplace/schema/Invoice.js | 20 +- .../marketplace/schema/Invoice.test.js | 20 +- .../marketplace/schema/MarketCategory.js | 4 +- .../marketplace/schema/MarketItemPrice.js | 6 +- .../marketplace/schema/MarketPriceScope.js | 2 +- apps/condo/domains/meter/schema/Meter.js | 38 ++-- apps/condo/domains/meter/schema/Meter.test.js | 29 ++- .../domains/meter/schema/MeterReading.js | 44 +++-- .../domains/meter/schema/MeterReading.test.js | 18 +- .../meter/schema/MeterReportingPeriod.js | 8 +- .../meter/schema/PropertyMeterReading.js | 4 +- .../meter/schema/PropertyMeterReading.test.js | 14 +- .../schema/RegisterMetersReadingsService.js | 54 ++++-- .../RegisterMetersReadingsService.test.js | 2 +- .../domains/meter/schema/fields/index.js | 10 +- .../utils/taskSchema/importerResolver.js | 2 +- .../domains/miniapp/schema/B2BAppRole.js | 2 +- .../schema/GetNewsSharingRecipientsService.js | 6 +- apps/condo/domains/news/schema/NewsItem.js | 16 +- .../domains/news/schema/NewsItem.test.js | 16 +- .../schema/NewsItemRecipientsExportTask.js | 4 +- .../NewsItemRecipientsExportTask.test.js | 2 +- .../domains/news/schema/NewsItemScope.js | 4 +- .../domains/news/schema/NewsItemScope.test.js | 4 +- .../domains/onboarding/constants/errors.js | 2 +- .../EmployeeRoleForm/BaseEmployeeRoleForm.tsx | 2 +- .../schema/OrganizationEmployee.js | 6 +- .../schema/OrganizationEmployee.test.js | 4 +- .../schema/OrganizationEmployeeRole.js | 6 +- .../ReplaceOrganizationEmployeeRoleService.js | 12 +- .../condo/domains/property/schema/Property.js | 13 +- .../schema/RegisterResidentInvoiceService.js | 20 +- .../RegisterResidentInvoiceService.test.js | 12 +- ...sterResidentServiceConsumerService.test.js | 4 +- .../schema/RegisterServiceConsumerService.js | 4 +- .../ExportPropertyScopeToExcelService.js | 2 +- .../domains/scope/schema/PropertyScope.js | 2 +- .../settings/schema/MobileFeatureConfig.js | 6 +- apps/condo/domains/ticket/constants/errors.js | 4 +- apps/condo/domains/ticket/schema/Incident.js | 4 +- .../ticket/schema/IncidentExportTask.js | 4 +- .../PredictTicketClassificationService.js | 6 +- apps/condo/domains/ticket/schema/Ticket.js | 8 +- .../ticket/schema/TicketAutoAssignment.js | 4 +- .../schema/TicketDocumentGenerationTask.js | 4 +- .../schema/GetAccessTokenByUserIdService.js | 6 +- apps/condo/lang/en/en.json | 182 +++++++++--------- apps/condo/lang/ru/ru.json | 182 +++++++++--------- apps/condo/schema.graphql | 26 +-- apps/condo/schema.ts | 26 +-- apps/condorb | 2 +- apps/dev-api/domains/common/utils/files.js | 2 +- .../domains/common/utils/serverClients.js | 2 +- .../domains/miniapp/schema/B2CAppBuild.js | 2 +- .../miniapp/schema/CreateOIDCClientService.js | 2 +- .../schema/GenerateOIDCClientSecretService.js | 2 +- .../miniapp/schema/PublishB2CAppService.js | 10 +- .../schema/RegisterAppServiceUserService.js | 8 +- .../schema/UpdateOIDCClientUrlService.js | 6 +- .../utils/serverSchema/findCondoApp.js | 2 +- ...enticateUserWithPhoneAndPasswordService.js | 4 +- .../user/schema/ConfirmEmailActionService.js | 10 +- .../user/schema/ConfirmPhoneActionService.js | 8 +- .../user/schema/RegisterNewUserService.js | 4 +- apps/dev-api/domains/user/schema/User.js | 4 +- apps/dev-api/lang/en.json | 54 +++--- apps/dev-api/lang/ru.json | 54 +++--- apps/pass | 2 +- 79 files changed, 566 insertions(+), 526 deletions(-) diff --git a/apps/condo/domains/acquiring/constants/errors.js b/apps/condo/domains/acquiring/constants/errors.js index 37df9bcd169..ecfb3c8c3d0 100644 --- a/apps/condo/domains/acquiring/constants/errors.js +++ b/apps/condo/domains/acquiring/constants/errors.js @@ -110,13 +110,13 @@ const GQL_ERRORS = { code: BAD_USER_INPUT, type: WRONG_VALUE, message: 'Payment amount is less than the minimum amount from acquiring integration', - messageForUser: 'api.acquiring.payment.error.paymentAmountLessThanMinimum', + messageForUser: 'api.acquiring.payment.PAYMENT_AMOUNT_LESS_THAN_MINIMUM', }, PAYMENT_AMOUNT_GREATER_THAN_MAXIMUM: { code: BAD_USER_INPUT, type: WRONG_VALUE, message: 'Payment amount is greater than the maximum amount from acquiring integration', - messageForUser: 'api.acquiring.payment.error.paymentAmountGreaterThanMaximum', + messageForUser: 'api.acquiring.payment.PAYMENT_AMOUNT_GREATER_THAN_MAXIMUM', }, MORE_THAN_ONE_ACQUIRING_CONTEXTS: { code: BAD_USER_INPUT, diff --git a/apps/condo/domains/acquiring/schema/CreatePaymentByLinkService.js b/apps/condo/domains/acquiring/schema/CreatePaymentByLinkService.js index 8aec057958c..1deffab7c34 100644 --- a/apps/condo/domains/acquiring/schema/CreatePaymentByLinkService.js +++ b/apps/condo/domains/acquiring/schema/CreatePaymentByLinkService.js @@ -36,7 +36,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: ALREADY_EXISTS_ERROR, message: 'Provided receipt already paid', - messageForUser: 'api.billing.error.alreadyPaid', + messageForUser: 'api.billing.billingReceipt.RECEIPT_ALREADY_PAID_ERROR', }, } diff --git a/apps/condo/domains/acquiring/schema/MultiPayment.js b/apps/condo/domains/acquiring/schema/MultiPayment.js index b0216a66763..fcb98ea9ee4 100644 --- a/apps/condo/domains/acquiring/schema/MultiPayment.js +++ b/apps/condo/domains/acquiring/schema/MultiPayment.js @@ -67,7 +67,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: MULTIPAYMENT_RECEIPTS_WITH_INVOICES_FORBIDDEN, message: 'Receipts and invoices are forbidden to be together', - messageForUser: 'api.acquiring.multiPayment.error.receiptsWithInvoices', + messageForUser: 'api.acquiring.multiPayment.RECEIPTS_WITH_INVOICES_FORBIDDEN', }, } diff --git a/apps/condo/domains/acquiring/schema/MultiPayment.test.js b/apps/condo/domains/acquiring/schema/MultiPayment.test.js index e14f9449bfc..9d57792661a 100644 --- a/apps/condo/domains/acquiring/schema/MultiPayment.test.js +++ b/apps/condo/domains/acquiring/schema/MultiPayment.test.js @@ -409,7 +409,7 @@ describe('MultiPayment', () => { code: 'BAD_USER_INPUT', type: 'MULTIPAYMENT_RECEIPTS_WITH_INVOICES_FORBIDDEN', message: 'Receipts and invoices are forbidden to be together', - messageForUser: 'api.acquiring.multiPayment.error.receiptsWithInvoices', + messageForUser: 'api.acquiring.multiPayment.RECEIPTS_WITH_INVOICES_FORBIDDEN', }) }) }) diff --git a/apps/condo/domains/acquiring/schema/RegisterMultiPaymentService.js b/apps/condo/domains/acquiring/schema/RegisterMultiPaymentService.js index 106e91f11f4..af0032f105f 100644 --- a/apps/condo/domains/acquiring/schema/RegisterMultiPaymentService.js +++ b/apps/condo/domains/acquiring/schema/RegisterMultiPaymentService.js @@ -277,7 +277,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: MULTIPAYMENT_RECEIPTS_WITH_INVOICES_FORBIDDEN, message: 'Receipts and invoices are forbidden to be together', - messageForUser: 'api.acquiring.multiPayment.error.receiptsWithInvoices', + messageForUser: 'api.acquiring.multiPayment.RECEIPTS_WITH_INVOICES_FORBIDDEN', }, } diff --git a/apps/condo/domains/acquiring/schema/RegisterMultiPaymentService.test.js b/apps/condo/domains/acquiring/schema/RegisterMultiPaymentService.test.js index 951a57d74b6..07459e90481 100644 --- a/apps/condo/domains/acquiring/schema/RegisterMultiPaymentService.test.js +++ b/apps/condo/domains/acquiring/schema/RegisterMultiPaymentService.test.js @@ -377,7 +377,7 @@ describe('RegisterMultiPaymentService', () => { code: 'BAD_USER_INPUT', type: 'MULTIPAYMENT_RECEIPTS_WITH_INVOICES_FORBIDDEN', message: 'Receipts and invoices are forbidden to be together', - messageForUser: 'api.acquiring.multiPayment.error.receiptsWithInvoices', + messageForUser: 'api.acquiring.multiPayment.RECEIPTS_WITH_INVOICES_FORBIDDEN', }, 'result') }) }) diff --git a/apps/condo/domains/analytics/schema/GetOverviewDashboardService.js b/apps/condo/domains/analytics/schema/GetOverviewDashboardService.js index b5537a4ea29..e0551b51c96 100644 --- a/apps/condo/domains/analytics/schema/GetOverviewDashboardService.js +++ b/apps/condo/domains/analytics/schema/GetOverviewDashboardService.js @@ -28,7 +28,7 @@ const ERRORS = { code: FORBIDDEN, type: OPERATION_FORBIDDEN, message: 'Your organization do not have access to this feature', - messageForUser: 'api.analytics.overviewDashboard.FEATURE_IS_DISABLED', + messageForUser: 'api.analytics.getOverviewDashboard.FEATURE_IS_DISABLED', }, } diff --git a/apps/condo/domains/banking/constants.js b/apps/condo/domains/banking/constants.js index f752abf88cd..d58d31390d2 100644 --- a/apps/condo/domains/banking/constants.js +++ b/apps/condo/domains/banking/constants.js @@ -31,15 +31,15 @@ const INCORRECT_PROPERTY_ID = 'INCORRECT_PROPERTY_ID' const EMPTY_BANK_ACCOUNT_REQUEST_EMAIL_TARGET_VALUE = 'EMPTY_BANK_ACCOUNT_REQUEST_EMAIL_TARGET_VALUE' const WRONG_INTEGRATION = { message: 'BankAccount connected to another integration', - messageForUser: 'api.banking.BankSyncTask.WRONG_INTEGRATION', + messageForUser: 'api.banking.bankSyncTask.WRONG_INTEGRATION', } const INVALID_DATE = { message: 'Invalid options.dateTo or options.DateFrom', - messageForUser: 'api.banking.BankSyncTask.INVALID_DATE', + messageForUser: 'api.banking.bankSyncTask.INVALID_DATE', } const TRANSACTIONS_NOT_ADDED = { message: 'Transactions not added to BankAccount', - messageForUser: 'api.banking.BankSyncTask.TRANSACTIONS_NOT_ADDED', + messageForUser: 'api.banking.bankSyncTask.TRANSACTIONS_NOT_ADDED', } const CLASSIFICATION_CODE_IS_INVALID = 'CLASSIFICATION_CODE_IS_INVALID' diff --git a/apps/condo/domains/banking/schema/BankSyncTask.js b/apps/condo/domains/banking/schema/BankSyncTask.js index e3861762e6e..01c7f3073a8 100644 --- a/apps/condo/domains/banking/schema/BankSyncTask.js +++ b/apps/condo/domains/banking/schema/BankSyncTask.js @@ -34,19 +34,19 @@ const errors = { code: BAD_USER_INPUT, type: 'ACCOUNT_IS_REQUIRED', message: 'The "account" field is required to request transactions from SBBOL', - messageForUser: 'api.banking.BankSyncTask.ACCOUNT_IS_REQUIRED', + messageForUser: 'api.banking.bankSyncTask.ACCOUNT_IS_REQUIRED', }, INCORRECT_DATE_INTERVAL: { code: BAD_USER_INPUT, type: 'INCORRECT_DATE_INTERVAL', message: 'dateTo cannot be later than dateFrom', - messageForUser: 'api.banking.BankSyncTask.INCORRECT_DATE_INTERVAL', + messageForUser: 'api.banking.bankSyncTask.INCORRECT_DATE_INTERVAL', }, DISABLED_BANK_INTEGRATION_ORGANIZATION_CONTEXT: { code: BAD_USER_INPUT, type: 'DISABLED_BANK_INTEGRATION_ORGANIZATION_CONTEXT', message: 'Disabled BankIntegrationContext for current organization does not allow to execute data synchronization operations', - messageForUser: 'api.banking.BankSyncTask.DISABLED_BANK_INTEGRATION_ORGANIZATION_CONTEXT', + messageForUser: 'api.banking.bankSyncTask.DISABLED_BANK_INTEGRATION_ORGANIZATION_CONTEXT', }, } diff --git a/apps/condo/domains/billing/schema/ValidateQRCodeService.js b/apps/condo/domains/billing/schema/ValidateQRCodeService.js index b57ead1c21b..673a99cb285 100644 --- a/apps/condo/domains/billing/schema/ValidateQRCodeService.js +++ b/apps/condo/domains/billing/schema/ValidateQRCodeService.js @@ -69,7 +69,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: ALREADY_EXISTS_ERROR, message: 'Provided receipt already paid', - messageForUser: 'api.billing.error.alreadyPaid', + messageForUser: 'api.billing.billingReceipt.RECEIPT_ALREADY_PAID_ERROR', }, INVALID_QR_CODE_STRING: { mutation: 'validateQRCode', diff --git a/apps/condo/domains/contact/schema/Contact.js b/apps/condo/domains/contact/schema/Contact.js index af8c8a26a48..86d3e63bc3b 100644 --- a/apps/condo/domains/contact/schema/Contact.js +++ b/apps/condo/domains/contact/schema/Contact.js @@ -27,14 +27,14 @@ const ERRORS = { code: BAD_USER_INPUT, type: UNABLE_TO_CREATE_CONTACT_DUPLICATE, message: 'Cannot create contact, because another contact with the same provided set of "property", "unitName", "phone"', - messageForUser: 'api.contact.CONTACT_DUPLICATE_ERROR', + messageForUser: 'api.contact.contact.CONTACT_DUPLICATE_ERROR', }, UNABLE_TO_UPDATE_CONTACT_DUPLICATE: { mutation: 'signinResidentUser', code: BAD_USER_INPUT, type: UNABLE_TO_UPDATE_CONTACT_DUPLICATE, message: 'Cannot update contact, because another contact with the same provided set of "property", "unitName", "phone"', - messageForUser: 'api.contact.CONTACT_DUPLICATE_ERROR', + messageForUser: 'api.contact.contact.CONTACT_DUPLICATE_ERROR', }, } diff --git a/apps/condo/domains/marketplace/schema/Invoice.js b/apps/condo/domains/marketplace/schema/Invoice.js index 5550fe42cd4..240e38d518c 100644 --- a/apps/condo/domains/marketplace/schema/Invoice.js +++ b/apps/condo/domains/marketplace/schema/Invoice.js @@ -166,63 +166,63 @@ const ERRORS = { code: BAD_USER_INPUT, type: ERROR_INVOICE_ALREADY_PAID, message: 'Changing of paid invoice is forbidden', - messageForUser: 'api.marketplace.invoice.error.alreadyPaid', + messageForUser: 'api.marketplace.invoice.ALREADY_PAID', }, ALREADY_CANCELED: { code: BAD_USER_INPUT, type: ERROR_INVOICE_ALREADY_CANCELED, message: 'Changing of canceled invoice is forbidden', - messageForUser: 'api.marketplace.invoice.error.alreadyCanceled', + messageForUser: 'api.marketplace.invoice.ALREADY_CANCELED', }, EMPTY_ROWS: { code: BAD_USER_INPUT, type: ERROR_INVOICE_EMPTY_ROWS, message: 'The invoice contains no rows', - messageForUser: 'api.marketplace.invoice.error.emptyRows', + messageForUser: 'api.marketplace.invoice.EMPTY_ROWS', }, WRONG_COUNT: (rowNumber) => ({ code: BAD_USER_INPUT, type: ERROR_INVOICE_ROW_WRONG_COUNT, message: `Count at line ${rowNumber} can't be less than 1`, - messageForUser: 'api.marketplace.invoice.error.rows.count', + messageForUser: 'api.marketplace.invoice.WRONG_COUNT', messageInterpolation: { rowNumber }, }), WRONG_PRICE: (rowNumber) => ({ code: BAD_USER_INPUT, type: ERROR_INVOICE_ROW_WRONG_PRICE, message: `Price at line ${rowNumber} can't be less than 0`, - messageForUser: 'api.marketplace.invoice.error.rows.toPay', + messageForUser: 'api.marketplace.invoice.WRONG_PRICE', messageInterpolation: { rowNumber }, }), NO_FINISHED_ACQUIRING_CONTEXT: { code: BAD_USER_INPUT, type: ERROR_NO_FINISHED_ACQUIRING_CONTEXT, message: 'The organization has no AcquiringIntegrationContext in finished status for invoices', - messageForUser: 'api.marketplace.invoice.error.NoFinishedAcquiringContext', + messageForUser: 'api.marketplace.invoice.NO_FINISHED_ACQUIRING_CONTEXT', }, FORBID_EDIT_PUBLISHED: { code: BAD_USER_INPUT, type: ERROR_FORBID_EDIT_PUBLISHED, message: `Only the status ${INVOICE_STATUS_CANCELED} and ${INVOICE_STATUS_PAID} can be updated by the published invoice`, - messageForUser: 'api.marketplace.invoice.error.editPublishedForbidden', + messageForUser: 'api.marketplace.invoice.FORBID_EDIT_PUBLISHED', }, CLIENT_DATA_DOES_NOT_MATCH_TICKET: { code: BAD_USER_INPUT, type: ERROR_CLIENT_DATA_DOES_NOT_MATCH_TICKET, message: `Fields ${CLIENT_DATA_FIELDS.join(', ')} must match same fields in connected ticket`, - messageForUser: 'api.marketplace.invoice.error.clientDataDoesNotMatchTicket', + messageForUser: 'api.marketplace.invoice.CLIENT_DATA_DOES_NOT_MATCH_TICKET', }, FORBID_UPDATE_TICKET: { code: BAD_USER_INPUT, type: ERROR_FORBID_UPDATE_TICKET, message: 'You cannot update ticket in invoice that is already linked to the ticket', - messageForUser: 'api.marketplace.invoice.error.forbidUpdateTicket', + messageForUser: 'api.marketplace.invoice.FORBID_UPDATE_TICKET', }, PUBLISHING_WITHOUT_DEFINED_PRICES_FORBIDDEN: { code: BAD_USER_INPUT, type: ERROR_PUBLISHING_WITHOUT_DEFINED_PRICES_FORBIDDEN, message: 'Can\'t publish invoice without defined prices', - messageForUser: 'api.marketplace.invoice.error.PublishingWithoutDefinedPricesForbidden', + messageForUser: 'api.marketplace.invoice.PUBLISHING_WITHOUT_DEFINED_PRICES_FORBIDDEN', }, } diff --git a/apps/condo/domains/marketplace/schema/Invoice.test.js b/apps/condo/domains/marketplace/schema/Invoice.test.js index 2a1cd0c892c..4dce52c7097 100644 --- a/apps/condo/domains/marketplace/schema/Invoice.test.js +++ b/apps/condo/domains/marketplace/schema/Invoice.test.js @@ -1481,7 +1481,7 @@ describe('Invoice', () => { code: 'BAD_USER_INPUT', type: 'INVOICE_ALREADY_PAID', message: 'Changing of paid invoice is forbidden', - messageForUser: 'api.marketplace.invoice.error.alreadyPaid', + messageForUser: 'api.marketplace.invoice.ALREADY_PAID', }) }) @@ -1506,7 +1506,7 @@ describe('Invoice', () => { code: 'BAD_USER_INPUT', type: 'INVOICE_ALREADY_CANCELED', message: 'Changing of canceled invoice is forbidden', - messageForUser: 'api.marketplace.invoice.error.alreadyCanceled', + messageForUser: 'api.marketplace.invoice.ALREADY_CANCELED', }) }) @@ -1519,7 +1519,7 @@ describe('Invoice', () => { code: 'BAD_USER_INPUT', type: 'EMPTY_ROWS', message: 'The invoice contains no rows', - messageForUser: 'api.marketplace.invoice.error.emptyRows', + messageForUser: 'api.marketplace.invoice.EMPTY_ROWS', }) }) @@ -1556,7 +1556,7 @@ describe('Invoice', () => { code: 'BAD_USER_INPUT', type: 'WRONG_COUNT', message: 'Count at line 2 can\'t be less than 1', - messageForUser: 'api.marketplace.invoice.error.rows.count', + messageForUser: 'api.marketplace.invoice.WRONG_COUNT', messageInterpolation: { rowNumber: 2 }, }) }) @@ -1568,7 +1568,7 @@ describe('Invoice', () => { code: 'BAD_USER_INPUT', type: 'WRONG_PRICE', message: 'Price at line 1 can\'t be less than 0', - messageForUser: 'api.marketplace.invoice.error.rows.toPay', + messageForUser: 'api.marketplace.invoice.WRONG_PRICE', messageInterpolation: { rowNumber: 1 }, }) }) @@ -1584,7 +1584,7 @@ describe('Invoice', () => { code: 'BAD_USER_INPUT', type: 'NO_FINISHED_ACQUIRING_CONTEXT', message: 'The organization has no AcquiringIntegrationContext in finished status for invoices', - messageForUser: 'api.marketplace.invoice.error.NoFinishedAcquiringContext', + messageForUser: 'api.marketplace.invoice.NO_FINISHED_ACQUIRING_CONTEXT', }) }) @@ -1606,7 +1606,7 @@ describe('Invoice', () => { code: 'BAD_USER_INPUT', type: 'FORBID_EDIT_PUBLISHED', message: `Only the status ${INVOICE_STATUS_CANCELED} and ${INVOICE_STATUS_PAID} can be updated by the published invoice`, - messageForUser: 'api.marketplace.invoice.error.editPublishedForbidden', + messageForUser: 'api.marketplace.invoice.FORBID_EDIT_PUBLISHED', }) }) @@ -1684,7 +1684,7 @@ describe('Invoice', () => { code: 'BAD_USER_INPUT', type: 'FORBID_UPDATE_TICKET', message: 'You cannot update ticket in invoice that is already linked to the ticket', - messageForUser: 'api.marketplace.invoice.error.forbidUpdateTicket', + messageForUser: 'api.marketplace.invoice.FORBID_UPDATE_TICKET', }) }) @@ -1705,7 +1705,7 @@ describe('Invoice', () => { code: 'BAD_USER_INPUT', type: 'CLIENT_DATA_DOES_NOT_MATCH_TICKET', message: `Fields ${CLIENT_DATA_FIELDS.join(', ')} must match same fields in connected ticket`, - messageForUser: 'api.marketplace.invoice.error.clientDataDoesNotMatchTicket', + messageForUser: 'api.marketplace.invoice.CLIENT_DATA_DOES_NOT_MATCH_TICKET', }) }) @@ -1794,7 +1794,7 @@ describe('Invoice', () => { code: 'BAD_USER_INPUT', type: 'PUBLISHING_WITHOUT_DEFINED_PRICES_FORBIDDEN', message: 'Can\'t publish invoice without defined prices', - messageForUser: 'api.marketplace.invoice.error.PublishingWithoutDefinedPricesForbidden', + messageForUser: 'api.marketplace.invoice.PUBLISHING_WITHOUT_DEFINED_PRICES_FORBIDDEN', }) }) diff --git a/apps/condo/domains/marketplace/schema/MarketCategory.js b/apps/condo/domains/marketplace/schema/MarketCategory.js index 5fb86172733..8f6955cae64 100644 --- a/apps/condo/domains/marketplace/schema/MarketCategory.js +++ b/apps/condo/domains/marketplace/schema/MarketCategory.js @@ -17,13 +17,13 @@ const ERRORS = { code: BAD_USER_INPUT, type: 'MAXIMUM_DEPTH_REACHED', message: 'The depth of category inheritance should be no more than 2', - messageForUser: 'api.marketplace.MarketCategory.MAXIMUM_DEPTH_REACHED', + messageForUser: 'api.marketplace.marketCategory.MAXIMUM_DEPTH_REACHED', }, CANNOT_CONNECT_TO_ITSELF: { code: BAD_USER_INPUT, type: 'CANNOT_CONNECT_TO_ITSELF', message: 'Cannot connect to itself', - messageForUser: 'api.marketplace.MarketCategory.CANNOT_CONNECT_TO_ITSELF', + messageForUser: 'api.marketplace.marketCategory.CANNOT_CONNECT_TO_ITSELF', }, } diff --git a/apps/condo/domains/marketplace/schema/MarketItemPrice.js b/apps/condo/domains/marketplace/schema/MarketItemPrice.js index 0ab8cb24972..82cf73e318f 100644 --- a/apps/condo/domains/marketplace/schema/MarketItemPrice.js +++ b/apps/condo/domains/marketplace/schema/MarketItemPrice.js @@ -18,21 +18,21 @@ const ERRORS = { INVALID_SALES_TAX_PERCENT: (rowNumber) => ({ code: BAD_USER_INPUT, type: 'INVALID_SALES_TAX_PERCENT', - messageForUser: 'api.marketplace.MarketItemPrice.error.INVALID_SALES_TAX_PERCENT', + messageForUser: 'api.marketplace.marketItemPrice.INVALID_SALES_TAX_PERCENT', messageInterpolation: { rowNumber }, message: `Invalid sales tax percent on line ${rowNumber}. Must be greater or equal to 0 and less or equal to 100.`, }), INVALID_PRICE: (rowNumber) => ({ code: BAD_USER_INPUT, type: 'INVALID_PRICE', - messageForUser: 'api.marketplace.MarketItemPrice.error.INVALID_PRICE', + messageForUser: 'api.marketplace.marketItemPrice.INVALID_PRICE', messageInterpolation: { rowNumber }, message: `Invalid price on line ${rowNumber}. Must be greater or equal to 0.`, }), EMPTY_PRICE: { code: BAD_USER_INPUT, type: 'EMPTY_PRICE', - messageForUser: 'api.marketplace.MarketItemPrice.error.EMPTY_PRICE', + messageForUser: 'api.marketplace.marketItemPrice.EMPTY_PRICE', message: 'Price cannot be empty.', }, } diff --git a/apps/condo/domains/marketplace/schema/MarketPriceScope.js b/apps/condo/domains/marketplace/schema/MarketPriceScope.js index 108ffcd8cca..cc1ffa9b7bc 100644 --- a/apps/condo/domains/marketplace/schema/MarketPriceScope.js +++ b/apps/condo/domains/marketplace/schema/MarketPriceScope.js @@ -21,7 +21,7 @@ const ERRORS = { ORGANIZATION_IN_PROPERTY_AND_MARKET_ITEM_PRICE_NOT_MATCHED: { code: BAD_USER_INPUT, type: 'ORGANIZATION_IN_PROPERTY_AND_MARKET_ITEM_PRICE_NOT_MATCHED', - messageForUser: 'api.marketplace.MarketItemPrice.error.ORGANIZATION_IN_PROPERTY_AND_MARKET_ITEM_PRICE_NOT_MATCHED', + messageForUser: 'api.marketplace.marketItemPrice.ORGANIZATION_IN_PROPERTY_AND_MARKET_ITEM_PRICE_NOT_MATCHED', message: 'Cannot create scope with property from one organization and market item from another organization.', }, } diff --git a/apps/condo/domains/meter/schema/Meter.js b/apps/condo/domains/meter/schema/Meter.js index f8404fdc914..48418794bfd 100644 --- a/apps/condo/domains/meter/schema/Meter.js +++ b/apps/condo/domains/meter/schema/Meter.js @@ -35,37 +35,35 @@ const ERRORS = { code: BAD_USER_INPUT, type: METER_NUMBER_HAVE_INVALID_VALUE, message: 'value of "number" field must be non-empty string', - messageForUser: 'api.meter.METER_NUMBER_HAVE_INVALID_VALUE', + messageForUser: 'api.meter.meter.METER_NUMBER_HAVE_INVALID_VALUE', variable: ['data', 'number'], }, ACCOUNT_NUMBER_HAVE_INVALID_VALUE: { code: BAD_USER_INPUT, type: METER_ACCOUNT_NUMBER_HAVE_INVALID_VALUE, message: 'value of "accountNumber" field must be non-empty string', - messageForUser: 'api.meter.METER_ACCOUNT_NUMBER_HAVE_INVALID_VALUE', + messageForUser: 'api.meter.meter.METER_ACCOUNT_NUMBER_HAVE_INVALID_VALUE', variable: ['data', 'accountNumber'], }, METER_RESOURCE_OWNED_BY_ANOTHER_ORGANIZATION: { code: BAD_USER_INPUT, type: METER_RESOURCE_OWNED_BY_ANOTHER_ORGANIZATION, message: 'Provided meter resource belongs to another organization', - messageForUser: 'api.meter.METER_RESOURCE_OWNED_BY_ANOTHER_ORGANIZATION', + messageForUser: 'api.meter.meter.METER_RESOURCE_OWNED_BY_ANOTHER_ORGANIZATION', variable: ['data', 'resource'], }, - SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION: (accountNumbersCsv) => ({ + SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION: { code: BAD_USER_INPUT, type: SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION, message: 'Meter with same number and resource exist in current organization and linked with other account number', - messageForUser: 'api.meter.SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION', - messageInterpolation: { accountNumbersCsv }, - }), - SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT: (unitsCsv) => ({ + messageForUser: 'api.meter.meter.SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION', + }, + SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT: { code: BAD_USER_INPUT, type: SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT, message: 'Meter with same account number exist in current organization in other unit', - messageForUser: 'api.meter.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT', - messageInterpolation: { unitsCsv }, - }), + messageForUser: 'api.meter.meter.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT', + }, } // TODO(DOMA-6195): replace 'addFieldValidationError' and 'addValidationError' to 'GQLError' @@ -131,11 +129,10 @@ const Meter = new GQLListSchema('Meter', { } if (metersWithSameResourceAndNumberInOrganization && metersWithSameResourceAndNumberInOrganization.length > 0) { - throw new GQLError( - ERRORS.SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION( - metersWithSameResourceAndNumberInOrganization.map(({ accountNumber }) => accountNumber).join(', '), - ), - context, + throw new GQLError({ + ...ERRORS.SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION, + messageInterpolation: { accountNumbersCsv: metersWithSameResourceAndNumberInOrganization.map(({ accountNumber }) => accountNumber).join(', ') }, + }, context, ) } }, @@ -173,11 +170,10 @@ const Meter = new GQLListSchema('Meter', { }) if (metersWithSameAccountNumberInOtherUnit && metersWithSameAccountNumberInOtherUnit.length > 0) { - throw new GQLError( - ERRORS.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT( - metersWithSameAccountNumberInOtherUnit.map((meter) => `${meter.unitType} ${meter.unitName}`).join(', ') - ), - context, + throw new GQLError({ + ...ERRORS.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT, + messageInterpolation: { unitsCsv: metersWithSameAccountNumberInOtherUnit.map((meter) => `${meter.unitType} ${meter.unitName}`).join(', ') }, + }, context ) } } diff --git a/apps/condo/domains/meter/schema/Meter.test.js b/apps/condo/domains/meter/schema/Meter.test.js index 2f2532f9889..5905992f552 100644 --- a/apps/condo/domains/meter/schema/Meter.test.js +++ b/apps/condo/domains/meter/schema/Meter.test.js @@ -137,8 +137,10 @@ describe('Meter', () => { async () => await createTestMeter(client, client.organization, client.property, resource, { accountNumber, unitName: unitName2, - }), - METER_ERRORS.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT(`${firstMeter.unitType} ${firstMeter.unitName}`), + }), { + ...METER_ERRORS.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT, + messageInterpolation: { unitsCsv: `${firstMeter.unitType} ${firstMeter.unitName}` }, + } ) }) @@ -161,8 +163,10 @@ describe('Meter', () => { accountNumber, unitName, unitType: PARKING_UNIT_TYPE, - }), - METER_ERRORS.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT(`${firstMeter.unitType} ${firstMeter.unitName}`), + }), { + ...METER_ERRORS.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT, + messageInterpolation: { unitsCsv: `${firstMeter.unitType} ${firstMeter.unitName}` }, + } ) }) @@ -293,7 +297,10 @@ describe('Meter', () => { await expectToThrowGQLError( async () => await createTestMeter(client, client.organization, client.property, resource, { number }), - METER_ERRORS.SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION(firstMeter.accountNumber), + { + ...METER_ERRORS.SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION, + messageInterpolation: { accountNumbersCsv: firstMeter.accountNumber }, + }, ) }) @@ -414,8 +421,10 @@ describe('Meter', () => { await expectToThrowGQLError( async () => await updateTestMeter(client, meter.id, { accountNumber, - }), - METER_ERRORS.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT(`${firstMeter.unitType} ${firstMeter.unitName}`), + }), { + ...METER_ERRORS.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT, + messageInterpolation: { unitsCsv: `${firstMeter.unitType} ${firstMeter.unitName}` }, + } ) }) @@ -440,8 +449,10 @@ describe('Meter', () => { accountNumber, unitName, unitType: PARKING_UNIT_TYPE, - }), - METER_ERRORS.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT(`${firstMeter.unitType} ${firstMeter.unitName}`), + }), { + ...METER_ERRORS.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT, + messageInterpolation: { unitsCsv: `${firstMeter.unitType} ${firstMeter.unitName}` }, + } ) }) diff --git a/apps/condo/domains/meter/schema/MeterReading.js b/apps/condo/domains/meter/schema/MeterReading.js index 528957ea274..f247511e571 100644 --- a/apps/condo/domains/meter/schema/MeterReading.js +++ b/apps/condo/domains/meter/schema/MeterReading.js @@ -22,27 +22,24 @@ const { addOrganizationFieldPlugin } = require('@condo/domains/organization/sche const { RESIDENT } = require('@condo/domains/user/constants/common') const ERRORS = { - METER_READING_DATE_IN_FUTURE: (givenDate) => ({ + METER_READING_DATE_IN_FUTURE: { code: BAD_USER_INPUT, type: METER_READING_DATE_IN_FUTURE, message: 'Meter reading date can not be from the future', - messageForUser: 'api.meterReading.METER_READING_DATE_IN_FUTURE', - messageInterpolation: { givenDate }, - }), - METER_READING_FEW_VALUES: (meterNumber, numberOfTariffs, fieldsNames) => ({ + messageForUser: 'api.meter.meterReading.METER_READING_DATE_IN_FUTURE', + }, + METER_READING_FEW_VALUES: { code: BAD_USER_INPUT, type: METER_READING_FEW_VALUES, message: 'Wrong values count: few values', - messageForUser: 'api.meterReading.METER_READING_FEW_VALUES', - messageInterpolation: { meterNumber, numberOfTariffs, fieldsNames }, - }), - METER_READING_EXTRA_VALUES: (meterNumber, numberOfTariffs, fieldsNames) => ({ + messageForUser: 'api.meter.meterReading.METER_READING_FEW_VALUES', + }, + METER_READING_EXTRA_VALUES: { code: BAD_USER_INPUT, type: METER_READING_EXTRA_VALUES, message: 'Wrong values count: extra values', - messageForUser: 'api.meterReading.METER_READING_EXTRA_VALUES', - messageInterpolation: { meterNumber, numberOfTariffs, fieldsNames }, - }), + messageForUser: 'api.meter.meterReading.METER_READING_EXTRA_VALUES', + }, BILLING_STATUS_MESSAGE_WITHOUT_BILLING_STATUS: { code: BAD_USER_INPUT, type: BILLING_STATUS_MESSAGE_WITHOUT_BILLING_STATUS, @@ -63,7 +60,10 @@ const MeterReading = new GQLListSchema('MeterReading', { const now = dayjs() const readingDate = dayjs(date) if (readingDate.isAfter(now)) { - throw new GQLError(ERRORS.METER_READING_DATE_IN_FUTURE(date), context) + throw new GQLError({ + ...ERRORS.METER_READING_DATE_IN_FUTURE, + messageInterpolation: { givenDate: date }, + }, context) } } }, @@ -187,7 +187,14 @@ const MeterReading = new GQLListSchema('MeterReading', { } if (emptyFieldsNames.length > 0) { const localizedFieldsNames = emptyFieldsNames.map((fieldName) => i18n(`meter.import.column.${fieldName}`, { locale })) - throw new GQLError(ERRORS.METER_READING_FEW_VALUES(meter.number, meter.numberOfTariffs, localizedFieldsNames.join(', ')), context) + throw new GQLError({ + ...ERRORS.METER_READING_FEW_VALUES, + messageInterpolation: { + meterNumber: meter.number, + numberOfTariffs: meter.numberOfTariffs, + fieldsNames: localizedFieldsNames.join(', '), + }, + }, context) } const extraFieldsNames = [] @@ -199,7 +206,14 @@ const MeterReading = new GQLListSchema('MeterReading', { } if (extraFieldsNames.length > 0) { const localizedFieldsNames = extraFieldsNames.map((fieldName) => i18n(`meter.import.column.${fieldName}`, { locale })) - throw new GQLError(ERRORS.METER_READING_EXTRA_VALUES(meter.number, meter.numberOfTariffs, localizedFieldsNames.join(', ')), context) + throw new GQLError({ + ...ERRORS.METER_READING_EXTRA_VALUES, + messageInterpolation: { + meterNumber: meter.number, + numberOfTariffs: meter.numberOfTariffs, + fieldsNames: localizedFieldsNames.join(', '), + }, + }, context) } }, }, diff --git a/apps/condo/domains/meter/schema/MeterReading.test.js b/apps/condo/domains/meter/schema/MeterReading.test.js index 5d514ceb2d8..d4d1f836a36 100644 --- a/apps/condo/domains/meter/schema/MeterReading.test.js +++ b/apps/condo/domains/meter/schema/MeterReading.test.js @@ -1424,7 +1424,7 @@ describe('MeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_DATE_IN_FUTURE', message: 'Meter reading date can not be from the future', - messageForUser: 'api.meterReading.METER_READING_DATE_IN_FUTURE', + messageForUser: 'api.meter.meterReading.METER_READING_DATE_IN_FUTURE', messageInterpolation: { givenDate: date }, } ) @@ -1439,7 +1439,7 @@ describe('MeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_DATE_IN_FUTURE', message: 'Meter reading date can not be from the future', - messageForUser: 'api.meterReading.METER_READING_DATE_IN_FUTURE', + messageForUser: 'api.meter.meterReading.METER_READING_DATE_IN_FUTURE', messageInterpolation: { givenDate: date2 }, } ) @@ -1510,7 +1510,7 @@ describe('MeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_FEW_VALUES', message: 'Wrong values count: few values', - messageForUser: 'api.meterReading.METER_READING_FEW_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_FEW_VALUES', messageInterpolation: { meterNumber: meter.number, numberOfTariffs: 3, fieldsNames: ['value1', 'value2', 'value3'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -1526,7 +1526,7 @@ describe('MeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_FEW_VALUES', message: 'Wrong values count: few values', - messageForUser: 'api.meterReading.METER_READING_FEW_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_FEW_VALUES', messageInterpolation: { meterNumber: meter.number, numberOfTariffs: 3, fieldsNames: ['value2', 'value3'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -1542,7 +1542,7 @@ describe('MeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_FEW_VALUES', message: 'Wrong values count: few values', - messageForUser: 'api.meterReading.METER_READING_FEW_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_FEW_VALUES', messageInterpolation: { meterNumber: meter.number, numberOfTariffs: 3, fieldsNames: ['value3'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -1558,7 +1558,7 @@ describe('MeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_FEW_VALUES', message: 'Wrong values count: few values', - messageForUser: 'api.meterReading.METER_READING_FEW_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_FEW_VALUES', messageInterpolation: { meterNumber: meter.number, numberOfTariffs: 3, fieldsNames: ['value1', 'value3'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -1582,7 +1582,7 @@ describe('MeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_EXTRA_VALUES', message: 'Wrong values count: extra values', - messageForUser: 'api.meterReading.METER_READING_EXTRA_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_EXTRA_VALUES', messageInterpolation: { meterNumber: meter.number, numberOfTariffs: 1, fieldsNames: ['value2'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -1598,7 +1598,7 @@ describe('MeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_EXTRA_VALUES', message: 'Wrong values count: extra values', - messageForUser: 'api.meterReading.METER_READING_EXTRA_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_EXTRA_VALUES', messageInterpolation: { meterNumber: meter.number, numberOfTariffs: 1, fieldsNames: ['value2', 'value3'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -1614,7 +1614,7 @@ describe('MeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_EXTRA_VALUES', message: 'Wrong values count: extra values', - messageForUser: 'api.meterReading.METER_READING_EXTRA_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_EXTRA_VALUES', messageInterpolation: { meterNumber: meter.number, numberOfTariffs: 1, fieldsNames: ['value2', 'value3', 'value4'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) diff --git a/apps/condo/domains/meter/schema/MeterReportingPeriod.js b/apps/condo/domains/meter/schema/MeterReportingPeriod.js index ff835f6126a..874dda3bebe 100644 --- a/apps/condo/domains/meter/schema/MeterReportingPeriod.js +++ b/apps/condo/domains/meter/schema/MeterReportingPeriod.js @@ -17,28 +17,28 @@ const ERRORS = { variable: ['data', 'notifyEndDay'], type: 'INVALID_FINISH', message: 'The "notifyEndDay" field can take values in the range from 1 to 31', - messageForUser: 'api.meter.MeterReportingPeriod.INVALID_FINISH', + messageForUser: 'api.meter.meterReportingPeriod.INVALID_FINISH', }, INVALID_START: { code: BAD_USER_INPUT, variable: ['data', 'notifyStartDay'], type: 'INVALID_START', message: 'The "notifyStartDay" field can take values in the range from 1 to 31', - messageForUser: 'api.meter.MeterReportingPeriod.INVALID_START', + messageForUser: 'api.meter.meterReportingPeriod.INVALID_START', }, ORGANIZATION_IS_REQUIRED: { code: BAD_USER_INPUT, variable: ['data', 'organization'], type: 'ORGANIZATION_IS_REQUIRED', message: 'The organization is required to create', - messageForUser: 'api.meter.MeterReportingPeriod.ORGANIZATION_IS_REQUIRED', + messageForUser: 'api.meter.meterReportingPeriod.ORGANIZATION_IS_REQUIRED', }, PROPERTY_NOT_FOUND: { code: BAD_USER_INPUT, variable: ['data', 'property'], type: 'PROPERTY_NOT_FOUND', message: 'There is no such property in the specified organization', - messageForUser: 'api.meter.MeterReportingPeriod.PROPERTY_NOT_FOUND', + messageForUser: 'api.meter.meterReportingPeriod.PROPERTY_NOT_FOUND', }, } diff --git a/apps/condo/domains/meter/schema/PropertyMeterReading.js b/apps/condo/domains/meter/schema/PropertyMeterReading.js index 3c8dfbb47ae..26ffe91771d 100644 --- a/apps/condo/domains/meter/schema/PropertyMeterReading.js +++ b/apps/condo/domains/meter/schema/PropertyMeterReading.js @@ -22,14 +22,14 @@ const ERRORS = { code: BAD_USER_INPUT, type: METER_READING_FEW_VALUES, message: 'Wrong values count: few values', - messageForUser: 'api.meterReading.METER_READING_FEW_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_FEW_VALUES', messageInterpolation: { meterNumber, numberOfTariffs, fieldsNames }, }), METER_READING_EXTRA_VALUES: (meterNumber, numberOfTariffs, fieldsNames) => ({ code: BAD_USER_INPUT, type: METER_READING_EXTRA_VALUES, message: 'Wrong values count: extra values', - messageForUser: 'api.meterReading.METER_READING_EXTRA_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_EXTRA_VALUES', messageInterpolation: { meterNumber, numberOfTariffs, fieldsNames }, }), } diff --git a/apps/condo/domains/meter/schema/PropertyMeterReading.test.js b/apps/condo/domains/meter/schema/PropertyMeterReading.test.js index 33625dbd253..9ffd7c9e667 100644 --- a/apps/condo/domains/meter/schema/PropertyMeterReading.test.js +++ b/apps/condo/domains/meter/schema/PropertyMeterReading.test.js @@ -278,7 +278,7 @@ describe('PropertyMeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_FEW_VALUES', message: 'Wrong values count: few values', - messageForUser: 'api.meterReading.METER_READING_FEW_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_FEW_VALUES', messageInterpolation: { meterNumber: propertyMeter.number, numberOfTariffs: 3, fieldsNames: ['value1', 'value2', 'value3'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -294,7 +294,7 @@ describe('PropertyMeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_FEW_VALUES', message: 'Wrong values count: few values', - messageForUser: 'api.meterReading.METER_READING_FEW_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_FEW_VALUES', messageInterpolation: { meterNumber: propertyMeter.number, numberOfTariffs: 3, fieldsNames: ['value2', 'value3'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -310,7 +310,7 @@ describe('PropertyMeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_FEW_VALUES', message: 'Wrong values count: few values', - messageForUser: 'api.meterReading.METER_READING_FEW_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_FEW_VALUES', messageInterpolation: { meterNumber: propertyMeter.number, numberOfTariffs: 3, fieldsNames: ['value3'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -326,7 +326,7 @@ describe('PropertyMeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_FEW_VALUES', message: 'Wrong values count: few values', - messageForUser: 'api.meterReading.METER_READING_FEW_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_FEW_VALUES', messageInterpolation: { meterNumber: propertyMeter.number, numberOfTariffs: 3, fieldsNames: ['value1', 'value3'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -350,7 +350,7 @@ describe('PropertyMeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_EXTRA_VALUES', message: 'Wrong values count: extra values', - messageForUser: 'api.meterReading.METER_READING_EXTRA_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_EXTRA_VALUES', messageInterpolation: { meterNumber: propertyMeter.number, numberOfTariffs: 1, fieldsNames: ['value2'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -366,7 +366,7 @@ describe('PropertyMeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_EXTRA_VALUES', message: 'Wrong values count: extra values', - messageForUser: 'api.meterReading.METER_READING_EXTRA_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_EXTRA_VALUES', messageInterpolation: { meterNumber: propertyMeter.number, numberOfTariffs: 1, fieldsNames: ['value2', 'value3'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) @@ -382,7 +382,7 @@ describe('PropertyMeterReading', () => { code: 'BAD_USER_INPUT', type: 'METER_READING_EXTRA_VALUES', message: 'Wrong values count: extra values', - messageForUser: 'api.meterReading.METER_READING_EXTRA_VALUES', + messageForUser: 'api.meter.meterReading.METER_READING_EXTRA_VALUES', messageInterpolation: { meterNumber: propertyMeter.number, numberOfTariffs: 1, fieldsNames: ['value2', 'value3', 'value4'].map((field) => i18n(`meter.import.column.${field}`, { locale })).join(', ') }, } ) diff --git a/apps/condo/domains/meter/schema/RegisterMetersReadingsService.js b/apps/condo/domains/meter/schema/RegisterMetersReadingsService.js index 4401654dd6f..c78a261f756 100644 --- a/apps/condo/domains/meter/schema/RegisterMetersReadingsService.js +++ b/apps/condo/domains/meter/schema/RegisterMetersReadingsService.js @@ -40,13 +40,12 @@ const DATE_PARSING_FORMATS = [ const READINGS_LIMIT = 500 const ERRORS = { - TOO_MUCH_READINGS: (sentCount) => ({ + TOO_MUCH_READINGS: { code: BAD_USER_INPUT, type: TOO_MUCH_READINGS, message: `Too much readings. Maximum is ${READINGS_LIMIT}.`, messageForUser: 'api.meter.registerMetersReadings.TOO_MUCH_READINGS', - messageInterpolation: { limit: READINGS_LIMIT, sentCount }, - }), + }, ORGANIZATION_NOT_FOUND: { code: BAD_USER_INPUT, type: ORGANIZATION_NOT_FOUND, @@ -59,39 +58,36 @@ const ERRORS = { message: 'Property not found', messageForUser: 'api.meter.registerMetersReadings.PROPERTY_NOT_FOUND', }, - INVALID_METER_VALUES: (valuesList) => ({ + INVALID_METER_VALUES: { code: BAD_USER_INPUT, type: INVALID_METER_VALUES, message: 'Invalid meter values', messageForUser: 'api.meter.registerMetersReadings.INVALID_METER_VALUES', - messageInterpolation: { valuesList }, - }), - MULTIPLE_METERS_FOUND: (count) => ({ + }, + MULTIPLE_METERS_FOUND: { code: BAD_USER_INPUT, type: MULTIPLE_METERS_FOUND, message: 'Multiple meters found', messageForUser: 'api.meter.registerMetersReadings.MULTIPLE_METERS_FOUND', - messageInterpolation: { count }, - }), + }, INVALID_ACCOUNT_NUMBER: { code: BAD_USER_INPUT, type: INVALID_ACCOUNT_NUMBER, message: 'Invalid account number', - messageForUser: 'meter.import.error.AccountNumberInvalidValue', + messageForUser: 'api.meter.registerMetersReadings.INVALID_ACCOUNT_NUMBER', }, INVALID_METER_NUMBER: { code: BAD_USER_INPUT, type: INVALID_METER_NUMBER, message: 'Invalid meter number', - messageForUser: 'meter.import.error.MeterNumberInvalidValue', + messageForUser: 'api.meter.registerMetersReadings.INVALID_METER_NUMBER', }, - INVALID_DATE: (columnName) => ({ + INVALID_DATE: { code: BAD_USER_INPUT, type: INVALID_DATE, message: 'Invalid date', - messageForUser: 'meter.import.error.WrongDateFormatMessage', - messageInterpolation: { columnName, format: [ISO_DATE_FORMAT, EUROPEAN_DATE_FORMAT].join('", "') }, - }), + messageForUser: 'api.meter.registerMetersReadings.INVALID_DATE:', + }, } const SYMBOLS_TO_CUT_FROM_DATES_REGEXP = /[^-_:.,( )/\d]/g @@ -263,7 +259,10 @@ const RegisterMetersReadingsService = new GQLCustomSchema('RegisterMetersReading const { data: { dv, sender, organization, readings } } = args if (readings.length > READINGS_LIMIT) { - throw new GQLError(ERRORS.TOO_MUCH_READINGS(readings.length), context) + throw new GQLError({ + ...ERRORS.TOO_MUCH_READINGS, + messageInterpolation: { limit: READINGS_LIMIT, sentCount: readings.length }, + }, context) } /** @type Organization */ @@ -320,7 +319,12 @@ const RegisterMetersReadingsService = new GQLCustomSchema('RegisterMetersReading } if (!isDateValid(reading.date)) { - resultRows.push(new GQLError(ERRORS.INVALID_DATE(i18n('meter.import.column.meterReadingSubmissionDate', { locale })), context)) + resultRows.push(new GQLError({ + ...ERRORS.INVALID_DATE, + messageInterpolation: { + columnName: i18n('meter.import.column.meterReadingSubmissionDate', { locale }), + format: [ISO_DATE_FORMAT, EUROPEAN_DATE_FORMAT].join('", "') }, + }, context)) continue } @@ -344,7 +348,10 @@ const RegisterMetersReadingsService = new GQLCustomSchema('RegisterMetersReading }) if (foundMeters.length > 1) { - resultRows.push(new GQLError(ERRORS.MULTIPLE_METERS_FOUND(foundMeters.length), context)) + resultRows.push(new GQLError({ + ...ERRORS.MULTIPLE_METERS_FOUND, + messageInterpolation: { count: foundMeters.length }, + }, context)) continue } @@ -368,9 +375,14 @@ const RegisterMetersReadingsService = new GQLCustomSchema('RegisterMetersReading if (Object.keys(errorValues).length > 0) { const errorValuesKeys = Object.keys(errorValues) - resultRows.push(new GQLError( - ERRORS.INVALID_METER_VALUES(errorValuesKeys.map((errKey) => `"${i18n(`meter.import.column.${errKey}`, { locale })}"="${errorValues[errKey]}"`)), - context, + const valuesList = errorValuesKeys.map((errKey) => { + const column = i18n(`meter.import.column.${errKey}`, { locale }) + return `"${column}"="${errorValues[errKey]}"` + }) + resultRows.push(new GQLError({ + ...ERRORS.INVALID_METER_VALUES, + messageInterpolation: { valuesList }, + }, context, )) continue } diff --git a/apps/condo/domains/meter/schema/RegisterMetersReadingsService.test.js b/apps/condo/domains/meter/schema/RegisterMetersReadingsService.test.js index fe0c3d7e586..c439d7ef8bd 100644 --- a/apps/condo/domains/meter/schema/RegisterMetersReadingsService.test.js +++ b/apps/condo/domains/meter/schema/RegisterMetersReadingsService.test.js @@ -859,7 +859,7 @@ describe('RegisterMetersReadingsService', () => { extensions: expect.objectContaining({ type: 'INVALID_DATE', message: 'Invalid date', - messageForUser: i18n('meter.import.error.WrongDateFormatMessage', { + messageForUser: i18n('api.meter.registerMetersReadings.INVALID_DATE:', { locale, meta: { columnName: i18n('meter.import.column.meterReadingSubmissionDate', { locale }), diff --git a/apps/condo/domains/meter/schema/fields/index.js b/apps/condo/domains/meter/schema/fields/index.js index 84658ad83f4..c39180291ea 100644 --- a/apps/condo/domains/meter/schema/fields/index.js +++ b/apps/condo/domains/meter/schema/fields/index.js @@ -4,14 +4,13 @@ const { NUMBER_OF_TARIFFS_NOT_VALID } = require('@condo/domains/meter/constants/ const { RESIDENT } = require('@condo/domains/user/constants/common') const ERRORS = { - NUMBER_OF_TARIFFS_NOT_VALID: (value) => ({ + NUMBER_OF_TARIFFS_NOT_VALID: { code: BAD_USER_INPUT, type: NUMBER_OF_TARIFFS_NOT_VALID, message: 'Provided number of tariffs is not valid. Must be an integer from 1 to 4.', messageForUser: 'api.meter.NUMBER_OF_TARIFFS_NOT_VALID', - messageInterpolation: { value }, variable: ['data', 'numberOfTariffs'], - }), + }, } const resolveNumberOfTariffs = (valuesCount) => ({ @@ -21,7 +20,10 @@ const resolveNumberOfTariffs = (valuesCount) => ({ validateInput: ({ context, resolvedData, fieldPath }) => { const value = Number(resolvedData[fieldPath]) if (value < 1 || value > valuesCount) { - throw new GQLError(ERRORS.NUMBER_OF_TARIFFS_NOT_VALID(resolvedData[fieldPath]), context) + throw new GQLError({ + ...ERRORS.NUMBER_OF_TARIFFS_NOT_VALID, + messageInterpolation: { value: resolvedData[fieldPath] }, + }, context) } }, }, diff --git a/apps/condo/domains/meter/utils/taskSchema/importerResolver.js b/apps/condo/domains/meter/utils/taskSchema/importerResolver.js index 38224d066fd..d8c9c8671a7 100644 --- a/apps/condo/domains/meter/utils/taskSchema/importerResolver.js +++ b/apps/condo/domains/meter/utils/taskSchema/importerResolver.js @@ -191,7 +191,7 @@ async function getErrors (keystone, format, locale, columns, mappers) { function getMutationError (locale) { const MeterAccountNumberExistInOtherUnitMessage = i18n('meter.import.error.MeterAccountNumberExistInOtherUnit', locale) - const MeterResourceOwnedByAnotherOrganizationMessage = i18n('api.meter.METER_RESOURCE_OWNED_BY_ANOTHER_ORGANIZATION', locale) + const MeterResourceOwnedByAnotherOrganizationMessage = i18n('api.meter.meter.METER_RESOURCE_OWNED_BY_ANOTHER_ORGANIZATION', locale) const MeterNumberExistInOrganizationMessage = i18n('meter.import.error.MeterNumberExistInOrganization', locale) return { diff --git a/apps/condo/domains/miniapp/schema/B2BAppRole.js b/apps/condo/domains/miniapp/schema/B2BAppRole.js index cb4bf2d6656..55c5f9981bd 100644 --- a/apps/condo/domains/miniapp/schema/B2BAppRole.js +++ b/apps/condo/domains/miniapp/schema/B2BAppRole.js @@ -27,7 +27,7 @@ const ERRORS = { type: NOT_FOUND, variable: ['data', 'role'], message: 'Role not found', - messageForUser: 'api.organizationEmployee.NOT_FOUND_ROLE', + messageForUser: 'api.organization.organizationEmployee.NOT_FOUND_ROLE', }, } diff --git a/apps/condo/domains/news/schema/GetNewsSharingRecipientsService.js b/apps/condo/domains/news/schema/GetNewsSharingRecipientsService.js index 514918664e8..9ae452804a6 100644 --- a/apps/condo/domains/news/schema/GetNewsSharingRecipientsService.js +++ b/apps/condo/domains/news/schema/GetNewsSharingRecipientsService.js @@ -59,7 +59,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: WRONG_VALUE, message: 'Provided b2bApp does not support NewsSharing', - messageForUser: 'api.newsItem.getNewsSharingRecipients.NOT_NEWS_SHARING_APP', + messageForUser: 'api.news.getNewsSharingRecipients.NOT_NEWS_SHARING_APP', }, NEWS_SHARING_APP_REQUEST_FAILED: { query: 'getNewsSharingRecipients', @@ -67,7 +67,7 @@ const ERRORS = { code: INTERNAL_ERROR, type: NETWORK_ERROR, message: 'Could not get a successful response from NewsSharing miniapp', - messageForUser: 'api.newsItem.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_FAILED', + messageForUser: 'api.news.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_FAILED', }, NEWS_SHARING_APP_REQUEST_BAD_RESPONSE: { query: 'getNewsSharingRecipients', @@ -75,7 +75,7 @@ const ERRORS = { code: INTERNAL_ERROR, type: WRONG_VALUE, message: 'Response from NewsSharing miniapp was successful, but the data format was incorrect', - messageForUser: 'api.newsItem.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_BAD_RESPONSE', + messageForUser: 'api.news.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_BAD_RESPONSE', }, } diff --git a/apps/condo/domains/news/schema/NewsItem.js b/apps/condo/domains/news/schema/NewsItem.js index a87d3671211..487db815153 100644 --- a/apps/condo/domains/news/schema/NewsItem.js +++ b/apps/condo/domains/news/schema/NewsItem.js @@ -45,7 +45,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: EMPTY_VALID_BEFORE_DATE, message: 'The date the news item valid before is empty', - messageForUser: 'api.newsItem.EMPTY_VALID_BEFORE_DATE', + messageForUser: 'api.news.newsItem.EMPTY_VALID_BEFORE_DATE', mutation: 'createNewsItem', variable: ['data', 'validBefore'], }, @@ -53,46 +53,46 @@ const ERRORS = { code: BAD_USER_INPUT, type: VALIDITY_DATE_LESS_THAN_SEND_DATE, message: 'The validity date is less than send date', - messageForUser: 'api.newsItem.VALIDITY_DATE_LESS_THAN_SEND_DATE', + messageForUser: 'api.news.newsItem.VALIDITY_DATE_LESS_THAN_SEND_DATE', mutation: 'updateNewsItem', }, EDIT_DENIED_ALREADY_SENT: { code: BAD_USER_INPUT, type: EDIT_DENIED_ALREADY_SENT, message: 'The sent news item is restricted from editing', - messageForUser: 'api.newsItem.EDIT_DENIED_ALREADY_SENT', + messageForUser: 'api.news.newsItem.EDIT_DENIED_ALREADY_SENT', mutation: 'updateNewsItem', }, EDIT_DENIED_PUBLISHED: { code: BAD_USER_INPUT, type: EDIT_DENIED_PUBLISHED, message: 'The published news item is restricted from editing', - messageForUser: 'api.newsItem.EDIT_DENIED_PUBLISHED', + messageForUser: 'api.news.newsItem.EDIT_DENIED_PUBLISHED', mutation: 'updateNewsItem', }, PROFANITY_TITLE_DETECTED_MOT_ERF_KER: { code: BAD_USER_INPUT, type: PROFANITY_TITLE_DETECTED_MOT_ERF_KER, message: 'Profanity in title detected', - messageForUser: 'api.newsItem.PROFANITY_TITLE_DETECTED_MOT_ERF_KER', + messageForUser: 'api.news.newsItem.PROFANITY_TITLE_DETECTED_MOT_ERF_KER', }, PROFANITY_BODY_DETECTED_MOT_ERF_KER: { code: BAD_USER_INPUT, type: PROFANITY_BODY_DETECTED_MOT_ERF_KER, message: 'Profanity in body detected', - messageForUser: 'api.newsItem.PROFANITY_BODY_DETECTED_MOT_ERF_KER', + messageForUser: 'api.news.newsItem.PROFANITY_BODY_DETECTED_MOT_ERF_KER', }, WRONG_SEND_DATE: { code: BAD_USER_INPUT, type: WRONG_SEND_DATE, message: 'Wrong send date', - messageForUser: 'api.newsItem.WRONG_SEND_DATE', + messageForUser: 'api.news.newsItem.WRONG_SEND_DATE', }, NO_NEWS_ITEM_SCOPES: { code: BAD_USER_INPUT, type: NO_NEWS_ITEM_SCOPES, message: 'The news item without scopes publishing is forbidden', - messageForUser: 'api.newsItem.NO_NEWS_ITEM_SCOPES', + messageForUser: 'api.news.newsItem.NO_NEWS_ITEM_SCOPES', }, } diff --git a/apps/condo/domains/news/schema/NewsItem.test.js b/apps/condo/domains/news/schema/NewsItem.test.js index 71d231c119b..f81c8b193be 100644 --- a/apps/condo/domains/news/schema/NewsItem.test.js +++ b/apps/condo/domains/news/schema/NewsItem.test.js @@ -818,7 +818,7 @@ describe('NewsItems', () => { message: 'The date the news item valid before is empty', mutation: 'createNewsItem', variable: ['data', 'validBefore'], - messageForUser: 'api.newsItem.EMPTY_VALID_BEFORE_DATE', + messageForUser: 'api.news.newsItem.EMPTY_VALID_BEFORE_DATE', }, ) }) @@ -834,7 +834,7 @@ describe('NewsItems', () => { type: 'VALIDITY_DATE_LESS_THAN_SEND_DATE', message: 'The validity date is less than send date', mutation: 'updateNewsItem', - messageForUser: 'api.newsItem.VALIDITY_DATE_LESS_THAN_SEND_DATE', + messageForUser: 'api.news.newsItem.VALIDITY_DATE_LESS_THAN_SEND_DATE', }, ) }) @@ -876,7 +876,7 @@ describe('NewsItems', () => { type: 'EDIT_DENIED_ALREADY_SENT', message: 'The sent news item is restricted from editing', mutation: 'updateNewsItem', - messageForUser: 'api.newsItem.EDIT_DENIED_ALREADY_SENT', + messageForUser: 'api.news.newsItem.EDIT_DENIED_ALREADY_SENT', }, ) }) @@ -907,7 +907,7 @@ describe('NewsItems', () => { type: 'EDIT_DENIED_PUBLISHED', message: 'The published news item is restricted from editing', mutation: 'updateNewsItem', - messageForUser: 'api.newsItem.EDIT_DENIED_PUBLISHED', + messageForUser: 'api.news.newsItem.EDIT_DENIED_PUBLISHED', }, ) }) @@ -922,7 +922,7 @@ describe('NewsItems', () => { code: 'BAD_USER_INPUT', type: 'PROFANITY_TITLE_DETECTED_MOT_ERF_KER', message: 'Profanity in title detected', - messageForUser: 'api.newsItem.PROFANITY_TITLE_DETECTED_MOT_ERF_KER', + messageForUser: 'api.news.newsItem.PROFANITY_TITLE_DETECTED_MOT_ERF_KER', badWords: expect.any(String), }, ) @@ -944,7 +944,7 @@ describe('NewsItems', () => { code: 'BAD_USER_INPUT', type: 'PROFANITY_BODY_DETECTED_MOT_ERF_KER', message: 'Profanity in body detected', - messageForUser: 'api.newsItem.PROFANITY_BODY_DETECTED_MOT_ERF_KER', + messageForUser: 'api.news.newsItem.PROFANITY_BODY_DETECTED_MOT_ERF_KER', badWords: expect.any(String), }, ) @@ -976,7 +976,7 @@ describe('NewsItems', () => { code: 'BAD_USER_INPUT', type: 'WRONG_SEND_DATE', message: 'Wrong send date', - messageForUser: 'api.newsItem.WRONG_SEND_DATE', + messageForUser: 'api.news.newsItem.WRONG_SEND_DATE', }, ) }) @@ -986,7 +986,7 @@ describe('NewsItems', () => { code: 'BAD_USER_INPUT', type: 'NO_NEWS_ITEM_SCOPES', message: 'The news item without scopes publishing is forbidden', - messageForUser: 'api.newsItem.NO_NEWS_ITEM_SCOPES', + messageForUser: 'api.news.newsItem.NO_NEWS_ITEM_SCOPES', } await expectToThrowGQLError( diff --git a/apps/condo/domains/news/schema/NewsItemRecipientsExportTask.js b/apps/condo/domains/news/schema/NewsItemRecipientsExportTask.js index 86ce3d4fa68..72fead57f3e 100644 --- a/apps/condo/domains/news/schema/NewsItemRecipientsExportTask.js +++ b/apps/condo/domains/news/schema/NewsItemRecipientsExportTask.js @@ -27,14 +27,14 @@ const ERRORS = { code: BAD_USER_INPUT, type: WRONG_VALUE, message: 'Status is already completed', - messageForUser: 'api.newsItemRecipientsExportTask.STATUS_IS_ALREADY_COMPLETED', + messageForUser: 'api.news.newsItemRecipientsExportTask.STATUS_IS_ALREADY_COMPLETED', variable: ['data', 'status'], }, STATUS_IS_ALREADY_ERROR: { code: BAD_USER_INPUT, type: WRONG_VALUE, message: 'Status is already error', - messageForUser: 'api.newsItemRecipientsExportTask.STATUS_IS_ALREADY_ERROR', + messageForUser: 'api.news.newsItemRecipientsExportTask.STATUS_IS_ALREADY_ERROR', variable: ['data', 'status'], }, } diff --git a/apps/condo/domains/news/schema/NewsItemRecipientsExportTask.test.js b/apps/condo/domains/news/schema/NewsItemRecipientsExportTask.test.js index 87bc14a0045..f09c61b3c38 100644 --- a/apps/condo/domains/news/schema/NewsItemRecipientsExportTask.test.js +++ b/apps/condo/domains/news/schema/NewsItemRecipientsExportTask.test.js @@ -220,7 +220,7 @@ describe('NewsItemRecipientsExportTask', () => { type: 'WRONG_VALUE', message: 'Status is already completed', variable: ['data', 'status'], - messageForUser: 'api.newsItemRecipientsExportTask.STATUS_IS_ALREADY_COMPLETED', + messageForUser: 'api.news.newsItemRecipientsExportTask.STATUS_IS_ALREADY_COMPLETED', }) }) diff --git a/apps/condo/domains/news/schema/NewsItemScope.js b/apps/condo/domains/news/schema/NewsItemScope.js index 0b919fc52f4..cfa2f2d800e 100644 --- a/apps/condo/domains/news/schema/NewsItemScope.js +++ b/apps/condo/domains/news/schema/NewsItemScope.js @@ -24,13 +24,13 @@ const ERRORS = { code: BAD_USER_INPUT, type: EDIT_DENIED_PUBLISHED, message: 'The published news item is restricted from editing', - messageForUser: 'api.newsItem.EDIT_DENIED_PUBLISHED', + messageForUser: 'api.news.newsItem.EDIT_DENIED_PUBLISHED', }, EDIT_DENIED_ALREADY_SENT: { code: BAD_USER_INPUT, type: EDIT_DENIED_ALREADY_SENT, message: 'The sent news item is restricted from editing', - messageForUser: 'api.newsItem.EDIT_DENIED_ALREADY_SENT', + messageForUser: 'api.news.newsItem.EDIT_DENIED_ALREADY_SENT', }, } diff --git a/apps/condo/domains/news/schema/NewsItemScope.test.js b/apps/condo/domains/news/schema/NewsItemScope.test.js index 6d8cf125819..b8e2802a238 100644 --- a/apps/condo/domains/news/schema/NewsItemScope.test.js +++ b/apps/condo/domains/news/schema/NewsItemScope.test.js @@ -457,7 +457,7 @@ describe('NewsItemScope', () => { code: 'BAD_USER_INPUT', type: 'EDIT_DENIED_PUBLISHED', message: 'The published news item is restricted from editing', - messageForUser: 'api.newsItem.EDIT_DENIED_PUBLISHED', + messageForUser: 'api.news.newsItem.EDIT_DENIED_PUBLISHED', }, ) }) @@ -484,7 +484,7 @@ describe('NewsItemScope', () => { code: 'BAD_USER_INPUT', type: 'EDIT_DENIED_ALREADY_SENT', message: 'The sent news item is restricted from editing', - messageForUser: 'api.newsItem.EDIT_DENIED_ALREADY_SENT', + messageForUser: 'api.news.newsItem.EDIT_DENIED_ALREADY_SENT', }, ) }) diff --git a/apps/condo/domains/onboarding/constants/errors.js b/apps/condo/domains/onboarding/constants/errors.js index 0b60ad3165e..cb27d50e679 100644 --- a/apps/condo/domains/onboarding/constants/errors.js +++ b/apps/condo/domains/onboarding/constants/errors.js @@ -6,7 +6,7 @@ const ERRORS = { code: 'BAD_USER_INPUT', type: UPDATE_COMPLETED_STEP_TYPE, message: 'You can not update status of TourStep in "completed" status', - messageForUser: 'api.tourStep.update.updateCompletedStepType', + messageForUser: 'api.onboarding.tourStep.UPDATE_COMPLETED_STEP_TYPE', }, } diff --git a/apps/condo/domains/organization/components/EmployeeRoleForm/BaseEmployeeRoleForm.tsx b/apps/condo/domains/organization/components/EmployeeRoleForm/BaseEmployeeRoleForm.tsx index 020b5f2e0b5..6d821e245b8 100644 --- a/apps/condo/domains/organization/components/EmployeeRoleForm/BaseEmployeeRoleForm.tsx +++ b/apps/condo/domains/organization/components/EmployeeRoleForm/BaseEmployeeRoleForm.tsx @@ -204,7 +204,7 @@ export const BaseEmployeeRoleForm: React.FC = ({ const PermissionsSectionTitle = intl.formatMessage({ id: 'pages.condo.employeeRole.form.permissions.title' }) const NotEditableRoleTooltip = intl.formatMessage({ id: 'pages.condo.employeeRole.tooltip.notEditableRole' }, { role: get(employeeRoleToUpdate, 'name') }) const RoleCreationLimitReachedTooltip = intl.formatMessage({ id: 'pages.condo.settings.employeeRoles.roleCreationLimitReachedTooltip' }, { max: MAX_ROLE_COUNT }) - const RoleNameAlreadyExistErrorMessage = intl.formatMessage({ id: 'api.organization.OrganizationEmployeeRole.ROLE_NAME_ALREADY_EXIST' }) + const RoleNameAlreadyExistErrorMessage = intl.formatMessage({ id: 'api.organization.organizationEmployeeRole.ROLE_NAME_ALREADY_EXIST' }) const CancelMessage = intl.formatMessage({ id: 'Cancel' }) const SaveMessage = intl.formatMessage({ id: 'Save' }) diff --git a/apps/condo/domains/organization/schema/OrganizationEmployee.js b/apps/condo/domains/organization/schema/OrganizationEmployee.js index 1652c0b151b..f75b3dceb3a 100644 --- a/apps/condo/domains/organization/schema/OrganizationEmployee.js +++ b/apps/condo/domains/organization/schema/OrganizationEmployee.js @@ -28,7 +28,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: ALREADY_INVITED_EMAIL, message: 'Employee with same email already invited into the organization', - messageForUser: 'api.organizationEmployee.ALREADY_INVITED_EMAIL', + messageForUser: 'api.organization.organizationEmployee.ALREADY_INVITED_EMAIL', variable: ['email'], }, ALREADY_INVITED_PHONE: { @@ -36,7 +36,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: ALREADY_INVITED_PHONE, message: 'Employee with same phone already invited into the organization', - messageForUser: 'api.organizationEmployee.ALREADY_INVITED_PHONE', + messageForUser: 'api.organization.organizationEmployee.ALREADY_INVITED_PHONE', variable: ['phone'], }, NOT_FOUND_ROLE: { @@ -44,7 +44,7 @@ const ERRORS = { type: NOT_FOUND, variable: ['data', 'role'], message: 'Role not found for the specified organization', - messageForUser: 'api.organizationEmployee.NOT_FOUND_ROLE', + messageForUser: 'api.organization.organizationEmployee.NOT_FOUND_ROLE', }, } diff --git a/apps/condo/domains/organization/schema/OrganizationEmployee.test.js b/apps/condo/domains/organization/schema/OrganizationEmployee.test.js index 38bf45b0e87..85f59863139 100644 --- a/apps/condo/domains/organization/schema/OrganizationEmployee.test.js +++ b/apps/condo/domains/organization/schema/OrganizationEmployee.test.js @@ -628,7 +628,7 @@ describe('OrganizationEmployee', () => { type: 'NOT_FOUND', variable: ['data', 'role'], message: 'Role not found for the specified organization', - messageForUser: 'api.organizationEmployee.NOT_FOUND_ROLE', + messageForUser: 'api.organization.organizationEmployee.NOT_FOUND_ROLE', }) }) test('cannot create employee with deleted role', async () => { @@ -674,7 +674,7 @@ describe('OrganizationEmployee', () => { type: 'NOT_FOUND', variable: ['data', 'role'], message: 'Role not found for the specified organization', - messageForUser: 'api.organizationEmployee.NOT_FOUND_ROLE', + messageForUser: 'api.organization.organizationEmployee.NOT_FOUND_ROLE', }) }) test('cannot update an employee\'s role to a deleted role', async () => { diff --git a/apps/condo/domains/organization/schema/OrganizationEmployeeRole.js b/apps/condo/domains/organization/schema/OrganizationEmployeeRole.js index 5a841b8c594..6e1a7d9d1f5 100644 --- a/apps/condo/domains/organization/schema/OrganizationEmployeeRole.js +++ b/apps/condo/domains/organization/schema/OrganizationEmployeeRole.js @@ -57,14 +57,14 @@ const ERRORS = { variable: ['data', 'name'], type: 'ROLE_NAME_ALREADY_EXIST', message: 'The role name is similar to the default role name', - messageForUser: 'api.organization.OrganizationEmployeeRole.ROLE_NAME_ALREADY_EXIST', + messageForUser: 'api.organization.organizationEmployeeRole.ROLE_NAME_ALREADY_EXIST', }, INVALID_ROLE_NAME_LENGTH: { code: BAD_USER_INPUT, variable: ['data', 'name'], type: 'INVALID_ROLE_NAME_LENGTH', message: `Role name length must be between ${MIN_ROLE_NAME_LENGTH} and ${MAX_ROLE_NAME_LENGTH} characters`, - messageForUser: 'api.organization.OrganizationEmployeeRole.INVALID_ROLE_NAME_LENGTH', + messageForUser: 'api.organization.organizationEmployeeRole.INVALID_ROLE_NAME_LENGTH', messageInterpolation: { min: MIN_ROLE_NAME_LENGTH, max: MAX_ROLE_NAME_LENGTH, @@ -75,7 +75,7 @@ const ERRORS = { variable: ['data', 'description'], type: 'INVALID_ROLE_DESCRIPTION_LENGTH', message: `Role description length cannot be more than ${MAX_ROLE_NAME_LENGTH} characters`, - messageForUser: 'api.organization.OrganizationEmployeeRole.INVALID_ROLE_DESCRIPTION_LENGTH', + messageForUser: 'api.organization.organizationEmployeeRole.INVALID_ROLE_DESCRIPTION_LENGTH', messageInterpolation: { max: MAX_ROLE_NAME_LENGTH, }, diff --git a/apps/condo/domains/organization/schema/ReplaceOrganizationEmployeeRoleService.js b/apps/condo/domains/organization/schema/ReplaceOrganizationEmployeeRoleService.js index 39dfc129a16..bb72e9b4d18 100644 --- a/apps/condo/domains/organization/schema/ReplaceOrganizationEmployeeRoleService.js +++ b/apps/condo/domains/organization/schema/ReplaceOrganizationEmployeeRoleService.js @@ -49,7 +49,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: 'ORGANIZATION_NOT_FOUND', message: 'Organization not found', - messageForUser: 'api.organization.ReplaceOrganizationEmployeeRole.ORGANIZATION_NOT_FOUND', + messageForUser: 'api.organization.replaceOrganizationEmployeeRole.ORGANIZATION_NOT_FOUND', }, OLD_ROLE_NOT_FOUND: { mutation: 'replaceOrganizationEmployeeRole', @@ -57,7 +57,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: 'OLD_ROLE_NOT_FOUND', message: 'Old role not found in specified organization', - messageForUser: 'api.organization.ReplaceOrganizationEmployeeRole.OLD_ROLE_NOT_FOUND', + messageForUser: 'api.organization.replaceOrganizationEmployeeRole.OLD_ROLE_NOT_FOUND', }, NEW_ROLE_NOT_FOUND: { mutation: 'replaceOrganizationEmployeeRole', @@ -65,7 +65,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: 'NEW_ROLE_NOT_FOUND', message: 'New role not found in specified organization', - messageForUser: 'api.organization.ReplaceOrganizationEmployeeRole.NEW_ROLE_NOT_FOUND', + messageForUser: 'api.organization.replaceOrganizationEmployeeRole.NEW_ROLE_NOT_FOUND', }, DEFAULT_ROLE_CANNOT_BE_DELETED: { mutation: 'replaceOrganizationEmployeeRole', @@ -73,7 +73,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: 'DEFAULT_ROLE_CANNOT_BE_DELETED', message: 'The default role cannot be deleted', - messageForUser: 'api.organization.ReplaceOrganizationEmployeeRole.DEFAULT_ROLE_CANNOT_BE_DELETED', + messageForUser: 'api.organization.replaceOrganizationEmployeeRole.DEFAULT_ROLE_CANNOT_BE_DELETED', }, ROLES_MUST_BE_DIFFERENT: { mutation: 'replaceOrganizationEmployeeRole', @@ -81,7 +81,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: 'ROLES_MUST_BE_DIFFERENT', message: 'The old role and new role must be different', - messageForUser: 'api.organization.ReplaceOrganizationEmployeeRole.ROLES_MUST_BE_DIFFERENT', + messageForUser: 'api.organization.replaceOrganizationEmployeeRole.ROLES_MUST_BE_DIFFERENT', }, ROLES_ARE_BEING_PROCESSED: { mutation: 'replaceOrganizationEmployeeRole', @@ -89,7 +89,7 @@ const ERRORS = { code: TOO_MANY_REQUESTS, type: 'ROLES_ARE_BEING_PROCESSED', message: 'These roles are already being processed. Please try again a little later', - messageForUser: 'api.organization.ReplaceOrganizationEmployeeRole.ROLES_ARE_BEING_PROCESSED', + messageForUser: 'api.organization.replaceOrganizationEmployeeRole.ROLES_ARE_BEING_PROCESSED', }, } diff --git a/apps/condo/domains/property/schema/Property.js b/apps/condo/domains/property/schema/Property.js index d17b08c6a9c..aa5c0f2ba78 100644 --- a/apps/condo/domains/property/schema/Property.js +++ b/apps/condo/domains/property/schema/Property.js @@ -40,13 +40,13 @@ const jsonMapValidator = ajv.compile(MapSchemaJSON) const REQUIRED_FIELDS = ['organization', 'type', 'address', 'addressMeta'] const ERRORS = { - SAME_ADDRESS: (existingPropertyId) => ({ + SAME_ADDRESS: { query: 'createProperty', code: BAD_USER_INPUT, type: PROPERTY_ALREADY_EXISTS, - message: `Property with the same address (id=${existingPropertyId}) already exists in current organization`, - messageForUser: 'api.property.create.sameAddressError', - }), + message: 'Property with the same address (id={existingPropertyId}) already exists in current organization', + messageForUser: 'api.property.property.SAME_ADDRESS', + }, } const addressFieldHooks = { @@ -69,7 +69,10 @@ const addressFieldHooks = { const sameAddressProperties = await PropertyAPI.getAll(context, where, { first: 1 }) if (!isEmpty(sameAddressProperties)) { - throw new GQLError(ERRORS.SAME_ADDRESS(get(sameAddressProperties, [0, 'id'])), context) + throw new GQLError({ + ...ERRORS.SAME_ADDRESS, + messageInterpolation: { existingPropertyId: get(sameAddressProperties, [0, 'id']) }, + }, context) } } }, diff --git a/apps/condo/domains/resident/schema/RegisterResidentInvoiceService.js b/apps/condo/domains/resident/schema/RegisterResidentInvoiceService.js index 3897d228941..4d468e93aef 100644 --- a/apps/condo/domains/resident/schema/RegisterResidentInvoiceService.js +++ b/apps/condo/domains/resident/schema/RegisterResidentInvoiceService.js @@ -31,26 +31,25 @@ const ERRORS = { code: BAD_USER_INPUT, type: ERROR_NO_ACQUIRING_CONTEXT, message: 'The organization hasn\'t set up the marketplace', - messageForUser: 'api.marketplace.registerInvoice.error.noAcquiringContext', + messageForUser: 'api.resident.registerResidentInvoice.NO_ACQUIRING_CONTEXT', }, - ITEM_FROM_OTHER_ORGANIZATION: (rowNumber) => ({ + ITEM_FROM_OTHER_ORGANIZATION: { code: BAD_USER_INPUT, type: ERROR_ITEM_FROM_OTHER_ORGANIZATION, - message: `Item from other organization. Check line ${rowNumber}`, - messageForUser: 'api.marketplace.registerInvoice.error.itemFromOtherOrganization', - messageInterpolation: { rowNumber }, - }), + message: 'Item from other organization. Check line {rowNumber}', + messageForUser: 'api.resident.registerResidentInvoice.ITEM_FROM_OTHER_ORGANIZATION', + }, EMPTY_ROWS: { code: BAD_USER_INPUT, type: ERROR_INVOICE_EMPTY_ROWS, message: 'The invoice contains no rows', - messageForUser: 'api.marketplace.invoice.error.emptyRows', + messageForUser: 'api.marketplace.invoice.EMPTY_ROWS', }, PROHIBITED_INVOICE_PAYMENT_TYPE: { code: BAD_USER_INPUT, type: ERROR_PROHIBITED_INVOICE_PAYMENT_TYPE, message: 'This payment method is prohibited in the selected organization', - messageForUser: 'api.marketplace.invoice.error.prohibitedPaymentType', + messageForUser: 'api.resident.registerResidentInvoice.PROHIBITED_INVOICE_PAYMENT_TYPE', }, } @@ -117,7 +116,10 @@ const RegisterResidentInvoiceService = new GQLCustomSchema('RegisterResidentInvo for (let i = 0; i < priceScopes.length; i++) { if (get(priceScopes, [i, 'marketItemPrice', 'marketItem', 'organization', 'id']) !== resident.organization) { - throw new GQLError(ERRORS.ITEM_FROM_OTHER_ORGANIZATION(i + 1), context) + throw new GQLError({ + ...ERRORS.ITEM_FROM_OTHER_ORGANIZATION, + messageInterpolation: { rowNumber: i + 1 }, + }, context) } } diff --git a/apps/condo/domains/resident/schema/RegisterResidentInvoiceService.test.js b/apps/condo/domains/resident/schema/RegisterResidentInvoiceService.test.js index d9db0096dea..bbd4559e6b7 100644 --- a/apps/condo/domains/resident/schema/RegisterResidentInvoiceService.test.js +++ b/apps/condo/domains/resident/schema/RegisterResidentInvoiceService.test.js @@ -198,7 +198,7 @@ describe('RegisterResidentInvoiceService', () => { code: 'BAD_USER_INPUT', type: 'NO_ACQUIRING_CONTEXT', message: 'The organization hasn\'t set up the marketplace', - messageForUser: 'api.marketplace.registerInvoice.error.noAcquiringContext', + messageForUser: 'api.resident.registerResidentInvoice.NO_ACQUIRING_CONTEXT', }, 'result') }) @@ -239,8 +239,8 @@ describe('RegisterResidentInvoiceService', () => { ), { code: 'BAD_USER_INPUT', type: 'ITEM_FROM_OTHER_ORGANIZATION', - message: 'Item from other organization. Check line 1', - messageForUser: 'api.marketplace.registerInvoice.error.itemFromOtherOrganization', + message: 'Item from other organization. Check line {rowNumber}', + messageForUser: 'api.resident.registerResidentInvoice.ITEM_FROM_OTHER_ORGANIZATION', messageInterpolation: { rowNumber: 1 }, }, 'result') }) @@ -309,7 +309,7 @@ describe('RegisterResidentInvoiceService', () => { code: 'BAD_USER_INPUT', type: 'EMPTY_ROWS', message: 'The invoice contains no rows', - messageForUser: 'api.marketplace.invoice.error.emptyRows', + messageForUser: 'api.marketplace.invoice.EMPTY_ROWS', }, 'result') await expectToThrowGQLError(async () => await registerResidentInvoiceByTestClient( @@ -323,7 +323,7 @@ describe('RegisterResidentInvoiceService', () => { code: 'BAD_USER_INPUT', type: 'EMPTY_ROWS', message: 'The invoice contains no rows', - messageForUser: 'api.marketplace.invoice.error.emptyRows', + messageForUser: 'api.marketplace.invoice.EMPTY_ROWS', }, 'result') }) @@ -361,7 +361,7 @@ describe('RegisterResidentInvoiceService', () => { code: 'BAD_USER_INPUT', type: 'PROHIBITED_INVOICE_PAYMENT_TYPE', message: 'This payment method is prohibited in the selected organization', - messageForUser: 'api.marketplace.invoice.error.prohibitedPaymentType', + messageForUser: 'api.resident.registerResidentInvoice.PROHIBITED_INVOICE_PAYMENT_TYPE', }, 'result') }) }) diff --git a/apps/condo/domains/resident/schema/RegisterResidentServiceConsumerService.test.js b/apps/condo/domains/resident/schema/RegisterResidentServiceConsumerService.test.js index e529ea23fc6..7ee7d6694ed 100644 --- a/apps/condo/domains/resident/schema/RegisterResidentServiceConsumerService.test.js +++ b/apps/condo/domains/resident/schema/RegisterResidentServiceConsumerService.test.js @@ -277,7 +277,7 @@ describe('RegisterResidentServiceConsumers', () => { code: 'BAD_USER_INPUT', type: NOT_FOUND, message: 'Can\'t find billingAccount and any meters with this accountNumber, unitName and address', - messageForUser: 'api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_OR_METER_NOT_FOUND', + messageForUser: 'api.resident.registerServiceConsumers.BILLING_ACCOUNT_OR_METER_NOT_FOUND', }, 'objs') }) @@ -354,7 +354,7 @@ describe('RegisterResidentServiceConsumers', () => { code: 'BAD_USER_INPUT', type: NOT_FOUND, message: 'Can\'t find billingAccount and any meters with this accountNumber, unitName and address', - messageForUser: 'api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_OR_METER_NOT_FOUND', + messageForUser: 'api.resident.registerServiceConsumers.BILLING_ACCOUNT_OR_METER_NOT_FOUND', }, 'objs') }) }) diff --git a/apps/condo/domains/resident/schema/RegisterServiceConsumerService.js b/apps/condo/domains/resident/schema/RegisterServiceConsumerService.js index 932f95f8488..19f4ed67392 100644 --- a/apps/condo/domains/resident/schema/RegisterServiceConsumerService.js +++ b/apps/condo/domains/resident/schema/RegisterServiceConsumerService.js @@ -53,7 +53,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: NOT_FOUND, message: 'Can\'t find billingAccount and any meters with this accountNumber, unitName and address', - messageForUser: 'api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_OR_METER_NOT_FOUND', + messageForUser: 'api.resident.registerServiceConsumers.BILLING_ACCOUNT_OR_METER_NOT_FOUND', }, BILLING_ACCOUNT_NOT_FOUND: { mutation: 'registerServiceConsumer', @@ -61,7 +61,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: NOT_FOUND, message: 'Can\'t find billingAccount and any meters with this accountNumber, unitName and organization combination', - messageForUser: 'api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_NOT_FOUND', + messageForUser: 'api.resident.registerServiceConsumers.BILLING_ACCOUNT_NOT_FOUND', }, ACCOUNT_NUMBER_IS_NOT_SPECIFIED: { mutation: 'registerServiceConsumer', diff --git a/apps/condo/domains/scope/schema/ExportPropertyScopeToExcelService.js b/apps/condo/domains/scope/schema/ExportPropertyScopeToExcelService.js index c77d5417d1a..b8a15d32f76 100644 --- a/apps/condo/domains/scope/schema/ExportPropertyScopeToExcelService.js +++ b/apps/condo/domains/scope/schema/ExportPropertyScopeToExcelService.js @@ -27,7 +27,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: NOTHING_TO_EXPORT, message: 'No property scopes found to export', - messageForUser: 'api.contact.exportContactsToExcel.NOTHING_TO_EXPORT', + messageForUser: 'api.scope.exportPropertyScopeToExcel.NOTHING_TO_EXPORT', }, } diff --git a/apps/condo/domains/scope/schema/PropertyScope.js b/apps/condo/domains/scope/schema/PropertyScope.js index 8ccb604c397..5895f03785c 100644 --- a/apps/condo/domains/scope/schema/PropertyScope.js +++ b/apps/condo/domains/scope/schema/PropertyScope.js @@ -19,7 +19,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: MAX_NAME_LENGTH_ERROR, message: `Maximum size of PropertyScope name exceeded (${MAX_NAME_LENGTH} characters)`, - messageForUser: 'api.propertyScope.MAX_NAME_LENGTH_ERROR', + messageForUser: 'api.scope.propertyScope.MAX_NAME_LENGTH_ERROR', messageInterpolation: { max: MAX_NAME_LENGTH, }, diff --git a/apps/condo/domains/settings/schema/MobileFeatureConfig.js b/apps/condo/domains/settings/schema/MobileFeatureConfig.js index a99fec02aa9..a2f0769eaf8 100644 --- a/apps/condo/domains/settings/schema/MobileFeatureConfig.js +++ b/apps/condo/domains/settings/schema/MobileFeatureConfig.js @@ -19,21 +19,21 @@ const ERRORS = { variable: ['data', 'commonPhone'], type: 'TICKET_SUBMITTING_PHONES_NOT_CONFIGURED', message: 'commonPhone field not specified', - messageForUser: 'api.organization.MobileFeatureConfig.TICKET_SUBMITTING_PHONES_NOT_CONFIGURED', + messageForUser: 'api.settings.mobileFeatureConfig.TICKET_SUBMITTING_PHONES_NOT_CONFIGURED', }, COMMON_PHONE_INVALID: { code: BAD_USER_INPUT, variable: ['data', 'commonPhone'], type: 'COMMON_PHONE_NOT_CONFIGURED', message: 'commonPhone is invalid', - messageForUser: 'api.organization.MobileFeatureConfig.COMMON_PHONE_INVALID', + messageForUser: 'api.settings.mobileFeatureConfig.COMMON_PHONE_INVALID', }, ORGANIZATION_IS_REQUIRED: { code: BAD_USER_INPUT, variable: ['data', 'organization'], type: 'ORGANIZATION_IS_REQUIRED', message: 'The organization is required to create', - messageForUser: 'api.organization.MobileFeatureConfig.ORGANIZATION_IS_REQUIRED', + messageForUser: 'api.settings.MobileFeatureConfig.ORGANIZATION_IS_REQUIRED', }, } diff --git a/apps/condo/domains/ticket/constants/errors.js b/apps/condo/domains/ticket/constants/errors.js index 6ec42a502c0..0760a840ef5 100644 --- a/apps/condo/domains/ticket/constants/errors.js +++ b/apps/condo/domains/ticket/constants/errors.js @@ -6,7 +6,7 @@ const CALL_RECORD_ERRORS = { code: 'BAD_USER_INPUT', type: 'NEGATIVE_TALK_TIME', message: 'Talk time must be positive number', - messageForUser: 'api.callRecord.NEGATIVE_TALK_TIME', + messageForUser: 'api.ticket.callRecord.NEGATIVE_TALK_TIME', variable: ['data', 'talkTime'], }, } @@ -16,7 +16,7 @@ const CALL_RECORD_FRAGMENT_ERRORS = { code: 'BAD_USER_INPUT', type: 'INVALID_TICKET_ORGANIZATION', message: 'The organization of the ticket must be the same as callRecord', - messageForUser: 'api.callRecordFragment.INVALID_TICKET_ORGANIZATION', + messageForUser: 'api.ticket.callRecordFragment.INVALID_TICKET_ORGANIZATION', variable: ['data', 'ticket'], }, } diff --git a/apps/condo/domains/ticket/schema/Incident.js b/apps/condo/domains/ticket/schema/Incident.js index 6a4c34593c9..55776a02a26 100644 --- a/apps/condo/domains/ticket/schema/Incident.js +++ b/apps/condo/domains/ticket/schema/Incident.js @@ -29,14 +29,14 @@ const ERRORS = { type: WRONG_VALUE, variable: ['data', 'workFinish'], message: 'The value of the "workFinish" field must be greater or equal than the "workStart" field', - messageForUser: 'api.incident.WORK_FINISHED_EARLIER_THEN_WORK_STARTED', + messageForUser: 'api.ticket.incident.WORK_FINISHED_EARLIER_THEN_WORK_STARTED', }, WORK_FINISH_MUST_BE_SPECIFIED_IF_NOT_ACTUAL_STATUS: { code: BAD_USER_INPUT, type: WRONG_VALUE, variable: ['data', 'workFinish'], message: '"workFinish" field should be specified if the incident has status "not_actual"', - messageForUser: 'api.incident.WORK_FINISH_MUST_BE_SPECIFIED_IF_NOT_ACTUAL_STATUS', + messageForUser: 'api.ticket.incident.WORK_FINISH_MUST_BE_SPECIFIED_IF_NOT_ACTUAL_STATUS', }, } diff --git a/apps/condo/domains/ticket/schema/IncidentExportTask.js b/apps/condo/domains/ticket/schema/IncidentExportTask.js index 8e56eb7cbb3..c77b513e284 100644 --- a/apps/condo/domains/ticket/schema/IncidentExportTask.js +++ b/apps/condo/domains/ticket/schema/IncidentExportTask.js @@ -25,7 +25,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: WRONG_VALUE, message: 'Status is already completed', - messageForUser: 'api.incidentExportTask.STATUS_IS_ALREADY_COMPLETED', + messageForUser: 'api.ticket.incidentExportTask.STATUS_IS_ALREADY_COMPLETED', mutation: 'updateIncidentExportTask', variable: ['data', 'status'], }, @@ -33,7 +33,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: WRONG_VALUE, message: 'Status is already error', - messageForUser: 'api.incidentExportTask.STATUS_IS_ALREADY_ERROR', + messageForUser: 'api.ticket.incidentExportTask.STATUS_IS_ALREADY_ERROR', mutation: 'updateIncidentExportTask', variable: ['data', 'status'], }, diff --git a/apps/condo/domains/ticket/schema/PredictTicketClassificationService.js b/apps/condo/domains/ticket/schema/PredictTicketClassificationService.js index 9e6c60880fb..5054ea7da65 100644 --- a/apps/condo/domains/ticket/schema/PredictTicketClassificationService.js +++ b/apps/condo/domains/ticket/schema/PredictTicketClassificationService.js @@ -24,21 +24,21 @@ const ERRORS = { code: INTERNAL_ERROR, type: NOT_FOUND, message: 'ticket classifier rule not found', - messageForUser: 'api.user.predictTicketClassification.TICKET_RULE_NOT_FOUND', + messageForUser: 'api.ticket.predictTicketClassification.TICKET_RULE_NOT_FOUND', }, TICKET_PREDICT_REQUEST_FAILED: { query: 'predictTicketClassification', code: INTERNAL_ERROR, type: NOT_FOUND, message: 'ML server response is not successful', - messageForUser: 'api.user.predictTicketClassification.TICKET_RULE_NOT_FOUND', + messageForUser: 'api.ticket.predictTicketClassification.TICKET_RULE_NOT_FOUND', }, ML_SPACE_NOT_CONFIGURED: { query: 'predictTicketClassification', code: INTERNAL_ERROR, type: NOT_FOUND, message: 'ML_SPACE_TICKET_CLASSIFIER env variable needs to have endpoint, authKey, workspace', - messageForUser: 'api.user.predictTicketClassification.ML_SPACE_NOT_CONFIGURED', + messageForUser: 'api.ticket.predictTicketClassification.ML_SPACE_NOT_CONFIGURED', }, } diff --git a/apps/condo/domains/ticket/schema/Ticket.js b/apps/condo/domains/ticket/schema/Ticket.js index ec8b32b0cc5..2cf38cf77d2 100644 --- a/apps/condo/domains/ticket/schema/Ticket.js +++ b/apps/condo/domains/ticket/schema/Ticket.js @@ -160,26 +160,26 @@ const ERRORS = { code: BAD_USER_INPUT, type: WRONG_VALUE, message: '"feedbackValue" must be specified if there is "feedbackAdditionalOptions" or "feedbackComment"', - messageForUser: 'api.ticket.FEEDBACK_VALUE_MUST_BE_SPECIFIED', + messageForUser: 'api.ticket.ticket.FEEDBACK_VALUE_MUST_BE_SPECIFIED', }, QUALITY_CONTROL_VALUE_MUST_BE_SPECIFIED: { code: BAD_USER_INPUT, type: WRONG_VALUE, message: '"qualityControlValue" must be specified if there is "qualityControlAdditionalOptions" or "qualityControlComment"', - messageForUser: 'api.ticket.QUALITY_CONTROL_VALUE_MUST_BE_SPECIFIED', + messageForUser: 'api.ticket.ticket.QUALITY_CONTROL_VALUE_MUST_BE_SPECIFIED', }, TICKET_FOR_PHONE_DAY_LIMIT_REACHED: { code: 'BAD_USER_INPUT', type: 'TICKET_FOR_PHONE_DAY_LIMIT_REACHED', message: 'Please try again tomorrow. You can not create more tickets!', - messageForUser: 'api.ticket.TICKET_FOR_PHONE_DAY_LIMIT_REACHED', + messageForUser: 'api.ticket.ticket.TICKET_FOR_PHONE_DAY_LIMIT_REACHED', messageInterpolation: { ticketLimit: DAILY_TICKET_LIMIT }, }, SAME_TICKET_FOR_PHONE_DAY_LIMIT_REACHED: { code: 'BAD_USER_INPUT', type: 'SAME_TICKET_FOR_PHONE_DAY_LIMIT_REACHED', message: 'You already sent this ticket! You can not create more tickets!', - messageForUser: 'api.ticket.SAME_TICKET_FOR_PHONE_DAY_LIMIT_REACHED', + messageForUser: 'api.ticket.ticket.SAME_TICKET_FOR_PHONE_DAY_LIMIT_REACHED', }, } diff --git a/apps/condo/domains/ticket/schema/TicketAutoAssignment.js b/apps/condo/domains/ticket/schema/TicketAutoAssignment.js index 8df61a39261..2e87b4c4454 100644 --- a/apps/condo/domains/ticket/schema/TicketAutoAssignment.js +++ b/apps/condo/domains/ticket/schema/TicketAutoAssignment.js @@ -13,13 +13,13 @@ const ERRORS = { ASSIGNEE_NOT_FOUND: { code: BAD_USER_INPUT, type: 'ASSIGNEE_NOT_FOUND', - messageForUser: 'api.ticket.TicketAutoAssignment.error.ASSIGNEE_NOT_FOUND', + messageForUser: 'api.ticket.ticketAutoAssignment.ASSIGNEE_NOT_FOUND', message: 'There is no such employee (assignee) in the organization', }, EXECUTOR_NOT_FOUND: { code: BAD_USER_INPUT, type: 'EXECUTOR_NOT_FOUND', - messageForUser: 'api.ticket.TicketAutoAssignment.error.EXECUTOR_NOT_FOUND', + messageForUser: 'api.ticket.ticketAutoAssignment.EXECUTOR_NOT_FOUND', message: 'There is no such employee (executor) in the organization', }, } diff --git a/apps/condo/domains/ticket/schema/TicketDocumentGenerationTask.js b/apps/condo/domains/ticket/schema/TicketDocumentGenerationTask.js index cbeb6d29d43..55c3dd6ca2b 100644 --- a/apps/condo/domains/ticket/schema/TicketDocumentGenerationTask.js +++ b/apps/condo/domains/ticket/schema/TicketDocumentGenerationTask.js @@ -31,7 +31,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: WRONG_VALUE, message: 'Status is already completed', - messageForUser: 'api.ticket.TicketDocumentGenerationTask.STATUS_IS_ALREADY_COMPLETED', + messageForUser: 'api.ticket.ticketDocumentGenerationTask.STATUS_IS_ALREADY_COMPLETED', mutation: 'updateTicketDocumentGenerationTask', variable: ['data', 'status'], }, @@ -39,7 +39,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: WRONG_VALUE, message: 'Status is already error', - messageForUser: 'api.ticket.TicketDocumentGenerationTask.STATUS_IS_ALREADY_ERROR', + messageForUser: 'api.ticket.ticketDocumentGenerationTask.STATUS_IS_ALREADY_ERROR', mutation: 'updateTicketDocumentGenerationTask', variable: ['data', 'status'], }, diff --git a/apps/condo/domains/user/schema/GetAccessTokenByUserIdService.js b/apps/condo/domains/user/schema/GetAccessTokenByUserIdService.js index ff3f200464f..ffa7d1da116 100644 --- a/apps/condo/domains/user/schema/GetAccessTokenByUserIdService.js +++ b/apps/condo/domains/user/schema/GetAccessTokenByUserIdService.js @@ -17,21 +17,21 @@ const ERRORS = { code: INTERNAL_ERROR, type: 'REFRESH_TOKEN_EXPIRED', message: 'SBBOL user refreshToken expired', - messageForUser: 'api.user.getAccessTokenByUserIdService.REFRESH_TOKEN_EXPIRED', + messageForUser: 'api.user.getAccessTokenByUserId.REFRESH_TOKEN_EXPIRED', }, INVALID_USER_ID: { query: 'GetAccessTokenByUserIdService', code: BAD_USER_INPUT, type: 'INVALID_USER_ID', message: 'Received userId must be uuid', - messageForUser: 'api.user.getAccessTokenByUserIdService.INVALID_USER_ID', + messageForUser: 'api.user.getAccessTokenByUserId.INVALID_USER_ID', }, ERROR_GETTING_ACCESS_TOKEN: { query: 'GetAccessTokenByUserIdService', code: INTERNAL_ERROR, type: 'ERROR_GETTING_ACCESS_TOKEN', message: 'Unresolved error in getAccessTokenForUser', - messageForUser: 'api.user.getAccessTokenByUserIdService.ERROR_GETTING_ACCESS_TOKEN', + messageForUser: 'api.user.getAccessTokenByUserId.ERROR_GETTING_ACCESS_TOKEN', }, } diff --git a/apps/condo/lang/en/en.json b/apps/condo/lang/en/en.json index dc1872aef7a..528cd20bcd9 100644 --- a/apps/condo/lang/en/en.json +++ b/apps/condo/lang/en/en.json @@ -1811,14 +1811,14 @@ "meter.import.error.MeterNumberExistInOrganization": "Meter with this number already exists in your organization", "meter.import.error.MeterResourceNotFound": "Meter type was not found according to specified abbreviation in \"Type\" column", "meter.import.error.MeterValueInvalid": "Incorrect format in column \"{columnName}\", must be a positive numeric value", - "meter.import.error.WrongDateFormatMessage": "Incorrect date format in column \"{columnName}\". Use either value of String type in format: \"{format}\", or value of Date type", + "api.meter.registerMetersReadings.INVALID_DATE:": "Incorrect date format in column \"{columnName}\". Use either value of String type in format: \"{format}\", or value of Date type", "meter.import.error.WrongDateOrMonthFormatMessage": "Wrong date format in column \"{columnName}\". Use either value of String formats \"{dateFormat}\" or \"{monthFormat}\" (for month-only); or value of Date type", "meter.import.error.unknownResourceType": "Unknown resource type. Please use one of the following: {knownList}", "meter.import.error.unknownUnitType": "Unknown unit type. Please use one of the following: {knownList}", "meter.import.error.unknownIsAutomatic": "Unknown value for Automatic. Please use one of the following: {knownList}", "meter.import.error.ZeroValuesSpecified": "At least one of values must be specified", - "meter.import.error.AccountNumberInvalidValue": "Account number field is filled incorrectly", - "meter.import.error.MeterNumberInvalidValue": "Meter number field is filled incorrectly", + "api.meter.registerMetersReadings.INVALID_ACCOUNT_NUMBER": "Account number field is filled incorrectly", + "api.meter.registerMetersReadings.INVALID_METER_NUMBER": "Meter number field is filled incorrectly", "meter.import.value.meterResourceType.hotWater": "HW", "meter.import.value.meterResourceType.coldWater": "CW", "meter.import.value.meterResourceType.electricity": "EL", @@ -2605,18 +2605,18 @@ "pay": "Pay", "pages.paymentConfirm.VerifyPaymentAmount": "Verify payment amount", "api.common.WRONG_PHONE_FORMAT": "Wrong phone number format", - "api.contact.CONTACT_DUPLICATE_ERROR": "Contact with this phone number is already registered in this room", + "api.contact.contact.CONTACT_DUPLICATE_ERROR": "Contact with this phone number is already registered in this room", "api.acquiring.exportPaymentsToExcel.NOTHING_TO_EXPORT": "No payments to export", "api.banking.importBankTransactions.INVALID_FILE_FORMAT": "Invalid file format. Error: {message}", "api.banking.importBankTransactions.SOMETHING_WENT_WRONG": "Something went wrong. Try again or ask support", "api.banking.importBankTransactions.ANOTHER_INTEGRATION_IS_USED": "Another integration is used for this bank account, that fetches transactions in a different way. You cannot import transactions from file in this case", "api.banking.importBankTransactions.BANK_ACCOUNT_HAS_NO_INTEGRATION": "For this import operation was found bank account with id=\"{id}\" and it does not have integration. It means that this bank account has been initially used for something different or something goes wrong. In this case it cannot be used to fetch data from file", - "api.banking.BankSyncTask.WRONG_INTEGRATION": "Wrong integration", - "api.banking.BankSyncTask.INVALID_DATE": "Incorrect start or end date of the statement", - "api.banking.BankSyncTask.INCORRECT_DATE_INTERVAL": "Incorrect date interval", - "api.banking.BankSyncTask.ACCOUNT_IS_REQUIRED": "Bank account is required", - "api.banking.BankSyncTask.DISABLED_BANK_INTEGRATION_ORGANIZATION_CONTEXT": "Integration is disabled for current organization", - "api.banking.BankSyncTask.TRANSACTIONS_NOT_ADDED": "Failed to load new transactions. You may have already uploaded them to this report.", + "api.banking.bankSyncTask.WRONG_INTEGRATION": "Wrong integration", + "api.banking.bankSyncTask.INVALID_DATE": "Incorrect start or end date of the statement", + "api.banking.bankSyncTask.INCORRECT_DATE_INTERVAL": "Incorrect date interval", + "api.banking.bankSyncTask.ACCOUNT_IS_REQUIRED": "Bank account is required", + "api.banking.bankSyncTask.DISABLED_BANK_INTEGRATION_ORGANIZATION_CONTEXT": "Integration is disabled for current organization", + "api.banking.bankSyncTask.TRANSACTIONS_NOT_ADDED": "Failed to load new transactions. You may have already uploaded them to this report.", "api.user.PASSWORD_IS_FREQUENTLY_USED": "This password is weak or too obvious please choose something more secure", "api.user.TOO_MANY_REQUESTS": "You have to wait {secondsRemaining} sec. to be able to send request again", "api.user.DAILY_REQUEST_LIMIT_FOR_IP_REACHED": "Too many requests from this ip address. Try again later", @@ -2630,39 +2630,39 @@ "api.user.sendMessageToSupport.WRONG_EMAIL_FORMAT": "Wrong format of specified email", "api.ticket.exportTicketsToExcel.NOTHING_TO_EXPORT": "No tickets to export", "api.ticket.updateResidentTicket.TICKET_NOT_FOUND": "Cannot find Ticket with id \"{ticketId}\" for current user", - "api.ticket.TICKET_FOR_PHONE_DAY_LIMIT_REACHED": "Please try again tomorrow. You are not able to send more then {ticketLimit} tickets per day.", - "api.ticket.SAME_TICKET_FOR_PHONE_DAY_LIMIT_REACHED": "You already sent this ticket.", - "api.ticket.FEEDBACK_VALUE_MUST_BE_SPECIFIED": "When specifying a comment or additional evaluation parameters, you must specify the evaluation itself", - "api.ticket.TicketAutoAssignment.error.ASSIGNEE_NOT_FOUND": "There is no such employee (assignee) in the organization", - "api.ticket.TicketAutoAssignment.error.EXECUTOR_NOT_FOUND": "There is no such employee (executor) in the organization", - "api.ticket.TicketDocumentGenerationTask.STATUS_IS_ALREADY_COMPLETED": "Task already completed successfully", - "api.ticket.TicketDocumentGenerationTask.STATUS_IS_ALREADY_ERROR": "The task has already completed with an error", + "api.ticket.ticket.TICKET_FOR_PHONE_DAY_LIMIT_REACHED": "Please try again tomorrow. You are not able to send more then {ticketLimit} tickets per day.", + "api.ticket.ticket.SAME_TICKET_FOR_PHONE_DAY_LIMIT_REACHED": "You already sent this ticket.", + "api.ticket.ticket.FEEDBACK_VALUE_MUST_BE_SPECIFIED": "When specifying a comment or additional evaluation parameters, you must specify the evaluation itself", + "api.ticket.ticketAutoAssignment.ASSIGNEE_NOT_FOUND": "There is no such employee (assignee) in the organization", + "api.ticket.ticketAutoAssignment.EXECUTOR_NOT_FOUND": "There is no such employee (executor) in the organization", + "api.ticket.ticketDocumentGenerationTask.STATUS_IS_ALREADY_COMPLETED": "Task already completed successfully", + "api.ticket.ticketDocumentGenerationTask.STATUS_IS_ALREADY_ERROR": "The task has already completed with an error", "api.property.exportPropertiesToExcel.NOTHING_TO_EXPORT": "No properties are found to export for current organization", - "api.property.create.sameAddressError": "Property with the same address already exists in selected organization", + "api.property.property.SAME_ADDRESS": "Property with the same address already exists in selected organization", "api.meter.exportMeterReadings.NOTHING_TO_EXPORT": "No meter readings to export for specified organization", - "api.meter.METER_NUMBER_HAVE_INVALID_VALUE": "Meter number field value cannot be empty", - "api.meter.METER_ACCOUNT_NUMBER_HAVE_INVALID_VALUE": "Account number field value cannot be empty", - "api.meter.METER_RESOURCE_OWNED_BY_ANOTHER_ORGANIZATION": "This resource is owned by another organization. Please contact tech support if you want to resolve this problem", - "api.meter.SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION": "Meter with same number and resource exist in current organization and linked with account number {accountNumbersCsv}", - "api.meter.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT": "Meter with same account number exist in current organization in unit {unitsCsv}", + "api.meter.meter.METER_NUMBER_HAVE_INVALID_VALUE": "Meter number field value cannot be empty", + "api.meter.meter.METER_ACCOUNT_NUMBER_HAVE_INVALID_VALUE": "Account number field value cannot be empty", + "api.meter.meter.METER_RESOURCE_OWNED_BY_ANOTHER_ORGANIZATION": "This resource is owned by another organization. Please contact tech support if you want to resolve this problem", + "api.meter.meter.SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION": "Meter with same number and resource exist in current organization and linked with account number {accountNumbersCsv}", + "api.meter.meter.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT": "Meter with same account number exist in current organization in unit {unitsCsv}", "api.meter.NUMBER_OF_TARIFFS_NOT_VALID": "Number of tariffs should be an integer from 1 to 4, but {value} passed", - "api.meter.MeterReportingPeriod.INVALID_FINISH": "The \"finish\" field can take values in the range from 1 to 31", - "api.meter.MeterReportingPeriod.INVALID_START": "The \"start\" field can take values in the range from 1 to 31", - "api.meter.MeterReportingPeriod.ORGANIZATION_IS_REQUIRED": "Organization is required for create meter reading reporting period", - "api.meter.MeterReportingPeriod.PROPERTY_NOT_FOUND": "There is no such property in the organization", + "api.meter.meterReportingPeriod.INVALID_FINISH": "The \"finish\" field can take values in the range from 1 to 31", + "api.meter.meterReportingPeriod.INVALID_START": "The \"start\" field can take values in the range from 1 to 31", + "api.meter.meterReportingPeriod.ORGANIZATION_IS_REQUIRED": "Organization is required for create meter reading reporting period", + "api.meter.meterReportingPeriod.PROPERTY_NOT_FOUND": "There is no such property in the organization", "api.meter.MeterReading.INVALID_VALUE": "The passed value should be more or equal to the previous one", "api.meter.registerMetersReadings.TOO_MUCH_READINGS": "Too much readings. {sentCount} sent, limit is {limit}.", "api.meter.registerMetersReadings.ORGANIZATION_NOT_FOUND": "Organization not found", "api.meter.registerMetersReadings.PROPERTY_NOT_FOUND": "Property not found", "api.meter.registerMetersReadings.INVALID_METER_VALUES": "Invalid values: {valuesList}", "api.meter.registerMetersReadings.MULTIPLE_METERS_FOUND": "Multiple meters found ({count})", - "api.meterReading.METER_READING_DATE_IN_FUTURE": "Reading date ({givenDate}) can not be from the future", - "api.meterReading.METER_READING_FEW_VALUES": "Meter {meterNumber} has {numberOfTariffs} tariff(s), please fill next fields: {fieldsNames}", - "api.meterReading.METER_READING_EXTRA_VALUES": "Meter {meterNumber} has {numberOfTariffs} tariff(s), please remove next fields: {fieldsNames}", - "api.marketplace.MarketCategory.MAXIMUM_DEPTH_REACHED": "The depth of category inheritance should be no more than 2", - "api.marketplace.MarketCategory.CANNOT_CONNECT_TO_ITSELF": "Cannot connect to itself", - "api.contact.exportContactsToExcel.NOTHING_TO_EXPORT": "No contacts found for export", - "api.propertyScope.MAX_NAME_LENGTH_ERROR": "Exceeded the maximum number of characters in the title ({max} characters)", + "api.meter.meterReading.METER_READING_DATE_IN_FUTURE": "Reading date ({givenDate}) can not be from the future", + "api.meter.meterReading.METER_READING_FEW_VALUES": "Meter {meterNumber} has {numberOfTariffs} tariff(s), please fill next fields: {fieldsNames}", + "api.meter.meterReading.METER_READING_EXTRA_VALUES": "Meter {meterNumber} has {numberOfTariffs} tariff(s), please remove next fields: {fieldsNames}", + "api.marketplace.marketCategory.MAXIMUM_DEPTH_REACHED": "The depth of category inheritance should be no more than 2", + "api.marketplace.marketCategory.CANNOT_CONNECT_TO_ITSELF": "Cannot connect to itself", + "api.scope.exportPropertyScopeToExcel.NOTHING_TO_EXPORT": "No contacts found for export", + "api.scope.propertyScope.MAX_NAME_LENGTH_ERROR": "Exceeded the maximum number of characters in the title ({max} characters)", "api.propertyScope.exportPropertyScopesToExcel.NOTHING_TO_EXPORT": "No property scopes found for export", "api.user.authenticateUserWithPhoneAndPassword.WRONG_PASSWORD": "Wrong password", "api.user.authenticateUserWithPhoneAndPassword.USER_NOT_FOUND": "User not found by specified phone number", @@ -2684,12 +2684,12 @@ "api.user.completeConfirmPhoneAction.SMS_CODE_EXPIRED": "SMS code expired, try to verify phone number again", "api.user.completeConfirmPhoneAction.SMS_CODE_MAX_RETRIES_REACHED": "Max retries reached for SMS code confirmation. Try to initiate phone confirmation again", "api.user.completeConfirmPhoneAction.SMS_CODE_VERIFICATION_FAILED": "SMS code verification mismatch", - "api.organization.ReplaceOrganizationEmployeeRole.ORGANIZATION_NOT_FOUND": "Organization not found", - "api.organization.ReplaceOrganizationEmployeeRole.OLD_ROLE_NOT_FOUND": "Old role not found in your organization", - "api.organization.ReplaceOrganizationEmployeeRole.NEW_ROLE_NOT_FOUND": "New role not found in your organization", - "api.organization.ReplaceOrganizationEmployeeRole.DEFAULT_ROLE_CANNOT_BE_DELETED": "The default role cannot be deleted", - "api.organization.ReplaceOrganizationEmployeeRole.ROLES_MUST_BE_DIFFERENT": "The new and old roles cannot be the same", - "api.organization.ReplaceOrganizationEmployeeRole.ROLES_ARE_BEING_PROCESSED": "These roles are already being processed. Please try again a little later", + "api.organization.replaceOrganizationEmployeeRole.ORGANIZATION_NOT_FOUND": "Organization not found", + "api.organization.replaceOrganizationEmployeeRole.OLD_ROLE_NOT_FOUND": "Old role not found in your organization", + "api.organization.replaceOrganizationEmployeeRole.NEW_ROLE_NOT_FOUND": "New role not found in your organization", + "api.organization.replaceOrganizationEmployeeRole.DEFAULT_ROLE_CANNOT_BE_DELETED": "The default role cannot be deleted", + "api.organization.replaceOrganizationEmployeeRole.ROLES_MUST_BE_DIFFERENT": "The new and old roles cannot be the same", + "api.organization.replaceOrganizationEmployeeRole.ROLES_ARE_BEING_PROCESSED": "These roles are already being processed. Please try again a little later", "api.organization.inviteNewOrganizationEmployee.ALREADY_INVITED_EMAIL": "Employee with same email is already in the organization", "api.organization.inviteNewOrganizationEmployee.ALREADY_INVITED_PHONE": "Employee with same phone is already in the organization", "api.organization.inviteNewOrganizationEmployee.UNABLE_TO_REGISTER_USER": "Unable to register user", @@ -2697,39 +2697,39 @@ "api.organization.reInviteOrganizationEmployee.USER_NOT_FOUND": "Could not find user using specified contacts", "api.organization.reInviteOrganizationEmployee.EMPLOYEE_NOT_FOUND": "Could not employee using specified contacts", "api.organization.reInviteOrganizationEmployee.ALREADY_ACCEPTED_INVITATION": "Specified employee has already accepted invitation", - "api.organizationEmployee.NOT_FOUND_ROLE": "Role not found for your organization", - "api.organizationEmployee.ALREADY_INVITED_EMAIL": "Employee with same email is already in the organization", - "api.organizationEmployee.ALREADY_INVITED_PHONE": "Employee with same phone is already in the organization", - "api.organization.OrganizationEmployeeRole.ROLE_NAME_ALREADY_EXIST": "A role with the same name already exists", - "api.organization.OrganizationEmployeeRole.INVALID_ROLE_NAME_LENGTH": "The length of the role name can be from {min} to {max} characters", - "api.organization.OrganizationEmployeeRole.INVALID_ROLE_DESCRIPTION_LENGTH": "Role description length cannot be more than {max} characters", + "api.organization.organizationEmployee.NOT_FOUND_ROLE": "Role not found for your organization", + "api.organization.organizationEmployee.ALREADY_INVITED_EMAIL": "Employee with same email is already in the organization", + "api.organization.organizationEmployee.ALREADY_INVITED_PHONE": "Employee with same phone is already in the organization", + "api.organization.organizationEmployeeRole.ROLE_NAME_ALREADY_EXIST": "A role with the same name already exists", + "api.organization.organizationEmployeeRole.INVALID_ROLE_NAME_LENGTH": "The length of the role name can be from {min} to {max} characters", + "api.organization.organizationEmployeeRole.INVALID_ROLE_DESCRIPTION_LENGTH": "Role description length cannot be more than {max} characters", "api.common.INVALID_PHONE_NUMBER_FORMAT": "Invalid phone number format", "api.common.WRONG_PERCENT_VALUE": "Invalid percent value", "api.banking.createBankAccountRequest.INCORRECT_PROPERTY_ID": "Incorrect propertyId was provided. Please check that this id related to passed organizationId", - "api.incident.WORK_FINISHED_EARLIER_THEN_WORK_STARTED": "The end of the work cannot be earlier than the start", - "api.incident.WORK_FINISH_MUST_BE_SPECIFIED_IF_NOT_ACTUAL_STATUS": "The end of the work should be specified if the incident has status not actual", - "api.incidentExportTask.STATUS_IS_ALREADY_COMPLETED": "Task already completed successfully", - "api.incidentExportTask.STATUS_IS_ALREADY_ERROR": "The task has already completed with an error", - "api.newsItemRecipientsExportTask.STATUS_IS_ALREADY_COMPLETED": "Task already completed successfully", - "api.newsItemRecipientsExportTask.STATUS_IS_ALREADY_ERROR": "The task has already completed with an error", - "api.newsItem.EMPTY_VALID_BEFORE_DATE": "Validity date is required", - "api.newsItem.EDIT_DENIED_ALREADY_SENT": "You cannot edit the news item which already been sent", - "api.newsItem.EDIT_DENIED_PUBLISHED": "You can not edit published news item", - "api.newsItem.VALIDITY_DATE_LESS_THAN_SEND_DATE": "The validity date is less than send date", - "api.newsItem.PROFANITY_TITLE_DETECTED_MOT_ERF_KER": "Profanity in title detected", - "api.newsItem.PROFANITY_BODY_DETECTED_MOT_ERF_KER": "Profanity in body detected", - "api.newsItem.WRONG_SEND_DATE": "Wrong send date", + "api.ticket.incident.WORK_FINISHED_EARLIER_THEN_WORK_STARTED": "The end of the work cannot be earlier than the start", + "api.ticket.incident.WORK_FINISH_MUST_BE_SPECIFIED_IF_NOT_ACTUAL_STATUS": "The end of the work should be specified if the incident has status not actual", + "api.ticket.incidentExportTask.STATUS_IS_ALREADY_COMPLETED": "Task already completed successfully", + "api.ticket.incidentExportTask.STATUS_IS_ALREADY_ERROR": "The task has already completed with an error", + "api.news.newsItemRecipientsExportTask.STATUS_IS_ALREADY_COMPLETED": "Task already completed successfully", + "api.news.newsItemRecipientsExportTask.STATUS_IS_ALREADY_ERROR": "The task has already completed with an error", + "api.news.newsItem.EMPTY_VALID_BEFORE_DATE": "Validity date is required", + "api.news.newsItem.EDIT_DENIED_ALREADY_SENT": "You cannot edit the news item which already been sent", + "api.news.newsItem.EDIT_DENIED_PUBLISHED": "You can not edit published news item", + "api.news.newsItem.VALIDITY_DATE_LESS_THAN_SEND_DATE": "The validity date is less than send date", + "api.news.newsItem.PROFANITY_TITLE_DETECTED_MOT_ERF_KER": "Profanity in title detected", + "api.news.newsItem.PROFANITY_BODY_DETECTED_MOT_ERF_KER": "Profanity in body detected", + "api.news.newsItem.WRONG_SEND_DATE": "Wrong send date", "api.newsItem.EMPTY_NEWS_ITEM_SCOPE": "Empty scope", "api.newsItem.UNIT_NAME_WITHOUT_UNIT_TYPE": "Unit name set without unit type", - "api.newsItem.getNewsSharingRecipients.NOT_NEWS_SHARING_APP": "Provided b2bAppContext.app is not a NewsSharing miniapp", - "api.newsItem.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_FAILED": "Could not get a successful response from NewsSharing miniapp. Please check the network and url configuration", - "api.newsItem.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_BAD_RESPONSE": "Response from NewsSharing miniapp was successful, but the data format was incorrect. Please consult with miniapp developer", - "api.callRecord.NEGATIVE_TALK_TIME": "Talk time must be greater or equal than 0", - "api.callRecordFragment.INVALID_TICKET_ORGANIZATION": "Ticket must be from the same organization as call record", - "api.newsItem.NO_NEWS_ITEM_SCOPES": "Scope-less news item publishing is forbidden", + "api.news.getNewsSharingRecipients.NOT_NEWS_SHARING_APP": "Provided b2bAppContext.app is not a NewsSharing miniapp", + "api.news.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_FAILED": "Could not get a successful response from NewsSharing miniapp. Please check the network and url configuration", + "api.news.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_BAD_RESPONSE": "Response from NewsSharing miniapp was successful, but the data format was incorrect. Please consult with miniapp developer", + "api.ticket.callRecord.NEGATIVE_TALK_TIME": "Talk time must be greater or equal than 0", + "api.ticket.callRecordFragment.INVALID_TICKET_ORGANIZATION": "Ticket must be from the same organization as call record", + "api.news.newsItem.NO_NEWS_ITEM_SCOPES": "Scope-less news item publishing is forbidden", "api.ticket.QUALITY_CONTROL_ADDITIONAL_OPTION_DOES_NOT_MATCH_QUALITY_CONTROL_VALUE": "Additional quality control parameters must match the specified scoring", - "api.ticket.QUALITY_CONTROL_VALUE_MUST_BE_SPECIFIED": "When specifying a comment or additional evaluation parameters, you must specify the evaluation itself", - "api.billing.error.alreadyPaid": "Receipt already paid", + "api.ticket.ticket.QUALITY_CONTROL_VALUE_MUST_BE_SPECIFIED": "When specifying a comment or additional evaluation parameters, you must specify the evaluation itself", + "api.billing.billingReceipt.RECEIPT_ALREADY_PAID_ERROR": "Receipt already paid", "api.billing.sendNewReceiptMessagesToResidentScopes.INVALID_PERIOD_PROVIDED": "Please provide proper period not before start of previous and not later than start of current month, valid format is YYYY-MM-DD", "api.billing.sendNewReceiptMessagesToResidentScopes.INVALID_BILLING_CONTEXT_PROVIDED": "Please provide existing non-deleted billing integration organization context id", "api.billing.sendNewReceiptMessagesToResidentScopes.INVALID_BILLING_CATEGORY_PROVIDED": "Please provide existing non-deleted billing category id", @@ -2737,8 +2737,8 @@ "api.billing.sendNewReceiptMessagesToResidentScopes.INVALID_BILLING_PROPERTY_PROVIDED": "All provided billing properties in scopes should be non-deleted & connected to organization of the billing context", "api.billing.registerBillingReceiptFile.MULTIPLE_BILLING_RECEIPTS_FOUND": "There is more then one BillingReceipt found for this BillingReceiptFile", "api.billing.registerBillingReceiptFile.NO_RECEIPTS_FOUND": "There is no BillingReceipt for this BillingReceiptFile", - "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_NOT_FOUND": "No receipts or meters related to the entered account number were found. Please contact the management company.", - "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_OR_METER_NOT_FOUND": "No receipts or meters related to the entered account number were found. Please contact the management company.", + "api.resident.registerServiceConsumers.BILLING_ACCOUNT_NOT_FOUND": "No receipts or meters related to the entered account number were found. Please contact the management company.", + "api.resident.registerServiceConsumers.BILLING_ACCOUNT_OR_METER_NOT_FOUND": "No receipts or meters related to the entered account number were found. Please contact the management company.", "api.resident.sendMessageToResidentScopes.SCOPES_IS_EMPTY": "Scopes could not be empty", "api.resident.registerResident.ADDRESS_NOT_FOUND": "Address was not found", "api.miniapp.sendB2CAppPushMessage.USER_NOT_FOUND": "Unable to find user by provided id.", @@ -2747,8 +2747,8 @@ "api.miniapp.sendB2CAppPushMessage.DV_VERSION_MISMATCH": "Wrong value for data version number", "api.miniapp.sendB2CAppPushMessage.WRONG_SENDER_FORMAT": "Invalid format of \"sender\" field value. {details}", "api.miniapp.sendB2CAppPushMessage.APP_IN_BLACK_LIST": "Could not send notifications for the blacklisted app", - "api.analytics.overviewDashboard.FEATURE_IS_DISABLED": "This feature is unavailable for your organization", - "api.tourStep.update.updateCompletedStepType": "You can not update status of completed tour step", + "api.analytics.getOverviewDashboard.FEATURE_IS_DISABLED": "This feature is unavailable for your organization", + "api.onboarding.tourStep.UPDATE_COMPLETED_STEP_TYPE": "You can not update status of completed tour step", "api.onboarding.syncTourSteps.TOUR_STEPS_NOT_FOUND": "Tour steps not found for this organization", "api.document.WRONG_PROPERTY_ORGANIZATION": "Property has different organization", "excelExport.header.contacts.forAllTime": "Contacts for all time", @@ -3125,24 +3125,24 @@ "incident.hints.more.label": "More details", "timezone.msk": "MSK", "api.marketplace.invoice.error.noReceivers": "Nobody sees this invoice. Please set full address or account number.", - "api.marketplace.invoice.error.alreadyPaid": "Changing of paid invoice is forbidden", - "api.marketplace.invoice.error.alreadyCanceled": "Changing of canceled invoice is forbidden", - "api.marketplace.invoice.error.emptyRows": "The invoice contains no rows", - "api.marketplace.invoice.error.rows.count": "Count can't be less than 1. Check line {rowNumber}.", - "api.marketplace.invoice.error.rows.toPay": "Price can't be less than 0. Check line {rowNumber}.", - "api.marketplace.invoice.error.prohibitedPaymentType": "This payment method is prohibited in the selected organization", - "api.marketplace.MarketItemPrice.error.INVALID_SALES_TAX_PERCENT": "Sales tax must be positive, but not more than 100. Check line {rowNumber}.", - "api.marketplace.MarketItemPrice.error.INVALID_PRICE": "The price cannot be less than 0. Check line {rowNumber}.", - "api.marketplace.MarketItemPrice.error.EMPTY_PRICE": "Price cannot be empty.", - "api.marketplace.MarketItemPrice.error.ORGANIZATION_IN_PROPERTY_AND_MARKET_ITEM_PRICE_NOT_MATCHED": "Cannot create scope with property from one organization and market item from another organization.", - "api.marketplace.registerInvoice.error.noAcquiringContext": "The organization hasn't set up the marketplace", - "api.marketplace.registerInvoice.error.itemFromOtherOrganization": "Item from other organization. Check line {rowNumber}", + "api.marketplace.invoice.ALREADY_PAID": "Changing of paid invoice is forbidden", + "api.marketplace.invoice.ALREADY_CANCELED": "Changing of canceled invoice is forbidden", + "api.marketplace.invoice.EMPTY_ROWS": "The invoice contains no rows", + "api.marketplace.invoice.WRONG_COUNT": "Count can't be less than 1. Check line {rowNumber}.", + "api.marketplace.invoice.WRONG_PRICE": "Price can't be less than 0. Check line {rowNumber}.", + "api.resident.registerResidentInvoice.PROHIBITED_INVOICE_PAYMENT_TYPE": "This payment method is prohibited in the selected organization", + "api.marketplace.marketItemPrice.INVALID_SALES_TAX_PERCENT": "Sales tax must be positive, but not more than 100. Check line {rowNumber}.", + "api.marketplace.marketItemPrice.INVALID_PRICE": "The price cannot be less than 0. Check line {rowNumber}.", + "api.marketplace.marketItemPrice.EMPTY_PRICE": "Price cannot be empty.", + "api.marketplace.marketItemPrice.ORGANIZATION_IN_PROPERTY_AND_MARKET_ITEM_PRICE_NOT_MATCHED": "Cannot create scope with property from one organization and market item from another organization.", + "api.resident.registerResidentInvoice.NO_ACQUIRING_CONTEXT": "The organization hasn't set up the marketplace", + "api.resident.registerResidentInvoice.ITEM_FROM_OTHER_ORGANIZATION": "Item from other organization. Check line {rowNumber}", "marketplace.invoice.newTicket.details": "The paid service ordered", - "api.marketplace.invoice.error.NoFinishedAcquiringContext": "The organization has not finished the configuration of the marketplace", - "api.marketplace.invoice.error.editPublishedForbidden": "Only the status \"Canceled\" and \"INVOICE_STATUS_PAID\" can be updated by the published invoice", - "api.marketplace.invoice.error.clientDataDoesNotMatchTicket": "Address and contact data must match the data from the ticket to which the invoice is linked", - "api.marketplace.invoice.error.forbidUpdateTicket": "You cannot update ticket in invoice that is already linked to the ticket", - "api.marketplace.invoice.error.PublishingWithoutDefinedPricesForbidden": "Can't publish invoice without defined prices", + "api.marketplace.invoice.NO_FINISHED_ACQUIRING_CONTEXT": "The organization has not finished the configuration of the marketplace", + "api.marketplace.invoice.FORBID_EDIT_PUBLISHED": "Only the status \"Canceled\" and \"INVOICE_STATUS_PAID\" can be updated by the published invoice", + "api.marketplace.invoice.CLIENT_DATA_DOES_NOT_MATCH_TICKET": "Address and contact data must match the data from the ticket to which the invoice is linked", + "api.marketplace.invoice.FORBID_UPDATE_TICKET": "You cannot update ticket in invoice that is already linked to the ticket", + "api.marketplace.invoice.PUBLISHING_WITHOUT_DEFINED_PRICES_FORBIDDEN": "Can't publish invoice without defined prices", "acquiringReceipt.title": "Payment for housing and communal services", "acquiringReceipt.total": "Total", "acquiringReceipt.invoice.title": "Invoice #{number}, {date}", @@ -3154,8 +3154,8 @@ "acquiringReceipt.invoice.row.count": "Count", "acquiringReceipt.invoice.row.vatPercent": "VAT", "acquiringReceipt.invoice.row.amount": "Amount", - "api.acquiring.multiPayment.error.receiptsWithInvoices": "Receipts and invoices are forbidden to be together", - "api.acquiring.payment.error.paymentAmountLessThanMinimum": "Payment amount must be at least {minimumPaymentAmount}", - "api.acquiring.payment.error.paymentAmountGreaterThanMaximum": "Payment amount must not exceed {maximumPaymentAmount}" + "api.acquiring.multiPayment.RECEIPTS_WITH_INVOICES_FORBIDDEN": "Receipts and invoices are forbidden to be together", + "api.acquiring.payment.PAYMENT_AMOUNT_LESS_THAN_MINIMUM": "Payment amount must be at least {minimumPaymentAmount}", + "api.acquiring.payment.PAYMENT_AMOUNT_GREATER_THAN_MAXIMUM": "Payment amount must not exceed {maximumPaymentAmount}" } diff --git a/apps/condo/lang/ru/ru.json b/apps/condo/lang/ru/ru.json index 6a091cd59a5..676d84faae2 100644 --- a/apps/condo/lang/ru/ru.json +++ b/apps/condo/lang/ru/ru.json @@ -1811,14 +1811,14 @@ "meter.import.error.MeterNumberExistInOrganization": "Прибор учета с таким номером уже существует в вашей организации", "meter.import.error.MeterResourceNotFound": "Не найден тип счётчика по указанной аббревиатуре", "meter.import.error.MeterValueInvalid": "Неверное значение в столбце \"{columnName}\", должно быть положительное число", - "meter.import.error.WrongDateFormatMessage": "Неверное значение даты в столбце \"{columnName}\". Используйте значение с типом Строка в формате \"{format}\", либо значение с типом Дата", + "api.meter.registerMetersReadings.INVALID_DATE:": "Неверное значение даты в столбце \"{columnName}\". Используйте значение с типом Строка в формате \"{format}\", либо значение с типом Дата", "meter.import.error.WrongDateOrMonthFormatMessage": "Неверное значение даты в столбце \"{columnName}\". Используйте значение с типом Строка в форматах \"{dateFormat}\" или \"{monthFormat}\" (для указания только месяца); либо значение с типом Дата", "meter.import.error.unknownResourceType": "Неизвестный тип счетчика. Используйте один из списка: {knownList}", "meter.import.error.unknownUnitType": "Неизвестный тип помещения. Используйте один из списка: {knownList}", "meter.import.error.unknownIsAutomatic": "Неизвестное значение в поле \"Автоматический\". Используйте одно из списка: {knownList}", "meter.import.error.ZeroValuesSpecified": "Должно быть указано как минимум одно из показаний", - "meter.import.error.AccountNumberInvalidValue": "Указан некорректный лицевой счет", - "meter.import.error.MeterNumberInvalidValue": "Указан некорректный номер счетчика", + "api.meter.registerMetersReadings.INVALID_ACCOUNT_NUMBER": "Указан некорректный лицевой счет", + "api.meter.registerMetersReadings.INVALID_METER_NUMBER": "Указан некорректный номер счетчика", "meter.import.value.meterResourceType.hotWater": "ГВС", "meter.import.value.meterResourceType.coldWater": "ХВС", "meter.import.value.meterResourceType.electricity": "ЭЛ", @@ -2605,18 +2605,18 @@ "pay": "Оплатить", "pages.paymentConfirm.VerifyPaymentAmount": "Проверьте сумму платежа", "api.common.WRONG_PHONE_FORMAT": "Неверный формат номера телефона", - "api.contact.CONTACT_DUPLICATE_ERROR": "Контакт с таким номером телефона уже зарегистрирован в этом помещении", + "api.contact.contact.CONTACT_DUPLICATE_ERROR": "Контакт с таким номером телефона уже зарегистрирован в этом помещении", "api.acquiring.exportPaymentsToExcel.NOTHING_TO_EXPORT": "Не найдены платежи для экспорта", "api.banking.importBankTransactions.INVALID_FILE_FORMAT": "Неверный формат файла. Ошибка: {message}", "api.banking.importBankTransactions.SOMETHING_WENT_WRONG": "Что-то пошло не так. Попробуйте снова или обратитесь тех-поддержку", "api.banking.importBankTransactions.ANOTHER_INTEGRATION_IS_USED": "К данному счёту подключена другая интеграция, которая получает транзакции другим способом. В данном случае нельзя использовать получение транзакций из файла", "api.banking.importBankTransactions.BANK_ACCOUNT_HAS_NO_INTEGRATION": "Для данной операции импорта был найден расчётный счёт с id=\"{id}\", у которого нет интеграциии. Это значит что данный счёт мог использоваться как-то по-другому. В данном случае он не может использоваться для получения данных из файла", - "api.banking.BankSyncTask.WRONG_INTEGRATION": "Неверная интеграция", - "api.banking.BankSyncTask.INVALID_DATE": "Некорректная дата начала или конца выписки", - "api.banking.BankSyncTask.INCORRECT_DATE_INTERVAL": "Некорректный период", - "api.banking.BankSyncTask.ACCOUNT_IS_REQUIRED": "Требуется расчетный счет", - "api.banking.BankSyncTask.DISABLED_BANK_INTEGRATION_ORGANIZATION_CONTEXT": "Интеграция отключена для текущей организации", - "api.banking.BankSyncTask.TRANSACTIONS_NOT_ADDED": "Не удалось загрузить новые транзакции. Возможно вы уже загрузили их в этот отчет", + "api.banking.bankSyncTask.WRONG_INTEGRATION": "Неверная интеграция", + "api.banking.bankSyncTask.INVALID_DATE": "Некорректная дата начала или конца выписки", + "api.banking.bankSyncTask.INCORRECT_DATE_INTERVAL": "Некорректный период", + "api.banking.bankSyncTask.ACCOUNT_IS_REQUIRED": "Требуется расчетный счет", + "api.banking.bankSyncTask.DISABLED_BANK_INTEGRATION_ORGANIZATION_CONTEXT": "Интеграция отключена для текущей организации", + "api.banking.bankSyncTask.TRANSACTIONS_NOT_ADDED": "Не удалось загрузить новые транзакции. Возможно вы уже загрузили их в этот отчет", "api.user.PASSWORD_IS_FREQUENTLY_USED": "Пароль слишком простой. Нужно использовать что-то более безопасное", "api.user.TOO_MANY_REQUESTS": "Подождите {secondsRemaining} сек., чтобы отправить запрос снова", "api.user.DAILY_REQUEST_LIMIT_FOR_IP_REACHED": "С вашего IP-адреса поступает очень много запросов, попробуйте позже", @@ -2630,39 +2630,39 @@ "api.user.sendMessageToSupport.WRONG_EMAIL_FORMAT": "Неверный формат адреса электронной почты", "api.ticket.exportTicketsToExcel.NOTHING_TO_EXPORT": "Нет заявок для экспорта", "api.ticket.updateResidentTicket.TICKET_NOT_FOUND": "Не найдена заявка с id \"{ticketId}\" для текущего пользователя", - "api.ticket.TICKET_FOR_PHONE_DAY_LIMIT_REACHED": "Попробуйте завтра. Сегодня управляющая компания уже получила {ticketLimit} заявок от вас. На главной странице раздела «Заявки» можно уточнить статус по каждой из них.", - "api.ticket.SAME_TICKET_FOR_PHONE_DAY_LIMIT_REACHED": "Вы уже отправляли эту заявку. Управляющая компания уже занимается вашей проблемой. Уточнить статус можно на главной странице раздела «Заявки».", - "api.ticket.FEEDBACK_VALUE_MUST_BE_SPECIFIED": "При указании комментария или дополнительных параметров оценки нужно указать саму оценку", - "api.ticket.TicketAutoAssignment.error.ASSIGNEE_NOT_FOUND": "Такого сотрудника нет в организации (ответственный)", - "api.ticket.TicketAutoAssignment.error.EXECUTOR_NOT_FOUND": "Такого сотрудника нет в организации (исполнитель)", - "api.ticket.TicketDocumentGenerationTask.STATUS_IS_ALREADY_COMPLETED": "Задача уже успешно выполнена", - "api.ticket.TicketDocumentGenerationTask.STATUS_IS_ALREADY_ERROR": "Задача уже завершилась с ошибкой", + "api.ticket.ticket.TICKET_FOR_PHONE_DAY_LIMIT_REACHED": "Попробуйте завтра. Сегодня управляющая компания уже получила {ticketLimit} заявок от вас. На главной странице раздела «Заявки» можно уточнить статус по каждой из них.", + "api.ticket.ticket.SAME_TICKET_FOR_PHONE_DAY_LIMIT_REACHED": "Вы уже отправляли эту заявку. Управляющая компания уже занимается вашей проблемой. Уточнить статус можно на главной странице раздела «Заявки».", + "api.ticket.ticket.FEEDBACK_VALUE_MUST_BE_SPECIFIED": "При указании комментария или дополнительных параметров оценки нужно указать саму оценку", + "api.ticket.ticketAutoAssignment.ASSIGNEE_NOT_FOUND": "Такого сотрудника нет в организации (ответственный)", + "api.ticket.ticketAutoAssignment.EXECUTOR_NOT_FOUND": "Такого сотрудника нет в организации (исполнитель)", + "api.ticket.ticketDocumentGenerationTask.STATUS_IS_ALREADY_COMPLETED": "Задача уже успешно выполнена", + "api.ticket.ticketDocumentGenerationTask.STATUS_IS_ALREADY_ERROR": "Задача уже завершилась с ошибкой", "api.property.exportPropertiesToExcel.NOTHING_TO_EXPORT": "Нет домов для экспорта, которые связаны с данной организацией", - "api.property.create.sameAddressError": "Дом с таким адресом уже создан в выбранной организации", + "api.property.property.SAME_ADDRESS": "Дом с таким адресом уже создан в выбранной организации", "api.meter.exportMeterReadings.NOTHING_TO_EXPORT": "Нет показаний ИПУ для экспорта, которые связаны с указанной организацией", - "api.meter.METER_NUMBER_HAVE_INVALID_VALUE": "Номер счетчика не может быть пустым", - "api.meter.METER_ACCOUNT_NUMBER_HAVE_INVALID_VALUE": "Лицевой счет не может быть пустым", - "api.meter.METER_RESOURCE_OWNED_BY_ANOTHER_ORGANIZATION": "Данным ресурсом по текущему адресу владеет другая УК. Пожалуйста, обратитесь в поддержку для решения этого вопроса", - "api.meter.SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION": "ИПУ с таким номером и ресурсом уже есть в организации на лицевом счете {accountNumbersCsv}", - "api.meter.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT": "ИПУ с таким лицевым счетом уже есть в организации в помещении {unitsCsv}", + "api.meter.meter.METER_NUMBER_HAVE_INVALID_VALUE": "Номер счетчика не может быть пустым", + "api.meter.meter.METER_ACCOUNT_NUMBER_HAVE_INVALID_VALUE": "Лицевой счет не может быть пустым", + "api.meter.meter.METER_RESOURCE_OWNED_BY_ANOTHER_ORGANIZATION": "Данным ресурсом по текущему адресу владеет другая УК. Пожалуйста, обратитесь в поддержку для решения этого вопроса", + "api.meter.meter.SAME_NUMBER_AND_RESOURCE_EXISTS_IN_ORGANIZATION": "ИПУ с таким номером и ресурсом уже есть в организации на лицевом счете {accountNumbersCsv}", + "api.meter.meter.SAME_ACCOUNT_NUMBER_EXISTS_IN_OTHER_UNIT": "ИПУ с таким лицевым счетом уже есть в организации в помещении {unitsCsv}", "api.meter.NUMBER_OF_TARIFFS_NOT_VALID": "Количество тарифов должно быть целым числом от 1 до 4, передано {value}", - "api.meter.MeterReportingPeriod.INVALID_FINISH": "Конец периода может принимать значение только от 1 до 31", - "api.meter.MeterReportingPeriod.INVALID_START": "Начало периода может принимать значение только от 1 до 31", - "api.meter.MeterReportingPeriod.ORGANIZATION_IS_REQUIRED": "Необходима организация для создания периода сдачи показаний", - "api.meter.MeterReportingPeriod.PROPERTY_NOT_FOUND": "В организации такого дома нет", + "api.meter.meterReportingPeriod.INVALID_FINISH": "Конец периода может принимать значение только от 1 до 31", + "api.meter.meterReportingPeriod.INVALID_START": "Начало периода может принимать значение только от 1 до 31", + "api.meter.meterReportingPeriod.ORGANIZATION_IS_REQUIRED": "Необходима организация для создания периода сдачи показаний", + "api.meter.meterReportingPeriod.PROPERTY_NOT_FOUND": "В организации такого дома нет", "api.meter.MeterReading.INVALID_VALUE": "Передаваемые показания не могут быть меньше предыдущих", "api.meter.registerMetersReadings.TOO_MUCH_READINGS": "Слишком много показаний. Передано {sentCount}, допустимый максимум {limit}.", "api.meter.registerMetersReadings.ORGANIZATION_NOT_FOUND": "Организация не найдена", "api.meter.registerMetersReadings.PROPERTY_NOT_FOUND": "Дом не найден", "api.meter.registerMetersReadings.INVALID_METER_VALUES": "Неверные значения: {valuesList}", "api.meter.registerMetersReadings.MULTIPLE_METERS_FOUND": "Найдено несколько счетчиков ({count})", - "api.meterReading.METER_READING_DATE_IN_FUTURE": "Дата передачи показания ({givenDate}) не должна быть больше текущей даты", - "api.meterReading.METER_READING_FEW_VALUES": "Количество тарифов в приборе учета {meterNumber}: {numberOfTariffs}, необходимо заполнить поля: {fieldsNames}", - "api.meterReading.METER_READING_EXTRA_VALUES": "Количество тарифов в приборе учета {meterNumber}: {numberOfTariffs}, необходимо удалить значения из полей: {fieldsNames}", - "api.marketplace.MarketCategory.MAXIMUM_DEPTH_REACHED": "Глубина наследования категорий должна быть не больше 2", - "api.marketplace.MarketCategory.CANNOT_CONNECT_TO_ITSELF": "Нельзя привязать категорию к самой себе", - "api.contact.exportContactsToExcel.NOTHING_TO_EXPORT": "Не найдено контактов для экспорта", - "api.propertyScope.MAX_NAME_LENGTH_ERROR": "Превышено максимальное количество символов в названии ({max} символов)", + "api.meter.meterReading.METER_READING_DATE_IN_FUTURE": "Дата передачи показания ({givenDate}) не должна быть больше текущей даты", + "api.meter.meterReading.METER_READING_FEW_VALUES": "Количество тарифов в приборе учета {meterNumber}: {numberOfTariffs}, необходимо заполнить поля: {fieldsNames}", + "api.meter.meterReading.METER_READING_EXTRA_VALUES": "Количество тарифов в приборе учета {meterNumber}: {numberOfTariffs}, необходимо удалить значения из полей: {fieldsNames}", + "api.marketplace.marketCategory.MAXIMUM_DEPTH_REACHED": "Глубина наследования категорий должна быть не больше 2", + "api.marketplace.marketCategory.CANNOT_CONNECT_TO_ITSELF": "Нельзя привязать категорию к самой себе", + "api.scope.exportPropertyScopeToExcel.NOTHING_TO_EXPORT": "Не найдено контактов для экспорта", + "api.scope.propertyScope.MAX_NAME_LENGTH_ERROR": "Превышено максимальное количество символов в названии ({max} символов)", "api.propertyScope.exportPropertyScopesToExcel.NOTHING_TO_EXPORT": "Не найдено областей видимости для экспорта", "api.user.authenticateUserWithPhoneAndPassword.WRONG_PASSWORD": "Неверный пароль", "api.user.authenticateUserWithPhoneAndPassword.USER_NOT_FOUND": "Пользователь не найден по указанному телефону", @@ -2684,12 +2684,12 @@ "api.user.completeConfirmPhoneAction.SMS_CODE_EXPIRED": "Просрочен код подтверждения телефона по СМС, попробуйте пройти подтверждение номера телефона заново", "api.user.completeConfirmPhoneAction.SMS_CODE_MAX_RETRIES_REACHED": "Превышено количество попыток подтверждения номера телефона по СМС. Попробуйте заново пройти подтверждение номера телефона", "api.user.completeConfirmPhoneAction.SMS_CODE_VERIFICATION_FAILED": "Неверный код подтверждения телефона", - "api.organization.ReplaceOrganizationEmployeeRole.ORGANIZATION_NOT_FOUND": "Организация не найдена", - "api.organization.ReplaceOrganizationEmployeeRole.OLD_ROLE_NOT_FOUND": "Старая роль не найдена в организации", - "api.organization.ReplaceOrganizationEmployeeRole.NEW_ROLE_NOT_FOUND": "Новая роль не найдена в организации", - "api.organization.ReplaceOrganizationEmployeeRole.DEFAULT_ROLE_CANNOT_BE_DELETED": "Базовую роль нельзя удалить", - "api.organization.ReplaceOrganizationEmployeeRole.ROLES_MUST_BE_DIFFERENT": "Новая и старая роль не могут совпадать", - "api.organization.ReplaceOrganizationEmployeeRole.ROLES_ARE_BEING_PROCESSED": "Эти роли уже обрабатываются. Пожалуйста, повторите попытку чуть позже", + "api.organization.replaceOrganizationEmployeeRole.ORGANIZATION_NOT_FOUND": "Организация не найдена", + "api.organization.replaceOrganizationEmployeeRole.OLD_ROLE_NOT_FOUND": "Старая роль не найдена в организации", + "api.organization.replaceOrganizationEmployeeRole.NEW_ROLE_NOT_FOUND": "Новая роль не найдена в организации", + "api.organization.replaceOrganizationEmployeeRole.DEFAULT_ROLE_CANNOT_BE_DELETED": "Базовую роль нельзя удалить", + "api.organization.replaceOrganizationEmployeeRole.ROLES_MUST_BE_DIFFERENT": "Новая и старая роль не могут совпадать", + "api.organization.replaceOrganizationEmployeeRole.ROLES_ARE_BEING_PROCESSED": "Эти роли уже обрабатываются. Пожалуйста, повторите попытку чуть позже", "api.organization.inviteNewOrganizationEmployee.ALREADY_INVITED_EMAIL": "Сотрудник с таким Email уже есть в организации", "api.organization.inviteNewOrganizationEmployee.ALREADY_INVITED_PHONE": "Сотрудник с таким номером телефона уже есть в организации", "api.organization.inviteNewOrganizationEmployee.UNABLE_TO_REGISTER_USER": "Ошибка во время регистрации пользователя", @@ -2697,39 +2697,39 @@ "api.organization.reInviteOrganizationEmployee.USER_NOT_FOUND": "Не найден пользователь по указанным контактам", "api.organization.reInviteOrganizationEmployee.EMPLOYEE_NOT_FOUND": "Не найден сотрудник по указанным контактам", "api.organization.reInviteOrganizationEmployee.ALREADY_ACCEPTED_INVITATION": "Указанный сотрудник уже принял приглашение", - "api.organizationEmployee.NOT_FOUND_ROLE": "Роль не найдена в вашей организаии", - "api.organizationEmployee.ALREADY_INVITED_EMAIL": "Сотрудник с таким Email уже есть в организации", - "api.organizationEmployee.ALREADY_INVITED_PHONE": "Сотрудник с таким номером телефона уже есть в организации", - "api.organization.OrganizationEmployeeRole.ROLE_NAME_ALREADY_EXIST": "Роль с таким названием уже существует", - "api.organization.OrganizationEmployeeRole.INVALID_ROLE_NAME_LENGTH": "Длина название роли может быть от {min} до {max} символов", - "api.organization.OrganizationEmployeeRole.INVALID_ROLE_DESCRIPTION_LENGTH": "Длина название роли не может быть больше {max} символов", + "api.organization.organizationEmployee.NOT_FOUND_ROLE": "Роль не найдена в вашей организаии", + "api.organization.organizationEmployee.ALREADY_INVITED_EMAIL": "Сотрудник с таким Email уже есть в организации", + "api.organization.organizationEmployee.ALREADY_INVITED_PHONE": "Сотрудник с таким номером телефона уже есть в организации", + "api.organization.organizationEmployeeRole.ROLE_NAME_ALREADY_EXIST": "Роль с таким названием уже существует", + "api.organization.organizationEmployeeRole.INVALID_ROLE_NAME_LENGTH": "Длина название роли может быть от {min} до {max} символов", + "api.organization.organizationEmployeeRole.INVALID_ROLE_DESCRIPTION_LENGTH": "Длина название роли не может быть больше {max} символов", "api.common.INVALID_PHONE_NUMBER_FORMAT": "Некорректный формат номера телефона", "api.common.WRONG_PERCENT_VALUE": "Некорректное значение процента", "api.banking.createBankAccountRequest.INCORRECT_PROPERTY_ID": "Неверное значение propertyId. Данный дом не принадлежит выбранной организации", - "api.incident.WORK_FINISHED_EARLIER_THEN_WORK_STARTED": "Окончание работ не может быть раньше начала", - "api.incident.WORK_FINISH_MUST_BE_SPECIFIED_IF_NOT_ACTUAL_STATUS": "Окончание работ не может быть пустым, если отключение имеет статус \"неактуально\"", - "api.incidentExportTask.STATUS_IS_ALREADY_COMPLETED": "Задача уже успешно выполнена", - "api.incidentExportTask.STATUS_IS_ALREADY_ERROR": "Задача уже завершилась с ошибкой", - "api.newsItemRecipientsExportTask.STATUS_IS_ALREADY_COMPLETED": "Задача уже успешно выполнена", - "api.newsItemRecipientsExportTask.STATUS_IS_ALREADY_ERROR": "Задача уже завершилась с ошибкой", - "api.newsItem.EMPTY_VALID_BEFORE_DATE": "Дата актуальности новости обязательна", - "api.newsItem.EDIT_DENIED_ALREADY_SENT": "Нельзя редактировать уже отправленную новость", - "api.newsItem.EDIT_DENIED_PUBLISHED": "Нельзя редактировать опубликованную новость", - "api.newsItem.VALIDITY_DATE_LESS_THAN_SEND_DATE": "Дата актуальности меньше чем дата отправки", - "api.newsItem.PROFANITY_TITLE_DETECTED_MOT_ERF_KER": "В заголовке обнаружена ненормативная лексика", - "api.newsItem.PROFANITY_BODY_DETECTED_MOT_ERF_KER": "В основном тексте обнаружена ненормативная лексика", - "api.newsItem.WRONG_SEND_DATE": "Неверная дата отправки", + "api.ticket.incident.WORK_FINISHED_EARLIER_THEN_WORK_STARTED": "Окончание работ не может быть раньше начала", + "api.ticket.incident.WORK_FINISH_MUST_BE_SPECIFIED_IF_NOT_ACTUAL_STATUS": "Окончание работ не может быть пустым, если отключение имеет статус \"неактуально\"", + "api.ticket.incidentExportTask.STATUS_IS_ALREADY_COMPLETED": "Задача уже успешно выполнена", + "api.ticket.incidentExportTask.STATUS_IS_ALREADY_ERROR": "Задача уже завершилась с ошибкой", + "api.news.newsItemRecipientsExportTask.STATUS_IS_ALREADY_COMPLETED": "Задача уже успешно выполнена", + "api.news.newsItemRecipientsExportTask.STATUS_IS_ALREADY_ERROR": "Задача уже завершилась с ошибкой", + "api.news.newsItem.EMPTY_VALID_BEFORE_DATE": "Дата актуальности новости обязательна", + "api.news.newsItem.EDIT_DENIED_ALREADY_SENT": "Нельзя редактировать уже отправленную новость", + "api.news.newsItem.EDIT_DENIED_PUBLISHED": "Нельзя редактировать опубликованную новость", + "api.news.newsItem.VALIDITY_DATE_LESS_THAN_SEND_DATE": "Дата актуальности меньше чем дата отправки", + "api.news.newsItem.PROFANITY_TITLE_DETECTED_MOT_ERF_KER": "В заголовке обнаружена ненормативная лексика", + "api.news.newsItem.PROFANITY_BODY_DETECTED_MOT_ERF_KER": "В основном тексте обнаружена ненормативная лексика", + "api.news.newsItem.WRONG_SEND_DATE": "Неверная дата отправки", "api.newsItem.EMPTY_NEWS_ITEM_SCOPE": "Не указаны получатели", "api.newsItem.UNIT_NAME_WITHOUT_UNIT_TYPE": "Не задан unitName без unitType", - "api.newsItem.getNewsSharingRecipients.NOT_NEWS_SHARING_APP": "Этот миниапп не поддерживает функциональность отправки новостей", - "api.newsItem.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_FAILED": "Запрос в миниапп завершился с ошибкой", - "api.newsItem.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_BAD_RESPONSE": "Запрос в миниапп вернул некорректные данные", - "api.callRecord.NEGATIVE_TALK_TIME": "Длительность разговора должна быть больше или равна 0", - "api.callRecordFragment.INVALID_TICKET_ORGANIZATION": "Заявка должна быть из той же организации, что и запись разговора", - "api.newsItem.NO_NEWS_ITEM_SCOPES": "Нельзя публиковать новость без получателей", + "api.news.getNewsSharingRecipients.NOT_NEWS_SHARING_APP": "Этот миниапп не поддерживает функциональность отправки новостей", + "api.news.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_FAILED": "Запрос в миниапп завершился с ошибкой", + "api.news.getNewsSharingRecipients.NEWS_SHARING_APP_REQUEST_BAD_RESPONSE": "Запрос в миниапп вернул некорректные данные", + "api.ticket.callRecord.NEGATIVE_TALK_TIME": "Длительность разговора должна быть больше или равна 0", + "api.ticket.callRecordFragment.INVALID_TICKET_ORGANIZATION": "Заявка должна быть из той же организации, что и запись разговора", + "api.news.newsItem.NO_NEWS_ITEM_SCOPES": "Нельзя публиковать новость без получателей", "api.ticket.QUALITY_CONTROL_ADDITIONAL_OPTION_DOES_NOT_MATCH_QUALITY_CONTROL_VALUE": "Дополнительные параметры контроля качества должны соответсоввать указанной оценке", - "api.ticket.QUALITY_CONTROL_VALUE_MUST_BE_SPECIFIED": "При указании комментария или дополнительных параметров оценки нужно указать саму оценку", - "api.billing.error.alreadyPaid": "Счет уже был оплачен", + "api.ticket.ticket.QUALITY_CONTROL_VALUE_MUST_BE_SPECIFIED": "При указании комментария или дополнительных параметров оценки нужно указать саму оценку", + "api.billing.billingReceipt.RECEIPT_ALREADY_PAID_ERROR": "Счет уже был оплачен", "api.billing.sendNewReceiptMessagesToResidentScopes.INVALID_PERIOD_PROVIDED": "Необходимо передать период не ранее начала прошлого месяца и не позднее начала текущего месяца, валидный формат - YYYY-MM-DD", "api.billing.sendNewReceiptMessagesToResidentScopes.INVALID_BILLING_CONTEXT_PROVIDED": "Необходимо передать id существующей биллинговой интеграции для организации", "api.billing.sendNewReceiptMessagesToResidentScopes.INVALID_BILLING_CATEGORY_PROVIDED": "Необходимо передать id существующей биллинговой категории", @@ -2737,8 +2737,8 @@ "api.billing.sendNewReceiptMessagesToResidentScopes.INVALID_BILLING_PROPERTY_PROVIDED": "Все переданные id домов (billingProperty) в скоупах должны принадлежать организации из переданного биллингового контекста", "api.billing.registerBillingReceiptFile.MULTIPLE_BILLING_RECEIPTS_FOUND": "Найдено больше одной квитанции для PDF файла", "api.billing.registerBillingReceiptFile.NO_RECEIPTS_FOUND": "Не найдена квитанция для PDF файла", - "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_NOT_FOUND": "Не удалось найти квитанции или счётчики по указанному лицевому счету. Пожалуйста, обратитесь в управляющую компанию.", - "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_OR_METER_NOT_FOUND": "Не удалось найти квитанции или счётчики по указанному лицевому счету. Пожалуйста, обратитесь в управляющую компанию.", + "api.resident.registerServiceConsumers.BILLING_ACCOUNT_NOT_FOUND": "Не удалось найти квитанции или счётчики по указанному лицевому счету. Пожалуйста, обратитесь в управляющую компанию.", + "api.resident.registerServiceConsumers.BILLING_ACCOUNT_OR_METER_NOT_FOUND": "Не удалось найти квитанции или счётчики по указанному лицевому счету. Пожалуйста, обратитесь в управляющую компанию.", "api.resident.sendMessageToResidentScopes.SCOPES_IS_EMPTY": "Необходимо передать хотя бы один элемент в scopes", "api.resident.registerResident.ADDRESS_NOT_FOUND": "Адрес не найден", "api.miniapp.sendB2CAppPushMessage.USER_NOT_FOUND": "Не удалось найти пользователя по переданному id", @@ -2747,8 +2747,8 @@ "api.miniapp.sendB2CAppPushMessage.DV_VERSION_MISMATCH": "Неверное значение версии данных", "api.miniapp.sendB2CAppPushMessage.WRONG_SENDER_FORMAT": "Неверный формат поля \"sender\"", "api.miniapp.sendB2CAppPushMessage.APP_IN_BLACK_LIST": "Невозможно отправить уведомления для приложения, находящегося в блэклисте", - "api.analytics.overviewDashboard.FEATURE_IS_DISABLED": "Эта функция недоступна в вашей организации", - "api.tourStep.update.updateCompletedStepType": "Нельзя обновить статус у выполненого шага", + "api.analytics.getOverviewDashboard.FEATURE_IS_DISABLED": "Эта функция недоступна в вашей организации", + "api.onboarding.tourStep.UPDATE_COMPLETED_STEP_TYPE": "Нельзя обновить статус у выполненого шага", "api.onboarding.syncTourSteps.TOUR_STEPS_NOT_FOUND": "Для переданной организации не найдены шаги путеводителя", "api.document.WRONG_PROPERTY_ORGANIZATION": "Дом находится в другой организации", "excelExport.header.contacts.forAllTime": "Контакты за всё время", @@ -3125,24 +3125,24 @@ "incident.hints.more.label": "Подробнее", "timezone.msk": "МСК", "api.marketplace.invoice.error.noReceivers": "Не указан получатель счета. Укажите или полный адрес или номер лицевого счета.", - "api.marketplace.invoice.error.alreadyPaid": "Нельзя изменять оплаченный счет", - "api.marketplace.invoice.error.alreadyCanceled": "Нельзя изменять отмененный счет", - "api.marketplace.invoice.error.emptyRows": "Счет не содержит товаров/услуг", - "api.marketplace.invoice.error.rows.count": "Количество не может быть меньше 1. Проверьте строку {rowNumber}.", - "api.marketplace.invoice.error.rows.toPay": "Цена не может быть меньше 0. Проверьте строку {rowNumber}.", - "api.marketplace.invoice.error.prohibitedPaymentType": "Этот способ оплаты запрещен в выбранной организации", - "api.marketplace.MarketItemPrice.error.INVALID_SALES_TAX_PERCENT": "Налог с продажи должен быть положительным, но не больше 100. Проверьте строку {rowNumber}.", - "api.marketplace.MarketItemPrice.error.INVALID_PRICE": "Цена не может быть меньше 0. Проверьте строку {rowNumber}.", - "api.marketplace.MarketItemPrice.error.EMPTY_PRICE": "Цена не может быть пустой.", - "api.marketplace.MarketItemPrice.error.ORGANIZATION_IN_PROPERTY_AND_MARKET_ITEM_PRICE_NOT_MATCHED": "Невозможно создать область видимости списка услуг с домом из одной организации и услугой из другой организации.", - "api.marketplace.registerInvoice.error.noAcquiringContext": "Не выполнена настройка со стороны организации", - "api.marketplace.registerInvoice.error.itemFromOtherOrganization": "Позиция из другой организации. Проверьте строку {rowNumber}", + "api.marketplace.invoice.ALREADY_PAID": "Нельзя изменять оплаченный счет", + "api.marketplace.invoice.ALREADY_CANCELED": "Нельзя изменять отмененный счет", + "api.marketplace.invoice.EMPTY_ROWS": "Счет не содержит товаров/услуг", + "api.marketplace.invoice.WRONG_COUNT": "Количество не может быть меньше 1. Проверьте строку {rowNumber}.", + "api.marketplace.invoice.WRONG_PRICE": "Цена не может быть меньше 0. Проверьте строку {rowNumber}.", + "api.resident.registerResidentInvoice.PROHIBITED_INVOICE_PAYMENT_TYPE": "Этот способ оплаты запрещен в выбранной организации", + "api.marketplace.marketItemPrice.INVALID_SALES_TAX_PERCENT": "Налог с продажи должен быть положительным, но не больше 100. Проверьте строку {rowNumber}.", + "api.marketplace.marketItemPrice.INVALID_PRICE": "Цена не может быть меньше 0. Проверьте строку {rowNumber}.", + "api.marketplace.marketItemPrice.EMPTY_PRICE": "Цена не может быть пустой.", + "api.marketplace.marketItemPrice.ORGANIZATION_IN_PROPERTY_AND_MARKET_ITEM_PRICE_NOT_MATCHED": "Невозможно создать область видимости списка услуг с домом из одной организации и услугой из другой организации.", + "api.resident.registerResidentInvoice.NO_ACQUIRING_CONTEXT": "Не выполнена настройка со стороны организации", + "api.resident.registerResidentInvoice.ITEM_FROM_OTHER_ORGANIZATION": "Позиция из другой организации. Проверьте строку {rowNumber}", "marketplace.invoice.newTicket.details": "Заказана платная услуга", - "api.marketplace.invoice.error.NoFinishedAcquiringContext": "Организация не завершила настройку маркетплейса", - "api.marketplace.invoice.error.editPublishedForbidden": "У счета в статусе \"Готов к оплате\" можно обновить только статус в значения \"Отменен\" или \"Оплачен\"", - "api.marketplace.invoice.error.clientDataDoesNotMatchTicket": "Адрес и данные контакта должны совпадать с данными из заявки, к которой привязан счет", - "api.marketplace.invoice.error.forbidUpdateTicket": "Нельзя обновить заявку у счета, который уже прикреплен к другой заявке", - "api.marketplace.invoice.error.PublishingWithoutDefinedPricesForbidden": "Счет без определенных цен не может быть готов к оплате", + "api.marketplace.invoice.NO_FINISHED_ACQUIRING_CONTEXT": "Организация не завершила настройку маркетплейса", + "api.marketplace.invoice.FORBID_EDIT_PUBLISHED": "У счета в статусе \"Готов к оплате\" можно обновить только статус в значения \"Отменен\" или \"Оплачен\"", + "api.marketplace.invoice.CLIENT_DATA_DOES_NOT_MATCH_TICKET": "Адрес и данные контакта должны совпадать с данными из заявки, к которой привязан счет", + "api.marketplace.invoice.FORBID_UPDATE_TICKET": "Нельзя обновить заявку у счета, который уже прикреплен к другой заявке", + "api.marketplace.invoice.PUBLISHING_WITHOUT_DEFINED_PRICES_FORBIDDEN": "Счет без определенных цен не может быть готов к оплате", "acquiringReceipt.title": "Оплата за ЖКУ", "acquiringReceipt.total": "Итого", "acquiringReceipt.invoice.title": "Счет №{number} от {date}", @@ -3154,8 +3154,8 @@ "acquiringReceipt.invoice.row.count": "Кол-во", "acquiringReceipt.invoice.row.vatPercent": "НДС", "acquiringReceipt.invoice.row.amount": "Стоимость", - "api.acquiring.multiPayment.error.receiptsWithInvoices": "Квитанции и счета не могут быть в одном платеже, увы. Но мы над этим работаем.", - "api.acquiring.payment.error.paymentAmountLessThanMinimum": "Сумма оплаты должна быть не меньше чем {minimumPaymentAmount}", - "api.acquiring.payment.error.paymentAmountGreaterThanMaximum": "Сумма оплаты не должна превышать {maximumPaymentAmount}" + "api.acquiring.multiPayment.RECEIPTS_WITH_INVOICES_FORBIDDEN": "Квитанции и счета не могут быть в одном платеже, увы. Но мы над этим работаем.", + "api.acquiring.payment.PAYMENT_AMOUNT_LESS_THAN_MINIMUM": "Сумма оплаты должна быть не меньше чем {minimumPaymentAmount}", + "api.acquiring.payment.PAYMENT_AMOUNT_GREATER_THAN_MAXIMUM": "Сумма оплаты не должна превышать {maximumPaymentAmount}" } diff --git a/apps/condo/schema.graphql b/apps/condo/schema.graphql index 5de61e8913f..3d16eb3f264 100644 --- a/apps/condo/schema.graphql +++ b/apps/condo/schema.graphql @@ -82384,7 +82384,7 @@ type Query { "code": "INTERNAL_ERROR", "type": "REFRESH_TOKEN_EXPIRED", "message": "SBBOL user refreshToken expired", - "messageForUser": "api.user.getAccessTokenByUserIdService.REFRESH_TOKEN_EXPIRED" + "messageForUser": "api.user.getAccessTokenByUserId.REFRESH_TOKEN_EXPIRED" }` `{ @@ -82392,7 +82392,7 @@ type Query { "code": "BAD_USER_INPUT", "type": "INVALID_USER_ID", "message": "Received userId must be uuid", - "messageForUser": "api.user.getAccessTokenByUserIdService.INVALID_USER_ID" + "messageForUser": "api.user.getAccessTokenByUserId.INVALID_USER_ID" }` `{ @@ -82400,7 +82400,7 @@ type Query { "code": "INTERNAL_ERROR", "type": "ERROR_GETTING_ACCESS_TOKEN", "message": "Unresolved error in getAccessTokenForUser", - "messageForUser": "api.user.getAccessTokenByUserIdService.ERROR_GETTING_ACCESS_TOKEN" + "messageForUser": "api.user.getAccessTokenByUserId.ERROR_GETTING_ACCESS_TOKEN" }` """ getAccessTokenByUserId(data: GetAccessTokenByUserIdInput!): GetAccessTokenByUserIdOutput @@ -88172,7 +88172,7 @@ type Mutation { "code": "BAD_USER_INPUT", "type": "ORGANIZATION_NOT_FOUND", "message": "Organization not found", - "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.ORGANIZATION_NOT_FOUND" + "messageForUser": "api.organization.replaceOrganizationEmployeeRole.ORGANIZATION_NOT_FOUND" }` `{ @@ -88184,7 +88184,7 @@ type Mutation { "code": "BAD_USER_INPUT", "type": "OLD_ROLE_NOT_FOUND", "message": "Old role not found in specified organization", - "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.OLD_ROLE_NOT_FOUND" + "messageForUser": "api.organization.replaceOrganizationEmployeeRole.OLD_ROLE_NOT_FOUND" }` `{ @@ -88196,7 +88196,7 @@ type Mutation { "code": "BAD_USER_INPUT", "type": "NEW_ROLE_NOT_FOUND", "message": "New role not found in specified organization", - "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.NEW_ROLE_NOT_FOUND" + "messageForUser": "api.organization.replaceOrganizationEmployeeRole.NEW_ROLE_NOT_FOUND" }` `{ @@ -88207,7 +88207,7 @@ type Mutation { "code": "BAD_USER_INPUT", "type": "DEFAULT_ROLE_CANNOT_BE_DELETED", "message": "The default role cannot be deleted", - "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.DEFAULT_ROLE_CANNOT_BE_DELETED" + "messageForUser": "api.organization.replaceOrganizationEmployeeRole.DEFAULT_ROLE_CANNOT_BE_DELETED" }` `{ @@ -88218,7 +88218,7 @@ type Mutation { "code": "BAD_USER_INPUT", "type": "ROLES_MUST_BE_DIFFERENT", "message": "The old role and new role must be different", - "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.ROLES_MUST_BE_DIFFERENT" + "messageForUser": "api.organization.replaceOrganizationEmployeeRole.ROLES_MUST_BE_DIFFERENT" }` `{ @@ -88229,7 +88229,7 @@ type Mutation { "code": "TOO_MANY_REQUESTS", "type": "ROLES_ARE_BEING_PROCESSED", "message": "These roles are already being processed. Please try again a little later", - "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.ROLES_ARE_BEING_PROCESSED" + "messageForUser": "api.organization.replaceOrganizationEmployeeRole.ROLES_ARE_BEING_PROCESSED" }` """ replaceOrganizationEmployeeRole(data: ReplaceOrganizationEmployeeRoleInput!): ReplaceOrganizationEmployeeRoleOutput @@ -90088,7 +90088,7 @@ type Mutation { "code": "BAD_USER_INPUT", "type": "NOT_FOUND", "message": "Can't find billingAccount and any meters with this accountNumber, unitName and address", - "messageForUser": "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_OR_METER_NOT_FOUND" + "messageForUser": "api.resident.registerServiceConsumers.BILLING_ACCOUNT_OR_METER_NOT_FOUND" }` `{ @@ -90100,7 +90100,7 @@ type Mutation { "code": "BAD_USER_INPUT", "type": "NOT_FOUND", "message": "Can't find billingAccount and any meters with this accountNumber, unitName and organization combination", - "messageForUser": "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_NOT_FOUND" + "messageForUser": "api.resident.registerServiceConsumers.BILLING_ACCOUNT_NOT_FOUND" }` `{ @@ -90168,7 +90168,7 @@ type Mutation { "code": "BAD_USER_INPUT", "type": "NOT_FOUND", "message": "Can't find billingAccount and any meters with this accountNumber, unitName and address", - "messageForUser": "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_OR_METER_NOT_FOUND" + "messageForUser": "api.resident.registerServiceConsumers.BILLING_ACCOUNT_OR_METER_NOT_FOUND" }` `{ @@ -90180,7 +90180,7 @@ type Mutation { "code": "BAD_USER_INPUT", "type": "NOT_FOUND", "message": "Can't find billingAccount and any meters with this accountNumber, unitName and organization combination", - "messageForUser": "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_NOT_FOUND" + "messageForUser": "api.resident.registerServiceConsumers.BILLING_ACCOUNT_NOT_FOUND" }` `{ diff --git a/apps/condo/schema.ts b/apps/condo/schema.ts index e3889047296..c330c0aac33 100644 --- a/apps/condo/schema.ts +++ b/apps/condo/schema.ts @@ -42304,7 +42304,7 @@ export type Mutation = { * "code": "BAD_USER_INPUT", * "type": "ORGANIZATION_NOT_FOUND", * "message": "Organization not found", - * "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.ORGANIZATION_NOT_FOUND" + * "messageForUser": "api.organization.replaceOrganizationEmployeeRole.ORGANIZATION_NOT_FOUND" * }` * * `{ @@ -42316,7 +42316,7 @@ export type Mutation = { * "code": "BAD_USER_INPUT", * "type": "OLD_ROLE_NOT_FOUND", * "message": "Old role not found in specified organization", - * "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.OLD_ROLE_NOT_FOUND" + * "messageForUser": "api.organization.replaceOrganizationEmployeeRole.OLD_ROLE_NOT_FOUND" * }` * * `{ @@ -42328,7 +42328,7 @@ export type Mutation = { * "code": "BAD_USER_INPUT", * "type": "NEW_ROLE_NOT_FOUND", * "message": "New role not found in specified organization", - * "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.NEW_ROLE_NOT_FOUND" + * "messageForUser": "api.organization.replaceOrganizationEmployeeRole.NEW_ROLE_NOT_FOUND" * }` * * `{ @@ -42339,7 +42339,7 @@ export type Mutation = { * "code": "BAD_USER_INPUT", * "type": "DEFAULT_ROLE_CANNOT_BE_DELETED", * "message": "The default role cannot be deleted", - * "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.DEFAULT_ROLE_CANNOT_BE_DELETED" + * "messageForUser": "api.organization.replaceOrganizationEmployeeRole.DEFAULT_ROLE_CANNOT_BE_DELETED" * }` * * `{ @@ -42350,7 +42350,7 @@ export type Mutation = { * "code": "BAD_USER_INPUT", * "type": "ROLES_MUST_BE_DIFFERENT", * "message": "The old role and new role must be different", - * "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.ROLES_MUST_BE_DIFFERENT" + * "messageForUser": "api.organization.replaceOrganizationEmployeeRole.ROLES_MUST_BE_DIFFERENT" * }` * * `{ @@ -42361,7 +42361,7 @@ export type Mutation = { * "code": "TOO_MANY_REQUESTS", * "type": "ROLES_ARE_BEING_PROCESSED", * "message": "These roles are already being processed. Please try again a little later", - * "messageForUser": "api.organization.ReplaceOrganizationEmployeeRole.ROLES_ARE_BEING_PROCESSED" + * "messageForUser": "api.organization.replaceOrganizationEmployeeRole.ROLES_ARE_BEING_PROCESSED" * }` */ replaceOrganizationEmployeeRole?: Maybe; @@ -44217,7 +44217,7 @@ export type Mutation = { * "code": "BAD_USER_INPUT", * "type": "NOT_FOUND", * "message": "Can't find billingAccount and any meters with this accountNumber, unitName and address", - * "messageForUser": "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_OR_METER_NOT_FOUND" + * "messageForUser": "api.resident.registerServiceConsumers.BILLING_ACCOUNT_OR_METER_NOT_FOUND" * }` * * `{ @@ -44229,7 +44229,7 @@ export type Mutation = { * "code": "BAD_USER_INPUT", * "type": "NOT_FOUND", * "message": "Can't find billingAccount and any meters with this accountNumber, unitName and organization combination", - * "messageForUser": "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_NOT_FOUND" + * "messageForUser": "api.resident.registerServiceConsumers.BILLING_ACCOUNT_NOT_FOUND" * }` * * `{ @@ -44296,7 +44296,7 @@ export type Mutation = { * "code": "BAD_USER_INPUT", * "type": "NOT_FOUND", * "message": "Can't find billingAccount and any meters with this accountNumber, unitName and address", - * "messageForUser": "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_OR_METER_NOT_FOUND" + * "messageForUser": "api.resident.registerServiceConsumers.BILLING_ACCOUNT_OR_METER_NOT_FOUND" * }` * * `{ @@ -44308,7 +44308,7 @@ export type Mutation = { * "code": "BAD_USER_INPUT", * "type": "NOT_FOUND", * "message": "Can't find billingAccount and any meters with this accountNumber, unitName and organization combination", - * "messageForUser": "api.resident.RegisterServiceConsumerService.BILLING_ACCOUNT_NOT_FOUND" + * "messageForUser": "api.resident.registerServiceConsumers.BILLING_ACCOUNT_NOT_FOUND" * }` * * `{ @@ -66211,7 +66211,7 @@ export type Query = { * "code": "INTERNAL_ERROR", * "type": "REFRESH_TOKEN_EXPIRED", * "message": "SBBOL user refreshToken expired", - * "messageForUser": "api.user.getAccessTokenByUserIdService.REFRESH_TOKEN_EXPIRED" + * "messageForUser": "api.user.getAccessTokenByUserId.REFRESH_TOKEN_EXPIRED" * }` * * `{ @@ -66219,7 +66219,7 @@ export type Query = { * "code": "BAD_USER_INPUT", * "type": "INVALID_USER_ID", * "message": "Received userId must be uuid", - * "messageForUser": "api.user.getAccessTokenByUserIdService.INVALID_USER_ID" + * "messageForUser": "api.user.getAccessTokenByUserId.INVALID_USER_ID" * }` * * `{ @@ -66227,7 +66227,7 @@ export type Query = { * "code": "INTERNAL_ERROR", * "type": "ERROR_GETTING_ACCESS_TOKEN", * "message": "Unresolved error in getAccessTokenForUser", - * "messageForUser": "api.user.getAccessTokenByUserIdService.ERROR_GETTING_ACCESS_TOKEN" + * "messageForUser": "api.user.getAccessTokenByUserId.ERROR_GETTING_ACCESS_TOKEN" * }` */ getAccessTokenByUserId?: Maybe; diff --git a/apps/condorb b/apps/condorb index dbbce3b019e..ab30f829f22 160000 --- a/apps/condorb +++ b/apps/condorb @@ -1 +1 @@ -Subproject commit dbbce3b019e23d7edf927ead2cd00b2cb56e9b0e +Subproject commit ab30f829f22e40c8730a846f45c6ad0da368ba19 diff --git a/apps/dev-api/domains/common/utils/files.js b/apps/dev-api/domains/common/utils/files.js index 8564c36892e..8078f476494 100644 --- a/apps/dev-api/domains/common/utils/files.js +++ b/apps/dev-api/domains/common/utils/files.js @@ -11,7 +11,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: INVALID_MIMETYPE, message: 'Attached file have invalid mimetype', - messageForUser: 'errors.INVALID_MIMETYPE.message', + messageForUser: 'api.common.INVALID_MIMETYPE', }, } diff --git a/apps/dev-api/domains/common/utils/serverClients.js b/apps/dev-api/domains/common/utils/serverClients.js index fea98befa8b..a8efa65dfa8 100644 --- a/apps/dev-api/domains/common/utils/serverClients.js +++ b/apps/dev-api/domains/common/utils/serverClients.js @@ -27,7 +27,7 @@ const ERRORS = { code: INTERNAL_ERROR, type: MULTIPLE_FOUND, message: 'Unable to determine the object to update because multiple objects were found for the specified importID and exportId', - messageForUser: 'errors.MULTIPLE_FOUND.message', + messageForUser: 'api.common.MULTIPLE_FOUND', }, } diff --git a/apps/dev-api/domains/miniapp/schema/B2CAppBuild.js b/apps/dev-api/domains/miniapp/schema/B2CAppBuild.js index 2b6168750a3..f486af19cff 100644 --- a/apps/dev-api/domains/miniapp/schema/B2CAppBuild.js +++ b/apps/dev-api/domains/miniapp/schema/B2CAppBuild.js @@ -21,7 +21,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: INVALID_BUILD_VERSION, message: 'The build version must be semantically correct and be in X.Y.Z format', - messageForUser: 'errors.INVALID_BUILD_VERSION.message', + messageForUser: 'api.miniapp.B2CAppBuild.INVALID_BUILD_VERSION', }, } const BUILD_FILE_ADAPTER = new FileAdapter('B2CApps/builds', true) diff --git a/apps/dev-api/domains/miniapp/schema/CreateOIDCClientService.js b/apps/dev-api/domains/miniapp/schema/CreateOIDCClientService.js index f7d48d757bf..e9af483ba5c 100644 --- a/apps/dev-api/domains/miniapp/schema/CreateOIDCClientService.js +++ b/apps/dev-api/domains/miniapp/schema/CreateOIDCClientService.js @@ -19,7 +19,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: APP_NOT_FOUND, message: 'The application with the specified ID was not found', - messageForUser: 'errors.APP_NOT_FOUND.message', + messageForUser: 'api.miniapp.B2CApp.APP_NOT_FOUND', }, } diff --git a/apps/dev-api/domains/miniapp/schema/GenerateOIDCClientSecretService.js b/apps/dev-api/domains/miniapp/schema/GenerateOIDCClientSecretService.js index f1bab6d781f..4e9937dc3b3 100644 --- a/apps/dev-api/domains/miniapp/schema/GenerateOIDCClientSecretService.js +++ b/apps/dev-api/domains/miniapp/schema/GenerateOIDCClientSecretService.js @@ -18,7 +18,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: OIDC_CLIENT_NOT_FOUND, message: 'OIDC client for the specified application was not found', - messageForUser: 'errors.OIDC_CLIENT_NOT_FOUND.message', + messageForUser: 'api.miniapp.OIDC_CLIENT_NOT_FOUND', }, } diff --git a/apps/dev-api/domains/miniapp/schema/PublishB2CAppService.js b/apps/dev-api/domains/miniapp/schema/PublishB2CAppService.js index 2a6cae543ba..07ec0f28939 100644 --- a/apps/dev-api/domains/miniapp/schema/PublishB2CAppService.js +++ b/apps/dev-api/domains/miniapp/schema/PublishB2CAppService.js @@ -48,31 +48,31 @@ const ERRORS = { code: BAD_USER_INPUT, type: FIRST_PUBLISH_WITHOUT_INFO, message: 'The first publication of the application should include information about the application', - messageForUser: 'errors.FIRST_PUBLISH_WITHOUT_INFO.message', + messageForUser: 'api.miniapp.publishB2CApp.FIRST_PUBLISH_WITHOUT_INFO', }, APP_NOT_FOUND: { code: BAD_USER_INPUT, type: APP_NOT_FOUND, message: 'The application with the specified ID was not found', - messageForUser: 'errors.APP_NOT_FOUND.message', + messageForUser: 'api.miniapp.B2CApp.APP_NOT_FOUND', }, CONDO_APP_NOT_FOUND: { code: INTERNAL_ERROR, type: CONDO_APP_NOT_FOUND, message: 'The application was probably deleted on remote server. Try to publish app info to recreate it', - messageForUser: 'errors.CONDO_APP_NOT_FOUND.message', + messageForUser: 'api.miniapp.publishB2CApp.CONDO_APP_NOT_FOUND', }, BUILD_NOT_FOUND: { code: BAD_USER_INPUT, type: BUILD_NOT_FOUND, message: 'Application build with the specified ID was not found', - messageForUser: 'errors.BUILD_NOT_FOUND.message', + messageForUser: 'api.miniapp.publishB2CApp.BUILD_NOT_FOUND', }, PUBLISH_NOT_ALLOWED: { code: BAD_USER_INPUT, type: PUBLISH_NOT_ALLOWED, message: 'The application cannot be published to the specified stand, as this requires additional verification', - messageForUser: 'errors.PUBLISH_NOT_ALLOWED.message', + messageForUser: 'api.miniapp.publishB2CApp.PUBLISH_NOT_ALLOWED', }, } diff --git a/apps/dev-api/domains/miniapp/schema/RegisterAppServiceUserService.js b/apps/dev-api/domains/miniapp/schema/RegisterAppServiceUserService.js index 3ae2c7dc915..688d4519fc9 100644 --- a/apps/dev-api/domains/miniapp/schema/RegisterAppServiceUserService.js +++ b/apps/dev-api/domains/miniapp/schema/RegisterAppServiceUserService.js @@ -25,25 +25,25 @@ const ERRORS = { code: BAD_USER_INPUT, type: ACTION_NOT_FOUND, message: 'ConfirmEmailAction with the specified ID is not verified, expired, or does not exist', - messageForUser: 'errors.ACTION_NOT_FOUND.email.message', + messageForUser: 'api.miniapp.registerAppServiceUser.APP_NOT_FOUND', }, APP_NOT_FOUND: { code: BAD_USER_INPUT, type: APP_NOT_FOUND, message: 'The application with the specified ID was not found', - messageForUser: 'errors.APP_NOT_FOUND.message', + messageForUser: 'api.miniapp.B2CApp.APP_NOT_FOUND', }, CONDO_USER_ALREADY_EXISTS: { code: BAD_USER_INPUT, type: CONDO_USER_ALREADY_EXISTS, message: 'Service user with specified email already exists', - messageForUser: 'errors.CONDO_USER_ALREADY_EXISTS.message', + messageForUser: 'api.miniapp.registerAppServiceUser.CONDO_USER_ALREADY_EXISTS', }, ACCESS_RIGHT_ALREADY_EXISTS: { code: BAD_USER_INPUT, type: ACCESS_RIGHT_ALREADY_EXISTS, message: 'Another service user is already linked to specified app', - messageForUser: 'errors.ACCESS_RIGHT_ALREADY_EXISTS.message', + messageForUser: 'api.miniapp.registerAppServiceUser.ACCESS_RIGHT_ALREADY_EXISTS', }, } diff --git a/apps/dev-api/domains/miniapp/schema/UpdateOIDCClientUrlService.js b/apps/dev-api/domains/miniapp/schema/UpdateOIDCClientUrlService.js index eb6a0fb57da..316e9d82875 100644 --- a/apps/dev-api/domains/miniapp/schema/UpdateOIDCClientUrlService.js +++ b/apps/dev-api/domains/miniapp/schema/UpdateOIDCClientUrlService.js @@ -17,19 +17,19 @@ const ERRORS = { code: BAD_USER_INPUT, type: OIDC_CLIENT_NOT_FOUND, message: 'OIDC client for the specified application was not found', - messageForUser: 'errors.OIDC_CLIENT_NOT_FOUND.message', + messageForUser: 'api.miniapp.OIDC_CLIENT_NOT_FOUND', }, INVALID_URL: { code: BAD_USER_INPUT, type: INVALID_URL, message: 'The specified redirectUri is not a valid URL', - messageForUser: 'errors.INVALID_URL.message', + messageForUser: 'api.miniapp.updateOIDCClientUrl.INVALID_URL', }, HTTPS_ONLY: { code: BAD_USER_INPUT, type: HTTPS_ONLY, message: 'The URL has a non-valid protocol. Only https is allowed for the selected environment', - messageForUser: 'errors.HTTPS_ONLY.message', + messageForUser: 'api.miniapp.updateOIDCClientUrl.HTTPS_ONLY', }, } diff --git a/apps/dev-api/domains/miniapp/utils/serverSchema/findCondoApp.js b/apps/dev-api/domains/miniapp/utils/serverSchema/findCondoApp.js index e8d986fc630..5ab35b0a968 100644 --- a/apps/dev-api/domains/miniapp/utils/serverSchema/findCondoApp.js +++ b/apps/dev-api/domains/miniapp/utils/serverSchema/findCondoApp.js @@ -13,7 +13,7 @@ const ERRORS = { code: BAD_USER_INPUT, type: APP_NOT_FOUND, message: 'The application with the specified ID was not found', - messageForUser: 'errors.APP_NOT_FOUND.message', + messageForUser: 'api.miniapp.B2CApp.APP_NOT_FOUND', }, } diff --git a/apps/dev-api/domains/user/schema/AuthenticateUserWithPhoneAndPasswordService.js b/apps/dev-api/domains/user/schema/AuthenticateUserWithPhoneAndPasswordService.js index f6a696dd3a0..de4a8a5ff30 100644 --- a/apps/dev-api/domains/user/schema/AuthenticateUserWithPhoneAndPasswordService.js +++ b/apps/dev-api/domains/user/schema/AuthenticateUserWithPhoneAndPasswordService.js @@ -13,13 +13,13 @@ const ERRORS = { code: BAD_USER_INPUT, type: INCORRECT_PHONE_OR_PASSWORD, message: 'Incorrect phone number or password', - messageForUser: 'errors.INCORRECT_PHONE_OR_PASSWORD.message', + messageForUser: 'api.user.authenticateUserWithPhoneAndPassword.INCORRECT_PHONE_OR_PASSWORD', }, AUTH_ATTEMPTS_DAILY_LIMIT_REACHED: { code: TOO_MANY_REQUESTS, type: AUTH_ATTEMPTS_DAILY_LIMIT_REACHED, message: 'Too many authorization attempts have been made from this IP address. Please try again later', - messageForUser: 'errors.AUTH_ATTEMPTS_DAILY_LIMIT_REACHED.message', + messageForUser: 'api.user.authenticateUserWithPhoneAndPassword.AUTH_ATTEMPTS_DAILY_LIMIT_REACHED', }, } diff --git a/apps/dev-api/domains/user/schema/ConfirmEmailActionService.js b/apps/dev-api/domains/user/schema/ConfirmEmailActionService.js index 971e6d803f1..c5fed8744cc 100644 --- a/apps/dev-api/domains/user/schema/ConfirmEmailActionService.js +++ b/apps/dev-api/domains/user/schema/ConfirmEmailActionService.js @@ -36,31 +36,31 @@ const ERRORS = { code: BAD_USER_INPUT, type: INVALID_EMAIL, message: 'The provided email is in the wrong format', - messageForUser: 'errors.INVALID_EMAIL.message', + messageForUser: 'api.user.confirmEmailAction.INVALID_EMAIL', }, EMAILS_FOR_USER_DAY_LIMIT_REACHED: { code: TOO_MANY_REQUESTS, type: EMAILS_DAILY_LIMIT_REACHED, message: 'You exceeded the daily email request limit', - messageForUser: 'errors.EMAILS_DAILY_LIMIT_REACHED.user.message', + messageForUser: 'api.user.confirmEmailAction.EMAILS_DAILY_LIMIT_REACHED', }, EMAILS_FOR_ADDRESS_DAY_LIMIT_REACHED: { code: TOO_MANY_REQUESTS, type: EMAILS_DAILY_LIMIT_REACHED, message: 'The specified email has exceeded the daily SMS request limit', - messageForUser: 'errors.EMAILS_DAILY_LIMIT_REACHED.email.message', + messageForUser: 'api.user.confirmEmailAction.EMAILS_DAILY_LIMIT_REACHED', }, ACTION_NOT_FOUND: { code: BAD_USER_INPUT, type: ACTION_NOT_FOUND, message: 'ConfirmEmailAction with the specified ID is expired, or does not exist', - messageForUser: 'errors.ACTION_NOT_FOUND.code.message', + messageForUser: 'api.user.confirmPhoneAction.ACTION_NOT_FOUND', }, INVALID_CODE: { code: BAD_USER_INPUT, type: INVALID_CODE, message: 'Invalid verification code', - messageForUser: 'errors.INVALID_CODE.message', + messageForUser: 'api.user.confirmPhoneAction.INVALID_CODE', }, } diff --git a/apps/dev-api/domains/user/schema/ConfirmPhoneActionService.js b/apps/dev-api/domains/user/schema/ConfirmPhoneActionService.js index f2fb6999780..f4e64ed92a1 100644 --- a/apps/dev-api/domains/user/schema/ConfirmPhoneActionService.js +++ b/apps/dev-api/domains/user/schema/ConfirmPhoneActionService.js @@ -33,25 +33,25 @@ const ERRORS = { code: TOO_MANY_REQUESTS, type: SMS_DAILY_LIMIT_REACHED, message: 'Your IP address has exceeded the daily SMS request limit', - messageForUser: 'errors.SMS_DAILY_LIMIT_REACHED.ip.message', + messageForUser: 'api.user.confirmPhoneAction.SMS_FOR_IP_DAY_LIMIT_REACHED', }, SMS_FOR_PHONE_DAY_LIMIT_REACHED: { code: TOO_MANY_REQUESTS, type: SMS_DAILY_LIMIT_REACHED, message: 'The specified phone has exceeded the daily SMS request limit', - messageForUser: 'errors.SMS_DAILY_LIMIT_REACHED.phone.message', + messageForUser: 'api.user.confirmPhoneAction.SMS_FOR_PHONE_DAY_LIMIT_REACHED', }, ACTION_NOT_FOUND: { code: BAD_USER_INPUT, type: ACTION_NOT_FOUND, message: 'ConfirmPhoneAction with the specified ID is expired, or does not exist', - messageForUser: 'errors.ACTION_NOT_FOUND.code.message', + messageForUser: 'api.user.confirmPhoneAction.ACTION_NOT_FOUND', }, INVALID_CODE: { code: BAD_USER_INPUT, type: INVALID_CODE, message: 'Invalid verification code', - messageForUser: 'errors.INVALID_CODE.message', + messageForUser: 'api.user.confirmPhoneAction.INVALID_CODE', }, } diff --git a/apps/dev-api/domains/user/schema/RegisterNewUserService.js b/apps/dev-api/domains/user/schema/RegisterNewUserService.js index fe2818dcd3e..18b9ab6e2cb 100644 --- a/apps/dev-api/domains/user/schema/RegisterNewUserService.js +++ b/apps/dev-api/domains/user/schema/RegisterNewUserService.js @@ -18,13 +18,13 @@ const ERRORS = { code: BAD_USER_INPUT, type: USER_ALREADY_EXISTS, message: 'User with specified phone number is already registered', - messageForUser: 'errors.USER_ALREADY_EXISTS.message', + messageForUser: 'api.user.registerNewUser.USER_ALREADY_EXISTS', }, ACTION_NOT_FOUND: { code: BAD_USER_INPUT, type: ACTION_NOT_FOUND, message: 'ConfirmPhoneAction with the specified ID is not verified, expired, or does not exist', - messageForUser: 'errors.ACTION_NOT_FOUND.phone.message', + messageForUser: 'api.user.registerNewUser.ACTION_NOT_FOUND', }, } diff --git a/apps/dev-api/domains/user/schema/User.js b/apps/dev-api/domains/user/schema/User.js index a07a5bd94d0..a438e79304b 100644 --- a/apps/dev-api/domains/user/schema/User.js +++ b/apps/dev-api/domains/user/schema/User.js @@ -18,13 +18,13 @@ const ERRORS = { code: BAD_USER_INPUT, type: INVALID_PHONE, message: 'The provided phone number is in the wrong format', - messageForUser: 'errors.INVALID_PHONE.message', + messageForUser: 'api.user.user.INVALID_PHONE', }, PASSWORD_TOO_SIMPLE: { code: BAD_USER_INPUT, type: PASSWORD_TOO_SIMPLE, message: 'The provided password is too simple', - messageForUser: 'errors.PASSWORD_TOO_SIMPLE.message', + messageForUser: 'api.user.user.PASSWORD_TOO_SIMPLE', }, } diff --git a/apps/dev-api/lang/en.json b/apps/dev-api/lang/en.json index 41188b574b8..4c754562a77 100644 --- a/apps/dev-api/lang/en.json +++ b/apps/dev-api/lang/en.json @@ -2,31 +2,31 @@ "messages.confirmPhoneAction.body": "Your confirmation code: {code}", "messages.confirmEmailAction.subject": "[Developers portal] Email confirmation", "messages.confirmEmailAction.body": "Use the following code to confirm your email: {code}", - "errors.AUTH_ATTEMPTS_DAILY_LIMIT_REACHED.message": "Too many authorization attempts have been made from this IP address. Please try again later", - "errors.INCORRECT_PHONE_OR_PASSWORD.message": "Incorrect phone number or password", - "errors.SMS_DAILY_LIMIT_REACHED.ip.message": "Too many registration attempts have been made from this IP address. Please try again later", - "errors.SMS_DAILY_LIMIT_REACHED.phone.message": "The specified phone has exceeded the daily SMS request limit", - "errors.EMAILS_DAILY_LIMIT_REACHED.user.message": "You have sent too many messages. Please try again later", - "errors.EMAILS_DAILY_LIMIT_REACHED.email.message": "The specified email exceeded the daily limit for sending messages", - "errors.INVALID_PHONE.message": "The provided phone number is in the wrong format", - "errors.INVALID_EMAIL.message": "The provided email is in the wrong format", - "errors.ACTION_NOT_FOUND.code.message": "The code has expired or has already been used", - "errors.ACTION_NOT_FOUND.phone.message": "It's been too long since the phone was confirmed", - "errors.ACTION_NOT_FOUND.email.message": "It's been too long since the email was confirmed", - "errors.INVALID_CODE.message": "Invalid verification code", - "errors.USER_ALREADY_EXISTS.message": "A user with this phone number has already been registered before", - "errors.CONDO_USER_ALREADY_EXISTS.message": "A user with this e-mail address has already been registered at the selected environment", - "errors.ACCESS_RIGHT_ALREADY_EXISTS.message": "A service user is already linked to this application", - "errors.PASSWORD_TOO_SIMPLE.message": "The specified password is too short or contains many repeated characters", - "errors.INVALID_MIMETYPE.message": "Invalid file type. The file must have one of the following mimetypes: {types}", - "errors.INVALID_BUILD_VERSION.message": "The specified build version is not semantically correct", - "errors.FIRST_PUBLISH_WITHOUT_INFO.message": "The first publication of the application should include information about the application", - "errors.APP_NOT_FOUND.message": "The application with the specified ID was not found", - "errors.CONDO_APP_NOT_FOUND.message": "The application was not found on the selected stand. Enable the «Application Information» option and try again", - "errors.BUILD_NOT_FOUND.message": "The application build with the specified ID was not found", - "errors.MULTIPLE_FOUND.message": "Unable to determine the object to update because multiple objects were found for the specified importID and exportId", - "errors.PUBLISH_NOT_ALLOWED.message": "The application cannot be published to the specified stand, as this requires additional verification", - "errors.OIDC_CLIENT_NOT_FOUND.message": "OIDC client for the specified application was not found", - "errors.INVALID_URL.message": "The specified redirectUri is not a valid URL", - "errors.HTTPS_ONLY.message": "The URL has a non-valid protocol. Only https is allowed for the selected environment" + "api.user.authenticateUserWithPhoneAndPassword.AUTH_ATTEMPTS_DAILY_LIMIT_REACHED": "Too many authorization attempts have been made from this IP address. Please try again later", + "api.user.authenticateUserWithPhoneAndPassword.INCORRECT_PHONE_OR_PASSWORD": "Incorrect phone number or password", + "api.user.confirmPhoneAction.SMS_FOR_IP_DAY_LIMIT_REACHED": "Too many registration attempts have been made from this IP address. Please try again later", + "api.user.confirmPhoneAction.SMS_FOR_PHONE_DAY_LIMIT_REACHED": "The specified phone has exceeded the daily SMS request limit", + "api.user.confirmEmailAction.EMAILS_DAILY_LIMIT_REACHED": "You have sent too many messages. Please try again later", + "api.user.confirmEmailAction.EMAILS_DAILY_LIMIT_REACHED": "The specified email exceeded the daily limit for sending messages", + "api.user.user.INVALID_PHONE": "The provided phone number is in the wrong format", + "api.user.confirmEmailAction.INVALID_EMAIL": "The provided email is in the wrong format", + "api.user.confirmPhoneAction.ACTION_NOT_FOUND": "The code has expired or has already been used", + "api.user.registerNewUser.ACTION_NOT_FOUND": "It's been too long since the phone was confirmed", + "api.miniapp.registerAppServiceUser.APP_NOT_FOUND": "It's been too long since the email was confirmed", + "api.user.confirmPhoneAction.INVALID_CODE": "Invalid verification code", + "api.user.registerNewUser.USER_ALREADY_EXISTS": "A user with this phone number has already been registered before", + "api.miniapp.registerAppServiceUser.CONDO_USER_ALREADY_EXISTS": "A user with this e-mail address has already been registered at the selected environment", + "api.miniapp.registerAppServiceUser.ACCESS_RIGHT_ALREADY_EXISTS": "A service user is already linked to this application", + "api.user.user.PASSWORD_TOO_SIMPLE": "The specified password is too short or contains many repeated characters", + "api.common.INVALID_MIMETYPE": "Invalid file type. The file must have one of the following mimetypes: {types}", + "api.miniapp.B2CAppBuild.INVALID_BUILD_VERSION": "The specified build version is not semantically correct", + "api.miniapp.publishB2CApp.FIRST_PUBLISH_WITHOUT_INFO": "The first publication of the application should include information about the application", + "api.miniapp.B2CApp.APP_NOT_FOUND": "The application with the specified ID was not found", + "api.miniapp.publishB2CApp.CONDO_APP_NOT_FOUND": "The application was not found on the selected stand. Enable the «Application Information» option and try again", + "api.miniapp.publishB2CApp.BUILD_NOT_FOUND": "The application build with the specified ID was not found", + "api.common.MULTIPLE_FOUND": "Unable to determine the object to update because multiple objects were found for the specified importID and exportId", + "api.miniapp.publishB2CApp.PUBLISH_NOT_ALLOWED": "The application cannot be published to the specified stand, as this requires additional verification", + "api.miniapp.OIDC_CLIENT_NOT_FOUND": "OIDC client for the specified application was not found", + "api.miniapp.updateOIDCClientUrl.INVALID_URL": "The specified redirectUri is not a valid URL", + "api.miniapp.updateOIDCClientUrl.HTTPS_ONLY": "The URL has a non-valid protocol. Only https is allowed for the selected environment" } \ No newline at end of file diff --git a/apps/dev-api/lang/ru.json b/apps/dev-api/lang/ru.json index 39c79b623f1..8899c5c7bc9 100644 --- a/apps/dev-api/lang/ru.json +++ b/apps/dev-api/lang/ru.json @@ -2,31 +2,31 @@ "messages.confirmPhoneAction.body": "Ваш код подтверждения: {code}", "messages.confirmEmailAction.subject": "[Портал разработчиков] Подтверждение электронной почты", "messages.confirmEmailAction.body": "Для подтверждения электронной почты используйте следующий код: {code}", - "errors.AUTH_ATTEMPTS_DAILY_LIMIT_REACHED.message": "С этого IP-адреса было предпринято слишком много попыток авторизации. Пожалуйста, повторите попытку позже", - "errors.INCORRECT_PHONE_OR_PASSWORD.message": "Неверный номер телефона или пароль", - "errors.SMS_DAILY_LIMIT_REACHED.ip.message": "С этого IP-адреса было предпринято слишком много попыток регистрации. Пожалуйста, повторите попытку позже", - "errors.SMS_DAILY_LIMIT_REACHED.phone.message": "Указанный телефон превысил суточный лимит запросов SMS-сообщений", - "errors.EMAILS_DAILY_LIMIT_REACHED.user.message": "Вами было отправлено слишком большое число сообщений. Пожалуйста, повторите попытку позже", - "errors.EMAILS_DAILY_LIMIT_REACHED.email.message": "Указанная электронная почта превысила суточный лимит запросов на отправку сообщений", - "errors.INVALID_PHONE.message": "Указанный номер телефона имеет неправильный формат", - "errors.INVALID_EMAIL.message": "Введенная электронная почта имеет неправильный формат", - "errors.ACTION_NOT_FOUND.code.message": "Срок действия отправленного кода истек или он уже был использован", - "errors.ACTION_NOT_FOUND.phone.message": "С момента подтверждения телефона прошло слишком много времени", - "errors.ACTION_NOT_FOUND.email.message": "С момента подтверждения электронной почты прошло слишком много времени", - "errors.INVALID_CODE.message": "Неверный код подтверждения", - "errors.USER_ALREADY_EXISTS.message": "Пользователь с таким номером телефона уже был зарегистрирован ранее", - "errors.CONDO_USER_ALREADY_EXISTS.message": "Пользователь с такой электронной почтой уже был зарегистрирован на выбранном стенде", - "errors.ACCESS_RIGHT_ALREADY_EXISTS.message": "К данному приложению уже привязан сервисный пользователь", - "errors.PASSWORD_TOO_SIMPLE.message": "Указанный пароль слишком короткий или содержит много повторяющихся символов", - "errors.INVALID_MIMETYPE.message": "Неверный тип файла. Файл должен иметь одно из следующих расширений: {types}", - "errors.INVALID_BUILD_VERSION.message": "Указанная версия сборки не является семантически корректной", - "errors.FIRST_PUBLISH_WITHOUT_INFO.message": "Первая публикация приложения должна включать информацию о приложении", - "errors.APP_NOT_FOUND.message": "Приложение с указанным ID не найдено", - "errors.CONDO_APP_NOT_FOUND.message": "Приложение не найдено на выбранном стенде. Включите опцию «Информация о приложении» и повторите попытку", - "errors.BUILD_NOT_FOUND.message": "Сборка приложения с указанным ID не найдена", - "errors.MULTIPLE_FOUND.message": "Невозможно определить объект для обновления, так как найдено несколько объектов по указанным importID и exportId", - "errors.PUBLISH_NOT_ALLOWED.message": "Приложение не может быть опубликовано на указанный стенд, так как для этого необходимо дополнительная верификация", - "errors.OIDC_CLIENT_NOT_FOUND.message": "OIDC клиент для указанного приложения не найден", - "errors.INVALID_URL.message": "Указанный redirectUri не является валидной ссылкой", - "errors.HTTPS_ONLY.message": "URL имеет невалидные протокол. Для выбранного стенда разрешен только https" + "api.user.authenticateUserWithPhoneAndPassword.AUTH_ATTEMPTS_DAILY_LIMIT_REACHED": "С этого IP-адреса было предпринято слишком много попыток авторизации. Пожалуйста, повторите попытку позже", + "api.user.authenticateUserWithPhoneAndPassword.INCORRECT_PHONE_OR_PASSWORD": "Неверный номер телефона или пароль", + "api.user.confirmPhoneAction.SMS_FOR_IP_DAY_LIMIT_REACHED": "С этого IP-адреса было предпринято слишком много попыток регистрации. Пожалуйста, повторите попытку позже", + "api.user.confirmPhoneAction.SMS_FOR_PHONE_DAY_LIMIT_REACHED": "Указанный телефон превысил суточный лимит запросов SMS-сообщений", + "api.user.confirmEmailAction.EMAILS_DAILY_LIMIT_REACHED": "Вами было отправлено слишком большое число сообщений. Пожалуйста, повторите попытку позже", + "api.user.confirmEmailAction.EMAILS_DAILY_LIMIT_REACHED": "Указанная электронная почта превысила суточный лимит запросов на отправку сообщений", + "api.user.user.INVALID_PHONE": "Указанный номер телефона имеет неправильный формат", + "api.user.confirmEmailAction.INVALID_EMAIL": "Введенная электронная почта имеет неправильный формат", + "api.user.confirmPhoneAction.ACTION_NOT_FOUND": "Срок действия отправленного кода истек или он уже был использован", + "api.user.registerNewUser.ACTION_NOT_FOUND": "С момента подтверждения телефона прошло слишком много времени", + "api.miniapp.registerAppServiceUser.APP_NOT_FOUND": "С момента подтверждения электронной почты прошло слишком много времени", + "api.user.confirmPhoneAction.INVALID_CODE": "Неверный код подтверждения", + "api.user.registerNewUser.USER_ALREADY_EXISTS": "Пользователь с таким номером телефона уже был зарегистрирован ранее", + "api.miniapp.registerAppServiceUser.CONDO_USER_ALREADY_EXISTS": "Пользователь с такой электронной почтой уже был зарегистрирован на выбранном стенде", + "api.miniapp.registerAppServiceUser.ACCESS_RIGHT_ALREADY_EXISTS": "К данному приложению уже привязан сервисный пользователь", + "api.user.user.PASSWORD_TOO_SIMPLE": "Указанный пароль слишком короткий или содержит много повторяющихся символов", + "api.common.INVALID_MIMETYPE": "Неверный тип файла. Файл должен иметь одно из следующих расширений: {types}", + "api.miniapp.B2CAppBuild.INVALID_BUILD_VERSION": "Указанная версия сборки не является семантически корректной", + "api.miniapp.publishB2CApp.FIRST_PUBLISH_WITHOUT_INFO": "Первая публикация приложения должна включать информацию о приложении", + "api.miniapp.B2CApp.APP_NOT_FOUND": "Приложение с указанным ID не найдено", + "api.miniapp.publishB2CApp.CONDO_APP_NOT_FOUND": "Приложение не найдено на выбранном стенде. Включите опцию «Информация о приложении» и повторите попытку", + "api.miniapp.publishB2CApp.BUILD_NOT_FOUND": "Сборка приложения с указанным ID не найдена", + "api.common.MULTIPLE_FOUND": "Невозможно определить объект для обновления, так как найдено несколько объектов по указанным importID и exportId", + "api.miniapp.publishB2CApp.PUBLISH_NOT_ALLOWED": "Приложение не может быть опубликовано на указанный стенд, так как для этого необходимо дополнительная верификация", + "api.miniapp.OIDC_CLIENT_NOT_FOUND": "OIDC клиент для указанного приложения не найден", + "api.miniapp.updateOIDCClientUrl.INVALID_URL": "Указанный redirectUri не является валидной ссылкой", + "api.miniapp.updateOIDCClientUrl.HTTPS_ONLY": "URL имеет невалидные протокол. Для выбранного стенда разрешен только https" } \ No newline at end of file diff --git a/apps/pass b/apps/pass index 36dfce4a7bd..0c0ceec4ed7 160000 --- a/apps/pass +++ b/apps/pass @@ -1 +1 @@ -Subproject commit 36dfce4a7bdee6d1b4246d35bdd9e719a2aeba52 +Subproject commit 0c0ceec4ed7a221985cae519199a49734aaafe5f