Token typing models
Sample code uses ES6 language features such as arrow functions and promises. For compatibility with IE11, code written with these features must be either transpiled using tools like Babel or refactored accordingly using callbacks.

Introduction

This page describes all generic token models used.

Models

1
export class ModuleDescriptionResponse extends DataObjectResponse {
2
constructor(public data: TokenModuleDescription, public success: boolean) {
3
super(data, success);
4
}
5
}
6
7
export class TokenCertificateResponse extends T1CResponse {
8
constructor(public data: TokenCertificate, public success: boolean) {
9
super(success, data);
10
}
11
}
12
13
14
export class TokenCertificate {
15
constructor(
16
public certificate?: string,
17
public certificates?: Array<string>,
18
public certificateType?: string,
19
public id?: string,
20
public parsedCertificate?: Certificate,
21
public parsedCertificates?: Array<Certificate>
22
) {}
23
}
24
25
export class TokenAddressResponse extends DataObjectResponse {
26
constructor(public data: TokenAddressData, public success: boolean) {
27
super(data, success);
28
}
29
}
30
31
export class TokenPictureResponse extends DataObjectResponse {
32
constructor(public data: TokenPictureData, public success: boolean) {
33
super(data, success);
34
}
35
}
36
37
export class TokenVerifyPinResponse extends DataObjectResponse {
38
constructor(public data: TokenVerifyPinResponseData, public success: boolean) {
39
super(data, success);
40
}
41
}
42
43
export class TokenVerifyPinResponseData {
44
constructor(
45
public verified: boolean
46
) {}
47
}
48
49
export class TokenSignResponse extends DataObjectResponse {
50
constructor(public data: TokenSignResponseData, public success: boolean) {
51
super(data, success);
52
}
53
}
54
55
export class TokenSignResponseData {
56
constructor(
57
public data?: string
58
) {}
59
}
60
61
export class TokenAuthenticateResponse extends DataObjectResponse {
62
constructor(public data: TokenAuthenticateResponseData, public success: boolean) {
63
super(data, success);
64
}
65
}
66
67
export class TokenAuthenticateResponseData {
68
constructor(
69
public data?: string
70
) {}
71
}
72
73
export class TokenModuleDescription {
74
constructor(
75
public desc: string
76
) {}
77
}
78
79
export class TokenAddressData {
80
constructor(
81
public municipality?: string,
82
public rawData?: string,
83
public signature?: string,
84
public streetAndNumber?: string,
85
public version?: number,
86
public zipcode?: string
87
) {}
88
}
89
90
91
92
export class TokenAllDataResponse extends DataObjectResponse {
93
constructor(public data: TokenAllData, public success: boolean) {
94
super(data, success);
95
}
96
}
97
98
99
export class TokenAllData {
100
constructor(
101
public picture?: TokenPictureData,
102
public biometric?: TokenBiometricData,
103
public address?: TokenAddressData,
104
) {}
105
}
106
107
export class TokenPictureData {
108
constructor(
109
public picture?: string,
110
public signature?: string,
111
public width?: number,
112
public height?: number,
113
) {}
114
}
115
116
export class TokenData {
117
constructor(
118
public rawData?: string,
119
public version?: string,
120
public serialNumber?: string,
121
public label?: string,
122
public prnGeneration?: string,
123
public eidCompliant?: string,
124
public graphicalPersoVersion?: string,
125
public versionRfu?: string,
126
public electricalPersoVersion?: string,
127
public electricalPersoInterfaceVersion?: string,
128
public changeCounter?: number,
129
public activated?: string,
130
) {}
131
}
132
133
export class TokenDataResponse extends DataObjectResponse {
134
constructor(public data: TokenData, public success: boolean) {
135
super(data, success);
136
}
137
}
138
139
export class TokenBiometricData {
140
constructor(
141
public birthDate?: string,
142
public birthLocation?: string,
143
public cardDeliveryMunicipality?: string,
144
public cardNumber?: string,
145
public cardValidityDateBegin?: string,
146
public cardValidityDateEnd?: string,
147
public chipNumber?: string,
148
public documentType?: string,
149
public firstNames?: string,
150
public name?: string,
151
public nationalNumber?: string,
152
public nationality?: string,
153
public nobleCondition?: string,
154
public pictureHash?: string,
155
public rawData?: string,
156
public sex?: string,
157
public signature?: string,
158
public specialStatus?: string,
159
public thirdName?: string,
160
public version?: number,
161
public issuer?: string
162
) {}
163
}
164
165
export class TokenBiometricDataResponse extends DataObjectResponse {
166
constructor(public data: TokenBiometricData, public success: boolean) {
167
super(data, success);
168
}
169
}
170
171
export class TokenAlgorithmReferencesResponse {
172
constructor(public data: TokenAlgorithmReferences, public success: boolean) {
173
}
174
}
175
176
export class TokenAlgorithmReferences {
177
constructor(public ref: Array<string>) {
178
}
179
}
180
181
export class TokenResetPinResponse {
182
constructor(public data: TokenResetPin, public success: boolean) {
183
}
184
}
185
186
export class TokenResetPin {
187
constructor(public verified: boolean) {
188
}
189
}
190
191
192
export class PinType {
193
static PIN = 'Pin';
194
static CAN = 'Can';
195
}
196
197
198
// Requests
199
export class TokenAuthenticateOrSignData {
200
constructor(public algorithm: string, public data: string, public pin?: string, public pace?: string, public id?: string, public osDialog?: boolean, public txId?: string, public language?: string, public base64Encoded?: boolean, public timeout?: number) {
201
}
202
}
203
204
export class TokenVerifyPinData {
205
constructor(public pin?: string, public pace?: string, public osDialog?: boolean, public base64Encoded?: boolean, public timeout?: number) {
206
}
207
}
208
209
export enum TokenResetPinReferenceType {
210
issign = "issign",
211
isauthenticate = "isauthenticate",
212
isencrypt = "isencrypt"
213
}
214
215
export class TokenResetPinData {
216
constructor(
217
public puk: string,
218
public pin?: string,
219
public resetOnly?: boolean,
220
public osDialog?: boolean,
221
public reference?: TokenResetPinReferenceType,
222
public base64Encoded?: boolean) {
223
}
224
}
225
226
export class PaymentVerifyPinData {
227
constructor(public pin?: string, public osDialog? :boolean, public base64Encoded?: boolean, public timeout?: number) {
228
}
229
}
230
231
export class PaymentSignData {
232
constructor(public txId: string, public language: string, public data: string, public timeout?: number) {
233
}
234
}
Copied!
Last modified 2mo ago
Copy link