@forwardslashns/taskit-validation-messages 1.10.52 → 1.10.53

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.
@@ -0,0 +1,72 @@
1
+ export declare const TASKS: {
2
+ NOT_FOUND: {
3
+ severity: "error";
4
+ message: string;
5
+ params: string[];
6
+ affectedFields: string[];
7
+ };
8
+ NOT_FILING_TYPE: {
9
+ severity: "error";
10
+ message: string;
11
+ params: string[];
12
+ affectedFields: string[];
13
+ };
14
+ CANNOT_MARK_FINAL_HAS_LATER_FILINGS: {
15
+ severity: "error";
16
+ message: string;
17
+ affectedFields: string[];
18
+ };
19
+ GENERATION_LOG_NOT_FOUND: {
20
+ severity: "error";
21
+ message: string;
22
+ params: string[];
23
+ affectedFields: string[];
24
+ };
25
+ CANNOT_COMPLETE_NOT_CURRENT: {
26
+ severity: "error";
27
+ message: string;
28
+ affectedFields: string[];
29
+ };
30
+ CANNOT_COMPLETE_ALREADY_COMPLETED: {
31
+ severity: "error";
32
+ message: string;
33
+ affectedFields: string[];
34
+ };
35
+ CANNOT_UNDO_NOT_COMPLETED: {
36
+ severity: "error";
37
+ message: string;
38
+ affectedFields: string[];
39
+ };
40
+ CANNOT_UNDO_NOT_LATEST: {
41
+ severity: "error";
42
+ message: string;
43
+ affectedFields: string[];
44
+ };
45
+ TARGET_DATE_INVALID_FORMAT: {
46
+ severity: "error";
47
+ message: string;
48
+ affectedFields: string[];
49
+ };
50
+ WHY_REQUIRED_WITH_DONT_DO: {
51
+ severity: "error";
52
+ message: string;
53
+ affectedFields: string[];
54
+ };
55
+ WHY_MUST_BE_FROM_ALLOWED_VALUES: {
56
+ severity: "error";
57
+ message: string;
58
+ affectedFields: string[];
59
+ };
60
+ ASSIGNMENT_NOT_FOUND: {
61
+ severity: "error";
62
+ message: string;
63
+ params: string[];
64
+ affectedFields: string[];
65
+ };
66
+ CLIENT_ID_MISMATCH_WITH_CLIENT_TEMPLATE: {
67
+ severity: "error";
68
+ message: string;
69
+ affectedFields: string[];
70
+ };
71
+ };
72
+ //# sourceMappingURL=tasks.validation-messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tasks.validation-messages.d.ts","sourceRoot":"","sources":["../../../src/validation/features/tasks.validation-messages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyEhB,CAAC"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TASKS = void 0;
4
+ const validation_message_types_1 = require("../validation-message.types");
5
+ exports.TASKS = (0, validation_message_types_1.defineValidationFeatureMessages)({
6
+ NOT_FOUND: {
7
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
8
+ message: 'Task <b>{taskId}</b> does not exist or does not belong to this client.',
9
+ params: ['taskId'],
10
+ affectedFields: ['taskId'],
11
+ },
12
+ NOT_FILING_TYPE: {
13
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
14
+ message: 'Task <b>{taskId}</b> is not a Filing type task. Only Filing tasks support this operation.',
15
+ params: ['taskId'],
16
+ affectedFields: ['taskId'],
17
+ },
18
+ CANNOT_MARK_FINAL_HAS_LATER_FILINGS: {
19
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
20
+ message: "This filing cannot be marked Final, since there are other filings after this filing's ending period. Only the last filing can be marked final.",
21
+ affectedFields: ['isFinalFiling'],
22
+ },
23
+ GENERATION_LOG_NOT_FOUND: {
24
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
25
+ message: 'Task generation log <b>{logId}</b> does not exist.',
26
+ params: ['logId'],
27
+ affectedFields: ['logId'],
28
+ },
29
+ CANNOT_COMPLETE_NOT_CURRENT: {
30
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
31
+ message: 'Assignment can only be completed when all previous workflow assignments in order have already been completed.',
32
+ affectedFields: ['status'],
33
+ },
34
+ CANNOT_COMPLETE_ALREADY_COMPLETED: {
35
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
36
+ message: 'This assignment has already been completed.',
37
+ affectedFields: ['status'],
38
+ },
39
+ CANNOT_UNDO_NOT_COMPLETED: {
40
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
41
+ message: 'Only completed assignments can be undone.',
42
+ affectedFields: ['status'],
43
+ },
44
+ CANNOT_UNDO_NOT_LATEST: {
45
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
46
+ message: 'Only the latest completed assignment can be undone. A later assignment has already been completed.',
47
+ affectedFields: ['status'],
48
+ },
49
+ TARGET_DATE_INVALID_FORMAT: {
50
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
51
+ message: 'Target date must be a valid date in YYYY-MM-DD format.',
52
+ affectedFields: ['targetDate'],
53
+ },
54
+ WHY_REQUIRED_WITH_DONT_DO: {
55
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
56
+ message: 'A reason must be selected when "Don\'t do" is enabled.',
57
+ affectedFields: ['why'],
58
+ },
59
+ WHY_MUST_BE_FROM_ALLOWED_VALUES: {
60
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
61
+ message: "The selected reason is not valid. Choose from: Wait for client, Don't respond, Client not paying, Client wants to close, Filing by other accountant, Client put on hold, Decided not to file, No activity.",
62
+ affectedFields: ['why'],
63
+ },
64
+ ASSIGNMENT_NOT_FOUND: {
65
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
66
+ message: 'Assignment <b>{assignmentId}</b> does not exist or does not belong to this task.',
67
+ params: ['assignmentId'],
68
+ affectedFields: ['assignmentId'],
69
+ },
70
+ CLIENT_ID_MISMATCH_WITH_CLIENT_TEMPLATE: {
71
+ severity: validation_message_types_1.VALIDATION_SEVERITY.ERROR,
72
+ message: 'The provided client does not match the client of the referenced client template.',
73
+ affectedFields: ['clientId', 'clientTemplateId'],
74
+ },
75
+ });
@@ -2338,5 +2338,76 @@ export declare const VALIDATION_MESSAGES: {
2338
2338
  affectedFields: string[];
2339
2339
  };
2340
2340
  };
2341
+ readonly TASKS: {
2342
+ NOT_FOUND: {
2343
+ severity: "error";
2344
+ message: string;
2345
+ params: string[];
2346
+ affectedFields: string[];
2347
+ };
2348
+ NOT_FILING_TYPE: {
2349
+ severity: "error";
2350
+ message: string;
2351
+ params: string[];
2352
+ affectedFields: string[];
2353
+ };
2354
+ CANNOT_MARK_FINAL_HAS_LATER_FILINGS: {
2355
+ severity: "error";
2356
+ message: string;
2357
+ affectedFields: string[];
2358
+ };
2359
+ GENERATION_LOG_NOT_FOUND: {
2360
+ severity: "error";
2361
+ message: string;
2362
+ params: string[];
2363
+ affectedFields: string[];
2364
+ };
2365
+ CANNOT_COMPLETE_NOT_CURRENT: {
2366
+ severity: "error";
2367
+ message: string;
2368
+ affectedFields: string[];
2369
+ };
2370
+ CANNOT_COMPLETE_ALREADY_COMPLETED: {
2371
+ severity: "error";
2372
+ message: string;
2373
+ affectedFields: string[];
2374
+ };
2375
+ CANNOT_UNDO_NOT_COMPLETED: {
2376
+ severity: "error";
2377
+ message: string;
2378
+ affectedFields: string[];
2379
+ };
2380
+ CANNOT_UNDO_NOT_LATEST: {
2381
+ severity: "error";
2382
+ message: string;
2383
+ affectedFields: string[];
2384
+ };
2385
+ TARGET_DATE_INVALID_FORMAT: {
2386
+ severity: "error";
2387
+ message: string;
2388
+ affectedFields: string[];
2389
+ };
2390
+ WHY_REQUIRED_WITH_DONT_DO: {
2391
+ severity: "error";
2392
+ message: string;
2393
+ affectedFields: string[];
2394
+ };
2395
+ WHY_MUST_BE_FROM_ALLOWED_VALUES: {
2396
+ severity: "error";
2397
+ message: string;
2398
+ affectedFields: string[];
2399
+ };
2400
+ ASSIGNMENT_NOT_FOUND: {
2401
+ severity: "error";
2402
+ message: string;
2403
+ params: string[];
2404
+ affectedFields: string[];
2405
+ };
2406
+ CLIENT_ID_MISMATCH_WITH_CLIENT_TEMPLATE: {
2407
+ severity: "error";
2408
+ message: string;
2409
+ affectedFields: string[];
2410
+ };
2411
+ };
2341
2412
  };
2342
2413
  //# sourceMappingURL=validation-messages.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation-messages.d.ts","sourceRoot":"","sources":["../../src/validation/validation-messages.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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const income_accounts_validation_messages_1 = require("./features/income-account
30
30
  const template_recurrence_settings_validation_messages_1 = require("./features/template-recurrence-settings.validation-messages");
31
31
  const client_templates_validation_messages_1 = require("./features/client-templates.validation-messages");
32
32
  const client_template_assignments_validation_messages_1 = require("./features/client-template-assignments.validation-messages");
33
+ const tasks_validation_messages_1 = require("./features/tasks.validation-messages");
33
34
  exports.VALIDATION_MESSAGES = {
34
35
  ACCOUNT_CATEGORIES: account_categories_validation_messages_1.ACCOUNT_CATEGORIES,
35
36
  ACCOUNT_IDS: account_ids_validation_messages_1.ACCOUNT_IDS,
@@ -60,4 +61,5 @@ exports.VALIDATION_MESSAGES = {
60
61
  TEMPLATE_RECURRENCE_SETTINGS: template_recurrence_settings_validation_messages_1.TEMPLATE_RECURRENCE_SETTINGS,
61
62
  CLIENT_TEMPLATES: client_templates_validation_messages_1.CLIENT_TEMPLATES,
62
63
  CLIENT_TEMPLATE_ASSIGNMENTS: client_template_assignments_validation_messages_1.CLIENT_TEMPLATE_ASSIGNMENTS,
64
+ TASKS: tasks_validation_messages_1.TASKS,
63
65
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forwardslashns/taskit-validation-messages",
3
- "version": "1.10.52",
3
+ "version": "1.10.53",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "commonjs",
@@ -0,0 +1,76 @@
1
+ import { defineValidationFeatureMessages, VALIDATION_SEVERITY } from '../validation-message.types';
2
+
3
+ export const TASKS = defineValidationFeatureMessages({
4
+ NOT_FOUND: {
5
+ severity: VALIDATION_SEVERITY.ERROR,
6
+ message: 'Task <b>{taskId}</b> does not exist or does not belong to this client.',
7
+ params: ['taskId'],
8
+ affectedFields: ['taskId'],
9
+ },
10
+ NOT_FILING_TYPE: {
11
+ severity: VALIDATION_SEVERITY.ERROR,
12
+ message: 'Task <b>{taskId}</b> is not a Filing type task. Only Filing tasks support this operation.',
13
+ params: ['taskId'],
14
+ affectedFields: ['taskId'],
15
+ },
16
+ CANNOT_MARK_FINAL_HAS_LATER_FILINGS: {
17
+ severity: VALIDATION_SEVERITY.ERROR,
18
+ message:
19
+ "This filing cannot be marked Final, since there are other filings after this filing's ending period. Only the last filing can be marked final.",
20
+ affectedFields: ['isFinalFiling'],
21
+ },
22
+ GENERATION_LOG_NOT_FOUND: {
23
+ severity: VALIDATION_SEVERITY.ERROR,
24
+ message: 'Task generation log <b>{logId}</b> does not exist.',
25
+ params: ['logId'],
26
+ affectedFields: ['logId'],
27
+ },
28
+ CANNOT_COMPLETE_NOT_CURRENT: {
29
+ severity: VALIDATION_SEVERITY.ERROR,
30
+ message:
31
+ 'Assignment can only be completed when all previous workflow assignments in order have already been completed.',
32
+ affectedFields: ['status'],
33
+ },
34
+ CANNOT_COMPLETE_ALREADY_COMPLETED: {
35
+ severity: VALIDATION_SEVERITY.ERROR,
36
+ message: 'This assignment has already been completed.',
37
+ affectedFields: ['status'],
38
+ },
39
+ CANNOT_UNDO_NOT_COMPLETED: {
40
+ severity: VALIDATION_SEVERITY.ERROR,
41
+ message: 'Only completed assignments can be undone.',
42
+ affectedFields: ['status'],
43
+ },
44
+ CANNOT_UNDO_NOT_LATEST: {
45
+ severity: VALIDATION_SEVERITY.ERROR,
46
+ message: 'Only the latest completed assignment can be undone. A later assignment has already been completed.',
47
+ affectedFields: ['status'],
48
+ },
49
+ TARGET_DATE_INVALID_FORMAT: {
50
+ severity: VALIDATION_SEVERITY.ERROR,
51
+ message: 'Target date must be a valid date in YYYY-MM-DD format.',
52
+ affectedFields: ['targetDate'],
53
+ },
54
+ WHY_REQUIRED_WITH_DONT_DO: {
55
+ severity: VALIDATION_SEVERITY.ERROR,
56
+ message: 'A reason must be selected when "Don\'t do" is enabled.',
57
+ affectedFields: ['why'],
58
+ },
59
+ WHY_MUST_BE_FROM_ALLOWED_VALUES: {
60
+ severity: VALIDATION_SEVERITY.ERROR,
61
+ message:
62
+ "The selected reason is not valid. Choose from: Wait for client, Don't respond, Client not paying, Client wants to close, Filing by other accountant, Client put on hold, Decided not to file, No activity.",
63
+ affectedFields: ['why'],
64
+ },
65
+ ASSIGNMENT_NOT_FOUND: {
66
+ severity: VALIDATION_SEVERITY.ERROR,
67
+ message: 'Assignment <b>{assignmentId}</b> does not exist or does not belong to this task.',
68
+ params: ['assignmentId'],
69
+ affectedFields: ['assignmentId'],
70
+ },
71
+ CLIENT_ID_MISMATCH_WITH_CLIENT_TEMPLATE: {
72
+ severity: VALIDATION_SEVERITY.ERROR,
73
+ message: 'The provided client does not match the client of the referenced client template.',
74
+ affectedFields: ['clientId', 'clientTemplateId'],
75
+ },
76
+ });
@@ -27,6 +27,7 @@ import { INCOME_ACCOUNTS } from './features/income-accounts.validation-messages'
27
27
  import { TEMPLATE_RECURRENCE_SETTINGS } from './features/template-recurrence-settings.validation-messages';
28
28
  import { CLIENT_TEMPLATES } from './features/client-templates.validation-messages';
29
29
  import { CLIENT_TEMPLATE_ASSIGNMENTS } from './features/client-template-assignments.validation-messages';
30
+ import { TASKS } from './features/tasks.validation-messages';
30
31
 
31
32
  export const VALIDATION_MESSAGES = {
32
33
  ACCOUNT_CATEGORIES,
@@ -58,4 +59,5 @@ export const VALIDATION_MESSAGES = {
58
59
  TEMPLATE_RECURRENCE_SETTINGS,
59
60
  CLIENT_TEMPLATES,
60
61
  CLIENT_TEMPLATE_ASSIGNMENTS,
62
+ TASKS,
61
63
  } as const;