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,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.IdpDomain = void 0;
13
- const Base_1 = require("../../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../../Base"));
14
17
  const saml_1 = require("./saml");
15
18
  class IdpDomain extends Base_1.default {
16
19
  /**
@@ -27,10 +30,10 @@ class IdpDomain extends Base_1.default {
27
30
  * @param orgName Name of Organization
28
31
  * @returns Array of Domains
29
32
  */
30
- getDomains(orgName) {
33
+ getDomains(orgName, raw) {
31
34
  return __awaiter(this, void 0, void 0, function* () {
32
35
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/settings/domains`));
33
- return resp.data;
36
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
34
37
  });
35
38
  }
36
39
  /**
@@ -39,12 +42,12 @@ class IdpDomain extends Base_1.default {
39
42
  * @param domainName Name of the Domain
40
43
  * @returns the created Domain
41
44
  */
42
- createDomain(orgName, domainName) {
45
+ createDomain(orgName, domainName, raw) {
43
46
  return __awaiter(this, void 0, void 0, function* () {
44
47
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/settings/domains`), {
45
48
  name: domainName,
46
49
  });
47
- return resp.data;
50
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
48
51
  });
49
52
  }
50
53
  /**
@@ -53,10 +56,10 @@ class IdpDomain extends Base_1.default {
53
56
  * @param domainName Name of the Domain
54
57
  * @returns Domain object with domain.verified set to 'true' if verification was succesful.
55
58
  */
56
- verifyDomain(orgName, domainName) {
59
+ verifyDomain(orgName, domainName, raw) {
57
60
  return __awaiter(this, void 0, void 0, function* () {
58
61
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/verify`));
59
- return resp.data;
62
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
60
63
  });
61
64
  }
62
65
  /**
@@ -64,9 +67,10 @@ class IdpDomain extends Base_1.default {
64
67
  * @param orgName Name of the organization
65
68
  * @param domainName Name of the domain
66
69
  */
67
- deleteDomain(orgName, domainName) {
70
+ deleteDomain(orgName, domainName, raw) {
68
71
  return __awaiter(this, void 0, void 0, function* () {
69
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}`));
72
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}`));
73
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
70
74
  });
71
75
  }
72
76
  getEndpoint(endpoint) {
@@ -1,4 +1,4 @@
1
- import Base from "../../../../../../Base";
1
+ import Base, { MaybeRaw } from "../../../../../../Base";
2
2
  import { FullSAMLProvider, SAMLProvider, SAMLProviderCreateDto } from "../../../../../../interfaces/idp/organization/settings/domain/saml";
3
3
  export declare class IdpSAMLProvider extends Base {
4
4
  /**
@@ -6,7 +6,9 @@ export declare class IdpSAMLProvider extends Base {
6
6
  * @param orgName Name of the Organization
7
7
  * @returns Array of SAML providers
8
8
  */
9
- getAllSAMLProvidersOfOrganization(orgName: string): Promise<FullSAMLProvider[]>;
9
+ getAllSAMLProvidersOfOrganization<R extends boolean = false>(orgName: string, raw?: {
10
+ raw: R;
11
+ }): Promise<MaybeRaw<R, FullSAMLProvider[]>>;
10
12
  /**
11
13
  * Creates a new SAML provider for the specified domain.
12
14
  * @param orgName Name of the Organization
@@ -14,7 +16,9 @@ export declare class IdpSAMLProvider extends Base {
14
16
  * @param provider SAML provider object containing the login URL, logout URL, certificates and a boolean to allow unencrypted assertion
15
17
  * @returns The created SAML provider
16
18
  */
17
- createProvider(orgName: string, domainName: string, provider: SAMLProviderCreateDto): Promise<SAMLProvider>;
19
+ createProvider<R extends boolean = false>(orgName: string, domainName: string, provider: SAMLProviderCreateDto, raw?: {
20
+ raw: R;
21
+ }): Promise<MaybeRaw<R, SAMLProvider>>;
18
22
  /**
19
23
  * Updates a SAML provider for the specified domain
20
24
  * @param orgName Name of the Organization
@@ -22,7 +26,9 @@ export declare class IdpSAMLProvider extends Base {
22
26
  * @param provider SAML provider object containing the login URL, logout URL, certificates and a boolean to allow unencrypted assertion
23
27
  * @returns The updated SAML provider
24
28
  */
25
- updateProvider(orgName: string, domainName: string, provider: SAMLProviderCreateDto): Promise<SAMLProvider>;
29
+ updateProvider<R extends boolean = false>(orgName: string, domainName: string, provider: SAMLProviderCreateDto, raw?: {
30
+ raw: R;
31
+ }): Promise<MaybeRaw<R, SAMLProvider>>;
26
32
  /**
27
33
  * Adds certificates to a SAML provider
28
34
  * @param orgName Name of the Organization
@@ -30,13 +36,17 @@ export declare class IdpSAMLProvider extends Base {
30
36
  * @param certificates Certificates to add
31
37
  * @returns The updated SAML provider
32
38
  */
33
- addCertificatesToProvider(orgName: string, domainName: string, certificates: string[]): Promise<SAMLProvider>;
39
+ addCertificatesToProvider<R extends boolean = false>(orgName: string, domainName: string, certificates: string[], raw?: {
40
+ raw: R;
41
+ }): Promise<MaybeRaw<R, SAMLProvider>>;
34
42
  /**
35
43
  * Removes a SAML provider from the specified domain
36
44
  * @param orgName Name of the Organization
37
45
  * @param domainName Name of the Domain
38
46
  */
39
- deleteProvider(orgName: string, domainName: string): Promise<void>;
47
+ deleteProvider<R extends boolean = false>(orgName: string, domainName: string, raw?: {
48
+ raw: R;
49
+ }): Promise<MaybeRaw<R, SAMLProvider>>;
40
50
  private convertProviderToFormData;
41
51
  private createFileFromString;
42
52
  protected getEndpoint(endpoint: string): string;
@@ -8,20 +8,15 @@ 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.IdpSAMLProvider = void 0;
13
- const Base_1 = require("../../../../../../Base");
16
+ const Base_1 = __importDefault(require("../../../../../../Base"));
14
17
  class IdpSAMLProvider extends Base_1.default {
15
18
  constructor() {
16
19
  super(...arguments);
17
- this.convertProviderToFormData = (provider) => {
18
- const formData = new FormData();
19
- formData.append("ssoLoginURL", provider.ssoLoginURL);
20
- formData.append("ssoLogoutURL", provider.ssoLogoutURL);
21
- provider.certificates.forEach(c => formData.append("certificate", this.createFileFromString(c)));
22
- provider.allowUnencryptedAssertion && formData.append("allowUnencryptedAssertion", provider.allowUnencryptedAssertion.toString());
23
- return formData;
24
- };
25
20
  this.createFileFromString = (certificate) => {
26
21
  const blob = new Blob([certificate]);
27
22
  return new File([blob], "certificate");
@@ -32,10 +27,10 @@ class IdpSAMLProvider extends Base_1.default {
32
27
  * @param orgName Name of the Organization
33
28
  * @returns Array of SAML providers
34
29
  */
35
- getAllSAMLProvidersOfOrganization(orgName) {
30
+ getAllSAMLProvidersOfOrganization(orgName, raw) {
36
31
  return __awaiter(this, void 0, void 0, function* () {
37
32
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/settings/domains/saml`));
38
- return resp.data;
33
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
39
34
  });
40
35
  }
41
36
  /**
@@ -45,11 +40,11 @@ class IdpSAMLProvider extends Base_1.default {
45
40
  * @param provider SAML provider object containing the login URL, logout URL, certificates and a boolean to allow unencrypted assertion
46
41
  * @returns The created SAML provider
47
42
  */
