@pagopa/io-react-native-cie 1.3.0-experimental → 1.3.1
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.
- package/IoReactNativeCie.podspec +1 -1
- package/README.md +2 -0
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/pagopa/ioreactnativecie/IoReactNativeCieModule.kt +4 -2
- package/ios/IoReactNativeCie.swift +3 -0
- package/lib/module/manager/types.js +4 -13
- package/lib/module/manager/types.js.map +1 -1
- package/lib/typescript/src/manager/types.d.ts +5 -5
- package/lib/typescript/src/manager/types.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/manager/types.ts +4 -11
package/IoReactNativeCie.podspec
CHANGED
|
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
17
17
|
|
|
18
18
|
# CieSDK dependency
|
|
19
|
-
s.dependency "CieSDK", "~> 0.1.
|
|
19
|
+
s.dependency "CieSDK", "~> 0.1.16"
|
|
20
20
|
|
|
21
21
|
# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
|
|
22
22
|
# See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
|
package/README.md
CHANGED
|
@@ -323,6 +323,7 @@ List of error event that may be emitted during CIE reading process
|
|
|
323
323
|
| APDU_ERROR | Protocol error or not supported |
|
|
324
324
|
| CARD_BLOCKED | Too many PIN attempts, card is blocked |
|
|
325
325
|
| WRONG_PIN | Wrong PIN |
|
|
326
|
+
| WRONG_CAN | Wrong CAN |
|
|
326
327
|
| NO_INTERNET_CONNECTION | Missing internet connection |
|
|
327
328
|
| CERTIFICATE_EXPIRED | CIE expired |
|
|
328
329
|
| CERTIFICATE_REVOKED | CIE revoked |
|
|
@@ -366,6 +367,7 @@ CieManager.setCurrentAlertMessage('Reading in progress, 80% completed');
|
|
|
366
367
|
| `wrongPin1AttemptLeft` | PIN warning (1 attempt) | "PIN errato, hai ancora 1 tentativo" |
|
|
367
368
|
| `wrongPin2AttemptLeft` | PIN warning (2 attempts) | "PIN errato, hai ancora 2 tentativi" |
|
|
368
369
|
| `genericError` | Generic error | "Qualcosa è andato storto" |
|
|
370
|
+
| `wrongCan` | CAN warning | "CAN errato" |
|
|
369
371
|
|
|
370
372
|
## Types
|
|
371
373
|
|
package/android/build.gradle
CHANGED
|
@@ -42,8 +42,8 @@ class IoReactNativeCieModule(reactContext: ReactApplicationContext) :
|
|
|
42
42
|
* Lazy value ensures it is initialized with a valid activity when first used.
|
|
43
43
|
*/
|
|
44
44
|
val cieSdk: CieSDK by lazy {
|
|
45
|
-
CieSDK.withContext(currentActivity)
|
|
46
|
-
}
|
|
45
|
+
CieSDK.withContext(reactApplicationContext.currentActivity)
|
|
46
|
+
};
|
|
47
47
|
|
|
48
48
|
@Suppress("unused")
|
|
49
49
|
@ReactMethod
|
|
@@ -482,6 +482,7 @@ class IoReactNativeCieModule(reactContext: ReactApplicationContext) :
|
|
|
482
482
|
NfcError.APDU_ERROR -> ErrorType.APDU_ERROR
|
|
483
483
|
NfcError.EXTENDED_APDU_NOT_SUPPORTED -> ErrorType.APDU_ERROR
|
|
484
484
|
NfcError.WRONG_PIN -> ErrorType.WRONG_PIN
|
|
485
|
+
NfcError.WRONG_CAN -> ErrorType.WRONG_CAN
|
|
485
486
|
NfcError.PIN_BLOCKED -> ErrorType.CARD_BLOCKED
|
|
486
487
|
else -> ErrorType.GENERIC_ERROR
|
|
487
488
|
}
|
|
@@ -539,6 +540,7 @@ class IoReactNativeCieModule(reactContext: ReactApplicationContext) :
|
|
|
539
540
|
TAG_LOST,
|
|
540
541
|
APDU_ERROR,
|
|
541
542
|
WRONG_PIN,
|
|
543
|
+
WRONG_CAN,
|
|
542
544
|
CARD_BLOCKED,
|
|
543
545
|
NO_INTERNET_CONNECTION,
|
|
544
546
|
CERTIFICATE_EXPIRED,
|
|
@@ -316,6 +316,8 @@ class IoReactNativeCie: RCTEventEmitter {
|
|
|
316
316
|
payload = [ "name": ErrorType.APDU_ERROR.rawValue, "message": error.description ]
|
|
317
317
|
case .wrongPin(let attemptsLeft):
|
|
318
318
|
payload = [ "name":ErrorType.WRONG_PIN.rawValue, "message": error.description, "attemptsLeft": attemptsLeft ]
|
|
319
|
+
case .wrongCan:
|
|
320
|
+
payload = [ "name":ErrorType.WRONG_CAN.rawValue, "message": error.description ]
|
|
319
321
|
case .cardBlocked:
|
|
320
322
|
payload = [ "name": ErrorType.CARD_BLOCKED.rawValue, "message": error.description ]
|
|
321
323
|
case .sslError:
|
|
@@ -344,6 +346,7 @@ class IoReactNativeCie: RCTEventEmitter {
|
|
|
344
346
|
case CANCELLED_BY_USER
|
|
345
347
|
case APDU_ERROR
|
|
346
348
|
case WRONG_PIN
|
|
349
|
+
case WRONG_CAN
|
|
347
350
|
case CARD_BLOCKED
|
|
348
351
|
case NO_INTERNET_CONNECTION
|
|
349
352
|
case CERTIFICATE_EXPIRED
|
|
@@ -7,7 +7,7 @@ import { z } from 'zod';
|
|
|
7
7
|
*
|
|
8
8
|
* **Note**: Alert messages are only available on iOS
|
|
9
9
|
*/
|
|
10
|
-
export const AlertMessageKey = z.enum(['readingInstructions', 'moreTags', 'readingInProgress', 'readingSuccess', 'invalidCard', 'tagLost', 'cardLocked', 'wrongPin1AttemptLeft', 'wrongPin2AttemptLeft', 'genericError']);
|
|
10
|
+
export const AlertMessageKey = z.enum(['readingInstructions', 'moreTags', 'readingInProgress', 'readingSuccess', 'invalidCard', 'tagLost', 'cardLocked', 'wrongPin1AttemptLeft', 'wrongPin2AttemptLeft', 'genericError', 'wrongCan']);
|
|
11
11
|
/**
|
|
12
12
|
* Event emitted during the CIE reading process with the name of the event and the progress of the reading up to that point.
|
|
13
13
|
* Event names may differ based on the platform.
|
|
@@ -19,7 +19,7 @@ export const NfcEvent = z.object({
|
|
|
19
19
|
/**
|
|
20
20
|
* Name of the error emitted during the CIE reading process
|
|
21
21
|
*/
|
|
22
|
-
export const NfcErrorName = z.enum(['NOT_A_CIE', 'TAG_LOST', 'CANCELLED_BY_USER', 'APDU_ERROR', 'WRONG_PIN', 'CARD_BLOCKED', 'NO_INTERNET_CONNECTION', 'CERTIFICATE_EXPIRED', 'CERTIFICATE_REVOKED', 'AUTHENTICATION_ERROR', 'GENERIC_ERROR']);
|
|
22
|
+
export const NfcErrorName = z.enum(['NOT_A_CIE', 'TAG_LOST', 'CANCELLED_BY_USER', 'APDU_ERROR', 'WRONG_PIN', 'WRONG_CAN', 'CARD_BLOCKED', 'NO_INTERNET_CONNECTION', 'CERTIFICATE_EXPIRED', 'CERTIFICATE_REVOKED', 'AUTHENTICATION_ERROR', 'GENERIC_ERROR']);
|
|
23
23
|
/**
|
|
24
24
|
* Represent an NFC error emitted during the CIE reading process
|
|
25
25
|
*/
|
|
@@ -58,17 +58,8 @@ export const MrtdResponseObject = z.object({
|
|
|
58
58
|
* All string value are Hex or Base64 encoded
|
|
59
59
|
*/
|
|
60
60
|
export const InternalAuthAndMrtdResponse = z.object({
|
|
61
|
-
nis_data:
|
|
62
|
-
|
|
63
|
-
publicKey: z.string(),
|
|
64
|
-
sod: z.string(),
|
|
65
|
-
signedChallenge: z.string()
|
|
66
|
-
}),
|
|
67
|
-
mrtd_data: z.object({
|
|
68
|
-
dg1: z.string(),
|
|
69
|
-
dg11: z.string(),
|
|
70
|
-
sod: z.string()
|
|
71
|
-
})
|
|
61
|
+
nis_data: InternalAuthResponseObject,
|
|
62
|
+
mrtd_data: MrtdResponseObject
|
|
72
63
|
});
|
|
73
64
|
/**
|
|
74
65
|
* Represent the CIE attributes containing the CIE type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["z","AlertMessageKey","enum","NfcEvent","object","name","string","progress","coerce","number","NfcErrorName","NfcError","union","exclude","message","optional","extract","attemptsLeft","InternalAuthResponseObject","nis","publicKey","sod","signedChallenge","MrtdResponseObject","dg1","dg11","InternalAuthAndMrtdResponse","nis_data","mrtd_data","CieAttributes","type","base64","CertificateData","surname","fiscalCode","docSerialNumber"],"sourceRoot":"../../../src","sources":["manager/types.ts"],"mappings":";;AAAA,SAASA,CAAC,QAAQ,KAAK;;AAEvB;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGD,CAAC,CAACE,IAAI,CAAC,CACpC,qBAAqB,EACrB,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,
|
|
1
|
+
{"version":3,"names":["z","AlertMessageKey","enum","NfcEvent","object","name","string","progress","coerce","number","NfcErrorName","NfcError","union","exclude","message","optional","extract","attemptsLeft","InternalAuthResponseObject","nis","publicKey","sod","signedChallenge","MrtdResponseObject","dg1","dg11","InternalAuthAndMrtdResponse","nis_data","mrtd_data","CieAttributes","type","base64","CertificateData","surname","fiscalCode","docSerialNumber"],"sourceRoot":"../../../src","sources":["manager/types.ts"],"mappings":";;AAAA,SAASA,CAAC,QAAQ,KAAK;;AAEvB;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGD,CAAC,CAACE,IAAI,CAAC,CACpC,qBAAqB,EACrB,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,cAAc,EACd,UAAU,CACX,CAAC;AAIF;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAGH,CAAC,CAACI,MAAM,CAAC;EAC/BC,IAAI,EAAEL,CAAC,CAACM,MAAM,CAAC,CAAC;EAChBC,QAAQ,EAAEP,CAAC,CAACQ,MAAM,CAACC,MAAM,CAAC;AAC5B,CAAC,CAAC;AAIF;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAGV,CAAC,CAACE,IAAI,CAAC,CACjC,WAAW,EACX,UAAU,EACV,mBAAmB,EACnB,YAAY,EAC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,CAAC,CAACI,MAAM,CAAC;EAClDuB,QAAQ,EAAET,0BAA0B;EACpCU,SAAS,EAAEL;AACb,CAAC,CAAC;AAMF;AACA;AACA;AACA,OAAO,MAAMM,aAAa,GAAG7B,CAAC,CAACI,MAAM,CAAC;EACpC0B,IAAI,EAAE9B,CAAC,CAACM,MAAM,CAAC,CAAC;EAChByB,MAAM,EAAE/B,CAAC,CAACM,MAAM,CAAC;AACnB,CAAC,CAAC;AAIF,OAAO,MAAM0B,eAAe,GAAGhC,CAAC,CAACI,MAAM,CAAC;EACtCC,IAAI,EAAEL,CAAC,CAACM,MAAM,CAAC,CAAC,CAACS,QAAQ,CAAC,CAAC;EAC3BkB,OAAO,EAAEjC,CAAC,CAACM,MAAM,CAAC,CAAC,CAACS,QAAQ,CAAC,CAAC;EAC9BmB,UAAU,EAAElC,CAAC,CAACM,MAAM,CAAC,CAAC,CAACS,QAAQ,CAAC,CAAC;EACjCoB,eAAe,EAAEnC,CAAC,CAACM,MAAM,CAAC,CAAC,CAACS,QAAQ,CAAC;AACvC,CAAC,CAAC;;AAIF;AACA;AACA;;AAGA;AACA;AACA;;AAgBA;AACA;AACA","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ import { z } from 'zod';
|
|
|
4
4
|
*
|
|
5
5
|
* **Note**: Alert messages are only available on iOS
|
|
6
6
|
*/
|
|
7
|
-
export declare const AlertMessageKey: z.ZodEnum<["readingInstructions", "moreTags", "readingInProgress", "readingSuccess", "invalidCard", "tagLost", "cardLocked", "wrongPin1AttemptLeft", "wrongPin2AttemptLeft", "genericError"]>;
|
|
7
|
+
export declare const AlertMessageKey: z.ZodEnum<["readingInstructions", "moreTags", "readingInProgress", "readingSuccess", "invalidCard", "tagLost", "cardLocked", "wrongPin1AttemptLeft", "wrongPin2AttemptLeft", "genericError", "wrongCan"]>;
|
|
8
8
|
export type AlertMessageKey = z.infer<typeof AlertMessageKey>;
|
|
9
9
|
/**
|
|
10
10
|
* Event emitted during the CIE reading process with the name of the event and the progress of the reading up to that point.
|
|
@@ -24,19 +24,19 @@ export type NfcEvent = z.infer<typeof NfcEvent>;
|
|
|
24
24
|
/**
|
|
25
25
|
* Name of the error emitted during the CIE reading process
|
|
26
26
|
*/
|
|
27
|
-
export declare const NfcErrorName: z.ZodEnum<["NOT_A_CIE", "TAG_LOST", "CANCELLED_BY_USER", "APDU_ERROR", "WRONG_PIN", "CARD_BLOCKED", "NO_INTERNET_CONNECTION", "CERTIFICATE_EXPIRED", "CERTIFICATE_REVOKED", "AUTHENTICATION_ERROR", "GENERIC_ERROR"]>;
|
|
27
|
+
export declare const NfcErrorName: z.ZodEnum<["NOT_A_CIE", "TAG_LOST", "CANCELLED_BY_USER", "APDU_ERROR", "WRONG_PIN", "WRONG_CAN", "CARD_BLOCKED", "NO_INTERNET_CONNECTION", "CERTIFICATE_EXPIRED", "CERTIFICATE_REVOKED", "AUTHENTICATION_ERROR", "GENERIC_ERROR"]>;
|
|
28
28
|
export type NfcErrorName = z.infer<typeof NfcErrorName>;
|
|
29
29
|
/**
|
|
30
30
|
* Represent an NFC error emitted during the CIE reading process
|
|
31
31
|
*/
|
|
32
32
|
export declare const NfcError: z.ZodUnion<[z.ZodObject<{
|
|
33
|
-
name: z.ZodEnum<["NOT_A_CIE", "TAG_LOST", "CANCELLED_BY_USER", "APDU_ERROR", "CARD_BLOCKED", "NO_INTERNET_CONNECTION", "CERTIFICATE_EXPIRED", "CERTIFICATE_REVOKED", "AUTHENTICATION_ERROR", "GENERIC_ERROR"]>;
|
|
33
|
+
name: z.ZodEnum<["NOT_A_CIE", "TAG_LOST", "CANCELLED_BY_USER", "APDU_ERROR", "WRONG_CAN", "CARD_BLOCKED", "NO_INTERNET_CONNECTION", "CERTIFICATE_EXPIRED", "CERTIFICATE_REVOKED", "AUTHENTICATION_ERROR", "GENERIC_ERROR"]>;
|
|
34
34
|
message: z.ZodOptional<z.ZodString>;
|
|
35
35
|
}, "strip", z.ZodTypeAny, {
|
|
36
|
-
name: "NOT_A_CIE" | "TAG_LOST" | "CANCELLED_BY_USER" | "APDU_ERROR" | "CARD_BLOCKED" | "NO_INTERNET_CONNECTION" | "CERTIFICATE_EXPIRED" | "CERTIFICATE_REVOKED" | "AUTHENTICATION_ERROR" | "GENERIC_ERROR";
|
|
36
|
+
name: "NOT_A_CIE" | "TAG_LOST" | "CANCELLED_BY_USER" | "APDU_ERROR" | "WRONG_CAN" | "CARD_BLOCKED" | "NO_INTERNET_CONNECTION" | "CERTIFICATE_EXPIRED" | "CERTIFICATE_REVOKED" | "AUTHENTICATION_ERROR" | "GENERIC_ERROR";
|
|
37
37
|
message?: string | undefined;
|
|
38
38
|
}, {
|
|
39
|
-
name: "NOT_A_CIE" | "TAG_LOST" | "CANCELLED_BY_USER" | "APDU_ERROR" | "CARD_BLOCKED" | "NO_INTERNET_CONNECTION" | "CERTIFICATE_EXPIRED" | "CERTIFICATE_REVOKED" | "AUTHENTICATION_ERROR" | "GENERIC_ERROR";
|
|
39
|
+
name: "NOT_A_CIE" | "TAG_LOST" | "CANCELLED_BY_USER" | "APDU_ERROR" | "WRONG_CAN" | "CARD_BLOCKED" | "NO_INTERNET_CONNECTION" | "CERTIFICATE_EXPIRED" | "CERTIFICATE_REVOKED" | "AUTHENTICATION_ERROR" | "GENERIC_ERROR";
|
|
40
40
|
message?: string | undefined;
|
|
41
41
|
}>, z.ZodObject<{
|
|
42
42
|
name: z.ZodEnum<["WRONG_PIN"]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/manager/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/manager/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,M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H,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE5D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACnC,OAAO,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;IACnC,+BAA+B,EAAE,CAC/B,oBAAoB,EAAE,oBAAoB,KACvC,IAAI,CAAC;IACV,qBAAqB,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5D,oCAAoC,EAAE,CACpC,2BAA2B,EAAE,2BAA2B,KACrD,IAAI,CAAC;IACV,mBAAmB,EAAE,CAAC,UAAU,EAAE,aAAa,KAAK,IAAI,CAAC;IACzD,SAAS,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,oBAAoB,EAAE,CAAC,eAAe,EAAE,eAAe,KAAK,IAAI,CAAC;CAClE,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/io-react-native-cie",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Native support for CIE",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@react-native/eslint-config": "^0.78.0",
|
|
68
68
|
"@release-it/conventional-changelog": "^9.0.2",
|
|
69
69
|
"@types/jest": "^29.5.5",
|
|
70
|
-
"@types/react": "^19.
|
|
70
|
+
"@types/react": "^19.1.0",
|
|
71
71
|
"commitlint": "^19.6.1",
|
|
72
72
|
"del-cli": "^5.1.0",
|
|
73
73
|
"eslint": "^9.22.0",
|
|
@@ -76,21 +76,26 @@
|
|
|
76
76
|
"eslint-plugin-prettier": "^5.2.3",
|
|
77
77
|
"jest": "^29.7.0",
|
|
78
78
|
"prettier": "^3.0.3",
|
|
79
|
-
"react": "19.
|
|
80
|
-
"react-native": "0.
|
|
79
|
+
"react": "19.1.0",
|
|
80
|
+
"react-native": "0.81.5",
|
|
81
81
|
"react-native-builder-bob": "^0.40.6",
|
|
82
82
|
"release-it": "^17.10.0",
|
|
83
83
|
"turbo": "^1.10.7",
|
|
84
|
-
"typescript": "^5.
|
|
84
|
+
"typescript": "^5.8.3"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"react": "
|
|
88
|
-
"react-native": "
|
|
87
|
+
"react": ">=19.1",
|
|
88
|
+
"react-native": ">=0.81"
|
|
89
89
|
},
|
|
90
90
|
"workspaces": [
|
|
91
91
|
"example"
|
|
92
92
|
],
|
|
93
93
|
"packageManager": "yarn@3.6.1",
|
|
94
|
+
"commitlint": {
|
|
95
|
+
"extends": [
|
|
96
|
+
"@commitlint/config-conventional"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
94
99
|
"jest": {
|
|
95
100
|
"preset": "react-native",
|
|
96
101
|
"modulePathIgnorePatterns": [
|
|
@@ -98,11 +103,6 @@
|
|
|
98
103
|
"<rootDir>/lib/"
|
|
99
104
|
]
|
|
100
105
|
},
|
|
101
|
-
"commitlint": {
|
|
102
|
-
"extends": [
|
|
103
|
-
"@commitlint/config-conventional"
|
|
104
|
-
]
|
|
105
|
-
},
|
|
106
106
|
"release-it": {
|
|
107
107
|
"git": {
|
|
108
108
|
"commitMessage": "chore: release ${version}",
|
package/src/manager/types.ts
CHANGED
|
@@ -16,6 +16,7 @@ export const AlertMessageKey = z.enum([
|
|
|
16
16
|
'wrongPin1AttemptLeft',
|
|
17
17
|
'wrongPin2AttemptLeft',
|
|
18
18
|
'genericError',
|
|
19
|
+
'wrongCan',
|
|
19
20
|
]);
|
|
20
21
|
|
|
21
22
|
export type AlertMessageKey = z.infer<typeof AlertMessageKey>;
|
|
@@ -40,6 +41,7 @@ export const NfcErrorName = z.enum([
|
|
|
40
41
|
'CANCELLED_BY_USER',
|
|
41
42
|
'APDU_ERROR',
|
|
42
43
|
'WRONG_PIN',
|
|
44
|
+
'WRONG_CAN',
|
|
43
45
|
'CARD_BLOCKED',
|
|
44
46
|
'NO_INTERNET_CONNECTION',
|
|
45
47
|
'CERTIFICATE_EXPIRED',
|
|
@@ -99,17 +101,8 @@ export type MrtdResponse = z.infer<typeof MrtdResponseObject>;
|
|
|
99
101
|
* All string value are Hex or Base64 encoded
|
|
100
102
|
*/
|
|
101
103
|
export const InternalAuthAndMrtdResponse = z.object({
|
|
102
|
-
nis_data:
|
|
103
|
-
|
|
104
|
-
publicKey: z.string(),
|
|
105
|
-
sod: z.string(),
|
|
106
|
-
signedChallenge: z.string(),
|
|
107
|
-
}),
|
|
108
|
-
mrtd_data: z.object({
|
|
109
|
-
dg1: z.string(),
|
|
110
|
-
dg11: z.string(),
|
|
111
|
-
sod: z.string(),
|
|
112
|
-
}),
|
|
104
|
+
nis_data: InternalAuthResponseObject,
|
|
105
|
+
mrtd_data: MrtdResponseObject,
|
|
113
106
|
});
|
|
114
107
|
|
|
115
108
|
export type InternalAuthAndMrtdResponse = z.infer<
|