@free-api-list/catalog 0.0.0 → 0.1.0
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 +18 -0
- package/apis/abibliadigital.json +40 -0
- package/apis/administrative-divisions-db.json +22 -0
- package/apis/amiibo.json +18 -0
- package/apis/art-institute-chicago.json +35 -0
- package/apis/balldontlie.json +22 -0
- package/apis/bible-api.json +32 -0
- package/apis/cat-facts-ninja.json +16 -0
- package/apis/cataas.json +39 -0
- package/apis/cheapshark.json +22 -0
- package/apis/chuck-norris.json +25 -0
- package/apis/citybikes.json +18 -0
- package/apis/cloudflare-trace.json +22 -0
- package/apis/corp-buzzwords.json +18 -0
- package/apis/country-is.json +22 -0
- package/apis/daily-cat-facts.json +18 -0
- package/apis/dog-api.json +30 -0
- package/apis/dog-ceo.json +37 -0
- package/apis/emojihub.json +29 -0
- package/apis/free-dictionary.json +22 -0
- package/apis/geojs.json +28 -0
- package/apis/get-the-data.json +22 -0
- package/apis/gutendex.json +25 -0
- package/apis/jcquotes.json +16 -0
- package/apis/longevity-world-cup.json +27 -0
- package/apis/makeup-api.json +22 -0
- package/apis/market-trends-glimpse.json +47 -0
- package/apis/meow-facts.json +21 -0
- package/apis/met-museum.json +44 -0
- package/apis/nekos-best.json +22 -0
- package/apis/poetrydb.json +16 -0
- package/apis/quran-cloud.json +22 -0
- package/apis/random-dog.json +18 -0
- package/apis/shibe-online.json +22 -0
- package/apis/studio-ghibli.json +22 -0
- package/apis/techy.json +22 -0
- package/apis/uk-carbon-intensity.json +22 -0
- package/apis/world-cup-2026-tour.json +37 -0
- package/categories.json +53 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/load.d.ts +18 -0
- package/dist/load.js +92 -0
- package/dist/schema.d.ts +115 -0
- package/dist/schema.js +44 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.js +1 -0
- package/package.json +62 -9
package/dist/schema.d.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const HttpMethod: z.ZodEnum<{
|
|
3
|
+
DELETE: "DELETE";
|
|
4
|
+
GET: "GET";
|
|
5
|
+
PATCH: "PATCH";
|
|
6
|
+
POST: "POST";
|
|
7
|
+
PUT: "PUT";
|
|
8
|
+
}>;
|
|
9
|
+
export type HttpMethod = z.infer<typeof HttpMethod>;
|
|
10
|
+
export declare const EndpointSchema: z.ZodObject<{
|
|
11
|
+
path: z.ZodString;
|
|
12
|
+
method: z.ZodEnum<{
|
|
13
|
+
DELETE: "DELETE";
|
|
14
|
+
GET: "GET";
|
|
15
|
+
PATCH: "PATCH";
|
|
16
|
+
POST: "POST";
|
|
17
|
+
PUT: "PUT";
|
|
18
|
+
}>;
|
|
19
|
+
description: z.ZodString;
|
|
20
|
+
sampleRequest: z.ZodOptional<z.ZodString>;
|
|
21
|
+
sampleResponse: z.ZodOptional<z.ZodString>;
|
|
22
|
+
}, z.core.$strip>;
|
|
23
|
+
export type Endpoint = z.infer<typeof EndpointSchema>;
|
|
24
|
+
export declare const AuthSchema: z.ZodObject<{
|
|
25
|
+
required: z.ZodBoolean;
|
|
26
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
27
|
+
api_key: "api_key";
|
|
28
|
+
basic: "basic";
|
|
29
|
+
bearer: "bearer";
|
|
30
|
+
none: "none";
|
|
31
|
+
oauth: "oauth";
|
|
32
|
+
}>>;
|
|
33
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type Auth = z.infer<typeof AuthSchema>;
|
|
36
|
+
export declare const Difficulty: z.ZodEnum<{
|
|
37
|
+
advanced: "advanced";
|
|
38
|
+
beginner: "beginner";
|
|
39
|
+
intermediate: "intermediate";
|
|
40
|
+
}>;
|
|
41
|
+
export type Difficulty = z.infer<typeof Difficulty>;
|
|
42
|
+
export declare const Cors: z.ZodEnum<{
|
|
43
|
+
no: "no";
|
|
44
|
+
unknown: "unknown";
|
|
45
|
+
yes: "yes";
|
|
46
|
+
}>;
|
|
47
|
+
export type Cors = z.infer<typeof Cors>;
|
|
48
|
+
export declare const Pricing: z.ZodEnum<{
|
|
49
|
+
free: "free";
|
|
50
|
+
freemium: "freemium";
|
|
51
|
+
trial: "trial";
|
|
52
|
+
}>;
|
|
53
|
+
export type Pricing = z.infer<typeof Pricing>;
|
|
54
|
+
export declare const ApiEntrySchema: z.ZodObject<{
|
|
55
|
+
id: z.ZodString;
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
description: z.ZodString;
|
|
58
|
+
category: z.ZodString;
|
|
59
|
+
difficulty: z.ZodEnum<{
|
|
60
|
+
advanced: "advanced";
|
|
61
|
+
beginner: "beginner";
|
|
62
|
+
intermediate: "intermediate";
|
|
63
|
+
}>;
|
|
64
|
+
baseUrl: z.ZodString;
|
|
65
|
+
documentationUrl: z.ZodString;
|
|
66
|
+
auth: z.ZodObject<{
|
|
67
|
+
required: z.ZodBoolean;
|
|
68
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
69
|
+
api_key: "api_key";
|
|
70
|
+
basic: "basic";
|
|
71
|
+
bearer: "bearer";
|
|
72
|
+
none: "none";
|
|
73
|
+
oauth: "oauth";
|
|
74
|
+
}>>;
|
|
75
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
endpoints: z.ZodArray<z.ZodObject<{
|
|
78
|
+
path: z.ZodString;
|
|
79
|
+
method: z.ZodEnum<{
|
|
80
|
+
DELETE: "DELETE";
|
|
81
|
+
GET: "GET";
|
|
82
|
+
PATCH: "PATCH";
|
|
83
|
+
POST: "POST";
|
|
84
|
+
PUT: "PUT";
|
|
85
|
+
}>;
|
|
86
|
+
description: z.ZodString;
|
|
87
|
+
sampleRequest: z.ZodOptional<z.ZodString>;
|
|
88
|
+
sampleResponse: z.ZodOptional<z.ZodString>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
91
|
+
cors: z.ZodDefault<z.ZodEnum<{
|
|
92
|
+
no: "no";
|
|
93
|
+
unknown: "unknown";
|
|
94
|
+
yes: "yes";
|
|
95
|
+
}>>;
|
|
96
|
+
https: z.ZodDefault<z.ZodBoolean>;
|
|
97
|
+
pricing: z.ZodDefault<z.ZodEnum<{
|
|
98
|
+
free: "free";
|
|
99
|
+
freemium: "freemium";
|
|
100
|
+
trial: "trial";
|
|
101
|
+
}>>;
|
|
102
|
+
addedAt: z.ZodString;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export type ApiEntry = z.infer<typeof ApiEntrySchema>;
|
|
105
|
+
export declare const CategorySchema: z.ZodObject<{
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
label: z.ZodString;
|
|
108
|
+
description: z.ZodOptional<z.ZodString>;
|
|
109
|
+
}, z.core.$strip>;
|
|
110
|
+
export type Category = z.infer<typeof CategorySchema>;
|
|
111
|
+
export declare const CategoriesFileSchema: z.ZodArray<z.ZodObject<{
|
|
112
|
+
id: z.ZodString;
|
|
113
|
+
label: z.ZodString;
|
|
114
|
+
description: z.ZodOptional<z.ZodString>;
|
|
115
|
+
}, z.core.$strip>>;
|
package/dist/schema.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const HttpMethod = z.enum(["GET", "POST", "PUT", "PATCH", "DELETE"]);
|
|
3
|
+
export const EndpointSchema = z.object({
|
|
4
|
+
path: z.string().min(1),
|
|
5
|
+
method: HttpMethod,
|
|
6
|
+
description: z.string().min(1),
|
|
7
|
+
sampleRequest: z.string().optional(),
|
|
8
|
+
sampleResponse: z.string().optional(),
|
|
9
|
+
});
|
|
10
|
+
export const AuthSchema = z.object({
|
|
11
|
+
required: z.boolean(),
|
|
12
|
+
type: z.enum(["none", "api_key", "oauth", "bearer", "basic"]).optional(),
|
|
13
|
+
notes: z.string().optional(),
|
|
14
|
+
});
|
|
15
|
+
export const Difficulty = z.enum(["beginner", "intermediate", "advanced"]);
|
|
16
|
+
export const Cors = z.enum(["yes", "no", "unknown"]);
|
|
17
|
+
export const Pricing = z.enum(["free", "freemium", "trial"]);
|
|
18
|
+
export const ApiEntrySchema = z.object({
|
|
19
|
+
id: z
|
|
20
|
+
.string()
|
|
21
|
+
.regex(/^[a-z0-9-]+$/, "id must be kebab-case (lowercase letters, digits, hyphens)"),
|
|
22
|
+
name: z.string().min(1),
|
|
23
|
+
description: z.string().min(20).max(500),
|
|
24
|
+
category: z
|
|
25
|
+
.string()
|
|
26
|
+
.min(1)
|
|
27
|
+
.regex(/^[a-z0-9-]+$/, "category must be kebab-case"),
|
|
28
|
+
difficulty: Difficulty,
|
|
29
|
+
baseUrl: z.string().url(),
|
|
30
|
+
documentationUrl: z.string().url(),
|
|
31
|
+
auth: AuthSchema,
|
|
32
|
+
endpoints: z.array(EndpointSchema).min(1),
|
|
33
|
+
tags: z.array(z.string()).default([]),
|
|
34
|
+
cors: Cors.default("unknown"),
|
|
35
|
+
https: z.boolean().default(true),
|
|
36
|
+
pricing: Pricing.default("free"),
|
|
37
|
+
addedAt: z.string().date(),
|
|
38
|
+
});
|
|
39
|
+
export const CategorySchema = z.object({
|
|
40
|
+
id: z.string().regex(/^[a-z0-9-]+$/, "category id must be kebab-case"),
|
|
41
|
+
label: z.string().min(1),
|
|
42
|
+
description: z.string().optional(),
|
|
43
|
+
});
|
|
44
|
+
export const CategoriesFileSchema = z.array(CategorySchema);
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ApiEntry, Auth, Category, Cors, Difficulty, Endpoint, HttpMethod, Pricing, } from "./schema.js";
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,13 +1,66 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@free-api-list/catalog",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "A Zod-validated catalog of free public APIs: the JSON entries, the schema and a loader.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"free-api",
|
|
7
|
+
"public-api",
|
|
8
|
+
"api-catalog",
|
|
9
|
+
"api-list",
|
|
10
|
+
"zod"
|
|
11
|
+
],
|
|
12
|
+
"homepage": "https://github.com/Curtis-Thomas/free-api-list-with-react/tree/main/packages/catalog#readme",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/Curtis-Thomas/free-api-list-with-react/issues"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/Curtis-Thomas/free-api-list-with-react.git",
|
|
19
|
+
"directory": "packages/catalog"
|
|
8
20
|
},
|
|
9
|
-
"keywords": [],
|
|
10
|
-
"author": "",
|
|
11
21
|
"license": "MIT",
|
|
12
|
-
"type": "
|
|
13
|
-
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"default": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./load": {
|
|
31
|
+
"types": "./dist/load.d.ts",
|
|
32
|
+
"default": "./dist/load.js"
|
|
33
|
+
},
|
|
34
|
+
"./categories.json": "./categories.json",
|
|
35
|
+
"./apis/*.json": "./apis/*.json",
|
|
36
|
+
"./package.json": "./package.json"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"apis/*.json",
|
|
41
|
+
"categories.json"
|
|
42
|
+
],
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">=24.0.0"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public",
|
|
48
|
+
"provenance": true
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"zod": "^4.6.7"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@types/node": "^26.6.11",
|
|
55
|
+
"tsx": "^4.23.15",
|
|
56
|
+
"typescript": "^7.0.2",
|
|
57
|
+
"vitest": "^5.1.2"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"build": "tsc -p tsconfig.build.json",
|
|
61
|
+
"typecheck": "tsc --noEmit",
|
|
62
|
+
"test": "vitest run --passWithNoTests",
|
|
63
|
+
"validate": "tsx scripts/validate.ts",
|
|
64
|
+
"health": "tsx scripts/check-health.ts"
|
|
65
|
+
}
|
|
66
|
+
}
|