hcloud-sdk 17.0.0 → 19.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/changelog.md +87 -76
  2. package/lib/Base.d.ts +2 -1
  3. package/lib/Hcloud.d.ts +24 -6
  4. package/lib/Hcloud.js +127 -24
  5. package/lib/helper/ErrorHelper.js +5 -2
  6. package/lib/helper/ValidationHelper.d.ts +14 -4
  7. package/lib/helper/ValidationHelper.js +71 -11
  8. package/lib/interfaces/agent/logging/cloudwatch.d.ts +23 -0
  9. package/lib/interfaces/agent/logging/index.d.ts +2 -0
  10. package/lib/interfaces/{friday → agent/logging}/index.js +2 -3
  11. package/lib/interfaces/agent/logging/log-collector.d.ts +35 -0
  12. package/lib/interfaces/agent/module/index.d.ts +7 -0
  13. package/lib/interfaces/agent/module/index.js +2 -0
  14. package/lib/interfaces/auditor/index.d.ts +13 -3
  15. package/lib/interfaces/auditor/index.js +9 -2
  16. package/lib/interfaces/axios/index.d.ts +5 -0
  17. package/lib/interfaces/cosmo/asset/index.d.ts +216 -0
  18. package/lib/interfaces/cosmo/asset/index.js +90 -0
  19. package/lib/interfaces/cosmo/comment/index.d.ts +41 -0
  20. package/lib/interfaces/cosmo/comment/index.js +8 -0
  21. package/lib/interfaces/cosmo/event/index.d.ts +60 -0
  22. package/lib/interfaces/cosmo/event/index.js +31 -0
  23. package/lib/interfaces/cosmo/location/index.d.ts +4 -0
  24. package/lib/interfaces/cosmo/location/index.js +2 -0
  25. package/lib/interfaces/cosmo/namespace/index.d.ts +9 -0
  26. package/lib/interfaces/cosmo/namespace/index.js +9 -0
  27. package/lib/interfaces/cosmo/permissions.d.ts +96 -0
  28. package/lib/interfaces/cosmo/permissions.js +58 -0
  29. package/lib/interfaces/cosmo/share/index.d.ts +110 -0
  30. package/lib/interfaces/cosmo/share/index.js +23 -0
  31. package/lib/interfaces/cosmo/space/index.d.ts +31 -0
  32. package/lib/interfaces/cosmo/space/index.js +2 -0
  33. package/lib/interfaces/cosmo/stats/index.d.ts +11 -0
  34. package/lib/interfaces/cosmo/stats/index.js +2 -0
  35. package/lib/interfaces/cosmo/tag/tag.d.ts +13 -0
  36. package/lib/interfaces/cosmo/tag/tag.js +2 -0
  37. package/lib/interfaces/global/Products.d.ts +2 -3
  38. package/lib/interfaces/global/Products.js +1 -2
  39. package/lib/interfaces/global/Views.d.ts +0 -1
  40. package/lib/interfaces/global/Views.js +0 -1
  41. package/lib/interfaces/high5/index.d.ts +7 -7
  42. package/lib/interfaces/high5/index.js +7 -7
  43. package/lib/interfaces/{friday → high5}/space/database/document/index.d.ts +1 -1
  44. package/lib/interfaces/{friday → high5}/space/database/document/index.js +2 -1
  45. package/lib/interfaces/high5/space/database/index.js +2 -0
  46. package/lib/interfaces/high5/space/event/stream/design/StreamDesign.d.ts +10 -2
  47. package/lib/interfaces/high5/space/event/stream/node/index.d.ts +1 -0
  48. package/lib/interfaces/high5/space/execution/index.d.ts +3 -1
  49. package/lib/interfaces/{fuse/space/cronjob/CronjobLog.d.ts → high5/space/job/JobLog.d.ts} +3 -3
  50. package/lib/interfaces/high5/space/job/JobLog.js +2 -0
  51. package/lib/interfaces/high5/space/job/index.d.ts +83 -0
  52. package/lib/interfaces/high5/space/job/index.js +11 -0
  53. package/lib/interfaces/high5/stats.d.ts +21 -0
  54. package/lib/interfaces/high5/stats.js +2 -0
  55. package/lib/interfaces/high5/wave/dependentInputs.d.ts +42 -0
  56. package/lib/interfaces/high5/wave/dependentInputs.js +144 -0
  57. package/lib/interfaces/high5/wave/dependentInputsValidation.d.ts +22 -0
  58. package/lib/interfaces/high5/wave/dependentInputsValidation.js +220 -0
  59. package/lib/interfaces/idp/index.d.ts +3 -3
  60. package/lib/interfaces/idp/index.js +3 -3
  61. package/lib/interfaces/idp/oauth/device.d.ts +18 -0
  62. package/lib/interfaces/idp/oauth/device.js +2 -0
  63. package/lib/interfaces/idp/oauth/index.d.ts +19 -5
  64. package/lib/interfaces/idp/organization/index.d.ts +2 -0
  65. package/lib/interfaces/idp/organization/index.js +2 -0
  66. package/lib/interfaces/idp/organization/license/index.d.ts +13 -11
  67. package/lib/interfaces/idp/organization/member/index.d.ts +1 -0
  68. package/lib/interfaces/idp/organization/settings/oauthApp/index.d.ts +4 -0
  69. package/lib/interfaces/idp/organization/stats.d.ts +7 -0
  70. package/lib/interfaces/idp/organization/stats.js +2 -0
  71. package/lib/interfaces/idp/organization/team/index.d.ts +0 -1
  72. package/lib/interfaces/idp/user/Message.d.ts +22 -0
  73. package/lib/interfaces/idp/user/Message.js +14 -0
  74. package/lib/interfaces/idp/user/NotificationSettings.d.ts +1 -0
  75. package/lib/interfaces/idp/user/Scopes.d.ts +1 -15
  76. package/lib/interfaces/idp/user/Scopes.js +0 -21
  77. package/lib/interfaces/idp/user/index.d.ts +5 -1
  78. package/lib/interfaces/mailer/index.d.ts +50 -2
  79. package/lib/interfaces/mailer/index.js +100 -2
  80. package/lib/interfaces/mothership/index.d.ts +3 -1
  81. package/lib/interfaces/mothership/index.js +15 -0
  82. package/lib/interfaces/mothership/stats.d.ts +4 -0
  83. package/lib/interfaces/mothership/stats.js +2 -0
  84. package/lib/interfaces/nats/index.d.ts +79 -51
  85. package/lib/interfaces/nats/index.js +140 -125
  86. package/lib/interfaces/shorts/index.d.ts +17 -0
  87. package/lib/interfaces/shorts/index.js +8 -0
  88. package/lib/service/agent/bundle/dev/index.d.ts +16 -6
  89. package/lib/service/agent/bundle/dev/index.js +16 -11
  90. package/lib/service/agent/bundle/index.d.ts +10 -4
  91. package/lib/service/agent/bundle/index.js +10 -7
  92. package/lib/service/agent/context/index.d.ts +22 -8
  93. package/lib/service/agent/context/index.js +19 -15
  94. package/lib/service/agent/index.d.ts +6 -0
  95. package/lib/service/agent/index.js +18 -1
  96. package/lib/service/agent/installer/index.js +4 -1
  97. package/lib/service/agent/logging/index.d.ts +69 -0
  98. package/lib/service/agent/logging/index.js +117 -0
  99. package/lib/service/agent/module/index.d.ts +36 -0
  100. package/lib/service/agent/module/index.js +65 -0
  101. package/lib/service/auditor/index.d.ts +8 -4
  102. package/lib/service/auditor/index.js +9 -6
  103. package/lib/service/auditor/internal/index.d.ts +27 -3
  104. package/lib/service/auditor/internal/index.js +38 -6
  105. package/lib/service/bouncer/features/index.d.ts +4 -2
  106. package/lib/service/bouncer/features/index.js +6 -3
  107. package/lib/service/bouncer/index.js +5 -2
  108. package/lib/service/cosmo/asset/index.d.ts +265 -0
  109. package/lib/service/cosmo/asset/index.js +420 -0
  110. package/lib/service/cosmo/comment/index.d.ts +93 -0
  111. package/lib/service/cosmo/comment/index.js +136 -0
  112. package/lib/service/cosmo/event/index.d.ts +23 -0
  113. package/lib/service/cosmo/event/index.js +43 -0
  114. package/lib/service/cosmo/folder/index.d.ts +27 -0
  115. package/lib/service/cosmo/folder/index.js +50 -0
  116. package/lib/service/cosmo/index.d.ts +52 -0
  117. package/lib/service/cosmo/index.js +129 -0
  118. package/lib/service/cosmo/internal/index.d.ts +7 -0
  119. package/lib/service/cosmo/internal/index.js +20 -0
  120. package/lib/service/cosmo/internal/space/index.d.ts +15 -0
  121. package/lib/service/cosmo/internal/space/index.js +37 -0
  122. package/lib/service/cosmo/location/index.d.ts +40 -0
  123. package/lib/service/cosmo/location/index.js +66 -0
  124. package/lib/service/cosmo/namespace/index.d.ts +56 -0
  125. package/lib/service/cosmo/namespace/index.js +85 -0
  126. package/lib/service/cosmo/organization/index.d.ts +47 -0
  127. package/lib/service/cosmo/organization/index.js +67 -0
  128. package/lib/service/cosmo/permissions/index.d.ts +131 -0
  129. package/lib/service/cosmo/permissions/index.js +184 -0
  130. package/lib/service/cosmo/production/index.d.ts +26 -0
  131. package/lib/service/cosmo/production/index.js +48 -0
  132. package/lib/service/cosmo/share/index.d.ts +169 -0
  133. package/lib/service/cosmo/share/index.js +227 -0
  134. package/lib/service/cosmo/space/index.d.ts +131 -0
  135. package/lib/service/cosmo/space/index.js +190 -0
  136. package/lib/service/cosmo/stats/index.d.ts +35 -0
  137. package/lib/service/cosmo/stats/index.js +58 -0
  138. package/lib/service/cosmo/tag/index.d.ts +67 -0
  139. package/lib/service/cosmo/tag/index.js +96 -0
  140. package/lib/service/dali/DaliAvatar.d.ts +0 -6
  141. package/lib/service/dali/DaliAvatar.js +4 -11
  142. package/lib/service/dali/avatar/DaliCosmoSpace.d.ts +10 -4
  143. package/lib/service/dali/avatar/DaliCosmoSpace.js +12 -8
  144. package/lib/service/dali/avatar/DaliHigh5Pool.d.ts +11 -4
  145. package/lib/service/dali/avatar/DaliHigh5Pool.js +12 -8
  146. package/lib/service/dali/avatar/DaliHigh5Space.d.ts +11 -4
  147. package/lib/service/dali/avatar/DaliHigh5Space.js +12 -8
  148. package/lib/service/dali/avatar/DaliOAuthApp.d.ts +11 -4
  149. package/lib/service/dali/avatar/DaliOAuthApp.js +12 -8
  150. package/lib/service/dali/avatar/DaliOrganization.d.ts +11 -4
  151. package/lib/service/dali/avatar/DaliOrganization.js +12 -8
  152. package/lib/service/dali/avatar/DaliServiceAccount.d.ts +10 -4
  153. package/lib/service/dali/avatar/DaliServiceAccount.js +12 -8
  154. package/lib/service/dali/avatar/DaliTeam.d.ts +11 -4
  155. package/lib/service/dali/avatar/DaliTeam.js +12 -8
  156. package/lib/service/dali/avatar/DaliUser.d.ts +11 -4
  157. package/lib/service/dali/avatar/DaliUser.js +12 -8
  158. package/lib/service/dali/index.d.ts +4 -5
  159. package/lib/service/dali/index.js +6 -6
  160. package/lib/service/high5/execution/index.d.ts +4 -2
  161. package/lib/service/high5/execution/index.js +7 -3
  162. package/lib/service/high5/execution/log/index.js +4 -1
  163. package/lib/service/high5/execution/status/index.d.ts +5 -3
  164. package/lib/service/high5/execution/status/index.js +7 -4
  165. package/lib/service/high5/index.d.ts +7 -2
  166. package/lib/service/high5/index.js +13 -3
  167. package/lib/service/high5/internal/index.d.ts +4 -2
  168. package/lib/service/high5/internal/index.js +7 -3
  169. package/lib/service/high5/internal/space/index.d.ts +10 -3
  170. package/lib/service/high5/internal/space/index.js +17 -5
  171. package/lib/service/high5/internal/space/job/index.d.ts +7 -0
  172. package/lib/service/high5/internal/space/job/index.js +20 -0
  173. package/lib/service/high5/internal/space/job/log/index.d.ts +17 -0
  174. package/lib/service/{fuse/internal/space/cronjob → high5/internal/space/job}/log/index.js +13 -10
  175. package/lib/service/high5/joinToken/index.d.ts +14 -6
  176. package/lib/service/high5/joinToken/index.js +14 -10
  177. package/lib/service/high5/space/database/document/array/index.d.ts +73 -0
  178. package/lib/service/high5/space/database/document/array/index.js +105 -0
  179. package/lib/service/{friday → high5}/space/database/document/index.d.ts +26 -10
  180. package/lib/service/{friday → high5}/space/database/document/index.js +35 -17
  181. package/lib/service/high5/space/database/document/number/index.d.ts +51 -0
  182. package/lib/service/high5/space/database/document/number/index.js +80 -0
  183. package/lib/service/{friday → high5}/space/database/index.d.ts +22 -12
  184. package/lib/service/{friday → high5}/space/database/index.js +22 -18
  185. package/lib/service/high5/space/event/index.d.ts +17 -7
  186. package/lib/service/high5/space/event/index.js +16 -12
  187. package/lib/service/high5/space/event/stream/design/DesignOperations.d.ts +4 -2
  188. package/lib/service/high5/space/event/stream/design/DesignOperations.js +6 -3
  189. package/lib/service/high5/space/event/stream/design/index.d.ts +10 -4
  190. package/lib/service/high5/space/event/stream/design/index.js +13 -9
  191. package/lib/service/high5/space/event/stream/design/snapshot/index.d.ts +16 -6
  192. package/lib/service/high5/space/event/stream/design/snapshot/index.js +16 -11
  193. package/lib/service/high5/space/event/stream/index.d.ts +32 -12
  194. package/lib/service/high5/space/event/stream/index.js +26 -22
  195. package/lib/service/high5/space/execution/index.d.ts +19 -7
  196. package/lib/service/high5/space/execution/index.js +21 -13
  197. package/lib/service/high5/space/execution/log/index.d.ts +8 -4
  198. package/lib/service/high5/space/execution/log/index.js +9 -6
  199. package/lib/service/high5/space/execution/status/index.d.ts +7 -3
  200. package/lib/service/high5/space/execution/status/index.js +8 -5
  201. package/lib/service/high5/space/index.d.ts +53 -14
  202. package/lib/service/high5/space/index.js +70 -28
  203. package/lib/service/{fuse/space/cronjob → high5/space/job}/index.d.ts +57 -35
  204. package/lib/service/{fuse/space/cronjob → high5/space/job}/index.js +88 -87
  205. package/lib/service/{fuse/space/cronjob → high5/space/job}/log/index.d.ts +15 -11
  206. package/lib/service/{fuse/space/cronjob → high5/space/job}/log/index.js +19 -16
  207. package/lib/service/high5/space/node/index.d.ts +20 -8
  208. package/lib/service/high5/space/node/index.js +18 -14
  209. package/lib/service/high5/space/pool/index.d.ts +38 -11
  210. package/lib/service/high5/space/pool/index.js +41 -19
  211. package/lib/service/high5/space/secret/index.d.ts +17 -7
  212. package/lib/service/high5/space/secret/index.js +16 -12
  213. package/lib/service/high5/space/stat/index.d.ts +12 -0
  214. package/lib/service/high5/space/stat/index.js +34 -0
  215. package/lib/service/high5/space/wave/index.d.ts +16 -6
  216. package/lib/service/high5/space/wave/index.js +15 -11
  217. package/lib/service/high5/space/webhook/index.d.ts +32 -12
  218. package/lib/service/high5/space/webhook/index.js +29 -22
  219. package/lib/service/high5/space/webhook/log/index.d.ts +4 -2
  220. package/lib/service/high5/space/webhook/log/index.js +6 -3
  221. package/lib/service/high5/stat/index.d.ts +11 -0
  222. package/lib/service/{fuse/internal → high5/stat}/index.js +16 -14
  223. package/lib/service/high5/wave/index.js +4 -1
  224. package/lib/service/high5/wave/s3/index.d.ts +31 -8
  225. package/lib/service/high5/wave/s3/index.js +47 -23
  226. package/lib/service/idp/guest/index.d.ts +42 -0
  227. package/lib/service/idp/guest/index.js +69 -0
  228. package/lib/service/idp/index.d.ts +25 -7
  229. package/lib/service/idp/index.js +27 -13
  230. package/lib/service/idp/internal/index.d.ts +5 -3
  231. package/lib/service/idp/internal/index.js +9 -4
  232. package/lib/service/idp/oauth/device.d.ts +131 -0
  233. package/lib/service/idp/oauth/device.js +177 -0
  234. package/lib/service/idp/oauth/index.d.ts +19 -6
  235. package/lib/service/idp/oauth/index.js +26 -16
  236. package/lib/service/idp/organization/index.d.ts +28 -5
  237. package/lib/service/idp/organization/index.js +41 -11
  238. package/lib/service/idp/organization/license/index.d.ts +7 -3
  239. package/lib/service/idp/organization/license/index.js +8 -5
  240. package/lib/service/idp/organization/member/index.d.ts +20 -8
  241. package/lib/service/idp/organization/member/index.js +20 -15
  242. package/lib/service/idp/organization/member/invitations/index.d.ts +42 -9
  243. package/lib/service/idp/organization/member/invitations/index.js +94 -59
  244. package/lib/service/idp/organization/service-accounts/index.d.ts +31 -9
  245. package/lib/service/idp/organization/service-accounts/index.js +35 -14
  246. package/lib/service/idp/organization/settings/domain/index.d.ts +13 -5
  247. package/lib/service/idp/organization/settings/domain/index.js +13 -9
  248. package/lib/service/idp/organization/settings/domain/saml/index.d.ts +16 -6
  249. package/lib/service/idp/organization/settings/domain/saml/index.js +23 -19
  250. package/lib/service/idp/organization/settings/index.js +4 -1
  251. package/lib/service/idp/organization/settings/oauth/index.d.ts +33 -9
  252. package/lib/service/idp/organization/settings/oauth/index.js +37 -16
  253. package/lib/service/idp/organization/stat/index.d.ts +11 -0
  254. package/lib/service/idp/organization/stat/index.js +33 -0
  255. package/lib/service/idp/organization/team/index.d.ts +32 -10
  256. package/lib/service/idp/organization/team/index.js +35 -14
  257. package/lib/service/idp/registration/index.d.ts +10 -4
  258. package/lib/service/idp/registration/index.js +19 -10
  259. package/lib/service/idp/user/index.d.ts +41 -11
  260. package/lib/service/idp/user/index.js +49 -19
  261. package/lib/service/idp/user/license/index.d.ts +7 -3
  262. package/lib/service/idp/user/license/index.js +8 -5
  263. package/lib/service/idp/user/message/index.d.ts +62 -0
  264. package/lib/service/idp/user/message/index.js +95 -0
  265. package/lib/service/idp/user/password/index.d.ts +4 -2
  266. package/lib/service/idp/user/password/index.js +6 -3
  267. package/lib/service/idp/user/settings/connections/index.d.ts +4 -2
  268. package/lib/service/idp/user/settings/connections/index.js +6 -3
  269. package/lib/service/idp/user/settings/general/index.d.ts +10 -4
  270. package/lib/service/idp/user/settings/general/index.js +10 -7
  271. package/lib/service/idp/user/settings/index.js +4 -1
  272. package/lib/service/idp/user/settings/notifications/index.d.ts +7 -3
  273. package/lib/service/idp/user/settings/notifications/index.js +8 -5
  274. package/lib/service/idp/user/settings/oauthApps/index.d.ts +7 -3
  275. package/lib/service/idp/user/settings/oauthApps/index.js +10 -6
  276. package/lib/service/idp/user/settings/pats/index.d.ts +22 -8
  277. package/lib/service/idp/user/settings/pats/index.js +21 -16
  278. package/lib/service/idp/user/settings/twoFactor/index.js +4 -1
  279. package/lib/service/idp/user/settings/twoFactor/totp/index.d.ts +16 -6
  280. package/lib/service/idp/user/settings/twoFactor/totp/index.js +17 -11
  281. package/lib/service/mailer/index.d.ts +4 -2
  282. package/lib/service/mailer/index.js +7 -4
  283. package/lib/service/mailer/internal/index.d.ts +14 -6
  284. package/lib/service/mailer/internal/index.js +12 -9
  285. package/lib/service/mothership/index.d.ts +35 -13
  286. package/lib/service/mothership/index.js +36 -18
  287. package/lib/service/nats/index.d.ts +7 -0
  288. package/lib/service/nats/index.js +77 -44
  289. package/lib/service/shorts/index.d.ts +18 -0
  290. package/lib/service/{friday → shorts}/index.js +17 -11
  291. package/lib/service/shorts/internal/index.d.ts +75 -0
  292. package/lib/service/shorts/internal/index.js +118 -0
  293. package/lib/utils/bouncer/features/Provider.js +0 -1
  294. package/package.json +2 -2
  295. package/lib/interfaces/friday/index.d.ts +0 -3
  296. package/lib/interfaces/friday/space/index.d.ts +0 -21
  297. package/lib/interfaces/friday/space/index.js +0 -11
  298. package/lib/interfaces/fuse/index.d.ts +0 -3
  299. package/lib/interfaces/fuse/index.js +0 -19
  300. package/lib/interfaces/fuse/space/cronjob/Cronjob.d.ts +0 -38
  301. package/lib/interfaces/fuse/space/cronjob/Cronjob.js +0 -8
  302. package/lib/interfaces/fuse/space/index.d.ts +0 -22
  303. package/lib/interfaces/fuse/space/index.js +0 -11
  304. package/lib/service/dali/avatar/DaliFuseSpace.d.ts +0 -26
  305. package/lib/service/dali/avatar/DaliFuseSpace.js +0 -58
  306. package/lib/service/friday/index.d.ts +0 -13
  307. package/lib/service/friday/space/index.d.ts +0 -81
  308. package/lib/service/friday/space/index.js +0 -150
  309. package/lib/service/fuse/index.d.ts +0 -18
  310. package/lib/service/fuse/index.js +0 -48
  311. package/lib/service/fuse/internal/index.d.ts +0 -8
  312. package/lib/service/fuse/internal/space/cronjob/index.d.ts +0 -7
  313. package/lib/service/fuse/internal/space/cronjob/index.js +0 -17
  314. package/lib/service/fuse/internal/space/cronjob/log/index.d.ts +0 -15
  315. package/lib/service/fuse/internal/space/index.d.ts +0 -22
  316. package/lib/service/fuse/internal/space/index.js +0 -49
  317. package/lib/service/fuse/space/index.d.ts +0 -81
  318. package/lib/service/fuse/space/index.js +0 -152
  319. /package/lib/interfaces/{friday/space/database/index.js → agent/logging/cloudwatch.js} +0 -0
  320. /package/lib/interfaces/{fuse/space/cronjob/CronjobLog.js → agent/logging/log-collector.js} +0 -0
  321. /package/lib/interfaces/{friday → high5}/space/database/index.d.ts +0 -0
