@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/package.json ADDED
@@ -0,0 +1,81 @@
1
+ {
2
+ "name": "@apifreaks/openapi-specs",
3
+ "version": "0.1.0",
4
+ "description": "Public OpenAPI 3.1 specifications for all APIFreaks API products.",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "sideEffects": false,
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ },
15
+ "./specs/*.json": "./specs/*.json",
16
+ "./package.json": "./package.json"
17
+ },
18
+ "files": [
19
+ "dist",
20
+ "specs"
21
+ ],
22
+ "scripts": {
23
+ "generate": "tsx scripts/generate-manifest.ts",
24
+ "build": "npm run generate && tsup src/index.ts --format esm,cjs --dts --clean --tsconfig tsconfig.build.json",
25
+ "typecheck": "tsc --noEmit",
26
+ "test": "tsx --test test/validate.test.ts",
27
+ "bump:patch": "npm test && npm version patch --git-tag-version && git push --follow-tags",
28
+ "bump:minor": "npm test && npm version minor --git-tag-version && git push --follow-tags",
29
+ "bump:major": "npm test && npm version major --git-tag-version && git push --follow-tags",
30
+ "prepublishOnly": "npm run build"
31
+ },
32
+ "keywords": [
33
+ "openapi",
34
+ "openapi-3.1",
35
+ "api-specification",
36
+ "api-docs",
37
+ "apifreaks",
38
+ "rest-api",
39
+ "swagger",
40
+ "ip-geolocation",
41
+ "whois",
42
+ "dns",
43
+ "ssl",
44
+ "currency",
45
+ "domain",
46
+ "screenshot",
47
+ "timezone",
48
+ "user-agent",
49
+ "weather",
50
+ "pdf",
51
+ "email-validation",
52
+ "phone-validation",
53
+ "geocoding",
54
+ "zip-code",
55
+ "commodity",
56
+ "financial",
57
+ "scraper"
58
+ ],
59
+ "author": "Sikandar Subhani <sikandar@jfreaks.com>",
60
+ "license": "MIT",
61
+ "homepage": "https://github.com/api-freaks/af-openapi-specs#readme",
62
+ "repository": {
63
+ "type": "git",
64
+ "url": "https://github.com/api-freaks/af-openapi-specs.git"
65
+ },
66
+ "bugs": {
67
+ "url": "https://github.com/api-freaks/af-openapi-specs/issues"
68
+ },
69
+ "publishConfig": {
70
+ "access": "public"
71
+ },
72
+ "engines": {
73
+ "node": ">=18"
74
+ },
75
+ "devDependencies": {
76
+ "@types/node": "^26.1.1",
77
+ "tsup": "^8.0.0",
78
+ "tsx": "^4.19.0",
79
+ "typescript": "^5.7.0"
80
+ }
81
+ }
@@ -0,0 +1,301 @@
1
+ {
2
+ "openapi": "3.1.1",
3
+ "info": {
4
+ "title": "Commodity Fluctuation API ",
5
+ "version": "1.0.0",
6
+ "description": "Calculate price change and percentage movement for any commodity over a custom date range. Returns the opening price, closing price, absolute change, and percentage change for each symbol. Accepts one or more comma-separated commodity symbols with a start and end date in YYYY-MM-DD format. Returns a 400 error for invalid dates or a date range where start is after end, and a 404 error for unsupported symbols or a date range with no available data.",
7
+ "contact": {
8
+ "name": "APIFreaks Support",
9
+ "url": "https://apifreaks.com/contact",
10
+ "email": "support@apifreaks.com"
11
+ }
12
+ },
13
+ "servers": [
14
+ {
15
+ "url": "https://api.apifreaks.com/v1.0",
16
+ "description": "Commodity Fluctuation API Server"
17
+ }
18
+ ],
19
+ "paths": {
20
+ "/commodity/fluctuation": {
21
+ "get": {
22
+ "tags": ["Commodity APIs"],
23
+ "summary": "Get commodity price fluctuations",
24
+ "description": "Returns price fluctuation metrics (start, end, change, percent change) for the requested commodity symbols over a date range.",
25
+ "operationId": "getCommodityFluctuation",
26
+ "parameters": [
27
+ {
28
+ "name": "format",
29
+ "in": "query",
30
+ "required": false,
31
+ "description": "Response format. Currently only `json` is supported.",
32
+ "schema": {
33
+ "type": "string",
34
+ "default": "json",
35
+ "enum": ["json"]
36
+ }
37
+ },
38
+ {
39
+ "name": "symbols",
40
+ "in": "query",
41
+ "required": true,
42
+ "description": "Comma-separated list of commodity symbols.",
43
+ "schema": {
44
+ "type": "string"
45
+ }
46
+ },
47
+ {
48
+ "name": "startDate",
49
+ "in": "query",
50
+ "required": true,
51
+ "description": "Start date in `YYYY-MM-DD` format.",
52
+ "schema": {
53
+ "type": "string"
54
+ }
55
+ },
56
+ {
57
+ "name": "endDate",
58
+ "in": "query",
59
+ "required": true,
60
+ "description": "End date in `YYYY-MM-DD` format.",
61
+ "schema": {
62
+ "type": "string"
63
+ }
64
+ }
65
+ ],
66
+ "responses": {
67
+ "200": {
68
+ "description": "Successful operation",
69
+ "content": {
70
+ "application/json": {
71
+ "schema": {
72
+ "$ref": "#/components/schemas/CommodityFluctuationResponse"
73
+ },
74
+ "examples": {
75
+ "success": {
76
+ "summary": "Successful response",
77
+ "value": {
78
+ "success": true,
79
+ "startDate": "2024-01-01",
80
+ "endDate": "2024-01-31",
81
+ "rates": {
82
+ "WTIOIL-SPOT": {
83
+ "startRate": 72.02,
84
+ "endRate": 75.81,
85
+ "change": 3.79,
86
+ "changePercent": 5.26
87
+ },
88
+ "XAU": {
89
+ "startRate": 2063.63,
90
+ "endRate": 2039.83,
91
+ "change": -23.8,
92
+ "changePercent": -1.15
93
+ }
94
+ }
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
100
+ },
101
+ "400": {
102
+ "description": "Bad Request — Missing parameters or invalid dates",
103
+ "content": {
104
+ "application/json": {
105
+ "examples": {
106
+ "missingSymbols": {
107
+ "summary": "Missing required symbols parameter",
108
+ "value": {
109
+ "error": "Invalid Param Exception",
110
+ "message": "please pass correct parameters",
111
+ "path": "/v1.0/commodity/fluctuation",
112
+ "status": 400,
113
+ "timestamp": "2026-07-27T11:37:24.273Z"
114
+ }
115
+ },
116
+ "invalidDateFormat": {
117
+ "summary": "Date is not in YYYY-MM-DD format",
118
+ "value": {
119
+ "timestamp": "2026-07-27T11:37:22.687Z",
120
+ "path": "/rates/fluctuation",
121
+ "code": 400,
122
+ "error": "VALIDATION_ERROR",
123
+ "message": "Invalid Date Format (YYYY-MM-DD)."
124
+ }
125
+ },
126
+ "dateNotExist": {
127
+ "summary": "Date does not exist on the calendar (e.g. Feb 30)",
128
+ "value": {
129
+ "timestamp": "2026-07-27T11:37:33.565Z",
130
+ "path": "/rates/fluctuation",
131
+ "code": 400,
132
+ "error": "VALIDATION_ERROR",
133
+ "message": "Invalid Date: The provided start date or end date does not exist."
134
+ }
135
+ },
136
+ "startAfterEnd": {
137
+ "summary": "startDate is after endDate",
138
+ "value": {
139
+ "timestamp": "2026-07-27T11:37:23.206Z",
140
+ "path": "/rates/fluctuation",
141
+ "code": 400,
142
+ "error": "VALIDATION_ERROR",
143
+ "message": "Start date cannot be after end date"
144
+ }
145
+ }
146
+ },
147
+ "schema": {
148
+ "$ref": "#/components/schemas/ErrorResponse"
149
+ }
150
+ }
151
+ }
152
+ },
153
+ "404": {
154
+ "description": "Not found - Symbol or data not available",
155
+ "content": {
156
+ "application/json": {
157
+ "schema": {
158
+ "$ref": "#/components/schemas/ErrorResponse"
159
+ },
160
+ "examples": {
161
+ "symbolNotFound": {
162
+ "summary": "Symbol Not Found",
163
+ "value": {
164
+ "timestamp": "2026-07-27T11:37:23.759Z",
165
+ "path": "/rates/fluctuation",
166
+ "code": 404,
167
+ "error": "SYMBOL_NOT_FOUND",
168
+ "message": "The symbol is not supported, please visit the documentation for a list of supported symbols"
169
+ }
170
+ },
171
+ "noData": {
172
+ "summary": "No data available for the given date range",
173
+ "value": {
174
+ "timestamp": "2026-07-27T11:37:34.167Z",
175
+ "path": "/rates/fluctuation",
176
+ "code": 404,
177
+ "error": "DATA_NOT_FOUND",
178
+ "message": "No data found for the given date range"
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
185
+ }
186
+ }
187
+ }
188
+ },
189
+ "components": {
190
+ "securitySchemes": {
191
+ "ApiKeyAuthHeader": {
192
+ "type": "apiKey",
193
+ "in": "header",
194
+ "name": "X-apiKey",
195
+ "description": "Pass your API key via the X-apiKey request header."
196
+ },
197
+ "ApiKeyAuthQuery": {
198
+ "type": "apiKey",
199
+ "in": "query",
200
+ "name": "apiKey",
201
+ "description": "Pass your API key via the apiKey query parameter."
202
+ }
203
+ },
204
+ "schemas": {
205
+ "CommodityFluctuationResponse": {
206
+ "type": "object",
207
+ "required": ["success", "startDate", "endDate", "rates"],
208
+ "properties": {
209
+ "success": {
210
+ "type": "boolean",
211
+ "description": "`true` for successful requests."
212
+ },
213
+ "startDate": {
214
+ "type": "string",
215
+ "description": "Start date of the interval (YYYY-MM-DD)."
216
+ },
217
+ "endDate": {
218
+ "type": "string",
219
+ "description": "End date of the interval (YYYY-MM-DD)."
220
+ },
221
+ "rates": {
222
+ "$ref": "#/components/schemas/CommodityFluctuationRates"
223
+ }
224
+ },
225
+ "description": "Commodity fluctuation response containing price change data per symbol over a date range."
226
+ },
227
+ "CommodityFluctuationRates": {
228
+ "type": "object",
229
+ "description": "Map of requested commodity symbols to their fluctuation metrics. Each key is a commodity symbol (e.g. XAU).",
230
+ "additionalProperties": {
231
+ "title": "CommodityFluctuationItem",
232
+ "type": "object",
233
+ "description": "Fluctuation metrics for a single commodity over a date range.",
234
+ "required": ["startRate", "endRate", "change", "changePercent"],
235
+ "properties": {
236
+ "startRate": {
237
+ "type": "number",
238
+ "format": "float",
239
+ "description": "Price of the commodity on the start date."
240
+ },
241
+ "endRate": {
242
+ "type": "number",
243
+ "format": "float",
244
+ "description": "Price of the commodity on the end date."
245
+ },
246
+ "change": {
247
+ "type": "number",
248
+ "format": "float",
249
+ "description": "Absolute price difference between end and start dates. May be negative."
250
+ },
251
+ "changePercent": {
252
+ "type": "number",
253
+ "format": "float",
254
+ "description": "Percentage price change from start to end date. May be negative."
255
+ }
256
+ }
257
+ }
258
+ },
259
+ "ErrorResponse": {
260
+ "type": "object",
261
+ "description": "Standard error envelope returned by the API on failed requests. Gateway-level validation errors populate status; commodity-service errors (date/symbol/data validation) populate code instead — check whichever is present.",
262
+ "required": ["message"],
263
+ "properties": {
264
+ "error": {
265
+ "type": "string",
266
+ "description": "Short error category or exception type (e.g., Invalid Param Exception, VALIDATION_ERROR, SYMBOL_NOT_FOUND, DATA_NOT_FOUND)."
267
+ },
268
+ "message": {
269
+ "type": "string",
270
+ "description": "Human-readable error message describing the failure."
271
+ },
272
+ "path": {
273
+ "type": "string",
274
+ "description": "API endpoint path (gateway errors) or internal service path (commodity-service errors) that produced the error."
275
+ },
276
+ "status": {
277
+ "type": "integer",
278
+ "description": "HTTP status code. Present on gateway-level errors."
279
+ },
280
+ "code": {
281
+ "type": "integer",
282
+ "description": "HTTP status code. Present on commodity-service errors instead of status."
283
+ },
284
+ "timestamp": {
285
+ "type": "string",
286
+ "format": "date-time",
287
+ "description": "Timestamp when the error occurred (ISO 8601)."
288
+ }
289
+ }
290
+ }
291
+ }
292
+ },
293
+ "security": [
294
+ {
295
+ "ApiKeyAuthHeader": []
296
+ },
297
+ {
298
+ "ApiKeyAuthQuery": []
299
+ }
300
+ ]
301
+ }