@opencrvs/toolkit 1.8.0-rc.f872339 → 1.8.0-rc.f881988

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 (29) hide show
  1. package/dist/commons/api/router.d.ts +7266 -4144
  2. package/dist/commons/conditionals/conditionals.d.ts +9 -6
  3. package/dist/commons/events/ActionConfig.d.ts +86380 -1682
  4. package/dist/commons/events/ActionDocument.d.ts +418 -107
  5. package/dist/commons/events/ActionInput.d.ts +68 -60
  6. package/dist/commons/events/AdvancedSearchConfig.d.ts +371 -25
  7. package/dist/commons/events/Draft.d.ts +24 -9
  8. package/dist/commons/events/EventConfig.d.ts +40980 -1394
  9. package/dist/commons/events/EventDocument.d.ts +331 -82
  10. package/dist/commons/events/EventIndex.d.ts +912 -4
  11. package/dist/commons/events/EventInput.d.ts +13 -0
  12. package/dist/commons/events/EventMetadata.d.ts +10 -3
  13. package/dist/commons/events/FieldConfig.d.ts +3415 -711
  14. package/dist/commons/events/FieldType.d.ts +1 -2
  15. package/dist/commons/events/FieldValue.d.ts +1 -1
  16. package/dist/commons/events/FormConfig.d.ts +38845 -517
  17. package/dist/commons/events/PageConfig.d.ts +9671 -203
  18. package/dist/commons/events/SummaryConfig.d.ts +0 -47
  19. package/dist/commons/events/WorkqueueConfig.d.ts +44 -20
  20. package/dist/commons/events/defineConfig.d.ts +6669 -30
  21. package/dist/commons/events/event.d.ts +25 -0
  22. package/dist/commons/events/field.d.ts +68 -0
  23. package/dist/commons/events/index.d.ts +2 -0
  24. package/dist/commons/events/scopes.d.ts +1 -0
  25. package/dist/commons/events/test.utils.d.ts +1 -38
  26. package/dist/commons/events/utils.d.ts +3401 -90
  27. package/dist/conditionals/index.js +36 -33
  28. package/dist/events/index.js +707 -577
  29. package/package.json +3 -2
@@ -1,35 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { TranslationConfig } from './TranslationConfig';
3
3
  export declare const SummaryConfig: z.ZodObject<{
4
- title: z.ZodObject<{
5
- id: z.ZodString;
6
- label: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
7
- id: string;
8
- description: string;
9
- defaultMessage: string;
10
- }>;
11
- emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
12
- id: string;
13
- description: string;
14
- defaultMessage: string;
15
- }>>;
16
- }, "strip", z.ZodTypeAny, {
17
- id: string;
18
- label: TranslationConfig;
19
- emptyValueMessage?: TranslationConfig | undefined;
20
- }, {
21
- id: string;
22
- label: {
23
- id: string;
24
- description: string;
25
- defaultMessage: string;
26
- };
27
- emptyValueMessage?: {
28
- id: string;
29
- description: string;
30
- defaultMessage: string;
31
- } | undefined;
32
- }>;
33
4
  fields: z.ZodArray<z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
34
5
  emptyValueMessage: z.ZodOptional<z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
35
6
  id: string;
@@ -131,11 +102,6 @@ export declare const SummaryConfig: z.ZodObject<{
131
102
  } | undefined;
132
103
  }>]>, "many">;
133
104
  }, "strip", z.ZodTypeAny, {
134
- title: {
135
- id: string;
136
- label: TranslationConfig;
137
- emptyValueMessage?: TranslationConfig | undefined;
138
- };
139
105
  fields: ({
140
106
  fieldId: string;
141
107
  conditionals?: {
@@ -154,19 +120,6 @@ export declare const SummaryConfig: z.ZodObject<{
154
120
  emptyValueMessage?: TranslationConfig | undefined;
155
121
  })[];
156
122
  }, {
157
- title: {
158
- id: string;
159
- label: {
160
- id: string;
161
- description: string;
162
- defaultMessage: string;
163
- };
164
- emptyValueMessage?: {
165
- id: string;
166
- description: string;
167
- defaultMessage: string;
168
- } | undefined;
169
- };
170
123
  fields: ({
171
124
  fieldId: string;
172
125
  conditionals?: {
@@ -1,36 +1,60 @@
1
1
  import { z } from 'zod';
2
+ import { TranslationConfig } from './TranslationConfig';
2
3
  /**
3
4
  * Configuration for workqueue. Workqueues are used to display a list of events.
4
5
  */
5
6
  export declare const WorkqueueConfig: z.ZodObject<{
6
- id: z.ZodString;
7
- filters: z.ZodArray<z.ZodObject<{
8
- status: z.ZodArray<z.ZodNativeEnum<{
9
- readonly CREATED: "CREATED";
10
- readonly NOTIFIED: "NOTIFIED";
11
- readonly DECLARED: "DECLARED";
12
- readonly VALIDATED: "VALIDATED";
13
- readonly REGISTERED: "REGISTERED";
14
- readonly CERTIFIED: "CERTIFIED";
15
- readonly REJECTED: "REJECTED";
16
- readonly ARCHIVED: "ARCHIVED";
17
- }>, "many">;
7
+ slug: z.ZodString;
8
+ name: z.ZodObject<import("./TranslationConfig").MessageDescriptorZod, "strip", z.ZodTypeAny, TranslationConfig, {
9
+ id: string;
10
+ description: string;
11
+ defaultMessage: string;
12
+ }>;
13
+ /**
14
+ * Placeholder untill the following gets merged to develop
15
+ * https://github.com/opencrvs/opencrvs-core/blob/5fbe9854a88504a7a13fcc856b3e82594b70c38c/packages/commons/src/events/EventIndex.ts#L92-L93
16
+ */
17
+ query: z.ZodString;
18
+ actions: z.ZodArray<z.ZodObject<{
19
+ type: z.ZodString;
20
+ conditionals: z.ZodOptional<z.ZodArray<z.ZodType<import(".").JSONSchema, z.ZodTypeDef, import(".").JSONSchema>, "many">>;
18
21
  }, "strip", z.ZodTypeAny, {
19
- status: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
22
+ type: string;
23
+ conditionals?: import(".").JSONSchema[] | undefined;
20
24
  }, {
21
- status: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
25
+ type: string;
26
+ conditionals?: import(".").JSONSchema[] | undefined;
22
27
  }>, "many">;
23
28
  }, "strip", z.ZodTypeAny, {
24
- id: string;
25
- filters: {
26
- status: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
29
+ name: TranslationConfig;
30
+ actions: {
31
+ type: string;
32
+ conditionals?: import(".").JSONSchema[] | undefined;
27
33
  }[];
34
+ query: string;
35
+ slug: string;
28
36
  }, {
29
- id: string;
30
- filters: {
31
- status: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
37
+ name: {
38
+ id: string;
39
+ description: string;
40
+ defaultMessage: string;
41
+ };
42
+ actions: {
43
+ type: string;
44
+ conditionals?: import(".").JSONSchema[] | undefined;
32
45
  }[];
46
+ query: string;
47
+ slug: string;
33
48
  }>;
34
49
  export type WorkqueueConfig = z.infer<typeof WorkqueueConfig>;
35
50
  export type WorkqueueConfigInput = z.input<typeof WorkqueueConfig>;
51
+ export declare function defineWorkqueue(workqueues: WorkqueueConfigInput[]): {
52
+ name: TranslationConfig;
53
+ actions: {
54
+ type: string;
55
+ conditionals?: import(".").JSONSchema[] | undefined;
56
+ }[];
57
+ query: string;
58
+ slug: string;
59
+ }[];
36
60
  //# sourceMappingURL=WorkqueueConfig.d.ts.map