@velocitycareerlabs/vcl-react-native 2.7.3 → 2.7.5

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.
@@ -8,7 +8,7 @@ buildscript {
8
8
  }
9
9
 
10
10
  dependencies {
11
- classpath "com.android.tools.build:gradle:7.2.2"
11
+ classpath "com.android.tools.build:gradle:8.8.2"
12
12
  // noinspection DifferentKotlinGradleVersion
13
13
  classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
14
14
  }
@@ -92,9 +92,9 @@ dependencies {
92
92
  implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
93
93
 
94
94
  //--------- Must: be added:
95
- implementation "io.velocitycareerlabs:vcl:2.7.3"
96
- implementation 'com.nimbusds:nimbus-jose-jwt:10.0.1'
97
- implementation "androidx.security:security-crypto:1.1.0-alpha07"
95
+ implementation "io.velocitycareerlabs:vcl:2.7.5"
96
+ implementation 'com.nimbusds:nimbus-jose-jwt:10.3.1'
97
+ implementation "androidx.security:security-crypto:1.1.0-beta01"
98
98
  //-------------------------
99
99
  }
100
100
 
@@ -1,4 +1,4 @@
1
- VclReactNative_kotlinVersion=1.9.24
1
+ VclReactNative_kotlinVersion=1.9.25
2
2
  VclReactNative_minSdkVersion=24
3
3
  VclReactNative_targetSdkVersion=34
4
4
  VclReactNative_compileSdkVersion=34
@@ -410,6 +410,7 @@ object Converter {
410
410
  serviceCredentialAgentIssuersArr.pushMap(serviceCredentialAgentIssuerMap)
411
411
  }
412
412
  organizationMap.putArray("serviceCredentialAgentIssuers", serviceCredentialAgentIssuersArr)
413
+ organizationMap.putString("did", organization.did)
413
414
  organizationMap.putMap("payload", organization.payload.toReadableMap())
414
415
  organizationsWritableArray.pushMap(organizationMap)
415
416
  }
