@opencrvs/toolkit 1.9.4-rc.0e695b2 → 1.9.4-rc.469f912
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.
- package/dist/commons/api/router.d.ts +2440 -28495
- package/dist/commons/conditionals/conditionals.d.ts +1 -10
- package/dist/commons/conditionals/validate.d.ts +4 -11
- package/dist/commons/events/ActionConfig.d.ts +1552 -23416
- package/dist/commons/events/ActionDocument.d.ts +1856 -803
- package/dist/commons/events/ActionInput.d.ts +1073 -277
- package/dist/commons/events/ActionType.d.ts +9 -86
- package/dist/commons/events/AdvancedSearchConfig.d.ts +1238 -228
- package/dist/commons/events/CompositeFieldValue.d.ts +176 -27
- package/dist/commons/events/Conditional.d.ts +38 -26
- package/dist/commons/events/Constants.d.ts +1 -1
- package/dist/commons/events/CountryConfigQueryInput.d.ts +4169 -931
- package/dist/commons/events/CreatedAtLocation.d.ts +1 -1
- package/dist/commons/events/DeduplicationConfig.d.ts +150 -15
- package/dist/commons/events/Draft.d.ts +105 -70
- package/dist/commons/events/DynamicFieldValue.d.ts +91 -7
- package/dist/commons/events/EventConfig.d.ts +2120 -18663
- package/dist/commons/events/EventConfigInput.d.ts +1 -1
- package/dist/commons/events/EventDocument.d.ts +1332 -320
- package/dist/commons/events/EventIndex.d.ts +967 -197
- package/dist/commons/events/EventInput.d.ts +8 -2
- package/dist/commons/events/EventMetadata.d.ts +346 -106
- package/dist/commons/events/FieldConfig.d.ts +11774 -4259
- package/dist/commons/events/FieldType.d.ts +4 -20
- package/dist/commons/events/FieldTypeMapping.d.ts +813 -181
- package/dist/commons/events/FieldValue.d.ts +356 -83
- package/dist/commons/events/FormConfig.d.ts +721 -13140
- package/dist/commons/events/PageConfig.d.ts +319 -8780
- package/dist/commons/events/SummaryConfig.d.ts +161 -14
- package/dist/commons/events/TemplateConfig.d.ts +3 -3
- package/dist/commons/events/TranslationConfig.d.ts +2 -2
- package/dist/commons/events/WorkqueueColumnConfig.d.ts +37 -74
- package/dist/commons/events/WorkqueueConfig.d.ts +7080 -1615
- package/dist/commons/events/deduplication.d.ts +3 -3
- package/dist/commons/events/defineConfig.d.ts +163 -25639
- package/dist/commons/events/event.d.ts +4 -4
- package/dist/commons/events/index.d.ts +0 -1
- package/dist/commons/events/locations.d.ts +19 -15
- package/dist/commons/events/scopes.d.ts +4 -5
- package/dist/commons/events/state/availableActions.d.ts +1 -2
- package/dist/commons/events/state/flags.d.ts +3 -21
- package/dist/commons/events/state/index.d.ts +19 -23
- package/dist/commons/events/state/utils.d.ts +112 -130
- package/dist/commons/events/test.utils.d.ts +8 -17
- package/dist/commons/events/transactions.d.ts +1 -1
- package/dist/commons/events/utils.d.ts +373 -51350
- package/dist/commons/notification/UserNotifications.d.ts +636 -55
- package/dist/conditionals/index.d.ts.map +1 -1
- package/dist/conditionals/index.js +5 -38
- package/dist/events/deduplication.d.ts +3 -3
- package/dist/events/index.js +1545 -1805
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1412 -1430
- package/dist/scopes/index.d.ts +132 -167
- package/dist/scopes/index.d.ts.map +1 -1
- package/dist/scopes/index.js +94 -133
- package/package.json +5 -5
- package/dist/commons/events/Flag.d.ts +0 -70
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const CreatedAtLocation: import("zod
|
|
1
|
+
export declare const CreatedAtLocation: import("zod").ZodOptional<import("zod").ZodNullable<import("zod").ZodBranded<import("zod").ZodString, "UUID">>>;
|
|
2
2
|
//# sourceMappingURL=CreatedAtLocation.d.ts.map
|
|
@@ -1,31 +1,150 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TranslationConfig } from './TranslationConfig';
|
|
3
|
+
declare const FuzzyMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
4
|
+
/**
|
|
5
|
+
* Reference to the field used in matching.
|
|
6
|
+
*
|
|
7
|
+
* For `dateRange` type matcher the value of this field will also
|
|
8
|
+
* be used as the origin date to calculate the distance from.
|
|
9
|
+
*/
|
|
3
10
|
fieldId: z.ZodString;
|
|
11
|
+
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
12
|
+
boost: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
boost?: number | undefined;
|
|
15
|
+
}, {
|
|
16
|
+
boost?: number | undefined;
|
|
17
|
+
}>>>;
|
|
18
|
+
}, {
|
|
4
19
|
type: z.ZodLiteral<"fuzzy">;
|
|
5
20
|
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
6
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Names of length 3 or less characters = 0 edits allowed
|
|
23
|
+
* Names of length 4 - 6 characters = 1 edit allowed
|
|
24
|
+
* Names of length >7 characters = 2 edits allowed
|
|
25
|
+
*/
|
|
26
|
+
fuzziness: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>>;
|
|
7
27
|
boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
8
|
-
}, z.
|
|
9
|
-
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
boost: number;
|
|
30
|
+
fuzziness: string | number;
|
|
31
|
+
}, {
|
|
32
|
+
boost?: number | undefined;
|
|
33
|
+
fuzziness?: string | number | undefined;
|
|
34
|
+
}>>>;
|
|
35
|
+
}>, "strip", z.ZodTypeAny, {
|
|
36
|
+
type: "fuzzy";
|
|
37
|
+
options: {
|
|
38
|
+
boost: number;
|
|
39
|
+
fuzziness: string | number;
|
|
40
|
+
};
|
|
41
|
+
fieldId: string;
|
|
42
|
+
}, {
|
|
43
|
+
type: "fuzzy";
|
|
44
|
+
fieldId: string;
|
|
45
|
+
options?: {
|
|
46
|
+
boost?: number | undefined;
|
|
47
|
+
fuzziness?: string | number | undefined;
|
|
48
|
+
} | undefined;
|
|
49
|
+
}>;
|
|
10
50
|
export type FuzzyMatcherOptions = z.input<typeof FuzzyMatcher>['options'];
|
|
11
|
-
declare const StrictMatcher: z.ZodObject<{
|
|
51
|
+
declare const StrictMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
52
|
+
/**
|
|
53
|
+
* Reference to the field used in matching.
|
|
54
|
+
*
|
|
55
|
+
* For `dateRange` type matcher the value of this field will also
|
|
56
|
+
* be used as the origin date to calculate the distance from.
|
|
57
|
+
*/
|
|
12
58
|
fieldId: z.ZodString;
|
|
59
|
+
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
60
|
+
boost: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
}, "strip", z.ZodTypeAny, {
|
|
62
|
+
boost?: number | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
boost?: number | undefined;
|
|
65
|
+
}>>>;
|
|
66
|
+
}, {
|
|
13
67
|
type: z.ZodLiteral<"strict">;
|
|
14
68
|
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
15
69
|
boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
70
|
+
/**
|
|
71
|
+
* The constant value to be present in the field for both records
|
|
72
|
+
*/
|
|
16
73
|
value: z.ZodOptional<z.ZodString>;
|
|
17
|
-
}, z.
|
|
18
|
-
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
boost: number;
|
|
76
|
+
value?: string | undefined;
|
|
77
|
+
}, {
|
|
78
|
+
value?: string | undefined;
|
|
79
|
+
boost?: number | undefined;
|
|
80
|
+
}>>>;
|
|
81
|
+
}>, "strip", z.ZodTypeAny, {
|
|
82
|
+
type: "strict";
|
|
83
|
+
options: {
|
|
84
|
+
boost: number;
|
|
85
|
+
value?: string | undefined;
|
|
86
|
+
};
|
|
87
|
+
fieldId: string;
|
|
88
|
+
}, {
|
|
89
|
+
type: "strict";
|
|
90
|
+
fieldId: string;
|
|
91
|
+
options?: {
|
|
92
|
+
value?: string | undefined;
|
|
93
|
+
boost?: number | undefined;
|
|
94
|
+
} | undefined;
|
|
95
|
+
}>;
|
|
19
96
|
export type StrictMatcherOptions = z.input<typeof StrictMatcher>['options'];
|
|
20
|
-
declare const DateRangeMatcher: z.ZodObject<{
|
|
97
|
+
declare const DateRangeMatcher: z.ZodObject<z.objectUtil.extendShape<{
|
|
98
|
+
/**
|
|
99
|
+
* Reference to the field used in matching.
|
|
100
|
+
*
|
|
101
|
+
* For `dateRange` type matcher the value of this field will also
|
|
102
|
+
* be used as the origin date to calculate the distance from.
|
|
103
|
+
*/
|
|
21
104
|
fieldId: z.ZodString;
|
|
105
|
+
options: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
106
|
+
boost: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
boost?: number | undefined;
|
|
109
|
+
}, {
|
|
110
|
+
boost?: number | undefined;
|
|
111
|
+
}>>>;
|
|
112
|
+
}, {
|
|
22
113
|
type: z.ZodLiteral<"dateRange">;
|
|
23
114
|
options: z.ZodObject<{
|
|
115
|
+
/**
|
|
116
|
+
* The distance pivot in days. Distance from the origin (the value of
|
|
117
|
+
* fieldId) at which relevance scores receive half of the boost value
|
|
118
|
+
*/
|
|
24
119
|
pivot: z.ZodOptional<z.ZodNumber>;
|
|
25
120
|
days: z.ZodNumber;
|
|
26
121
|
boost: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
27
|
-
}, z.
|
|
28
|
-
|
|
122
|
+
}, "strip", z.ZodTypeAny, {
|
|
123
|
+
boost: number;
|
|
124
|
+
days: number;
|
|
125
|
+
pivot?: number | undefined;
|
|
126
|
+
}, {
|
|
127
|
+
days: number;
|
|
128
|
+
boost?: number | undefined;
|
|
129
|
+
pivot?: number | undefined;
|
|
130
|
+
}>;
|
|
131
|
+
}>, "strip", z.ZodTypeAny, {
|
|
132
|
+
type: "dateRange";
|
|
133
|
+
options: {
|
|
134
|
+
boost: number;
|
|
135
|
+
days: number;
|
|
136
|
+
pivot?: number | undefined;
|
|
137
|
+
};
|
|
138
|
+
fieldId: string;
|
|
139
|
+
}, {
|
|
140
|
+
type: "dateRange";
|
|
141
|
+
options: {
|
|
142
|
+
days: number;
|
|
143
|
+
boost?: number | undefined;
|
|
144
|
+
pivot?: number | undefined;
|
|
145
|
+
};
|
|
146
|
+
fieldId: string;
|
|
147
|
+
}>;
|
|
29
148
|
export type DateRangeMatcherOptions = z.input<typeof DateRangeMatcher>['options'];
|
|
30
149
|
export type NotInput = {
|
|
31
150
|
type: 'not';
|
|
@@ -61,13 +180,29 @@ export type ClauseOutput = NotOutput | AndOutput | OrOutput | z.output<typeof Fu
|
|
|
61
180
|
* Default assumption is that the ZodType is the input. Markers use default values, so we need to explicitly define output type, too.
|
|
62
181
|
*
|
|
63
182
|
*/
|
|
64
|
-
export declare const Clause: z.ZodType<ClauseOutput, ClauseInput>;
|
|
183
|
+
export declare const Clause: z.ZodType<ClauseOutput, z.ZodTypeDef, ClauseInput>;
|
|
65
184
|
export type Clause = z.infer<typeof Clause>;
|
|
66
185
|
export declare const DeduplicationConfig: z.ZodObject<{
|
|
67
186
|
id: z.ZodString;
|
|
68
|
-
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.
|
|
69
|
-
|
|
70
|
-
|
|
187
|
+
label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
|
|
188
|
+
id: string;
|
|
189
|
+
description: string;
|
|
190
|
+
defaultMessage: string;
|
|
191
|
+
}>;
|
|
192
|
+
query: z.ZodType<ClauseOutput, z.ZodTypeDef, ClauseInput>;
|
|
193
|
+
}, "strip", z.ZodTypeAny, {
|
|
194
|
+
id: string;
|
|
195
|
+
query: ClauseOutput;
|
|
196
|
+
label: TranslationConfig;
|
|
197
|
+
}, {
|
|
198
|
+
id: string;
|
|
199
|
+
query: ClauseInput;
|
|
200
|
+
label: {
|
|
201
|
+
id: string;
|
|
202
|
+
description: string;
|
|
203
|
+
defaultMessage: string;
|
|
204
|
+
};
|
|
205
|
+
}>;
|
|
71
206
|
export type DeduplicationConfigInput = z.input<typeof DeduplicationConfig>;
|
|
72
207
|
export type DeduplicationConfig = z.infer<typeof DeduplicationConfig>;
|
|
73
208
|
export {};
|
|
@@ -1,83 +1,118 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export declare const Draft: z.ZodObject<{
|
|
3
|
-
id: z.
|
|
4
|
-
eventId: z.
|
|
3
|
+
id: z.ZodBranded<z.ZodString, "UUID">;
|
|
4
|
+
eventId: z.ZodBranded<z.ZodString, "UUID">;
|
|
5
5
|
transactionId: z.ZodString;
|
|
6
6
|
createdAt: z.ZodString;
|
|
7
|
-
action: z.ZodObject<{
|
|
8
|
-
|
|
9
|
-
CREATE: "CREATE";
|
|
10
|
-
NOTIFY: "NOTIFY";
|
|
11
|
-
DECLARE: "DECLARE";
|
|
12
|
-
REGISTER: "REGISTER";
|
|
13
|
-
EDIT: "EDIT";
|
|
14
|
-
DUPLICATE_DETECTED: "DUPLICATE_DETECTED";
|
|
15
|
-
REJECT: "REJECT";
|
|
16
|
-
MARK_AS_DUPLICATE: "MARK_AS_DUPLICATE";
|
|
17
|
-
MARK_AS_NOT_DUPLICATE: "MARK_AS_NOT_DUPLICATE";
|
|
18
|
-
ARCHIVE: "ARCHIVE";
|
|
19
|
-
PRINT_CERTIFICATE: "PRINT_CERTIFICATE";
|
|
20
|
-
REQUEST_CORRECTION: "REQUEST_CORRECTION";
|
|
21
|
-
REJECT_CORRECTION: "REJECT_CORRECTION";
|
|
22
|
-
APPROVE_CORRECTION: "APPROVE_CORRECTION";
|
|
23
|
-
READ: "READ";
|
|
24
|
-
ASSIGN: "ASSIGN";
|
|
25
|
-
UNASSIGN: "UNASSIGN";
|
|
26
|
-
CUSTOM: "CUSTOM";
|
|
27
|
-
}>;
|
|
28
|
-
status: z.ZodEnum<{
|
|
29
|
-
Rejected: "Rejected";
|
|
30
|
-
Requested: "Requested";
|
|
31
|
-
Accepted: "Accepted";
|
|
32
|
-
}>;
|
|
7
|
+
action: z.ZodObject<Omit<z.objectUtil.extendShape<{
|
|
8
|
+
id: z.ZodBranded<z.ZodString, "UUID">;
|
|
33
9
|
transactionId: z.ZodString;
|
|
34
|
-
createdByUserType: z.ZodEnum<
|
|
35
|
-
system: "system";
|
|
36
|
-
user: "user";
|
|
37
|
-
}>;
|
|
10
|
+
createdByUserType: z.ZodEnum<["user", "system"]>;
|
|
38
11
|
createdAt: z.ZodString;
|
|
39
12
|
createdBy: z.ZodString;
|
|
40
13
|
createdByRole: z.ZodString;
|
|
41
14
|
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
15
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
|
16
|
+
declaration: z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, z.ZodTypeDef, import("./FieldValue").FieldUpdateValue>>;
|
|
17
|
+
annotation: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, z.ZodTypeDef, import("./FieldValue").FieldUpdateValue>>>>;
|
|
18
|
+
status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
|
|
19
|
+
originalActionId: z.ZodNullable<z.ZodOptional<z.ZodBranded<z.ZodString, "UUID">>>;
|
|
20
|
+
}, {
|
|
21
|
+
type: z.ZodEnum<["CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DUPLICATE_DETECTED", "REJECT", "MARK_AS_DUPLICATE", "MARK_AS_NOT_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
|
|
22
|
+
}>, "id" | "createdAtLocation">, "strip", z.ZodTypeAny, {
|
|
23
|
+
type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
|
24
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
25
|
+
transactionId: string;
|
|
26
|
+
createdByUserType: "system" | "user";
|
|
27
|
+
createdAt: string;
|
|
28
|
+
createdBy: string;
|
|
29
|
+
createdByRole: string;
|
|
30
|
+
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
31
|
+
createdBySignature?: string | null | undefined;
|
|
32
|
+
annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
|
|
33
|
+
originalActionId?: (string & z.BRAND<"UUID">) | null | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
|
36
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
37
|
+
transactionId: string;
|
|
38
|
+
createdByUserType: "system" | "user";
|
|
39
|
+
createdAt: string;
|
|
40
|
+
createdBy: string;
|
|
41
|
+
createdByRole: string;
|
|
42
|
+
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
43
|
+
createdBySignature?: string | null | undefined;
|
|
44
|
+
annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
|
|
45
|
+
originalActionId?: string | null | undefined;
|
|
46
|
+
}>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
id: string & z.BRAND<"UUID">;
|
|
49
|
+
transactionId: string;
|
|
50
|
+
createdAt: string;
|
|
51
|
+
eventId: string & z.BRAND<"UUID">;
|
|
52
|
+
action: {
|
|
53
|
+
type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
|
54
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
55
|
+
transactionId: string;
|
|
56
|
+
createdByUserType: "system" | "user";
|
|
57
|
+
createdAt: string;
|
|
58
|
+
createdBy: string;
|
|
59
|
+
createdByRole: string;
|
|
60
|
+
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
61
|
+
createdBySignature?: string | null | undefined;
|
|
62
|
+
annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
|
|
63
|
+
originalActionId?: (string & z.BRAND<"UUID">) | null | undefined;
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
66
|
+
id: string;
|
|
67
|
+
transactionId: string;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
eventId: string;
|
|
70
|
+
action: {
|
|
71
|
+
type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
|
72
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
73
|
+
transactionId: string;
|
|
74
|
+
createdByUserType: "system" | "user";
|
|
75
|
+
createdAt: string;
|
|
76
|
+
createdBy: string;
|
|
77
|
+
createdByRole: string;
|
|
78
|
+
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
79
|
+
createdBySignature?: string | null | undefined;
|
|
80
|
+
annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | null | undefined;
|
|
81
|
+
originalActionId?: string | null | undefined;
|
|
82
|
+
};
|
|
83
|
+
}>;
|
|
84
|
+
export declare const DraftInput: z.ZodObject<z.objectUtil.extendShape<{
|
|
85
|
+
eventId: z.ZodBranded<z.ZodString, "UUID">;
|
|
49
86
|
transactionId: z.ZodString;
|
|
50
|
-
declaration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue,
|
|
51
|
-
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue,
|
|
52
|
-
originalActionId: z.ZodOptional<z.
|
|
87
|
+
declaration: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, z.ZodTypeDef, import("./FieldValue").FieldUpdateValue>>>;
|
|
88
|
+
annotation: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("./FieldValue").FieldUpdateValue, z.ZodTypeDef, import("./FieldValue").FieldUpdateValue>>>;
|
|
89
|
+
originalActionId: z.ZodOptional<z.ZodBranded<z.ZodString, "UUID">>;
|
|
53
90
|
keepAssignment: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
-
createdAtLocation: z.ZodOptional<z.ZodNullable<z.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}>;
|
|
80
|
-
}, z.core.$strip>;
|
|
91
|
+
createdAtLocation: z.ZodOptional<z.ZodNullable<z.ZodBranded<z.ZodString, "UUID">>>;
|
|
92
|
+
}, {
|
|
93
|
+
type: z.ZodEnum<["CREATE", "NOTIFY", "DECLARE", "VALIDATE", "REGISTER", "DUPLICATE_DETECTED", "REJECT", "MARK_AS_DUPLICATE", "MARK_AS_NOT_DUPLICATE", "ARCHIVE", "PRINT_CERTIFICATE", "REQUEST_CORRECTION", "REJECT_CORRECTION", "APPROVE_CORRECTION", "READ", "ASSIGN", "UNASSIGN"]>;
|
|
94
|
+
status: z.ZodEnum<["Requested", "Accepted", "Rejected"]>;
|
|
95
|
+
}>, "strip", z.ZodTypeAny, {
|
|
96
|
+
type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
|
97
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
98
|
+
transactionId: string;
|
|
99
|
+
declaration: Record<string, import("./FieldValue").FieldUpdateValue>;
|
|
100
|
+
eventId: string & z.BRAND<"UUID">;
|
|
101
|
+
createdAtLocation?: (string & z.BRAND<"UUID">) | null | undefined;
|
|
102
|
+
annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | undefined;
|
|
103
|
+
originalActionId?: (string & z.BRAND<"UUID">) | undefined;
|
|
104
|
+
keepAssignment?: boolean | undefined;
|
|
105
|
+
}, {
|
|
106
|
+
type: "CREATE" | "NOTIFY" | "DECLARE" | "VALIDATE" | "REGISTER" | "DUPLICATE_DETECTED" | "REJECT" | "MARK_AS_DUPLICATE" | "MARK_AS_NOT_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
|
|
107
|
+
status: "Rejected" | "Requested" | "Accepted";
|
|
108
|
+
transactionId: string;
|
|
109
|
+
eventId: string;
|
|
110
|
+
createdAtLocation?: string | null | undefined;
|
|
111
|
+
declaration?: Record<string, import("./FieldValue").FieldUpdateValue> | undefined;
|
|
112
|
+
annotation?: Record<string, import("./FieldValue").FieldUpdateValue> | undefined;
|
|
113
|
+
originalActionId?: string | undefined;
|
|
114
|
+
keepAssignment?: boolean | undefined;
|
|
115
|
+
}>;
|
|
81
116
|
export type Draft = z.infer<typeof Draft>;
|
|
82
117
|
export type DraftInput = z.infer<typeof DraftInput>;
|
|
83
118
|
//# sourceMappingURL=Draft.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
import { AddressField, NameField } from './FieldConfig';
|
|
3
3
|
/**
|
|
4
4
|
* Dynamically builds a Zod schema for a "NAME" field based on its configuration.
|
|
@@ -15,7 +15,15 @@ export declare function getDynamicNameValue(field: NameField): z.ZodObject<{
|
|
|
15
15
|
firstname: z.ZodString;
|
|
16
16
|
surname: z.ZodString;
|
|
17
17
|
middlename: z.ZodString | z.ZodOptional<z.ZodString>;
|
|
18
|
-
}, z.
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
firstname: string;
|
|
20
|
+
surname: string;
|
|
21
|
+
middlename?: string | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
firstname: string;
|
|
24
|
+
surname: string;
|
|
25
|
+
middlename?: string | undefined;
|
|
26
|
+
}>;
|
|
19
27
|
export type DynamicNameValue = ReturnType<typeof getDynamicNameValue>;
|
|
20
28
|
/**
|
|
21
29
|
* Dynamically builds a Zod schema for an "ADDRESS" field.
|
|
@@ -32,24 +40,100 @@ export type DynamicNameValue = ReturnType<typeof getDynamicNameValue>;
|
|
|
32
40
|
* This prevents clients from sending unexpected data keys that don’t exist
|
|
33
41
|
* in the configuration (a common data integrity issue).
|
|
34
42
|
*/
|
|
35
|
-
export declare function getDynamicAddressFieldValue(field: AddressField): z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
43
|
+
export declare function getDynamicAddressFieldValue(field: AddressField): z.ZodEffects<z.ZodDiscriminatedUnion<"addressType", [z.ZodObject<z.objectUtil.extendShape<{
|
|
36
44
|
country: z.ZodString;
|
|
37
45
|
streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
46
|
+
}, {
|
|
38
47
|
addressType: z.ZodLiteral<"DOMESTIC">;
|
|
39
48
|
administrativeArea: z.ZodString;
|
|
40
|
-
}, z.
|
|
49
|
+
}>, "strip", z.ZodTypeAny, {
|
|
50
|
+
country: string;
|
|
51
|
+
addressType: "DOMESTIC";
|
|
52
|
+
administrativeArea: string;
|
|
53
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
country: string;
|
|
56
|
+
addressType: "DOMESTIC";
|
|
57
|
+
administrativeArea: string;
|
|
58
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
59
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
41
60
|
country: z.ZodString;
|
|
42
61
|
streetLevelDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
62
|
+
}, {
|
|
43
63
|
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
|
44
|
-
}, z.
|
|
64
|
+
}>, "strip", z.ZodTypeAny, {
|
|
65
|
+
country: string;
|
|
66
|
+
addressType: "INTERNATIONAL";
|
|
67
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
country: string;
|
|
70
|
+
addressType: "INTERNATIONAL";
|
|
71
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
72
|
+
}>]>, {
|
|
73
|
+
country: string;
|
|
74
|
+
addressType: "DOMESTIC";
|
|
75
|
+
administrativeArea: string;
|
|
76
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
77
|
+
} | {
|
|
78
|
+
country: string;
|
|
79
|
+
addressType: "INTERNATIONAL";
|
|
80
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
country: string;
|
|
83
|
+
addressType: "DOMESTIC";
|
|
84
|
+
administrativeArea: string;
|
|
85
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
86
|
+
} | {
|
|
87
|
+
country: string;
|
|
88
|
+
addressType: "INTERNATIONAL";
|
|
89
|
+
streetLevelDetails?: Record<string, string> | undefined;
|
|
90
|
+
}> | z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"addressType", [z.ZodObject<z.objectUtil.extendShape<{
|
|
45
91
|
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
46
92
|
streetLevelDetails: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>>;
|
|
93
|
+
}, {
|
|
47
94
|
addressType: z.ZodLiteral<"DOMESTIC">;
|
|
48
95
|
administrativeArea: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
49
|
-
}, z.
|
|
96
|
+
}>, "strip", z.ZodTypeAny, {
|
|
97
|
+
addressType: "DOMESTIC";
|
|
98
|
+
country?: string | null | undefined;
|
|
99
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
100
|
+
administrativeArea?: string | null | undefined;
|
|
101
|
+
}, {
|
|
102
|
+
addressType: "DOMESTIC";
|
|
103
|
+
country?: string | null | undefined;
|
|
104
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
105
|
+
administrativeArea?: string | null | undefined;
|
|
106
|
+
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
50
107
|
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
108
|
streetLevelDetails: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodString>>>>;
|
|
109
|
+
}, {
|
|
52
110
|
addressType: z.ZodLiteral<"INTERNATIONAL">;
|
|
53
|
-
}, z.
|
|
111
|
+
}>, "strip", z.ZodTypeAny, {
|
|
112
|
+
addressType: "INTERNATIONAL";
|
|
113
|
+
country?: string | null | undefined;
|
|
114
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
addressType: "INTERNATIONAL";
|
|
117
|
+
country?: string | null | undefined;
|
|
118
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
119
|
+
}>]>>>, {
|
|
120
|
+
addressType: "DOMESTIC";
|
|
121
|
+
country?: string | null | undefined;
|
|
122
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
123
|
+
administrativeArea?: string | null | undefined;
|
|
124
|
+
} | {
|
|
125
|
+
addressType: "INTERNATIONAL";
|
|
126
|
+
country?: string | null | undefined;
|
|
127
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
128
|
+
} | null | undefined, {
|
|
129
|
+
addressType: "DOMESTIC";
|
|
130
|
+
country?: string | null | undefined;
|
|
131
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
132
|
+
administrativeArea?: string | null | undefined;
|
|
133
|
+
} | {
|
|
134
|
+
addressType: "INTERNATIONAL";
|
|
135
|
+
country?: string | null | undefined;
|
|
136
|
+
streetLevelDetails?: Record<string, string | null> | null | undefined;
|
|
137
|
+
} | null | undefined>;
|
|
54
138
|
export type DynamicAddressFieldValue = ReturnType<typeof getDynamicAddressFieldValue>;
|
|
55
139
|
//# sourceMappingURL=DynamicFieldValue.d.ts.map
|