@opencrvs/toolkit 2.1.0-rc.1f4b4ad → 2.1.0-rc.1f71eca

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,104 @@ 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
+ };
8327
+ } | {
8328
+ id: string;
8329
+ clientId: string;
8330
+ clientType: "system" | "user";
8331
+ createdAt: string;
8332
+ operation: "locations.withdrawVersion";
8333
+ requestData: {
8334
+ id: string;
8335
+ versionId: string;
8336
+ };
8337
+ responseSummary: {
8338
+ effectiveFrom: string;
8339
+ name: string;
8340
+ externalId?: string | null | undefined;
8341
+ status: string;
8342
+ };
8343
+ } | {
8344
+ id: string;
8345
+ clientId: string;
8346
+ clientType: "system" | "user";
8347
+ createdAt: string;
8348
+ operation: "administrativeAreas.withdrawVersion";
8349
+ requestData: {
8350
+ id: string;
8351
+ versionId: string;
8352
+ };
8353
+ responseSummary: {
8354
+ effectiveFrom: string;
8355
+ name: string;
8356
+ externalId?: string | null | undefined;
8357
+ status: string;
8358
+ };
8261
8359
  } | {
8262
8360
  id: string;
8263
8361
  clientId: string;
@@ -8433,6 +8531,55 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8433
8531
  };
8434
8532
  meta: import("trpc-to-openapi").OpenApiMeta;
8435
8533
  }>;
8534
+ update: import("@trpc/server").TRPCMutationProcedure<{
8535
+ input: {
8536
+ id: string;
8537
+ versionId?: string | undefined;
8538
+ name: string;
8539
+ externalId?: string | null | undefined;
8540
+ status: "active" | "inactive";
8541
+ effectiveFrom?: string | undefined;
8542
+ lastVersionId: string;
8543
+ };
8544
+ output: {
8545
+ id: string & import("zod").$brand<"UUID">;
8546
+ name: string;
8547
+ externalId?: string | null | undefined;
8548
+ administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
8549
+ locationType: string | null;
8550
+ status: "active" | "inactive";
8551
+ versions: {
8552
+ versionId: string & import("zod").$brand<"UUID">;
8553
+ effectiveFrom: string;
8554
+ name: string;
8555
+ externalId?: string | null | undefined;
8556
+ status: "active" | "inactive";
8557
+ }[];
8558
+ };
8559
+ meta: import("trpc-to-openapi").OpenApiMeta;
8560
+ }>;
8561
+ withdrawVersion: import("@trpc/server").TRPCMutationProcedure<{
8562
+ input: {
8563
+ id: string;
8564
+ versionId: string;
8565
+ };
8566
+ output: {
8567
+ id: string & import("zod").$brand<"UUID">;
8568
+ name: string;
8569
+ externalId?: string | null | undefined;
8570
+ administrativeAreaId: (string & import("zod").$brand<"UUID">) | null;
8571
+ locationType: string | null;
8572
+ status: "active" | "inactive";
8573
+ versions: {
8574
+ versionId: string & import("zod").$brand<"UUID">;
8575
+ effectiveFrom: string;
8576
+ name: string;
8577
+ externalId?: string | null | undefined;
8578
+ status: "active" | "inactive";
8579
+ }[];
8580
+ };
8581
+ meta: import("trpc-to-openapi").OpenApiMeta;
8582
+ }>;
8436
8583
  get: import("@trpc/server").TRPCQueryProcedure<{
8437
8584
  input: {
8438
8585
  id: string;
@@ -8905,6 +9052,53 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
8905
9052
  };
8906
9053
  meta: import("trpc-to-openapi").OpenApiMeta;
8907
9054
  }>;
9055
+ update: import("@trpc/server").TRPCMutationProcedure<{
9056
+ input: {
9057
+ id: string;
9058
+ versionId?: string | undefined;
9059
+ name: string;
9060
+ externalId?: string | null | undefined;
9061
+ status: "active" | "inactive";
9062
+ effectiveFrom?: string | undefined;
9063
+ lastVersionId: string;
9064
+ };
9065
+ output: {
9066
+ id: string & import("zod").$brand<"UUID">;
9067
+ name: string;
9068
+ externalId?: string | null | undefined;
9069
+ parentId: (string & import("zod").$brand<"UUID">) | null;
9070
+ status: "active" | "inactive";
9071
+ versions: {
9072
+ versionId: string & import("zod").$brand<"UUID">;
9073
+ effectiveFrom: string;
9074
+ name: string;
9075
+ externalId?: string | null | undefined;
9076
+ status: "active" | "inactive";
9077
+ }[];
9078
+ };
9079
+ meta: import("trpc-to-openapi").OpenApiMeta;
9080
+ }>;
9081
+ withdrawVersion: import("@trpc/server").TRPCMutationProcedure<{
9082
+ input: {
9083
+ id: string;
9084
+ versionId: string;
9085
+ };
9086
+ output: {
9087
+ id: string & import("zod").$brand<"UUID">;
9088
+ name: string;
9089
+ externalId?: string | null | undefined;
9090
+ parentId: (string & import("zod").$brand<"UUID">) | null;
9091
+ status: "active" | "inactive";
9092
+ versions: {
9093
+ versionId: string & import("zod").$brand<"UUID">;
9094
+ effectiveFrom: string;
9095
+ name: string;
9096
+ externalId?: string | null | undefined;
9097
+ status: "active" | "inactive";
9098
+ }[];
9099
+ };
9100
+ meta: import("trpc-to-openapi").OpenApiMeta;
9101
+ }>;
8908
9102
  }>>;
