@cloudpdf/sdk 3.0.0-next.15 → 3.0.0-next.16

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/BaseClient.js +2 -2
  2. package/dist/cjs/api/errors/ContentTooLargeError.d.ts +1 -3
  3. package/dist/cjs/api/resources/doc/client/Client.d.ts +7 -1
  4. package/dist/cjs/api/resources/doc/client/Client.js +23 -13
  5. package/dist/cjs/api/resources/doc/resources/annotations/client/Client.d.ts +11 -0
  6. package/dist/cjs/api/resources/doc/resources/annotations/client/Client.js +52 -0
  7. package/dist/cjs/api/resources/doc/resources/annotations/client/requests/ReadFileAnnotationsRequest.d.ts +19 -0
  8. package/dist/cjs/api/resources/doc/resources/annotations/client/requests/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/doc/resources/attachments/client/Client.d.ts +42 -0
  10. package/dist/cjs/api/resources/doc/resources/attachments/client/Client.js +167 -0
  11. package/dist/cjs/api/resources/doc/resources/attachments/client/index.d.ts +1 -0
  12. package/dist/cjs/api/resources/doc/resources/attachments/client/index.js +17 -0
  13. package/dist/cjs/api/resources/doc/resources/{pages/client/requests/DeletePagesRequest.d.ts → attachments/client/requests/DownloadAttachmentsRequest.d.ts} +4 -8
  14. package/dist/cjs/api/resources/doc/resources/{pages/client/requests/InsertPagesRequest.d.ts → attachments/client/requests/ListAttachmentsRequest.d.ts} +1 -6
  15. package/dist/cjs/api/resources/doc/resources/attachments/client/requests/index.d.ts +2 -0
  16. package/dist/cjs/api/resources/doc/resources/attachments/client/requests/index.js +2 -0
  17. package/dist/cjs/api/resources/doc/resources/attachments/exports.d.ts +2 -0
  18. package/dist/cjs/api/resources/doc/resources/attachments/exports.js +21 -0
  19. package/dist/cjs/api/resources/doc/resources/attachments/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/doc/resources/attachments/index.js +17 -0
  21. package/dist/cjs/api/resources/doc/resources/index.d.ts +4 -0
  22. package/dist/cjs/api/resources/doc/resources/index.js +5 -1
  23. package/dist/cjs/api/resources/doc/resources/outline/client/Client.d.ts +29 -0
  24. package/dist/cjs/api/resources/doc/resources/outline/client/Client.js +110 -0
  25. package/dist/cjs/api/resources/doc/resources/outline/client/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/doc/resources/outline/client/index.js +17 -0
  27. package/dist/{esm/api/resources/doc/resources/pages/client/requests/InsertPagesRequest.d.mts → cjs/api/resources/doc/resources/outline/client/requests/GetOutlineRequest.d.ts} +1 -6
  28. package/dist/cjs/api/resources/doc/resources/outline/client/requests/index.d.ts +1 -0
  29. package/dist/cjs/api/resources/doc/resources/outline/client/requests/index.js +2 -0
  30. package/dist/cjs/api/resources/doc/resources/outline/exports.d.ts +2 -0
  31. package/dist/cjs/api/resources/doc/resources/outline/exports.js +21 -0
  32. package/dist/cjs/api/resources/doc/resources/outline/index.d.ts +1 -0
  33. package/dist/cjs/api/resources/doc/resources/outline/index.js +17 -0
  34. package/dist/cjs/api/resources/doc/resources/pages/client/Client.d.ts +1 -106
  35. package/dist/cjs/api/resources/doc/resources/pages/client/Client.js +1 -316
  36. package/dist/cjs/api/resources/doc/resources/pages/client/requests/index.d.ts +0 -5
  37. package/dist/cjs/api/types/Annotation.d.ts +1 -10
  38. package/dist/cjs/api/types/Attachment.d.ts +23 -0
  39. package/dist/cjs/api/types/Attachment.js +13 -0
  40. package/dist/cjs/api/types/AttachmentFileBase.d.ts +5 -0
  41. package/dist/cjs/api/types/AttachmentFileInfo.d.ts +9 -0
  42. package/dist/cjs/api/types/AttachmentList.d.ts +4 -0
  43. package/dist/cjs/api/types/AttachmentMutationMeta.d.ts +23 -0
  44. package/dist/cjs/api/types/AttachmentMutationMeta.js +16 -0
  45. package/dist/cjs/api/types/CacheDelta.d.ts +1 -0
  46. package/dist/cjs/api/types/ChangeItem.d.ts +634 -1
  47. package/dist/cjs/api/types/ChangeItem.js +129 -0
  48. package/dist/cjs/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTarget.d.ts +15 -0
  49. package/dist/cjs/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget.d.ts +15 -0
  50. package/dist/cjs/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTarget.d.ts +15 -0
  51. package/dist/cjs/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTarget.d.ts +15 -0
  52. package/dist/cjs/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTarget.d.ts +15 -0
  53. package/dist/cjs/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTarget.d.ts +15 -0
  54. package/dist/cjs/api/types/ChangeOp.d.ts +93 -1
  55. package/dist/cjs/api/types/ChangeOp.js +9 -0
  56. package/dist/cjs/api/types/DocAnnotationsReadFile400Response.d.ts +2 -0
  57. package/dist/cjs/api/types/DocAnnotationsReadFile404Response.d.ts +2 -0
  58. package/dist/cjs/api/types/DocAnnotationsReadFile413Response.d.ts +2 -0
  59. package/dist/cjs/api/types/DocAttachmentsDownload400Response.d.ts +2 -0
  60. package/dist/cjs/api/types/DocAttachmentsDownload404Response.d.ts +2 -0
  61. package/dist/cjs/api/types/DocAttachmentsDownload413Response.d.ts +2 -0
  62. package/dist/cjs/api/types/DocAttachmentsList200Response.d.ts +2 -0
  63. package/dist/cjs/api/types/DocAttachmentsList404Response.d.ts +2 -0
  64. package/dist/cjs/api/types/DocManifest200Response.d.ts +7 -0
  65. package/dist/cjs/api/types/DocManifest200Response.js +4 -0
  66. package/dist/cjs/api/types/DocOutlineGet200Response.d.ts +2 -0
  67. package/dist/cjs/api/types/DocOutlineGet404Response.d.ts +2 -0
  68. package/dist/cjs/api/types/DocumentOutline.d.ts +5 -0
  69. package/dist/cjs/api/types/DocumentOutline.js +3 -0
  70. package/dist/cjs/api/types/OutlineItem.d.ts +12 -0
  71. package/dist/cjs/api/types/OutlineItem.js +3 -0
  72. package/dist/cjs/api/types/OutlineItemDraft.d.ts +8 -0
  73. package/dist/cjs/api/types/OutlineItemDraft.js +3 -0
  74. package/dist/cjs/api/types/OutlineItemPatch.d.ts +9 -0
  75. package/dist/cjs/api/types/OutlineItemPatch.js +3 -0
  76. package/dist/cjs/api/types/OutlineItemRef.d.ts +10 -0
  77. package/dist/cjs/api/types/OutlineItemRef.js +10 -0
  78. package/dist/cjs/api/types/OutlineMutationMeta.d.ts +8 -0
  79. package/dist/cjs/api/types/OutlineMutationMeta.js +3 -0
  80. package/dist/cjs/api/types/OutlineOrder.d.ts +5 -0
  81. package/dist/cjs/api/types/OutlineOrder.js +3 -0
  82. package/dist/cjs/api/types/OutlinePosition.d.ts +5 -0
  83. package/dist/cjs/api/types/OutlinePosition.js +3 -0
  84. package/dist/cjs/api/types/index.d.ts +29 -23
  85. package/dist/cjs/api/types/index.js +29 -23
  86. package/dist/cjs/version.d.ts +1 -1
  87. package/dist/cjs/version.js +1 -1
  88. package/dist/esm/BaseClient.mjs +2 -2
  89. package/dist/esm/api/errors/ContentTooLargeError.d.mts +1 -3
  90. package/dist/esm/api/resources/doc/client/Client.d.mts +7 -1
  91. package/dist/esm/api/resources/doc/client/Client.mjs +11 -1
  92. package/dist/esm/api/resources/doc/resources/annotations/client/Client.d.mts +11 -0
  93. package/dist/esm/api/resources/doc/resources/annotations/client/Client.mjs +52 -0
  94. package/dist/esm/api/resources/doc/resources/annotations/client/requests/ReadFileAnnotationsRequest.d.mts +19 -0
  95. package/dist/esm/api/resources/doc/resources/annotations/client/requests/index.d.mts +1 -0
  96. package/dist/esm/api/resources/doc/resources/attachments/client/Client.d.mts +42 -0
  97. package/dist/esm/api/resources/doc/resources/attachments/client/Client.mjs +130 -0
  98. package/dist/esm/api/resources/doc/resources/attachments/client/index.d.mts +1 -0
  99. package/dist/esm/api/resources/doc/resources/attachments/client/index.mjs +1 -0
  100. package/dist/{cjs/api/resources/doc/resources/pages/client/requests/RotatePagesRequest.d.ts → esm/api/resources/doc/resources/attachments/client/requests/DownloadAttachmentsRequest.d.mts} +4 -8
  101. package/dist/esm/api/resources/doc/resources/attachments/client/requests/ListAttachmentsRequest.d.mts +13 -0
  102. package/dist/esm/api/resources/doc/resources/attachments/client/requests/index.d.mts +2 -0
  103. package/dist/esm/api/resources/doc/resources/attachments/client/requests/index.mjs +1 -0
  104. package/dist/esm/api/resources/doc/resources/attachments/exports.d.mts +2 -0
  105. package/dist/esm/api/resources/doc/resources/attachments/exports.mjs +3 -0
  106. package/dist/esm/api/resources/doc/resources/attachments/index.d.mts +1 -0
  107. package/dist/esm/api/resources/doc/resources/attachments/index.mjs +1 -0
  108. package/dist/esm/api/resources/doc/resources/index.d.mts +4 -0
  109. package/dist/esm/api/resources/doc/resources/index.mjs +4 -0
  110. package/dist/esm/api/resources/doc/resources/outline/client/Client.d.mts +29 -0
  111. package/dist/esm/api/resources/doc/resources/outline/client/Client.mjs +73 -0
  112. package/dist/esm/api/resources/doc/resources/outline/client/index.d.mts +1 -0
  113. package/dist/esm/api/resources/doc/resources/outline/client/index.mjs +1 -0
  114. package/dist/esm/api/resources/doc/resources/outline/client/requests/GetOutlineRequest.d.mts +13 -0
  115. package/dist/esm/api/resources/doc/resources/outline/client/requests/index.d.mts +1 -0
  116. package/dist/esm/api/resources/doc/resources/outline/client/requests/index.mjs +1 -0
  117. package/dist/esm/api/resources/doc/resources/outline/exports.d.mts +2 -0
  118. package/dist/esm/api/resources/doc/resources/outline/exports.mjs +3 -0
  119. package/dist/esm/api/resources/doc/resources/outline/index.d.mts +1 -0
  120. package/dist/esm/api/resources/doc/resources/outline/index.mjs +1 -0
  121. package/dist/esm/api/resources/doc/resources/pages/client/Client.d.mts +1 -106
  122. package/dist/esm/api/resources/doc/resources/pages/client/Client.mjs +1 -316
  123. package/dist/esm/api/resources/doc/resources/pages/client/requests/index.d.mts +0 -5
  124. package/dist/esm/api/types/Annotation.d.mts +1 -10
  125. package/dist/esm/api/types/Attachment.d.mts +23 -0
  126. package/dist/esm/api/types/Attachment.mjs +10 -0
  127. package/dist/esm/api/types/AttachmentFileBase.d.mts +5 -0
  128. package/dist/esm/api/types/AttachmentFileInfo.d.mts +9 -0
  129. package/dist/esm/api/types/AttachmentList.d.mts +4 -0
  130. package/dist/esm/api/types/AttachmentMutationMeta.d.mts +23 -0
  131. package/dist/esm/api/types/AttachmentMutationMeta.mjs +13 -0
  132. package/dist/esm/api/types/CacheDelta.d.mts +1 -0
  133. package/dist/esm/api/types/ChangeItem.d.mts +634 -1
  134. package/dist/esm/api/types/ChangeItem.mjs +129 -0
  135. package/dist/esm/api/types/ChangeItemPagesDeleteLayoutNamedPagesItemTarget.d.mts +15 -0
  136. package/dist/esm/api/types/ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget.d.mts +15 -0
  137. package/dist/esm/api/types/ChangeItemPagesInsertLayoutNamedPagesItemTarget.d.mts +15 -0
  138. package/dist/esm/api/types/ChangeItemPagesReorderLayoutNamedPagesItemTarget.d.mts +15 -0
  139. package/dist/esm/api/types/ChangeItemPagesRestoreLayoutNamedPagesItemTarget.d.mts +15 -0
  140. package/dist/esm/api/types/ChangeItemPagesRotateLayoutNamedPagesItemTarget.d.mts +15 -0
  141. package/dist/esm/api/types/ChangeOp.d.mts +93 -1
  142. package/dist/esm/api/types/ChangeOp.mjs +9 -0
  143. package/dist/esm/api/types/DocAnnotationsReadFile400Response.d.mts +2 -0
  144. package/dist/esm/api/types/DocAnnotationsReadFile404Response.d.mts +2 -0
  145. package/dist/esm/api/types/DocAnnotationsReadFile413Response.d.mts +2 -0
  146. package/dist/esm/api/types/DocAttachmentsDownload400Response.d.mts +2 -0
  147. package/dist/esm/api/types/DocAttachmentsDownload404Response.d.mts +2 -0
  148. package/dist/esm/api/types/DocAttachmentsDownload413Response.d.mts +2 -0
  149. package/dist/esm/api/types/DocAttachmentsList200Response.d.mts +2 -0
  150. package/dist/esm/api/types/DocAttachmentsList404Response.d.mts +2 -0
  151. package/dist/esm/api/types/DocManifest200Response.d.mts +7 -0
  152. package/dist/esm/api/types/DocManifest200Response.mjs +4 -0
  153. package/dist/esm/api/types/DocOutlineGet200Response.d.mts +2 -0
  154. package/dist/esm/api/types/DocOutlineGet404Response.d.mts +2 -0
  155. package/dist/esm/api/types/DocumentOutline.d.mts +5 -0
  156. package/dist/esm/api/types/DocumentOutline.mjs +2 -0
  157. package/dist/esm/api/types/OutlineItem.d.mts +12 -0
  158. package/dist/esm/api/types/OutlineItem.mjs +2 -0
  159. package/dist/esm/api/types/OutlineItemDraft.d.mts +8 -0
  160. package/dist/esm/api/types/OutlineItemDraft.mjs +2 -0
  161. package/dist/esm/api/types/OutlineItemPatch.d.mts +9 -0
  162. package/dist/esm/api/types/OutlineItemPatch.mjs +2 -0
  163. package/dist/esm/api/types/OutlineItemRef.d.mts +10 -0
  164. package/dist/esm/api/types/OutlineItemRef.mjs +7 -0
  165. package/dist/esm/api/types/OutlineMutationMeta.d.mts +8 -0
  166. package/dist/esm/api/types/OutlineMutationMeta.mjs +2 -0
  167. package/dist/esm/api/types/OutlineOrder.d.mts +5 -0
  168. package/dist/esm/api/types/OutlineOrder.mjs +2 -0
  169. package/dist/esm/api/types/OutlinePosition.d.mts +5 -0
  170. package/dist/esm/api/types/OutlinePosition.mjs +2 -0
  171. package/dist/esm/api/types/index.d.mts +29 -23
  172. package/dist/esm/api/types/index.mjs +29 -23
  173. package/dist/esm/version.d.mts +1 -1
  174. package/dist/esm/version.mjs +1 -1
  175. package/package.json +23 -1
  176. package/reference.md +174 -222
  177. package/dist/cjs/api/resources/doc/resources/pages/client/requests/DocPagesReorderRequest.d.ts +0 -23
  178. package/dist/cjs/api/resources/doc/resources/pages/client/requests/InsertBlankPagesRequest.d.ts +0 -20
  179. package/dist/cjs/api/types/DocPagesDelete200Response.d.ts +0 -95
  180. package/dist/cjs/api/types/DocPagesDelete200Response.js +0 -23
  181. package/dist/cjs/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTarget.d.ts +0 -15
  182. package/dist/cjs/api/types/DocPagesDelete400Response.d.ts +0 -2
  183. package/dist/cjs/api/types/DocPagesDelete404Response.d.ts +0 -2
  184. package/dist/cjs/api/types/DocPagesDeleteRequest.d.ts +0 -1
  185. package/dist/cjs/api/types/DocPagesInsert200Response.d.ts +0 -96
  186. package/dist/cjs/api/types/DocPagesInsert200Response.js +0 -23
  187. package/dist/cjs/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTarget.d.ts +0 -15
  188. package/dist/cjs/api/types/DocPagesInsert400Response.d.ts +0 -2
  189. package/dist/cjs/api/types/DocPagesInsert404Response.d.ts +0 -2
  190. package/dist/cjs/api/types/DocPagesInsertBlank200Response.d.ts +0 -96
  191. package/dist/cjs/api/types/DocPagesInsertBlank200Response.js +0 -23
  192. package/dist/cjs/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget.d.ts +0 -15
  193. package/dist/cjs/api/types/DocPagesInsertBlank400Response.d.ts +0 -2
  194. package/dist/cjs/api/types/DocPagesInsertBlank404Response.d.ts +0 -2
  195. package/dist/cjs/api/types/DocPagesInsertBlankRequest.d.ts +0 -1
  196. package/dist/cjs/api/types/DocPagesReorder200Response.d.ts +0 -96
  197. package/dist/cjs/api/types/DocPagesReorder200Response.js +0 -23
  198. package/dist/cjs/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTarget.d.ts +0 -15
  199. package/dist/cjs/api/types/DocPagesReorder400Response.d.ts +0 -2
  200. package/dist/cjs/api/types/DocPagesReorder404Response.d.ts +0 -2
  201. package/dist/cjs/api/types/DocPagesRotate200Response.d.ts +0 -95
  202. package/dist/cjs/api/types/DocPagesRotate200Response.js +0 -23
  203. package/dist/cjs/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTarget.d.ts +0 -15
  204. package/dist/cjs/api/types/DocPagesRotate400Response.d.ts +0 -2
  205. package/dist/cjs/api/types/DocPagesRotate404Response.d.ts +0 -2
  206. package/dist/cjs/api/types/DocPagesRotateRequest.d.ts +0 -1
  207. package/dist/esm/api/resources/doc/resources/pages/client/requests/DeletePagesRequest.d.mts +0 -20
  208. package/dist/esm/api/resources/doc/resources/pages/client/requests/DocPagesReorderRequest.d.mts +0 -23
  209. package/dist/esm/api/resources/doc/resources/pages/client/requests/InsertBlankPagesRequest.d.mts +0 -20
  210. package/dist/esm/api/resources/doc/resources/pages/client/requests/RotatePagesRequest.d.mts +0 -20
  211. package/dist/esm/api/types/DocPagesDelete200Response.d.mts +0 -95
  212. package/dist/esm/api/types/DocPagesDelete200Response.mjs +0 -20
  213. package/dist/esm/api/types/DocPagesDelete200ResponseLayoutNamedPagesItemTarget.d.mts +0 -15
  214. package/dist/esm/api/types/DocPagesDelete400Response.d.mts +0 -2
  215. package/dist/esm/api/types/DocPagesDelete404Response.d.mts +0 -2
  216. package/dist/esm/api/types/DocPagesDeleteRequest.d.mts +0 -1
  217. package/dist/esm/api/types/DocPagesInsert200Response.d.mts +0 -96
  218. package/dist/esm/api/types/DocPagesInsert200Response.mjs +0 -20
  219. package/dist/esm/api/types/DocPagesInsert200ResponseLayoutNamedPagesItemTarget.d.mts +0 -15
  220. package/dist/esm/api/types/DocPagesInsert400Response.d.mts +0 -2
  221. package/dist/esm/api/types/DocPagesInsert404Response.d.mts +0 -2
  222. package/dist/esm/api/types/DocPagesInsertBlank200Response.d.mts +0 -96
  223. package/dist/esm/api/types/DocPagesInsertBlank200Response.mjs +0 -20
  224. package/dist/esm/api/types/DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget.d.mts +0 -15
  225. package/dist/esm/api/types/DocPagesInsertBlank400Response.d.mts +0 -2
  226. package/dist/esm/api/types/DocPagesInsertBlank404Response.d.mts +0 -2
  227. package/dist/esm/api/types/DocPagesInsertBlankRequest.d.mts +0 -1
  228. package/dist/esm/api/types/DocPagesReorder200Response.d.mts +0 -96
  229. package/dist/esm/api/types/DocPagesReorder200Response.mjs +0 -20
  230. package/dist/esm/api/types/DocPagesReorder200ResponseLayoutNamedPagesItemTarget.d.mts +0 -15
  231. package/dist/esm/api/types/DocPagesReorder400Response.d.mts +0 -2
  232. package/dist/esm/api/types/DocPagesReorder404Response.d.mts +0 -2
  233. package/dist/esm/api/types/DocPagesRotate200Response.d.mts +0 -95
  234. package/dist/esm/api/types/DocPagesRotate200Response.mjs +0 -20
  235. package/dist/esm/api/types/DocPagesRotate200ResponseLayoutNamedPagesItemTarget.d.mts +0 -15
  236. package/dist/esm/api/types/DocPagesRotate400Response.d.mts +0 -2
  237. package/dist/esm/api/types/DocPagesRotate404Response.d.mts +0 -2
  238. package/dist/esm/api/types/DocPagesRotateRequest.d.mts +0 -1
  239. /package/dist/cjs/api/resources/doc/resources/{pages/client/requests/DeletePagesRequest.js → annotations/client/requests/ReadFileAnnotationsRequest.js} +0 -0
  240. /package/dist/cjs/api/resources/doc/resources/{pages/client/requests/DocPagesReorderRequest.js → attachments/client/requests/DownloadAttachmentsRequest.js} +0 -0
  241. /package/dist/cjs/api/resources/doc/resources/{pages/client/requests/InsertBlankPagesRequest.js → attachments/client/requests/ListAttachmentsRequest.js} +0 -0
  242. /package/dist/cjs/api/resources/doc/resources/{pages/client/requests/InsertPagesRequest.js → outline/client/requests/GetOutlineRequest.js} +0 -0
  243. /package/dist/cjs/api/{resources/doc/resources/pages/client/requests/RotatePagesRequest.js → types/AttachmentFileBase.js} +0 -0
  244. /package/dist/cjs/api/types/{DocPagesDelete200ResponseLayoutNamedPagesItemTarget.js → AttachmentFileInfo.js} +0 -0
  245. /package/dist/cjs/api/types/{DocPagesDelete400Response.js → AttachmentList.js} +0 -0
  246. /package/dist/cjs/api/types/{DocPagesDelete404Response.js → ChangeItemPagesDeleteLayoutNamedPagesItemTarget.js} +0 -0
  247. /package/dist/cjs/api/types/{DocPagesDeleteRequest.js → ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget.js} +0 -0
  248. /package/dist/cjs/api/types/{DocPagesInsert200ResponseLayoutNamedPagesItemTarget.js → ChangeItemPagesInsertLayoutNamedPagesItemTarget.js} +0 -0
  249. /package/dist/cjs/api/types/{DocPagesInsert400Response.js → ChangeItemPagesReorderLayoutNamedPagesItemTarget.js} +0 -0
  250. /package/dist/cjs/api/types/{DocPagesInsert404Response.js → ChangeItemPagesRestoreLayoutNamedPagesItemTarget.js} +0 -0
  251. /package/dist/cjs/api/types/{DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget.js → ChangeItemPagesRotateLayoutNamedPagesItemTarget.js} +0 -0
  252. /package/dist/cjs/api/types/{DocPagesInsertBlank400Response.js → DocAnnotationsReadFile400Response.js} +0 -0
  253. /package/dist/cjs/api/types/{DocPagesInsertBlank404Response.js → DocAnnotationsReadFile404Response.js} +0 -0
  254. /package/dist/cjs/api/types/{DocPagesInsertBlankRequest.js → DocAnnotationsReadFile413Response.js} +0 -0
  255. /package/dist/cjs/api/types/{DocPagesReorder200ResponseLayoutNamedPagesItemTarget.js → DocAttachmentsDownload400Response.js} +0 -0
  256. /package/dist/cjs/api/types/{DocPagesReorder400Response.js → DocAttachmentsDownload404Response.js} +0 -0
  257. /package/dist/cjs/api/types/{DocPagesReorder404Response.js → DocAttachmentsDownload413Response.js} +0 -0
  258. /package/dist/cjs/api/types/{DocPagesRotate200ResponseLayoutNamedPagesItemTarget.js → DocAttachmentsList200Response.js} +0 -0
  259. /package/dist/cjs/api/types/{DocPagesRotate400Response.js → DocAttachmentsList404Response.js} +0 -0
  260. /package/dist/cjs/api/types/{DocPagesRotate404Response.js → DocOutlineGet200Response.js} +0 -0
  261. /package/dist/cjs/api/types/{DocPagesRotateRequest.js → DocOutlineGet404Response.js} +0 -0
  262. /package/dist/esm/api/resources/doc/resources/{pages/client/requests/DeletePagesRequest.mjs → annotations/client/requests/ReadFileAnnotationsRequest.mjs} +0 -0
  263. /package/dist/esm/api/resources/doc/resources/{pages/client/requests/DocPagesReorderRequest.mjs → attachments/client/requests/DownloadAttachmentsRequest.mjs} +0 -0
  264. /package/dist/esm/api/resources/doc/resources/{pages/client/requests/InsertBlankPagesRequest.mjs → attachments/client/requests/ListAttachmentsRequest.mjs} +0 -0
  265. /package/dist/esm/api/resources/doc/resources/{pages/client/requests/InsertPagesRequest.mjs → outline/client/requests/GetOutlineRequest.mjs} +0 -0
  266. /package/dist/esm/api/{resources/doc/resources/pages/client/requests/RotatePagesRequest.mjs → types/AttachmentFileBase.mjs} +0 -0
  267. /package/dist/esm/api/types/{DocPagesDelete200ResponseLayoutNamedPagesItemTarget.mjs → AttachmentFileInfo.mjs} +0 -0
  268. /package/dist/esm/api/types/{DocPagesDelete400Response.mjs → AttachmentList.mjs} +0 -0
  269. /package/dist/esm/api/types/{DocPagesDelete404Response.mjs → ChangeItemPagesDeleteLayoutNamedPagesItemTarget.mjs} +0 -0
  270. /package/dist/esm/api/types/{DocPagesDeleteRequest.mjs → ChangeItemPagesInsertBlankLayoutNamedPagesItemTarget.mjs} +0 -0
  271. /package/dist/esm/api/types/{DocPagesInsert200ResponseLayoutNamedPagesItemTarget.mjs → ChangeItemPagesInsertLayoutNamedPagesItemTarget.mjs} +0 -0
  272. /package/dist/esm/api/types/{DocPagesInsert400Response.mjs → ChangeItemPagesReorderLayoutNamedPagesItemTarget.mjs} +0 -0
  273. /package/dist/esm/api/types/{DocPagesInsert404Response.mjs → ChangeItemPagesRestoreLayoutNamedPagesItemTarget.mjs} +0 -0
  274. /package/dist/esm/api/types/{DocPagesInsertBlank200ResponseLayoutNamedPagesItemTarget.mjs → ChangeItemPagesRotateLayoutNamedPagesItemTarget.mjs} +0 -0
  275. /package/dist/esm/api/types/{DocPagesInsertBlank400Response.mjs → DocAnnotationsReadFile400Response.mjs} +0 -0
  276. /package/dist/esm/api/types/{DocPagesInsertBlank404Response.mjs → DocAnnotationsReadFile404Response.mjs} +0 -0
  277. /package/dist/esm/api/types/{DocPagesInsertBlankRequest.mjs → DocAnnotationsReadFile413Response.mjs} +0 -0
  278. /package/dist/esm/api/types/{DocPagesReorder200ResponseLayoutNamedPagesItemTarget.mjs → DocAttachmentsDownload400Response.mjs} +0 -0
  279. /package/dist/esm/api/types/{DocPagesReorder400Response.mjs → DocAttachmentsDownload404Response.mjs} +0 -0
  280. /package/dist/esm/api/types/{DocPagesReorder404Response.mjs → DocAttachmentsDownload413Response.mjs} +0 -0
  281. /package/dist/esm/api/types/{DocPagesRotate200ResponseLayoutNamedPagesItemTarget.mjs → DocAttachmentsList200Response.mjs} +0 -0
  282. /package/dist/esm/api/types/{DocPagesRotate400Response.mjs → DocAttachmentsList404Response.mjs} +0 -0
  283. /package/dist/esm/api/types/{DocPagesRotate404Response.mjs → DocOutlineGet200Response.mjs} +0 -0
  284. /package/dist/esm/api/types/{DocPagesRotateRequest.mjs → DocOutlineGet404Response.mjs} +0 -0
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@cloudpdf/sdk",
46
- "X-Fern-SDK-Version": "3.0.0-next.15",
47
- "User-Agent": "@cloudpdf/sdk/3.0.0-next.15",
46
+ "X-Fern-SDK-Version": "3.0.0-next.16",
47
+ "User-Agent": "@cloudpdf/sdk/3.0.0-next.16",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -1,7 +1,5 @@
1
1
  import type * as core from "../../core/index.js";
