@opencrvs/toolkit 2.0.1-rc.59a8721 → 2.0.1-rc.59ec3a4

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.
@@ -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
- locations: {
7797
- id: string;
7798
- name: string;
7799
- administrativeAreaId: string | null;
7800
- validUntil: string | null;
7801
- locationType: string | null;
7802
- externalId?: string | null | undefined;
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
- administrativeAreas: {
8231
- id: string;
8232
- name: string;
8233
- parentId: string | null;
8234
- validUntil: string | null;
8235
- externalId?: string | null | undefined;
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
  }>;
@@ -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">;
@@ -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[];
@@ -3044,6 +3044,9 @@ var PageConfigBase = z21.object({
3044
3044
  requireCompletionToContinue: z21.boolean().default(false).describe(
3045
3045
  "If true, all required fields must be filled before continuing to the next page"
3046
3046
  ),
3047
+ showClearButton: z21.boolean().optional().describe(
3048
+ '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'
3049
+ ),
3047
3050
  fields: z21.array(FieldConfig).describe("Fields to be rendered on the page"),
3048
3051
  conditional: Conditional.optional().describe(
3049
3052
  "Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
@@ -7760,6 +7763,7 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
7760
7763
  defaultMessage: "Who is applying for the membership?",
7761
7764
  description: "This is the title of the section"
7762
7765
  },
7766
+ showClearButton: true,
7763
7767
  fields: [
7764
7768
  {
7765
7769
  id: "applicant.name",
@@ -2501,6 +2501,9 @@ var PageConfigBase = z21.object({
2501
2501
  requireCompletionToContinue: z21.boolean().default(false).describe(
2502
2502
  "If true, all required fields must be filled before continuing to the next page"
2503
2503
  ),
2504
+ showClearButton: z21.boolean().optional().describe(
2505
+ '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'
2506
+ ),
2504
2507
  fields: z21.array(FieldConfig).describe("Fields to be rendered on the page"),
2505
2508
  conditional: Conditional.optional().describe(
2506
2509
  "Page will be shown if condition is met. If conditional is not defined, the page will be always shown."
@@ -5532,6 +5535,7 @@ var TENNIS_CLUB_DECLARATION_FORM = defineDeclarationForm({
5532
5535
  defaultMessage: "Who is applying for the membership?",
5533
5536
  description: "This is the title of the section"
5534
5537
  },
5538
+ showClearButton: true,
5535
5539
  fields: [
5536
5540
  {
5537
5541
  id: "applicant.name",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.0.1-rc.59a8721",
3
+ "version": "2.0.1-rc.59ec3a4",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {