MCPcopy Create free account
hub / github.com/IQEngine/IQEngine / useSasToken

Function useSasToken

client/src/api/datasource/queries.ts:57–71  ·  view source on GitHub ↗
(type: string, account: string, container: string, filepath: string, write: boolean = false, enabled = true)

Source from the content-addressed store, hash-verified

55};
56
57export const useSasToken = (type: string, account: string, container: string, filepath: string, write: boolean = false, enabled = true) => {
58 const { dataSourcesQuery, filesQuery } = useUserSettings();
59 const { instance } = useMsal();
60 const client = DataSourceClientFactory(type, filesQuery.data, dataSourcesQuery.data, instance);
61
62 return useQuery(
63 ['sas', type, account, container, filepath, write],
64 () => {
65 return fetchSasToken(client, account, container, filepath, write);
66 },
67 {
68 enabled: enabled,
69 }
70 );
71};
72
73export const useQueryMeta = (type: string, queryString: string, enabled = true) => {
74 const { dataSourcesQuery, filesQuery } = useUserSettings();

Callers 1

PluginsPaneFunction · 0.90

Calls 3

useUserSettingsFunction · 0.90
DataSourceClientFactoryFunction · 0.90
fetchSasTokenFunction · 0.85

Tested by

no test coverage detected