2
2
  import * as errors from "../../errors/index.js";
3
- import type * as CloudPDF from "../index.js";
4
3
  export declare class ContentTooLargeError extends errors.CloudPDFError {
5
- readonly body: CloudPDF.DocChanges413Response;
6
- constructor(body: CloudPDF.DocChanges413Response, rawResponse?: core.RawResponse);
4
+ constructor(body?: unknown, rawResponse?: core.RawResponse);
7
5
  }
@@ -3,8 +3,10 @@ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"
3
3
  import * as core from "../../../../core/index.js";
4
4
  import * as CloudPDF from "../../../index.js";
5
5
  import { AnnotationsClient } from "../resources/annotations/client/Client.js";
6
+ import { AttachmentsClient } from "../resources/attachments/client/Client.js";
6
7
  import { FormsClient } from "../resources/forms/client/Client.js";
7
8
  import { MetadataClient } from "../resources/metadata/client/Client.js";
9
+ import { OutlineClient } from "../resources/outline/client/Client.js";
8
10
  import { PagesClient } from "../resources/pages/client/Client.js";
9
11
  import { RedactionsClient } from "../resources/redactions/client/Client.js";
10
12
  import { SignaturesClient } from "../resources/signatures/client/Client.js";
@@ -17,16 +19,20 @@ export declare namespace DocClient {
17
19
  export declare class DocClient {
18
20
  protected readonly _options: NormalizedClientOptionsWithAuth<DocClient.Options>;
19
21
  protected _annotations: AnnotationsClient | undefined;
22
+ protected _attachments: AttachmentsClient | undefined;
20
23
  protected _forms: FormsClient | undefined;
21
24
  protected _metadata: MetadataClient | undefined;
25
+ protected _outline: OutlineClient | undefined;
22
26
  protected _pages: PagesClient | undefined;
23
27
  protected _redactions: RedactionsClient | undefined;
24
28
  protected _signatures: SignaturesClient | undefined;
25
29
  protected _versions: VersionsClient | undefined;
26
30
  constructor(options: DocClient.Options);
27
31
  get annotations(): AnnotationsClient;
32
+ get attachments(): AttachmentsClient;
28
33
  get forms(): FormsClient;
29
34
  get metadata(): MetadataClient;
35
+ get outline(): OutlineClient;
30
36
  get pages(): PagesClient;
31
37
  get redactions(): RedactionsClient;
32
38
  get signatures(): SignaturesClient;
@@ -47,7 +53,7 @@ export declare class DocClient {
47
53
  head(request: CloudPDF.HeadDocRequest, requestOptions?: DocClient.RequestOptions): core.HttpResponsePromise<CloudPDF.DocHead200Response>;
48
54
  private __head;
49
55
  /**
50
- * Each change stands on its own and names itself by `opId`: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its `opId`, a change gets the same answer, refusals included; a different change under an answered `opId` is refused (IdempotencyKeyReused). `{ opId, undoOf }` undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need `doc.annotate.modify`, form values `doc.forms.fill`, form structure `doc.forms.modify`, metadata `doc.metadata.modify`. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON `body` part, each op naming its files by role as `resources: { <role>: '<key>' }`, and each file as the part `resource:<key>`. At most 64 changes per request and 512 ops per change.
56
+ * Each change stands on its own and names itself by `opId`: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its `opId`, a change gets the same answer, refusals included; a different change under an answered `opId` is refused (IdempotencyKeyReused). `{ opId, undoOf }` undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need `doc.annotate.modify`, form values `doc.forms.fill`, form structure `doc.forms.modify`, metadata `doc.metadata.modify`, outline `doc.outline.modify`, pages `doc.pages.assemble`, embedded files `doc.attachments.modify`. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON `body` part, each op naming its files by role as `resources: { <role>: '<key>' }`, and each file as the part `resource:<key>`. At most 64 changes per request and 512 ops per change.
51
57
  *
52
58
  * @param {CloudPDF.DocChangesRequest} request
53
59
  * @param {DocClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -63,12 +63,14 @@ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatu
63
63
  const errors = __importStar(require("../../../../errors/index.js"));
64
64
  const CloudPDF = __importStar(require("../../../index.js"));
65
65
  const Client_js_1 = require("../resources/annotations/client/Client.js");
66
- const Client_js_2 = require("../resources/forms/client/Client.js");
67
- const Client_js_3 = require("../resources/metadata/client/Client.js");
68
- const Client_js_4 = require("../resources/pages/client/Client.js");
69
- const Client_js_5 = require("../resources/redactions/client/Client.js");
70
- const Client_js_6 = require("../resources/signatures/client/Client.js");
71
- const Client_js_7 = require("../resources/versions/client/Client.js");
66
+ const Client_js_2 = require("../resources/attachments/client/Client.js");
67
+ const Client_js_3 = require("../resources/forms/client/Client.js");
68
+ const Client_js_4 = require("../resources/metadata/client/Client.js");
69
+ const Client_js_5 = require("../resources/outline/client/Client.js");
70
+ const Client_js_6 = require("../resources/pages/client/Client.js");
71
+ const Client_js_7 = require("../resources/redactions/client/Client.js");
72
+ const Client_js_8 = require("../resources/signatures/client/Client.js");
73
+ const Client_js_9 = require("../resources/versions/client/Client.js");
72
74
  class DocClient {
73
75
  constructor(options) {
74
76
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
@@ -77,29 +79,37 @@ class DocClient {
77
79
  var _a;
78
80
  return ((_a = this._annotations) !== null && _a !== void 0 ? _a : (this._annotations = new Client_js_1.AnnotationsClient(this._options)));
79
81
  }
82
+ get attachments() {
83
+ var _a;
84
+ return ((_a = this._attachments) !== null && _a !== void 0 ? _a : (this._attachments = new Client_js_2.AttachmentsClient(this._options)));
85
+ }
80
86
  get forms() {
81
87
  var _a;
82
- return ((_a = this._forms) !== null && _a !== void 0 ? _a : (this._forms = new Client_js_2.FormsClient(this._options)));
88
+ return ((_a = this._forms) !== null && _a !== void 0 ? _a : (this._forms = new Client_js_3.FormsClient(this._options)));
83
89
  }
84
90
  get metadata() {
85
91
  var _a;
86
- return ((_a = this._metadata) !== null && _a !== void 0 ? _a : (this._metadata = new Client_js_3.MetadataClient(this._options)));
92
+ return ((_a = this._metadata) !== null && _a !== void 0 ? _a : (this._metadata = new Client_js_4.MetadataClient(this._options)));
93
+ }
94
+ get outline() {
95
+ var _a;
96
+ return ((_a = this._outline) !== null && _a !== void 0 ? _a : (this._outline = new Client_js_5.OutlineClient(this._options)));
87
97
  }
88
98
  get pages() {
89
99
  var _a;
90
- return ((_a = this._pages) !== null && _a !== void 0 ? _a : (this._pages = new Client_js_4.PagesClient(this._options)));
100
+ return ((_a = this._pages) !== null && _a !== void 0 ? _a : (this._pages = new Client_js_6.PagesClient(this._options)));
91
101
  }
92
102
  get redactions() {
93
103
  var _a;
94
- return ((_a = this._redactions) !== null && _a !== void 0 ? _a : (this._redactions = new Client_js_5.RedactionsClient(this._options)));
104
+ return ((_a = this._redactions) !== null && _a !== void 0 ? _a : (this._redactions = new Client_js_7.RedactionsClient(this._options)));
95
105
  }
96
106
  get signatures() {
97
107
  var _a;
98
- return ((_a = this._signatures) !== null && _a !== void 0 ? _a : (this._signatures = new Client_js_6.SignaturesClient(this._options)));
108
+ return ((_a = this._signatures) !== null && _a !== void 0 ? _a : (this._signatures = new Client_js_8.SignaturesClient(this._options)));
99
109
  }
100
110
  get versions() {
101
111
  var _a;
102
- return ((_a = this._versions) !== null && _a !== void 0 ? _a : (this._versions = new Client_js_7.VersionsClient(this._options)));
112
+ return ((_a = this._versions) !== null && _a !== void 0 ? _a : (this._versions = new Client_js_9.VersionsClient(this._options)));
103
113
  }
104
114
  /**
105
115
  * @param {CloudPDF.HeadDocRequest} request
@@ -153,7 +163,7 @@ class DocClient {
153
163
  });
154
164
  }
155
165
  /**
156
- * Each change stands on its own and names itself by `opId`: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its `opId`, a change gets the same answer, refusals included; a different change under an answered `opId` is refused (IdempotencyKeyReused). `{ opId, undoOf }` undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need `doc.annotate.modify`, form values `doc.forms.fill`, form structure `doc.forms.modify`, metadata `doc.metadata.modify`. Bytes (a stamp's drawing, an attached file, a signature's artwork) travel as multipart: a JSON `body` part, each op naming its files by role as `resources: { <role>: '<key>' }`, and each file as the part `resource:<key>`. At most 64 changes per request and 512 ops per change.
166
+ * Each change stands on its own and names itself by `opId`: a refused change rolls back alone, and the answer lists every change in order, applied with its result or refused with its error. Asked again under its `opId`, a change gets the same answer, refusals included; a different change under an answered `opId` is refused (IdempotencyKeyReused). `{ opId, undoOf }` undoes an earlier change of the caller, here or in an earlier request; an undo leaves alone what was changed since, and the undo of an undo redoes. A redaction, a flatten, a form repair or a completed signature ends undo for the changes before it (UndoUnavailable). Each op is checked against its own capability: annotation ops need `doc.annotate.modify`, form values `doc.forms.fill`, form structure `doc.forms.modify`, metadata `doc.metadata.modify`, outline `doc.outline.modify`, pages `doc.pages.assemble`, embedded files `doc.attachments.modify`. Bytes (a stamp's drawing, an attached file, a signature's artwork, a PDF whose pages come in) travel as multipart: a JSON `body` part, each op naming its files by role as `resources: { <role>: '<key>' }`, and each file as the part `resource:<key>`. At most 64 changes per request and 512 ops per change.
157
167
  *
158
168
  * @param {CloudPDF.DocChangesRequest} request
159
169
  * @param {DocClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -117,6 +117,17 @@ export declare class AnnotationsClient {
117
117
  */
118
118
  readAppearance(request: CloudPDF.doc.ReadAppearanceAnnotationsRequest, requestOptions?: AnnotationsClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
119
119
  private __readAppearance;
120
+ /**
121
+ * A file that decodes past the server's limit is refused (PayloadTooLarge).
122
+ *
123
+ * @throws {@link CloudPDF.BadRequestError}
124
+ * @throws {@link CloudPDF.NotFoundError}
125
+ * @throws {@link CloudPDF.ContentTooLargeError}
126
+ * @throws {@link errors.CloudPDFError}
127
+ * @throws {@link errors.CloudPDFTimeoutError}
128
+ */
129
+ readFile(request: CloudPDF.doc.ReadFileAnnotationsRequest, requestOptions?: AnnotationsClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
130
+ private __readFile;
120
131
  /**
121
132
  * @throws {@link CloudPDF.BadRequestError}
122
133
  * @throws {@link CloudPDF.NotFoundError}
@@ -419,6 +419,58 @@ class AnnotationsClient {
419
419
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/docs/{docId}/layers/{layerName}/annotations/pages/{pageKey}/items/{annotKey}/resources/appearance");
420
420
  });
421
421
  }
422
+ /**
423
+ * A file that decodes past the server's limit is refused (PayloadTooLarge).
424
+ *
425
+ * @throws {@link CloudPDF.BadRequestError}
426
+ * @throws {@link CloudPDF.NotFoundError}
427
+ * @throws {@link CloudPDF.ContentTooLargeError}
428
+ * @throws {@link errors.CloudPDFError}
429
+ * @throws {@link errors.CloudPDFTimeoutError}
430
+ */
431
+ readFile(request, requestOptions) {
432
+ return core.HttpResponsePromise.fromPromise(this.__readFile(request, requestOptions));
433
+ }
434
+ __readFile(request, requestOptions) {
435
+ return __awaiter(this, void 0, void 0, function* () {
436
+ var _a, _b, _c, _d, _e, _f, _g, _h;
437
+ const { docId, layerName, pageKey, annotKey, "X-Document-Password": documentPassword } = request;
438
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
439
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Document-Password": documentPassword }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
440
+ const _response = yield core.fetcher({
441
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `v1/docs/${core.url.encodePathParam(docId)}/layers/${core.url.encodePathParam(layerName)}/annotations/pages/${core.url.encodePathParam(pageKey)}/items/${core.url.encodePathParam(annotKey)}/resources/file`),
442
+ method: "GET",
443
+ headers: _headers,
444
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
445
+ responseType: "binary-response",
446
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
447
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
448
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
449
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
450
+ logging: this._options.logging,
451
+ });
452
+ if (_response.ok) {
453
+ return { data: _response.body, rawResponse: _response.rawResponse };
454
+ }
455
+ if (_response.error.reason === "status-code") {
456
+ switch (_response.error.statusCode) {
457
+ case 400:
458
+ throw new CloudPDF.BadRequestError(_response.error.body, _response.rawResponse);
459
+ case 404:
460
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
461
+ case 413:
462
+ throw new CloudPDF.ContentTooLargeError(_response.error.body, _response.rawResponse);
463
+ default:
464
+ throw new errors.CloudPDFError({
465
+ statusCode: _response.error.statusCode,
466
+ body: _response.error.body,
467
+ rawResponse: _response.rawResponse,
468
+ });
469
+ }
470
+ }
471
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/docs/{docId}/layers/{layerName}/annotations/pages/{pageKey}/items/{annotKey}/resources/file");
472
+ });
473
+ }
422
474
  /**
423
475
  * @throws {@link CloudPDF.BadRequestError}
424
476
  * @throws {@link CloudPDF.NotFoundError}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * docId: "docId",
5
+ * layerName: "layerName",
6
+ * pageKey: "pageKey",
7
+ * annotKey: "annotKey"
8
+ * }
9
+ */
10
+ export interface ReadFileAnnotationsRequest {
11
+ docId: string;
12
+ layerName: string;
13
+ /** The page's address, `obj:N`: the page's indirect object number, the durable identity every `PageLayout.ref` carries. Mirrors `annotKey` and `fieldKey`. */
14
+ pageKey: string;
15
+ /** The annotation's address on the page: `obj:N`, its indirect object number, or `base:N` for an annotation the uploaded file stored inline (without an object number of its own), the position it was born at in the page's /Annots. The name the annotation's `ref` carries for life. */
16
+ annotKey: string;
17
+ /** Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. */
18
+ "X-Document-Password"?: string;
19
+ }
@@ -6,4 +6,5 @@ export type { FlattenAnnotationsRequest } from "./FlattenAnnotationsRequest.js";
6
6
  export type { ListAllAnnotationsRequest } from "./ListAllAnnotationsRequest.js";
7
7
  export type { ListAnnotationsRequest } from "./ListAnnotationsRequest.js";
8
8
  export type { ReadAppearanceAnnotationsRequest } from "./ReadAppearanceAnnotationsRequest.js";
9
+ export type { ReadFileAnnotationsRequest } from "./ReadFileAnnotationsRequest.js";
9
10
  export type { UpdateAnnotationsRequest } from "./UpdateAnnotationsRequest.js";
@@ -0,0 +1,42 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
+ import * as core from "../../../../../../core/index.js";
4
+ import * as CloudPDF from "../../../../../index.js";
5
+ export declare namespace AttachmentsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class AttachmentsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AttachmentsClient.Options>;
12
+ constructor(options: AttachmentsClient.Options);
13
+ /**
14
+ * A file that decodes past the server's limit is refused (PayloadTooLarge).
15
+ *
16
+ * @throws {@link CloudPDF.BadRequestError}
17
+ * @throws {@link CloudPDF.NotFoundError}
18
+ * @throws {@link CloudPDF.ContentTooLargeError}
19
+ * @throws {@link errors.CloudPDFError}
20
+ * @throws {@link errors.CloudPDFTimeoutError}
21
+ */
22
+ download(request: CloudPDF.doc.DownloadAttachmentsRequest, requestOptions?: AttachmentsClient.RequestOptions): core.HttpResponsePromise<core.BinaryResponse>;
23
+ private __download;
24
+ /**
25
+ * A file-attachment annotation's file is listed with the annotation; read its bytes with `doc.annotations.readFile`.
26
+ *
27
+ * @param {CloudPDF.doc.ListAttachmentsRequest} request
28
+ * @param {AttachmentsClient.RequestOptions} requestOptions - Request-specific configuration.
29
+ *
30
+ * @throws {@link CloudPDF.NotFoundError}
31
+ * @throws {@link errors.CloudPDFError}
32
+ * @throws {@link errors.CloudPDFTimeoutError}
33
+ *
34
+ * @example
35
+ * await client.doc.attachments.list({
36
+ * docId: "docId",
37
+ * layerName: "layerName"
38
+ * })
39
+ */
40
+ list(request: CloudPDF.doc.ListAttachmentsRequest, requestOptions?: AttachmentsClient.RequestOptions): core.HttpResponsePromise<CloudPDF.DocAttachmentsList200Response>;
41
+ private __list;
42
+ }
@@ -0,0 +1,167 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.AttachmentsClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../../../core/index.js"));
50
+ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
51
+ const errors = __importStar(require("../../../../../../errors/index.js"));
52
+ const CloudPDF = __importStar(require("../../../../../index.js"));
53
+ class AttachmentsClient {
54
+ constructor(options) {
55
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
56
+ }
57
+ /**
58
+ * A file that decodes past the server's limit is refused (PayloadTooLarge).
59
+ *
60
+ * @throws {@link CloudPDF.BadRequestError}
61
+ * @throws {@link CloudPDF.NotFoundError}
62
+ * @throws {@link CloudPDF.ContentTooLargeError}
63
+ * @throws {@link errors.CloudPDFError}
64
+ * @throws {@link errors.CloudPDFTimeoutError}
65
+ */
66
+ download(request, requestOptions) {
67
+ return core.HttpResponsePromise.fromPromise(this.__download(request, requestOptions));
68
+ }
69
+ __download(request, requestOptions) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ var _a, _b, _c, _d, _e, _f, _g, _h;
72
+ const { docId, layerName, fileKey, "X-Document-Password": documentPassword } = request;
73
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
74
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Document-Password": documentPassword }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
75
+ const _response = yield core.fetcher({
76
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `v1/docs/${core.url.encodePathParam(docId)}/layers/${core.url.encodePathParam(layerName)}/attachment-files/${core.url.encodePathParam(fileKey)}/data`),
77
+ method: "GET",
78
+ headers: _headers,
79
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
80
+ responseType: "binary-response",
81
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
82
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
83
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
84
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
85
+ logging: this._options.logging,
86
+ });
87
+ if (_response.ok) {
88
+ return { data: _response.body, rawResponse: _response.rawResponse };
89
+ }
90
+ if (_response.error.reason === "status-code") {
91
+ switch (_response.error.statusCode) {
92
+ case 400:
93
+ throw new CloudPDF.BadRequestError(_response.error.body, _response.rawResponse);
94
+ case 404:
95
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
96
+ case 413:
97
+ throw new CloudPDF.ContentTooLargeError(_response.error.body, _response.rawResponse);
98
+ default:
99
+ throw new errors.CloudPDFError({
100
+ statusCode: _response.error.statusCode,
101
+ body: _response.error.body,
102
+ rawResponse: _response.rawResponse,
103
+ });
104
+ }
105
+ }
106
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/docs/{docId}/layers/{layerName}/attachment-files/{fileKey}/data");
107
+ });
108
+ }
109
+ /**
110
+ * A file-attachment annotation's file is listed with the annotation; read its bytes with `doc.annotations.readFile`.
111
+ *
112
+ * @param {CloudPDF.doc.ListAttachmentsRequest} request
113
+ * @param {AttachmentsClient.RequestOptions} requestOptions - Request-specific configuration.
114
+ *
115
+ * @throws {@link CloudPDF.NotFoundError}
116
+ * @throws {@link errors.CloudPDFError}
117
+ * @throws {@link errors.CloudPDFTimeoutError}
118
+ *
119
+ * @example
120
+ * await client.doc.attachments.list({
121
+ * docId: "docId",
122
+ * layerName: "layerName"
123
+ * })
124
+ */
125
+ list(request, requestOptions) {
126
+ return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
127
+ }
128
+ __list(request, requestOptions) {
129
+ return __awaiter(this, void 0, void 0, function* () {
130
+ var _a, _b, _c, _d, _e, _f, _g, _h;
131
+ const { docId, layerName, "X-Document-Password": documentPassword } = request;
132
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
133
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "X-Document-Password": documentPassword }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
134
+ const _response = yield core.fetcher({
135
+ url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `v1/docs/${core.url.encodePathParam(docId)}/layers/${core.url.encodePathParam(layerName)}/attachments`),
136
+ method: "GET",
137
+ headers: _headers,
138
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
139
+ timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
140
+ maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
141
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
142
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
143
+ logging: this._options.logging,
144
+ });
145
+ if (_response.ok) {
146
+ return {
147
+ data: _response.body,
148
+ rawResponse: _response.rawResponse,
149
+ };
150
+ }
151
+ if (_response.error.reason === "status-code") {
152
+ switch (_response.error.statusCode) {
153
+ case 404:
154
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
155
+ default:
156
+ throw new errors.CloudPDFError({
157
+ statusCode: _response.error.statusCode,
158
+ body: _response.error.body,
159
+ rawResponse: _response.rawResponse,
160
+ });
161
+ }
162
+ }
163
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/docs/{docId}/layers/{layerName}/attachments");
164
+ });
165
+ }
166
+ }
167
+ exports.AttachmentsClient = AttachmentsClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.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("./requests/index.js"), exports);
@@ -1,20 +1,16 @@
1
- import type * as CloudPDF from "../../../../../../index.js";
2
1
  /**
3
2
  * @example
4
3
  * {
5
4
  * docId: "docId",
6
5
  * layerName: "layerName",
7
- * body: {
8
- * "key": "value"
9
- * }
6
+ * fileKey: "fileKey"
10
7
  * }
11
8
  */
