@forwardslashns/taskit-validation-messages 1.0.0 → 1.0.2

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.
@@ -1,18 +1,4 @@
1
1
  export declare const VALIDATION_MESSAGES: {
2
- readonly DATA_FILTER: {
3
- readonly MISSING_PAGE_SIZE: {
4
- readonly message: "Request is invalid, 'pageSize' must exist if 'pageNumber' exists";
5
- };
6
- readonly MISSING_PAGE_NUMBER: {
7
- readonly message: "Request is invalid, 'pageNumber' must exist if 'pageSize' exists";
8
- };
9
- readonly MISSING_SORT_BY: {
10
- readonly message: "Request is invalid, 'sortBy' must exist if 'sortType' exists";
11
- };
12
- readonly MISSING_SORT_TYPE: {
13
- readonly message: "Request is invalid, 'sortType' must exist if 'sortBy' exists";
14
- };
15
- };
16
2
  readonly ACCOUNT_CATEGORY: {
17
3
  readonly INVALID_REQUEST: {
18
4
  readonly message: "Missing account category id in request";
@@ -220,6 +206,10 @@ export declare const VALIDATION_MESSAGES: {
220
206
  readonly CLIENT_COULD_NOT_BE_DELETED_CONTACTS_EXIST: {
221
207
  readonly message: "This client cannot be deleted because it has contacts associated";
222
208
  };
209
+ readonly DOMESTIC_STATE_DATES_OVERLAP: {
210
+ readonly message: "The entry already has {state} starting from {stateStartDate} to {stateEndDate}. Your current state overlaps with that time. Please adjust the dates so the state timeframes do not overlap.";
211
+ readonly params: readonly ["state", "stateStartDate", "stateEndDate"];
212
+ };
223
213
  };
224
214
  readonly FILING_CATEGORY: {
225
215
  readonly INVALID_REQUEST: {
@@ -287,6 +277,20 @@ export declare const VALIDATION_MESSAGES: {
287
277
  readonly message: "Reset password link is no longer valid. Please use the most recent one.";
288
278
  };
289
279
  };
280
+ readonly DATA_FILTER: {
281
+ readonly MISSING_PAGE_SIZE: {
282
+ readonly message: "Request is invalid, 'pageSize' must exist if 'pageNumber' exists";
283
+ };
284
+ readonly MISSING_PAGE_NUMBER: {
285
+ readonly message: "Request is invalid, 'pageNumber' must exist if 'pageSize' exists";
286
+ };
287
+ readonly MISSING_SORT_BY: {
288
+ readonly message: "Request is invalid, 'sortBy' must exist if 'sortType' exists";
289
+ };
290
+ readonly MISSING_SORT_TYPE: {
291
+ readonly message: "Request is invalid, 'sortType' must exist if 'sortBy' exists";
292
+ };
293
+ };
290
294
  readonly USER_PREFERENCE: {
291
295
  readonly FEATURE_DOES_NOT_EXIST: {
292
296
  readonly message: "Feature with name {feature} does not exist";
@@ -1 +1 @@
1
- {"version":3,"file":"validation-messages.d.ts","sourceRoot":"","sources":["../../src/validation/validation-messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoTtB,CAAC"}
1
+ {"version":3,"file":"validation-messages.d.ts","sourceRoot":"","sources":["../../src/validation/validation-messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0TtB,CAAC"}
@@ -2,20 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VALIDATION_MESSAGES = void 0;
4
4
  exports.VALIDATION_MESSAGES = {
5
- DATA_FILTER: {
6
- MISSING_PAGE_SIZE: {
7
- message: `Request is invalid, 'pageSize' must exist if 'pageNumber' exists`,
8
- },
9
- MISSING_PAGE_NUMBER: {
10
- message: `Request is invalid, 'pageNumber' must exist if 'pageSize' exists`,
11
- },
12
- MISSING_SORT_BY: {
13
- message: `Request is invalid, 'sortBy' must exist if 'sortType' exists`,
14
- },
15
- MISSING_SORT_TYPE: {
16
- message: `Request is invalid, 'sortType' must exist if 'sortBy' exists`,
17
- },
18
- },
19
5
  ACCOUNT_CATEGORY: {
20
6
  INVALID_REQUEST: {
21
7
  message: 'Missing account category id in request',
@@ -227,6 +213,10 @@ exports.VALIDATION_MESSAGES = {
227
213
  CLIENT_COULD_NOT_BE_DELETED_CONTACTS_EXIST: {
228
214
  message: `This client cannot be deleted because it has contacts associated`,
229
215
  },
216
+ DOMESTIC_STATE_DATES_OVERLAP: {
217
+ message: `The entry already has {state} starting from {stateStartDate} to {stateEndDate}. Your current state overlaps with that time. Please adjust the dates so the state timeframes do not overlap.`,
218
+ params: ['state', 'stateStartDate', 'stateEndDate'],
219
+ }
230
220
  },
231
221
  FILING_CATEGORY: {
232
222
  INVALID_REQUEST: {
@@ -294,6 +284,21 @@ exports.VALIDATION_MESSAGES = {
294
284
  message: `Reset password link is no longer valid. Please use the most recent one.`,
295
285
  },
296
286
  },
287
+ //BACKEND ONLY VALIDATION FEATURES
288
+ DATA_FILTER: {
289
+ MISSING_PAGE_SIZE: {
290
+ message: `Request is invalid, 'pageSize' must exist if 'pageNumber' exists`,
291
+ },
292
+ MISSING_PAGE_NUMBER: {
293
+ message: `Request is invalid, 'pageNumber' must exist if 'pageSize' exists`,
294
+ },
295
+ MISSING_SORT_BY: {
296
+ message: `Request is invalid, 'sortBy' must exist if 'sortType' exists`,
297
+ },
298
+ MISSING_SORT_TYPE: {
299
+ message: `Request is invalid, 'sortType' must exist if 'sortBy' exists`,
300
+ },
301
+ },
297
302
  USER_PREFERENCE: {
298
303
  FEATURE_DOES_NOT_EXIST: {
299
304
  message: `Feature with name {feature} does not exist`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardslashns/taskit-validation-messages",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "commonjs",
@@ -1,18 +1,4 @@
1
1
  export const VALIDATION_MESSAGES = {
2
- DATA_FILTER: {
3
- MISSING_PAGE_SIZE: {
4
- message: `Request is invalid, 'pageSize' must exist if 'pageNumber' exists`,
5
- },
6
- MISSING_PAGE_NUMBER: {
7
- message: `Request is invalid, 'pageNumber' must exist if 'pageSize' exists`,
8
- },
9
- MISSING_SORT_BY: {
10
- message: `Request is invalid, 'sortBy' must exist if 'sortType' exists`,
11
- },
12
- MISSING_SORT_TYPE: {
13
- message: `Request is invalid, 'sortType' must exist if 'sortBy' exists`,
14
- },
15
- },
16
2
  ACCOUNT_CATEGORY: {
17
3
  INVALID_REQUEST: {
18
4
  message: 'Missing account category id in request',
@@ -224,6 +210,10 @@ export const VALIDATION_MESSAGES = {
224
210
  CLIENT_COULD_NOT_BE_DELETED_CONTACTS_EXIST: {
225
211
  message: `This client cannot be deleted because it has contacts associated`,
226
212
  },
213
+ DOMESTIC_STATE_DATES_OVERLAP: {
214
+ message: `The entry already has {state} starting from {stateStartDate} to {stateEndDate}. Your current state overlaps with that time. Please adjust the dates so the state timeframes do not overlap.`,
215
+ params: ['state', 'stateStartDate', 'stateEndDate'],
216
+ }
227
217
  },
228
218
  FILING_CATEGORY: {
229
219
  INVALID_REQUEST: {
@@ -291,6 +281,22 @@ export const VALIDATION_MESSAGES = {
291
281
  message: `Reset password link is no longer valid. Please use the most recent one.`,
292
282
  },
293
283
  },
284
+
285
+ //BACKEND ONLY VALIDATION FEATURES
286
+ DATA_FILTER: {
287
+ MISSING_PAGE_SIZE: {
288
+ message: `Request is invalid, 'pageSize' must exist if 'pageNumber' exists`,
289
+ },
290
+ MISSING_PAGE_NUMBER: {
291
+ message: `Request is invalid, 'pageNumber' must exist if 'pageSize' exists`,
292
+ },
293
+ MISSING_SORT_BY: {
294
+ message: `Request is invalid, 'sortBy' must exist if 'sortType' exists`,
295
+ },
296
+ MISSING_SORT_TYPE: {
297
+ message: `Request is invalid, 'sortType' must exist if 'sortBy' exists`,
298
+ },
299
+ },
294
300
  USER_PREFERENCE: {
295
301
  FEATURE_DOES_NOT_EXIST: {
296
302
  message: `Feature with name {feature} does not exist`,