@velocitycareerlabs/vcl-react-native 1.3.0 → 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/android/build.gradle +1 -1
- package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +4 -20
- package/ios/Utils/Converter.swift +8 -39
- package/lib/commonjs/api/entities/VCLServiceType.js +1 -0
- package/lib/commonjs/api/entities/VCLServiceType.js.map +1 -1
- package/lib/module/api/entities/VCLServiceType.js +1 -0
- package/lib/module/api/entities/VCLServiceType.js.map +1 -1
- package/lib/typescript/api/entities/VCLServiceType.d.ts +1 -0
- package/lib/typescript/api/entities/VCLVerifiedProfileDescriptor.d.ts +1 -1
- package/package.json +1 -1
- package/src/api/entities/VCLServiceType.ts +1 -0
- package/src/api/entities/VCLVerifiedProfileDescriptor.ts +1 -1
- package/vcl-react-native.podspec +1 -1
package/android/build.gradle
CHANGED
|
@@ -261,21 +261,6 @@ object Converter {
|
|
|
261
261
|
mapToSubmissionResult(exchangeDescriptorMap.getMapOpt("submissionResult"))
|
|
262
262
|
)
|
|
263
263
|
|
|
264
|
-
fun stringToServiceType(
|
|
265
|
-
serviceType: String?
|
|
266
|
-
): VCLServiceType? =
|
|
267
|
-
when (serviceType) {
|
|
268
|
-
"Issuer" -> VCLServiceType.Issuer
|
|
269
|
-
"Inspector" -> VCLServiceType.Inspector
|
|
270
|
-
"CredentialAgentOperator" -> VCLServiceType.CredentialAgentOperator
|
|
271
|
-
"NodeOperator" -> VCLServiceType.NodeOperator
|
|
272
|
-
"TrustRoot" -> VCLServiceType.TrustRoot
|
|
273
|
-
"NotaryIssuer" -> VCLServiceType.NotaryIssuer
|
|
274
|
-
"IdentityIssuer" -> VCLServiceType.IdentityIssuer
|
|
275
|
-
"HolderAppProvider" -> VCLServiceType.HolderAppProvider
|
|
276
|
-
else -> null
|
|
277
|
-
}
|
|
278
|
-
|
|
279
264
|
fun mapToOrganizationsSearchDescriptor(
|
|
280
265
|
organizationsDescriptorMap: ReadableMap
|
|
281
266
|
) = VCLOrganizationsSearchDescriptor(
|
|
@@ -294,8 +279,7 @@ object Converter {
|
|
|
294
279
|
serviceTypesArr?.let {
|
|
295
280
|
serviceTypesList = mutableListOf()
|
|
296
281
|
for (i in 0 until it.size()) {
|
|
297
|
-
|
|
298
|
-
serviceType?.let { st -> serviceTypesList?.add(st) }
|
|
282
|
+
serviceTypesList?.add(VCLServiceType.fromString(it.getStringOpt(i) ?: ""))
|
|
299
283
|
}
|
|
300
284
|
}
|
|
301
285
|
val credentialTypesArr = filterMap?.getArrayOpt("credentialTypes")
|
|
@@ -550,9 +534,9 @@ object Converter {
|
|
|
550
534
|
fun mapToVerifiedProfileDescriptor(verifiedProfileDescriptor: ReadableMap) =
|
|
551
535
|
VCLVerifiedProfileDescriptor(
|
|
552
536
|
did = verifiedProfileDescriptor.getStringOpt("did") ?: "",
|
|
553
|
-
serviceType =
|
|
554
|
-
|
|
555
|
-
)
|
|
537
|
+
serviceType = verifiedProfileDescriptor.getStringOpt("serviceType")?.let {
|
|
538
|
+
VCLServiceType.fromString(it)
|
|
539
|
+
})
|
|
556
540
|
|
|
557
541
|
fun verifiedProfileToMap(
|
|
558
542
|
verifiedProfile: VCLVerifiedProfile
|
|
@@ -249,36 +249,6 @@ func dictionaryToExchangeDescriptor(
|
|
|
249
249
|
)
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
func stringToServiceType(
|
|
253
|
-
_ serviceTypeStr: String?
|
|
254
|
-
) -> VCLServiceType? {
|
|
255
|
-
var serviceType: VCLServiceType? = nil
|
|
256
|
-
guard (serviceTypeStr != nil) else {
|
|
257
|
-
return nil
|
|
258
|
-
}
|
|
259
|
-
switch serviceTypeStr {
|
|
260
|
-
case "Issuer":
|
|
261
|
-
serviceType = .Issuer
|
|
262
|
-
case "Inspector":
|
|
263
|
-
serviceType = .Inspector
|
|
264
|
-
case "CredentialAgentOperator":
|
|
265
|
-
serviceType = .CredentialAgentOperator
|
|
266
|
-
case "NodeOperator":
|
|
267
|
-
serviceType = .NodeOperator
|
|
268
|
-
case "TrustRoot":
|
|
269
|
-
serviceType = .TrustRoot
|
|
270
|
-
case "NotaryIssuer":
|
|
271
|
-
serviceType = .NotaryIssuer
|
|
272
|
-
case "IdentityIssuer":
|
|
273
|
-
serviceType = .IdentityIssuer
|
|
274
|
-
case "HolderAppProvider":
|
|
275
|
-
serviceType = .HolderAppProvider
|
|
276
|
-
default:
|
|
277
|
-
serviceType = nil
|
|
278
|
-
}
|
|
279
|
-
return serviceType
|
|
280
|
-
}
|
|
281
|
-
|
|
282
252
|
func dictionayToOrganizationsSearchDescriptor(
|
|
283
253
|
_ organizationsDescriptorDictionary: [String: Any]
|
|
284
254
|
) -> VCLOrganizationsSearchDescriptor {
|
|
@@ -298,10 +268,7 @@ func dictionaryToFilter(
|
|
|
298
268
|
if let serviceTypesArr = (filterDictionary?["serviceTypes"] as? [String]) {
|
|
299
269
|
serviceTypesList = [VCLServiceType]()
|
|
300
270
|
for serviceTypeStr in serviceTypesArr {
|
|
301
|
-
|
|
302
|
-
if let st = serviceType {
|
|
303
|
-
serviceTypesList?.append(st)
|
|
304
|
-
}
|
|
271
|
+
serviceTypesList?.append(VCLServiceType.fromString(value: serviceTypeStr))
|
|
305
272
|
}
|
|
306
273
|
}
|
|
307
274
|
var credentialTypesList: [String]? = nil
|
|
@@ -528,11 +495,13 @@ func readableMapToCredentialTypesUIFormSchemaDescriptor(
|
|
|
528
495
|
func dictionaryToVerifiedProfileDescriptor(
|
|
529
496
|
_ verifiedProfileDescriptor: [String: Any]
|
|
530
497
|
) -> VCLVerifiedProfileDescriptor {
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
value:
|
|
535
|
-
)
|
|
498
|
+
if let serviceTypeStr = verifiedProfileDescriptor["serviceType"] as? String {
|
|
499
|
+
return VCLVerifiedProfileDescriptor(
|
|
500
|
+
did: (verifiedProfileDescriptor["did"] as? String) ?? "",
|
|
501
|
+
serviceType: VCLServiceType.fromString(value: serviceTypeStr)
|
|
502
|
+
)
|
|
503
|
+
}
|
|
504
|
+
return VCLVerifiedProfileDescriptor(did: (verifiedProfileDescriptor["did"] as? String) ?? "")
|
|
536
505
|
}
|
|
537
506
|
|
|
538
507
|
func verifiedProfileToDictionary(
|
|
@@ -18,6 +18,7 @@ exports.VCLServiceType = VCLServiceType;
|
|
|
18
18
|
VCLServiceType["Issuer"] = "Issuer";
|
|
19
19
|
VCLServiceType["Inspector"] = "Inspector";
|
|
20
20
|
VCLServiceType["TrustRoot"] = "TrustRoot";
|
|
21
|
+
VCLServiceType["CareerIssuer"] = "CareerIssuer";
|
|
21
22
|
VCLServiceType["NodeOperator"] = "NodeOperator";
|
|
22
23
|
VCLServiceType["NotaryIssuer"] = "NotaryIssuer";
|
|
23
24
|
VCLServiceType["IdentityIssuer"] = "IdentityIssuer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["VCLServiceType.ts"],"names":["VCLServiceType"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;IAEYA,c;;;WAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;GAAAA,c,8BAAAA,c","sourcesContent":["/**\n * Created by Michael Avoyan.\n *\n * Copyright 2022 Velocity Career Labs inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport enum VCLServiceType {\n Issuer = 'Issuer',\n Inspector = 'Inspector',\n TrustRoot = 'TrustRoot',\n NodeOperator = 'NodeOperator',\n NotaryIssuer = 'NotaryIssuer',\n IdentityIssuer = 'IdentityIssuer',\n HolderAppProvider = 'HolderAppProvider',\n CredentialAgentOperator = 'CredentialAgentOperator',\n Undefined = 'Undefined',\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["VCLServiceType.ts"],"names":["VCLServiceType"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;IAEYA,c;;;WAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;GAAAA,c,8BAAAA,c","sourcesContent":["/**\n * Created by Michael Avoyan.\n *\n * Copyright 2022 Velocity Career Labs inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport enum VCLServiceType {\n Issuer = 'Issuer',\n Inspector = 'Inspector',\n TrustRoot = 'TrustRoot',\n CareerIssuer = 'CareerIssuer',\n NodeOperator = 'NodeOperator',\n NotaryIssuer = 'NotaryIssuer',\n IdentityIssuer = 'IdentityIssuer',\n HolderAppProvider = 'HolderAppProvider',\n CredentialAgentOperator = 'CredentialAgentOperator',\n Undefined = 'Undefined',\n}\n"]}
|
|
@@ -10,6 +10,7 @@ export let VCLServiceType;
|
|
|
10
10
|
VCLServiceType["Issuer"] = "Issuer";
|
|
11
11
|
VCLServiceType["Inspector"] = "Inspector";
|
|
12
12
|
VCLServiceType["TrustRoot"] = "TrustRoot";
|
|
13
|
+
VCLServiceType["CareerIssuer"] = "CareerIssuer";
|
|
13
14
|
VCLServiceType["NodeOperator"] = "NodeOperator";
|
|
14
15
|
VCLServiceType["NotaryIssuer"] = "NotaryIssuer";
|
|
15
16
|
VCLServiceType["IdentityIssuer"] = "IdentityIssuer";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["VCLServiceType.ts"],"names":["VCLServiceType"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AAEA,WAAYA,cAAZ;;WAAYA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;GAAAA,c,KAAAA,c","sourcesContent":["/**\n * Created by Michael Avoyan.\n *\n * Copyright 2022 Velocity Career Labs inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport enum VCLServiceType {\n Issuer = 'Issuer',\n Inspector = 'Inspector',\n TrustRoot = 'TrustRoot',\n NodeOperator = 'NodeOperator',\n NotaryIssuer = 'NotaryIssuer',\n IdentityIssuer = 'IdentityIssuer',\n HolderAppProvider = 'HolderAppProvider',\n CredentialAgentOperator = 'CredentialAgentOperator',\n Undefined = 'Undefined',\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["VCLServiceType.ts"],"names":["VCLServiceType"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AAEA,WAAYA,cAAZ;;WAAYA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;GAAAA,c,KAAAA,c","sourcesContent":["/**\n * Created by Michael Avoyan.\n *\n * Copyright 2022 Velocity Career Labs inc.\n * SPDX-License-Identifier: Apache-2.0\n */\n\nexport enum VCLServiceType {\n Issuer = 'Issuer',\n Inspector = 'Inspector',\n TrustRoot = 'TrustRoot',\n CareerIssuer = 'CareerIssuer',\n NodeOperator = 'NodeOperator',\n NotaryIssuer = 'NotaryIssuer',\n IdentityIssuer = 'IdentityIssuer',\n HolderAppProvider = 'HolderAppProvider',\n CredentialAgentOperator = 'CredentialAgentOperator',\n Undefined = 'Undefined',\n}\n"]}
|
package/package.json
CHANGED
package/vcl-react-native.podspec
CHANGED