@space-df/sdk 0.0.1-dev.3.3 → 0.0.1-dev.31

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 (432) hide show
  1. package/.editorconfig +24 -0
  2. package/.github/pull_request_template.md +25 -0
  3. package/.github/workflows/bump-version.yml +67 -0
  4. package/.github/workflows/publish-package.yml +28 -0
  5. package/.gitignore +11 -0
  6. package/CODE_OF_CONDUCT.md +128 -0
  7. package/CONTRIBUTING.md +89 -0
  8. package/api.doc.md +3042 -0
  9. package/dist/LICENSE +7 -0
  10. package/dist/README.md +382 -0
  11. package/{index.d.mts → dist/index.d.mts} +18 -1
  12. package/{index.d.ts → dist/index.d.ts} +18 -1
  13. package/dist/index.d.ts.map +1 -0
  14. package/{index.js → dist/index.js} +20 -5
  15. package/dist/index.js.map +1 -0
  16. package/{index.mjs → dist/index.mjs} +20 -5
  17. package/dist/index.mjs.map +1 -0
  18. package/dist/package.json +101 -0
  19. package/{resources → dist/resources}/auth/auth.d.ts +20 -1
  20. package/dist/resources/auth/auth.d.ts.map +1 -0
  21. package/{resources → dist/resources}/auth/auth.js +15 -0
  22. package/dist/resources/auth/auth.js.map +1 -0
  23. package/{resources → dist/resources}/auth/auth.mjs +15 -0
  24. package/dist/resources/auth/auth.mjs.map +1 -0
  25. package/{resources → dist/resources}/auth/index.d.ts +2 -0
  26. package/{resources → dist/resources}/auth/index.d.ts.map +1 -1
  27. package/{resources → dist/resources}/auth/index.js +2 -0
  28. package/{resources → dist/resources}/auth/index.js.map +1 -1
  29. package/{resources → dist/resources}/auth/index.mjs +2 -0
  30. package/dist/resources/auth/presigned-url.d.ts +10 -0
  31. package/dist/resources/auth/presigned-url.d.ts.map +1 -0
  32. package/dist/resources/auth/presigned-url.js +11 -0
  33. package/dist/resources/auth/presigned-url.js.map +1 -0
  34. package/dist/resources/auth/presigned-url.mjs +7 -0
  35. package/dist/resources/auth/presigned-url.mjs.map +1 -0
  36. package/{resources → dist/resources}/auth/space-policies.d.ts +6 -3
  37. package/dist/resources/auth/space-policies.d.ts.map +1 -0
  38. package/dist/resources/auth/space-policies.js +29 -0
  39. package/dist/resources/auth/space-policies.js.map +1 -0
  40. package/dist/resources/auth/space-policies.mjs +25 -0
  41. package/dist/resources/auth/space-policies.mjs.map +1 -0
  42. package/dist/resources/auth/space-role-users.d.ts +27 -0
  43. package/dist/resources/auth/space-role-users.d.ts.map +1 -0
  44. package/dist/resources/auth/space-role-users.js +53 -0
  45. package/dist/resources/auth/space-role-users.js.map +1 -0
  46. package/dist/resources/auth/space-role-users.mjs +49 -0
  47. package/dist/resources/auth/space-role-users.mjs.map +1 -0
  48. package/{resources → dist/resources}/auth/space-roles.d.ts +14 -3
  49. package/dist/resources/auth/space-roles.d.ts.map +1 -0
  50. package/dist/resources/auth/space-roles.js +54 -0
  51. package/dist/resources/auth/space-roles.js.map +1 -0
  52. package/dist/resources/auth/space-roles.mjs +50 -0
  53. package/dist/resources/auth/space-roles.mjs.map +1 -0
  54. package/{resources → dist/resources}/auth/spaces.d.ts +21 -8
  55. package/dist/resources/auth/spaces.d.ts.map +1 -0
  56. package/{resources → dist/resources}/auth/spaces.js +18 -6
  57. package/dist/resources/auth/spaces.js.map +1 -0
  58. package/{resources → dist/resources}/auth/spaces.mjs +18 -6
  59. package/dist/resources/auth/spaces.mjs.map +1 -0
  60. package/dist/resources/auth/users.d.ts +19 -0
  61. package/dist/resources/auth/users.d.ts.map +1 -0
  62. package/dist/resources/auth/users.js +17 -0
  63. package/dist/resources/auth/users.js.map +1 -0
  64. package/dist/resources/auth/users.mjs +13 -0
  65. package/dist/resources/auth/users.mjs.map +1 -0
  66. package/{resources → dist/resources}/dashboard/index.d.ts +1 -0
  67. package/{resources → dist/resources}/dashboard/index.d.ts.map +1 -1
  68. package/{resources → dist/resources}/dashboard/index.js +1 -0
  69. package/{resources → dist/resources}/dashboard/index.js.map +1 -1
  70. package/{resources → dist/resources}/dashboard/index.mjs +1 -0
  71. package/dist/resources/dashboard/widget.d.ts +11 -0
  72. package/dist/resources/dashboard/widget.d.ts.map +1 -0
  73. package/dist/resources/dashboard/widget.js +15 -0
  74. package/dist/resources/dashboard/widget.js.map +1 -0
  75. package/dist/resources/dashboard/widget.mjs +11 -0
  76. package/dist/resources/dashboard/widget.mjs.map +1 -0
  77. package/dist/resources/device/device-connector.d.ts +25 -0
  78. package/dist/resources/device/device-connector.d.ts.map +1 -0
  79. package/dist/resources/device/device-connector.js +30 -0
  80. package/dist/resources/device/device-connector.js.map +1 -0
  81. package/dist/resources/device/device-connector.mjs +26 -0
  82. package/dist/resources/device/device-connector.mjs.map +1 -0
  83. package/dist/resources/device/device-model.d.ts +20 -0
  84. package/dist/resources/device/device-model.d.ts.map +1 -0
  85. package/{resources/auth/space-roles.js → dist/resources/device/device-model.js} +10 -10
  86. package/dist/resources/device/device-model.js.map +1 -0
  87. package/{resources/auth/space-roles.mjs → dist/resources/device/device-model.mjs} +8 -8
  88. package/dist/resources/device/device-model.mjs.map +1 -0
  89. package/dist/resources/device/device-spaces.d.ts +19 -0
  90. package/dist/resources/device/device-spaces.d.ts.map +1 -0
  91. package/{resources/auth/space-role-users.js → dist/resources/device/device-spaces.js} +10 -8
  92. package/dist/resources/device/device-spaces.js.map +1 -0
  93. package/{resources/auth/space-role-users.mjs → dist/resources/device/device-spaces.mjs} +8 -6
  94. package/dist/resources/device/device-spaces.mjs.map +1 -0
  95. package/dist/resources/device/devices.d.ts +19 -0
  96. package/dist/resources/device/devices.d.ts.map +1 -0
  97. package/dist/resources/device/devices.js +58 -0
  98. package/dist/resources/device/devices.js.map +1 -0
  99. package/dist/resources/device/devices.mjs +54 -0
  100. package/dist/resources/device/devices.mjs.map +1 -0
  101. package/dist/resources/device/index.d.ts +8 -0
  102. package/dist/resources/device/index.d.ts.map +1 -0
  103. package/dist/resources/device/index.js +24 -0
  104. package/dist/resources/device/index.js.map +1 -0
  105. package/dist/resources/device/index.mjs +8 -0
  106. package/dist/resources/device/index.mjs.map +1 -0
  107. package/dist/resources/device/manufacturers.d.ts +20 -0
  108. package/dist/resources/device/manufacturers.d.ts.map +1 -0
  109. package/dist/resources/device/manufacturers.js +52 -0
  110. package/dist/resources/device/manufacturers.js.map +1 -0
  111. package/dist/resources/device/manufacturers.mjs +48 -0
  112. package/dist/resources/device/manufacturers.mjs.map +1 -0
  113. package/dist/resources/device/network-server.d.ts +19 -0
  114. package/dist/resources/device/network-server.d.ts.map +1 -0
  115. package/dist/resources/device/network-server.js +52 -0
  116. package/dist/resources/device/network-server.js.map +1 -0
  117. package/dist/resources/device/network-server.mjs +48 -0
  118. package/dist/resources/device/network-server.mjs.map +1 -0
  119. package/dist/resources/device/trip.d.ts +24 -0
  120. package/dist/resources/device/trip.d.ts.map +1 -0
  121. package/dist/resources/device/trip.js +49 -0
  122. package/dist/resources/device/trip.js.map +1 -0
  123. package/dist/resources/device/trip.mjs +45 -0
  124. package/dist/resources/device/trip.mjs.map +1 -0
  125. package/{resources → dist/resources}/index.d.ts +2 -0
  126. package/{resources → dist/resources}/index.d.ts.map +1 -1
  127. package/{resources → dist/resources}/index.js +2 -0
  128. package/{resources → dist/resources}/index.js.map +1 -1
  129. package/dist/resources/index.mjs +6 -0
  130. package/dist/resources/organizations/index.d.ts +2 -0
  131. package/dist/resources/organizations/index.d.ts.map +1 -0
  132. package/dist/resources/organizations/index.js +18 -0
  133. package/dist/resources/organizations/index.js.map +1 -0
  134. package/dist/resources/organizations/index.mjs +2 -0
  135. package/dist/resources/organizations/index.mjs.map +1 -0
  136. package/dist/resources/organizations/organizations.d.ts +9 -0
  137. package/dist/resources/organizations/organizations.d.ts.map +1 -0
  138. package/dist/resources/organizations/organizations.js +11 -0
  139. package/dist/resources/organizations/organizations.js.map +1 -0
  140. package/dist/resources/organizations/organizations.mjs +7 -0
  141. package/dist/resources/organizations/organizations.mjs.map +1 -0
  142. package/dist/src/_shims/MultipartBody.ts +9 -0
  143. package/dist/src/_shims/README.md +46 -0
  144. package/dist/src/_shims/auto/runtime-bun.ts +4 -0
  145. package/dist/src/_shims/auto/runtime-node.ts +4 -0
  146. package/dist/src/_shims/auto/runtime.ts +4 -0
  147. package/dist/src/_shims/auto/types-node.ts +4 -0
  148. package/dist/src/_shims/auto/types.d.ts +101 -0
  149. package/dist/src/_shims/auto/types.js +3 -0
  150. package/dist/src/_shims/auto/types.mjs +3 -0
  151. package/dist/src/_shims/bun-runtime.ts +14 -0
  152. package/dist/src/_shims/index.d.ts +72 -0
  153. package/dist/src/_shims/index.js +13 -0
  154. package/dist/src/_shims/index.mjs +7 -0
  155. package/dist/src/_shims/manual-types.d.ts +12 -0
  156. package/dist/src/_shims/manual-types.js +3 -0
  157. package/dist/src/_shims/manual-types.mjs +3 -0
  158. package/dist/src/_shims/node-runtime.ts +78 -0
  159. package/dist/src/_shims/node-types.d.ts +42 -0
  160. package/dist/src/_shims/node-types.js +3 -0
  161. package/dist/src/_shims/node-types.mjs +3 -0
  162. package/dist/src/_shims/registry.ts +60 -0
  163. package/dist/src/_shims/web-runtime.ts +91 -0
  164. package/dist/src/_shims/web-types.d.ts +83 -0
  165. package/dist/src/_shims/web-types.js +3 -0
  166. package/dist/src/_shims/web-types.mjs +3 -0
  167. package/dist/src/core.ts +1061 -0
  168. package/dist/src/error.ts +134 -0
  169. package/dist/src/index.ts +230 -0
  170. package/dist/src/libs/utils.ts +66 -0
  171. package/dist/src/resource.ts +9 -0
  172. package/dist/src/resources/auth/auth.ts +132 -0
  173. package/dist/src/resources/auth/credentials.ts +12 -0
  174. package/dist/src/resources/auth/index.ts +8 -0
  175. package/dist/src/resources/auth/presigned-url.ts +13 -0
  176. package/dist/src/resources/auth/space-policies.ts +70 -0
  177. package/dist/src/resources/auth/space-role-users.ts +79 -0
  178. package/dist/src/resources/auth/space-roles.ts +110 -0
  179. package/dist/src/resources/auth/spaces.ts +145 -0
  180. package/dist/src/resources/auth/users.ts +36 -0
  181. package/dist/src/resources/console/index.ts +1 -0
  182. package/dist/src/resources/console/oauth2.ts +83 -0
  183. package/dist/src/resources/dashboard/dashboards.ts +171 -0
  184. package/dist/src/resources/dashboard/device-states.ts +142 -0
  185. package/dist/src/resources/dashboard/index.ts +3 -0
  186. package/dist/src/resources/dashboard/widget.ts +17 -0
  187. package/dist/src/resources/device/device-connector.ts +49 -0
  188. package/dist/src/resources/device/device-model.ts +65 -0
  189. package/dist/src/resources/device/device-spaces.ts +42 -0
  190. package/dist/src/resources/device/devices.ts +70 -0
  191. package/dist/src/resources/device/index.ts +7 -0
  192. package/dist/src/resources/device/manufacturers.ts +65 -0
  193. package/dist/src/resources/device/network-server.ts +64 -0
  194. package/dist/src/resources/device/trip.ts +69 -0
  195. package/dist/src/resources/index.ts +8 -0
  196. package/dist/src/resources/organizations/index.ts +1 -0
  197. package/dist/src/resources/organizations/organizations.ts +12 -0
  198. package/dist/src/shims/node.ts +50 -0
  199. package/dist/src/shims/web.ts +50 -0
  200. package/dist/src/types/api.ts +31 -0
  201. package/dist/src/types/jwt.ts +12 -0
  202. package/dist/src/version.ts +1 -0
  203. package/dist/version.d.ts +2 -0
  204. package/dist/version.d.ts.map +1 -0
  205. package/{version.js → dist/version.js} +1 -1
  206. package/dist/version.js.map +1 -0
  207. package/dist/version.mjs +2 -0
  208. package/{version.mjs.map → dist/version.mjs.map} +1 -1
  209. package/eslint.config.mjs +33 -0
  210. package/examples/auth/login.ts +14 -0
  211. package/examples/auth/register.ts +15 -0
  212. package/examples/console/oauth2.ts +15 -0
  213. package/package.json +52 -36
  214. package/scripts/build +56 -0
  215. package/scripts/utils/check-version.cjs +20 -0
  216. package/scripts/utils/fix-index-exports.cjs +8 -0
  217. package/scripts/utils/make-dist-package-json.cjs +21 -0
  218. package/scripts/utils/postprocess-files.cjs +153 -0
  219. package/src/_shims/auto/runtime-deno.ts +4 -0
  220. package/src/_shims/auto/types-deno.ts +4 -0
  221. package/src/_shims/auto/types.d.ts +18 -18
  222. package/src/_shims/index-deno.ts +105 -0
  223. package/src/_shims/index.d.ts +1 -1
  224. package/src/_shims/index.mjs +1 -1
  225. package/src/index.ts +28 -4
  226. package/src/resources/auth/auth.ts +42 -2
  227. package/src/resources/auth/index.ts +2 -0
  228. package/src/resources/auth/presigned-url.ts +13 -0
  229. package/src/resources/auth/space-policies.ts +22 -7
  230. package/src/resources/auth/space-role-users.ts +43 -6
  231. package/src/resources/auth/space-roles.ts +27 -12
  232. package/src/resources/auth/spaces.ts +42 -15
  233. package/src/resources/auth/users.ts +36 -0
  234. package/src/resources/dashboard/index.ts +1 -0
  235. package/src/resources/dashboard/widget.ts +17 -0
  236. package/src/resources/device/device-connector.ts +49 -0
  237. package/src/resources/device/device-model.ts +65 -0
  238. package/src/resources/device/device-spaces.ts +42 -0
  239. package/src/resources/device/devices.ts +70 -0
  240. package/src/resources/device/index.ts +7 -0
  241. package/src/resources/device/manufacturers.ts +65 -0
  242. package/src/resources/device/network-server.ts +64 -0
  243. package/src/resources/device/trip.ts +69 -0
  244. package/src/resources/index.ts +2 -0
  245. package/src/resources/organizations/index.ts +1 -0
  246. package/src/resources/organizations/organizations.ts +12 -0
  247. package/src/version.ts +1 -1
  248. package/tsc-multi.json +7 -0
  249. package/tsconfig.build.json +18 -0
  250. package/tsconfig.deno.json +20 -0
  251. package/tsconfig.dist-src.json +11 -0
  252. package/tsconfig.json +38 -0
  253. package/index.d.ts.map +0 -1
  254. package/index.js.map +0 -1
  255. package/index.mjs.map +0 -1
  256. package/resources/auth/auth.d.ts.map +0 -1
  257. package/resources/auth/auth.js.map +0 -1
  258. package/resources/auth/auth.mjs.map +0 -1
  259. package/resources/auth/space-policies.d.ts.map +0 -1
  260. package/resources/auth/space-policies.js +0 -18
  261. package/resources/auth/space-policies.js.map +0 -1
  262. package/resources/auth/space-policies.mjs +0 -14
  263. package/resources/auth/space-policies.mjs.map +0 -1
  264. package/resources/auth/space-role-users.d.ts +0 -17
  265. package/resources/auth/space-role-users.d.ts.map +0 -1
  266. package/resources/auth/space-role-users.js.map +0 -1
  267. package/resources/auth/space-role-users.mjs.map +0 -1
  268. package/resources/auth/space-roles.d.ts.map +0 -1
  269. package/resources/auth/space-roles.js.map +0 -1
  270. package/resources/auth/space-roles.mjs.map +0 -1
  271. package/resources/auth/spaces.d.ts.map +0 -1
  272. package/resources/auth/spaces.js.map +0 -1
  273. package/resources/auth/spaces.mjs.map +0 -1
  274. package/resources/index.mjs +0 -4
  275. package/src/resources/.DS_Store +0 -0
  276. package/version.d.ts +0 -2
  277. package/version.d.ts.map +0 -1
  278. package/version.js.map +0 -1
  279. package/version.mjs +0 -2
  280. package/yarn.lock +0 -268
  281. /package/{_shims → dist/_shims}/MultipartBody.d.ts +0 -0
  282. /package/{_shims → dist/_shims}/MultipartBody.d.ts.map +0 -0
  283. /package/{_shims → dist/_shims}/MultipartBody.js +0 -0
  284. /package/{_shims → dist/_shims}/MultipartBody.js.map +0 -0
  285. /package/{_shims → dist/_shims}/MultipartBody.mjs +0 -0
  286. /package/{_shims → dist/_shims}/MultipartBody.mjs.map +0 -0
  287. /package/{_shims → dist/_shims}/README.md +0 -0
  288. /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts +0 -0
  289. /package/{_shims → dist/_shims}/auto/runtime-bun.d.ts.map +0 -0
  290. /package/{_shims → dist/_shims}/auto/runtime-bun.js +0 -0
  291. /package/{_shims → dist/_shims}/auto/runtime-bun.js.map +0 -0
  292. /package/{_shims → dist/_shims}/auto/runtime-bun.mjs +0 -0
  293. /package/{_shims → dist/_shims}/auto/runtime-bun.mjs.map +0 -0
  294. /package/{_shims → dist/_shims}/auto/runtime-node.d.ts +0 -0
  295. /package/{_shims → dist/_shims}/auto/runtime-node.d.ts.map +0 -0
  296. /package/{_shims → dist/_shims}/auto/runtime-node.js +0 -0
  297. /package/{_shims → dist/_shims}/auto/runtime-node.js.map +0 -0
  298. /package/{_shims → dist/_shims}/auto/runtime-node.mjs +0 -0
  299. /package/{_shims → dist/_shims}/auto/runtime-node.mjs.map +0 -0
  300. /package/{_shims → dist/_shims}/auto/runtime.d.ts +0 -0
  301. /package/{_shims → dist/_shims}/auto/runtime.d.ts.map +0 -0
  302. /package/{_shims → dist/_shims}/auto/runtime.js +0 -0
  303. /package/{_shims → dist/_shims}/auto/runtime.js.map +0 -0
  304. /package/{_shims → dist/_shims}/auto/runtime.mjs +0 -0
  305. /package/{_shims → dist/_shims}/auto/runtime.mjs.map +0 -0
  306. /package/{_shims → dist/_shims}/auto/types-node.d.ts +0 -0
  307. /package/{_shims → dist/_shims}/auto/types-node.d.ts.map +0 -0
  308. /package/{_shims → dist/_shims}/auto/types-node.js +0 -0
  309. /package/{_shims → dist/_shims}/auto/types-node.js.map +0 -0
  310. /package/{_shims → dist/_shims}/auto/types-node.mjs +0 -0
  311. /package/{_shims → dist/_shims}/auto/types-node.mjs.map +0 -0
  312. /package/{_shims → dist/_shims}/auto/types.d.ts +0 -0
  313. /package/{_shims → dist/_shims}/auto/types.js +0 -0
  314. /package/{_shims → dist/_shims}/auto/types.mjs +0 -0
  315. /package/{_shims → dist/_shims}/bun-runtime.d.ts +0 -0
  316. /package/{_shims → dist/_shims}/bun-runtime.d.ts.map +0 -0
  317. /package/{_shims → dist/_shims}/bun-runtime.js +0 -0
  318. /package/{_shims → dist/_shims}/bun-runtime.js.map +0 -0
  319. /package/{_shims → dist/_shims}/bun-runtime.mjs +0 -0
  320. /package/{_shims → dist/_shims}/bun-runtime.mjs.map +0 -0
  321. /package/{_shims → dist/_shims}/index.d.ts +0 -0
  322. /package/{_shims → dist/_shims}/index.js +0 -0
  323. /package/{_shims → dist/_shims}/index.mjs +0 -0
  324. /package/{_shims → dist/_shims}/manual-types.d.ts +0 -0
  325. /package/{_shims → dist/_shims}/manual-types.js +0 -0
  326. /package/{_shims → dist/_shims}/manual-types.mjs +0 -0
  327. /package/{_shims → dist/_shims}/node-runtime.d.ts +0 -0
  328. /package/{_shims → dist/_shims}/node-runtime.d.ts.map +0 -0
  329. /package/{_shims → dist/_shims}/node-runtime.js +0 -0
  330. /package/{_shims → dist/_shims}/node-runtime.js.map +0 -0
  331. /package/{_shims → dist/_shims}/node-runtime.mjs +0 -0
  332. /package/{_shims → dist/_shims}/node-runtime.mjs.map +0 -0
  333. /package/{_shims → dist/_shims}/node-types.d.ts +0 -0
  334. /package/{_shims → dist/_shims}/node-types.js +0 -0
  335. /package/{_shims → dist/_shims}/node-types.mjs +0 -0
  336. /package/{_shims → dist/_shims}/registry.d.ts +0 -0
  337. /package/{_shims → dist/_shims}/registry.d.ts.map +0 -0
  338. /package/{_shims → dist/_shims}/registry.js +0 -0
  339. /package/{_shims → dist/_shims}/registry.js.map +0 -0
  340. /package/{_shims → dist/_shims}/registry.mjs +0 -0
  341. /package/{_shims → dist/_shims}/registry.mjs.map +0 -0
  342. /package/{_shims → dist/_shims}/web-runtime.d.ts +0 -0
  343. /package/{_shims → dist/_shims}/web-runtime.d.ts.map +0 -0
  344. /package/{_shims → dist/_shims}/web-runtime.js +0 -0
  345. /package/{_shims → dist/_shims}/web-runtime.js.map +0 -0
  346. /package/{_shims → dist/_shims}/web-runtime.mjs +0 -0
  347. /package/{_shims → dist/_shims}/web-runtime.mjs.map +0 -0
  348. /package/{_shims → dist/_shims}/web-types.d.ts +0 -0
  349. /package/{_shims → dist/_shims}/web-types.js +0 -0
  350. /package/{_shims → dist/_shims}/web-types.mjs +0 -0
  351. /package/{core.d.ts → dist/core.d.ts} +0 -0
  352. /package/{core.d.ts.map → dist/core.d.ts.map} +0 -0
  353. /package/{core.js → dist/core.js} +0 -0
  354. /package/{core.js.map → dist/core.js.map} +0 -0
  355. /package/{core.mjs → dist/core.mjs} +0 -0
  356. /package/{core.mjs.map → dist/core.mjs.map} +0 -0
  357. /package/{error.d.ts → dist/error.d.ts} +0 -0
  358. /package/{error.d.ts.map → dist/error.d.ts.map} +0 -0
  359. /package/{error.js → dist/error.js} +0 -0
  360. /package/{error.js.map → dist/error.js.map} +0 -0
  361. /package/{error.mjs → dist/error.mjs} +0 -0
  362. /package/{error.mjs.map → dist/error.mjs.map} +0 -0
  363. /package/{libs → dist/libs}/utils.d.ts +0 -0
  364. /package/{libs → dist/libs}/utils.d.ts.map +0 -0
  365. /package/{libs → dist/libs}/utils.js +0 -0
  366. /package/{libs → dist/libs}/utils.js.map +0 -0
  367. /package/{libs → dist/libs}/utils.mjs +0 -0
  368. /package/{libs → dist/libs}/utils.mjs.map +0 -0
  369. /package/{resource.d.ts → dist/resource.d.ts} +0 -0
  370. /package/{resource.d.ts.map → dist/resource.d.ts.map} +0 -0
  371. /package/{resource.js → dist/resource.js} +0 -0
  372. /package/{resource.js.map → dist/resource.js.map} +0 -0
  373. /package/{resource.mjs → dist/resource.mjs} +0 -0
  374. /package/{resource.mjs.map → dist/resource.mjs.map} +0 -0
  375. /package/{resources → dist/resources}/auth/credentials.d.ts +0 -0
  376. /package/{resources → dist/resources}/auth/credentials.d.ts.map +0 -0
  377. /package/{resources → dist/resources}/auth/credentials.js +0 -0
  378. /package/{resources → dist/resources}/auth/credentials.js.map +0 -0
  379. /package/{resources → dist/resources}/auth/credentials.mjs +0 -0
  380. /package/{resources → dist/resources}/auth/credentials.mjs.map +0 -0
  381. /package/{resources → dist/resources}/auth/index.mjs.map +0 -0
  382. /package/{resources → dist/resources}/console/index.d.ts +0 -0
  383. /package/{resources → dist/resources}/console/index.d.ts.map +0 -0
  384. /package/{resources → dist/resources}/console/index.js +0 -0
  385. /package/{resources → dist/resources}/console/index.js.map +0 -0
  386. /package/{resources → dist/resources}/console/index.mjs +0 -0
  387. /package/{resources → dist/resources}/console/index.mjs.map +0 -0
  388. /package/{resources → dist/resources}/console/oauth2.d.ts +0 -0
  389. /package/{resources → dist/resources}/console/oauth2.d.ts.map +0 -0
  390. /package/{resources → dist/resources}/console/oauth2.js +0 -0
  391. /package/{resources → dist/resources}/console/oauth2.js.map +0 -0
  392. /package/{resources → dist/resources}/console/oauth2.mjs +0 -0
  393. /package/{resources → dist/resources}/console/oauth2.mjs.map +0 -0
  394. /package/{resources → dist/resources}/dashboard/dashboards.d.ts +0 -0
  395. /package/{resources → dist/resources}/dashboard/dashboards.d.ts.map +0 -0
  396. /package/{resources → dist/resources}/dashboard/dashboards.js +0 -0
  397. /package/{resources → dist/resources}/dashboard/dashboards.js.map +0 -0
  398. /package/{resources → dist/resources}/dashboard/dashboards.mjs +0 -0
  399. /package/{resources → dist/resources}/dashboard/dashboards.mjs.map +0 -0
  400. /package/{resources → dist/resources}/dashboard/device-states.d.ts +0 -0
  401. /package/{resources → dist/resources}/dashboard/device-states.d.ts.map +0 -0
  402. /package/{resources → dist/resources}/dashboard/device-states.js +0 -0
  403. /package/{resources → dist/resources}/dashboard/device-states.js.map +0 -0
  404. /package/{resources → dist/resources}/dashboard/device-states.mjs +0 -0
  405. /package/{resources → dist/resources}/dashboard/device-states.mjs.map +0 -0
  406. /package/{resources → dist/resources}/dashboard/index.mjs.map +0 -0
  407. /package/{resources → dist/resources}/index.mjs.map +0 -0
  408. /package/{shims → dist/shims}/node.d.ts +0 -0
  409. /package/{shims → dist/shims}/node.d.ts.map +0 -0
  410. /package/{shims → dist/shims}/node.js +0 -0
  411. /package/{shims → dist/shims}/node.js.map +0 -0
  412. /package/{shims → dist/shims}/node.mjs +0 -0
  413. /package/{shims → dist/shims}/node.mjs.map +0 -0
  414. /package/{shims → dist/shims}/web.d.ts +0 -0
  415. /package/{shims → dist/shims}/web.d.ts.map +0 -0
  416. /package/{shims → dist/shims}/web.js +0 -0
  417. /package/{shims → dist/shims}/web.js.map +0 -0
  418. /package/{shims → dist/shims}/web.mjs +0 -0
  419. /package/{shims → dist/shims}/web.mjs.map +0 -0
  420. /package/{src → dist/src}/tsconfig.json +0 -0
  421. /package/{types → dist/types}/api.d.ts +0 -0
  422. /package/{types → dist/types}/api.d.ts.map +0 -0
  423. /package/{types → dist/types}/api.js +0 -0
  424. /package/{types → dist/types}/api.js.map +0 -0
  425. /package/{types → dist/types}/api.mjs +0 -0
  426. /package/{types → dist/types}/api.mjs.map +0 -0
  427. /package/{types → dist/types}/jwt.d.ts +0 -0
  428. /package/{types → dist/types}/jwt.d.ts.map +0 -0
  429. /package/{types → dist/types}/jwt.js +0 -0
  430. /package/{types → dist/types}/jwt.js.map +0 -0
  431. /package/{types → dist/types}/jwt.mjs +0 -0
  432. /package/{types → dist/types}/jwt.mjs.map +0 -0
@@ -0,0 +1,79 @@
1
+ import { APIResource } from '../../resource';
2
+ import { ListParamsResponse, ListResponse } from '../../types/api';
3
+ import * as Core from '../../core';
4
+
5
+ export class SpaceRoleUsers extends APIResource {
6
+ retrieve(id: number, params: SpaceRoleUsersParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRoleUser> {
7
+ const { 'X-Space': xspace } = params;
8
+ return this._client.get(`/space-role-users/${id}`, {
9
+ ...options,
10
+ headers: { ...options?.headers, 'X-Space': xspace },
11
+ });
12
+ }
13
+
14
+ list(spaceName: string, params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<SpaceRoleUserListResponse> {
15
+ const { ...query } = params;
16
+ return this._client.get(`/space-role-users`, {
17
+ query,
18
+ ...options,
19
+ headers: { ...options?.headers, 'X-Space': spaceName },
20
+ });
21
+ }
22
+
23
+ update(id: number, params: SpaceRoleUserUpdateParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRoleUserUpdateParams> {
24
+ const { 'X-Space': xspace, ...body } = params;
25
+ return this._client.put(`/space-role-users/${id}`, {
26
+ body,
27
+ ...options,
28
+ headers: { ...options?.headers, 'X-Space': xspace },
29
+ });
30
+ }
31
+
32
+ partialUpdate(id: number, params: SpaceRoleUserUpdateParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRoleUserUpdateParams> {
33
+ const { 'X-Space': xspace, ...body } = params;
34
+ return this._client.patch(`/space-role-users/${id}`, {
35
+ body,
36
+ ...options,
37
+ headers: { ...options?.headers, 'X-Space': xspace },
38
+ });
39
+ }
40
+
41
+ setSpaceDefault(id: String, params: SpaceRoleUsersParams, options?: Core.RequestOptions): Core.APIPromise<void> {
42
+ const { 'X-Space': xspace } = params;
43
+ return this._client.post(`/space-role-users/${id}/default`, {
44
+ ...options,
45
+ headers: { ...options?.headers, 'X-Space': xspace },
46
+ });
47
+ }
48
+
49
+ delete(id: number, params: SpaceRoleUsersParams, options?: Core.RequestOptions): Core.APIPromise<void> {
50
+ const { 'X-Space': xspace } = params;
51
+ return this._client.delete(`/space-role-users/${id}`, {
52
+ ...options,
53
+ headers: { Accept: '*/*', ...options?.headers, 'X-Space': xspace },
54
+ });
55
+ }
56
+ }
57
+
58
+ export interface SpaceRoleUser {
59
+ organization_user: number;
60
+
61
+ space_role: number;
62
+
63
+ id?: number;
64
+
65
+ readonly created_at?: string;
66
+
67
+ readonly updated_at?: string;
68
+ }
69
+
70
+ export interface SpaceRoleUserUpdateParams {
71
+ space_role: string;
72
+ 'X-Space': string;
73
+ }
74
+
75
+ export interface SpaceRoleUsersParams {
76
+ 'X-Space': string;
77
+ }
78
+
79
+ export type SpaceRoleUserListResponse = ListResponse<SpaceRoleUser>;
@@ -0,0 +1,110 @@
1
+ import { APIResource } from '../../resource';
2
+ import { ListParamsResponse, ListResponse } from '../../types/api';
3
+ import * as Core from '../../core';
4
+
5
+ export class SpaceRoles extends APIResource {
6
+ create(params: SpaceRoleCreateParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRole> {
7
+ const { 'X-Space': xspace, ...body } = params;
8
+ return this._client.post(`/space-roles`, {
9
+ body,
10
+ ...options,
11
+ headers: { ...options?.headers, 'X-Space': xspace },
12
+ });
13
+ }
14
+
15
+ retrieve(id: number, params: SpaceRoleParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRole> {
16
+ const { 'X-Space': xspace } = params;
17
+ return this._client.get(`/space-roles/${id}`, {
18
+ ...options,
19
+ headers: { ...options?.headers, 'X-Space': xspace },
20
+ });
21
+ }
22
+
23
+ update(id: number, params: SpaceRoleUpdateParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRole> {
24
+ const { 'X-Space': xspace, ...body } = params;
25
+ return this._client.put(`/space-roles/${id}`, {
26
+ body,
27
+ ...options,
28
+ headers: { ...options?.headers, 'X-Space': xspace },
29
+ });
30
+ }
31
+
32
+ partialUpdate(id: number, params: SpaceRoleUpdateParams, options?: Core.RequestOptions): Core.APIPromise<SpaceRole> {
33
+ const { 'X-Space': xspace, ...body } = params;
34
+ return this._client.patch(`/space-roles/${id}`, {
35
+ body,
36
+ ...options,
37
+ headers: { ...options?.headers, 'X-Space': xspace },
38
+ });
39
+ }
40
+
41
+ list(spaceName: string, params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<SpaceRoleListResponse> {
42
+ const { ...query } = params;
43
+ return this._client.get(`/space-roles`, {
44
+ query,
45
+ ...options,
46
+ headers: { ...options?.headers, 'X-Space': spaceName },
47
+ });
48
+ }
49
+
50
+ delete(id: number, params: SpaceRoleParams, options?: Core.RequestOptions): Core.APIPromise<void> {
51
+ const { 'X-Space': xspace } = params;
52
+ return this._client.delete(`/space-roles/${id}`, {
53
+ ...options,
54
+ headers: { Accept: '*/*', ...options?.headers, 'X-Space': xspace },
55
+ });
56
+ }
57
+ }
58
+
59
+ export interface SpaceRole {
60
+ name: string;
61
+
62
+ policies: Array<number>;
63
+
64
+ id?: number;
65
+
66
+ readonly created_at?: string;
67
+
68
+ space?: number;
69
+
70
+ updated_at?: string;
71
+ }
72
+
73
+ export type SpaceRoleListResponse = ListResponse<SpaceRole>;
74
+
75
+ export interface SpaceRoleCreateParams {
76
+ /**
77
+ * Body param:
78
+ */
79
+ name: string;
80
+
81
+ /**
82
+ * Body param:
83
+ */
84
+ policies: Array<number>;
85
+
86
+ /**
87
+ * Header param:
88
+ */
89
+ 'X-Space': string;
90
+ }
91
+
92
+ export interface SpaceRoleUpdateParams {
93
+ /**
94
+ * Body param:
95
+ */
96
+ name: string;
97
+
98
+ /**
99
+ * Body param:
100
+ */
101
+ policies: Array<number>;
102
+ /**
103
+ * Header param:
104
+ */
105
+ 'X-Space': string;
106
+ }
107
+
108
+ export interface SpaceRoleParams {
109
+ 'X-Space': string;
110
+ }
@@ -0,0 +1,145 @@
1
+ import { APIResource } from '../../resource';
2
+ import { isRequestOptions } from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+ import * as Core from '../../core';
5
+
6
+ export class Spaces extends APIResource {
7
+ create(body: SpaceCreateParams, options?: Core.RequestOptions): Core.APIPromise<Space> {
8
+ return this._client.post(`/spaces`, { body, ...options });
9
+ }
10
+
11
+ update(params: SpaceUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Space> {
12
+ const { 'X-Space': xspace, ...body } = params;
13
+ return this._client.put(`/spaces`, {
14
+ body,
15
+ ...options,
16
+ headers: { ...options?.headers, 'X-Space': xspace },
17
+ });
18
+ }
19
+
20
+ partialUpdate(params: Partial<SpaceUpdateParams>, options?: Core.RequestOptions): Core.APIPromise<Space> {
21
+ const { 'X-Space': xspace, ...body } = params;
22
+ return this._client.patch(`/spaces`, {
23
+ body,
24
+ ...options,
25
+ headers: { ...options?.headers, 'X-Space': xspace },
26
+ });
27
+ }
28
+
29
+ list(params?: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<SpaceListResponse>;
30
+ list(options?: Core.RequestOptions): Core.APIPromise<SpaceListResponse>;
31
+ list(params: ListParamsResponse | Core.RequestOptions = {}, options?: Core.RequestOptions): Core.APIPromise<SpaceListResponse> {
32
+ if (isRequestOptions(params)) {
33
+ return this.list({}, params);
34
+ }
35
+ const { ...query } = params;
36
+ return this._client.get(`/spaces`, {
37
+ query,
38
+ ...options,
39
+ headers: { ...options?.headers },
40
+ });
41
+ }
42
+ delete(params: SpaceParams, options?: Core.RequestOptions): Core.APIPromise<void> {
43
+ const { 'X-Space': xspace } = params;
44
+ return this._client.delete(`/spaces`, {
45
+ ...options,
46
+ headers: { Accept: '*/*', ...options?.headers, 'X-Space': xspace },
47
+ });
48
+ }
49
+
50
+ invitation(params: OAuthInvitationParams, options?: Core.RequestOptions): Core.APIPromise<OAuthInvitationParams> {
51
+ const { 'X-Space': xspace, ...body } = params;
52
+ return this._client.post(`/spaces/invitation`, {
53
+ body,
54
+ ...options,
55
+ headers: { ...options?.headers, 'X-Space': xspace },
56
+ });
57
+ }
58
+
59
+ joinSpace(token: string, options?: Core.RequestOptions): Core.APIPromise<JoinSpaceResponse> {
60
+ return this._client.get(`/spaces/join-space/${token}`, options);
61
+ }
62
+ }
63
+
64
+ export interface Space {
65
+ logo: string;
66
+
67
+ name: string;
68
+
69
+ slug_name: string;
70
+
71
+ id?: number;
72
+
73
+ created_by?: number | null;
74
+
75
+ is_active?: boolean;
76
+
77
+ total_devices: number;
78
+
79
+ readonly created_at?: string;
80
+
81
+ readonly updated_at?: string;
82
+ }
83
+
84
+ export type SpaceListResponse = ListResponse<Space>;
85
+
86
+ export interface SpaceCreateParams {
87
+ logo: string;
88
+
89
+ name: string;
90
+
91
+ slug_name: string;
92
+ }
93
+
94
+ export interface SpaceUpdateParams {
95
+ /**
96
+ * Body param:
97
+ */
98
+ logo: string;
99
+
100
+ /**
101
+ * Body param:
102
+ */
103
+ name: string;
104
+
105
+ /**
106
+ * Header param:
107
+ */
108
+ 'X-Space': string;
109
+ }
110
+
111
+ export interface SpaceParams {
112
+ 'X-Space': string;
113
+ }
114
+
115
+ export interface SpaceUpdateParams {
116
+ /**
117
+ * Body param:
118
+ */
119
+ logo: string;
120
+
121
+ /**
122
+ * Body param:
123
+ */
124
+ name: string;
125
+
126
+ /**
127
+ * Body param:
128
+ */
129
+ is_active?: boolean;
130
+ }
131
+
132
+ export interface OAuthInvitationParams {
133
+ receiver_list: Receiver[];
134
+ 'X-Space': string;
135
+ }
136
+
137
+ export interface Receiver {
138
+ email: string;
139
+ space_role_id: string;
140
+ }
141
+
142
+ export interface JoinSpaceResponse {
143
+ error?: string;
144
+ result?: string;
145
+ }
@@ -0,0 +1,36 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+
4
+ export class Users extends APIResource {
5
+ getMe(options?: Core.RequestOptions): Core.APIPromise<Profile> {
6
+ return this._client.get(`/users/me`, options);
7
+ }
8
+
9
+ updateMe(body: Profile, options?: Core.RequestOptions): Core.APIPromise<Profile> {
10
+ return this._client.put(`/users/me`, { body, ...options });
11
+ }
12
+
13
+ deleteMe(options?: Core.RequestOptions): Core.APIPromise<void> {
14
+ return this._client.delete(`/users/me`, options);
15
+ }
16
+ }
17
+
18
+ export interface Profile {
19
+ id?: string;
20
+
21
+ first_name?: string;
22
+
23
+ last_name?: string;
24
+
25
+ email?: string;
26
+
27
+ location?: string;
28
+
29
+ avatar?: string;
30
+
31
+ company_name?: string;
32
+
33
+ title?: string;
34
+
35
+ is_owner?: boolean;
36
+ }
@@ -0,0 +1 @@
1
+ export * from './oauth2';
@@ -0,0 +1,83 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { rstripBase64, toBase64, toSHA256, uuid4 } from '../../libs/utils';
4
+
5
+ export class OAuth2 extends APIResource {
6
+ async authorize(body: OAuth2AuthorizeParams, options?: Core.RequestOptions): Promise<OAuth2Authorize> {
7
+ const verifier = rstripBase64(toBase64(uuid4()));
8
+ const codeChallenge = rstripBase64(toBase64(await toSHA256(verifier)));
9
+
10
+ const oAuth2AuthorizeBody: OAuth2Authorize = {
11
+ ...body,
12
+ response_type: 'code',
13
+ code_challenge: codeChallenge,
14
+ code_challenge_method: 'S256',
15
+ };
16
+
17
+ return (
18
+ this._client.post(`/auth/login`, { body: oAuth2AuthorizeBody, ...options }) as Core.APIPromise<{
19
+ data: OAuth2Authorize;
20
+ }>
21
+ )._thenUnwrap((obj) => ({ ...obj.data, verifier }));
22
+ }
23
+ }
24
+
25
+ export type OAuth2AuthorizeParams = Pick<OAuth2Authorize, 'client_id' | 'redirect_uri' | 'scopes'>;
26
+
27
+ export interface OAuth2Authorize {
28
+ /**
29
+ * Response type
30
+ */
31
+ response_type: 'code';
32
+
33
+ /**
34
+ * Code challenge, require min length > 1
35
+ */
36
+ code_challenge: string;
37
+
38
+ /**
39
+ * Code challenge method
40
+ */
41
+ code_challenge_method: 'plain' | 'S256';
42
+
43
+ /**
44
+ * Client id
45
+ */
46
+ client_id: string;
47
+
48
+ /**
49
+ * Redirect uri
50
+ */
51
+ redirect_uri: string;
52
+
53
+ scopes: Array<'organization'>;
54
+ }
55
+
56
+ export interface OAuth2Token {
57
+ /**
58
+ * Client id
59
+ */
60
+ client_id: string;
61
+
62
+ /**
63
+ * Client secret
64
+ */
65
+ client_secret: string;
66
+
67
+ /**
68
+ * Code
69
+ */
70
+ code: string;
71
+
72
+ /**
73
+ * Code verifier
74
+ */
75
+ code_verifier: string;
76
+
77
+ readonly scopes?: Array<'organization'>;
78
+
79
+ /**
80
+ * Id token
81
+ */
82
+ readonly id_token?: string;
83
+ }
@@ -0,0 +1,171 @@
1
+ import { APIResource } from '../../resource';
2
+ import * as Core from '../../core';
3
+ import { ListParamsResponse, ListResponse } from '../../types/api';
4
+
5
+ export class Dashboards extends APIResource {
6
+ create(params: DashboardCreateParams, options?: Core.RequestOptions): Core.APIPromise<Dashboard> {
7
+ const { ...body } = params;
8
+ return this._client.post(`/dashboards`, {
9
+ body,
10
+ ...options,
11
+ headers: { ...options?.headers },
12
+ });
13
+ }
14
+
15
+ retrieve(id: number, options?: Core.RequestOptions): Core.APIPromise<Dashboard> {
16
+ return this._client.get(`/dashboards/${id}`, {
17
+ ...options,
18
+ headers: { ...options?.headers },
19
+ });
20
+ }
21
+
22
+ update(id: number, params: DashboardUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Dashboard> {
23
+ const { ...body } = params;
24
+ return this._client.put(`/dashboards/${id}`, {
25
+ body,
26
+ ...options,
27
+ headers: { ...options?.headers },
28
+ });
29
+ }
30
+
31
+ partialUpdate(id: number, params: DashboardUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Dashboard> {
32
+ const { ...body } = params;
33
+ return this._client.patch(`/dashboards/${id}`, {
34
+ body,
35
+ ...options,
36
+ headers: { ...options?.headers },
37
+ });
38
+ }
39
+
40
+ list(params: ListParamsResponse, options?: Core.RequestOptions): Core.APIPromise<DashboardListResponse> {
41
+ const { ...query } = params;
42
+ return this._client.get(`/dashboards`, {
43
+ query,
44
+ ...options,
45
+ headers: { ...options?.headers },
46
+ });
47
+ }
48
+
49
+ delete(id: number, options?: Core.RequestOptions): Core.APIPromise<void> {
50
+ return this._client.delete(`/dashboards/${id}`, {
51
+ ...options,
52
+ headers: { Accept: '*/*', ...options?.headers },
53
+ });
54
+ }
55
+
56
+ createWidget(dashboardId: string, params: WidgetCreateParams, options?: Core.RequestOptions): Core.APIPromise<Widget> {
57
+ const { ...body } = params;
58
+ return this._client.post(`/dashboards/${dashboardId}/widgets`, {
59
+ body,
60
+ ...options,
61
+ headers: { ...options?.headers },
62
+ });
63
+ }
64
+
65
+ retrieveWidget(dashboardId: string, id: number, options?: Core.RequestOptions): Core.APIPromise<Widget> {
66
+ return this._client.get(`/dashboards/${dashboardId}/widgets/${id}`, {
67
+ ...options,
68
+ headers: { ...options?.headers },
69
+ });
70
+ }
71
+
72
+ updateWidget(dashboardId: string, id: number, params: WidgetUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Widget> {
73
+ const { ...body } = params;
74
+ return this._client.put(`/dashboards/${dashboardId}/widgets/${id}`, {
75
+ body,
76
+ ...options,
77
+ headers: { ...options?.headers },
78
+ });
79
+ }
80
+
81
+ partialUpdateWidget(dashboardId: string, id: number, params: WidgetUpdateParams, options?: Core.RequestOptions): Core.APIPromise<Widget> {
82
+ const { ...body } = params;
83
+ return this._client.patch(`/dashboards/${dashboardId}/widgets/${id}`, {
84
+ body,
85
+ ...options,
86
+ headers: { ...options?.headers },
87
+ });
88
+ }
89
+
90
+ listWidgets(dashboardId: string, params: WidgetListParams, options?: Core.RequestOptions): Core.APIPromise<WidgetListResponse> {
91
+ const { ...query } = params;
92
+ return this._client.get(`/dashboards/${dashboardId}/widgets`, {
93
+ query,
94
+ ...options,
95
+ headers: { ...options?.headers },
96
+ });
97
+ }
98
+
99
+ deleteWidget(dashboardId: string, id: number, options?: Core.RequestOptions): Core.APIPromise<void> {
100
+ return this._client.delete(`/dashboards/${dashboardId}/widgets/${id}`, {
101
+ ...options,
102
+ headers: { Accept: '*/*', ...options?.headers },
103
+ });
104
+ }
105
+ }
106
+
107
+ export interface Dashboard {
108
+ name: string;
109
+
110
+ id?: number;
111
+
112
+ space?: number;
113
+
114
+ readonly created_at?: string;
115
+
116
+ readonly updated_at?: string;
117
+ }
118
+
119
+ export type DashboardListResponse = ListResponse<Dashboard>;
120
+
121
+ export interface DashboardCreateParams {
122
+ /**
123
+ * Body param:
124
+ */
125
+ name: string;
126
+ }
127
+
128
+ export interface DashboardUpdateParams {
129
+ /**
130
+ * Body param:
131
+ */
132
+ name: string;
133
+ }
134
+
135
+ /** ------------------------------------
136
+ * Widget type
137
+ ---------------------------------------*/
138
+ export interface Widget {
139
+ readonly id?: number;
140
+
141
+ configuration: any;
142
+
143
+ readonly dashboard?: number;
144
+
145
+ readonly created_at?: string;
146
+
147
+ readonly updated_at?: string;
148
+ }
149
+
150
+ export type WidgetListResponse = Array<Widget>;
151
+
152
+ export interface WidgetCreateParams {
153
+ /**
154
+ * Body param:
155
+ */
156
+ configuration: any;
157
+ }
158
+
159
+ export interface WidgetUpdateParams {
160
+ /**
161
+ * Body param:
162
+ */
163
+ configuration: any;
164
+ }
165
+
166
+ export interface WidgetListParams {
167
+ /**
168
+ * Query param: Which field to use when ordering the results.
169
+ */
170
+ ordering?: string;
171
+ }