@@ -4,12 +4,13 @@ import { TypeStringEnum } from './utils';
4
4
5
5
export const getUgandaDocuments = ( ) : TDocument [ ] => {
6
6
const TypeAlphanumericString = Type . String ( { pattern : '^[a-zA-Z0-9]*$' } ) ;
7
+ const TypeNonEmptyAlphanumericString = Type . String ( { pattern : '^[a-zA-Z0-9]*$' , minLength : 1 } ) ;
7
8
const TypePastDate = Type . String ( {
8
9
format : 'date' ,
9
10
formatMaximum : new Date ( ) . toISOString ( ) . split ( 'T' ) [ 0 ] ,
10
11
} ) ;
11
12
12
- const TypeStringAtLeastOneWord = Type . String ( { minLength : 1 } ) ;
13
+ const TypeNonEmptyString = Type . String ( { minLength : 1 } ) ;
13
14
const TypeUgandaMobileNumber = Type . String ( { pattern : '^256[0-9]{9}$' } ) ;
14
15
15
16
return [
@@ -34,7 +35,7 @@ export const getUgandaDocuments = (): TDocument[] => {
34
35
version : 1 ,
35
36
propertiesSchema : Type . Object ( {
36
37
businessName : Type . String ( ) ,
37
- registrationNumber : TypeAlphanumericString ,
38
+ prnNumber : TypeAlphanumericString ,
38
39
issuer : TypeStringEnum ( [ 'KCCA' , 'Other' ] ) ,
39
40
expirationDate : Type . String ( { format : 'date' } ) ,
40
41
} ) ,
@@ -95,7 +96,7 @@ export const getUgandaDocuments = (): TDocument[] => {
95
96
from : Type . String ( { format : 'date' } ) ,
96
97
to : Type . String ( { format : 'date' } ) ,
97
98
msisdn : TypeUgandaMobileNumber ,
98
- accountHolderName : TypeStringAtLeastOneWord ,
99
+ accountHolderName : TypeNonEmptyString ,
99
100
} ) ,
100
101
} ,
101
102
{
@@ -108,7 +109,7 @@ export const getUgandaDocuments = (): TDocument[] => {
108
109
from : Type . String ( { format : 'date' } ) ,
109
110
to : Type . String ( { format : 'date' } ) ,
110
111
msisdn : TypeUgandaMobileNumber ,
111
- accountHolderName : TypeStringAtLeastOneWord ,
112
+ accountHolderName : TypeNonEmptyString ,
112
113
} ) ,
113
114
} ,
114
115
{
@@ -149,7 +150,7 @@ export const getUgandaDocuments = (): TDocument[] => {
149
150
printDate : Type . Optional ( Type . String ( { format : 'date' } ) ) ,
150
151
from : Type . String ( { format : 'date' } ) ,
151
152
to : Type . String ( { format : 'date' } ) ,
152
- accountHolderName : TypeStringAtLeastOneWord ,
153
+ accountHolderName : TypeNonEmptyString ,
153
154
accountNumber : Type . Optional ( Type . String ( ) ) ,
154
155
} ) ,
155
156
} ,
@@ -162,7 +163,7 @@ export const getUgandaDocuments = (): TDocument[] => {
162
163
issuingVersion : 1 ,
163
164
version : 1 ,
164
165
propertiesSchema : Type . Object ( {
165
- name : TypeStringAtLeastOneWord ,
166
+ name : TypeNonEmptyString ,
166
167
nationalIdNumber : Type . String ( ) ,
167
168
userAddress : Type . String ( ) ,
168
169
physicalAddress : Type . String ( ) ,
@@ -176,7 +177,7 @@ export const getUgandaDocuments = (): TDocument[] => {
176
177
issuingVersion : 1 ,
177
178
version : 1 ,
178
179
propertiesSchema : Type . Object ( {
179
- name : TypeStringAtLeastOneWord ,
180
+ name : TypeNonEmptyString ,
180
181
nationalIdNumber : Type . Optional ( Type . String ( ) ) ,
181
182
userAddress : Type . String ( ) ,
182
183
physicalAddress : Type . String ( ) ,
@@ -194,7 +195,7 @@ export const getUgandaDocuments = (): TDocument[] => {
194
195
version : 1 ,
195
196
propertiesSchema : Type . Object ( {
196
197
salaryAmount : Type . Number ( { minimum : 1 } ) ,
197
- employerName : TypeStringAtLeastOneWord ,
198
+ employerName : TypeNonEmptyString ,
198
199
employeeId : Type . String ( ) ,
199
200
position : Type . String ( ) ,
200
201
issueDate : TypePastDate ,
@@ -209,7 +210,7 @@ export const getUgandaDocuments = (): TDocument[] => {
209
210
version : 1 ,
210
211
propertiesSchema : Type . Object ( {
211
212
salaryAmount : Type . Optional ( Type . Number ( { minimum : 1 } ) ) ,
212
- employerName : TypeStringAtLeastOneWord ,
213
+ employerName : TypeNonEmptyString ,
213
214
nationalIdNumber : Type . String ( ) ,
214
215
position : Type . String ( ) ,
215
216
issueDate : TypePastDate ,
0 commit comments