@opencrvs/toolkit 2.1.0-rc.628e5ce → 2.1.0-rc.6a144d4

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.
@@ -8258,6 +8258,72 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8258
8258
  administrativeAreaId?: string | null | undefined;
8259
8259
  locationType?: string | null | undefined;
8260
8260
  };
8261
+ } | {
8262
+ id: string;
8263
+ clientId: string;
8264
+ clientType: "system" | "user";
8265
+ createdAt: string;
8266
+ operation: "locations.update";
8267
+ requestData: {
8268
+ id: string;
8269
+ versionId: string;
8270
+ name: string;
8271
+ externalId?: string | null | undefined;
8272
+ status: string;
8273
+ effectiveFrom: string;
8274
+ lastVersionId: string;
8275
+ };
8276
+ responseSummary: {
8277
+ previousVersionId: string;
8278
+ versionId: string;
8279
+ changed: {
8280
+ name?: {
8281
+ from: string;
8282
+ to: string;
8283
+ } | undefined;
8284
+ externalId?: {
8285
+ from: string | null;
8286
+ to: string | null;
8287
+ } | undefined;
8288
+ status?: {
8289
+ from: string;
8290
+ to: string;
8291
+ } | undefined;
8292
+ };
8293
+ };
8294
+ } | {
8295
+ id: string;
8296
+ clientId: string;
8297
+ clientType: "system" | "user";
8298
+ createdAt: string;
8299
+ operation: "administrativeAreas.update";
8300
+ requestData: {
8301
+ id: string;
8302
+ versionId: string;
8303
+ name: string;
8304
+ externalId?: string | null | undefined;
8305
+ status: string;
8306
+ effectiveFrom: string;
8307
+ lastVersionId: string;
8308
+ };
8309
+ responseSummary: {
8310
+ previousVersionId: string;
8311
+ versionId: string;
8312
+ changed: {
8313
+ name?: {
8314
+ from: string;
8315
+ to: string;
8316
+ } | undefined;
8317
+ externalId?: {
8318
+ from: string | null;
8319
+ to: string | null;
8320
+ } | undefined;
8321
+ status?: {
8322
+ from: string;
8323
+ to: string;
8324
+ } | undefined;
8325
+ };
8326
+ };
8261
8327
  } | {
8262
8328
  id: string;
8263
8329
  clientId: string;
@@ -8433,6 +8499,33 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8433
8499
  };
8434
8500
  meta: import("trpc-to-openapi").OpenApiMeta;
8435
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
+ }>;
8436
8529
  get: import("@trpc/server").TRPCQueryProcedure<{
8437
8530
  input: {
8438
8531
  id: string;
@@ -8905,6 +8998,32 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8905
8998
  };
8906
8999
  meta: import("trpc-to-openapi").OpenApiMeta;
8907
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
+ }>;
8908
9027
  }>>;
