@opencrvs/toolkit 2.1.0 → 2.2.0-rc.9042a13
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.
- package/build.sh +2 -2
- package/create-countryconfig/package.json +1 -1
- package/dist/application-config/index.js +29 -2
- package/dist/authentication/index.js +14 -1
- package/dist/cli.js +294 -1967
- package/dist/commons/api/router.d.ts +1370 -73
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/ActionConfig.d.ts +133 -0
- package/dist/commons/events/ActionDocument.d.ts +88 -0
- package/dist/commons/events/ActionInput.d.ts +52 -0
- package/dist/commons/events/ActionType.d.ts +11 -1
- package/dist/commons/events/AdvancedSearchConfig.d.ts +12 -0
- package/dist/commons/events/AuditLog.d.ts +4 -0
- package/dist/commons/events/CountryConfigQueryInput.d.ts +132 -0
- package/dist/commons/events/Draft.d.ts +2 -0
- package/dist/commons/events/EventConfig.d.ts +26 -6
- package/dist/commons/events/EventDocument.d.ts +88 -0
- package/dist/commons/events/EventIndex.d.ts +20 -0
- package/dist/commons/events/EventMetadata.d.ts +23 -0
- package/dist/commons/events/EventStatus.d.ts +1 -0
- package/dist/commons/events/FieldConfig.d.ts +10 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +154 -10
- package/dist/commons/events/eventConfigValidation.d.ts +17 -1
- package/dist/commons/events/scopes.d.ts +2 -0
- package/dist/commons/events/state/index.d.ts +10 -2
- package/dist/commons/events/state/utils.d.ts +11 -1
- package/dist/commons/events/test.utils.d.ts +28 -1
- package/dist/commons/events/utils.d.ts +43 -15
- package/dist/conditionals/index.js +14 -1
- package/dist/environment/derived-variables.d.ts +18 -0
- package/dist/environment/derived-variables.d.ts.map +1 -1
- package/dist/environment/derived-variables.js +22 -1
- package/dist/environment/setup-environment.d.ts.map +1 -1
- package/dist/environment/setup-environment.js +29 -10
- package/dist/events/index.js +293 -66
- package/dist/migrations/add-translations.d.ts +15 -0
- package/dist/migrations/add-translations.d.ts.map +1 -0
- package/dist/migrations/{v2.1/add-translations.js → add-translations.js} +16 -14
- package/dist/migrations/v2.1/index.js +35 -2155
- package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts +3 -0
- package/dist/migrations/v2.1/migrate-infrastructure-to-assets.d.ts.map +1 -1
- package/dist/migrations/v2.1/upgrade-tilt.d.ts +3 -0
- package/dist/migrations/v2.1/upgrade-tilt.d.ts.map +1 -1
- package/dist/migrations/v2.2/index.d.ts +6 -0
- package/dist/migrations/v2.2/index.d.ts.map +1 -0
- package/dist/migrations/v2.2/index.js +456 -0
- package/dist/migrations/v2.2/read-declaration-through-helper.d.ts +39 -0
- package/dist/migrations/v2.2/read-declaration-through-helper.d.ts.map +1 -0
- package/dist/migrations/v2.2/read-declaration-through-helper.js +257 -0
- package/dist/notification/index.js +271 -86
- package/dist/scopes/index.d.ts +29 -6
- package/dist/scopes/index.js +14 -1
- package/dist/templates/charts-values/traefik/values.yaml +2 -3
- package/opencrvs-toolkit-2.2.0-rc.9042a13.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/migrations/v2.1/add-translations.d.ts +0 -9
- package/dist/migrations/v2.1/add-translations.d.ts.map +0 -1
- package/opencrvs-toolkit-2.1.0.tgz +0 -0
package/dist/events/index.js
CHANGED
|
@@ -203,10 +203,12 @@ __export(events_exports, {
|
|
|
203
203
|
RegisterAction: () => RegisterAction,
|
|
204
204
|
RegisterActionInput: () => RegisterActionInput,
|
|
205
205
|
RegistrationCreationMetadata: () => RegistrationCreationMetadata,
|
|
206
|
+
ReinstateRegistrationActionInput: () => ReinstateRegistrationActionInput,
|
|
206
207
|
RejectCorrectionActionInput: () => RejectCorrectionActionInput,
|
|
207
208
|
RejectDeclarationActionInput: () => RejectDeclarationActionInput,
|
|
208
209
|
RejectedCorrectionAction: () => RejectedCorrectionAction,
|
|
209
210
|
RequestCorrectionActionInput: () => RequestCorrectionActionInput,
|
|
211
|
+
RevokeRegistrationActionInput: () => RevokeRegistrationActionInput,
|
|
210
212
|
SearchQuery: () => SearchQuery,
|
|
211
213
|
SearchQueryParams: () => SearchQueryParams,
|
|
212
214
|
SeededLocationVersions: () => SeededLocationVersions,
|
|
@@ -482,6 +484,7 @@ __export(events_exports, {
|
|
|
482
484
|
validateFieldInput: () => validateFieldInput,
|
|
483
485
|
validateValue: () => validateValue,
|
|
484
486
|
window: () => window2,
|
|
487
|
+
withDeclaration: () => withDeclaration,
|
|
485
488
|
writeActions: () => writeActions
|
|
486
489
|
});
|
|
487
490
|
module.exports = __toCommonJS(events_exports);
|
|
@@ -529,6 +532,8 @@ var ActionType = {
|
|
|
529
532
|
REQUEST_CORRECTION: "REQUEST_CORRECTION",
|
|
530
533
|
REJECT_CORRECTION: "REJECT_CORRECTION",
|
|
531
534
|
APPROVE_CORRECTION: "APPROVE_CORRECTION",
|
|
535
|
+
REVOKE_REGISTRATION: "REVOKE_REGISTRATION",
|
|
536
|
+
REINSTATE_REGISTRATION: "REINSTATE_REGISTRATION",
|
|
532
537
|
// General actions
|
|
533
538
|
READ: "READ",
|
|
534
539
|
ASSIGN: "ASSIGN",
|
|
@@ -548,6 +553,8 @@ var ConfirmableActions = [
|
|
|
548
553
|
ActionType.REQUEST_CORRECTION,
|
|
549
554
|
ActionType.APPROVE_CORRECTION,
|
|
550
555
|
ActionType.REJECT_CORRECTION,
|
|
556
|
+
ActionType.REVOKE_REGISTRATION,
|
|
557
|
+
ActionType.REINSTATE_REGISTRATION,
|
|
551
558
|
ActionType.CUSTOM
|
|
552
559
|
];
|
|
553
560
|
var ActionTypes = z2.enum([
|
|
@@ -567,6 +574,8 @@ var ActionTypes = z2.enum([
|
|
|
567
574
|
"REQUEST_CORRECTION",
|
|
568
575
|
"REJECT_CORRECTION",
|
|
569
576
|
"APPROVE_CORRECTION",
|
|
577
|
+
"REVOKE_REGISTRATION",
|
|
578
|
+
"REINSTATE_REGISTRATION",
|
|
570
579
|
"READ",
|
|
571
580
|
"ASSIGN",
|
|
572
581
|
"UNASSIGN",
|
|
@@ -608,7 +617,9 @@ var WorkqueueActionType = ActionTypes.extract([
|
|
|
608
617
|
ActionType.ARCHIVE,
|
|
609
618
|
ActionType.UNARCHIVE,
|
|
610
619
|
ActionType.PRINT_CERTIFICATE,
|
|
611
|
-
ActionType.REQUEST_CORRECTION
|
|
620
|
+
ActionType.REQUEST_CORRECTION,
|
|
621
|
+
ActionType.REVOKE_REGISTRATION,
|
|
622
|
+
ActionType.REINSTATE_REGISTRATION
|
|
612
623
|
]);
|
|
613
624
|
var META_ACTIONS = [
|
|
614
625
|
ActionType.ASSIGN,
|
|
@@ -763,6 +774,7 @@ var EventStatus = z6.enum([
|
|
|
763
774
|
"NOTIFIED",
|
|
764
775
|
"DECLARED",
|
|
765
776
|
"REGISTERED",
|
|
777
|
+
"REVOKED",
|
|
766
778
|
"ARCHIVED"
|
|
767
779
|
]);
|
|
768
780
|
|
|
@@ -786,6 +798,8 @@ var RecordScopeTypeV2 = z7.enum([
|
|
|
786
798
|
"record.print-certified-copies",
|
|
787
799
|
"record.request-correction",
|
|
788
800
|
"record.correct",
|
|
801
|
+
"record.revoke-registration",
|
|
802
|
+
"record.reinstate-registration",
|
|
789
803
|
"record.unassign-others",
|
|
790
804
|
"record.custom-action",
|
|
791
805
|
"record.action.accept",
|
|
@@ -912,6 +926,8 @@ var ScopesWithFullOptions = RecordScopeTypeV2.extract([
|
|
|
912
926
|
"record.read",
|
|
913
927
|
"record.request-correction",
|
|
914
928
|
"record.correct",
|
|
929
|
+
"record.revoke-registration",
|
|
930
|
+
"record.reinstate-registration",
|
|
915
931
|
"record.unassign-others",
|
|
916
932
|
"record.review-duplicates"
|
|
917
933
|
]);
|
|
@@ -1156,6 +1172,8 @@ var EventActionEntrySchema = AuditLogEntryBase.extend({
|
|
|
1156
1172
|
"event.actions.correction.request.request",
|
|
1157
1173
|
"event.actions.correction.approve.request",
|
|
1158
1174
|
"event.actions.correction.reject.request",
|
|
1175
|
+
"event.actions.revoke_registration.request",
|
|
1176
|
+
"event.actions.reinstate_registration.request",
|
|
1159
1177
|
"event.actions.mark_as_duplicate.request",
|
|
1160
1178
|
"event.actions.mark_as_not_duplicate.request"
|
|
1161
1179
|
]),
|
|
@@ -1910,6 +1928,16 @@ var UnarchiveAction = ActionBase.extend(
|
|
|
1910
1928
|
type: z16.literal(ActionType.UNARCHIVE)
|
|
1911
1929
|
}).shape
|
|
1912
1930
|
);
|
|
1931
|
+
var RevokeRegistrationAction = ActionBase.extend(
|
|
1932
|
+
z16.object({
|
|
1933
|
+
type: z16.literal(ActionType.REVOKE_REGISTRATION)
|
|
1934
|
+
}).shape
|
|
1935
|
+
);
|
|
1936
|
+
var ReinstateRegistrationAction = ActionBase.extend(
|
|
1937
|
+
z16.object({
|
|
1938
|
+
type: z16.literal(ActionType.REINSTATE_REGISTRATION)
|
|
1939
|
+
}).shape
|
|
1940
|
+
);
|
|
1913
1941
|
var CreatedAction = ActionBase.extend(
|
|
1914
1942
|
z16.object({
|
|
1915
1943
|
type: z16.literal(ActionType.CREATE)
|
|
@@ -1978,6 +2006,8 @@ var ActionDocument = z16.discriminatedUnion("type", [
|
|
|
1978
2006
|
MarkAsDuplicateAction.meta({ id: "MarkAsDuplicateAction" }),
|
|
1979
2007
|
ArchiveAction.meta({ id: "ArchiveAction" }),
|
|
1980
2008
|
UnarchiveAction.meta({ id: "UnarchiveAction" }),
|
|
2009
|
+
RevokeRegistrationAction.meta({ id: "RevokeRegistrationAction" }),
|
|
2010
|
+
ReinstateRegistrationAction.meta({ id: "ReinstateRegistrationAction" }),
|
|
1981
2011
|
NotifiedAction.meta({ id: "NotifiedAction" }),
|
|
1982
2012
|
RegisterAction.meta({ id: "RegisterAction" }),
|
|
1983
2013
|
DeclareAction.meta({ id: "DeclareAction" }),
|
|
@@ -2026,7 +2056,8 @@ var RegistrationCreationMetadata = ActionCreationMetadata.extend({
|
|
|
2026
2056
|
var LegalStatuses = z17.object({
|
|
2027
2057
|
[EventStatus.enum.NOTIFIED]: ActionCreationMetadata.nullish(),
|
|
2028
2058
|
[EventStatus.enum.DECLARED]: ActionCreationMetadata.nullish(),
|
|
2029
|
-
[EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish()
|
|
2059
|
+
[EventStatus.enum.REGISTERED]: RegistrationCreationMetadata.nullish(),
|
|
2060
|
+
[EventStatus.enum.REVOKED]: ActionCreationMetadata.nullish()
|
|
2030
2061
|
});
|
|
2031
2062
|
var EventMetadata = z17.object({
|
|
2032
2063
|
id: UUID,
|
|
@@ -2277,6 +2308,7 @@ var QueryExpression = import_v4.z.object({
|
|
|
2277
2308
|
"legalStatuses.REGISTERED.createdAtLocation": import_v4.z.optional(Within).nullable(),
|
|
2278
2309
|
"legalStatuses.REGISTERED.createdByRole": import_v4.z.optional(AnyOf),
|
|
2279
2310
|
"legalStatuses.REGISTERED.registrationNumber": import_v4.z.optional(Exact),
|
|
2311
|
+
"legalStatuses.REVOKED.createdAtLocation": import_v4.z.optional(Within).nullable(),
|
|
2280
2312
|
createdAtLocation: import_v4.z.optional(import_v4.z.union([Within, Exact])),
|
|
2281
2313
|
updatedAtLocation: import_v4.z.optional(import_v4.z.union([Within, Exact])),
|
|
2282
2314
|
assignedTo: import_v4.z.optional(Exact),
|
|
@@ -3529,6 +3561,9 @@ var DeleteConfig = ActionConfigBase.extend(
|
|
|
3529
3561
|
var DeclareConfig = DeclarationActionBase.extend(
|
|
3530
3562
|
z25.object({
|
|
3531
3563
|
type: z25.literal(ActionType.DECLARE),
|
|
3564
|
+
declaration: DeclarationFormConfig.describe(
|
|
3565
|
+
"Configuration of the form used to gather event data."
|
|
3566
|
+
),
|
|
3532
3567
|
review: DeclarationReviewConfig.describe(
|
|
3533
3568
|
"Configuration of the review page fields."
|
|
3534
3569
|
),
|
|
@@ -3557,6 +3592,18 @@ var UnarchiveConfig = ActionConfigBase.extend(
|
|
|
3557
3592
|
type: z25.literal(ActionType.UNARCHIVE)
|
|
3558
3593
|
}).shape
|
|
3559
3594
|
);
|
|
3595
|
+
var RevokeRegistrationConfig = ActionConfigBase.extend(
|
|
3596
|
+
z25.object({
|
|
3597
|
+
type: z25.literal(ActionType.REVOKE_REGISTRATION),
|
|
3598
|
+
form: actionConfirmationForm
|
|
3599
|
+
}).shape
|
|
3600
|
+
);
|
|
3601
|
+
var ReinstateRegistrationConfig = ActionConfigBase.extend(
|
|
3602
|
+
z25.object({
|
|
3603
|
+
type: z25.literal(ActionType.REINSTATE_REGISTRATION),
|
|
3604
|
+
form: actionConfirmationForm
|
|
3605
|
+
}).shape
|
|
3606
|
+
);
|
|
3560
3607
|
var EditActionConfig = ActionConfigBase.extend(
|
|
3561
3608
|
z25.object({
|
|
3562
3609
|
type: z25.literal(ActionType.EDIT),
|
|
@@ -3697,6 +3744,14 @@ var ActionConfig = z25.discriminatedUnion("type", [
|
|
|
3697
3744
|
id: "UnarchiveActionConfig",
|
|
3698
3745
|
description: "Configuration for unarchiving a record."
|
|
3699
3746
|
}),
|
|
3747
|
+
RevokeRegistrationConfig.meta({
|
|
3748
|
+
id: "RevokeRegistrationActionConfig",
|
|
3749
|
+
description: "Configuration for revoking a registered record."
|
|
3750
|
+
}),
|
|
3751
|
+
ReinstateRegistrationConfig.meta({
|
|
3752
|
+
id: "ReinstateRegistrationActionConfig",
|
|
3753
|
+
description: "Configuration for reinstating a revoked record back to registered."
|
|
3754
|
+
}),
|
|
3700
3755
|
CustomActionConfig.meta({
|
|
3701
3756
|
id: "CustomActionConfig",
|
|
3702
3757
|
description: "Configuration for a country-defined custom action. An event may include any number of these."
|
|
@@ -4508,6 +4563,8 @@ var updateActions = new Set(
|
|
|
4508
4563
|
ActionType.REQUEST_CORRECTION,
|
|
4509
4564
|
ActionType.APPROVE_CORRECTION,
|
|
4510
4565
|
ActionType.REJECT_CORRECTION,
|
|
4566
|
+
ActionType.REVOKE_REGISTRATION,
|
|
4567
|
+
ActionType.REINSTATE_REGISTRATION,
|
|
4511
4568
|
ActionType.CUSTOM
|
|
4512
4569
|
]).options
|
|
4513
4570
|
);
|
|
@@ -4534,7 +4591,7 @@ function getActionUpdateMetadata(actions) {
|
|
|
4534
4591
|
(0, import_lodash.pick)(createAction, metadataFields)
|
|
4535
4592
|
);
|
|
4536
4593
|
}
|
|
4537
|
-
function getLegalStatuses(actions) {
|
|
4594
|
+
function getLegalStatuses(actions, status2) {
|
|
4538
4595
|
return {
|
|
4539
4596
|
[EventStatus.enum.NOTIFIED]: getDeclarationActionCreationMetadata(
|
|
4540
4597
|
ActionType.NOTIFY,
|
|
@@ -4547,7 +4604,12 @@ function getLegalStatuses(actions) {
|
|
|
4547
4604
|
[EventStatus.enum.REGISTERED]: getDeclarationActionCreationMetadata(
|
|
4548
4605
|
ActionType.REGISTER,
|
|
4549
4606
|
actions
|
|
4550
|
-
)
|
|
4607
|
+
),
|
|
4608
|
+
// A later reinstate does not remove the revoke action, so only report it while the record is still revoked.
|
|
4609
|
+
[EventStatus.enum.REVOKED]: status2 === EventStatus.enum.REVOKED ? getDeclarationActionCreationMetadata(
|
|
4610
|
+
ActionType.REVOKE_REGISTRATION,
|
|
4611
|
+
actions
|
|
4612
|
+
) : null
|
|
4551
4613
|
};
|
|
4552
4614
|
}
|
|
4553
4615
|
|
|
@@ -5417,6 +5479,10 @@ function getStatusFromActions(actions) {
|
|
|
5417
5479
|
return EventStatus.enum.REGISTERED;
|
|
5418
5480
|
case ActionType.NOTIFY:
|
|
5419
5481
|
return EventStatus.enum.NOTIFIED;
|
|
5482
|
+
case ActionType.REVOKE_REGISTRATION:
|
|
5483
|
+
return EventStatus.enum.REVOKED;
|
|
5484
|
+
case ActionType.REINSTATE_REGISTRATION:
|
|
5485
|
+
return EventStatus.enum.REGISTERED;
|
|
5420
5486
|
// Already filtered out above; listed here only to satisfy exhaustiveness.
|
|
5421
5487
|
case ActionType.ARCHIVE:
|
|
5422
5488
|
case ActionType.UNARCHIVE:
|
|
@@ -5534,7 +5600,7 @@ function getCurrentEventState(event2, config) {
|
|
|
5534
5600
|
const acceptedActionMetadata = getActionUpdateMetadata(acceptedActions);
|
|
5535
5601
|
const declaration = aggregateActionDeclarations(event2);
|
|
5536
5602
|
const status2 = getStatusFromActions(sortedActions);
|
|
5537
|
-
const legalStatuses = getLegalStatuses(sortedActions);
|
|
5603
|
+
const legalStatuses = getLegalStatuses(sortedActions, status2);
|
|
5538
5604
|
const base = deepDropNulls({
|
|
5539
5605
|
id: event2.id,
|
|
5540
5606
|
type: event2.type,
|
|
@@ -6209,14 +6275,22 @@ function ageToDate(age, asOfDate) {
|
|
|
6209
6275
|
const date = plainDateToLocalDate(asOfDate);
|
|
6210
6276
|
return PlainDate.parse((0, import_date_fns3.format)((0, import_date_fns3.subYears)(date, age), "yyyy-MM-dd"));
|
|
6211
6277
|
}
|
|
6212
|
-
function
|
|
6213
|
-
|
|
6278
|
+
function getDeclaration(configuration) {
|
|
6279
|
+
const declareAction = configuration.actions.find(
|
|
6280
|
+
(action) => action.type === ActionType.DECLARE
|
|
6281
|
+
);
|
|
6282
|
+
if (!declareAction) {
|
|
6283
|
+
throw new Error(
|
|
6284
|
+
`Event '${configuration.id}' has no ${ActionType.DECLARE} action to read the declaration from`
|
|
6285
|
+
);
|
|
6286
|
+
}
|
|
6287
|
+
return declareAction.declaration;
|
|
6214
6288
|
}
|
|
6215
6289
|
function getDeclarationPages(configuration) {
|
|
6216
|
-
return configuration.
|
|
6290
|
+
return getDeclaration(configuration).pages;
|
|
6217
6291
|
}
|
|
6218
|
-
function
|
|
6219
|
-
return configuration.
|
|
6292
|
+
function getDeclarationFields(configuration) {
|
|
6293
|
+
return getDeclarationPages(configuration).flatMap(({ fields }) => fields);
|
|
6220
6294
|
}
|
|
6221
6295
|
function isActionConfigType(type) {
|
|
6222
6296
|
return actionConfigTypes.has(type);
|
|
@@ -6837,6 +6911,43 @@ function validateActionOrder(event2, ctx) {
|
|
|
6837
6911
|
}
|
|
6838
6912
|
}
|
|
6839
6913
|
}
|
|
6914
|
+
function validateExactlyOneDeclareAction(event2, ctx) {
|
|
6915
|
+
const declareActionCount = event2.actions.filter(
|
|
6916
|
+
(action) => action.type === ActionType.DECLARE
|
|
6917
|
+
).length;
|
|
6918
|
+
if (declareActionCount !== 1) {
|
|
6919
|
+
ctx.addIssue({
|
|
6920
|
+
code: "custom",
|
|
6921
|
+
message: `Event must have exactly one ${ActionType.DECLARE} action. Found ${declareActionCount} for event ${event2.id}`,
|
|
6922
|
+
path: ["actions"]
|
|
6923
|
+
});
|
|
6924
|
+
return false;
|
|
6925
|
+
}
|
|
6926
|
+
return true;
|
|
6927
|
+
}
|
|
6928
|
+
function validateDeclarationGivenExactlyOnce(config, ctx) {
|
|
6929
|
+
const declareActionIndex = config.actions.findIndex(
|
|
6930
|
+
(action) => action.type === ActionType.DECLARE
|
|
6931
|
+
);
|
|
6932
|
+
const declareAction = config.actions[declareActionIndex];
|
|
6933
|
+
const onDeclareAction = declareAction.type === ActionType.DECLARE && !!declareAction.declaration;
|
|
6934
|
+
const onTopLevel = !!config.declaration;
|
|
6935
|
+
const declareActionPath = `actions[${declareActionIndex}].declaration`;
|
|
6936
|
+
if (onTopLevel && onDeclareAction) {
|
|
6937
|
+
ctx.addIssue({
|
|
6938
|
+
code: "custom",
|
|
6939
|
+
message: `Event '${config.id}' defines \`declaration\` both at the top level and on the ${ActionType.DECLARE} action (\`${declareActionPath}\`). Define it in only one of these places.`,
|
|
6940
|
+
path: ["declaration"]
|
|
6941
|
+
});
|
|
6942
|
+
}
|
|
6943
|
+
if (!onTopLevel && !onDeclareAction) {
|
|
6944
|
+
ctx.addIssue({
|
|
6945
|
+
code: "custom",
|
|
6946
|
+
message: `Event '${config.id}' does not define \`declaration\`. Define it either at the top level or on the ${ActionType.DECLARE} action (\`${declareActionPath}\`).`,
|
|
6947
|
+
path: ["declaration"]
|
|
6948
|
+
});
|
|
6949
|
+
}
|
|
6950
|
+
}
|
|
6840
6951
|
|
|
6841
6952
|
// ../commons/src/events/EventConfig.ts
|
|
6842
6953
|
var EventFieldReference = z35.object({ $$event: EventMetadataDateFieldIdInput }).describe(
|
|
@@ -6861,16 +6972,15 @@ var _EventConfigBase = z35.object({
|
|
|
6861
6972
|
summary: SummaryConfig.describe(
|
|
6862
6973
|
"Summary information displayed in the event overview."
|
|
6863
6974
|
),
|
|
6864
|
-
label: TranslationConfig.describe(
|
|
6975
|
+
label: TranslationConfig.describe(
|
|
6976
|
+
"Human-readable label for the event type."
|
|
6977
|
+
),
|
|
6865
6978
|
actions: z35.array(ActionConfig).describe(
|
|
6866
6979
|
"Configuration of core and custom actions associated with the event."
|
|
6867
6980
|
),
|
|
6868
6981
|
actionOrder: z35.array(z35.string()).optional().describe(
|
|
6869
6982
|
"Order of actions in the action menu. Use either the action type for core actions or the customActionType for custom actions."
|
|
6870
6983
|
),
|
|
6871
|
-
declaration: DeclarationFormConfig.describe(
|
|
6872
|
-
"Configuration of the form used to gather event data."
|
|
6873
|
-
),
|
|
6874
6984
|
advancedSearch: z35.array(AdvancedSearchConfig).optional().default([]).describe(
|
|
6875
6985
|
"Configuration of fields available in the advanced search feature."
|
|
6876
6986
|
),
|
|
@@ -6885,6 +6995,9 @@ var _EventConfigBase = z35.object({
|
|
|
6885
6995
|
)
|
|
6886
6996
|
});
|
|
6887
6997
|
var EventConfig = _EventConfigBase.superRefine((event2, ctx) => {
|
|
6998
|
+
if (!validateExactlyOneDeclareAction(event2, ctx)) {
|
|
6999
|
+
return;
|
|
7000
|
+
}
|
|
6888
7001
|
validateAdvancedSearchConfig(event2, ctx);
|
|
6889
7002
|
validateDateOfEvent(event2, ctx);
|
|
6890
7003
|
validatePlaceOfEvent(event2, ctx);
|
|
@@ -7157,6 +7270,7 @@ var SerializedQueryExpression = z37.object({
|
|
|
7157
7270
|
"legalStatuses.REGISTERED.createdAtLocation": z37.optional(SerializableWithin),
|
|
7158
7271
|
"legalStatuses.REGISTERED.createdByRole": z37.optional(AnyOf),
|
|
7159
7272
|
"legalStatuses.REGISTERED.registrationNumber": z37.optional(Exact),
|
|
7273
|
+
"legalStatuses.REVOKED.createdAtLocation": z37.optional(SerializableWithin),
|
|
7160
7274
|
createdAtLocation: z37.optional(
|
|
7161
7275
|
z37.union([SerializableWithin, SerializableExact])
|
|
7162
7276
|
),
|
|
@@ -7389,6 +7503,16 @@ var UnarchiveActionInput = BaseActionInput.extend(
|
|
|
7389
7503
|
type: z39.literal(ActionType.UNARCHIVE).default(ActionType.UNARCHIVE)
|
|
7390
7504
|
}).shape
|
|
7391
7505
|
);
|
|
7506
|
+
var RevokeRegistrationActionInput = BaseActionInput.extend(
|
|
7507
|
+
z39.object({
|
|
7508
|
+
type: z39.literal(ActionType.REVOKE_REGISTRATION).default(ActionType.REVOKE_REGISTRATION)
|
|
7509
|
+
}).shape
|
|
7510
|
+
);
|
|
7511
|
+
var ReinstateRegistrationActionInput = BaseActionInput.extend(
|
|
7512
|
+
z39.object({
|
|
7513
|
+
type: z39.literal(ActionType.REINSTATE_REGISTRATION).default(ActionType.REINSTATE_REGISTRATION)
|
|
7514
|
+
}).shape
|
|
7515
|
+
);
|
|
7392
7516
|
var AssignActionInput = BaseActionInput.extend(
|
|
7393
7517
|
z39.object({
|
|
7394
7518
|
type: z39.literal(ActionType.ASSIGN),
|
|
@@ -7451,6 +7575,12 @@ var ActionInput = z39.discriminatedUnion("type", [
|
|
|
7451
7575
|
}),
|
|
7452
7576
|
ArchiveActionInput.meta({ id: "ArchiveActionInput" }),
|
|
7453
7577
|
UnarchiveActionInput.meta({ id: "UnarchiveActionInput" }),
|
|
7578
|
+
RevokeRegistrationActionInput.meta({
|
|
7579
|
+
id: "RevokeRegistrationActionInput"
|
|
7580
|
+
}),
|
|
7581
|
+
ReinstateRegistrationActionInput.meta({
|
|
7582
|
+
id: "ReinstateRegistrationActionInput"
|
|
7583
|
+
}),
|
|
7454
7584
|
AssignActionInput.meta({ id: "AssignActionInput" }),
|
|
7455
7585
|
UnassignActionInput.meta({ id: "UnassignActionInput" }),
|
|
7456
7586
|
PrintCertificateActionInput.meta({ id: "PrintCertificateActionInput" }),
|
|
@@ -7526,10 +7656,29 @@ var EventDocumentOnlyLastAction = EventDocument.extend({
|
|
|
7526
7656
|
}).brand("EventDocumentOnlyLastAction");
|
|
7527
7657
|
|
|
7528
7658
|
// ../commons/src/events/defineConfig.ts
|
|
7529
|
-
var
|
|
7530
|
-
|
|
7531
|
-
|
|
7532
|
-
|
|
7659
|
+
var z43 = __toESM(require("zod/v4"));
|
|
7660
|
+
function moveDeclarationToDeclareAction({
|
|
7661
|
+
declaration,
|
|
7662
|
+
...config
|
|
7663
|
+
}) {
|
|
7664
|
+
if (declaration) {
|
|
7665
|
+
console.warn(
|
|
7666
|
+
`Event '${config.id}' defines \`declaration\` at the top level, which is deprecated and will be removed in a future release. Define it on the ${ActionType.DECLARE} action instead.`
|
|
7667
|
+
);
|
|
7668
|
+
}
|
|
7669
|
+
return {
|
|
7670
|
+
...config,
|
|
7671
|
+
actions: config.actions.map(
|
|
7672
|
+
(action) => action.type === ActionType.DECLARE && declaration ? { ...action, declaration } : action
|
|
7673
|
+
)
|
|
7674
|
+
};
|
|
7675
|
+
}
|
|
7676
|
+
var EventConfigDefinition = z43.custom().superRefine((config, ctx) => {
|
|
7677
|
+
if (validateExactlyOneDeclareAction(config, ctx)) {
|
|
7678
|
+
validateDeclarationGivenExactlyOnce(config, ctx);
|
|
7679
|
+
}
|
|
7680
|
+
}).transform(moveDeclarationToDeclareAction).pipe(EventConfig);
|
|
7681
|
+
var defineConfig = (config) => EventConfigDefinition.parse(config);
|
|
7533
7682
|
|
|
7534
7683
|
// ../commons/src/events/transactions.ts
|
|
7535
7684
|
function generateTransactionId() {
|
|
@@ -9523,7 +9672,24 @@ var libraryMembershipEvent = defineConfig({
|
|
|
9523
9672
|
id: "event.library-membership.title"
|
|
9524
9673
|
},
|
|
9525
9674
|
summary: { fields: [] },
|
|
9526
|
-
actions: [
|
|
9675
|
+
actions: [
|
|
9676
|
+
{
|
|
9677
|
+
type: ActionType.DECLARE,
|
|
9678
|
+
label: {
|
|
9679
|
+
defaultMessage: "Declare",
|
|
9680
|
+
description: "This is shown as the action name anywhere the user can trigger the action from",
|
|
9681
|
+
id: "event.library-membership.action.declare.label"
|
|
9682
|
+
},
|
|
9683
|
+
review: {
|
|
9684
|
+
title: {
|
|
9685
|
+
defaultMessage: "Library membership application",
|
|
9686
|
+
description: "Title of the review page",
|
|
9687
|
+
id: "event.library-membership.action.declare.form.review.title"
|
|
9688
|
+
},
|
|
9689
|
+
fields: []
|
|
9690
|
+
}
|
|
9691
|
+
}
|
|
9692
|
+
],
|
|
9527
9693
|
declaration: libraryMembershipForm
|
|
9528
9694
|
});
|
|
9529
9695
|
|
|
@@ -9969,6 +10135,22 @@ var digitalIdentityEvent = defineConfig({
|
|
|
9969
10135
|
},
|
|
9970
10136
|
summary: { fields: [] },
|
|
9971
10137
|
actions: [
|
|
10138
|
+
{
|
|
10139
|
+
type: ActionType.DECLARE,
|
|
10140
|
+
label: {
|
|
10141
|
+
defaultMessage: "Declare",
|
|
10142
|
+
description: "This is shown as the action name anywhere the user can trigger the action from",
|
|
10143
|
+
id: "event.digital-identity.action.declare.label"
|
|
10144
|
+
},
|
|
10145
|
+
review: {
|
|
10146
|
+
title: {
|
|
10147
|
+
defaultMessage: "Digital identity issuance",
|
|
10148
|
+
description: "Title of the review page",
|
|
10149
|
+
id: "event.digital-identity.action.declare.form.review.title"
|
|
10150
|
+
},
|
|
10151
|
+
fields: []
|
|
10152
|
+
}
|
|
10153
|
+
},
|
|
9972
10154
|
{
|
|
9973
10155
|
type: ActionType.PRINT_CERTIFICATE,
|
|
9974
10156
|
label: {
|
|
@@ -9983,45 +10165,45 @@ var digitalIdentityEvent = defineConfig({
|
|
|
9983
10165
|
});
|
|
9984
10166
|
|
|
9985
10167
|
// ../commons/src/events/test.utils.ts
|
|
9986
|
-
var
|
|
10168
|
+
var z45 = __toESM(require("zod/v4"));
|
|
9987
10169
|
|
|
9988
10170
|
// ../commons/src/events/locations.ts
|
|
9989
|
-
var
|
|
9990
|
-
var LocationTypeV1 =
|
|
10171
|
+
var z44 = __toESM(require("zod/v4"));
|
|
10172
|
+
var LocationTypeV1 = z44.enum([
|
|
9991
10173
|
"ADMIN_STRUCTURE",
|
|
9992
10174
|
"CRVS_OFFICE",
|
|
9993
10175
|
"HEALTH_FACILITY"
|
|
9994
10176
|
]);
|
|
9995
|
-
var LocationStatus =
|
|
10177
|
+
var LocationStatus = z44.enum(["active", "inactive"]);
|
|
9996
10178
|
var InactiveOfficeError = class extends Error {
|
|
9997
10179
|
constructor(message = "Assigned office is inactive") {
|
|
9998
10180
|
super(message);
|
|
9999
10181
|
this.name = "InactiveOfficeError";
|
|
10000
10182
|
}
|
|
10001
10183
|
};
|
|
10002
|
-
var LocationVersion =
|
|
10184
|
+
var LocationVersion = z44.object({
|
|
10003
10185
|
versionId: UUID,
|
|
10004
|
-
effectiveFrom:
|
|
10005
|
-
name:
|
|
10006
|
-
externalId:
|
|
10186
|
+
effectiveFrom: z44.iso.date(),
|
|
10187
|
+
name: z44.string(),
|
|
10188
|
+
externalId: z44.string().nullish(),
|
|
10007
10189
|
status: LocationStatus
|
|
10008
10190
|
});
|
|
10009
|
-
var AdministrativeArea =
|
|
10191
|
+
var AdministrativeArea = z44.object({
|
|
10010
10192
|
id: UUID,
|
|
10011
|
-
name:
|
|
10012
|
-
externalId:
|
|
10193
|
+
name: z44.string(),
|
|
10194
|
+
externalId: z44.string().nullish(),
|
|
10013
10195
|
parentId: UUID.nullable(),
|
|
10014
10196
|
status: LocationStatus,
|
|
10015
|
-
versions:
|
|
10197
|
+
versions: z44.array(LocationVersion)
|
|
10016
10198
|
});
|
|
10017
|
-
var Location =
|
|
10199
|
+
var Location = z44.object({
|
|
10018
10200
|
id: UUID,
|
|
10019
|
-
name:
|
|
10020
|
-
externalId:
|
|
10201
|
+
name: z44.string(),
|
|
10202
|
+
externalId: z44.string().nullish(),
|
|
10021
10203
|
administrativeAreaId: UUID.nullable(),
|
|
10022
|
-
locationType:
|
|
10204
|
+
locationType: z44.string().nullable(),
|
|
10023
10205
|
status: LocationStatus,
|
|
10024
|
-
versions:
|
|
10206
|
+
versions: z44.array(LocationVersion)
|
|
10025
10207
|
});
|
|
10026
10208
|
var ClientAdministrativeArea = AdministrativeArea.omit({
|
|
10027
10209
|
name: true,
|
|
@@ -10062,22 +10244,22 @@ function validateUniqueIds(versions, ctx) {
|
|
|
10062
10244
|
ctx.addIssue("versions must not repeat a versionId");
|
|
10063
10245
|
}
|
|
10064
10246
|
}
|
|
10065
|
-
var SeededLocationVersions =
|
|
10247
|
+
var SeededLocationVersions = z44.array(LocationVersion).min(1).superRefine((versions, ctx) => {
|
|
10066
10248
|
validateAscendingDates(versions, ctx);
|
|
10067
10249
|
validateUniqueIds(versions, ctx);
|
|
10068
10250
|
});
|
|
10069
|
-
var SetLocationPayload =
|
|
10251
|
+
var SetLocationPayload = z44.object({
|
|
10070
10252
|
id: UUID,
|
|
10071
|
-
name:
|
|
10072
|
-
externalId:
|
|
10253
|
+
name: z44.string(),
|
|
10254
|
+
externalId: z44.string().nullish(),
|
|
10073
10255
|
administrativeAreaId: UUID.nullable(),
|
|
10074
|
-
locationType:
|
|
10256
|
+
locationType: z44.string().nullable(),
|
|
10075
10257
|
versions: SeededLocationVersions.optional()
|
|
10076
10258
|
});
|
|
10077
|
-
var SetAdministrativeAreaPayload =
|
|
10259
|
+
var SetAdministrativeAreaPayload = z44.object({
|
|
10078
10260
|
id: UUID,
|
|
10079
|
-
name:
|
|
10080
|
-
externalId:
|
|
10261
|
+
name: z44.string(),
|
|
10262
|
+
externalId: z44.string().nullish(),
|
|
10081
10263
|
parentId: UUID.nullable(),
|
|
10082
10264
|
versions: SeededLocationVersions.optional()
|
|
10083
10265
|
});
|
|
@@ -10666,7 +10848,7 @@ var V2_DEFAULT_MOCK_CLIENT_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
|
10666
10848
|
|
|
10667
10849
|
// ../commons/src/events/test.utils.ts
|
|
10668
10850
|
var TEST_SYSTEM_IANA_TIMEZONE = "Asia/Dhaka";
|
|
10669
|
-
var TestUserRole =
|
|
10851
|
+
var TestUserRole = z45.enum([
|
|
10670
10852
|
"FIELD_AGENT",
|
|
10671
10853
|
"LOCAL_REGISTRAR",
|
|
10672
10854
|
"LOCAL_SYSTEM_ADMIN",
|
|
@@ -11076,6 +11258,22 @@ function eventPayloadGenerator(rng, configuration = tennisClubMembershipEvent) {
|
|
|
11076
11258
|
eventId,
|
|
11077
11259
|
...input
|
|
11078
11260
|
}),
|
|
11261
|
+
revokeRegistration: (eventId, input = {}) => ({
|
|
11262
|
+
type: ActionType.REVOKE_REGISTRATION,
|
|
11263
|
+
transactionId: input.transactionId ?? getUUID(),
|
|
11264
|
+
declaration: {},
|
|
11265
|
+
annotation: {},
|
|
11266
|
+
eventId,
|
|
11267
|
+
...input
|
|
11268
|
+
}),
|
|
11269
|
+
reinstateRegistration: (eventId, input = {}) => ({
|
|
11270
|
+
type: ActionType.REINSTATE_REGISTRATION,
|
|
11271
|
+
transactionId: input.transactionId ?? getUUID(),
|
|
11272
|
+
declaration: {},
|
|
11273
|
+
annotation: {},
|
|
11274
|
+
eventId,
|
|
11275
|
+
...input
|
|
11276
|
+
}),
|
|
11079
11277
|
reject: (eventId, input = {}) => ({
|
|
11080
11278
|
type: ActionType.REJECT,
|
|
11081
11279
|
transactionId: input.transactionId ?? getUUID(),
|
|
@@ -11244,6 +11442,8 @@ function generateActionDocument({
|
|
|
11244
11442
|
case ActionType.REGISTER:
|
|
11245
11443
|
case ActionType.REQUEST_CORRECTION:
|
|
11246
11444
|
case ActionType.UNARCHIVE:
|
|
11445
|
+
case ActionType.REVOKE_REGISTRATION:
|
|
11446
|
+
case ActionType.REINSTATE_REGISTRATION:
|
|
11247
11447
|
return { ...actionBase, type: action };
|
|
11248
11448
|
case ActionType.EDIT:
|
|
11249
11449
|
return {
|
|
@@ -11498,6 +11698,14 @@ var generateEventConfig = ({
|
|
|
11498
11698
|
]
|
|
11499
11699
|
});
|
|
11500
11700
|
};
|
|
11701
|
+
function withDeclaration(configuration, declaration) {
|
|
11702
|
+
return {
|
|
11703
|
+
...configuration,
|
|
11704
|
+
actions: configuration.actions.map(
|
|
11705
|
+
(action) => action.type === ActionType.DECLARE ? { ...action, declaration } : action
|
|
11706
|
+
)
|
|
11707
|
+
};
|
|
11708
|
+
}
|
|
11501
11709
|
function getLeafAdministrativeAreaIds(administrativeAreas) {
|
|
11502
11710
|
const nonLeafAdministrativeAreaIds = /* @__PURE__ */ new Set();
|
|
11503
11711
|
for (const [, location] of administrativeAreas) {
|
|
@@ -11604,6 +11812,8 @@ var ACTION_SCOPE_MAP = {
|
|
|
11604
11812
|
[ClientSpecificAction.REVIEW_CORRECTION_REQUEST]: ["record.correct"],
|
|
11605
11813
|
[ActionType.REJECT_CORRECTION]: ["record.correct"],
|
|
11606
11814
|
[ActionType.APPROVE_CORRECTION]: ["record.correct"],
|
|
11815
|
+
[ActionType.REVOKE_REGISTRATION]: ["record.revoke-registration"],
|
|
11816
|
+
[ActionType.REINSTATE_REGISTRATION]: ["record.reinstate-registration"],
|
|
11607
11817
|
[ActionType.MARK_AS_DUPLICATE]: ["record.review-duplicates"],
|
|
11608
11818
|
[ActionType.MARK_AS_NOT_DUPLICATE]: ["record.review-duplicates"],
|
|
11609
11819
|
[ActionType.ARCHIVE]: ["record.archive"],
|
|
@@ -11626,6 +11836,8 @@ var DOCUMENT_DELETE_SCOPES = [
|
|
|
11626
11836
|
"record.print-certified-copies",
|
|
11627
11837
|
"record.request-correction",
|
|
11628
11838
|
"record.correct",
|
|
11839
|
+
"record.revoke-registration",
|
|
11840
|
+
"record.reinstate-registration",
|
|
11629
11841
|
"record.review-duplicates",
|
|
11630
11842
|
"record.archive",
|
|
11631
11843
|
"record.unarchive",
|
|
@@ -11765,6 +11977,10 @@ function deserializeQueryExpression(expression, user2) {
|
|
|
11765
11977
|
expression["legalStatuses.REGISTERED.createdAtLocation"].location,
|
|
11766
11978
|
user2
|
|
11767
11979
|
) : void 0;
|
|
11980
|
+
const revokedLocation = expression["legalStatuses.REVOKED.createdAtLocation"] ? userDeserializer(
|
|
11981
|
+
expression["legalStatuses.REVOKED.createdAtLocation"].location,
|
|
11982
|
+
user2
|
|
11983
|
+
) : void 0;
|
|
11768
11984
|
return {
|
|
11769
11985
|
...expression,
|
|
11770
11986
|
assignedTo: expression.assignedTo && isDefined(assignedTo) ? { ...expression.assignedTo, term: assignedTo } : void 0,
|
|
@@ -11783,6 +11999,10 @@ function deserializeQueryExpression(expression, user2) {
|
|
|
11783
11999
|
["legalStatuses.REGISTERED.createdAtLocation"]: expression["legalStatuses.REGISTERED.createdAtLocation"] && isDefined(registeredLocation) ? {
|
|
11784
12000
|
...expression["legalStatuses.REGISTERED.createdAtLocation"],
|
|
11785
12001
|
location: registeredLocation
|
|
12002
|
+
} : void 0,
|
|
12003
|
+
["legalStatuses.REVOKED.createdAtLocation"]: expression["legalStatuses.REVOKED.createdAtLocation"] && isDefined(revokedLocation) ? {
|
|
12004
|
+
...expression["legalStatuses.REVOKED.createdAtLocation"],
|
|
12005
|
+
location: revokedLocation
|
|
11786
12006
|
} : void 0
|
|
11787
12007
|
};
|
|
11788
12008
|
}
|
|
@@ -11829,7 +12049,12 @@ var AVAILABLE_ACTIONS_BY_EVENT_STATUS = {
|
|
|
11829
12049
|
ActionType.APPROVE_CORRECTION,
|
|
11830
12050
|
ActionType.REJECT_CORRECTION,
|
|
11831
12051
|
ActionType.CUSTOM,
|
|
11832
|
-
ClientSpecificAction.REVIEW_CORRECTION_REQUEST
|
|
12052
|
+
ClientSpecificAction.REVIEW_CORRECTION_REQUEST,
|
|
12053
|
+
ActionType.REVOKE_REGISTRATION
|
|
12054
|
+
],
|
|
12055
|
+
[EventStatus.enum.REVOKED]: [
|
|
12056
|
+
ActionType.READ,
|
|
12057
|
+
ActionType.REINSTATE_REGISTRATION
|
|
11833
12058
|
],
|
|
11834
12059
|
[EventStatus.enum.ARCHIVED]: [
|
|
11835
12060
|
ActionType.READ,
|
|
@@ -11843,6 +12068,8 @@ var ACTION_FILTERS = {
|
|
|
11843
12068
|
[ClientSpecificAction.REVIEW_CORRECTION_REQUEST]: (flags) => flags.includes(InherentFlags.CORRECTION_REQUESTED) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
11844
12069
|
[ActionType.APPROVE_CORRECTION]: (flags) => flags.includes(InherentFlags.CORRECTION_REQUESTED) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
11845
12070
|
[ActionType.REJECT_CORRECTION]: (flags) => flags.includes(InherentFlags.CORRECTION_REQUESTED) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
12071
|
+
[ActionType.REVOKE_REGISTRATION]: (flags) => !flags.includes(InherentFlags.CORRECTION_REQUESTED) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
12072
|
+
[ActionType.REINSTATE_REGISTRATION]: (flags) => !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
11846
12073
|
[ActionType.MARK_AS_DUPLICATE]: (flags) => flags.includes(InherentFlags.POTENTIAL_DUPLICATE) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
11847
12074
|
[ActionType.EDIT]: (flags) => !flags.includes(InherentFlags.POTENTIAL_DUPLICATE) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
11848
12075
|
[ActionType.REGISTER]: (flags) => !flags.includes(InherentFlags.POTENTIAL_DUPLICATE) && !flags.some((flag2) => flag2.endsWith(":requested")),
|
|
@@ -11908,49 +12135,49 @@ function getFilePathsFromEvent(event2) {
|
|
|
11908
12135
|
}
|
|
11909
12136
|
|
|
11910
12137
|
// ../commons/src/events/locationPayloads.ts
|
|
11911
|
-
var
|
|
11912
|
-
var CreateLocationPayload =
|
|
12138
|
+
var z46 = __toESM(require("zod/v4"));
|
|
12139
|
+
var CreateLocationPayload = z46.object({
|
|
11913
12140
|
id: UUID.optional(),
|
|
11914
12141
|
versionId: UUID.optional(),
|
|
11915
|
-
name:
|
|
11916
|
-
externalId:
|
|
12142
|
+
name: z46.string(),
|
|
12143
|
+
externalId: z46.string().nullish(),
|
|
11917
12144
|
administrativeAreaId: UUID.nullable(),
|
|
11918
|
-
locationType:
|
|
11919
|
-
effectiveFrom:
|
|
12145
|
+
locationType: z46.string().nullable(),
|
|
12146
|
+
effectiveFrom: z46.iso.date().optional(),
|
|
11920
12147
|
status: LocationStatus.default("active")
|
|
11921
12148
|
});
|
|
11922
|
-
var UpdateLocationPayload =
|
|
12149
|
+
var UpdateLocationPayload = z46.strictObject({
|
|
11923
12150
|
id: UUID,
|
|
11924
12151
|
versionId: UUID.optional(),
|
|
11925
|
-
name:
|
|
11926
|
-
externalId:
|
|
12152
|
+
name: z46.string(),
|
|
12153
|
+
externalId: z46.string().nullish(),
|
|
11927
12154
|
status: LocationStatus,
|
|
11928
|
-
effectiveFrom:
|
|
12155
|
+
effectiveFrom: z46.iso.date().optional(),
|
|
11929
12156
|
lastVersionId: UUID
|
|
11930
12157
|
});
|
|
11931
|
-
var WithdrawLocationVersionPayload =
|
|
12158
|
+
var WithdrawLocationVersionPayload = z46.object({
|
|
11932
12159
|
id: UUID,
|
|
11933
12160
|
versionId: UUID
|
|
11934
12161
|
});
|
|
11935
|
-
var CreateAdministrativeAreaPayload =
|
|
12162
|
+
var CreateAdministrativeAreaPayload = z46.object({
|
|
11936
12163
|
id: UUID.optional(),
|
|
11937
12164
|
versionId: UUID.optional(),
|
|
11938
|
-
name:
|
|
11939
|
-
externalId:
|
|
12165
|
+
name: z46.string(),
|
|
12166
|
+
externalId: z46.string().nullish(),
|
|
11940
12167
|
parentId: UUID.nullable(),
|
|
11941
|
-
effectiveFrom:
|
|
12168
|
+
effectiveFrom: z46.iso.date().optional(),
|
|
11942
12169
|
status: LocationStatus.default("active")
|
|
11943
12170
|
});
|
|
11944
|
-
var UpdateAdministrativeAreaPayload =
|
|
12171
|
+
var UpdateAdministrativeAreaPayload = z46.strictObject({
|
|
11945
12172
|
id: UUID,
|
|
11946
12173
|
versionId: UUID.optional(),
|
|
11947
|
-
name:
|
|
11948
|
-
externalId:
|
|
12174
|
+
name: z46.string(),
|
|
12175
|
+
externalId: z46.string().nullish(),
|
|
11949
12176
|
status: LocationStatus,
|
|
11950
|
-
effectiveFrom:
|
|
12177
|
+
effectiveFrom: z46.iso.date().optional(),
|
|
11951
12178
|
lastVersionId: UUID
|
|
11952
12179
|
});
|
|
11953
|
-
var WithdrawAdministrativeAreaVersionPayload =
|
|
12180
|
+
var WithdrawAdministrativeAreaVersionPayload = z46.object({
|
|
11954
12181
|
id: UUID,
|
|
11955
12182
|
versionId: UUID
|
|
11956
12183
|
});
|