@opencrvs/toolkit 2.1.0-rc.83d4009 → 2.1.0-rc.83e6fba

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.
@@ -8263,7 +8263,40 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8263
8263
  clientId: string;
8264
8264
  clientType: "system" | "user";
8265
8265
  createdAt: string;
8266
- operation: "administrativeAreas.update" | "locations.update";
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";
8267
8300
  requestData: {
8268
8301
  id: string;
8269
8302
  versionId: string;
@@ -308,10 +308,43 @@ export declare const AuditLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
308
308
  user: "user";
309
309
  }>;
310
310
  createdAt: z.ZodString;
311
- operation: z.ZodEnum<{
312
- "administrativeAreas.update": "administrativeAreas.update";
313
- "locations.update": "locations.update";
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";
314
345
  }>;
346
+ createdAt: z.ZodString;
347
+ operation: z.ZodLiteral<"administrativeAreas.update">;
315
348
  requestData: z.ZodObject<{
316
349
  id: z.ZodString;
317
350
  versionId: z.ZodString;
@@ -1023,29 +1023,34 @@ var ChangedNullableStringField = z5.object({
1023
1023
  from: z5.string().nullable(),
1024
1024
  to: z5.string().nullable()
1025
1025
  });
1026
- var LocationUpdateEntrySchema = AuditLogEntryBase.extend({
1027
- operation: z5.enum(["locations.update", "administrativeAreas.update"]),
1028
- /** The submitted snapshot, with server-resolved `versionId`/`effectiveFrom`. */
1029
- requestData: z5.object({
1030
- id: z5.string(),
1031
- versionId: z5.string(),
1032
- name: z5.string(),
1033
- externalId: z5.string().nullish(),
1034
- status: z5.string(),
1035
- effectiveFrom: z5.string(),
1036
- lastVersionId: z5.string()
1037
- }),
1038
- /** The diff against the previous version — only fields that changed. */
1039
- responseSummary: z5.object({
1040
- previousVersionId: z5.string(),
1041
- versionId: z5.string(),
1042
- changed: z5.object({
1043
- name: ChangedStringField.optional(),
1044
- externalId: ChangedNullableStringField.optional(),
1045
- status: ChangedStringField.optional()
1046
- })
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()
1047
1042
  })
1048
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
+ });
1049
1054
  var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
1050
1055
  operation: z5.literal("attachments.upload"),
1051
1056
  requestData: z5.object({
@@ -1123,6 +1128,7 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
1123
1128
  IntegrationRefreshSecretEntrySchema,
1124
1129
  LocationCreateEntrySchema,
1125
1130
  LocationUpdateEntrySchema,
1131
+ AdministrativeAreaUpdateEntrySchema,
1126
1132
  AdministrativeAreaCreateEntrySchema,
1127
1133
  AttachmentUploadEntrySchema,
1128
1134
  UserCreateEntrySchema,
@@ -559,29 +559,34 @@ var ChangedNullableStringField = z5.object({
559
559
  from: z5.string().nullable(),
560
560
  to: z5.string().nullable()
561
561
  });
562
- var LocationUpdateEntrySchema = AuditLogEntryBase.extend({
563
- operation: z5.enum(["locations.update", "administrativeAreas.update"]),
564
- /** The submitted snapshot, with server-resolved `versionId`/`effectiveFrom`. */
565
- requestData: z5.object({
566
- id: z5.string(),
567
- versionId: z5.string(),
568
- name: z5.string(),
569
- externalId: z5.string().nullish(),
570
- status: z5.string(),
571
- effectiveFrom: z5.string(),
572
- lastVersionId: z5.string()
573
- }),
574
- /** The diff against the previous version — only fields that changed. */
575
- responseSummary: z5.object({
576
- previousVersionId: z5.string(),
577
- versionId: z5.string(),
578
- changed: z5.object({
579
- name: ChangedStringField.optional(),
580
- externalId: ChangedNullableStringField.optional(),
581
- status: ChangedStringField.optional()
582
- })
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()
583
578
  })
584
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
+ });
585
590
  var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
586
591
  operation: z5.literal("attachments.upload"),
587
592
  requestData: z5.object({
@@ -659,6 +664,7 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
659
664
  IntegrationRefreshSecretEntrySchema,
660
665
  LocationCreateEntrySchema,
661
666
  LocationUpdateEntrySchema,
667
+ AdministrativeAreaUpdateEntrySchema,
662
668
  AdministrativeAreaCreateEntrySchema,
663
669
  AttachmentUploadEntrySchema,
664
670
  UserCreateEntrySchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.1.0-rc.83d4009",
3
+ "version": "2.1.0-rc.83e6fba",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {