@chrt-inc/typescript-sdk 1.320.0 → 1.321.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 (284) hide show
  1. package/dist/cjs/Client.d.ts +6 -3
  2. package/dist/cjs/Client.js +36 -31
  3. package/dist/cjs/api/resources/drivers/client/Client.d.ts +59 -61
  4. package/dist/cjs/api/resources/drivers/client/Client.js +140 -139
  5. package/dist/cjs/api/resources/drivers/client/requests/DriverClientCreate1.d.ts +20 -0
  6. package/dist/cjs/api/resources/drivers/client/requests/{UpdateDriverDetailsReq.d.ts → DriverClientUpdate1.d.ts} +4 -5
  7. package/dist/cjs/api/resources/drivers/client/requests/DriverLastSeenReq.d.ts +1 -0
  8. package/dist/cjs/api/resources/drivers/client/requests/index.d.ts +2 -3
  9. package/dist/cjs/api/resources/index.d.ts +4 -1
  10. package/dist/cjs/api/resources/index.js +5 -2
  11. package/dist/cjs/api/resources/orders/client/Client.d.ts +13 -0
  12. package/dist/cjs/api/resources/orders/client/Client.js +59 -0
  13. package/dist/cjs/api/resources/taskArtifacts/client/Client.d.ts +79 -6
  14. package/dist/cjs/api/resources/taskArtifacts/client/Client.js +308 -6
  15. package/dist/cjs/api/resources/taskArtifacts/client/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/taskArtifacts/client/index.js +15 -0
  17. package/dist/cjs/api/resources/taskArtifacts/client/requests/AddTaskArtifactReq.d.ts +19 -0
  18. package/dist/cjs/api/resources/taskArtifacts/client/requests/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/taskArtifacts/resources/index.d.ts +2 -2
  20. package/dist/cjs/api/resources/taskArtifacts/resources/index.js +3 -3
  21. package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.d.ts +9 -9
  22. package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.js +11 -11
  23. package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.d.ts +47 -0
  24. package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.js +127 -0
  25. package/dist/cjs/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.js +2 -0
  26. package/dist/cjs/api/resources/taskGroups/client/Client.d.ts +79 -33
  27. package/dist/cjs/api/resources/taskGroups/client/Client.js +220 -67
  28. package/dist/cjs/api/resources/taskGroups/client/requests/AddMessageReq.d.ts +13 -0
  29. package/dist/cjs/api/resources/taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.d.ts +13 -0
  30. package/dist/cjs/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.ts +1 -0
  31. package/dist/cjs/api/resources/taskGroups/client/requests/SetTaskOrderingReq.d.ts +3 -2
  32. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.d.ts +13 -0
  33. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.js +5 -0
  34. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateDriverReq.d.ts +13 -0
  35. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateDriverReq.js +5 -0
  36. package/dist/cjs/api/resources/taskGroups/client/requests/index.d.ts +4 -2
  37. package/dist/cjs/api/resources/taskGroups/resources/expanded/client/Client.d.ts +4 -0
  38. package/dist/cjs/api/resources/taskGroups/resources/expanded/client/Client.js +18 -2
  39. package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.ts +4 -0
  40. package/dist/cjs/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.ts +4 -0
  41. package/dist/cjs/api/resources/taskGroups/resources/index.d.ts +3 -0
  42. package/dist/cjs/api/resources/taskGroups/resources/index.js +4 -1
  43. package/dist/cjs/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.d.ts +14 -7
  44. package/dist/cjs/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.js +16 -10
  45. package/dist/cjs/api/resources/taskGroups/resources/s3Object/client/index.js +2 -0
  46. package/dist/cjs/api/resources/taskGroups/resources/s3Object/index.d.ts +1 -0
  47. package/dist/cjs/api/resources/taskGroups/resources/s3Object/index.js +17 -0
  48. package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.d.ts +47 -0
  49. package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.js +127 -0
  50. package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.js +2 -0
  51. package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/index.d.ts +1 -0
  52. package/dist/cjs/api/resources/taskGroups/resources/s3ObjectMetadata/index.js +17 -0
  53. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/Client.d.ts +59 -0
  54. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/Client.js +186 -0
  55. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/client/index.js +2 -0
  56. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/index.d.ts +1 -0
  57. package/dist/cjs/api/resources/taskGroups/resources/taskGroupId/index.js +17 -0
  58. package/dist/cjs/api/resources/tasks/client/Client.d.ts +107 -0
  59. package/dist/cjs/api/resources/tasks/client/Client.js +377 -0
  60. package/dist/cjs/api/resources/tasks/client/index.d.ts +2 -0
  61. package/dist/cjs/api/resources/tasks/client/index.js +17 -0
  62. package/dist/cjs/api/resources/tasks/client/requests/AddTaskToGroupReq.d.ts +21 -0
  63. package/dist/cjs/api/resources/tasks/client/requests/AddTaskToGroupReq.js +5 -0
  64. package/dist/cjs/api/resources/tasks/client/requests/index.d.ts +1 -0
  65. package/dist/cjs/api/resources/tasks/client/requests/index.js +2 -0
  66. package/dist/cjs/api/resources/tasks/index.d.ts +1 -0
  67. package/dist/cjs/api/resources/tasks/index.js +17 -0
  68. package/dist/cjs/api/types/Cargo1.d.ts +1 -0
  69. package/dist/cjs/api/types/CargoStatusEnum1.d.ts +2 -1
  70. package/dist/cjs/api/types/CargoStatusEnum1.js +1 -0
  71. package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.d.ts +2 -2
  72. package/dist/cjs/api/types/ChrtGroundCourierTaskActionEnum1.js +1 -1
  73. package/dist/cjs/api/types/Driver1.d.ts +6 -4
  74. package/dist/cjs/api/types/DriverStatusEnum.d.ts +3 -3
  75. package/dist/cjs/api/types/DriverStatusEnum.js +2 -2
  76. package/dist/cjs/api/types/DriverUpdateAvailabilityReq.d.ts +6 -0
  77. package/dist/cjs/api/types/DriverUpdateAvailabilityReq.js +5 -0
  78. package/dist/cjs/api/types/Task1.d.ts +1 -0
  79. package/dist/cjs/api/types/TaskArtifact1.d.ts +1 -0
  80. package/dist/cjs/api/types/TaskArtifactClientCreate1.d.ts +8 -0
  81. package/dist/cjs/api/types/TaskArtifactClientCreate1.js +5 -0
  82. package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.d.ts +15 -0
  83. package/dist/cjs/api/types/TaskArtifactS3ObjectMetadata1.js +5 -0
  84. package/dist/cjs/api/types/TaskArtifactStatusEnum1.d.ts +2 -1
  85. package/dist/cjs/api/types/TaskArtifactStatusEnum1.js +1 -0
  86. package/dist/cjs/api/types/TaskClientUpdate1.d.ts +0 -1
  87. package/dist/cjs/api/types/TaskGroup1.d.ts +1 -0
  88. package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.d.ts +15 -0
  89. package/dist/cjs/api/types/TaskGroupS3ObjectMetadata1.js +5 -0
  90. package/dist/cjs/api/types/TaskGroupSortByEnum.d.ts +2 -1
  91. package/dist/cjs/api/types/TaskGroupSortByEnum.js +1 -0
  92. package/dist/cjs/api/types/TaskGroupStatusEnum1.d.ts +2 -1
  93. package/dist/cjs/api/types/TaskGroupStatusEnum1.js +1 -0
  94. package/dist/cjs/api/types/TaskStatusEnum1.d.ts +2 -1
  95. package/dist/cjs/api/types/TaskStatusEnum1.js +1 -0
  96. package/dist/cjs/api/types/index.d.ts +4 -0
  97. package/dist/cjs/api/types/index.js +4 -0
  98. package/dist/cjs/core/exports.d.ts +1 -0
  99. package/dist/cjs/core/exports.js +17 -0
  100. package/dist/cjs/core/file/exports.d.ts +1 -0
  101. package/dist/cjs/core/file/exports.js +2 -0
  102. package/dist/cjs/core/file/file.d.ts +5 -0
  103. package/dist/cjs/core/file/file.js +203 -0
  104. package/dist/cjs/core/file/index.d.ts +2 -0
  105. package/dist/cjs/core/file/index.js +18 -0
  106. package/dist/cjs/core/file/types.d.ts +66 -0
  107. package/dist/cjs/core/file/types.js +2 -0
  108. package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +16 -0
  109. package/dist/cjs/core/form-data-utils/FormDataWrapper.js +208 -0
  110. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  111. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +12 -0
  112. package/dist/cjs/core/form-data-utils/index.d.ts +2 -0
  113. package/dist/cjs/core/form-data-utils/index.js +20 -0
  114. package/dist/cjs/core/index.d.ts +2 -0
  115. package/dist/cjs/core/index.js +3 -1
  116. package/dist/cjs/exports.d.ts +1 -0
  117. package/dist/cjs/exports.js +17 -0
  118. package/dist/cjs/index.d.ts +1 -0
  119. package/dist/cjs/index.js +4 -0
  120. package/dist/cjs/version.d.ts +1 -1
  121. package/dist/cjs/version.js +1 -1
  122. package/dist/esm/Client.d.mts +6 -3
  123. package/dist/esm/Client.mjs +12 -7
  124. package/dist/esm/api/resources/drivers/client/Client.d.mts +59 -61
  125. package/dist/esm/api/resources/drivers/client/Client.mjs +140 -139
  126. package/dist/esm/api/resources/drivers/client/requests/DriverClientCreate1.d.mts +20 -0
  127. package/dist/esm/api/resources/drivers/client/requests/{UpdateDriverDetailsReq.d.mts → DriverClientUpdate1.d.mts} +4 -5
  128. package/dist/esm/api/resources/drivers/client/requests/DriverLastSeenReq.d.mts +1 -0
  129. package/dist/esm/api/resources/drivers/client/requests/index.d.mts +2 -3
  130. package/dist/esm/api/resources/index.d.mts +4 -1
  131. package/dist/esm/api/resources/index.mjs +4 -1
  132. package/dist/esm/api/resources/orders/client/Client.d.mts +13 -0
  133. package/dist/esm/api/resources/orders/client/Client.mjs +59 -0
  134. package/dist/esm/api/resources/taskArtifacts/client/Client.d.mts +79 -6
  135. package/dist/esm/api/resources/taskArtifacts/client/Client.mjs +275 -6
  136. package/dist/esm/api/resources/taskArtifacts/client/index.d.mts +1 -0
  137. package/dist/esm/api/resources/taskArtifacts/client/index.mjs +1 -1
  138. package/dist/esm/api/resources/taskArtifacts/client/requests/AddTaskArtifactReq.d.mts +19 -0
  139. package/dist/esm/api/resources/taskArtifacts/client/requests/index.d.mts +1 -0
  140. package/dist/esm/api/resources/taskArtifacts/resources/index.d.mts +2 -2
  141. package/dist/esm/api/resources/taskArtifacts/resources/index.mjs +2 -2
  142. package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.d.mts +9 -9
  143. package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/Client.mjs +9 -9
  144. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.d.mts +1 -0
  145. package/dist/esm/api/resources/taskArtifacts/resources/s3Object/client/index.mjs +1 -0
  146. package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.d.mts +47 -0
  147. package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/Client.mjs +90 -0
  148. package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.d.mts +1 -0
  149. package/dist/esm/api/resources/taskArtifacts/resources/s3ObjectMetadata/client/index.mjs +1 -0
  150. package/dist/esm/api/resources/taskGroups/client/Client.d.mts +79 -33
  151. package/dist/esm/api/resources/taskGroups/client/Client.mjs +218 -65
  152. package/dist/esm/api/resources/taskGroups/client/requests/AddMessageReq.d.mts +13 -0
  153. package/dist/esm/api/resources/taskGroups/client/requests/BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.d.mts +13 -0
  154. package/dist/esm/api/resources/taskGroups/client/requests/SetFlightNumberReq.d.mts +1 -0
  155. package/dist/esm/api/resources/taskGroups/client/requests/SetTaskOrderingReq.d.mts +3 -2
  156. package/dist/esm/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.d.mts +13 -0
  157. package/dist/esm/api/resources/taskGroups/client/requests/UpdateCourierOrgReq.mjs +4 -0
  158. package/dist/esm/api/resources/taskGroups/client/requests/UpdateDriverReq.d.mts +13 -0
  159. package/dist/esm/api/resources/taskGroups/client/requests/UpdateDriverReq.mjs +4 -0
  160. package/dist/esm/api/resources/taskGroups/client/requests/index.d.mts +4 -2
  161. package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.d.mts +4 -0
  162. package/dist/esm/api/resources/taskGroups/resources/expanded/client/Client.mjs +18 -2
  163. package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierDriverV1Request.d.mts +4 -0
  164. package/dist/esm/api/resources/taskGroups/resources/expanded/client/requests/ExpandedListForCourierOperatorsV1Request.d.mts +4 -0
  165. package/dist/esm/api/resources/taskGroups/resources/index.d.mts +3 -0
  166. package/dist/esm/api/resources/taskGroups/resources/index.mjs +3 -0
  167. package/dist/esm/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.d.mts +14 -7
  168. package/dist/esm/api/resources/{taskArtifacts/resources/images → taskGroups/resources/s3Object}/client/Client.mjs +14 -8
  169. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.d.mts +1 -0
  170. package/dist/esm/api/resources/taskGroups/resources/s3Object/client/index.mjs +1 -0
  171. package/dist/esm/api/resources/taskGroups/resources/s3Object/index.d.mts +1 -0
  172. package/dist/esm/api/resources/taskGroups/resources/s3Object/index.mjs +1 -0
  173. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.d.mts +47 -0
  174. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/Client.mjs +90 -0
  175. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.d.mts +1 -0
  176. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.mjs +1 -0
  177. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/index.d.mts +1 -0
  178. package/dist/esm/api/resources/taskGroups/resources/s3ObjectMetadata/index.mjs +1 -0
  179. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/Client.d.mts +59 -0
  180. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/Client.mjs +149 -0
  181. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/index.d.mts +1 -0
  182. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/client/index.mjs +1 -0
  183. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/index.d.mts +1 -0
  184. package/dist/esm/api/resources/taskGroups/resources/taskGroupId/index.mjs +1 -0
  185. package/dist/esm/api/resources/tasks/client/Client.d.mts +107 -0
  186. package/dist/esm/api/resources/tasks/client/Client.mjs +340 -0
  187. package/dist/esm/api/resources/tasks/client/index.d.mts +2 -0
  188. package/dist/esm/api/resources/tasks/client/index.mjs +1 -0
  189. package/dist/esm/api/resources/tasks/client/requests/AddTaskToGroupReq.d.mts +21 -0
  190. package/dist/esm/api/resources/tasks/client/requests/AddTaskToGroupReq.mjs +4 -0
  191. package/dist/esm/api/resources/tasks/client/requests/index.d.mts +1 -0
  192. package/dist/esm/api/resources/tasks/client/requests/index.mjs +1 -0
  193. package/dist/esm/api/resources/tasks/index.d.mts +1 -0
  194. package/dist/esm/api/resources/tasks/index.mjs +1 -0
  195. package/dist/esm/api/types/Cargo1.d.mts +1 -0
  196. package/dist/esm/api/types/CargoStatusEnum1.d.mts +2 -1
  197. package/dist/esm/api/types/CargoStatusEnum1.mjs +1 -0
  198. package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.d.mts +2 -2
  199. package/dist/esm/api/types/ChrtGroundCourierTaskActionEnum1.mjs +1 -1
  200. package/dist/esm/api/types/Driver1.d.mts +6 -4
  201. package/dist/esm/api/types/DriverStatusEnum.d.mts +3 -3
  202. package/dist/esm/api/types/DriverStatusEnum.mjs +2 -2
  203. package/dist/esm/api/types/DriverUpdateAvailabilityReq.d.mts +6 -0
  204. package/dist/esm/api/types/DriverUpdateAvailabilityReq.mjs +4 -0
  205. package/dist/esm/api/types/Task1.d.mts +1 -0
  206. package/dist/esm/api/types/TaskArtifact1.d.mts +1 -0
  207. package/dist/esm/api/types/TaskArtifactClientCreate1.d.mts +8 -0
  208. package/dist/esm/api/types/TaskArtifactClientCreate1.mjs +4 -0
  209. package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.d.mts +15 -0
  210. package/dist/esm/api/types/TaskArtifactS3ObjectMetadata1.mjs +4 -0
  211. package/dist/esm/api/types/TaskArtifactStatusEnum1.d.mts +2 -1
  212. package/dist/esm/api/types/TaskArtifactStatusEnum1.mjs +1 -0
  213. package/dist/esm/api/types/TaskClientUpdate1.d.mts +0 -1
  214. package/dist/esm/api/types/TaskGroup1.d.mts +1 -0
  215. package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.d.mts +15 -0
  216. package/dist/esm/api/types/TaskGroupS3ObjectMetadata1.mjs +4 -0
  217. package/dist/esm/api/types/TaskGroupSortByEnum.d.mts +2 -1
  218. package/dist/esm/api/types/TaskGroupSortByEnum.mjs +1 -0
  219. package/dist/esm/api/types/TaskGroupStatusEnum1.d.mts +2 -1
  220. package/dist/esm/api/types/TaskGroupStatusEnum1.mjs +1 -0
  221. package/dist/esm/api/types/TaskStatusEnum1.d.mts +2 -1
  222. package/dist/esm/api/types/TaskStatusEnum1.mjs +1 -0
  223. package/dist/esm/api/types/index.d.mts +4 -0
  224. package/dist/esm/api/types/index.mjs +4 -0
  225. package/dist/esm/core/exports.d.mts +1 -0
  226. package/dist/esm/core/exports.mjs +1 -0
  227. package/dist/esm/core/file/exports.d.mts +1 -0
  228. package/dist/esm/core/file/exports.mjs +1 -0
  229. package/dist/esm/core/file/file.d.mts +5 -0
  230. package/dist/esm/core/file/file.mjs +167 -0
  231. package/dist/esm/core/file/index.d.mts +2 -0
  232. package/dist/esm/core/file/index.mjs +2 -0
  233. package/dist/esm/core/file/types.d.mts +66 -0
  234. package/dist/esm/core/file/types.mjs +1 -0
  235. package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +16 -0
  236. package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +170 -0
  237. package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +1 -0
  238. package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +9 -0
  239. package/dist/esm/core/form-data-utils/index.d.mts +2 -0
  240. package/dist/esm/core/form-data-utils/index.mjs +2 -0
  241. package/dist/esm/core/index.d.mts +2 -0
  242. package/dist/esm/core/index.mjs +2 -0
  243. package/dist/esm/exports.d.mts +1 -0
  244. package/dist/esm/exports.mjs +1 -0
  245. package/dist/esm/index.d.mts +1 -0
  246. package/dist/esm/index.mjs +1 -0
  247. package/dist/esm/version.d.mts +1 -1
  248. package/dist/esm/version.mjs +1 -1
  249. package/package.json +1 -1
  250. package/reference.md +1300 -206
  251. package/dist/cjs/api/resources/drivers/client/requests/DriverCreateReq.d.ts +0 -17
  252. package/dist/cjs/api/resources/drivers/client/requests/SetDriverActivationReq.d.ts +0 -14
  253. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.d.ts +0 -12
  254. package/dist/cjs/api/resources/taskGroups/client/requests/UpdateTaskGroupDriverReq.d.ts +0 -11
  255. package/dist/esm/api/resources/drivers/client/requests/DriverCreateReq.d.mts +0 -17
  256. package/dist/esm/api/resources/drivers/client/requests/SetDriverActivationReq.d.mts +0 -14
  257. package/dist/esm/api/resources/taskGroups/client/requests/UpdateTaskGroupCourierOrgReq.d.mts +0 -12
  258. package/dist/esm/api/resources/taskGroups/client/requests/UpdateTaskGroupDriverReq.d.mts +0 -11
  259. /package/dist/cjs/api/resources/drivers/client/requests/{DriverCreateReq.js → DriverClientCreate1.js} +0 -0
  260. /package/dist/cjs/api/resources/drivers/client/requests/{SetDriverActivationReq.js → DriverClientUpdate1.js} +0 -0
  261. /package/dist/cjs/api/resources/{drivers/client/requests/UpdateDriverDetailsReq.js → taskArtifacts/client/requests/AddTaskArtifactReq.js} +0 -0
  262. /package/dist/cjs/api/resources/taskArtifacts/{resources/blurhash/client → client/requests}/index.js +0 -0
  263. /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/client/index.d.ts +0 -0
  264. /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3Object}/client/index.js +0 -0
  265. /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.d.ts +0 -0
  266. /package/dist/cjs/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.js +0 -0
  267. /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/client/index.d.ts +0 -0
  268. /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.d.ts +0 -0
  269. /package/dist/cjs/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.js +0 -0
  270. /package/dist/cjs/api/resources/taskGroups/client/requests/{UpdateTaskGroupCourierOrgReq.js → AddMessageReq.js} +0 -0
  271. /package/dist/cjs/api/resources/taskGroups/client/requests/{UpdateTaskGroupDriverReq.js → BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.js} +0 -0
  272. /package/dist/{esm/api/resources/taskArtifacts/resources/blurhash/client/index.d.mts → cjs/api/resources/taskGroups/resources/s3Object/client/index.d.ts} +0 -0
  273. /package/dist/{esm/api/resources/taskArtifacts/resources/blurhash/client/index.mjs → cjs/api/resources/taskGroups/resources/s3ObjectMetadata/client/index.d.ts} +0 -0
  274. /package/dist/{esm/api/resources/taskArtifacts/resources/images/client/index.d.mts → cjs/api/resources/taskGroups/resources/taskGroupId/client/index.d.ts} +0 -0
  275. /package/dist/esm/api/resources/drivers/client/requests/{DriverCreateReq.mjs → DriverClientCreate1.mjs} +0 -0
  276. /package/dist/esm/api/resources/drivers/client/requests/{SetDriverActivationReq.mjs → DriverClientUpdate1.mjs} +0 -0
  277. /package/dist/esm/api/resources/{drivers/client/requests/UpdateDriverDetailsReq.mjs → taskArtifacts/client/requests/AddTaskArtifactReq.mjs} +0 -0
  278. /package/dist/esm/api/resources/taskArtifacts/{resources/images/client → client/requests}/index.mjs +0 -0
  279. /package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.d.mts +0 -0
  280. /package/dist/esm/api/resources/taskArtifacts/resources/{blurhash → s3Object}/index.mjs +0 -0
  281. /package/dist/esm/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.d.mts +0 -0
  282. /package/dist/esm/api/resources/taskArtifacts/resources/{images → s3ObjectMetadata}/index.mjs +0 -0
  283. /package/dist/esm/api/resources/taskGroups/client/requests/{UpdateTaskGroupCourierOrgReq.mjs → AddMessageReq.mjs} +0 -0
  284. /package/dist/esm/api/resources/taskGroups/client/requests/{UpdateTaskGroupDriverReq.mjs → BodyPostAddS3ObjectV1OortTaskGroupsAddS3ObjectV1TaskGroupIdPost.mjs} +0 -0
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TaskArtifactStatusEnum1 = "draft" | "staged" | "completed" | "exception";
4
+ export type TaskArtifactStatusEnum1 = "draft" | "staged" | "completed" | "skipped" | "exception";
5
5
  export declare const TaskArtifactStatusEnum1: {
6
6
  readonly Draft: "draft";
7
7
  readonly Staged: "staged";
8
8
  readonly Completed: "completed";
9
+ readonly Skipped: "skipped";
9
10
  readonly Exception: "exception";
10
11
  };
