@velocitycareerlabs/vcl-react-native 2.6.12 → 2.7.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.
Files changed (112) hide show
  1. package/android/build.gradle +2 -2
  2. package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativeModule.kt +24 -0
  3. package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +43 -2
  4. package/ios/Utils/Converter.swift +37 -0
  5. package/ios/VclReactNative.mm +5 -0
  6. package/ios/VclReactNative.swift +17 -1
  7. package/lib/commonjs/api/VCLApi.js +27 -20
  8. package/lib/commonjs/api/VCLApi.js.map +1 -1
  9. package/lib/commonjs/api/entities/VCLAuthToken.js +6 -0
  10. package/lib/commonjs/api/entities/VCLAuthToken.js.map +1 -0
  11. package/lib/commonjs/api/entities/VCLAuthTokenDescriptor.js +6 -0
  12. package/lib/commonjs/api/entities/VCLAuthTokenDescriptor.js.map +1 -0
  13. package/lib/commonjs/api/entities/VCLServiceType.js +1 -0
  14. package/lib/commonjs/api/entities/VCLServiceType.js.map +1 -1
  15. package/lib/commonjs/api/entities/error/VCLErrorCode.js +3 -0
  16. package/lib/commonjs/api/entities/error/VCLErrorCode.js.map +1 -1
  17. package/lib/commonjs/index.js.map +1 -1
  18. package/lib/commonjs/package.json +1 -0
  19. package/lib/module/api/Dictionary.js +1 -1
  20. package/lib/module/api/VCLApi.js +12 -3
  21. package/lib/module/api/VCLApi.js.map +1 -1
  22. package/lib/module/api/VCLCryptoServiceType.js +2 -0
  23. package/lib/module/api/VCLCryptoServiceType.js.map +1 -1
  24. package/lib/module/api/VCLEnvironment.js +2 -0
  25. package/lib/module/api/VCLEnvironment.js.map +1 -1
  26. package/lib/module/api/VCLSignatureAlgorithm.js +2 -0
  27. package/lib/module/api/VCLSignatureAlgorithm.js.map +1 -1
  28. package/lib/module/api/VCLXVnfProtocolVersion.js +2 -0
  29. package/lib/module/api/VCLXVnfProtocolVersion.js.map +1 -1
  30. package/lib/module/api/entities/VCLAuthToken.js +4 -0
  31. package/lib/module/api/entities/VCLAuthToken.js.map +1 -0
  32. package/lib/module/api/entities/VCLAuthTokenDescriptor.js +4 -0
  33. package/lib/module/api/entities/VCLAuthTokenDescriptor.js.map +1 -0
  34. package/lib/module/api/entities/VCLCountries.js +2 -0
  35. package/lib/module/api/entities/VCLCountries.js.map +1 -1
  36. package/lib/module/api/entities/VCLCountry.js +2 -0
  37. package/lib/module/api/entities/VCLCredentialManifest.js +2 -0
  38. package/lib/module/api/entities/VCLCredentialManifestDescriptor.js +2 -0
  39. package/lib/module/api/entities/VCLCredentialManifestDescriptorByDeepLink.js +2 -0
  40. package/lib/module/api/entities/VCLCredentialManifestDescriptorByService.js +2 -0
  41. package/lib/module/api/entities/VCLCredentialManifestDescriptorRefresh.js +2 -0
  42. package/lib/module/api/entities/VCLCredentialType.js +2 -0
  43. package/lib/module/api/entities/VCLCredentialTypeSchema.js +2 -0
  44. package/lib/module/api/entities/VCLCredentialTypeSchemas.js +2 -0
  45. package/lib/module/api/entities/VCLCredentialTypes.js +2 -0
  46. package/lib/module/api/entities/VCLCredentialTypesUIFormSchema.js +2 -0
  47. package/lib/module/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.js +1 -1
  48. package/lib/module/api/entities/VCLDeepLink.js +1 -1
  49. package/lib/module/api/entities/VCLDidJwk.js +2 -0
  50. package/lib/module/api/entities/VCLDidJwkDescriptor.js +2 -0
  51. package/lib/module/api/entities/VCLExchange.js +1 -1
  52. package/lib/module/api/entities/VCLExchangeDescriptor.js +2 -0
  53. package/lib/module/api/entities/VCLFilter.js +2 -0
  54. package/lib/module/api/entities/VCLFinalizeOffersDescriptor.js +2 -0
  55. package/lib/module/api/entities/VCLGenerateOffersDescriptor.js +2 -0
  56. package/lib/module/api/entities/VCLIssuingType.js +2 -0
  57. package/lib/module/api/entities/VCLIssuingType.js.map +1 -1
  58. package/lib/module/api/entities/VCLJwt.js +2 -0
  59. package/lib/module/api/entities/VCLJwtDescriptor.js +2 -0
  60. package/lib/module/api/entities/VCLJwtVerifiableCredentials.js +2 -0
  61. package/lib/module/api/entities/VCLOffer.js +2 -0
  62. package/lib/module/api/entities/VCLOffers.js +2 -0
  63. package/lib/module/api/entities/VCLOrganization.js +2 -0
  64. package/lib/module/api/entities/VCLOrganizations.js +2 -0
  65. package/lib/module/api/entities/VCLOrganizationsSearchDescriptor.js +2 -0
  66. package/lib/module/api/entities/VCLPage.js +1 -1
  67. package/lib/module/api/entities/VCLPresentationRequest.js +2 -0
  68. package/lib/module/api/entities/VCLPresentationRequestDescriptor.js +2 -0
  69. package/lib/module/api/entities/VCLPresentationSubmission.js +2 -0
  70. package/lib/module/api/entities/VCLPublicJwk.js +1 -1
  71. package/lib/module/api/entities/VCLPushDelegate.js +1 -1
  72. package/lib/module/api/entities/VCLRegion.js +2 -0
  73. package/lib/module/api/entities/VCLRegions.js +2 -0
  74. package/lib/module/api/entities/VCLService.js +2 -0
  75. package/lib/module/api/entities/VCLServiceType.js +3 -0
  76. package/lib/module/api/entities/VCLServiceType.js.map +1 -1
  77. package/lib/module/api/entities/VCLServiceTypes.js +2 -0
  78. package/lib/module/api/entities/VCLSubmissionResult.js +2 -0
  79. package/lib/module/api/entities/VCLToken.js +1 -1
  80. package/lib/module/api/entities/VCLVerifiableCredential.js +1 -1
  81. package/lib/module/api/entities/VCLVerifiedProfile.js +2 -0
  82. package/lib/module/api/entities/VCLVerifiedProfileDescriptor.js +1 -1
  83. package/lib/module/api/entities/error/VCLError.js +2 -0
  84. package/lib/module/api/entities/error/VCLError.js.map +1 -1
  85. package/lib/module/api/entities/error/VCLErrorCode.js +5 -0
  86. package/lib/module/api/entities/error/VCLErrorCode.js.map +1 -1
  87. package/lib/module/api/entities/error/VCLStatusCode.js +2 -0
  88. package/lib/module/api/entities/error/VCLStatusCode.js.map +1 -1
  89. package/lib/module/api/entities/initialization/VCLCryptoServicesDescriptor.js +2 -0
  90. package/lib/module/api/entities/initialization/VCLInitializationDescriptor.js +2 -0
  91. package/lib/module/api/entities/initialization/VCLJwtServiceUrls.js +1 -1
  92. package/lib/module/api/entities/initialization/VCLKeyServiceUrls.js +1 -1
  93. package/lib/module/api/entities/initialization/VCLRemoteCryptoServicesUrlsDescriptor.js +2 -0
  94. package/lib/module/index.js +2 -0
  95. package/lib/module/index.js.map +1 -1
  96. package/lib/typescript/src/api/VCLApi.d.ts +3 -29
  97. package/lib/typescript/src/api/VCLApi.d.ts.map +1 -1
  98. package/lib/typescript/src/api/entities/VCLAuthToken.d.ts +17 -0
  99. package/lib/typescript/src/api/entities/VCLAuthToken.d.ts.map +1 -0
  100. package/lib/typescript/src/api/entities/VCLAuthTokenDescriptor.d.ts +16 -0
  101. package/lib/typescript/src/api/entities/VCLAuthTokenDescriptor.d.ts.map +1 -0
  102. package/lib/typescript/src/api/entities/VCLPresentationRequest.d.ts +1 -0
  103. package/lib/typescript/src/api/entities/VCLPresentationRequest.d.ts.map +1 -1
  104. package/lib/typescript/src/index.d.ts +3 -1
  105. package/lib/typescript/src/index.d.ts.map +1 -1
  106. package/package.json +17 -12
  107. package/src/api/VCLApi.ts +46 -32
  108. package/src/api/entities/VCLAuthToken.ts +17 -0
  109. package/src/api/entities/VCLAuthTokenDescriptor.ts +16 -0
  110. package/src/api/entities/VCLPresentationRequest.ts +1 -0
  111. package/src/index.tsx +4 -0
  112. package/velocitycareerlabs-vcl-react-native.podspec +7 -28
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@velocitycareerlabs/vcl-react-native",
3
- "version": "2.6.12",
3
+ "version": "2.7.1",
4
4
  "description": "Velocity Career Labs React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -26,6 +26,7 @@
