-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
index.ts
108 lines (94 loc) · 3.19 KB
/
index.ts
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// Contract public API
export { type Contract } from './src/contract/type';
export { unknownContract } from './src/contract/unknown_contract';
// Query public API
export { type Query } from './src/query/type';
export { createQuery } from './src/query/create_query';
export { connectQuery } from './src/query/connect_query';
export { createHeadlessQuery } from './src/query/create_headless_query';
export { createJsonQuery } from './src/query/create_json_query';
// Mutation public API
export { type Mutation } from './src/mutation/type';
export { createMutation } from './src/mutation/create_mutation';
export { createHeadlessMutation } from './src/mutation/create_headless_mutation';
export { createJsonMutation } from './src/mutation/create_json_mutation';
// Retry public API
export { retry } from './src/retry/retry';
export { exponentialDelay, linearDelay } from './src/retry/delay';
// Timeout public API
export { timeout } from './src/timeout/timeout';
// Update public API
export { update } from './src/update/update';
// Attach public API
export { attachOperation } from './src/attach/attach';
// Cache public API
export { cache } from './src/cache/cache';
export {
type CacheAdapter,
type CacheAdapterOptions,
} from './src/cache/adapters/type';
export { inMemoryCache } from './src/cache/adapters/in_memory';
export { localStorageCache } from './src/cache/adapters/local_storage';
export { sessionStorageCache } from './src/cache/adapters/session_storage';
export { voidCache } from './src/cache/adapters/void';
export { createCacheAdapter } from './src/cache/adapters/instance';
// Exposed libs
export {
type SourcedField,
normalizeSourced,
combineSourced,
type DynamicallySourcedField,
} from './src/libs/patronus';
export { type FetchingStatus } from './src/libs/patronus';
// RemoteOperation public API
export {
declareParams,
type ParamsDeclaration,
} from './src/remote_operation/params';
export {
type RemoteOperationResult,
type RemoteOperationError,
type RemoteOperationParams,
} from './src/remote_operation/type';
// Validation public API
export { type ValidationResult, type Validator } from './src/validation/type';
// Exposed fetch
export { type Json } from 'effector';
export { type JsonObject } from './src/fetch/json';
export { type FetchApiRecord } from './src/fetch/lib';
export { type JsonApiRequestError } from './src/fetch/api';
export { fetchFx } from './src/fetch/fetch';
// Exposed errors
export {
type FarfetchedError,
type InvalidDataError,
type TimeoutError,
type AbortError,
type PreparationError,
type HttpError,
type NetworkError,
type ConfigurationError,
} from './src/errors/type';
export {
invalidDataError,
timeoutError,
abortError,
preparationError,
httpError,
networkError,
configurationError,
} from './src/errors/create_error';
export {
isTimeoutError,
isPreparationError,
isHttpError,
isNetworkError,
isInvalidDataError,
isHttpErrorCode,
} from './src/errors/guards';
// Trigger API
export { keepFresh } from './src/trigger_api/keep_fresh';
// Barrier API
export { type Barrier } from './src/barrier_api/type';
export { applyBarrier } from './src/barrier_api/apply_barrier';
export { createBarrier } from './src/barrier_api/create_barrier';