@apifreaks/openapi-specs 0.2.0 → 0.3.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 (212) hide show
  1. package/README.md +37 -37
  2. package/dist/index.cjs +2787 -348
  3. package/dist/index.js +2787 -348
  4. package/dist/specs/commodity/commodity-fluctuation.yaml +14 -0
  5. package/dist/specs/commodity/commodity-prices.yaml +14 -0
  6. package/dist/specs/commodity/commodity-symbols.yaml +8 -0
  7. package/dist/specs/commodity/commodity-time-series.yaml +14 -0
  8. package/dist/specs/commodity/historical-commodity-prices.yaml +14 -0
  9. package/dist/specs/currency/currency-converter.yaml +14 -0
  10. package/dist/specs/currency/currency-fluctuation.yaml +14 -0
  11. package/dist/specs/currency/currency-historical-data-limit.yaml +11 -0
  12. package/dist/specs/currency/currency-rate.yaml +14 -0
  13. package/dist/specs/currency/currency-supported.yaml +11 -0
  14. package/dist/specs/currency/currency-symbols.yaml +11 -0
  15. package/dist/specs/currency/currency-time-series.yaml +14 -0
  16. package/dist/specs/currency/geolocalized-currency-conversion.yaml +14 -0
  17. package/dist/specs/currency/historical-currency-converter.yaml +14 -0
  18. package/dist/specs/currency/historical-currency-rate.yaml +14 -0
  19. package/dist/specs/dns/bulk-dns-lookup.yaml +14 -0
  20. package/dist/specs/dns/dns-history-lookup.yaml +14 -0
  21. package/dist/specs/dns/dns-lookup.yaml +11 -0
  22. package/dist/specs/dns/reverse-dns-lookup.yaml +34 -0
  23. package/dist/specs/domain/bulk-domain-checker.yaml +17 -0
  24. package/dist/specs/domain/domain-search-with-suggestions.yaml +14 -0
  25. package/dist/specs/domain/domain-search.yaml +14 -0
  26. package/dist/specs/domain/subdomain-lookup.yaml +14 -0
  27. package/dist/specs/email-validation/bulk-email-validation.yaml +17 -0
  28. package/dist/specs/email-validation/email-checker.yaml +41 -0
  29. package/dist/specs/financial/bulk-vat-rates-country.yaml +14 -0
  30. package/dist/specs/financial/financial-apis-supported-countries.yaml +8 -0
  31. package/dist/specs/financial/iban-validation.yaml +11 -0
  32. package/dist/specs/financial/swift-code-finder.yaml +11 -0
  33. package/dist/specs/financial/swift-code-lookup.yaml +14 -0
  34. package/dist/specs/financial/vat-number-validation.yaml +14 -0
  35. package/dist/specs/financial/vat-rates-by-ip.yaml +14 -0
  36. package/dist/specs/financial/vat-rates-country.yaml +14 -0
  37. package/dist/specs/general/usage-credits.yaml +11 -0
  38. package/dist/specs/geocoding/forward-geocoding.yaml +14 -0
  39. package/dist/specs/geocoding/reverse-geocoding.yaml +11 -0
  40. package/dist/specs/geodb/administrative-units-details.yaml +14 -0
  41. package/dist/specs/geodb/administrative-units-levels.yaml +14 -0
  42. package/dist/specs/geodb/administrative-units.yaml +14 -0
  43. package/dist/specs/geodb/cities.yaml +14 -0
  44. package/dist/specs/geodb/countries-details.yaml +11 -0
  45. package/dist/specs/geodb/countries.yaml +11 -0
  46. package/dist/specs/geodb/flags-supported.yaml +8 -0
  47. package/dist/specs/geodb/flags.yaml +14 -0
  48. package/dist/specs/geodb/regions.yaml +8 -0
  49. package/dist/specs/geodb/subregions.yaml +14 -0
  50. package/dist/specs/ip-intelligence/bulk-ip-lookup.yaml +14 -0
  51. package/dist/specs/ip-intelligence/bulk-ip-threat-intelligence.yaml +11 -0
  52. package/dist/specs/ip-intelligence/ip-locator.yaml +17 -0
  53. package/dist/specs/ip-intelligence/ip-threat-intelligence.yaml +14 -0
  54. package/dist/specs/other/astronomy-data.yaml +14 -0
  55. package/dist/specs/pdf/bulk-pdf-generator.yaml +32 -0
  56. package/dist/specs/pdf/delete-pdf-page.yaml +14 -0
  57. package/dist/specs/pdf/linearize-pdf.yaml +14 -0
  58. package/dist/specs/pdf/merge-pdf.yaml +14 -0
  59. package/dist/specs/pdf/pdf-compress.yaml +14 -0
  60. package/dist/specs/pdf/pdf-decrypt.yaml +14 -0
  61. package/dist/specs/pdf/pdf-encrypt.yaml +14 -0
  62. package/dist/specs/pdf/pdf-extract-pages.yaml +14 -0
  63. package/dist/specs/pdf/pdf-file-status.yaml +14 -0
  64. package/dist/specs/pdf/pdf-file.yaml +14 -0
  65. package/dist/specs/pdf/pdf-files.yaml +8 -0
  66. package/dist/specs/pdf/pdf-generator.yaml +32 -0
  67. package/dist/specs/pdf/pdf-resource-download.yaml +14 -0
  68. package/dist/specs/pdf/pdf-resource-upload-binary.yaml +14 -0
  69. package/dist/specs/pdf/pdf-resource-upload.yaml +14 -0
  70. package/dist/specs/pdf/pdf-restrict.yaml +14 -0
  71. package/dist/specs/pdf/pdf-split-pages.yaml +14 -0
  72. package/dist/specs/pdf/pdf-task-status.yaml +14 -0
  73. package/dist/specs/pdf/pdf-to-image.yaml +35 -0
  74. package/dist/specs/pdf/pdf-unrestrict.yaml +14 -0
  75. package/dist/specs/pdf/rotate-pdf-pages.yaml +14 -0
  76. package/dist/specs/phone-validation/bulk-phone-number-validation.yaml +23 -0
  77. package/dist/specs/phone-validation/phone-number-validation.yaml +20 -0
  78. package/dist/specs/scraper/web-scraper.yaml +34 -0
  79. package/dist/specs/screenshot/bulk-screenshot.yaml +34 -0
  80. package/dist/specs/screenshot/website-screenshot.yaml +34 -0
  81. package/dist/specs/ssl/ssl-certificate-chain-lookup.yaml +17 -0
  82. package/dist/specs/ssl/ssl-certificate-lookup.yaml +17 -0
  83. package/dist/specs/timezone/timezone-converter.yaml +14 -0
  84. package/dist/specs/timezone/timezone-lookup.yaml +14 -0
  85. package/dist/specs/user-agent/bulk-user-agent-parser.yaml +11 -0
  86. package/dist/specs/user-agent/user-agent-parser.yaml +11 -0
  87. package/dist/specs/weather/air-quality.yaml +14 -0
  88. package/dist/specs/weather/bulk-live-weather.yaml +11 -0
  89. package/dist/specs/weather/flood-forecast.yaml +14 -0
  90. package/dist/specs/weather/historical-weather.yaml +14 -0
  91. package/dist/specs/weather/live-weather.yaml +14 -0
  92. package/dist/specs/weather/marine-weather.yaml +14 -0
  93. package/dist/specs/weather/time-series-weather.yaml +11 -0
  94. package/dist/specs/weather/weather-forecast.yaml +11 -0
  95. package/dist/specs/whois/asn-lookup.yaml +14 -0
  96. package/dist/specs/whois/bulk-whois-lookup.yaml +17 -0
  97. package/dist/specs/whois/domain-whois-history-lookup.yaml +14 -0
  98. package/dist/specs/whois/reverse-whois.yaml +34 -0
  99. package/dist/specs/whois/whois-domain-lookup.yaml +17 -0
  100. package/dist/specs/whois/whois-ip-lookup.yaml +14 -0
  101. package/dist/specs/zip-code/bulk-zip-code-lookup.yaml +14 -0
  102. package/dist/specs/zip-code/zip-code-api.yaml +14 -0
  103. package/dist/specs/zip-code/zip-code-distance-match.yaml +14 -0
  104. package/dist/specs/zip-code/zip-code-distance.yaml +14 -0
  105. package/dist/specs/zip-code/zip-codes-by-city.yaml +14 -0
  106. package/dist/specs/zip-code/zip-codes-by-region.yaml +14 -0
  107. package/dist/specs/zip-code/zip-codes-radius-search.yaml +34 -0
  108. package/package.json +1 -1
  109. package/specs/commodity/commodity-fluctuation.json +23 -0
  110. package/specs/commodity/commodity-prices.json +23 -0
  111. package/specs/commodity/commodity-symbols.json +13 -0
  112. package/specs/commodity/commodity-time-series.json +27 -13
  113. package/specs/commodity/historical-commodity-prices.json +23 -0
  114. package/specs/currency/currency-converter.json +23 -0
  115. package/specs/currency/currency-fluctuation.json +23 -0
  116. package/specs/currency/currency-historical-data-limit.json +18 -0
  117. package/specs/currency/currency-rate.json +23 -0
  118. package/specs/currency/currency-supported.json +18 -0
  119. package/specs/currency/currency-symbols.json +18 -0
  120. package/specs/currency/currency-time-series.json +23 -0
  121. package/specs/currency/geolocalized-currency-conversion.json +23 -0
  122. package/specs/currency/historical-currency-converter.json +23 -0
  123. package/specs/currency/historical-currency-rate.json +23 -0
  124. package/specs/dns/bulk-dns-lookup.json +23 -0
  125. package/specs/dns/dns-history-lookup.json +23 -0
  126. package/specs/dns/dns-lookup.json +18 -0
  127. package/specs/dns/reverse-dns-lookup.json +61 -1
  128. package/specs/domain/bulk-domain-checker.json +28 -0
  129. package/specs/domain/domain-search-with-suggestions.json +23 -0
  130. package/specs/domain/domain-search.json +23 -0
  131. package/specs/domain/subdomain-lookup.json +23 -0
  132. package/specs/email-validation/bulk-email-validation.json +28 -0
  133. package/specs/email-validation/email-checker.json +64 -0
  134. package/specs/financial/bulk-vat-rates-country.json +23 -0
  135. package/specs/financial/financial-apis-supported-countries.json +34 -5
  136. package/specs/financial/iban-validation.json +18 -0
  137. package/specs/financial/swift-code-finder.json +31 -2
  138. package/specs/financial/swift-code-lookup.json +23 -0
  139. package/specs/financial/vat-number-validation.json +23 -0
  140. package/specs/financial/vat-rates-by-ip.json +23 -0
  141. package/specs/financial/vat-rates-country.json +23 -0
  142. package/specs/general/usage-credits.json +18 -0
  143. package/specs/geocoding/forward-geocoding.json +23 -0
  144. package/specs/geocoding/reverse-geocoding.json +18 -0
  145. package/specs/geodb/administrative-units-details.json +23 -0
  146. package/specs/geodb/administrative-units-levels.json +23 -0
  147. package/specs/geodb/administrative-units.json +23 -0
  148. package/specs/geodb/cities.json +23 -0
  149. package/specs/geodb/countries-details.json +18 -0
  150. package/specs/geodb/countries.json +18 -0
  151. package/specs/geodb/flags-supported.json +13 -0
  152. package/specs/geodb/flags.json +23 -0
  153. package/specs/geodb/regions.json +13 -0
  154. package/specs/geodb/subregions.json +23 -0
  155. package/specs/ip-intelligence/bulk-ip-lookup.json +23 -0
  156. package/specs/ip-intelligence/bulk-ip-threat-intelligence.json +18 -0
  157. package/specs/ip-intelligence/ip-locator.json +33 -5
  158. package/specs/ip-intelligence/ip-threat-intelligence.json +23 -0
  159. package/specs/other/astronomy-data.json +24 -2
  160. package/specs/pdf/bulk-pdf-generator.json +61 -8
  161. package/specs/pdf/delete-pdf-page.json +33 -21
  162. package/specs/pdf/linearize-pdf.json +31 -19
  163. package/specs/pdf/merge-pdf.json +30 -18
  164. package/specs/pdf/pdf-compress.json +32 -25
  165. package/specs/pdf/pdf-decrypt.json +32 -21
  166. package/specs/pdf/pdf-encrypt.json +31 -19
  167. package/specs/pdf/pdf-extract-pages.json +33 -21
  168. package/specs/pdf/pdf-file-status.json +23 -0
  169. package/specs/pdf/pdf-file.json +23 -0
  170. package/specs/pdf/pdf-files.json +13 -0
  171. package/specs/pdf/pdf-generator.json +61 -8
  172. package/specs/pdf/pdf-resource-download.json +23 -0
  173. package/specs/pdf/pdf-resource-upload-binary.json +29 -16
  174. package/specs/pdf/pdf-resource-upload.json +30 -19
  175. package/specs/pdf/pdf-restrict.json +32 -20
  176. package/specs/pdf/pdf-split-pages.json +33 -21
  177. package/specs/pdf/pdf-task-status.json +23 -0
  178. package/specs/pdf/pdf-to-image.json +90 -101
  179. package/specs/pdf/pdf-unrestrict.json +32 -20
  180. package/specs/pdf/rotate-pdf-pages.json +32 -20
  181. package/specs/phone-validation/bulk-phone-number-validation.json +54 -16
  182. package/specs/phone-validation/phone-number-validation.json +33 -0
  183. package/specs/scraper/web-scraper.json +53 -0
  184. package/specs/screenshot/bulk-screenshot.json +53 -0
  185. package/specs/screenshot/website-screenshot.json +53 -0
  186. package/specs/ssl/ssl-certificate-chain-lookup.json +28 -0
  187. package/specs/ssl/ssl-certificate-lookup.json +28 -0
  188. package/specs/timezone/timezone-converter.json +23 -0
  189. package/specs/timezone/timezone-lookup.json +25 -2
  190. package/specs/user-agent/bulk-user-agent-parser.json +20 -2
  191. package/specs/user-agent/user-agent-parser.json +18 -0
  192. package/specs/weather/air-quality.json +23 -0
  193. package/specs/weather/bulk-live-weather.json +18 -0
  194. package/specs/weather/flood-forecast.json +23 -0
  195. package/specs/weather/historical-weather.json +23 -0
  196. package/specs/weather/live-weather.json +23 -0
  197. package/specs/weather/marine-weather.json +23 -0
  198. package/specs/weather/time-series-weather.json +18 -0
  199. package/specs/weather/weather-forecast.json +18 -0
  200. package/specs/whois/asn-lookup.json +23 -0
  201. package/specs/whois/bulk-whois-lookup.json +28 -0
  202. package/specs/whois/domain-whois-history-lookup.json +23 -0
  203. package/specs/whois/reverse-whois.json +53 -0
  204. package/specs/whois/whois-domain-lookup.json +28 -0
  205. package/specs/whois/whois-ip-lookup.json +23 -0
  206. package/specs/zip-code/bulk-zip-code-lookup.json +23 -0
  207. package/specs/zip-code/zip-code-api.json +23 -0
  208. package/specs/zip-code/zip-code-distance-match.json +23 -0
  209. package/specs/zip-code/zip-code-distance.json +23 -0
  210. package/specs/zip-code/zip-codes-by-city.json +23 -0
  211. package/specs/zip-code/zip-codes-by-region.json +24 -7
  212. package/specs/zip-code/zip-codes-radius-search.json +53 -0
