@opencrvs/toolkit 2.1.0-rc.7f423f1 → 2.1.0-rc.811fc78

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.
Files changed (59) hide show
  1. package/dist/application-config/index.js +200 -190
  2. package/dist/commons/api/router.d.ts +1516 -1692
  3. package/dist/commons/application-config/index.d.ts +6 -6
  4. package/dist/commons/conditionals/conditionals.d.ts +2102 -259
  5. package/dist/commons/conditionals/validate.d.ts +2 -1
  6. package/dist/commons/events/ActionConfig.d.ts +126 -105
  7. package/dist/commons/events/ActionDocument.d.ts +111 -117
  8. package/dist/commons/events/ActionStatus.d.ts +14 -0
  9. package/dist/commons/events/ActionType.d.ts +62 -62
  10. package/dist/commons/events/AdvancedSearchConfig.d.ts +513 -513
  11. package/dist/commons/events/AuditLog.d.ts +42 -104
  12. package/dist/commons/events/CompositeFieldValue.d.ts +4 -4
  13. package/dist/commons/events/Conditional.d.ts +3 -3
  14. package/dist/commons/events/CountryConfigQueryInput.d.ts +608 -590
  15. package/dist/commons/events/Draft.d.ts +37 -37
  16. package/dist/commons/events/DynamicFieldValue.d.ts +9 -9
  17. package/dist/commons/events/EventConfig.d.ts +5 -5
  18. package/dist/commons/events/EventDocument.d.ts +46 -46
  19. package/dist/commons/events/EventIndex.d.ts +52 -71
  20. package/dist/commons/events/EventMetadata.d.ts +41 -40
  21. package/dist/commons/events/FieldConfig.d.ts +342 -342
  22. package/dist/commons/events/FieldType.d.ts +51 -51
  23. package/dist/commons/events/FieldTypeMapping.d.ts +100 -100
  24. package/dist/commons/events/FieldValue.d.ts +12 -12
  25. package/dist/commons/events/Flag.d.ts +63 -15
  26. package/dist/commons/events/TemplateConfig.d.ts +1 -1
  27. package/dist/commons/events/WorkqueueColumnConfig.d.ts +40 -40
  28. package/dist/commons/events/WorkqueueConfig.d.ts +835 -820
  29. package/dist/commons/events/deduplication.d.ts +1 -1
  30. package/dist/commons/events/event.d.ts +2 -2
  31. package/dist/commons/events/field.d.ts +895 -78
  32. package/dist/commons/events/index.d.ts +0 -1
  33. package/dist/commons/events/locations.d.ts +6 -103
  34. package/dist/commons/events/mocks.test.utils.d.ts +4 -18
  35. package/dist/commons/events/scopes.d.ts +4 -4
  36. package/dist/commons/events/state/index.d.ts +17 -17
  37. package/dist/commons/events/state/utils.d.ts +7 -7
  38. package/dist/commons/events/test.utils.d.ts +40 -40
  39. package/dist/commons/events/utils.d.ts +114 -114
  40. package/dist/commons/notification/UserNotifications.d.ts +10 -10
  41. package/dist/conditionals/index.js +303 -56
  42. package/dist/environment/derived-variables.d.ts +119 -119
  43. package/dist/environment/derived-variables.d.ts.map +1 -1
  44. package/dist/environment/logger.d.ts.map +1 -1
  45. package/dist/environment/questions.d.ts +74 -75
  46. package/dist/environment/questions.d.ts.map +1 -1
  47. package/dist/environment/setup-environment.js +14 -8
  48. package/dist/environment/utils.d.ts +1 -1
  49. package/dist/events/deduplication.d.ts +1 -1
  50. package/dist/events/index.js +3278 -3355
  51. package/dist/migrations/v2.0/migrate-application-config-url.js +3 -4
  52. package/dist/notification/index.js +1492 -1018
  53. package/dist/scopes/index.d.ts +396 -148
  54. package/dist/scopes/index.js +304 -56
  55. package/opencrvs-toolkit-2.1.0-rc.811fc78.tgz +0 -0
  56. package/package.json +4 -3
  57. package/tsconfig.tsbuildinfo +1 -1
  58. package/dist/commons/events/locationPayloads.d.ts +0 -95
  59. package/opencrvs-toolkit-2.1.0-rc.7f423f1.tgz +0 -0
