@opencrvs/toolkit 2.0.0-rc.262067c → 2.0.0-rc.2625051

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.
Files changed (70) hide show
  1. package/dist/cli.js +142 -1383
  2. package/dist/commons/api/router.d.ts +54 -55
  3. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.d.ts.map +1 -1
  4. package/dist/migrations/v2.0/add-birth-certificate-issuance-flag.js +4 -3
  5. package/dist/migrations/v2.0/checkout-upstream-files.d.ts +0 -19
  6. package/dist/migrations/v2.0/checkout-upstream-files.d.ts.map +1 -1
  7. package/dist/migrations/v2.0/checkout-upstream-files.js +13 -17
  8. package/dist/migrations/v2.0/convert-config-files-to-ts.d.ts.map +1 -1
  9. package/dist/migrations/v2.0/convert-config-files-to-ts.js +5 -4
  10. package/dist/migrations/v2.0/convert-paragraph-to-heading.d.ts.map +1 -1
  11. package/dist/migrations/v2.0/convert-paragraph-to-heading.js +5 -4
  12. package/dist/migrations/v2.0/create-events-index.d.ts.map +1 -1
  13. package/dist/migrations/v2.0/create-events-index.js +2 -1
  14. package/dist/migrations/v2.0/index.d.ts +4 -8
  15. package/dist/migrations/v2.0/index.d.ts.map +1 -1
  16. package/dist/migrations/v2.0/index.js +139 -1351
  17. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.d.ts.map +1 -1
  18. package/dist/migrations/v2.0/make-built-in-validate-actions-custom.js +6 -5
  19. package/dist/migrations/v2.0/migrate-scopes.d.ts.map +1 -1
  20. package/dist/migrations/v2.0/migrate-scopes.js +7 -6
  21. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.d.ts.map +1 -1
  22. package/dist/migrations/v2.0/migrate-validated-workqueue-status-to-flag.js +4 -3
  23. package/dist/migrations/v2.0/migrate-workqueue-configs.d.ts.map +1 -1
  24. package/dist/migrations/v2.0/migrate-workqueue-configs.js +4 -3
  25. package/dist/migrations/v2.0/remove-delete-actions.d.ts.map +1 -1
  26. package/dist/migrations/v2.0/remove-delete-actions.js +4 -3
  27. package/dist/migrations/v2.0/remove-demo-scope.d.ts.map +1 -1
  28. package/dist/migrations/v2.0/remove-demo-scope.js +3 -2
  29. package/dist/migrations/v2.0/remove-deprecated-imports.d.ts.map +1 -1
  30. package/dist/migrations/v2.0/remove-deprecated-imports.js +4 -3
  31. package/dist/migrations/v2.0/remove-hearth-migrations.d.ts.map +1 -1
  32. package/dist/migrations/v2.0/remove-hearth-migrations.js +2 -1
  33. package/dist/migrations/v2.0/remove-pending-certification-flag.d.ts.map +1 -1
  34. package/dist/migrations/v2.0/remove-pending-certification-flag.js +4 -3
  35. package/dist/migrations/v2.0/remove-review-from-register-action.d.ts.map +1 -1
  36. package/dist/migrations/v2.0/remove-review-from-register-action.js +4 -3
  37. package/dist/migrations/v2.0/rename-api-paths.d.ts.map +1 -1
  38. package/dist/migrations/v2.0/rename-api-paths.js +4 -3
  39. package/dist/migrations/v2.0/rename-location-parent-id.d.ts.map +1 -1
  40. package/dist/migrations/v2.0/rename-location-parent-id.js +4 -3
  41. package/dist/migrations/v2.0/simplify-analytics-precalculations.d.ts.map +1 -1
  42. package/dist/migrations/v2.0/simplify-analytics-precalculations.js +2 -1
  43. package/opencrvs-toolkit-2.0.0-rc.2625051.tgz +0 -0
  44. package/package.json +1 -1
  45. package/tsconfig.tsbuildinfo +1 -1
  46. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts +0 -3
  47. package/dist/migrations/v2.0/add-resend-invite-notification.d.ts.map +0 -1
  48. package/dist/migrations/v2.0/add-resend-invite-notification.js +0 -373
  49. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts +0 -3
  50. package/dist/migrations/v2.0/delete-infrastructure-directory.d.ts.map +0 -1
  51. package/dist/migrations/v2.0/delete-infrastructure-directory.js +0 -77
  52. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts +0 -3
  53. package/dist/migrations/v2.0/merge-infrastructure-directory.d.ts.map +0 -1
  54. package/dist/migrations/v2.0/merge-infrastructure-directory.js +0 -221
  55. package/dist/migrations/v2.0/migrate-application-config-url.d.ts +0 -3
  56. package/dist/migrations/v2.0/migrate-application-config-url.d.ts.map +0 -1
  57. package/dist/migrations/v2.0/migrate-application-config-url.js +0 -342
  58. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts +0 -3
  59. package/dist/migrations/v2.0/remove-fhir-url-helpers.d.ts.map +0 -1
  60. package/dist/migrations/v2.0/remove-fhir-url-helpers.js +0 -163
  61. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts +0 -3
  62. package/dist/migrations/v2.0/remove-old-statistics-service.d.ts.map +0 -1
  63. package/dist/migrations/v2.0/remove-old-statistics-service.js +0 -356
  64. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts +0 -3
  65. package/dist/migrations/v2.0/remove-unused-environment-variables.d.ts.map +0 -1
  66. package/dist/migrations/v2.0/remove-unused-environment-variables.js +0 -186
  67. package/dist/migrations/v2.0/update-package-json.d.ts +0 -3
  68. package/dist/migrations/v2.0/update-package-json.d.ts.map +0 -1
  69. package/dist/migrations/v2.0/update-package-json.js +0 -105
  70. package/opencrvs-toolkit-2.0.0-rc.262067c.tgz +0 -0
@@ -3975,9 +3975,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
3975
3975
  output: {
3976
3976
  id: string & import("zod").$brand<"UUID">;
3977
3977
  name: {
3978
- firstname: string;
3979
- surname: string;
3980
- };
3978
+ use: string;
3979
+ given: string[];
3980
+ family: string;
3981
+ }[];
3981
3982
  role: string;
3982
3983
  primaryOfficeId: string & import("zod").$brand<"UUID">;
3983
3984
  type: "user";
@@ -4007,9 +4008,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4007
4008
  create: import("@trpc/server").TRPCMutationProcedure<{
4008
4009
  input: {
4009
4010
  name: {
4010
- firstname: string;
4011
- surname: string;
4012
- };
4011
+ use: string;
4012
+ given: string[];
4013
+ family: string;
4014
+ }[];
4013
4015
  role: string;
4014
4016
  primaryOfficeId: string;
4015
4017
  data?: Record<string, unknown> | undefined;
@@ -4018,7 +4020,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4018
4020
  email?: string | undefined;
4019
4021
  mobile?: string | undefined;
4020
4022
  username?: undefined;
4021
- password?: undefined;
4022
4023
  signature?: {
4023
4024
  path: string;
4024
4025
  originalFilename: string;
@@ -4028,9 +4029,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4028
4029
  output: {
4029
4030
  id: string & import("zod").$brand<"UUID">;
4030
4031
  name: {
4031
- firstname: string;
4032
- surname: string;
4033
- };
4032
+ use: string;
4033
+ given: string[];
4034
+ family: string;
4035
+ }[];
4034
4036
  role: string;
4035
4037
  primaryOfficeId: string & import("zod").$brand<"UUID">;
4036
4038
  type: "user";
@@ -4051,9 +4053,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4051
4053
  id: string;
4052
4054
  data?: Record<string, unknown> | undefined;
4053
4055
  name?: {
4054
- firstname: string;
4055
- surname: string;
4056
- } | undefined;
4056
+ use: string;
4057
+ given: string[];
4058
+ family: string;
4059
+ }[] | undefined;
4057
4060
  role?: string | undefined;
4058
4061
  fullHonorificName?: string | undefined;
4059
4062
  device?: string | undefined;
@@ -4066,13 +4069,16 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4066
4069
  type: string;
4067
4070
  } | undefined;
4068
4071
  status?: "active" | "deactivated" | undefined;
4072
+ } & {
4073
+ id: string;
4069
4074
  };
