forked from Cylo-Traders/Agrocylo-PIP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
44 lines (39 loc) · 965 Bytes
/
Copy pathindex.ts
File metadata and controls
44 lines (39 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* Typed REST API client for the backend, with local fallback (issue #61).
*
* Usage:
* import { getCampaigns, isBackendApiEnabled } from '@/lib/api';
*
* See `client.ts` for the assumed backend endpoints and fallback behaviour.
*/
export {
getCampaigns,
getCampaign,
getCampaignInvestments,
getCampaignOrders,
getOrder,
getUser,
getInvestmentsByUser,
getTransactionsByUser,
} from './client';
export type { ApiRequestOptions } from './client';
export {
isBackendApiEnabled,
backendApiBaseUrl,
DEFAULT_BACKEND_API_URL,
DEFAULT_REQUEST_TIMEOUT_MS,
} from './config';
export { ApiError, isApiError } from './errors';
export type { ApiErrorKind, ApiErrorOptions } from './errors';
export { apiFetch } from './http';
export type { ApiFetchOptions } from './http';
export { localData } from './fallback';
export type {
Campaign,
Investment,
Order,
User,
Transaction,
NumericString,
IsoDateString,
} from './types';