26
26
  "!**/.*"
27
27
  ],
28
28
  "scripts": {
29
+ "check-licenses": "yarn licenses list --production --json | grep table | ./scripts/check-license.js",
29
30
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
30
31
  "lint:affected": "nx affected --target=lint",
31
32
  "lint:fix": "nx run-many --target=lint:fix --all",
@@ -55,13 +56,21 @@
55
56
  "publishConfig": {
56
57
  "registry": "https://registry.npmjs.org/"
57
58
  },
59
+ "dependencies": {
60
+ "license-checker": "^25.0.1"
61
+ },
58
62
  "devDependencies": {
63
+ "@babel/core": "7.26.0",
64
+ "@babel/preset-env": "7.26.0",
65
+ "@babel/preset-typescript": "7.26.0",
59
66
  "@commitlint/config-conventional": "^19.1.0",
60
67
  "@evilmartians/lefthook": "^1.5.0",
68
+ "@react-native/babel-preset": "^0.77.0",
69
+ "@react-native/community-cli-plugin": "^0.77.0",
61
70
  "@react-native/eslint-config": "^0.74.75",
62
71
  "@release-it/conventional-changelog": "^8.0.1",
63
- "@types/jest": "^29.5.5",
64
- "@types/react": "^18.2.44",
72
+ "@types/jest": "^29.5.14",
73
+ "@types/react": "^18.3.12",
65
74
  "@typescript-eslint/eslint-plugin": "^6.4.0",
66
75
  "commitlint": "^19.1.0",
67
76
  "del-cli": "^5.1.0",
@@ -72,10 +81,11 @@
72
81
  "eslint-config-react-app": "^7.0.1",
73
82
  "eslint-import-resolver-typescript": "^3.6.1",
74
83
  "eslint-plugin-autofix": "^1.1.0",
84
+ "eslint-plugin-ft-flow": "^3.0.11",
75
85
  "eslint-plugin-import": "^2.29.1",
76
86
  "eslint-plugin-jest": "^28.2.0",
77
87
  "eslint-plugin-jsx-a11y": "^6.8.0 ",
78
- "eslint-plugin-prefer-arrow-functions": "^3.3.2",
88
+ "eslint-plugin-prefer-arrow": "^1.2.3",
79
89
  "eslint-plugin-prettier": "^5.1.3",
80
90
  "eslint-plugin-react": "^7.34.1",
81
91
  "eslint-plugin-react-hooks": "^4.6.0",
@@ -84,14 +94,14 @@
84
94
  "jest": "^29.7.0",
85
95
  "prettier": "^3.0.3",
86
96
  "react": "18.3.1",
87
- "react-native": "0.73.6",
88
- "react-native-builder-bob": "^0.23.2",
97
+ "react-native": "0.73.10",
98
+ "react-native-builder-bob": "^0.40.6",
89
99
  "release-it": "^15.0.0",
90
100
  "turbo": "^1.10.7",
91
101
  "typescript": "^5.2.2"
92
102
  },
93
103
  "resolutions": {
94
- "@types/react": "^18.2.44"
104
+ "@types/react": "^18.3.12"
95
105
  },
96
106
  "peerDependencies": {
97
107
  "react": "*",
@@ -122,11 +132,6 @@
122
132
  },
123
133
  "github": {
124
134
  "release": true
125
- },
126
- "plugins": {
127
- "@release-it/conventional-changelog": {
128
- "preset": "angular"
129
- }
130
135
  }
131
136
  },
132
137
  "eslintConfig": {
package/src/api/VCLApi.ts CHANGED
@@ -6,36 +6,39 @@
6
6
  */
7
7
 
8
8
  import { NativeModules } from 'react-native';
9
- import type { VCLCredentialManifest } from './entities/VCLCredentialManifest';
10
- import type { VCLCredentialManifestDescriptor } from './entities/VCLCredentialManifestDescriptor';
11
- import type { VCLCredentialTypeSchemas } from './entities/VCLCredentialTypeSchemas';
12
- import type { VCLCredentialTypesUIFormSchema } from './entities/VCLCredentialTypesUIFormSchema';
13
- import type { VCLCredentialTypesUIFormSchemaDescriptor } from './entities/VCLCredentialTypesUIFormSchemaDescriptor';
14
- import type { VCLExchange } from './entities/VCLExchange';
15
- import type { VCLExchangeDescriptor } from './entities/VCLExchangeDescriptor';
16
- import type { VCLFinalizeOffersDescriptor } from './entities/VCLFinalizeOffersDescriptor';
17
- import type { VCLGenerateOffersDescriptor } from './entities/VCLGenerateOffersDescriptor';
18
- import type { VCLJwt } from './entities/VCLJwt';
19
- import type { VCLJwtVerifiableCredentials } from './entities/VCLJwtVerifiableCredentials';
20
- import type { VCLOffers } from './entities/VCLOffers';
21
- import type { VCLOrganizations } from './entities/VCLOrganizations';
22
- import type { VCLOrganizationsSearchDescriptor } from './entities/VCLOrganizationsSearchDescriptor';
23
- import type { VCLPresentationRequest } from './entities/VCLPresentationRequest';
24
- import type { VCLPresentationSubmission } from './entities/VCLPresentationSubmission';
25
- import type { VCLPublicJwk } from './entities/VCLPublicJwk';
26
- import type { VCLToken } from './entities/VCLToken';
27
- import type { VCLVerifiedProfile } from './entities/VCLVerifiedProfile';
28
- import type { VCLVerifiedProfileDescriptor } from './entities/VCLVerifiedProfileDescriptor';
29
- import type { VCLCountries } from './entities/VCLCountries';
30
- import type { VCLInitializationDescriptor } from './entities/initialization/VCLInitializationDescriptor';
31
- import type { VCLSubmissionResult } from './entities/VCLSubmissionResult';
32
- import type { VCLPresentationRequestDescriptor } from './entities/VCLPresentationRequestDescriptor';
33
- import type { VCLJwtDescriptor } from './entities/VCLJwtDescriptor';
34
- import type { VCLDidJwk } from './entities/VCLDidJwk';
35
- import type { VCLCredentialTypes } from './entities/VCLCredentialTypes';
36
- import type { VCLDidJwkDescriptor } from './entities/VCLDidJwkDescriptor';
37
-
38
- import { VCLError } from './entities/error/VCLError';
9
+ import {
10
+ type VCLAuthToken,
11
+ type VCLAuthTokenDescriptor,
12
+ type VCLCredentialManifest,
13
+ type VCLCredentialManifestDescriptor,
14
+ type VCLCredentialTypeSchemas,
15
+ type VCLCredentialTypesUIFormSchema,
16
+ type VCLCredentialTypesUIFormSchemaDescriptor,
17
+ type VCLExchange,
18
+ type VCLExchangeDescriptor,
19
+ type VCLFinalizeOffersDescriptor,
20
+ type VCLGenerateOffersDescriptor,
21
+ type VCLJwt,
22
+ type VCLJwtVerifiableCredentials,
23
+ type VCLOffers,
24
+ type VCLOrganizations,
25
+ type VCLOrganizationsSearchDescriptor,
26
+ type VCLPresentationRequest,
27
+ type VCLPresentationSubmission,
28
+ type VCLPublicJwk,
29
+ type VCLToken,
30
+ type VCLVerifiedProfile,
31
+ type VCLVerifiedProfileDescriptor,
32
+ type VCLCountries,
33
+ type VCLInitializationDescriptor,
34
+ type VCLSubmissionResult,
35
+ type VCLPresentationRequestDescriptor,
36
+ type VCLJwtDescriptor,
37
+ type VCLDidJwk,
38
+ type VCLCredentialTypes,
39
+ type VCLDidJwkDescriptor,
40
+ VCLError,
41
+ } from '@velocitycareerlabs/vcl-react-native';
39
42
 
40
43
  const { VclReactNative } = NativeModules;
41
44
 
@@ -87,10 +90,11 @@ export const VclApi = {
87
90
  },
88
91
 
89
92
  submitPresentation: async (
90
- presentationSubmission: VCLPresentationSubmission
93
+ presentationSubmission: VCLPresentationSubmission,
94
+ authToken?: VCLAuthToken
91
95
  ): Promise<VCLSubmissionResult> => {
92
96
  try {
93
- return await VclReactNative.submitPresentation(presentationSubmission);
97
+ return await VclReactNative.submitPresentation(presentationSubmission, authToken);
94
98
  } catch (e) {
95
99
  throw new VCLError(e);
96
100
  }
@@ -168,6 +172,16 @@ export const VclApi = {
168
172
  }
169
173
  },
170
174
 
175
+ getAuthToken: async (
176
+ authTokenDescriptor: VCLAuthTokenDescriptor,
177
+ ): Promise<VCLAuthToken> => {
178
+ try {
179
+ return await VclReactNative.getAuthToken(authTokenDescriptor);
180
+ } catch (e) {
181
+ throw new VCLError(e);
182
+ }
183
+ },
184
+
171
185
  getCredentialTypesUIFormSchema: async (
172
186
  credentialTypesUIFormSchemaDescriptor: VCLCredentialTypesUIFormSchemaDescriptor
173
187
  ): Promise<VCLCredentialTypesUIFormSchema> => {
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Created by Michael Avoyan on 17/04/2025.
3
+ *
4
+ * Copyright 2022 Velocity Career Labs inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ import type { Dictionary, VCLToken } from '@velocitycareerlabs/vcl-react-native';
8
+
9
+ export interface VCLAuthToken {
10
+ payload: Dictionary<any>,
11
+ authTokenUri?: string
12
+ walletDid?: string
13
+ relyingPartyDid?: string
14
+ accessToken: VCLToken
15
+ refreshToken: VCLToken
16
+ tokenType: string
17
+ }
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Created by Michael Avoyan on 17/04/2025.
3
+ *
4
+ * Copyright 2022 Velocity Career Labs inc.
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ import type { VCLPresentationRequest, VCLToken } from '@velocitycareerlabs/vcl-react-native';
8
+
9
+ export interface VCLAuthTokenDescriptor {
10
+ authTokenUri?: string
11
+ presentationRequest?: VCLPresentationRequest
12
+ refreshToken?: VCLToken
13
+ walletDid?: string
14
+ relyingPartyDid?: string
15
+ vendorOriginContext?: string
16
+ }
@@ -18,5 +18,6 @@ export interface VCLPresentationRequest {
18
18
  presentationDefinitionId: string;
19
19
  iss: string;
20
20
  didJwk: VCLDidJwk;
21
+ feed: boolean;
21
22
  remoteCryptoServicesToken?: VCLToken;
22
23
  }
package/src/index.tsx CHANGED
@@ -66,6 +66,8 @@ import type { VCLDidJwk } from './api/entities/VCLDidJwk';
66
66
  import { VCLError } from './api/entities/error/VCLError';
67
67
  import { VCLStatusCode } from './api/entities/error/VCLStatusCode';
68
68
  import { VCLErrorCode } from './api/entities/error/VCLErrorCode';
69
+ import type { VCLAuthToken } from './api/entities/VCLAuthToken';
70
+ import type { VCLAuthTokenDescriptor } from './api/entities/VCLAuthTokenDescriptor';
69
71
 
70
72
  export default VclApi;
71
73
  export {
@@ -131,4 +133,6 @@ export type {
131
133
  VCLJwtServiceUrls,
132
134
  VCLKeyServiceUrls,
133
135
  VCLRemoteCryptoServicesUrlsDescriptor,
136
+ VCLAuthToken,
137
+ VCLAuthTokenDescriptor,
134
138
  };
@@ -1,7 +1,6 @@
1
1
  require "json"
2
2
 
3
3
  package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
- folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
5
4
 
6
5
  Pod::Spec.new do |s|
7
6
  s.name = "velocitycareerlabs-vcl-react-native"
@@ -16,33 +15,13 @@ Pod::Spec.new do |s|
16
15
 
17
16
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
17
 
19
- # https://github.com/CocoaPods/CocoaPods/issues/7234#issuecomment-346136322
20
- # s.static_framework = true
18
+ s.dependency "VCL", "2.7.1"
21
19
 
22
- # s.swift_version = "5"
23
-
24
- s.dependency "VCL", "2.6.12"
25
-
26
- # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
27
- # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
28
- if respond_to?(:install_modules_dependencies, true)
29
- install_modules_dependencies(s)
30
- else
20
+ # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
21
+ # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
22
+ if respond_to?(:install_modules_dependencies, true)
23
+ install_modules_dependencies(s)
24
+ else
31
25
  s.dependency "React-Core"
32
-
33
- # Don't install the dependencies when we run `pod install` in the old architecture.
34
- if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
35
- s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
36
- s.pod_target_xcconfig = {
37
- "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
38
- "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
39
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
40
- }
41
- s.dependency "React-Codegen"
42
- s.dependency "RCT-Folly"
43
- s.dependency "RCTRequired"
44
- s.dependency "RCTTypeSafety"
45
- s.dependency "ReactCommon/turbomodule/core"
46
- end
47
- end
26
+ end
48
27
  end