@@ -430,14 +431,17 @@ object Converter {
430
431
  fun mapToCredentialManifestDescriptor(
431
432
  credentialManifestDescriptorMap: ReadableMap
432
433
  ): VCLCredentialManifestDescriptor? {
433
- credentialManifestDescriptorMap.getMapOpt("deepLink")?.let {
434
- return mapToCredentialManifestDescriptorByDeepLink(credentialManifestDescriptorMap)
435
- } ?: credentialManifestDescriptorMap.getMapOpt("service")?.let {
436
- credentialManifestDescriptorMap.getArrayOpt("credentialIds")?.let {
437
- return mapToCredentialManifestDescriptorRefresh(credentialManifestDescriptorMap)
438
- } ?: return mapToCredentialManifestDescriptorByService(credentialManifestDescriptorMap)
434
+
435
+ val hasDeepLink = credentialManifestDescriptorMap.getMapOpt("deepLink") != null
436
+ val hasService = credentialManifestDescriptorMap.getMapOpt("service") != null
437
+ val hasCredentialIds = credentialManifestDescriptorMap.getArrayOpt("credentialIds") != null
438
+
439
+ return when {
440
+ hasDeepLink -> mapToCredentialManifestDescriptorByDeepLink(credentialManifestDescriptorMap)
441
+ hasService && hasCredentialIds -> mapToCredentialManifestDescriptorRefresh(credentialManifestDescriptorMap)
442
+ hasService -> mapToCredentialManifestDescriptorByService(credentialManifestDescriptorMap)
443
+ else -> null
439
444
  }
440
- return null
441
445
  }
442
446
 
443
447
  fun mapToCredentialManifestDescriptorByDeepLink(
@@ -478,6 +482,7 @@ object Converter {
478
482
  credentialManifestDescriptorByServiceMap.getMapOpt("pushDelegate")
479
483
  ),
480
484
  didJwk = mapToDidJwk(credentialManifestDescriptorByServiceMap.getMapOpt("didJwk")),
485
+ did = credentialManifestDescriptorByServiceMap.getStringOpt("did") ?: "",
481
486
  remoteCryptoServicesToken = mapToToken(
482
487
  credentialManifestDescriptorByServiceMap.getMapOpt("remoteCryptoServicesToken")
483
488
  )
@@ -494,6 +499,7 @@ object Converter {
494
499
  credentialIds = credentialManifestDescriptorRefreshMap.getArrayOpt("credentialIds")
495
500
  ?.toArrayList()?.toList() as? List<String> ?: listOf(),
496
501
  didJwk = mapToDidJwk(credentialManifestDescriptorRefreshMap.getMapOpt("didJwk")),
502
+ did = credentialManifestDescriptorRefreshMap.getStringOpt("did") ?: "",
497
503
  remoteCryptoServicesToken = mapToToken(
498
504
  credentialManifestDescriptorRefreshMap.getMapOpt("remoteCryptoServicesToken")
499
505
  )
@@ -371,6 +371,7 @@ func organizationsToDictionary(
371
371
  serviceCredentialAgentIssuersArr.append(serviceCredentialAgentIssuerMap)
372
372
  }
373
373
  organizationMap["serviceCredentialAgentIssuers"] = serviceCredentialAgentIssuersArr
374
+ organizationMap["did"] = organization.did
374
375
  organizationMap["payload"] = organization.payload
375
376
  organizationsArr.append(organizationMap)
376
377
  }
@@ -393,16 +394,20 @@ func dictionaryToPushDelegate(_ pushDelegateMap: [String: Any]?) -> VCLPushDeleg
393
394
  func dictionaryToCredentialManifestDescriptor(
394
395
  _ credentialManifestDescriptorDictionary: [String: Any]
395
396
  ) -> VCLCredentialManifestDescriptor? {
396
- if (credentialManifestDescriptorDictionary["deepLink"] != nil) {
397
- return dictionaryToCredentialManifestDescriptorByDeepLink(credentialManifestDescriptorDictionary)
398
- } else if (credentialManifestDescriptorDictionary["service"] != nil) {
399
- if(credentialManifestDescriptorDictionary["credentialIds"] != nil) {
400
- return dictionaryToCredentialManifestDescriptorRefresh(credentialManifestDescriptorDictionary)
401
- } else {
402
- return dictionaryToCredentialManifestDescriptorByService(credentialManifestDescriptorDictionary)
397
+ let hasDeepLink = credentialManifestDescriptorDictionary["deepLink"] != nil
398
+ let hasService = credentialManifestDescriptorDictionary["service"] != nil
399
+ let hasCredentialIds = credentialManifestDescriptorDictionary["credentialIds"] != nil
400
+
401
+ switch (hasDeepLink, hasService, hasCredentialIds) {
402
+ case (true, _, _):
403
+ return dictionaryToCredentialManifestDescriptorByDeepLink(credentialManifestDescriptorDictionary)
404
+ case (false, true, true):
405
+ return dictionaryToCredentialManifestDescriptorRefresh(credentialManifestDescriptorDictionary)
406
+ case (false, true, false):
407
+ return dictionaryToCredentialManifestDescriptorByService(credentialManifestDescriptorDictionary)
408
+ default:
409
+ return nil
403
410
  }
404
- }
405
- return nil
406
411
  }
407
412
 
408
413
  func dictionaryToCredentialManifestDescriptorByDeepLink(
@@ -440,6 +445,7 @@ func dictionaryToCredentialManifestDescriptorByService(
440
445
  credentialManifestDescriptorByServiceDictionary["pushDelegate"] as? [String: Any]
441
446
  ),
442
447
  didJwk: dictionaryToDidJwk(credentialManifestDescriptorByServiceDictionary["didJwk"] as? [String: Any]),
448
+ did: credentialManifestDescriptorByServiceDictionary["did"] as? String ?? "",
443
449
  remoteCryptoServicesToken: dictionaryToToken(
444
450
  credentialManifestDescriptorByServiceDictionary["remoteCryptoServicesToken"] as? [String: Any]
445
451
  )
@@ -455,6 +461,7 @@ func dictionaryToCredentialManifestDescriptorRefresh(
455
461
  ),
456
462
  credentialIds: credentialManifestDescriptorRefreshDictionary["credentialIds"] as? [String] ?? [],
457
463
  didJwk: dictionaryToDidJwk(credentialManifestDescriptorRefreshDictionary["didJwk"] as? [String: Any]),
464
+ did: credentialManifestDescriptorRefreshDictionary["did"] as? String ?? "",
458
465
  remoteCryptoServicesToken: dictionaryToToken(
459
466
  credentialManifestDescriptorRefreshDictionary["remoteCryptoServicesToken"] as? [String: Any]
460
467
  )
@@ -8,5 +8,6 @@ import type { VCLCredentialManifestDescriptor } from './VCLCredentialManifestDes
8
8
  import type { VCLService } from './VCLService';
9
9
  export interface VCLCredentialManifestDescriptorByService extends VCLCredentialManifestDescriptor {
10
10
  service: VCLService;
11
+ did: string;
11
12
  }
12
13
  //# sourceMappingURL=VCLCredentialManifestDescriptorByService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VCLCredentialManifestDescriptorByService.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/VCLCredentialManifestDescriptorByService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,wCACf,SAAQ,+BAA+B;IACvC,OAAO,EAAE,UAAU,CAAC;CACrB"}
1
+ {"version":3,"file":"VCLCredentialManifestDescriptorByService.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/VCLCredentialManifestDescriptorByService.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,wCACf,SAAQ,+BAA+B;IACvC,OAAO,EAAE,UAAU,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;CACb"}
@@ -8,6 +8,7 @@ import type { VCLCredentialManifestDescriptor } from './VCLCredentialManifestDes
8
8
  import type { VCLService } from './VCLService';
9
9
  export interface VCLCredentialManifestDescriptorRefresh extends VCLCredentialManifestDescriptor {
10
10
  service: VCLService;
11
+ did: string;
11
12
  credentialIds: string[];
12
13
  }
13
14
  //# sourceMappingURL=VCLCredentialManifestDescriptorRefresh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VCLCredentialManifestDescriptorRefresh.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/VCLCredentialManifestDescriptorRefresh.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,sCACf,SAAQ,+BAA+B;IACvC,OAAO,EAAE,UAAU,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB"}
1
+ {"version":3,"file":"VCLCredentialManifestDescriptorRefresh.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/VCLCredentialManifestDescriptorRefresh.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACzF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,sCACf,SAAQ,+BAA+B;IACvC,OAAO,EAAE,UAAU,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB"}
@@ -9,5 +9,6 @@ import type { VCLService } from './VCLService';
9
9
  export interface VCLOrganization {
10
10
  payload: Dictionary<any>;
11
11
  serviceCredentialAgentIssuers: VCLService[];
12
+ did: string;
12
13
  }
13
14
  //# sourceMappingURL=VCLOrganization.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"VCLOrganization.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/VCLOrganization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;IACzB,6BAA6B,EAAE,UAAU,EAAE,CAAC;CAC7C"}
1
+ {"version":3,"file":"VCLOrganization.d.ts","sourceRoot":"","sources":["../../../../../src/api/entities/VCLOrganization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;IACzB,6BAA6B,EAAE,UAAU,EAAE,CAAC;IAC5C,GAAG,EAAE,MAAM,CAAC;CACb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/vcl-react-native",
3
- "version": "2.7.3",
3
+ "version": "2.7.5",
4
4
  "description": "Velocity Career Labs React Native SDK",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -65,9 +65,11 @@
65
65
  "@babel/preset-typescript": "7.26.0",
66
66
  "@commitlint/config-conventional": "^19.1.0",
67
67
  "@evilmartians/lefthook": "^1.5.0",
68
- "@react-native/babel-preset": "^0.77.0",
68
+ "@react-native/babel-preset": "0.75.5",
69
69
  "@react-native/community-cli-plugin": "^0.77.0",
70
- "@react-native/eslint-config": "^0.74.75",
70
+ "@react-native/eslint-config": "0.75.5",
71
+ "@react-native/metro-config": "0.75.5",
72
+ "@react-native/typescript-config": "0.75.5",
71
73
  "@release-it/conventional-changelog": "^8.0.1",
72
74
  "@types/jest": "^29.5.14",
73
75
  "@types/react": "^18.3.12",
@@ -94,7 +96,7 @@
94
96
  "jest": "^29.7.0",
95
97
  "prettier": "^3.0.3",
96
98
  "react": "18.3.1",
97
- "react-native": "0.73.10",
99
+ "react-native": "0.75.5",
98
100
  "react-native-builder-bob": "^0.40.6",
99
101
  "release-it": "^15.0.0",
100
102
  "turbo": "^1.10.7",
@@ -11,4 +11,5 @@ import type { VCLService } from './VCLService';
11
11
  export interface VCLCredentialManifestDescriptorByService
12
12
  extends VCLCredentialManifestDescriptor {
13
13
  service: VCLService;
14
+ did: string;
14
15
  }
@@ -11,5 +11,6 @@ import type { VCLService } from './VCLService';
11
11
  export interface VCLCredentialManifestDescriptorRefresh
12
12
  extends VCLCredentialManifestDescriptor {
13
13
  service: VCLService;
14
+ did: string;
14
15
  credentialIds: string[];
15
16
  }
@@ -11,4 +11,5 @@ import type { VCLService } from './VCLService';
11
11
  export interface VCLOrganization {
12
12
  payload: Dictionary<any>;
13
13
  serviceCredentialAgentIssuers: VCLService[];
14
+ did: string;
14
15
  }
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
15
15
 
16
16
  s.source_files = "ios/**/*.{h,m,mm,swift}"
17
17
 
18
- s.dependency "VCL", "2.7.3"
18
+ s.dependency "VCL", "2.7.5"
19
19
 
20
20
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
21
21
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.