8909
9028
  integrations: import("@trpc/server").TRPCBuiltRouter<{
8910
9029
  ctx: Partial<{
@@ -300,6 +300,78 @@ export declare const AuditLogEntrySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
300
300
  administrativeAreaId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
301
301
  locationType: z.ZodOptional<z.ZodNullable<z.ZodString>>;
302
302
  }, z.core.$strip>;
303
+ }, z.core.$strip>, z.ZodObject<{
304
+ id: z.ZodString;
305
+ clientId: z.ZodString;
306
+ clientType: z.ZodEnum<{
307
+ system: "system";
308
+ user: "user";
309
+ }>;
310
+ createdAt: z.ZodString;
311
+ operation: z.ZodLiteral<"locations.update">;
312
+ requestData: z.ZodObject<{
313
+ id: z.ZodString;
314
+ versionId: z.ZodString;
315
+ name: z.ZodString;
316
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
+ status: z.ZodString;
318
+ effectiveFrom: z.ZodString;
319
+ lastVersionId: z.ZodString;
320
+ }, z.core.$strip>;
321
+ responseSummary: z.ZodObject<{
322
+ previousVersionId: z.ZodString;
323
+ versionId: z.ZodString;
324
+ changed: z.ZodObject<{
325
+ name: z.ZodOptional<z.ZodObject<{
326
+ from: z.ZodString;
327
+ to: z.ZodString;
328
+ }, z.core.$strip>>;
329
+ externalId: z.ZodOptional<z.ZodObject<{
330
+ from: z.ZodNullable<z.ZodString>;
331
+ to: z.ZodNullable<z.ZodString>;
332
+ }, z.core.$strip>>;
333
+ status: z.ZodOptional<z.ZodObject<{
334
+ from: z.ZodString;
335
+ to: z.ZodString;
336
+ }, z.core.$strip>>;
337
+ }, z.core.$strip>;
338
+ }, z.core.$strip>;
339
+ }, z.core.$strip>, z.ZodObject<{
340
+ id: z.ZodString;
341
+ clientId: z.ZodString;
342
+ clientType: z.ZodEnum<{
343
+ system: "system";
344
+ user: "user";
345
+ }>;
346
+ createdAt: z.ZodString;
347
+ operation: z.ZodLiteral<"administrativeAreas.update">;
348
+ requestData: z.ZodObject<{
349
+ id: z.ZodString;
350
+ versionId: z.ZodString;
351
+ name: z.ZodString;
352
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
353
+ status: z.ZodString;
354
+ effectiveFrom: z.ZodString;
355
+ lastVersionId: z.ZodString;
356
+ }, z.core.$strip>;
357
+ responseSummary: z.ZodObject<{
358
+ previousVersionId: z.ZodString;
359
+ versionId: z.ZodString;
360
+ changed: z.ZodObject<{
361
+ name: z.ZodOptional<z.ZodObject<{
362
+ from: z.ZodString;
363
+ to: z.ZodString;
364
+ }, z.core.$strip>>;
365
+ externalId: z.ZodOptional<z.ZodObject<{
366
+ from: z.ZodNullable<z.ZodString>;
367
+ to: z.ZodNullable<z.ZodString>;
368
+ }, z.core.$strip>>;
369
+ status: z.ZodOptional<z.ZodObject<{
370
+ from: z.ZodString;
371
+ to: z.ZodString;
372
+ }, z.core.$strip>>;
373
+ }, z.core.$strip>;
374
+ }, z.core.$strip>;
303
375
  }, z.core.$strip>, z.ZodObject<{
304
376
  id: z.ZodString;
305
377
  clientId: z.ZodString;
@@ -1018,6 +1018,39 @@ var AdministrativeAreaCreateEntrySchema = AuditLogEntryBase.extend({
1018
1018
  parentId: z5.string().nullish()
1019
1019
  })
1020
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
+ });
1021
1054
  var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
1022
1055
  operation: z5.literal("attachments.upload"),
1023
1056
  requestData: z5.object({
@@ -1094,6 +1127,8 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
1094
1127
  IntegrationDeleteEntrySchema,
1095
1128
  IntegrationRefreshSecretEntrySchema,
1096
1129
  LocationCreateEntrySchema,
1130
+ LocationUpdateEntrySchema,
1131
+ AdministrativeAreaUpdateEntrySchema,
1097
1132
  AdministrativeAreaCreateEntrySchema,
1098
1133
  AttachmentUploadEntrySchema,
1099
1134
  UserCreateEntrySchema,
@@ -554,6 +554,39 @@ var AdministrativeAreaCreateEntrySchema = AuditLogEntryBase.extend({
554
554
  parentId: z5.string().nullish()
555
555
  })
556
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
+ });
557
590
  var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
558
591
  operation: z5.literal("attachments.upload"),
559
592
  requestData: z5.object({
@@ -630,6 +663,8 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
630
663
  IntegrationDeleteEntrySchema,
631
664
  IntegrationRefreshSecretEntrySchema,
632
665
  LocationCreateEntrySchema,
666
+ LocationUpdateEntrySchema,
667
+ AdministrativeAreaUpdateEntrySchema,
633
668
  AdministrativeAreaCreateEntrySchema,
634
669
  AttachmentUploadEntrySchema,
635
670
  UserCreateEntrySchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.1.0-rc.628e5ce",
3
+ "version": "2.1.0-rc.6a144d4",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {