@truvity/sdk 0.37.4 → 0.37.7

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 (345) hide show
  1. package/Client.d.ts +3 -1
  2. package/Client.d.ts.map +1 -1
  3. package/Client.js +43 -1
  4. package/Client.js.map +1 -1
  5. package/ExtendedClient.d.ts +1 -2
  6. package/ExtendedClient.d.ts.map +1 -1
  7. package/ExtendedClient.js +1 -5
  8. package/ExtendedClient.js.map +1 -1
  9. package/api/resources/apiKeys/client/Client.d.ts +3 -1
  10. package/api/resources/apiKeys/client/Client.d.ts.map +1 -1
  11. package/api/resources/apiKeys/client/Client.js +28 -31
  12. package/api/resources/apiKeys/client/Client.js.map +1 -1
  13. package/api/resources/apiKeys/client/index.d.ts +1 -0
  14. package/api/resources/apiKeys/client/index.d.ts.map +1 -1
  15. package/api/resources/apiKeys/client/index.js.map +1 -1
  16. package/api/resources/credentials/client/Client.d.ts +4 -3
  17. package/api/resources/credentials/client/Client.d.ts.map +1 -1
  18. package/api/resources/credentials/client/Client.js +38 -41
  19. package/api/resources/credentials/client/Client.js.map +1 -1
  20. package/api/resources/credentials/client/index.d.ts +1 -0
  21. package/api/resources/credentials/client/index.d.ts.map +1 -1
  22. package/api/resources/credentials/client/index.js.map +1 -1
  23. package/api/resources/desk/client/Client.d.ts +3 -1
  24. package/api/resources/desk/client/Client.d.ts.map +1 -1
  25. package/api/resources/desk/client/Client.js +7 -10
  26. package/api/resources/desk/client/Client.js.map +1 -1
  27. package/api/resources/desk/client/index.d.ts +1 -0
  28. package/api/resources/desk/client/index.d.ts.map +1 -1
  29. package/api/resources/desk/client/index.js.map +1 -1
  30. package/api/resources/didcommMessages/client/Client.d.ts +3 -1
  31. package/api/resources/didcommMessages/client/Client.d.ts.map +1 -1
  32. package/api/resources/didcommMessages/client/Client.js +28 -31
  33. package/api/resources/didcommMessages/client/Client.js.map +1 -1
  34. package/api/resources/didcommMessages/client/index.d.ts +1 -0
  35. package/api/resources/didcommMessages/client/index.d.ts.map +1 -1
  36. package/api/resources/didcommMessages/client/index.js.map +1 -1
  37. package/api/resources/dids/client/Client.d.ts +3 -1
  38. package/api/resources/dids/client/Client.d.ts.map +1 -1
  39. package/api/resources/dids/client/Client.js +4 -7
  40. package/api/resources/dids/client/Client.js.map +1 -1
  41. package/api/resources/dids/client/index.d.ts +1 -0
  42. package/api/resources/dids/client/index.d.ts.map +1 -1
  43. package/api/resources/dids/client/index.js.map +1 -1
  44. package/api/resources/drafts/client/Client.d.ts +4 -3
  45. package/api/resources/drafts/client/Client.d.ts.map +1 -1
  46. package/api/resources/drafts/client/Client.js +38 -41
  47. package/api/resources/drafts/client/Client.js.map +1 -1
  48. package/api/resources/drafts/client/index.d.ts +1 -0
  49. package/api/resources/drafts/client/index.d.ts.map +1 -1
  50. package/api/resources/drafts/client/index.js.map +1 -1
  51. package/api/resources/files/client/Client.d.ts +4 -3
  52. package/api/resources/files/client/Client.d.ts.map +1 -1
  53. package/api/resources/files/client/Client.js +35 -38
  54. package/api/resources/files/client/Client.js.map +1 -1
  55. package/api/resources/files/client/index.d.ts +1 -0
  56. package/api/resources/files/client/index.d.ts.map +1 -1
  57. package/api/resources/files/client/index.js.map +1 -1
  58. package/api/resources/gdpr/client/Client.d.ts +3 -1
  59. package/api/resources/gdpr/client/Client.d.ts.map +1 -1
  60. package/api/resources/gdpr/client/Client.js +4 -7
  61. package/api/resources/gdpr/client/Client.js.map +1 -1
  62. package/api/resources/gdpr/client/index.d.ts +1 -0
  63. package/api/resources/gdpr/client/index.d.ts.map +1 -1
  64. package/api/resources/gdpr/client/index.js.map +1 -1
  65. package/api/resources/keys/client/Client.d.ts +6 -5
  66. package/api/resources/keys/client/Client.d.ts.map +1 -1
  67. package/api/resources/keys/client/Client.js +43 -46
  68. package/api/resources/keys/client/Client.js.map +1 -1
  69. package/api/resources/keys/client/index.d.ts +1 -0
  70. package/api/resources/keys/client/index.d.ts.map +1 -1
  71. package/api/resources/keys/client/index.js.map +1 -1
  72. package/api/resources/presentations/client/Client.d.ts +5 -4
  73. package/api/resources/presentations/client/Client.d.ts.map +1 -1
  74. package/api/resources/presentations/client/Client.js +45 -48
  75. package/api/resources/presentations/client/Client.js.map +1 -1
  76. package/api/resources/presentations/client/index.d.ts +1 -0
  77. package/api/resources/presentations/client/index.d.ts.map +1 -1
  78. package/api/resources/presentations/client/index.js.map +1 -1
  79. package/api/types/DidCommMessageBlobAttachmentDescriptor.d.ts +16 -0
  80. package/api/types/DidCommMessageBlobAttachmentDescriptor.d.ts.map +1 -0
  81. package/api/types/DidCommMessageBlobAttachmentDescriptor.js +6 -0
  82. package/api/types/DidCommMessageBlobAttachmentDescriptor.js.map +1 -0
  83. package/api/types/DidCommMessageBlobAttachmentStatus.d.ts +14 -0
  84. package/api/types/DidCommMessageBlobAttachmentStatus.d.ts.map +1 -0
  85. package/api/types/DidCommMessageBlobAttachmentStatus.js +6 -0
  86. package/api/types/DidCommMessageBlobAttachmentStatus.js.map +1 -0
  87. package/api/types/DidCommMessageBlobDescriptor.d.ts +27 -0
  88. package/api/types/DidCommMessageBlobDescriptor.d.ts.map +1 -0
  89. package/api/types/{ProblemMethodNotAllowedAlive.js → DidCommMessageBlobDescriptor.js} +1 -1
  90. package/api/types/DidCommMessageBlobDescriptor.js.map +1 -0
  91. package/api/types/DidCommMessageBlobStatus.d.ts +20 -0
  92. package/api/types/DidCommMessageBlobStatus.d.ts.map +1 -0
  93. package/api/types/{ProblemPreconditionFailedBlob.js → DidCommMessageBlobStatus.js} +1 -1
  94. package/api/types/DidCommMessageBlobStatus.js.map +1 -0
  95. package/api/types/DidCommMessageCreateBlobs.d.ts +11 -0
  96. package/api/types/DidCommMessageCreateBlobs.d.ts.map +1 -0
  97. package/api/types/{ProblemMethodNotAllowedDeleted.js → DidCommMessageCreateBlobs.js} +1 -1
  98. package/api/types/DidCommMessageCreateBlobs.js.map +1 -0
  99. package/api/types/DidCommMessageCreateBlobsStatus.d.ts +11 -0
  100. package/api/types/DidCommMessageCreateBlobsStatus.d.ts.map +1 -0
  101. package/api/types/{ProblemPreconditionFailedResource.js → DidCommMessageCreateBlobsStatus.js} +1 -1
  102. package/api/types/DidCommMessageCreateBlobsStatus.js.map +1 -0
  103. package/api/types/MethodNotAllowedProblems.d.ts +2 -2
  104. package/api/types/MethodNotAllowedProblems.d.ts.map +1 -1
  105. package/api/types/MethodNotAllowedProblems.js.map +1 -1
  106. package/api/types/PreconditionFailedProblems.d.ts +2 -2
  107. package/api/types/PreconditionFailedProblems.js.map +1 -1
  108. package/api/types/ProblemBadRequest.d.ts +1 -1
  109. package/api/types/ProblemBadRequest.js.map +1 -1
  110. package/api/types/ProblemBadRequestBlobInvalidJson.d.ts +1 -1
  111. package/api/types/ProblemBadRequestBlobInvalidJson.js.map +1 -1
  112. package/api/types/ProblemBadRequestHasNullUnicodeCharacter.d.ts +1 -1
  113. package/api/types/ProblemBadRequestHasNullUnicodeCharacter.js.map +1 -1
  114. package/api/types/ProblemBadRequestPayloadTooLarge.d.ts +1 -1
  115. package/api/types/ProblemBadRequestPayloadTooLarge.js.map +1 -1
  116. package/api/types/ProblemBlobNotFound.d.ts +1 -1
  117. package/api/types/ProblemBlobNotFound.js.map +1 -1
  118. package/api/types/{ProblemPreconditionFailedBlob.d.ts → ProblemBlobPreconditionFailed.d.ts} +2 -2
  119. package/api/types/{ProblemPreconditionFailedBlob.d.ts.map → ProblemBlobPreconditionFailed.d.ts.map} +1 -1
  120. package/api/types/ProblemBlobPreconditionFailed.js +6 -0
  121. package/api/types/{ProblemPreconditionFailedBlob.js.map → ProblemBlobPreconditionFailed.js.map} +1 -1
  122. package/api/types/ProblemConflict.d.ts +1 -1
  123. package/api/types/ProblemConflict.js.map +1 -1
  124. package/api/types/ProblemConflictBlobRestoreInProgress.d.ts +1 -1
  125. package/api/types/ProblemConflictBlobRestoreInProgress.js.map +1 -1
  126. package/api/types/ProblemForbidden.d.ts +1 -1
  127. package/api/types/ProblemForbidden.js.map +1 -1
  128. package/api/types/ProblemInternalServerError.d.ts +1 -1
  129. package/api/types/ProblemInternalServerError.js.map +1 -1
  130. package/api/types/ProblemMethodNotAllowed.d.ts +1 -1
  131. package/api/types/ProblemMethodNotAllowed.js.map +1 -1
  132. package/api/types/{ProblemMethodNotAllowedAlive.d.ts → ProblemMethodNotAllowedResourceAlive.d.ts} +2 -2
  133. package/api/types/ProblemMethodNotAllowedResourceAlive.d.ts.map +1 -0
  134. package/api/types/ProblemMethodNotAllowedResourceAlive.js +6 -0
  135. package/api/types/ProblemMethodNotAllowedResourceAlive.js.map +1 -0
  136. package/api/types/{ProblemMethodNotAllowedDeleted.d.ts → ProblemMethodNotAllowedResourceDeleted.d.ts} +2 -2
  137. package/api/types/ProblemMethodNotAllowedResourceDeleted.d.ts.map +1 -0
  138. package/api/types/ProblemMethodNotAllowedResourceDeleted.js +6 -0
  139. package/api/types/ProblemMethodNotAllowedResourceDeleted.js.map +1 -0
  140. package/api/types/ProblemNotFound.d.ts +1 -1
  141. package/api/types/ProblemNotFound.js.map +1 -1
  142. package/api/types/ProblemPreconditionFailed.d.ts +1 -1
  143. package/api/types/ProblemPreconditionFailed.js.map +1 -1
  144. package/api/types/{ProblemPreconditionFailedResource.d.ts → ProblemResourcePreconditionFailed.d.ts} +2 -2
  145. package/api/types/{ProblemPreconditionFailedResource.d.ts.map → ProblemResourcePreconditionFailed.d.ts.map} +1 -1
  146. package/api/types/ProblemResourcePreconditionFailed.js +6 -0
  147. package/api/types/{ProblemPreconditionFailedResource.js.map → ProblemResourcePreconditionFailed.js.map} +1 -1
  148. package/api/types/ProblemResourceRevisionNotFound.d.ts +1 -1
  149. package/api/types/ProblemResourceRevisionNotFound.js.map +1 -1
  150. package/api/types/ProblemServiceUnavailable.d.ts +1 -1
  151. package/api/types/ProblemServiceUnavailable.js.map +1 -1
  152. package/api/types/ProblemUnauthorized.d.ts +1 -1
  153. package/api/types/ProblemUnauthorized.js.map +1 -1
  154. package/api/types/ProblemUnsupportedMediaType.d.ts +1 -1
  155. package/api/types/ProblemUnsupportedMediaType.js.map +1 -1
  156. package/api/types/index.d.ts +10 -4
  157. package/api/types/index.d.ts.map +1 -1
  158. package/api/types/index.js +10 -4
  159. package/api/types/index.js.map +1 -1
  160. package/core/fetcher/BinaryResponse.d.ts +21 -0
  161. package/core/fetcher/BinaryResponse.d.ts.map +1 -0
  162. package/core/fetcher/BinaryResponse.js +18 -0
  163. package/core/fetcher/BinaryResponse.js.map +1 -0
  164. package/core/fetcher/Fetcher.d.ts +3 -2
  165. package/core/fetcher/Fetcher.d.ts.map +1 -1
  166. package/core/fetcher/Fetcher.js +25 -12
  167. package/core/fetcher/Fetcher.js.map +1 -1
  168. package/core/fetcher/ResponseWithBody.d.ts +5 -0
  169. package/core/fetcher/ResponseWithBody.d.ts.map +1 -0
  170. package/core/fetcher/ResponseWithBody.js +7 -0
  171. package/core/fetcher/ResponseWithBody.js.map +1 -0
  172. package/core/fetcher/createRequestUrl.d.ts +1 -1
  173. package/core/fetcher/createRequestUrl.d.ts.map +1 -1
  174. package/core/fetcher/createRequestUrl.js +3 -7
  175. package/core/fetcher/createRequestUrl.js.map +1 -1
  176. package/core/fetcher/getErrorResponseBody.d.ts +2 -0
  177. package/core/fetcher/getErrorResponseBody.d.ts.map +1 -0
  178. package/core/fetcher/getErrorResponseBody.js +45 -0
  179. package/core/fetcher/getErrorResponseBody.js.map +1 -0
  180. package/core/fetcher/getFetchFn.d.ts +1 -4
  181. package/core/fetcher/getFetchFn.d.ts.map +1 -1
  182. package/core/fetcher/getFetchFn.js +1 -52
  183. package/core/fetcher/getFetchFn.js.map +1 -1
  184. package/core/fetcher/getResponseBody.d.ts.map +1 -1
  185. package/core/fetcher/getResponseBody.js +34 -33
  186. package/core/fetcher/getResponseBody.js.map +1 -1
  187. package/core/fetcher/index.d.ts +1 -0
  188. package/core/fetcher/index.d.ts.map +1 -1
  189. package/core/fetcher/index.js.map +1 -1
  190. package/core/headers.d.ts +4 -0
  191. package/core/headers.d.ts.map +1 -0
  192. package/core/headers.js +30 -0
  193. package/core/headers.js.map +1 -0
  194. package/core/index.d.ts +1 -0
  195. package/core/index.d.ts.map +1 -1
  196. package/core/index.js +2 -1
  197. package/core/index.js.map +1 -1
  198. package/core/runtime/runtime.d.ts.map +1 -1
  199. package/core/runtime/runtime.js +0 -1
  200. package/core/runtime/runtime.js.map +1 -1
  201. package/core/url/index.d.ts +3 -0
  202. package/core/url/index.d.ts.map +1 -0
  203. package/core/url/index.js +8 -0
  204. package/core/url/index.js.map +1 -0
  205. package/core/url/join.d.ts +2 -0
  206. package/core/url/join.d.ts.map +1 -0
  207. package/core/url/join.js +50 -0
  208. package/core/url/join.js.map +1 -0
  209. package/core/url/qs.d.ts +7 -0
  210. package/core/url/qs.d.ts.map +1 -0
  211. package/core/url/qs.js +65 -0
  212. package/core/url/qs.js.map +1 -0
  213. package/documents/credential/document/vcdm.d.ts +1 -1
  214. package/documents/credential/document/vcdm.d.ts.map +1 -1
  215. package/documents/credential/document/vcdm.js +12 -1
  216. package/documents/credential/document/vcdm.js.map +1 -1
  217. package/documents/credential/document.d.ts +2 -2
  218. package/documents/credential/document.d.ts.map +1 -1
  219. package/documents/credential/document.js +21 -8
  220. package/documents/credential/document.js.map +1 -1
  221. package/documents/credential/draft/draft.d.ts +2 -2
  222. package/documents/credential/draft/draft.d.ts.map +1 -1
  223. package/documents/credential/draft/draft.js.map +1 -1
  224. package/documents/credential/flavor/vcdm1_1.d.ts +3 -3
  225. package/documents/credential/flavor/vcdm1_1.d.ts.map +1 -1
  226. package/documents/credential/flavor/vcdm1_1.js +27 -25
  227. package/documents/credential/flavor/vcdm1_1.js.map +1 -1
  228. package/documents/credential/flavor/vcdm2_0.d.ts +2 -2
  229. package/documents/credential/flavor/vcdm2_0.d.ts.map +1 -1
  230. package/documents/credential/flavor/vcdm2_0.js +29 -16
  231. package/documents/credential/flavor/vcdm2_0.js.map +1 -1
  232. package/documents/credential/flavor.d.ts +2 -2
  233. package/documents/credential/flavor.d.ts.map +1 -1
  234. package/documents/credential/flavor.js +25 -10
  235. package/documents/credential/flavor.js.map +1 -1
  236. package/documents/credential/flavor.spec.js +3 -3
  237. package/documents/credential/flavor.spec.js.map +1 -1
  238. package/documents/credential/types.d.ts +4 -4
  239. package/documents/credential/types.d.ts.map +1 -1
  240. package/documents/credential/types.js.map +1 -1
  241. package/documents/credential/verifiable/verifiable.d.ts.map +1 -1
  242. package/documents/credential/verifiable/verifiable.js +1 -2
  243. package/documents/credential/verifiable/verifiable.js.map +1 -1
  244. package/documents/credential/verifiable/with-claims.js +1 -1
  245. package/documents/credential/verifiable/with-claims.js.map +1 -1
  246. package/documents/credential.d.ts.map +1 -1
  247. package/documents/credential.js +1 -5
  248. package/documents/credential.js.map +1 -1
  249. package/documents/index.d.ts +0 -1
  250. package/documents/index.d.ts.map +1 -1
  251. package/documents/index.js +0 -1
  252. package/documents/index.js.map +1 -1
  253. package/documents/models.d.ts +1 -2
  254. package/documents/models.d.ts.map +1 -1
  255. package/documents/models.js +5 -3
  256. package/documents/models.js.map +1 -1
  257. package/documents/presentation.d.ts.map +1 -1
  258. package/documents/presentation.js +1 -5
  259. package/documents/presentation.js.map +1 -1
  260. package/documents/types.d.ts +2 -3
  261. package/documents/types.d.ts.map +1 -1
  262. package/documents/types.js.map +1 -1
  263. package/middlewares/csrf/csrf.d.ts.map +1 -1
  264. package/middlewares/csrf/csrf.js +1 -5
  265. package/middlewares/csrf/csrf.js.map +1 -1
  266. package/package.json +9 -14
  267. package/serialization/types/DidCommMessageBlobAttachmentDescriptor.d.ts +17 -0
  268. package/serialization/types/DidCommMessageBlobAttachmentDescriptor.d.ts.map +1 -0
  269. package/serialization/types/DidCommMessageBlobAttachmentDescriptor.js +48 -0
  270. package/serialization/types/DidCommMessageBlobAttachmentDescriptor.js.map +1 -0
  271. package/serialization/types/DidCommMessageBlobAttachmentStatus.d.ts +16 -0
  272. package/serialization/types/DidCommMessageBlobAttachmentStatus.d.ts.map +1 -0
  273. package/serialization/types/DidCommMessageBlobAttachmentStatus.js +47 -0
  274. package/serialization/types/DidCommMessageBlobAttachmentStatus.js.map +1 -0
  275. package/serialization/types/DidCommMessageBlobDescriptor.d.ts +21 -0
  276. package/serialization/types/DidCommMessageBlobDescriptor.d.ts.map +1 -0
  277. package/serialization/types/DidCommMessageBlobDescriptor.js +52 -0
  278. package/serialization/types/DidCommMessageBlobDescriptor.js.map +1 -0
  279. package/serialization/types/DidCommMessageBlobStatus.d.ts +18 -0
  280. package/serialization/types/DidCommMessageBlobStatus.d.ts.map +1 -0
  281. package/serialization/types/DidCommMessageBlobStatus.js +49 -0
  282. package/serialization/types/DidCommMessageBlobStatus.js.map +1 -0
  283. package/serialization/types/DidCommMessageCreateBlobs.d.ts +14 -0
  284. package/serialization/types/DidCommMessageCreateBlobs.d.ts.map +1 -0
  285. package/serialization/types/DidCommMessageCreateBlobs.js +45 -0
  286. package/serialization/types/DidCommMessageCreateBlobs.js.map +1 -0
  287. package/serialization/types/DidCommMessageCreateBlobsStatus.d.ts +14 -0
  288. package/serialization/types/DidCommMessageCreateBlobsStatus.d.ts.map +1 -0
  289. package/serialization/types/DidCommMessageCreateBlobsStatus.js +45 -0
  290. package/serialization/types/DidCommMessageCreateBlobsStatus.js.map +1 -0
  291. package/serialization/types/MethodNotAllowedProblems.d.ts +4 -4
  292. package/serialization/types/MethodNotAllowedProblems.d.ts.map +1 -1
  293. package/serialization/types/MethodNotAllowedProblems.js +4 -4
  294. package/serialization/types/MethodNotAllowedProblems.js.map +1 -1
  295. package/serialization/types/PreconditionFailedProblems.d.ts +4 -4
  296. package/serialization/types/PreconditionFailedProblems.js +4 -4
  297. package/serialization/types/PreconditionFailedProblems.js.map +1 -1
  298. package/serialization/types/{ProblemPreconditionFailedBlob.d.ts → ProblemBlobPreconditionFailed.d.ts} +3 -3
  299. package/serialization/types/{ProblemPreconditionFailedBlob.d.ts.map → ProblemBlobPreconditionFailed.d.ts.map} +1 -1
  300. package/serialization/types/{ProblemPreconditionFailedBlob.js → ProblemBlobPreconditionFailed.js} +3 -3
  301. package/serialization/types/{ProblemPreconditionFailedBlob.js.map → ProblemBlobPreconditionFailed.js.map} +1 -1
  302. package/serialization/types/{ProblemMethodNotAllowedDeleted.d.ts → ProblemMethodNotAllowedResourceAlive.d.ts} +3 -3
  303. package/serialization/types/ProblemMethodNotAllowedResourceAlive.d.ts.map +1 -0
  304. package/serialization/types/{ProblemMethodNotAllowedDeleted.js → ProblemMethodNotAllowedResourceAlive.js} +3 -3
  305. package/serialization/types/ProblemMethodNotAllowedResourceAlive.js.map +1 -0
  306. package/serialization/types/{ProblemMethodNotAllowedAlive.d.ts → ProblemMethodNotAllowedResourceDeleted.d.ts} +3 -3
  307. package/serialization/types/ProblemMethodNotAllowedResourceDeleted.d.ts.map +1 -0
  308. package/serialization/types/{ProblemMethodNotAllowedAlive.js → ProblemMethodNotAllowedResourceDeleted.js} +3 -3
  309. package/serialization/types/ProblemMethodNotAllowedResourceDeleted.js.map +1 -0
  310. package/serialization/types/{ProblemPreconditionFailedResource.d.ts → ProblemResourcePreconditionFailed.d.ts} +3 -3
  311. package/serialization/types/{ProblemPreconditionFailedResource.d.ts.map → ProblemResourcePreconditionFailed.d.ts.map} +1 -1
  312. package/serialization/types/{ProblemPreconditionFailedResource.js → ProblemResourcePreconditionFailed.js} +3 -3
  313. package/serialization/types/{ProblemPreconditionFailedResource.js.map → ProblemResourcePreconditionFailed.js.map} +1 -1
  314. package/serialization/types/index.d.ts +10 -4
  315. package/serialization/types/index.d.ts.map +1 -1
  316. package/serialization/types/index.js +10 -4
  317. package/serialization/types/index.js.map +1 -1
  318. package/api/types/ProblemMethodNotAllowedAlive.d.ts.map +0 -1
  319. package/api/types/ProblemMethodNotAllowedAlive.js.map +0 -1
  320. package/api/types/ProblemMethodNotAllowedDeleted.d.ts.map +0 -1
  321. package/api/types/ProblemMethodNotAllowedDeleted.js.map +0 -1
  322. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts +0 -31
  323. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.d.ts.map +0 -1
  324. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js +0 -248
  325. package/core/fetcher/stream-wrappers/Node18UniversalStreamWrapper.js.map +0 -1
  326. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -22
  327. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts.map +0 -1
  328. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +0 -127
  329. package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js.map +0 -1
  330. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +0 -32
  331. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts.map +0 -1
  332. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js +0 -230
  333. package/core/fetcher/stream-wrappers/UndiciStreamWrapper.js.map +0 -1
  334. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +0 -19
  335. package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts.map +0 -1
  336. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +0 -60
  337. package/core/fetcher/stream-wrappers/chooseStreamWrapper.js.map +0 -1
  338. package/documents/utils/stream.d.ts +0 -8
  339. package/documents/utils/stream.d.ts.map +0 -1
  340. package/documents/utils/stream.js +0 -50
  341. package/documents/utils/stream.js.map +0 -1
  342. package/serialization/types/ProblemMethodNotAllowedAlive.d.ts.map +0 -1
  343. package/serialization/types/ProblemMethodNotAllowedAlive.js.map +0 -1
  344. package/serialization/types/ProblemMethodNotAllowedDeleted.d.ts.map +0 -1
  345. package/serialization/types/ProblemMethodNotAllowedDeleted.js.map +0 -1
@@ -1,2 +1,3 @@
1
+ export {};
1
2
  export * from './requests';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/drafts/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/drafts/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC;AACV,cAAc,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/resources/drafts/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B","sourcesContent":["export * from './requests';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/resources/drafts/client/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,6CAA2B","sourcesContent":["export {};\nexport * from './requests';\n"]}
@@ -4,13 +4,14 @@
4
4
  import * as environments from '../../../../environments';
5
5
  import * as core from '../../../../core';
6
6
  import * as Truvity from '../../../index';
7
- import * as stream from 'stream';
8
7
  export declare namespace Files {
9
8
  interface Options {
10
9
  environment?: core.Supplier<environments.TruvityEnvironment | string>;
11
10
  /** Specify a custom URL to connect the client to. */
12
11
  baseUrl?: core.Supplier<string>;
13
12
  apiKey?: core.Supplier<string | undefined>;
13
+ /** Additional headers to include in requests. */
14
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
14
15
  fetcher?: core.FetchFunction;
15
16
  }
16
17
  interface RequestOptions {
@@ -21,7 +22,7 @@ export declare namespace Files {
21
22
  /** A hook to abort the request. */
22
23
  abortSignal?: AbortSignal;
23
24
  /** Additional headers to include in the request. */
24
- headers?: Record<string, string>;
25
+ headers?: Record<string, string | core.Supplier<string | undefined> | undefined>;
25
26
  }
26
27
  }
27
28
  /**
@@ -266,7 +267,7 @@ export declare class Files {
266
267
  * @throws {@link Truvity.TooManyRequestsError}
267
268
  * @throws {@link Truvity.InternalServerError}
268
269
  */
269
- fileDownload(id: string, revision: number, request?: Truvity.FileDownloadRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<stream.Readable>;
270
+ fileDownload(id: string, revision: number, request?: Truvity.FileDownloadRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
270
271
  private __fileDownload;
271
272
  protected _getCustomAuthorizationHeaders(): Promise<{
272
273
  'X-API-KEY': string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Client.d.ts","sourceRoot":"","sources":["../../../../../src/api/resources/files/client/Client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,YAAY,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,IAAI,MAAM,kBAAkB,CAAC;AACzC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAI1C,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,OAAO,WAAW,KAAK,CAAC;IAC3B,UAAiB,OAAO;QACpB,WAAW,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,kBAAkB,GAAG,MAAM,CAAC,CAAC;QACtE,qDAAqD;QACrD,OAAO,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAChC,MAAM,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;QAC3C,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,CAAC;KAChC;IAED,UAAiB,cAAc;QAC3B,0DAA0D;QAC1D,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,+DAA+D;QAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,mCAAmC;QACnC,WAAW,CAAC,EAAE,WAAW,CAAC;QAC1B,oDAAoD;QACpD,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACpC;CACJ;AAED;;GAEG;AACH,qBAAa,KAAK;IACF,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO;gBAAvB,QAAQ,GAAE,KAAK,CAAC,OAAY;IAE3D;;;;;;;;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,gBAAgB,CACnB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,uBAAuB,EACxC,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,GACtC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,YAAY,CAAC;YAInC,kBAAkB;IAmKhC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACI,WAAW,CACd,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,kBAAkB,EACnC,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,GACtC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,YAAY,CAAC;YAInC,aAAa;IAmJ3B;;;;;;;;;;;;;;;;OAgBG;IACI,WAAW,CACd,EAAE,EAAE,MAAM,EACV,OAAO,GAAE,OAAO,CAAC,kBAAuB,EACxC,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,GACtC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC;YAI/B,aAAa;IA8H3B;;;;;;;;;;;;;;;;;OAiBG;IACI,YAAY,CACf,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,OAAO,CAAC,mBAAwB,EACzC,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,GACtC,IAAI,CAAC,mBAAmB,CAAC,OAAO,CAAC,YAAY,CAAC;YAInC,cAAc;IAiI5B;;;;;;;;OAQG;IACI,YAAY,CACf,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,OAAO,CAAC,mBAAwB,EACzC,cAAc,CAAC,EAAE,KAAK,CAAC,cAAc,GACtC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,cAAc,CAAC;YAIlC,cAAc;cA0HZ,8BAA8B;;;CAIjD"}
@@ -55,16 +55,13 @@ var __rest = (this && this.__rest) || function (s, e) {
55
55
  }
56
56
  return t;
57
57
  };
58
- var __importDefault = (this && this.__importDefault) || function (mod) {
59
- return (mod && mod.__esModule) ? mod : { "default": mod };
60
- };
61
58
  Object.defineProperty(exports, "__esModule", { value: true });
62
59
  exports.Files = void 0;
63
60
  const environments = __importStar(require("../../../../environments"));
64
61
  const core = __importStar(require("../../../../core"));
65
62
  const Truvity = __importStar(require("../../../index"));
63
+ const headers_1 = require("../../../../core/headers");
66
64
  const serializers = __importStar(require("../../../../serialization/index"));
67
- const url_join_1 = __importDefault(require("url-join"));
68
65
  const errors = __importStar(require("../../../../errors/index"));
69
66
  /**
70
67
  * The API to manage files.
@@ -100,14 +97,14 @@ class Files {
100
97
  }
101
98
  __fileCreate(request, requestOptions) {
102
99
  return __awaiter(this, void 0, void 0, function* () {
103
- var _a, _b, _c;
100
+ var _a, _b, _c, _d;
104
101
  const { blobId, idempotencyKey } = request, _body = __rest(request, ["blobId", "idempotencyKey"]);
105
102
  const _queryParams = {};
106
103
  _queryParams['blob_id'] = blobId;
107
104
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
108
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, 'files'),
105
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, 'files'),
109
106
  method: 'POST',
110
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
107
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
111
108
  contentType: 'application/json',
112
109
  queryParameters: _queryParams,
113
110
  requestType: 'json',
@@ -234,11 +231,11 @@ class Files {
234
231
  }
235
232
  __fileSearch() {
236
233
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
237
- var _a, _b, _c;
234
+ var _a, _b, _c, _d;
238
235
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
239
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, 'files/search'),
236
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, 'files/search'),
240
237
  method: 'POST',
241
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
238
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
242
239
  contentType: 'application/json',
243
240
  requestType: 'json',
244
241
  body: serializers.FileSearchRequest.jsonOrThrow(request, {
@@ -355,12 +352,12 @@ class Files {
355
352
  }
356
353
  __fileUpload() {
357
354
  return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
358
- var _a, _b, _c;
355
+ var _a, _b, _c, _d;
359
356
  const { idempotencyKey } = request;
360
357
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
361
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, 'files/upload'),
358
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, 'files/upload'),
362
359
  method: 'POST',
363
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
360
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
364
361
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
365
362
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
366
363
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -460,12 +457,12 @@ class Files {
460
457
  }
461
458
  __fileLatest(id_1) {
462
459
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
463
- var _a, _b, _c;
460
+ var _a, _b, _c, _d;
464
461
  const { ifNoneMatch } = request;
465
462
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
466
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}`),
463
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}`),
467
464
  method: 'GET',
468
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
465
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
469
466
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
470
467
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
471
468
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -577,12 +574,12 @@ class Files {
577
574
  }
578
575
  __fileDelete(id, request, requestOptions) {
579
576
  return __awaiter(this, void 0, void 0, function* () {
580
- var _a, _b, _c;
577
+ var _a, _b, _c, _d;
581
578
  const { idempotencyKey, ifMatch } = request;
582
579
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
583
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}`),
580
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}`),
584
581
  method: 'DELETE',
585
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
582
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
586
583
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
587
584
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
588
585
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -704,12 +701,12 @@ class Files {
704
701
  }
705
702
  __fileUpdateAnnotations(id, request, requestOptions) {
706
703
  return __awaiter(this, void 0, void 0, function* () {
707
- var _a, _b, _c;
704
+ var _a, _b, _c, _d;
708
705
  const { idempotencyKey, ifMatch } = request, _body = __rest(request, ["idempotencyKey", "ifMatch"]);
709
706
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
710
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/annotations`),
707
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/annotations`),
711
708
  method: 'PATCH',
712
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
709
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
713
710
  contentType: 'application/json',
714
711
  requestType: 'json',
715
712
  body: serializers.FileUpdateAnnotationsRequest.jsonOrThrow(_body, {
@@ -852,12 +849,12 @@ class Files {
852
849
  }
853
850
  __fileUpdateLabels(id, request, requestOptions) {
854
851
  return __awaiter(this, void 0, void 0, function* () {
855
- var _a, _b, _c;
852
+ var _a, _b, _c, _d;
856
853
  const { idempotencyKey, ifMatch } = request, _body = __rest(request, ["idempotencyKey", "ifMatch"]);
857
854
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
858
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/labels`),
855
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/labels`),
859
856
  method: 'PATCH',
860
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
857
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
861
858
  contentType: 'application/json',
862
859
  requestType: 'json',
863
860
  body: serializers.FileUpdateLabelsRequest.jsonOrThrow(_body, {
@@ -996,12 +993,12 @@ class Files {
996
993
  }
997
994
  __fileRestore(id, request, requestOptions) {
998
995
  return __awaiter(this, void 0, void 0, function* () {
999
- var _a, _b, _c;
996
+ var _a, _b, _c, _d;
1000
997
  const { idempotencyKey, ifMatch } = request;
1001
998
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1002
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/restore`),
999
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/restore`),
1003
1000
  method: 'POST',
1004
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1001
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'Idempotency-Key': idempotencyKey != null ? idempotencyKey : undefined, 'If-Match': ifMatch }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1005
1002
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1006
1003
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1007
1004
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1122,12 +1119,12 @@ class Files {
1122
1119
  }
1123
1120
  __fileHistory(id_1) {
1124
1121
  return __awaiter(this, arguments, void 0, function* (id, request = {}, requestOptions) {
1125
- var _a, _b, _c;
1122
+ var _a, _b, _c, _d;
1126
1123
  const { ifNoneMatch } = request;
1127
1124
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1128
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/revisions`),
1125
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/revisions`),
1129
1126
  method: 'GET',
1130
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1127
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1131
1128
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1132
1129
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1133
1130
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1235,12 +1232,12 @@ class Files {
1235
1232
  }
1236
1233
  __fileRevision(id_1, revision_1) {
1237
1234
  return __awaiter(this, arguments, void 0, function* (id, revision, request = {}, requestOptions) {
1238
- var _a, _b, _c;
1235
+ var _a, _b, _c, _d;
1239
1236
  const { ifNoneMatch } = request;
1240
1237
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1241
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/revisions/${encodeURIComponent(revision)}`),
1238
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/revisions/${encodeURIComponent(revision)}`),
1242
1239
  method: 'GET',
1243
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1240
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1244
1241
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1245
1242
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1246
1243
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -1339,13 +1336,13 @@ class Files {
1339
1336
  }
1340
1337
  __fileDownload(id_1, revision_1) {
1341
1338
  return __awaiter(this, arguments, void 0, function* (id, revision, request = {}, requestOptions) {
1342
- var _a, _b, _c;
1339
+ var _a, _b, _c, _d;
1343
1340
  const { ifNoneMatch } = request;
1344
1341
  const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
1345
- url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/revisions/${encodeURIComponent(revision)}/download`),
1342
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.TruvityEnvironment.Default, `files/${encodeURIComponent(id)}/revisions/${encodeURIComponent(revision)}/download`),
1346
1343
  method: 'GET',
1347
- headers: Object.assign(Object.assign({ 'X-Fern-Language': 'JavaScript', 'X-Fern-SDK-Name': '@truvity/sdk', 'X-Fern-SDK-Version': '0.37.4', 'User-Agent': '@truvity/sdk/0.37.4', 'X-Fern-Runtime': core.RUNTIME.type, 'X-Fern-Runtime-Version': core.RUNTIME.version, 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1348
- responseType: 'streaming',
1344
+ headers: (0, headers_1.mergeHeaders)((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, (0, headers_1.mergeOnlyDefinedHeaders)(Object.assign({ 'If-None-Match': ifNoneMatch != null ? ifNoneMatch : undefined }, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
1345
+ responseType: 'binary-response',
1349
1346
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
1350
1347
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
1351
1348
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,