@opencrvs/toolkit 2.1.0-rc.a2d8806 → 2.1.0-rc.a434ca3
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/README.md +1 -0
- package/create-countryconfig/index.js +59 -24
- package/dist/application-config/index.js +227 -196
- package/dist/cli.js +174 -58
- package/dist/commons/api/router.d.ts +193 -20
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/conditionals/validate.d.ts +8 -1
- package/dist/commons/events/ActionDocument.d.ts +1 -7
- package/dist/commons/events/ActionStatus.d.ts +14 -0
- package/dist/commons/events/AdvancedSearchConfig.d.ts +6 -0
- package/dist/commons/events/AuditLog.d.ts +110 -0
- package/dist/commons/events/EventConfig.d.ts +3 -0
- package/dist/commons/events/EventIndex.d.ts +3 -26
- package/dist/commons/events/FieldConfig.d.ts +65 -53
- package/dist/commons/events/FieldTypeMapping.d.ts +19 -19
- package/dist/commons/events/Flag.d.ts +42 -0
- package/dist/commons/events/SummaryConfig.d.ts +249 -0
- package/dist/commons/events/WorkqueueConfig.d.ts +17 -14
- package/dist/commons/events/event.d.ts +12 -0
- package/dist/conditionals/index.js +302 -55
- package/dist/environment/index.d.ts +1 -0
- package/dist/environment/index.d.ts.map +1 -1
- package/dist/environment/index.js +10 -0
- package/dist/environment/logger.d.ts +12 -3
- package/dist/environment/logger.d.ts.map +1 -1
- package/dist/environment/paths.d.ts +7 -0
- package/dist/environment/paths.d.ts.map +1 -0
- package/dist/environment/paths.js +72 -0
- package/dist/environment/setup-environment.js +2 -1
- package/dist/environment/templates.d.ts.map +1 -1
- package/dist/environment/templates.js +2 -1
- package/dist/environment/update-workflows.d.ts.map +1 -1
- package/dist/environment/update-workflows.js +17 -5
- package/dist/environment/upgrade.d.ts +2 -0
- package/dist/environment/upgrade.d.ts.map +1 -0
- package/dist/environment/upgrade.js +82 -0
- package/dist/environment/users.js +11 -13
- package/dist/events/index.js +3438 -3250
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts +2 -2
- package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
- package/dist/migrations/v2.0/checkout-upstream-files.js +2 -2
- package/dist/notification/index.js +1771 -1049
- package/dist/scopes/index.d.ts +248 -25
- package/dist/scopes/index.js +303 -55
- package/dist/templates/charts-values/opencrvs-services/values.yaml +4 -3
- package/dist/templates/charts-values/opentelemetry/values.yaml +73 -0
- package/opencrvs-toolkit-2.1.0-rc.a434ca3.tgz +0 -0
- package/package.json +5 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.1.0-rc.a2d8806.tgz +0 -0
|
@@ -8258,6 +8258,104 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8258
8258
|
administrativeAreaId?: string | null | undefined;
|
|
8259
8259
|
locationType?: string | null | undefined;
|
|
8260
8260
|
};
|
|
8261
|
+
} | {
|
|
8262
|
+
id: string;
|
|
8263
|
+
clientId: string;
|
|
8264
|
+
clientType: "system" | "user";
|
|
8265
|
+
createdAt: string;
|
|
8266
|
+
operation: "locations.update";
|
|
8267
|
+
requestData: {
|
|
8268
|
+
id: string;
|
|
8269
|
+
versionId: string;
|
|
8270
|
+
name: string;
|
|
8271
|
+
externalId?: string | null | undefined;
|
|
8272
|
+
status: string;
|
|
8273
|
+
effectiveFrom: string;
|
|
8274
|
+
lastVersionId: string;
|
|
8275
|
+
};
|
|
8276
|
+
responseSummary: {
|
|
8277
|
+
previousVersionId: string;
|
|
8278
|
+
versionId: string;
|
|
8279
|
+
changed: {
|
|
8280
|
+
name?: {
|
|
8281
|
+
from: string;
|
|
8282
|
+
to: string;
|
|
8283
|
+
} | undefined;
|
|
8284
|
+
externalId?: {
|
|
8285
|
+
from: string | null;
|
|
8286
|
+
to: string | null;
|
|
8287
|
+
} | undefined;
|
|
8288
|
+
status?: {
|
|
8289
|
+
from: string;
|
|
8290
|
+
to: string;
|
|
8291
|
+
} | undefined;
|
|
8292
|
+
};
|
|
8293
|
+
};
|
|
8294
|
+
} | {
|
|
8295
|
+
id: string;
|
|
8296
|
+
clientId: string;
|
|
8297
|
+
clientType: "system" | "user";
|
|
8298
|
+
createdAt: string;
|
|
8299
|
+
operation: "administrativeAreas.update";
|
|
8300
|
+
requestData: {
|
|
8301
|
+
id: string;
|
|
8302
|
+
versionId: string;
|
|
8303
|
+
name: string;
|
|
8304
|
+
externalId?: string | null | undefined;
|
|
8305
|
+
status: string;
|
|
8306
|
+
effectiveFrom: string;
|
|
8307
|
+
lastVersionId: string;
|
|
8308
|
+
};
|
|
8309
|
+
responseSummary: {
|
|
8310
|
+
previousVersionId: string;
|
|
8311
|
+
versionId: string;
|
|
8312
|
+
changed: {
|
|
8313
|
+
name?: {
|
|
8314
|
+
from: string;
|
|
8315
|
+
to: string;
|
|
8316
|
+
} | undefined;
|
|
8317
|
+
externalId?: {
|
|
8318
|
+
from: string | null;
|
|
8319
|
+
to: string | null;
|
|
8320
|
+
} | undefined;
|
|
8321
|
+
status?: {
|
|
8322
|
+
from: string;
|
|
8323
|
+
to: string;
|
|
8324
|
+
} | undefined;
|
|
8325
|
+
};
|
|
8326
|
+
};
|
|
8327
|
+
} | {
|
|
8328
|
+
id: string;
|
|
8329
|
+
clientId: string;
|
|
8330
|
+
clientType: "system" | "user";
|
|
8331
|
+
createdAt: string;
|
|
8332
|
+
operation: "locations.withdrawVersion";
|
|
8333
|
+
requestData: {
|
|
8334
|
+
id: string;
|
|
8335
|
+
versionId: string;
|
|
8336
|
+
};
|
|
8337
|
+
responseSummary: {
|
|
8338
|
+
effectiveFrom: string;
|
|
8339
|
+
name: string;
|
|
8340
|
+
externalId?: string | null | undefined;
|
|
8341
|
+
status: string;
|
|
8342
|
+
};
|
|
8343
|
+
} | {
|
|
8344
|
+
id: string;
|
|
8345
|
+
clientId: string;
|
|
8346
|
+
clientType: "system" | "user";
|
|
8347
|
+
createdAt: string;
|
|
8348
|
+
operation: "administrativeAreas.withdrawVersion";
|
|
8349
|
+
requestData: {
|
|
8350
|
+
id: string;
|
|
8351
|
+
versionId: string;
|
|
8352
|
+
};
|
|
8353
|
+
responseSummary: {
|
|
8354
|
+
effectiveFrom: string;
|
|
8355
|
+
name: string;
|
|
8356
|
+
externalId?: string | null | undefined;
|
|
8357
|
+
status: string;
|
|
8358
|
+
};
|
|
8261
8359
|
} | {
|
|
8262
8360
|
id: string;
|
|
8263
8361
|
clientId: string;
|
|
@@ -8394,27 +8492,65 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8394
8492
|
}[];
|
|
8395
8493
|
meta: object;
|
|
8396
8494
|
}>;
|
|
8397
|
-
|
|
8495
|
+
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
8398
8496
|
input: {
|
|
8399
|
-
id
|
|
8497
|
+
id?: string | undefined;
|
|
8498
|
+
versionId?: string | undefined;
|
|
8400
8499
|
name: string;
|
|
8401
8500
|
externalId?: string | null | undefined;
|
|
8402
8501
|
administrativeAreaId: string | null;
|
|
8403
8502
|
locationType: string | null;
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8503
|
+
effectiveFrom?: string | undefined;
|
|
8504
|
+
status?: "active" | "inactive" | undefined;
|
|
8505
|
+
};
|
|
8506
|
+
output: {
|
|
8507
|
+
id: string & import("zod").$brand<"UUID">;
|
|
8508
|
+
name: string;
|
|
8509
|
+
externalId?: string | null | undefined;
|
|
8510
|
+
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8511
|
+
locationType: string | null;
|
|
8512
|
+
status: "active" | "inactive";
|
|
8513
|
+
versions: {
|
|
8514
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
8515
|
+
effectiveFrom: string;
|
|
8516
|
+
name: string;
|
|
8517
|
+
externalId?: string | null | undefined;
|
|
8518
|
+
status: "active" | "inactive";
|
|
8519
|
+
}[];
|
|
8520
|
+
};
|
|
8521
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8407
8522
|
}>;
|
|
8408
|
-
|
|
8523
|
+
update: import("@trpc/server").TRPCMutationProcedure<{
|
|
8409
8524
|
input: {
|
|
8410
|
-
id
|
|
8525
|
+
id: string;
|
|
8411
8526
|
versionId?: string | undefined;
|
|
8412
8527
|
name: string;
|
|
8413
8528
|
externalId?: string | null | undefined;
|
|
8414
|
-
|
|
8415
|
-
locationType: string | null;
|
|
8529
|
+
status: "active" | "inactive";
|
|
8416
8530
|
effectiveFrom?: string | undefined;
|
|
8417
|
-
|
|
8531
|
+
lastVersionId: string;
|
|
8532
|
+
};
|
|
8533
|
+
output: {
|
|
8534
|
+
id: string & import("zod").$brand<"UUID">;
|
|
8535
|
+
name: string;
|
|
8536
|
+
externalId?: string | null | undefined;
|
|
8537
|
+
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8538
|
+
locationType: string | null;
|
|
8539
|
+
status: "active" | "inactive";
|
|
8540
|
+
versions: {
|
|
8541
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
8542
|
+
effectiveFrom: string;
|
|
8543
|
+
name: string;
|
|
8544
|
+
externalId?: string | null | undefined;
|
|
8545
|
+
status: "active" | "inactive";
|
|
8546
|
+
}[];
|
|
8547
|
+
};
|
|
8548
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8549
|
+
}>;
|
|
8550
|
+
withdrawVersion: import("@trpc/server").TRPCMutationProcedure<{
|
|
8551
|
+
input: {
|
|
8552
|
+
id: string;
|
|
8553
|
+
versionId: string;
|
|
8418
8554
|
};
|
|
8419
8555
|
output: {
|
|
8420
8556
|
id: string & import("zod").$brand<"UUID">;
|
|
@@ -8807,7 +8943,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8807
8943
|
$event: "assignedTo" | "createdAt" | "createdAtLocation" | "createdBy" | "createdByUserType" | "dateOfEvent" | "flags" | "id" | "legalStatuses" | "outbox" | "placeOfEvent" | "status" | "title" | "trackingId" | "type" | "updatedAt" | "updatedAtLocation" | "updatedBy" | "updatedByUserRole";
|
|
8808
8944
|
};
|
|
8809
8945
|
}[];
|
|
8810
|
-
icon: "Activity" | "Archive" | "ArchiveBox" | "ArchiveTray" | "Archived" | "ArrowCircleDown" | "ArrowCounterClockwise" | "ArrowLeft" | "ArrowRight" | "Assigned" | "Briefcase" | "Buildings" | "CaretDown" | "CaretLeft" | "CaretRight" | "Certified" | "ChartActivity" | "ChartBar" | "ChartLine" | "ChatCircle" | "ChatText" | "Check" | "CheckSquare" | "Circle" | "CircleWavyCheck" | "CircleWavyQuestion" | "Clock" | "Close" | "Collapse" | "Compass" | "Copy" | "Database" | "DeviceTabletCamera" | "DotsThreeVertical" | "Draft" | "DuplicateYellow" | "Envelope" | "Expand" | "Export" | "ExternalValidate" | "Eye" | "EyeSlash" | "File" | "FileArrowUp" | "FileDotted" | "FileMinus" | "FilePlus" | "FileSearch" | "FileText" | "FileX" | "Files" | "FilledCheck" | "Fingerprint" | "Gear" | "GitBranch" | "Globe" | "Handshake" | "IdentificationCard" | "InReview" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "MapPin" | "Medal" | "NotePencil" | "Offline" | "PaperPlaneTilt" | "Paperclip" | "Pen" | "PenNib" | "Pencil" | "PencilCircle" | "PencilLine" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "PushPin" | "QrCode" | "Registered" | "RequiresUpdates" | "Sent" | "SignOut" | "Stamp" | "Star" | "Sun" | "Target" | "TextT" | "Timer" | "Trash" | "UploadSimple" | "User" | "UserCircle" | "UserPlus" | "Users" | "Validated" | "WaitingApproval" | "WarningCircle" | "Webcam" | "X";
|
|
8946
|
+
icon: "Activity" | "Archive" | "ArchiveBox" | "ArchiveTray" | "Archived" | "ArrowCircleDown" | "ArrowCounterClockwise" | "ArrowLeft" | "ArrowRight" | "Assigned" | "Briefcase" | "Buildings" | "CaretDown" | "CaretLeft" | "CaretRight" | "Certified" | "ChartActivity" | "ChartBar" | "ChartLine" | "ChatCircle" | "ChatText" | "Check" | "CheckSquare" | "Circle" | "CircleWavyCheck" | "CircleWavyQuestion" | "Clock" | "Close" | "Collapse" | "Compass" | "Copy" | "Database" | "DeviceTabletCamera" | "DotsThreeVertical" | "Draft" | "DuplicateYellow" | "Envelope" | "Expand" | "Export" | "ExternalValidate" | "Eye" | "EyeSlash" | "File" | "FileArrowUp" | "FileDotted" | "FileLock" | "FileMinus" | "FilePlus" | "FileSearch" | "FileText" | "FileX" | "Files" | "FilledCheck" | "Fingerprint" | "Gear" | "GitBranch" | "Globe" | "Handshake" | "IdentificationCard" | "InReview" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "MapPin" | "Medal" | "NotePencil" | "Offline" | "PaperPlaneTilt" | "Paperclip" | "Pen" | "PenNib" | "Pencil" | "PencilCircle" | "PencilLine" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "PushPin" | "QrCode" | "Registered" | "RequiresUpdates" | "Sent" | "SignOut" | "Stamp" | "Star" | "Sun" | "Target" | "TextT" | "Timer" | "Trash" | "UploadSimple" | "User" | "UserCircle" | "UserPlus" | "Users" | "Validated" | "WaitingApproval" | "WarningCircle" | "Webcam" | "X";
|
|
8811
8947
|
emptyMessage?: {
|
|
8812
8948
|
id: string;
|
|
8813
8949
|
defaultMessage: string;
|
|
@@ -8869,25 +9005,62 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8869
9005
|
}[];
|
|
8870
9006
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8871
9007
|
}>;
|
|
8872
|
-
|
|
9008
|
+
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
8873
9009
|
input: {
|
|
8874
|
-
id
|
|
9010
|
+
id?: string | undefined;
|
|
9011
|
+
versionId?: string | undefined;
|
|
8875
9012
|
name: string;
|
|
8876
9013
|
externalId?: string | null | undefined;
|
|
8877
9014
|
parentId: string | null;
|
|
8878
|
-
|
|
8879
|
-
|
|
8880
|
-
|
|
9015
|
+
effectiveFrom?: string | undefined;
|
|
9016
|
+
status?: "active" | "inactive" | undefined;
|
|
9017
|
+
};
|
|
9018
|
+
output: {
|
|
9019
|
+
id: string & import("zod").$brand<"UUID">;
|
|
9020
|
+
name: string;
|
|
9021
|
+
externalId?: string | null | undefined;
|
|
9022
|
+
parentId: (string & import("zod").$brand<"UUID">) | null;
|
|
9023
|
+
status: "active" | "inactive";
|
|
9024
|
+
versions: {
|
|
9025
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
9026
|
+
effectiveFrom: string;
|
|
9027
|
+
name: string;
|
|
9028
|
+
externalId?: string | null | undefined;
|
|
9029
|
+
status: "active" | "inactive";
|
|
9030
|
+
}[];
|
|
9031
|
+
};
|
|
9032
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8881
9033
|
}>;
|
|
8882
|
-
|
|
9034
|
+
update: import("@trpc/server").TRPCMutationProcedure<{
|
|
8883
9035
|
input: {
|
|
8884
|
-
id
|
|
9036
|
+
id: string;
|
|
8885
9037
|
versionId?: string | undefined;
|
|
8886
9038
|
name: string;
|
|
8887
9039
|
externalId?: string | null | undefined;
|
|
8888
|
-
|
|
9040
|
+
status: "active" | "inactive";
|
|
8889
9041
|
effectiveFrom?: string | undefined;
|
|
8890
|
-
|
|
9042
|
+
lastVersionId: string;
|
|
9043
|
+
};
|
|
9044
|
+
output: {
|
|
9045
|
+
id: string & import("zod").$brand<"UUID">;
|
|
9046
|
+
name: string;
|
|
9047
|
+
externalId?: string | null | undefined;
|
|
9048
|
+
parentId: (string & import("zod").$brand<"UUID">) | null;
|
|
9049
|
+
status: "active" | "inactive";
|
|
9050
|
+
versions: {
|
|
9051
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
9052
|
+
effectiveFrom: string;
|
|
9053
|
+
name: string;
|
|
9054
|
+
externalId?: string | null | undefined;
|
|
9055
|
+
status: "active" | "inactive";
|
|
9056
|
+
}[];
|
|
9057
|
+
};
|
|
9058
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
9059
|
+
}>;
|
|
9060
|
+
withdrawVersion: import("@trpc/server").TRPCMutationProcedure<{
|
|
9061
|
+
input: {
|
|
9062
|
+
id: string;
|
|
9063
|
+
versionId: string;
|
|
8891
9064
|
};
|
|
8892
9065
|
output: {
|
|
8893
9066
|
id: string & import("zod").$brand<"UUID">;
|
|
@@ -86,16 +86,16 @@ export declare const user: typeof userSerializer & {
|
|
|
86
86
|
scope: (scope: import("../scopes").ScopeType) => {
|
|
87
87
|
attribute: (option: import("../scopes").ScopeOptionKey) => {
|
|
88
88
|
$scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
|
|
89
|
-
$option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
|
|
89
|
+
$option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
92
|
jurisdiction: (jurisdiction: import("../scopes").JurisdictionFilter | {
|
|
93
93
|
$scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
|
|
94
|
-
$option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
|
|
94
|
+
$option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
|
|
95
95
|
}) => {
|
|
96
96
|
$jurisdiction: "administrativeArea" | "all" | "location" | {
|
|
97
97
|
$scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "location.edit" | "organisation.read-locations" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.archive" | "record.confirm-registration" | "record.correct" | "record.create" | "record.custom-action" | "record.declare" | "record.edit" | "record.import" | "record.notify" | "record.print-certified-copies" | "record.read" | "record.register" | "record.reindex" | "record.reject" | "record.reject-registration" | "record.request-correction" | "record.review-duplicates" | "record.search" | "record.unarchive" | "record.unassign-others" | "user.create" | "user.data-seeding" | "user.edit" | "user.read" | "user.read-only-my-audit" | "user.search" | "workqueue";
|
|
98
|
-
$option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
|
|
98
|
+
$option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
101
|
hasScope: (scope: string) => JSONSchema;
|
|
@@ -69,13 +69,20 @@ export declare function validate(schema: JSONSchema, data: ConditionalParameters
|
|
|
69
69
|
export declare function validateValue(schema: JSONSchema, data: unknown): boolean;
|
|
70
70
|
export declare function isOnline(): boolean;
|
|
71
71
|
export declare function isConditionMet(conditional: JSONSchema, values: EventState | ActionUpdate, context: ValidatorContext): boolean;
|
|
72
|
-
export declare function areConditionsMet(conditions: FieldConditional[], values: Record<string, FieldValue>, context: ValidatorContext,
|
|
72
|
+
export declare function areConditionsMet(conditions: FieldConditional[], values: Record<string, FieldValue>, context: ValidatorContext, event: EventIndex): boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Given a field's `secured` property (a boolean, or a JSONSchema conditional
|
|
75
|
+
* evaluated against the event, e.g. `flag('sealed')`), returns whether the
|
|
76
|
+
* field is currently secured for the given event.
|
|
77
|
+
*/
|
|
78
|
+
export declare function isFieldSecured(field: Pick<FieldConfig, 'secured'>, event: EventIndex, context?: ValidatorContext): boolean;
|
|
73
79
|
export type ValidatorContext = {
|
|
74
80
|
user?: ITokenPayload;
|
|
75
81
|
leafAdminStructureLocationIds?: Array<{
|
|
76
82
|
id: UUID;
|
|
77
83
|
}>;
|
|
78
84
|
event?: EventDocument;
|
|
85
|
+
eventConfig?: EventConfig;
|
|
79
86
|
baseFormState?: EventState;
|
|
80
87
|
};
|
|
81
88
|
export declare function isFieldVisible(field: FieldConfig, form: Partial<ActionUpdate | EventState>, context: ValidatorContext): boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as z from 'zod/v4';
|
|
2
2
|
import { FieldValue, FieldUpdateValue } from './FieldValue';
|
|
3
|
+
export { ActionStatus } from './ActionStatus';
|
|
3
4
|
/**
|
|
4
5
|
* ActionUpdate is a record of a specific action that updated data fields.
|
|
5
6
|
*/
|
|
@@ -10,12 +11,6 @@ export type ActionUpdate = z.infer<typeof ActionUpdate>;
|
|
|
10
11
|
*/
|
|
11
12
|
export declare const EventState: z.ZodRecord<z.ZodString, z.ZodType<FieldValue, unknown, z.core.$ZodTypeInternals<FieldValue, unknown>>>;
|
|
12
13
|
export type EventState = z.infer<typeof EventState>;
|
|
13
|
-
export declare const ActionStatus: {
|
|
14
|
-
readonly Requested: 'Requested';
|
|
15
|
-
readonly Accepted: 'Accepted';
|
|
16
|
-
readonly Rejected: 'Rejected';
|
|
17
|
-
};
|
|
18
|
-
export type ActionStatus = keyof typeof ActionStatus;
|
|
19
14
|
export declare const ActionBase: z.ZodObject<{
|
|
20
15
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
21
16
|
transactionId: z.ZodString;
|
|
@@ -1173,5 +1168,4 @@ export declare const Action: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.Zod
|
|
|
1173
1168
|
export type Action = z.infer<typeof Action>;
|
|
1174
1169
|
export type CreatedAction = z.infer<typeof CreatedAction>;
|
|
1175
1170
|
export type AssignedAction = z.infer<typeof AssignedAction>;
|
|
1176
|
-
export {};
|
|
1177
1171
|
//# sourceMappingURL=ActionDocument.d.ts.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deliberately dependency-free (aside from language builtins) so that files
|
|
3
|
+
* like Flag.ts can depend on ActionStatus without being pulled into the
|
|
4
|
+
* commons/scopes.ts <-> commons/authentication.ts import cycle that
|
|
5
|
+
* ActionDocument.ts participates in (it imports TokenUserType from
|
|
6
|
+
* '../authentication').
|
|
7
|
+
*/
|
|
8
|
+
export declare const ActionStatus: {
|
|
9
|
+
readonly Requested: 'Requested';
|
|
10
|
+
readonly Accepted: 'Accepted';
|
|
11
|
+
readonly Rejected: 'Rejected';
|
|
12
|
+
};
|
|
13
|
+
export type ActionStatus = keyof typeof ActionStatus;
|
|
14
|
+
//# sourceMappingURL=ActionStatus.d.ts.map
|
|
@@ -142,6 +142,7 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
|
142
142
|
declaredBy: "declaredBy";
|
|
143
143
|
declaredIn: "declaredIn";
|
|
144
144
|
event: "event";
|
|
145
|
+
flags: "flags";
|
|
145
146
|
ids: "ids";
|
|
146
147
|
notifiedBy: "notifiedBy";
|
|
147
148
|
notifiedIn: "notifiedIn";
|
|
@@ -323,6 +324,7 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
|
|
|
323
324
|
declaredBy: "declaredBy";
|
|
324
325
|
declaredIn: "declaredIn";
|
|
325
326
|
event: "event";
|
|
327
|
+
flags: "flags";
|
|
326
328
|
ids: "ids";
|
|
327
329
|
notifiedBy: "notifiedBy";
|
|
328
330
|
notifiedIn: "notifiedIn";
|
|
@@ -480,6 +482,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
480
482
|
declaredBy: "declaredBy";
|
|
481
483
|
declaredIn: "declaredIn";
|
|
482
484
|
event: "event";
|
|
485
|
+
flags: "flags";
|
|
483
486
|
ids: "ids";
|
|
484
487
|
notifiedBy: "notifiedBy";
|
|
485
488
|
notifiedIn: "notifiedIn";
|
|
@@ -629,6 +632,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
629
632
|
declaredBy: "declaredBy";
|
|
630
633
|
declaredIn: "declaredIn";
|
|
631
634
|
event: "event";
|
|
635
|
+
flags: "flags";
|
|
632
636
|
ids: "ids";
|
|
633
637
|
notifiedBy: "notifiedBy";
|
|
634
638
|
notifiedIn: "notifiedIn";
|
|
@@ -789,6 +793,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
789
793
|
declaredBy: "declaredBy";
|
|
790
794
|
declaredIn: "declaredIn";
|
|
791
795
|
event: "event";
|
|
796
|
+
flags: "flags";
|
|
792
797
|
ids: "ids";
|
|
793
798
|
notifiedBy: "notifiedBy";
|
|
794
799
|
notifiedIn: "notifiedIn";
|
|
@@ -938,6 +943,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
938
943
|
declaredBy: "declaredBy";
|
|
939
944
|
declaredIn: "declaredIn";
|
|
940
945
|
event: "event";
|
|
946
|
+
flags: "flags";
|
|
941
947
|
ids: "ids";
|
|
942
948
|
notifiedBy: "notifiedBy";
|
|
943
949
|
notifiedIn: "notifiedIn";
|
|
@@ -300,6 +300,116 @@ export declare const AuditLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
300
300
|
administrativeAreaId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
301
|
locationType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
302
302
|
}, z.core.$strip>;
|
|
303
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
304
|
+
id: z.ZodString;
|
|
305
|
+
clientId: z.ZodString;
|
|
306
|
+
clientType: z.ZodEnum<{
|
|
307
|
+
system: "system";
|
|
308
|
+
user: "user";
|
|
309
|
+
}>;
|
|
310
|
+
createdAt: z.ZodString;
|
|
311
|
+
operation: z.ZodLiteral<"locations.update">;
|
|
312
|
+
requestData: z.ZodObject<{
|
|
313
|
+
id: z.ZodString;
|
|
314
|
+
versionId: z.ZodString;
|
|
315
|
+
name: z.ZodString;
|
|
316
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
317
|
+
status: z.ZodString;
|
|
318
|
+
effectiveFrom: z.ZodString;
|
|
319
|
+
lastVersionId: z.ZodString;
|
|
320
|
+
}, z.core.$strip>;
|
|
321
|
+
responseSummary: z.ZodObject<{
|
|
322
|
+
previousVersionId: z.ZodString;
|
|
323
|
+
versionId: z.ZodString;
|
|
324
|
+
changed: z.ZodObject<{
|
|
325
|
+
name: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
from: z.ZodString;
|
|
327
|
+
to: z.ZodString;
|
|
328
|
+
}, z.core.$strip>>;
|
|
329
|
+
externalId: z.ZodOptional<z.ZodObject<{
|
|
330
|
+
from: z.ZodNullable<z.ZodString>;
|
|
331
|
+
to: z.ZodNullable<z.ZodString>;
|
|
332
|
+
}, z.core.$strip>>;
|
|
333
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
334
|
+
from: z.ZodString;
|
|
335
|
+
to: z.ZodString;
|
|
336
|
+
}, z.core.$strip>>;
|
|
337
|
+
}, z.core.$strip>;
|
|
338
|
+
}, z.core.$strip>;
|
|
339
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
340
|
+
id: z.ZodString;
|
|
341
|
+
clientId: z.ZodString;
|
|
342
|
+
clientType: z.ZodEnum<{
|
|
343
|
+
system: "system";
|
|
344
|
+
user: "user";
|
|
345
|
+
}>;
|
|
346
|
+
createdAt: z.ZodString;
|
|
347
|
+
operation: z.ZodLiteral<"administrativeAreas.update">;
|
|
348
|
+
requestData: z.ZodObject<{
|
|
349
|
+
id: z.ZodString;
|
|
350
|
+
versionId: z.ZodString;
|
|
351
|
+
name: z.ZodString;
|
|
352
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
353
|
+
status: z.ZodString;
|
|
354
|
+
effectiveFrom: z.ZodString;
|
|
355
|
+
lastVersionId: z.ZodString;
|
|
356
|
+
}, z.core.$strip>;
|
|
357
|
+
responseSummary: z.ZodObject<{
|
|
358
|
+
previousVersionId: z.ZodString;
|
|
359
|
+
versionId: z.ZodString;
|
|
360
|
+
changed: z.ZodObject<{
|
|
361
|
+
name: z.ZodOptional<z.ZodObject<{
|
|
362
|
+
from: z.ZodString;
|
|
363
|
+
to: z.ZodString;
|
|
364
|
+
}, z.core.$strip>>;
|
|
365
|
+
externalId: z.ZodOptional<z.ZodObject<{
|
|
366
|
+
from: z.ZodNullable<z.ZodString>;
|
|
367
|
+
to: z.ZodNullable<z.ZodString>;
|
|
368
|
+
}, z.core.$strip>>;
|
|
369
|
+
status: z.ZodOptional<z.ZodObject<{
|
|
370
|
+
from: z.ZodString;
|
|
371
|
+
to: z.ZodString;
|
|
372
|
+
}, z.core.$strip>>;
|
|
373
|
+
}, z.core.$strip>;
|
|
374
|
+
}, z.core.$strip>;
|
|
375
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
376
|
+
id: z.ZodString;
|
|
377
|
+
clientId: z.ZodString;
|
|
378
|
+
clientType: z.ZodEnum<{
|
|
379
|
+
system: "system";
|
|
380
|
+
user: "user";
|
|
381
|
+
}>;
|
|
382
|
+
createdAt: z.ZodString;
|
|
383
|
+
operation: z.ZodLiteral<"locations.withdrawVersion">;
|
|
384
|
+
requestData: z.ZodObject<{
|
|
385
|
+
id: z.ZodString;
|
|
386
|
+
versionId: z.ZodString;
|
|
387
|
+
}, z.core.$strip>;
|
|
388
|
+
responseSummary: z.ZodObject<{
|
|
389
|
+
effectiveFrom: z.ZodString;
|
|
390
|
+
name: z.ZodString;
|
|
391
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
392
|
+
status: z.ZodString;
|
|
393
|
+
}, z.core.$strip>;
|
|
394
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
395
|
+
id: z.ZodString;
|
|
396
|
+
clientId: z.ZodString;
|
|
397
|
+
clientType: z.ZodEnum<{
|
|
398
|
+
system: "system";
|
|
399
|
+
user: "user";
|
|
400
|
+
}>;
|
|
401
|
+
createdAt: z.ZodString;
|
|
402
|
+
operation: z.ZodLiteral<"administrativeAreas.withdrawVersion">;
|
|
403
|
+
requestData: z.ZodObject<{
|
|
404
|
+
id: z.ZodString;
|
|
405
|
+
versionId: z.ZodString;
|
|
406
|
+
}, z.core.$strip>;
|
|
407
|
+
responseSummary: z.ZodObject<{
|
|
408
|
+
effectiveFrom: z.ZodString;
|
|
409
|
+
name: z.ZodString;
|
|
410
|
+
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
411
|
+
status: z.ZodString;
|
|
412
|
+
}, z.core.$strip>;
|
|
303
413
|
}, z.core.$strip>, z.ZodObject<{
|
|
304
414
|
id: z.ZodString;
|
|
305
415
|
clientId: z.ZodString;
|
|
@@ -6,6 +6,8 @@ import { AdvancedSearchConfig } from './AdvancedSearchConfig';
|
|
|
6
6
|
import { DeclarationFormConfig, DeclarationFormConfigInput } from './FormConfig';
|
|
7
7
|
import { FieldReference } from './FieldConfig';
|
|
8
8
|
import { FlagConfig } from './Flag';
|
|
9
|
+
import type { JSONSchema } from '../conditionals/conditionals';
|
|
10
|
+
import { AvailableIcons } from '../icons';
|
|
9
11
|
export declare const EventFieldReference: z.ZodObject<{
|
|
10
12
|
$$event: z.ZodEnum<{
|
|
11
13
|
createdAt: "createdAt";
|
|
@@ -32,6 +34,7 @@ export type EventConfig = {
|
|
|
32
34
|
advancedSearch: AdvancedSearchConfig[];
|
|
33
35
|
flags: FlagConfig[];
|
|
34
36
|
analytics: boolean;
|
|
37
|
+
icon?: Partial<Record<AvailableIcons, JSONSchema>>;
|
|
35
38
|
};
|
|
36
39
|
export type EventConfigInput = Omit<EventConfig, 'advancedSearch' | 'flags' | 'declaration' | 'actions' | 'dateOfEvent' | 'placeOfEvent' | 'analytics'> & {
|
|
37
40
|
dateOfEvent?: z.input<typeof FieldReference> | z.infer<typeof EventFieldReference>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z, ZodType } from 'zod/v4';
|
|
2
|
+
export { ContainsFlags } from './Flag';
|
|
2
3
|
export declare const EventIndex: z.ZodObject<{
|
|
3
4
|
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
4
5
|
type: z.ZodString;
|
|
@@ -123,29 +124,6 @@ export declare const Range: z.ZodObject<{
|
|
|
123
124
|
gte: z.ZodString;
|
|
124
125
|
lte: z.ZodString;
|
|
125
126
|
}, z.core.$strip>;
|
|
126
|
-
export declare const ContainsFlags: z.ZodObject<{
|
|
127
|
-
anyOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
128
|
-
readonly INCOMPLETE: 'incomplete';
|
|
129
|
-
readonly REJECTED: 'rejected';
|
|
130
|
-
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
131
|
-
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
132
|
-
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
133
|
-
}>]>, z.ZodString]>>>;
|
|
134
|
-
noneOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
135
|
-
readonly INCOMPLETE: 'incomplete';
|
|
136
|
-
readonly REJECTED: 'rejected';
|
|
137
|
-
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
138
|
-
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
139
|
-
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
140
|
-
}>]>, z.ZodString]>>>;
|
|
141
|
-
allOf: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodEnum<{
|
|
142
|
-
readonly INCOMPLETE: 'incomplete';
|
|
143
|
-
readonly REJECTED: 'rejected';
|
|
144
|
-
readonly CORRECTION_REQUESTED: 'correction-requested';
|
|
145
|
-
readonly POTENTIAL_DUPLICATE: 'potential-duplicate';
|
|
146
|
-
readonly EDIT_IN_PROGRESS: 'edit-in-progress';
|
|
147
|
-
}>]>, z.ZodString]>>>;
|
|
148
|
-
}, z.core.$strip>;
|
|
149
127
|
export declare const Within: z.ZodObject<{
|
|
150
128
|
type: z.ZodLiteral<"within">;
|
|
151
129
|
location: z.ZodString;
|
|
@@ -340,10 +318,10 @@ export type QueryTypeShape = {
|
|
|
340
318
|
};
|
|
341
319
|
export declare const QueryType: z.ZodType<QueryTypeShape>;
|
|
342
320
|
export declare const SearchQuery: z.ZodObject<{
|
|
343
|
-
query: z.
|
|
321
|
+
query: z.ZodPreprocess<ZodType<QueryTypeShape, unknown, z.core.$ZodTypeInternals<QueryTypeShape, unknown>>>;
|
|
344
322
|
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
345
323
|
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
346
|
-
sort: z.ZodOptional<z.
|
|
324
|
+
sort: z.ZodOptional<z.ZodPreprocess<z.ZodArray<z.ZodObject<{
|
|
347
325
|
field: z.ZodString;
|
|
348
326
|
direction: z.ZodDefault<z.ZodEnum<{
|
|
349
327
|
asc: "asc";
|
|
@@ -354,5 +332,4 @@ export declare const SearchQuery: z.ZodObject<{
|
|
|
354
332
|
export type SearchQuery = z.infer<typeof SearchQuery>;
|
|
355
333
|
export type QueryType = z.infer<typeof QueryType>;
|
|
356
334
|
export type QueryExpression = z.infer<typeof QueryExpression>;
|
|
357
|
-
export {};
|
|
358
335
|
//# sourceMappingURL=EventIndex.d.ts.map
|