@@ -19,9 +19,7 @@
19
19
  "paths": {
20
20
  "/pdf/remove-pages": {
21
21
  "post": {
22
- "tags": [
23
- "PDF Operations APIs"
24
- ],
22
+ "tags": ["PDF Operations APIs"],
25
23
  "summary": "Delete specific pages from a PDF",
26
24
  "description": "This API removes a selection or range of pages from a PDF file.",
27
25
  "parameters": [
@@ -31,10 +29,7 @@
31
29
  "required": false,
32
30
  "schema": {
33
31
  "type": "string",
34
- "enum": [
35
- "json",
36
- "xml"
37
- ],
32
+ "enum": ["json", "xml"],
38
33
  "default": "json"
39
34
  },
40
35
  "description": "Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure."
@@ -73,7 +68,7 @@
73
68
  "schema": {
74
69
  "type": "string"
75
70
  },
76
- "description": "Specifies which pages to remove from the PDF. Accepts individual page numbers (e.g., '1,7') and/or ascending page ranges (e.g., '3-5'). Use commas to separate entries and hyphens for ranges. Reverse ranges (e.g., '5-3') are not allowed. Alternatively, you may provide only one of the following keywords: 'even' (removes all even-numbered pages), 'odd' (removes all odd-numbered pages), or 'last' (removes only the last page). The keyword 'all' is not supported for this operation. Examples: '1,3-5', 'even'. Mixing special keywords with specific pages/ranges is not allowed. Malformed values or page numbers exceeding the document's page count are not rejected on this call \u2014 the resulting task fails asynchronously (check task status)."
71
+ "description": "Specifies which pages to remove from the PDF. Accepts individual page numbers (e.g., '1,7') and/or ascending page ranges (e.g., '3-5'). Use commas to separate entries and hyphens for ranges. Reverse ranges (e.g., '5-3') are not allowed. Alternatively, you may provide only one of the following keywords: 'even' (removes all even-numbered pages), 'odd' (removes all odd-numbered pages), or 'last' (removes only the last page). The keyword 'all' is not supported for this operation. Examples: '1,3-5', 'even'. Mixing special keywords with specific pages/ranges is not allowed. Malformed values or page numbers exceeding the document's page count are not rejected on this call the resulting task fails asynchronously (check task status)."
77
72
  },
78
73
  {
79
74
  "name": "webhook_url",
@@ -91,7 +86,7 @@
91
86
  "schema": {
92
87
  "type": "boolean"
93
88
  },
94
- "description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization\u2019s admin if part of one."
89
+ "description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one."
95
90
  },
96
91
  {
97
92
  "name": "X-Webhook-Authorization",
@@ -116,7 +111,7 @@
116
111
  },
117
112
  "responses": {
118
113
  "200": {
119
- "description": "Remove task created successfully. Malformed or out-of-range page specifications are not rejected synchronously \u2014 the task is created, then fails asynchronously; poll the task status endpoint and check for status \"failed\" with an error/message pair.",
114
+ "description": "Remove task created successfully. Malformed or out-of-range page specifications are not rejected synchronously the task is created, then fails asynchronously; poll the task status endpoint and check for status \"failed\" with an error/message pair.",
120
115
  "content": {
121
116
  "application/json": {
122
117
  "schema": {
@@ -127,17 +122,20 @@
127
122
  "summary": "Task created",
128
123
  "value": {
129
124
  "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d",
130
- "inputIds": [
131
- "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f"
132
- ]
125
+ "inputIds": ["7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f"]
133
126
  }
134
127
  }
135
128
  }
136
129
  }
130
+ },
131
+ "headers": {
132
+ "X-AF-Credits-Cost": {
133
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
134
+ }
137
135
  }
138
136
  },
139
137
  "400": {
140
- "description": "Bad Request \u2014 Missing/invalid parameters or file ID",
138
+ "description": "Bad Request Missing/invalid parameters or file ID",
141
139
  "content": {
142
140
  "application/json": {
143
141
  "examples": {
@@ -166,10 +164,15 @@
166
164
  "$ref": "#/components/schemas/ErrorResponse"
167
165
  }
168
166
  }
167
+ },
168
+ "headers": {
169
+ "X-AF-Credits-Cost": {
170
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
171
+ }
169
172
  }
170
173
  },
171
174
  "415": {
172
- "description": "Unsupported Media Type \u2014 File type not supported",
175
+ "description": "Unsupported Media Type File type not supported",
173
176
  "content": {
174
177
  "application/json": {
175
178
  "examples": {
@@ -188,6 +191,11 @@
188
191
  "$ref": "#/components/schemas/ErrorResponse"
189
192
  }
190
193
  }
194
+ },
195
+ "headers": {
196
+ "X-AF-Credits-Cost": {
197
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
198
+ }
191
199
  }
192
200
  }
193
201
  },
@@ -214,9 +222,7 @@
214
222
  "PDFResponse": {
215
223
  "type": "object",
216
224
  "description": "Response containing the task ID and input file IDs for a PDF processing task.",
217
- "required": [
218
- "taskId"
219
- ],
225
+ "required": ["taskId"],
220
226
  "properties": {
221
227
  "taskId": {
222
228
  "type": "string",
@@ -246,9 +252,7 @@
246
252
  "ErrorResponse": {
247
253
  "type": "object",
248
254
  "description": "Standard error envelope returned by the API on failed requests.",
249
- "required": [
250
- "message"
251
- ],
255
+ "required": ["message"],
252
256
  "properties": {
253
257
  "error": {
254
258
  "type": "string",
@@ -273,6 +277,14 @@
273
277
  }
274
278
  }
275
279
  }
280
+ },
281
+ "headers": {
282
+ "X-AF-Credits-Cost": {
283
+ "description": "Specifies the number of credits consumed by the current request.",
284
+ "schema": {
285
+ "type": "integer"
286
+ }
287
+ }
276
288
  }
277
289
  },
278
290
  "security": [
@@ -19,9 +19,7 @@
19
19
  "paths": {
20
20
  "/pdf/linearize": {
21
21
  "post": {
22
- "tags": [
23
- "PDF Operations APIs"
24
- ],
22
+ "tags": ["PDF Operations APIs"],
25
23
  "summary": "Linearize a PDF",
26
24
  "description": "API endpoint that linearizes any given PDF, restructuring it for faster loading and page-by-page viewing in web browsers.",
27
25
  "parameters": [
@@ -31,10 +29,7 @@
31
29
  "required": false,
32
30
  "schema": {
33
31
  "type": "string",
34
- "enum": [
35
- "json",
36
- "xml"
37
- ],
32
+ "enum": ["json", "xml"],
38
33
  "default": "json"
39
34
  },
40
35
  "description": "Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure."
@@ -82,7 +77,7 @@
82
77
  "schema": {
83
78
  "type": "boolean"
84
79
  },
85
- "description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization\u2019s admin if part of one."
80
+ "description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one."
86
81
  },
87
82
  {
88
83
  "name": "X-Webhook-Authorization",
@@ -118,17 +113,20 @@
118
113
  "summary": "Task created",
119
114
  "value": {
120
115
  "taskId": "8750f9bb-4cb9-45fd-80a6-e1adf6556618",
121
- "inputIds": [
122
- "5f214118-f848-41f8-809d-8c6058b4b74a"
123
- ]
116
+ "inputIds": ["5f214118-f848-41f8-809d-8c6058b4b74a"]
124
117
  }
125
118
  }
126
119
  }
127
120
  }
121
+ },
122
+ "headers": {
123
+ "X-AF-Credits-Cost": {
124
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
125
+ }
128
126
  }
129
127
  },
130
128
  "400": {
131
- "description": "Bad Request \u2014 Missing/invalid file or file ID",
129
+ "description": "Bad Request Missing/invalid file or file ID",
132
130
  "content": {
133
131
  "application/json": {
134
132
  "examples": {
@@ -157,10 +155,15 @@
157
155
  "$ref": "#/components/schemas/ErrorResponse"
158
156
  }
159
157
  }
158
+ },
159
+ "headers": {
160
+ "X-AF-Credits-Cost": {
161
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
162
+ }
160
163
  }
161
164
  },
162
165
  "415": {
163
- "description": "Unsupported Media Type \u2014 File type not supported",
166
+ "description": "Unsupported Media Type File type not supported",
164
167
  "content": {
165
168
  "application/json": {
166
169
  "examples": {
@@ -179,6 +182,11 @@
179
182
  "$ref": "#/components/schemas/ErrorResponse"
180
183
  }
181
184
  }
185
+ },
186
+ "headers": {
187
+ "X-AF-Credits-Cost": {
188
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
189
+ }
182
190
  }
183
191
  }
184
192
  },
@@ -205,9 +213,7 @@
205
213
  "PDFResponse": {
206
214
  "type": "object",
207
215
  "description": "Response containing the task ID and input file IDs for a PDF processing task.",
208
- "required": [
209
- "taskId"
210
- ],
216
+ "required": ["taskId"],
211
217
  "properties": {
212
218
  "taskId": {
213
219
  "type": "string",
@@ -237,9 +243,7 @@
237
243
  "ErrorResponse": {
238
244
  "type": "object",
239
245
  "description": "Standard error envelope returned by the API on failed requests.",
240
- "required": [
241
- "message"
242
- ],
246
+ "required": ["message"],
243
247
  "properties": {
244
248
  "error": {
245
249
  "type": "string",
@@ -264,6 +268,14 @@
264
268
  }
265
269
  }
266
270
  }
271
+ },
272
+ "headers": {
273
+ "X-AF-Credits-Cost": {
274
+ "description": "Specifies the number of credits consumed by the current request.",
275
+ "schema": {
276
+ "type": "integer"
277
+ }
278
+ }
267
279
  }
268
280
  },
269
281
  "security": [
@@ -19,9 +19,7 @@
19
19
  "paths": {
20
20
  "/pdf/merge": {
21
21
  "post": {
22
- "tags": [
23
- "PDF Operations APIs"
24
- ],
22
+ "tags": ["PDF Operations APIs"],
25
23
  "summary": "Combine multiple PDF files into one",
26
24
  "description": "This API merges multiple PDF files into a single PDF, in the order they are provided",
27
25
  "parameters": [
@@ -31,10 +29,7 @@
31
29
  "required": false,
32
30
  "schema": {
33
31
  "type": "string",
34
- "enum": [
35
- "json",
36
- "xml"
37
- ],
32
+ "enum": ["json", "xml"],
38
33
  "default": "json"
39
34
  },
40
35
  "description": "Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure."
@@ -87,7 +82,7 @@
87
82
  "schema": {
88
83
  "type": "boolean"
89
84
  },
90
- "description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization\u2019s admin if part of one."
85
+ "description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one."
91
86
  },
92
87
  {
93
88
  "name": "X-Webhook-Authorization",
@@ -123,13 +118,16 @@
123
118
  "summary": "Task created",
124
119
  "value": {
125
120
  "taskId": "04a06cd5-158d-4191-a45b-6f58249c599d",
126
- "inputIds": [
127
- "7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f"
128
- ]
121
+ "inputIds": ["7a9e4b12-f3c8-4d56-b7e1-8c2f9d0a3e6f"]
129
122
  }
130
123
  }
131
124
  }
132
125
  }
126
+ },
127
+ "headers": {
128
+ "X-AF-Credits-Cost": {
129
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
130
+ }
133
131
  }
134
132
  },
135
133
  "400": {
@@ -162,10 +160,15 @@
162
160
  "$ref": "#/components/schemas/ErrorResponse"
163
161
  }
164
162
  }
163
+ },
164
+ "headers": {
165
+ "X-AF-Credits-Cost": {
166
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
167
+ }
165
168
  }
166
169
  },
