@space-cow-media/spellbook-client 7.1.1 → 7.1.3

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 (284) hide show
  1. package/dist/apis/CardListFromTextApi.d.ts +1 -1
  2. package/dist/apis/CardListFromTextApi.js +1 -1
  3. package/dist/apis/CardListFromUrlApi.d.ts +1 -1
  4. package/dist/apis/CardListFromUrlApi.js +1 -1
  5. package/dist/apis/CardsApi.d.ts +1 -1
  6. package/dist/apis/CardsApi.js +1 -1
  7. package/dist/apis/DefaultApi.d.ts +1 -1
  8. package/dist/apis/DefaultApi.js +1 -1
  9. package/dist/apis/EstimateBracketApi.d.ts +1 -1
  10. package/dist/apis/EstimateBracketApi.js +1 -1
  11. package/dist/apis/ExplainQueryApi.d.ts +1 -1
  12. package/dist/apis/ExplainQueryApi.js +1 -1
  13. package/dist/apis/FeaturesApi.d.ts +1 -1
  14. package/dist/apis/FeaturesApi.js +1 -1
  15. package/dist/apis/FindMyCombosApi.d.ts +1 -1
  16. package/dist/apis/FindMyCombosApi.js +1 -1
  17. package/dist/apis/PropertiesApi.d.ts +1 -1
  18. package/dist/apis/PropertiesApi.js +1 -1
  19. package/dist/apis/SaltVotesApi.d.ts +1 -1
  20. package/dist/apis/SaltVotesApi.js +1 -1
  21. package/dist/apis/TemplatesApi.d.ts +1 -1
  22. package/dist/apis/TemplatesApi.js +1 -1
  23. package/dist/apis/TokenApi.d.ts +1 -1
  24. package/dist/apis/TokenApi.js +1 -1
  25. package/dist/apis/UsersApi.d.ts +1 -1
  26. package/dist/apis/UsersApi.js +1 -1
  27. package/dist/apis/VariantAliasesApi.d.ts +1 -1
  28. package/dist/apis/VariantAliasesApi.js +1 -1
  29. package/dist/apis/VariantSuggestionsApi.d.ts +1 -1
  30. package/dist/apis/VariantSuggestionsApi.js +1 -1
  31. package/dist/apis/VariantUpdateSuggestionsApi.d.ts +1 -1
  32. package/dist/apis/VariantUpdateSuggestionsApi.js +1 -1
  33. package/dist/apis/VariantsApi.d.ts +1 -1
  34. package/dist/apis/VariantsApi.js +1 -1
  35. package/dist/models/BracketTagEnum.d.ts +1 -1
  36. package/dist/models/BracketTagEnum.js +1 -1
  37. package/dist/models/Card.d.ts +1 -1
  38. package/dist/models/Card.js +1 -1
  39. package/dist/models/CardDetail.d.ts +1 -1
  40. package/dist/models/CardDetail.js +1 -1
  41. package/dist/models/CardInDeck.d.ts +1 -1
  42. package/dist/models/CardInDeck.js +1 -1
  43. package/dist/models/CardInDeckRequest.d.ts +1 -1
  44. package/dist/models/CardInDeckRequest.js +1 -1
  45. package/dist/models/CardInVariant.d.ts +1 -1
  46. package/dist/models/CardInVariant.js +1 -1
  47. package/dist/models/CardLegalities.d.ts +1 -1
  48. package/dist/models/CardLegalities.js +1 -1
  49. package/dist/models/CardPrices.d.ts +1 -1
  50. package/dist/models/CardPrices.js +1 -1
  51. package/dist/models/CardUsedInVariantSuggestion.d.ts +1 -1
  52. package/dist/models/CardUsedInVariantSuggestion.js +1 -1
  53. package/dist/models/CardUsedInVariantSuggestionRequest.d.ts +1 -1
  54. package/dist/models/CardUsedInVariantSuggestionRequest.js +1 -1
  55. package/dist/models/ClassifiedCard.d.ts +1 -1
  56. package/dist/models/ClassifiedCard.js +1 -1
  57. package/dist/models/ClassifiedVariant.d.ts +1 -1
  58. package/dist/models/ClassifiedVariant.js +1 -1
  59. package/dist/models/ColorEnum.d.ts +1 -1
  60. package/dist/models/ColorEnum.js +1 -1
  61. package/dist/models/Combo.d.ts +1 -1
  62. package/dist/models/Combo.js +1 -1
  63. package/dist/models/Deck.d.ts +1 -1
  64. package/dist/models/Deck.js +1 -1
  65. package/dist/models/DeckRequest.d.ts +1 -1
  66. package/dist/models/DeckRequest.js +1 -1
  67. package/dist/models/EstimateBracketResult.d.ts +1 -1
  68. package/dist/models/EstimateBracketResult.js +1 -1
  69. package/dist/models/Feature.d.ts +1 -1
  70. package/dist/models/Feature.js +1 -1
  71. package/dist/models/FeatureOfCard.d.ts +1 -1
  72. package/dist/models/FeatureOfCard.js +1 -1
  73. package/dist/models/FeatureProducedByVariant.d.ts +1 -1
  74. package/dist/models/FeatureProducedByVariant.js +1 -1
  75. package/dist/models/FeatureProducedInVariantSuggestion.d.ts +1 -1
  76. package/dist/models/FeatureProducedInVariantSuggestion.js +1 -1
  77. package/dist/models/FeatureProducedInVariantSuggestionRequest.d.ts +1 -1
  78. package/dist/models/FeatureProducedInVariantSuggestionRequest.js +1 -1
  79. package/dist/models/FeatureStatusEnum.d.ts +1 -1
  80. package/dist/models/FeatureStatusEnum.js +1 -1
  81. package/dist/models/FindMyCombosResponse.d.ts +1 -1
  82. package/dist/models/FindMyCombosResponse.js +1 -1
  83. package/dist/models/InvalidUrlResponse.d.ts +1 -1
  84. package/dist/models/InvalidUrlResponse.js +1 -1
  85. package/dist/models/KindEnum.d.ts +1 -1
  86. package/dist/models/KindEnum.js +1 -1
  87. package/dist/models/LayoutRotationEnum.d.ts +1 -1
  88. package/dist/models/LayoutRotationEnum.js +1 -1
  89. package/dist/models/PaginatedCardDetailList.d.ts +1 -1
  90. package/dist/models/PaginatedCardDetailList.js +1 -1
  91. package/dist/models/PaginatedFeatureList.d.ts +1 -1
  92. package/dist/models/PaginatedFeatureList.js +1 -1
  93. package/dist/models/PaginatedFindMyCombosResponseList.d.ts +1 -1
  94. package/dist/models/PaginatedFindMyCombosResponseList.js +1 -1
  95. package/dist/models/PaginatedFindMyCombosResponseListResults.d.ts +1 -1
  96. package/dist/models/PaginatedFindMyCombosResponseListResults.js +1 -1
  97. package/dist/models/PaginatedSaltVoteList.d.ts +1 -1
  98. package/dist/models/PaginatedSaltVoteList.js +1 -1
  99. package/dist/models/PaginatedTemplateList.d.ts +1 -1
  100. package/dist/models/PaginatedTemplateList.js +1 -1
  101. package/dist/models/PaginatedUserDetailList.d.ts +1 -1
  102. package/dist/models/PaginatedUserDetailList.js +1 -1
  103. package/dist/models/PaginatedVariantAliasList.d.ts +1 -1
  104. package/dist/models/PaginatedVariantAliasList.js +1 -1
  105. package/dist/models/PaginatedVariantList.d.ts +1 -1
  106. package/dist/models/PaginatedVariantList.js +1 -1
  107. package/dist/models/PaginatedVariantSuggestionList.d.ts +1 -1
  108. package/dist/models/PaginatedVariantSuggestionList.js +1 -1
  109. package/dist/models/PaginatedVariantUpdateSuggestionList.d.ts +1 -1
  110. package/dist/models/PaginatedVariantUpdateSuggestionList.js +1 -1
  111. package/dist/models/PaginatedWebsitePropertyList.d.ts +1 -1
  112. package/dist/models/PaginatedWebsitePropertyList.js +1 -1
  113. package/dist/models/PatchedUserDetailRequest.d.ts +1 -1
  114. package/dist/models/PatchedUserDetailRequest.js +1 -1
  115. package/dist/models/PatchedVariantSuggestionRequest.d.ts +1 -1
  116. package/dist/models/PatchedVariantSuggestionRequest.js +1 -1
  117. package/dist/models/PatchedVariantUpdateSuggestionRequest.d.ts +1 -1
  118. package/dist/models/PatchedVariantUpdateSuggestionRequest.js +1 -1
  119. package/dist/models/ProducedManaEnum.d.ts +1 -1
  120. package/dist/models/ProducedManaEnum.js +1 -1
  121. package/dist/models/QueryExplanation.d.ts +1 -1
  122. package/dist/models/QueryExplanation.js +1 -1
  123. package/dist/models/QueryExplanationValidationError.d.ts +1 -1
  124. package/dist/models/QueryExplanationValidationError.js +1 -1
  125. package/dist/models/SaltVote.d.ts +1 -1
  126. package/dist/models/SaltVote.js +1 -1
  127. package/dist/models/SaltVoteRequest.d.ts +1 -1
  128. package/dist/models/SaltVoteRequest.js +1 -1
  129. package/dist/models/SuggestionStatusEnum.d.ts +1 -1
  130. package/dist/models/SuggestionStatusEnum.js +1 -1
  131. package/dist/models/Template.d.ts +1 -1
  132. package/dist/models/Template.js +1 -1
  133. package/dist/models/TemplateInVariant.d.ts +1 -1
  134. package/dist/models/TemplateInVariant.js +1 -1
  135. package/dist/models/TemplateRequiredInVariantSuggestion.d.ts +1 -1
  136. package/dist/models/TemplateRequiredInVariantSuggestion.js +1 -1
  137. package/dist/models/TemplateRequiredInVariantSuggestionRequest.d.ts +1 -1
  138. package/dist/models/TemplateRequiredInVariantSuggestionRequest.js +1 -1
  139. package/dist/models/TokenObtainPair.d.ts +1 -1
  140. package/dist/models/TokenObtainPair.js +1 -1
  141. package/dist/models/TokenObtainPairRequest.d.ts +1 -1
  142. package/dist/models/TokenObtainPairRequest.js +1 -1
  143. package/dist/models/TokenRefresh.d.ts +1 -1
  144. package/dist/models/TokenRefresh.js +1 -1
  145. package/dist/models/TokenRefreshRequest.d.ts +1 -1
  146. package/dist/models/TokenRefreshRequest.js +1 -1
  147. package/dist/models/TokenVerifyRequest.d.ts +1 -1
  148. package/dist/models/TokenVerifyRequest.js +1 -1
  149. package/dist/models/User.d.ts +1 -1
  150. package/dist/models/User.js +1 -1
  151. package/dist/models/UserDetail.d.ts +1 -1
  152. package/dist/models/UserDetail.js +1 -1
  153. package/dist/models/UserDetailRequest.d.ts +1 -1
  154. package/dist/models/UserDetailRequest.js +1 -1
  155. package/dist/models/UserRequest.d.ts +1 -1
  156. package/dist/models/UserRequest.js +1 -1
  157. package/dist/models/Variant.d.ts +2 -1
  158. package/dist/models/Variant.js +1 -1
  159. package/dist/models/Variant.js.map +1 -1
  160. package/dist/models/VariantAlias.d.ts +1 -1
  161. package/dist/models/VariantAlias.js +1 -1
  162. package/dist/models/VariantInVariantUpdateSuggestion.d.ts +1 -1
  163. package/dist/models/VariantInVariantUpdateSuggestion.js +1 -1
  164. package/dist/models/VariantInVariantUpdateSuggestionRequest.d.ts +1 -1
  165. package/dist/models/VariantInVariantUpdateSuggestionRequest.js +1 -1
  166. package/dist/models/VariantLegalities.d.ts +1 -1
  167. package/dist/models/VariantLegalities.js +1 -1
  168. package/dist/models/VariantPrices.d.ts +1 -1
  169. package/dist/models/VariantPrices.js +1 -1
  170. package/dist/models/VariantStatusEnum.d.ts +4 -2
  171. package/dist/models/VariantStatusEnum.js +3 -1
  172. package/dist/models/VariantStatusEnum.js.map +1 -1
  173. package/dist/models/VariantSuggestion.d.ts +1 -1
  174. package/dist/models/VariantSuggestion.js +1 -1
  175. package/dist/models/VariantSuggestionRequest.d.ts +1 -1
  176. package/dist/models/VariantSuggestionRequest.js +1 -1
  177. package/dist/models/VariantUpdateSuggestion.d.ts +1 -1
  178. package/dist/models/VariantUpdateSuggestion.js +1 -1
  179. package/dist/models/VariantUpdateSuggestionRequest.d.ts +1 -1
  180. package/dist/models/VariantUpdateSuggestionRequest.js +1 -1
  181. package/dist/models/VariantsQueryValidationError.d.ts +1 -1
  182. package/dist/models/VariantsQueryValidationError.js +1 -1
  183. package/dist/models/WebsiteProperty.d.ts +1 -1
  184. package/dist/models/WebsiteProperty.js +1 -1
  185. package/dist/models/ZoneLocationsEnum.d.ts +1 -1
  186. package/dist/models/ZoneLocationsEnum.js +1 -1
  187. package/dist/runtime.d.ts +17 -10
  188. package/dist/runtime.js +40 -59
  189. package/dist/runtime.js.map +1 -1
  190. package/package.json +1 -1
  191. package/spellbook-client/apis/CardListFromTextApi.ts +1 -1
  192. package/spellbook-client/apis/CardListFromUrlApi.ts +1 -1
  193. package/spellbook-client/apis/CardsApi.ts +1 -1
  194. package/spellbook-client/apis/DefaultApi.ts +1 -1
  195. package/spellbook-client/apis/EstimateBracketApi.ts +1 -1
  196. package/spellbook-client/apis/ExplainQueryApi.ts +1 -1
  197. package/spellbook-client/apis/FeaturesApi.ts +1 -1
  198. package/spellbook-client/apis/FindMyCombosApi.ts +1 -1
  199. package/spellbook-client/apis/PropertiesApi.ts +1 -1
  200. package/spellbook-client/apis/SaltVotesApi.ts +1 -1
  201. package/spellbook-client/apis/TemplatesApi.ts +1 -1
  202. package/spellbook-client/apis/TokenApi.ts +1 -1
  203. package/spellbook-client/apis/UsersApi.ts +1 -1
  204. package/spellbook-client/apis/VariantAliasesApi.ts +1 -1
  205. package/spellbook-client/apis/VariantSuggestionsApi.ts +1 -1
  206. package/spellbook-client/apis/VariantUpdateSuggestionsApi.ts +1 -1
  207. package/spellbook-client/apis/VariantsApi.ts +1 -1
  208. package/spellbook-client/docs/VariantStatusEnum.md +1 -1
  209. package/spellbook-client/models/BracketTagEnum.ts +1 -1
  210. package/spellbook-client/models/Card.ts +1 -1
  211. package/spellbook-client/models/CardDetail.ts +1 -1
  212. package/spellbook-client/models/CardInDeck.ts +1 -1
  213. package/spellbook-client/models/CardInDeckRequest.ts +1 -1
  214. package/spellbook-client/models/CardInVariant.ts +1 -1
  215. package/spellbook-client/models/CardLegalities.ts +1 -1
  216. package/spellbook-client/models/CardPrices.ts +1 -1
  217. package/spellbook-client/models/CardUsedInVariantSuggestion.ts +1 -1
  218. package/spellbook-client/models/CardUsedInVariantSuggestionRequest.ts +1 -1
  219. package/spellbook-client/models/ClassifiedCard.ts +1 -1
  220. package/spellbook-client/models/ClassifiedVariant.ts +1 -1
  221. package/spellbook-client/models/ColorEnum.ts +1 -1
  222. package/spellbook-client/models/Combo.ts +1 -1
  223. package/spellbook-client/models/Deck.ts +1 -1
  224. package/spellbook-client/models/DeckRequest.ts +1 -1
  225. package/spellbook-client/models/EstimateBracketResult.ts +1 -1
  226. package/spellbook-client/models/Feature.ts +1 -1
  227. package/spellbook-client/models/FeatureOfCard.ts +1 -1
  228. package/spellbook-client/models/FeatureProducedByVariant.ts +1 -1
  229. package/spellbook-client/models/FeatureProducedInVariantSuggestion.ts +1 -1
  230. package/spellbook-client/models/FeatureProducedInVariantSuggestionRequest.ts +1 -1
  231. package/spellbook-client/models/FeatureStatusEnum.ts +1 -1
  232. package/spellbook-client/models/FindMyCombosResponse.ts +1 -1
  233. package/spellbook-client/models/InvalidUrlResponse.ts +1 -1
  234. package/spellbook-client/models/KindEnum.ts +1 -1
  235. package/spellbook-client/models/LayoutRotationEnum.ts +1 -1
  236. package/spellbook-client/models/PaginatedCardDetailList.ts +1 -1
  237. package/spellbook-client/models/PaginatedFeatureList.ts +1 -1
  238. package/spellbook-client/models/PaginatedFindMyCombosResponseList.ts +1 -1
  239. package/spellbook-client/models/PaginatedFindMyCombosResponseListResults.ts +1 -1
  240. package/spellbook-client/models/PaginatedSaltVoteList.ts +1 -1
  241. package/spellbook-client/models/PaginatedTemplateList.ts +1 -1
  242. package/spellbook-client/models/PaginatedUserDetailList.ts +1 -1
  243. package/spellbook-client/models/PaginatedVariantAliasList.ts +1 -1
  244. package/spellbook-client/models/PaginatedVariantList.ts +1 -1
  245. package/spellbook-client/models/PaginatedVariantSuggestionList.ts +1 -1
  246. package/spellbook-client/models/PaginatedVariantUpdateSuggestionList.ts +1 -1
  247. package/spellbook-client/models/PaginatedWebsitePropertyList.ts +1 -1
  248. package/spellbook-client/models/PatchedUserDetailRequest.ts +1 -1
  249. package/spellbook-client/models/PatchedVariantSuggestionRequest.ts +1 -1
  250. package/spellbook-client/models/PatchedVariantUpdateSuggestionRequest.ts +1 -1
  251. package/spellbook-client/models/ProducedManaEnum.ts +1 -1
  252. package/spellbook-client/models/QueryExplanation.ts +1 -1
  253. package/spellbook-client/models/QueryExplanationValidationError.ts +1 -1
  254. package/spellbook-client/models/SaltVote.ts +1 -1
  255. package/spellbook-client/models/SaltVoteRequest.ts +1 -1
  256. package/spellbook-client/models/SuggestionStatusEnum.ts +1 -1
  257. package/spellbook-client/models/Template.ts +1 -1
  258. package/spellbook-client/models/TemplateInVariant.ts +1 -1
  259. package/spellbook-client/models/TemplateRequiredInVariantSuggestion.ts +1 -1
  260. package/spellbook-client/models/TemplateRequiredInVariantSuggestionRequest.ts +1 -1
  261. package/spellbook-client/models/TokenObtainPair.ts +1 -1
  262. package/spellbook-client/models/TokenObtainPairRequest.ts +1 -1
  263. package/spellbook-client/models/TokenRefresh.ts +1 -1
  264. package/spellbook-client/models/TokenRefreshRequest.ts +1 -1
  265. package/spellbook-client/models/TokenVerifyRequest.ts +1 -1
  266. package/spellbook-client/models/User.ts +1 -1
  267. package/spellbook-client/models/UserDetail.ts +1 -1
  268. package/spellbook-client/models/UserDetailRequest.ts +1 -1
  269. package/spellbook-client/models/UserRequest.ts +1 -1
  270. package/spellbook-client/models/Variant.ts +2 -1
  271. package/spellbook-client/models/VariantAlias.ts +1 -1
  272. package/spellbook-client/models/VariantInVariantUpdateSuggestion.ts +1 -1
  273. package/spellbook-client/models/VariantInVariantUpdateSuggestionRequest.ts +1 -1
  274. package/spellbook-client/models/VariantLegalities.ts +1 -1
  275. package/spellbook-client/models/VariantPrices.ts +1 -1
  276. package/spellbook-client/models/VariantStatusEnum.ts +4 -2
  277. package/spellbook-client/models/VariantSuggestion.ts +1 -1
  278. package/spellbook-client/models/VariantSuggestionRequest.ts +1 -1
  279. package/spellbook-client/models/VariantUpdateSuggestion.ts +1 -1
  280. package/spellbook-client/models/VariantUpdateSuggestionRequest.ts +1 -1
  281. package/spellbook-client/models/VariantsQueryValidationError.ts +1 -1
  282. package/spellbook-client/models/WebsiteProperty.ts +1 -1
  283. package/spellbook-client/models/ZoneLocationsEnum.ts +1 -1
  284. package/spellbook-client/runtime.ts +47 -58
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -97,6 +97,7 @@ export interface Variant {
97
97
  * * `E` - Example
98
98
  * * `R` - Restore
99
99
  * * `NW` - Not Working
100
+ * * `RF` - Reference
100
101
  */
101
102
  status: VariantStatusEnum;
102
103
  /**
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -20,6 +20,7 @@
20
20
  * * `E` - Example
21
21
  * * `R` - Restore
22
22
  * * `NW` - Not Working
23
+ * * `RF` - Reference
23
24
  * @export
24
25
  * @enum {string}
25
26
  */
@@ -30,7 +31,8 @@ export enum VariantStatusEnum {
30
31
  Ok = 'OK',
31
32
  E = 'E',
32
33
  R = 'R',
33
- Nw = 'NW'
34
+ Nw = 'NW',
35
+ Rf = 'RF'
34
36
  }
35
37
 
36
38
 
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Commander Spellbook API
5
5
  * API for Commander Spellbook, the combo database engine for Magic: The Gathering. ## Bulk data Please do not use this API to export the whole dataset: consuming hundreds of result pages every time costs you time and us a ton of resources. Every variant, together with the variant aliases, is published as a single JSON document, refreshed periodically: * [/variants.json.gz](/variants.json.gz) — gzipped, prefer this one * [/variants.json](/variants.json) — uncompressed The document holds the `timestamp` it was built at, the `version` that built it, and the `variants` and `aliases` arrays, whose items have the very same shape as the `/variants/` and `/variant-aliases/` responses. Fetch it on a schedule of your own and read it locally. ## Using this API Make sparse, unauthenticated requests, with the general guideline of a few HTTP calls per user interaction with your tool. * Name your service, optionally with a version, in the [User-Agent](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/User-Agent#library_and_net_tool_ua_strings) header. * You may be rate limited: 80 requests per minute should be a safe rate, and clients should always handle `429 Too Many Requests` responses. * Responses use camelCase keys. * A TypeScript client is published on npm as [`@space-cow-media/spellbook-client`](https://www.npmjs.com/package/@space-cow-media/spellbook-client). Please credit us, and link back to []() where applicable. Thanks!
6
6
  *
7
- * The version of the OpenAPI document: 7.1.1
7
+ * The version of the OpenAPI document: 7.1.3
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -488,90 +488,79 @@ export class VoidApiResponse {
488
488
  }
489
489
  }
