@opencrvs/toolkit 2.0.0-rc.3c7efd6 → 2.0.0-rc.3ed7cac

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.
@@ -772,14 +772,12 @@ var SystemScopeType = z11.enum([
772
772
  "organisation.read-locations",
773
773
  "user.read",
774
774
  "user.create",
775
- "user.edit",
776
- "user.search"
775
+ "user.edit"
777
776
  ]);
778
777
  var UserScopeType = SystemScopeType.extract([
779
778
  "user.read",
780
779
  "user.create",
781
- "user.edit",
782
- "user.search"
780
+ "user.edit"
783
781
  ]);
784
782
  var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
785
783
  var UserScopeV2 = z11.discriminatedUnion("type", [
@@ -788,7 +786,7 @@ var UserScopeV2 = z11.discriminatedUnion("type", [
788
786
  options: AllUserScopeOptions.optional()
789
787
  }),
790
788
  z11.object({
791
- type: UserScopeType.extract(["user.read", "user.search"]),
789
+ type: UserScopeType.extract(["user.read"]),
792
790
  options: AccessLevelOptions.optional()
793
791
  })
794
792
  ]);
@@ -2108,8 +2106,8 @@ var ApplicationConfig = z20.object({
2108
2106
  })
2109
2107
  ),
2110
2108
  PHONE_NUMBER_PATTERN: z20.string().or(z20.instanceof(RegExp)),
2111
- USER_NOTIFICATION_DELIVERY_METHOD: z20.string(),
2112
- INFORMANT_NOTIFICATION_DELIVERY_METHOD: z20.string(),
2109
+ USER_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2110
+ INFORMANT_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2113
2111
  SEARCH_DEFAULT_CRITERIA: SearchCriteria.optional().default("TRACKING_ID"),
2114
2112
  ADDITIONAL_USER_FIELDS: z20.array(FieldConfig).optional().default([])
2115
2113
  });
