@hestia-earth/caching-api 0.0.2
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/LICENSE +21 -0
- package/README.md +5 -0
- package/index.d.ts +466 -0
- package/openapi.json +509 -0
- package/package.json +36 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Hestia Earth
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/index.d.ts
ADDED
|
@@ -0,0 +1,466 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface paths {
|
|
7
|
+
"/site/{key}": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Read Site Versions
|
|
16
|
+
* @description Retrieves all versions of a site record by its key.
|
|
17
|
+
*/
|
|
18
|
+
get: operations["read_site_versions_site__key__get"];
|
|
19
|
+
put?: never;
|
|
20
|
+
post?: never;
|
|
21
|
+
/**
|
|
22
|
+
* Remove Site Versions
|
|
23
|
+
* @description Deletes all versions of a site record by its key.
|
|
24
|
+
*/
|
|
25
|
+
delete: operations["remove_site_versions_site__key__delete"];
|
|
26
|
+
options?: never;
|
|
27
|
+
head?: never;
|
|
28
|
+
patch?: never;
|
|
29
|
+
trace?: never;
|
|
30
|
+
};
|
|
31
|
+
"/site": {
|
|
32
|
+
parameters: {
|
|
33
|
+
query?: never;
|
|
34
|
+
header?: never;
|
|
35
|
+
path?: never;
|
|
36
|
+
cookie?: never;
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Read All Sites
|
|
40
|
+
* @description Retrieves all site records from the database.
|
|
41
|
+
*/
|
|
42
|
+
get: operations["read_all_sites_site_get"];
|
|
43
|
+
/**
|
|
44
|
+
* Put Site
|
|
45
|
+
* @description Creates or updates a site record via the site service.
|
|
46
|
+
* Supports both POST and PUT for flexibility.
|
|
47
|
+
*/
|
|
48
|
+
put: operations["put_site_site_put"];
|
|
49
|
+
/**
|
|
50
|
+
* Put Site
|
|
51
|
+
* @description Creates or updates a site record via the site service.
|
|
52
|
+
* Supports both POST and PUT for flexibility.
|
|
53
|
+
*/
|
|
54
|
+
post: operations["put_site_site_post"];
|
|
55
|
+
delete?: never;
|
|
56
|
+
options?: never;
|
|
57
|
+
head?: never;
|
|
58
|
+
patch?: never;
|
|
59
|
+
trace?: never;
|
|
60
|
+
};
|
|
61
|
+
"/site/version/{version}": {
|
|
62
|
+
parameters: {
|
|
63
|
+
query?: never;
|
|
64
|
+
header?: never;
|
|
65
|
+
path?: never;
|
|
66
|
+
cookie?: never;
|
|
67
|
+
};
|
|
68
|
+
get?: never;
|
|
69
|
+
put?: never;
|
|
70
|
+
post?: never;
|
|
71
|
+
/**
|
|
72
|
+
* Remove Sites By Version
|
|
73
|
+
* @description Deletes all site records for a given version.
|
|
74
|
+
*/
|
|
75
|
+
delete: operations["remove_sites_by_version_site_version__version__delete"];
|
|
76
|
+
options?: never;
|
|
77
|
+
head?: never;
|
|
78
|
+
patch?: never;
|
|
79
|
+
trace?: never;
|
|
80
|
+
};
|
|
81
|
+
"/site/{key}/{version}": {
|
|
82
|
+
parameters: {
|
|
83
|
+
query?: never;
|
|
84
|
+
header?: never;
|
|
85
|
+
path?: never;
|
|
86
|
+
cookie?: never;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Read Site
|
|
90
|
+
* @description Retrieves a site record by its key and version.
|
|
91
|
+
*/
|
|
92
|
+
get: operations["read_site_site__key___version__get"];
|
|
93
|
+
put?: never;
|
|
94
|
+
post?: never;
|
|
95
|
+
/**
|
|
96
|
+
* Remove Site
|
|
97
|
+
* @description Deletes a specific site record by its key and version.
|
|
98
|
+
*/
|
|
99
|
+
delete: operations["remove_site_site__key___version__delete"];
|
|
100
|
+
options?: never;
|
|
101
|
+
head?: never;
|
|
102
|
+
patch?: never;
|
|
103
|
+
trace?: never;
|
|
104
|
+
};
|
|
105
|
+
"/version": {
|
|
106
|
+
parameters: {
|
|
107
|
+
query?: never;
|
|
108
|
+
header?: never;
|
|
109
|
+
path?: never;
|
|
110
|
+
cookie?: never;
|
|
111
|
+
};
|
|
112
|
+
/** Version */
|
|
113
|
+
get: operations["version_version_get"];
|
|
114
|
+
put?: never;
|
|
115
|
+
post?: never;
|
|
116
|
+
delete?: never;
|
|
117
|
+
options?: never;
|
|
118
|
+
head?: never;
|
|
119
|
+
patch?: never;
|
|
120
|
+
trace?: never;
|
|
121
|
+
};
|
|
122
|
+
"/health": {
|
|
123
|
+
parameters: {
|
|
124
|
+
query?: never;
|
|
125
|
+
header?: never;
|
|
126
|
+
path?: never;
|
|
127
|
+
cookie?: never;
|
|
128
|
+
};
|
|
129
|
+
/** Health Check */
|
|
130
|
+
get: operations["health_check_health_get"];
|
|
131
|
+
put?: never;
|
|
132
|
+
post?: never;
|
|
133
|
+
delete?: never;
|
|
134
|
+
options?: never;
|
|
135
|
+
head?: never;
|
|
136
|
+
patch?: never;
|
|
137
|
+
trace?: never;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
export type webhooks = Record<string, never>;
|
|
141
|
+
export interface components {
|
|
142
|
+
schemas: {
|
|
143
|
+
/** HTTPValidationError */
|
|
144
|
+
HTTPValidationError: {
|
|
145
|
+
/** Detail */
|
|
146
|
+
detail?: components["schemas"]["ValidationError"][];
|
|
147
|
+
};
|
|
148
|
+
/** SiteCreate */
|
|
149
|
+
SiteCreate: {
|
|
150
|
+
/** Key */
|
|
151
|
+
key: string;
|
|
152
|
+
/** Version */
|
|
153
|
+
version: string;
|
|
154
|
+
/** Data */
|
|
155
|
+
data: {
|
|
156
|
+
[key: string]: unknown;
|
|
157
|
+
};
|
|
158
|
+
};
|
|
159
|
+
/** ValidationError */
|
|
160
|
+
ValidationError: {
|
|
161
|
+
/** Location */
|
|
162
|
+
loc: (string | number)[];
|
|
163
|
+
/** Message */
|
|
164
|
+
msg: string;
|
|
165
|
+
/** Error Type */
|
|
166
|
+
type: string;
|
|
167
|
+
/** Input */
|
|
168
|
+
input?: unknown;
|
|
169
|
+
/** Context */
|
|
170
|
+
ctx?: Record<string, never>;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
responses: never;
|
|
174
|
+
parameters: never;
|
|
175
|
+
requestBodies: never;
|
|
176
|
+
headers: never;
|
|
177
|
+
pathItems: never;
|
|
178
|
+
}
|
|
179
|
+
export type $defs = Record<string, never>;
|
|
180
|
+
export interface operations {
|
|
181
|
+
read_site_versions_site__key__get: {
|
|
182
|
+
parameters: {
|
|
183
|
+
query?: never;
|
|
184
|
+
header?: never;
|
|
185
|
+
path: {
|
|
186
|
+
key: string;
|
|
187
|
+
};
|
|
188
|
+
cookie?: never;
|
|
189
|
+
};
|
|
190
|
+
requestBody?: never;
|
|
191
|
+
responses: {
|
|
192
|
+
/** @description Successful Response */
|
|
193
|
+
200: {
|
|
194
|
+
headers: {
|
|
195
|
+
[name: string]: unknown;
|
|
196
|
+
};
|
|
197
|
+
content: {
|
|
198
|
+
"application/json": unknown;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
/** @description Validation Error */
|
|
202
|
+
422: {
|
|
203
|
+
headers: {
|
|
204
|
+
[name: string]: unknown;
|
|
205
|
+
};
|
|
206
|
+
content: {
|
|
207
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
remove_site_versions_site__key__delete: {
|
|
213
|
+
parameters: {
|
|
214
|
+
query?: never;
|
|
215
|
+
header?: never;
|
|
216
|
+
path: {
|
|
217
|
+
key: string;
|
|
218
|
+
};
|
|
219
|
+
cookie?: never;
|
|
220
|
+
};
|
|
221
|
+
requestBody?: never;
|
|
222
|
+
responses: {
|
|
223
|
+
/** @description Successful Response */
|
|
224
|
+
200: {
|
|
225
|
+
headers: {
|
|
226
|
+
[name: string]: unknown;
|
|
227
|
+
};
|
|
228
|
+
content: {
|
|
229
|
+
"application/json": unknown;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
/** @description Validation Error */
|
|
233
|
+
422: {
|
|
234
|
+
headers: {
|
|
235
|
+
[name: string]: unknown;
|
|
236
|
+
};
|
|
237
|
+
content: {
|
|
238
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
read_all_sites_site_get: {
|
|
244
|
+
parameters: {
|
|
245
|
+
query?: never;
|
|
246
|
+
header?: never;
|
|
247
|
+
path?: never;
|
|
248
|
+
cookie?: never;
|
|
249
|
+
};
|
|
250
|
+
requestBody?: never;
|
|
251
|
+
responses: {
|
|
252
|
+
/** @description Successful Response */
|
|
253
|
+
200: {
|
|
254
|
+
headers: {
|
|
255
|
+
[name: string]: unknown;
|
|
256
|
+
};
|
|
257
|
+
content: {
|
|
258
|
+
"application/json": unknown;
|
|
259
|
+
};
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
};
|
|
263
|
+
put_site_site_put: {
|
|
264
|
+
parameters: {
|
|
265
|
+
query?: never;
|
|
266
|
+
header?: never;
|
|
267
|
+
path?: never;
|
|
268
|
+
cookie?: never;
|
|
269
|
+
};
|
|
270
|
+
requestBody: {
|
|
271
|
+
content: {
|
|
272
|
+
"application/json": components["schemas"]["SiteCreate"];
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
responses: {
|
|
276
|
+
/** @description Successful Response */
|
|
277
|
+
200: {
|
|
278
|
+
headers: {
|
|
279
|
+
[name: string]: unknown;
|
|
280
|
+
};
|
|
281
|
+
content: {
|
|
282
|
+
"application/json": unknown;
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
/** @description Validation Error */
|
|
286
|
+
422: {
|
|
287
|
+
headers: {
|
|
288
|
+
[name: string]: unknown;
|
|
289
|
+
};
|
|
290
|
+
content: {
|
|
291
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
put_site_site_post: {
|
|
297
|
+
parameters: {
|
|
298
|
+
query?: never;
|
|
299
|
+
header?: never;
|
|
300
|
+
path?: never;
|
|
301
|
+
cookie?: never;
|
|
302
|
+
};
|
|
303
|
+
requestBody: {
|
|
304
|
+
content: {
|
|
305
|
+
"application/json": components["schemas"]["SiteCreate"];
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
responses: {
|
|
309
|
+
/** @description Successful Response */
|
|
310
|
+
200: {
|
|
311
|
+
headers: {
|
|
312
|
+
[name: string]: unknown;
|
|
313
|
+
};
|
|
314
|
+
content: {
|
|
315
|
+
"application/json": unknown;
|
|
316
|
+
};
|
|
317
|
+
};
|
|
318
|
+
/** @description Validation Error */
|
|
319
|
+
422: {
|
|
320
|
+
headers: {
|
|
321
|
+
[name: string]: unknown;
|
|
322
|
+
};
|
|
323
|
+
content: {
|
|
324
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
};
|
|
329
|
+
remove_sites_by_version_site_version__version__delete: {
|
|
330
|
+
parameters: {
|
|
331
|
+
query?: never;
|
|
332
|
+
header?: never;
|
|
333
|
+
path: {
|
|
334
|
+
version: string;
|
|
335
|
+
};
|
|
336
|
+
cookie?: never;
|
|
337
|
+
};
|
|
338
|
+
requestBody?: never;
|
|
339
|
+
responses: {
|
|
340
|
+
/** @description Successful Response */
|
|
341
|
+
200: {
|
|
342
|
+
headers: {
|
|
343
|
+
[name: string]: unknown;
|
|
344
|
+
};
|
|
345
|
+
content: {
|
|
346
|
+
"application/json": unknown;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
/** @description Validation Error */
|
|
350
|
+
422: {
|
|
351
|
+
headers: {
|
|
352
|
+
[name: string]: unknown;
|
|
353
|
+
};
|
|
354
|
+
content: {
|
|
355
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
356
|
+
};
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
read_site_site__key___version__get: {
|
|
361
|
+
parameters: {
|
|
362
|
+
query?: {
|
|
363
|
+
years?: string[];
|
|
364
|
+
};
|
|
365
|
+
header?: never;
|
|
366
|
+
path: {
|
|
367
|
+
key: string;
|
|
368
|
+
version: string;
|
|
369
|
+
};
|
|
370
|
+
cookie?: never;
|
|
371
|
+
};
|
|
372
|
+
requestBody?: never;
|
|
373
|
+
responses: {
|
|
374
|
+
/** @description Successful Response */
|
|
375
|
+
200: {
|
|
376
|
+
headers: {
|
|
377
|
+
[name: string]: unknown;
|
|
378
|
+
};
|
|
379
|
+
content: {
|
|
380
|
+
"application/json": unknown;
|
|
381
|
+
};
|
|
382
|
+
};
|
|
383
|
+
/** @description Validation Error */
|
|
384
|
+
422: {
|
|
385
|
+
headers: {
|
|
386
|
+
[name: string]: unknown;
|
|
387
|
+
};
|
|
388
|
+
content: {
|
|
389
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
remove_site_site__key___version__delete: {
|
|
395
|
+
parameters: {
|
|
396
|
+
query?: never;
|
|
397
|
+
header?: never;
|
|
398
|
+
path: {
|
|
399
|
+
key: string;
|
|
400
|
+
version: string;
|
|
401
|
+
};
|
|
402
|
+
cookie?: never;
|
|
403
|
+
};
|
|
404
|
+
requestBody?: never;
|
|
405
|
+
responses: {
|
|
406
|
+
/** @description Successful Response */
|
|
407
|
+
200: {
|
|
408
|
+
headers: {
|
|
409
|
+
[name: string]: unknown;
|
|
410
|
+
};
|
|
411
|
+
content: {
|
|
412
|
+
"application/json": unknown;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
/** @description Validation Error */
|
|
416
|
+
422: {
|
|
417
|
+
headers: {
|
|
418
|
+
[name: string]: unknown;
|
|
419
|
+
};
|
|
420
|
+
content: {
|
|
421
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
422
|
+
};
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
version_version_get: {
|
|
427
|
+
parameters: {
|
|
428
|
+
query?: never;
|
|
429
|
+
header?: never;
|
|
430
|
+
path?: never;
|
|
431
|
+
cookie?: never;
|
|
432
|
+
};
|
|
433
|
+
requestBody?: never;
|
|
434
|
+
responses: {
|
|
435
|
+
/** @description Successful Response */
|
|
436
|
+
200: {
|
|
437
|
+
headers: {
|
|
438
|
+
[name: string]: unknown;
|
|
439
|
+
};
|
|
440
|
+
content: {
|
|
441
|
+
"application/json": unknown;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
health_check_health_get: {
|
|
447
|
+
parameters: {
|
|
448
|
+
query?: never;
|
|
449
|
+
header?: never;
|
|
450
|
+
path?: never;
|
|
451
|
+
cookie?: never;
|
|
452
|
+
};
|
|
453
|
+
requestBody?: never;
|
|
454
|
+
responses: {
|
|
455
|
+
/** @description Successful Response */
|
|
456
|
+
200: {
|
|
457
|
+
headers: {
|
|
458
|
+
[name: string]: unknown;
|
|
459
|
+
};
|
|
460
|
+
content: {
|
|
461
|
+
"application/json": unknown;
|
|
462
|
+
};
|
|
463
|
+
};
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
}
|
package/openapi.json
ADDED
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
{
|
|
2
|
+
"openapi": "3.1.0",
|
|
3
|
+
"info": {
|
|
4
|
+
"title": "FastAPI",
|
|
5
|
+
"version": "0.1.0"
|
|
6
|
+
},
|
|
7
|
+
"paths": {
|
|
8
|
+
"/site/{key}": {
|
|
9
|
+
"get": {
|
|
10
|
+
"tags": [
|
|
11
|
+
"site"
|
|
12
|
+
],
|
|
13
|
+
"summary": "Read Site Versions",
|
|
14
|
+
"description": "Retrieves all versions of a site record by its key.",
|
|
15
|
+
"operationId": "read_site_versions_site__key__get",
|
|
16
|
+
"security": [
|
|
17
|
+
{
|
|
18
|
+
"APIKeyHeader": []
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"parameters": [
|
|
22
|
+
{
|
|
23
|
+
"name": "key",
|
|
24
|
+
"in": "path",
|
|
25
|
+
"required": true,
|
|
26
|
+
"schema": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"title": "Key"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"responses": {
|
|
33
|
+
"200": {
|
|
34
|
+
"description": "Successful Response",
|
|
35
|
+
"content": {
|
|
36
|
+
"application/json": {
|
|
37
|
+
"schema": {}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"422": {
|
|
42
|
+
"description": "Validation Error",
|
|
43
|
+
"content": {
|
|
44
|
+
"application/json": {
|
|
45
|
+
"schema": {
|
|
46
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"delete": {
|
|
54
|
+
"tags": [
|
|
55
|
+
"site"
|
|
56
|
+
],
|
|
57
|
+
"summary": "Remove Site Versions",
|
|
58
|
+
"description": "Deletes all versions of a site record by its key.",
|
|
59
|
+
"operationId": "remove_site_versions_site__key__delete",
|
|
60
|
+
"security": [
|
|
61
|
+
{
|
|
62
|
+
"APIKeyHeader": []
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"parameters": [
|
|
66
|
+
{
|
|
67
|
+
"name": "key",
|
|
68
|
+
"in": "path",
|
|
69
|
+
"required": true,
|
|
70
|
+
"schema": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"title": "Key"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"responses": {
|
|
77
|
+
"200": {
|
|
78
|
+
"description": "Successful Response",
|
|
79
|
+
"content": {
|
|
80
|
+
"application/json": {
|
|
81
|
+
"schema": {}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"422": {
|
|
86
|
+
"description": "Validation Error",
|
|
87
|
+
"content": {
|
|
88
|
+
"application/json": {
|
|
89
|
+
"schema": {
|
|
90
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
"/site": {
|
|
99
|
+
"get": {
|
|
100
|
+
"tags": [
|
|
101
|
+
"site"
|
|
102
|
+
],
|
|
103
|
+
"summary": "Read All Sites",
|
|
104
|
+
"description": "Retrieves all site records from the database.",
|
|
105
|
+
"operationId": "read_all_sites_site_get",
|
|
106
|
+
"responses": {
|
|
107
|
+
"200": {
|
|
108
|
+
"description": "Successful Response",
|
|
109
|
+
"content": {
|
|
110
|
+
"application/json": {
|
|
111
|
+
"schema": {}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
"security": [
|
|
117
|
+
{
|
|
118
|
+
"APIKeyHeader": []
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"put": {
|
|
123
|
+
"tags": [
|
|
124
|
+
"site"
|
|
125
|
+
],
|
|
126
|
+
"summary": "Put Site",
|
|
127
|
+
"description": "Creates or updates a site record via the site service.\nSupports both POST and PUT for flexibility.",
|
|
128
|
+
"operationId": "put_site_site_put",
|
|
129
|
+
"requestBody": {
|
|
130
|
+
"content": {
|
|
131
|
+
"application/json": {
|
|
132
|
+
"schema": {
|
|
133
|
+
"$ref": "#/components/schemas/SiteCreate"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"required": true
|
|
138
|
+
},
|
|
139
|
+
"responses": {
|
|
140
|
+
"200": {
|
|
141
|
+
"description": "Successful Response",
|
|
142
|
+
"content": {
|
|
143
|
+
"application/json": {
|
|
144
|
+
"schema": {}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"422": {
|
|
149
|
+
"description": "Validation Error",
|
|
150
|
+
"content": {
|
|
151
|
+
"application/json": {
|
|
152
|
+
"schema": {
|
|
153
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"security": [
|
|
160
|
+
{
|
|
161
|
+
"APIKeyHeader": []
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
},
|
|
165
|
+
"post": {
|
|
166
|
+
"tags": [
|
|
167
|
+
"site"
|
|
168
|
+
],
|
|
169
|
+
"summary": "Put Site",
|
|
170
|
+
"description": "Creates or updates a site record via the site service.\nSupports both POST and PUT for flexibility.",
|
|
171
|
+
"operationId": "put_site_site_post",
|
|
172
|
+
"requestBody": {
|
|
173
|
+
"content": {
|
|
174
|
+
"application/json": {
|
|
175
|
+
"schema": {
|
|
176
|
+
"$ref": "#/components/schemas/SiteCreate"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"required": true
|
|
181
|
+
},
|
|
182
|
+
"responses": {
|
|
183
|
+
"200": {
|
|
184
|
+
"description": "Successful Response",
|
|
185
|
+
"content": {
|
|
186
|
+
"application/json": {
|
|
187
|
+
"schema": {}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"422": {
|
|
192
|
+
"description": "Validation Error",
|
|
193
|
+
"content": {
|
|
194
|
+
"application/json": {
|
|
195
|
+
"schema": {
|
|
196
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"security": [
|
|
203
|
+
{
|
|
204
|
+
"APIKeyHeader": []
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"/site/version/{version}": {
|
|
210
|
+
"delete": {
|
|
211
|
+
"tags": [
|
|
212
|
+
"site"
|
|
213
|
+
],
|
|
214
|
+
"summary": "Remove Sites By Version",
|
|
215
|
+
"description": "Deletes all site records for a given version.",
|
|
216
|
+
"operationId": "remove_sites_by_version_site_version__version__delete",
|
|
217
|
+
"security": [
|
|
218
|
+
{
|
|
219
|
+
"APIKeyHeader": []
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"parameters": [
|
|
223
|
+
{
|
|
224
|
+
"name": "version",
|
|
225
|
+
"in": "path",
|
|
226
|
+
"required": true,
|
|
227
|
+
"schema": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"title": "Version"
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"responses": {
|
|
234
|
+
"200": {
|
|
235
|
+
"description": "Successful Response",
|
|
236
|
+
"content": {
|
|
237
|
+
"application/json": {
|
|
238
|
+
"schema": {}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"422": {
|
|
243
|
+
"description": "Validation Error",
|
|
244
|
+
"content": {
|
|
245
|
+
"application/json": {
|
|
246
|
+
"schema": {
|
|
247
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"/site/{key}/{version}": {
|
|
256
|
+
"get": {
|
|
257
|
+
"tags": [
|
|
258
|
+
"site"
|
|
259
|
+
],
|
|
260
|
+
"summary": "Read Site",
|
|
261
|
+
"description": "Retrieves a site record by its key and version.",
|
|
262
|
+
"operationId": "read_site_site__key___version__get",
|
|
263
|
+
"security": [
|
|
264
|
+
{
|
|
265
|
+
"APIKeyHeader": []
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"parameters": [
|
|
269
|
+
{
|
|
270
|
+
"name": "key",
|
|
271
|
+
"in": "path",
|
|
272
|
+
"required": true,
|
|
273
|
+
"schema": {
|
|
274
|
+
"type": "string",
|
|
275
|
+
"title": "Key"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"name": "version",
|
|
280
|
+
"in": "path",
|
|
281
|
+
"required": true,
|
|
282
|
+
"schema": {
|
|
283
|
+
"type": "string",
|
|
284
|
+
"title": "Version"
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"name": "years",
|
|
289
|
+
"in": "query",
|
|
290
|
+
"required": false,
|
|
291
|
+
"schema": {
|
|
292
|
+
"type": "array",
|
|
293
|
+
"items": {
|
|
294
|
+
"type": "string"
|
|
295
|
+
},
|
|
296
|
+
"title": "Years"
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"responses": {
|
|
301
|
+
"200": {
|
|
302
|
+
"description": "Successful Response",
|
|
303
|
+
"content": {
|
|
304
|
+
"application/json": {
|
|
305
|
+
"schema": {}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"422": {
|
|
310
|
+
"description": "Validation Error",
|
|
311
|
+
"content": {
|
|
312
|
+
"application/json": {
|
|
313
|
+
"schema": {
|
|
314
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"delete": {
|
|
322
|
+
"tags": [
|
|
323
|
+
"site"
|
|
324
|
+
],
|
|
325
|
+
"summary": "Remove Site",
|
|
326
|
+
"description": "Deletes a specific site record by its key and version.",
|
|
327
|
+
"operationId": "remove_site_site__key___version__delete",
|
|
328
|
+
"security": [
|
|
329
|
+
{
|
|
330
|
+
"APIKeyHeader": []
|
|
331
|
+
}
|
|
332
|
+
],
|
|
333
|
+
"parameters": [
|
|
334
|
+
{
|
|
335
|
+
"name": "key",
|
|
336
|
+
"in": "path",
|
|
337
|
+
"required": true,
|
|
338
|
+
"schema": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"title": "Key"
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"name": "version",
|
|
345
|
+
"in": "path",
|
|
346
|
+
"required": true,
|
|
347
|
+
"schema": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"title": "Version"
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
],
|
|
353
|
+
"responses": {
|
|
354
|
+
"200": {
|
|
355
|
+
"description": "Successful Response",
|
|
356
|
+
"content": {
|
|
357
|
+
"application/json": {
|
|
358
|
+
"schema": {}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"422": {
|
|
363
|
+
"description": "Validation Error",
|
|
364
|
+
"content": {
|
|
365
|
+
"application/json": {
|
|
366
|
+
"schema": {
|
|
367
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
"/version": {
|
|
376
|
+
"get": {
|
|
377
|
+
"tags": [
|
|
378
|
+
"version"
|
|
379
|
+
],
|
|
380
|
+
"summary": "Version",
|
|
381
|
+
"operationId": "version_version_get",
|
|
382
|
+
"responses": {
|
|
383
|
+
"200": {
|
|
384
|
+
"description": "Successful Response",
|
|
385
|
+
"content": {
|
|
386
|
+
"application/json": {
|
|
387
|
+
"schema": {}
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
},
|
|
392
|
+
"security": [
|
|
393
|
+
{
|
|
394
|
+
"APIKeyHeader": []
|
|
395
|
+
}
|
|
396
|
+
]
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"/health": {
|
|
400
|
+
"get": {
|
|
401
|
+
"summary": "Health Check",
|
|
402
|
+
"operationId": "health_check_health_get",
|
|
403
|
+
"responses": {
|
|
404
|
+
"200": {
|
|
405
|
+
"description": "Successful Response",
|
|
406
|
+
"content": {
|
|
407
|
+
"application/json": {
|
|
408
|
+
"schema": {}
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"security": [
|
|
414
|
+
{
|
|
415
|
+
"APIKeyHeader": []
|
|
416
|
+
}
|
|
417
|
+
]
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"components": {
|
|
422
|
+
"schemas": {
|
|
423
|
+
"HTTPValidationError": {
|
|
424
|
+
"properties": {
|
|
425
|
+
"detail": {
|
|
426
|
+
"items": {
|
|
427
|
+
"$ref": "#/components/schemas/ValidationError"
|
|
428
|
+
},
|
|
429
|
+
"type": "array",
|
|
430
|
+
"title": "Detail"
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
"type": "object",
|
|
434
|
+
"title": "HTTPValidationError"
|
|
435
|
+
},
|
|
436
|
+
"SiteCreate": {
|
|
437
|
+
"properties": {
|
|
438
|
+
"key": {
|
|
439
|
+
"type": "string",
|
|
440
|
+
"title": "Key"
|
|
441
|
+
},
|
|
442
|
+
"version": {
|
|
443
|
+
"type": "string",
|
|
444
|
+
"title": "Version"
|
|
445
|
+
},
|
|
446
|
+
"data": {
|
|
447
|
+
"additionalProperties": true,
|
|
448
|
+
"type": "object",
|
|
449
|
+
"title": "Data"
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
"type": "object",
|
|
453
|
+
"required": [
|
|
454
|
+
"key",
|
|
455
|
+
"version",
|
|
456
|
+
"data"
|
|
457
|
+
],
|
|
458
|
+
"title": "SiteCreate"
|
|
459
|
+
},
|
|
460
|
+
"ValidationError": {
|
|
461
|
+
"properties": {
|
|
462
|
+
"loc": {
|
|
463
|
+
"items": {
|
|
464
|
+
"anyOf": [
|
|
465
|
+
{
|
|
466
|
+
"type": "string"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"type": "integer"
|
|
470
|
+
}
|
|
471
|
+
]
|
|
472
|
+
},
|
|
473
|
+
"type": "array",
|
|
474
|
+
"title": "Location"
|
|
475
|
+
},
|
|
476
|
+
"msg": {
|
|
477
|
+
"type": "string",
|
|
478
|
+
"title": "Message"
|
|
479
|
+
},
|
|
480
|
+
"type": {
|
|
481
|
+
"type": "string",
|
|
482
|
+
"title": "Error Type"
|
|
483
|
+
},
|
|
484
|
+
"input": {
|
|
485
|
+
"title": "Input"
|
|
486
|
+
},
|
|
487
|
+
"ctx": {
|
|
488
|
+
"type": "object",
|
|
489
|
+
"title": "Context"
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"type": "object",
|
|
493
|
+
"required": [
|
|
494
|
+
"loc",
|
|
495
|
+
"msg",
|
|
496
|
+
"type"
|
|
497
|
+
],
|
|
498
|
+
"title": "ValidationError"
|
|
499
|
+
}
|
|
500
|
+
},
|
|
501
|
+
"securitySchemes": {
|
|
502
|
+
"APIKeyHeader": {
|
|
503
|
+
"type": "apiKey",
|
|
504
|
+
"in": "header",
|
|
505
|
+
"name": "X-API-KEY"
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hestia-earth/caching-api",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "FastAPI application for caching Site data",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"index.d.ts",
|
|
9
|
+
"openapi.json"
|
|
10
|
+
],
|
|
11
|
+
"author": "Guillaume Royer <guillaume@hestia.earth>",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://gitlab.com/hestia-earth/hestia-caching-api.git"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://gitlab.com/hestia-earth/hestia-caching-api/issues"
|
|
19
|
+
},
|
|
20
|
+
"homepage": "https://gitlab.com/hestia-earth/hestia-caching-api#readme",
|
|
21
|
+
"scripts": {
|
|
22
|
+
"generate-openapi": "python3 scripts/generate_openapi.py",
|
|
23
|
+
"generate-types": "npm run generate-openapi && npx openapi-typescript openapi.json -o index.d.ts",
|
|
24
|
+
"prepare": "husky",
|
|
25
|
+
"pre-release": "standard-version --prerelease && git push origin develop --follow-tags",
|
|
26
|
+
"release": "standard-version -a",
|
|
27
|
+
"postrelease": "git push origin master --follow-tags"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@commitlint/cli": "^19.0.0",
|
|
31
|
+
"@commitlint/config-conventional": "^19.0.0",
|
|
32
|
+
"husky": "^9.0.0",
|
|
33
|
+
"openapi-typescript": "^7.13.0",
|
|
34
|
+
"standard-version": "^9.5.0"
|
|
35
|
+
}
|
|
36
|
+
}
|