@opencrvs/toolkit 1.8.0-rc.fbb7263 → 1.8.0-rc.fd16d13

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.
@@ -7,6 +7,8 @@ import { FieldConfig } from './FieldConfig';
7
7
  import { WorkqueueConfig } from './WorkqueueConfig';
8
8
  import { EventState } from './ActionDocument';
9
9
  import { FormConfig } from './FormConfig';
10
+ import { Draft } from './Draft';
11
+ import { EventDocument } from './EventDocument';
10
12
  /**
11
13
  * @returns All the fields in the event configuration input.
12
14
  */
@@ -75,6 +77,11 @@ export declare const findActiveActionFormFields: (configuration: EventConfig, ac
75
77
  * Returns all fields for the action type, including review fields, if any.
76
78
  */
77
79
  export declare const findActiveActionFields: (configuration: EventConfig, action: ActionType) => FieldConfig[] | undefined;
80
+ export declare const getActiveActionFormPages: (configuration: EventConfig, action: ActionType) => {
81
+ id: string;
82
+ title: TranslationConfig;
83
+ fields: import("./FieldConfig").Inferred[];
84
+ }[];
78
85
  /**
79
86
  * Returns all fields for the action type, including review fields, or throws
80
87
  */
@@ -100,10 +107,115 @@ export declare function stripHiddenFields(fields: FieldConfig[], data: EventStat
100
107
  province: string;
101
108
  urbanOrRural: "RURAL";
102
109
  village?: string | undefined;
110
+ } | {
111
+ country: string;
112
+ state: string;
113
+ district2: string;
114
+ cityOrTown?: string | undefined;
115
+ addressLine1?: string | undefined;
116
+ addressLine2?: string | undefined;
117
+ addressLine3?: string | undefined;
118
+ postcodeOrZip?: string | undefined;
103
119
  } | {
104
120
  type: string;
105
121
  option: string;
106
122
  filename: string;
107
123
  originalFilename: string;
108
124
  }[]>;
125
+ export declare function findActiveDrafts(event: EventDocument, drafts: Draft[]): {
126
+ id: string;
127
+ createdAt: string;
128
+ eventId: string;
129
+ transactionId: string;
130
+ action: {
131
+ type: ActionType;
132
+ data: Record<string, string | number | boolean | {
133
+ type: string;
134
+ filename: string;
135
+ originalFilename: string;
136
+ } | {
137
+ country: string;
138
+ district: string;
139
+ province: string;
140
+ urbanOrRural: "URBAN";
141
+ number?: string | null | undefined;
142
+ town?: string | null | undefined;
143
+ residentialArea?: string | null | undefined;
144
+ street?: string | null | undefined;
145
+ zipCode?: string | null | undefined;
146
+ } | {
147
+ country: string;
148
+ district: string;
149
+ province: string;
150
+ urbanOrRural: "RURAL";
151
+ village?: string | null | undefined;
152
+ } | {
153
+ country: string;
154
+ state: string;
155
+ district2: string;
156
+ cityOrTown?: string | null | undefined;
157
+ addressLine1?: string | null | undefined;
158
+ addressLine2?: string | null | undefined;
159
+ addressLine3?: string | null | undefined;
160
+ postcodeOrZip?: string | null | undefined;
161
+ } | {
162
+ type: string;
163
+ option: string;
164
+ filename: string;
165
+ originalFilename: string;
166
+ }[]>;
167
+ createdAt: string;
168
+ createdBy: string;
169
+ createdAtLocation: string;
170
+ metadata?: Record<string, string | number | boolean | {
171
+ type: string;
172
+ filename: string;
173
+ originalFilename: string;
174
+ } | {
175
+ country: string;
176
+ district: string;
177
+ province: string;
178
+ urbanOrRural: "URBAN";
179
+ number?: string | null | undefined;
180
+ town?: string | null | undefined;
181
+ residentialArea?: string | null | undefined;
182
+ street?: string | null | undefined;
183
+ zipCode?: string | null | undefined;
184
+ } | {
185
+ country: string;
186
+ district: string;
187
+ province: string;
188
+ urbanOrRural: "RURAL";
189
+ village?: string | null | undefined;
190
+ } | {
191
+ country: string;
192
+ state: string;
193
+ district2: string;
194
+ cityOrTown?: string | null | undefined;
195
+ addressLine1?: string | null | undefined;
196
+ addressLine2?: string | null | undefined;
197
+ addressLine3?: string | null | undefined;
198
+ postcodeOrZip?: string | null | undefined;
199
+ } | {
200
+ type: string;
201
+ option: string;
202
+ filename: string;
203
+ originalFilename: string;
204
+ }[]> | undefined;
205
+ };
206
+ }[];
207
+ export declare function createEmptyDraft(eventId: string, draftId: string, actionType: ActionType): {
208
+ id: string;
209
+ eventId: string;
210
+ createdAt: string;
211
+ transactionId: import("../uuid").UUID;
212
+ action: {
213
+ type: ActionType;
214
+ data: {};
215
+ metadata: {};
216
+ createdAt: string;
217
+ createdBy: string;
218
+ createdAtLocation: string;
219
+ };
220
+ };
109
221
  //# sourceMappingURL=utils.d.ts.map