UNPKG

1.21 kBTypeScriptView Raw
1import { AxiosRequestConfig } from 'axios';
2import { UseQueryOptions, UseQueryResult } from 'react-query';
3import { AriesHookBase } from './aries';
4
5interface ProvidersBase {
6 data: {
7 providers: [
8 {
9 id: string;
10 lastName: string;
11 firstName: string;
12 middleName: string;
13 uiDisplayName: string;
14 atypical: boolean;
15 npi: string;
16 customerIds: [string];
17 roles: [{ code: string; value: string }];
18
19 primarySpecialty: {
20 code: string;
21 value: string;
22 };
23 primaryFax: {
24 internationalCellularCode: string;
25 areaCode: string;
26 phoneNumber: string;
27 };
28 primaryAddress: {
29 line1: string;
30 line2: string;
31 city: string;
32 state: string;
33 stateCode: string;
34 zip: { code: string; addon: string };
35 };
36 }
37 ];
38 };
39}
40
41type Providers = AriesHookBase & ProvidersBase;
42
43type AvConfig = { customerId: number } & AxiosRequestConfig;
44
45declare function useProviders(
46 config: AvConfig,
47 options?: UseQueryOptions<Providers, unknown>
48): UseQueryResult<Providers, unknown>;
49
50export default useProviders;