@@ -8,10 +8,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5SpaceInternal = void 0;
13
- const Base_1 = require("../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../Base"));
17
+ const job_1 = require("./job");
14
18
  class High5SpaceInternal extends Base_1.default {
19
+ get job() {
20
+ if (this._job === undefined) {
21
+ this._job = new job_1.High5JobInternal(this.options, this.axios);
22
+ }
23
+ return this._job;
24
+ }
15
25
  constructor(options, axios) {
16
26
  super(options, axios);
17
27
  }
@@ -21,9 +31,10 @@ class High5SpaceInternal extends Base_1.default {
21
31
  * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
22
32
  * @param orgName Name of the organization
23
33
  */
24
- deleteAllSpacesOfOrganization(orgName) {
34
+ deleteAllSpacesOfOrganization(orgName, raw) {
25
35
  return __awaiter(this, void 0, void 0, function* () {
26
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}`));
36
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}`));
37
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
27
38
  });
28
39
  }
29
40
  /**
@@ -33,9 +44,10 @@ class High5SpaceInternal extends Base_1.default {
33
44
  * @param orgName Name of the organization
34
45
  * @param userId ID of the user
35
46
  */
36
- removeUserFromAllSpacesOfOrganization(orgName, userId) {
47
+ removeUserFromAllSpacesOfOrganization(orgName, userId, raw) {
37
48
  return __awaiter(this, void 0, void 0, function* () {
38
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/user/${userId}`));
49
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/user/${userId}`));
50
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
39
51
  });
40
52
  }
41
53
  getEndpoint(endpoint) {
@@ -0,0 +1,7 @@
1
+ import Base from "../../../../../Base";
2
+ import { High5JobLogInternal } from "./log";
3
+ export declare class High5JobInternal extends Base {
4
+ get jobLog(): High5JobLogInternal;
5
+ private _jobLog?;
6
+ protected getEndpoint(endpoint: string): string;
7
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.High5JobInternal = void 0;
7
+ const Base_1 = __importDefault(require("../../../../../Base"));
8
+ const log_1 = require("./log");
9
+ class High5JobInternal extends Base_1.default {
10
+ get jobLog() {
11
+ if (this._jobLog === undefined) {
12
+ this._jobLog = new log_1.High5JobLogInternal(this.options, this.axios);
13
+ }
14
+ return this._jobLog;
15
+ }
16
+ getEndpoint(endpoint) {
17
+ return `${this.options.server}/api/high5/internal${endpoint}`;
18
+ }
19
+ }
20
+ exports.High5JobInternal = High5JobInternal;
@@ -0,0 +1,17 @@
1
+ import Base, { MaybeRaw } from "../../../../../../Base";
2
+ import { JobLogCreate, JobLogDto } from "../../../../../../interfaces/high5/space/job/JobLog";
3
+ export declare class High5JobLogInternal extends Base {
4
+ /**
5
+ * Creates a log for a cronjob.
6
+ *
7
+ * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
8
+ * @param orgName Name of the organization
9
+ * @param spaceName Name of the High5 space
10
+ * @param createJobLog Cronjob log to be created
11
+ * @returns the created cronjob log with metadata
12
+ */
13
+ createJobLog<R extends boolean = false>(orgName: string, spaceName: string, jobId: string, log: JobLogCreate, raw?: {
14
+ raw: R;
15
+ }): Promise<MaybeRaw<R, JobLogDto>>;
16
+ protected getEndpoint(endpoint: string): string;
17
+ }
@@ -8,27 +8,30 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.FuseCronjobLogInternal = void 0;
13
- const Base_1 = require("../../../../../../Base");
14
- class FuseCronjobLogInternal extends Base_1.default {
15
+ exports.High5JobLogInternal = void 0;
16
+ const Base_1 = __importDefault(require("../../../../../../Base"));
17
+ class High5JobLogInternal extends Base_1.default {
15
18
  /**
16
19
  * Creates a log for a cronjob.
17
20
  *
18
21
  * THIS IS AN INTERNAL ENDPOINT AND CAN ONLY BE USED FROM BACKENDS WITHIN THE HCLOUD DEPLOYMENT
19
22
  * @param orgName Name of the organization
20
- * @param spaceName Name of the Fuse space
21
- * @param createCronjob Cronjob log to be created
23
+ * @param spaceName Name of the High5 space
24
+ * @param createJobLog Cronjob log to be created
22
25
  * @returns the created cronjob log with metadata
23
26
  */
24
- createCronjobLog(orgName, spaceName, cronjobId, log) {
27
+ createJobLog(orgName, spaceName, jobId, log, raw) {
25
28
  return __awaiter(this, void 0, void 0, function* () {
26
- const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${cronjobId}/logs}`), log);
27
- return resp.data;
29
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/jobs/${jobId}/logs}`), log);
30
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
28
31
  });
29
32
  }
30
33
  getEndpoint(endpoint) {
31
- return `${this.options.server}/api/fuse/internal${endpoint}`;
34
+ return `${this.options.server}/api/high5/internal${endpoint}`;
32
35
  }
33
36
  }
34
- exports.FuseCronjobLogInternal = FuseCronjobLogInternal;
37
+ exports.High5JobLogInternal = High5JobLogInternal;
@@ -1,5 +1,5 @@
1
1
  import { AxiosInstance } from "axios";
2
- import Base, { Options } from "../../../Base";
2
+ import Base, { MaybeRaw, Options } from "../../../Base";
3
3
  import { PaginatedResponse } from "../../../interfaces/global";
4
4
  import { JoinToken } from "../../../interfaces/high5/joinToken";
5
5
  import { User } from "../../../interfaces/idp";
@@ -12,29 +12,37 @@ export declare class High5JoinToken extends Base {
12
12
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
13
13
  * @returns Object containing an array of join tokens and the total number of results found in the database (independent of limit and page)
14
14
  */
15
- get(orgName: string, limit?: number, page?: number): Promise<PaginatedResponse<JoinToken>>;
15
+ get<R extends boolean = false>(orgName: string, limit?: number, page?: number, raw?: {
16
+ raw: R;
17
+ }): Promise<MaybeRaw<R, PaginatedResponse<JoinToken>>>;
16
18
  /**
17
19
  * Creates a join token for the specified organization
18
20
  * @param orgName Name of the Organization
19
21
  * @param name Name of the Join Token
20
22
  * @returns Created join token
21
23
  */
22
- create(orgName: string, name: string): Promise<JoinToken>;
24
+ create<R extends boolean = false>(orgName: string, name: string, raw?: {
25
+ raw: R;
26
+ }): Promise<MaybeRaw<R, JoinToken>>;
23
27
  /**
24
28
  * Revokes a join token of the specified organization
25
29
  * @param orgName Name of the Organization
26
30
  * @param tokenId ID of the Join Token
27
31
  */
28
- revoke(orgName: string, tokenId: string): Promise<void>;
32
+ revoke<R extends boolean = false>(orgName: string, tokenId: string, raw?: {
33
+ raw: R;
34
+ }): Promise<MaybeRaw<R, void>>;
29
35
  /**
30
36
  * Exchanges a join token for an agent user
31
37
  *
32
38
  * @param joinToken Join token
33
39
  * @returns An object containing the User object and the PAT that represents the agent user
34
40
  */
35
- exchange(joinToken: string): Promise<{
41
+ exchange<R extends boolean = false>(joinToken: string, raw?: {
42
+ raw: R;
43
+ }): Promise<MaybeRaw<R, {
36
44
  user: User;
37
45
  pat: string;
38
- }>;
46
+ }>>;
39
47
  protected getEndpoint(endpoint: string): string;
40
48
  }
@@ -8,9 +8,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
15
  exports.High5JoinToken = void 0;
13
- const Base_1 = require("../../../Base");
16
+ const Base_1 = __importDefault(require("../../../Base"));
14
17
  const paginatedResponseHelper_1 = require("../../../helper/paginatedResponseHelper");
15
18
  class High5JoinToken extends Base_1.default {
16
19
  constructor(options, axios) {
@@ -23,12 +26,12 @@ class High5JoinToken extends Base_1.default {
23
26
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
24
27
  * @returns Object containing an array of join tokens and the total number of results found in the database (independent of limit and page)
25
28
  */
26
- get(orgName, limit, page) {
29
+ get(orgName, limit, page, raw) {
27
30
  return __awaiter(this, void 0, void 0, function* () {
28
31
  limit = limit || 25;
29
32
  page = page || 0;
30
33
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/join/token?page=${page}&limit=${limit}`));
31
- return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
34
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
32
35
  });
33
36
  }
34
37
  /**
@@ -37,10 +40,10 @@ class High5JoinToken extends Base_1.default {
37
40
  * @param name Name of the Join Token
38
41
  * @returns Created join token
39
42
  */
40
- create(orgName, name) {
43
+ create(orgName, name, raw) {
41
44
  return __awaiter(this, void 0, void 0, function* () {
42
45
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/join/token`), { name });
43
- return resp.data;
46
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
44
47
  });
45
48
  }
46
49
  /**
@@ -48,9 +51,10 @@ class High5JoinToken extends Base_1.default {
48
51
  * @param orgName Name of the Organization
49
52
  * @param tokenId ID of the Join Token
50
53
  */
51
- revoke(orgName, tokenId) {
54
+ revoke(orgName, tokenId, raw) {
52
55
  return __awaiter(this, void 0, void 0, function* () {
53
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/join/token/${tokenId}`));
56
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/join/token/${tokenId}`));
57
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
54
58
  });
55
59
  }
56
60
  /**
@@ -59,10 +63,10 @@ class High5JoinToken extends Base_1.default {
59
63
  * @param joinToken Join token
60
64
  * @returns An object containing the User object and the PAT that represents the agent user
61
65
  */
62
- exchange(joinToken) {
66
+ exchange(joinToken, raw) {
63
67
  return __awaiter(this, void 0, void 0, function* () {
64
- const res = yield this.axios.post(this.getEndpoint(`/v1/join/token`), {}, { headers: { Authorization: joinToken } });
65
- return { user: res.data, pat: res.headers.authorization };
68
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/join/token`), {}, { headers: { Authorization: joinToken } });
69
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: { user: resp.data, pat: resp.headers.authorization } }) : { user: resp.data, pat: resp.headers.authorization });
66
70
  });
67
71
  }
68
72
  getEndpoint(endpoint) {
@@ -0,0 +1,73 @@
1
+ import Base, { MaybeRaw } from "../../../../../../Base";
2
+ import { PaginatedResponse, SearchParams } from "../../../../../../interfaces/global";
3
+ import { Document } from "../../../../../../interfaces/high5";
4
+ export declare class High5DocumentArray extends Base {
5
+ /**
6
+ * Retrieves all items of a specified array document which match the provided search filter(s). Will return all items of the array if no filter is provided.
7
+ * @param orgName Name of the Organization
8
+ * @param spaceName Name of the Space
9
+ * @param dbName Name of the Database
10
+ * @param key Key of the Document (it should be document with Array<object>)
11
+ * @param filters (optional) Array of search filters
12
+ * @param sorting (optional) Sorting object
13
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
14
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
15
+ * @returns Object containing an array of items and the total number of results found in the document (independent of limit and page)
16
+ */
17
+ searchItems<R extends boolean = false>({ orgName, spaceName, dbName, key, filters, sorting, limit, page, }: SearchParams & {
18
+ orgName: string;
19
+ spaceName: string;
20
+ dbName: string;
21
+ key: string;
22
+ }, raw?: {
23
+ raw: R;
24
+ }): Promise<MaybeRaw<R, PaginatedResponse<object>>>;
25
+ /**
26
+ * Retrieves an array item by its index.
27
+ * @param orgName Name of the Organization
28
+ * @param spaceName Name of the Space
29
+ * @param dbName Name of the Database
30
+ * @param key Key of the Document
31
+ * @param index Index of the arrays item
32
+ * @returns The requested item of the array
33
+ */
34
+ getItem<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, index: number, raw?: {
35
+ raw: R;
36
+ }): Promise<MaybeRaw<R, object>>;
37
+ /**
38
+ * Deletes an item of the specified array by its index.
39
+ * @param orgName Name of the Organization
40
+ * @param spaceName Name of the Space
41
+ * @param dbName Name of the Database
42
+ * @param key Key of the Document
43
+ * @param index Index of the item of the array
44
+ */
45
+ deleteItem<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, index: number, raw?: {
46
+ raw: R;
47
+ }): Promise<MaybeRaw<R, void>>;
48
+ /**
49
+ * Pushes a list of items to the end of the specified array document.
50
+ * @param orgName Name of the Organization
51
+ * @param spaceName Name of the Space
52
+ * @param dbName Name of the Database
53
+ * @param key Key of the Document
54
+ * @param items New array items to be added to the end of the specified array document
55
+ * @returns Updated Document
56
+ */
57
+ pushItems<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, items: Array<unknown>, raw?: {
58
+ raw: R;
59
+ }): Promise<MaybeRaw<R, Document>>;
60
+ /**
61
+ * Unshifts a list of items to the beginning of the specified array document.
62
+ * @param orgName Name of the Organization
63
+ * @param spaceName Name of the Space
64
+ * @param dbName Name of the Database
65
+ * @param key Key of the Document
66
+ * @param items New array items to be inserted to the beginning of the specified array document
67
+ * @returns Updated Document
68
+ */
69
+ unshiftItems<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, items: Array<unknown>, raw?: {
70
+ raw: R;
71
+ }): Promise<MaybeRaw<R, Document>>;
72
+ protected getEndpoint(endpoint: string): string;
73
+ }
@@ -0,0 +1,105 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.High5DocumentArray = void 0;
16
+ const Base_1 = __importDefault(require("../../../../../../Base"));
17
+ const paginatedResponseHelper_1 = require("../../../../../../helper/paginatedResponseHelper");
18
+ const searchFilter_1 = require("../../../../../../helper/searchFilter");
19
+ class High5DocumentArray extends Base_1.default {
20
+ /**
21
+ * Retrieves all items of a specified array document which match the provided search filter(s). Will return all items of the array if no filter is provided.
22
+ * @param orgName Name of the Organization
23
+ * @param spaceName Name of the Space
24
+ * @param dbName Name of the Database
25
+ * @param key Key of the Document (it should be document with Array<object>)
26
+ * @param filters (optional) Array of search filters
27
+ * @param sorting (optional) Sorting object
28
+ * @param limit (optional) Max number of results (1-100; defaults to 25)
29
+ * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
30
+ * @returns Object containing an array of items and the total number of results found in the document (independent of limit and page)
31
+ */
32
+ searchItems(_a, raw_1) {
33
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, dbName, key, filters, sorting, limit = 25, page = 0, }, raw) {
34
+ const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
35
+ const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}/search?page=${page}&limit=${limit}`), {
36
+ filters: filtersDTO,
37
+ sorting: sorting,
38
+ });
39
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
40
+ });
41
+ }
42
+ /**
43
+ * Retrieves an array item by its index.
44
+ * @param orgName Name of the Organization
45
+ * @param spaceName Name of the Space
46
+ * @param dbName Name of the Database
47
+ * @param key Key of the Document
48
+ * @param index Index of the arrays item
49
+ * @returns The requested item of the array
50
+ */
51
+ getItem(orgName, spaceName, dbName, key, index, raw) {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}/index/${index}`));
54
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
55
+ });
56
+ }
57
+ /**
58
+ * Deletes an item of the specified array by its index.
59
+ * @param orgName Name of the Organization
60
+ * @param spaceName Name of the Space
61
+ * @param dbName Name of the Database
62
+ * @param key Key of the Document
63
+ * @param index Index of the item of the array
64
+ */
65
+ deleteItem(orgName, spaceName, dbName, key, index, raw) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}/index/${index}`));
68
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
69
+ });
70
+ }
71
+ /**
72
+ * Pushes a list of items to the end of the specified array document.
73
+ * @param orgName Name of the Organization
74
+ * @param spaceName Name of the Space
75
+ * @param dbName Name of the Database
76
+ * @param key Key of the Document
77
+ * @param items New array items to be added to the end of the specified array document
78
+ * @returns Updated Document
79
+ */
80
+ pushItems(orgName, spaceName, dbName, key, items, raw) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}/push`), { value: items });
83
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
84
+ });
85
+ }
86
+ /**
87
+ * Unshifts a list of items to the beginning of the specified array document.
88
+ * @param orgName Name of the Organization
89
+ * @param spaceName Name of the Space
90
+ * @param dbName Name of the Database
91
+ * @param key Key of the Document
92
+ * @param items New array items to be inserted to the beginning of the specified array document
93
+ * @returns Updated Document
94
+ */
95
+ unshiftItems(orgName, spaceName, dbName, key, items, raw) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}/unshift`), { value: items });
98
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
99
+ });
100
+ }
101
+ getEndpoint(endpoint) {
102
+ return `${this.options.server}/api/high5${endpoint}`;
103
+ }
104
+ }
105
+ exports.High5DocumentArray = High5DocumentArray;
@@ -1,9 +1,15 @@
1
- import Base from "../../../../../Base";
2
- import { Document, DocumentCreateDto, DocumentPatchDto } from "../../../../../interfaces/friday";
1
+ import Base, { MaybeRaw } from "../../../../../Base";
3
2
  import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global";
