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

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.
@@ -14,6 +14,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
14
14
  }>;
15
15
  createdAt: z.ZodString;
16
16
  createdBy: z.ZodString;
17
+ updatedByUserRole: z.ZodString;
17
18
  createdAtLocation: z.ZodString;
18
19
  updatedAtLocation: z.ZodString;
19
20
  modifiedAt: z.ZodString;
@@ -33,6 +34,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
33
34
  createdAtLocation: string;
34
35
  updatedAtLocation: string;
35
36
  trackingId: string;
37
+ updatedByUserRole: string;
36
38
  modifiedAt: string;
37
39
  updatedBy: string;
38
40
  assignedTo?: string | null | undefined;
@@ -47,6 +49,7 @@ export declare const EventIndex: z.ZodObject<z.objectUtil.extendShape<{
47
49
  createdAtLocation: string;
48
50
  updatedAtLocation: string;
49
51
  trackingId: string;
52
+ updatedByUserRole: string;
50
53
  modifiedAt: string;
51
54
  updatedBy: string;
52
55
  assignedTo?: string | null | undefined;
@@ -45,6 +45,7 @@ export declare const EventMetadata: z.ZodObject<{
45
45
  }>;
46
46
  createdAt: z.ZodString;
47
47
  createdBy: z.ZodString;
48
+ updatedByUserRole: z.ZodString;
48
49
  createdAtLocation: z.ZodString;
49
50
  updatedAtLocation: z.ZodString;
50
51
  modifiedAt: z.ZodString;
@@ -61,6 +62,7 @@ export declare const EventMetadata: z.ZodObject<{
61
62
  createdAtLocation: string;
62
63
  updatedAtLocation: string;
63
64
  trackingId: string;
65
+ updatedByUserRole: string;
64
66
  modifiedAt: string;
65
67
  updatedBy: string;
66
68
  assignedTo?: string | null | undefined;
@@ -74,6 +76,7 @@ export declare const EventMetadata: z.ZodObject<{
74
76
  createdAtLocation: string;
75
77
  updatedAtLocation: string;
76
78
  trackingId: string;
79
+ updatedByUserRole: string;
77
80
  modifiedAt: string;
78
81
  updatedBy: string;
79
82
  assignedTo?: string | null | undefined;
@@ -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
@@ -252,12 +252,6 @@ export declare const defineConfig: (config: EventConfigInput) => {
252
252
  emptyValueMessage?: import("./TranslationConfig").TranslationConfig | undefined;
253
253
  })[];
254
254
  };
255
- workqueues: {
256
- id: string;
257
- filters: {
258
- status: ("ARCHIVED" | "CERTIFIED" | "DECLARED" | "REGISTERED" | "REJECTED" | "VALIDATED" | "CREATED" | "NOTIFIED")[];
259
- }[];
260
- }[];
261
255
  deduplication: {
262
256
  id: string;
263
257
  label: import("./TranslationConfig").TranslationConfig;
@@ -1,7 +1,6 @@
1
1
  import { ActionType, DeclarationActionType } from './ActionType';
2
2
  import { EventConfig } from './EventConfig';
3
3
  import { FieldConfig } from './FieldConfig';
4
- import { WorkqueueConfig } from './WorkqueueConfig';
5
4
  import { Action, ActionUpdate, EventState } from './ActionDocument';
6
5
  import { PageConfig, VerificationPageConfig } from './PageConfig';
7
6
  import { Draft } from './Draft';
@@ -41,7 +40,6 @@ export declare function getActionReview(configuration: EventConfig, actionType:
41
40
  fields: import("./FieldConfig").Inferred[];
42
41
  };
43
42
  export declare function getActionReviewFields(configuration: EventConfig, actionType: DeclarationActionType): import("./FieldConfig").Inferred[];
44
- export declare function validateWorkqueueConfig(workqueueConfigs: WorkqueueConfig[]): void;
45
43
  export declare function isPageVisible(page: PageConfig, formValues: ActionUpdate): boolean;
46
44
  export declare function omitHiddenFields(fields: FieldConfig[], values: EventState): import("lodash").Dictionary<string | number | boolean | {
47
45
  type: string;
@@ -121,14 +119,16 @@ export declare function omitHiddenPaginatedFields(formConfig: FormConfig, declar
121
119
  }[] | undefined>;
122
120
  export declare function findActiveDrafts(event: EventDocument, drafts: Draft[]): {
123
121
  id: string;
122
+ transactionId: string;
124
123
  createdAt: string;
125
124
  eventId: string;
126
- transactionId: string;
127
125
  action: {
128
126
  type: "DECLARE" | "REGISTER" | "VALIDATE" | "DELETE" | "CREATE" | "NOTIFY" | "DETECT_DUPLICATE" | "REJECT" | "MARKED_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "REJECT_CORRECTION" | "APPROVE_CORRECTION" | "READ" | "ASSIGN" | "UNASSIGN";
129
127
  status: "Rejected" | "Requested" | "Accepted";
128
+ transactionId: string;
130
129
  createdAt: string;
131
130
  createdBy: string;
131
+ createdByRole: string;
132
132
  declaration: Record<string, string | number | boolean | {
133
133
  type: string;
134
134
  filename: string;