@intrig/react 0.0.8 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.d.ts +1 -0
- package/index.esm.js +4829 -0
- package/package.json +1 -1
- package/src/extra.d.ts +53 -0
- package/src/extra.d.ts.map +1 -0
- package/src/{index.ts → index.d.ts} +1 -0
- package/src/index.d.ts.map +1 -0
- package/src/{intrig-context.ts → intrig-context.d.ts} +12 -36
- package/src/intrig-context.d.ts.map +1 -0
- package/src/intrig-provider.d.ts +102 -0
- package/src/intrig-provider.d.ts.map +1 -0
- package/src/logger.d.ts +14 -0
- package/src/logger.d.ts.map +1 -0
- package/src/media-type-utils.d.ts +5 -0
- package/src/media-type-utils.d.ts.map +1 -0
- package/src/{network-state.tsx → network-state.d.ts} +116 -271
- package/src/network-state.d.ts.map +1 -0
- package/.babelrc +0 -12
- package/eslint.config.mjs +0 -12
- package/project.json +0 -15
- package/rollup.config.cjs +0 -31
- package/src/extra.ts +0 -267
- package/src/intrig-provider.tsx +0 -539
- package/src/logger.ts +0 -57
- package/src/media-type-utils.ts +0 -198
- package/tsconfig.json +0 -10
- package/tsconfig.lib.json +0 -35
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ZodError } from 'zod';
|
|
2
|
-
|
|
3
2
|
/**
|
|
4
3
|
* State of an asynchronous call. Network state follows the state diagram given below.
|
|
5
4
|
*
|
|
@@ -24,47 +23,34 @@ import { ZodError } from 'zod';
|
|
|
24
23
|
* </pre>
|
|
25
24
|
*/
|
|
26
25
|
export interface NetworkState<T = unknown, E = unknown> {
|
|
27
|
-
|
|
26
|
+
state: 'init' | 'pending' | 'success' | 'error';
|
|
28
27
|
}
|
|
29
|
-
|
|
30
28
|
/**
|
|
31
29
|
* Network call is not yet started
|
|
32
30
|
*/
|
|
33
31
|
export interface InitState<T, E = unknown> extends NetworkState<T, E> {
|
|
34
|
-
|
|
32
|
+
state: 'init';
|
|
35
33
|
}
|
|
36
|
-
|
|
37
34
|
/**
|
|
38
35
|
* Checks whether the state is init state
|
|
39
36
|
* @param state
|
|
40
37
|
*/
|
|
41
|
-
export function isInit<T, E = unknown>(
|
|
42
|
-
state: NetworkState<T, E>,
|
|
43
|
-
): state is InitState<T, E> {
|
|
44
|
-
return state.state === 'init';
|
|
45
|
-
}
|
|
46
|
-
|
|
38
|
+
export declare function isInit<T, E = unknown>(state: NetworkState<T, E>): state is InitState<T, E>;
|
|
47
39
|
/**
|
|
48
40
|
* Initializes a new state.
|
|
49
41
|
*
|
|
50
42
|
* @template T The type of the state.
|
|
51
43
|
* @return {InitState<T>} An object representing the initial state.
|
|
52
44
|
*/
|
|
53
|
-
export function init<T, E = unknown>(): InitState<T, E
|
|
54
|
-
return {
|
|
55
|
-
state: 'init',
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
45
|
+
export declare function init<T, E = unknown>(): InitState<T, E>;
|
|
59
46
|
/**
|
|
60
47
|
* Network call is not yet completed
|
|
61
48
|
*/
|
|
62
49
|
export interface PendingState<T, E = unknown> extends NetworkState<T, E> {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
50
|
+
state: 'pending';
|
|
51
|
+
progress?: Progress;
|
|
52
|
+
data?: T;
|
|
66
53
|
}
|
|
67
|
-
|
|
68
54
|
/**
|
|
69
55
|
* Interface representing progress information for an upload or download operation.
|
|
70
56
|
*
|
|
@@ -77,88 +63,54 @@ export interface PendingState<T, E = unknown> extends NetworkState<T, E> {
|
|
|
77
63
|
* @property {number} [total] - The total amount of data to be loaded (if known).
|
|
78
64
|
*/
|
|
79
65
|
export interface Progress {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
66
|
+
type?: 'upload' | 'download';
|
|
67
|
+
loaded: number;
|
|
68
|
+
total?: number;
|
|
83
69
|
}
|
|
84
|
-
|
|
85
70
|
/**
|
|
86
71
|
* Checks whether the state is pending state
|
|
87
72
|
* @param state
|
|
88
73
|
*/
|
|
89
|
-
export function isPending<T, E = unknown>(
|
|
90
|
-
state: NetworkState<T, E>,
|
|
91
|
-
): state is PendingState<T, E> {
|
|
92
|
-
return state.state === 'pending';
|
|
93
|
-
}
|
|
94
|
-
|
|
74
|
+
export declare function isPending<T, E = unknown>(state: NetworkState<T, E>): state is PendingState<T, E>;
|
|
95
75
|
/**
|
|
96
76
|
* Generates a PendingState object with a state of "pending".
|
|
97
77
|
*
|
|
98
78
|
* @return {PendingState<T>} An object representing the pending state.
|
|
99
79
|
*/
|
|
100
|
-
export function pending<T, E = unknown>(
|
|
101
|
-
progress: Progress | undefined = undefined,
|
|
102
|
-
data: T | undefined = undefined,
|
|
103
|
-
): PendingState<T, E> {
|
|
104
|
-
return {
|
|
105
|
-
state: 'pending',
|
|
106
|
-
progress,
|
|
107
|
-
data,
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
|
|
80
|
+
export declare function pending<T, E = unknown>(progress?: Progress | undefined, data?: T | undefined): PendingState<T, E>;
|
|
111
81
|
/**
|
|
112
82
|
* Network call is completed with success state
|
|
113
83
|
*/
|
|
114
84
|
export interface SuccessState<T, E = unknown> extends NetworkState<T, E> {
|
|
115
|
-
|
|
116
|
-
|
|
85
|
+
state: 'success';
|
|
86
|
+
data: T;
|
|
117
87
|
}
|
|
118
|
-
|
|
119
88
|
/**
|
|
120
89
|
* Checks whether the state is success response
|
|
121
90
|
* @param state
|
|
122
91
|
*/
|
|
123
|
-
export function isSuccess<T, E = unknown>(
|
|
124
|
-
state: NetworkState<T, E>,
|
|
125
|
-
): state is SuccessState<T, E> {
|
|
126
|
-
return state.state === 'success';
|
|
127
|
-
}
|
|
128
|
-
|
|
92
|
+
export declare function isSuccess<T, E = unknown>(state: NetworkState<T, E>): state is SuccessState<T, E>;
|
|
129
93
|
/**
|
|
130
94
|
* Creates a success state object with the provided data.
|
|
131
95
|
*
|
|
132
96
|
* @param {T} data - The data to be included in the success state.
|
|
133
97
|
* @return {SuccessState<T>} An object representing a success state containing the provided data.
|
|
134
98
|
*/
|
|
135
|
-
export function success<T, E = unknown>(data: T): SuccessState<T, E
|
|
136
|
-
return {
|
|
137
|
-
state: 'success',
|
|
138
|
-
data,
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
|
-
|
|
99
|
+
export declare function success<T, E = unknown>(data: T): SuccessState<T, E>;
|
|
142
100
|
/**
|
|
143
101
|
* Network call is completed with error response
|
|
144
102
|
*/
|
|
145
103
|
export interface ErrorState<T, E = unknown> extends NetworkState<T, E> {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
104
|
+
state: 'error';
|
|
105
|
+
error: E;
|
|
106
|
+
statusCode?: number;
|
|
107
|
+
request?: any;
|
|
150
108
|
}
|
|
151
|
-
|
|
152
109
|
/**
|
|
153
110
|
* Checks whether the state is error state
|
|
154
111
|
* @param state
|
|
155
112
|
*/
|
|
156
|
-
export function isError<T, E = unknown>(
|
|
157
|
-
state: NetworkState<T, E>,
|
|
158
|
-
): state is ErrorState<T, E> {
|
|
159
|
-
return state.state === 'error';
|
|
160
|
-
}
|
|
161
|
-
|
|
113
|
+
export declare function isError<T, E = unknown>(state: NetworkState<T, E>): state is ErrorState<T, E>;
|
|
162
114
|
/**
|
|
163
115
|
* Constructs an ErrorState object representing an error.
|
|
164
116
|
*
|
|
@@ -166,19 +118,7 @@ export function isError<T, E = unknown>(
|
|
|
166
118
|
* @param {string} [statusCode] - An optional status code associated with the error.
|
|
167
119
|
* @return {ErrorState<T>} An object representing the error state.
|
|
168
120
|
*/
|
|
169
|
-
export function error<T, E = unknown>(
|
|
170
|
-
error: E,
|
|
171
|
-
statusCode?: number,
|
|
172
|
-
request?: any,
|
|
173
|
-
): ErrorState<T> {
|
|
174
|
-
return {
|
|
175
|
-
state: 'error',
|
|
176
|
-
error,
|
|
177
|
-
statusCode,
|
|
178
|
-
request,
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
|
|
121
|
+
export declare function error<T, E = unknown>(error: E, statusCode?: number, request?: any): ErrorState<T>;
|
|
182
122
|
/**
|
|
183
123
|
* Represents an error state with additional contextual information.
|
|
184
124
|
*
|
|
@@ -190,13 +130,11 @@ export function error<T, E = unknown>(
|
|
|
190
130
|
* @property {string} operation - The operation being performed when the error occurred.
|
|
191
131
|
* @property {string} key - A unique key identifying the specific error instance.
|
|
192
132
|
*/
|
|
193
|
-
export interface ErrorWithContext<T = unknown, E = unknown>
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
key: string;
|
|
133
|
+
export interface ErrorWithContext<T = unknown, E = unknown> extends ErrorState<T, E> {
|
|
134
|
+
source: string;
|
|
135
|
+
operation: string;
|
|
136
|
+
key: string;
|
|
198
137
|
}
|
|
199
|
-
|
|
200
138
|
/**
|
|
201
139
|
* Represents an action in the network context.
|
|
202
140
|
*
|
|
@@ -206,97 +144,74 @@ export interface ErrorWithContext<T = unknown, E = unknown>
|
|
|
206
144
|
* @property {string} key - The unique identifier for the network action
|
|
207
145
|
*/
|
|
208
146
|
export interface NetworkAction<T, E> {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
147
|
+
key: string;
|
|
148
|
+
source: string;
|
|
149
|
+
operation: string;
|
|
150
|
+
state: NetworkState<T, E>;
|
|
151
|
+
handled?: boolean;
|
|
214
152
|
}
|
|
215
|
-
|
|
216
153
|
type HookWithKey = {
|
|
217
|
-
|
|
154
|
+
key: string;
|
|
155
|
+
};
|
|
156
|
+
export type UnitHookOptions = {
|
|
157
|
+
key?: string;
|
|
158
|
+
fetchOnMount?: false;
|
|
159
|
+
clearOnUnmount?: boolean;
|
|
160
|
+
} | {
|
|
161
|
+
key?: string;
|
|
162
|
+
fetchOnMount: true;
|
|
163
|
+
params?: Record<string, any>;
|
|
164
|
+
clearOnUnmount?: boolean;
|
|
165
|
+
};
|
|
166
|
+
export type UnitHook<E = unknown> = ((options: UnitHookOptions) => [
|
|
167
|
+
NetworkState<never, E>,
|
|
168
|
+
(params?: Record<string, any>) => DispatchState<any>,
|
|
169
|
+
() => void
|
|
170
|
+
]) & HookWithKey;
|
|
171
|
+
export type ConstantHook<T, E = unknown> = ((options: UnitHookOptions) => [
|
|
172
|
+
NetworkState<T, E>,
|
|
173
|
+
(params?: Record<string, any>) => DispatchState<any>,
|
|
174
|
+
() => void
|
|
175
|
+
]) & HookWithKey;
|
|
176
|
+
export type UnaryHookOptions<P> = {
|
|
177
|
+
key?: string;
|
|
178
|
+
fetchOnMount?: false;
|
|
179
|
+
clearOnUnmount?: boolean;
|
|
180
|
+
} | {
|
|
181
|
+
key?: string;
|
|
182
|
+
fetchOnMount: true;
|
|
183
|
+
params: P;
|
|
184
|
+
clearOnUnmount?: boolean;
|
|
185
|
+
};
|
|
186
|
+
export type UnaryProduceHook<P, E = unknown> = ((options?: UnaryHookOptions<P>) => [NetworkState<never, E>, (params: P) => DispatchState<any>, () => void]) & HookWithKey;
|
|
187
|
+
export type UnaryFunctionHook<P, T, E = unknown> = ((options?: UnaryHookOptions<P>) => [NetworkState<T, E>, (params: P) => DispatchState<any>, () => void]) & HookWithKey;
|
|
188
|
+
export type BinaryHookOptions<P, B> = {
|
|
189
|
+
key?: string;
|
|
190
|
+
fetchOnMount?: false;
|
|
191
|
+
clearOnUnmount?: boolean;
|
|
192
|
+
} | {
|
|
193
|
+
key?: string;
|
|
194
|
+
fetchOnMount: true;
|
|
195
|
+
params: P;
|
|
196
|
+
body: B;
|
|
197
|
+
clearOnUnmount?: boolean;
|
|
218
198
|
};
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
NetworkState<never, E>,
|
|
232
|
-
(params?: Record<string, any>) => DispatchState<any>,
|
|
233
|
-
() => void,
|
|
234
|
-
]) &
|
|
235
|
-
HookWithKey;
|
|
236
|
-
export type ConstantHook<T, E = unknown> = ((
|
|
237
|
-
options: UnitHookOptions,
|
|
238
|
-
) => [
|
|
239
|
-
NetworkState<T, E>,
|
|
240
|
-
(params?: Record<string, any>) => DispatchState<any>,
|
|
241
|
-
() => void,
|
|
242
|
-
]) &
|
|
243
|
-
HookWithKey;
|
|
244
|
-
|
|
245
|
-
export type UnaryHookOptions<P> =
|
|
246
|
-
| { key?: string; fetchOnMount?: false; clearOnUnmount?: boolean }
|
|
247
|
-
| { key?: string; fetchOnMount: true; params: P; clearOnUnmount?: boolean };
|
|
248
|
-
export type UnaryProduceHook<P, E = unknown> = ((
|
|
249
|
-
options?: UnaryHookOptions<P>,
|
|
250
|
-
) => [NetworkState<never, E>, (params: P) => DispatchState<any>, () => void]) &
|
|
251
|
-
HookWithKey;
|
|
252
|
-
export type UnaryFunctionHook<P, T, E = unknown> = ((
|
|
253
|
-
options?: UnaryHookOptions<P>,
|
|
254
|
-
) => [NetworkState<T, E>, (params: P) => DispatchState<any>, () => void]) &
|
|
255
|
-
HookWithKey;
|
|
256
|
-
|
|
257
|
-
export type BinaryHookOptions<P, B> =
|
|
258
|
-
| { key?: string; fetchOnMount?: false; clearOnUnmount?: boolean }
|
|
259
|
-
| {
|
|
260
|
-
key?: string;
|
|
261
|
-
fetchOnMount: true;
|
|
262
|
-
params: P;
|
|
263
|
-
body: B;
|
|
264
|
-
clearOnUnmount?: boolean;
|
|
265
|
-
};
|
|
266
|
-
export type BinaryProduceHook<P, B, E = unknown> = ((
|
|
267
|
-
options?: BinaryHookOptions<P, B>,
|
|
268
|
-
) => [
|
|
269
|
-
NetworkState<never, E>,
|
|
270
|
-
(body: B, params: P) => DispatchState<any>,
|
|
271
|
-
() => void,
|
|
272
|
-
]) &
|
|
273
|
-
HookWithKey;
|
|
274
|
-
export type BinaryFunctionHook<P, B, T, E = unknown> = ((
|
|
275
|
-
options?: BinaryHookOptions<P, B>,
|
|
276
|
-
) => [
|
|
277
|
-
NetworkState<T, E>,
|
|
278
|
-
(body: B, params: P) => DispatchState<any>,
|
|
279
|
-
() => void,
|
|
280
|
-
]) &
|
|
281
|
-
HookWithKey;
|
|
282
|
-
|
|
283
|
-
export type IntrigHookOptions<P = undefined, B = undefined> =
|
|
284
|
-
| UnitHookOptions
|
|
285
|
-
| UnaryHookOptions<P>
|
|
286
|
-
| BinaryHookOptions<P, B>;
|
|
287
|
-
export type IntrigHook<P = undefined, B = undefined, T = any, E = unknown> =
|
|
288
|
-
| UnitHook<E>
|
|
289
|
-
| ConstantHook<T, E>
|
|
290
|
-
| UnaryProduceHook<P, E>
|
|
291
|
-
| UnaryFunctionHook<P, T, E>
|
|
292
|
-
| BinaryProduceHook<P, B, E>
|
|
293
|
-
| BinaryFunctionHook<P, B, T, E>;
|
|
294
|
-
|
|
199
|
+
export type BinaryProduceHook<P, B, E = unknown> = ((options?: BinaryHookOptions<P, B>) => [
|
|
200
|
+
NetworkState<never, E>,
|
|
201
|
+
(body: B, params: P) => DispatchState<any>,
|
|
202
|
+
() => void
|
|
203
|
+
]) & HookWithKey;
|
|
204
|
+
export type BinaryFunctionHook<P, B, T, E = unknown> = ((options?: BinaryHookOptions<P, B>) => [
|
|
205
|
+
NetworkState<T, E>,
|
|
206
|
+
(body: B, params: P) => DispatchState<any>,
|
|
207
|
+
() => void
|
|
208
|
+
]) & HookWithKey;
|
|
209
|
+
export type IntrigHookOptions<P = undefined, B = undefined> = UnitHookOptions | UnaryHookOptions<P> | BinaryHookOptions<P, B>;
|
|
210
|
+
export type IntrigHook<P = undefined, B = undefined, T = any, E = unknown> = UnitHook<E> | ConstantHook<T, E> | UnaryProduceHook<P, E> | UnaryFunctionHook<P, T, E> | BinaryProduceHook<P, B, E> | BinaryFunctionHook<P, B, T, E>;
|
|
295
211
|
export interface AsyncRequestOptions {
|
|
296
|
-
|
|
297
|
-
|
|
212
|
+
hydrate?: boolean;
|
|
213
|
+
key?: string;
|
|
298
214
|
}
|
|
299
|
-
|
|
300
215
|
/**
|
|
301
216
|
* Represents the dispatch state of a process.
|
|
302
217
|
*
|
|
@@ -306,9 +221,8 @@ export interface AsyncRequestOptions {
|
|
|
306
221
|
* @property {string} state The current state of the dispatch process.
|
|
307
222
|
*/
|
|
308
223
|
export interface DispatchState<T> {
|
|
309
|
-
|
|
224
|
+
state: string;
|
|
310
225
|
}
|
|
311
|
-
|
|
312
226
|
/**
|
|
313
227
|
* Represents a successful dispatch state.
|
|
314
228
|
*
|
|
@@ -319,32 +233,21 @@ export interface DispatchState<T> {
|
|
|
319
233
|
* @property {string} state - The state of the dispatch, always 'success'.
|
|
320
234
|
*/
|
|
321
235
|
export interface SuccessfulDispatch<T> extends DispatchState<T> {
|
|
322
|
-
|
|
236
|
+
state: 'success';
|
|
323
237
|
}
|
|
324
|
-
|
|
325
238
|
/**
|
|
326
239
|
* Indicates a successful dispatch state.
|
|
327
240
|
*
|
|
328
241
|
* @return {DispatchState<T>} An object representing a successful state.
|
|
329
242
|
*/
|
|
330
|
-
export function successfulDispatch<T>(): DispatchState<T
|
|
331
|
-
return {
|
|
332
|
-
state: 'success',
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
|
|
243
|
+
export declare function successfulDispatch<T>(): DispatchState<T>;
|
|
336
244
|
/**
|
|
337
245
|
* Determines if the provided dispatch state represents a successful dispatch.
|
|
338
246
|
*
|
|
339
247
|
* @param {DispatchState<T>} value - The dispatch state to check.
|
|
340
248
|
* @return {value is SuccessfulDispatch<T>} - True if the dispatch state indicates success, false otherwise.
|
|
341
249
|
*/
|
|
342
|
-
export function isSuccessfulDispatch<T>(
|
|
343
|
-
value: DispatchState<T>,
|
|
344
|
-
): value is SuccessfulDispatch<T> {
|
|
345
|
-
return value.state === 'success';
|
|
346
|
-
}
|
|
347
|
-
|
|
250
|
+
export declare function isSuccessfulDispatch<T>(value: DispatchState<T>): value is SuccessfulDispatch<T>;
|
|
348
251
|
/**
|
|
349
252
|
* ValidationError interface represents a specific type of dispatch state
|
|
350
253
|
* where a validation error has occurred.
|
|
@@ -352,35 +255,23 @@ export function isSuccessfulDispatch<T>(
|
|
|
352
255
|
* @typeparam T - The type of the data associated with this dispatch state.
|
|
353
256
|
*/
|
|
354
257
|
export interface ValidationError<T> extends DispatchState<T> {
|
|
355
|
-
|
|
356
|
-
|
|
258
|
+
state: 'validation-error';
|
|
259
|
+
error: any;
|
|
357
260
|
}
|
|
358
|
-
|
|
359
261
|
/**
|
|
360
262
|
* Generates a ValidationError object.
|
|
361
263
|
*
|
|
362
264
|
* @param error The error details that caused the validation to fail.
|
|
363
265
|
* @return The ValidationError object containing the error state and details.
|
|
364
266
|
*/
|
|
365
|
-
export function validationError<T>(error: any): ValidationError<T
|
|
366
|
-
return {
|
|
367
|
-
state: 'validation-error',
|
|
368
|
-
error,
|
|
369
|
-
};
|
|
370
|
-
}
|
|
371
|
-
|
|
267
|
+
export declare function validationError<T>(error: any): ValidationError<T>;
|
|
372
268
|
/**
|
|
373
269
|
* Determines if a provided DispatchState object is a ValidationError.
|
|
374
270
|
*
|
|
375
271
|
* @param {DispatchState<T>} value - The DispatchState object to evaluate.
|
|
376
272
|
* @return {boolean} - Returns true if the provided DispatchState object is a ValidationError, otherwise returns false.
|
|
377
273
|
*/
|
|
378
|
-
export function isValidationError<T>(
|
|
379
|
-
value: DispatchState<T>,
|
|
380
|
-
): value is ValidationError<T> {
|
|
381
|
-
return value.state === 'validation-error';
|
|
382
|
-
}
|
|
383
|
-
|
|
274
|
+
export declare function isValidationError<T>(value: DispatchState<T>): value is ValidationError<T>;
|
|
384
275
|
/**
|
|
385
276
|
* Represents an error structure with a specified type and associated data.
|
|
386
277
|
*
|
|
@@ -390,9 +281,8 @@ export function isValidationError<T>(
|
|
|
390
281
|
* @property {string} type - A string representing the type of the error.
|
|
391
282
|
*/
|
|
392
283
|
export interface IntrigError<T, E> {
|
|
393
|
-
|
|
284
|
+
type: string;
|
|
394
285
|
}
|
|
395
|
-
|
|
396
286
|
/**
|
|
397
287
|
* Represents an error encountered during a network operation.
|
|
398
288
|
* Extends from the `IntrigError` interface, adding network-specific properties.
|
|
@@ -406,12 +296,11 @@ export interface IntrigError<T, E> {
|
|
|
406
296
|
* @property {any} request - The request object that was attempted when the network error occurred, providing context for what operation failed.
|
|
407
297
|
*/
|
|
408
298
|
export interface NetworkError<T, E = unknown> extends IntrigError<T, E> {
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
299
|
+
type: 'network';
|
|
300
|
+
statusCode: string;
|
|
301
|
+
error: E;
|
|
302
|
+
request: any;
|
|
413
303
|
}
|
|
414
|
-
|
|
415
304
|
/**
|
|
416
305
|
* Constructs a network error object.
|
|
417
306
|
*
|
|
@@ -420,31 +309,14 @@ export interface NetworkError<T, E = unknown> extends IntrigError<T, E> {
|
|
|
420
309
|
* @param request The request object associated with the network operation.
|
|
421
310
|
* @return A NetworkError object containing the error type, status code, error details, and the original request.
|
|
422
311
|
*/
|
|
423
|
-
export function networkError<T, E>(
|
|
424
|
-
error: E,
|
|
425
|
-
statusCode: string,
|
|
426
|
-
request: any,
|
|
427
|
-
): NetworkError<T, E> {
|
|
428
|
-
return {
|
|
429
|
-
type: 'network',
|
|
430
|
-
statusCode,
|
|
431
|
-
error,
|
|
432
|
-
request,
|
|
433
|
-
};
|
|
434
|
-
}
|
|
435
|
-
|
|
312
|
+
export declare function networkError<T, E>(error: E, statusCode: string, request: any): NetworkError<T, E>;
|
|
436
313
|
/**
|
|
437
314
|
* Determines if the provided IntrigError is of type 'network'.
|
|
438
315
|
*
|
|
439
316
|
* @param {IntrigError<T, E>} value - The error value to check the type of.
|
|
440
317
|
* @return {boolean} - Returns true if the error is of type 'network', otherwise false.
|
|
441
318
|
*/
|
|
442
|
-
export function isNetworkError<T, E>(
|
|
443
|
-
value: IntrigError<T, E>,
|
|
444
|
-
): value is NetworkError<T, E> {
|
|
445
|
-
return value.type === 'network';
|
|
446
|
-
}
|
|
447
|
-
|
|
319
|
+
export declare function isNetworkError<T, E>(value: IntrigError<T, E>): value is NetworkError<T, E>;
|
|
448
320
|
/**
|
|
449
321
|
* Interface representing a request validation error.
|
|
450
322
|
*
|
|
@@ -459,39 +331,24 @@ export function isNetworkError<T, E>(
|
|
|
459
331
|
* @property {string} type - A string literal indicating the error type as 'request-validation'.
|
|
460
332
|
* @property {ZodError} error - An instance of ZodError containing detailed validation error information.
|
|
461
333
|
*/
|
|
462
|
-
export interface RequestValidationError<T, E = unknown>
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
error: ZodError;
|
|
334
|
+
export interface RequestValidationError<T, E = unknown> extends IntrigError<T, E> {
|
|
335
|
+
type: 'request-validation';
|
|
336
|
+
error: ZodError;
|
|
466
337
|
}
|
|
467
|
-
|
|
468
338
|
/**
|
|
469
339
|
* Constructs a RequestValidationError object encapsulating the ZodError.
|
|
470
340
|
*
|
|
471
341
|
* @param {ZodError} error - The error object resulting from Zod schema validation.
|
|
472
342
|
* @return {RequestValidationError<T, E>} A RequestValidationError object containing the validation error information.
|
|
473
343
|
*/
|
|
474
|
-
export function requestValidationError<T, E>(
|
|
475
|
-
error: ZodError,
|
|
476
|
-
): RequestValidationError<T, E> {
|
|
477
|
-
return {
|
|
478
|
-
type: 'request-validation',
|
|
479
|
-
error,
|
|
480
|
-
};
|
|
481
|
-
}
|
|
482
|
-
|
|
344
|
+
export declare function requestValidationError<T, E>(error: ZodError): RequestValidationError<T, E>;
|
|
483
345
|
/**
|
|
484
346
|
* Determines if a given error is of type RequestValidationError.
|
|
485
347
|
*
|
|
486
348
|
* @param value The error object to check, which implements the IntrigError interface.
|
|
487
349
|
* @return A boolean indicating whether the error is a RequestValidationError.
|
|
488
350
|
*/
|
|
489
|
-
export function isRequestValidationError<T, E>(
|
|
490
|
-
value: IntrigError<T, E>,
|
|
491
|
-
): value is RequestValidationError<T, E> {
|
|
492
|
-
return value.type === 'request-validation';
|
|
493
|
-
}
|
|
494
|
-
|
|
351
|
+
export declare function isRequestValidationError<T, E>(value: IntrigError<T, E>): value is RequestValidationError<T, E>;
|
|
495
352
|
/**
|
|
496
353
|
* ResponseValidationError interface is designed to extend the capabilities of the IntrigError interface,
|
|
497
354
|
* specifically for handling errors related to response validation.
|
|
@@ -504,35 +361,23 @@ export function isRequestValidationError<T, E>(
|
|
|
504
361
|
* @property type - A string literal that identifies the type of error as 'response-validation'.
|
|
505
362
|
* @property error - An instance of ZodError representing the validation error encountered.
|
|
506
363
|
*/
|
|
507
|
-
export interface ResponseValidationError<T, E = unknown>
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
error: ZodError;
|
|
364
|
+
export interface ResponseValidationError<T, E = unknown> extends IntrigError<T, E> {
|
|
365
|
+
type: 'response-validation';
|
|
366
|
+
error: ZodError;
|
|
511
367
|
}
|
|
512
|
-
|
|
513
368
|
/**
|
|
514
369
|
* Constructs a ResponseValidationError object with a specified error.
|
|
515
370
|
*
|
|
516
371
|
* @param {ZodError} error - The validation error encountered during response validation.
|
|
517
372
|
* @return {ResponseValidationError<T, E>} An error object containing the type of error and the validation error details.
|
|
518
373
|
*/
|
|
519
|
-
export function responseValidationError<T, E>(
|
|
520
|
-
error: ZodError,
|
|
521
|
-
): ResponseValidationError<T, E> {
|
|
522
|
-
return {
|
|
523
|
-
type: 'response-validation',
|
|
524
|
-
error,
|
|
525
|
-
};
|
|
526
|
-
}
|
|
527
|
-
|
|
374
|
+
export declare function responseValidationError<T, E>(error: ZodError): ResponseValidationError<T, E>;
|
|
528
375
|
/**
|
|
529
376
|
* Determines if the given error is a response validation error.
|
|
530
377
|
*
|
|
531
378
|
* @param {IntrigError<T, E>} value - The error object to assess.
|
|
532
379
|
* @return {boolean} True if the error is a response validation error, otherwise false.
|
|
533
380
|
*/
|
|
534
|
-
export function isResponseValidationError<T, E>(
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
return value.type === 'response-validation';
|
|
538
|
-
}
|
|
381
|
+
export declare function isResponseValidationError<T, E>(value: IntrigError<T, E>): value is ResponseValidationError<T, E>;
|
|
382
|
+
export {};
|
|
383
|
+
//# sourceMappingUR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,CAAC,EACzC,KAAK,EAAE,QAAQ,GACd,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAK9B;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,CAAC,EAC3C,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GACvB,KAAK,IAAI,sBAAsB,CAAC,CAAC,EAAE,CAAC,CAAC,CAEvC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC,EAAE,CAAC,GAAG,OAAO,CACrD,SAAQ,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;IACzB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,KAAK,EAAE,QAAQ,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAC1C,KAAK,EAAE,QAAQ,GACd,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAK/B;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,CAAC,EAC5C,KAAK,EAAE,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,GACvB,KAAK,IAAI,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAExC"}
|
package/.babelrc
DELETED
package/eslint.config.mjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import nx from '@nx/eslint-plugin';
|
|
2
|
-
import baseConfig from '../../eslint.base.config.mjs';
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
...baseConfig,
|
|
6
|
-
...nx.configs['flat/react'],
|
|
7
|
-
{
|
|
8
|
-
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
|
|
9
|
-
// Override or add rules here
|
|
10
|
-
rules: {},
|
|
11
|
-
},
|
|
12
|
-
];
|
package/project.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@intrig/react",
|
|
3
|
-
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
|
-
"sourceRoot": "lib/react-client/src",
|
|
5
|
-
"projectType": "library",
|
|
6
|
-
"tags": [],
|
|
7
|
-
"// targets": "to see all targets run: nx show project @intrig/react --web",
|
|
8
|
-
"targets": {},
|
|
9
|
-
"nx-release-publish": {
|
|
10
|
-
"executor": "@nx/js:release-publish",
|
|
11
|
-
"options": {
|
|
12
|
-
"packageRoot": "dist/lib/react-client"
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|