@opencrvs/toolkit 2.0.1-rc.59a8721 → 2.0.1-rc.5a1f8fa
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/create-countryconfig/index.js +177 -14
- package/dist/application-config/index.js +4 -2
- package/dist/cli.js +332 -5
- package/dist/commons/api/router.d.ts +42 -19
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionConfig.d.ts +4 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +6 -0
- package/dist/commons/events/FieldConfig.d.ts +5 -0
- package/dist/commons/events/FormConfig.d.ts +6 -0
- package/dist/commons/events/PageConfig.d.ts +4 -0
- package/dist/commons/events/utils.d.ts +4 -0
- package/dist/commons/notification/UserNotifications.d.ts +1 -6
- package/dist/conditionals/index.js +4 -2
- package/dist/events/index.js +22 -2
- package/dist/migrations/v2.0/index.js +4 -2
- package/dist/notification/index.js +8 -2
- package/dist/scopes/index.d.ts +65 -0
- package/dist/scopes/index.js +4 -2
- package/dist/verify/endpoints.d.ts +2 -0
- package/dist/verify/endpoints.d.ts.map +1 -0
- package/dist/verify/endpoints.js +345 -0
- package/opencrvs-toolkit-2.0.1-rc.5a1f8fa.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.1-rc.59a8721.tgz +0 -0
|
@@ -7793,18 +7793,28 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7793
7793
|
}>;
|
|
7794
7794
|
set: import("@trpc/server").TRPCMutationProcedure<{
|
|
7795
7795
|
input: {
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
|
|
7803
|
-
}[];
|
|
7804
|
-
};
|
|
7796
|
+
id: string;
|
|
7797
|
+
name: string;
|
|
7798
|
+
administrativeAreaId: string | null;
|
|
7799
|
+
validUntil: string | null;
|
|
7800
|
+
locationType: string | null;
|
|
7801
|
+
externalId?: string | null | undefined;
|
|
7802
|
+
}[];
|
|
7805
7803
|
output: void;
|
|
7806
7804
|
meta: object;
|
|
7807
7805
|
}>;
|
|
7806
|
+
upsert: import("@trpc/server").TRPCMutationProcedure<{
|
|
7807
|
+
input: {
|
|
7808
|
+
id: string;
|
|
7809
|
+
name: string;
|
|
7810
|
+
administrativeAreaId: string | null;
|
|
7811
|
+
validUntil: string | null;
|
|
7812
|
+
locationType: string | null;
|
|
7813
|
+
externalId?: string | null | undefined;
|
|
7814
|
+
};
|
|
7815
|
+
output: void;
|
|
7816
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
7817
|
+
}>;
|
|
7808
7818
|
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
7809
7819
|
input: {
|
|
7810
7820
|
id: string;
|
|
@@ -8227,17 +8237,26 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8227
8237
|
}>;
|
|
8228
8238
|
set: import("@trpc/server").TRPCMutationProcedure<{
|
|
8229
8239
|
input: {
|
|
8230
|
-
|
|
8231
|
-
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
}[];
|
|
8237
|
-
};
|
|
8240
|
+
id: string;
|
|
8241
|
+
name: string;
|
|
8242
|
+
parentId: string | null;
|
|
8243
|
+
validUntil: string | null;
|
|
8244
|
+
externalId?: string | null | undefined;
|
|
8245
|
+
}[];
|
|
8238
8246
|
output: void;
|
|
8239
8247
|
meta: object;
|
|
8240
8248
|
}>;
|
|
8249
|
+
upsert: import("@trpc/server").TRPCMutationProcedure<{
|
|
8250
|
+
input: {
|
|
8251
|
+
id: string;
|
|
8252
|
+
name: string;
|
|
8253
|
+
parentId: string | null;
|
|
8254
|
+
validUntil: string | null;
|
|
8255
|
+
externalId?: string | null | undefined;
|
|
8256
|
+
};
|
|
8257
|
+
output: void;
|
|
8258
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8259
|
+
}>;
|
|
8241
8260
|
}>>;
|
|
8242
8261
|
integrations: import("@trpc/server").TRPCBuiltRouter<{
|
|
8243
8262
|
ctx: Partial<{
|
|
@@ -8265,6 +8284,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8265
8284
|
input: {
|
|
8266
8285
|
name: string;
|
|
8267
8286
|
scopes: string[];
|
|
8287
|
+
credentials?: {
|
|
8288
|
+
clientId: string;
|
|
8289
|
+
clientSecret: string;
|
|
8290
|
+
} | undefined;
|
|
8268
8291
|
};
|
|
8269
8292
|
output: {
|
|
8270
8293
|
clientId: string;
|
|
@@ -8295,7 +8318,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8295
8318
|
scopes: string[];
|
|
8296
8319
|
status: string;
|
|
8297
8320
|
createdAt: string;
|
|
8298
|
-
createdBy: string & import("zod").$brand<"UUID"
|
|
8321
|
+
createdBy: (string & import("zod").$brand<"UUID">) | null;
|
|
8299
8322
|
}[];
|
|
8300
8323
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8301
8324
|
}>;
|
|
@@ -8310,7 +8333,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8310
8333
|
status: string;
|
|
8311
8334
|
shaSecret: string | null;
|
|
8312
8335
|
createdAt: string;
|
|
8313
|
-
createdBy: string & import("zod").$brand<"UUID"
|
|
8336
|
+
createdBy: (string & import("zod").$brand<"UUID">) | null;
|
|
8314
8337
|
};
|
|
8315
8338
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8316
8339
|
}>;
|
|
@@ -94,16 +94,16 @@ export declare const user: typeof userSerializer & {
|
|
|
94
94
|
scope: (scope: import("../scopes").ScopeType) => {
|
|
95
95
|
attribute: (option: import("../scopes").ScopeOptionKey) => {
|
|
96
96
|
$scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
|
|
97
|
-
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
97
|
+
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "createdIn" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
98
98
|
};
|
|
99
99
|
};
|
|
100
100
|
jurisdiction: (jurisdiction: import("../scopes").JurisdictionFilter | {
|
|
101
101
|
$scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
|
|
102
|
-
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
102
|
+
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "createdIn" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
103
103
|
}) => {
|
|
104
104
|
$jurisdiction: "administrativeArea" | "location" | "all" | {
|
|
105
105
|
$scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
|
|
106
|
-
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
106
|
+
$option: "role" | "event" | "placeOfEvent" | "createdBy" | "createdIn" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
109
|
};
|
|
@@ -214,6 +214,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
214
214
|
id: z.ZodString;
|
|
215
215
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
216
216
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
217
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
217
218
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
218
219
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
219
220
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -221,6 +222,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
221
222
|
id: z.ZodString;
|
|
222
223
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
223
224
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
225
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
224
226
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
225
227
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
226
228
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -270,6 +272,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
270
272
|
id: z.ZodString;
|
|
271
273
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
272
274
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
275
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
273
276
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
274
277
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
275
278
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -277,6 +280,7 @@ export declare const ActionConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
277
280
|
id: z.ZodString;
|
|
278
281
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
279
282
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
283
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
280
284
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
281
285
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
282
286
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -140,6 +140,7 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
|
140
140
|
event: "event";
|
|
141
141
|
placeOfEvent: "placeOfEvent";
|
|
142
142
|
createdBy: "createdBy";
|
|
143
|
+
createdIn: "createdIn";
|
|
143
144
|
declaredIn: "declaredIn";
|
|
144
145
|
declaredBy: "declaredBy";
|
|
145
146
|
registeredIn: "registeredIn";
|
|
@@ -318,6 +319,7 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
|
|
|
318
319
|
event: "event";
|
|
319
320
|
placeOfEvent: "placeOfEvent";
|
|
320
321
|
createdBy: "createdBy";
|
|
322
|
+
createdIn: "createdIn";
|
|
321
323
|
declaredIn: "declaredIn";
|
|
322
324
|
declaredBy: "declaredBy";
|
|
323
325
|
registeredIn: "registeredIn";
|
|
@@ -472,6 +474,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
472
474
|
event: "event";
|
|
473
475
|
placeOfEvent: "placeOfEvent";
|
|
474
476
|
createdBy: "createdBy";
|
|
477
|
+
createdIn: "createdIn";
|
|
475
478
|
declaredIn: "declaredIn";
|
|
476
479
|
declaredBy: "declaredBy";
|
|
477
480
|
registeredIn: "registeredIn";
|
|
@@ -618,6 +621,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
618
621
|
event: "event";
|
|
619
622
|
placeOfEvent: "placeOfEvent";
|
|
620
623
|
createdBy: "createdBy";
|
|
624
|
+
createdIn: "createdIn";
|
|
621
625
|
declaredIn: "declaredIn";
|
|
622
626
|
declaredBy: "declaredBy";
|
|
623
627
|
registeredIn: "registeredIn";
|
|
@@ -775,6 +779,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
775
779
|
event: "event";
|
|
776
780
|
placeOfEvent: "placeOfEvent";
|
|
777
781
|
createdBy: "createdBy";
|
|
782
|
+
createdIn: "createdIn";
|
|
778
783
|
declaredIn: "declaredIn";
|
|
779
784
|
declaredBy: "declaredBy";
|
|
780
785
|
registeredIn: "registeredIn";
|
|
@@ -921,6 +926,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
921
926
|
event: "event";
|
|
922
927
|
placeOfEvent: "placeOfEvent";
|
|
923
928
|
createdBy: "createdBy";
|
|
929
|
+
createdIn: "createdIn";
|
|
924
930
|
declaredIn: "declaredIn";
|
|
925
931
|
declaredBy: "declaredBy";
|
|
926
932
|
registeredIn: "registeredIn";
|
|
@@ -1920,6 +1920,7 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1920
1920
|
event: "event";
|
|
1921
1921
|
placeOfEvent: "placeOfEvent";
|
|
1922
1922
|
createdBy: "createdBy";
|
|
1923
|
+
createdIn: "createdIn";
|
|
1923
1924
|
declaredIn: "declaredIn";
|
|
1924
1925
|
declaredBy: "declaredBy";
|
|
1925
1926
|
registeredIn: "registeredIn";
|
|
@@ -2047,6 +2048,7 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2047
2048
|
event: "event";
|
|
2048
2049
|
placeOfEvent: "placeOfEvent";
|
|
2049
2050
|
createdBy: "createdBy";
|
|
2051
|
+
createdIn: "createdIn";
|
|
2050
2052
|
declaredIn: "declaredIn";
|
|
2051
2053
|
declaredBy: "declaredBy";
|
|
2052
2054
|
registeredIn: "registeredIn";
|
|
@@ -2245,6 +2247,7 @@ declare const Facility: z.ZodObject<{
|
|
|
2245
2247
|
event: "event";
|
|
2246
2248
|
placeOfEvent: "placeOfEvent";
|
|
2247
2249
|
createdBy: "createdBy";
|
|
2250
|
+
createdIn: "createdIn";
|
|
2248
2251
|
declaredIn: "declaredIn";
|
|
2249
2252
|
declaredBy: "declaredBy";
|
|
2250
2253
|
registeredIn: "registeredIn";
|
|
@@ -2358,6 +2361,7 @@ declare const Office: z.ZodObject<{
|
|
|
2358
2361
|
event: "event";
|
|
2359
2362
|
placeOfEvent: "placeOfEvent";
|
|
2360
2363
|
createdBy: "createdBy";
|
|
2364
|
+
createdIn: "createdIn";
|
|
2361
2365
|
declaredIn: "declaredIn";
|
|
2362
2366
|
declaredBy: "declaredBy";
|
|
2363
2367
|
registeredIn: "registeredIn";
|
|
@@ -2557,6 +2561,7 @@ declare const Address: z.ZodObject<{
|
|
|
2557
2561
|
event: "event";
|
|
2558
2562
|
placeOfEvent: "placeOfEvent";
|
|
2559
2563
|
createdBy: "createdBy";
|
|
2564
|
+
createdIn: "createdIn";
|
|
2560
2565
|
declaredIn: "declaredIn";
|
|
2561
2566
|
declaredBy: "declaredBy";
|
|
2562
2567
|
registeredIn: "registeredIn";
|
|
@@ -5,6 +5,7 @@ export declare const DeclarationFormConfig: z.ZodObject<{
|
|
|
5
5
|
id: z.ZodString;
|
|
6
6
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
7
7
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
8
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
8
9
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
9
10
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
10
11
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -18,6 +19,7 @@ export declare const ActionFormConfig: z.ZodObject<{
|
|
|
18
19
|
id: z.ZodString;
|
|
19
20
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
20
21
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
22
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
21
23
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
22
24
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
23
25
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -25,6 +27,7 @@ export declare const ActionFormConfig: z.ZodObject<{
|
|
|
25
27
|
id: z.ZodString;
|
|
26
28
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
27
29
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
30
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
28
31
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
29
32
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
30
33
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -50,6 +53,7 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
50
53
|
id: z.ZodString;
|
|
51
54
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
52
55
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
56
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
53
57
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
54
58
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
55
59
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -60,6 +64,7 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
60
64
|
id: z.ZodString;
|
|
61
65
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
62
66
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
67
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
63
68
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
64
69
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
65
70
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -67,6 +72,7 @@ export declare const FormConfig: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
67
72
|
id: z.ZodString;
|
|
68
73
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
69
74
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
75
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
70
76
|
fields: z.ZodArray<z.ZodType<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<import("./FieldConfig").FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
71
77
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
72
78
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -9,6 +9,7 @@ export declare const FormPageConfig: z.ZodObject<{
|
|
|
9
9
|
id: z.ZodString;
|
|
10
10
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
11
11
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
12
13
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
13
14
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
14
15
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -31,6 +32,7 @@ export declare const VerificationPageConfig: z.ZodObject<{
|
|
|
31
32
|
id: z.ZodString;
|
|
32
33
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
33
34
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
35
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
34
36
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
35
37
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
36
38
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -52,6 +54,7 @@ export declare const PageConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
52
54
|
id: z.ZodString;
|
|
53
55
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
54
56
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
57
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
55
58
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
56
59
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
57
60
|
type: z.ZodDefault<z.ZodLiteral<"FORM">>;
|
|
@@ -59,6 +62,7 @@ export declare const PageConfig: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
59
62
|
id: z.ZodString;
|
|
60
63
|
title: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, z.core.$strip>;
|
|
61
64
|
requireCompletionToContinue: z.ZodDefault<z.ZodBoolean>;
|
|
65
|
+
showClearButton: z.ZodOptional<z.ZodBoolean>;
|
|
62
66
|
fields: z.ZodArray<z.ZodType<FieldConfig, import("./FieldConfig").FieldConfigInput, z.core.$ZodTypeInternals<FieldConfig, import("./FieldConfig").FieldConfigInput>>>;
|
|
63
67
|
conditional: z.ZodOptional<z.ZodAny>;
|
|
64
68
|
type: z.ZodLiteral<"VERIFICATION">;
|
|
@@ -22,6 +22,7 @@ export declare function getDeclarationPages(configuration: EventConfig): {
|
|
|
22
22
|
requireCompletionToContinue: boolean;
|
|
23
23
|
fields: FieldConfig[];
|
|
24
24
|
type: "FORM";
|
|
25
|
+
showClearButton?: boolean | undefined;
|
|
25
26
|
conditional?: any;
|
|
26
27
|
}[];
|
|
27
28
|
export declare function getDeclaration(configuration: EventConfig): {
|
|
@@ -40,6 +41,7 @@ export declare function getDeclaration(configuration: EventConfig): {
|
|
|
40
41
|
requireCompletionToContinue: boolean;
|
|
41
42
|
fields: FieldConfig[];
|
|
42
43
|
type: "FORM";
|
|
44
|
+
showClearButton?: boolean | undefined;
|
|
43
45
|
conditional?: any;
|
|
44
46
|
}[];
|
|
45
47
|
};
|
|
@@ -60,6 +62,7 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
|
|
|
60
62
|
requireCompletionToContinue: boolean;
|
|
61
63
|
fields: FieldConfig[];
|
|
62
64
|
type: "FORM";
|
|
65
|
+
showClearButton?: boolean | undefined;
|
|
63
66
|
conditional?: any;
|
|
64
67
|
} | {
|
|
65
68
|
id: string;
|
|
@@ -99,6 +102,7 @@ export declare function getPrintCertificatePages(configuration: EventConfig): ({
|
|
|
99
102
|
};
|
|
100
103
|
};
|
|
101
104
|
};
|
|
105
|
+
showClearButton?: boolean | undefined;
|
|
102
106
|
conditional?: any;
|
|
103
107
|
})[];
|
|
104
108
|
export declare const getActionAnnotationFields: (actionConfig: ActionConfig) => FieldConfig[];
|
|
@@ -184,12 +184,7 @@ export declare const TriggerPayload: {
|
|
|
184
184
|
export type TriggerPayload = {
|
|
185
185
|
[K in TriggerEvent]: z.infer<(typeof TriggerPayload)[K]>;
|
|
186
186
|
};
|
|
187
|
-
export declare function triggerUserEventNotification(
|
|
188
|
-
event: typeof TriggerEvent.ALL_USER_NOTIFICATION;
|
|
189
|
-
payload: TriggerPayload[typeof TriggerEvent.ALL_USER_NOTIFICATION];
|
|
190
|
-
countryConfigUrl: string;
|
|
191
|
-
}): Promise<Response>;
|
|
192
|
-
export declare function triggerUserEventNotification<T extends Exclude<TriggerEvent, typeof TriggerEvent.ALL_USER_NOTIFICATION>>(args: {
|
|
187
|
+
export declare function triggerUserEventNotification<T extends TriggerEvent>({ event, payload, countryConfigUrl, authHeader }: {
|
|
193
188
|
event: T;
|
|
194
189
|
payload: TriggerPayload[T];
|
|
195
190
|
countryConfigUrl: string;
|
|
@@ -190,7 +190,8 @@ var userRole = z6.preprocess(
|
|
|
190
190
|
var scopeOptionsPlaceEvent = z6.object({
|
|
191
191
|
event: scopeByEvent,
|
|
192
192
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
193
|
-
createdBy: UserFilter.optional()
|
|
193
|
+
createdBy: UserFilter.optional(),
|
|
194
|
+
createdIn: JurisdictionFilter.optional()
|
|
194
195
|
}).describe("Options applicable to all record scopes.");
|
|
195
196
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
196
197
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -230,7 +231,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
230
231
|
var ResolvedScopeOptionsPlaceEvent = z6.object({
|
|
231
232
|
event: scopeByEvent,
|
|
232
233
|
placeOfEvent: UUID.nullish(),
|
|
233
|
-
createdBy: z6.string().optional()
|
|
234
|
+
createdBy: z6.string().optional(),
|
|
235
|
+
createdIn: UUID.nullish()
|
|
234
236
|
}).describe(
|
|
235
237
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
236
238
|
);
|
package/dist/events/index.js
CHANGED
|
@@ -519,7 +519,8 @@ var userRole = z2.preprocess(
|
|
|
519
519
|
var scopeOptionsPlaceEvent = z2.object({
|
|
520
520
|
event: scopeByEvent,
|
|
521
521
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
522
|
-
createdBy: UserFilter.optional()
|
|
522
|
+
createdBy: UserFilter.optional(),
|
|
523
|
+
createdIn: JurisdictionFilter.optional()
|
|
523
524
|
}).describe("Options applicable to all record scopes.");
|
|
524
525
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
525
526
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -559,7 +560,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
559
560
|
var ResolvedScopeOptionsPlaceEvent = z2.object({
|
|
560
561
|
event: scopeByEvent,
|
|
561
562
|
placeOfEvent: UUID.nullish(),
|
|
562
|
-
createdBy: z2.string().optional()
|
|
563
|
+
createdBy: z2.string().optional(),
|
|
564
|
+
createdIn: UUID.nullish()
|
|
563
565
|
}).describe(
|
|
564
566
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
565
567
|
);
|
|
@@ -3044,6 +3046,9 @@ var PageConfigBase = z21.object({
|
|
|
3044
3046
|
requireCompletionToContinue: z21.boolean().default(false).describe(
|
|
3045
3047
|
"If true, all required fields must be filled before continuing to the next page"
|
|
3046
3048
|
),
|
|
3049
|
+
showClearButton: z21.boolean().optional().describe(
|
|
3050
|
+
'If true, a "Clear" button is shown at the top of the page allowing the user to reset all fields on the page to their default state'
|
|
3051
|
+
),
|
|
3047
3052
|
fields: z21.array(FieldConfig).describe("Fields to be rendered on the page"),
|
|
3048
3053
|
conditional: Conditional.optional().describe(
|
|
3049
3054
|
"Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
|
|
@@ -7760,6 +7765,7 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
|
|
|
7760
7765
|
defaultMessage: "Who is applying for the membership?",
|
|
7761
7766
|
description: "This is the title of the section"
|
|
7762
7767
|
},
|
|
7768
|
+
showClearButton: true,
|
|
7763
7769
|
fields: [
|
|
7764
7770
|
{
|
|
7765
7771
|
id: "applicant.name",
|
|
@@ -10314,6 +10320,20 @@ function canAccessEventWithScope(event2, scope, user2, customActionType) {
|
|
|
10314
10320
|
if (opts?.createdBy === UserFilter.enum.user && event2.createdBy !== user2.id) {
|
|
10315
10321
|
return false;
|
|
10316
10322
|
}
|
|
10323
|
+
if (opts?.createdIn === JurisdictionFilter.enum.location && !matchesJurisdictionFilter(
|
|
10324
|
+
event2.createdAtLocation,
|
|
10325
|
+
JurisdictionFilter.enum.location,
|
|
10326
|
+
user2
|
|
10327
|
+
)) {
|
|
10328
|
+
return false;
|
|
10329
|
+
}
|
|
10330
|
+
if (opts?.createdIn === JurisdictionFilter.enum.administrativeArea && !matchesJurisdictionFilter(
|
|
10331
|
+
event2.createdAtLocation,
|
|
10332
|
+
JurisdictionFilter.enum.administrativeArea,
|
|
10333
|
+
user2
|
|
10334
|
+
)) {
|
|
10335
|
+
return false;
|
|
10336
|
+
}
|
|
10317
10337
|
if (scopeUsesDeclaredOptions(scope)) {
|
|
10318
10338
|
const { options } = scope;
|
|
10319
10339
|
if (options?.declaredBy === UserFilter.enum.user) {
|
|
@@ -2203,7 +2203,8 @@ var userRole = z3.preprocess(
|
|
|
2203
2203
|
var scopeOptionsPlaceEvent = z3.object({
|
|
2204
2204
|
event: scopeByEvent,
|
|
2205
2205
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
2206
|
-
createdBy: UserFilter.optional()
|
|
2206
|
+
createdBy: UserFilter.optional(),
|
|
2207
|
+
createdIn: JurisdictionFilter.optional()
|
|
2207
2208
|
}).describe("Options applicable to all record scopes.");
|
|
2208
2209
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
2209
2210
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -2243,7 +2244,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
2243
2244
|
var ResolvedScopeOptionsPlaceEvent = z3.object({
|
|
2244
2245
|
event: scopeByEvent,
|
|
2245
2246
|
placeOfEvent: UUID.nullish(),
|
|
2246
|
-
createdBy: z3.string().optional()
|
|
2247
|
+
createdBy: z3.string().optional(),
|
|
2248
|
+
createdIn: UUID.nullish()
|
|
2247
2249
|
}).describe(
|
|
2248
2250
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
2249
2251
|
);
|
|
@@ -117,7 +117,8 @@ var userRole = z2.preprocess(
|
|
|
117
117
|
var scopeOptionsPlaceEvent = z2.object({
|
|
118
118
|
event: scopeByEvent,
|
|
119
119
|
placeOfEvent: JurisdictionFilter.optional(),
|
|
120
|
-
createdBy: UserFilter.optional()
|
|
120
|
+
createdBy: UserFilter.optional(),
|
|
121
|
+
createdIn: JurisdictionFilter.optional()
|
|
121
122
|
}).describe("Options applicable to all record scopes.");
|
|
122
123
|
var scopeOptionsDeclared = scopeOptionsPlaceEvent.extend({
|
|
123
124
|
declaredIn: JurisdictionFilter.optional(),
|
|
@@ -157,7 +158,8 @@ var ScopeOptionKey = AllScopeOptions.keyof();
|
|
|
157
158
|
var ResolvedScopeOptionsPlaceEvent = z2.object({
|
|
158
159
|
event: scopeByEvent,
|
|
159
160
|
placeOfEvent: UUID.nullish(),
|
|
160
|
-
createdBy: z2.string().optional()
|
|
161
|
+
createdBy: z2.string().optional(),
|
|
162
|
+
createdIn: UUID.nullish()
|
|
161
163
|
}).describe(
|
|
162
164
|
"Resolved options applicable to all record scopes, with location ID instead of jurisdiction filter."
|
|
163
165
|
);
|
|
@@ -2501,6 +2503,9 @@ var PageConfigBase = z21.object({
|
|
|
2501
2503
|
requireCompletionToContinue: z21.boolean().default(false).describe(
|
|
2502
2504
|
"If true, all required fields must be filled before continuing to the next page"
|
|
2503
2505
|
),
|
|
2506
|
+
showClearButton: z21.boolean().optional().describe(
|
|
2507
|
+
'If true, a "Clear" button is shown at the top of the page allowing the user to reset all fields on the page to their default state'
|
|
2508
|
+
),
|
|
2504
2509
|
fields: z21.array(FieldConfig).describe("Fields to be rendered on the page"),
|
|
2505
2510
|
conditional: Conditional.optional().describe(
|
|
2506
2511
|
"Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
|
|
@@ -5532,6 +5537,7 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
|
|
|
5532
5537
|
defaultMessage: "Who is applying for the membership?",
|
|
5533
5538
|
description: "This is the title of the section"
|
|
5534
5539
|
},
|
|
5540
|
+
showClearButton: true,
|
|
5535
5541
|
fields: [
|
|
5536
5542
|
{
|
|
5537
5543
|
id: "applicant.name",
|