490
490
 
491
+ /**
492
+ * A Blob carrying the file name the server advertised, empty when it did not send one. It is a File
493
+ * wherever one can be built, and the bare Blob given a name otherwise. Same name and shape as the
494
+ * `typescript` generator's browser HttpFile.
495
+ */
496
+ export type HttpFile = Blob & { readonly name: string };
497
+
491
498
  export class BlobApiResponse {
492
499
  constructor(public raw: Response) {}
493
500
 
494
501
  /**
495
- * The body as a File named after the Content-Disposition header, so that a download keeps the
496
- * name the server gave it. A File is a Blob: callers reading a Blob are unaffected, and the name
497
- * is empty when the server did not send one. Runtimes without a global File (Node.js before 20)
498
- * keep receiving the bare Blob.
502
+ * The body named after the Content-Disposition header, so that a download keeps the name the
503
+ * server gave it. A File is built from a native Blob; the Blob itself is named where there is no
504
+ * global File (Node.js before 20), where File cannot be constructed, or where the Blob is not the
505
+ * native one, as returned by an injected fetch implementation such as node-fetch, which a File
506
+ * would stringify instead of wrapping.
499
507
  */
500
- async value(): Promise<File> {
508
+ async value(): Promise<HttpFile> {
501
509
  const blob = await this.raw.blob();
502
- if (typeof File === 'undefined') {
503
- return blob as File;
510
+ const name = parseContentDispositionFilename(this.raw.headers) ?? '';
511
+ if (typeof File !== 'undefined' && blob instanceof Blob) {
512
+ try {
513
+ return new File([blob], name, { type: blob.type });
514
+ } catch {
515
+ // File cannot be constructed: name the Blob itself
516
+ }
504
517
  }
505
- return new File([blob], parseContentDispositionFilename(this.raw.headers) ?? '', { type: blob.type });
518
+ return Object.assign(blob, { name });
506
519
  };
507
520
  }
508
521
 
509
522
  /**
510
523
  * The file name advertised by a Content-Disposition header (RFC 6266): the RFC 5987 encoded
511
- * `filename*` parameter first, then the plain `filename` as a quoted-string or a token. Parameters
512
- * are split on `;` outside quoted-strings and matched by name case-insensitively. Any directory
513
- * part is dropped so that the name is safe to write to disk as is; undefined when no usable name
514
- * is advertised.
524
+ * `filename*` parameter first, falling back to the plain `filename` when it is malformed, not UTF-8
525
+ * or has no usable name. Any directory part is dropped; undefined when no usable name is advertised.
515
526
  */
516
527
  export function parseContentDispositionFilename(headers: Headers): string | undefined {
517
- const value = headers.get('Content-Disposition');
518
- if (!value) {
528
+ const params = parseHeaderParameters(headers.get('Content-Disposition') ?? '');
529
+ return basename(decodeExtValue(params.get('filename*'))) ?? basename(params.get('filename'));
530
+ }
531
+
532
+ /** The decoded RFC 5987 ext-value, or undefined when it is not UTF-8 or its percent-encoding is malformed. */
533
+ function decodeExtValue(value: string | undefined): string | undefined {
534
+ const match = value === undefined ? null : /^utf-8'[^']*'(.*)$/i.exec(value);
535
+ try {
536
+ return match ? decodeURIComponent(match[1]) : undefined;
537
+ } catch {
519
538
  return undefined;
520
539
  }
521
- const params = parseHeaderParameters(value);
522
- const encoded = params.get('filename*');
523
- if (encoded !== undefined) {
524
- const extValue = /^utf-8'[^']*'(.*)$/i.exec(encoded);
525
- if (extValue) {
526
- try {
527
- return basename(decodeURIComponent(extValue[1]));
528
- } catch {
529
- // malformed percent-encoding: fall through to the plain form
530
- }
531
- }
532
- }
533
- const plain = params.get('filename');
534
- return plain === undefined ? undefined : basename(plain);
535
540
  }
536
541
 
537
542
  /**
538
- * The `name=value` parameters of a header value, split on `;` outside quoted-strings. Names are
539
- * lower-cased, quoted-string values are unquoted with their backslash escapes resolved, and the
540
- * first occurrence of a name wins.
543
+ * The `name=value` parameters of a header value, consumed one at a time so that a quoted-string is
544
+ * taken whole, `;` included. Names are lower-cased, quoted-string values are unquoted with their
545
+ * backslash escapes resolved, and the first occurrence of a name wins.
541
546
  */
542
547
  function parseHeaderParameters(value: string): Map<string, string> {
543
548
  const params = new Map<string, string>();
544
- let start = 0;
545
- let quoted = false;
546
- for (let i = 0; i <= value.length; i++) {
547
- const c = value[i];
548
- if (i === value.length || (c === ';' && !quoted)) {
549
- const part = value.slice(start, i);
550
- const eq = part.indexOf('=');
551
- if (eq !== -1) {
552
- const name = part.slice(0, eq).trim().toLowerCase();
553
- let raw = part.slice(eq + 1).trim();
554
- if (raw.startsWith('"')) {
555
- raw = raw.slice(1, raw.length > 1 && raw.endsWith('"') ? -1 : undefined).replace(/\\(.)/g, '$1');
556
- }
557
- if (name && !params.has(name)) {
558
- params.set(name, raw);
559
- }
560
- }
561
- start = i + 1;
562
- } else if (c === '"') {
563
- quoted = !quoted;
564
- } else if (c === '\\' && quoted) {
565
- i++;
549
+ const parameter = /(?:^|;)\s*([^=;]+?)\s*=\s*(?:"((?:[^"\\]|\\.)*)"?|([^;]*))/g;
550
+ let match: RegExpExecArray | null;
551
+ while ((match = parameter.exec(value)) !== null) {
552
+ const name = match[1].toLowerCase();
553
+ if (!params.has(name)) {
554
+ params.set(name, match[2] !== undefined ? match[2].replace(/\\(.)/g, '$1') : match[3].trim());
566
555
  }
567
556
  }
568
557
  return params;
569
558
  }
570
559
 
571
- /** The last path segment of a file name, or undefined when nothing usable is left. */
572
- function basename(name: string): string | undefined {
573
- const base = name.slice(Math.max(name.lastIndexOf('/'), name.lastIndexOf('\\')) + 1).trim();
574
- return base === '' || base === '.' || base === '..' ? undefined : base;
560
+ /** The last `/` or `\` separated segment of a file name, or undefined when it is not a file name. */
561
+ function basename(name: string | undefined): string | undefined {
562
+ const base = name?.split(/[\\/]/).pop();
563
+ return !base || base === '.' || base === '..' ? undefined : base;
575
564
  }
576
565
 
577
566
  export class TextApiResponse {