@opencrvs/toolkit 2.1.0-rc.d6a3ca1 → 2.1.0-rc.d876831
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/dist/application-config/index.js +228 -196
- package/dist/cli.js +174 -58
- package/dist/commons/api/router.d.ts +295 -18
- package/dist/commons/conditionals/conditionals.d.ts +6 -6
- package/dist/commons/conditionals/validate.d.ts +11 -4
- 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 +12 -0
- package/dist/commons/events/AuditLog.d.ts +147 -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 +70 -53
- package/dist/commons/events/FieldTypeMapping.d.ts +19 -19
- package/dist/commons/events/FieldValue.d.ts +2 -2
- package/dist/commons/events/Flag.d.ts +42 -0
- package/dist/commons/events/PlainDate.d.ts +8 -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/commons/events/index.d.ts +1 -0
- package/dist/commons/events/locationPayloads.d.ts +95 -0
- package/dist/commons/events/locations.d.ts +191 -11
- package/dist/commons/events/mocks.test.utils.d.ts +46 -2
- package/dist/commons/events/test.utils.d.ts +5 -5
- package/dist/conditionals/index.js +303 -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 +3627 -3289
- package/dist/notification/index.js +1925 -1102
- package/dist/scopes/index.d.ts +251 -26
- package/dist/scopes/index.js +304 -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.d876831.tgz +0 -0
- package/package.json +5 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.1.0-rc.d6a3ca1.tgz +0 -0
|
@@ -7834,8 +7834,8 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7834
7834
|
email?: string | undefined;
|
|
7835
7835
|
status?: string | undefined;
|
|
7836
7836
|
primaryOfficeId?: string | undefined;
|
|
7837
|
-
count
|
|
7838
|
-
skip
|
|
7837
|
+
count?: number | undefined;
|
|
7838
|
+
skip?: number | undefined;
|
|
7839
7839
|
sortBy?: "createdAt" | "email" | "firstname" | "role" | "status" | "surname" | "username" | undefined;
|
|
7840
7840
|
sortOrder: "asc" | "desc";
|
|
7841
7841
|
};
|
|
@@ -8242,6 +8242,135 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8242
8242
|
responseSummary: {
|
|
8243
8243
|
clientId: string;
|
|
8244
8244
|
};
|
|
8245
|
+
} | {
|
|
8246
|
+
id: string;
|
|
8247
|
+
clientId: string;
|
|
8248
|
+
clientType: "system" | "user";
|
|
8249
|
+
createdAt: string;
|
|
8250
|
+
operation: "locations.create";
|
|
8251
|
+
requestData: {
|
|
8252
|
+
id: string;
|
|
8253
|
+
versionId: string;
|
|
8254
|
+
name: string;
|
|
8255
|
+
externalId?: string | null | undefined;
|
|
8256
|
+
effectiveFrom: string;
|
|
8257
|
+
status: string;
|
|
8258
|
+
administrativeAreaId?: string | null | undefined;
|
|
8259
|
+
locationType?: string | null | undefined;
|
|
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
|
+
};
|
|
8359
|
+
} | {
|
|
8360
|
+
id: string;
|
|
8361
|
+
clientId: string;
|
|
8362
|
+
clientType: "system" | "user";
|
|
8363
|
+
createdAt: string;
|
|
8364
|
+
operation: "administrativeAreas.create";
|
|
8365
|
+
requestData: {
|
|
8366
|
+
id: string;
|
|
8367
|
+
versionId: string;
|
|
8368
|
+
name: string;
|
|
8369
|
+
externalId?: string | null | undefined;
|
|
8370
|
+
effectiveFrom: string;
|
|
8371
|
+
status: string;
|
|
8372
|
+
parentId?: string | null | undefined;
|
|
8373
|
+
};
|
|
8245
8374
|
} | {
|
|
8246
8375
|
id: string;
|
|
8247
8376
|
clientId: string;
|
|
@@ -8351,22 +8480,94 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8351
8480
|
name: string;
|
|
8352
8481
|
externalId?: string | null | undefined;
|
|
8353
8482
|
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8354
|
-
validUntil: string | null;
|
|
8355
8483
|
locationType: string | null;
|
|
8484
|
+
status: "active" | "inactive";
|
|
8485
|
+
versions: {
|
|
8486
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
8487
|
+
effectiveFrom: string;
|
|
8488
|
+
name: string;
|
|
8489
|
+
externalId?: string | null | undefined;
|
|
8490
|
+
status: "active" | "inactive";
|
|
8491
|
+
}[];
|
|
8356
8492
|
}[];
|
|
8357
8493
|
meta: object;
|
|
8358
8494
|
}>;
|
|
8359
|
-
|
|
8495
|
+
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
8360
8496
|
input: {
|
|
8361
|
-
id
|
|
8497
|
+
id?: string | undefined;
|
|
8498
|
+
versionId?: string | undefined;
|
|
8362
8499
|
name: string;
|
|
8363
8500
|
externalId?: string | null | undefined;
|
|
8364
8501
|
administrativeAreaId: string | null;
|
|
8365
|
-
validUntil: string | null;
|
|
8366
8502
|
locationType: string | null;
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
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;
|
|
8522
|
+
}>;
|
|
8523
|
+
update: import("@trpc/server").TRPCMutationProcedure<{
|
|
8524
|
+
input: {
|
|
8525
|
+
id: string;
|
|
8526
|
+
versionId?: string | undefined;
|
|
8527
|
+
name: string;
|
|
8528
|
+
externalId?: string | null | undefined;
|
|
8529
|
+
status: "active" | "inactive";
|
|
8530
|
+
effectiveFrom?: string | undefined;
|
|
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;
|
|
8554
|
+
};
|
|
8555
|
+
output: {
|
|
8556
|
+
id: string & import("zod").$brand<"UUID">;
|
|
8557
|
+
name: string;
|
|
8558
|
+
externalId?: string | null | undefined;
|
|
8559
|
+
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8560
|
+
locationType: string | null;
|
|
8561
|
+
status: "active" | "inactive";
|
|
8562
|
+
versions: {
|
|
8563
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
8564
|
+
effectiveFrom: string;
|
|
8565
|
+
name: string;
|
|
8566
|
+
externalId?: string | null | undefined;
|
|
8567
|
+
status: "active" | "inactive";
|
|
8568
|
+
}[];
|
|
8569
|
+
};
|
|
8570
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8370
8571
|
}>;
|
|
8371
8572
|
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
8372
8573
|
input: {
|
|
@@ -8377,8 +8578,15 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8377
8578
|
name: string;
|
|
8378
8579
|
externalId?: string | null | undefined;
|
|
8379
8580
|
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8380
|
-
validUntil: string | null;
|
|
8381
8581
|
locationType: string | null;
|
|
8582
|
+
status: "active" | "inactive";
|
|
8583
|
+
versions: {
|
|
8584
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
8585
|
+
effectiveFrom: string;
|
|
8586
|
+
name: string;
|
|
8587
|
+
externalId?: string | null | undefined;
|
|
8588
|
+
status: "active" | "inactive";
|
|
8589
|
+
}[];
|
|
8382
8590
|
};
|
|
8383
8591
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8384
8592
|
}>;
|
|
@@ -8735,7 +8943,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8735
8943
|
$event: "assignedTo" | "createdAt" | "createdAtLocation" | "createdBy" | "createdByUserType" | "dateOfEvent" | "flags" | "id" | "legalStatuses" | "outbox" | "placeOfEvent" | "status" | "title" | "trackingId" | "type" | "updatedAt" | "updatedAtLocation" | "updatedBy" | "updatedByUserRole";
|
|
8736
8944
|
};
|
|
8737
8945
|
}[];
|
|
8738
|
-
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";
|
|
8739
8947
|
emptyMessage?: {
|
|
8740
8948
|
id: string;
|
|
8741
8949
|
defaultMessage: string;
|
|
@@ -8786,20 +8994,89 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8786
8994
|
name: string;
|
|
8787
8995
|
externalId?: string | null | undefined;
|
|
8788
8996
|
parentId: (string & import("zod").$brand<"UUID">) | null;
|
|
8789
|
-
|
|
8997
|
+
status: "active" | "inactive";
|
|
8998
|
+
versions: {
|
|
8999
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
9000
|
+
effectiveFrom: string;
|
|
9001
|
+
name: string;
|
|
9002
|
+
externalId?: string | null | undefined;
|
|
9003
|
+
status: "active" | "inactive";
|
|
9004
|
+
}[];
|
|
8790
9005
|
}[];
|
|
8791
9006
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8792
9007
|
}>;
|
|
8793
|
-
|
|
9008
|
+
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
9009
|
+
input: {
|
|
9010
|
+
id?: string | undefined;
|
|
9011
|
+
versionId?: string | undefined;
|
|
9012
|
+
name: string;
|
|
9013
|
+
externalId?: string | null | undefined;
|
|
9014
|
+
parentId: string | null;
|
|
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;
|
|
9033
|
+
}>;
|
|
9034
|
+
update: import("@trpc/server").TRPCMutationProcedure<{
|
|
8794
9035
|
input: {
|
|
8795
9036
|
id: string;
|
|
9037
|
+
versionId?: string | undefined;
|
|
8796
9038
|
name: string;
|
|
8797
9039
|
externalId?: string | null | undefined;
|
|
8798
|
-
|
|
8799
|
-
|
|
8800
|
-
|
|
8801
|
-
|
|
8802
|
-
|
|
9040
|
+
status: "active" | "inactive";
|
|
9041
|
+
effectiveFrom?: string | undefined;
|
|
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;
|
|
9064
|
+
};
|
|
9065
|
+
output: {
|
|
9066
|
+
id: string & import("zod").$brand<"UUID">;
|
|
9067
|
+
name: string;
|
|
9068
|
+
externalId?: string | null | undefined;
|
|
9069
|
+
parentId: (string & import("zod").$brand<"UUID">) | null;
|
|
9070
|
+
status: "active" | "inactive";
|
|
9071
|
+
versions: {
|
|
9072
|
+
versionId: string & import("zod").$brand<"UUID">;
|
|
9073
|
+
effectiveFrom: string;
|
|
9074
|
+
name: string;
|
|
9075
|
+
externalId?: string | null | undefined;
|
|
9076
|
+
status: "active" | "inactive";
|
|
9077
|
+
}[];
|
|
9078
|
+
};
|
|
9079
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8803
9080
|
}>;
|
|
8804
9081
|
}>>;
|
|
8805
9082
|
integrations: import("@trpc/server").TRPCBuiltRouter<{
|
|
@@ -85,17 +85,17 @@ export declare const now: typeof todayDateTimeValueSerializer;
|
|
|
85
85
|
export declare const user: typeof userSerializer & {
|
|
86
86
|
scope: (scope: import("../scopes").ScopeType) => {
|
|
87
87
|
attribute: (option: import("../scopes").ScopeOptionKey) => {
|
|
88
|
-
$scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "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";
|
|
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" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
|
|
90
90
|
};
|
|
91
91
|
};
|
|
92
92
|
jurisdiction: (jurisdiction: import("../scopes").JurisdictionFilter | {
|
|
93
|
-
$scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "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";
|
|
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" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
|
|
95
95
|
}) => {
|
|
96
96
|
$jurisdiction: "administrativeArea" | "all" | "location" | {
|
|
97
|
-
$scope: "attachment.upload" | "bypassratelimit" | "config.update-all" | "dashboard.view" | "integration.create" | "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";
|
|
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" | "flags" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
101
|
hasScope: (scope: string) => JSONSchema;
|
|
@@ -2,7 +2,7 @@ import { ConditionalParameters, JSONSchema } from './conditionals';
|
|
|
2
2
|
import { ActionUpdate, EventState } from '../events/ActionDocument';
|
|
3
3
|
import { FieldConditional } from '../events/Conditional';
|
|
4
4
|
import { FieldConfig } from '../events/FieldConfig';
|
|
5
|
-
import { FieldUpdateValue, FieldValue } from '../events/FieldValue';
|
|
5
|
+
import { PlainDate, FieldUpdateValue, FieldValue } from '../events/FieldValue';
|
|
6
6
|
import { TranslationConfig } from '../events/TranslationConfig';
|
|
7
7
|
import { ITokenPayload } from '../authentication';
|
|
8
8
|
import { UUID } from '../uuid';
|
|
@@ -14,8 +14,8 @@ import { EventDocument } from '../events/EventDocument';
|
|
|
14
14
|
import { EventIndex } from '../events/EventIndex';
|
|
15
15
|
import { Location } from '../events/locations';
|
|
16
16
|
import { SystemVariables } from '../events/TemplateConfig';
|
|
17
|
-
/** Returns today's date as
|
|
18
|
-
export declare function todayISO():
|
|
17
|
+
/** Returns today's date as a {@link PlainDate} (YYYY-MM-DD), device-local. */
|
|
18
|
+
export declare function todayISO(): PlainDate;
|
|
19
19
|
/**
|
|
20
20
|
* Context passed to every serialised client-side function ({@link runClientFunction}).
|
|
21
21
|
*
|
|
@@ -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
|
|
@@ -103,6 +103,7 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
|
103
103
|
"config.update-all": "config.update-all";
|
|
104
104
|
"dashboard.view": "dashboard.view";
|
|
105
105
|
"integration.create": "integration.create";
|
|
106
|
+
"location.edit": "location.edit";
|
|
106
107
|
"organisation.read-locations": "organisation.read-locations";
|
|
107
108
|
"performance.read": "performance.read";
|
|
108
109
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -141,6 +142,7 @@ export declare const FieldConfigSchema: z.ZodObject<{
|
|
|
141
142
|
declaredBy: "declaredBy";
|
|
142
143
|
declaredIn: "declaredIn";
|
|
143
144
|
event: "event";
|
|
145
|
+
flags: "flags";
|
|
144
146
|
ids: "ids";
|
|
145
147
|
notifiedBy: "notifiedBy";
|
|
146
148
|
notifiedIn: "notifiedIn";
|
|
@@ -283,6 +285,7 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
|
|
|
283
285
|
"config.update-all": "config.update-all";
|
|
284
286
|
"dashboard.view": "dashboard.view";
|
|
285
287
|
"integration.create": "integration.create";
|
|
288
|
+
"location.edit": "location.edit";
|
|
286
289
|
"organisation.read-locations": "organisation.read-locations";
|
|
287
290
|
"performance.read": "performance.read";
|
|
288
291
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -321,6 +324,7 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
|
|
|
321
324
|
declaredBy: "declaredBy";
|
|
322
325
|
declaredIn: "declaredIn";
|
|
323
326
|
event: "event";
|
|
327
|
+
flags: "flags";
|
|
324
328
|
ids: "ids";
|
|
325
329
|
notifiedBy: "notifiedBy";
|
|
326
330
|
notifiedIn: "notifiedIn";
|
|
@@ -439,6 +443,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
439
443
|
"config.update-all": "config.update-all";
|
|
440
444
|
"dashboard.view": "dashboard.view";
|
|
441
445
|
"integration.create": "integration.create";
|
|
446
|
+
"location.edit": "location.edit";
|
|
442
447
|
"organisation.read-locations": "organisation.read-locations";
|
|
443
448
|
"performance.read": "performance.read";
|
|
444
449
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -477,6 +482,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
477
482
|
declaredBy: "declaredBy";
|
|
478
483
|
declaredIn: "declaredIn";
|
|
479
484
|
event: "event";
|
|
485
|
+
flags: "flags";
|
|
480
486
|
ids: "ids";
|
|
481
487
|
notifiedBy: "notifiedBy";
|
|
482
488
|
notifiedIn: "notifiedIn";
|
|
@@ -587,6 +593,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
587
593
|
"config.update-all": "config.update-all";
|
|
588
594
|
"dashboard.view": "dashboard.view";
|
|
589
595
|
"integration.create": "integration.create";
|
|
596
|
+
"location.edit": "location.edit";
|
|
590
597
|
"organisation.read-locations": "organisation.read-locations";
|
|
591
598
|
"performance.read": "performance.read";
|
|
592
599
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -625,6 +632,7 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
625
632
|
declaredBy: "declaredBy";
|
|
626
633
|
declaredIn: "declaredIn";
|
|
627
634
|
event: "event";
|
|
635
|
+
flags: "flags";
|
|
628
636
|
ids: "ids";
|
|
629
637
|
notifiedBy: "notifiedBy";
|
|
630
638
|
notifiedIn: "notifiedIn";
|
|
@@ -746,6 +754,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
746
754
|
"config.update-all": "config.update-all";
|
|
747
755
|
"dashboard.view": "dashboard.view";
|
|
748
756
|
"integration.create": "integration.create";
|
|
757
|
+
"location.edit": "location.edit";
|
|
749
758
|
"organisation.read-locations": "organisation.read-locations";
|
|
750
759
|
"performance.read": "performance.read";
|
|
751
760
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -784,6 +793,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
784
793
|
declaredBy: "declaredBy";
|
|
785
794
|
declaredIn: "declaredIn";
|
|
786
795
|
event: "event";
|
|
796
|
+
flags: "flags";
|
|
787
797
|
ids: "ids";
|
|
788
798
|
notifiedBy: "notifiedBy";
|
|
789
799
|
notifiedIn: "notifiedIn";
|
|
@@ -894,6 +904,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
894
904
|
"config.update-all": "config.update-all";
|
|
895
905
|
"dashboard.view": "dashboard.view";
|
|
896
906
|
"integration.create": "integration.create";
|
|
907
|
+
"location.edit": "location.edit";
|
|
897
908
|
"organisation.read-locations": "organisation.read-locations";
|
|
898
909
|
"performance.read": "performance.read";
|
|
899
910
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -932,6 +943,7 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
932
943
|
declaredBy: "declaredBy";
|
|
933
944
|
declaredIn: "declaredIn";
|
|
934
945
|
event: "event";
|
|
946
|
+
flags: "flags";
|
|
935
947
|
ids: "ids";
|
|
936
948
|
notifiedBy: "notifiedBy";
|
|
937
949
|
notifiedIn: "notifiedIn";
|