48
- createProvider(orgName, domainName, provider) {
43
+ createProvider(orgName, domainName, provider, raw) {
49
44
  return __awaiter(this, void 0, void 0, function* () {
50
45
  const formData = this.convertProviderToFormData(provider);
51
46
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/saml`), formData);
52
- return resp.data;
47
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
53
48
  });
54
49
  }
55
50
  /**
@@ -59,11 +54,11 @@ class IdpSAMLProvider extends Base_1.default {
59
54
  * @param provider SAML provider object containing the login URL, logout URL, certificates and a boolean to allow unencrypted assertion
60
55
  * @returns The updated SAML provider
61
56
  */
62
- updateProvider(orgName, domainName, provider) {
57
+ updateProvider(orgName, domainName, provider, raw) {
63
58
  return __awaiter(this, void 0, void 0, function* () {
64
59
  const formData = this.convertProviderToFormData(provider);
65
60
  const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/saml`), formData);
66
- return resp.data;
61
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
67
62
  });
68
63
  }
69
64
  /**
@@ -73,12 +68,12 @@ class IdpSAMLProvider extends Base_1.default {
73
68
  * @param certificates Certificates to add
74
69
  * @returns The updated SAML provider
75
70
  */
76
- addCertificatesToProvider(orgName, domainName, certificates) {
71
+ addCertificatesToProvider(orgName, domainName, certificates, raw) {
77
72
  return __awaiter(this, void 0, void 0, function* () {
78
73
  const formData = new FormData();
79
74
  certificates.forEach(c => formData.append("certificate", this.createFileFromString(c)));
80
75
  const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/saml/certificates`), formData);
81
- return resp.data;
76
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
82
77
  });
83
78
  }
84
79
  /**
@@ -86,11 +81,20 @@ class IdpSAMLProvider extends Base_1.default {
86
81
  * @param orgName Name of the Organization
87
82
  * @param domainName Name of the Domain
88
83
  */
89
- deleteProvider(orgName, domainName) {
84
+ deleteProvider(orgName, domainName, raw) {
90
85
  return __awaiter(this, void 0, void 0, function* () {
91
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/saml`));
86
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/domains/${domainName}/saml`));
87
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
92
88
  });
93
89
  }
90
+ convertProviderToFormData(provider) {
91
+ const formData = new FormData();
92
+ formData.append("ssoLoginURL", provider.ssoLoginURL);
93
+ formData.append("ssoLogoutURL", provider.ssoLogoutURL);
94
+ provider.certificates.forEach(c => formData.append("certificate", this.createFileFromString(c)));
95
+ provider.allowUnencryptedAssertion && formData.append("allowUnencryptedAssertion", provider.allowUnencryptedAssertion.toString());
96
+ return formData;
97
+ }
94
98
  getEndpoint(endpoint) {
95
99
  return `${this.options.server}/api/account${endpoint}`;
96
100
  }
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const Base_1 = require("../../../../Base");
6
+ const Base_1 = __importDefault(require("../../../../Base"));
4
7
  const domain_1 = require("./domain");
5
8
  const oauth_1 = require("./oauth");
6
9
  class IdpOrganizationSettings extends Base_1.default {
@@ -1,4 +1,4 @@
1
- import Base from "../../../../../Base";
1
+ import Base, { MaybeRaw } from "../../../../../Base";
2
2
  import { PaginatedResponse, SearchParams } from "../../../../../interfaces/global";
3
3
  import { OAuthApp, OAuthAppCreate } from "../../../../../interfaces/idp/organization/settings/oauthApp";
4
4
  export declare class IdpOAuthApp extends Base {
@@ -11,23 +11,29 @@ export declare class IdpOAuthApp extends Base {
11
11
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
12
12
  * @returns Object containing an array of OAuth apps and the total number of results found in the database (independent of limit and page)
13
13
  */
14
- searchOauthAppsOfOrganization({ organizationName, filters, sorting, limit, page, }: SearchParams & {
14
+ searchOauthAppsOfOrganization<R extends boolean = false>({ organizationName, filters, sorting, limit, page }: SearchParams & {
15
15
  organizationName: string;
16
- }): Promise<PaginatedResponse<OAuthApp>>;
16
+ }, raw?: {
17
+ raw: R;
18
+ }): Promise<MaybeRaw<R, PaginatedResponse<OAuthApp>>>;
17
19
  /**
18
20
  * Retrieves an OAuthApp by its ID.
19
21
  * @param orgName Name of the Organization
20
22
  * @param oauthAppId ID of the OAuthApp
21
23
  * @returns the requested OAuthApp
22
24
  */
23
- getOAuthApp(orgName: string, oauthAppId: string): Promise<OAuthApp>;
25
+ getOAuthApp<R extends boolean = false>(orgName: string, oauthAppId: string, raw?: {
26
+ raw: R;
27
+ }): Promise<MaybeRaw<R, OAuthApp>>;
24
28
  /**
25
29
  * Creates a new OAuth app in the specified Organization.
26
30
  * @param orgName Name of the Organization
27
31
  * @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
28
32
  * @returns The created OAuth app
29
33
  */
30
- createOAuthApp(orgName: string, oAuthAppCreate: OAuthAppCreate): Promise<OAuthApp>;
34
+ createOAuthApp<R extends boolean = false>(orgName: string, oAuthAppCreate: OAuthAppCreate, raw?: {
35
+ raw: R;
36
+ }): Promise<MaybeRaw<R, OAuthApp>>;
31
37
  /**
32
38
  * Updates an existing OAuth app.
33
39
  * @param orgName Name of the Organization
@@ -35,13 +41,17 @@ export declare class IdpOAuthApp extends Base {
35
41
  * @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
36
42
  * @returns the updated OAuth app
37
43
  */
38
- updateOAuthApp(orgName: string, oauthAppId: string, oAuthAppCreate: OAuthAppCreate): Promise<OAuthApp>;
44
+ updateOAuthApp<R extends boolean = false>(orgName: string, oauthAppId: string, oAuthAppCreate: OAuthAppCreate, raw?: {
45
+ raw: R;
46
+ }): Promise<MaybeRaw<R, OAuthApp>>;
39
47
  /**
40
48
  * Deletes an OAuthApp by its ID.
41
49
  * @param orgName Name of the Organization
42
50
  * @param oauthAppId ID of the OAuthApp
43
51
  */
44
- deleteOAuthApp(orgName: string, oauthAppId: string): Promise<void>;
52
+ deleteOAuthApp<R extends boolean = false>(orgName: string, oauthAppId: string, raw?: {
53
+ raw: R;
54
+ }): Promise<MaybeRaw<R, void>>;
45
55
  /**
46
56
  * Creates a new secret for an existing OAuthApp.
47
57
  * @param orgName Name of the Organization
@@ -49,7 +59,9 @@ export declare class IdpOAuthApp extends Base {
49
59
  * @param secretName Name of the Secret
50
60
  * @returns the updated OAuth app
51
61
  */
52
- createOAuthAppSecret(orgName: string, oauthAppId: string, secretName: string): Promise<OAuthApp>;
62
+ createOAuthAppSecret<R extends boolean = false>(orgName: string, oauthAppId: string, secretName: string, raw?: {
63
+ raw: R;
64
+ }): Promise<MaybeRaw<R, OAuthApp>>;
53
65
  /**
54
66
  * Deletes the specified OAuthApp secret.
55
67
  * @param orgName Name of the Organization
@@ -57,6 +69,18 @@ export declare class IdpOAuthApp extends Base {
57
69
  * @param secret Name of the secret that shall be deleted
58
70
  * @returns the updated OAuthApp
59
71
  */
60
- deleteOAuthAppSecret(orgName: string, oauthAppId: string, secret: string): Promise<OAuthApp>;
72
+ deleteOAuthAppSecret<R extends boolean = false>(orgName: string, oauthAppId: string, secret: string, raw?: {
73
+ raw: R;
74
+ }): Promise<MaybeRaw<R, OAuthApp>>;
75
+ /**
76
+ * Updates the avatar of the specified OAuth App
77
+ * @param orgName Name of the organization
78
+ * @param oauthAppId ID of the OAuthApp
79
+ * @param file Image as Javascript File
80
+ * @returns OAuth App details with updated avatar
81
+ */
82
+ updateAvatar<R extends boolean = false>(orgName: string, oauthAppId: string, file: File, raw?: {
83
+ raw: R;
84
+ }): Promise<MaybeRaw<R, OAuthApp>>;
61
85
  protected getEndpoint(endpoint: string): string;
62
86
  }
@@ -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.IdpOAuthApp = 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
  const searchFilter_1 = require("../../../../../helper/searchFilter");
16
19
  class IdpOAuthApp extends Base_1.default {
@@ -23,8 +26,8 @@ class IdpOAuthApp 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 OAuth apps and the total number of results found in the database (independent of limit and page)
25
28
  */
26
- searchOauthAppsOfOrganization(_a) {
27
- return __awaiter(this, arguments, void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0, }) {
29
+ searchOauthAppsOfOrganization(_a, raw_1) {
30
+ return __awaiter(this, arguments, void 0, function* ({ organizationName, filters, sorting, limit = 25, page = 0 }, raw) {
28
31
  const filtersDTO = filters === null || filters === void 0 ? void 0 : filters.map((f) => {
29
32
  return new searchFilter_1.SearchFilterDTO(f);
30
33
  });
@@ -32,7 +35,7 @@ class IdpOAuthApp extends Base_1.default {
32
35
  filters: filtersDTO,
33
36
  sorting: sorting,
34
37
  });
35
- return (0, paginatedResponseHelper_1.createPaginatedResponse)(resp);
38
+ 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
39
  });
37
40
  }
38
41
  /**
@@ -41,10 +44,10 @@ class IdpOAuthApp extends Base_1.default {
41
44
  * @param oauthAppId ID of the OAuthApp
42
45
  * @returns the requested OAuthApp
43
46
  */
44
- getOAuthApp(orgName, oauthAppId) {
47
+ getOAuthApp(orgName, oauthAppId, raw) {
45
48
  return __awaiter(this, void 0, void 0, function* () {
46
49
  const resp = yield this.axios.get(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`));
47
- return resp.data;
50
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
48
51
  });
49
52
  }
50
53
  /**
@@ -53,10 +56,10 @@ class IdpOAuthApp extends Base_1.default {
53
56
  * @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
54
57
  * @returns The created OAuth app
55
58
  */
56
- createOAuthApp(orgName, oAuthAppCreate) {
59
+ createOAuthApp(orgName, oAuthAppCreate, raw) {
57
60
  return __awaiter(this, void 0, void 0, function* () {
58
61
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth`), oAuthAppCreate);
59
- return resp.data;
62
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
60
63
  });
61
64
  }
62
65
  /**
@@ -66,10 +69,10 @@ class IdpOAuthApp extends Base_1.default {
66
69
  * @param oAuthAppCreate Object containing the app's name, secretName, callback and optionally a base64 encoded avatar and a description
67
70
  * @returns the updated OAuth app
68
71
  */
69
- updateOAuthApp(orgName, oauthAppId, oAuthAppCreate) {
72
+ updateOAuthApp(orgName, oauthAppId, oAuthAppCreate, raw) {
70
73
  return __awaiter(this, void 0, void 0, function* () {
71
74
  const resp = yield this.axios.put(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`), oAuthAppCreate);
72
- return resp.data;
75
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
73
76
  });
74
77
  }
75
78
  /**
@@ -77,9 +80,10 @@ class IdpOAuthApp extends Base_1.default {
77
80
  * @param orgName Name of the Organization
78
81
  * @param oauthAppId ID of the OAuthApp
79
82
  */
80
- deleteOAuthApp(orgName, oauthAppId) {
83
+ deleteOAuthApp(orgName, oauthAppId, raw) {
81
84
  return __awaiter(this, void 0, void 0, function* () {
82
- yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`));
85
+ const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}`));
86
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : undefined);
83
87
  });
84
88
  }
85
89
  /**
@@ -89,12 +93,12 @@ class IdpOAuthApp extends Base_1.default {
89
93
  * @param secretName Name of the Secret
90
94
  * @returns the updated OAuth app
91
95
  */
92
- createOAuthAppSecret(orgName, oauthAppId, secretName) {
96
+ createOAuthAppSecret(orgName, oauthAppId, secretName, raw) {
93
97
  return __awaiter(this, void 0, void 0, function* () {
94
98
  const resp = yield this.axios.post(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}/secret`), {
95
99
  secretName,
96
100
  });
97
- return resp.data;
101
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
98
102
  });
99
103
  }
100
104
  /**
@@ -104,10 +108,27 @@ class IdpOAuthApp extends Base_1.default {
104
108
  * @param secret Name of the secret that shall be deleted
105
109
  * @returns the updated OAuthApp
106
110
  */
107
- deleteOAuthAppSecret(orgName, oauthAppId, secret) {
111
+ deleteOAuthAppSecret(orgName, oauthAppId, secret, raw) {
108
112
  return __awaiter(this, void 0, void 0, function* () {
109
113
  const resp = yield this.axios.delete(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}/secret/${secret}`));
110
- return resp.data;
114
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
115
+ });
116
+ }
117
+ /**
118
+ * Updates the avatar of the specified OAuth App
119
+ * @param orgName Name of the organization
120
+ * @param oauthAppId ID of the OAuthApp
121
+ * @param file Image as Javascript File
122
+ * @returns OAuth App details with updated avatar
123
+ */
124
+ updateAvatar(orgName, oauthAppId, file, raw) {
125
+ return __awaiter(this, void 0, void 0, function* () {
126
+ const data = new FormData();
127
+ data.append("avatar", file);
128
+ const resp = yield this.axios.patch(this.getEndpoint(`/v1/org/${orgName}/settings/applications/oauth/${oauthAppId}/avatar`), data, {
129
+ headers: { "Content-Type": "multipart/form-data" },
130
+ });
131
+ return ((raw === null || raw === void 0 ? void 0 : raw.raw) ? resp : resp.data);
111
132
  });
112
133
  }
