@apifreaks/openapi-specs 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.
Files changed (109) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +156 -0
  3. package/dist/index.cjs +44663 -0
  4. package/dist/index.d.cts +30 -0
  5. package/dist/index.d.ts +30 -0
  6. package/dist/index.js +44631 -0
  7. package/package.json +81 -0
  8. package/specs/commodity/commodity-fluctuation.json +301 -0
  9. package/specs/commodity/commodity-prices.json +317 -0
  10. package/specs/commodity/commodity-symbols.json +215 -0
  11. package/specs/commodity/commodity-time-series.json +329 -0
  12. package/specs/commodity/historical-commodity-prices.json +273 -0
  13. package/specs/currency/currency-converter.json +261 -0
  14. package/specs/currency/currency-fluctuation.json +282 -0
  15. package/specs/currency/currency-historical-data-limit.json +158 -0
  16. package/specs/currency/currency-rate.json +229 -0
  17. package/specs/currency/currency-supported.json +234 -0
  18. package/specs/currency/currency-symbols.json +161 -0
  19. package/specs/currency/currency-time-series.json +325 -0
  20. package/specs/currency/geolocalized-currency-conversion.json +287 -0
  21. package/specs/currency/historical-currency-converter.json +269 -0
  22. package/specs/currency/historical-currency-rate.json +246 -0
  23. package/specs/dns/bulk-dns-lookup.json +624 -0
  24. package/specs/dns/dns-history-lookup.json +579 -0
  25. package/specs/dns/dns-lookup.json +466 -0
  26. package/specs/dns/reverse-dns-lookup.json +414 -0
  27. package/specs/domain/bulk-domain-checker.json +284 -0
  28. package/specs/domain/domain-search-with-suggestions.json +280 -0
  29. package/specs/domain/domain-search.json +206 -0
  30. package/specs/domain/subdomain-lookup.json +343 -0
  31. package/specs/email-validation/bulk-email-validation.json +534 -0
  32. package/specs/email-validation/email-checker.json +586 -0
  33. package/specs/financial/bulk-vat-rates-country.json +341 -0
  34. package/specs/financial/financial-apis-supported-countries.json +204 -0
  35. package/specs/financial/iban-validation.json +328 -0
  36. package/specs/financial/swift-code-finder.json +192 -0
  37. package/specs/financial/swift-code-lookup.json +220 -0
  38. package/specs/financial/vat-number-validation.json +283 -0
  39. package/specs/financial/vat-rates-by-ip.json +275 -0
  40. package/specs/financial/vat-rates-country.json +288 -0
  41. package/specs/general/usage-credits.json +218 -0
  42. package/specs/geocoding/forward-geocoding.json +402 -0
  43. package/specs/geocoding/reverse-geocoding.json +326 -0
  44. package/specs/geodb/administrative-units-details.json +250 -0
  45. package/specs/geodb/administrative-units-levels.json +198 -0
  46. package/specs/geodb/administrative-units.json +237 -0
  47. package/specs/geodb/cities.json +288 -0
  48. package/specs/geodb/countries-details.json +274 -0
  49. package/specs/geodb/countries.json +276 -0
  50. package/specs/geodb/flags-supported.json +166 -0
  51. package/specs/geodb/flags.json +227 -0
  52. package/specs/geodb/regions.json +109 -0
  53. package/specs/geodb/subregions.json +217 -0
  54. package/specs/ip-intelligence/bulk-ip-lookup.json +1162 -0
  55. package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +417 -0
  56. package/specs/ip-intelligence/ip-locator.json +941 -0
  57. package/specs/ip-intelligence/ip-threat-intelligence.json +316 -0
  58. package/specs/other/astronomy-data.json +803 -0
  59. package/specs/pdf/delete-pdf-page.json +286 -0
  60. package/specs/pdf/linearize-pdf.json +277 -0
  61. package/specs/pdf/merge-pdf.json +285 -0
  62. package/specs/pdf/pdf-compress.json +304 -0
  63. package/specs/pdf/pdf-decrypt.json +297 -0
  64. package/specs/pdf/pdf-encrypt.json +314 -0
  65. package/specs/pdf/pdf-extract-pages.json +295 -0
  66. package/specs/pdf/pdf-file-status.json +208 -0
  67. package/specs/pdf/pdf-file.json +190 -0
  68. package/specs/pdf/pdf-files.json +126 -0
  69. package/specs/pdf/pdf-resource-download.json +168 -0
  70. package/specs/pdf/pdf-resource-upload-binary.json +218 -0
  71. package/specs/pdf/pdf-resource-upload.json +248 -0
  72. package/specs/pdf/pdf-restrict.json +343 -0
  73. package/specs/pdf/pdf-split-pages.json +281 -0
  74. package/specs/pdf/pdf-task-status.json +252 -0
  75. package/specs/pdf/pdf-to-image.json +1219 -0
  76. package/specs/pdf/pdf-unrestrict.json +324 -0
  77. package/specs/pdf/rotate-pdf-pages.json +305 -0
  78. package/specs/phone-validation/bulk-phone-number-validation.json +518 -0
  79. package/specs/phone-validation/phone-number-validation.json +456 -0
  80. package/specs/scraper/web-scraper.json +674 -0
  81. package/specs/screenshot/bulk-screenshot.json +949 -0
  82. package/specs/screenshot/website-screenshot.json +1147 -0
  83. package/specs/ssl/ssl-certificate-chain-lookup.json +756 -0
  84. package/specs/ssl/ssl-certificate-lookup.json +634 -0
  85. package/specs/timezone/timezone-converter.json +362 -0
  86. package/specs/timezone/timezone-lookup.json +910 -0
  87. package/specs/user-agent/bulk-user-agent-parser.json +441 -0
  88. package/specs/user-agent/user-agent-parser.json +346 -0
  89. package/specs/weather/air-quality.json +779 -0
  90. package/specs/weather/bulk-live-weather.json +834 -0
  91. package/specs/weather/flood-forecast.json +693 -0
  92. package/specs/weather/historical-weather.json +1019 -0
  93. package/specs/weather/live-weather.json +789 -0
  94. package/specs/weather/marine-weather.json +940 -0
  95. package/specs/weather/time-series-weather.json +1056 -0
  96. package/specs/weather/weather-forecast.json +1202 -0
  97. package/specs/whois/asn-lookup.json +729 -0
  98. package/specs/whois/bulk-whois-lookup.json +698 -0
  99. package/specs/whois/domain-whois-history-lookup.json +500 -0
  100. package/specs/whois/reverse-whois.json +625 -0
  101. package/specs/whois/whois-domain-lookup.json +533 -0
  102. package/specs/whois/whois-ip-lookup.json +1110 -0
  103. package/specs/zip-code/bulk-zip-code-lookup.json +318 -0
  104. package/specs/zip-code/zip-code-api.json +299 -0
  105. package/specs/zip-code/zip-code-distance-match.json +311 -0
  106. package/specs/zip-code/zip-code-distance.json +307 -0
  107. package/specs/zip-code/zip-codes-by-city.json +279 -0
  108. package/specs/zip-code/zip-codes-by-region.json +278 -0
  109. package/specs/zip-code/zip-codes-radius-search.json +349 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 APIFreaks
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
@@ -0,0 +1,156 @@
1
+ # @apifreaks/openapi-specs
2
+
3
+ OpenAPI 3.1 specifications for all [APIFreaks](https://apifreaks.com) API products. Ships 102 production specs across 21 categories as typed JSON, importable as ESM, CJS, or raw JSON.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install @apifreaks/openapi-specs
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ### Programmatic API
14
+
15
+ ```ts
16
+ import {
17
+ getSpec,
18
+ getSpecsByCategory,
19
+ SPEC_SLUGS,
20
+ SPEC_CATEGORIES,
21
+ SPECS_BY_CATEGORY,
22
+ } from '@apifreaks/openapi-specs';
23
+
24
+ // Get a single spec by slug
25
+ const spec = getSpec('ip-locator');
26
+
27
+ // Get all slugs in a category
28
+ const ipSlugs = getSpecsByCategory('ip-intelligence');
29
+
30
+ // All available slugs
31
+ console.log(SPEC_SLUGS); // ['ip-locator', 'dns-lookup', ...]
32
+
33
+ // All categories
34
+ console.log(SPEC_CATEGORIES); // ['currency', 'dns', 'ip-intelligence', ...]
35
+
36
+ // All slugs grouped by category
37
+ console.log(SPECS_BY_CATEGORY);
38
+ ```
39
+
40
+ ### Direct JSON import (tree-shakable)
41
+
42
+ ```ts
43
+ import ipLocator from '@apifreaks/openapi-specs/specs/ip-intelligence/ip-locator.json';
44
+ ```
45
+
46
+ ### CommonJS
47
+
48
+ ```js
49
+ const { getSpec, SPEC_SLUGS } = require('@apifreaks/openapi-specs');
50
+ ```
51
+
52
+ ## API
53
+
54
+ | Export | Type | Description |
55
+ |---|---|---|
56
+ | `getSpec(slug)` | `(string) => OpenAPISpec \| undefined` | Returns the full spec object for a given slug |
57
+ | `getSpecsByCategory(category)` | `(string) => string[]` | Returns all slugs in a category, or `[]` if unknown |
58
+ | `SPEC_SLUGS` | `string[]` | All 102 spec slugs |
59
+ | `SPEC_CATEGORIES` | `string[]` | All 21 category names |
60
+ | `SPECS` | `Record<string, OpenAPISpec>` | Full spec objects keyed by slug |
61
+ | `SPECS_BY_CATEGORY` | `Record<string, string[]>` | Slugs grouped by category |
62
+
63
+ ### Types
64
+
65
+ ```ts
66
+ import type { OpenAPISpec } from '@apifreaks/openapi-specs';
67
+
68
+ // OpenAPISpec has: openapi, info, servers?, paths?, components?, [key: string]
69
+ ```
70
+
71
+ ## Categories
72
+
73
+ | Category | Count | Description |
74
+ |---|---|---|
75
+ | `commodity` | 5 | Commodity prices, symbols, time series |
76
+ | `currency` | 10 | Exchange rates, conversion, historical data |
77
+ | `dns` | 4 | DNS lookup, reverse DNS, history |
78
+ | `domain` | 4 | Domain search, checker, subdomain lookup |
79
+ | `email-validation` | 2 | Email verification and bulk validation |
80
+ | `financial` | 8 | VAT rates, IBAN/SWIFT validation |
81
+ | `general` | 1 | Usage and credits |
82
+ | `geocoding` | 2 | Forward and reverse geocoding |
83
+ | `geodb` | 10 | Countries, cities, regions, flags, administrative units |
84
+ | `ip-intelligence` | 4 | IP geolocation, threat intelligence, bulk lookup |
85
+ | `other` | 1 | Astronomy data |
86
+ | `pdf` | 19 | PDF manipulation, conversion, encryption |
87
+ | `phone-validation` | 2 | Phone number validation |
88
+ | `scraper` | 1 | Web scraping |
89
+ | `screenshot` | 2 | Website screenshots |
90
+ | `ssl` | 2 | SSL certificate lookup |
91
+ | `timezone` | 2 | Timezone lookup and conversion |
92
+ | `user-agent` | 2 | User-agent parsing |
93
+ | `weather` | 8 | Current, forecast, historical, marine weather |
94
+ | `whois` | 6 | WHOIS lookup, ASN, reverse WHOIS |
95
+ | `zip-code` | 7 | Zip code lookup, distance, radius search |
96
+
97
+ ## Development
98
+
99
+ ```bash
100
+ # Install deps
101
+ npm install
102
+
103
+ # Generate manifest (auto-discovers specs/ and writes src/manifest.ts)
104
+ npm run generate
105
+
106
+ # Build (generate + tsup)
107
+ npm run build
108
+
109
+ # Typecheck
110
+ npm run typecheck
111
+
112
+ # Test
113
+ npm test
114
+ ```
115
+
116
+ ### Project structure
117
+
118
+ ```
119
+ specs/ # OpenAPI 3.1 JSON files, organized by category
120
+ currency/
121
+ currency-converter.json
122
+ ip-intelligence/
123
+ ip-locator.json
124
+ ...
125
+ src/
126
+ index.ts # Public API
127
+ manifest.ts # AUTO-GENERATED — do not edit manually
128
+ types.ts # OpenAPISpec type definition
129
+ scripts/
130
+ generate-manifest.ts # Reads specs/, writes src/manifest.ts
131
+ test/
132
+ validate.test.ts # Validates every spec is valid JSON + well-formed OpenAPI
133
+ ```
134
+
135
+ ### Adding a new spec
136
+
137
+ 1. Add the `.json` file under the appropriate category in `specs/`
138
+ 2. Run `npm run generate` to regenerate `src/manifest.ts`
139
+ 3. Run `npm test` to validate
140
+ 4. Run `npm run build` to rebuild the package
141
+
142
+ `src/manifest.ts` is auto-generated and must not be edited by hand.
143
+
144
+ ## Publishing
145
+
146
+ The package is built automatically before publish via `prepublishOnly`.
147
+
148
+ ```bash
149
+ npm publish --access public
150
+ ```
151
+
152
+ The published package includes only `dist/` and `specs/`. Tests, scripts, and build configs are excluded.
153
+
154
+ ## License
155
+
156
+ MIT