@cloudpdf/sdk 3.0.0-next.1 → 3.0.0-next.2

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 (281) hide show
  1. package/README.md +23 -46
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +3 -0
  4. package/dist/cjs/Client.js +9 -4
  5. package/dist/cjs/CloudPDFClient.d.ts +20 -0
  6. package/dist/cjs/CloudPDFClient.js +39 -0
  7. package/dist/cjs/api/errors/ConflictError.d.ts +7 -0
  8. package/dist/cjs/api/errors/ConflictError.js +54 -0
  9. package/dist/cjs/api/errors/GoneError.d.ts +7 -0
  10. package/dist/cjs/api/errors/GoneError.js +54 -0
  11. package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +7 -0
  12. package/dist/cjs/api/errors/UnprocessableEntityError.js +54 -0
  13. package/dist/cjs/api/errors/index.d.ts +3 -0
  14. package/dist/cjs/api/errors/index.js +3 -0
  15. package/dist/cjs/api/resources/documents/client/Client.d.ts +14 -5
  16. package/dist/cjs/api/resources/documents/client/Client.js +26 -14
  17. package/dist/cjs/api/resources/documents/client/requests/DocumentsInitRequest.d.ts +7 -0
  18. package/dist/cjs/api/resources/documents/client/requests/DocumentsInitRequest.js +5 -0
  19. package/dist/cjs/api/resources/documents/client/requests/UploadProxyDocumentsRequest.d.ts +14 -0
  20. package/dist/cjs/api/resources/documents/client/requests/index.d.ts +1 -0
  21. package/dist/cjs/api/resources/index.d.ts +2 -0
  22. package/dist/cjs/api/resources/index.js +3 -1
  23. package/dist/cjs/api/resources/shares/client/Client.d.ts +119 -0
  24. package/dist/cjs/api/resources/shares/client/Client.js +422 -0
  25. package/dist/cjs/api/resources/shares/client/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/shares/client/index.js +17 -0
  27. package/dist/cjs/api/resources/shares/client/requests/DeleteSharesRequest.d.ts +11 -0
  28. package/dist/cjs/api/resources/shares/client/requests/GetSharesRequest.d.ts +11 -0
  29. package/dist/cjs/api/resources/shares/client/requests/GetSharesRequest.js +3 -0
  30. package/dist/cjs/api/resources/shares/client/requests/ListSharesRequest.d.ts +12 -0
  31. package/dist/cjs/api/resources/shares/client/requests/ListSharesRequest.js +3 -0
  32. package/dist/cjs/api/resources/shares/client/requests/SharesCreateRequest.d.ts +18 -0
  33. package/dist/cjs/api/resources/shares/client/requests/SharesCreateRequest.js +3 -0
  34. package/dist/cjs/api/resources/shares/client/requests/SharesExchangeRequest.d.ts +10 -0
  35. package/dist/cjs/api/resources/shares/client/requests/SharesExchangeRequest.js +3 -0
  36. package/dist/cjs/api/resources/shares/client/requests/SharesUpdateRequest.d.ts +17 -0
  37. package/dist/cjs/api/resources/shares/client/requests/SharesUpdateRequest.js +3 -0
  38. package/dist/cjs/api/resources/shares/client/requests/index.d.ts +6 -0
  39. package/dist/cjs/api/resources/shares/client/requests/index.js +2 -0
  40. package/dist/cjs/api/resources/shares/exports.d.ts +2 -0
  41. package/dist/cjs/api/resources/shares/exports.js +21 -0
  42. package/dist/cjs/api/resources/shares/index.d.ts +1 -0
  43. package/dist/cjs/api/resources/shares/index.js +17 -0
  44. package/dist/cjs/api/resources/tenants/client/Client.d.ts +50 -0
  45. package/dist/cjs/api/resources/tenants/client/Client.js +181 -0
  46. package/dist/cjs/api/resources/tenants/client/requests/ResumeTenantsRequest.d.ts +9 -0
  47. package/dist/cjs/api/resources/tenants/client/requests/ResumeTenantsRequest.js +3 -0
  48. package/dist/cjs/api/resources/tenants/client/requests/TenantsSuspendRequest.d.ts +10 -0
  49. package/dist/cjs/api/resources/tenants/client/requests/TenantsSuspendRequest.js +3 -0
  50. package/dist/cjs/api/resources/tenants/client/requests/UsageTenantsRequest.d.ts +10 -0
  51. package/dist/cjs/api/resources/tenants/client/requests/UsageTenantsRequest.js +3 -0
  52. package/dist/cjs/api/resources/tenants/client/requests/index.d.ts +3 -0
  53. package/dist/cjs/api/types/DocumentsInit200ResponseCreatedUpload.d.ts +3 -3
  54. package/dist/cjs/api/types/DocumentsInit200ResponseResumedUpload.d.ts +3 -3
  55. package/dist/cjs/api/types/DocumentsUploadProxy200Response.d.ts +3 -0
  56. package/dist/cjs/api/types/DocumentsUploadProxy200Response.js +3 -0
  57. package/dist/cjs/api/types/DocumentsUploadProxy400Response.d.ts +9 -0
  58. package/dist/cjs/api/types/DocumentsUploadProxy400Response.js +3 -0
  59. package/dist/cjs/api/types/DocumentsUploadProxy409Response.d.ts +9 -0
  60. package/dist/cjs/api/types/DocumentsUploadProxy409Response.js +3 -0
  61. package/dist/cjs/api/types/SharesCreate200Response.d.ts +22 -0
  62. package/dist/cjs/api/types/SharesCreate200Response.js +3 -0
  63. package/dist/cjs/api/types/SharesCreate400Response.d.ts +9 -0
  64. package/dist/cjs/api/types/SharesCreate400Response.js +3 -0
  65. package/dist/cjs/api/types/SharesCreate403Response.d.ts +9 -0
  66. package/dist/cjs/api/types/SharesCreate403Response.js +3 -0
  67. package/dist/cjs/api/types/SharesCreate404Response.d.ts +9 -0
  68. package/dist/cjs/api/types/SharesCreate404Response.js +3 -0
  69. package/dist/cjs/api/types/SharesDeleteResponse.d.ts +9 -0
  70. package/dist/cjs/api/types/SharesDeleteResponse.js +3 -0
  71. package/dist/cjs/api/types/SharesExchange200Response.d.ts +6 -0
  72. package/dist/cjs/api/types/SharesExchange200Response.js +3 -0
  73. package/dist/cjs/api/types/SharesExchange400Response.d.ts +9 -0
  74. package/dist/cjs/api/types/SharesExchange400Response.js +3 -0
  75. package/dist/cjs/api/types/SharesExchange403Response.d.ts +9 -0
  76. package/dist/cjs/api/types/SharesExchange403Response.js +3 -0
  77. package/dist/cjs/api/types/SharesExchange404Response.d.ts +9 -0
  78. package/dist/cjs/api/types/SharesExchange404Response.js +3 -0
  79. package/dist/cjs/api/types/SharesExchange410Response.d.ts +9 -0
  80. package/dist/cjs/api/types/SharesExchange410Response.js +3 -0
  81. package/dist/cjs/api/types/SharesExchange422Response.d.ts +9 -0
  82. package/dist/cjs/api/types/SharesExchange422Response.js +3 -0
  83. package/dist/cjs/api/types/SharesGet200Response.d.ts +22 -0
  84. package/dist/cjs/api/types/SharesGet200Response.js +3 -0
  85. package/dist/cjs/api/types/SharesGet404Response.d.ts +9 -0
  86. package/dist/cjs/api/types/SharesGet404Response.js +3 -0
  87. package/dist/cjs/api/types/SharesList200Response.d.ts +26 -0
  88. package/dist/cjs/api/types/SharesList200Response.js +3 -0
  89. package/dist/cjs/api/types/SharesList400Response.d.ts +9 -0
  90. package/dist/cjs/api/types/SharesList400Response.js +3 -0
  91. package/dist/cjs/api/types/SharesUpdate200Response.d.ts +22 -0
  92. package/dist/cjs/api/types/SharesUpdate200Response.js +3 -0
  93. package/dist/cjs/api/types/SharesUpdate400Response.d.ts +9 -0
  94. package/dist/cjs/api/types/SharesUpdate400Response.js +3 -0
  95. package/dist/cjs/api/types/SharesUpdate404Response.d.ts +9 -0
  96. package/dist/cjs/api/types/SharesUpdate404Response.js +3 -0
  97. package/dist/cjs/api/types/TenantsCreate200Response.d.ts +8 -0
  98. package/dist/cjs/api/types/TenantsCreate200Response.js +11 -0
  99. package/dist/cjs/api/types/TenantsGet200Response.d.ts +8 -0
  100. package/dist/cjs/api/types/TenantsGet200Response.js +11 -0
  101. package/dist/cjs/api/types/TenantsList200Response.d.ts +8 -0
  102. package/dist/cjs/api/types/TenantsList200Response.js +14 -0
  103. package/dist/cjs/api/types/TenantsResumeResponse.d.ts +9 -0
  104. package/dist/cjs/api/types/TenantsResumeResponse.js +3 -0
  105. package/dist/cjs/api/types/TenantsSuspendResponse.d.ts +9 -0
  106. package/dist/cjs/api/types/TenantsSuspendResponse.js +3 -0
  107. package/dist/cjs/api/types/TenantsUsage200Response.d.ts +13 -0
  108. package/dist/cjs/api/types/TenantsUsage200Response.js +3 -0
  109. package/dist/cjs/api/types/TenantsUsage400Response.d.ts +9 -0
  110. package/dist/cjs/api/types/TenantsUsage400Response.js +3 -0
  111. package/dist/cjs/api/types/TenantsUsage404Response.d.ts +9 -0
  112. package/dist/cjs/api/types/TenantsUsage404Response.js +3 -0
  113. package/dist/cjs/api/types/TokensIssueRequest.d.ts +2 -1
  114. package/dist/cjs/api/types/index.d.ts +26 -2
  115. package/dist/cjs/api/types/index.js +26 -2
  116. package/dist/cjs/auth/BearerAuthProvider.d.ts +1 -1
  117. package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +15 -0
  118. package/dist/cjs/core/form-data-utils/FormDataWrapper.js +188 -0
  119. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  120. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +12 -0
  121. package/dist/cjs/core/form-data-utils/index.d.ts +2 -0
  122. package/dist/cjs/core/form-data-utils/index.js +20 -0
  123. package/dist/cjs/core/index.d.ts +1 -0
  124. package/dist/cjs/core/index.js +1 -0
  125. package/dist/cjs/index.d.ts +3 -1
  126. package/dist/cjs/index.js +5 -2
  127. package/dist/cjs/uploads/Uploads.d.ts +7 -0
  128. package/dist/cjs/uploads/Uploads.js +78 -0
  129. package/dist/cjs/uploads/index.d.ts +2 -0
  130. package/dist/cjs/uploads/index.js +5 -0
  131. package/dist/cjs/uploads/source.d.ts +10 -0
  132. package/dist/cjs/uploads/source.js +155 -0
  133. package/dist/cjs/uploads/types.d.ts +46 -0
  134. package/dist/cjs/uploads/types.js +2 -0
  135. package/dist/cjs/version.d.ts +1 -1
  136. package/dist/cjs/version.js +1 -1
  137. package/dist/esm/BaseClient.mjs +2 -2
  138. package/dist/esm/Client.d.mts +3 -0
  139. package/dist/esm/Client.mjs +5 -0
  140. package/dist/esm/CloudPDFClient.d.mts +20 -0
  141. package/dist/esm/CloudPDFClient.mjs +35 -0
  142. package/dist/esm/api/errors/ConflictError.d.mts +7 -0
  143. package/dist/esm/api/errors/ConflictError.mjs +17 -0
  144. package/dist/esm/api/errors/GoneError.d.mts +7 -0
  145. package/dist/esm/api/errors/GoneError.mjs +17 -0
  146. package/dist/esm/api/errors/UnprocessableEntityError.d.mts +7 -0
  147. package/dist/esm/api/errors/UnprocessableEntityError.mjs +17 -0
  148. package/dist/esm/api/errors/index.d.mts +3 -0
  149. package/dist/esm/api/errors/index.mjs +3 -0
  150. package/dist/esm/api/resources/documents/client/Client.d.mts +14 -5
  151. package/dist/esm/api/resources/documents/client/Client.mjs +27 -15
  152. package/dist/esm/api/resources/documents/client/requests/DocumentsInitRequest.d.mts +7 -0
  153. package/dist/esm/api/resources/documents/client/requests/DocumentsInitRequest.mjs +5 -0
  154. package/dist/esm/api/resources/documents/client/requests/UploadProxyDocumentsRequest.d.mts +14 -0
  155. package/dist/esm/api/resources/documents/client/requests/index.d.mts +1 -0
  156. package/dist/esm/api/resources/index.d.mts +2 -0
  157. package/dist/esm/api/resources/index.mjs +2 -0
  158. package/dist/esm/api/resources/shares/client/Client.d.mts +119 -0
  159. package/dist/esm/api/resources/shares/client/Client.mjs +385 -0
  160. package/dist/esm/api/resources/shares/client/index.d.mts +1 -0
  161. package/dist/esm/api/resources/shares/client/index.mjs +1 -0
  162. package/dist/esm/api/resources/shares/client/requests/DeleteSharesRequest.d.mts +11 -0
  163. package/dist/esm/api/resources/shares/client/requests/GetSharesRequest.d.mts +11 -0
  164. package/dist/esm/api/resources/shares/client/requests/GetSharesRequest.mjs +2 -0
  165. package/dist/esm/api/resources/shares/client/requests/ListSharesRequest.d.mts +12 -0
  166. package/dist/esm/api/resources/shares/client/requests/ListSharesRequest.mjs +2 -0
  167. package/dist/esm/api/resources/shares/client/requests/SharesCreateRequest.d.mts +18 -0
  168. package/dist/esm/api/resources/shares/client/requests/SharesCreateRequest.mjs +2 -0
  169. package/dist/esm/api/resources/shares/client/requests/SharesExchangeRequest.d.mts +10 -0
  170. package/dist/esm/api/resources/shares/client/requests/SharesExchangeRequest.mjs +2 -0
  171. package/dist/esm/api/resources/shares/client/requests/SharesUpdateRequest.d.mts +17 -0
  172. package/dist/esm/api/resources/shares/client/requests/SharesUpdateRequest.mjs +2 -0
  173. package/dist/esm/api/resources/shares/client/requests/index.d.mts +6 -0
  174. package/dist/esm/api/resources/shares/client/requests/index.mjs +1 -0
  175. package/dist/esm/api/resources/shares/exports.d.mts +2 -0
  176. package/dist/esm/api/resources/shares/exports.mjs +3 -0
  177. package/dist/esm/api/resources/shares/index.d.mts +1 -0
  178. package/dist/esm/api/resources/shares/index.mjs +1 -0
  179. package/dist/esm/api/resources/tenants/client/Client.d.mts +50 -0
  180. package/dist/esm/api/resources/tenants/client/Client.mjs +181 -0
  181. package/dist/esm/api/resources/tenants/client/requests/ResumeTenantsRequest.d.mts +9 -0
  182. package/dist/esm/api/resources/tenants/client/requests/ResumeTenantsRequest.mjs +2 -0
  183. package/dist/esm/api/resources/tenants/client/requests/TenantsSuspendRequest.d.mts +10 -0
  184. package/dist/esm/api/resources/tenants/client/requests/TenantsSuspendRequest.mjs +2 -0
  185. package/dist/esm/api/resources/tenants/client/requests/UsageTenantsRequest.d.mts +10 -0
  186. package/dist/esm/api/resources/tenants/client/requests/UsageTenantsRequest.mjs +2 -0
  187. package/dist/esm/api/resources/tenants/client/requests/index.d.mts +3 -0
  188. package/dist/esm/api/types/DocumentsInit200ResponseCreatedUpload.d.mts +3 -3
  189. package/dist/esm/api/types/DocumentsInit200ResponseResumedUpload.d.mts +3 -3
  190. package/dist/esm/api/types/DocumentsUploadProxy200Response.d.mts +3 -0
  191. package/dist/esm/api/types/DocumentsUploadProxy200Response.mjs +2 -0
  192. package/dist/esm/api/types/DocumentsUploadProxy400Response.d.mts +9 -0
  193. package/dist/esm/api/types/DocumentsUploadProxy400Response.mjs +2 -0
  194. package/dist/esm/api/types/DocumentsUploadProxy409Response.d.mts +9 -0
  195. package/dist/esm/api/types/DocumentsUploadProxy409Response.mjs +2 -0
  196. package/dist/esm/api/types/SharesCreate200Response.d.mts +22 -0
  197. package/dist/esm/api/types/SharesCreate200Response.mjs +2 -0
  198. package/dist/esm/api/types/SharesCreate400Response.d.mts +9 -0
  199. package/dist/esm/api/types/SharesCreate400Response.mjs +2 -0
  200. package/dist/esm/api/types/SharesCreate403Response.d.mts +9 -0
  201. package/dist/esm/api/types/SharesCreate403Response.mjs +2 -0
  202. package/dist/esm/api/types/SharesCreate404Response.d.mts +9 -0
  203. package/dist/esm/api/types/SharesCreate404Response.mjs +2 -0
  204. package/dist/esm/api/types/SharesDeleteResponse.d.mts +9 -0
  205. package/dist/esm/api/types/SharesDeleteResponse.mjs +2 -0
  206. package/dist/esm/api/types/SharesExchange200Response.d.mts +6 -0
  207. package/dist/esm/api/types/SharesExchange200Response.mjs +2 -0
  208. package/dist/esm/api/types/SharesExchange400Response.d.mts +9 -0
  209. package/dist/esm/api/types/SharesExchange400Response.mjs +2 -0
  210. package/dist/esm/api/types/SharesExchange403Response.d.mts +9 -0
  211. package/dist/esm/api/types/SharesExchange403Response.mjs +2 -0
  212. package/dist/esm/api/types/SharesExchange404Response.d.mts +9 -0
  213. package/dist/esm/api/types/SharesExchange404Response.mjs +2 -0
  214. package/dist/esm/api/types/SharesExchange410Response.d.mts +9 -0
  215. package/dist/esm/api/types/SharesExchange410Response.mjs +2 -0
  216. package/dist/esm/api/types/SharesExchange422Response.d.mts +9 -0
  217. package/dist/esm/api/types/SharesExchange422Response.mjs +2 -0
  218. package/dist/esm/api/types/SharesGet200Response.d.mts +22 -0
  219. package/dist/esm/api/types/SharesGet200Response.mjs +2 -0
  220. package/dist/esm/api/types/SharesGet404Response.d.mts +9 -0
  221. package/dist/esm/api/types/SharesGet404Response.mjs +2 -0
  222. package/dist/esm/api/types/SharesList200Response.d.mts +26 -0
  223. package/dist/esm/api/types/SharesList200Response.mjs +2 -0
  224. package/dist/esm/api/types/SharesList400Response.d.mts +9 -0
  225. package/dist/esm/api/types/SharesList400Response.mjs +2 -0
  226. package/dist/esm/api/types/SharesUpdate200Response.d.mts +22 -0
  227. package/dist/esm/api/types/SharesUpdate200Response.mjs +2 -0
  228. package/dist/esm/api/types/SharesUpdate400Response.d.mts +9 -0
  229. package/dist/esm/api/types/SharesUpdate400Response.mjs +2 -0
  230. package/dist/esm/api/types/SharesUpdate404Response.d.mts +9 -0
  231. package/dist/esm/api/types/SharesUpdate404Response.mjs +2 -0
  232. package/dist/esm/api/types/TenantsCreate200Response.d.mts +8 -0
  233. package/dist/esm/api/types/TenantsCreate200Response.mjs +10 -1
  234. package/dist/esm/api/types/TenantsGet200Response.d.mts +8 -0
  235. package/dist/esm/api/types/TenantsGet200Response.mjs +10 -1
  236. package/dist/esm/api/types/TenantsList200Response.d.mts +8 -0
  237. package/dist/esm/api/types/TenantsList200Response.mjs +13 -1
  238. package/dist/esm/api/types/TenantsResumeResponse.d.mts +9 -0
  239. package/dist/esm/api/types/TenantsResumeResponse.mjs +2 -0
  240. package/dist/esm/api/types/TenantsSuspendResponse.d.mts +9 -0
  241. package/dist/esm/api/types/TenantsSuspendResponse.mjs +2 -0
  242. package/dist/esm/api/types/TenantsUsage200Response.d.mts +13 -0
  243. package/dist/esm/api/types/TenantsUsage200Response.mjs +2 -0
  244. package/dist/esm/api/types/TenantsUsage400Response.d.mts +9 -0
  245. package/dist/esm/api/types/TenantsUsage400Response.mjs +2 -0
  246. package/dist/esm/api/types/TenantsUsage404Response.d.mts +9 -0
  247. package/dist/esm/api/types/TenantsUsage404Response.mjs +2 -0
  248. package/dist/esm/api/types/TokensIssueRequest.d.mts +2 -1
  249. package/dist/esm/api/types/index.d.mts +26 -2
  250. package/dist/esm/api/types/index.mjs +26 -2
  251. package/dist/esm/auth/BearerAuthProvider.d.mts +1 -1
  252. package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +15 -0
  253. package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +150 -0
  254. package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +1 -0
  255. package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +9 -0
  256. package/dist/esm/core/form-data-utils/index.d.mts +2 -0
  257. package/dist/esm/core/form-data-utils/index.mjs +2 -0
  258. package/dist/esm/core/index.d.mts +1 -0
  259. package/dist/esm/core/index.mjs +1 -0
  260. package/dist/esm/index.d.mts +3 -1
  261. package/dist/esm/index.mjs +3 -1
  262. package/dist/esm/uploads/Uploads.d.mts +7 -0
  263. package/dist/esm/uploads/Uploads.mjs +74 -0
  264. package/dist/esm/uploads/index.d.mts +2 -0
  265. package/dist/esm/uploads/index.mjs +1 -0
  266. package/dist/esm/uploads/source.d.mts +10 -0
  267. package/dist/esm/uploads/source.mjs +119 -0
  268. package/dist/esm/uploads/types.d.mts +46 -0
  269. package/dist/esm/uploads/types.mjs +1 -0
  270. package/dist/esm/version.d.mts +1 -1
  271. package/dist/esm/version.mjs +1 -1
  272. package/package.json +188 -177
  273. package/reference.md +588 -0
  274. package/dist/cjs/api/types/DocumentsUploadDirect200Response.d.ts +0 -3
  275. package/dist/cjs/api/types/DocumentsUploadDirect400Response.d.ts +0 -9
  276. package/dist/esm/api/types/DocumentsUploadDirect200Response.d.mts +0 -3
  277. package/dist/esm/api/types/DocumentsUploadDirect400Response.d.mts +0 -9
  278. /package/dist/cjs/api/{types/DocumentsUploadDirect200Response.js → resources/documents/client/requests/UploadProxyDocumentsRequest.js} +0 -0
  279. /package/dist/cjs/api/{types/DocumentsUploadDirect400Response.js → resources/shares/client/requests/DeleteSharesRequest.js} +0 -0
  280. /package/dist/esm/api/{types/DocumentsUploadDirect200Response.mjs → resources/documents/client/requests/UploadProxyDocumentsRequest.mjs} +0 -0
  281. /package/dist/esm/api/{types/DocumentsUploadDirect400Response.mjs → resources/shares/client/requests/DeleteSharesRequest.mjs} +0 -0
