@geekmidas/client 0.0.1
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/README.md +518 -0
- package/dist/chunk-CUT6urMc.cjs +30 -0
- package/dist/fetcher-DLDD_7Sa.mjs +86 -0
- package/dist/fetcher-DLDD_7Sa.mjs.map +1 -0
- package/dist/fetcher-KdwHgdAl.cjs +98 -0
- package/dist/fetcher-KdwHgdAl.cjs.map +1 -0
- package/dist/fetcher.cjs +4 -0
- package/dist/fetcher.d.cts +18 -0
- package/dist/fetcher.d.mts +18 -0
- package/dist/fetcher.mjs +3 -0
- package/dist/openapi-hooks.cjs +44 -0
- package/dist/openapi-hooks.cjs.map +1 -0
- package/dist/openapi-hooks.d.cts +99 -0
- package/dist/openapi-hooks.d.mts +99 -0
- package/dist/openapi-hooks.mjs +43 -0
- package/dist/openapi-hooks.mjs.map +1 -0
- package/dist/openapi-types.d.cjs +0 -0
- package/dist/openapi-types.d.cts +443 -0
- package/dist/openapi-types.d.mts +443 -0
- package/dist/openapi.cjs +526 -0
- package/dist/openapi.cjs.map +1 -0
- package/dist/openapi.mjs +501 -0
- package/dist/openapi.mjs.map +1 -0
- package/dist/react-query.cjs +147 -0
- package/dist/react-query.cjs.map +1 -0
- package/dist/react-query.d.cts +77 -0
- package/dist/react-query.d.mts +77 -0
- package/dist/react-query.mjs +141 -0
- package/dist/react-query.mjs.map +1 -0
- package/dist/types-csACmD6U.d.cts +68 -0
- package/dist/types-tMp85Lt_.d.mts +68 -0
- package/dist/types.cjs +0 -0
- package/dist/types.d.cts +2 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +0 -0
- package/package.json +59 -0
- package/src/__tests__/fetcher.spec.ts +409 -0
- package/src/__tests__/method-restrictions.spec.tsx +227 -0
- package/src/__tests__/openapi-hooks.spec.tsx +558 -0
- package/src/__tests__/react-query-infinite.spec.tsx +1003 -0
- package/src/__tests__/react-query-invalidation.spec.tsx +238 -0
- package/src/__tests__/react-query.spec.tsx +582 -0
- package/src/__tests__/setup.ts +281 -0
- package/src/__tests__/types.spec.ts +134 -0
- package/src/__tests__/url-parsing.spec.ts +196 -0
- package/src/fetcher.ts +173 -0
- package/src/openapi-hooks.ts +193 -0
- package/src/openapi-types.d.ts +440 -0
- package/src/openapi.json +595 -0
- package/src/react-query.ts +341 -0
- package/src/types.ts +149 -0
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
//#region src/openapi-types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* This file should be auto-generated by openapi-typescript.
|
|
4
|
+
* Run: npx openapi-typescript <your-openapi-spec> -o ./openapi-types.d.ts
|
|
5
|
+
*
|
|
6
|
+
* This is a placeholder file showing the expected structure.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
interface paths {
|
|
10
|
+
'/job/{id}': {
|
|
11
|
+
parameters: {
|
|
12
|
+
query?: never;
|
|
13
|
+
header?: never;
|
|
14
|
+
path?: never;
|
|
15
|
+
cookie?: never;
|
|
16
|
+
};
|
|
17
|
+
get: {
|
|
18
|
+
operationId: 'getJob';
|
|
19
|
+
parameters: {
|
|
20
|
+
query?: never;
|
|
21
|
+
header?: never;
|
|
22
|
+
path: {
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
cookie?: never;
|
|
26
|
+
};
|
|
27
|
+
requestBody?: never;
|
|
28
|
+
responses: {
|
|
29
|
+
/** @description Successful response */
|
|
30
|
+
200: {
|
|
31
|
+
headers: {
|
|
32
|
+
[name: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
content: {
|
|
35
|
+
'application/json': {
|
|
36
|
+
role: string;
|
|
37
|
+
overview: string;
|
|
38
|
+
qualifications: string;
|
|
39
|
+
hourlyRate: {
|
|
40
|
+
max: number;
|
|
41
|
+
min: number;
|
|
42
|
+
};
|
|
43
|
+
dateNeeded: {
|
|
44
|
+
from: string;
|
|
45
|
+
to: string;
|
|
46
|
+
};
|
|
47
|
+
shiftHours: {
|
|
48
|
+
from: string;
|
|
49
|
+
to: string;
|
|
50
|
+
};
|
|
51
|
+
/** Format: uuid */
|
|
52
|
+
id: string;
|
|
53
|
+
/** Format: date-time */
|
|
54
|
+
createdAt: string;
|
|
55
|
+
/** Format: date-time */
|
|
56
|
+
updatedAt: string;
|
|
57
|
+
/** Format: uuid */
|
|
58
|
+
businessId: string;
|
|
59
|
+
/** Format: uuid */
|
|
60
|
+
creatorId: string;
|
|
61
|
+
/** @enum {string} */
|
|
62
|
+
status: 'Draft' | 'Active' | 'Closed' | 'Filled';
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
put: {
|
|
69
|
+
operationId: 'updateJob';
|
|
70
|
+
parameters: {
|
|
71
|
+
query?: never;
|
|
72
|
+
header?: never;
|
|
73
|
+
path: {
|
|
74
|
+
id: string;
|
|
75
|
+
};
|
|
76
|
+
cookie?: never;
|
|
77
|
+
};
|
|
78
|
+
requestBody: {
|
|
79
|
+
content: {
|
|
80
|
+
'application/json': {
|
|
81
|
+
role?: string;
|
|
82
|
+
overview?: string;
|
|
83
|
+
qualifications?: string;
|
|
84
|
+
hourlyRate?: {
|
|
85
|
+
max: number;
|
|
86
|
+
min: number;
|
|
87
|
+
};
|
|
88
|
+
dateNeeded?: {
|
|
89
|
+
from: string;
|
|
90
|
+
to: string;
|
|
91
|
+
};
|
|
92
|
+
shiftHours?: {
|
|
93
|
+
from: string;
|
|
94
|
+
to: string;
|
|
95
|
+
};
|
|
96
|
+
/** @enum {string} */
|
|
97
|
+
status?: 'Draft' | 'Active' | 'Closed' | 'Filled';
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
responses: {
|
|
102
|
+
/** @description Successful response */
|
|
103
|
+
200: {
|
|
104
|
+
headers: {
|
|
105
|
+
[name: string]: unknown;
|
|
106
|
+
};
|
|
107
|
+
content: {
|
|
108
|
+
'application/json': {
|
|
109
|
+
role: string;
|
|
110
|
+
overview: string;
|
|
111
|
+
qualifications: string;
|
|
112
|
+
hourlyRate: {
|
|
113
|
+
max: number;
|
|
114
|
+
min: number;
|
|
115
|
+
};
|
|
116
|
+
dateNeeded: {
|
|
117
|
+
from: string;
|
|
118
|
+
to: string;
|
|
119
|
+
};
|
|
120
|
+
shiftHours: {
|
|
121
|
+
from: string;
|
|
122
|
+
to: string;
|
|
123
|
+
};
|
|
124
|
+
/** Format: uuid */
|
|
125
|
+
id: string;
|
|
126
|
+
/** Format: date-time */
|
|
127
|
+
createdAt: string;
|
|
128
|
+
/** Format: date-time */
|
|
129
|
+
updatedAt: string;
|
|
130
|
+
/** Format: uuid */
|
|
131
|
+
businessId: string;
|
|
132
|
+
/** Format: uuid */
|
|
133
|
+
creatorId: string;
|
|
134
|
+
/** @enum {string} */
|
|
135
|
+
status: 'Draft' | 'Active' | 'Closed' | 'Filled';
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
post?: never;
|
|
142
|
+
delete: {
|
|
143
|
+
operationId: 'deleteJob';
|
|
144
|
+
parameters: {
|
|
145
|
+
query?: never;
|
|
146
|
+
header?: never;
|
|
147
|
+
path: {
|
|
148
|
+
id: string;
|
|
149
|
+
};
|
|
150
|
+
cookie?: never;
|
|
151
|
+
};
|
|
152
|
+
requestBody?: never;
|
|
153
|
+
responses: {
|
|
154
|
+
/** @description Successful response */
|
|
155
|
+
200: {
|
|
156
|
+
headers: {
|
|
157
|
+
[name: string]: unknown;
|
|
158
|
+
};
|
|
159
|
+
content: {
|
|
160
|
+
'application/json': {
|
|
161
|
+
message: string;
|
|
162
|
+
/** Format: uuid */
|
|
163
|
+
id: string;
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
options?: never;
|
|
170
|
+
head?: never;
|
|
171
|
+
patch?: never;
|
|
172
|
+
trace?: never;
|
|
173
|
+
};
|
|
174
|
+
'/users': {
|
|
175
|
+
get: {
|
|
176
|
+
operationId: 'listUsers';
|
|
177
|
+
parameters: {
|
|
178
|
+
query: {
|
|
179
|
+
page?: number;
|
|
180
|
+
limit?: number;
|
|
181
|
+
sort?: 'asc' | 'desc';
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
responses: {
|
|
185
|
+
200: {
|
|
186
|
+
content: {
|
|
187
|
+
'application/json': {
|
|
188
|
+
users: Array<{
|
|
189
|
+
id: string;
|
|
190
|
+
name: string;
|
|
191
|
+
email: string;
|
|
192
|
+
}>;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
};
|
|
198
|
+
post: {
|
|
199
|
+
operationId: 'createUser';
|
|
200
|
+
requestBody: {
|
|
201
|
+
content: {
|
|
202
|
+
'application/json': {
|
|
203
|
+
name: string;
|
|
204
|
+
email: string;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
responses: {
|
|
209
|
+
201: {
|
|
210
|
+
content: {
|
|
211
|
+
'application/json': {
|
|
212
|
+
id: string;
|
|
213
|
+
name: string;
|
|
214
|
+
email: string;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
'/users/{id}': {
|
|
222
|
+
parameters: {
|
|
223
|
+
path: {
|
|
224
|
+
id: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
get: {
|
|
228
|
+
operationId: 'getUser';
|
|
229
|
+
responses: {
|
|
230
|
+
200: {
|
|
231
|
+
content: {
|
|
232
|
+
'application/json': {
|
|
233
|
+
id: string;
|
|
234
|
+
name: string;
|
|
235
|
+
email: string;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
put: {
|
|
242
|
+
operationId: 'updateUser';
|
|
243
|
+
requestBody: {
|
|
244
|
+
content: {
|
|
245
|
+
'application/json': {
|
|
246
|
+
name?: string;
|
|
247
|
+
email?: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
responses: {
|
|
252
|
+
200: {
|
|
253
|
+
content: {
|
|
254
|
+
'application/json': {
|
|
255
|
+
id: string;
|
|
256
|
+
name: string;
|
|
257
|
+
email: string;
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
delete: {
|
|
264
|
+
operationId: 'deleteUser';
|
|
265
|
+
responses: {
|
|
266
|
+
204: {
|
|
267
|
+
content: never;
|
|
268
|
+
};
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
'/posts': {
|
|
273
|
+
get: {
|
|
274
|
+
operationId: 'listPosts';
|
|
275
|
+
parameters: {
|
|
276
|
+
query: {
|
|
277
|
+
page?: number;
|
|
278
|
+
limit?: number;
|
|
279
|
+
sort?: 'asc' | 'desc';
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
responses: {
|
|
283
|
+
200: {
|
|
284
|
+
content: {
|
|
285
|
+
'application/json': {
|
|
286
|
+
posts: Array<{
|
|
287
|
+
id: string;
|
|
288
|
+
title: string;
|
|
289
|
+
content: string;
|
|
290
|
+
authorId: string;
|
|
291
|
+
createdAt: string;
|
|
292
|
+
}>;
|
|
293
|
+
pagination: {
|
|
294
|
+
page: number;
|
|
295
|
+
limit: number;
|
|
296
|
+
total: number;
|
|
297
|
+
};
|
|
298
|
+
sort: 'asc' | 'desc';
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
'/protected': {
|
|
306
|
+
get: {
|
|
307
|
+
operationId: 'getProtected';
|
|
308
|
+
responses: {
|
|
309
|
+
200: {
|
|
310
|
+
content: {
|
|
311
|
+
'application/json': {
|
|
312
|
+
message: string;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
401: {
|
|
317
|
+
content: {
|
|
318
|
+
'application/json': {
|
|
319
|
+
message: string;
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
};
|
|
326
|
+
'/error': {
|
|
327
|
+
get: {
|
|
328
|
+
operationId: 'getError';
|
|
329
|
+
responses: {
|
|
330
|
+
500: {
|
|
331
|
+
content: {
|
|
332
|
+
'application/json': {
|
|
333
|
+
message: string;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
};
|
|
337
|
+
};
|
|
338
|
+
};
|
|
339
|
+
};
|
|
340
|
+
'/users/paginated': {
|
|
341
|
+
get: {
|
|
342
|
+
operationId: 'getUsersPaginated';
|
|
343
|
+
parameters: {
|
|
344
|
+
query: {
|
|
345
|
+
page?: number;
|
|
346
|
+
limit?: number;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
responses: {
|
|
350
|
+
200: {
|
|
351
|
+
content: {
|
|
352
|
+
'application/json': {
|
|
353
|
+
users: Array<{
|
|
354
|
+
id: string;
|
|
355
|
+
name: string;
|
|
356
|
+
email: string;
|
|
357
|
+
}>;
|
|
358
|
+
pagination: {
|
|
359
|
+
page: number;
|
|
360
|
+
limit: number;
|
|
361
|
+
total: number;
|
|
362
|
+
hasMore: boolean;
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
'/messages': {
|
|
371
|
+
get: {
|
|
372
|
+
operationId: 'getMessages';
|
|
373
|
+
parameters: {
|
|
374
|
+
query: {
|
|
375
|
+
cursor?: string;
|
|
376
|
+
limit?: number;
|
|
377
|
+
};
|
|
378
|
+
};
|
|
379
|
+
responses: {
|
|
380
|
+
200: {
|
|
381
|
+
content: {
|
|
382
|
+
'application/json': {
|
|
383
|
+
messages: Array<{
|
|
384
|
+
id: string;
|
|
385
|
+
text: string;
|
|
386
|
+
timestamp: string;
|
|
387
|
+
}>;
|
|
388
|
+
nextCursor: string | null;
|
|
389
|
+
};
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
'/echo': {
|
|
396
|
+
get: {
|
|
397
|
+
operationId: 'echo';
|
|
398
|
+
parameters: {
|
|
399
|
+
query: {
|
|
400
|
+
[key: string]: string | number | boolean;
|
|
401
|
+
};
|
|
402
|
+
};
|
|
403
|
+
responses: {
|
|
404
|
+
200: {
|
|
405
|
+
content: {
|
|
406
|
+
'application/json': {
|
|
407
|
+
queryParams: Record<string, string>;
|
|
408
|
+
data: Array<{
|
|
409
|
+
id: string;
|
|
410
|
+
value: string;
|
|
411
|
+
}>;
|
|
412
|
+
pagination: {
|
|
413
|
+
page: number;
|
|
414
|
+
limit: number;
|
|
415
|
+
total: number;
|
|
416
|
+
hasMore: boolean;
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
interface components {
|
|
426
|
+
schemas: {
|
|
427
|
+
User: {
|
|
428
|
+
id: string;
|
|
429
|
+
name: string;
|
|
430
|
+
email: string;
|
|
431
|
+
};
|
|
432
|
+
Post: {
|
|
433
|
+
id: string;
|
|
434
|
+
title: string;
|
|
435
|
+
content: string;
|
|
436
|
+
authorId: string;
|
|
437
|
+
createdAt: string;
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
//#endregion
|
|
442
|
+
export { components, paths };
|
|
443
|
+
//# sourceMappingURL=openapi-types.d.mts.map
|