113
134
  getEndpoint(endpoint) {
@@ -0,0 +1,11 @@
1
+ import Base from "../../../../Base";
2
+ import { Stats } from "../../../../interfaces/idp/organization/stats";
3
+ export declare class IdpOrganizationStat extends Base {
4
+ /**
5
+ * Retrieves usage statistics for a specific organization.
6
+ * @param orgName Name of the organization
7
+ * @returns Statistics information
8
+ */
9
+ getStats(orgName: string): Promise<Stats>;
10
+ protected getEndpoint(endpoint: string): string;
11
+ }
@@ -0,0 +1,33 @@
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.IdpOrganizationStat = void 0;
16
+ const Base_1 = __importDefault(require("../../../../Base"));
17
+ class IdpOrganizationStat extends Base_1.default {
18
+ /**
19
+ * Retrieves usage statistics for a specific organization.
20
+ * @param orgName Name of the organization
21
+ * @returns Statistics information
22
+ */
23
+ getStats(orgName) {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const resp = yield this.axios.get(this.getEndpoint(`/${orgName}/stats`));
26
+ return resp.data;
27
+ });
28
+ }
29
+ getEndpoint(endpoint) {
30
+ return `${this.options.server}/api/account/v1/org${endpoint}`;
31
+ }
32
+ }
33
+ exports.IdpOrganizationStat = IdpOrganizationStat;
@@ -1,4 +1,4 @@
1
- import Base from "../../../../Base";
1
+ import Base, { MaybeRaw } from "../../../../Base";
2
2
  import { PaginatedResponse, SearchFilter, SearchParams, Sorting } from "../../../../interfaces/global";
3
3
  import { Team, TeamQueryOptions, TeamUsersPatchOperation } from "../../../../interfaces/idp/organization/team";
4
4
  import { ReducedUser } from "../../../../interfaces/idp/user";
@@ -10,13 +10,17 @@ export declare class IdpOrganizationTeams extends Base {
10
10
  * @param userIds List of User IDs to be added to the Team
11
11
  * @returns The created Team
12
12
  */
13
- createTeam(orgName: string, teamName: string, userIds: string[]): Promise<Team>;
13
+ createTeam<R extends boolean = false>(orgName: string, teamName: string, userIds: string[], raw?: {
14
+ raw: R;
15
+ }): Promise<MaybeRaw<R, Team>>;
14
16
  /**
15
17
  * Deletes a Team.
16
18
  * @param orgName Name of the Organization
17
19
  * @param teamName Name of the Team
18
20
  */
19
- deleteTeam(orgName: string, teamName: string): Promise<void>;
21
+ deleteTeam<R extends boolean = false>(orgName: string, teamName: string, raw?: {
22
+ raw: R;
23
+ }): Promise<MaybeRaw<R, void>>;
20
24
  /**
21
25
  * Updates an existing Team.
22
26
  * @param orgName Name of the Organization
@@ -26,14 +30,18 @@ export declare class IdpOrganizationTeams extends Base {
26
30
  * @param teamUsersPatchOperation (optional) Enum describing what operation shall be executed: Add, set or remove
27
31
  * @returns The updated Team object
28
32
  */
29
- patchTeam(orgName: string, teamName: string, newName?: string, userIds?: string[], teamUsersPatchOperation?: TeamUsersPatchOperation): Promise<Team>;
33
+ patchTeam<R extends boolean = false>(orgName: string, teamName: string, newName?: string, userIds?: string[], teamUsersPatchOperation?: TeamUsersPatchOperation, raw?: {
34
+ raw: R;
35
+ }): Promise<MaybeRaw<R, Team>>;
30
36
  /**
31
37
  * Retrieve a Team by its name.
32
38
  * @param orgName Name of the Organization
33
39
  * @param teamName Name of the Team
34
40
  * @returns The requested Team
35
41
  */
36
- getTeam(orgName: string, teamName: string): Promise<Team>;
42
+ getTeam<R extends boolean = false>(orgName: string, teamName: string, raw?: {
43
+ raw: R;
44
+ }): Promise<MaybeRaw<R, Team>>;
37
45
  /**
38
46
  * Retrieves all Teams of an Organization that match the provided search filter(s). Returns all Teams if no search filter is provided.
39
47
  * @param organizationName Name of the organization
@@ -44,14 +52,16 @@ export declare class IdpOrganizationTeams extends Base {
44
52
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
45
53
  * @returns Object containing an array of Teams and the total number of results found in the database (independent of limit and page)
46
54
  */
47
- searchTeams(params: {
55
+ searchTeams<R extends boolean = false>(params: {
48
56
  organizationName: string;
49
57
  filters: SearchFilter[];
50
58
  sorting?: Sorting;
51
59
  options?: TeamQueryOptions;
52
60
  limit?: number;
53
61
  page?: number;
54
- }): Promise<PaginatedResponse<Team>>;
62
+ }, raw?: {
63
+ raw: R;
64
+ }): Promise<MaybeRaw<R, PaginatedResponse<Team>>>;
55
65
  /**
56
66
  * Retrieves all Members of a Team that match the provided search filter(s). Returns all Members if no search filter is provided.
57
67
  * @param organizationName Name of the organization
@@ -62,11 +72,23 @@ export declare class IdpOrganizationTeams extends Base {
62
72
  * @param page (optional) Page number: Skip the first (page * limit) results (defaults to 0)
63
73
  * @returns Object containing an array of Team members and the total number of results found in the database (independent of limit and page)
64
74
  */
65
- searchTeamMembers({ organizationName, teamName, filters, sorting, limit, page, }: SearchParams & {
75
+ searchTeamMembers<R extends boolean = false>({ organizationName, teamName, filters, sorting, limit, page }: SearchParams & {
66
76
  organizationName: string;
67
77
  teamName: string;
68
- }): Promise<PaginatedResponse<ReducedUser & {
78
+ }, raw?: {
79
+ raw: R;
80
+ }): Promise<MaybeRaw<R, PaginatedResponse<ReducedUser & {
69
81
  email: string;
70
- }>>;
82
+ }>>>;
83
+ /**
84
+ * Updates the avatar of the specified team
85
+ * @param orgName Name of the organization
86
+ * @param teamName Name of the Team
87
+ * @param file Image as Javascript File
88
+ * @returns Team details with updated avatar
89
+ */
90
+ updateAvatar<R extends boolean = false>(orgName: string, teamName: string, file: File, raw?: {
91
+ raw: R;
92
+ }): Promise<MaybeRaw<R, Team>>;
71
93
  protected getEndpoint(endpoint: string): string;
72
94
  }