@@ -36,13 +36,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.tokens = exports.tenants = exports.documents = exports.doc = exports.deployment = void 0;
39
+ exports.tokens = exports.tenants = exports.shares = exports.documents = exports.doc = exports.deployment = void 0;
40
40
  exports.deployment = __importStar(require("./deployment/index.js"));
41
41
  __exportStar(require("./doc/client/requests/index.js"), exports);
42
42
  exports.doc = __importStar(require("./doc/index.js"));
43
43
  __exportStar(require("./documents/client/requests/index.js"), exports);
44
44
  exports.documents = __importStar(require("./documents/index.js"));
45
45
  __exportStar(require("./documents/types/index.js"), exports);
46
+ __exportStar(require("./shares/client/requests/index.js"), exports);
47
+ exports.shares = __importStar(require("./shares/index.js"));
46
48
  __exportStar(require("./tenants/client/requests/index.js"), exports);
47
49
  exports.tenants = __importStar(require("./tenants/index.js"));
48
50
  __exportStar(require("./tokens/client/requests/index.js"), exports);
@@ -0,0 +1,119 @@
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 SharesClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class SharesClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<SharesClient.Options>;
12
+ constructor(options: SharesClient.Options);
13
+ /**
14
+ * Unauthenticated, but requires a browser Origin header, checked against the grant allowlist. Unknown, revoked, and disabled tokens are indistinguishable (404). Passphrase-protected grants return 422 SharePasswordRequired until `password` is supplied. Mounted only when the deployment can sign (HS256 mode).
15
+ *
16
+ * @param {CloudPDF.SharesExchangeRequest} request
17
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link CloudPDF.BadRequestError}
20
+ * @throws {@link CloudPDF.ForbiddenError}
21
+ * @throws {@link CloudPDF.NotFoundError}
22
+ * @throws {@link CloudPDF.GoneError}
23
+ * @throws {@link CloudPDF.UnprocessableEntityError}
24
+ * @throws {@link errors.CloudPDFError}
25
+ * @throws {@link errors.CloudPDFTimeoutError}
26
+ *
27
+ * @example
28
+ * await client.shares.exchange({
29
+ * shareToken: "shareToken"
30
+ * })
31
+ */
32
+ exchange(request: CloudPDF.SharesExchangeRequest, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<CloudPDF.SharesExchange200Response>;
33
+ private __exchange;
34
+ /**
35
+ * @param {CloudPDF.ListSharesRequest} request
36
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
37
+ *
38
+ * @throws {@link CloudPDF.BadRequestError}
39
+ * @throws {@link errors.CloudPDFError}
40
+ * @throws {@link errors.CloudPDFTimeoutError}
41
+ *
42
+ * @example
43
+ * await client.shares.list({
44
+ * tenantId: "tenantId"
45
+ * })
46
+ */
47
+ list(request: CloudPDF.ListSharesRequest, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<CloudPDF.SharesList200Response>;
48
+ private __list;
49
+ /**
50
+ * The returned share id IS the public share token. Mounted only when the deployment can sign (HS256 mode) — exchange mints session JWTs, so grants exist only where minting does.
51
+ *
52
+ * @param {CloudPDF.SharesCreateRequest} request
53
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
54
+ *
55
+ * @throws {@link CloudPDF.BadRequestError}
56
+ * @throws {@link CloudPDF.ForbiddenError}
57
+ * @throws {@link CloudPDF.NotFoundError}
58
+ * @throws {@link errors.CloudPDFError}
59
+ * @throws {@link errors.CloudPDFTimeoutError}
60
+ *
61
+ * @example
62
+ * await client.shares.create({
63
+ * tenantId: "tenantId",
64
+ * docId: "docId",
65
+ * scope: ["scope"]
66
+ * })
67
+ */
68
+ create(request: CloudPDF.SharesCreateRequest, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<CloudPDF.SharesCreate200Response>;
69
+ private __create;
70
+ /**
71
+ * @param {CloudPDF.GetSharesRequest} request
72
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
73
+ *
74
+ * @throws {@link CloudPDF.NotFoundError}
75
+ * @throws {@link errors.CloudPDFError}
76
+ * @throws {@link errors.CloudPDFTimeoutError}
77
+ *
78
+ * @example
79
+ * await client.shares.get({
80
+ * tenantId: "tenantId",
81
+ * shareId: "shareId"
82
+ * })
83
+ */
84
+ get(request: CloudPDF.GetSharesRequest, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<CloudPDF.SharesGet200Response>;
85
+ private __get;
86
+ /**
87
+ * @param {CloudPDF.DeleteSharesRequest} request
88
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
89
+ *
90
+ * @throws {@link CloudPDF.NotFoundError}
91
+ * @throws {@link errors.CloudPDFError}
92
+ * @throws {@link errors.CloudPDFTimeoutError}
93
+ *
94
+ * @example
95
+ * await client.shares.delete({
96
+ * tenantId: "tenantId",
97
+ * shareId: "shareId"
98
+ * })
99
+ */
100
+ delete(request: CloudPDF.DeleteSharesRequest, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<void>;
101
+ private __delete;
102
+ /**
103
+ * @param {CloudPDF.SharesUpdateRequest} request
104
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
105
+ *
106
+ * @throws {@link CloudPDF.BadRequestError}
107
+ * @throws {@link CloudPDF.NotFoundError}
108
+ * @throws {@link errors.CloudPDFError}
109
+ * @throws {@link errors.CloudPDFTimeoutError}
110
+ *
111
+ * @example
112
+ * await client.shares.update({
113
+ * tenantId: "tenantId",
114
+ * shareId: "shareId"
115
+ * })
116
+ */
117
+ update(request: CloudPDF.SharesUpdateRequest, requestOptions?: SharesClient.RequestOptions): core.HttpResponsePromise<CloudPDF.SharesUpdate200Response>;
118
+ private __update;
119
+ }
@@ -0,0 +1,422 @@
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
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.SharesClient = void 0;
58
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
59
+ const headers_js_1 = require("../../../../core/headers.js");
60
+ const core = __importStar(require("../../../../core/index.js"));
61
+ const requestBody_js_1 = require("../../../../core/requestBody.js");
62
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
63
+ const errors = __importStar(require("../../../../errors/index.js"));
64
+ const CloudPDF = __importStar(require("../../../index.js"));
65
+ class SharesClient {
66
+ constructor(options) {
67
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
+ }
69
+ /**
70
+ * Unauthenticated, but requires a browser Origin header, checked against the grant allowlist. Unknown, revoked, and disabled tokens are indistinguishable (404). Passphrase-protected grants return 422 SharePasswordRequired until `password` is supplied. Mounted only when the deployment can sign (HS256 mode).
71
+ *
72
+ * @param {CloudPDF.SharesExchangeRequest} request
73
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
74
+ *
75
+ * @throws {@link CloudPDF.BadRequestError}
76
+ * @throws {@link CloudPDF.ForbiddenError}
77
+ * @throws {@link CloudPDF.NotFoundError}
78
+ * @throws {@link CloudPDF.GoneError}
79
+ * @throws {@link CloudPDF.UnprocessableEntityError}
80
+ * @throws {@link errors.CloudPDFError}
81
+ * @throws {@link errors.CloudPDFTimeoutError}
82
+ *
83
+ * @example
84
+ * await client.shares.exchange({
85
+ * shareToken: "shareToken"
86
+ * })
87
+ */
88
+ exchange(request, requestOptions) {
89
+ return core.HttpResponsePromise.fromPromise(this.__exchange(request, requestOptions));
90
+ }
91
+ __exchange(request, requestOptions) {
92
+ return __awaiter(this, void 0, void 0, function* () {
93
+ var _a, _b, _c, _d, _e, _f, _g, _h;
94
+ const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
95
+ const _response = yield core.fetcher({
96
+ 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/share-sessions"),
97
+ method: "POST",
98
+ headers: _headers,
99
+ contentType: "application/json",
100
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
101
+ requestType: "json",
102
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
103
+ 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,
104
+ 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,
105
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
106
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
107
+ logging: this._options.logging,
108
+ });
109
+ if (_response.ok) {
110
+ return { data: _response.body, rawResponse: _response.rawResponse };
111
+ }
112
+ if (_response.error.reason === "status-code") {
113
+ switch (_response.error.statusCode) {
114
+ case 400:
115
+ throw new CloudPDF.BadRequestError(_response.error.body, _response.rawResponse);
116
+ case 403:
117
+ throw new CloudPDF.ForbiddenError(_response.error.body, _response.rawResponse);
118
+ case 404:
119
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
120
+ case 410:
121
+ throw new CloudPDF.GoneError(_response.error.body, _response.rawResponse);
122
+ case 422:
123
+ throw new CloudPDF.UnprocessableEntityError(_response.error.body, _response.rawResponse);
124
+ default:
125
+ throw new errors.CloudPDFError({
126
+ statusCode: _response.error.statusCode,
127
+ body: _response.error.body,
128
+ rawResponse: _response.rawResponse,
129
+ });
130
+ }
131
+ }
132
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/share-sessions");
133
+ });
134
+ }
135
+ /**
136
+ * @param {CloudPDF.ListSharesRequest} request
137
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
138
+ *
139
+ * @throws {@link CloudPDF.BadRequestError}
140
+ * @throws {@link errors.CloudPDFError}
141
+ * @throws {@link errors.CloudPDFTimeoutError}
142
+ *
143
+ * @example
144
+ * await client.shares.list({
145
+ * tenantId: "tenantId"
146
+ * })
147
+ */
148
+ list(request, requestOptions) {
149
+ return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
150
+ }
151
+ __list(request, requestOptions) {
152
+ return __awaiter(this, void 0, void 0, function* () {
153
+ var _a, _b, _c, _d, _e, _f, _g, _h;
154
+ const { tenantId, limit, cursor, docId } = request;
155
+ const _queryParams = {
156
+ limit,
157
+ cursor,
158
+ docId,
159
+ };
160
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
161
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
162
+ const _response = yield core.fetcher({
163
+ 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/tenants/${core.url.encodePathParam(tenantId)}/shares`),
164
+ method: "GET",
165
+ headers: _headers,
166
+ queryString: core.url
167
+ .queryBuilder()
168
+ .addMany(_queryParams)
169
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
170
+ .build(),
171
+ 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,
172
+ 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,
173
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
174
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
175
+ logging: this._options.logging,
176
+ });
177
+ if (_response.ok) {
178
+ return { data: _response.body, rawResponse: _response.rawResponse };
179
+ }
180
+ if (_response.error.reason === "status-code") {
181
+ switch (_response.error.statusCode) {
182
+ case 400:
183
+ throw new CloudPDF.BadRequestError(_response.error.body, _response.rawResponse);
184
+ default:
185
+ throw new errors.CloudPDFError({
186
+ statusCode: _response.error.statusCode,
187
+ body: _response.error.body,
188
+ rawResponse: _response.rawResponse,
189
+ });
190
+ }
191
+ }
192
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/tenants/{tenantId}/shares");
193
+ });
194
+ }
195
+ /**
196
+ * The returned share id IS the public share token. Mounted only when the deployment can sign (HS256 mode) — exchange mints session JWTs, so grants exist only where minting does.
197
+ *
198
+ * @param {CloudPDF.SharesCreateRequest} request
199
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
200
+ *
201
+ * @throws {@link CloudPDF.BadRequestError}
202
+ * @throws {@link CloudPDF.ForbiddenError}
203
+ * @throws {@link CloudPDF.NotFoundError}
204
+ * @throws {@link errors.CloudPDFError}
205
+ * @throws {@link errors.CloudPDFTimeoutError}
206
+ *
207
+ * @example
208
+ * await client.shares.create({
209
+ * tenantId: "tenantId",
210
+ * docId: "docId",
211
+ * scope: ["scope"]
212
+ * })
213
+ */
214
+ create(request, requestOptions) {
215
+ return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
216
+ }
217
+ __create(request, requestOptions) {
218
+ return __awaiter(this, void 0, void 0, function* () {
219
+ var _a, _b, _c, _d, _e, _f, _g, _h;
220
+ const { tenantId } = request, _body = __rest(request, ["tenantId"]);
221
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
222
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
223
+ const _response = yield core.fetcher({
224
+ 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/tenants/${core.url.encodePathParam(tenantId)}/shares`),
225
+ method: "POST",
226
+ headers: _headers,
227
+ contentType: "application/json",
228
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
229
+ requestType: "json",
230
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
231
+ 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,
232
+ 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,
233
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
234
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
235
+ logging: this._options.logging,
236
+ });
237
+ if (_response.ok) {
238
+ return { data: _response.body, rawResponse: _response.rawResponse };
239
+ }
240
+ if (_response.error.reason === "status-code") {
241
+ switch (_response.error.statusCode) {
242
+ case 400:
243
+ throw new CloudPDF.BadRequestError(_response.error.body, _response.rawResponse);
244
+ case 403:
245
+ throw new CloudPDF.ForbiddenError(_response.error.body, _response.rawResponse);
246
+ case 404:
247
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
248
+ default:
249
+ throw new errors.CloudPDFError({
250
+ statusCode: _response.error.statusCode,
251
+ body: _response.error.body,
252
+ rawResponse: _response.rawResponse,
253
+ });
254
+ }
255
+ }
256
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/tenants/{tenantId}/shares");
257
+ });
258
+ }
259
+ /**
260
+ * @param {CloudPDF.GetSharesRequest} request
261
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
262
+ *
263
+ * @throws {@link CloudPDF.NotFoundError}
264
+ * @throws {@link errors.CloudPDFError}
265
+ * @throws {@link errors.CloudPDFTimeoutError}
266
+ *
267
+ * @example
268
+ * await client.shares.get({
269
+ * tenantId: "tenantId",
270
+ * shareId: "shareId"
271
+ * })
272
+ */
273
+ get(request, requestOptions) {
274
+ return core.HttpResponsePromise.fromPromise(this.__get(request, requestOptions));
275
+ }
276
+ __get(request, requestOptions) {
277
+ return __awaiter(this, void 0, void 0, function* () {
278
+ var _a, _b, _c, _d, _e, _f, _g, _h;
279
+ const { tenantId, shareId } = request;
280
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
281
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
282
+ const _response = yield core.fetcher({
283
+ 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/tenants/${core.url.encodePathParam(tenantId)}/shares/${core.url.encodePathParam(shareId)}`),
284
+ method: "GET",
285
+ headers: _headers,
286
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
287
+ 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,
288
+ 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,
289
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
290
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
291
+ logging: this._options.logging,
292
+ });
293
+ if (_response.ok) {
294
+ return { data: _response.body, rawResponse: _response.rawResponse };
295
+ }
296
+ if (_response.error.reason === "status-code") {
297
+ switch (_response.error.statusCode) {
298
+ case 404:
299
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
300
+ default:
301
+ throw new errors.CloudPDFError({
302
+ statusCode: _response.error.statusCode,
303
+ body: _response.error.body,
304
+ rawResponse: _response.rawResponse,
305
+ });
306
+ }
307
+ }
308
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/tenants/{tenantId}/shares/{shareId}");
309
+ });
310
+ }
311
+ /**
312
+ * @param {CloudPDF.DeleteSharesRequest} request
313
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
314
+ *
315
+ * @throws {@link CloudPDF.NotFoundError}
316
+ * @throws {@link errors.CloudPDFError}
317
+ * @throws {@link errors.CloudPDFTimeoutError}
318
+ *
319
+ * @example
320
+ * await client.shares.delete({
321
+ * tenantId: "tenantId",
322
+ * shareId: "shareId"
323
+ * })
324
+ */
325
+ delete(request, requestOptions) {
326
+ return core.HttpResponsePromise.fromPromise(this.__delete(request, requestOptions));
327
+ }
328
+ __delete(request, requestOptions) {
329
+ return __awaiter(this, void 0, void 0, function* () {
330
+ var _a, _b, _c, _d, _e, _f, _g, _h;
331
+ const { tenantId, shareId } = request;
332
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
333
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
334
+ const _response = yield core.fetcher({
335
+ 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/tenants/${core.url.encodePathParam(tenantId)}/shares/${core.url.encodePathParam(shareId)}`),
336
+ method: "DELETE",
337
+ headers: _headers,
338
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
339
+ 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,
340
+ 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,
341
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
342
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
343
+ logging: this._options.logging,
344
+ });
345
+ if (_response.ok) {
346
+ return { data: undefined, rawResponse: _response.rawResponse };
347
+ }
348
+ if (_response.error.reason === "status-code") {
349
+ switch (_response.error.statusCode) {
350
+ case 404:
351
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
352
+ default:
353
+ throw new errors.CloudPDFError({
354
+ statusCode: _response.error.statusCode,
355
+ body: _response.error.body,
356
+ rawResponse: _response.rawResponse,
357
+ });
358
+ }
359
+ }
360
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v1/tenants/{tenantId}/shares/{shareId}");
361
+ });
362
+ }
363
+ /**
364
+ * @param {CloudPDF.SharesUpdateRequest} request
365
+ * @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
366
+ *
367
+ * @throws {@link CloudPDF.BadRequestError}
368
+ * @throws {@link CloudPDF.NotFoundError}
369
+ * @throws {@link errors.CloudPDFError}
370
+ * @throws {@link errors.CloudPDFTimeoutError}
371
+ *
372
+ * @example
373
+ * await client.shares.update({
374
+ * tenantId: "tenantId",
375
+ * shareId: "shareId"
376
+ * })
377
+ */
378
+ update(request, requestOptions) {
379
+ return core.HttpResponsePromise.fromPromise(this.__update(request, requestOptions));
380
+ }
381
+ __update(request, requestOptions) {
382
+ return __awaiter(this, void 0, void 0, function* () {
383
+ var _a, _b, _c, _d, _e, _f, _g, _h;
384
+ const { tenantId, shareId } = request, _body = __rest(request, ["tenantId", "shareId"]);
385
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
386
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
387
+ const _response = yield core.fetcher({
388
+ 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/tenants/${core.url.encodePathParam(tenantId)}/shares/${core.url.encodePathParam(shareId)}`),
389
+ method: "PATCH",
390
+ headers: _headers,
391
+ contentType: "application/json",
392
+ queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
393
+ requestType: "json",
394
+ body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(_body, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.additionalBodyParameters),
395
+ 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,
396
+ 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,
397
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
398
+ fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
399
+ logging: this._options.logging,
400
+ });
401
+ if (_response.ok) {
402
+ return { data: _response.body, rawResponse: _response.rawResponse };
403
+ }
404
+ if (_response.error.reason === "status-code") {
405
+ switch (_response.error.statusCode) {
406
+ case 400:
407
+ throw new CloudPDF.BadRequestError(_response.error.body, _response.rawResponse);
408
+ case 404:
409
+ throw new CloudPDF.NotFoundError(_response.error.body, _response.rawResponse);
410
+ default:
411
+ throw new errors.CloudPDFError({
412
+ statusCode: _response.error.statusCode,
413
+ body: _response.error.body,
414
+ rawResponse: _response.rawResponse,
415
+ });
416
+ }
417
+ }
418
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v1/tenants/{tenantId}/shares/{shareId}");
419
+ });
420
+ }
421
+ }
422
+ exports.SharesClient = SharesClient;
@@ -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);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * tenantId: "tenantId",
5
+ * shareId: "shareId"
6
+ * }
7
+ */
8
+ export interface DeleteSharesRequest {
9
+ tenantId: string;
10
+ shareId: string;
11
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * tenantId: "tenantId",
5
+ * shareId: "shareId"
6
+ * }
7
+ */
8
+ export interface GetSharesRequest {
9
+ tenantId: string;
10
+ shareId: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * tenantId: "tenantId"
5
+ * }
6
+ */
7
+ export interface ListSharesRequest {
8
+ tenantId: string;
9
+ limit?: number;
10
+ cursor?: string;
11
+ docId?: string;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * tenantId: "tenantId",
5
+ * docId: "docId",
6
+ * scope: ["scope"]
7
+ * }
8
+ */
9
+ export interface SharesCreateRequest {
10
+ tenantId: string;
11
+ docId: string;
12
+ layerName?: string;
13
+ scope: string[];
14
+ origins?: string[];
15
+ password?: string;
16
+ sessionTtlSeconds?: number;
17
+ expiresAt?: number;
18
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });