@opencrvs/toolkit 2.1.0-rc.83e6fba → 2.1.0-rc.86309ed
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 +0 -1
- package/dist/commons/api/router.d.ts +0 -204
- package/dist/commons/conditionals/conditionals.d.ts +3 -3
- package/dist/commons/events/AdvancedSearchConfig.d.ts +0 -6
- package/dist/commons/events/AuditLog.d.ts +0 -109
- package/dist/commons/events/FieldConfig.d.ts +0 -5
- package/dist/commons/events/index.d.ts +0 -1
- package/dist/commons/events/locations.d.ts +0 -7
- package/dist/conditionals/index.js +0 -1
- package/dist/events/index.js +0 -123
- package/dist/notification/index.js +25 -134
- package/dist/scopes/index.d.ts +1 -3
- package/dist/scopes/index.js +0 -1
- package/opencrvs-toolkit-2.1.0-rc.86309ed.tgz +0 -0
- package/package.json +1 -1
- package/dist/commons/events/locationPayloads.d.ts +0 -95
- package/opencrvs-toolkit-2.1.0-rc.83e6fba.tgz +0 -0
|
@@ -8242,103 +8242,6 @@ 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: "administrativeAreas.create";
|
|
8333
|
-
requestData: {
|
|
8334
|
-
id: string;
|
|
8335
|
-
versionId: string;
|
|
8336
|
-
name: string;
|
|
8337
|
-
externalId?: string | null | undefined;
|
|
8338
|
-
effectiveFrom: string;
|
|
8339
|
-
status: string;
|
|
8340
|
-
parentId?: string | null | undefined;
|
|
8341
|
-
};
|
|
8342
8245
|
} | {
|
|
8343
8246
|
id: string;
|
|
8344
8247
|
clientId: string;
|
|
@@ -8471,61 +8374,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8471
8374
|
output: void;
|
|
8472
8375
|
meta: object;
|
|
8473
8376
|
}>;
|
|
8474
|
-
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
8475
|
-
input: {
|
|
8476
|
-
id?: string | undefined;
|
|
8477
|
-
versionId?: string | undefined;
|
|
8478
|
-
name: string;
|
|
8479
|
-
externalId?: string | null | undefined;
|
|
8480
|
-
administrativeAreaId: string | null;
|
|
8481
|
-
locationType: string | null;
|
|
8482
|
-
effectiveFrom?: string | undefined;
|
|
8483
|
-
status?: "active" | "inactive" | undefined;
|
|
8484
|
-
};
|
|
8485
|
-
output: {
|
|
8486
|
-
id: string & import("zod").$brand<"UUID">;
|
|
8487
|
-
name: string;
|
|
8488
|
-
externalId?: string | null | undefined;
|
|
8489
|
-
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8490
|
-
locationType: string | null;
|
|
8491
|
-
status: "active" | "inactive";
|
|
8492
|
-
versions: {
|
|
8493
|
-
versionId: string & import("zod").$brand<"UUID">;
|
|
8494
|
-
effectiveFrom: string;
|
|
8495
|
-
name: string;
|
|
8496
|
-
externalId?: string | null | undefined;
|
|
8497
|
-
status: "active" | "inactive";
|
|
8498
|
-
}[];
|
|
8499
|
-
};
|
|
8500
|
-
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8501
|
-
}>;
|
|
8502
|
-
update: import("@trpc/server").TRPCMutationProcedure<{
|
|
8503
|
-
input: {
|
|
8504
|
-
id: string;
|
|
8505
|
-
versionId?: string | undefined;
|
|
8506
|
-
name: string;
|
|
8507
|
-
externalId?: string | null | undefined;
|
|
8508
|
-
status: "active" | "inactive";
|
|
8509
|
-
effectiveFrom?: string | undefined;
|
|
8510
|
-
lastVersionId: string;
|
|
8511
|
-
};
|
|
8512
|
-
output: {
|
|
8513
|
-
id: string & import("zod").$brand<"UUID">;
|
|
8514
|
-
name: string;
|
|
8515
|
-
externalId?: string | null | undefined;
|
|
8516
|
-
administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
|
|
8517
|
-
locationType: string | null;
|
|
8518
|
-
status: "active" | "inactive";
|
|
8519
|
-
versions: {
|
|
8520
|
-
versionId: string & import("zod").$brand<"UUID">;
|
|
8521
|
-
effectiveFrom: string;
|
|
8522
|
-
name: string;
|
|
8523
|
-
externalId?: string | null | undefined;
|
|
8524
|
-
status: "active" | "inactive";
|
|
8525
|
-
}[];
|
|
8526
|
-
};
|
|
8527
|
-
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
8528
|
-
}>;
|
|
8529
8377
|
get: import("@trpc/server").TRPCQueryProcedure<{
|
|
8530
8378
|
input: {
|
|
8531
8379
|
id: string;
|
|
@@ -8972,58 +8820,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
|
|
|
8972
8820
|
output: void;
|
|
8973
8821
|
meta: object;
|
|
8974
8822
|
}>;
|
|
8975
|
-
create: import("@trpc/server").TRPCMutationProcedure<{
|
|
8976
|
-
input: {
|
|
8977
|
-
id?: string | undefined;
|
|
8978
|
-
versionId?: string | undefined;
|
|
8979
|
-
name: string;
|
|
8980
|
-
externalId?: string | null | undefined;
|
|
8981
|
-
parentId: string | null;
|
|
8982
|
-
effectiveFrom?: string | undefined;
|
|
8983
|
-
status?: "active" | "inactive" | undefined;
|
|
8984
|
-
};
|
|
8985
|
-
output: {
|
|
8986
|
-
id: string & import("zod").$brand<"UUID">;
|
|
8987
|
-
name: string;
|
|
8988
|
-
externalId?: string | null | undefined;
|
|
8989
|
-
parentId: (string & import("zod").$brand<"UUID">) | null;
|
|
8990
|
-
status: "active" | "inactive";
|
|
8991
|
-
versions: {
|
|
8992
|
-
versionId: string & import("zod").$brand<"UUID">;
|
|
8993
|
-
effectiveFrom: string;
|
|
8994
|
-
name: string;
|
|
8995
|
-
externalId?: string | null | undefined;
|
|
8996
|
-
status: "active" | "inactive";
|
|
8997
|
-
}[];
|
|
8998
|
-
};
|
|
8999
|
-
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
9000
|
-
}>;
|
|
9001
|
-
update: import("@trpc/server").TRPCMutationProcedure<{
|
|
9002
|
-
input: {
|
|
9003
|
-
id: string;
|
|
9004
|
-
versionId?: string | undefined;
|
|
9005
|
-
name: string;
|
|
9006
|
-
externalId?: string | null | undefined;
|
|
9007
|
-
status: "active" | "inactive";
|
|
9008
|
-
effectiveFrom?: string | undefined;
|
|
9009
|
-
lastVersionId: string;
|
|
9010
|
-
};
|
|
9011
|
-
output: {
|
|
9012
|
-
id: string & import("zod").$brand<"UUID">;
|
|
9013
|
-
name: string;
|
|
9014
|
-
externalId?: string | null | undefined;
|
|
9015
|
-
parentId: (string & import("zod").$brand<"UUID">) | null;
|
|
9016
|
-
status: "active" | "inactive";
|
|
9017
|
-
versions: {
|
|
9018
|
-
versionId: string & import("zod").$brand<"UUID">;
|
|
9019
|
-
effectiveFrom: string;
|
|
9020
|
-
name: string;
|
|
9021
|
-
externalId?: string | null | undefined;
|
|
9022
|
-
status: "active" | "inactive";
|
|
9023
|
-
}[];
|
|
9024
|
-
};
|
|
9025
|
-
meta: import("trpc-to-openapi").OpenApiMeta;
|
|
9026
|
-
}>;
|
|
9027
8823
|
}>>;
|
|
9028
8824
|
integrations: import("@trpc/server").TRPCBuiltRouter<{
|
|
9029
8825
|
ctx: Partial<{
|
|
@@ -85,16 +85,16 @@ 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" | "
|
|
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
89
|
$option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "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" | "
|
|
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
94
|
$option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "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" | "
|
|
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
98
|
$option: "accessLevel" | "declaredBy" | "declaredIn" | "event" | "ids" | "notifiedBy" | "notifiedIn" | "placeOfEvent" | "registeredBy" | "registeredIn" | "role";
|
|
99
99
|
};
|
|
100
100
|
};
|
|
@@ -103,7 +103,6 @@ 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";
|
|
107
106
|
"organisation.read-locations": "organisation.read-locations";
|
|
108
107
|
"performance.read": "performance.read";
|
|
109
108
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -284,7 +283,6 @@ export declare const EventFieldConfigSchema: z.ZodObject<{
|
|
|
284
283
|
"config.update-all": "config.update-all";
|
|
285
284
|
"dashboard.view": "dashboard.view";
|
|
286
285
|
"integration.create": "integration.create";
|
|
287
|
-
"location.edit": "location.edit";
|
|
288
286
|
"organisation.read-locations": "organisation.read-locations";
|
|
289
287
|
"performance.read": "performance.read";
|
|
290
288
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -441,7 +439,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
441
439
|
"config.update-all": "config.update-all";
|
|
442
440
|
"dashboard.view": "dashboard.view";
|
|
443
441
|
"integration.create": "integration.create";
|
|
444
|
-
"location.edit": "location.edit";
|
|
445
442
|
"organisation.read-locations": "organisation.read-locations";
|
|
446
443
|
"performance.read": "performance.read";
|
|
447
444
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -590,7 +587,6 @@ export declare const AdvancedSearchField: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
590
587
|
"config.update-all": "config.update-all";
|
|
591
588
|
"dashboard.view": "dashboard.view";
|
|
592
589
|
"integration.create": "integration.create";
|
|
593
|
-
"location.edit": "location.edit";
|
|
594
590
|
"organisation.read-locations": "organisation.read-locations";
|
|
595
591
|
"performance.read": "performance.read";
|
|
596
592
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -750,7 +746,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
750
746
|
"config.update-all": "config.update-all";
|
|
751
747
|
"dashboard.view": "dashboard.view";
|
|
752
748
|
"integration.create": "integration.create";
|
|
753
|
-
"location.edit": "location.edit";
|
|
754
749
|
"organisation.read-locations": "organisation.read-locations";
|
|
755
750
|
"performance.read": "performance.read";
|
|
756
751
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -899,7 +894,6 @@ export declare const AdvancedSearchConfig: z.ZodObject<{
|
|
|
899
894
|
"config.update-all": "config.update-all";
|
|
900
895
|
"dashboard.view": "dashboard.view";
|
|
901
896
|
"integration.create": "integration.create";
|
|
902
|
-
"location.edit": "location.edit";
|
|
903
897
|
"organisation.read-locations": "organisation.read-locations";
|
|
904
898
|
"performance.read": "performance.read";
|
|
905
899
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -281,115 +281,6 @@ export declare const AuditLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
281
281
|
responseSummary: z.ZodObject<{
|
|
282
282
|
clientId: z.ZodString;
|
|
283
283
|
}, z.core.$strip>;
|
|
284
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
285
|
-
id: z.ZodString;
|
|
286
|
-
clientId: z.ZodString;
|
|
287
|
-
clientType: z.ZodEnum<{
|
|
288
|
-
system: "system";
|
|
289
|
-
user: "user";
|
|
290
|
-
}>;
|
|
291
|
-
createdAt: z.ZodString;
|
|
292
|
-
operation: z.ZodLiteral<"locations.create">;
|
|
293
|
-
requestData: z.ZodObject<{
|
|
294
|
-
id: z.ZodString;
|
|
295
|
-
versionId: z.ZodString;
|
|
296
|
-
name: z.ZodString;
|
|
297
|
-
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
298
|
-
effectiveFrom: z.ZodString;
|
|
299
|
-
status: z.ZodString;
|
|
300
|
-
administrativeAreaId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
301
|
-
locationType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
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<"administrativeAreas.create">;
|
|
384
|
-
requestData: z.ZodObject<{
|
|
385
|
-
id: z.ZodString;
|
|
386
|
-
versionId: z.ZodString;
|
|
387
|
-
name: z.ZodString;
|
|
388
|
-
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
389
|
-
effectiveFrom: z.ZodString;
|
|
390
|
-
status: z.ZodString;
|
|
391
|
-
parentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
392
|
-
}, z.core.$strip>;
|
|
393
284
|
}, z.core.$strip>, z.ZodObject<{
|
|
394
285
|
id: z.ZodString;
|
|
395
286
|
clientId: z.ZodString;
|
|
@@ -1883,7 +1883,6 @@ declare const AdministrativeAreaField: z.ZodObject<{
|
|
|
1883
1883
|
"config.update-all": "config.update-all";
|
|
1884
1884
|
"dashboard.view": "dashboard.view";
|
|
1885
1885
|
"integration.create": "integration.create";
|
|
1886
|
-
"location.edit": "location.edit";
|
|
1887
1886
|
"organisation.read-locations": "organisation.read-locations";
|
|
1888
1887
|
"performance.read": "performance.read";
|
|
1889
1888
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -2013,7 +2012,6 @@ declare const LocationInput: z.ZodObject<{
|
|
|
2013
2012
|
"config.update-all": "config.update-all";
|
|
2014
2013
|
"dashboard.view": "dashboard.view";
|
|
2015
2014
|
"integration.create": "integration.create";
|
|
2016
|
-
"location.edit": "location.edit";
|
|
2017
2015
|
"organisation.read-locations": "organisation.read-locations";
|
|
2018
2016
|
"performance.read": "performance.read";
|
|
2019
2017
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -2214,7 +2212,6 @@ declare const Facility: z.ZodObject<{
|
|
|
2214
2212
|
"config.update-all": "config.update-all";
|
|
2215
2213
|
"dashboard.view": "dashboard.view";
|
|
2216
2214
|
"integration.create": "integration.create";
|
|
2217
|
-
"location.edit": "location.edit";
|
|
2218
2215
|
"organisation.read-locations": "organisation.read-locations";
|
|
2219
2216
|
"performance.read": "performance.read";
|
|
2220
2217
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -2330,7 +2327,6 @@ declare const Office: z.ZodObject<{
|
|
|
2330
2327
|
"config.update-all": "config.update-all";
|
|
2331
2328
|
"dashboard.view": "dashboard.view";
|
|
2332
2329
|
"integration.create": "integration.create";
|
|
2333
|
-
"location.edit": "location.edit";
|
|
2334
2330
|
"organisation.read-locations": "organisation.read-locations";
|
|
2335
2331
|
"performance.read": "performance.read";
|
|
2336
2332
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -2532,7 +2528,6 @@ declare const Address: z.ZodObject<{
|
|
|
2532
2528
|
"config.update-all": "config.update-all";
|
|
2533
2529
|
"dashboard.view": "dashboard.view";
|
|
2534
2530
|
"integration.create": "integration.create";
|
|
2535
|
-
"location.edit": "location.edit";
|
|
2536
2531
|
"organisation.read-locations": "organisation.read-locations";
|
|
2537
2532
|
"performance.read": "performance.read";
|
|
2538
2533
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -45,7 +45,6 @@ export * from './field';
|
|
|
45
45
|
export * from './Flag';
|
|
46
46
|
export * from './event';
|
|
47
47
|
export * from './locations';
|
|
48
|
-
export * from './locationPayloads';
|
|
49
48
|
export { UUID } from '../uuid';
|
|
50
49
|
export { DocumentPath } from '../documents';
|
|
51
50
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -111,13 +111,6 @@ export type SetAdministrativeAreaPayload = z.infer<typeof SetAdministrativeAreaP
|
|
|
111
111
|
export declare function resolveVersion<T extends {
|
|
112
112
|
effectiveFrom: string;
|
|
113
113
|
}>(versions: T[], anchor: string): T;
|
|
114
|
-
/**
|
|
115
|
-
* Whether the entity holds the given externalId with active status at the
|
|
116
|
-
* anchor date or at any point after it. Used for point-in-time uniqueness of
|
|
117
|
-
* external codes: a new holder starting at `anchor` collides when an existing
|
|
118
|
-
* holder is (or is scheduled to be) active with the code from then on.
|
|
119
|
-
*/
|
|
120
|
-
export declare function hasActiveExternalIdOnOrAfter(versions: LocationVersion[], externalId: string, anchor: string): boolean;
|
|
121
114
|
type WrapArrayPreserveNullish<V> = V extends readonly any[] ? V : NonNullable<V>[] | Extract<V, null | undefined>;
|
|
122
115
|
/**
|
|
123
116
|
* For type T, convert fields K to arrays. If field is string, convert to string[].
|
package/dist/events/index.js
CHANGED
|
@@ -80,8 +80,6 @@ __export(events_exports, {
|
|
|
80
80
|
ConditionalType: () => ConditionalType,
|
|
81
81
|
ConfirmableActions: () => ConfirmableActions,
|
|
82
82
|
ContainsFlags: () => ContainsFlags,
|
|
83
|
-
CreateAdministrativeAreaPayload: () => CreateAdministrativeAreaPayload,
|
|
84
|
-
CreateLocationPayload: () => CreateLocationPayload,
|
|
85
83
|
CustomActionInput: () => CustomActionInput,
|
|
86
84
|
CustomFieldValue: () => CustomFieldValue,
|
|
87
85
|
CustomFlag: () => CustomFlag,
|
|
@@ -222,8 +220,6 @@ __export(events_exports, {
|
|
|
222
220
|
UUID: () => UUID,
|
|
223
221
|
UnarchiveActionInput: () => UnarchiveActionInput,
|
|
224
222
|
UnassignActionInput: () => UnassignActionInput,
|
|
225
|
-
UpdateAdministrativeAreaPayload: () => UpdateAdministrativeAreaPayload,
|
|
226
|
-
UpdateLocationPayload: () => UpdateLocationPayload,
|
|
227
223
|
UserAuditRecordInput: () => UserAuditRecordInput,
|
|
228
224
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS: () => V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS,
|
|
229
225
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP: () => V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP,
|
|
@@ -233,8 +229,6 @@ __export(events_exports, {
|
|
|
233
229
|
VerificationActionConfig: () => VerificationActionConfig,
|
|
234
230
|
VerificationPageConfig: () => VerificationPageConfig,
|
|
235
231
|
VerificationStatusValue: () => VerificationStatusValue,
|
|
236
|
-
WithdrawAdministrativeAreaVersionPayload: () => WithdrawAdministrativeAreaVersionPayload,
|
|
237
|
-
WithdrawLocationVersionPayload: () => WithdrawLocationVersionPayload,
|
|
238
232
|
Within: () => Within,
|
|
239
233
|
WorkqueueActionType: () => WorkqueueActionType,
|
|
240
234
|
WorkqueueColumn: () => WorkqueueColumn,
|
|
@@ -353,7 +347,6 @@ __export(events_exports, {
|
|
|
353
347
|
getStatusFromActions: () => getStatusFromActions,
|
|
354
348
|
getValidatorsForField: () => getValidatorsForField,
|
|
355
349
|
getVisibleVerificationPageIds: () => getVisibleVerificationPageIds,
|
|
356
|
-
hasActiveExternalIdOnOrAfter: () => hasActiveExternalIdOnOrAfter,
|
|
357
350
|
hasAnyOfScopes: () => hasAnyOfScopes,
|
|
358
351
|
isActionAvailable: () => isActionAvailable,
|
|
359
352
|
isActionConfigType: () => isActionConfigType,
|
|
@@ -512,7 +505,6 @@ var PlainScopeType = z2.enum([
|
|
|
512
505
|
"integration.create",
|
|
513
506
|
"record.import",
|
|
514
507
|
"config.update-all",
|
|
515
|
-
"location.edit",
|
|
516
508
|
"attachment.upload",
|
|
517
509
|
"profile.electronic-signature",
|
|
518
510
|
"user.read-only-my-audit",
|
|
@@ -995,62 +987,6 @@ var IntegrationRefreshSecretEntrySchema = AuditLogEntryBase.extend({
|
|
|
995
987
|
requestData: z5.object({ id: z5.string() }),
|
|
996
988
|
responseSummary: z5.object({ clientId: z5.string() })
|
|
997
989
|
});
|
|
998
|
-
var createdVersionFields = {
|
|
999
|
-
id: z5.string(),
|
|
1000
|
-
versionId: z5.string(),
|
|
1001
|
-
name: z5.string(),
|
|
1002
|
-
externalId: z5.string().nullish(),
|
|
1003
|
-
effectiveFrom: z5.string(),
|
|
1004
|
-
status: z5.string()
|
|
1005
|
-
};
|
|
1006
|
-
var LocationCreateEntrySchema = AuditLogEntryBase.extend({
|
|
1007
|
-
operation: z5.literal("locations.create"),
|
|
1008
|
-
requestData: z5.object({
|
|
1009
|
-
...createdVersionFields,
|
|
1010
|
-
administrativeAreaId: z5.string().nullish(),
|
|
1011
|
-
locationType: z5.string().nullish()
|
|
1012
|
-
})
|
|
1013
|
-
});
|
|
1014
|
-
var AdministrativeAreaCreateEntrySchema = AuditLogEntryBase.extend({
|
|
1015
|
-
operation: z5.literal("administrativeAreas.create"),
|
|
1016
|
-
requestData: z5.object({
|
|
1017
|
-
...createdVersionFields,
|
|
1018
|
-
parentId: z5.string().nullish()
|
|
1019
|
-
})
|
|
1020
|
-
});
|
|
1021
|
-
var ChangedStringField = z5.object({ from: z5.string(), to: z5.string() });
|
|
1022
|
-
var ChangedNullableStringField = z5.object({
|
|
1023
|
-
from: z5.string().nullable(),
|
|
1024
|
-
to: z5.string().nullable()
|
|
1025
|
-
});
|
|
1026
|
-
var updatedVersionRequestData = z5.object({
|
|
1027
|
-
id: z5.string(),
|
|
1028
|
-
versionId: z5.string(),
|
|
1029
|
-
name: z5.string(),
|
|
1030
|
-
externalId: z5.string().nullish(),
|
|
1031
|
-
status: z5.string(),
|
|
1032
|
-
effectiveFrom: z5.string(),
|
|
1033
|
-
lastVersionId: z5.string()
|
|
1034
|
-
});
|
|
1035
|
-
var updatedVersionResponseSummary = z5.object({
|
|
1036
|
-
previousVersionId: z5.string(),
|
|
1037
|
-
versionId: z5.string(),
|
|
1038
|
-
changed: z5.object({
|
|
1039
|
-
name: ChangedStringField.optional(),
|
|
1040
|
-
externalId: ChangedNullableStringField.optional(),
|
|
1041
|
-
status: ChangedStringField.optional()
|
|
1042
|
-
})
|
|
1043
|
-
});
|
|
1044
|
-
var LocationUpdateEntrySchema = AuditLogEntryBase.extend({
|
|
1045
|
-
operation: z5.literal("locations.update"),
|
|
1046
|
-
requestData: updatedVersionRequestData,
|
|
1047
|
-
responseSummary: updatedVersionResponseSummary
|
|
1048
|
-
});
|
|
1049
|
-
var AdministrativeAreaUpdateEntrySchema = AuditLogEntryBase.extend({
|
|
1050
|
-
operation: z5.literal("administrativeAreas.update"),
|
|
1051
|
-
requestData: updatedVersionRequestData,
|
|
1052
|
-
responseSummary: updatedVersionResponseSummary
|
|
1053
|
-
});
|
|
1054
990
|
var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
|
|
1055
991
|
operation: z5.literal("attachments.upload"),
|
|
1056
992
|
requestData: z5.object({
|
|
@@ -1126,10 +1062,6 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
|
|
|
1126
1062
|
IntegrationActivateEntrySchema,
|
|
1127
1063
|
IntegrationDeleteEntrySchema,
|
|
1128
1064
|
IntegrationRefreshSecretEntrySchema,
|
|
1129
|
-
LocationCreateEntrySchema,
|
|
1130
|
-
LocationUpdateEntrySchema,
|
|
1131
|
-
AdministrativeAreaUpdateEntrySchema,
|
|
1132
|
-
AdministrativeAreaCreateEntrySchema,
|
|
1133
1065
|
AttachmentUploadEntrySchema,
|
|
1134
1066
|
UserCreateEntrySchema,
|
|
1135
1067
|
UserReasonEntrySchema,
|
|
@@ -10586,13 +10518,6 @@ function resolveVersion(versions, anchor) {
|
|
|
10586
10518
|
}
|
|
10587
10519
|
return resolved;
|
|
10588
10520
|
}
|
|
10589
|
-
function hasActiveExternalIdOnOrAfter(versions, externalId, anchor) {
|
|
10590
|
-
const inEffectAtAnchor = resolveVersion(versions, anchor);
|
|
10591
|
-
const laterVersions = versions.filter((v) => v.effectiveFrom > anchor);
|
|
10592
|
-
return [inEffectAtAnchor, ...laterVersions].some(
|
|
10593
|
-
(v) => v.externalId === externalId && v.status === "active"
|
|
10594
|
-
);
|
|
10595
|
-
}
|
|
10596
10521
|
function matchesJurisdictionFilter(locationIds, filter, user2) {
|
|
10597
10522
|
if (!locationIds) {
|
|
10598
10523
|
return false;
|
|
@@ -11403,51 +11328,3 @@ var V2_DEFAULT_MOCK_LOCATIONS_MAP = new Map(
|
|
|
11403
11328
|
var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
11404
11329
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
|
|
11405
11330
|
);
|
|
11406
|
-
|
|
11407
|
-
// ../commons/src/events/locationPayloads.ts
|
|
11408
|
-
var z44 = __toESM(require("zod/v4"));
|
|
11409
|
-
var CreateLocationPayload = z44.object({
|
|
11410
|
-
id: UUID.optional(),
|
|
11411
|
-
versionId: UUID.optional(),
|
|
11412
|
-
name: z44.string(),
|
|
11413
|
-
externalId: z44.string().nullish(),
|
|
11414
|
-
administrativeAreaId: UUID.nullable(),
|
|
11415
|
-
locationType: z44.string().nullable(),
|
|
11416
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11417
|
-
status: LocationStatus.default("active")
|
|
11418
|
-
});
|
|
11419
|
-
var UpdateLocationPayload = z44.strictObject({
|
|
11420
|
-
id: UUID,
|
|
11421
|
-
versionId: UUID.optional(),
|
|
11422
|
-
name: z44.string(),
|
|
11423
|
-
externalId: z44.string().nullish(),
|
|
11424
|
-
status: LocationStatus,
|
|
11425
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11426
|
-
lastVersionId: UUID
|
|
11427
|
-
});
|
|
11428
|
-
var WithdrawLocationVersionPayload = z44.object({
|
|
11429
|
-
id: UUID,
|
|
11430
|
-
versionId: UUID
|
|
11431
|
-
});
|
|
11432
|
-
var CreateAdministrativeAreaPayload = z44.object({
|
|
11433
|
-
id: UUID.optional(),
|
|
11434
|
-
versionId: UUID.optional(),
|
|
11435
|
-
name: z44.string(),
|
|
11436
|
-
externalId: z44.string().nullish(),
|
|
11437
|
-
parentId: UUID.nullable(),
|
|
11438
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11439
|
-
status: LocationStatus.default("active")
|
|
11440
|
-
});
|
|
11441
|
-
var UpdateAdministrativeAreaPayload = z44.strictObject({
|
|
11442
|
-
id: UUID,
|
|
11443
|
-
versionId: UUID.optional(),
|
|
11444
|
-
name: z44.string(),
|
|
11445
|
-
externalId: z44.string().nullish(),
|
|
11446
|
-
status: LocationStatus,
|
|
11447
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
11448
|
-
lastVersionId: UUID
|
|
11449
|
-
});
|
|
11450
|
-
var WithdrawAdministrativeAreaVersionPayload = z44.object({
|
|
11451
|
-
id: UUID,
|
|
11452
|
-
versionId: UUID
|
|
11453
|
-
});
|
|
@@ -38,7 +38,7 @@ __export(notification_exports, {
|
|
|
38
38
|
triggerUserEventNotification: () => triggerUserEventNotification
|
|
39
39
|
});
|
|
40
40
|
module.exports = __toCommonJS(notification_exports);
|
|
41
|
-
var
|
|
41
|
+
var z45 = __toESM(require("zod/v4"));
|
|
42
42
|
|
|
43
43
|
// ../commons/src/url.ts
|
|
44
44
|
function joinUrl(base, path) {
|
|
@@ -96,7 +96,6 @@ var PlainScopeType = z2.enum([
|
|
|
96
96
|
"integration.create",
|
|
97
97
|
"record.import",
|
|
98
98
|
"config.update-all",
|
|
99
|
-
"location.edit",
|
|
100
99
|
"attachment.upload",
|
|
101
100
|
"profile.electronic-signature",
|
|
102
101
|
"user.read-only-my-audit",
|
|
@@ -531,62 +530,6 @@ var IntegrationRefreshSecretEntrySchema = AuditLogEntryBase.extend({
|
|
|
531
530
|
requestData: z5.object({ id: z5.string() }),
|
|
532
531
|
responseSummary: z5.object({ clientId: z5.string() })
|
|
533
532
|
});
|
|
534
|
-
var createdVersionFields = {
|
|
535
|
-
id: z5.string(),
|
|
536
|
-
versionId: z5.string(),
|
|
537
|
-
name: z5.string(),
|
|
538
|
-
externalId: z5.string().nullish(),
|
|
539
|
-
effectiveFrom: z5.string(),
|
|
540
|
-
status: z5.string()
|
|
541
|
-
};
|
|
542
|
-
var LocationCreateEntrySchema = AuditLogEntryBase.extend({
|
|
543
|
-
operation: z5.literal("locations.create"),
|
|
544
|
-
requestData: z5.object({
|
|
545
|
-
...createdVersionFields,
|
|
546
|
-
administrativeAreaId: z5.string().nullish(),
|
|
547
|
-
locationType: z5.string().nullish()
|
|
548
|
-
})
|
|
549
|
-
});
|
|
550
|
-
var AdministrativeAreaCreateEntrySchema = AuditLogEntryBase.extend({
|
|
551
|
-
operation: z5.literal("administrativeAreas.create"),
|
|
552
|
-
requestData: z5.object({
|
|
553
|
-
...createdVersionFields,
|
|
554
|
-
parentId: z5.string().nullish()
|
|
555
|
-
})
|
|
556
|
-
});
|
|
557
|
-
var ChangedStringField = z5.object({ from: z5.string(), to: z5.string() });
|
|
558
|
-
var ChangedNullableStringField = z5.object({
|
|
559
|
-
from: z5.string().nullable(),
|
|
560
|
-
to: z5.string().nullable()
|
|
561
|
-
});
|
|
562
|
-
var updatedVersionRequestData = z5.object({
|
|
563
|
-
id: z5.string(),
|
|
564
|
-
versionId: z5.string(),
|
|
565
|
-
name: z5.string(),
|
|
566
|
-
externalId: z5.string().nullish(),
|
|
567
|
-
status: z5.string(),
|
|
568
|
-
effectiveFrom: z5.string(),
|
|
569
|
-
lastVersionId: z5.string()
|
|
570
|
-
});
|
|
571
|
-
var updatedVersionResponseSummary = z5.object({
|
|
572
|
-
previousVersionId: z5.string(),
|
|
573
|
-
versionId: z5.string(),
|
|
574
|
-
changed: z5.object({
|
|
575
|
-
name: ChangedStringField.optional(),
|
|
576
|
-
externalId: ChangedNullableStringField.optional(),
|
|
577
|
-
status: ChangedStringField.optional()
|
|
578
|
-
})
|
|
579
|
-
});
|
|
580
|
-
var LocationUpdateEntrySchema = AuditLogEntryBase.extend({
|
|
581
|
-
operation: z5.literal("locations.update"),
|
|
582
|
-
requestData: updatedVersionRequestData,
|
|
583
|
-
responseSummary: updatedVersionResponseSummary
|
|
584
|
-
});
|
|
585
|
-
var AdministrativeAreaUpdateEntrySchema = AuditLogEntryBase.extend({
|
|
586
|
-
operation: z5.literal("administrativeAreas.update"),
|
|
587
|
-
requestData: updatedVersionRequestData,
|
|
588
|
-
responseSummary: updatedVersionResponseSummary
|
|
589
|
-
});
|
|
590
533
|
var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
|
|
591
534
|
operation: z5.literal("attachments.upload"),
|
|
592
535
|
requestData: z5.object({
|
|
@@ -662,10 +605,6 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
|
|
|
662
605
|
IntegrationActivateEntrySchema,
|
|
663
606
|
IntegrationDeleteEntrySchema,
|
|
664
607
|
IntegrationRefreshSecretEntrySchema,
|
|
665
|
-
LocationCreateEntrySchema,
|
|
666
|
-
LocationUpdateEntrySchema,
|
|
667
|
-
AdministrativeAreaUpdateEntrySchema,
|
|
668
|
-
AdministrativeAreaCreateEntrySchema,
|
|
669
608
|
AttachmentUploadEntrySchema,
|
|
670
609
|
UserCreateEntrySchema,
|
|
671
610
|
UserReasonEntrySchema,
|
|
@@ -7888,56 +7827,8 @@ var V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS_MAP = new Map(
|
|
|
7888
7827
|
V2_DEFAULT_MOCK_ADMINISTRATIVE_AREAS.map((a) => [a.id, a])
|
|
7889
7828
|
);
|
|
7890
7829
|
|
|
7891
|
-
// ../commons/src/events/locationPayloads.ts
|
|
7892
|
-
var z44 = __toESM(require("zod/v4"));
|
|
7893
|
-
var CreateLocationPayload = z44.object({
|
|
7894
|
-
id: UUID.optional(),
|
|
7895
|
-
versionId: UUID.optional(),
|
|
7896
|
-
name: z44.string(),
|
|
7897
|
-
externalId: z44.string().nullish(),
|
|
7898
|
-
administrativeAreaId: UUID.nullable(),
|
|
7899
|
-
locationType: z44.string().nullable(),
|
|
7900
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
7901
|
-
status: LocationStatus.default("active")
|
|
7902
|
-
});
|
|
7903
|
-
var UpdateLocationPayload = z44.strictObject({
|
|
7904
|
-
id: UUID,
|
|
7905
|
-
versionId: UUID.optional(),
|
|
7906
|
-
name: z44.string(),
|
|
7907
|
-
externalId: z44.string().nullish(),
|
|
7908
|
-
status: LocationStatus,
|
|
7909
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
7910
|
-
lastVersionId: UUID
|
|
7911
|
-
});
|
|
7912
|
-
var WithdrawLocationVersionPayload = z44.object({
|
|
7913
|
-
id: UUID,
|
|
7914
|
-
versionId: UUID
|
|
7915
|
-
});
|
|
7916
|
-
var CreateAdministrativeAreaPayload = z44.object({
|
|
7917
|
-
id: UUID.optional(),
|
|
7918
|
-
versionId: UUID.optional(),
|
|
7919
|
-
name: z44.string(),
|
|
7920
|
-
externalId: z44.string().nullish(),
|
|
7921
|
-
parentId: UUID.nullable(),
|
|
7922
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
7923
|
-
status: LocationStatus.default("active")
|
|
7924
|
-
});
|
|
7925
|
-
var UpdateAdministrativeAreaPayload = z44.strictObject({
|
|
7926
|
-
id: UUID,
|
|
7927
|
-
versionId: UUID.optional(),
|
|
7928
|
-
name: z44.string(),
|
|
7929
|
-
externalId: z44.string().nullish(),
|
|
7930
|
-
status: LocationStatus,
|
|
7931
|
-
effectiveFrom: z44.iso.date().optional(),
|
|
7932
|
-
lastVersionId: UUID
|
|
7933
|
-
});
|
|
7934
|
-
var WithdrawAdministrativeAreaVersionPayload = z44.object({
|
|
7935
|
-
id: UUID,
|
|
7936
|
-
versionId: UUID
|
|
7937
|
-
});
|
|
7938
|
-
|
|
7939
7830
|
// ../commons/src/notification/UserNotifications.ts
|
|
7940
|
-
var
|
|
7831
|
+
var z44 = __toESM(require("zod/v4"));
|
|
7941
7832
|
var TriggerEvent = {
|
|
7942
7833
|
USER_CREATED: "user-created",
|
|
7943
7834
|
USER_UPDATED: "user-updated",
|
|
@@ -7950,54 +7841,54 @@ var TriggerEvent = {
|
|
|
7950
7841
|
CHANGE_PHONE_NUMBER: "change-phone-number",
|
|
7951
7842
|
CHANGE_EMAIL_ADDRESS: "change-email-address"
|
|
7952
7843
|
};
|
|
7953
|
-
var Recipient =
|
|
7844
|
+
var Recipient = z44.object({
|
|
7954
7845
|
name: NameFieldValue.optional(),
|
|
7955
|
-
mobile:
|
|
7956
|
-
email:
|
|
7957
|
-
bcc:
|
|
7846
|
+
mobile: z44.string().optional(),
|
|
7847
|
+
email: z44.string().optional(),
|
|
7848
|
+
bcc: z44.array(z44.string()).optional()
|
|
7958
7849
|
});
|
|
7959
|
-
var BasePayload =
|
|
7850
|
+
var BasePayload = z44.object({
|
|
7960
7851
|
recipient: Recipient
|
|
7961
7852
|
});
|
|
7962
7853
|
var TriggerPayload = {
|
|
7963
7854
|
[TriggerEvent.USER_CREATED]: BasePayload.extend({
|
|
7964
|
-
username:
|
|
7965
|
-
temporaryPassword:
|
|
7855
|
+
username: z44.string(),
|
|
7856
|
+
temporaryPassword: z44.string()
|
|
7966
7857
|
}),
|
|
7967
7858
|
[TriggerEvent.USER_UPDATED]: BasePayload.extend({
|
|
7968
|
-
oldUsername:
|
|
7969
|
-
newUsername:
|
|
7859
|
+
oldUsername: z44.string(),
|
|
7860
|
+
newUsername: z44.string()
|
|
7970
7861
|
}),
|
|
7971
7862
|
[TriggerEvent.USERNAME_REMINDER]: BasePayload.extend({
|
|
7972
|
-
username:
|
|
7863
|
+
username: z44.string()
|
|
7973
7864
|
}),
|
|
7974
7865
|
[TriggerEvent.RESET_PASSWORD]: BasePayload.extend({
|
|
7975
|
-
code:
|
|
7866
|
+
code: z44.string()
|
|
7976
7867
|
}),
|
|
7977
7868
|
[TriggerEvent.RESET_PASSWORD_BY_ADMIN]: BasePayload.extend({
|
|
7978
|
-
temporaryPassword:
|
|
7979
|
-
admin:
|
|
7980
|
-
id:
|
|
7869
|
+
temporaryPassword: z44.string(),
|
|
7870
|
+
admin: z44.object({
|
|
7871
|
+
id: z44.string(),
|
|
7981
7872
|
name: NameFieldValue,
|
|
7982
|
-
role:
|
|
7873
|
+
role: z44.string()
|
|
7983
7874
|
})
|
|
7984
7875
|
}),
|
|
7985
7876
|
[TriggerEvent.RESEND_INVITE]: BasePayload.extend({
|
|
7986
|
-
username:
|
|
7987
|
-
temporaryPassword:
|
|
7877
|
+
username: z44.string(),
|
|
7878
|
+
temporaryPassword: z44.string()
|
|
7988
7879
|
}),
|
|
7989
7880
|
[TriggerEvent.TWO_FA]: BasePayload.extend({
|
|
7990
|
-
code:
|
|
7881
|
+
code: z44.string()
|
|
7991
7882
|
}),
|
|
7992
7883
|
[TriggerEvent.ALL_USER_NOTIFICATION]: BasePayload.extend({
|
|
7993
|
-
subject:
|
|
7994
|
-
body:
|
|
7884
|
+
subject: z44.string(),
|
|
7885
|
+
body: z44.string()
|
|
7995
7886
|
}),
|
|
7996
7887
|
[TriggerEvent.CHANGE_PHONE_NUMBER]: BasePayload.extend({
|
|
7997
|
-
code:
|
|
7888
|
+
code: z44.string()
|
|
7998
7889
|
}),
|
|
7999
7890
|
[TriggerEvent.CHANGE_EMAIL_ADDRESS]: BasePayload.extend({
|
|
8000
|
-
code:
|
|
7891
|
+
code: z44.string()
|
|
8001
7892
|
})
|
|
8002
7893
|
};
|
|
8003
7894
|
async function triggerUserEventNotification({
|
|
@@ -8021,4 +7912,4 @@ function parseUserEventTrigger(event2, body) {
|
|
|
8021
7912
|
}
|
|
8022
7913
|
|
|
8023
7914
|
// src/notification/index.ts
|
|
8024
|
-
|
|
7915
|
+
z45.globalRegistry.clear();
|
package/dist/scopes/index.d.ts
CHANGED
|
@@ -397,7 +397,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
397
397
|
bypassratelimit: "bypassratelimit";
|
|
398
398
|
"config.update-all": "config.update-all";
|
|
399
399
|
"integration.create": "integration.create";
|
|
400
|
-
"location.edit": "location.edit";
|
|
401
400
|
"performance.read": "performance.read";
|
|
402
401
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
403
402
|
"performance.vital-statistics-export": "performance.vital-statistics-export";
|
|
@@ -618,7 +617,6 @@ export declare const ScopeType: z.ZodEnum<{
|
|
|
618
617
|
"config.update-all": "config.update-all";
|
|
619
618
|
"dashboard.view": "dashboard.view";
|
|
620
619
|
"integration.create": "integration.create";
|
|
621
|
-
"location.edit": "location.edit";
|
|
622
620
|
"organisation.read-locations": "organisation.read-locations";
|
|
623
621
|
"performance.read": "performance.read";
|
|
624
622
|
"performance.read-dashboards": "performance.read-dashboards";
|
|
@@ -739,7 +737,7 @@ export declare const decodeScope: (encodedScope: EncodedScope) => {
|
|
|
739
737
|
accessLevel?: "administrativeArea" | "all" | "location" | undefined;
|
|
740
738
|
} | undefined;
|
|
741
739
|
} | {
|
|
742
|
-
type: "attachment.upload" | "bypassratelimit" | "config.update-all" | "integration.create" | "
|
|
740
|
+
type: "attachment.upload" | "bypassratelimit" | "config.update-all" | "integration.create" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "profile.electronic-signature" | "record.confirm-registration" | "record.import" | "record.reindex" | "record.reject-registration" | "user.data-seeding" | "user.read-only-my-audit";
|
|
743
741
|
} | {
|
|
744
742
|
type: "organisation.read-locations";
|
|
745
743
|
options?: {
|
package/dist/scopes/index.js
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import * as z from 'zod/v4';
|
|
2
|
-
/**
|
|
3
|
-
* Input payload for creating a location: the identity fields (parent and
|
|
4
|
-
* locationType are set once, immutable thereafter) plus the first version.
|
|
5
|
-
* `id` and `versionId` may be supplied by the caller for idempotent retries.
|
|
6
|
-
* `effectiveFrom` defaults to the beginning-of-time sentinel on the server.
|
|
7
|
-
*/
|
|
8
|
-
export declare const CreateLocationPayload: z.ZodObject<{
|
|
9
|
-
id: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
10
|
-
versionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
11
|
-
name: z.ZodString;
|
|
12
|
-
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
13
|
-
administrativeAreaId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
14
|
-
locationType: z.ZodNullable<z.ZodString>;
|
|
15
|
-
effectiveFrom: z.ZodOptional<z.ZodISODate>;
|
|
16
|
-
status: z.ZodDefault<z.ZodEnum<{
|
|
17
|
-
active: "active";
|
|
18
|
-
inactive: "inactive";
|
|
19
|
-
}>>;
|
|
20
|
-
}, z.core.$strip>;
|
|
21
|
-
export type CreateLocationPayload = z.infer<typeof CreateLocationPayload>;
|
|
22
|
-
/**
|
|
23
|
-
* Input payload for appending a new version to a location. A full snapshot of
|
|
24
|
-
* every versioned field is required — omitted does not mean unchanged. The
|
|
25
|
-
* schema is strict: identity fields (`administrativeAreaId`, `locationType`)
|
|
26
|
-
* are rejected rather than ignored, as they cannot change. `lastVersionId`
|
|
27
|
-
* is the optimistic-concurrency check: it must be the id of the last element
|
|
28
|
-
* the caller observed. `effectiveFrom` defaults to today on the server;
|
|
29
|
-
* supply it explicitly for idempotent retries.
|
|
30
|
-
*/
|
|
31
|
-
export declare const UpdateLocationPayload: z.ZodObject<{
|
|
32
|
-
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
33
|
-
versionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
34
|
-
name: z.ZodString;
|
|
35
|
-
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
|
-
status: z.ZodEnum<{
|
|
37
|
-
active: "active";
|
|
38
|
-
inactive: "inactive";
|
|
39
|
-
}>;
|
|
40
|
-
effectiveFrom: z.ZodOptional<z.ZodISODate>;
|
|
41
|
-
lastVersionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
42
|
-
}, z.core.$strict>;
|
|
43
|
-
export type UpdateLocationPayload = z.infer<typeof UpdateLocationPayload>;
|
|
44
|
-
/**
|
|
45
|
-
* Input payload for withdrawing a pending (future-dated) version element.
|
|
46
|
-
* Only elements whose `effectiveFrom` has not yet passed can be withdrawn.
|
|
47
|
-
*/
|
|
48
|
-
export declare const WithdrawLocationVersionPayload: z.ZodObject<{
|
|
49
|
-
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
50
|
-
versionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
51
|
-
}, z.core.$strip>;
|
|
52
|
-
export type WithdrawLocationVersionPayload = z.infer<typeof WithdrawLocationVersionPayload>;
|
|
53
|
-
/**
|
|
54
|
-
* Administrative-area twin of {@link CreateLocationPayload}: `parentId`
|
|
55
|
-
* instead of `administrativeAreaId`, no `locationType`.
|
|
56
|
-
*/
|
|
57
|
-
export declare const CreateAdministrativeAreaPayload: z.ZodObject<{
|
|
58
|
-
id: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
59
|
-
versionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
60
|
-
name: z.ZodString;
|
|
61
|
-
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
62
|
-
parentId: z.ZodNullable<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
63
|
-
effectiveFrom: z.ZodOptional<z.ZodISODate>;
|
|
64
|
-
status: z.ZodDefault<z.ZodEnum<{
|
|
65
|
-
active: "active";
|
|
66
|
-
inactive: "inactive";
|
|
67
|
-
}>>;
|
|
68
|
-
}, z.core.$strip>;
|
|
69
|
-
export type CreateAdministrativeAreaPayload = z.infer<typeof CreateAdministrativeAreaPayload>;
|
|
70
|
-
/**
|
|
71
|
-
* Administrative-area twin of {@link UpdateLocationPayload} — strict for the
|
|
72
|
-
* same reason: the identity field (`parentId`) is rejected, not ignored.
|
|
73
|
-
*/
|
|
74
|
-
export declare const UpdateAdministrativeAreaPayload: z.ZodObject<{
|
|
75
|
-
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
76
|
-
versionId: z.ZodOptional<z.core.$ZodBranded<z.ZodUUID, "UUID", "out">>;
|
|
77
|
-
name: z.ZodString;
|
|
78
|
-
externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
79
|
-
status: z.ZodEnum<{
|
|
80
|
-
active: "active";
|
|
81
|
-
inactive: "inactive";
|
|
82
|
-
}>;
|
|
83
|
-
effectiveFrom: z.ZodOptional<z.ZodISODate>;
|
|
84
|
-
lastVersionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
85
|
-
}, z.core.$strict>;
|
|
86
|
-
export type UpdateAdministrativeAreaPayload = z.infer<typeof UpdateAdministrativeAreaPayload>;
|
|
87
|
-
/**
|
|
88
|
-
* Administrative-area twin of {@link WithdrawLocationVersionPayload}.
|
|
89
|
-
*/
|
|
90
|
-
export declare const WithdrawAdministrativeAreaVersionPayload: z.ZodObject<{
|
|
91
|
-
id: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
92
|
-
versionId: z.core.$ZodBranded<z.ZodUUID, "UUID", "out">;
|
|
93
|
-
}, z.core.$strip>;
|
|
94
|
-
export type WithdrawAdministrativeAreaVersionPayload = z.infer<typeof WithdrawAdministrativeAreaVersionPayload>;
|
|
95
|
-
//# sourceMappingURL=locationPayloads.d.ts.map
|
|
Binary file
|