@@ -1,16 +1,17 @@
1
1
  import * as z from 'zod/v4';
2
2
  export declare const InherentFlags: {
3
- readonly INCOMPLETE: 'incomplete';
4
- readonly REJECTED: 'rejected';
5
- readonly CORRECTION_REQUESTED: 'correction-requested';
6
- readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
3
+ readonly INCOMPLETE: "incomplete";
4
+ readonly REJECTED: "rejected";
5
+ readonly CORRECTION_REQUESTED: "correction-requested";
6
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
7
7
  /**
8
8
  * This flag is set by the Edit-action and removed after the declaration or registration.
9
9
  * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
10
10
  *
11
11
  * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
12
12
  */
13
- readonly EDIT_IN_PROGRESS: 'edit-in-progress';
13
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
14
+ readonly SEALED: "sealed";
14
15
  };
15
16
  export type InherentFlags = (typeof InherentFlags)[keyof typeof InherentFlags];
16
17
  export declare const ActionFlag: z.ZodString;
@@ -19,19 +20,65 @@ export type ActionFlag = z.infer<typeof ActionFlag>;
19
20
  export declare const CustomFlag: z.ZodString;
20
21
  export type CustomFlag = z.infer<typeof CustomFlag>;
21
22
  export declare const Flag: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
22
- readonly INCOMPLETE: 'incomplete';
23
- readonly REJECTED: 'rejected';
24
- readonly CORRECTION_REQUESTED: 'correction-requested';
25
- readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
23
+ readonly INCOMPLETE: "incomplete";
24
+ readonly REJECTED: "rejected";
25
+ readonly CORRECTION_REQUESTED: "correction-requested";
26
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
26
27
  /**
27
28
  * This flag is set by the Edit-action and removed after the declaration or registration.
28
29
  * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
29
30
  *
30
31
  * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
31
32
  */
32
- readonly EDIT_IN_PROGRESS: 'edit-in-progress';
33
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
34
+ readonly SEALED: "sealed";
33
35
  }>]>, z.ZodString]>;
34
36
  export type Flag = z.infer<typeof Flag>;
37
+ export declare const ContainsFlags: z.ZodObject<{
38
+ anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
39
+ readonly INCOMPLETE: "incomplete";
40
+ readonly REJECTED: "rejected";
41
+ readonly CORRECTION_REQUESTED: "correction-requested";
42
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
43
+ /**
44
+ * This flag is set by the Edit-action and removed after the declaration or registration.
45
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
46
+ *
47
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
48
+ */
49
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
50
+ readonly SEALED: "sealed";
51
+ }>]>, z.ZodString]>>>;
52
+ noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
53
+ readonly INCOMPLETE: "incomplete";
54
+ readonly REJECTED: "rejected";
55
+ readonly CORRECTION_REQUESTED: "correction-requested";
56
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
57
+ /**
58
+ * This flag is set by the Edit-action and removed after the declaration or registration.
59
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
60
+ *
61
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
62
+ */
63
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
64
+ readonly SEALED: "sealed";
65
+ }>]>, z.ZodString]>>>;
66
+ allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
67
+ readonly INCOMPLETE: "incomplete";
68
+ readonly REJECTED: "rejected";
69
+ readonly CORRECTION_REQUESTED: "correction-requested";
70
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
71
+ /**
72
+ * This flag is set by the Edit-action and removed after the declaration or registration.
73
+ * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
74
+ *
75
+ * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
76
+ */
77
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
78
+ readonly SEALED: "sealed";
79
+ }>]>, z.ZodString]>>>;
80
+ }, z.core.$strip>;
81
+ export type ContainsFlags = z.infer<typeof ContainsFlags>;
35
82
  /**
36
83
  * Configuration of a custom flag that can be associated with a certain event type.
37
84
  */