@@ -2127,8 +2125,8 @@ var BackgroundConfig = z20.object({
2127
2125
  var LoginConfig = z20.object({
2128
2126
  COUNTRY: z20.string(),
2129
2127
  LANGUAGES: z20.array(z20.string()),
2130
- USER_NOTIFICATION_DELIVERY_METHOD: z20.string(),
2131
- INFORMANT_NOTIFICATION_DELIVERY_METHOD: z20.string(),
2128
+ USER_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2129
+ INFORMANT_NOTIFICATION_DELIVERY_METHOD: z20.enum(["email", "sms"]),
2132
2130
  PHONE_NUMBER_PATTERN: z20.string().or(z20.instanceof(RegExp)),
2133
2131
  LOGIN_BACKGROUND: BackgroundConfig,
2134
2132
  SENTRY: z20.string().optional()
package/dist/cli.js CHANGED
@@ -2226,14 +2226,12 @@ var SystemScopeType = z3.enum([
2226
2226
  "organisation.read-locations",
2227
2227
  "user.read",
2228
2228
  "user.create",
2229
- "user.edit",
2230
- "user.search"
2229
+ "user.edit"
2231
2230
  ]);
2232
2231
  var UserScopeType = SystemScopeType.extract([
2233
2232
  "user.read",
2234
2233
  "user.create",
2235
- "user.edit",
2236
- "user.search"
2234
+ "user.edit"
2237
2235
  ]);
2238
2236
  var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
2239
2237
  var UserScopeV2 = z3.discriminatedUnion("type", [
@@ -2242,7 +2240,7 @@ var UserScopeV2 = z3.discriminatedUnion("type", [
2242
2240
  options: AllUserScopeOptions.optional()
2243
2241
  }),
2244
2242
  z3.object({
2245
- type: UserScopeType.extract(["user.read", "user.search"]),
2243
+ type: UserScopeType.extract(["user.read"]),
2246
2244
  options: AccessLevelOptions.optional()
2247
2245
  })
2248
2246
  ]);
@@ -4092,18 +4092,33 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4092
4092
  input: string[];
4093
4093
  output: ({
4094
4094
  id: string & import("zod").$brand<"UUID">;
4095
- type: "user";
4096
4095
  name: {
4097
4096
  firstname: string;
4098
4097
  surname: string;
4099
4098
  };
4100
4099
  role: string;
4101
- fullHonorificName?: string | undefined;
4100
+ primaryOfficeId: string & import("zod").$brand<"UUID">;
4101
+ type: "user";
4102
+ status: "active" | "pending" | "deactivated";
4103
+ avatar?: (string & import("zod").$brand<"DocumentPath">) | undefined;
4102
4104
  signature?: (string & import("zod").$brand<"DocumentPath">) | null | undefined;
4105
+ administrativeAreaId?: (string & import("zod").$brand<"UUID">) | null | undefined;
4106
+ device?: string | undefined;
4107
+ fullHonorificName?: string | undefined;
4108
+ mobile?: string | undefined;
4109
+ email?: string | undefined;
4110
+ data?: Record<string, import("../commons").FieldValue> | undefined;
4103
4111
  } | {
4104
4112
  id: string & import("zod").$brand<"UUID">;
4105
- type: "system";
4106
4113
  name: string;
4114
+ type: "system";
4115
+ primaryOfficeId?: (string & import("zod").$brand<"UUID">) | undefined;
4116
+ administrativeAreaId?: (string & import("zod").$brand<"UUID">) | undefined;
4117
+ signature?: undefined;
4118
+ avatar?: undefined;
4119
+ fullHonorificName?: string | undefined;
4120
+ legacyId?: string | undefined;
4121
+ status?: undefined;
4107
4122
  })[];
4108
4123
  meta: import("trpc-to-openapi").OpenApiMeta;
4109
4124
  }>;
@@ -4260,10 +4275,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4260
4275
  changeAvatar: import("@trpc/server").TRPCMutationProcedure<{
4261
4276
  input: {
4262
4277
  userId: string;
4263
- avatar: {
4264
- type: string;
4265
- data: string;
4266
- };
4278
+ avatar: string;
4267
4279
  };
4268
4280
  output: void;
4269
4281
  meta: import("trpc-to-openapi").OpenApiMeta;
@@ -4295,6 +4307,18 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4295
4307
  output: void;
4296
4308
  meta: import("trpc-to-openapi").OpenApiMeta;
4297
4309
  }>;
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
+ }>;
4298
4322
  audit: import("@trpc/server").TRPCBuiltRouter<{
4299
4323
  ctx: Partial<{
4300
4324
  token: `Bearer ${string}`;
@@ -4750,7 +4774,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4750
4774
  'legalStatuses.DECLARED.createdAtLocation'?: {
4751
4775
  type: "within";
4752
4776
  location: string | {
4753
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4777
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4754
4778
  $location?: string | undefined;
4755
4779
  };
4756
4780
  } | undefined;
@@ -4772,7 +4796,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4772
4796
  'legalStatuses.REGISTERED.createdAtLocation'?: {
4773
4797
  type: "within";
4774
4798
  location: string | {
4775
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4799
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4776
4800
  $location?: string | undefined;
4777
4801
  };
4778
4802
  } | undefined;
@@ -4787,47 +4811,47 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4787
4811
  createdAtLocation?: {
4788
4812
  type: "within";
4789
4813
  location: string | {
4790
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4814
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4791
4815
  $location?: string | undefined;
4792
4816
  };
4793
4817
  } | {
4794
4818
  type: "exact";
4795
4819
  term: string | {
4796
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4820
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4797
4821
  $location?: string | undefined;
4798
4822
  };
4799
4823
  } | undefined;
4800
4824
  updatedAtLocation?: {
4801
4825
  type: "within";
4802
4826
  location: string | {
4803
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4827
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4804
4828
  $location?: string | undefined;
4805
4829
  };
4806
4830
  } | {
4807
4831
  type: "exact";
4808
4832
  term: string | {
4809
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4833
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4810
4834
  $location?: string | undefined;
4811
4835
  };
4812
4836
  } | undefined;
4813
4837
  updatedByUserRole?: {
4814
4838
  type: "exact";
4815
4839
  term: string | {
4816
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4840
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4817
4841
  $location?: string | undefined;
4818
4842
  };
4819
4843
  } | undefined;
4820
4844
  assignedTo?: {
4821
4845
  type: "exact";
4822
4846
  term: string | {
4823
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4847
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4824
4848
  $location?: string | undefined;
4825
4849
  };
4826
4850
  } | undefined;
4827
4851
  createdBy?: {
4828
4852
  type: "exact";
4829
4853
  term: string | {
4830
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4854
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4831
4855
  $location?: string | undefined;
4832
4856
  };
4833
4857
  } | undefined;
@@ -4838,7 +4862,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4838
4862
  updatedBy?: {
4839
4863
  type: "exact";
4840
4864
  term: string | {
4841
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4865
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4842
4866
  $location?: string | undefined;
4843
4867
  };
4844
4868
  } | undefined;
@@ -4888,7 +4912,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4888
4912
  'legalStatuses.DECLARED.createdAtLocation'?: {
4889
4913
  type: "within";
4890
4914
  location: string | {
4891
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4915
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4892
4916
  $location?: string | undefined;
4893
4917
  };
4894
4918
  } | undefined;
@@ -4910,7 +4934,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4910
4934
  'legalStatuses.REGISTERED.createdAtLocation'?: {
4911
4935
  type: "within";
4912
4936
  location: string | {
4913
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4937
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4914
4938
  $location?: string | undefined;
4915
4939
  };
4916
4940
  } | undefined;
@@ -4925,47 +4949,47 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4925
4949
  createdAtLocation?: {
4926
4950
  type: "within";
4927
4951
  location: string | {
4928
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4952
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4929
4953
  $location?: string | undefined;
4930
4954
  };
4931
4955
  } | {
4932
4956
  type: "exact";
4933
4957
  term: string | {
4934
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4958
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4935
4959
  $location?: string | undefined;
4936
4960
  };
4937
4961
  } | undefined;
4938
4962
  updatedAtLocation?: {
4939
4963
  type: "within";
4940
4964
  location: string | {
4941
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4965
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4942
4966
  $location?: string | undefined;
4943
4967
  };
4944
4968
  } | {
4945
4969
  type: "exact";
4946
4970
  term: string | {
4947
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4971
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4948
4972
  $location?: string | undefined;
4949
4973
  };
4950
4974
  } | undefined;
4951
4975
  updatedByUserRole?: {
4952
4976
  type: "exact";
4953
4977
  term: string | {
4954
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4978
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4955
4979
  $location?: string | undefined;
4956
4980
  };
4957
4981
  } | undefined;
4958
4982
  assignedTo?: {
4959
4983
  type: "exact";
4960
4984
  term: string | {
4961
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4985
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4962
4986
  $location?: string | undefined;
4963
4987
  };
4964
4988
  } | undefined;
4965
4989
  createdBy?: {
4966
4990
  type: "exact";
4967
4991
  term: string | {
4968
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
4992
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4969
4993
  $location?: string | undefined;
4970
4994
  };
4971
4995
  } | undefined;
@@ -4976,7 +5000,7 @@ export declare const appRouter: import("@trpc/server").TRPCBuiltRouter<{
4976
5000
  updatedBy?: {
4977
5001
  type: "exact";
4978
5002
  term: string | {
4979
- $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "primaryOfficeId" | "avatar" | "signature" | "middlename";
5003
+ $userField: "id" | "name" | "administrativeAreaId" | "firstname" | "surname" | "fullHonorificName" | "role" | "device" | "middlename" | "signature" | "avatar" | "primaryOfficeId";
4980
5004
  $location?: string | undefined;
4981
5005
  };
4982
5006
  } | undefined;
@@ -24,8 +24,14 @@ export declare const ApplicationConfig: z.ZodObject<{
24
24
  label: z.ZodObject<import("./events/TranslationConfig").MessageDescriptorZod, z.core.$strip>;
25
25
  }, z.core.$strip>>;
26
26
  PHONE_NUMBER_PATTERN: z.ZodUnion<[z.ZodString, z.ZodCustom<RegExp, RegExp>]>;
27
- USER_NOTIFICATION_DELIVERY_METHOD: z.ZodString;
28
- INFORMANT_NOTIFICATION_DELIVERY_METHOD: z.ZodString;
27
+ USER_NOTIFICATION_DELIVERY_METHOD: z.ZodEnum<{
28
+ email: "email";
29
+ sms: "sms";
30
+ }>;
31
+ INFORMANT_NOTIFICATION_DELIVERY_METHOD: z.ZodEnum<{
32
+ email: "email";
33
+ sms: "sms";
34
+ }>;
29
35
  SEARCH_DEFAULT_CRITERIA: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
30
36
  NAME: "NAME";
31
37
  EMAIL: "EMAIL";
@@ -46,8 +52,14 @@ export declare const BackgroundConfig: z.ZodObject<{
46
52
  export declare const LoginConfig: z.ZodObject<{
47
53
  COUNTRY: z.ZodString;
48
54
  LANGUAGES: z.ZodArray<z.ZodString>;
49
- USER_NOTIFICATION_DELIVERY_METHOD: z.ZodString;
50
- INFORMANT_NOTIFICATION_DELIVERY_METHOD: z.ZodString;
55
+ USER_NOTIFICATION_DELIVERY_METHOD: z.ZodEnum<{
56
+ email: "email";
57
+ sms: "sms";
58
+ }>;
59
+ INFORMANT_NOTIFICATION_DELIVERY_METHOD: z.ZodEnum<{
60
+ email: "email";
61
+ sms: "sms";
62
+ }>;
51
63
  PHONE_NUMBER_PATTERN: z.ZodUnion<[z.ZodString, z.ZodCustom<RegExp, RegExp>]>;
52
64
  LOGIN_BACKGROUND: z.ZodObject<{
53
65
  backgroundColor: z.ZodOptional<z.ZodString>;
@@ -86,16 +86,16 @@ export declare const user: typeof userSerializer & {
86
86
  };
87
87
  scope: (scope: import("../scopes").ScopeType) => {
88
88
  attribute: (option: import("../scopes").ScopeOptionKey) => {
89
- $scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
89
+ $scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "workqueue" | "dashboard.view";
90
90
  $option: "role" | "event" | "placeOfEvent" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
91
91
  };
92
92
  };
93
93
  jurisdiction: (jurisdiction: import("../scopes").JurisdictionFilter | {
94
- $scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
94
+ $scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "workqueue" | "dashboard.view";
95
95
  $option: "role" | "event" | "placeOfEvent" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
96
96
  }) => {
97
97
  $jurisdiction: "administrativeArea" | "location" | "all" | {
98
- $scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "user.search" | "workqueue" | "dashboard.view";
98
+ $scope: "record.search" | "record.create" | "record.read" | "record.declare" | "record.notify" | "record.edit" | "record.reject" | "record.archive" | "record.review-duplicates" | "record.register" | "record.print-certified-copies" | "record.request-correction" | "record.correct" | "record.unassign-others" | "record.custom-action" | "bypassratelimit" | "record.reindex" | "user.data-seeding" | "integration.create" | "record.import" | "config.update-all" | "attachment.upload" | "profile.electronic-signature" | "user.read-only-my-audit" | "performance.read" | "performance.read-dashboards" | "performance.vital-statistics-export" | "record.confirm-registration" | "record.reject-registration" | "organisation.read-locations" | "user.read" | "user.create" | "user.edit" | "workqueue" | "dashboard.view";
99
99
  $option: "role" | "event" | "placeOfEvent" | "declaredIn" | "declaredBy" | "registeredIn" | "registeredBy" | "accessLevel" | "ids";
100
100
  };
101
101
  };
@@ -1723,7 +1723,6 @@ declare const AdministrativeAreaField: z.ZodObject<{
1723
1723
  "user.read": "user.read";
1724
1724
  "user.create": "user.create";
1725
1725
  "user.edit": "user.edit";
1726
- "user.search": "user.search";
1727
1726
  workqueue: "workqueue";
1728
1727
  "dashboard.view": "dashboard.view";
1729
1728
  }>;
@@ -1843,7 +1842,6 @@ declare const LocationInput: z.ZodObject<{
1843
1842
  "user.read": "user.read";
1844
1843
  "user.create": "user.create";
1845
1844
  "user.edit": "user.edit";
1846
- "user.search": "user.search";
1847
1845
  workqueue: "workqueue";
1848
1846
  "dashboard.view": "dashboard.view";
1849
1847
  }>;
@@ -2028,7 +2026,6 @@ declare const Facility: z.ZodObject<{
2028
2026
  "user.read": "user.read";
2029
2027
  "user.create": "user.create";
2030
2028
  "user.edit": "user.edit";
2031
- "user.search": "user.search";
2032
2029
  workqueue: "workqueue";
2033
2030
  "dashboard.view": "dashboard.view";
2034
2031
  }>;
@@ -2134,7 +2131,6 @@ declare const Office: z.ZodObject<{
2134
2131
  "user.read": "user.read";
2135
2132
  "user.create": "user.create";
2136
2133
  "user.edit": "user.edit";
2137
- "user.search": "user.search";
2138
2134
  workqueue: "workqueue";
2139
2135
  "dashboard.view": "dashboard.view";
2140
2136
  }>;
@@ -2327,7 +2323,6 @@ declare const Address: z.ZodObject<{
2327
2323
  "user.read": "user.read";
2328
2324
  "user.create": "user.create";
2329
2325
  "user.edit": "user.edit";
2330
- "user.search": "user.search";
2331
2326
  workqueue: "workqueue";
2332
2327
  "dashboard.view": "dashboard.view";
2333
2328
  }>;
@@ -298,14 +298,12 @@ var SystemScopeType = z6.enum([
298
298
  "organisation.read-locations",
299
299
  "user.read",
300
300
  "user.create",
301
- "user.edit",
302
- "user.search"
301
+ "user.edit"
303
302
  ]);
304
303
  var UserScopeType = SystemScopeType.extract([
305
304
  "user.read",
306
305
  "user.create",
307
- "user.edit",
308
- "user.search"
306
+ "user.edit"
309
307
  ]);
310
308
  var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
311
309
  var UserScopeV2 = z6.discriminatedUnion("type", [
@@ -314,7 +312,7 @@ var UserScopeV2 = z6.discriminatedUnion("type", [
314
312
  options: AllUserScopeOptions.optional()
315
313
  }),
316
314
  z6.object({
317
- type: UserScopeType.extract(["user.read", "user.search"]),
315
+ type: UserScopeType.extract(["user.read"]),
318
316
  options: AccessLevelOptions.optional()
319
317
  })
320
318
  ]);
@@ -607,14 +607,12 @@ var SystemScopeType = z2.enum([
607
607
  "organisation.read-locations",
608
608
  "user.read",
609
609
  "user.create",
610
- "user.edit",
611
- "user.search"
610
+ "user.edit"
612
611
  ]);
613
612
  var UserScopeType = SystemScopeType.extract([
614
613
  "user.read",
615
614
  "user.create",
616
- "user.edit",
617
- "user.search"
615
+ "user.edit"
618
616
  ]);
619
617
  var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
620
618
  var UserScopeV2 = z2.discriminatedUnion("type", [
@@ -623,7 +621,7 @@ var UserScopeV2 = z2.discriminatedUnion("type", [
623
621
  options: AllUserScopeOptions.optional()
624
622
  }),
625
623
  z2.object({
626
- type: UserScopeType.extract(["user.read", "user.search"]),
624
+ type: UserScopeType.extract(["user.read"]),
627
625
  options: AccessLevelOptions.optional()
628
626
  })
629
627
  ]);
@@ -2238,14 +2238,12 @@ var SystemScopeType = z3.enum([
2238
2238
  "organisation.read-locations",
2239
2239
  "user.read",
2240
2240
  "user.create",
2241
- "user.edit",
2242
- "user.search"
2241
+ "user.edit"
2243
2242
  ]);
2244
2243
  var UserScopeType = SystemScopeType.extract([
2245
2244
  "user.read",
2246
2245
  "user.create",
2247
- "user.edit",
2248
- "user.search"
2246
+ "user.edit"
2249
2247
  ]);
2250
2248
  var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
2251
2249
  var UserScopeV2 = z3.discriminatedUnion("type", [
@@ -2254,7 +2252,7 @@ var UserScopeV2 = z3.discriminatedUnion("type", [
2254
2252
  options: AllUserScopeOptions.optional()
2255
2253
  }),
2256
2254
  z3.object({
2257
- type: UserScopeType.extract(["user.read", "user.search"]),
2255
+ type: UserScopeType.extract(["user.read"]),
2258
2256
  options: AccessLevelOptions.optional()
2259
2257
  })
2260
2258
  ]);
@@ -226,14 +226,12 @@ var SystemScopeType = z2.enum([
226
226
  "organisation.read-locations",
227
227
  "user.read",
228
228
  "user.create",
229
- "user.edit",
230
- "user.search"
229
+ "user.edit"
231
230
  ]);
232
231
  var UserScopeType = SystemScopeType.extract([
233
232
  "user.read",
234
233
  "user.create",
235
- "user.edit",
236
- "user.search"
234
+ "user.edit"
237
235
  ]);
238
236
  var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
239
237
  var UserScopeV2 = z2.discriminatedUnion("type", [
@@ -242,7 +240,7 @@ var UserScopeV2 = z2.discriminatedUnion("type", [
242
240
  options: AllUserScopeOptions.optional()
243
241
  }),
244
242
  z2.object({
245
- type: UserScopeType.extract(["user.read", "user.search"]),
243
+ type: UserScopeType.extract(["user.read"]),
246
244
  options: AccessLevelOptions.optional()
247
245
  })
248
246
  ]);
@@ -227,14 +227,12 @@ declare const SystemScopeType: z.ZodEnum<{
227
227
  "user.read": "user.read";
228
228
  "user.create": "user.create";
229
229
  "user.edit": "user.edit";
230
- "user.search": "user.search";
231
230
  }>;
232
231
  export type SystemScopeType = z.infer<typeof SystemScopeType>;
233
232
  declare const UserScopeType: z.ZodEnum<{
234
233
  "user.read": "user.read";
235
234
  "user.create": "user.create";
236
235
  "user.edit": "user.edit";
237
- "user.search": "user.search";
238
236
  }>;
239
237
  export type UserScopeType = z.infer<typeof UserScopeType>;
240
238
  declare const ScopesWithRoleOption: z.ZodEnum<{
@@ -258,7 +256,6 @@ export declare const UserScopeV2: z.ZodDiscriminatedUnion<[z.ZodObject<{
258
256
  }, z.core.$strip>, z.ZodObject<{
259
257
  type: z.ZodEnum<{
260
258
  "user.read": "user.read";
261
- "user.search": "user.search";
262
259
  }>;
263
260
  options: z.ZodOptional<z.ZodObject<{
264
261
  accessLevel: z.ZodOptional<z.ZodEnum<{
@@ -496,7 +493,6 @@ export declare const Scope: z.ZodDiscriminatedUnion<[z.ZodObject<{
496
493
  }, z.core.$strip>, z.ZodObject<{
497
494
  type: z.ZodEnum<{
498
495
  "user.read": "user.read";
499
- "user.search": "user.search";
500
496
  }>;
501
497
  options: z.ZodOptional<z.ZodObject<{
502
498
  accessLevel: z.ZodOptional<z.ZodEnum<{
@@ -560,7 +556,6 @@ export declare const ScopeType: z.ZodEnum<{
560
556
  "user.read": "user.read";
561
557
  "user.create": "user.create";
562
558
  "user.edit": "user.edit";
563
- "user.search": "user.search";
564
559
  workqueue: "workqueue";
565
560
  "dashboard.view": "dashboard.view";
566
561
  }>;
@@ -640,7 +635,7 @@ export declare const decodeScope: (query: EncodedScope) => {
640
635
  role?: string[] | undefined;
641
636
  } | undefined;
642
637
  } | {
643
- type: "user.read" | "user.search";
638
+ type: "user.read";
644
639
  options?: {
645
640
  accessLevel?: "administrativeArea" | "location" | "all" | undefined;
646
641
  } | undefined;
@@ -257,14 +257,12 @@ var SystemScopeType = z3.enum([
257
257
  "organisation.read-locations",
258
258
  "user.read",
259
259
  "user.create",
260
- "user.edit",
261
- "user.search"
260
+ "user.edit"
262
261
  ]);
263
262
  var UserScopeType = SystemScopeType.extract([
264
263
  "user.read",
265
264
  "user.create",
266
- "user.edit",
267
- "user.search"
265
+ "user.edit"
268
266
  ]);
269
267
  var ScopesWithRoleOption = UserScopeType.extract(["user.edit", "user.create"]);
270
268
  var UserScopeV2 = z3.discriminatedUnion("type", [
@@ -273,7 +271,7 @@ var UserScopeV2 = z3.discriminatedUnion("type", [
273
271
  options: AllUserScopeOptions.optional()
274
272
  }),
275
273
  z3.object({
276
- type: UserScopeType.extract(["user.read", "user.search"]),
274
+ type: UserScopeType.extract(["user.read"]),
277
275
  options: AccessLevelOptions.optional()
278
276
  })
279
277
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencrvs/toolkit",
3
- "version": "2.0.0-rc.3c7efd6",
3
+ "version": "2.0.0-rc.3ed7cac",
4
4
  "description": "OpenCRVS toolkit for building country configurations",
5
5
  "license": "MPL-2.0",
6
6
  "bin": {