4
- export declare class FridayDocument extends Base {
3
+ import { Document, DocumentCreateDto, DocumentPatchDto } from "../../../../../interfaces/high5";
4
+ import { High5DocumentArray } from "./array";
5
+ import { High5DocumentNumber } from "./number";
6
+ export declare class High5Document extends Base {
7
+ get number(): High5DocumentNumber;
8
+ private _number?;
9
+ get array(): High5DocumentArray;
10
+ private _array?;
5
11
  /**
6
- * Retrieves all Documents of a Friday Database which match the provided search filter(s). Will return all Documents of the Database if no filter is provided.
12
+ * Retrieves all Documents of a High5 Database which match the provided search filter(s). Will return all Documents of the Database if no filter is provided.
7
13
  * @param orgName Name of the Organization
8
14
  * @param spaceName Name of the Space
9
15
  * @param dbName Name of the Database
@@ -13,11 +19,13 @@ export declare class FridayDocument extends Base {
13
19
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
14
20
  * @returns Object containing an array of Documents and the total number of results found in the database (independent of limit and page)
15
21
  */
16
- searchDatabases({ orgName, spaceName, dbName, filters, sorting, limit, page, }: SearchParams & {
22
+ searchDocuments<R extends boolean = false>({ orgName, spaceName, dbName, filters, sorting, limit, page }: SearchParams & {
17
23
  orgName: string;
18
24
  spaceName: string;
19
25
  dbName: string;
20
- }): Promise<PaginatedResponse<Document>>;
26
+ }, raw?: {
27
+ raw: R;
28
+ }): Promise<MaybeRaw<R, PaginatedResponse<Document>>>;
21
29
  /**
22
30
  * Retrieves a Document by its name.
23
31
  * @param orgName Name of the Organization
@@ -26,7 +34,9 @@ export declare class FridayDocument extends Base {
26
34
  * @param key Key of the Document
27
35
  * @returns The requested Document
28
36
  */
29
- getDocument(orgName: string, spaceName: string, dbName: string, key: string): Promise<Document>;
37
+ getDocument<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, raw?: {
38
+ raw: R;
39
+ }): Promise<MaybeRaw<R, Document>>;
30
40
  /**
31
41
  * Creates a new Document in the provided Database.
32
42
  * @param orgName Name of the Organization
@@ -35,7 +45,9 @@ export declare class FridayDocument extends Base {
35
45
  * @param document New document details
36
46
  * @returns The created Document
37
47
  */
38
- createDocument(orgName: string, spaceName: string, dbName: string, document: DocumentCreateDto): Promise<Document>;
48
+ createDocument<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, document: DocumentCreateDto, raw?: {
49
+ raw: R;
50
+ }): Promise<MaybeRaw<R, Document>>;
39
51
  /**
40
52
  * Update existing Document
41
53
  * @param orgName Name of the Organization
@@ -45,7 +57,9 @@ export declare class FridayDocument extends Base {
45
57
  * @param document New value to update the Document
46
58
  * @returns Updated Document
47
59
  */