8909
9103
  integrations: import("@trpc/server").TRPCBuiltRouter<{
8910
9104
  ctx: Partial<{
@@ -300,6 +300,116 @@ 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>;
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<"locations.withdrawVersion">;
384
+ requestData: z.ZodObject<{
385
+ id: z.ZodString;
386
+ versionId: z.ZodString;
387
+ }, z.core.$strip>;
388
+ responseSummary: z.ZodObject<{
389
+ effectiveFrom: z.ZodString;
390
+ name: z.ZodString;
391
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
392
+ status: z.ZodString;
393
+ }, z.core.$strip>;
394
+ }, z.core.$strip>, z.ZodObject<{
395
+ id: z.ZodString;
396
+ clientId: z.ZodString;
397
+ clientType: z.ZodEnum<{
398
+ system: "system";
399
+ user: "user";
400
+ }>;
401
+ createdAt: z.ZodString;
402
+ operation: z.ZodLiteral<"administrativeAreas.withdrawVersion">;
403
+ requestData: z.ZodObject<{
404
+ id: z.ZodString;
405
+ versionId: z.ZodString;
406
+ }, z.core.$strip>;
407
+ responseSummary: z.ZodObject<{
408
+ effectiveFrom: z.ZodString;
409
+ name: z.ZodString;
410
+ externalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
+ status: z.ZodString;
412
+ }, z.core.$strip>;
303
413
  }, z.core.$strip>, z.ZodObject<{
304
414
  id: z.ZodString;
305
415
  clientId: z.ZodString;
@@ -1018,6 +1018,59 @@ 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
+ });
1054
+ var withdrawVersionRequestData = z5.object({
1055
+ id: z5.string(),
1056
+ versionId: z5.string()
1057
+ });
1058
+ var withdrawVersionResponseSummary = z5.object({
1059
+ effectiveFrom: z5.string(),
1060
+ name: z5.string(),
1061
+ externalId: z5.string().nullish(),
1062
+ status: z5.string()
1063
+ });
1064
+ var LocationWithdrawEntrySchema = AuditLogEntryBase.extend({
1065
+ operation: z5.literal("locations.withdrawVersion"),
1066
+ requestData: withdrawVersionRequestData,
1067
+ responseSummary: withdrawVersionResponseSummary
1068
+ });
1069
+ var AdministrativeAreaWithdrawEntrySchema = AuditLogEntryBase.extend({
1070
+ operation: z5.literal("administrativeAreas.withdrawVersion"),
1071
+ requestData: withdrawVersionRequestData,
1072
+ responseSummary: withdrawVersionResponseSummary
1073
+ });
1021
1074
  var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
1022
1075
  operation: z5.literal("attachments.upload"),
1023
1076
  requestData: z5.object({
@@ -1094,6 +1147,10 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
1094
1147
  IntegrationDeleteEntrySchema,
1095
1148
  IntegrationRefreshSecretEntrySchema,
1096
1149
  LocationCreateEntrySchema,
1150
+ LocationUpdateEntrySchema,
1151
+ AdministrativeAreaUpdateEntrySchema,
1152
+ LocationWithdrawEntrySchema,
1153
+ AdministrativeAreaWithdrawEntrySchema,
1097
1154
  AdministrativeAreaCreateEntrySchema,
1098
1155
  AttachmentUploadEntrySchema,
1099
1156
  UserCreateEntrySchema,
@@ -554,6 +554,59 @@ 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
+ });
590
+ var withdrawVersionRequestData = z5.object({
591
+ id: z5.string(),
592
+ versionId: z5.string()
593
+ });
594
+ var withdrawVersionResponseSummary = z5.object({
595
+ effectiveFrom: z5.string(),
596
+ name: z5.string(),
597
+ externalId: z5.string().nullish(),
598
+ status: z5.string()
599
+ });
600
+ var LocationWithdrawEntrySchema = AuditLogEntryBase.extend({
601
+ operation: z5.literal("locations.withdrawVersion"),
602
+ requestData: withdrawVersionRequestData,
603
+ responseSummary: withdrawVersionResponseSummary
604
+ });
605
+ var AdministrativeAreaWithdrawEntrySchema = AuditLogEntryBase.extend({
606
+ operation: z5.literal("administrativeAreas.withdrawVersion"),
607
+ requestData: withdrawVersionRequestData,
608
+ responseSummary: withdrawVersionResponseSummary
609
+ });
557
610
  var AttachmentUploadEntrySchema = AuditLogEntryBase.extend({
558
611
  operation: z5.literal("attachments.upload"),
559
612
  requestData: z5.object({
@@ -630,6 +683,10 @@ var AuditLogEntrySchema = z5.discriminatedUnion("operation", [
630
683
  IntegrationDeleteEntrySchema,
631
684
  IntegrationRefreshSecretEntrySchema,
632
685
  LocationCreateEntrySchema,
686
+ LocationUpdateEntrySchema,
687
+ AdministrativeAreaUpdateEntrySchema,
688
+ LocationWithdrawEntrySchema,
689
+ AdministrativeAreaWithdrawEntrySchema,
633
690
  AdministrativeAreaCreateEntrySchema,
634
691
  AttachmentUploadEntrySchema,
635
692
  UserCreateEntrySchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.1.0-rc.1f4b4ad",
3
+ "version": "2.1.0-rc.1f71eca",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {