@opencrvs/toolkit 2.0.0-rc.affb605 → 2.0.0-rc.b05abf8
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/application-config/index.js +5 -0
- package/dist/commons/api/router.d.ts +6 -2
- package/dist/commons/events/FieldType.d.ts +1 -0
- package/dist/commons/events/FieldTypeMapping.d.ts +1 -1
- package/dist/events/index.js +16 -9
- package/dist/notification/index.js +12 -0
- package/opencrvs-toolkit-2.0.0-rc.b05abf8.tgz +0 -0
- package/package.json +1 -1
- package/opencrvs-toolkit-2.0.0-rc.affb605.tgz +0 -0
|
@@ -206,6 +206,11 @@ var FieldTypesToHideInReview = [
|
|
|
206
206
|
FieldType.ALPHA_PRINT_BUTTON,
|
|
207
207
|
FieldType.ALPHA_HIDDEN
|
|
208
208
|
];
|
|
209
|
+
var HiddenFieldTypes = [
|
|
210
|
+
FieldType.HTTP,
|
|
211
|
+
FieldType.QUERY_PARAM_READER,
|
|
212
|
+
FieldType.ALPHA_HIDDEN
|
|
213
|
+
];
|
|
209
214
|
|
|
210
215
|
// ../commons/src/events/FieldValue.ts
|
|
211
216
|
var z7 = __toESM(require("zod/v4"));
|
|
@@ -7374,9 +7374,13 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7374
7374
|
output: void;
|
|
7375
7375
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
7376
7376
|
}>;
|
|
7377
|
-
|
|
7377
|
+
requestContactChange: import("@trpc/server").TRPCMutationProcedure<{
|
|
7378
7378
|
input: {
|
|
7379
|
-
notificationEvent: "change-
|
|
7379
|
+
notificationEvent: "change-email-address";
|
|
7380
|
+
email: string;
|
|
7381
|
+
} | {
|
|
7382
|
+
notificationEvent: "change-phone-number";
|
|
7383
|
+
phoneNumber: string;
|
|
7380
7384
|
};
|
|
7381
7385
|
output: {
|
|
7382
7386
|
nonce: string;
|
|
@@ -75,4 +75,5 @@ export type FieldType = (typeof fieldTypes)[number];
|
|
|
75
75
|
*/
|
|
76
76
|
export declare const compositeFieldTypes: ("NAME" | "ADDRESS" | "DATE_RANGE" | "FILE" | "FILE_WITH_OPTIONS" | "DATA" | "ID_READER")[];
|
|
77
77
|
export declare const FieldTypesToHideInReview: ("IMAGE_VIEW" | "PARAGRAPH" | "PAGE_HEADER" | "BULLET_LIST" | "DIVIDER" | "DATA" | "ALPHA_PRINT_BUTTON" | "HTTP" | "QUERY_PARAM_READER" | "ID_READER" | "LOADER" | "ALPHA_HIDDEN")[];
|
|
78
|
+
export declare const HiddenFieldTypes: ("HTTP" | "QUERY_PARAM_READER" | "ALPHA_HIDDEN")[];
|
|
78
79
|
//# sourceMappingURL=FieldType.d.ts.map
|
|
@@ -690,7 +690,7 @@ export declare const isHiddenFieldType: (field: {
|
|
|
690
690
|
value: undefined;
|
|
691
691
|
config: HiddenField;
|
|
692
692
|
};
|
|
693
|
-
export type NonInteractiveFieldType = Divider | PageHeader | ImageViewField | Paragraph | Heading | BulletList | DataField | AlphaPrintButton |
|
|
693
|
+
export type NonInteractiveFieldType = Divider | PageHeader | ImageViewField | Paragraph | Heading | BulletList | DataField | AlphaPrintButton | LinkButtonField | LoaderField | AutocompleteField;
|
|
694
694
|
export type InteractiveFieldType = Exclude<FieldConfig, NonInteractiveFieldType>;
|
|
695
695
|
export declare const isNonInteractiveFieldType: (field: FieldConfig) => field is NonInteractiveFieldType;
|
|
696
696
|
export {};
|
package/dist/events/index.js
CHANGED
|
@@ -151,6 +151,7 @@ __export(events_exports, {
|
|
|
151
151
|
FormPageConfig: () => FormPageConfig,
|
|
152
152
|
Fuzzy: () => Fuzzy,
|
|
153
153
|
GeographicalArea: () => GeographicalArea,
|
|
154
|
+
HiddenFieldTypes: () => HiddenFieldTypes,
|
|
154
155
|
HiddenFieldValue: () => HiddenFieldValue,
|
|
155
156
|
HttpFieldUpdateValue: () => HttpFieldUpdateValue,
|
|
156
157
|
HttpFieldValue: () => HttpFieldValue,
|
|
@@ -1219,6 +1220,11 @@ var FieldTypesToHideInReview = [
|
|
|
1219
1220
|
FieldType.ALPHA_PRINT_BUTTON,
|
|
1220
1221
|
FieldType.ALPHA_HIDDEN
|
|
1221
1222
|
];
|
|
1223
|
+
var HiddenFieldTypes = [
|
|
1224
|
+
FieldType.HTTP,
|
|
1225
|
+
FieldType.QUERY_PARAM_READER,
|
|
1226
|
+
FieldType.ALPHA_HIDDEN
|
|
1227
|
+
];
|
|
1222
1228
|
|
|
1223
1229
|
// ../commons/src/events/FieldValue.ts
|
|
1224
1230
|
var z12 = __toESM(require("zod/v4"));
|
|
@@ -3908,7 +3914,7 @@ var isHiddenFieldType = (field3) => {
|
|
|
3908
3914
|
return field3.config.type === FieldType.ALPHA_HIDDEN;
|
|
3909
3915
|
};
|
|
3910
3916
|
var isNonInteractiveFieldType = (field3) => {
|
|
3911
|
-
return field3.type === FieldType.DIVIDER || field3.type === FieldType.PAGE_HEADER || field3.type === FieldType.PARAGRAPH || field3.type === FieldType.HEADING || field3.type === FieldType.BULLET_LIST || field3.type === FieldType.DATA || field3.type === FieldType.ALPHA_PRINT_BUTTON || field3.type === FieldType.
|
|
3917
|
+
return field3.type === FieldType.DIVIDER || field3.type === FieldType.PAGE_HEADER || field3.type === FieldType.PARAGRAPH || field3.type === FieldType.HEADING || field3.type === FieldType.BULLET_LIST || field3.type === FieldType.DATA || field3.type === FieldType.ALPHA_PRINT_BUTTON || field3.type === FieldType.LINK_BUTTON || field3.type === FieldType.LOADER;
|
|
3912
3918
|
};
|
|
3913
3919
|
|
|
3914
3920
|
// ../commons/src/conditionals/validate.ts
|
|
@@ -10623,18 +10629,19 @@ var ACTION_FILTERS = {
|
|
|
10623
10629
|
function filterActionsByFlags(actions, flags) {
|
|
10624
10630
|
return actions.filter((action) => ACTION_FILTERS[action]?.(flags) ?? true);
|
|
10625
10631
|
}
|
|
10632
|
+
var REJECTED_ACTIONS = [
|
|
10633
|
+
ActionType.READ,
|
|
10634
|
+
ActionType.NOTIFY,
|
|
10635
|
+
ActionType.CUSTOM,
|
|
10636
|
+
ActionType.EDIT,
|
|
10637
|
+
ActionType.ARCHIVE
|
|
10638
|
+
];
|
|
10626
10639
|
function getAvailableActionsWithoutFlagFilters(status2, flags) {
|
|
10627
10640
|
if (flags.includes(InherentFlags.EDIT_IN_PROGRESS)) {
|
|
10628
10641
|
return [ActionType.NOTIFY, ActionType.DECLARE, ActionType.REGISTER];
|
|
10629
10642
|
}
|
|
10630
|
-
if (flags.includes(InherentFlags.REJECTED)) {
|
|
10631
|
-
return
|
|
10632
|
-
ActionType.READ,
|
|
10633
|
-
ActionType.NOTIFY,
|
|
10634
|
-
ActionType.CUSTOM,
|
|
10635
|
-
ActionType.EDIT,
|
|
10636
|
-
ActionType.ARCHIVE
|
|
10637
|
-
];
|
|
10643
|
+
if (flags.includes(InherentFlags.REJECTED) && status2 !== EventStatus.enum.ARCHIVED) {
|
|
10644
|
+
return REJECTED_ACTIONS;
|
|
10638
10645
|
}
|
|
10639
10646
|
return AVAILABLE_ACTIONS_BY_EVENT_STATUS[status2];
|
|
10640
10647
|
}
|
|
@@ -770,6 +770,11 @@ var FieldTypesToHideInReview = [
|
|
|
770
770
|
FieldType.ALPHA_PRINT_BUTTON,
|
|
771
771
|
FieldType.ALPHA_HIDDEN
|
|
772
772
|
];
|
|
773
|
+
var HiddenFieldTypes = [
|
|
774
|
+
FieldType.HTTP,
|
|
775
|
+
FieldType.QUERY_PARAM_READER,
|
|
776
|
+
FieldType.ALPHA_HIDDEN
|
|
777
|
+
];
|
|
773
778
|
|
|
774
779
|
// ../commons/src/events/FieldValue.ts
|
|
775
780
|
var z12 = __toESM(require("zod/v4"));
|
|
@@ -7241,6 +7246,13 @@ var ACTION_FILTERS = {
|
|
|
7241
7246
|
[ActionType.UNASSIGN]: (flags) => !flags.some((flag) => flag.endsWith(":requested")),
|
|
7242
7247
|
[ActionType.CUSTOM]: (flags) => !flags.some((flag) => flag.endsWith(":requested"))
|
|
7243
7248
|
};
|
|
7249
|
+
var REJECTED_ACTIONS = [
|
|
7250
|
+
ActionType.READ,
|
|
7251
|
+
ActionType.NOTIFY,
|
|
7252
|
+
ActionType.CUSTOM,
|
|
7253
|
+
ActionType.EDIT,
|
|
7254
|
+
ActionType.ARCHIVE
|
|
7255
|
+
];
|
|
7244
7256
|
|
|
7245
7257
|
// ../commons/src/events/FileUtils.ts
|
|
7246
7258
|
var import_lodash7 = require("lodash");
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|