@velocitycareerlabs/vcl-react-native 1.0.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 (308) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +126 -0
  3. package/android/.gradle/7.4.2/checksums/checksums.lock +0 -0
  4. package/android/.gradle/7.4.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  5. package/android/.gradle/7.4.2/dependencies-accessors/gc.properties +0 -0
  6. package/android/.gradle/7.4.2/executionHistory/executionHistory.lock +0 -0
  7. package/android/.gradle/7.4.2/fileChanges/last-build.bin +0 -0
  8. package/android/.gradle/7.4.2/fileHashes/fileHashes.lock +0 -0
  9. package/android/.gradle/7.4.2/gc.properties +0 -0
  10. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  12. package/android/.gradle/vcs-1/gc.properties +0 -0
  13. package/android/build.gradle +134 -0
  14. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  15. package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  16. package/android/gradle.properties +4 -0
  17. package/android/src/main/AndroidManifest.xml +3 -0
  18. package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativeModule.kt +320 -0
  19. package/android/src/main/java/io/velocitycareerlabs/reactnative/VclReactNativePackage.kt +19 -0
  20. package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/ArrayExtensions.kt +88 -0
  21. package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/JSONExtensions.kt +66 -0
  22. package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/MapExtensions.kt +89 -0
  23. package/android/src/main/java/io/velocitycareerlabs/reactnative/extensions/RNCollectionExtensions.kt +62 -0
  24. package/android/src/main/java/io/velocitycareerlabs/reactnative/utlis/Converter.kt +514 -0
  25. package/ios/Extensions/StringExtensions.swift +21 -0
  26. package/ios/Utils/Converter.swift +507 -0
  27. package/ios/VclReactNative-Bridging-Header.h +2 -0
  28. package/ios/VclReactNative.m +70 -0
  29. package/ios/VclReactNative.swift +249 -0
  30. package/ios/VclReactNative.xcodeproj/project.pbxproj +303 -0
  31. package/lib/commonjs/api/Dictionary.js +2 -0
  32. package/lib/commonjs/api/Dictionary.js.map +1 -0
  33. package/lib/commonjs/api/VCLApi.js +6 -0
  34. package/lib/commonjs/api/VCLApi.js.map +1 -0
  35. package/lib/commonjs/api/VCLEnvironment.js +15 -0
  36. package/lib/commonjs/api/VCLEnvironment.js.map +1 -0
  37. package/lib/commonjs/api/entities/VCLCountries.js +263 -0
  38. package/lib/commonjs/api/entities/VCLCountries.js.map +1 -0
  39. package/lib/commonjs/api/entities/VCLCountry.js +6 -0
  40. package/lib/commonjs/api/entities/VCLCountry.js.map +1 -0
  41. package/lib/commonjs/api/entities/VCLCredentialManifest.js +6 -0
  42. package/lib/commonjs/api/entities/VCLCredentialManifest.js.map +1 -0
  43. package/lib/commonjs/api/entities/VCLCredentialManifestDescriptor.js +6 -0
  44. package/lib/commonjs/api/entities/VCLCredentialManifestDescriptor.js.map +1 -0
  45. package/lib/commonjs/api/entities/VCLCredentialManifestDescriptorByDeepLink.js +6 -0
  46. package/lib/commonjs/api/entities/VCLCredentialManifestDescriptorByDeepLink.js.map +1 -0
  47. package/lib/commonjs/api/entities/VCLCredentialManifestDescriptorByService.js +6 -0
  48. package/lib/commonjs/api/entities/VCLCredentialManifestDescriptorByService.js.map +1 -0
  49. package/lib/commonjs/api/entities/VCLCredentialManifestDescriptorRefresh.js +6 -0
  50. package/lib/commonjs/api/entities/VCLCredentialManifestDescriptorRefresh.js.map +1 -0
  51. package/lib/commonjs/api/entities/VCLCredentialType.js +6 -0
  52. package/lib/commonjs/api/entities/VCLCredentialType.js.map +1 -0
  53. package/lib/commonjs/api/entities/VCLCredentialTypeSchema.js +6 -0
  54. package/lib/commonjs/api/entities/VCLCredentialTypeSchema.js.map +1 -0
  55. package/lib/commonjs/api/entities/VCLCredentialTypeSchemas.js +6 -0
  56. package/lib/commonjs/api/entities/VCLCredentialTypeSchemas.js.map +1 -0
  57. package/lib/commonjs/api/entities/VCLCredentialTypes.js +6 -0
  58. package/lib/commonjs/api/entities/VCLCredentialTypes.js.map +1 -0
  59. package/lib/commonjs/api/entities/VCLCredentialTypesUIFormSchema.js +6 -0
  60. package/lib/commonjs/api/entities/VCLCredentialTypesUIFormSchema.js.map +1 -0
  61. package/lib/commonjs/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.js +2 -0
  62. package/lib/commonjs/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.js.map +1 -0
  63. package/lib/commonjs/api/entities/VCLDeepLink.js +2 -0
  64. package/lib/commonjs/api/entities/VCLDeepLink.js.map +1 -0
  65. package/lib/commonjs/api/entities/VCLError.js +2 -0
  66. package/lib/commonjs/api/entities/VCLError.js.map +1 -0
  67. package/lib/commonjs/api/entities/VCLExchange.js +2 -0
  68. package/lib/commonjs/api/entities/VCLExchange.js.map +1 -0
  69. package/lib/commonjs/api/entities/VCLExchangeDescriptor.js +6 -0
  70. package/lib/commonjs/api/entities/VCLExchangeDescriptor.js.map +1 -0
  71. package/lib/commonjs/api/entities/VCLFilter.js +6 -0
  72. package/lib/commonjs/api/entities/VCLFilter.js.map +1 -0
  73. package/lib/commonjs/api/entities/VCLFinalizeOffersDescriptor.js +6 -0
  74. package/lib/commonjs/api/entities/VCLFinalizeOffersDescriptor.js.map +1 -0
  75. package/lib/commonjs/api/entities/VCLGenerateOffersDescriptor.js +6 -0
  76. package/lib/commonjs/api/entities/VCLGenerateOffersDescriptor.js.map +1 -0
  77. package/lib/commonjs/api/entities/VCLJWT.js +2 -0
  78. package/lib/commonjs/api/entities/VCLJWT.js.map +1 -0
  79. package/lib/commonjs/api/entities/VCLJwtVerifiableCredentials.js +6 -0
  80. package/lib/commonjs/api/entities/VCLJwtVerifiableCredentials.js.map +1 -0
  81. package/lib/commonjs/api/entities/VCLOffers.js +6 -0
  82. package/lib/commonjs/api/entities/VCLOffers.js.map +1 -0
  83. package/lib/commonjs/api/entities/VCLOrganization.js +6 -0
  84. package/lib/commonjs/api/entities/VCLOrganization.js.map +1 -0
  85. package/lib/commonjs/api/entities/VCLOrganizations.js +6 -0
  86. package/lib/commonjs/api/entities/VCLOrganizations.js.map +1 -0
  87. package/lib/commonjs/api/entities/VCLOrganizationsSearchDescriptor.js +6 -0
  88. package/lib/commonjs/api/entities/VCLOrganizationsSearchDescriptor.js.map +1 -0
  89. package/lib/commonjs/api/entities/VCLPage.js +2 -0
  90. package/lib/commonjs/api/entities/VCLPage.js.map +1 -0
  91. package/lib/commonjs/api/entities/VCLPresentationRequest.js +6 -0
  92. package/lib/commonjs/api/entities/VCLPresentationRequest.js.map +1 -0
  93. package/lib/commonjs/api/entities/VCLPresentationSubmission.js +6 -0
  94. package/lib/commonjs/api/entities/VCLPresentationSubmission.js.map +1 -0
  95. package/lib/commonjs/api/entities/VCLPresentationSubmissionResult.js +6 -0
  96. package/lib/commonjs/api/entities/VCLPresentationSubmissionResult.js.map +1 -0
  97. package/lib/commonjs/api/entities/VCLPublicKey.js +2 -0
  98. package/lib/commonjs/api/entities/VCLPublicKey.js.map +1 -0
  99. package/lib/commonjs/api/entities/VCLPushDelegate.js +2 -0
  100. package/lib/commonjs/api/entities/VCLPushDelegate.js.map +1 -0
  101. package/lib/commonjs/api/entities/VCLRegion.js +6 -0
  102. package/lib/commonjs/api/entities/VCLRegion.js.map +1 -0
  103. package/lib/commonjs/api/entities/VCLRegions.js +6 -0
  104. package/lib/commonjs/api/entities/VCLRegions.js.map +1 -0
  105. package/lib/commonjs/api/entities/VCLService.js +6 -0
  106. package/lib/commonjs/api/entities/VCLService.js.map +1 -0
  107. package/lib/commonjs/api/entities/VCLServiceCredentialAgentIssuer.js +6 -0
  108. package/lib/commonjs/api/entities/VCLServiceCredentialAgentIssuer.js.map +1 -0
  109. package/lib/commonjs/api/entities/VCLServiceType.js +20 -0
  110. package/lib/commonjs/api/entities/VCLServiceType.js.map +1 -0
  111. package/lib/commonjs/api/entities/VCLSubmissionResult.js +6 -0
  112. package/lib/commonjs/api/entities/VCLSubmissionResult.js.map +1 -0
  113. package/lib/commonjs/api/entities/VCLToken.js +2 -0
  114. package/lib/commonjs/api/entities/VCLToken.js.map +1 -0
  115. package/lib/commonjs/api/entities/VCLVerifiableCredential.js +2 -0
  116. package/lib/commonjs/api/entities/VCLVerifiableCredential.js.map +1 -0
  117. package/lib/commonjs/api/entities/VCLVerifiedProfile.js +6 -0
  118. package/lib/commonjs/api/entities/VCLVerifiedProfile.js.map +1 -0
  119. package/lib/commonjs/api/entities/VCLVerifiedProfileDescriptor.js +2 -0
  120. package/lib/commonjs/api/entities/VCLVerifiedProfileDescriptor.js.map +1 -0
  121. package/lib/commonjs/index.js +39 -0
  122. package/lib/commonjs/index.js.map +1 -0
  123. package/lib/module/api/Dictionary.js +2 -0
  124. package/lib/module/api/Dictionary.js.map +1 -0
  125. package/lib/module/api/VCLApi.js +2 -0
  126. package/lib/module/api/VCLApi.js.map +1 -0
  127. package/lib/module/api/VCLEnvironment.js +8 -0
  128. package/lib/module/api/VCLEnvironment.js.map +1 -0
  129. package/lib/module/api/entities/VCLCountries.js +256 -0
  130. package/lib/module/api/entities/VCLCountries.js.map +1 -0
  131. package/lib/module/api/entities/VCLCountry.js +2 -0
  132. package/lib/module/api/entities/VCLCountry.js.map +1 -0
  133. package/lib/module/api/entities/VCLCredentialManifest.js +2 -0
  134. package/lib/module/api/entities/VCLCredentialManifest.js.map +1 -0
  135. package/lib/module/api/entities/VCLCredentialManifestDescriptor.js +2 -0
  136. package/lib/module/api/entities/VCLCredentialManifestDescriptor.js.map +1 -0
  137. package/lib/module/api/entities/VCLCredentialManifestDescriptorByDeepLink.js +2 -0
  138. package/lib/module/api/entities/VCLCredentialManifestDescriptorByDeepLink.js.map +1 -0
  139. package/lib/module/api/entities/VCLCredentialManifestDescriptorByService.js +2 -0
  140. package/lib/module/api/entities/VCLCredentialManifestDescriptorByService.js.map +1 -0
  141. package/lib/module/api/entities/VCLCredentialManifestDescriptorRefresh.js +2 -0
  142. package/lib/module/api/entities/VCLCredentialManifestDescriptorRefresh.js.map +1 -0
  143. package/lib/module/api/entities/VCLCredentialType.js +2 -0
  144. package/lib/module/api/entities/VCLCredentialType.js.map +1 -0
  145. package/lib/module/api/entities/VCLCredentialTypeSchema.js +2 -0
  146. package/lib/module/api/entities/VCLCredentialTypeSchema.js.map +1 -0
  147. package/lib/module/api/entities/VCLCredentialTypeSchemas.js +2 -0
  148. package/lib/module/api/entities/VCLCredentialTypeSchemas.js.map +1 -0
  149. package/lib/module/api/entities/VCLCredentialTypes.js +2 -0
  150. package/lib/module/api/entities/VCLCredentialTypes.js.map +1 -0
  151. package/lib/module/api/entities/VCLCredentialTypesUIFormSchema.js +2 -0
  152. package/lib/module/api/entities/VCLCredentialTypesUIFormSchema.js.map +1 -0
  153. package/lib/module/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.js +2 -0
  154. package/lib/module/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.js.map +1 -0
  155. package/lib/module/api/entities/VCLDeepLink.js +2 -0
  156. package/lib/module/api/entities/VCLDeepLink.js.map +1 -0
  157. package/lib/module/api/entities/VCLError.js +2 -0
  158. package/lib/module/api/entities/VCLError.js.map +1 -0
  159. package/lib/module/api/entities/VCLExchange.js +2 -0
  160. package/lib/module/api/entities/VCLExchange.js.map +1 -0
  161. package/lib/module/api/entities/VCLExchangeDescriptor.js +2 -0
  162. package/lib/module/api/entities/VCLExchangeDescriptor.js.map +1 -0
  163. package/lib/module/api/entities/VCLFilter.js +2 -0
  164. package/lib/module/api/entities/VCLFilter.js.map +1 -0
  165. package/lib/module/api/entities/VCLFinalizeOffersDescriptor.js +2 -0
  166. package/lib/module/api/entities/VCLFinalizeOffersDescriptor.js.map +1 -0
  167. package/lib/module/api/entities/VCLGenerateOffersDescriptor.js +2 -0
  168. package/lib/module/api/entities/VCLGenerateOffersDescriptor.js.map +1 -0
  169. package/lib/module/api/entities/VCLJWT.js +2 -0
  170. package/lib/module/api/entities/VCLJWT.js.map +1 -0
  171. package/lib/module/api/entities/VCLJwtVerifiableCredentials.js +2 -0
  172. package/lib/module/api/entities/VCLJwtVerifiableCredentials.js.map +1 -0
  173. package/lib/module/api/entities/VCLOffers.js +2 -0
  174. package/lib/module/api/entities/VCLOffers.js.map +1 -0
  175. package/lib/module/api/entities/VCLOrganization.js +2 -0
  176. package/lib/module/api/entities/VCLOrganization.js.map +1 -0
  177. package/lib/module/api/entities/VCLOrganizations.js +2 -0
  178. package/lib/module/api/entities/VCLOrganizations.js.map +1 -0
  179. package/lib/module/api/entities/VCLOrganizationsSearchDescriptor.js +2 -0
  180. package/lib/module/api/entities/VCLOrganizationsSearchDescriptor.js.map +1 -0
  181. package/lib/module/api/entities/VCLPage.js +2 -0
  182. package/lib/module/api/entities/VCLPage.js.map +1 -0
  183. package/lib/module/api/entities/VCLPresentationRequest.js +2 -0
  184. package/lib/module/api/entities/VCLPresentationRequest.js.map +1 -0
  185. package/lib/module/api/entities/VCLPresentationSubmission.js +2 -0
  186. package/lib/module/api/entities/VCLPresentationSubmission.js.map +1 -0
  187. package/lib/module/api/entities/VCLPresentationSubmissionResult.js +2 -0
  188. package/lib/module/api/entities/VCLPresentationSubmissionResult.js.map +1 -0
  189. package/lib/module/api/entities/VCLPublicKey.js +2 -0
  190. package/lib/module/api/entities/VCLPublicKey.js.map +1 -0
  191. package/lib/module/api/entities/VCLPushDelegate.js +2 -0
  192. package/lib/module/api/entities/VCLPushDelegate.js.map +1 -0
  193. package/lib/module/api/entities/VCLRegion.js +2 -0
  194. package/lib/module/api/entities/VCLRegion.js.map +1 -0
  195. package/lib/module/api/entities/VCLRegions.js +2 -0
  196. package/lib/module/api/entities/VCLRegions.js.map +1 -0
  197. package/lib/module/api/entities/VCLService.js +2 -0
  198. package/lib/module/api/entities/VCLService.js.map +1 -0
  199. package/lib/module/api/entities/VCLServiceCredentialAgentIssuer.js +2 -0
  200. package/lib/module/api/entities/VCLServiceCredentialAgentIssuer.js.map +1 -0
  201. package/lib/module/api/entities/VCLServiceType.js +13 -0
  202. package/lib/module/api/entities/VCLServiceType.js.map +1 -0
  203. package/lib/module/api/entities/VCLSubmissionResult.js +2 -0
  204. package/lib/module/api/entities/VCLSubmissionResult.js.map +1 -0
  205. package/lib/module/api/entities/VCLToken.js +2 -0
  206. package/lib/module/api/entities/VCLToken.js.map +1 -0
  207. package/lib/module/api/entities/VCLVerifiableCredential.js +2 -0
  208. package/lib/module/api/entities/VCLVerifiableCredential.js.map +1 -0
  209. package/lib/module/api/entities/VCLVerifiedProfile.js +2 -0
  210. package/lib/module/api/entities/VCLVerifiedProfile.js.map +1 -0
  211. package/lib/module/api/entities/VCLVerifiedProfileDescriptor.js +2 -0
  212. package/lib/module/api/entities/VCLVerifiedProfileDescriptor.js.map +1 -0
  213. package/lib/module/index.js +10 -0
  214. package/lib/module/index.js.map +1 -0
  215. package/lib/typescript/api/Dictionary.d.ts +3 -0
  216. package/lib/typescript/api/VCLApi.d.ts +44 -0
  217. package/lib/typescript/api/VCLEnvironment.d.ts +8 -0
  218. package/lib/typescript/api/entities/VCLCountries.d.ts +257 -0
  219. package/lib/typescript/api/entities/VCLCountry.d.ts +8 -0
  220. package/lib/typescript/api/entities/VCLCredentialManifest.d.ts +8 -0
  221. package/lib/typescript/api/entities/VCLCredentialManifestDescriptor.d.ts +5 -0
  222. package/lib/typescript/api/entities/VCLCredentialManifestDescriptorByDeepLink.d.ts +5 -0
  223. package/lib/typescript/api/entities/VCLCredentialManifestDescriptorByService.d.ts +5 -0
  224. package/lib/typescript/api/entities/VCLCredentialManifestDescriptorRefresh.d.ts +6 -0
  225. package/lib/typescript/api/entities/VCLCredentialType.d.ts +10 -0
  226. package/lib/typescript/api/entities/VCLCredentialTypeSchema.d.ts +4 -0
  227. package/lib/typescript/api/entities/VCLCredentialTypeSchemas.d.ts +5 -0
  228. package/lib/typescript/api/entities/VCLCredentialTypes.d.ts +5 -0
  229. package/lib/typescript/api/entities/VCLCredentialTypesUIFormSchema.d.ts +4 -0
  230. package/lib/typescript/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.d.ts +4 -0
  231. package/lib/typescript/api/entities/VCLDeepLink.d.ts +3 -0
  232. package/lib/typescript/api/entities/VCLError.d.ts +4 -0
  233. package/lib/typescript/api/entities/VCLExchange.d.ts +6 -0
  234. package/lib/typescript/api/entities/VCLExchangeDescriptor.d.ts +6 -0
  235. package/lib/typescript/api/entities/VCLFilter.d.ts +6 -0
  236. package/lib/typescript/api/entities/VCLFinalizeOffersDescriptor.d.ts +6 -0
  237. package/lib/typescript/api/entities/VCLGenerateOffersDescriptor.d.ts +8 -0
  238. package/lib/typescript/api/entities/VCLJWT.d.ts +3 -0
  239. package/lib/typescript/api/entities/VCLJwtVerifiableCredentials.d.ts +4 -0
  240. package/lib/typescript/api/entities/VCLOffers.d.ts +7 -0
  241. package/lib/typescript/api/entities/VCLOrganization.d.ts +6 -0
  242. package/lib/typescript/api/entities/VCLOrganizations.d.ts +4 -0
  243. package/lib/typescript/api/entities/VCLOrganizationsSearchDescriptor.d.ts +8 -0
  244. package/lib/typescript/api/entities/VCLPage.d.ts +4 -0
  245. package/lib/typescript/api/entities/VCLPresentationRequest.d.ts +10 -0
  246. package/lib/typescript/api/entities/VCLPresentationSubmission.d.ts +6 -0
  247. package/lib/typescript/api/entities/VCLPresentationSubmissionResult.d.ts +6 -0
  248. package/lib/typescript/api/entities/VCLPublicKey.d.ts +3 -0
  249. package/lib/typescript/api/entities/VCLPushDelegate.d.ts +4 -0
  250. package/lib/typescript/api/entities/VCLRegion.d.ts +6 -0
  251. package/lib/typescript/api/entities/VCLRegions.d.ts +5 -0
  252. package/lib/typescript/api/entities/VCLService.d.ts +4 -0
  253. package/lib/typescript/api/entities/VCLServiceCredentialAgentIssuer.d.ts +3 -0
  254. package/lib/typescript/api/entities/VCLServiceType.d.ts +10 -0
  255. package/lib/typescript/api/entities/VCLSubmissionResult.d.ts +6 -0
  256. package/lib/typescript/api/entities/VCLToken.d.ts +3 -0
  257. package/lib/typescript/api/entities/VCLVerifiableCredential.d.ts +4 -0
  258. package/lib/typescript/api/entities/VCLVerifiedProfile.d.ts +8 -0
  259. package/lib/typescript/api/entities/VCLVerifiedProfileDescriptor.d.ts +3 -0
  260. package/lib/typescript/index.d.ts +49 -0
  261. package/package.json +154 -0
  262. package/src/api/Dictionary.tsx +3 -0
  263. package/src/api/VCLApi.tsx +80 -0
  264. package/src/api/VCLEnvironment.tsx +9 -0
  265. package/src/api/entities/VCLCountries.tsx +259 -0
  266. package/src/api/entities/VCLCountry.tsx +9 -0
  267. package/src/api/entities/VCLCredentialManifest.tsx +9 -0
  268. package/src/api/entities/VCLCredentialManifestDescriptor.tsx +6 -0
  269. package/src/api/entities/VCLCredentialManifestDescriptorByDeepLink.tsx +7 -0
  270. package/src/api/entities/VCLCredentialManifestDescriptorByService.tsx +7 -0
  271. package/src/api/entities/VCLCredentialManifestDescriptorRefresh.tsx +8 -0
  272. package/src/api/entities/VCLCredentialType.tsx +11 -0
  273. package/src/api/entities/VCLCredentialTypeSchema.tsx +5 -0
  274. package/src/api/entities/VCLCredentialTypeSchemas.tsx +6 -0
  275. package/src/api/entities/VCLCredentialTypes.tsx +6 -0
  276. package/src/api/entities/VCLCredentialTypesUIFormSchema.tsx +5 -0
  277. package/src/api/entities/VCLCredentialTypesUIFormSchemaDescriptor.tsx +4 -0
  278. package/src/api/entities/VCLDeepLink.tsx +3 -0
  279. package/src/api/entities/VCLError.tsx +4 -0
  280. package/src/api/entities/VCLExchange.tsx +6 -0
  281. package/src/api/entities/VCLExchangeDescriptor.tsx +7 -0
  282. package/src/api/entities/VCLFilter.tsx +7 -0
  283. package/src/api/entities/VCLFinalizeOffersDescriptor.tsx +7 -0
  284. package/src/api/entities/VCLGenerateOffersDescriptor.tsx +9 -0
  285. package/src/api/entities/VCLJWT.tsx +3 -0
  286. package/src/api/entities/VCLJwtVerifiableCredentials.tsx +5 -0
  287. package/src/api/entities/VCLOffers.tsx +8 -0
  288. package/src/api/entities/VCLOrganization.tsx +7 -0
  289. package/src/api/entities/VCLOrganizations.tsx +5 -0
  290. package/src/api/entities/VCLOrganizationsSearchDescriptor.tsx +9 -0
  291. package/src/api/entities/VCLPage.tsx +4 -0
  292. package/src/api/entities/VCLPresentationRequest.tsx +11 -0
  293. package/src/api/entities/VCLPresentationSubmission.tsx +7 -0
  294. package/src/api/entities/VCLPresentationSubmissionResult.tsx +7 -0
  295. package/src/api/entities/VCLPublicKey.tsx +3 -0
  296. package/src/api/entities/VCLPushDelegate.tsx +4 -0
  297. package/src/api/entities/VCLRegion.tsx +7 -0
  298. package/src/api/entities/VCLRegions.tsx +6 -0
  299. package/src/api/entities/VCLService.tsx +5 -0
  300. package/src/api/entities/VCLServiceCredentialAgentIssuer.tsx +3 -0
  301. package/src/api/entities/VCLServiceType.tsx +10 -0
  302. package/src/api/entities/VCLSubmissionResult.tsx +7 -0
  303. package/src/api/entities/VCLToken.tsx +3 -0
  304. package/src/api/entities/VCLVerifiableCredential.tsx +4 -0
  305. package/src/api/entities/VCLVerifiedProfile.tsx +9 -0
  306. package/src/api/entities/VCLVerifiedProfileDescriptor.tsx +3 -0
  307. package/src/index.tsx +98 -0
  308. package/vcl-react-native.podspec +22 -0
@@ -0,0 +1,88 @@
1
+ package io.velocitycareerlabs.reactnative.extensions
2
+
3
+ import com.facebook.react.bridge.ReadableArray
4
+ import com.facebook.react.bridge.ReadableMap
5
+ import com.facebook.react.bridge.WritableArray
6
+ import java.lang.Exception
7
+
8
+ /**
9
+ * Created by Michael Avoyan on 25/10/2021.
10
+ */
11
+
12
+ fun ReadableArray.getBooleanOpt(index: Int): Boolean? {
13
+ return try {
14
+ this.getBoolean(index)
15
+ } catch (e: Exception) {
16
+ e.printStackTrace()
17
+ null
18
+ }
19
+ }
20
+
21
+ fun WritableArray.getBooleanOpt(index: Int): Boolean? {
22
+ return (this as ReadableArray).getBooleanOpt(index)
23
+ }
24
+
25
+ fun ReadableArray.getDoubleOpt(index: Int): Double? {
26
+ return try {
27
+ this.getDouble(index)
28
+ } catch (e: Exception) {
29
+ e.printStackTrace()
30
+ null
31
+ }
32
+ }
33
+
34
+ fun WritableArray.getDoubleOpt(index: Int): Double? {
35
+ return (this as ReadableArray).getDoubleOpt(index)
36
+ }
37
+
38
+ fun ReadableArray.getIntOpt(index: Int): Int? {
39
+ return try {
40
+ this.getInt(index)
41
+ } catch (e: Exception) {
42
+ e.printStackTrace()
43
+ null
44
+ }
45
+ }
46
+
47
+ fun WritableArray.getIntOpt(index: Int): Int? {
48
+ return (this as ReadableArray).getIntOpt(index)
49
+ }
50
+
51
+ fun ReadableArray.getStringOpt(index: Int): String? {
52
+ return try {
53
+ this.getString(index)
54
+ } catch (e: Exception) {
55
+ e.printStackTrace()
56
+ null
57
+ }
58
+ }
59
+
60
+ fun WritableArray.getStringOpt(index: Int): String? {
61
+ return (this as ReadableArray).getStringOpt(index)
62
+ }
63
+
64
+ fun ReadableArray.getArrayOpt(index: Int): ReadableArray? {
65
+ return try {
66
+ this.getArray(index)
67
+ } catch (e: Exception) {
68
+ e.printStackTrace()
69
+ null
70
+ }
71
+ }
72
+
73
+ fun WritableArray.getArrayOpt(index: Int): ReadableArray? {
74
+ return (this as ReadableArray).getArrayOpt(index)
75
+ }
76
+
77
+ fun ReadableArray.getMapOpt(index: Int): ReadableMap? {
78
+ return try {
79
+ this.getMap(index)
80
+ } catch (e: Exception) {
81
+ e.printStackTrace()
82
+ null
83
+ }
84
+ }
85
+
86
+ fun WritableArray.getMapOpt(index: Int): ReadableMap? {
87
+ return (this as ReadableArray).getMapOpt(index)
88
+ }
@@ -0,0 +1,66 @@
1
+ package io.velocitycareerlabs.reactnative.extensions
2
+
3
+ import com.facebook.react.bridge.*
4
+ import org.json.JSONArray
5
+ import org.json.JSONException
6
+ import org.json.JSONObject
7
+
8
+ /**
9
+ * Created by Michael Avoyan on 01/07/2021.
10
+ */
11
+
12
+ @Throws(JSONException::class)
13
+ fun JSONObject.toWritableMap(): WritableMap {
14
+ val map = Arguments.createMap()
15
+ val keysItr: Iterator<String> = this.keys()
16
+ while (keysItr.hasNext()) {
17
+ val key = keysItr.next()
18
+ var value: Any = this.get(key)
19
+ if (value is JSONArray) {
20
+ value = value.toWritableArray()
21
+ } else if (value is JSONObject) {
22
+ value = value.toWritableMap()
23
+ }
24
+ when (value) {
25
+ is Boolean -> map.putBoolean(key, value)
26
+ is Double -> map.putDouble(key, value)
27
+ is Int -> map.putInt(key, value)
28
+ is String -> map.putString(key, value)
29
+ is ReadableMap -> map.putMap(key, value)
30
+ is WritableMap -> map.putMap(key, value)
31
+ is ReadableArray -> map.putArray(key, value)
32
+ is WritableArray -> map.putArray(key, value)
33
+ else -> map.putNull(key)
34
+ }
35
+ }
36
+ return map
37
+ }
38
+
39
+ fun JSONObject.toReadableMap(): ReadableMap = toWritableMap()
40
+
41
+ @Throws(JSONException::class)
42
+ fun JSONArray.toWritableArray(): WritableArray {
43
+ val array = Arguments.createArray()
44
+ for (i in 0 until this.length()) {
45
+ var value: Any = this[i]
46
+ if (value is JSONArray) {
47
+ value = value.toWritableArray()
48
+ } else if (value is JSONObject) {
49
+ value = value.toWritableMap()
50
+ }
51
+ when (value) {
52
+ is Boolean -> array.pushBoolean(value)
53
+ is Double -> array.pushDouble(value)
54
+ is Int -> array.pushInt(value)
55
+ is String -> array.pushString(value)
56
+ is ReadableArray -> array.pushArray(value)
57
+ is WritableArray -> array.pushArray(value)
58
+ is ReadableMap -> array.pushMap(value)
59
+ is WritableMap -> array.pushMap(value)
60
+ else -> array.pushNull()
61
+ }
62
+ }
63
+ return array
64
+ }
65
+
66
+ fun JSONArray.toReadableArray(): ReadableArray = toWritableArray()
@@ -0,0 +1,89 @@
1
+ package io.velocitycareerlabs.reactnative.extensions
2
+
3
+ import com.facebook.react.bridge.ReadableArray
4
+ import com.facebook.react.bridge.ReadableMap
5
+ import com.facebook.react.bridge.WritableMap
6
+ import java.lang.Exception
7
+
8
+ /**
9
+ * Created by Michael Avoyan on 25/10/2021.
10
+ */
11
+
12
+ fun ReadableMap.getBooleanOpt(key: String): Boolean? {
13
+ return try {
14
+ this.getBoolean(key)
15
+ } catch (e: Exception) {
16
+ e.printStackTrace()
17
+ null
18
+ }
19
+ }
20
+
21
+ fun WritableMap.getBooleanOpt(key: String): Boolean? {
22
+ return (this as ReadableMap).getBooleanOpt(key)
23
+ }
24
+
25
+ fun ReadableMap.getDoubleOpt(key: String): Double? {
26
+ return try {
27
+ this.getDouble(key)
28
+ } catch (e: Exception) {
29
+ e.printStackTrace()
30
+ null
31
+ }
32
+ }
33
+
34
+ fun WritableMap.getDoubleOpt(key: String): Double? {
35
+ return (this as ReadableMap).getDoubleOpt(key)
36
+ }
37
+
38
+ fun ReadableMap.getIntOpt(key: String): Int? {
39
+ return try {
40
+ this.getInt(key)
41
+ } catch (e: Exception) {
42
+ e.printStackTrace()
43
+ null
44
+ }
45
+ }
46
+
47
+ fun WritableMap.getIntOpt(key: String): Int? {
48
+ return (this as ReadableMap).getIntOpt(key)
49
+ }
50
+
51
+ fun ReadableMap.getStringOpt(key: String): String? {
52
+ return try {
53
+ this.getString(key)
54
+ } catch (e: Exception) {
55
+ e.printStackTrace()
56
+ null
57
+ }
58
+ }
59
+
60
+ fun WritableMap.getStringOpt(key: String): String? {
61
+ return (this as ReadableMap).getStringOpt(key)
62
+ }
63
+
64
+ fun ReadableMap.getArrayOpt(key: String): ReadableArray? {
65
+ return try {
66
+ this.getArray(key)
67
+ } catch (e: Exception) {
68
+ e.printStackTrace()
69
+ null
70
+ }
71
+ }
72
+
73
+ fun WritableMap.getArrayOpt(key: String): ReadableArray? {
74
+ return (this as ReadableMap).getArrayOpt(key)
75
+ }
76
+
77
+ fun ReadableMap.getMapOpt(key: String): ReadableMap? {
78
+ return try {
79
+ this.getMap(key)
80
+ } catch (e: Exception) {
81
+ e.printStackTrace()
82
+ null
83
+ }
84
+ }
85
+
86
+ fun WritableMap.getMapOpt(key: String): ReadableMap? {
87
+ return (this as ReadableMap).getMapOpt(key)
88
+ }
89
+
@@ -0,0 +1,62 @@
1
+ package io.velocitycareerlabs.reactnative.extensions
2
+
3
+ import com.facebook.react.bridge.*
4
+
5
+ /**
6
+ * Created by Michael Avoyan on 01/07/2021.
7
+ */
8
+
9
+ fun Map<String, Any>.toWritableMap(): WritableMap {
10
+ val writableMap = Arguments.createMap()
11
+ val keys: Set<String> = this.keys
12
+ keys.forEach{ key ->
13
+ var value: Any? = this[key]
14
+ if (value is List<*>) {
15
+ value = (value as? List<Any>)?.toWritableArray()
16
+ } else if (value is Map<*,*>) {
17
+ value = (value as? Map<String, Any>)?.toWritableMap()
18
+ }
19
+ when (value) {
20
+ is Boolean -> writableMap.putBoolean(key, value)
21
+ is Double -> writableMap.putDouble(key, value)
22
+ is Int -> writableMap.putInt(key, value)
23
+ is String -> writableMap.putString(key, value)
24
+ is WritableMap -> writableMap.putMap(key, value)
25
+ is WritableArray -> writableMap.putArray(key, value)
26
+ else -> {
27
+ value?.let { throw IllegalArgumentException("Unsupported value type ${value::class.java.name} for key [$key]") }
28
+ ?: throw IllegalArgumentException("Unsupported value type NULL for key [$key]")
29
+ }
30
+ }
31
+ }
32
+ return writableMap
33
+ }
34
+
35
+ fun Map<String, Any>.toReadableMap(): ReadableMap = toWritableMap()
36
+
37
+ fun List<Any>.toWritableArray(): WritableArray {
38
+ val writableArray = Arguments.createArray()
39
+ for (element in this) {
40
+ var value: Any? = element
41
+ if (value is List<*>) {
42
+ value = (value as? List<Any>)?.toWritableArray()
43
+ } else if (value is Map<*,*>) {
44
+ value = (value as? Map<String, Any>)?.toWritableMap()
45
+ }
46
+ when (value) {
47
+ is Boolean -> writableArray.pushBoolean(value)
48
+ is Double -> writableArray.pushDouble(value)
49
+ is Int -> writableArray.pushInt(value)
50
+ is String -> writableArray.pushString(value)
51
+ is WritableArray -> writableArray.pushArray(value)
52
+ is WritableMap -> writableArray.pushMap(value)
53
+ else -> {
54
+ value?.let { throw IllegalArgumentException("Unsupported type ${value::class.java.name}") }
55
+ ?: throw IllegalArgumentException("Unsupported type NULL")
56
+ }
57
+ }
58
+ }
59
+ return writableArray
60
+ }
61
+
62
+ fun List<Any>.toReadableArray(): ReadableArray = toWritableArray()