48
- updateDocument(orgName: string, spaceName: string, dbName: string, key: string, document: DocumentPatchDto): Promise<Document>;
60
+ updateDocument<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, document: DocumentPatchDto, raw?: {
61
+ raw: R;
62
+ }): Promise<MaybeRaw<R, Document>>;
49
63
  /**
50
64
  * Deletes a Document by its key.
51
65
  * @param orgName Name of the Organization
@@ -53,6 +67,8 @@ export declare class FridayDocument extends Base {
53
67
  * @param dbName Name of the Database
54
68
  * @param key Key of the Document
55
69
  */
56
- deleteDocument(orgName: string, spaceName: string, dbName: string, key: string): Promise<void>;
70
+ deleteDocument<R extends boolean = false>(orgName: string, spaceName: string, dbName: string, key: string, raw?: {
71
+ raw: R;
72
+ }): Promise<MaybeRaw<R, void>>;
57
73
  protected getEndpoint(endpoint: string): string;
58
74
  }
@@ -8,14 +8,31 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  step((generator = generator.apply(thisArg, _arguments || [])).next());
9
9
  });
10
10
  };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
11
14
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.FridayDocument = void 0;
13
- const Base_1 = require("../../../../../Base");
15
+ exports.High5Document = void 0;
16
+ const Base_1 = __importDefault(require("../../../../../Base"));
14
17
  const paginatedResponseHelper_1 = require("../../../../../helper/paginatedResponseHelper");
15
18
  const searchFilter_1 = require("../../../../../helper/searchFilter");
16
- class FridayDocument extends Base_1.default {
19
+ const array_1 = require("./array");
20
+ const number_1 = require("./number");
21
+ class High5Document extends Base_1.default {
22
+ get number() {
23
+ if (this._number === undefined) {
24
+ this._number = new number_1.High5DocumentNumber(this.options, this.axios);
25
+ }
26
+ return this._number;
27
+ }
28
+ get array() {
29
+ if (this._array === undefined) {
30
+ this._array = new array_1.High5DocumentArray(this.options, this.axios);
31
+ }
32
+ return this._array;
33
+ }
17
34
  /**
18
- * Retrieves all Documents of a Friday Database which match the provided search filter(s). Will return all Documents of the Database if no filter is provided.
35
+ * Retrieves all Documents of a High5 Database which match the provided search filter(s). Will return all Documents of the Database if no filter is provided.
19
36
  * @param orgName Name of the Organization
20
37
  * @param spaceName Name of the Space
21
38
  * @param dbName Name of the Database
@@ -25,14 +42,14 @@ class FridayDocument extends Base_1.default {
25
42
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
26
43
  * @returns Object containing an array of Documents and the total number of results found in the database (independent of limit and page)
27
44
  */
28
- searchDatabases(_a) {
29
- return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, dbName, filters, sorting, limit = 25, page = 0, }) {
45
+ searchDocuments(_a, raw_1) {
46
+ return __awaiter(this, arguments, void 0, function* ({ orgName, spaceName, dbName, filters, sorting, limit = 25, page = 0 }, raw) {
30
47
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => new searchFilter_1.SearchFilterDTO(f));
31
48
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/search?page=${page}&limit=${limit}`), {
32
49
  filters: filtersDTO,
33
50
  sorting: sorting,
34
51
  });
35
- return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
52
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? Object.assign(Object.assign({}, resp), { data: (0, paginatedResponseHelper_1.createPaginatedResponse)(resp) }) : (0, paginatedResponseHelper_1.createPaginatedResponse)(resp));
36
53
  });
37
54
  }
38
55
  /**
@@ -43,10 +60,10 @@ class FridayDocument extends Base_1.default {
43
60
  * @param key Key of the Document
44
61
  * @returns The requested Document
45
62
  */
46
- getDocument(orgName, spaceName, dbName, key) {
63
+ getDocument(orgName, spaceName, dbName, key, raw) {
47
64
  return __awaiter(this, void 0, void 0, function* () {
48
65
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}`));
49
- return resp.data;
66
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
50
67
  });
51
68
  }
52
69
  /**
@@ -57,10 +74,10 @@ class FridayDocument extends Base_1.default {
57
74
  * @param document New document details
58
75
  * @returns The created Document
59
76
  */
60
- createDocument(orgName, spaceName, dbName, document) {
77
+ createDocument(orgName, spaceName, dbName, document, raw) {
61
78
  return __awaiter(this, void 0, void 0, function* () {
62
79
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents`), document);
63
- return resp.data;
80
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
64
81
  });
65
82
  }
66
83
  /**
@@ -72,10 +89,10 @@ class FridayDocument extends Base_1.default {
72
89
  * @param document New value to update the Document
73
90
  * @returns Updated Document
74
91
  */
75
- updateDocument(orgName, spaceName, dbName, key, document) {
92
+ updateDocument(orgName, spaceName, dbName, key, document, raw) {
76
93
  return __awaiter(this, void 0, void 0, function* () {
77
94
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}`), document);
78
- return resp.data;
95
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
79
96
  });
80
97
  }
81
98
  /**
@@ -85,13 +102,14 @@ class FridayDocument extends Base_1.default {
85
102
  * @param dbName Name of the Database
86
103
  * @param key Key of the Document
87
104
  */
88
- deleteDocument(orgName, spaceName, dbName, key) {
105
+ deleteDocument(orgName, spaceName, dbName, key, raw) {
89
106
  return __awaiter(this, void 0, void 0, function* () {
90
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}`));
107
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/spaces/${spaceName}/databases/${dbName}/documents/${key}`));
108
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
91
109
  });
92
110
  }
93
111
  getEndpoint(endpoint) {
94
- return `${this.options.server}/api/friday${endpoint}`;
112
+ return `${this.options.server}/api/high5${endpoint}`;
95
113
  }
96
114
  }
97
- exports.FridayDocument = FridayDocument;
115
+ exports.High5Document = High5Document;