12
- export interface DeletePagesRequest {
9
+ export interface DownloadAttachmentsRequest {
13
10
  docId: string;
14
11
  layerName: string;
12
+ /** The embedded file's name-tree key (its `ref.key`), token-text encoded, as `fieldKey` is. */
13
+ fileKey: string;
15
14
  /** Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. */
16
15
  "X-Document-Password"?: string;
17
- /** Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. */
18
- "Idempotency-Key"?: string;
19
- body: CloudPDF.DocPagesDeleteRequest;
20
16
  }
@@ -1,18 +1,13 @@
1
- import type * as core from "../../../../../../../core/index.js";
2
1
  /**
3
2
  * @example
4
3
  * {
5
- * file: fs.createReadStream("/path/to/your/file"),
6
4
  * docId: "docId",
7
5
  * layerName: "layerName"
8
6
  * }
9
7
  */
10
- export interface InsertPagesRequest {
8
+ export interface ListAttachmentsRequest {
11
9
  docId: string;
12
10
  layerName: string;
13
11
  /** Base64-encoded password for an encrypted document. Valid only with the API token (403 anywhere else). An encrypted document answers 422 DocPasswordRequired when the header is absent. Viewer doc JWTs use the SDK password-session flow instead. */
14
12
  "X-Document-Password"?: string;
15
- /** Names the change: 1 to 255 printable ASCII characters. A retry under the same key on the same layer answers with what the first request committed, and changes nothing. */
16
- "Idempotency-Key"?: string;
17
- file: core.file.Uploadable;
18
13
  }
@@ -0,0 +1,2 @@
1
+ export type { DownloadAttachmentsRequest } from "./DownloadAttachmentsRequest.js";
2
+ export type { ListAttachmentsRequest } from "./ListAttachmentsRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { AttachmentsClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.AttachmentsClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "AttachmentsClient", { enumerable: true, get: function () { return Client_js_1.AttachmentsClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1 @@
1
+ export * from "./client/index.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("./client/index.js"), exports);
@@ -1,9 +1,13 @@
1
1
  export * from "./annotations/client/requests/index.js";
2
2
  export * as annotations from "./annotations/index.js";
3
+ export * from "./attachments/client/requests/index.js";
4
+ export * as attachments from "./attachments/index.js";
3
5
  export * from "./forms/client/requests/index.js";
4
6
  export * as forms from "./forms/index.js";
5
7
  export * from "./metadata/client/requests/index.js";
6
8
  export * as metadata from "./metadata/index.js";
9
+ export * from "./outline/client/requests/index.js";
10
+ export * as outline from "./outline/index.js";
7
11
  export * from "./pages/client/requests/index.js";
8
12
  export * as pages from "./pages/index.js";
9
13
  export * from "./redactions/client/requests/index.js";
@@ -36,13 +36,17 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  };
37
37
  })();
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.versions = exports.signatures = exports.redactions = exports.pages = exports.metadata = exports.forms = exports.annotations = void 0;
39
+ exports.versions = exports.signatures = exports.redactions = exports.pages = exports.outline = exports.metadata = exports.forms = exports.attachments = exports.annotations = void 0;
40
40
  __exportStar(require("./annotations/client/requests/index.js"), exports);
41
41
  exports.annotations = __importStar(require("./annotations/index.js"));
42
+ __exportStar(require("./attachments/client/requests/index.js"), exports);
43
+ exports.attachments = __importStar(require("./attachments/index.js"));
42
44
  __exportStar(require("./forms/client/requests/index.js"), exports);
43
45
  exports.forms = __importStar(require("./forms/index.js"));
44
46
  __exportStar(require("./metadata/client/requests/index.js"), exports);
45
47
  exports.metadata = __importStar(require("./metadata/index.js"));
48
+ __exportStar(require("./outline/client/requests/index.js"), exports);
49
+ exports.outline = __importStar(require("./outline/index.js"));
46
50
  __exportStar(require("./pages/client/requests/index.js"), exports);
47
51
  exports.pages = __importStar(require("./pages/index.js"));
48
52
  __exportStar(require("./redactions/client/requests/index.js"), exports);