4070
4075
  output: {
4071
4076
  id: string & import("zod").$brand<"UUID">;
4072
4077
  name: {
4073
- firstname: string;
4074
- surname: string;
4075
- };
4078
+ use: string;
4079
+ given: string[];
4080
+ family: string;
4081
+ }[];
4076
4082
  role: string;
4077
4083
  primaryOfficeId: string & import("zod").$brand<"UUID">;
4078
4084
  type: "user";
@@ -4093,9 +4099,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4093
4099
  output: ({
4094
4100
  id: string & import("zod").$brand<"UUID">;
4095
4101
  name: {
4096
- firstname: string;
4097
- surname: string;
4098
- };
4102
+ use: string;
4103
+ given: string[];
4104
+ family: string;
4105
+ }[];
4099
4106
  role: string;
4100
4107
  primaryOfficeId: string & import("zod").$brand<"UUID">;
4101
4108
  type: "user";
@@ -4137,9 +4144,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4137
4144
  output: ({
4138
4145
  id: string & import("zod").$brand<"UUID">;
4139
4146
  name: {
4140
- firstname: string;
4141
- surname: string;
4142
- };
4147
+ use: string;
4148
+ given: string[];
4149
+ family: string;
4150
+ }[];
4143
4151
  role: string;
4144
4152
  primaryOfficeId: string & import("zod").$brand<"UUID">;
4145
4153
  type: "user";
@@ -4275,7 +4283,10 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4275
4283
  changeAvatar: import("@trpc/server").TRPCMutationProcedure<{
4276
4284
  input: {
4277
4285
  userId: string;
4278
- avatar: string;
4286
+ avatar: {
4287
+ type: string;
4288
+ data: string;
4289
+ };
4279
4290
  };
4280
4291
  output: void;
4281
4292
  meta: import("trpc-to-openapi").OpenApiMeta;
@@ -4307,18 +4318,6 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4307
4318
  output: void;
4308
4319
  meta: import("trpc-to-openapi").OpenApiMeta;
4309
4320
  }>;
4310
- verifyLoggedInUserPassword: import("@trpc/server").TRPCMutationProcedure<{
4311
- input: {
4312
- password: string;
4313
- };
4314
- output: {
4315
- status: string;
4316
- username: string;
4317
- id: string;
4318
- mobile?: string | undefined;
4319
- };
4320
- meta: import("trpc-to-openapi").OpenApiMeta;
4321
- }>;
4322
4321
  audit: import("@trpc/server").TRPCBuiltRouter<{
4323
4322
  ctx: Partial<{
4324
4323
  token: `Bearer ${string}`;
@@ -4774,7 +4773,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4774
4773
  'legalStatuses.DECLARED.createdAtLocation'?: {
4775
4774
  type: "within";
4776
4775
  location: string | {
4777
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4776
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4778
4777
  $location?: string | undefined;
4779
4778
  };
4780
4779
  } | undefined;
@@ -4796,7 +4795,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4796
4795
  'legalStatuses.REGISTERED.createdAtLocation'?: {
4797
4796
  type: "within";
4798
4797
  location: string | {
4799
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4798
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4800
4799
  $location?: string | undefined;
4801
4800
  };
4802
4801
  } | undefined;
@@ -4811,47 +4810,47 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4811
4810
  createdAtLocation?: {
4812
4811
  type: "within";
4813
4812
  location: string | {
4814
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4813
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4815
4814
  $location?: string | undefined;
4816
4815
  };
4817
4816
  } | {
4818
4817
  type: "exact";
4819
4818
  term: string | {
4820
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4819
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4821
4820
  $location?: string | undefined;
4822
4821
  };
4823
4822
  } | undefined;
4824
4823
  updatedAtLocation?: {
4825
4824
  type: "within";
4826
4825
  location: string | {
4827
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4826
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4828
4827
  $location?: string | undefined;
4829
4828
  };
4830
4829
  } | {
4831
4830
  type: "exact";
4832
4831
  term: string | {
4833
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4832
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4834
4833
  $location?: string | undefined;
4835
4834
  };
4836
4835
  } | undefined;
4837
4836
  updatedByUserRole?: {
4838
4837
  type: "exact";
4839
4838
  term: string | {
4840
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4839
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4841
4840
  $location?: string | undefined;
4842
4841
  };
4843
4842
  } | undefined;
4844
4843
  assignedTo?: {
4845
4844
  type: "exact";
4846
4845
  term: string | {
4847
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4846
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4848
4847
  $location?: string | undefined;
4849
4848
  };
4850
4849
  } | undefined;
4851
4850
  createdBy?: {
4852
4851
  type: "exact";
4853
4852
  term: string | {
4854
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4853
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4855
4854
  $location?: string | undefined;
4856
4855
  };
4857
4856
  } | undefined;
@@ -4862,7 +4861,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4862
4861
  updatedBy?: {
4863
4862
  type: "exact";
4864
4863
  term: string | {
4865
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4864
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4866
4865
  $location?: string | undefined;
4867
4866
  };
4868
4867
  } | undefined;
@@ -4912,7 +4911,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4912
4911
  'legalStatuses.DECLARED.createdAtLocation'?: {
4913
4912
  type: "within";
4914
4913
  location: string | {
4915
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4914
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4916
4915
  $location?: string | undefined;
4917
4916
  };
4918
4917
  } | undefined;
@@ -4934,7 +4933,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4934
4933
  'legalStatuses.REGISTERED.createdAtLocation'?: {
4935
4934
  type: "within";
4936
4935
  location: string | {
4937
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4936
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4938
4937
  $location?: string | undefined;
4939
4938
  };
4940
4939
  } | undefined;
@@ -4949,47 +4948,47 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4949
4948
  createdAtLocation?: {
4950
4949
  type: "within";
4951
4950
  location: string | {
4952
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4951
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4953
4952
  $location?: string | undefined;
4954
4953
  };
4955
4954
  } | {
4956
4955
  type: "exact";
4957
4956
  term: string | {
4958
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4957
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4959
4958
  $location?: string | undefined;
4960
4959
  };
4961
4960
  } | undefined;
4962
4961
  updatedAtLocation?: {
4963
4962
  type: "within";
4964
4963
  location: string | {
4965
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4964
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4966
4965
  $location?: string | undefined;
4967
4966
  };
4968
4967
  } | {
4969
4968
  type: "exact";
4970
4969
  term: string | {
4971
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4970
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4972
4971
  $location?: string | undefined;
4973
4972
  };
4974
4973
  } | undefined;
4975
4974
  updatedByUserRole?: {
4976
4975
  type: "exact";
4977
4976
  term: string | {
4978
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4977
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4979
4978
  $location?: string | undefined;
4980
4979
  };
4981
4980
  } | undefined;
4982
4981
  assignedTo?: {
4983
4982
  type: "exact";
4984
4983
  term: string | {
4985
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4984
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4986
4985
  $location?: string | undefined;
4987
4986
  };
4988
4987
  } | undefined;
4989
4988
  createdBy?: {
4990
4989
  type: "exact";
4991
4990
  term: string | {
4992
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
4991
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
4993
4992
  $location?: string | undefined;
4994
4993
  };
4995
4994
  } | undefined;
@@ -5000,7 +4999,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
5000
4999
  updatedBy?: {
5001
5000
  type: "exact";
5002
5001
  term: string | {
5003
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "avatar" | "signature" | "primaryOfficeId" | "middlename";
5002
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "avatar" | "signature" | "primaryOfficeId";
5004
5003
  $location?: string | undefined;
5005
5004
  };
5006
5005
  } | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"add-birth-certificate-issuance-flag.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/add-birth-certificate-issuance-flag.ts"],"names":[],"mappings":"AA2aA,iBAAe,IAAI,kBAiDlB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"add-birth-certificate-issuance-flag.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/add-birth-certificate-issuance-flag.ts"],"names":[],"mappings":"AA6aA,iBAAe,IAAI,kBAiDlB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -48,6 +48,7 @@ exports.main = main;
48
48
  */
49
49
  const ts_morph_1 = require("ts-morph");
50
50
  const path_1 = __importDefault(require("path"));
51
+ const _1 = require(".");
51
52
  const DEFINE_CONFIG_NAME = 'defineConfig';
52
53
  const DEFINE_WORKQUEUES_NAME = 'defineWorkqueues';
53
54
  const ACTIONS_PROPERTY_NAME = 'actions';
@@ -317,7 +318,7 @@ function processFile(filePath, project) {
317
318
  if (!sourceFile)
318
319
  return 0;
319
320
  let totalChanges = 0;
320
- const relPath = path_1.default.relative(process.cwd(), filePath);
321
+ const relPath = path_1.default.relative((0, _1.getCwd)(), filePath);
321
322
  const callExpressions = sourceFile.getDescendantsOfKind(ts_morph_1.SyntaxKind.CallExpression);
322
323
  for (const call of callExpressions) {
323
324
  const expression = call.getExpression();
@@ -368,7 +369,7 @@ function processFile(filePath, project) {
368
369
  // ─── Entry point ─────────────────────────────────────────────────────────────
369
370
  function main() {
370
371
  return __awaiter(this, void 0, void 0, function* () {
371
- const srcDir = path_1.default.join(process.cwd(), 'src');
372
+ const srcDir = path_1.default.join((0, _1.getCwd)(), 'src');
372
373
  console.log(`Scanning for birth defineConfig and PRINT_CERTIFICATE workqueues in: ${srcDir}\n`);
373
374
  const project = new ts_morph_1.Project({
374
375
  tsConfigFilePath: path_1.default.resolve(srcDir, '../tsconfig.json'),
@@ -397,7 +398,7 @@ function main() {
397
398
  for (const filePath of modifiedFiles) {
398
399
  const sourceFile = project.getSourceFileOrThrow(filePath);
399
400
  yield sourceFile.save();
400
- console.log(` Saved: ${path_1.default.relative(process.cwd(), filePath)}`);
401
+ console.log(` Saved: ${path_1.default.relative((0, _1.getCwd)(), filePath)}`);
401
402
  }
402
403
  console.log(`\nDone. Applied ${totalChanges} change(s) across ${modifiedFiles.length} file(s).`);
403
404
  });
@@ -1,22 +1,3 @@
1
- export declare const UPSTREAM_URL = "https://github.com/opencrvs/opencrvs-countryconfig.git";
2
- export declare const UPSTREAM_BRANCH = "develop";
3
- /**
4
- * Runs a git command in the country config working directory.
5
- *
6
- * By default stderr is inherited so the user sees progress output from
7
- * long-running commands (e.g. `git fetch`). Pass `silent: true` to suppress
8
- * both stdout and stderr when you only care about the exit code.
9
- */
10
- export declare function runGit(args: string[], { silent }?: {
11
- silent?: boolean;
12
- }): string;
13
- /**
14
- * Runs a git command and returns true on success, false on failure.
15
- * Stderr/stdout are suppressed — use only when the exit code is the only
16
- * signal you care about.
17
- */
18
- export declare function tryGit(args: string[]): boolean;
19
- export declare function assertIsGitRepo(): void;
20
1
  declare function main(): Promise<void>;
21
2
  export { main };
22
3
  //# sourceMappingURL=checkout-upstream-files.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkout-upstream-files.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/checkout-upstream-files.ts"],"names":[],"mappings":"AA8CA,eAAO,MAAM,YAAY,2DACiC,CAAA;AAG1D,eAAO,MAAM,eAAe,YAAY,CAAA;AAcxC;;;;;;GAMG;AACH,wBAAgB,MAAM,CACpB,IAAI,EAAE,MAAM,EAAE,EACd,EAAE,MAAc,EAAE,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAC5C,MAAM,CAMR;AAED;;;;GAIG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAO9C;AAED,wBAAgB,eAAe,IAAI,IAAI,CAMtC;AAID,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAuDnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"checkout-upstream-files.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/checkout-upstream-files.ts"],"names":[],"mappings":"AA0GA,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAuDnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -19,10 +19,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
19
19
  });
20
20
  };
21
21
  Object.defineProperty(exports, "__esModule", { value: true });
22
- exports.UPSTREAM_BRANCH = exports.UPSTREAM_URL = void 0;
23
- exports.runGit = runGit;
24
- exports.tryGit = tryGit;
25
- exports.assertIsGitRepo = assertIsGitRepo;
26
22
  exports.main = main;
27
23
  /**
28
24
  * Codemod: Replace selected files with their upstream v2.0 versions from
@@ -58,16 +54,16 @@ exports.main = main;
58
54
  * - Requires the country config working directory to be a git repo.
59
55
  */
60
56
  const child_process_1 = require("child_process");
61
- exports.UPSTREAM_URL = 'https://github.com/opencrvs/opencrvs-countryconfig.git';
57
+ const _1 = require(".");
58
+ const UPSTREAM_URL = 'https://github.com/opencrvs/opencrvs-countryconfig.git';
62
59
  // @TODO: This needs to be changed to 'release-v2.0.0' once the branch is created
63
- exports.UPSTREAM_BRANCH = 'develop';
60
+ const UPSTREAM_BRANCH = 'develop';
64
61
  // Remote name used only for the duration of this codemod. Prefixed to avoid
65
62
  // clashing with remotes the user may have (origin, upstream, etc.).
66
63
  const TEMP_REMOTE = 'opencrvs-upgrade-v19-v20-codemod';
67
64
  const FILES_TO_CHECKOUT = [
68
- 'src/analytics/analytics.ts',
69
- 'Dockerfile',
70
- 'Dockerfile.assets'
65
+ 'infrastructure/postgres/setup-analytics.sh',
66
+ 'src/analytics/analytics.ts'
71
67
  ];
72
68
  // ─── Git helpers ─────────────────────────────────────────────────────────────
73
69
  /**
@@ -79,7 +75,7 @@ const FILES_TO_CHECKOUT = [
79
75
  */
80
76
  function runGit(args, { silent = false } = {}) {
81
77
  return (0, child_process_1.execFileSync)('git', args, {
82
- cwd: process.cwd(),
78
+ cwd: (0, _1.getCwd)(),
83
79
  encoding: 'utf8',
84
80
  stdio: silent ? ['ignore', 'pipe', 'pipe'] : ['ignore', 'pipe', 'inherit']
85
81
  });
@@ -100,22 +96,22 @@ function tryGit(args) {
100
96
  }
101
97
  function assertIsGitRepo() {
102
98
  if (!tryGit(['rev-parse', '--is-inside-work-tree'])) {
103
- throw new Error(`${process.cwd()} is not a git repository. Initialise git (or run the upgrade inside a git checkout) before re-running.`);
99
+ throw new Error(`checkout-upstream-files: ${(0, _1.getCwd)()} is not a git repository. Initialise git (or run the upgrade inside a git checkout) before re-running.`);
104
100
  }
105
101
  }
106
102
  // ─── Entry point ─────────────────────────────────────────────────────────────
107
103
  function main() {
108
104
  return __awaiter(this, void 0, void 0, function* () {
109
- console.log(`Checking out ${FILES_TO_CHECKOUT.length} file(s) from ${exports.UPSTREAM_URL}@${exports.UPSTREAM_BRANCH}...\n`);
105
+ console.log(`Checking out ${FILES_TO_CHECKOUT.length} file(s) from ${UPSTREAM_URL}@${UPSTREAM_BRANCH}...\n`);
110
106
  assertIsGitRepo();
111
107
  // Best-effort cleanup of a stale temp remote from a previous aborted run.
112
108
  tryGit(['remote', 'remove', TEMP_REMOTE]);
113
109
  try {
114
- console.log(` Adding temporary remote '${TEMP_REMOTE}' → ${exports.UPSTREAM_URL}`);
115
- runGit(['remote', 'add', TEMP_REMOTE, exports.UPSTREAM_URL], { silent: true });
116
- console.log(` Fetching ${TEMP_REMOTE}/${exports.UPSTREAM_BRANCH} (depth 1)...`);
117
- runGit(['fetch', '--depth=1', TEMP_REMOTE, exports.UPSTREAM_BRANCH]);
118
- const ref = `${TEMP_REMOTE}/${exports.UPSTREAM_BRANCH}`;
110
+ console.log(` Adding temporary remote '${TEMP_REMOTE}' → ${UPSTREAM_URL}`);
111
+ runGit(['remote', 'add', TEMP_REMOTE, UPSTREAM_URL], { silent: true });
112
+ console.log(` Fetching ${TEMP_REMOTE}/${UPSTREAM_BRANCH} (depth 1)...`);
113
+ runGit(['fetch', '--depth=1', TEMP_REMOTE, UPSTREAM_BRANCH]);
114
+ const ref = `${TEMP_REMOTE}/${UPSTREAM_BRANCH}`;
119
115
  const missing = [];
120
116
  let checkedOut = 0;
121
117
  for (const file of FILES_TO_CHECKOUT) {
@@ -1 +1 @@
1
- {"version":3,"file":"convert-config-files-to-ts.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/convert-config-files-to-ts.ts"],"names":[],"mappings":"AAuuBA,wBAAsB,IAAI,kBAyPzB"}
1
+ {"version":3,"file":"convert-config-files-to-ts.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/convert-config-files-to-ts.ts"],"names":[],"mappings":"AAyuBA,wBAAsB,IAAI,kBAyPzB"}
@@ -87,6 +87,7 @@ exports.main = main;
87
87
  const fs = __importStar(require("fs"));
88
88
  const ts_morph_1 = require("ts-morph");
89
89
  const path_1 = __importDefault(require("path"));
90
+ const _1 = require(".");
90
91
  // ─── Schema-valid keys per config type ───────────────────────────────────────
91
92
  const CLIENT_VALID_KEYS = new Set([
92
93
  'COUNTRY',
@@ -633,8 +634,8 @@ function ensureJoinImport(sf) {
633
634
  function main() {
634
635
  return __awaiter(this, void 0, void 0, function* () {
635
636
  var _a;
636
- const srcDir = path_1.default.join(process.cwd(), 'src');
637
- const relCwd = (fp) => path_1.default.relative(process.cwd(), fp);
637
+ const srcDir = path_1.default.join((0, _1.getCwd)(), 'src');
638
+ const relCwd = (fp) => path_1.default.relative((0, _1.getCwd)(), fp);
638
639
  // ── Phase 1: Convert JS config files to TypeScript ────────────────────────
639
640
  console.log('Phase 1: Converting JS config files to TypeScript...\n');
640
641
  let convertedCount = 0;
@@ -740,7 +741,7 @@ function main() {
740
741
  if (/\bjoin\s*\(/.test(adjustedValue)) {
741
742
  ensureJoinImport(sf);
742
743
  }
743
- console.log(` Inlined applicationConfig.${accessPath.join('.')} → ${adjustedValue} in ${path_1.default.relative(process.cwd(), sf.getFilePath())}`);
744
+ console.log(` Inlined applicationConfig.${accessPath.join('.')} → ${adjustedValue} in ${path_1.default.relative((0, _1.getCwd)(), sf.getFilePath())}`);
744
745
  filesToSaveAfterInlining.add(sf);
745
746
  madeReplacement = true;
746
747
  break; // restart — tree has changed
@@ -751,7 +752,7 @@ function main() {
751
752
  // Persist files that received inline replacements
752
753
  for (const sf of Array.from(filesToSaveAfterInlining)) {
753
754
  yield sf.save();
754
- console.log(` Saved (inlined): ${path_1.default.relative(process.cwd(), sf.getFilePath())}`);
755
+ console.log(` Saved (inlined): ${path_1.default.relative((0, _1.getCwd)(), sf.getFilePath())}`);
755
756
  }
756
757
  // Remove in reverse order to avoid index shifting
757
758
  for (const prop of [...propsToRemove].reverse()) {
@@ -1 +1 @@
1
- {"version":3,"file":"convert-paragraph-to-heading.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/convert-paragraph-to-heading.ts"],"names":[],"mappings":"AAsJA,iBAAe,IAAI,kBA6ClB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"convert-paragraph-to-heading.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/convert-paragraph-to-heading.ts"],"names":[],"mappings":"AAwJA,iBAAe,IAAI,kBA6ClB;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -42,6 +42,7 @@ exports.main = main;
42
42
  */
43
43
  const ts_morph_1 = require("ts-morph");
44
44
  const path_1 = __importDefault(require("path"));
45
+ const _1 = require(".");
45
46
  const FIELD_TYPE_ENUM_NAME = 'FieldType';
46
47
  const PARAGRAPH_MEMBER_NAME = 'PARAGRAPH';
47
48
  const HEADING_MEMBER_NAME = 'HEADING';
@@ -111,18 +112,18 @@ function processFile(filePath, project) {
111
112
  const result = transformParagraphField(obj);
112
113
  if (result === 'converted-to-heading') {
113
114
  changedCount++;
114
- console.log(` [${path_1.default.relative(process.cwd(), filePath)}] Converted PARAGRAPH with heading fontVariant to HEADING`);
115
+ console.log(` [${path_1.default.relative((0, _1.getCwd)(), filePath)}] Converted PARAGRAPH with heading fontVariant to HEADING`);
115
116
  }
116
117
  else if (result === 'removed-font-variant') {
117
118
  changedCount++;
118
- console.log(` [${path_1.default.relative(process.cwd(), filePath)}] Removed non-heading fontVariant from PARAGRAPH`);
119
+ console.log(` [${path_1.default.relative((0, _1.getCwd)(), filePath)}] Removed non-heading fontVariant from PARAGRAPH`);
119
120
  }
120
121
  }
121
122
  return changedCount;
122
123
  }
123
124
  function main() {
124
125
  return __awaiter(this, void 0, void 0, function* () {
125
- const srcDir = path_1.default.join(process.cwd(), 'src');
126
+ const srcDir = path_1.default.join((0, _1.getCwd)(), 'src');
126
127
  console.log(`Scanning for FieldType.PARAGRAPH fields in: ${srcDir}\n`);
127
128
  const project = new ts_morph_1.Project({
128
129
  tsConfigFilePath: path_1.default.resolve(srcDir, '../tsconfig.json'),
@@ -151,7 +152,7 @@ function main() {
151
152
  for (const filePath of modifiedFiles) {
152
153
  const sourceFile = project.getSourceFileOrThrow(filePath);
153
154
  yield sourceFile.save();
154
- console.log(` Saved: ${path_1.default.relative(process.cwd(), filePath)}`);
155
+ console.log(` Saved: ${path_1.default.relative((0, _1.getCwd)(), filePath)}`);
155
156
  }
156
157
  console.log(`\nDone. Processed ${totalChanged} FieldType.PARAGRAPH field(s).`);
157
158
  });
@@ -1 +1 @@
1
- {"version":3,"file":"create-events-index.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/create-events-index.ts"],"names":[],"mappings":"AAmTA,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAmEnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
1
+ {"version":3,"file":"create-events-index.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/create-events-index.ts"],"names":[],"mappings":"AAqTA,iBAAe,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAmEnC;AAED,OAAO,EAAE,IAAI,EAAE,CAAA"}
@@ -63,6 +63,7 @@ exports.main = main;
63
63
  const ts_morph_1 = require("ts-morph");
64
64
  const fs_1 = __importDefault(require("fs"));
65
65
  const path_1 = __importDefault(require("path"));
66
+ const _1 = require(".");
66
67
  const DEFINE_CONFIG_NAME = 'defineConfig';
67
68
  const HANDLER_FUNCTION_NAMES = new Set([
68
69
  'getCustomEventsHandler',
@@ -273,7 +274,7 @@ function modifyHandler(sourceFile, exportNames) {
273
274
  // ─── Entry point ─────────────────────────────────────────────────────────────
274
275
  function main() {
275
276
  return __awaiter(this, void 0, void 0, function* () {
276
- const cwd = process.cwd();
277
+ const cwd = (0, _1.getCwd)();
277
278
  const srcDir = path_1.default.join(cwd, 'src');
278
279
  console.log(`Scanning for defineConfig event exports in: ${srcDir}\n`);
279
280
  const project = new ts_morph_1.Project({
@@ -1,11 +1,7 @@
1
+ export declare function getCwd(): string;
1
2
  /**
2
- * Run the upgrade process for the country config in the current working
3
- * directory.
4
- *
5
- * @param dockerSwarm - When true, the local `infrastructure/` directory is
6
- * merged with upstream changes (Docker Swarm deployments still need it).
7
- * When false (the default), `infrastructure/` is deleted entirely, since
8
- * non-Swarm deployments no longer ship it.
3
+ * Run the upgrade process for a given country config directory.
4
+ * @param ccwd - The country config working directory.
9
5
  */
10
- export declare function runUpgrade(dockerSwarm: boolean): Promise<void>;
6
+ export declare function runUpgrade(ccwd: string | undefined): Promise<void>;
11
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/index.ts"],"names":[],"mappings":"AAqCA;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,WAAW,EAAE,OAAO,iBA+BpD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/v2.0/index.ts"],"names":[],"mappings":"AA+BA,wBAAgB,MAAM,WAMrB;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,iBA8BxD"}