@outfoxx/sunday 1.1.0-beta.8 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (423) hide show
  1. package/README.md +2 -0
  2. package/build/date-time-types.d.ts +35 -0
  3. package/build/date-time-types.js +699 -0
  4. package/build/date-time-types.js.map +1 -0
  5. package/build/{esm/event-parser.d.ts → event-parser.d.ts} +1 -1
  6. package/build/{esm/event-parser.js → event-parser.js} +10 -12
  7. package/build/event-parser.js.map +1 -0
  8. package/build/{esm/fetch-event-source.d.ts → fetch-event-source.d.ts} +26 -18
  9. package/build/fetch-event-source.js +365 -0
  10. package/build/fetch-event-source.js.map +1 -0
  11. package/build/{esnext/fetch-request-factory.d.ts → fetch-request-factory.d.ts} +18 -20
  12. package/build/fetch-request-factory.js +316 -0
  13. package/build/fetch-request-factory.js.map +1 -0
  14. package/build/fetch.d.ts +9 -0
  15. package/build/fetch.js +140 -0
  16. package/build/fetch.js.map +1 -0
  17. package/build/{esnext/header-parameters.js → header-parameters.js} +31 -2
  18. package/build/header-parameters.js.map +1 -0
  19. package/build/index.d.ts +26 -0
  20. package/build/index.js +41 -0
  21. package/build/index.js.map +1 -0
  22. package/build/{main/logger.d.ts → logger.d.ts} +9 -0
  23. package/build/logger.js +36 -0
  24. package/build/logger.js.map +1 -0
  25. package/build/media-type-codecs/any-text-decoder.d.ts +7 -0
  26. package/build/{esnext/media-type-codecs/binary-encoder.js → media-type-codecs/any-text-decoder.js} +13 -10
  27. package/build/media-type-codecs/any-text-decoder.js.map +1 -0
  28. package/build/media-type-codecs/any-text-encoder.d.ts +6 -0
  29. package/build/{esm/media-type-codecs → media-type-codecs}/any-text-encoder.js +9 -5
  30. package/build/media-type-codecs/any-text-encoder.js.map +1 -0
  31. package/build/media-type-codecs/binary-decoder.d.ts +7 -0
  32. package/build/media-type-codecs/binary-decoder.js +33 -0
  33. package/build/media-type-codecs/binary-decoder.js.map +1 -0
  34. package/build/media-type-codecs/binary-encoder.d.ts +6 -0
  35. package/build/{esm/media-type-codecs → media-type-codecs}/binary-encoder.js +12 -8
  36. package/build/media-type-codecs/binary-encoder.js.map +1 -0
  37. package/build/media-type-codecs/cbor-decoder.d.ts +13 -0
  38. package/build/media-type-codecs/cbor-decoder.js +38 -0
  39. package/build/media-type-codecs/cbor-decoder.js.map +1 -0
  40. package/build/media-type-codecs/cbor-encoder.d.ts +12 -0
  41. package/build/media-type-codecs/cbor-encoder.js +36 -0
  42. package/build/media-type-codecs/cbor-encoder.js.map +1 -0
  43. package/build/{esm/media-type-codecs → media-type-codecs}/cbor-tags.d.ts +2 -0
  44. package/build/{esnext/media-type-codecs → media-type-codecs}/cbor-tags.js +2 -0
  45. package/build/media-type-codecs/cbor-tags.js.map +1 -0
  46. package/build/media-type-codecs/default-policies.d.ts +3 -0
  47. package/build/media-type-codecs/default-policies.js +33 -0
  48. package/build/media-type-codecs/default-policies.js.map +1 -0
  49. package/build/media-type-codecs/json-decoder.d.ts +14 -0
  50. package/build/media-type-codecs/json-decoder.js +40 -0
  51. package/build/media-type-codecs/json-decoder.js.map +1 -0
  52. package/build/media-type-codecs/json-encoder.d.ts +13 -0
  53. package/build/media-type-codecs/json-encoder.js +43 -0
  54. package/build/media-type-codecs/json-encoder.js.map +1 -0
  55. package/build/media-type-codecs/media-type-decoder.d.ts +14 -0
  56. package/build/{esm/media-type-codecs → media-type-codecs}/media-type-decoder.js +1 -2
  57. package/build/media-type-codecs/media-type-decoder.js.map +1 -0
  58. package/build/{main/media-type-codecs → media-type-codecs}/media-type-decoders.d.ts +6 -8
  59. package/build/media-type-codecs/media-type-decoders.js +63 -0
  60. package/build/media-type-codecs/media-type-decoders.js.map +1 -0
  61. package/build/{main/media-type-codecs → media-type-codecs}/media-type-encoder.d.ts +3 -3
  62. package/build/{esnext/media-type-codecs → media-type-codecs}/media-type-encoder.js +2 -4
  63. package/build/media-type-codecs/media-type-encoder.js.map +1 -0
  64. package/build/{esnext/media-type-codecs → media-type-codecs}/media-type-encoders.d.ts +6 -8
  65. package/build/media-type-codecs/media-type-encoders.js +65 -0
  66. package/build/media-type-codecs/media-type-encoders.js.map +1 -0
  67. package/build/media-type-codecs/www-form-url-encoder.d.ts +31 -0
  68. package/build/media-type-codecs/www-form-url-encoder.js +281 -0
  69. package/build/media-type-codecs/www-form-url-encoder.js.map +1 -0
  70. package/build/{esm/media-type.js → media-type.js} +23 -23
  71. package/build/media-type.js.map +1 -0
  72. package/build/problem.d.ts +35 -0
  73. package/build/problem.js +122 -0
  74. package/build/problem.js.map +1 -0
  75. package/build/request-adapters.d.ts +23 -0
  76. package/build/request-adapters.js +53 -0
  77. package/build/request-adapters.js.map +1 -0
  78. package/build/request-factory.d.ts +39 -0
  79. package/build/request-factory.js.map +1 -0
  80. package/build/result-response.js.map +1 -0
  81. package/build/schema-builtins.d.ts +21 -0
  82. package/build/schema-builtins.js +201 -0
  83. package/build/schema-builtins.js.map +1 -0
  84. package/build/schema-policy.d.ts +31 -0
  85. package/build/schema-policy.js +41 -0
  86. package/build/schema-policy.js.map +1 -0
  87. package/build/schema-runtime.d.ts +25 -0
  88. package/build/schema-runtime.js +77 -0
  89. package/build/schema-runtime.js.map +1 -0
  90. package/build/{esnext/sunday-error.d.ts → sunday-error.d.ts} +2 -3
  91. package/build/sunday-error.js +36 -0
  92. package/build/sunday-error.js.map +1 -0
  93. package/build/{esm/url-template.js → url-template.js} +5 -3
  94. package/build/url-template.js.map +1 -0
  95. package/build/util/async-iterables.d.ts +15 -0
  96. package/build/util/async-iterables.js +179 -0
  97. package/build/util/async-iterables.js.map +1 -0
  98. package/build/util/errors.js +65 -0
  99. package/build/util/errors.js.map +1 -0
  100. package/build/util/nullify.d.ts +5 -0
  101. package/build/util/nullify.js +37 -0
  102. package/build/util/nullify.js.map +1 -0
  103. package/build/util/numbers.d.ts +11 -0
  104. package/build/{esm/util/temporal.js → util/numbers.js} +14 -4
  105. package/build/util/numbers.js.map +1 -0
  106. package/build/util/subscriptions.d.ts +16 -0
  107. package/build/util/subscriptions.js +78 -0
  108. package/build/util/subscriptions.js.map +1 -0
  109. package/build/{esm/util/any.js → util/unknowns.js} +2 -3
  110. package/build/util/unknowns.js.map +1 -0
  111. package/package.json +58 -56
  112. package/build/esm/any-type.d.ts +0 -4
  113. package/build/esm/any-type.js +0 -15
  114. package/build/esm/any-type.js.map +0 -1
  115. package/build/esm/class-type.d.ts +0 -2
  116. package/build/esm/class-type.js +0 -15
  117. package/build/esm/class-type.js.map +0 -1
  118. package/build/esm/date-time-types.d.ts +0 -2
  119. package/build/esm/date-time-types.js +0 -16
  120. package/build/esm/date-time-types.js.map +0 -1
  121. package/build/esm/event-parser.js.map +0 -1
  122. package/build/esm/fetch-event-source.js +0 -290
  123. package/build/esm/fetch-event-source.js.map +0 -1
  124. package/build/esm/fetch-request-factory.d.ts +0 -34
  125. package/build/esm/fetch-request-factory.js +0 -190
  126. package/build/esm/fetch-request-factory.js.map +0 -1
  127. package/build/esm/fetch.d.ts +0 -7
  128. package/build/esm/fetch.js +0 -103
  129. package/build/esm/fetch.js.map +0 -1
  130. package/build/esm/header-parameters.js +0 -53
  131. package/build/esm/header-parameters.js.map +0 -1
  132. package/build/esm/index.d.ts +0 -26
  133. package/build/esm/index.js +0 -40
  134. package/build/esm/index.js.map +0 -1
  135. package/build/esm/logger.d.ts +0 -8
  136. package/build/esm/logger.js +0 -15
  137. package/build/esm/logger.js.map +0 -1
  138. package/build/esm/media-type-codecs/any-text-decoder.d.ts +0 -7
  139. package/build/esm/media-type-codecs/any-text-decoder.js +0 -40
  140. package/build/esm/media-type-codecs/any-text-decoder.js.map +0 -1
  141. package/build/esm/media-type-codecs/any-text-encoder.d.ts +0 -5
  142. package/build/esm/media-type-codecs/any-text-encoder.js.map +0 -1
  143. package/build/esm/media-type-codecs/binary-decoder.d.ts +0 -6
  144. package/build/esm/media-type-codecs/binary-decoder.js +0 -40
  145. package/build/esm/media-type-codecs/binary-decoder.js.map +0 -1
  146. package/build/esm/media-type-codecs/binary-encoder.d.ts +0 -5
  147. package/build/esm/media-type-codecs/binary-encoder.js.map +0 -1
  148. package/build/esm/media-type-codecs/cbor-decoder.d.ts +0 -39
  149. package/build/esm/media-type-codecs/cbor-decoder.js +0 -437
  150. package/build/esm/media-type-codecs/cbor-decoder.js.map +0 -1
  151. package/build/esm/media-type-codecs/cbor-encoder.d.ts +0 -43
  152. package/build/esm/media-type-codecs/cbor-encoder.js +0 -236
  153. package/build/esm/media-type-codecs/cbor-encoder.js.map +0 -1
  154. package/build/esm/media-type-codecs/cbor-tags.js +0 -18
  155. package/build/esm/media-type-codecs/cbor-tags.js.map +0 -1
  156. package/build/esm/media-type-codecs/json-decoder.d.ts +0 -39
  157. package/build/esm/media-type-codecs/json-decoder.js +0 -391
  158. package/build/esm/media-type-codecs/json-decoder.js.map +0 -1
  159. package/build/esm/media-type-codecs/json-encoder.d.ts +0 -44
  160. package/build/esm/media-type-codecs/json-encoder.js +0 -273
  161. package/build/esm/media-type-codecs/json-encoder.js.map +0 -1
  162. package/build/esm/media-type-codecs/media-type-decoder.d.ts +0 -11
  163. package/build/esm/media-type-codecs/media-type-decoder.js.map +0 -1
  164. package/build/esm/media-type-codecs/media-type-decoders.d.ts +0 -18
  165. package/build/esm/media-type-codecs/media-type-decoders.js +0 -58
  166. package/build/esm/media-type-codecs/media-type-decoders.js.map +0 -1
  167. package/build/esm/media-type-codecs/media-type-encoder.d.ts +0 -12
  168. package/build/esm/media-type-codecs/media-type-encoder.js +0 -24
  169. package/build/esm/media-type-codecs/media-type-encoder.js.map +0 -1
  170. package/build/esm/media-type-codecs/media-type-encoders.d.ts +0 -18
  171. package/build/esm/media-type-codecs/media-type-encoders.js +0 -60
  172. package/build/esm/media-type-codecs/media-type-encoders.js.map +0 -1
  173. package/build/esm/media-type-codecs/www-form-url-encoder.d.ts +0 -59
  174. package/build/esm/media-type-codecs/www-form-url-encoder.js +0 -192
  175. package/build/esm/media-type-codecs/www-form-url-encoder.js.map +0 -1
  176. package/build/esm/media-type.js.map +0 -1
  177. package/build/esm/problem.d.ts +0 -31
  178. package/build/esm/problem.js +0 -169
  179. package/build/esm/problem.js.map +0 -1
  180. package/build/esm/request-factory.d.ts +0 -44
  181. package/build/esm/request-factory.js.map +0 -1
  182. package/build/esm/result-response.js.map +0 -1
  183. package/build/esm/sunday-error.d.ts +0 -11
  184. package/build/esm/sunday-error.js +0 -42
  185. package/build/esm/sunday-error.js.map +0 -1
  186. package/build/esm/url-template.js.map +0 -1
  187. package/build/esm/util/any.js.map +0 -1
  188. package/build/esm/util/base64.d.ts +0 -5
  189. package/build/esm/util/base64.js +0 -77
  190. package/build/esm/util/base64.js.map +0 -1
  191. package/build/esm/util/error.js +0 -26
  192. package/build/esm/util/error.js.map +0 -1
  193. package/build/esm/util/hex.d.ts +0 -4
  194. package/build/esm/util/hex.js +0 -32
  195. package/build/esm/util/hex.js.map +0 -1
  196. package/build/esm/util/rxjs.d.ts +0 -5
  197. package/build/esm/util/rxjs.js +0 -31
  198. package/build/esm/util/rxjs.js.map +0 -1
  199. package/build/esm/util/stream-rxjs.d.ts +0 -2
  200. package/build/esm/util/stream-rxjs.js +0 -50
  201. package/build/esm/util/stream-rxjs.js.map +0 -1
  202. package/build/esm/util/temporal.d.ts +0 -2
  203. package/build/esm/util/temporal.js.map +0 -1
  204. package/build/esnext/any-type.d.ts +0 -4
  205. package/build/esnext/any-type.js +0 -15
  206. package/build/esnext/any-type.js.map +0 -1
  207. package/build/esnext/class-type.d.ts +0 -2
  208. package/build/esnext/class-type.js +0 -15
  209. package/build/esnext/class-type.js.map +0 -1
  210. package/build/esnext/date-time-types.d.ts +0 -2
  211. package/build/esnext/date-time-types.js +0 -16
  212. package/build/esnext/date-time-types.js.map +0 -1
  213. package/build/esnext/event-parser.d.ts +0 -17
  214. package/build/esnext/event-parser.js +0 -153
  215. package/build/esnext/event-parser.js.map +0 -1
  216. package/build/esnext/fetch-event-source.d.ts +0 -58
  217. package/build/esnext/fetch-event-source.js +0 -290
  218. package/build/esnext/fetch-event-source.js.map +0 -1
  219. package/build/esnext/fetch-request-factory.js +0 -190
  220. package/build/esnext/fetch-request-factory.js.map +0 -1
  221. package/build/esnext/fetch.d.ts +0 -7
  222. package/build/esnext/fetch.js +0 -103
  223. package/build/esnext/fetch.js.map +0 -1
  224. package/build/esnext/header-parameters.d.ts +0 -3
  225. package/build/esnext/header-parameters.js.map +0 -1
  226. package/build/esnext/index.d.ts +0 -26
  227. package/build/esnext/index.js +0 -40
  228. package/build/esnext/index.js.map +0 -1
  229. package/build/esnext/logger.d.ts +0 -8
  230. package/build/esnext/logger.js +0 -15
  231. package/build/esnext/logger.js.map +0 -1
  232. package/build/esnext/media-type-codecs/any-text-decoder.d.ts +0 -7
  233. package/build/esnext/media-type-codecs/any-text-decoder.js +0 -40
  234. package/build/esnext/media-type-codecs/any-text-decoder.js.map +0 -1
  235. package/build/esnext/media-type-codecs/any-text-encoder.d.ts +0 -5
  236. package/build/esnext/media-type-codecs/any-text-encoder.js +0 -23
  237. package/build/esnext/media-type-codecs/any-text-encoder.js.map +0 -1
  238. package/build/esnext/media-type-codecs/binary-decoder.d.ts +0 -6
  239. package/build/esnext/media-type-codecs/binary-decoder.js +0 -40
  240. package/build/esnext/media-type-codecs/binary-decoder.js.map +0 -1
  241. package/build/esnext/media-type-codecs/binary-encoder.d.ts +0 -5
  242. package/build/esnext/media-type-codecs/binary-encoder.js.map +0 -1
  243. package/build/esnext/media-type-codecs/cbor-decoder.d.ts +0 -39
  244. package/build/esnext/media-type-codecs/cbor-decoder.js +0 -437
  245. package/build/esnext/media-type-codecs/cbor-decoder.js.map +0 -1
  246. package/build/esnext/media-type-codecs/cbor-encoder.d.ts +0 -43
  247. package/build/esnext/media-type-codecs/cbor-encoder.js +0 -236
  248. package/build/esnext/media-type-codecs/cbor-encoder.js.map +0 -1
  249. package/build/esnext/media-type-codecs/cbor-tags.d.ts +0 -4
  250. package/build/esnext/media-type-codecs/cbor-tags.js.map +0 -1
  251. package/build/esnext/media-type-codecs/json-decoder.d.ts +0 -39
  252. package/build/esnext/media-type-codecs/json-decoder.js +0 -391
  253. package/build/esnext/media-type-codecs/json-decoder.js.map +0 -1
  254. package/build/esnext/media-type-codecs/json-encoder.d.ts +0 -44
  255. package/build/esnext/media-type-codecs/json-encoder.js +0 -273
  256. package/build/esnext/media-type-codecs/json-encoder.js.map +0 -1
  257. package/build/esnext/media-type-codecs/media-type-decoder.d.ts +0 -11
  258. package/build/esnext/media-type-codecs/media-type-decoder.js +0 -19
  259. package/build/esnext/media-type-codecs/media-type-decoder.js.map +0 -1
  260. package/build/esnext/media-type-codecs/media-type-decoders.d.ts +0 -18
  261. package/build/esnext/media-type-codecs/media-type-decoders.js +0 -58
  262. package/build/esnext/media-type-codecs/media-type-decoders.js.map +0 -1
  263. package/build/esnext/media-type-codecs/media-type-encoder.d.ts +0 -12
  264. package/build/esnext/media-type-codecs/media-type-encoder.js.map +0 -1
  265. package/build/esnext/media-type-codecs/media-type-encoders.js +0 -60
  266. package/build/esnext/media-type-codecs/media-type-encoders.js.map +0 -1
  267. package/build/esnext/media-type-codecs/www-form-url-encoder.d.ts +0 -59
  268. package/build/esnext/media-type-codecs/www-form-url-encoder.js +0 -192
  269. package/build/esnext/media-type-codecs/www-form-url-encoder.js.map +0 -1
  270. package/build/esnext/media-type.d.ts +0 -94
  271. package/build/esnext/media-type.js +0 -305
  272. package/build/esnext/media-type.js.map +0 -1
  273. package/build/esnext/problem.d.ts +0 -31
  274. package/build/esnext/problem.js +0 -169
  275. package/build/esnext/problem.js.map +0 -1
  276. package/build/esnext/request-factory.d.ts +0 -44
  277. package/build/esnext/request-factory.js +0 -15
  278. package/build/esnext/request-factory.js.map +0 -1
  279. package/build/esnext/result-response.d.ts +0 -4
  280. package/build/esnext/result-response.js +0 -15
  281. package/build/esnext/result-response.js.map +0 -1
  282. package/build/esnext/sunday-error.js +0 -42
  283. package/build/esnext/sunday-error.js.map +0 -1
  284. package/build/esnext/url-template.d.ts +0 -6
  285. package/build/esnext/url-template.js +0 -31
  286. package/build/esnext/url-template.js.map +0 -1
  287. package/build/esnext/util/any.d.ts +0 -2
  288. package/build/esnext/util/any.js +0 -24
  289. package/build/esnext/util/any.js.map +0 -1
  290. package/build/esnext/util/base64.d.ts +0 -5
  291. package/build/esnext/util/base64.js +0 -77
  292. package/build/esnext/util/base64.js.map +0 -1
  293. package/build/esnext/util/error.d.ts +0 -2
  294. package/build/esnext/util/error.js +0 -26
  295. package/build/esnext/util/error.js.map +0 -1
  296. package/build/esnext/util/hex.d.ts +0 -4
  297. package/build/esnext/util/hex.js +0 -32
  298. package/build/esnext/util/hex.js.map +0 -1
  299. package/build/esnext/util/rxjs.d.ts +0 -5
  300. package/build/esnext/util/rxjs.js +0 -31
  301. package/build/esnext/util/rxjs.js.map +0 -1
  302. package/build/esnext/util/stream-rxjs.d.ts +0 -2
  303. package/build/esnext/util/stream-rxjs.js +0 -50
  304. package/build/esnext/util/stream-rxjs.js.map +0 -1
  305. package/build/esnext/util/temporal.d.ts +0 -2
  306. package/build/esnext/util/temporal.js +0 -31
  307. package/build/esnext/util/temporal.js.map +0 -1
  308. package/build/main/any-type.d.ts +0 -4
  309. package/build/main/any-type.js +0 -16
  310. package/build/main/any-type.js.map +0 -1
  311. package/build/main/class-type.d.ts +0 -2
  312. package/build/main/class-type.js +0 -16
  313. package/build/main/class-type.js.map +0 -1
  314. package/build/main/date-time-types.d.ts +0 -2
  315. package/build/main/date-time-types.js +0 -27
  316. package/build/main/date-time-types.js.map +0 -1
  317. package/build/main/event-parser.d.ts +0 -17
  318. package/build/main/event-parser.js +0 -157
  319. package/build/main/event-parser.js.map +0 -1
  320. package/build/main/fetch-event-source.d.ts +0 -58
  321. package/build/main/fetch-event-source.js +0 -294
  322. package/build/main/fetch-event-source.js.map +0 -1
  323. package/build/main/fetch-request-factory.d.ts +0 -34
  324. package/build/main/fetch-request-factory.js +0 -194
  325. package/build/main/fetch-request-factory.js.map +0 -1
  326. package/build/main/fetch.d.ts +0 -7
  327. package/build/main/fetch.js +0 -107
  328. package/build/main/fetch.js.map +0 -1
  329. package/build/main/header-parameters.d.ts +0 -3
  330. package/build/main/header-parameters.js +0 -56
  331. package/build/main/header-parameters.js.map +0 -1
  332. package/build/main/index.d.ts +0 -26
  333. package/build/main/index.js +0 -52
  334. package/build/main/index.js.map +0 -1
  335. package/build/main/logger.js +0 -16
  336. package/build/main/logger.js.map +0 -1
  337. package/build/main/media-type-codecs/any-text-decoder.d.ts +0 -7
  338. package/build/main/media-type-codecs/any-text-decoder.js +0 -44
  339. package/build/main/media-type-codecs/any-text-decoder.js.map +0 -1
  340. package/build/main/media-type-codecs/any-text-encoder.d.ts +0 -5
  341. package/build/main/media-type-codecs/any-text-encoder.js +0 -27
  342. package/build/main/media-type-codecs/any-text-encoder.js.map +0 -1
  343. package/build/main/media-type-codecs/binary-decoder.d.ts +0 -6
  344. package/build/main/media-type-codecs/binary-decoder.js +0 -44
  345. package/build/main/media-type-codecs/binary-decoder.js.map +0 -1
  346. package/build/main/media-type-codecs/binary-encoder.d.ts +0 -5
  347. package/build/main/media-type-codecs/binary-encoder.js +0 -30
  348. package/build/main/media-type-codecs/binary-encoder.js.map +0 -1
  349. package/build/main/media-type-codecs/cbor-decoder.d.ts +0 -39
  350. package/build/main/media-type-codecs/cbor-decoder.js +0 -441
  351. package/build/main/media-type-codecs/cbor-decoder.js.map +0 -1
  352. package/build/main/media-type-codecs/cbor-encoder.d.ts +0 -43
  353. package/build/main/media-type-codecs/cbor-encoder.js +0 -240
  354. package/build/main/media-type-codecs/cbor-encoder.js.map +0 -1
  355. package/build/main/media-type-codecs/cbor-tags.d.ts +0 -4
  356. package/build/main/media-type-codecs/cbor-tags.js +0 -21
  357. package/build/main/media-type-codecs/cbor-tags.js.map +0 -1
  358. package/build/main/media-type-codecs/json-decoder.d.ts +0 -39
  359. package/build/main/media-type-codecs/json-decoder.js +0 -395
  360. package/build/main/media-type-codecs/json-decoder.js.map +0 -1
  361. package/build/main/media-type-codecs/json-encoder.d.ts +0 -44
  362. package/build/main/media-type-codecs/json-encoder.js +0 -277
  363. package/build/main/media-type-codecs/json-encoder.js.map +0 -1
  364. package/build/main/media-type-codecs/media-type-decoder.d.ts +0 -11
  365. package/build/main/media-type-codecs/media-type-decoder.js +0 -23
  366. package/build/main/media-type-codecs/media-type-decoder.js.map +0 -1
  367. package/build/main/media-type-codecs/media-type-decoders.js +0 -62
  368. package/build/main/media-type-codecs/media-type-decoders.js.map +0 -1
  369. package/build/main/media-type-codecs/media-type-encoder.js +0 -29
  370. package/build/main/media-type-codecs/media-type-encoder.js.map +0 -1
  371. package/build/main/media-type-codecs/media-type-encoders.d.ts +0 -18
  372. package/build/main/media-type-codecs/media-type-encoders.js +0 -64
  373. package/build/main/media-type-codecs/media-type-encoders.js.map +0 -1
  374. package/build/main/media-type-codecs/www-form-url-encoder.d.ts +0 -59
  375. package/build/main/media-type-codecs/www-form-url-encoder.js +0 -196
  376. package/build/main/media-type-codecs/www-form-url-encoder.js.map +0 -1
  377. package/build/main/media-type.d.ts +0 -94
  378. package/build/main/media-type.js +0 -309
  379. package/build/main/media-type.js.map +0 -1
  380. package/build/main/problem.d.ts +0 -31
  381. package/build/main/problem.js +0 -172
  382. package/build/main/problem.js.map +0 -1
  383. package/build/main/request-factory.d.ts +0 -44
  384. package/build/main/request-factory.js +0 -16
  385. package/build/main/request-factory.js.map +0 -1
  386. package/build/main/result-response.d.ts +0 -4
  387. package/build/main/result-response.js +0 -16
  388. package/build/main/result-response.js.map +0 -1
  389. package/build/main/sunday-error.d.ts +0 -11
  390. package/build/main/sunday-error.js +0 -46
  391. package/build/main/sunday-error.js.map +0 -1
  392. package/build/main/url-template.d.ts +0 -6
  393. package/build/main/url-template.js +0 -35
  394. package/build/main/url-template.js.map +0 -1
  395. package/build/main/util/any.d.ts +0 -2
  396. package/build/main/util/any.js +0 -29
  397. package/build/main/util/any.js.map +0 -1
  398. package/build/main/util/base64.d.ts +0 -5
  399. package/build/main/util/base64.js +0 -80
  400. package/build/main/util/base64.js.map +0 -1
  401. package/build/main/util/error.d.ts +0 -2
  402. package/build/main/util/error.js +0 -31
  403. package/build/main/util/error.js.map +0 -1
  404. package/build/main/util/hex.d.ts +0 -4
  405. package/build/main/util/hex.js +0 -35
  406. package/build/main/util/hex.js.map +0 -1
  407. package/build/main/util/rxjs.d.ts +0 -5
  408. package/build/main/util/rxjs.js +0 -36
  409. package/build/main/util/rxjs.js.map +0 -1
  410. package/build/main/util/stream-rxjs.d.ts +0 -2
  411. package/build/main/util/stream-rxjs.js +0 -54
  412. package/build/main/util/stream-rxjs.js.map +0 -1
  413. package/build/main/util/temporal.d.ts +0 -2
  414. package/build/main/util/temporal.js +0 -36
  415. package/build/main/util/temporal.js.map +0 -1
  416. /package/build/{esm/header-parameters.d.ts → header-parameters.d.ts} +0 -0
  417. /package/build/{esm/media-type.d.ts → media-type.d.ts} +0 -0
  418. /package/build/{esm/request-factory.js → request-factory.js} +0 -0
  419. /package/build/{esm/result-response.d.ts → result-response.d.ts} +0 -0
  420. /package/build/{esm/result-response.js → result-response.js} +0 -0
  421. /package/build/{esm/url-template.d.ts → url-template.d.ts} +0 -0
  422. /package/build/{esm/util/error.d.ts → util/errors.d.ts} +0 -0
  423. /package/build/{esm/util/any.d.ts → util/unknowns.d.ts} +0 -0
@@ -1,107 +0,0 @@
1
- "use strict";
2
- // Copyright 2020 Outfox, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ResponseExample = exports.validate = void 0;
26
- const media_type_1 = require("./media-type");
27
- const problem_1 = require("./problem");
28
- const sunday_error_1 = require("./sunday-error");
29
- const base64_1 = require("./util/base64");
30
- const error_1 = require("./util/error");
31
- function validate(response, dataExpected, problemTypes) {
32
- var _a, _b;
33
- return __awaiter(this, void 0, void 0, function* () {
34
- if (response.status < 200 || response.status >= 300) {
35
- const mediaType = media_type_1.MediaType.from(response.headers.get('content-type'), media_type_1.MediaType.OctetStream);
36
- const isProblem = (_a = mediaType === null || mediaType === void 0 ? void 0 : mediaType.compatible(media_type_1.MediaType.Problem)) !== null && _a !== void 0 ? _a : false;
37
- if (!isProblem) {
38
- throw yield problem_1.Problem.fromResponse(response);
39
- }
40
- const problemData = yield response.json();
41
- const problemType = (_b = problemTypes === null || problemTypes === void 0 ? void 0 : problemTypes.get(problemData.type)) !== null && _b !== void 0 ? _b : problem_1.Problem;
42
- if (problemType.name === 'Problem') {
43
- throw new problem_1.Problem(problemData);
44
- }
45
- else {
46
- throw new problemType(problemData === null || problemData === void 0 ? void 0 : problemData.instance);
47
- }
48
- }
49
- if (dataExpected && (response.status === 204 || response.status === 205)) {
50
- throw yield sunday_error_1.SundayError.fromResponse('Unexpected Empty Response', response);
51
- }
52
- return response;
53
- });
54
- }
55
- exports.validate = validate;
56
- var ResponseExample;
57
- (function (ResponseExample) {
58
- function build(response, bodyExample) {
59
- return (`HTTP/?.? ${response.status} ${response.statusText}\n` +
60
- Array.from(response.headers.entries())
61
- .map(([name, value]) => `${name}: ${value}\n`)
62
- .join('') +
63
- '\n' +
64
- (bodyExample !== null && bodyExample !== void 0 ? bodyExample : '<none>'));
65
- }
66
- ResponseExample.build = build;
67
- function bodyExcerpt(response, maxLength) {
68
- var _a;
69
- return __awaiter(this, void 0, void 0, function* () {
70
- let body;
71
- let bodyExcerpt;
72
- try {
73
- if ((_a = response.headers.get('content-type')) === null || _a === void 0 ? void 0 : _a.startsWith('text/')) {
74
- const text = yield response.text();
75
- body = text;
76
- if (text.length > maxLength) {
77
- const exampleText = text.slice(0, maxLength);
78
- const remainingTextLength = text.length - maxLength;
79
- bodyExcerpt = `${exampleText}<<... ${remainingTextLength} characters>>`;
80
- }
81
- else {
82
- bodyExcerpt = text;
83
- }
84
- }
85
- else {
86
- const blob = yield response.blob();
87
- body = blob;
88
- if (blob.size > maxLength) {
89
- bodyExcerpt = `<<binary data: ${blob.size} bytes>>`;
90
- }
91
- else {
92
- const dataSlice = yield blob.slice(0, maxLength).arrayBuffer();
93
- bodyExcerpt = base64_1.Base64.encode(dataSlice);
94
- }
95
- }
96
- }
97
- catch (error) {
98
- // ignore errors
99
- const message = (0, error_1.errorToMessage)(error);
100
- body = bodyExcerpt = `<<error displaying response data: ${message}>>`;
101
- }
102
- return [bodyExcerpt, body];
103
- });
104
- }
105
- ResponseExample.bodyExcerpt = bodyExcerpt;
106
- })(ResponseExample = exports.ResponseExample || (exports.ResponseExample = {}));
107
- //# sourceMappingURL=fetch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/fetch.ts"],"names":[],"mappings":"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"}
@@ -1,3 +0,0 @@
1
- export declare namespace HeaderParameters {
2
- function encode(parameters?: Record<string, unknown>): [string, string][];
3
- }
@@ -1,56 +0,0 @@
1
- "use strict";
2
- // Copyright 2020 Outfox, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.HeaderParameters = void 0;
17
- var HeaderParameters;
18
- (function (HeaderParameters) {
19
- function encode(parameters) {
20
- if (parameters == null) {
21
- return [];
22
- }
23
- const headers = [];
24
- Object.entries(parameters).forEach(([name, parameter]) => {
25
- for (const value of encodeParam(name, parameter)) {
26
- headers.push([name, value]);
27
- }
28
- });
29
- return headers;
30
- }
31
- HeaderParameters.encode = encode;
32
- function encodeParam(name, value) {
33
- if (value == null) {
34
- return [];
35
- }
36
- if (value instanceof Array) {
37
- const result = [];
38
- for (const item of value) {
39
- if (item == null) {
40
- continue;
41
- }
42
- result.push(validate(name, `${item}`));
43
- }
44
- return result;
45
- }
46
- return [validate(name, `${value}`)];
47
- }
48
- const asciiRegex = /^[\x20-\x7F]*$/;
49
- function validate(name, value) {
50
- if (!asciiRegex.test(value)) {
51
- throw new Error(`The encoded header value contains one or more invalid characters: header=${name}, value=${value}`);
52
- }
53
- return value;
54
- }
55
- })(HeaderParameters = exports.HeaderParameters || (exports.HeaderParameters = {}));
56
- //# sourceMappingURL=header-parameters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"header-parameters.js","sourceRoot":"","sources":["../../src/header-parameters.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,IAAiB,gBAAgB,CAmDhC;AAnDD,WAAiB,gBAAgB;IAC/B,SAAgB,MAAM,CACpB,UAAoC;QAEpC,IAAI,UAAU,IAAI,IAAI,EAAE;YACtB,OAAO,EAAE,CAAC;SACX;QAED,MAAM,OAAO,GAAuB,EAAE,CAAC;QAEvC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE,EAAE;YACvD,KAAK,MAAM,KAAK,IAAI,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,EAAE;gBAChD,OAAO,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;aAC7B;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,OAAO,CAAC;IACjB,CAAC;IAhBe,uBAAM,SAgBrB,CAAA;IAED,SAAS,WAAW,CAAC,IAAY,EAAE,KAAc;QAC/C,IAAI,KAAK,IAAI,IAAI,EAAE;YACjB,OAAO,EAAE,CAAC;SACX;QAED,IAAI,KAAK,YAAY,KAAK,EAAE;YAC1B,MAAM,MAAM,GAAa,EAAE,CAAC;YAE5B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;gBACxB,IAAI,IAAI,IAAI,IAAI,EAAE;oBAChB,SAAS;iBACV;gBAED,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;aACxC;YAED,OAAO,MAAM,CAAC;SACf;QAED,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,UAAU,GAAG,gBAAgB,CAAC;IAEpC,SAAS,QAAQ,CAAC,IAAY,EAAE,KAAa;QAC3C,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;YAC3B,MAAM,IAAI,KAAK,CACb,4EAA4E,IAAI,WAAW,KAAK,EAAE,CACnG,CAAC;SACH;QACD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,EAnDgB,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAmDhC"}
@@ -1,26 +0,0 @@
1
- export * from './any-type';
2
- export * from './class-type';
3
- export * from './request-factory';
4
- export * from './fetch-request-factory';
5
- export * from './fetch-event-source';
6
- export * from './url-template';
7
- export * from './media-type';
8
- export * from './media-type-codecs/media-type-decoder';
9
- export * from './media-type-codecs/media-type-decoders';
10
- export * from './media-type-codecs/media-type-encoder';
11
- export * from './media-type-codecs/media-type-encoders';
12
- export * from './media-type-codecs/json-decoder';
13
- export * from './media-type-codecs/json-encoder';
14
- export * from './media-type-codecs/cbor-decoder';
15
- export * from './media-type-codecs/cbor-encoder';
16
- export * from './media-type-codecs/binary-decoder';
17
- export * from './media-type-codecs/binary-encoder';
18
- export * from './media-type-codecs/www-form-url-encoder';
19
- export * from './logger';
20
- export * from './sunday-error';
21
- export * from './problem';
22
- export * from './date-time-types';
23
- export * from './result-response';
24
- export * from './util/base64';
25
- export * from './util/hex';
26
- export * from './util/rxjs';
@@ -1,52 +0,0 @@
1
- "use strict";
2
- // Copyright 2020 Outfox, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
18
- }) : (function(o, m, k, k2) {
19
- if (k2 === undefined) k2 = k;
20
- o[k2] = m[k];
21
- }));
22
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
23
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- __exportStar(require("./any-type"), exports);
27
- __exportStar(require("./class-type"), exports);
28
- __exportStar(require("./request-factory"), exports);
29
- __exportStar(require("./fetch-request-factory"), exports);
30
- __exportStar(require("./fetch-event-source"), exports);
31
- __exportStar(require("./url-template"), exports);
32
- __exportStar(require("./media-type"), exports);
33
- __exportStar(require("./media-type-codecs/media-type-decoder"), exports);
34
- __exportStar(require("./media-type-codecs/media-type-decoders"), exports);
35
- __exportStar(require("./media-type-codecs/media-type-encoder"), exports);
36
- __exportStar(require("./media-type-codecs/media-type-encoders"), exports);
37
- __exportStar(require("./media-type-codecs/json-decoder"), exports);
38
- __exportStar(require("./media-type-codecs/json-encoder"), exports);
39
- __exportStar(require("./media-type-codecs/cbor-decoder"), exports);
40
- __exportStar(require("./media-type-codecs/cbor-encoder"), exports);
41
- __exportStar(require("./media-type-codecs/binary-decoder"), exports);
42
- __exportStar(require("./media-type-codecs/binary-encoder"), exports);
43
- __exportStar(require("./media-type-codecs/www-form-url-encoder"), exports);
44
- __exportStar(require("./logger"), exports);
45
- __exportStar(require("./sunday-error"), exports);
46
- __exportStar(require("./problem"), exports);
47
- __exportStar(require("./date-time-types"), exports);
48
- __exportStar(require("./result-response"), exports);
49
- __exportStar(require("./util/base64"), exports);
50
- __exportStar(require("./util/hex"), exports);
51
- __exportStar(require("./util/rxjs"), exports);
52
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;AAEjC,6CAA2B;AAC3B,+CAA6B;AAC7B,oDAAkC;AAClC,0DAAwC;AACxC,uDAAqC;AACrC,iDAA+B;AAC/B,+CAA6B;AAC7B,yEAAuD;AACvD,0EAAwD;AACxD,yEAAuD;AACvD,0EAAwD;AACxD,mEAAiD;AACjD,mEAAiD;AACjD,mEAAiD;AACjD,mEAAiD;AACjD,qEAAmD;AACnD,qEAAmD;AACnD,2EAAyD;AACzD,2CAAyB;AACzB,iDAA+B;AAC/B,4CAA0B;AAC1B,oDAAkC;AAClC,oDAAkC;AAElC,gDAA8B;AAC9B,6CAA2B;AAC3B,8CAA4B"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- // Copyright 2020 Outfox, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC"}
@@ -1,7 +0,0 @@
1
- import { AnyType } from '../any-type';
2
- import { TextMediaTypeDecoder } from './media-type-decoder';
3
- export declare class AnyTextDecoder implements TextMediaTypeDecoder {
4
- static default: AnyTextDecoder;
5
- decode<T>(response: Response, type: AnyType): Promise<T>;
6
- decodeText<T>(text: string, type: AnyType): T;
7
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- // Copyright 2020 Outfox, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.AnyTextDecoder = void 0;
26
- class AnyTextDecoder {
27
- decode(response, type) {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- if (type[0] != String) {
30
- throw Error('Invalid type, expected String');
31
- }
32
- return (yield response.text());
33
- });
34
- }
35
- decodeText(text, type) {
36
- if (type[0] != String) {
37
- throw Error('Invalid type, expected String');
38
- }
39
- return text;
40
- }
41
- }
42
- exports.AnyTextDecoder = AnyTextDecoder;
43
- AnyTextDecoder.default = new AnyTextDecoder();
44
- //# sourceMappingURL=any-text-decoder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"any-text-decoder.js","sourceRoot":"","sources":["../../../src/media-type-codecs/any-text-decoder.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;AAKjC,MAAa,cAAc;IAGnB,MAAM,CAAI,QAAkB,EAAE,IAAa;;YAC/C,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE;gBACrB,MAAM,KAAK,CAAC,+BAA+B,CAAC,CAAC;aAC9C;YACD,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAiB,CAAC;QACjD,CAAC;KAAA;IAED,UAAU,CAAI,IAAY,EAAE,IAAa;QACvC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,MAAM,EAAE;YACrB,MAAM,KAAK,CAAC,+BAA+B,CAAC,CAAC;SAC9C;QACD,OAAO,IAAoB,CAAC;IAC9B,CAAC;;AAfH,wCAgBC;AAfQ,sBAAO,GAAG,IAAI,cAAc,EAAE,CAAC"}
@@ -1,5 +0,0 @@
1
- import { MediaTypeEncoder } from './media-type-encoder';
2
- export declare class AnyTextEncoder implements MediaTypeEncoder {
3
- static default: AnyTextEncoder;
4
- encode(value: unknown): BodyInit;
5
- }
@@ -1,27 +0,0 @@
1
- "use strict";
2
- // Copyright 2020 Outfox, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.AnyTextEncoder = void 0;
17
- class AnyTextEncoder {
18
- encode(value) {
19
- if (typeof value != 'string') {
20
- throw Error('Invalid value, expected string');
21
- }
22
- return value;
23
- }
24
- }
25
- exports.AnyTextEncoder = AnyTextEncoder;
26
- AnyTextEncoder.default = new AnyTextEncoder();
27
- //# sourceMappingURL=any-text-encoder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"any-text-encoder.js","sourceRoot":"","sources":["../../../src/media-type-codecs/any-text-encoder.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAIjC,MAAa,cAAc;IAGzB,MAAM,CAAC,KAAc;QACnB,IAAI,OAAO,KAAK,IAAI,QAAQ,EAAE;YAC5B,MAAM,KAAK,CAAC,gCAAgC,CAAC,CAAC;SAC/C;QACD,OAAO,KAAK,CAAC;IACf,CAAC;;AARH,wCASC;AARQ,sBAAO,GAAG,IAAI,cAAc,EAAE,CAAC"}
@@ -1,6 +0,0 @@
1
- import { MediaTypeDecoder } from './media-type-decoder';
2
- import { AnyConstructableType } from '../any-type';
3
- export declare class BinaryDecoder implements MediaTypeDecoder {
4
- static default: BinaryDecoder;
5
- decode<T>(response: Response, type: AnyConstructableType): Promise<T>;
6
- }
@@ -1,44 +0,0 @@
1
- "use strict";
2
- // Copyright 2020 Outfox, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
- return new (P || (P = Promise))(function (resolve, reject) {
18
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
- step((generator = generator.apply(thisArg, _arguments || [])).next());
22
- });
23
- };
24
- Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.BinaryDecoder = void 0;
26
- class BinaryDecoder {
27
- decode(response, type) {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- const arrayBuffer = yield response.arrayBuffer();
30
- if (type[0] === ArrayBuffer) {
31
- return arrayBuffer;
32
- }
33
- else if (type[0] === Uint8Array ||
34
- type[0] === Int8Array ||
35
- type[0] === DataView) {
36
- return new type[0](arrayBuffer);
37
- }
38
- throw Error('Invalid value, expected ArrayBuffer, (Int|Uint)Array or DataView');
39
- });
40
- }
41
- }
42
- exports.BinaryDecoder = BinaryDecoder;
43
- BinaryDecoder.default = new BinaryDecoder();
44
- //# sourceMappingURL=binary-decoder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"binary-decoder.js","sourceRoot":"","sources":["../../../src/media-type-codecs/binary-decoder.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;AAKjC,MAAa,aAAa;IAGlB,MAAM,CAAI,QAAkB,EAAE,IAA0B;;YAC5D,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC;YAEjD,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,WAAW,EAAE;gBAC3B,OAAO,WAA2B,CAAC;aACpC;iBAAM,IACL,IAAI,CAAC,CAAC,CAAC,KAAK,UAAU;gBACtB,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS;gBACrB,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EACpB;gBACA,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAM,CAAC;aACtC;YAED,MAAM,KAAK,CACT,kEAAkE,CACnE,CAAC;QACJ,CAAC;KAAA;;AAnBH,sCAoBC;AAnBQ,qBAAO,GAAG,IAAI,aAAa,EAAE,CAAC"}
@@ -1,5 +0,0 @@
1
- import { MediaTypeEncoder } from './media-type-encoder';
2
- export declare class BinaryEncoder implements MediaTypeEncoder {
3
- static default: BinaryEncoder;
4
- encode(value: unknown): BodyInit;
5
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
- // Copyright 2020 Outfox, Inc.
3
- //
4
- // Licensed under the Apache License, Version 2.0 (the "License");
5
- // you may not use this file except in compliance with the License.
6
- // You may obtain a copy of the License at
7
- //
8
- // http://www.apache.org/licenses/LICENSE-2.0
9
- //
10
- // Unless required by applicable law or agreed to in writing, software
11
- // distributed under the License is distributed on an "AS IS" BASIS,
12
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- // See the License for the specific language governing permissions and
14
- // limitations under the License.
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.BinaryEncoder = void 0;
17
- class BinaryEncoder {
18
- encode(value) {
19
- if (!ArrayBuffer.isView(value) &&
20
- !(value instanceof ArrayBuffer) &&
21
- !(value instanceof Blob) &&
22
- !(value instanceof ReadableStream)) {
23
- throw Error('Invalid value, expected BufferSource, Blob or ReadableStream');
24
- }
25
- return value;
26
- }
27
- }
28
- exports.BinaryEncoder = BinaryEncoder;
29
- BinaryEncoder.default = new BinaryEncoder();
30
- //# sourceMappingURL=binary-encoder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"binary-encoder.js","sourceRoot":"","sources":["../../../src/media-type-codecs/binary-encoder.ts"],"names":[],"mappings":";AAAA,8BAA8B;AAC9B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAIjC,MAAa,aAAa;IAGxB,MAAM,CAAC,KAAc;QACnB,IACE,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC;YAC1B,CAAC,CAAC,KAAK,YAAY,WAAW,CAAC;YAC/B,CAAC,CAAC,KAAK,YAAY,IAAI,CAAC;YACxB,CAAC,CAAC,KAAK,YAAY,cAAc,CAAC,EAClC;YACA,MAAM,KAAK,CACT,8DAA8D,CAC/D,CAAC;SACH;QACD,OAAO,KAAK,CAAC;IACf,CAAC;;AAfH,sCAgBC;AAfQ,qBAAO,GAAG,IAAI,aAAa,EAAE,CAAC"}
@@ -1,39 +0,0 @@
1
- import { AnyType } from '../any-type';
2
- import { MediaTypeDecoder } from './media-type-decoder';
3
- export declare class CBORDecoder implements MediaTypeDecoder {
4
- readonly numericDateDecoding: CBORDecoder.NumericDateDecoding;
5
- static get default(): CBORDecoder;
6
- private readonly customDeserializers;
7
- private readonly parser;
8
- constructor(numericDateDecoding: CBORDecoder.NumericDateDecoding);
9
- decode<T>(response: Response, type: AnyType): Promise<T>;
10
- decodeData<T>(buffer: ArrayBuffer, type: AnyType): T;
11
- private untag;
12
- private instantDeserializer;
13
- private zonedDateTimeDeserializer;
14
- private offsetDateTimeDeserializer;
15
- private offsetTimeFormatter;
16
- private offsetTimeDeserializer;
17
- private localDateTimeDeserializer;
18
- private localDateDeserializer;
19
- private localTimeDeserializer;
20
- private dateDeserializer;
21
- private urlDeserializer;
22
- private arrayBufferDeserializer;
23
- }
24
- export declare namespace CBORDecoder {
25
- /**
26
- * Configures how numeric temporal values are decoded.
27
- */
28
- enum NumericDateDecoding {
29
- /**
30
- * Decode numeric temporal values assuming they are seconds with decimal
31
- * sub-second precision.
32
- */
33
- DECIMAL_SECONDS_SINCE_EPOCH = 0,
34
- /**
35
- * Decode numeric temporal values assuming they are integer milliseconds.
36
- */
37
- MILLISECONDS_SINCE_EPOCH = 1
38
- }
39
- }