@@ -46,17 +93,18 @@ export type FlagConfig = z.infer<typeof FlagConfig>;
46
93
  */
47
94
  export declare const ActionFlagConfig: z.ZodObject<{
48
95
  id: z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
49
- readonly INCOMPLETE: 'incomplete';
50
- readonly REJECTED: 'rejected';
51
- readonly CORRECTION_REQUESTED: 'correction-requested';
52
- readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
96
+ readonly INCOMPLETE: "incomplete";
97
+ readonly REJECTED: "rejected";
98
+ readonly CORRECTION_REQUESTED: "correction-requested";
99
+ readonly POTENTIAL_DUPLICATE: "potential-duplicate";
53
100
  /**
54
101
  * This flag is set by the Edit-action and removed after the declaration or registration.
55
102
  * A record should never stay with the EDIT_IN_PROGRESS flag, since it should always be declared or registered right after.
56
103
  *
57
104
  * We only use this flag to determine that a NOTIFY, DECLARE or REGISTER action is allowed next.
58
105
  */
59
- readonly EDIT_IN_PROGRESS: 'edit-in-progress';
106
+ readonly EDIT_IN_PROGRESS: "edit-in-progress";
107
+ readonly SEALED: "sealed";
60
108
  }>]>, z.ZodString]>;
61
109
  operation: z.ZodEnum<{
62
110
  add: "add";
@@ -36,7 +36,7 @@ export type SystemVariables = {
36
36
  */
37
37
  export declare const window: () => {
38
38
  location: {
39
- get: (key: 'href' | 'pathname' | 'hostname' | 'originPathname') => string;
39
+ get: (key: "href" | "pathname" | "hostname" | "originPathname") => string;
40
40
  };
41
41
  };
42
42
  /**
@@ -1,48 +1,48 @@
1
1
  import * as z from 'zod/v4';
2
2
  export declare const WorkqueueColumnKeysArray: readonly ["id", "type", "status", "createdAt", "dateOfEvent", "placeOfEvent", "createdBy", "createdByUserType", "updatedByUserRole", "createdAtLocation", "updatedAtLocation", "updatedAt", "assignedTo", "updatedBy", "trackingId", "legalStatuses", "flags", "title", "outbox"];
3
3
  export declare const WorkqueueColumnKeys: z.ZodEnum<{
4
- assignedTo: "assignedTo";
5
- createdAt: "createdAt";
6
- createdAtLocation: "createdAtLocation";
7
- createdBy: "createdBy";
8
- createdByUserType: "createdByUserType";
9
- dateOfEvent: "dateOfEvent";
10
- flags: "flags";
11
4
  id: "id";
12
- legalStatuses: "legalStatuses";
13
- outbox: "outbox";
14
- placeOfEvent: "placeOfEvent";
15
- status: "status";
16
5
  title: "title";
17
- trackingId: "trackingId";
18
6
  type: "type";
19
7
  updatedAt: "updatedAt";
8
+ placeOfEvent: "placeOfEvent";
9
+ flags: "flags";
10
+ createdByUserType: "createdByUserType";
11
+ createdAt: "createdAt";
12
+ createdBy: "createdBy";
13
+ createdAtLocation: "createdAtLocation";
14
+ status: "status";
15
+ assignedTo: "assignedTo";
16
+ trackingId: "trackingId";
17
+ legalStatuses: "legalStatuses";
18
+ dateOfEvent: "dateOfEvent";
19
+ updatedByUserRole: "updatedByUserRole";
20
20
  updatedAtLocation: "updatedAtLocation";
21
21
  updatedBy: "updatedBy";
22
- updatedByUserRole: "updatedByUserRole";
22
+ outbox: "outbox";
23
23
  }>;
24
24
  export type WorkqueueColumnKeys = z.infer<typeof WorkqueueColumnKeys>;
25
25
  export declare const WorkqueueColumnValue: z.ZodObject<{
26
26
  $event: z.ZodEnum<{
27
- assignedTo: "assignedTo";
28
- createdAt: "createdAt";
29
- createdAtLocation: "createdAtLocation";
30
- createdBy: "createdBy";
31
- createdByUserType: "createdByUserType";
32
- dateOfEvent: "dateOfEvent";
33
- flags: "flags";
34
27
  id: "id";
35
- legalStatuses: "legalStatuses";
36
- outbox: "outbox";
37
- placeOfEvent: "placeOfEvent";
38
- status: "status";
39
28
  title: "title";
40
- trackingId: "trackingId";
41
29
  type: "type";
42
30
  updatedAt: "updatedAt";
31
+ placeOfEvent: "placeOfEvent";
32
+ flags: "flags";
33
+ createdByUserType: "createdByUserType";
34
+ createdAt: "createdAt";
35
+ createdBy: "createdBy";
36
+ createdAtLocation: "createdAtLocation";
37
+ status: "status";
38
+ assignedTo: "assignedTo";
39
+ trackingId: "trackingId";
40
+ legalStatuses: "legalStatuses";
41
+ dateOfEvent: "dateOfEvent";
42
+ updatedByUserRole: "updatedByUserRole";
43
43
  updatedAtLocation: "updatedAtLocation";
44
44
  updatedBy: "updatedBy";
45
- updatedByUserRole: "updatedByUserRole";
45
+ outbox: "outbox";
46
46
  }>;
47
47
  }, z.core.$strip>;
48
48
  export type WorkqueueColumnValue = z.infer<typeof WorkqueueColumnValue>;
@@ -53,25 +53,25 @@ export declare const WorkqueueColumn: z.ZodObject<{
53
53
  label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
54
54
  value: z.ZodObject<{
55
55
  $event: z.ZodEnum<{
56
- assignedTo: "assignedTo";
57
- createdAt: "createdAt";
58
- createdAtLocation: "createdAtLocation";
59
- createdBy: "createdBy";
60
- createdByUserType: "createdByUserType";
61
- dateOfEvent: "dateOfEvent";
62
- flags: "flags";
63
56
  id: "id";
64
- legalStatuses: "legalStatuses";
65
- outbox: "outbox";
66
- placeOfEvent: "placeOfEvent";
67
- status: "status";
68
57
  title: "title";
69
- trackingId: "trackingId";
70
58
  type: "type";
71
59
  updatedAt: "updatedAt";
60
+ placeOfEvent: "placeOfEvent";
61
+ flags: "flags";
62
+ createdByUserType: "createdByUserType";
63
+ createdAt: "createdAt";
64
+ createdBy: "createdBy";
65
+ createdAtLocation: "createdAtLocation";
66
+ status: "status";
67
+ assignedTo: "assignedTo";
68
+ trackingId: "trackingId";
69
+ legalStatuses: "legalStatuses";
70
+ dateOfEvent: "dateOfEvent";
71
+ updatedByUserRole: "updatedByUserRole";
72
72
  updatedAtLocation: "updatedAtLocation";
73
73
  updatedBy: "updatedBy";
74
- updatedByUserRole: "updatedByUserRole";
74
+ outbox: "outbox";
75
75
  }>;
76
76
  }, z.core.$strip>;
77
77
  }, z.core.$strip>;
@@ -84,7 +84,7 @@ export declare function defineWorkqueuesColumns(workqueueColumns: WorkqueueColum
84
84
  description: string;
85
85
  };
86
86
  value: {
87
- $event: "assignedTo" | "createdAt" | "createdAtLocation" | "createdBy" | "createdByUserType" | "dateOfEvent" | "flags" | "id" | "legalStatuses" | "outbox" | "placeOfEvent" | "status" | "title" | "trackingId" | "type" | "updatedAt" | "updatedAtLocation" | "updatedBy" | "updatedByUserRole";
87
+ $event: "id" | "title" | "type" | "updatedAt" | "placeOfEvent" | "flags" | "createdByUserType" | "createdAt" | "createdBy" | "createdAtLocation" | "status" | "assignedTo" | "trackingId" | "legalStatuses" | "dateOfEvent" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "outbox";
88
88
  };
89
89
  }[];
90
90
  //# sourceMappingURL=WorkqueueColumnConfig.d.ts.map