@apifreaks/openapi-specs 0.3.1 → 0.3.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/README.md +75 -98
- package/dist/index.cjs +6540 -942
- package/dist/index.d.cts +13 -5
- package/dist/index.d.ts +13 -5
- package/dist/index.js +7169 -1574
- package/dist/specs/pdf/{bulk-pdf-generator.yaml → pdf-generator-bulk.yaml} +2 -2
- package/dist/specs/pdf/pdf-generator.yaml +2 -2
- package/package.json +1 -1
- package/specs/README.md +259 -0
- package/specs/pdf/{bulk-pdf-generator.json → pdf-generator-bulk.json} +2 -2
- package/specs/pdf/pdf-generator.json +2 -2
- /package/dist/specs/pdf/{pdf-split-pages.yaml → split-pdf.yaml} +0 -0
- /package/dist/specs/{phone-validation → phone-number-validation}/bulk-phone-number-validation.yaml +0 -0
- /package/dist/specs/{phone-validation/phone-number-validation.yaml → phone-number-validation/phone-validation.yaml} +0 -0
- /package/specs/pdf/{pdf-split-pages.json → split-pdf.json} +0 -0
- /package/specs/{phone-validation → phone-number-validation}/bulk-phone-number-validation.json +0 -0
- /package/specs/{phone-validation/phone-number-validation.json → phone-number-validation/phone-validation.json} +0 -0
|
@@ -158,8 +158,8 @@ components:
|
|
|
158
158
|
ApiKeyAuthHeader:
|
|
159
159
|
type: apiKey
|
|
160
160
|
in: header
|
|
161
|
-
name: X-
|
|
162
|
-
description: Pass your API key via the X-
|
|
161
|
+
name: X-apiKey
|
|
162
|
+
description: Pass your API key via the X-apiKey request header.
|
|
163
163
|
ApiKeyAuthQuery:
|
|
164
164
|
type: apiKey
|
|
165
165
|
in: query
|
|
@@ -285,8 +285,8 @@ components:
|
|
|
285
285
|
ApiKeyAuthHeader:
|
|
286
286
|
type: apiKey
|
|
287
287
|
in: header
|
|
288
|
-
name: X-
|
|
289
|
-
description: Pass your API key via the X-
|
|
288
|
+
name: X-apiKey
|
|
289
|
+
description: Pass your API key via the X-apiKey request header.
|
|
290
290
|
ApiKeyAuthQuery:
|
|
291
291
|
type: apiKey
|
|
292
292
|
in: query
|
package/package.json
CHANGED
package/specs/README.md
ADDED
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
# APIFreaks OpenAPI specifications
|
|
2
|
+
|
|
3
|
+
OpenAPI 3.1 documents for [APIFreaks](https://apifreaks.com) API products. Each file is a complete, standalone spec: paths, parameters, request/response schemas, examples, and authentication.
|
|
4
|
+
|
|
5
|
+
This folder is the source of truth. JSON only. YAML is produced when the npm package is built, not checked in here.
|
|
6
|
+
|
|
7
|
+
To install the specs as a package (`getSpec`, `SpecSlug`, JSON imports), see the [repository README](../README.md).
|
|
8
|
+
|
|
9
|
+
## Open a spec
|
|
10
|
+
|
|
11
|
+
Pick a file, then open it in any OpenAPI-aware tool.
|
|
12
|
+
|
|
13
|
+
**Swagger Editor:** import this raw GitHub URL (or swap in another path):
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
https://raw.githubusercontent.com/api-freaks/af-openapi-specs/main/specs/ip-intelligence/ip-locator.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Postman / Insomnia:** import the JSON file as an OpenAPI definition.
|
|
20
|
+
|
|
21
|
+
**Code generation:** point `openapi-generator`, `orval`, `openapi-typescript`, or similar at the same URL:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx openapi-typescript https://raw.githubusercontent.com/api-freaks/af-openapi-specs/main/specs/ip-intelligence/ip-locator.json -o ip-locator.ts
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The slug is the filename without `.json`. It is the identifier the npm package uses (`getSpec("ip-locator")`).
|
|
28
|
+
|
|
29
|
+
## Authentication
|
|
30
|
+
|
|
31
|
+
Every spec uses an API key from [apifreaks.com](https://apifreaks.com). Either form is valid:
|
|
32
|
+
|
|
33
|
+
| Location | Name | Example |
|
|
34
|
+
| -------- | ---------- | -------------------- |
|
|
35
|
+
| Header | `X-apiKey` | `X-apiKey: YOUR_KEY` |
|
|
36
|
+
| Query | `apiKey` | `?apiKey=YOUR_KEY` |
|
|
37
|
+
|
|
38
|
+
Successful responses include `X-AF-Credits-Cost`, the credits consumed by that request. Remaining balances: [usage-credits.json](billing/usage-credits.json).
|
|
39
|
+
|
|
40
|
+
## Servers
|
|
41
|
+
|
|
42
|
+
Each document declares its base URL under `servers`. Most products use `https://api.apifreaks.com/v1.0`.
|
|
43
|
+
|
|
44
|
+
These use `https://api.apifreaks.com/v2.0`: IP geolocation, bulk IP geolocation, timezone lookup, domain WHOIS, bulk WHOIS, and astronomy.
|
|
45
|
+
|
|
46
|
+
Weather products (except astronomy) use `https://api.apifreaks.com/v1.0/weather`.
|
|
47
|
+
|
|
48
|
+
## Catalog
|
|
49
|
+
|
|
50
|
+
Grouped by folder. Slug is the stable id; the name links to the file.
|
|
51
|
+
|
|
52
|
+
### IP intelligence
|
|
53
|
+
|
|
54
|
+
| Slug | Spec |
|
|
55
|
+
| ----------------------------- | ------------------------------------------------------------------------------- |
|
|
56
|
+
| `ip-locator` | [IP Geolocation](ip-intelligence/ip-locator.json) |
|
|
57
|
+
| `bulk-ip-lookup` | [Bulk IP Geolocation](ip-intelligence/bulk-ip-lookup.json) |
|
|
58
|
+
| `ip-threat-intelligence` | [IP Threat Intelligence](ip-intelligence/ip-threat-intelligence.json) |
|
|
59
|
+
| `bulk-ip-threat-intelligence` | [Bulk IP Threat Intelligence](ip-intelligence/bulk-ip-threat-intelligence.json) |
|
|
60
|
+
|
|
61
|
+
### Geocoding
|
|
62
|
+
|
|
63
|
+
| Slug | Spec |
|
|
64
|
+
| ------------------- | ----------------------------------------------------- |
|
|
65
|
+
| `forward-geocoding` | [Forward Geocoding](geocoding/forward-geocoding.json) |
|
|
66
|
+
| `reverse-geocoding` | [Reverse Geocoding](geocoding/reverse-geocoding.json) |
|
|
67
|
+
|
|
68
|
+
### WHOIS
|
|
69
|
+
|
|
70
|
+
| Slug | Spec |
|
|
71
|
+
| ----------------------------- | ------------------------------------------------------- |
|
|
72
|
+
| `whois-domain-lookup` | [Domain WHOIS](whois/whois-domain-lookup.json) |
|
|
73
|
+
| `whois-ip-lookup` | [IP WHOIS](whois/whois-ip-lookup.json) |
|
|
74
|
+
| `asn-lookup` | [ASN Lookup](whois/asn-lookup.json) |
|
|
75
|
+
| `domain-whois-history-lookup` | [WHOIS History](whois/domain-whois-history-lookup.json) |
|
|
76
|
+
| `reverse-whois` | [Reverse WHOIS](whois/reverse-whois.json) |
|
|
77
|
+
| `bulk-whois-lookup` | [Bulk WHOIS](whois/bulk-whois-lookup.json) |
|
|
78
|
+
|
|
79
|
+
### DNS
|
|
80
|
+
|
|
81
|
+
| Slug | Spec |
|
|
82
|
+
| -------------------- | ------------------------------------------------- |
|
|
83
|
+
| `dns-lookup` | [DNS Lookup](dns/dns-lookup.json) |
|
|
84
|
+
| `dns-history-lookup` | [DNS History](dns/dns-history-lookup.json) |
|
|
85
|
+
| `reverse-dns-lookup` | [Reverse DNS Lookup](dns/reverse-dns-lookup.json) |
|
|
86
|
+
| `bulk-dns-lookup` | [Bulk DNS Lookup](dns/bulk-dns-lookup.json) |
|
|
87
|
+
|
|
88
|
+
### Scraper
|
|
89
|
+
|
|
90
|
+
| Slug | Spec |
|
|
91
|
+
| ------------- | --------------------------------------- |
|
|
92
|
+
| `web-scraper` | [Web Scraper](scraper/web-scraper.json) |
|
|
93
|
+
|
|
94
|
+
### Email validation
|
|
95
|
+
|
|
96
|
+
| Slug | Spec |
|
|
97
|
+
| ----------------------- | -------------------------------------------------------------------- |
|
|
98
|
+
| `email-checker` | [Email Checker](email-validation/email-checker.json) |
|
|
99
|
+
| `bulk-email-validation` | [Bulk Email Validation](email-validation/bulk-email-validation.json) |
|
|
100
|
+
|
|
101
|
+
### Phone validation
|
|
102
|
+
|
|
103
|
+
| Slug | Spec |
|
|
104
|
+
| ------------------------------ | ---------------------------------------------------------------------------------- |
|
|
105
|
+
| `phone-validation` | [Phone Validation](phone-number-validation/phone-validation.json) |
|
|
106
|
+
| `bulk-phone-number-validation` | [Bulk Phone Validation](phone-number-validation/bulk-phone-number-validation.json) |
|
|
107
|
+
|
|
108
|
+
### SSL
|
|
109
|
+
|
|
110
|
+
| Slug | Spec |
|
|
111
|
+
| ------------------------------ | --------------------------------------------------------------------- |
|
|
112
|
+
| `ssl-certificate-lookup` | [SSL Certificate Lookup](ssl/ssl-certificate-lookup.json) |
|
|
113
|
+
| `ssl-certificate-chain-lookup` | [SSL Certificate Chain Lookup](ssl/ssl-certificate-chain-lookup.json) |
|
|
114
|
+
|
|
115
|
+
### Domain
|
|
116
|
+
|
|
117
|
+
| Slug | Spec |
|
|
118
|
+
| -------------------------------- | ---------------------------------------------------------------------------- |
|
|
119
|
+
| `domain-search` | [Domain Availability](domain/domain-search.json) |
|
|
120
|
+
| `domain-search-with-suggestions` | [Domain Search with Suggestions](domain/domain-search-with-suggestions.json) |
|
|
121
|
+
| `subdomain-lookup` | [Subdomain Finder](domain/subdomain-lookup.json) |
|
|
122
|
+
| `bulk-domain-checker` | [Bulk Domain Checker](domain/bulk-domain-checker.json) |
|
|
123
|
+
|
|
124
|
+
### Screenshot
|
|
125
|
+
|
|
126
|
+
| Slug | Spec |
|
|
127
|
+
| -------------------- | -------------------------------------------------------- |
|
|
128
|
+
| `website-screenshot` | [Website Screenshot](screenshot/website-screenshot.json) |
|
|
129
|
+
| `bulk-screenshot` | [Bulk Screenshot](screenshot/bulk-screenshot.json) |
|
|
130
|
+
|
|
131
|
+
### PDF
|
|
132
|
+
|
|
133
|
+
| Slug | Spec |
|
|
134
|
+
| ---------------------------- | ------------------------------------------------------------- |
|
|
135
|
+
| `merge-pdf` | [Merge](pdf/merge-pdf.json) |
|
|
136
|
+
| `split-pdf` | [Split](pdf/split-pdf.json) |
|
|
137
|
+
| `pdf-extract-pages` | [Extract Pages](pdf/pdf-extract-pages.json) |
|
|
138
|
+
| `delete-pdf-page` | [Remove Pages](pdf/delete-pdf-page.json) |
|
|
139
|
+
| `pdf-to-image` | [Convert to Image](pdf/pdf-to-image.json) |
|
|
140
|
+
| `pdf-generator` | [Generate from Template](pdf/pdf-generator.json) |
|
|
141
|
+
| `pdf-generator-bulk` | [Bulk Generate from CSV](pdf/pdf-generator-bulk.json) |
|
|
142
|
+
| `pdf-compress` | [Compress](pdf/pdf-compress.json) |
|
|
143
|
+
| `rotate-pdf-pages` | [Rotate](pdf/rotate-pdf-pages.json) |
|
|
144
|
+
| `pdf-encrypt` | [Encrypt](pdf/pdf-encrypt.json) |
|
|
145
|
+
| `pdf-restrict` | [Restrict](pdf/pdf-restrict.json) |
|
|
146
|
+
| `pdf-decrypt` | [Decrypt](pdf/pdf-decrypt.json) |
|
|
147
|
+
| `pdf-unrestrict` | [Unrestrict](pdf/pdf-unrestrict.json) |
|
|
148
|
+
| `linearize-pdf` | [Linearize](pdf/linearize-pdf.json) |
|
|
149
|
+
| `pdf-task-status` | [Task Status](pdf/pdf-task-status.json) |
|
|
150
|
+
| `pdf-file-status` | [File Status](pdf/pdf-file-status.json) |
|
|
151
|
+
| `pdf-files` | [List Files](pdf/pdf-files.json) |
|
|
152
|
+
| `pdf-file` | [Delete File](pdf/pdf-file.json) |
|
|
153
|
+
| `pdf-resource-upload` | [Upload Resource](pdf/pdf-resource-upload.json) |
|
|
154
|
+
| `pdf-resource-upload-binary` | [Upload Binary Resource](pdf/pdf-resource-upload-binary.json) |
|
|
155
|
+
| `pdf-resource-download` | [Download Resource](pdf/pdf-resource-download.json) |
|
|
156
|
+
|
|
157
|
+
### Currency
|
|
158
|
+
|
|
159
|
+
| Slug | Spec |
|
|
160
|
+
| ---------------------------------- | ---------------------------------------------------------------------------- |
|
|
161
|
+
| `currency-rate` | [Exchange Rates](currency/currency-rate.json) |
|
|
162
|
+
| `historical-currency-rate` | [Historical Exchange Rates](currency/historical-currency-rate.json) |
|
|
163
|
+
| `currency-converter` | [Currency Converter](currency/currency-converter.json) |
|
|
164
|
+
| `historical-currency-converter` | [Historical Currency Converter](currency/historical-currency-converter.json) |
|
|
165
|
+
| `currency-time-series` | [Currency Time Series](currency/currency-time-series.json) |
|
|
166
|
+
| `currency-fluctuation` | [Currency Fluctuation](currency/currency-fluctuation.json) |
|
|
167
|
+
| `geolocalized-currency-conversion` | [IP-to-Currency Conversion](currency/geolocalized-currency-conversion.json) |
|
|
168
|
+
| `currency-supported` | [Supported Currencies](currency/currency-supported.json) |
|
|
169
|
+
| `currency-symbols` | [Currency Symbols](currency/currency-symbols.json) |
|
|
170
|
+
| `currency-historical-data-limit` | [Historical Data Limits](currency/currency-historical-data-limit.json) |
|
|
171
|
+
|
|
172
|
+
### Commodity
|
|
173
|
+
|
|
174
|
+
| Slug | Spec |
|
|
175
|
+
| ----------------------------- | ------------------------------------------------------------------------- |
|
|
176
|
+
| `commodity-prices` | [Live Commodity Prices](commodity/commodity-prices.json) |
|
|
177
|
+
| `historical-commodity-prices` | [Historical Commodity Prices](commodity/historical-commodity-prices.json) |
|
|
178
|
+
| `commodity-fluctuation` | [Commodity Fluctuation](commodity/commodity-fluctuation.json) |
|
|
179
|
+
| `commodity-time-series` | [Commodity Time Series](commodity/commodity-time-series.json) |
|
|
180
|
+
| `commodity-symbols` | [Commodity Symbols](commodity/commodity-symbols.json) |
|
|
181
|
+
|
|
182
|
+
### Financial
|
|
183
|
+
|
|
184
|
+
| Slug | Spec |
|
|
185
|
+
| ------------------------------------ | ------------------------------------------------------------------------ |
|
|
186
|
+
| `vat-rates-country` | [VAT Rates by Country](financial/vat-rates-country.json) |
|
|
187
|
+
| `bulk-vat-rates-country` | [Bulk VAT Rates by Country](financial/bulk-vat-rates-country.json) |
|
|
188
|
+
| `vat-rates-by-ip` | [VAT Rates by IP](financial/vat-rates-by-ip.json) |
|
|
189
|
+
| `vat-number-validation` | [VAT Number Validation](financial/vat-number-validation.json) |
|
|
190
|
+
| `iban-validation` | [IBAN Validation](financial/iban-validation.json) |
|
|
191
|
+
| `swift-code-lookup` | [SWIFT/BIC Lookup](financial/swift-code-lookup.json) |
|
|
192
|
+
| `swift-code-finder` | [SWIFT/BIC Finder](financial/swift-code-finder.json) |
|
|
193
|
+
| `financial-apis-supported-countries` | [Supported Countries](financial/financial-apis-supported-countries.json) |
|
|
194
|
+
|
|
195
|
+
### ZIP code
|
|
196
|
+
|
|
197
|
+
| Slug | Spec |
|
|
198
|
+
| ------------------------- | ----------------------------------------------------------- |
|
|
199
|
+
| `zip-code-api` | [ZIP / Postal Code Lookup](zip-code/zip-code-api.json) |
|
|
200
|
+
| `zip-codes-radius-search` | [ZIP Radius Search](zip-code/zip-codes-radius-search.json) |
|
|
201
|
+
| `zip-code-distance` | [ZIP Distance](zip-code/zip-code-distance.json) |
|
|
202
|
+
| `zip-codes-by-city` | [ZIP Codes by City](zip-code/zip-codes-by-city.json) |
|
|
203
|
+
| `bulk-zip-code-lookup` | [Bulk ZIP Lookup](zip-code/bulk-zip-code-lookup.json) |
|
|
204
|
+
| `zip-code-distance-match` | [ZIP Distance Match](zip-code/zip-code-distance-match.json) |
|
|
205
|
+
| `zip-codes-by-region` | [ZIP Codes by Region](zip-code/zip-codes-by-region.json) |
|
|
206
|
+
|
|
207
|
+
### Weather
|
|
208
|
+
|
|
209
|
+
| Slug | Spec |
|
|
210
|
+
| --------------------- | ------------------------------------------------------- |
|
|
211
|
+
| `live-weather` | [Live Weather](weather/live-weather.json) |
|
|
212
|
+
| `weather-forecast` | [Weather Forecast](weather/weather-forecast.json) |
|
|
213
|
+
| `historical-weather` | [Historical Weather](weather/historical-weather.json) |
|
|
214
|
+
| `time-series-weather` | [Time Series Weather](weather/time-series-weather.json) |
|
|
215
|
+
| `air-quality` | [Air Quality](weather/air-quality.json) |
|
|
216
|
+
| `marine-weather` | [Marine Weather](weather/marine-weather.json) |
|
|
217
|
+
| `flood-forecast` | [Flood Forecast](weather/flood-forecast.json) |
|
|
218
|
+
| `bulk-live-weather` | [Bulk Live Weather](weather/bulk-live-weather.json) |
|
|
219
|
+
| `astronomy-data` | [Astronomy](weather/astronomy-data.json) |
|
|
220
|
+
|
|
221
|
+
### Geography
|
|
222
|
+
|
|
223
|
+
| Slug | Spec |
|
|
224
|
+
| ------------------------------ | ----------------------------------------------------------------- |
|
|
225
|
+
| `administrative-units-levels` | [Admin Levels](geography/administrative-units-levels.json) |
|
|
226
|
+
| `administrative-units` | [Administrative Units](geography/administrative-units.json) |
|
|
227
|
+
| `administrative-units-details` | [Admin Unit Details](geography/administrative-units-details.json) |
|
|
228
|
+
| `countries` | [Countries](geography/countries.json) |
|
|
229
|
+
| `countries-details` | [Country Details](geography/countries-details.json) |
|
|
230
|
+
| `cities` | [Cities](geography/cities.json) |
|
|
231
|
+
| `regions` | [Regions](geography/regions.json) |
|
|
232
|
+
| `subregions` | [Subregions](geography/subregions.json) |
|
|
233
|
+
| `flags-supported` | [Supported Flags](geography/flags-supported.json) |
|
|
234
|
+
| `flags` | [Flags](geography/flags.json) |
|
|
235
|
+
|
|
236
|
+
### Timezone
|
|
237
|
+
|
|
238
|
+
| Slug | Spec |
|
|
239
|
+
| -------------------- | ------------------------------------------------------ |
|
|
240
|
+
| `timezone-lookup` | [Timezone Lookup](timezone/timezone-lookup.json) |
|
|
241
|
+
| `timezone-converter` | [Timezone Converter](timezone/timezone-converter.json) |
|
|
242
|
+
|
|
243
|
+
### User agent
|
|
244
|
+
|
|
245
|
+
| Slug | Spec |
|
|
246
|
+
| ------------------------ | ---------------------------------------------------------------- |
|
|
247
|
+
| `user-agent-parser` | [User Agent Parser](user-agent/user-agent-parser.json) |
|
|
248
|
+
| `bulk-user-agent-parser` | [Bulk User Agent Parser](user-agent/bulk-user-agent-parser.json) |
|
|
249
|
+
|
|
250
|
+
### Billing
|
|
251
|
+
|
|
252
|
+
| Slug | Spec |
|
|
253
|
+
| --------------- | ------------------------------------------- |
|
|
254
|
+
| `usage-credits` | [Credits Usage](billing/usage-credits.json) |
|
|
255
|
+
|
|
256
|
+
## Docs and support
|
|
257
|
+
|
|
258
|
+
- Product docs: [apifreaks.com](https://apifreaks.com)
|
|
259
|
+
- Contact: [apifreaks.com/contact](https://apifreaks.com/contact) · support@apifreaks.com
|
|
@@ -246,8 +246,8 @@
|
|
|
246
246
|
"ApiKeyAuthHeader": {
|
|
247
247
|
"type": "apiKey",
|
|
248
248
|
"in": "header",
|
|
249
|
-
"name": "X-
|
|
250
|
-
"description": "Pass your API key via the X-
|
|
249
|
+
"name": "X-apiKey",
|
|
250
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
251
251
|
},
|
|
252
252
|
"ApiKeyAuthQuery": {
|
|
253
253
|
"type": "apiKey",
|
|
@@ -412,8 +412,8 @@
|
|
|
412
412
|
"ApiKeyAuthHeader": {
|
|
413
413
|
"type": "apiKey",
|
|
414
414
|
"in": "header",
|
|
415
|
-
"name": "X-
|
|
416
|
-
"description": "Pass your API key via the X-
|
|
415
|
+
"name": "X-apiKey",
|
|
416
|
+
"description": "Pass your API key via the X-apiKey request header."
|
|
417
417
|
},
|
|
418
418
|
"ApiKeyAuthQuery": {
|
|
419
419
|
"type": "apiKey",
|
|
File without changes
|
/package/dist/specs/{phone-validation → phone-number-validation}/bulk-phone-number-validation.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/specs/{phone-validation → phone-number-validation}/bulk-phone-number-validation.json
RENAMED
|
File without changes
|
|
File without changes
|