167
170
  "415": {
168
- "description": "Unsupported Media Type \u2014 File type not supported",
171
+ "description": "Unsupported Media Type File type not supported",
169
172
  "content": {
170
173
  "application/json": {
171
174
  "examples": {
@@ -184,6 +187,11 @@
184
187
  "$ref": "#/components/schemas/ErrorResponse"
185
188
  }
186
189
  }
190
+ },
191
+ "headers": {
192
+ "X-AF-Credits-Cost": {
193
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
194
+ }
187
195
  }
188
196
  }
189
197
  },
@@ -209,9 +217,7 @@
209
217
  "schemas": {
210
218
  "PDFResponse": {
211
219
  "type": "object",
212
- "required": [
213
- "taskId"
214
- ],
220
+ "required": ["taskId"],
215
221
  "properties": {
216
222
  "taskId": {
217
223
  "type": "string",
@@ -245,9 +251,7 @@
245
251
  "ErrorResponse": {
246
252
  "type": "object",
247
253
  "description": "Standard error envelope returned by the API on failed requests.",
248
- "required": [
249
- "message"
250
- ],
254
+ "required": ["message"],
251
255
  "properties": {
252
256
  "error": {
253
257
  "type": "string",
@@ -272,6 +276,14 @@
272
276
  }
273
277
  }
274
278
  }
279
+ },
280
+ "headers": {
281
+ "X-AF-Credits-Cost": {
282
+ "description": "Specifies the number of credits consumed by the current request.",
283
+ "schema": {
284
+ "type": "integer"
285
+ }
286
+ }
275
287
  }
276
288
  },
277
289
  "security": [
@@ -19,9 +19,7 @@
19
19
  "paths": {
20
20
  "/pdf/compress": {
21
21
  "post": {
22
- "tags": [
23
- "PDF Operations APIs"
24
- ],
22
+ "tags": ["PDF Operations APIs"],
25
23
  "summary": "Compress a PDF file",
26
24
  "description": "This API compresses a given PDF file to reduce its file serize.",
27
25
  "parameters": [
@@ -31,10 +29,7 @@
31
29
  "required": false,
32
30
  "schema": {
33
31
  "type": "string",
34
- "enum": [
35
- "json",
36
- "xml"
37
- ],
32
+ "enum": ["json", "xml"],
38
33
  "default": "json"
39
34
  },
40
35
  "description": "Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure."
@@ -64,12 +59,7 @@
64
59
  "required": true,
65
60
  "schema": {
66
61
  "type": "string",
67
- "enum": [
68
- "low",
69
- "balanced",
70
- "high",
71
- "extreme"
72
- ],
62
+ "enum": ["low", "balanced", "high", "extreme"],
73
63
  "default": "balanced"
74
64
  },
75
65
  "description": "Controls how aggressively the PDF is compressed. Lower levels preserve more quality, while higher levels reduce file size more."
@@ -99,7 +89,7 @@
99
89
  "schema": {
100
90
  "type": "boolean"
101
91
  },
102
- "description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization\u2019s admin if part of one."
92
+ "description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one."
103
93
  },
104
94
  {
105
95
  "name": "X-Webhook-Authorization",
@@ -135,17 +125,20 @@
135
125
  "summary": "Task created",
136
126
  "value": {
137
127
  "taskId": "ce4b1a38-6cfc-4373-9bd7-ff186fbd8e7e",
138
- "inputIds": [
139
- "f2ba4b50-6f8a-43ae-b42d-96937f50cd89"
140
- ]
128
+ "inputIds": ["f2ba4b50-6f8a-43ae-b42d-96937f50cd89"]
141
129
  }
142
130
  }
143
131
  }
144
132
  }
133
+ },
134
+ "headers": {
135
+ "X-AF-Credits-Cost": {
136
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
137
+ }
145
138
  }
146
139
  },
147
140
  "400": {
148
- "description": "Bad Request \u2014 Missing/invalid parameters or file ID",
141
+ "description": "Bad Request Missing/invalid parameters or file ID",
149
142
  "content": {
150
143
  "application/json": {
151
144
  "examples": {
@@ -184,10 +177,15 @@
184
177
  "$ref": "#/components/schemas/ErrorResponse"
185
178
  }
186
179
  }
180
+ },
181
+ "headers": {
182
+ "X-AF-Credits-Cost": {
183
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
184
+ }
187
185
  }
188
186
  },
189
187
  "415": {
190
- "description": "Unsupported Media Type \u2014 File type not supported",
188
+ "description": "Unsupported Media Type File type not supported",
191
189
  "content": {
192
190
  "application/json": {
193
191
  "examples": {
@@ -206,6 +204,11 @@
206
204
  "$ref": "#/components/schemas/ErrorResponse"
207
205
  }
208
206
  }
207
+ },
208
+ "headers": {
209
+ "X-AF-Credits-Cost": {
210
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
211
+ }
209
212
  }
210
213
  }
211
214
  },
@@ -232,9 +235,7 @@
232
235
  "PdfTaskResponse": {
233
236
  "type": "object",
234
237
  "description": "Response containing the task ID and input file IDs for a PDF processing task.",
235
- "required": [
236
- "taskId"
237
- ],
238
+ "required": ["taskId"],
238
239
  "properties": {
239
240
  "taskId": {
240
241
  "type": "string",
@@ -264,9 +265,7 @@
264
265
  "ErrorResponse": {
265
266
  "type": "object",
266
267
  "description": "Standard error envelope returned by the API on failed requests.",
267
- "required": [
268
- "message"
269
- ],
268
+ "required": ["message"],
270
269
  "properties": {
271
270
  "error": {
272
271
  "type": "string",
@@ -291,6 +290,14 @@
291
290
  }
292
291
  }
293
292
  }
293
+ },
294
+ "headers": {
295
+ "X-AF-Credits-Cost": {
296
+ "description": "Specifies the number of credits consumed by the current request.",
297
+ "schema": {
298
+ "type": "integer"
299
+ }
300
+ }
294
301
  }
295
302
  },
296
303
  "security": [
@@ -19,9 +19,7 @@
19
19
  "paths": {
20
20
  "/pdf/decrypt": {
21
21
  "post": {
22
- "tags": [
23
- "PDF Security APIs"
24
- ],
22
+ "tags": ["PDF Security APIs"],
25
23
  "summary": "Remove all encryption from a PDF",
26
24
  "description": "This API decrypts PDF files, removing all encryption, including open passwords and permission restrictions.",
27
25
  "parameters": [
@@ -31,10 +29,7 @@
31
29
  "required": false,
32
30
  "schema": {
33
31
  "type": "string",
34
- "enum": [
35
- "json",
36
- "xml"
37
- ],
32
+ "enum": ["json", "xml"],
38
33
  "default": "json"
39
34
  },
40
35
  "description": "Specifies the desired format for the API response. Choose 'json' for a JSON object or 'xml' for an XML structure."
@@ -91,7 +86,7 @@
91
86
  "schema": {
92
87
  "type": "boolean"
93
88
  },
94
- "description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization\u2019s admin if part of one."
89
+ "description": "If true, a notification will also be sent by email in case the webhook request fails all the retries. The email notification will be sent to the requesting user or their organization’s admin if part of one."
95
90
  },
96
91
  {
97
92
  "name": "X-Webhook-Authorization",
@@ -116,7 +111,7 @@
116
111
  },
117
112
  "responses": {
118
113
  "200": {
119
- "description": "Decrypt task created successfully. An incorrect file_password is not rejected synchronously \u2014 the task is created, then fails asynchronously; poll the task status endpoint and check for status \"failed\" with error \"Invalid PDF Password\".",
114
+ "description": "Decrypt task created successfully. An incorrect file_password is not rejected synchronously the task is created, then fails asynchronously; poll the task status endpoint and check for status \"failed\" with error \"Invalid PDF Password\".",
120
115
  "content": {
121
116
  "application/json": {
122
117
  "schema": {
@@ -127,17 +122,20 @@
127
122
  "summary": "Task created",
128
123
  "value": {
129
124
  "taskId": "f91ec747-1dc6-4be5-be4b-4d6ff66ed386",
130
- "inputIds": [
131
- "a5f8aca9-d19a-4ee0-90e3-d15f62df1e06"
132
- ]
125
+ "inputIds": ["a5f8aca9-d19a-4ee0-90e3-d15f62df1e06"]
133
126
  }
134
127
  }
135
128
  }
136
129
  }
130
+ },
131
+ "headers": {
132
+ "X-AF-Credits-Cost": {
133
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
134
+ }
137
135
  }
138
136
  },
139
137
  "400": {
140
- "description": "Bad Request \u2014 Missing/invalid parameters or file ID",
138
+ "description": "Bad Request Missing/invalid parameters or file ID",
141
139
  "content": {
142
140
  "application/json": {
143
141
  "examples": {
@@ -176,10 +174,15 @@
176
174
  "$ref": "#/components/schemas/ErrorResponse"
177
175
  }
178
176
  }
177
+ },
178
+ "headers": {
179
+ "X-AF-Credits-Cost": {
180
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
181
+ }
179
182
  }
180
183
  },
181
184
  "415": {
182
- "description": "Unsupported Media Type \u2014 File type not supported",
185
+ "description": "Unsupported Media Type File type not supported",
183
186
  "content": {
184
187
  "application/json": {
185
188
  "schema": {
@@ -198,6 +201,11 @@
198
201
  }
199
202
  }
200
203
  }
204
+ },
205
+ "headers": {
206
+ "X-AF-Credits-Cost": {
207
+ "$ref": "#/components/headers/X-AF-Credits-Cost"
208
+ }
201
209
  }
202
210
  }
203
211
  },
@@ -223,10 +231,7 @@
223
231
  "schemas": {
224
232
  "PDFResponse": {
225
233
  "type": "object",
226
- "required": [
227
- "taskId",
228
- "inputIds"
229
- ],
234
+ "required": ["taskId", "inputIds"],
230
235
  "properties": {
231
236
  "taskId": {
232
237
  "type": "string",
@@ -257,9 +262,7 @@
257
262
  "ErrorResponse": {
258
263
  "type": "object",
259
264
  "description": "Standard error envelope returned by the API on failed requests.",
260
- "required": [
261
- "message"
262
- ],
265
+ "required": ["message"],
263
266
  "properties": {
264
267
  "error": {
265
268
  "type": "string",
@@ -284,6 +287,14 @@
284
287
  }
285
288
  }
286
289
  }
290
+ },
291
+ "headers": {
292
+ "X-AF-Credits-Cost": {
293
+ "description": "Specifies the number of credits consumed by the current request.",
294
+ "schema": {
295
+ "type": "integer"
296
+ }
297
+ }
287
298
  }
288
299
  },
289
300
  "security": [