(type: string, account: string, container: string, filePath: string)
| 116 | }; |
| 117 | |
| 118 | export const useMeta = (type: string, account: string, container: string, filePath: string) => { |
| 119 | const { filesQuery, dataSourcesQuery } = useUserSettings(); |
| 120 | const { instance } = useMsal(); |
| 121 | const metadataClient = MetadataClientFactory(type, filesQuery.data, dataSourcesQuery.data, instance); |
| 122 | return useQuery<SigMFMetadata>({ |
| 123 | queryKey: ['datasource', type, account, container, filePath, 'meta'], |
| 124 | queryFn: () => { |
| 125 | return metadataClient.getMeta(account, container, filePath); |
| 126 | }, |
| 127 | enabled: !!filesQuery.data && !!dataSourcesQuery.data, |
| 128 | }); |
| 129 | }; |
| 130 | |
| 131 | export const useSmartQueryMeta = (query: string, enabled = true) => { |
| 132 | const { filesQuery, dataSourcesQuery } = useUserSettings(); |
no test coverage detected