@procivis/one-react-native-components 0.3.106 → 0.3.115

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 (235) 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 +14 -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/v1/select-credential.js.map +1 -1
  19. package/lib/commonjs/components/proof-request/v1/share-credential.js +1 -1
  20. package/lib/commonjs/components/proof-request/v1/share-credential.js.map +1 -1
  21. package/lib/commonjs/components/proof-request/v2/select-credential-v2.js.map +1 -1
  22. package/lib/commonjs/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  23. package/lib/commonjs/components/proof-request/v2/share-credential-v2.js.map +1 -1
  24. package/lib/commonjs/ui-components/control/checkbox.js +2 -1
  25. package/lib/commonjs/ui-components/control/checkbox.js.map +1 -1
  26. package/lib/commonjs/ui-components/control/switch.js +2 -2
  27. package/lib/commonjs/ui-components/control/switch.js.map +1 -1
  28. package/lib/commonjs/ui-components/history/history-section-header.js +1 -1
  29. package/lib/commonjs/ui-components/history/history-section-header.js.map +1 -1
  30. package/lib/commonjs/ui-components/history/history-section-list-item.js +1 -1
  31. package/lib/commonjs/ui-components/history/history-section-list-item.js.map +1 -1
  32. package/lib/commonjs/ui-components/screens/nerd-mode-screen.js.map +1 -1
  33. package/lib/commonjs/utils/history.js.map +1 -1
  34. package/lib/commonjs/utils/hooks/core/backup.js +2 -2
  35. package/lib/commonjs/utils/hooks/core/backup.js.map +1 -1
  36. package/lib/commonjs/utils/hooks/core/cache.js +10 -10
  37. package/lib/commonjs/utils/hooks/core/cache.js.map +1 -1
  38. package/lib/commonjs/utils/hooks/core/core-config.js.map +1 -1
  39. package/lib/commonjs/utils/hooks/core/core-init.js +4 -2
  40. package/lib/commonjs/utils/hooks/core/core-init.js.map +1 -1
  41. package/lib/commonjs/utils/hooks/core/credential-schemas.js +1 -1
  42. package/lib/commonjs/utils/hooks/core/credential-schemas.js.map +1 -1
  43. package/lib/commonjs/utils/hooks/core/credentials.js +4 -4
  44. package/lib/commonjs/utils/hooks/core/credentials.js.map +1 -1
  45. package/lib/commonjs/utils/hooks/core/dids.js +2 -2
  46. package/lib/commonjs/utils/hooks/core/dids.js.map +1 -1
  47. package/lib/commonjs/utils/hooks/core/history.js +1 -1
  48. package/lib/commonjs/utils/hooks/core/history.js.map +1 -1
  49. package/lib/commonjs/utils/hooks/core/identifiers.js +2 -2
  50. package/lib/commonjs/utils/hooks/core/identifiers.js.map +1 -1
  51. package/lib/commonjs/utils/hooks/core/index.js +22 -0
  52. package/lib/commonjs/utils/hooks/core/index.js.map +1 -1
  53. package/lib/commonjs/utils/hooks/core/proof-schemas.js +1 -1
  54. package/lib/commonjs/utils/hooks/core/proof-schemas.js.map +1 -1
  55. package/lib/commonjs/utils/hooks/core/proofs.js +11 -11
  56. package/lib/commonjs/utils/hooks/core/proofs.js.map +1 -1
  57. package/lib/commonjs/utils/hooks/core/trust-entity.js +1 -1
  58. package/lib/commonjs/utils/hooks/core/trust-entity.js.map +1 -1
  59. package/lib/commonjs/utils/hooks/core/trust-list.js +32 -0
  60. package/lib/commonjs/utils/hooks/core/trust-list.js.map +1 -0
  61. package/lib/commonjs/utils/hooks/core/verifier-instance.js +52 -0
  62. package/lib/commonjs/utils/hooks/core/verifier-instance.js.map +1 -0
  63. package/lib/commonjs/utils/hooks/core/wallet-unit.js +38 -3
  64. package/lib/commonjs/utils/hooks/core/wallet-unit.js.map +1 -1
  65. package/lib/commonjs/utils/hooks/revocation/credential-status.js +1 -1
  66. package/lib/commonjs/utils/hooks/revocation/credential-status.js.map +1 -1
  67. package/lib/commonjs/utils/parsers/credential-images.js +3 -3
  68. package/lib/commonjs/utils/parsers/credential-images.js.map +1 -1
  69. package/lib/commonjs/utils/parsers/credential-sharing-v2.js.map +1 -1
  70. package/lib/commonjs/utils/parsers/credential-sharing.js.map +1 -1
  71. package/lib/commonjs/utils/parsers/credential.js +9 -9
  72. package/lib/commonjs/utils/parsers/credential.js.map +1 -1
  73. package/lib/commonjs/utils/parsers/query.js +2 -2
  74. package/lib/commonjs/utils/parsers/query.js.map +1 -1
  75. package/lib/module/components/backup/preview-credentials.js.map +1 -1
  76. package/lib/module/components/credential/credential.js.map +1 -1
  77. package/lib/module/components/entity/EntityButtons.js.map +1 -1
  78. package/lib/module/components/entity/entity-attributes.js.map +1 -1
  79. package/lib/module/components/entity/entity-details-with-buttons.js +3 -3
  80. package/lib/module/components/entity/entity-details-with-buttons.js.map +1 -1
  81. package/lib/module/components/entity/entity-details.js +4 -4
  82. package/lib/module/components/entity/entity-details.js.map +1 -1
  83. package/lib/module/components/history/history-details-screen.js +11 -11
  84. package/lib/module/components/history/history-details-screen.js.map +1 -1
  85. package/lib/module/components/history/history-list-item-icon.js +15 -9
  86. package/lib/module/components/history/history-list-item-icon.js.map +1 -1
  87. package/lib/module/components/history/history-list-item.js.map +1 -1
  88. package/lib/module/components/history/history-list-screen.js.map +1 -1
  89. package/lib/module/components/history/history-list-section-header.js +1 -1
  90. package/lib/module/components/history/history-list-section-header.js.map +1 -1
  91. package/lib/module/components/history/history-list.js.map +1 -1
  92. package/lib/module/components/proof-request/v1/select-credential.js.map +1 -1
  93. package/lib/module/components/proof-request/v1/share-credential.js +2 -2
  94. package/lib/module/components/proof-request/v1/share-credential.js.map +1 -1
  95. package/lib/module/components/proof-request/v2/select-credential-v2.js.map +1 -1
  96. package/lib/module/components/proof-request/v2/share-credential-v2-group.js.map +1 -1
  97. package/lib/module/components/proof-request/v2/share-credential-v2.js.map +1 -1
  98. package/lib/module/ui-components/control/checkbox.js +2 -1
  99. package/lib/module/ui-components/control/checkbox.js.map +1 -1
  100. package/lib/module/ui-components/control/switch.js +3 -3
  101. package/lib/module/ui-components/control/switch.js.map +1 -1
  102. package/lib/module/ui-components/history/history-section-header.js +1 -1
  103. package/lib/module/ui-components/history/history-section-header.js.map +1 -1
  104. package/lib/module/ui-components/history/history-section-list-item.js +1 -1
  105. package/lib/module/ui-components/history/history-section-list-item.js.map +1 -1
  106. package/lib/module/ui-components/screens/nerd-mode-screen.js.map +1 -1
  107. package/lib/module/utils/history.js.map +1 -1
  108. package/lib/module/utils/hooks/core/backup.js +3 -3
  109. package/lib/module/utils/hooks/core/backup.js.map +1 -1
  110. package/lib/module/utils/hooks/core/cache.js +11 -11
  111. package/lib/module/utils/hooks/core/cache.js.map +1 -1
  112. package/lib/module/utils/hooks/core/core-config.js.map +1 -1
  113. package/lib/module/utils/hooks/core/core-init.js +4 -2
  114. package/lib/module/utils/hooks/core/core-init.js.map +1 -1
  115. package/lib/module/utils/hooks/core/credential-schemas.js +1 -1
  116. package/lib/module/utils/hooks/core/credential-schemas.js.map +1 -1
  117. package/lib/module/utils/hooks/core/credentials.js +5 -5
  118. package/lib/module/utils/hooks/core/credentials.js.map +1 -1
  119. package/lib/module/utils/hooks/core/dids.js +3 -3
  120. package/lib/module/utils/hooks/core/dids.js.map +1 -1
  121. package/lib/module/utils/hooks/core/history.js +1 -1
  122. package/lib/module/utils/hooks/core/history.js.map +1 -1
  123. package/lib/module/utils/hooks/core/identifiers.js +3 -3
  124. package/lib/module/utils/hooks/core/identifiers.js.map +1 -1
  125. package/lib/module/utils/hooks/core/index.js +2 -0
  126. package/lib/module/utils/hooks/core/index.js.map +1 -1
  127. package/lib/module/utils/hooks/core/proof-schemas.js +1 -1
  128. package/lib/module/utils/hooks/core/proof-schemas.js.map +1 -1
  129. package/lib/module/utils/hooks/core/proofs.js +12 -12
  130. package/lib/module/utils/hooks/core/proofs.js.map +1 -1
  131. package/lib/module/utils/hooks/core/trust-entity.js +2 -2
  132. package/lib/module/utils/hooks/core/trust-entity.js.map +1 -1
  133. package/lib/module/utils/hooks/core/trust-list.js +24 -0
  134. package/lib/module/utils/hooks/core/trust-list.js.map +1 -0
  135. package/lib/module/utils/hooks/core/verifier-instance.js +43 -0
  136. package/lib/module/utils/hooks/core/verifier-instance.js.map +1 -0
  137. package/lib/module/utils/hooks/core/wallet-unit.js +36 -3
  138. package/lib/module/utils/hooks/core/wallet-unit.js.map +1 -1
  139. package/lib/module/utils/hooks/revocation/credential-status.js +2 -2
  140. package/lib/module/utils/hooks/revocation/credential-status.js.map +1 -1
  141. package/lib/module/utils/parsers/credential-images.js +4 -4
  142. package/lib/module/utils/parsers/credential-images.js.map +1 -1
  143. package/lib/module/utils/parsers/credential-sharing-v2.js.map +1 -1
  144. package/lib/module/utils/parsers/credential-sharing.js.map +1 -1
  145. package/lib/module/utils/parsers/credential.js +10 -10
  146. package/lib/module/utils/parsers/credential.js.map +1 -1
  147. package/lib/module/utils/parsers/query.js +2 -2
  148. package/lib/module/utils/parsers/query.js.map +1 -1
  149. package/lib/typescript/components/backup/preview-credentials.d.ts +2 -2
  150. package/lib/typescript/components/credential/credential.d.ts +2 -2
  151. package/lib/typescript/components/entity/EntityButtons.d.ts +2 -2
  152. package/lib/typescript/components/entity/entity-attributes.d.ts +2 -2
  153. package/lib/typescript/components/entity/entity-details-with-buttons.d.ts +3 -3
  154. package/lib/typescript/components/entity/entity-details.d.ts +5 -5
  155. package/lib/typescript/components/history/history-details-screen.d.ts +2 -2
  156. package/lib/typescript/components/history/history-list-item-icon.d.ts +3 -3
  157. package/lib/typescript/components/history/history-list-item.d.ts +5 -5
  158. package/lib/typescript/components/history/history-list-screen.d.ts +4 -4
  159. package/lib/typescript/components/history/history-list.d.ts +5 -5
  160. package/lib/typescript/components/proof-request/v1/select-credential.d.ts +2 -2
  161. package/lib/typescript/components/proof-request/v1/share-credential.d.ts +6 -6
  162. package/lib/typescript/components/proof-request/v2/select-credential-v2.d.ts +3 -3
  163. package/lib/typescript/components/proof-request/v2/share-credential-v2-group.d.ts +4 -4
  164. package/lib/typescript/components/proof-request/v2/share-credential-v2.d.ts +5 -5
  165. package/lib/typescript/ui-components/control/checkbox.d.ts +1 -1
  166. package/lib/typescript/ui-components/screens/nerd-mode-screen.d.ts +2 -2
  167. package/lib/typescript/utils/history.d.ts +3 -3
  168. package/lib/typescript/utils/hooks/core/backup.d.ts +3 -3
  169. package/lib/typescript/utils/hooks/core/cache.d.ts +2 -2
  170. package/lib/typescript/utils/hooks/core/core-config.d.ts +4 -4
  171. package/lib/typescript/utils/hooks/core/core-init.d.ts +1 -1
  172. package/lib/typescript/utils/hooks/core/credential-schemas.d.ts +6 -6
  173. package/lib/typescript/utils/hooks/core/credentials.d.ts +9 -16
  174. package/lib/typescript/utils/hooks/core/dids.d.ts +2 -2
  175. package/lib/typescript/utils/hooks/core/history.d.ts +2 -2
  176. package/lib/typescript/utils/hooks/core/identifiers.d.ts +3 -3
  177. package/lib/typescript/utils/hooks/core/index.d.ts +2 -0
  178. package/lib/typescript/utils/hooks/core/proof-schemas.d.ts +7 -7
  179. package/lib/typescript/utils/hooks/core/proofs.d.ts +9 -9
  180. package/lib/typescript/utils/hooks/core/trust-entity.d.ts +5 -5
  181. package/lib/typescript/utils/hooks/core/trust-list.d.ts +5 -0
  182. package/lib/typescript/utils/hooks/core/verifier-instance.d.ts +8 -0
  183. package/lib/typescript/utils/hooks/core/wallet-unit.d.ts +11 -5
  184. package/lib/typescript/utils/parsers/credential-images.d.ts +2 -2
  185. package/lib/typescript/utils/parsers/credential-sharing-v2.d.ts +7 -7
  186. package/lib/typescript/utils/parsers/credential-sharing.d.ts +8 -8
  187. package/lib/typescript/utils/parsers/credential.d.ts +11 -11
  188. package/lib/typescript/utils/parsers/query.d.ts +8 -8
  189. package/package.json +3 -3
  190. package/src/components/backup/preview-credentials.tsx +2 -2
  191. package/src/components/credential/credential.tsx +2 -2
  192. package/src/components/entity/EntityButtons.tsx +2 -2
  193. package/src/components/entity/entity-attributes.tsx +2 -2
  194. package/src/components/entity/entity-details-with-buttons.tsx +6 -11
  195. package/src/components/entity/entity-details.tsx +16 -17
  196. package/src/components/history/history-details-screen.tsx +13 -13
  197. package/src/components/history/history-list-item-icon.tsx +17 -15
  198. package/src/components/history/history-list-item.tsx +5 -9
  199. package/src/components/history/history-list-screen.tsx +4 -4
  200. package/src/components/history/history-list-section-header.tsx +1 -1
  201. package/src/components/history/history-list.tsx +6 -6
  202. package/src/components/proof-request/v1/select-credential.tsx +2 -2
  203. package/src/components/proof-request/v1/share-credential.tsx +11 -13
  204. package/src/components/proof-request/v2/select-credential-v2.tsx +3 -6
  205. package/src/components/proof-request/v2/share-credential-v2-group.tsx +10 -10
  206. package/src/components/proof-request/v2/share-credential-v2.tsx +9 -9
  207. package/src/ui-components/control/checkbox.tsx +13 -11
  208. package/src/ui-components/control/switch.tsx +23 -21
  209. package/src/ui-components/detail/detail.stories.tsx +1 -1
  210. package/src/ui-components/history/history-section-header.tsx +1 -1
  211. package/src/ui-components/history/history-section-list-item.tsx +1 -1
  212. package/src/ui-components/screens/nerd-mode-screen.tsx +2 -2
  213. package/src/utils/history.ts +4 -4
  214. package/src/utils/hooks/core/backup.ts +3 -3
  215. package/src/utils/hooks/core/cache.ts +13 -13
  216. package/src/utils/hooks/core/core-config.ts +3 -3
  217. package/src/utils/hooks/core/core-init.ts +3 -4
  218. package/src/utils/hooks/core/credential-schemas.ts +5 -8
  219. package/src/utils/hooks/core/credentials.ts +16 -32
  220. package/src/utils/hooks/core/dids.ts +4 -4
  221. package/src/utils/hooks/core/history.ts +3 -3
  222. package/src/utils/hooks/core/identifiers.ts +4 -8
  223. package/src/utils/hooks/core/index.ts +2 -0
  224. package/src/utils/hooks/core/proof-schemas.ts +16 -22
  225. package/src/utils/hooks/core/proofs.ts +33 -34
  226. package/src/utils/hooks/core/trust-entity.ts +8 -10
  227. package/src/utils/hooks/core/trust-list.ts +29 -0
  228. package/src/utils/hooks/core/verifier-instance.ts +54 -0
  229. package/src/utils/hooks/core/wallet-unit.ts +47 -14
  230. package/src/utils/hooks/revocation/credential-status.ts +2 -2
  231. package/src/utils/parsers/credential-images.tsx +6 -10
  232. package/src/utils/parsers/credential-sharing-v2.tsx +20 -22
  233. package/src/utils/parsers/credential-sharing.tsx +28 -28
  234. package/src/utils/parsers/credential.ts +43 -43
  235. package/src/utils/parsers/query.ts +22 -16
@@ -1,8 +1,8 @@
1
1
  import {
2
- CredentialListItemBindingDto,
3
- PresentationDefinitionV2ClaimBindingDto,
4
- PresentationDefinitionV2ResponseBindingDto,
5
- PresentationSubmitV2CredentialRequestBindingDto,
2
+ CredentialListItem,
3
+ PresentationDefinitionV2,
4
+ PresentationDefinitionV2Claim,
5
+ PresentationSubmitV2CredentialRequest,
6
6
  } from '@procivis/react-native-one-core';
7
7
  import React, { FC, useCallback, useMemo } from 'react';
8
8
  import { ImageSourcePropType, StyleProp, StyleSheet, ViewStyle } from 'react-native';
@@ -24,7 +24,7 @@ import { GroupedShareCredentialV2Padding, ShareCredentialV2 } from './share-cred
24
24
 
25
25
  export type CredentialQuerySelection = Record<
26
26
  string,
27
- PresentationSubmitV2CredentialRequestBindingDto | PresentationSubmitV2CredentialRequestBindingDto[]
27
+ PresentationSubmitV2CredentialRequest | PresentationSubmitV2CredentialRequest[]
28
28
  >;
29
29
 
30
30
  export type ShareCredentialGroupLabels = ShareCredentialLabels & {
@@ -40,11 +40,11 @@ export type ShareCredentialV2GroupProps = {
40
40
  onSelectField: (
41
41
  requestCredentialId: string,
42
42
  ) => (
43
- credentialId: CredentialListItemBindingDto['id'],
44
- fieldPath: PresentationDefinitionV2ClaimBindingDto['path'],
43
+ credentialId: CredentialListItem['id'],
44
+ fieldPath: PresentationDefinitionV2Claim['path'],
45
45
  selected: boolean,
46
46
  ) => void;
47
- presentationDefinition: PresentationDefinitionV2ResponseBindingDto;
47
+ presentationDefinition: PresentationDefinitionV2;
48
48
  requestGroup: string[];
49
49
  selected?: boolean;
50
50
  selectedCredentials?: CredentialQuerySelection;
@@ -61,7 +61,7 @@ const multipleCredentialsSelected = (
61
61
  selectedCredentials &&
62
62
  selectedCredentials[credentialRequestId] &&
63
63
  Array.isArray(selectedCredentials[credentialRequestId]) &&
64
- (selectedCredentials[credentialRequestId] as PresentationSubmitV2CredentialRequestBindingDto[]).length > 1
64
+ (selectedCredentials[credentialRequestId] as PresentationSubmitV2CredentialRequest[]).length > 1
65
65
  );
66
66
  };
67
67
 
@@ -123,7 +123,7 @@ export const ShareCredentialV2Group: FC<ShareCredentialV2GroupProps> = ({
123
123
  const lastQuery = credentialRequestIndex === credentialRequestsLength - 1;
124
124
 
125
125
  const credentialQuery = presentationDefinition.credentialQueries[credentialRequestId].credentialOrFailureHint;
126
- let defaultSelection: PresentationSubmitV2CredentialRequestBindingDto;
126
+ let defaultSelection: PresentationSubmitV2CredentialRequest;
127
127
  if (credentialQuery.type_ === 'APPLICABLE_CREDENTIALS') {
128
128
  defaultSelection = credentialQuery.applicableCredentials?.[0]
129
129
  ? {
@@ -1,7 +1,7 @@
1
1
  import {
2
- ApplicableCredentialOrFailureHintBindingEnum,
3
- CredentialListItemBindingDto,
4
- PresentationDefinitionV2ClaimBindingDto,
2
+ ApplicableCredentialOrFailureHint,
3
+ CredentialListItem,
4
+ PresentationDefinitionV2Claim,
5
5
  } from '@procivis/react-native-one-core';
6
6
  import React, { FunctionComponent, useCallback, useMemo } from 'react';
7
7
  import { Dimensions, ImageSourcePropType, StyleProp, StyleSheet, ViewStyle } from 'react-native';
@@ -14,7 +14,7 @@ import { ShareCredentialCardNotice } from '../share-credential-card-notice';
14
14
  import { ShareCredentialLabels } from '../v1';
15
15
 
16
16
  export type ShareCredentialV2Props = {
17
- credentialQuery: ApplicableCredentialOrFailureHintBindingEnum;
17
+ credentialQuery: ApplicableCredentialOrFailureHint;
18
18
  credentialRequestId: string;
19
19
  expanded?: boolean;
20
20
  grouped?: boolean;
@@ -25,12 +25,12 @@ export type ShareCredentialV2Props = {
25
25
  onImagePreview: (title: string, image: ImageSourcePropType) => void;
26
26
  onSelectCredential?: () => void;
27
27
  onSelectField: (
28
- credentialId: CredentialListItemBindingDto['id'],
29
- fieldPath: PresentationDefinitionV2ClaimBindingDto['path'],
28
+ credentialId: CredentialListItem['id'],
29
+ fieldPath: PresentationDefinitionV2Claim['path'],
30
30
  selected: boolean,
31
31
  ) => void;
32
- selectedCredentialId?: CredentialListItemBindingDto['id'];
33
- selectedFields?: Array<PresentationDefinitionV2ClaimBindingDto['path']>;
32
+ selectedCredentialId?: CredentialListItem['id'];
33
+ selectedFields?: Array<PresentationDefinitionV2Claim['path']>;
34
34
  style?: StyleProp<ViewStyle>;
35
35
  testID: string;
36
36
  };
@@ -131,7 +131,7 @@ export const ShareCredentialV2: FunctionComponent<ShareCredentialV2Props> = ({
131
131
  ]);
132
132
 
133
133
  const onAttributeSelected = useCallback(
134
- (fieldPath: PresentationDefinitionV2ClaimBindingDto['path'], selected: boolean) => {
134
+ (fieldPath: PresentationDefinitionV2Claim['path'], selected: boolean) => {
135
135
  if (!selectedCredentialId) {
136
136
  return;
137
137
  }
@@ -9,7 +9,7 @@ import { useAppColorScheme } from '../theme';
9
9
 
10
10
  export interface CheckboxProps extends TouchableOpacityProps {
11
11
  value: boolean;
12
- text: ReactNode;
12
+ text?: ReactNode;
13
13
  onValueChanged: (value: boolean) => void;
14
14
  disabled?: boolean;
15
15
  }
@@ -24,7 +24,7 @@ export const Checkbox: FC<CheckboxProps> = ({ style, text, value, disabled, onVa
24
24
  <TouchableOpacity
25
25
  activeOpacity={0.8}
26
26
  accessibilityRole="checkbox"
27
- accessibilityState={{ disabled }}
27
+ accessibilityState={{ checked: value, disabled }}
28
28
  accessibilityValue={
29
29
  disabled ? undefined : { text: t(value ? 'accessibility.control.checked' : 'accessibility.control.unchecked') }
30
30
  }
@@ -45,15 +45,17 @@ export const Checkbox: FC<CheckboxProps> = ({ style, text, value, disabled, onVa
45
45
  ]}
46
46
  />
47
47
  )}
48
- <View style={[styles.text, disabled && styles.disabled]}>
49
- {typeof text === 'string' ? (
50
- <Typography preset="xs/line-height-small" color={colorScheme.text}>
51
- {text}
52
- </Typography>
53
- ) : (
54
- text
55
- )}
56
- </View>
48
+ {text && (
49
+ <View style={[styles.text, disabled && styles.disabled]}>
50
+ {typeof text === 'string' ? (
51
+ <Typography preset="xs/line-height-small" color={colorScheme.text}>
52
+ {text}
53
+ </Typography>
54
+ ) : (
55
+ text
56
+ )}
57
+ </View>
58
+ )}
57
59
  </TouchableOpacity>
58
60
  );
59
61
  };
@@ -1,5 +1,5 @@
1
1
  import React, { forwardRef } from 'react';
2
- import { Insets, Platform, StyleSheet, Switch as RNSwitch, SwitchProps as RNSwitchProps } from 'react-native';
2
+ import { Insets, Platform, StyleSheet, Switch as RNSwitch, SwitchProps as RNSwitchProps, View } from 'react-native';
3
3
 
4
4
  import { useAppColorScheme } from '../theme';
5
5
 
@@ -15,26 +15,28 @@ const hitSlop: Insets = { top: 10, bottom: 10, left: 10, right: 10 };
15
15
  export const Switch = forwardRef<RNSwitch, SwitchProps>(({ value, disabled, style, onChange, ...props }, ref) => {
16
16
  const colorScheme = useAppColorScheme();
17
17
  return (
18
- <RNSwitch
19
- ref={ref}
20
- value={value}
21
- disabled={disabled}
22
- hitSlop={hitSlop}
23
- style={[disabled && styles.disabled, style]}
24
- onValueChange={onChange}
25
- trackColor={Platform.select({
26
- default: { true: colorScheme.grayDark, false: colorScheme.grayDark },
27
- ios: { true: colorScheme.accent, false: colorScheme.grayDark },
28
- })}
29
- thumbColor={Platform.select({
30
- default: value ? colorScheme.accent : disabled ? colorScheme.background : colorScheme.white,
31
- ios: colorScheme.white,
32
- })}
33
- ios_backgroundColor={colorScheme.grayDark}
34
- // @ts-ignore: web only prop
35
- activeThumbColor={colorScheme.accent}
36
- {...props}
37
- />
18
+ <View>
19
+ <RNSwitch
20
+ ref={ref}
21
+ value={value}
22
+ disabled={disabled}
23
+ hitSlop={hitSlop}
24
+ style={[disabled && styles.disabled, style]}
25
+ onValueChange={onChange}
26
+ trackColor={Platform.select({
27
+ default: { true: colorScheme.grayDark, false: colorScheme.grayDark },
28
+ ios: { true: colorScheme.accent, false: colorScheme.grayDark },
29
+ })}
30
+ thumbColor={Platform.select({
31
+ default: value ? colorScheme.accent : disabled ? colorScheme.background : colorScheme.white,
32
+ ios: colorScheme.white,
33
+ })}
34
+ ios_backgroundColor={colorScheme.grayDark}
35
+ // @ts-ignore: web only prop
36
+ activeThumbColor={colorScheme.accent}
37
+ {...props}
38
+ />
39
+ </View>
38
40
  );
39
41
  });
40
42
 
@@ -19,7 +19,7 @@ const Render = ({ onRightAction, contentHeight, headerProps }: Args) => {
19
19
  headerProps={{
20
20
  ...headerProps,
21
21
  rightButtons: [
22
- <TouchableOpacity onPress={onRightAction} hitSlop={hitSlop}>
22
+ <TouchableOpacity key="R" onPress={onRightAction} hitSlop={hitSlop}>
23
23
  <Placeholder id="R" style={styles.rightButton} />
24
24
  </TouchableOpacity>,
25
25
  ],
@@ -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, CredentialDetailBindingDto->History)
8
+ // component used on the history section lists (Settings->History, CredentialDetail->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, CredentialDetailBindingDto->History)
7
+ // component used on the history section lists (Settings->History, CredentialDetail->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 {
@@ -1,4 +1,4 @@
1
- import { GetIdentifierListItemBindingDto } from '@procivis/react-native-one-core';
1
+ import { IdentifierListItem } 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?: GetIdentifierListItemBindingDto;
37
+ identifier?: IdentifierListItem;
38
38
  subline?: string;
39
39
  entityLabels: EntityLabels;
40
40
  role: ContextRole;
@@ -1,14 +1,14 @@
1
- import { HistoryListItemBindingDto } from '@procivis/react-native-one-core';
1
+ import { HistoryListItem } from '@procivis/react-native-one-core';
2
2
  import moment, { Moment } from 'moment';
3
3
 
4
4
  export interface HistoryGroupByDaySection {
5
- data: HistoryListItemBindingDto[];
5
+ data: HistoryListItem[];
6
6
  date: Moment;
7
7
  firstYearEntry: boolean;
8
8
  }
9
9
 
10
- export const groupEntriesByDay = (entries: HistoryListItemBindingDto[]) => {
11
- const groupedEntries = entries.reduce((result: HistoryGroupByDaySection[], entry: HistoryListItemBindingDto) => {
10
+ export const groupEntriesByDay = (entries: HistoryListItem[]) => {
11
+ const groupedEntries = entries.reduce((result: HistoryGroupByDaySection[], entry: HistoryListItem) => {
12
12
  const entryDate = moment(entry.createdDate);
13
13
 
14
14
  const matchingEntry = result.find(({ date }) => date.isSame(entryDate, 'day'));
@@ -1,4 +1,4 @@
1
- import { IdentifierStateBindingEnum, IdentifierTypeBindingEnum } from '@procivis/react-native-one-core';
1
+ import { IdentifierState, IdentifierType } from '@procivis/react-native-one-core';
2
2
  import { useCallback } from 'react';
3
3
  import { useMutation, useQuery, useQueryClient } from 'react-query';
4
4
 
@@ -81,11 +81,11 @@ export const useBackupFinalizeImportProcedure = ({ generateHwKey, generateSwKey
81
81
  let swIdentifierId: string | undefined;
82
82
  if (generateSwKey) {
83
83
  const identifiers = await core.listIdentifiers({
84
- states: [IdentifierStateBindingEnum.ACTIVE],
84
+ states: [IdentifierState.ACTIVE],
85
85
  organisationId,
86
86
  page: 0,
87
87
  pageSize: 1,
88
- types: [IdentifierTypeBindingEnum.DID],
88
+ types: [IdentifierType.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 { CacheTypeBindingDto } from '@procivis/react-native-one-core';
1
+ import { CacheType } 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 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,
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,
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: CacheTypeBindingDto[]) => {
29
+ async (cacheTypes: CacheType[]) => {
30
30
  await core.deleteCache(cacheTypes);
31
31
  return cacheTypes;
32
32
  },
@@ -1,4 +1,4 @@
1
- import { Config, ConfigEntities } from '@procivis/react-native-one-core';
1
+ import { ConfigEntities,CoreConfig } from '@procivis/react-native-one-core';
2
2
  import { useQuery } from 'react-query';
3
3
 
4
4
  import { useONECore } from './core-context';
@@ -13,7 +13,7 @@ export const useCoreConfig = () => {
13
13
  });
14
14
  };
15
15
 
16
- export const getEnabledTransports = (config: Config): string[] => {
16
+ export const getEnabledTransports = (config: CoreConfig): string[] => {
17
17
  return Object.values(config?.transport ?? {})
18
18
  .filter((t) => t.enabled !== false)
19
19
  .map((transport) => transport.type);
@@ -25,7 +25,7 @@ export const getEnabledExchangeProtocols = (exchangeProtocol: ConfigEntities<any
25
25
  .map((exchange) => exchange.type);
26
26
  };
27
27
 
28
- export const getEnabledTrustManagement = (config: Config): string[] => {
28
+ export const getEnabledTrustManagement = (config: CoreConfig): string[] => {
29
29
  return Object.values(config?.trustManagement ?? {})
30
30
  .filter((t) => t.enabled !== false)
31
31
  .map((trustManagement) => trustManagement.type);
@@ -43,6 +43,7 @@ export const generateHwIdentifier = async (core: ONECore, organisationId: string
43
43
  },
44
44
  name: HW_DID_NAME_PREFIX,
45
45
  organisationId,
46
+ trustInformation: [],
46
47
  });
47
48
  }
48
49
 
@@ -74,6 +75,7 @@ export const generateSwIdentifier = async (core: ONECore, organisationId: string
74
75
  },
75
76
  name: SW_DID_NAME_PREFIX,
76
77
  organisationId,
78
+ trustInformation: [],
77
79
  });
78
80
  };
79
81
 
@@ -87,10 +89,7 @@ export interface IdentifiersInitializationConfig {
87
89
  * @param {IdentifiersInitializationConfig} config Select desired keys/dids to be created
88
90
  * @returns [hwIdentifierId, swIdentifierId]
89
91
  */
90
- export const useInitializeONECoreIdentifiers = ({
91
- generateHwKey,
92
- generateSwKey,
93
- }: IdentifiersInitializationConfig) => {
92
+ export const useInitializeONECoreIdentifiers = ({ generateHwKey, generateSwKey }: IdentifiersInitializationConfig) => {
94
93
  const { core, organisationId } = useONECore();
95
94
 
96
95
  return useCallback(async () => {
@@ -1,7 +1,4 @@
1
- import {
2
- CredentialSchemaListQueryBindingDto,
3
- ImportCredentialSchemaRequestSchemaBindingDto,
4
- } from '@procivis/react-native-one-core';
1
+ import { CredentialSchemaListQuery, ImportCredentialSchemaRequestSchema } from '@procivis/react-native-one-core';
5
2
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
6
3
 
7
4
  import { getQueryKeyFromCredentialSchemaListQueryParams } from '../../parsers/query';
@@ -15,14 +12,14 @@ export const CREDENTIAL_SCHEMA_DETAIL_QUERY_KEY = 'credential-schema-detail';
15
12
  export const CREDENTIAL_SCHEMA_PREVIEW_QUERY_KEY = 'credential-schema-preview';
16
13
  export const CREDENTIAL_SCHEMA_SHARE_QUERY_KEY = 'credential-schema-share';
17
14
 
18
- export const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQueryBindingDto>) => {
15
+ export const useCredentialSchemas = (queryParams?: Partial<CredentialSchemaListQuery>) => {
19
16
  const { core, organisationId } = useONECore();
20
17
 
21
18
  return useInfiniteQuery(
22
19
  [CREDENTIAL_SCHEMA_LIST_QUERY_KEY, ...getQueryKeyFromCredentialSchemaListQueryParams(queryParams)],
23
20
  ({ pageParam = 0 }) =>
24
21
  core
25
- .getCredentialSchemas({
22
+ .listCredentialSchemas({
26
23
  organisationId,
27
24
  page: pageParam,
28
25
  pageSize: PAGE_SIZE,
@@ -46,7 +43,7 @@ export const useCredentialSchemaPreview = (url: string) => {
46
43
  if (!response.ok) {
47
44
  throw response.originalError;
48
45
  }
49
- return response.data as ImportCredentialSchemaRequestSchemaBindingDto;
46
+ return response.data as ImportCredentialSchemaRequestSchema;
50
47
  }),
51
48
  {
52
49
  keepPreviousData: true,
@@ -59,7 +56,7 @@ export const useCredentialSchemaAccept = () => {
59
56
  const { core, organisationId } = useONECore();
60
57
 
61
58
  return useMutation(
62
- async (schema: ImportCredentialSchemaRequestSchemaBindingDto) =>
59
+ async (schema: ImportCredentialSchemaRequestSchema) =>
63
60
  core.importCredentialSchema({
64
61
  organisationId,
65
62
  schema,
@@ -1,9 +1,10 @@
1
1
  import {
2
- CredentialListQueryBindingDto,
3
- CredentialStateBindingEnum,
4
- HandleInvitationRequestBindingDto,
5
- HandleInvitationResponseBindingEnum,
6
- InitiateIssuanceRequestBindingDto,
2
+ CredentialListQuery,
3
+ CredentialState,
4
+ HandleInvitationRequest,
5
+ HandleInvitationResponse,
6
+ HolderAcceptCredentialRequest,
7
+ InitiateIssuanceRequest,
7
8
  OneError,
8
9
  } from '@procivis/react-native-one-core';
9
10
  import { useInfiniteQuery, useMutation, useQuery, useQueryClient } from 'react-query';
@@ -20,22 +21,18 @@ export const CREDENTIAL_LIST_QUERY_KEY = 'credential-list';
20
21
  export const CREDENTIAL_LIST_PAGED_QUERY_KEY = 'credential-list-paged';
21
22
  export const CREDENTIAL_DETAIL_QUERY_KEY = 'credential-detail';
22
23
 
23
- export const useCredentials = (queryParams?: Partial<CredentialListQueryBindingDto>) => {
24
+ export const useCredentials = (queryParams?: Partial<CredentialListQuery>) => {
24
25
  const { core, organisationId } = useONECore();
25
26
 
26
27
  return useQuery(
27
28
  [CREDENTIAL_LIST_QUERY_KEY, ...getQueryKeyFromCredentialListQueryParams(queryParams)],
28
29
  async () => {
29
- const { values } = await core.getCredentials({
30
+ const { values } = await core.listCredentials({
30
31
  organisationId,
31
32
  page: 0,
32
33
  // TODO: workaround pagination for now, until it's supported by UI
33
34
  pageSize: 10000,
34
- states: [
35
- CredentialStateBindingEnum.ACCEPTED,
36
- CredentialStateBindingEnum.SUSPENDED,
37
- CredentialStateBindingEnum.REVOKED,
38
- ],
35
+ states: [CredentialState.ACCEPTED, CredentialState.SUSPENDED, CredentialState.REVOKED],
39
36
  ...queryParams,
40
37
  });
41
38
  return values;
@@ -46,7 +43,7 @@ export const useCredentials = (queryParams?: Partial<CredentialListQueryBindingD
46
43
  );
47
44
  };
48
45
 
49
- export const usePagedCredentials = (queryParams?: Partial<CredentialListQueryBindingDto>) => {
46
+ export const usePagedCredentials = (queryParams?: Partial<CredentialListQuery>) => {
50
47
  const { core, organisationId } = useONECore();
51
48
 
52
49
  return useInfiniteQuery(
@@ -56,15 +53,11 @@ export const usePagedCredentials = (queryParams?: Partial<CredentialListQueryBin
56
53
  ...getQueryKeyFromCredentialListQueryParams(queryParams),
57
54
  ],
58
55
  ({ pageParam = 0 }) =>
59
- core.getCredentials({
56
+ core.listCredentials({
60
57
  organisationId,
61
58
  page: pageParam,
62
59
  pageSize: PAGE_SIZE,
63
- states: [
64
- CredentialStateBindingEnum.ACCEPTED,
65
- CredentialStateBindingEnum.SUSPENDED,
66
- CredentialStateBindingEnum.REVOKED,
67
- ],
60
+ states: [CredentialState.ACCEPTED, CredentialState.SUSPENDED, CredentialState.REVOKED],
68
61
  ...queryParams,
69
62
  }),
70
63
  {
@@ -92,10 +85,10 @@ export const useInvitationHandler = () => {
92
85
  const { core, organisationId } = useONECore();
93
86
 
94
87
  return useMutation(
95
- async (request: Omit<HandleInvitationRequestBindingDto, 'organisationId'>) =>
88
+ async (request: Omit<HandleInvitationRequest, 'organisationId'>) =>
96
89
  core.handleInvitation({ organisationId, ...request }),
97
90
  {
98
- onSuccess: async (result: HandleInvitationResponseBindingEnum) => {
91
+ onSuccess: async (result: HandleInvitationResponse) => {
99
92
  if (result.type_ === 'PROOF_REQUEST') {
100
93
  await queryClient.invalidateQueries(PROOF_LIST_QUERY_KEY);
101
94
  } else {
@@ -113,17 +106,8 @@ export const useCredentialAccept = () => {
113
106
  const queryClient = useQueryClient();
114
107
  const { core } = useONECore();
115
108
 
116
- type CredentialAcceptHookParams = {
117
- didId?: string;
118
- identifierId?: string;
119
- interactionId: string;
120
- keyId?: string;
121
- txCode?: string;
122
- holderWalletUnitId?: string;
123
- };
124
-
125
109
  return useMutation(
126
- async (credentialAcceptHookParams: CredentialAcceptHookParams) =>
110
+ async (credentialAcceptHookParams: HolderAcceptCredentialRequest) =>
127
111
  core.holderAcceptCredential(credentialAcceptHookParams),
128
112
  {
129
113
  onSuccess: async () => {
@@ -197,7 +181,7 @@ export const useInitiateIssuance = () => {
197
181
  const { core, organisationId } = useONECore();
198
182
 
199
183
  return useMutation(
200
- async (request: Omit<InitiateIssuanceRequestBindingDto, 'organisationId'>) =>
184
+ async (request: Omit<InitiateIssuanceRequest, 'organisationId'>) =>
201
185
  core.initiateIssuance({ organisationId, ...request }),
202
186
  {
203
187
  onSuccess: async () => {
@@ -1,4 +1,4 @@
1
- import { DidListQueryBindingDto, DidTypeBindingEnum } from '@procivis/react-native-one-core';
1
+ import { DidListQuery, DidType } from '@procivis/react-native-one-core';
2
2
  import { useQuery } from 'react-query';
3
3
 
4
4
  import { getQueryKeyFromDidListQueryParams } from '../../parsers/query';
@@ -7,18 +7,18 @@ 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<DidListQueryBindingDto>) => {
10
+ export const useDids = (queryParams?: Partial<DidListQuery>) => {
11
11
  const { core, organisationId } = useONECore();
12
12
 
13
13
  return useQuery(
14
14
  [DID_LIST_QUERY_KEY, ...getQueryKeyFromDidListQueryParams(queryParams)],
15
15
  async ({ pageParam = 0 }) => {
16
- const dids = await core.getDids({
16
+ const dids = await core.listDids({
17
17
  deactivated: false,
18
18
  organisationId,
19
19
  page: pageParam,
20
20
  pageSize: PAGE_SIZE,
21
- type: DidTypeBindingEnum.LOCAL,
21
+ type: DidType.LOCAL,
22
22
  ...queryParams,
23
23
  });
24
24
 
@@ -1,4 +1,4 @@
1
- import { HistoryListQueryBindingDto } from '@procivis/react-native-one-core';
1
+ import { HistoryListQuery } 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<HistoryListQueryBindingDto>) => {
10
+ export const useHistory = (queryParams?: Partial<HistoryListQuery>) => {
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.getHistoryList({
16
+ const historyPage = await core.listHistory({
17
17
  organisationId,
18
18
  page: pageParam,
19
19
  pageSize: PAGE_SIZE,
@@ -1,8 +1,4 @@
1
- import {
2
- IdentifierListQueryBindingDto,
3
- IdentifierStateBindingEnum,
4
- IdentifierTypeBindingEnum,
5
- } from '@procivis/react-native-one-core';
1
+ import { IdentifierListQuery, IdentifierState, IdentifierType } from '@procivis/react-native-one-core';
6
2
  import { useQuery } from 'react-query';
7
3
 
8
4
  import { getQueryKeyFromIdentifierListQueryParams } from '../../parsers';
@@ -25,17 +21,17 @@ export const useIdentifierDetails = (identifierId: string | undefined) => {
25
21
  );
26
22
  };
27
23
 
28
- export const useIdentifiers = (identifierFilter?: Partial<IdentifierListQueryBindingDto>) => {
24
+ export const useIdentifiers = (identifierFilter?: Partial<IdentifierListQuery>) => {
29
25
  const { core, organisationId } = useONECore();
30
26
 
31
27
  return useQuery(
32
28
  [IDENTIFIER_LIST_QUERY_KEY, ...getQueryKeyFromIdentifierListQueryParams(identifierFilter)],
33
29
  ({ pageParam = 0 }) =>
34
30
  core.listIdentifiers({
35
- types: [IdentifierTypeBindingEnum.DID],
31
+ types: [IdentifierType.DID],
36
32
  isRemote: false,
37
33
  page: pageParam,
38
- states: [IdentifierStateBindingEnum.ACTIVE],
34
+ states: [IdentifierState.ACTIVE],
39
35
  organisationId: organisationId,
40
36
  pageSize: PAGE_SIZE,
41
37
  ...identifierFilter,
@@ -12,4 +12,6 @@ export * from './proof-schemas';
12
12
  export * from './proofs';
13
13
  export * from './query';
14
14
  export * from './trust-entity';
15
+ export * from './trust-list';
16
+ export * from './verifier-instance';
15
17
  export * from './wallet-unit';