@@ -8,5 +8,6 @@ exports.TaskArtifactStatusEnum1 = {
8
8
  Draft: "draft",
9
9
  Staged: "staged",
10
10
  Completed: "completed",
11
+ Skipped: "skipped",
11
12
  Exception: "exception",
12
13
  };
@@ -6,7 +6,6 @@ export interface TaskClientUpdate1 {
6
6
  location?: Chrt.LocationFeature | null;
7
7
  action?: TaskClientUpdate1.Action | null;
8
8
  time_windows?: Chrt.TimeWindow1[];
9
- order_placer_comments?: string | null;
10
9
  shipper_contact_ids?: string[];
11
10
  flight_number?: string | null;
12
11
  }
@@ -21,6 +21,7 @@ export interface TaskGroup1 {
21
21
  staged_at_timestamp?: string | null;
22
22
  in_progress_at_timestamp?: string | null;
23
23
  completed_at_timestamp?: string | null;
24
+ skipped_at_timestamp?: string | null;
24
25
  exception_at_timestamp?: string | null;
25
26
  order_cancelled?: boolean;
26
27
  task_group_type: Chrt.TaskGroupTypeEnum1;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface TaskGroupS3ObjectMetadata1 {
5
+ schema_version: number;
6
+ _id: string;
7
+ task_group_id: string;
8
+ uploaded_at_timestamp: string;
9
+ /** Must be a string starting with `user_` */
10
+ uploaded_by_user_id: string;
11
+ /** Must be a string starting with `org_` */
12
+ uploaded_by_org_id: string;
13
+ s3_key_prefix?: "oort/task_group_s3_object_metadata";
14
+ blurhash?: string | null;
15
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TaskGroupSortByEnum = "draft_started_at_timestamp" | "staged_at_timestamp" | "in_progress_at_timestamp" | "completed_at_timestamp" | "exception_at_timestamp";
4
+ export type TaskGroupSortByEnum = "draft_started_at_timestamp" | "staged_at_timestamp" | "in_progress_at_timestamp" | "completed_at_timestamp" | "skipped_at_timestamp" | "exception_at_timestamp";
5
5
  export declare const TaskGroupSortByEnum: {
6
6
  readonly DraftStartedAtTimestamp: "draft_started_at_timestamp";
7
7
  readonly StagedAtTimestamp: "staged_at_timestamp";
8
8
  readonly InProgressAtTimestamp: "in_progress_at_timestamp";
9
9
  readonly CompletedAtTimestamp: "completed_at_timestamp";
10
+ readonly SkippedAtTimestamp: "skipped_at_timestamp";
10
11
  readonly ExceptionAtTimestamp: "exception_at_timestamp";
11
12
  };
@@ -9,5 +9,6 @@ exports.TaskGroupSortByEnum = {
9
9
  StagedAtTimestamp: "staged_at_timestamp",
10
10
  InProgressAtTimestamp: "in_progress_at_timestamp",
11
11
  CompletedAtTimestamp: "completed_at_timestamp",
12
+ SkippedAtTimestamp: "skipped_at_timestamp",
12
13
  ExceptionAtTimestamp: "exception_at_timestamp",
13
14
  };
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TaskGroupStatusEnum1 = "draft" | "staged" | "in_progress" | "completed" | "exception";
4
+ export type TaskGroupStatusEnum1 = "draft" | "staged" | "in_progress" | "completed" | "skipped" | "exception";
5
5
  export declare const TaskGroupStatusEnum1: {
6
6
  readonly Draft: "draft";
7
7
  readonly Staged: "staged";
8
8
  readonly InProgress: "in_progress";
9
9
  readonly Completed: "completed";
10
+ readonly Skipped: "skipped";
10
11
  readonly Exception: "exception";
11
12
  };
@@ -9,5 +9,6 @@ exports.TaskGroupStatusEnum1 = {
9
9
  Staged: "staged",
10
10
  InProgress: "in_progress",
11
11
  Completed: "completed",
12
+ Skipped: "skipped",
12
13
  Exception: "exception",
13
14
  };
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export type TaskStatusEnum1 = "draft" | "staged" | "completed" | "exception";
4
+ export type TaskStatusEnum1 = "draft" | "staged" | "completed" | "skipped" | "exception";
5
5
  export declare const TaskStatusEnum1: {
6
6
  readonly Draft: "draft";
7
7
  readonly Staged: "staged";
8
8
  readonly Completed: "completed";
9
+ readonly Skipped: "skipped";
9
10
  readonly Exception: "exception";
10
11
  };
@@ -8,5 +8,6 @@ exports.TaskStatusEnum1 = {
8
8
  Draft: "draft",
9
9
  Staged: "staged",
10
10
  Completed: "completed",
11
+ Skipped: "skipped",
11
12
  Exception: "exception",
12
13
  };
@@ -28,6 +28,7 @@ export * from "./DecodedJwtWithOrgAndUserId.js";
28
28
  export * from "./Device1.js";
29
29
  export * from "./Driver1.js";
30
30
  export * from "./DriverStatusEnum.js";
31
+ export * from "./DriverUpdateAvailabilityReq.js";
31
32
  export * from "./DriverUpdateRes.js";
32
33
  export * from "./FlightTaskActionEnum1.js";
33
34
  export * from "./ForwarderConnectionRes.js";
@@ -100,7 +101,9 @@ export * from "./StatementStatusEnum.js";
100
101
  export * from "./StripeConnectInvoiceStatusEnum.js";
101
102
  export * from "./Task1.js";
102
103
  export * from "./TaskArtifact1.js";
104
+ export * from "./TaskArtifactClientCreate1.js";
103
105
  export * from "./TaskArtifactNotificationPreferences1.js";
106
+ export * from "./TaskArtifactS3ObjectMetadata1.js";
104
107
  export * from "./TaskArtifactStatusEnum1.js";
105
108
  export * from "./TaskArtifactTypeEnum1.js";
106
109
  export * from "./TaskClientCreate1.js";
@@ -111,6 +114,7 @@ export * from "./TaskGroupExpanded.js";
111
114
  export * from "./TaskGroupExpandedListRes.js";
112
115
  export * from "./TaskGroupMessage1.js";
113
116
  export * from "./TaskGroupMileage1.js";
117
+ export * from "./TaskGroupS3ObjectMetadata1.js";
114
118
  export * from "./TaskGroupSortByEnum.js";
115
119
  export * from "./TaskGroupStatusEnum1.js";
116
120
  export * from "./TaskGroupTypeEnum1.js";
@@ -44,6 +44,7 @@ __exportStar(require("./DecodedJwtWithOrgAndUserId.js"), exports);
44
44
  __exportStar(require("./Device1.js"), exports);
45
45
  __exportStar(require("./Driver1.js"), exports);
46
46
  __exportStar(require("./DriverStatusEnum.js"), exports);
47
+ __exportStar(require("./DriverUpdateAvailabilityReq.js"), exports);
47
48
  __exportStar(require("./DriverUpdateRes.js"), exports);
48
49
  __exportStar(require("./FlightTaskActionEnum1.js"), exports);
49
50
  __exportStar(require("./ForwarderConnectionRes.js"), exports);
@@ -116,7 +117,9 @@ __exportStar(require("./StatementStatusEnum.js"), exports);
116
117
  __exportStar(require("./StripeConnectInvoiceStatusEnum.js"), exports);
117
118
  __exportStar(require("./Task1.js"), exports);
118
119
  __exportStar(require("./TaskArtifact1.js"), exports);
120
+ __exportStar(require("./TaskArtifactClientCreate1.js"), exports);
119
121
  __exportStar(require("./TaskArtifactNotificationPreferences1.js"), exports);
122
+ __exportStar(require("./TaskArtifactS3ObjectMetadata1.js"), exports);
120
123
  __exportStar(require("./TaskArtifactStatusEnum1.js"), exports);
121
124
  __exportStar(require("./TaskArtifactTypeEnum1.js"), exports);
122
125
  __exportStar(require("./TaskClientCreate1.js"), exports);
@@ -127,6 +130,7 @@ __exportStar(require("./TaskGroupExpanded.js"), exports);
127
130
  __exportStar(require("./TaskGroupExpandedListRes.js"), exports);
128
131
  __exportStar(require("./TaskGroupMessage1.js"), exports);
129
132
  __exportStar(require("./TaskGroupMileage1.js"), exports);
133
+ __exportStar(require("./TaskGroupS3ObjectMetadata1.js"), exports);
130
134
  __exportStar(require("./TaskGroupSortByEnum.js"), exports);
131
135
  __exportStar(require("./TaskGroupStatusEnum1.js"), exports);
132
136
  __exportStar(require("./TaskGroupTypeEnum1.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./file/exports.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./file/exports.js"), exports);
@@ -0,0 +1 @@
1
+ export { Uploadable } from "./types.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { Uploadable } from "./types.js";
2
+ export declare function toBinaryUploadRequest(file: Uploadable): Promise<{
3
+ body: Uploadable.FileLike;
4
+ headers?: Record<string, string>;
5
+ }>;
@@ -0,0 +1,203 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.toBinaryUploadRequest = toBinaryUploadRequest;
46
+ function toBinaryUploadRequest(file) {
47
+ return __awaiter(this, void 0, void 0, function* () {
48
+ const { data, filename, contentLength, contentType } = yield getFileWithMetadata(file);
49
+ const request = {
50
+ body: data,
51
+ headers: {},
52
+ };
53
+ if (filename) {
54
+ request.headers["Content-Disposition"] = `attachment; filename="${filename}"`;
55
+ }
56
+ if (contentType) {
57
+ request.headers["Content-Type"] = contentType;
58
+ }
59
+ if (contentLength != null) {
60
+ request.headers["Content-Length"] = contentLength.toString();
61
+ }
62
+ return request;
63
+ });
64
+ }
65
+ function getFileWithMetadata(file) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ var _a, _b, _c, _d, _e;
68
+ if (isFileLike(file)) {
69
+ return getFileWithMetadata({
70
+ data: file,
71
+ });
72
+ }
73
+ if ("path" in file) {
74
+ const fs = yield Promise.resolve().then(() => __importStar(require("fs")));
75
+ if (!fs || !fs.createReadStream) {
76
+ throw new Error("File path uploads are not supported in this environment.");
77
+ }
78
+ const data = fs.createReadStream(file.path);
79
+ const contentLength = (_a = file.contentLength) !== null && _a !== void 0 ? _a : (yield tryGetFileSizeFromPath(file.path));
80
+ const filename = (_b = file.filename) !== null && _b !== void 0 ? _b : getNameFromPath(file.path);
81
+ return {
82
+ data,
83
+ filename,
84
+ contentType: file.contentType,
85
+ contentLength,
86
+ };
87
+ }
88
+ if ("data" in file) {
89
+ const data = file.data;
90
+ const contentLength = (_c = file.contentLength) !== null && _c !== void 0 ? _c : (yield tryGetContentLengthFromFileLike(data));
91
+ const filename = (_d = file.filename) !== null && _d !== void 0 ? _d : tryGetNameFromFileLike(data);
92
+ return {
93
+ data,
94
+ filename,
95
+ contentType: (_e = file.contentType) !== null && _e !== void 0 ? _e : tryGetContentTypeFromFileLike(data),
96
+ contentLength,
97
+ };
98
+ }
99
+ throw new Error(`Invalid FileUpload of type ${typeof file}: ${JSON.stringify(file)}`);
100
+ });
101
+ }
102
+ function isFileLike(value) {
103
+ return (isBuffer(value) ||
104
+ isArrayBufferView(value) ||
105
+ isArrayBuffer(value) ||
106
+ isUint8Array(value) ||
107
+ isBlob(value) ||
108
+ isFile(value) ||
109
+ isStreamLike(value) ||
110
+ isReadableStream(value));
111
+ }
112
+ function tryGetFileSizeFromPath(path) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ try {
115
+ const fs = yield Promise.resolve().then(() => __importStar(require("fs")));
116
+ if (!fs || !fs.promises || !fs.promises.stat) {
117
+ return undefined;
118
+ }
119
+ const fileStat = yield fs.promises.stat(path);
120
+ return fileStat.size;
121
+ }
122
+ catch (fallbackError) {
123
+ return undefined;
124
+ }
125
+ });
126
+ }
127
+ function tryGetNameFromFileLike(data) {
128
+ if (isNamedValue(data)) {
129
+ return data.name;
130
+ }
131
+ if (isPathedValue(data)) {
132
+ return getNameFromPath(data.path.toString());
133
+ }
134
+ return undefined;
135
+ }
136
+ function tryGetContentLengthFromFileLike(data) {
137
+ return __awaiter(this, void 0, void 0, function* () {
138
+ if (isBuffer(data)) {
139
+ return data.length;
140
+ }
141
+ if (isArrayBufferView(data)) {
142
+ return data.byteLength;
143
+ }
144
+ if (isArrayBuffer(data)) {
145
+ return data.byteLength;
146
+ }
147
+ if (isBlob(data)) {
148
+ return data.size;
149
+ }
150
+ if (isFile(data)) {
151
+ return data.size;
152
+ }
153
+ if (isPathedValue(data)) {
154
+ return yield tryGetFileSizeFromPath(data.path.toString());
155
+ }
156
+ return undefined;
157
+ });
158
+ }
159
+ function tryGetContentTypeFromFileLike(data) {
160
+ if (isBlob(data)) {
161
+ return data.type;
162
+ }
163
+ if (isFile(data)) {
164
+ return data.type;
165
+ }
166
+ return undefined;
167
+ }
168
+ function getNameFromPath(path) {
169
+ const lastForwardSlash = path.lastIndexOf("/");
170
+ const lastBackSlash = path.lastIndexOf("\\");
171
+ const lastSlashIndex = Math.max(lastForwardSlash, lastBackSlash);
172
+ return lastSlashIndex >= 0 ? path.substring(lastSlashIndex + 1) : path;
173
+ }
174
+ function isNamedValue(value) {
175
+ return typeof value === "object" && value != null && "name" in value;
176
+ }
177
+ function isPathedValue(value) {
178
+ return typeof value === "object" && value != null && "path" in value;
179
+ }
180
+ function isStreamLike(value) {
181
+ return typeof value === "object" && value != null && ("read" in value || "pipe" in value);
182
+ }
183
+ function isReadableStream(value) {
184
+ return typeof value === "object" && value != null && "getReader" in value;
185
+ }
186
+ function isBuffer(value) {
187
+ return typeof Buffer !== "undefined" && Buffer.isBuffer && Buffer.isBuffer(value);
188
+ }
189
+ function isArrayBufferView(value) {
190
+ return typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView(value);
191
+ }
192
+ function isArrayBuffer(value) {
193
+ return typeof ArrayBuffer !== "undefined" && value instanceof ArrayBuffer;
194
+ }
195
+ function isUint8Array(value) {
196
+ return typeof Uint8Array !== "undefined" && value instanceof Uint8Array;
197
+ }
198
+ function isBlob(value) {
199
+ return typeof Blob !== "undefined" && value instanceof Blob;
200
+ }
201
+ function isFile(value) {
202
+ return typeof File !== "undefined" && value instanceof File;
203
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./file.js";
2
+ export * from "./types.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./file.js"), exports);
18
+ __exportStar(require("./types.js"), exports);
@@ -0,0 +1,66 @@
1
+ /**
2
+ * A file that can be uploaded. Can be a file-like object (stream, buffer, blob, etc.),
3
+ * a path to a file, or an object with a file-like object and metadata.
4
+ */
5
+ export type Uploadable = Uploadable.FileLike | Uploadable.FromPath | Uploadable.WithMetadata;
6
+ export declare namespace Uploadable {
7
+ /**
8
+ * Various file-like objects that can be used to upload a file.
9
+ */
10
+ type FileLike = ArrayBuffer | ArrayBufferLike | ArrayBufferView | Uint8Array | import("buffer").Buffer | import("buffer").Blob | import("buffer").File | import("stream").Readable | import("stream/web").ReadableStream | globalThis.Blob | globalThis.File | ReadableStream;
11
+ /**
12
+ * A file path with optional metadata, used for uploading a file from the file system.
13
+ */
14
+ type FromPath = {
15
+ /** The path to the file to upload */
16
+ path: string;
17
+ /**
18
+ * Optional override for the file name (defaults to basename of path).
19
+ * This is used to set the `Content-Disposition` header in upload requests.
20
+ */
21
+ filename?: string;
22
+ /**
23
+ * Optional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
24
+ * This is used to set the `Content-Type` header in upload requests.
25
+ */
26
+ contentType?: string;
27
+ /**
28
+ * Optional file size in bytes.
29
+ * If not provided, the file size will be determined from the file system.
30
+ * The content length is used to set the `Content-Length` header in upload requests.
31
+ */
32
+ contentLength?: number;
33
+ };
34
+ /**
35
+ * A file-like object with metadata, used for uploading files.
36
+ */
37
+ type WithMetadata = {
38
+ /** The file data */
39
+ data: FileLike;
40
+ /**
41
+ * Optional override for the file name (defaults to basename of path).
42
+ * This is used to set the `Content-Disposition` header in upload requests.
43
+ */
44
+ filename?: string;
45
+ /**
46
+ * Optional MIME type of the file (e.g., 'image/jpeg', 'text/plain').
47
+ * This is used to set the `Content-Type` header in upload requests.
48
+ *
49
+ * If not provided, the content type may be determined from the data itself.
50
+ * * If the data is a `File`, `Blob`, or similar, the content type will be determined from the file itself, if the type is set.
51
+ * * Any other data type will not have a content type set, and the upload request will use `Content-Type: application/octet-stream` instead.
52
+ */
53
+ contentType?: string;
54
+ /**
55
+ * Optional file size in bytes.
56
+ * The content length is used to set the `Content-Length` header in upload requests.
57
+ * If the content length is not provided and cannot be determined, the upload request will not include the `Content-Length` header, but will use `Transfer-Encoding: chunked` instead.
58
+ *
59
+ * If not provided, the file size will be determined depending on the data type.
60
+ * * If the data is of type `fs.ReadStream` (`createReadStream`), the size will be determined from the file system.
61
+ * * If the data is a `Buffer`, `ArrayBuffer`, `Uint8Array`, `Blob`, `File`, or similar, the size will be determined from the data itself.
62
+ * * If the data is a `Readable` or `ReadableStream`, the size will not be determined.
63
+ */
64
+ contentLength?: number;
65
+ };
66
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
1
+ interface FormDataRequest<Body> {
2
+ body: Body;
3
+ headers: Record<string, string>;
4
+ duplex?: "half";
5
+ }
6
+ export declare function newFormData(): Promise<FormDataWrapper>;
7
+ export declare class FormDataWrapper {
8
+ private fd;
9
+ setup(): Promise<void>;
10
+ append(key: string, value: unknown): void;
11
+ private getFileName;
12
+ private convertToBlob;
13
+ appendFile(key: string, value: unknown, fileName?: string): Promise<void>;
14
+ getRequest(): FormDataRequest<FormData>;
15
+ }
16
+ export {};