@floristcloud/api-lib 1.2.11 → 1.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,4 +18,5 @@ exports.ErrorI18nKey = {
18
18
  moveItemsBatchLimitExceeded: 'moveItems.batchLimitExceeded',
19
19
  moveItemsItemsNotFound: 'moveItems.itemsNotFound',
20
20
  moveItemsInPreOrdersWarning: 'moveItems.inPreOrdersWarning',
21
+ consignmentImportTooManyRows: 'consignmentImport.tooManyRows',
21
22
  };
@@ -226,13 +226,13 @@ exports.ERRORS = {
226
226
  CONSIGNMENT_FILTERS_VALUES_FAILED: { code: 'CON014', message: 'Failed when retrieving consignment filters values', httpCode: 500 },
227
227
  CONSIGNMENT_WRITE_OFF_NOT_EMPTY: { code: 'CON015', message: 'Consignment not deleted, write-off not empty', httpCode: 400 },
228
228
  CONSIGNMENT_PRODUCT_UPDATE_FILE_REQUIRED: { code: 'CON016', message: 'File is required', httpCode: 400 },
229
- CONSIGNMENT_PRODUCT_UPDATE_FILE_TOO_LARGE: { code: 'CON017', message: 'File size too large', httpCode: 400 },
230
229
  CONSIGNMENT_PRODUCT_UPDATE_INVALID_CONFIG: { code: 'CON018', message: 'Invalid config format', httpCode: 400 },
231
230
  CONSIGNMENT_PRODUCT_UPDATE_NO_DATA_ROWS: { code: 'CON019', message: 'File has no data rows', httpCode: 400 },
232
231
  CONSIGNMENT_PRODUCT_UPDATE_TOO_MANY_ROWS: { code: 'CON020', message: 'Too many rows', httpCode: 400 },
233
232
  CONSIGNMENT_PRODUCT_UPDATE_DUPLICATE_MATCH: { code: 'CON021', message: 'Multiple matches for row, first used', httpCode: 200 },
234
233
  CONSIGNMENT_PRODUCT_UPDATE_ANALYSIS_FAILED: { code: 'CON022', message: 'Update analysis failed', httpCode: 500 },
235
234
  CONSIGNMENT_PRODUCT_UPDATE_BATCH_TOO_LARGE: { code: 'CON023', message: 'Batch size too large', httpCode: 400 },
235
+ CONSIGNMENT_IMPORT_TOO_MANY_ROWS: { code: 'CON024', message: 'Too many rows for this import mode', httpCode: 400 },
236
236
  // CONSIGNMENT-IMPORT-SCHEME
237
237
  CONSIGNMENT_IMPORT_SCHEME_NOT_CREATED: { code: 'CS001', message: 'Failed to create consignment import scheme', httpCode: 500 },
238
238
  CONSIGNMENT_IMPORT_SCHEME_FETCH_FAILED: { code: 'CS002', message: 'Error when retrieving a consignment import scheme', httpCode: 500 },
@@ -244,6 +244,11 @@ exports.ERRORS = {
244
244
  CONSIGNMENT_IMPORT_SCHEME_NOT_FOUND: { code: 'CS004', message: 'Consignment import scheme not founded', httpCode: 404 },
245
245
  CONSIGNMENT_IMPORT_SCHEME_NOT_DELETED: { code: 'CS005', message: 'Consignment import scheme not deleted', httpCode: 500 },
246
246
  CONSIGNMENT_IMPORT_SCHEME_NOT_UPDATED: { code: 'CS006', message: 'Failed to update consignment import scheme', httpCode: 500 },
247
+ CONSIGNMENT_IMPORT_SCHEME_DEFAULT_CANNOT_BE_DELETED: {
248
+ code: 'CS007',
249
+ message: 'Default consignment import scheme cannot be deleted',
250
+ httpCode: 400,
251
+ },
247
252
  // CONSIGNMENT-IMPORT-SCHEMA-RELATION
248
253
  CONSIGNMENT_IMPORT_SCHEMA_RELATION_NOT_CREATED: {
249
254
  code: 'CSR001',
@@ -520,6 +525,8 @@ exports.ERRORS = {
520
525
  FILE_SIZE_LIMIT_EXCEEDED: { code: 'F004', message: 'File size limit exceeded', httpCode: 400 },
521
526
  FILE_GET_INFO_FAILED: { code: 'F005', message: 'Failed to get file info', httpCode: 500 },
522
527
  FILE_NOT_SUPPORTED: { code: 'F006', message: 'File not supported', httpCode: 400 },
528
+ FILE_TOO_LARGE: { code: 'F007', message: 'File size exceeds the allowed limit', httpCode: 413 },
529
+ FILE_UPLOAD_FAILED: { code: 'F008', message: 'File upload failed', httpCode: 400 },
523
530
  FILE_S3_FORBIDDEN: { code: 'F007', message: 'File S3 forbidden', httpCode: 403 },
524
531
  //WHATSAPP
525
532
  WHATSAPP_TEXT_NOT_SENT: { code: 'W001', message: 'Failed to send text message', httpCode: 500 },
@@ -15,6 +15,7 @@ export const ErrorI18nKey = {
15
15
  moveItemsBatchLimitExceeded: 'moveItems.batchLimitExceeded',
16
16
  moveItemsItemsNotFound: 'moveItems.itemsNotFound',
17
17
  moveItemsInPreOrdersWarning: 'moveItems.inPreOrdersWarning',
18
+ consignmentImportTooManyRows: 'consignmentImport.tooManyRows',
18
19
  } as const;
19
20
 
20
21
  export type ErrorI18nKeyType = (typeof ErrorI18nKey)[keyof typeof ErrorI18nKey];
package/constant/error.ts CHANGED
@@ -235,13 +235,13 @@ export const ERRORS = {
235
235
  CONSIGNMENT_FILTERS_VALUES_FAILED: { code: 'CON014', message: 'Failed when retrieving consignment filters values', httpCode: 500 },
236
236
  CONSIGNMENT_WRITE_OFF_NOT_EMPTY: { code: 'CON015', message: 'Consignment not deleted, write-off not empty', httpCode: 400 },
237
237
  CONSIGNMENT_PRODUCT_UPDATE_FILE_REQUIRED: { code: 'CON016', message: 'File is required', httpCode: 400 },
238
- CONSIGNMENT_PRODUCT_UPDATE_FILE_TOO_LARGE: { code: 'CON017', message: 'File size too large', httpCode: 400 },
239
238
  CONSIGNMENT_PRODUCT_UPDATE_INVALID_CONFIG: { code: 'CON018', message: 'Invalid config format', httpCode: 400 },
240
239
  CONSIGNMENT_PRODUCT_UPDATE_NO_DATA_ROWS: { code: 'CON019', message: 'File has no data rows', httpCode: 400 },
241
240
  CONSIGNMENT_PRODUCT_UPDATE_TOO_MANY_ROWS: { code: 'CON020', message: 'Too many rows', httpCode: 400 },
242
241
  CONSIGNMENT_PRODUCT_UPDATE_DUPLICATE_MATCH: { code: 'CON021', message: 'Multiple matches for row, first used', httpCode: 200 },
243
242
  CONSIGNMENT_PRODUCT_UPDATE_ANALYSIS_FAILED: { code: 'CON022', message: 'Update analysis failed', httpCode: 500 },
244
243
  CONSIGNMENT_PRODUCT_UPDATE_BATCH_TOO_LARGE: { code: 'CON023', message: 'Batch size too large', httpCode: 400 },
244
+ CONSIGNMENT_IMPORT_TOO_MANY_ROWS: { code: 'CON024', message: 'Too many rows for this import mode', httpCode: 400 },
245
245
 
246
246
  // CONSIGNMENT-IMPORT-SCHEME
247
247
  CONSIGNMENT_IMPORT_SCHEME_NOT_CREATED: { code: 'CS001', message: 'Failed to create consignment import scheme', httpCode: 500 },
@@ -254,6 +254,11 @@ export const ERRORS = {
254
254
  CONSIGNMENT_IMPORT_SCHEME_NOT_FOUND: { code: 'CS004', message: 'Consignment import scheme not founded', httpCode: 404 },
255
255
  CONSIGNMENT_IMPORT_SCHEME_NOT_DELETED: { code: 'CS005', message: 'Consignment import scheme not deleted', httpCode: 500 },
256
256
  CONSIGNMENT_IMPORT_SCHEME_NOT_UPDATED: { code: 'CS006', message: 'Failed to update consignment import scheme', httpCode: 500 },
257
+ CONSIGNMENT_IMPORT_SCHEME_DEFAULT_CANNOT_BE_DELETED: {
258
+ code: 'CS007',
259
+ message: 'Default consignment import scheme cannot be deleted',
260
+ httpCode: 400,
261
+ },
257
262
 
258
263
  // CONSIGNMENT-IMPORT-SCHEMA-RELATION
259
264
  CONSIGNMENT_IMPORT_SCHEMA_RELATION_NOT_CREATED: {
@@ -545,6 +550,8 @@ export const ERRORS = {
545
550
  FILE_SIZE_LIMIT_EXCEEDED: { code: 'F004', message: 'File size limit exceeded', httpCode: 400 },
546
551
  FILE_GET_INFO_FAILED: { code: 'F005', message: 'Failed to get file info', httpCode: 500 },
547
552
  FILE_NOT_SUPPORTED: { code: 'F006', message: 'File not supported', httpCode: 400 },
553
+ FILE_TOO_LARGE: { code: 'F007', message: 'File size exceeds the allowed limit', httpCode: 413 },
554
+ FILE_UPLOAD_FAILED: { code: 'F008', message: 'File upload failed', httpCode: 400 },
548
555
  FILE_S3_FORBIDDEN: { code: 'F007', message: 'File S3 forbidden', httpCode: 403 },
549
556
 
550
557
  //WHATSAPP
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.2.11",
3
+ "version": "1.2.12",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {