@opencrvs/toolkit 1.9.16-rc.c7acc1a → 1.9.16-rc.d141bab

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,9 +14,9 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
14
14
  createdByUserType: "system" | "user";
15
15
  createdAt: string;
16
16
  createdBy: string;
17
- createdByRole: string;
18
17
  declaration: Record<string, import("..").FieldUpdateValue>;
19
18
  assignedTo: string;
19
+ createdByRole?: string | undefined;
20
20
  createdBySignature?: string | null | undefined;
21
21
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
22
22
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -29,8 +29,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
29
29
  createdByUserType: "system" | "user";
30
30
  createdAt: string;
31
31
  createdBy: string;
32
- createdByRole: string;
33
32
  declaration: Record<string, import("..").FieldUpdateValue>;
33
+ createdByRole?: string | undefined;
34
34
  createdBySignature?: string | null | undefined;
35
35
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
36
36
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -43,8 +43,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
43
43
  createdByUserType: "system" | "user";
44
44
  createdAt: string;
45
45
  createdBy: string;
46
- createdByRole: string;
47
46
  declaration: Record<string, import("..").FieldUpdateValue>;
47
+ createdByRole?: string | undefined;
48
48
  createdBySignature?: string | null | undefined;
49
49
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
50
50
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -58,8 +58,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
58
58
  createdByUserType: "system" | "user";
59
59
  createdAt: string;
60
60
  createdBy: string;
61
- createdByRole: string;
62
61
  declaration: Record<string, import("..").FieldUpdateValue>;
62
+ createdByRole?: string | undefined;
63
63
  createdBySignature?: string | null | undefined;
64
64
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
65
65
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -72,8 +72,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
72
72
  createdByUserType: "system" | "user";
73
73
  createdAt: string;
74
74
  createdBy: string;
75
- createdByRole: string;
76
75
  declaration: Record<string, import("..").FieldUpdateValue>;
76
+ createdByRole?: string | undefined;
77
77
  createdBySignature?: string | null | undefined;
78
78
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
79
79
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -89,8 +89,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
89
89
  createdByUserType: "system" | "user";
90
90
  createdAt: string;
91
91
  createdBy: string;
92
- createdByRole: string;
93
92
  declaration: Record<string, import("..").FieldUpdateValue>;
93
+ createdByRole?: string | undefined;
94
94
  createdBySignature?: string | null | undefined;
95
95
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
96
96
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -109,8 +109,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
109
109
  createdByUserType: "system" | "user";
110
110
  createdAt: string;
111
111
  createdBy: string;
112
- createdByRole: string;
113
112
  declaration: Record<string, import("..").FieldUpdateValue>;
113
+ createdByRole?: string | undefined;
114
114
  createdBySignature?: string | null | undefined;
115
115
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
116
116
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -123,8 +123,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
123
123
  createdByUserType: "system" | "user";
124
124
  createdAt: string;
125
125
  createdBy: string;
126
- createdByRole: string;
127
126
  declaration: Record<string, import("..").FieldUpdateValue>;
127
+ createdByRole?: string | undefined;
128
128
  createdBySignature?: string | null | undefined;
129
129
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
130
130
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -137,11 +137,11 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
137
137
  createdByUserType: "system" | "user";
138
138
  createdAt: string;
139
139
  createdBy: string;
140
- createdByRole: string;
141
140
  declaration: Record<string, import("..").FieldUpdateValue>;
142
141
  content?: {
143
142
  duplicateOf: string & import("zod").BRAND<"UUID">;
144
143
  } | undefined;
144
+ createdByRole?: string | undefined;
145
145
  createdBySignature?: string | null | undefined;
146
146
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
147
147
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -157,8 +157,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
157
157
  createdByUserType: "system" | "user";
158
158
  createdAt: string;
159
159
  createdBy: string;
160
- createdByRole: string;
161
160
  declaration: Record<string, import("..").FieldUpdateValue>;
161
+ createdByRole?: string | undefined;
162
162
  createdBySignature?: string | null | undefined;
163
163
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
164
164
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -171,8 +171,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
171
171
  createdByUserType: "system" | "user";
172
172
  createdAt: string;
173
173
  createdBy: string;
174
- createdByRole: string;
175
174
  declaration: Record<string, import("..").FieldUpdateValue>;
175
+ createdByRole?: string | undefined;
176
176
  createdBySignature?: string | null | undefined;
177
177
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
178
178
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -185,8 +185,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
185
185
  createdByUserType: "system" | "user";
186
186
  createdAt: string;
187
187
  createdBy: string;
188
- createdByRole: string;
189
188
  declaration: Record<string, import("..").FieldUpdateValue>;
189
+ createdByRole?: string | undefined;
190
190
  createdBySignature?: string | null | undefined;
191
191
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
192
192
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -199,11 +199,11 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
199
199
  createdByUserType: "system" | "user";
200
200
  createdAt: string;
201
201
  createdBy: string;
202
- createdByRole: string;
203
202
  declaration: Record<string, import("..").FieldUpdateValue>;
204
203
  content?: {
205
204
  templateId?: string | undefined;
206
205
  } | null | undefined;
206
+ createdByRole?: string | undefined;
207
207
  createdBySignature?: string | null | undefined;
208
208
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
209
209
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -216,8 +216,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
216
216
  createdByUserType: "system" | "user";
217
217
  createdAt: string;
218
218
  createdBy: string;
219
- createdByRole: string;
220
219
  declaration: Record<string, import("..").FieldUpdateValue>;
220
+ createdByRole?: string | undefined;
221
221
  createdBySignature?: string | null | undefined;
222
222
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
223
223
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -230,9 +230,9 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
230
230
  createdByUserType: "system" | "user";
231
231
  createdAt: string;
232
232
  createdBy: string;
233
- createdByRole: string;
234
233
  declaration: Record<string, import("..").FieldUpdateValue>;
235
234
  requestId: string;
235
+ createdByRole?: string | undefined;
236
236
  createdBySignature?: string | null | undefined;
237
237
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
238
238
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -248,9 +248,9 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
248
248
  createdByUserType: "system" | "user";
249
249
  createdAt: string;
250
250
  createdBy: string;
251
- createdByRole: string;
252
251
  declaration: Record<string, import("..").FieldUpdateValue>;
253
252
  requestId: string;
253
+ createdByRole?: string | undefined;
254
254
  createdBySignature?: string | null | undefined;
255
255
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
256
256
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -263,8 +263,8 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
263
263
  createdByUserType: "system" | "user";
264
264
  createdAt: string;
265
265
  createdBy: string;
266
- createdByRole: string;
267
266
  declaration: Record<string, import("..").FieldUpdateValue>;
267
+ createdByRole?: string | undefined;
268
268
  createdBySignature?: string | null | undefined;
269
269
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
270
270
  annotation?: Record<string, import("..").FieldUpdateValue> | null | undefined;
@@ -277,7 +277,7 @@ export declare function getActionUpdateMetadata(actions: Action[]): Partial<{
277
277
  createdByUserType: "system" | "user";
278
278
  createdAt: string;
279
279
  createdBy: string;
280
- createdByRole: string;
280
+ createdByRole?: string | undefined;
281
281
  createdBySignature?: string | null | undefined;
282
282
  createdAtLocation?: (string & import("zod").BRAND<"UUID">) | null | undefined;
283
283
  originalActionId?: (string & import("zod").BRAND<"UUID">) | null | undefined;
@@ -293,7 +293,7 @@ export declare function getLegalStatuses(actions: Action[]): {
293
293
  createdByUserType: "system" | "user";
294
294
  createdAtLocation: (string & import("zod").BRAND<"UUID">) | null | undefined;
295
295
  acceptedAt: string;
296
- createdByRole: string;
296
+ createdByRole: string | undefined;
297
297
  createdBySignature: string | null | undefined;
298
298
  registrationNumber: string | null | undefined;
299
299
  } | null;
@@ -303,7 +303,7 @@ export declare function getLegalStatuses(actions: Action[]): {
303
303
  createdByUserType: "system" | "user";
304
304
  createdAtLocation: (string & import("zod").BRAND<"UUID">) | null | undefined;
305
305
  acceptedAt: string;
306
- createdByRole: string;
306
+ createdByRole: string | undefined;
307
307
  createdBySignature: string | null | undefined;
308
308
  registrationNumber: string | null | undefined;
309
309
  } | null;
@@ -1037,7 +1037,9 @@ var SCOPES = {
1037
1037
  // config
1038
1038
  CONFIG_UPDATE_ALL: "config.update:all",
1039
1039
  // data seeding
1040
- USER_DATA_SEEDING: "user.data-seeding"
1040
+ USER_DATA_SEEDING: "user.data-seeding",
1041
+ // bootstrap: allows countryconfig to register integrations on startup
1042
+ INTEGRATION_CREATE: "integration.create"
1041
1043
  };
1042
1044
  var LegacyScopes = import_zod11.z.union([
1043
1045
  import_zod11.z.literal(SCOPES.BYPASSRATELIMIT),
@@ -1112,6 +1114,7 @@ var UserScopes = import_zod11.z.union([
1112
1114
  ]);
1113
1115
  var ConfigScope = import_zod11.z.literal(SCOPES.CONFIG_UPDATE_ALL);
1114
1116
  var DataSeedingScope = import_zod11.z.literal(SCOPES.USER_DATA_SEEDING);
1117
+ var IntegrationCreateScope = import_zod11.z.literal(SCOPES.INTEGRATION_CREATE);
1115
1118
  var LiteralScopes = import_zod11.z.union([
1116
1119
  LegacyScopes,
1117
1120
  IntegrationScopes,
@@ -1129,7 +1132,8 @@ var LiteralScopes = import_zod11.z.union([
1129
1132
  UserScopes,
1130
1133
  ConfigScope,
1131
1134
  DataSeedingScope,
1132
- InternalOperationsScopes
1135
+ InternalOperationsScopes,
1136
+ IntegrationCreateScope
1133
1137
  ]);
1134
1138
  var rawConfigurableScopeRegex = /^([a-zA-Z][a-zA-Z0-9.-]*(?:\.[a-zA-Z0-9.-]+)*)\[((?:\w+=[\w.-]+(?:\|[\w.-]+)*)(?:,[\w]+=[\w.-]+(?:\|[\w.-]+)*)*)\]$/;
1135
1139
  var rawConfigurableScope = import_zod11.z.string().regex(rawConfigurableScopeRegex);
@@ -1414,7 +1418,7 @@ var ActionBase = import_zod13.z.object({
1414
1418
  ),
1415
1419
  createdAt: import_zod13.z.string().datetime().describe("Timestamp indicating when the action was created."),
1416
1420
  createdBy: import_zod13.z.string().describe("Identifier of the user who created the action."),
1417
- createdByRole: import_zod13.z.string().describe("Role of the user who created the action."),
1421
+ createdByRole: import_zod13.z.string().optional().describe("Role of the user who created the action."),
1418
1422
  createdBySignature: import_zod13.z.string().nullish().describe("Reference to the signature of the user who created the action."),
1419
1423
  createdAtLocation: CreatedAtLocation.describe(
1420
1424
  "Reference to the location of the user who created the action."
@@ -1618,7 +1622,7 @@ var ActionCreationMetadata = import_zod14.z.object({
1618
1622
  ),
1619
1623
  createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1620
1624
  acceptedAt: import_zod14.z.string().datetime().describe("Timestamp when the action request was accepted."),
1621
- createdByRole: import_zod14.z.string().describe("Role of the user at the time of action request creation."),
1625
+ createdByRole: import_zod14.z.string().optional().describe("Role of the user at the time of action request creation."),
1622
1626
  createdBySignature: import_zod14.z.string().nullish().describe("Signature of the user who created the action request.")
1623
1627
  });
1624
1628
  var RegistrationCreationMetadata = ActionCreationMetadata.extend({
@@ -1641,7 +1645,7 @@ var EventMetadata = import_zod14.z.object({
1641
1645
  dateOfEvent: ZodDate.nullish(),
1642
1646
  createdBy: import_zod14.z.string().describe("ID of the user who created the event."),
1643
1647
  createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1644
- updatedByUserRole: import_zod14.z.string().describe("Role of the user who last changed the status."),
1648
+ updatedByUserRole: import_zod14.z.string().optional().describe("Role of the user who last changed the status."),
1645
1649
  createdAtLocation: CreatedAtLocation.describe(
1646
1650
  "Location of the user who created the event."
1647
1651
  ),
@@ -671,7 +671,9 @@ var SCOPES = {
671
671
  // config
672
672
  CONFIG_UPDATE_ALL: "config.update:all",
673
673
  // data seeding
674
- USER_DATA_SEEDING: "user.data-seeding"
674
+ USER_DATA_SEEDING: "user.data-seeding",
675
+ // bootstrap: allows countryconfig to register integrations on startup
676
+ INTEGRATION_CREATE: "integration.create"
675
677
  };
676
678
  var LegacyScopes = import_zod11.z.union([
677
679
  import_zod11.z.literal(SCOPES.BYPASSRATELIMIT),
@@ -746,6 +748,7 @@ var UserScopes = import_zod11.z.union([
746
748
  ]);
747
749
  var ConfigScope = import_zod11.z.literal(SCOPES.CONFIG_UPDATE_ALL);
748
750
  var DataSeedingScope = import_zod11.z.literal(SCOPES.USER_DATA_SEEDING);
751
+ var IntegrationCreateScope = import_zod11.z.literal(SCOPES.INTEGRATION_CREATE);
749
752
  var LiteralScopes = import_zod11.z.union([
750
753
  LegacyScopes,
751
754
  IntegrationScopes,
@@ -763,7 +766,8 @@ var LiteralScopes = import_zod11.z.union([
763
766
  UserScopes,
764
767
  ConfigScope,
765
768
  DataSeedingScope,
766
- InternalOperationsScopes
769
+ InternalOperationsScopes,
770
+ IntegrationCreateScope
767
771
  ]);
768
772
  var rawConfigurableScopeRegex = /^([a-zA-Z][a-zA-Z0-9.-]*(?:\.[a-zA-Z0-9.-]+)*)\[((?:\w+=[\w.-]+(?:\|[\w.-]+)*)(?:,[\w]+=[\w.-]+(?:\|[\w.-]+)*)*)\]$/;
769
773
  var rawConfigurableScope = import_zod11.z.string().regex(rawConfigurableScopeRegex);
@@ -994,7 +998,7 @@ var ActionBase = import_zod13.z.object({
994
998
  ),
995
999
  createdAt: import_zod13.z.string().datetime().describe("Timestamp indicating when the action was created."),
996
1000
  createdBy: import_zod13.z.string().describe("Identifier of the user who created the action."),
997
- createdByRole: import_zod13.z.string().describe("Role of the user who created the action."),
1001
+ createdByRole: import_zod13.z.string().optional().describe("Role of the user who created the action."),
998
1002
  createdBySignature: import_zod13.z.string().nullish().describe("Reference to the signature of the user who created the action."),
999
1003
  createdAtLocation: CreatedAtLocation.describe(
1000
1004
  "Reference to the location of the user who created the action."
@@ -1198,7 +1202,7 @@ var ActionCreationMetadata = import_zod14.z.object({
1198
1202
  ),
1199
1203
  createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1200
1204
  acceptedAt: import_zod14.z.string().datetime().describe("Timestamp when the action request was accepted."),
1201
- createdByRole: import_zod14.z.string().describe("Role of the user at the time of action request creation."),
1205
+ createdByRole: import_zod14.z.string().optional().describe("Role of the user at the time of action request creation."),
1202
1206
  createdBySignature: import_zod14.z.string().nullish().describe("Signature of the user who created the action request.")
1203
1207
  });
1204
1208
  var RegistrationCreationMetadata = ActionCreationMetadata.extend({
@@ -1221,7 +1225,7 @@ var EventMetadata = import_zod14.z.object({
1221
1225
  dateOfEvent: ZodDate.nullish(),
1222
1226
  createdBy: import_zod14.z.string().describe("ID of the user who created the event."),
1223
1227
  createdByUserType: import_zod14.z.enum(["user", "system"]).nullish().describe("Whether the user is a normal user or a system."),
1224
- updatedByUserRole: import_zod14.z.string().describe("Role of the user who last changed the status."),
1228
+ updatedByUserRole: import_zod14.z.string().optional().describe("Role of the user who last changed the status."),
1225
1229
  createdAtLocation: CreatedAtLocation.describe(
1226
1230
  "Location of the user who created the event."
1227
1231
  ),
@@ -61,9 +61,10 @@ export declare const SCOPES: {
61
61
  readonly USER_UPDATE_MY_JURISDICTION: "user.update:my-jurisdiction";
62
62
  readonly CONFIG_UPDATE_ALL: "config.update:all";
63
63
  readonly USER_DATA_SEEDING: "user.data-seeding";
64
+ readonly INTEGRATION_CREATE: "integration.create";
64
65
  };
65
66
  export declare const SearchScopes: z.ZodUnion<[z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>;
66
- declare const LiteralScopes: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"register">, z.ZodLiteral<"demo">, z.ZodLiteral<"config">]>, z.ZodUnion<[z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch">]>, z.ZodLiteral<"record.unassign-others">, z.ZodUnion<[z.ZodLiteral<"record.declare-birth">, z.ZodLiteral<"record.declare-birth:my-jurisdiction">, z.ZodLiteral<"record.declare-death">, z.ZodLiteral<"record.declare-death:my-jurisdiction">, z.ZodLiteral<"record.declare-marriage">, z.ZodLiteral<"record.declare-marriage:my-jurisdiction">, z.ZodLiteral<"record.declaration-submit-incomplete">, z.ZodLiteral<"record.declaration-submit-for-review">]>, z.ZodUnion<[z.ZodLiteral<"record.declaration-submit-for-approval">, z.ZodLiteral<"record.declaration-submit-for-updates">, z.ZodLiteral<"record.declaration-edit">, z.ZodLiteral<"record.review-duplicates">, z.ZodLiteral<"record.declaration-archive">, z.ZodLiteral<"record.declaration-reinstate">]>, z.ZodLiteral<"record.register">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodUnion<[z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>, z.ZodUnion<[z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>, z.ZodLiteral<"record.read">, z.ZodLiteral<"profile.electronic-signature">, z.ZodUnion<[z.ZodLiteral<"performance.read">, z.ZodLiteral<"performance.read-dashboards">, z.ZodLiteral<"performance.vital-statistics-export">]>, z.ZodUnion<[z.ZodLiteral<"organisation.read-locations:all">, z.ZodLiteral<"organisation.read-locations:my-office">, z.ZodLiteral<"organisation.read-locations:my-jurisdiction">]>, z.ZodUnion<[z.ZodLiteral<"user.read:all">, z.ZodLiteral<"user.read:my-office">, z.ZodLiteral<"user.read:my-jurisdiction">, z.ZodLiteral<"user.read:only-my-audit">, z.ZodLiteral<"user.create:all">, z.ZodLiteral<"user.create:my-jurisdiction">, z.ZodLiteral<"user.update:all">, z.ZodLiteral<"user.update:my-jurisdiction">]>, z.ZodLiteral<"config.update:all">, z.ZodLiteral<"user.data-seeding">, z.ZodUnion<[z.ZodLiteral<"record.reindex">, z.ZodLiteral<"record.import">]>]>;
67
+ declare const LiteralScopes: z.ZodUnion<[z.ZodUnion<[z.ZodLiteral<"bypassratelimit">, z.ZodLiteral<"register">, z.ZodLiteral<"demo">, z.ZodLiteral<"config">]>, z.ZodUnion<[z.ZodLiteral<"webhook">, z.ZodLiteral<"nationalId">, z.ZodLiteral<"notification-api">, z.ZodLiteral<"recordsearch">]>, z.ZodLiteral<"record.unassign-others">, z.ZodUnion<[z.ZodLiteral<"record.declare-birth">, z.ZodLiteral<"record.declare-birth:my-jurisdiction">, z.ZodLiteral<"record.declare-death">, z.ZodLiteral<"record.declare-death:my-jurisdiction">, z.ZodLiteral<"record.declare-marriage">, z.ZodLiteral<"record.declare-marriage:my-jurisdiction">, z.ZodLiteral<"record.declaration-submit-incomplete">, z.ZodLiteral<"record.declaration-submit-for-review">]>, z.ZodUnion<[z.ZodLiteral<"record.declaration-submit-for-approval">, z.ZodLiteral<"record.declaration-submit-for-updates">, z.ZodLiteral<"record.declaration-edit">, z.ZodLiteral<"record.review-duplicates">, z.ZodLiteral<"record.declaration-archive">, z.ZodLiteral<"record.declaration-reinstate">]>, z.ZodLiteral<"record.register">, z.ZodLiteral<"record.registration-print&issue-certified-copies">, z.ZodUnion<[z.ZodLiteral<"record.registration-request-correction">, z.ZodLiteral<"record.registration-correct">, z.ZodLiteral<"record.confirm-registration">, z.ZodLiteral<"record.reject-registration">]>, z.ZodUnion<[z.ZodLiteral<"search.birth:my-jurisdiction">, z.ZodLiteral<"search.birth">, z.ZodLiteral<"search.death:my-jurisdiction">, z.ZodLiteral<"search.death">, z.ZodLiteral<"search.marriage:my-jurisdiction">, z.ZodLiteral<"search.marriage">]>, z.ZodLiteral<"record.read">, z.ZodLiteral<"profile.electronic-signature">, z.ZodUnion<[z.ZodLiteral<"performance.read">, z.ZodLiteral<"performance.read-dashboards">, z.ZodLiteral<"performance.vital-statistics-export">]>, z.ZodUnion<[z.ZodLiteral<"organisation.read-locations:all">, z.ZodLiteral<"organisation.read-locations:my-office">, z.ZodLiteral<"organisation.read-locations:my-jurisdiction">]>, z.ZodUnion<[z.ZodLiteral<"user.read:all">, z.ZodLiteral<"user.read:my-office">, z.ZodLiteral<"user.read:my-jurisdiction">, z.ZodLiteral<"user.read:only-my-audit">, z.ZodLiteral<"user.create:all">, z.ZodLiteral<"user.create:my-jurisdiction">, z.ZodLiteral<"user.update:all">, z.ZodLiteral<"user.update:my-jurisdiction">]>, z.ZodLiteral<"config.update:all">, z.ZodLiteral<"user.data-seeding">, z.ZodUnion<[z.ZodLiteral<"record.reindex">, z.ZodLiteral<"record.import">]>, z.ZodLiteral<"integration.create">]>;
67
68
  declare const SearchScope: z.ZodObject<{
68
69
  type: z.ZodLiteral<"search">;
69
70
  options: z.ZodObject<{
@@ -354,7 +355,7 @@ export declare function parseConfigurableScope(scope: string): {
354
355
  };
355
356
  } | undefined;
356
357
  export declare function parseLiteralScope(scope: string): {
357
- type: "bypassratelimit" | "register" | "demo" | "config" | "webhook" | "nationalId" | "notification-api" | "recordsearch" | "record.import" | "record.reindex" | "record.declare-birth" | "record.declare-birth:my-jurisdiction" | "record.declare-death" | "record.declare-death:my-jurisdiction" | "record.declare-marriage" | "record.declare-marriage:my-jurisdiction" | "record.declaration-submit-incomplete" | "record.declaration-submit-for-review" | "record.unassign-others" | "record.declaration-submit-for-approval" | "record.declaration-submit-for-updates" | "record.declaration-edit" | "record.review-duplicates" | "record.declaration-archive" | "record.declaration-reinstate" | "record.register" | "record.registration-print&issue-certified-copies" | "record.registration-request-correction" | "record.registration-correct" | "record.confirm-registration" | "record.reject-registration" | "search.birth:my-jurisdiction" | "search.birth" | "search.death:my-jurisdiction" | "search.death" | "search.marriage:my-jurisdiction" | "search.marriage" | "record.read" | "profile.electronic-signature" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "organisation.read-locations:all" | "organisation.read-locations:my-office" | "organisation.read-locations:my-jurisdiction" | "user.read:all" | "user.read:my-office" | "user.read:my-jurisdiction" | "user.read:only-my-audit" | "user.create:all" | "user.create:my-jurisdiction" | "user.update:all" | "user.update:my-jurisdiction" | "config.update:all" | "user.data-seeding";
358
+ type: "bypassratelimit" | "register" | "demo" | "config" | "webhook" | "nationalId" | "notification-api" | "recordsearch" | "record.import" | "record.reindex" | "record.declare-birth" | "record.declare-birth:my-jurisdiction" | "record.declare-death" | "record.declare-death:my-jurisdiction" | "record.declare-marriage" | "record.declare-marriage:my-jurisdiction" | "record.declaration-submit-incomplete" | "record.declaration-submit-for-review" | "record.unassign-others" | "record.declaration-submit-for-approval" | "record.declaration-submit-for-updates" | "record.declaration-edit" | "record.review-duplicates" | "record.declaration-archive" | "record.declaration-reinstate" | "record.register" | "record.registration-print&issue-certified-copies" | "record.registration-request-correction" | "record.registration-correct" | "record.confirm-registration" | "record.reject-registration" | "search.birth:my-jurisdiction" | "search.birth" | "search.death:my-jurisdiction" | "search.death" | "search.marriage:my-jurisdiction" | "search.marriage" | "record.read" | "profile.electronic-signature" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "organisation.read-locations:all" | "organisation.read-locations:my-office" | "organisation.read-locations:my-jurisdiction" | "user.read:all" | "user.read:my-office" | "user.read:my-jurisdiction" | "user.read:only-my-audit" | "user.create:all" | "user.create:my-jurisdiction" | "user.update:all" | "user.update:my-jurisdiction" | "config.update:all" | "user.data-seeding" | "integration.create";
358
359
  } | undefined;
359
360
  /**
360
361
  * Stringifies a ConfigurableScopes object into a scope string.
@@ -112,7 +112,9 @@ var SCOPES = {
112
112
  // config
113
113
  CONFIG_UPDATE_ALL: "config.update:all",
114
114
  // data seeding
115
- USER_DATA_SEEDING: "user.data-seeding"
115
+ USER_DATA_SEEDING: "user.data-seeding",
116
+ // bootstrap: allows countryconfig to register integrations on startup
117
+ INTEGRATION_CREATE: "integration.create"
116
118
  };
117
119
  var LegacyScopes = import_zod.z.union([
118
120
  import_zod.z.literal(SCOPES.BYPASSRATELIMIT),
@@ -187,6 +189,7 @@ var UserScopes = import_zod.z.union([
187
189
  ]);
188
190
  var ConfigScope = import_zod.z.literal(SCOPES.CONFIG_UPDATE_ALL);
189
191
  var DataSeedingScope = import_zod.z.literal(SCOPES.USER_DATA_SEEDING);
192
+ var IntegrationCreateScope = import_zod.z.literal(SCOPES.INTEGRATION_CREATE);
190
193
  var LiteralScopes = import_zod.z.union([
191
194
  LegacyScopes,
192
195
  IntegrationScopes,
@@ -204,7 +207,8 @@ var LiteralScopes = import_zod.z.union([
204
207
  UserScopes,
205
208
  ConfigScope,
206
209
  DataSeedingScope,
207
- InternalOperationsScopes
210
+ InternalOperationsScopes,
211
+ IntegrationCreateScope
208
212
  ]);
209
213
  var rawConfigurableScopeRegex = /^([a-zA-Z][a-zA-Z0-9.-]*(?:\.[a-zA-Z0-9.-]+)*)\[((?:\w+=[\w.-]+(?:\|[\w.-]+)*)(?:,[\w]+=[\w.-]+(?:\|[\w.-]+)*)*)\]$/;
210
214
  var rawConfigurableScope = import_zod.z.string().regex(rawConfigurableScopeRegex);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "1.9.16-rc.c7acc1a",
3
+ "version": "1.9.16-rc.d141bab",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "exports": {