@procivis/one-react-native-components 0.3.94 → 0.3.99

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 (263) hide show
  1. package/lib/commonjs/components/backup/preview-credentials.js.map +1 -1
  2. package/lib/commonjs/components/credential/credential.js.map +1 -1
  3. package/lib/commonjs/components/entity/EntityButtons.js.map +1 -1
  4. package/lib/commonjs/components/entity/entity-attributes.js.map +1 -1
  5. package/lib/commonjs/components/entity/entity-details-with-buttons.js +2 -2
  6. package/lib/commonjs/components/entity/entity-details-with-buttons.js.map +1 -1
  7. package/lib/commonjs/components/entity/entity-details.js +3 -3
  8. package/lib/commonjs/components/entity/entity-details.js.map +1 -1
  9. package/lib/commonjs/components/history/history-details-screen.js +10 -10
  10. package/lib/commonjs/components/history/history-details-screen.js.map +1 -1
  11. package/lib/commonjs/components/history/history-list-item-icon.js +12 -8
  12. package/lib/commonjs/components/history/history-list-item-icon.js.map +1 -1
  13. package/lib/commonjs/components/history/history-list-item.js.map +1 -1
  14. package/lib/commonjs/components/history/history-list-screen.js.map +1 -1
  15. package/lib/commonjs/components/history/history-list-section-header.js +1 -1
  16. package/lib/commonjs/components/history/history-list-section-header.js.map +1 -1
  17. package/lib/commonjs/components/history/history-list.js.map +1 -1
  18. package/lib/commonjs/components/proof-request/share-credential-card-notice.js.map +1 -1
  19. package/lib/commonjs/components/proof-request/v1/select-credential.js.map +1 -1
  20. package/lib/commonjs/components/proof-request/v1/share-credential.js +1 -1
  21. package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
  22. package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -1
  23. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js +2 -2
  24. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  25. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js +2 -2
  26. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
  27. package/lib/commonjs/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  28. package/lib/commonjs/ui-components/accessibility/locale/fi.json +1 -1
  29. package/lib/commonjs/ui-components/entity/entity-cluster.js.map +1 -1
  30. package/lib/commonjs/ui-components/header/foldable-header.js.map +1 -1
  31. package/lib/commonjs/ui-components/history/history-section-header.js +1 -1
  32. package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
  33. package/lib/commonjs/ui-components/history/history-section-list-item.js +1 -1
  34. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  35. package/lib/commonjs/ui-components/icons/entity.js.map +1 -1
  36. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  37. package/lib/commonjs/ui-components/screens/section-list-screen.js.map +1 -1
  38. package/lib/commonjs/ui-components/settings/button-setting.js +3 -1
  39. package/lib/commonjs/ui-components/settings/button-setting.js.map +1 -1
  40. package/lib/commonjs/ui-components/settings/setting-item.js +4 -2
  41. package/lib/commonjs/ui-components/settings/setting-item.js.map +1 -1
  42. package/lib/commonjs/ui-components/settings/switch-setting.js +4 -2
  43. package/lib/commonjs/ui-components/settings/switch-setting.js.map +1 -1
  44. package/lib/commonjs/utils/date.js.map +1 -1
  45. package/lib/commonjs/utils/history.js +1 -41
  46. package/lib/commonjs/utils/history.js.map +1 -1
  47. package/lib/commonjs/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  48. package/lib/commonjs/utils/hooks/core/backup.js +3 -3
  49. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  50. package/lib/commonjs/utils/hooks/core/cache.js +10 -10
  51. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
  52. package/lib/commonjs/utils/hooks/core/core-context.js +5 -5
  53. package/lib/commonjs/utils/hooks/core/core-context.js.map +1 -1
  54. package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
  55. package/lib/commonjs/utils/hooks/core/credentials.js +3 -3
  56. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  57. package/lib/commonjs/utils/hooks/core/dids.js +1 -1
  58. package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
  59. package/lib/commonjs/utils/hooks/core/history.js +1 -1
  60. package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
  61. package/lib/commonjs/utils/hooks/core/identifiers.js +3 -3
  62. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
  63. package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
  64. package/lib/commonjs/utils/hooks/core/proofs.js +9 -9
  65. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  66. package/lib/commonjs/utils/hooks/core/trust-entity.js +5 -5
  67. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  68. package/lib/commonjs/utils/hooks/core/wallet-unit.js +1 -1
  69. package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
  70. package/lib/commonjs/utils/hooks/navigation/open-settings.js.map +1 -1
  71. package/lib/commonjs/utils/hooks/revocation/credential-status.js +1 -1
  72. package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
  73. package/lib/commonjs/utils/parsers/credential-images.js +11 -10
  74. package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
  75. package/lib/commonjs/utils/parsers/credential-sharing-v2.js +14 -33
  76. package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
  77. package/lib/commonjs/utils/parsers/credential-sharing.js +4 -12
  78. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  79. package/lib/commonjs/utils/parsers/credential.js +31 -32
  80. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  81. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  82. package/lib/commonjs/utils/url.js.map +1 -1
  83. package/lib/module/components/backup/preview-credentials.js.map +1 -1
  84. package/lib/module/components/credential/credential.js.map +1 -1
  85. package/lib/module/components/entity/EntityButtons.js.map +1 -1
  86. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  87. package/lib/module/components/entity/entity-details-with-buttons.js +3 -3
  88. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  89. package/lib/module/components/entity/entity-details.js +4 -4
  90. package/lib/module/components/entity/entity-details.js.map +1 -1
  91. package/lib/module/components/history/history-details-screen.js +11 -11
  92. package/lib/module/components/history/history-details-screen.js.map +1 -1
  93. package/lib/module/components/history/history-list-item-icon.js +13 -9
  94. package/lib/module/components/history/history-list-item-icon.js.map +1 -1
  95. package/lib/module/components/history/history-list-item.js.map +1 -1
  96. package/lib/module/components/history/history-list-screen.js.map +1 -1
  97. package/lib/module/components/history/history-list-section-header.js +1 -1
  98. package/lib/module/components/history/history-list-section-header.js.map +1 -1
  99. package/lib/module/components/history/history-list.js.map +1 -1
  100. package/lib/module/components/proof-request/share-credential-card-notice.js.map +1 -1
  101. package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
  102. package/lib/module/components/proof-request/v1/share-credential.js +2 -2
  103. package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
  104. package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
  105. package/lib/module/components/proof-request/v2/share-credential-v2-group.js +2 -2
  106. package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  107. package/lib/module/components/proof-request/v2/share-credential-v2.js +2 -2
  108. package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
  109. package/lib/module/ui-components/accessibility/accessibilityHistoryWrappers.js.map +1 -1
  110. package/lib/module/ui-components/accessibility/locale/fi.json +1 -1
  111. package/lib/module/ui-components/entity/entity-cluster.js.map +1 -1
  112. package/lib/module/ui-components/header/foldable-header.js.map +1 -1
  113. package/lib/module/ui-components/history/history-section-header.js +1 -1
  114. package/lib/module/ui-components/history/history-section-header.js.map +1 -1
  115. package/lib/module/ui-components/history/history-section-list-item.js +1 -1
  116. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  117. package/lib/module/ui-components/icons/entity.js.map +1 -1
  118. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  119. package/lib/module/ui-components/screens/section-list-screen.js.map +1 -1
  120. package/lib/module/ui-components/settings/button-setting.js +3 -1
  121. package/lib/module/ui-components/settings/button-setting.js.map +1 -1
  122. package/lib/module/ui-components/settings/setting-item.js +4 -2
  123. package/lib/module/ui-components/settings/setting-item.js.map +1 -1
  124. package/lib/module/ui-components/settings/switch-setting.js +4 -2
  125. package/lib/module/ui-components/settings/switch-setting.js.map +1 -1
  126. package/lib/module/utils/date.js.map +1 -1
  127. package/lib/module/utils/history.js +0 -38
  128. package/lib/module/utils/history.js.map +1 -1
  129. package/lib/module/utils/hooks/connectivity/connectivity.test.js.map +1 -1
  130. package/lib/module/utils/hooks/core/backup.js +4 -4
  131. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  132. package/lib/module/utils/hooks/core/cache.js +11 -11
  133. package/lib/module/utils/hooks/core/cache.js.map +1 -1
  134. package/lib/module/utils/hooks/core/core-context.js +5 -5
  135. package/lib/module/utils/hooks/core/core-context.js.map +1 -1
  136. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  137. package/lib/module/utils/hooks/core/credentials.js +4 -4
  138. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  139. package/lib/module/utils/hooks/core/dids.js +2 -2
  140. package/lib/module/utils/hooks/core/dids.js.map +1 -1
  141. package/lib/module/utils/hooks/core/history.js +1 -1
  142. package/lib/module/utils/hooks/core/history.js.map +1 -1
  143. package/lib/module/utils/hooks/core/identifiers.js +4 -4
  144. package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
  145. package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
  146. package/lib/module/utils/hooks/core/proofs.js +10 -10
  147. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  148. package/lib/module/utils/hooks/core/trust-entity.js +6 -6
  149. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  150. package/lib/module/utils/hooks/core/wallet-unit.js +2 -2
  151. package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
  152. package/lib/module/utils/hooks/navigation/open-settings.js.map +1 -1
  153. package/lib/module/utils/hooks/revocation/credential-status.js +2 -2
  154. package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
  155. package/lib/module/utils/parsers/credential-images.js +12 -11
  156. package/lib/module/utils/parsers/credential-images.js.map +1 -1
  157. package/lib/module/utils/parsers/credential-sharing-v2.js +14 -33
  158. package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
  159. package/lib/module/utils/parsers/credential-sharing.js +4 -12
  160. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  161. package/lib/module/utils/parsers/credential.js +32 -33
  162. package/lib/module/utils/parsers/credential.js.map +1 -1
  163. package/lib/module/utils/parsers/query.js.map +1 -1
  164. package/lib/module/utils/url.js.map +1 -1
  165. package/lib/typescript/components/backup/preview-credentials.d.ts +2 -2
  166. package/lib/typescript/components/credential/credential.d.ts +2 -2
  167. package/lib/typescript/components/entity/EntityButtons.d.ts +2 -2
  168. package/lib/typescript/components/entity/entity-attributes.d.ts +2 -2
  169. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -3
  170. package/lib/typescript/components/entity/entity-details.d.ts +5 -5
  171. package/lib/typescript/components/history/history-details-screen.d.ts +2 -2
  172. package/lib/typescript/components/history/history-list-item-icon.d.ts +3 -3
  173. package/lib/typescript/components/history/history-list-item.d.ts +5 -5
  174. package/lib/typescript/components/history/history-list-screen.d.ts +4 -4
  175. package/lib/typescript/components/history/history-list.d.ts +5 -5
  176. package/lib/typescript/components/proof-request/v1/select-credential.d.ts +2 -2
  177. package/lib/typescript/components/proof-request/v1/share-credential.d.ts +6 -6
  178. package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +3 -3
  179. package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +4 -4
  180. package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +5 -5
  181. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +2 -2
  182. package/lib/typescript/ui-components/settings/setting-item.d.ts +1 -0
  183. package/lib/typescript/utils/history.d.ts +3 -5
  184. package/lib/typescript/utils/hooks/core/backup.d.ts +3 -3
  185. package/lib/typescript/utils/hooks/core/cache.d.ts +2 -2
  186. package/lib/typescript/utils/hooks/core/core-context.d.ts +1 -1
  187. package/lib/typescript/utils/hooks/core/credential-schemas.d.ts +6 -6
  188. package/lib/typescript/utils/hooks/core/credentials.d.ts +8 -8
  189. package/lib/typescript/utils/hooks/core/dids.d.ts +2 -2
  190. package/lib/typescript/utils/hooks/core/history.d.ts +2 -2
  191. package/lib/typescript/utils/hooks/core/identifiers.d.ts +3 -3
  192. package/lib/typescript/utils/hooks/core/proof-schemas.d.ts +7 -7
  193. package/lib/typescript/utils/hooks/core/proofs.d.ts +9 -9
  194. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +6 -6
  195. package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +5 -5
  196. package/lib/typescript/utils/parsers/credential-images.d.ts +2 -2
  197. package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +7 -7
  198. package/lib/typescript/utils/parsers/credential-sharing.d.ts +8 -9
  199. package/lib/typescript/utils/parsers/credential.d.ts +15 -35
  200. package/lib/typescript/utils/parsers/query.d.ts +8 -8
  201. package/package.json +6 -4
  202. package/src/components/backup/preview-credentials.tsx +2 -2
  203. package/src/components/credential/credential.tsx +2 -2
  204. package/src/components/entity/EntityButtons.tsx +2 -2
  205. package/src/components/entity/entity-attributes.tsx +4 -4
  206. package/src/components/entity/entity-details-with-buttons.tsx +11 -6
  207. package/src/components/entity/entity-details.tsx +17 -16
  208. package/src/components/history/history-details-screen.tsx +13 -16
  209. package/src/components/history/history-list-item-icon.tsx +19 -11
  210. package/src/components/history/history-list-item.tsx +9 -5
  211. package/src/components/history/history-list-screen.tsx +4 -4
  212. package/src/components/history/history-list-section-header.tsx +1 -1
  213. package/src/components/history/history-list.tsx +6 -6
  214. package/src/components/proof-request/share-credential-card-notice.tsx +1 -1
  215. package/src/components/proof-request/v1/select-credential.tsx +2 -2
  216. package/src/components/proof-request/v1/share-credential.tsx +13 -11
  217. package/src/components/proof-request/v2/select-credential-v2.tsx +6 -3
  218. package/src/components/proof-request/v2/share-credential-v2-group.tsx +12 -12
  219. package/src/components/proof-request/v2/share-credential-v2.tsx +11 -11
  220. package/src/ui-components/accessibility/accessibilityHistoryWrappers.tsx +4 -1
  221. package/src/ui-components/accessibility/locale/fi.json +1 -1
  222. package/src/ui-components/buttons/ghost-button.stories.tsx +0 -1
  223. package/src/ui-components/control/checkbox.stories.tsx +1 -1
  224. package/src/ui-components/control/switch.stories.tsx +1 -1
  225. package/src/ui-components/credential/card/credential-header.stories.tsx +0 -1
  226. package/src/ui-components/entity/entity-cluster.tsx +7 -6
  227. package/src/ui-components/header/foldable-header.tsx +8 -11
  228. package/src/ui-components/history/history-section-header.tsx +1 -1
  229. package/src/ui-components/history/history-section-list-item.tsx +1 -1
  230. package/src/ui-components/icons/entity.tsx +2 -2
  231. package/src/ui-components/pin/pin-code-screen.stories.tsx +1 -1
  232. package/src/ui-components/screens/image-preview-screen.stories.tsx +1 -1
  233. package/src/ui-components/screens/nerd-mode-screen.tsx +2 -2
  234. package/src/ui-components/screens/qr-code-scanner-screen.stories.tsx +1 -1
  235. package/src/ui-components/screens/section-list-screen.tsx +10 -1
  236. package/src/ui-components/searchbar/search-bar.stories.tsx +0 -1
  237. package/src/ui-components/settings/button-setting.tsx +2 -1
  238. package/src/ui-components/settings/setting-item.tsx +9 -2
  239. package/src/ui-components/settings/switch-setting.tsx +9 -2
  240. package/src/ui-components/text/typography.stories.tsx +2 -2
  241. package/src/utils/date.ts +2 -2
  242. package/src/utils/history.ts +4 -45
  243. package/src/utils/hooks/connectivity/connectivity.test.ts +2 -2
  244. package/src/utils/hooks/core/backup.ts +4 -4
  245. package/src/utils/hooks/core/cache.ts +13 -13
  246. package/src/utils/hooks/core/core-context.tsx +6 -6
  247. package/src/utils/hooks/core/credential-schemas.ts +7 -4
  248. package/src/utils/hooks/core/credentials.ts +21 -13
  249. package/src/utils/hooks/core/dids.ts +3 -3
  250. package/src/utils/hooks/core/history.ts +3 -3
  251. package/src/utils/hooks/core/identifiers.ts +9 -5
  252. package/src/utils/hooks/core/proof-schemas.ts +21 -16
  253. package/src/utils/hooks/core/proofs.ts +31 -27
  254. package/src/utils/hooks/core/trust-entity.ts +19 -12
  255. package/src/utils/hooks/core/wallet-unit.ts +21 -11
  256. package/src/utils/hooks/navigation/open-settings.ts +1 -1
  257. package/src/utils/hooks/revocation/credential-status.ts +2 -2
  258. package/src/utils/parsers/credential-images.tsx +19 -13
  259. package/src/utils/parsers/credential-sharing-v2.tsx +32 -48
  260. package/src/utils/parsers/credential-sharing.tsx +26 -36
  261. package/src/utils/parsers/credential.ts +64 -61
  262. package/src/utils/parsers/query.ts +16 -14
  263. package/src/utils/url.ts +1 -1
@@ -55,8 +55,8 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
55
55
  paddingTop: scrollOffset.interpolate({
56
56
  extrapolate: 'clamp',
57
57
  inputRange: [0, headerHeight],
58
- outputRange: [headerHeight, 0]
59
- })
58
+ outputRange: [headerHeight, 0],
59
+ }),
60
60
  }
61
61
  : undefined;
62
62
 
@@ -79,16 +79,13 @@ const FoldableSearchHeader: FunctionComponent<FoldableHeaderProps> = ({
79
79
 
80
80
  return (
81
81
  <Animated.View
82
- style={[
83
- styles.headerContainer,
84
- containerPaddingStyle,
85
- withNotice ? styles.noticeBorderRadius : undefined,
86
- ]}>
82
+ style={[styles.headerContainer, containerPaddingStyle, withNotice ? styles.noticeBorderRadius : undefined]}>
87
83
  <View style={[styles.blurWrapper, StyleSheet.absoluteFill]}>
88
- <BlurView blurStyle={'header'} color={colorScheme.background} style={[
89
- StyleSheet.absoluteFill,
90
- withNotice ? styles.noticeBorderRadius : undefined,
91
- ]} />
84
+ <BlurView
85
+ blurStyle={'header'}
86
+ color={colorScheme.background}
87
+ style={[StyleSheet.absoluteFill, withNotice ? styles.noticeBorderRadius : undefined]}
88
+ />
92
89
  </View>
93
90
  <View>
94
91
  <Animated.View style={scrollHeaderAnimatedStyle}>
@@ -5,7 +5,7 @@ import { concatTestID } from '../../utils/testID';
5
5
  import Typography from '../text/typography';
6
6
  import { useAppColorScheme } from '../theme/color-scheme-context';
7
7
 
8
- // component used on the history section lists (Settings->History, CredentialDetail->History)
8
+ // component used on the history section lists (Settings->History, CredentialDetailBindingDto->History)
9
9
  // https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev
10
10
 
11
11
  const HistorySectionHeaderView: FC<{
@@ -4,7 +4,7 @@ import { StyleSheet, View } from 'react-native';
4
4
  import { useAppColorScheme } from '../theme/color-scheme-context';
5
5
  import HistoryItemView, { HistoryItemViewProps } from './history-item';
6
6
 
7
- // component used on the history section lists (Settings->History, CredentialDetail->History)
7
+ // component used on the history section lists (Settings->History, CredentialDetailBindingDto->History)
8
8
  // https://www.figma.com/file/52qDYWUMjXAGre1dcnz5bz/Procivis-One-Wallet?type=design&node-id=1246-51813&mode=dev
9
9
 
10
10
  export interface HistorySectionListItemProps extends HistoryItemViewProps {
@@ -50,5 +50,5 @@ export const EntityNotTrustedIcon: FC<SvgProps> = ({ ...props }) => {
50
50
  fill={colorScheme.white}
51
51
  />
52
52
  </Svg>
53
- )
54
- }
53
+ );
54
+ };
@@ -71,7 +71,7 @@ export default {
71
71
  },
72
72
  },
73
73
  args: {
74
- onAccessibilityAnnounced: fn()
74
+ onAccessibilityAnnounced: fn(),
75
75
  },
76
76
  argTypes: {
77
77
  onBack: { action: 'onBack' },
@@ -1,4 +1,4 @@
1
- import type { Meta,StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import React from 'react';
3
3
 
4
4
  import ImagePreviewScreen, { ImagePreviewScreenProps } from './image-preview-screen';
@@ -1,4 +1,4 @@
1
- import { IdentifierListItem } from '@procivis/react-native-one-core';
1
+ import { GetIdentifierListItemBindingDto } from '@procivis/react-native-one-core';
2
2
  import React, { FunctionComponent, useState } from 'react';
3
3
  import { SectionList, StyleSheet, View } from 'react-native';
4
4
  import Animated, { useAnimatedScrollHandler, useSharedValue } from 'react-native-reanimated';
@@ -34,7 +34,7 @@ export interface AttributesLabels {
34
34
  }
35
35
 
36
36
  interface SectionEntityCluster {
37
- identifier?: IdentifierListItem;
37
+ identifier?: GetIdentifierListItemBindingDto;
38
38
  subline?: string;
39
39
  entityLabels: EntityLabels;
40
40
  role: ContextRole;
@@ -20,7 +20,7 @@ const Basic: StoryObj<typeof QRCodeScannerScreen> = {
20
20
  title: 'Scan QR Code to connect.',
21
21
  },
22
22
  render: Render,
23
- }
23
+ };
24
24
 
25
25
  export { Basic as QRCodeScannerScreen };
26
26
 
@@ -58,7 +58,16 @@ const SectionListScreen = <ItemT, SectionT>({
58
58
  return (
59
59
  <View style={[styles.container, { backgroundColor: colorScheme.background }, style]} {...viewProps}>
60
60
  <SectionList<ItemT, SectionT>
61
- ListHeaderComponent={!header.static ? <View><ListTitleHeader title={header.title} />{headerView}</View> : headerView}
61
+ ListHeaderComponent={
62
+ !header.static ? (
63
+ <View>
64
+ <ListTitleHeader title={header.title} />
65
+ {headerView}
66
+ </View>
67
+ ) : (
68
+ headerView
69
+ )
70
+ }
62
71
  contentContainerStyle={[contentInsetsStyle, contentContainerStyle]}
63
72
  onScroll={onScroll}
64
73
  scrollEventThrottle={100}
@@ -16,7 +16,6 @@ const Basic: StoryObj<Omit<SearchBarProps, 'searchPhrase' | 'onSearchPhraseChang
16
16
  render: Render,
17
17
  };
18
18
 
19
-
20
19
  export { Basic as SearchBar };
21
20
 
22
21
  export default {
@@ -1,6 +1,7 @@
1
1
  import React, { ComponentType, FunctionComponent, ReactElement, useMemo } from 'react';
2
2
  import { StyleProp, StyleSheet, View, ViewStyle } from 'react-native';
3
3
 
4
+ import { concatTestID } from '../../utils';
4
5
  import { TouchableOpacity } from '../accessibility/accessibilityHistoryWrappers';
5
6
  import { NextIcon } from '../icons/wallet';
6
7
  import { useAppColorScheme } from '../theme/color-scheme-context';
@@ -50,7 +51,7 @@ const ButtonSetting: FunctionComponent<ButtonSettingProps> = ({
50
51
  onPress={onPress}
51
52
  style={styles.container}
52
53
  testID={testID}>
53
- <SettingItem icon={icon} style={style} title={title}>
54
+ <SettingItem icon={icon} style={style} title={title} testID={concatTestID(testID, 'text')}>
54
55
  {accessoryView}
55
56
  </SettingItem>
56
57
  </TouchableOpacity>
@@ -36,9 +36,16 @@ export type SettingItemProps = {
36
36
  icon?: ComponentType<any> | ReactElement;
37
37
  style?: StyleProp<ViewStyle>;
38
38
  title: string;
39
+ testID?: string;
39
40
  };
40
41
 
41
- const SettingItem: FunctionComponent<PropsWithChildren<SettingItemProps>> = ({ title, icon, style, children }) => {
42
+ const SettingItem: FunctionComponent<PropsWithChildren<SettingItemProps>> = ({
43
+ title,
44
+ icon,
45
+ style,
46
+ children,
47
+ testID,
48
+ }) => {
42
49
  const colorScheme = useAppColorScheme();
43
50
  const iconView: React.ReactElement | undefined = useMemo(() => {
44
51
  if (!icon) {
@@ -56,7 +63,7 @@ const SettingItem: FunctionComponent<PropsWithChildren<SettingItemProps>> = ({ t
56
63
  <View style={[styles.wrapper, { backgroundColor: colorScheme.white }, style]}>
57
64
  <View style={styles.container}>
58
65
  {iconView && <View style={[styles.icon, { backgroundColor: colorScheme.background }]}>{iconView}</View>}
59
- <Typography accessible={false} color={colorScheme.text} preset="s" style={styles.label}>
66
+ <Typography accessible={false} color={colorScheme.text} preset="s" style={styles.label} testID={testID}>
60
67
  {title}
61
68
  </Typography>
62
69
  {children}
@@ -1,6 +1,7 @@
1
1
  import React, { ComponentType, FunctionComponent, ReactElement } from 'react';
2
2
  import type { StyleProp, ViewStyle } from 'react-native';
3
3
 
4
+ import { concatTestID } from '../../utils';
4
5
  import { Switch } from '../control/switch';
5
6
  import SettingItem from './setting-item';
6
7
 
@@ -24,8 +25,14 @@ const SwitchSetting: FunctionComponent<SwitchSettingProps> = ({
24
25
  testID,
25
26
  }) => {
26
27
  return (
27
- <SettingItem icon={icon} style={style} title={title}>
28
- <Switch accessibilityLabel={title} disabled={disabled} onChange={onChange} testID={testID} value={value} />
28
+ <SettingItem icon={icon} style={style} title={title} testID={concatTestID(testID, 'text')}>
29
+ <Switch
30
+ accessibilityLabel={title}
31
+ disabled={disabled}
32
+ onChange={onChange}
33
+ testID={concatTestID(testID, 'switch')}
34
+ value={value}
35
+ />
29
36
  </SettingItem>
30
37
  );
31
38
  };
@@ -1,4 +1,4 @@
1
- import type { Meta,StoryObj } from '@storybook/react';
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
2
  import { fn } from '@storybook/test';
3
3
  import React from 'react';
4
4
  import type { ColorValue } from 'react-native';
@@ -33,7 +33,7 @@ export default {
33
33
  title: 'base/Typography',
34
34
  component: Typography,
35
35
  args: {
36
- onAnnouncementFinished: fn()
36
+ onAnnouncementFinished: fn(),
37
37
  },
38
38
  argTypes: {
39
39
  preset: {
package/src/utils/date.ts CHANGED
@@ -7,8 +7,8 @@ const MINUTE = 60 * 1000;
7
7
  const DAY = 24 * 60 * MINUTE;
8
8
 
9
9
  // OS locale
10
- const systemLocale: string | undefined = I18nManager.getConstants().localeIdentifier
11
- ?.replace(/_/g, '-')
10
+ const systemLocale: string | undefined = I18nManager.getConstants()
11
+ .localeIdentifier?.replace(/_/g, '-')
12
12
  .split(/[#@]/)[0]
13
13
  .replace(/-$/, '');
14
14
 
@@ -1,16 +1,14 @@
1
- import { Claim, ClaimValue, DataTypeEnum, HistoryListItem, ProofInputClaim } from '@procivis/react-native-one-core';
1
+ import { HistoryListItemBindingDto } from '@procivis/react-native-one-core';
2
2
  import moment, { Moment } from 'moment';
3
3
 
4
- import { nonEmptyFilter } from './filtering';
5
-
6
4
  export interface HistoryGroupByDaySection {
7
- data: HistoryListItem[];
5
+ data: HistoryListItemBindingDto[];
8
6
  date: Moment;
9
7
  firstYearEntry: boolean;
10
8
  }
11
9
 
12
- export const groupEntriesByDay = (entries: HistoryListItem[]) => {
13
- const groupedEntries = entries.reduce((result: HistoryGroupByDaySection[], entry: HistoryListItem) => {
10
+ export const groupEntriesByDay = (entries: HistoryListItemBindingDto[]) => {
11
+ const groupedEntries = entries.reduce((result: HistoryGroupByDaySection[], entry: HistoryListItemBindingDto) => {
14
12
  const entryDate = moment(entry.createdDate);
15
13
 
16
14
  const matchingEntry = result.find(({ date }) => date.isSame(entryDate, 'day'));
@@ -30,42 +28,3 @@ export const groupEntriesByDay = (entries: HistoryListItem[]) => {
30
28
  return item;
31
29
  });
32
30
  };
33
-
34
- export const claimValueFromProofInputClaim = ({ schema, value }: ProofInputClaim): ClaimValue | undefined => {
35
- if (!value) {
36
- return undefined;
37
- }
38
-
39
- if (Array.isArray(value)) {
40
- const values = value.map(claimFromProofInputClaim).filter(nonEmptyFilter);
41
- return schema.dataType === (DataTypeEnum.Object as string)
42
- ? {
43
- array: schema.array,
44
- dataType: DataTypeEnum.Object,
45
- value: values,
46
- }
47
- : {
48
- array: true,
49
- dataType: schema.dataType,
50
- value: values,
51
- };
52
- }
53
-
54
- return {
55
- array: false,
56
- dataType: schema.dataType,
57
- value,
58
- };
59
- };
60
-
61
- export const claimFromProofInputClaim = (input: ProofInputClaim): Claim | undefined => {
62
- const value = claimValueFromProofInputClaim(input);
63
- if (!value) {
64
- return undefined;
65
- }
66
- return {
67
- ...value,
68
- id: input.schema.id,
69
- key: input.schema.key,
70
- };
71
- };
@@ -14,11 +14,11 @@ jest.mock('../core/core-config', () => ({
14
14
  }));
15
15
 
16
16
  jest.mock('@react-native-community/netinfo', () => ({
17
- addEventListener: () => { },
17
+ addEventListener: () => {},
18
18
  }));
19
19
 
20
20
  jest.mock('react-native-bluetooth-state-manager', () => ({
21
- onStateChange: () => { },
21
+ onStateChange: () => {},
22
22
  }));
23
23
 
24
24
  describe('getInvitationUrlTransports', () => {
@@ -1,4 +1,4 @@
1
- import { IdentifierStateEnum, IdentifierTypeEnum } from '@procivis/react-native-one-core';
1
+ import { IdentifierStateBindingEnum, IdentifierTypeBindingEnum } from '@procivis/react-native-one-core';
2
2
  import { useCallback } from 'react';
3
3
  import { useMutation, useQuery, useQueryClient } from 'react-query';
4
4
 
@@ -80,12 +80,12 @@ export const useBackupFinalizeImportProcedure = ({ generateHwKey, generateSwKey
80
80
  // update wallet identifier references
81
81
  let swIdentifierId: string | undefined;
82
82
  if (generateSwKey) {
83
- const identifiers = await core.getIdentifiers({
84
- states: [IdentifierStateEnum.ACTIVE],
83
+ const identifiers = await core.listIdentifiers({
84
+ states: [IdentifierStateBindingEnum.ACTIVE],
85
85
  organisationId,
86
86
  page: 0,
87
87
  pageSize: 1,
88
- types: [IdentifierTypeEnum.DID],
88
+ types: [IdentifierTypeBindingEnum.DID],
89
89
  isRemote: false,
90
90
  });
91
91
  swIdentifierId = identifiers.values.find((identifier) => identifier.name.startsWith(SW_DID_NAME_PREFIX))?.id;
@@ -1,4 +1,4 @@
1
- import { CacheType } from '@procivis/react-native-one-core';
1
+ import { CacheTypeBindingDto } from '@procivis/react-native-one-core';
2
2
  import { useMutation, useQueryClient } from 'react-query';
3
3
 
4
4
  import { useONECore } from './core-context';
@@ -8,17 +8,17 @@ import { REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY, TRUST_ENTITY_DETAIL_QUERY_KEY } f
8
8
  const CREDENTIAL_QUERY_KEYS = [CREDENTIAL_LIST_QUERY_KEY, CREDENTIAL_LIST_PAGED_QUERY_KEY, CREDENTIAL_DETAIL_QUERY_KEY];
9
9
  const TRUST_ENTITY_QUERY_KEYS = [TRUST_ENTITY_DETAIL_QUERY_KEY, REMOTE_TRUST_ENTITY_DETAIL_QUERY_KEY];
10
10
 
11
- // Map each CacheType to the query keys that should be invalidated when that cache is cleared.
12
- const cacheTypeToQueryKeys: Record<CacheType, string[]> = {
13
- [CacheType.DID_DOCUMENT]: CREDENTIAL_QUERY_KEYS,
14
- [CacheType.JSON_LD_CONTEXT]: CREDENTIAL_QUERY_KEYS,
15
- [CacheType.STATUS_LIST_CREDENTIAL]: CREDENTIAL_QUERY_KEYS,
16
- [CacheType.VCT_METADATA]: CREDENTIAL_QUERY_KEYS,
17
- [CacheType.JSON_SCHEMA]: CREDENTIAL_QUERY_KEYS,
18
- [CacheType.TRUST_LIST]: [...TRUST_ENTITY_QUERY_KEYS, ...CREDENTIAL_QUERY_KEYS],
19
- [CacheType.X509_CRL]: CREDENTIAL_QUERY_KEYS,
20
- [CacheType.ANDROID_ATTESTATION_CRL]: CREDENTIAL_QUERY_KEYS,
21
- [CacheType.OPEN_ID_METADATA]: CREDENTIAL_QUERY_KEYS,
11
+ // Map each CacheTypeBindingDto to the query keys that should be invalidated when that cache is cleared.
12
+ const cacheTypeToQueryKeys: Record<CacheTypeBindingDto, string[]> = {
13
+ [CacheTypeBindingDto.DID_DOCUMENT]: CREDENTIAL_QUERY_KEYS,
14
+ [CacheTypeBindingDto.JSON_LD_CONTEXT]: CREDENTIAL_QUERY_KEYS,
15
+ [CacheTypeBindingDto.STATUS_LIST_CREDENTIAL]: CREDENTIAL_QUERY_KEYS,
16
+ [CacheTypeBindingDto.VCT_METADATA]: CREDENTIAL_QUERY_KEYS,
17
+ [CacheTypeBindingDto.JSON_SCHEMA]: CREDENTIAL_QUERY_KEYS,
18
+ [CacheTypeBindingDto.TRUST_LIST]: [...TRUST_ENTITY_QUERY_KEYS, ...CREDENTIAL_QUERY_KEYS],
19
+ [CacheTypeBindingDto.X509_CRL]: CREDENTIAL_QUERY_KEYS,
20
+ [CacheTypeBindingDto.ANDROID_ATTESTATION_CRL]: CREDENTIAL_QUERY_KEYS,
21
+ [CacheTypeBindingDto.OPEN_ID_METADATA]: CREDENTIAL_QUERY_KEYS,
22
22
  };
23
23
 
24
24
  export const useCacheClear = () => {
@@ -26,7 +26,7 @@ export const useCacheClear = () => {
26
26
  const { core } = useONECore();
27
27
 
28
28
  return useMutation(
29
- async (cacheTypes: CacheType[]) => {
29
+ async (cacheTypes: CacheTypeBindingDto[]) => {
30
30
  await core.deleteCache(cacheTypes);
31
31
  return cacheTypes;
32
32
  },
@@ -29,19 +29,19 @@ const defaultContextValue: ContextValue = {
29
29
  export type ONECoreContextProviderProps = {
30
30
  config?: Record<string, unknown>;
31
31
  organisationId?: string;
32
- publisherReference: string;
32
+ publisherReference?: string;
33
33
  };
34
34
 
35
35
  const ONECoreContext = createContext<ContextValue>(defaultContextValue);
36
36
 
37
37
  export const ONECoreContextProvider: FC<PropsWithChildren<ONECoreContextProviderProps>> = ({
38
38
  children,
39
- organisationId = '11111111-2222-3333-a444-ffffffffffff',
39
+ organisationId = defaultContextValue.organisationId,
40
40
  publisherReference,
41
41
  config,
42
42
  }) => {
43
43
  const [core, setCore] = useState<ONECore>();
44
- const createTrustAnchor = useCreateTrustAnchor(publisherReference);
44
+ const createTrustAnchor = useCreateTrustAnchor();
45
45
 
46
46
  const initialize = useCallback(
47
47
  async (force?: boolean) => {
@@ -77,7 +77,7 @@ export const ONECoreContextProvider: FC<PropsWithChildren<ONECoreContextProvider
77
77
  );
78
78
 
79
79
  useEffect(() => {
80
- if (!core) {
80
+ if (!core || !publisherReference) {
81
81
  return;
82
82
  }
83
83
 
@@ -89,11 +89,11 @@ export const ONECoreContextProvider: FC<PropsWithChildren<ONECoreContextProvider
89
89
  );
90
90
 
91
91
  if (trustManagementEnabled) {
92
- createTrustAnchor(core).catch(() => {});
92
+ createTrustAnchor(core, publisherReference).catch(() => {});
93
93
  }
94
94
  })
95
95
  .catch(() => {});
96
- }, [core, createTrustAnchor]);
96
+ }, [core, createTrustAnchor, publisherReference]);
97
97
 
98
98
  const contextValue = useMemo(
99
99
  () => ({
@@ -1,4 +1,7 @@
1
- import { CredentialSchemaListQuery, ImportCredentialSchemaRequestSchema } from '@procivis/react-native-one-core';
1
+ import {
2
+ CredentialSchemaListQueryBindingDto,
3
+ ImportCredentialSchemaRequestSchemaBindingDto,
4
+ } from '@procivis/react-native-one-core';
2
5
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
3
6
 
4
7
  import { getQueryKeyFromCredentialSchemaListQueryParams } from '../../parsers/query';
@@ -12,7 +15,7 @@ export const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';
12
15
  export const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';
13
16
  export const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';
14
17
 
15
- export const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQuery>) => {
18
+ export const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQueryBindingDto>) => {
16
19
  const { core, organisationId } = useONECore();
17
20
 
18
21
  return useInfiniteQuery(
@@ -43,7 +46,7 @@ export const useCredentialSchemaPreview = (url: string) => {
43
46
  if (!response.ok) {
44
47
  throw response.originalError;
45
48
  }
46
- return response.data as ImportCredentialSchemaRequestSchema;
49
+ return response.data as ImportCredentialSchemaRequestSchemaBindingDto;
47
50
  }),
48
51
  {
49
52
  keepPreviousData: true,
@@ -56,7 +59,7 @@ export const useCredentialSchemaAccept = () => {
56
59
  const { core, organisationId } = useONECore();
57
60
 
58
61
  return useMutation(
59
- async (schema: ImportCredentialSchemaRequestSchema) =>
62
+ async (schema: ImportCredentialSchemaRequestSchemaBindingDto) =>
60
63
  core.importCredentialSchema({
61
64
  organisationId,
62
65
  schema,
@@ -1,9 +1,9 @@
1
1
  import {
2
- CredentialListQuery,
3
- CredentialStateEnum,
4
- HandleInvitationRequest,
5
- InitiateIssuanceRequest,
6
- InvitationResult,
2
+ CredentialListQueryBindingDto,
3
+ CredentialStateBindingEnum,
4
+ HandleInvitationRequestBindingDto,
5
+ HandleInvitationResponseBindingEnum,
6
+ InitiateIssuanceRequestBindingDto,
7
7
  OneError,
8
8
  } from '@procivis/react-native-one-core';
9
9
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
@@ -20,7 +20,7 @@ export const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';
20
20
  export const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';
21
21
  export const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';
22
22
 
23
- export const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {
23
+ export const useCredentials = (queryParams?: Partial<CredentialListQueryBindingDto>) => {
24
24
  const { core, organisationId } = useONECore();
25
25
 
26
26
  return useQuery(
@@ -31,7 +31,11 @@ export const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {
31
31
  page: 0,
32
32
  // TODO: workaround pagination for now, until it's supported by UI
33
33
  pageSize: 10000,
34
- states: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],
34
+ states: [
35
+ CredentialStateBindingEnum.ACCEPTED,
36
+ CredentialStateBindingEnum.SUSPENDED,
37
+ CredentialStateBindingEnum.REVOKED,
38
+ ],
35
39
  ...queryParams,
36
40
  });
37
41
  return values;
@@ -42,7 +46,7 @@ export const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {
42
46
  );
43
47
  };
44
48
 
45
- export const usePagedCredentials = (queryParams?: Partial<CredentialListQuery>) => {
49
+ export const usePagedCredentials = (queryParams?: Partial<CredentialListQueryBindingDto>) => {
46
50
  const { core, organisationId } = useONECore();
47
51
 
48
52
  return useInfiniteQuery(
@@ -56,7 +60,11 @@ export const usePagedCredentials = (queryParams?: Partial<CredentialListQuery>)
56
60
  organisationId,
57
61
  page: pageParam,
58
62
  pageSize: PAGE_SIZE,
59
- states: [CredentialStateEnum.ACCEPTED, CredentialStateEnum.SUSPENDED, CredentialStateEnum.REVOKED],
63
+ states: [
64
+ CredentialStateBindingEnum.ACCEPTED,
65
+ CredentialStateBindingEnum.SUSPENDED,
66
+ CredentialStateBindingEnum.REVOKED,
67
+ ],
60
68
  ...queryParams,
61
69
  }),
62
70
  {
@@ -84,11 +92,11 @@ export const useInvitationHandler = () => {
84
92
  const { core, organisationId } = useONECore();
85
93
 
86
94
  return useMutation(
87
- async (request: Omit<HandleInvitationRequest, 'organisationId'>) =>
95
+ async (request: Omit<HandleInvitationRequestBindingDto, 'organisationId'>) =>
88
96
  core.handleInvitation({ organisationId, ...request }),
89
97
  {
90
- onSuccess: async (result: InvitationResult) => {
91
- if ('proofId' in result) {
98
+ onSuccess: async (result: HandleInvitationResponseBindingEnum) => {
99
+ if (result.type_ === 'PROOF_REQUEST') {
92
100
  await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);
93
101
  } else {
94
102
  await queryClient.invalidateQueries(CREDENTIAL_LIST_QUERY_KEY);
@@ -189,7 +197,7 @@ export const useInitiateIssuance = () => {
189
197
  const { core, organisationId } = useONECore();
190
198
 
191
199
  return useMutation(
192
- async (request: Omit<InitiateIssuanceRequest, 'organisationId'>) =>
200
+ async (request: Omit<InitiateIssuanceRequestBindingDto, 'organisationId'>) =>
193
201
  core.initiateIssuance({ organisationId, ...request }),
194
202
  {
195
203
  onSuccess: async () => {
@@ -1,4 +1,4 @@
1
- import { DidListQuery, DidTypeEnum } from '@procivis/react-native-one-core';
1
+ import { DidListQueryBindingDto, DidTypeBindingEnum } from '@procivis/react-native-one-core';
2
2
  import { useQuery } from 'react-query';
3
3
 
4
4
  import { getQueryKeyFromDidListQueryParams } from '../../parsers/query';
@@ -7,7 +7,7 @@ import { useONECore } from './core-context';
7
7
  const PAGE_SIZE = 20;
8
8
  export const DID_LIST_QUERY_KEY = 'did-list';
9
9
 
10
- export const useDids = (queryParams?: Partial<DidListQuery>) => {
10
+ export const useDids = (queryParams?: Partial<DidListQueryBindingDto>) => {
11
11
  const { core, organisationId } = useONECore();
12
12
 
13
13
  return useQuery(
@@ -18,7 +18,7 @@ export const useDids = (queryParams?: Partial<DidListQuery>) => {
18
18
  organisationId,
19
19
  page: pageParam,
20
20
  pageSize: PAGE_SIZE,
21
- type: DidTypeEnum.LOCAL,
21
+ type: DidTypeBindingEnum.LOCAL,
22
22
  ...queryParams,
23
23
  });
24
24
 
@@ -1,4 +1,4 @@
1
- import { HistoryListQuery } from '@procivis/react-native-one-core';
1
+ import { HistoryListQueryBindingDto } from '@procivis/react-native-one-core';
2
2
  import { useInfiniteQuery } from 'react-query';
3
3
 
4
4
  import { getQueryKeyFromHistoryListQueryParams } from '../../parsers/query';
@@ -7,13 +7,13 @@ import { useONECore } from './core-context';
7
7
  const PAGE_SIZE = 20;
8
8
  export const HISTORY_LIST_QUERY_KEY = 'history-list';
9
9
 
10
- export const useHistory = (queryParams?: Partial<HistoryListQuery>) => {
10
+ export const useHistory = (queryParams?: Partial<HistoryListQueryBindingDto>) => {
11
11
  const { core, organisationId } = useONECore();
12
12
 
13
13
  return useInfiniteQuery(
14
14
  [HISTORY_LIST_QUERY_KEY, ...getQueryKeyFromHistoryListQueryParams(queryParams)],
15
15
  async ({ pageParam = 0 }) => {
16
- const historyPage = await core.getHistory({
16
+ const historyPage = await core.getHistoryList({
17
17
  organisationId,
18
18
  page: pageParam,
19
19
  pageSize: PAGE_SIZE,
@@ -1,4 +1,8 @@
1
- import { IdentifierListQuery, IdentifierStateEnum, IdentifierTypeEnum } from '@procivis/react-native-one-core';
1
+ import {
2
+ IdentifierListQueryBindingDto,
3
+ IdentifierStateBindingEnum,
4
+ IdentifierTypeBindingEnum,
5
+ } from '@procivis/react-native-one-core';
2
6
  import { useQuery } from 'react-query';
3
7
 
4
8
  import { getQueryKeyFromIdentifierListQueryParams } from '../../parsers';
@@ -21,17 +25,17 @@ export const useIdentifierDetails = (identifierId: string | undefined) => {
21
25
  );
22
26
  };
23
27
 
24
- export const useIdentifiers = (identifierFilter?: Partial<IdentifierListQuery>) => {
28
+ export const useIdentifiers = (identifierFilter?: Partial<IdentifierListQueryBindingDto>) => {
25
29
  const { core, organisationId } = useONECore();
26
30
 
27
31
  return useQuery(
28
32
  [IDENTIFIER_LIST_QUERY_KEY, ...getQueryKeyFromIdentifierListQueryParams(identifierFilter)],
29
33
  ({ pageParam = 0 }) =>
30
- core.getIdentifiers({
31
- types: [IdentifierTypeEnum.DID],
34
+ core.listIdentifiers({
35
+ types: [IdentifierTypeBindingEnum.DID],
32
36
  isRemote: false,
33
37
  page: pageParam,
34
- states: [IdentifierStateEnum.ACTIVE],
38
+ states: [IdentifierStateBindingEnum.ACTIVE],
35
39
  organisationId: organisationId,
36
40
  pageSize: PAGE_SIZE,
37
41
  ...identifierFilter,