@opencrvs/toolkit 2.0.0-rc.f58809d → 2.0.0-rc.f5b6bcb
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/dist/application-config/index.js +192 -60
- package/dist/cli.js +95 -6
- package/dist/commons/api/router.d.ts +347 -31
- package/dist/commons/events/EventIndex.d.ts +0 -3
- package/dist/commons/events/EventMetadata.d.ts +0 -7
- package/dist/commons/events/WorkqueueConfig.d.ts +150 -150
- package/dist/commons/events/state/index.d.ts +0 -4
- package/dist/commons/events/state/utils.d.ts +0 -2
- package/dist/events/index.js +203 -94
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts +3 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.d.ts.map +1 -0
- package/dist/migrations/v2.0/fix-accept-requested-registration-function-type.js +110 -0
- package/dist/migrations/v2.0/index.d.ts.map +1 -1
- package/dist/migrations/v2.0/index.js +93 -4
- package/dist/notification/index.js +203 -78
- package/opencrvs-toolkit-2.0.0-rc.f5b6bcb.tgz +0 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/opencrvs-toolkit-2.0.0-rc.f58809d.tgz +0 -0
package/dist/cli.js
CHANGED
|
@@ -1883,9 +1883,9 @@ function updateRouteHandlers(sourceFiles, group, srcDir, relCwd) {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
return replacedCount;
|
|
1885
1885
|
}
|
|
1886
|
-
function resolveConfigChain(configObj,
|
|
1886
|
+
function resolveConfigChain(configObj, path24) {
|
|
1887
1887
|
let current = configObj;
|
|
1888
|
-
for (const key of
|
|
1888
|
+
for (const key of path24) {
|
|
1889
1889
|
if (!import_ts_morph10.Node.isObjectLiteralExpression(current)) return null;
|
|
1890
1890
|
const prop = current.getProperty(key);
|
|
1891
1891
|
if (!prop || !import_ts_morph10.Node.isPropertyAssignment(prop)) return null;
|
|
@@ -4831,9 +4831,9 @@ var import_path24 = require("path");
|
|
|
4831
4831
|
var TEMP_REMOTE2 = "opencrvs-upgrade-v19-v20-codemod-merge-infra";
|
|
4832
4832
|
var INFRASTRUCTURE_DIR = "infrastructure";
|
|
4833
4833
|
var BASE_BRANCH = "release-v1.9";
|
|
4834
|
-
function gitShowBytes(ref,
|
|
4834
|
+
function gitShowBytes(ref, path24) {
|
|
4835
4835
|
try {
|
|
4836
|
-
const buf = (0, import_child_process2.execFileSync)("git", ["show", `${ref}:${
|
|
4836
|
+
const buf = (0, import_child_process2.execFileSync)("git", ["show", `${ref}:${path24}`], {
|
|
4837
4837
|
cwd: process.cwd(),
|
|
4838
4838
|
stdio: ["ignore", "pipe", "pipe"]
|
|
4839
4839
|
});
|
|
@@ -5009,6 +5009,94 @@ async function main26({
|
|
|
5009
5009
|
);
|
|
5010
5010
|
}
|
|
5011
5011
|
|
|
5012
|
+
// src/migrations/v2.0/fix-accept-requested-registration-function-type.ts
|
|
5013
|
+
var import_ts_morph22 = require("ts-morph");
|
|
5014
|
+
var import_path26 = __toESM(require("path"));
|
|
5015
|
+
var TARGET_FUNCTION_NAME = "acceptRequestedRegistration";
|
|
5016
|
+
var ACTION_PARAMETER_NAME = "action";
|
|
5017
|
+
var OLD_TYPE = "ActionInput";
|
|
5018
|
+
var NEW_TYPE = "Extract<ActionInput, { type?: 'REGISTER' }>";
|
|
5019
|
+
function isAcceptRequestedRegistrationParameter(parameter) {
|
|
5020
|
+
const functionDeclaration = parameter.getFirstAncestorByKind(
|
|
5021
|
+
import_ts_morph22.SyntaxKind.FunctionDeclaration
|
|
5022
|
+
);
|
|
5023
|
+
if (functionDeclaration?.getName() === TARGET_FUNCTION_NAME) {
|
|
5024
|
+
return true;
|
|
5025
|
+
}
|
|
5026
|
+
const arrowFunction = parameter.getFirstAncestorByKind(
|
|
5027
|
+
import_ts_morph22.SyntaxKind.ArrowFunction
|
|
5028
|
+
);
|
|
5029
|
+
const variableDeclaration = arrowFunction?.getFirstAncestorByKind(
|
|
5030
|
+
import_ts_morph22.SyntaxKind.VariableDeclaration
|
|
5031
|
+
);
|
|
5032
|
+
return variableDeclaration?.getName() === TARGET_FUNCTION_NAME;
|
|
5033
|
+
}
|
|
5034
|
+
function processFile14(filePath, project) {
|
|
5035
|
+
const sourceFile = project.getSourceFile(filePath);
|
|
5036
|
+
if (!sourceFile) return 0;
|
|
5037
|
+
let updatedCount = 0;
|
|
5038
|
+
for (const parameter of sourceFile.getDescendantsOfKind(
|
|
5039
|
+
import_ts_morph22.SyntaxKind.Parameter
|
|
5040
|
+
)) {
|
|
5041
|
+
if (parameter.getName() !== ACTION_PARAMETER_NAME) {
|
|
5042
|
+
continue;
|
|
5043
|
+
}
|
|
5044
|
+
if (!isAcceptRequestedRegistrationParameter(parameter)) {
|
|
5045
|
+
continue;
|
|
5046
|
+
}
|
|
5047
|
+
const typeNode = parameter.getTypeNode();
|
|
5048
|
+
if (!typeNode || typeNode.getText() !== OLD_TYPE) {
|
|
5049
|
+
continue;
|
|
5050
|
+
}
|
|
5051
|
+
parameter.setType(NEW_TYPE);
|
|
5052
|
+
updatedCount++;
|
|
5053
|
+
console.log(
|
|
5054
|
+
` [${import_path26.default.relative(process.cwd(), filePath)}] Updated '${ACTION_PARAMETER_NAME}' in ${TARGET_FUNCTION_NAME} to ${NEW_TYPE}`
|
|
5055
|
+
);
|
|
5056
|
+
}
|
|
5057
|
+
return updatedCount;
|
|
5058
|
+
}
|
|
5059
|
+
async function main27() {
|
|
5060
|
+
const srcDir = import_path26.default.join(process.cwd(), "src");
|
|
5061
|
+
console.log(`Scanning for ${TARGET_FUNCTION_NAME} in: ${srcDir}
|
|
5062
|
+
`);
|
|
5063
|
+
const project = new import_ts_morph22.Project({
|
|
5064
|
+
tsConfigFilePath: import_path26.default.resolve(srcDir, "../tsconfig.json"),
|
|
5065
|
+
skipAddingFilesFromTsConfig: false
|
|
5066
|
+
});
|
|
5067
|
+
const sourceFiles = project.getSourceFiles().filter((sf) => {
|
|
5068
|
+
const filePath = sf.getFilePath();
|
|
5069
|
+
return filePath.includes("/src/") && !filePath.includes("/node_modules/");
|
|
5070
|
+
});
|
|
5071
|
+
let totalUpdated = 0;
|
|
5072
|
+
const modifiedFiles = [];
|
|
5073
|
+
for (const sourceFile of sourceFiles) {
|
|
5074
|
+
const filePath = sourceFile.getFilePath();
|
|
5075
|
+
const updated = processFile14(filePath, project);
|
|
5076
|
+
if (updated > 0) {
|
|
5077
|
+
totalUpdated += updated;
|
|
5078
|
+
modifiedFiles.push(filePath);
|
|
5079
|
+
}
|
|
5080
|
+
}
|
|
5081
|
+
if (modifiedFiles.length === 0) {
|
|
5082
|
+
console.log(
|
|
5083
|
+
`No '${ACTION_PARAMETER_NAME}: ${OLD_TYPE}' parameter in ${TARGET_FUNCTION_NAME} found. Nothing to do.`
|
|
5084
|
+
);
|
|
5085
|
+
return;
|
|
5086
|
+
}
|
|
5087
|
+
console.log(`
|
|
5088
|
+
Saving ${modifiedFiles.length} modified file(s)...`);
|
|
5089
|
+
for (const filePath of modifiedFiles) {
|
|
5090
|
+
const sourceFile = project.getSourceFileOrThrow(filePath);
|
|
5091
|
+
await sourceFile.save();
|
|
5092
|
+
console.log(` Saved: ${import_path26.default.relative(process.cwd(), filePath)}`);
|
|
5093
|
+
}
|
|
5094
|
+
console.log(
|
|
5095
|
+
`
|
|
5096
|
+
Done. Updated ${totalUpdated} parameter type annotation(s) in ${TARGET_FUNCTION_NAME}.`
|
|
5097
|
+
);
|
|
5098
|
+
}
|
|
5099
|
+
|
|
5012
5100
|
// src/migrations/v2.0/index.ts
|
|
5013
5101
|
var NON_SWARM_INFRA_SUBDIRS = ["postgres", "metabase"];
|
|
5014
5102
|
async function runUpgrade(dockerSwarm) {
|
|
@@ -5035,6 +5123,7 @@ async function runUpgrade(dockerSwarm) {
|
|
|
5035
5123
|
await main22();
|
|
5036
5124
|
await main23();
|
|
5037
5125
|
await main24();
|
|
5126
|
+
await main27();
|
|
5038
5127
|
await main17();
|
|
5039
5128
|
if (dockerSwarm) {
|
|
5040
5129
|
await main25();
|
|
@@ -5069,7 +5158,7 @@ Options:
|
|
|
5069
5158
|
'infrastructure/' directory is deleted (default).
|
|
5070
5159
|
-h, --help Show this message.
|
|
5071
5160
|
`.trim();
|
|
5072
|
-
function
|
|
5161
|
+
function main28() {
|
|
5073
5162
|
const command = args[0];
|
|
5074
5163
|
if (!command || command === "--help" || command === "-h") {
|
|
5075
5164
|
console.log(USAGE);
|
|
@@ -5144,4 +5233,4 @@ function handleCheckTranslations() {
|
|
|
5144
5233
|
console.warn("This command is not implemented yet!");
|
|
5145
5234
|
process.exit(1);
|
|
5146
5235
|
}
|
|
5147
|
-
|
|
5236
|
+
main28();
|
|
@@ -1445,6 +1445,345 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
1445
1445
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
1446
1446
|
}>;
|
|
1447
1447
|
}>>;
|
|
1448
|
+
createAndNotify: import("@trpc/server").TRPCBuiltRouter<{
|
|
1449
|
+
ctx: Partial<{
|
|
1450
|
+
token: `Bearer ${string}`;
|
|
1451
|
+
user: {
|
|
1452
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1453
|
+
type: "system";
|
|
1454
|
+
signature?: undefined;
|
|
1455
|
+
primaryOfficeId?: (string & import("zod").$brand<"UUID">) | undefined;
|
|
1456
|
+
administrativeAreaId?: (string & import("zod").$brand<"UUID">) | undefined;
|
|
1457
|
+
} | {
|
|
1458
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1459
|
+
type: "user";
|
|
1460
|
+
role: string;
|
|
1461
|
+
primaryOfficeId: string & import("zod").$brand<"UUID">;
|
|
1462
|
+
signature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1463
|
+
administrativeAreaId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1464
|
+
};
|
|
1465
|
+
}>;
|
|
1466
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
1467
|
+
errorShape: import("@trpc/server").TRPCDefaultErrorShape;
|
|
1468
|
+
transformer: true;
|
|
1469
|
+
}, import("@trpc/server").TRPCDecorateCreateRouterOptions<{
|
|
1470
|
+
request: import("@trpc/server").TRPCMutationProcedure<{
|
|
1471
|
+
input: {
|
|
1472
|
+
transactionId: string;
|
|
1473
|
+
eventType: string;
|
|
1474
|
+
createdAtLocation: string;
|
|
1475
|
+
declaration?: Record<string, unknown> | undefined;
|
|
1476
|
+
annotation?: Record<string, unknown> | undefined;
|
|
1477
|
+
originalActionId?: string | undefined;
|
|
1478
|
+
keepAssignment?: boolean | undefined;
|
|
1479
|
+
keepAssignmentIfAccepted?: boolean | undefined;
|
|
1480
|
+
keepAssignmentIfRejected?: boolean | undefined;
|
|
1481
|
+
waitFor?: boolean | undefined;
|
|
1482
|
+
};
|
|
1483
|
+
output: {
|
|
1484
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1485
|
+
type: string;
|
|
1486
|
+
createdAt: string;
|
|
1487
|
+
updatedAt: string;
|
|
1488
|
+
actions: ({
|
|
1489
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1490
|
+
transactionId: string;
|
|
1491
|
+
createdByUserType: "system" | "user";
|
|
1492
|
+
createdAt: string;
|
|
1493
|
+
createdBy: string;
|
|
1494
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1495
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1496
|
+
type: "CREATE";
|
|
1497
|
+
createdByRole?: string | undefined;
|
|
1498
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1499
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1500
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1501
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1502
|
+
} | {
|
|
1503
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1504
|
+
transactionId: string;
|
|
1505
|
+
createdByUserType: "system" | "user";
|
|
1506
|
+
createdAt: string;
|
|
1507
|
+
createdBy: string;
|
|
1508
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1509
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1510
|
+
type: "REJECT";
|
|
1511
|
+
content: {
|
|
1512
|
+
reason: string;
|
|
1513
|
+
};
|
|
1514
|
+
createdByRole?: string | undefined;
|
|
1515
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1516
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1517
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1518
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1519
|
+
} | {
|
|
1520
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1521
|
+
transactionId: string;
|
|
1522
|
+
createdByUserType: "system" | "user";
|
|
1523
|
+
createdAt: string;
|
|
1524
|
+
createdBy: string;
|
|
1525
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1526
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1527
|
+
type: "DUPLICATE_DETECTED";
|
|
1528
|
+
content: {
|
|
1529
|
+
duplicates: {
|
|
1530
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1531
|
+
trackingId: string;
|
|
1532
|
+
}[];
|
|
1533
|
+
};
|
|
1534
|
+
createdByRole?: string | undefined;
|
|
1535
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1536
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1537
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1538
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1539
|
+
} | {
|
|
1540
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1541
|
+
transactionId: string;
|
|
1542
|
+
createdByUserType: "system" | "user";
|
|
1543
|
+
createdAt: string;
|
|
1544
|
+
createdBy: string;
|
|
1545
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1546
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1547
|
+
type: "MARK_AS_NOT_DUPLICATE";
|
|
1548
|
+
createdByRole?: string | undefined;
|
|
1549
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1550
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1551
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1552
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1553
|
+
} | {
|
|
1554
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1555
|
+
transactionId: string;
|
|
1556
|
+
createdByUserType: "system" | "user";
|
|
1557
|
+
createdAt: string;
|
|
1558
|
+
createdBy: string;
|
|
1559
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1560
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1561
|
+
type: "MARK_AS_DUPLICATE";
|
|
1562
|
+
createdByRole?: string | undefined;
|
|
1563
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1564
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1565
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1566
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1567
|
+
content?: {
|
|
1568
|
+
duplicateOf: string & import("zod").$brand<"UUID">;
|
|
1569
|
+
} | undefined;
|
|
1570
|
+
} | {
|
|
1571
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1572
|
+
transactionId: string;
|
|
1573
|
+
createdByUserType: "system" | "user";
|
|
1574
|
+
createdAt: string;
|
|
1575
|
+
createdBy: string;
|
|
1576
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1577
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1578
|
+
type: "ARCHIVE";
|
|
1579
|
+
content: {
|
|
1580
|
+
reason: string;
|
|
1581
|
+
};
|
|
1582
|
+
createdByRole?: string | undefined;
|
|
1583
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1584
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1585
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1586
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1587
|
+
} | {
|
|
1588
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1589
|
+
transactionId: string;
|
|
1590
|
+
createdByUserType: "system" | "user";
|
|
1591
|
+
createdAt: string;
|
|
1592
|
+
createdBy: string;
|
|
1593
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1594
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1595
|
+
type: "NOTIFY";
|
|
1596
|
+
createdByRole?: string | undefined;
|
|
1597
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1598
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1599
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1600
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1601
|
+
} | {
|
|
1602
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1603
|
+
transactionId: string;
|
|
1604
|
+
createdByUserType: "system" | "user";
|
|
1605
|
+
createdAt: string;
|
|
1606
|
+
createdBy: string;
|
|
1607
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1608
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1609
|
+
type: "REGISTER";
|
|
1610
|
+
createdByRole?: string | undefined;
|
|
1611
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1612
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1613
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1614
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1615
|
+
registrationNumber?: string | undefined;
|
|
1616
|
+
} | {
|
|
1617
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1618
|
+
transactionId: string;
|
|
1619
|
+
createdByUserType: "system" | "user";
|
|
1620
|
+
createdAt: string;
|
|
1621
|
+
createdBy: string;
|
|
1622
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1623
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1624
|
+
type: "DECLARE";
|
|
1625
|
+
createdByRole?: string | undefined;
|
|
1626
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1627
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1628
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1629
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1630
|
+
} | {
|
|
1631
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1632
|
+
transactionId: string;
|
|
1633
|
+
createdByUserType: "system" | "user";
|
|
1634
|
+
createdAt: string;
|
|
1635
|
+
createdBy: string;
|
|
1636
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1637
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1638
|
+
type: "ASSIGN";
|
|
1639
|
+
assignedTo: string;
|
|
1640
|
+
createdByRole?: string | undefined;
|
|
1641
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1642
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1643
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1644
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1645
|
+
} | {
|
|
1646
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1647
|
+
transactionId: string;
|
|
1648
|
+
createdByUserType: "system" | "user";
|
|
1649
|
+
createdAt: string;
|
|
1650
|
+
createdBy: string;
|
|
1651
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1652
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1653
|
+
type: "REQUEST_CORRECTION";
|
|
1654
|
+
createdByRole?: string | undefined;
|
|
1655
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1656
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1657
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1658
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1659
|
+
} | {
|
|
1660
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1661
|
+
transactionId: string;
|
|
1662
|
+
createdByUserType: "system" | "user";
|
|
1663
|
+
createdAt: string;
|
|
1664
|
+
createdBy: string;
|
|
1665
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1666
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1667
|
+
type: "APPROVE_CORRECTION";
|
|
1668
|
+
requestId: string;
|
|
1669
|
+
createdByRole?: string | undefined;
|
|
1670
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1671
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1672
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1673
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1674
|
+
} | {
|
|
1675
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1676
|
+
transactionId: string;
|
|
1677
|
+
createdByUserType: "system" | "user";
|
|
1678
|
+
createdAt: string;
|
|
1679
|
+
createdBy: string;
|
|
1680
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1681
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1682
|
+
type: "REJECT_CORRECTION";
|
|
1683
|
+
requestId: string;
|
|
1684
|
+
content: {
|
|
1685
|
+
reason: string;
|
|
1686
|
+
};
|
|
1687
|
+
createdByRole?: string | undefined;
|
|
1688
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1689
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1690
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1691
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1692
|
+
} | {
|
|
1693
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1694
|
+
transactionId: string;
|
|
1695
|
+
createdByUserType: "system" | "user";
|
|
1696
|
+
createdAt: string;
|
|
1697
|
+
createdBy: string;
|
|
1698
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1699
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1700
|
+
type: "UNASSIGN";
|
|
1701
|
+
createdByRole?: string | undefined;
|
|
1702
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1703
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1704
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1705
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1706
|
+
} | {
|
|
1707
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1708
|
+
transactionId: string;
|
|
1709
|
+
createdByUserType: "system" | "user";
|
|
1710
|
+
createdAt: string;
|
|
1711
|
+
createdBy: string;
|
|
1712
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1713
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1714
|
+
type: "PRINT_CERTIFICATE";
|
|
1715
|
+
createdByRole?: string | undefined;
|
|
1716
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1717
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1718
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1719
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1720
|
+
content?: {
|
|
1721
|
+
templateId?: string | undefined;
|
|
1722
|
+
} | null | undefined;
|
|
1723
|
+
} | {
|
|
1724
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1725
|
+
transactionId: string;
|
|
1726
|
+
createdByUserType: "system" | "user";
|
|
1727
|
+
createdAt: string;
|
|
1728
|
+
createdBy: string;
|
|
1729
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1730
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1731
|
+
type: "READ";
|
|
1732
|
+
createdByRole?: string | undefined;
|
|
1733
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1734
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1735
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1736
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1737
|
+
} | {
|
|
1738
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1739
|
+
transactionId: string;
|
|
1740
|
+
createdByUserType: "system" | "user";
|
|
1741
|
+
createdAt: string;
|
|
1742
|
+
createdBy: string;
|
|
1743
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1744
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1745
|
+
type: "EDIT";
|
|
1746
|
+
content: {
|
|
1747
|
+
comment?: string | undefined;
|
|
1748
|
+
};
|
|
1749
|
+
createdByRole?: string | undefined;
|
|
1750
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1751
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1752
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1753
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1754
|
+
} | {
|
|
1755
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1756
|
+
transactionId: string;
|
|
1757
|
+
createdByUserType: "system" | "user";
|
|
1758
|
+
createdAt: string;
|
|
1759
|
+
createdBy: string;
|
|
1760
|
+
declaration: Record<string, import("../commons").FieldUpdateValue>;
|
|
1761
|
+
status: "Requested" | "Accepted" | "Rejected";
|
|
1762
|
+
type: "CUSTOM";
|
|
1763
|
+
customActionType: string;
|
|
1764
|
+
createdByRole?: string | undefined;
|
|
1765
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1766
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1767
|
+
annotation?: Record<string, import("../commons").FieldUpdateValue> | null | undefined;
|
|
1768
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1769
|
+
} | {
|
|
1770
|
+
id: string & import("zod").$brand<"UUID">;
|
|
1771
|
+
transactionId: string;
|
|
1772
|
+
createdByUserType: "system" | "user";
|
|
1773
|
+
createdAt: string;
|
|
1774
|
+
createdBy: string;
|
|
1775
|
+
type: "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "CUSTOM" | "NOTIFY" | "APPROVE_CORRECTION" | "REJECT_CORRECTION";
|
|
1776
|
+
status: "Rejected";
|
|
1777
|
+
createdByRole?: string | undefined;
|
|
1778
|
+
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
1779
|
+
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1780
|
+
originalActionId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
1781
|
+
})[];
|
|
1782
|
+
trackingId: string;
|
|
1783
|
+
};
|
|
1784
|
+
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
1785
|
+
}>;
|
|
1786
|
+
}>>;
|
|
1448
1787
|
declare: import("@trpc/server").TRPCBuiltRouter<{
|
|
1449
1788
|
ctx: Partial<{
|
|
1450
1789
|
token: `Bearer ${string}`;
|
|
@@ -6343,7 +6682,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6343
6682
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6344
6683
|
createdByUserType?: "system" | "user" | null | undefined;
|
|
6345
6684
|
createdByRole?: string | undefined;
|
|
6346
|
-
createdBySignature?: string | null | undefined;
|
|
6347
6685
|
} | null | undefined;
|
|
6348
6686
|
REGISTERED?: {
|
|
6349
6687
|
createdAt: string;
|
|
@@ -6353,7 +6691,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6353
6691
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6354
6692
|
createdByUserType?: "system" | "user" | null | undefined;
|
|
6355
6693
|
createdByRole?: string | undefined;
|
|
6356
|
-
createdBySignature?: string | null | undefined;
|
|
6357
6694
|
} | null | undefined;
|
|
6358
6695
|
};
|
|
6359
6696
|
createdAt: string;
|
|
@@ -6371,7 +6708,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6371
6708
|
createdByUserType?: "system" | "user" | null | undefined;
|
|
6372
6709
|
updatedByUserRole?: string | null | undefined;
|
|
6373
6710
|
createdAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6374
|
-
createdBySignature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
6375
6711
|
updatedAtLocation?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6376
6712
|
assignedTo?: string | null | undefined;
|
|
6377
6713
|
updatedBy?: string | null | undefined;
|
|
@@ -6830,33 +7166,22 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6830
7166
|
input: string[];
|
|
6831
7167
|
output: ({
|
|
6832
7168
|
id: string & import("zod").$brand<"UUID">;
|
|
7169
|
+
type: "user";
|
|
6833
7170
|
name: {
|
|
6834
7171
|
firstname: string;
|
|
6835
7172
|
surname: string;
|
|
6836
7173
|
};
|
|
6837
7174
|
role: string;
|
|
6838
7175
|
primaryOfficeId: string & import("zod").$brand<"UUID">;
|
|
6839
|
-
|
|
6840
|
-
status: "active" | "pending" | "deactivated";
|
|
7176
|
+
fullHonorificName?: string | undefined;
|
|
6841
7177
|
avatar?: (string & import("zod").$brand<"DocumentPath">) | undefined;
|
|
6842
|
-
signature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
6843
7178
|
administrativeAreaId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6844
|
-
device?: string | undefined;
|
|
6845
|
-
fullHonorificName?: string | undefined;
|
|
6846
|
-
mobile?: string | undefined;
|
|
6847
|
-
email?: string | undefined;
|
|
6848
|
-
data?: Record<string, import("../commons").FieldValue> | undefined;
|
|
6849
7179
|
} | {
|
|
6850
7180
|
id: string & import("zod").$brand<"UUID">;
|
|
6851
|
-
name: string;
|
|
6852
7181
|
type: "system";
|
|
7182
|
+
name: string;
|
|
6853
7183
|
primaryOfficeId?: (string & import("zod").$brand<"UUID">) | undefined;
|
|
6854
7184
|
administrativeAreaId?: (string & import("zod").$brand<"UUID">) | undefined;
|
|
6855
|
-
signature?: undefined;
|
|
6856
|
-
avatar?: undefined;
|
|
6857
|
-
fullHonorificName?: string | undefined;
|
|
6858
|
-
legacyId?: string | undefined;
|
|
6859
|
-
status?: undefined;
|
|
6860
7185
|
})[];
|
|
6861
7186
|
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
6862
7187
|
}>;
|
|
@@ -6874,33 +7199,24 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
6874
7199
|
};
|
|
6875
7200
|
output: ({
|
|
6876
7201
|
id: string & import("zod").$brand<"UUID">;
|
|
7202
|
+
type: "user";
|
|
6877
7203
|
name: {
|
|
6878
7204
|
firstname: string;
|
|
6879
7205
|
surname: string;
|
|
6880
7206
|
};
|
|
6881
7207
|
role: string;
|
|
6882
7208
|
primaryOfficeId: string & import("zod").$brand<"UUID">;
|
|
6883
|
-
type: "user";
|
|
6884
7209
|
status: "active" | "pending" | "deactivated";
|
|
7210
|
+
fullHonorificName?: string | undefined;
|
|
6885
7211
|
avatar?: (string & import("zod").$brand<"DocumentPath">) | undefined;
|
|
6886
|
-
signature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
|
|
6887
7212
|
administrativeAreaId?: (string & import("zod").$brand<"UUID">) | null | undefined;
|
|
6888
|
-
device?: string | undefined;
|
|
6889
|
-
fullHonorificName?: string | undefined;
|
|
6890
|
-
mobile?: string | undefined;
|
|
6891
|
-
email?: string | undefined;
|
|
6892
|
-
data?: Record<string, import("../commons").FieldValue> | undefined;
|
|
6893
7213
|
} | {
|
|
6894
7214
|
id: string & import("zod").$brand<"UUID">;
|
|
6895
|
-
name: string;
|
|
6896
7215
|
type: "system";
|
|
7216
|
+
name: string;
|
|
6897
7217
|
primaryOfficeId?: (string & import("zod").$brand<"UUID">) | undefined;
|
|
6898
7218
|
administrativeAreaId?: (string & import("zod").$brand<"UUID">) | undefined;
|
|
6899
|
-
|
|
6900
|
-
avatar?: undefined;
|
|
6901
|
-
fullHonorificName?: string | undefined;
|
|
6902
|
-
legacyId?: string | undefined;
|
|
6903
|
-
status?: undefined;
|
|
7219
|
+
status?: "active" | "pending" | "deactivated" | undefined;
|
|
6904
7220
|
})[];
|
|
6905
7221
|
meta: object;
|
|
6906
7222
|
}>;
|
|
@@ -7763,7 +8079,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
7763
8079
|
$event: "id" | "createdBy" | "createdAt" | "status" | "createdByUserType" | "createdAtLocation" | "updatedAt" | "assignedTo" | "trackingId" | "type" | "flags" | "dateOfEvent" | "placeOfEvent" | "title" | "legalStatuses" | "updatedByUserRole" | "updatedAtLocation" | "updatedBy" | "outbox";
|
|
7764
8080
|
};
|
|
7765
8081
|
}[];
|
|
7766
|
-
icon: "Archived" | "Assigned" | "Briefcase" | "Certified" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "Registered" | "RequiresUpdates" | "Sent" | "Validated" | "WaitingApproval" | "ChartActivity" | "Activity" | "Archive" | "ArchiveTray" | "ArrowLeft" | "ArrowRight" | "Buildings" | "Circle" | "CaretDown" | "CaretLeft" | "CaretRight" | "ChartBar" | "ChartLine" | "ChatCircle" | "CheckSquare" | "Compass" | "Check" | "Copy" | "Database" | "DotsThreeVertical" | "ArrowCounterClockwise" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "Export" | "Eye" | "EyeSlash" | "Envelope" | "
|
|
8082
|
+
icon: "File" | "Archived" | "Assigned" | "Briefcase" | "Certified" | "Close" | "Collapse" | "Draft" | "DuplicateYellow" | "Expand" | "ExternalValidate" | "FilledCheck" | "InReview" | "Offline" | "Registered" | "RequiresUpdates" | "Sent" | "Validated" | "WaitingApproval" | "ChartActivity" | "Activity" | "Archive" | "ArchiveTray" | "ArrowLeft" | "ArrowRight" | "Buildings" | "Circle" | "CaretDown" | "CaretLeft" | "CaretRight" | "ChartBar" | "ChartLine" | "ChatCircle" | "CheckSquare" | "Compass" | "Check" | "Copy" | "Database" | "DotsThreeVertical" | "ArrowCounterClockwise" | "MagnifyingGlassMinus" | "MagnifyingGlassPlus" | "Export" | "Eye" | "EyeSlash" | "Envelope" | "FileSearch" | "FileMinus" | "FilePlus" | "FileText" | "FileX" | "Handshake" | "Gear" | "GitBranch" | "IdentificationCard" | "List" | "ListBullets" | "Lock" | "MagnifyingGlass" | "MapPin" | "Medal" | "NotePencil" | "Paperclip" | "PaperPlaneTilt" | "Pen" | "PenNib" | "Pencil" | "PencilSimpleLine" | "Phone" | "Plus" | "Printer" | "SignOut" | "Stamp" | "Star" | "Target" | "TextT" | "Trash" | "UploadSimple" | "User" | "UserPlus" | "Users" | "WarningCircle" | "X" | "ChatText" | "CircleWavyCheck" | "CircleWavyQuestion" | "ArchiveBox" | "ArrowCircleDown" | "FileArrowUp" | "FileDotted" | "Files" | "PencilLine" | "PencilCircle" | "UserCircle" | "Clock" | "QrCode" | "Webcam" | "Sun" | "DeviceTabletCamera" | "Globe" | "Fingerprint" | "PushPin" | "Timer";
|
|
7767
8083
|
action?: {
|
|
7768
8084
|
type: "DELETE" | "DECLARE" | "REGISTER" | "EDIT" | "REJECT" | "MARK_AS_DUPLICATE" | "ARCHIVE" | "PRINT_CERTIFICATE" | "REQUEST_CORRECTION" | "READ";
|
|
7769
8085
|
} | undefined;
|
|
@@ -20,7 +20,6 @@ export declare const EventIndex: z.ZodObject<{
|
|
|
20
20
|
}>>>;
|
|
21
21
|
acceptedAt: z.ZodISODateTime;
|
|
22
22
|
createdByRole: z.ZodOptional<z.ZodString>;
|
|
23
|
-
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
24
23
|
}, z.core.$strip>>>;
|
|
25
24
|
REGISTERED: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
26
25
|
createdAt: z.ZodISODateTime;
|
|
@@ -32,7 +31,6 @@ export declare const EventIndex: z.ZodObject<{
|
|
|
32
31
|
}>>>;
|
|
33
32
|
acceptedAt: z.ZodISODateTime;
|
|
34
33
|
createdByRole: z.ZodOptional<z.ZodString>;
|
|
35
|
-
createdBySignature: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
34
|
registrationNumber: z.ZodString;
|
|
37
35
|
}, z.core.$strip>>>;
|
|
38
36
|
}, z.core.$strip>;
|
|
@@ -46,7 +44,6 @@ export declare const EventIndex: z.ZodObject<{
|
|
|
46
44
|
}>>>;
|
|
47
45
|
updatedByUserRole: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
48
46
|
createdAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
49
|
-
createdBySignature: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodString, "DocumentPath", "out">>>;
|
|
50
47
|
updatedAtLocation: z.ZodOptional<z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>>;
|
|
51
48
|
updatedAt: z.ZodISODateTime;
|
|
52
49
|
assignedTo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|