@eveai/eve-sdk-for-node 0.0.1 → 0.0.3

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 (447) hide show
  1. package/README.md.bak +510 -0
  2. package/README.md.orig +510 -0
  3. package/dist/client.d.mts +110 -0
  4. package/dist/client.d.ts +110 -0
  5. package/dist/client.js +292 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/client.mjs +286 -0
  8. package/dist/client.mjs.map +1 -0
  9. package/dist/enums/adapter.d.mts +6 -0
  10. package/dist/enums/adapter.d.ts +6 -0
  11. package/dist/enums/adapter.js +11 -0
  12. package/dist/enums/adapter.js.map +1 -0
  13. package/dist/enums/adapter.mjs +10 -0
  14. package/dist/enums/adapter.mjs.map +1 -0
  15. package/dist/enums/attribute-status.d.mts +9 -0
  16. package/dist/enums/attribute-status.d.ts +9 -0
  17. package/dist/enums/attribute-status.js +14 -0
  18. package/dist/enums/attribute-status.js.map +1 -0
  19. package/dist/enums/attribute-status.mjs +13 -0
  20. package/dist/enums/attribute-status.mjs.map +1 -0
  21. package/dist/enums/authentication-factor.d.mts +8 -0
  22. package/dist/enums/authentication-factor.d.ts +8 -0
  23. package/dist/enums/authentication-factor.js +13 -0
  24. package/dist/enums/authentication-factor.js.map +1 -0
  25. package/dist/enums/authentication-factor.mjs +12 -0
  26. package/dist/enums/authentication-factor.mjs.map +1 -0
  27. package/dist/enums/authenticator-type.d.mts +5 -0
  28. package/dist/enums/authenticator-type.d.ts +5 -0
  29. package/dist/enums/authenticator-type.js +10 -0
  30. package/dist/enums/authenticator-type.js.map +1 -0
  31. package/dist/enums/authenticator-type.mjs +9 -0
  32. package/dist/enums/authenticator-type.mjs.map +1 -0
  33. package/dist/enums/browser.d.mts +18 -0
  34. package/dist/enums/browser.d.ts +18 -0
  35. package/dist/enums/browser.js +23 -0
  36. package/dist/enums/browser.js.map +1 -0
  37. package/dist/enums/browser.mjs +22 -0
  38. package/dist/enums/browser.mjs.map +1 -0
  39. package/dist/enums/build-runtime.d.mts +71 -0
  40. package/dist/enums/build-runtime.d.ts +71 -0
  41. package/dist/enums/build-runtime.js +76 -0
  42. package/dist/enums/build-runtime.js.map +1 -0
  43. package/dist/enums/build-runtime.mjs +75 -0
  44. package/dist/enums/build-runtime.mjs.map +1 -0
  45. package/dist/enums/column-status.d.mts +9 -0
  46. package/dist/enums/column-status.d.ts +9 -0
  47. package/dist/enums/column-status.js +14 -0
  48. package/dist/enums/column-status.js.map +1 -0
  49. package/dist/enums/column-status.mjs +13 -0
  50. package/dist/enums/column-status.mjs.map +1 -0
  51. package/dist/enums/compression.d.mts +7 -0
  52. package/dist/enums/compression.d.ts +7 -0
  53. package/dist/enums/compression.js +12 -0
  54. package/dist/enums/compression.js.map +1 -0
  55. package/dist/enums/compression.mjs +11 -0
  56. package/dist/enums/compression.mjs.map +1 -0
  57. package/dist/enums/credit-card.d.mts +21 -0
  58. package/dist/enums/credit-card.d.ts +21 -0
  59. package/dist/enums/credit-card.js +26 -0
  60. package/dist/enums/credit-card.js.map +1 -0
  61. package/dist/enums/credit-card.mjs +25 -0
  62. package/dist/enums/credit-card.mjs.map +1 -0
  63. package/dist/enums/database-type.d.mts +6 -0
  64. package/dist/enums/database-type.d.ts +6 -0
  65. package/dist/enums/database-type.js +11 -0
  66. package/dist/enums/database-type.js.map +1 -0
  67. package/dist/enums/database-type.mjs +10 -0
  68. package/dist/enums/database-type.mjs.map +1 -0
  69. package/dist/enums/deployment-download-type.d.mts +6 -0
  70. package/dist/enums/deployment-download-type.d.ts +6 -0
  71. package/dist/enums/deployment-download-type.js +11 -0
  72. package/dist/enums/deployment-download-type.js.map +1 -0
  73. package/dist/enums/deployment-download-type.mjs +10 -0
  74. package/dist/enums/deployment-download-type.mjs.map +1 -0
  75. package/dist/enums/deployment-status.d.mts +9 -0
  76. package/dist/enums/deployment-status.d.ts +9 -0
  77. package/dist/enums/deployment-status.js +14 -0
  78. package/dist/enums/deployment-status.js.map +1 -0
  79. package/dist/enums/deployment-status.mjs +13 -0
  80. package/dist/enums/deployment-status.mjs.map +1 -0
  81. package/dist/enums/execution-method.d.mts +11 -0
  82. package/dist/enums/execution-method.d.ts +11 -0
  83. package/dist/enums/execution-method.js +16 -0
  84. package/dist/enums/execution-method.js.map +1 -0
  85. package/dist/enums/execution-method.mjs +15 -0
  86. package/dist/enums/execution-method.mjs.map +1 -0
  87. package/dist/enums/execution-status.d.mts +9 -0
  88. package/dist/enums/execution-status.d.ts +9 -0
  89. package/dist/enums/execution-status.js +14 -0
  90. package/dist/enums/execution-status.js.map +1 -0
  91. package/dist/enums/execution-status.mjs +13 -0
  92. package/dist/enums/execution-status.mjs.map +1 -0
  93. package/dist/enums/execution-trigger.d.mts +7 -0
  94. package/dist/enums/execution-trigger.d.ts +7 -0
  95. package/dist/enums/execution-trigger.js +12 -0
  96. package/dist/enums/execution-trigger.js.map +1 -0
  97. package/dist/enums/execution-trigger.mjs +11 -0
  98. package/dist/enums/execution-trigger.mjs.map +1 -0
  99. package/dist/enums/flag.d.mts +199 -0
  100. package/dist/enums/flag.d.ts +199 -0
  101. package/dist/enums/flag.js +204 -0
  102. package/dist/enums/flag.js.map +1 -0
  103. package/dist/enums/flag.mjs +203 -0
  104. package/dist/enums/flag.mjs.map +1 -0
  105. package/dist/enums/framework.d.mts +19 -0
  106. package/dist/enums/framework.d.ts +19 -0
  107. package/dist/enums/framework.js +24 -0
  108. package/dist/enums/framework.js.map +1 -0
  109. package/dist/enums/framework.mjs +23 -0
  110. package/dist/enums/framework.mjs.map +1 -0
  111. package/dist/enums/health-antivirus-status.d.mts +7 -0
  112. package/dist/enums/health-antivirus-status.d.ts +7 -0
  113. package/dist/enums/health-antivirus-status.js +12 -0
  114. package/dist/enums/health-antivirus-status.js.map +1 -0
  115. package/dist/enums/health-antivirus-status.mjs +11 -0
  116. package/dist/enums/health-antivirus-status.mjs.map +1 -0
  117. package/dist/enums/health-check-status.d.mts +6 -0
  118. package/dist/enums/health-check-status.d.ts +6 -0
  119. package/dist/enums/health-check-status.js +11 -0
  120. package/dist/enums/health-check-status.js.map +1 -0
  121. package/dist/enums/health-check-status.mjs +10 -0
  122. package/dist/enums/health-check-status.mjs.map +1 -0
  123. package/dist/enums/image-format.d.mts +11 -0
  124. package/dist/enums/image-format.d.ts +11 -0
  125. package/dist/enums/image-format.js +16 -0
  126. package/dist/enums/image-format.js.map +1 -0
  127. package/dist/enums/image-format.mjs +15 -0
  128. package/dist/enums/image-format.mjs.map +1 -0
  129. package/dist/enums/image-gravity.d.mts +13 -0
  130. package/dist/enums/image-gravity.d.ts +13 -0
  131. package/dist/enums/image-gravity.js +18 -0
  132. package/dist/enums/image-gravity.js.map +1 -0
  133. package/dist/enums/image-gravity.mjs +17 -0
  134. package/dist/enums/image-gravity.mjs.map +1 -0
  135. package/dist/enums/index-status.d.mts +9 -0
  136. package/dist/enums/index-status.d.ts +9 -0
  137. package/dist/enums/index-status.js +14 -0
  138. package/dist/enums/index-status.js.map +1 -0
  139. package/dist/enums/index-status.mjs +13 -0
  140. package/dist/enums/index-status.mjs.map +1 -0
  141. package/dist/enums/index-type.d.mts +8 -0
  142. package/dist/enums/index-type.d.ts +8 -0
  143. package/dist/enums/index-type.js +13 -0
  144. package/dist/enums/index-type.js.map +1 -0
  145. package/dist/enums/index-type.mjs +12 -0
  146. package/dist/enums/index-type.mjs.map +1 -0
  147. package/dist/enums/message-priority.d.mts +6 -0
  148. package/dist/enums/message-priority.d.ts +6 -0
  149. package/dist/enums/message-priority.js +11 -0
  150. package/dist/enums/message-priority.js.map +1 -0
  151. package/dist/enums/message-priority.mjs +10 -0
  152. package/dist/enums/message-priority.mjs.map +1 -0
  153. package/dist/enums/message-status.d.mts +9 -0
  154. package/dist/enums/message-status.d.ts +9 -0
  155. package/dist/enums/message-status.js +14 -0
  156. package/dist/enums/message-status.js.map +1 -0
  157. package/dist/enums/message-status.mjs +13 -0
  158. package/dist/enums/message-status.mjs.map +1 -0
  159. package/dist/enums/messaging-provider-type.d.mts +7 -0
  160. package/dist/enums/messaging-provider-type.d.ts +7 -0
  161. package/dist/enums/messaging-provider-type.js +12 -0
  162. package/dist/enums/messaging-provider-type.js.map +1 -0
  163. package/dist/enums/messaging-provider-type.mjs +11 -0
  164. package/dist/enums/messaging-provider-type.mjs.map +1 -0
  165. package/dist/enums/name.d.mts +16 -0
  166. package/dist/enums/name.d.ts +16 -0
  167. package/dist/enums/name.js +21 -0
  168. package/dist/enums/name.js.map +1 -0
  169. package/dist/enums/name.mjs +20 -0
  170. package/dist/enums/name.mjs.map +1 -0
  171. package/dist/enums/o-auth-provider.d.mts +44 -0
  172. package/dist/enums/o-auth-provider.d.ts +44 -0
  173. package/dist/enums/o-auth-provider.js +49 -0
  174. package/dist/enums/o-auth-provider.js.map +1 -0
  175. package/dist/enums/o-auth-provider.mjs +48 -0
  176. package/dist/enums/o-auth-provider.mjs.map +1 -0
  177. package/dist/enums/output.d.mts +11 -0
  178. package/dist/enums/output.d.ts +11 -0
  179. package/dist/enums/output.js +16 -0
  180. package/dist/enums/output.js.map +1 -0
  181. package/dist/enums/output.mjs +15 -0
  182. package/dist/enums/output.mjs.map +1 -0
  183. package/dist/enums/password-hash.d.mts +15 -0
  184. package/dist/enums/password-hash.d.ts +15 -0
  185. package/dist/enums/password-hash.js +20 -0
  186. package/dist/enums/password-hash.js.map +1 -0
  187. package/dist/enums/password-hash.mjs +19 -0
  188. package/dist/enums/password-hash.mjs.map +1 -0
  189. package/dist/enums/relation-mutate.d.mts +7 -0
  190. package/dist/enums/relation-mutate.d.ts +7 -0
  191. package/dist/enums/relation-mutate.js +12 -0
  192. package/dist/enums/relation-mutate.js.map +1 -0
  193. package/dist/enums/relation-mutate.mjs +11 -0
  194. package/dist/enums/relation-mutate.mjs.map +1 -0
  195. package/dist/enums/relationship-type.d.mts +8 -0
  196. package/dist/enums/relationship-type.d.ts +8 -0
  197. package/dist/enums/relationship-type.js +13 -0
  198. package/dist/enums/relationship-type.js.map +1 -0
  199. package/dist/enums/relationship-type.mjs +12 -0
  200. package/dist/enums/relationship-type.mjs.map +1 -0
  201. package/dist/enums/runtime.d.mts +71 -0
  202. package/dist/enums/runtime.d.ts +71 -0
  203. package/dist/enums/runtime.js +76 -0
  204. package/dist/enums/runtime.js.map +1 -0
  205. package/dist/enums/runtime.mjs +75 -0
  206. package/dist/enums/runtime.mjs.map +1 -0
  207. package/dist/enums/smtp-encryption.d.mts +7 -0
  208. package/dist/enums/smtp-encryption.d.ts +7 -0
  209. package/dist/enums/smtp-encryption.js +12 -0
  210. package/dist/enums/smtp-encryption.js.map +1 -0
  211. package/dist/enums/smtp-encryption.mjs +11 -0
  212. package/dist/enums/smtp-encryption.mjs.map +1 -0
  213. package/dist/enums/template-reference-type.d.mts +7 -0
  214. package/dist/enums/template-reference-type.d.ts +7 -0
  215. package/dist/enums/template-reference-type.js +12 -0
  216. package/dist/enums/template-reference-type.js.map +1 -0
  217. package/dist/enums/template-reference-type.mjs +11 -0
  218. package/dist/enums/template-reference-type.mjs.map +1 -0
  219. package/dist/enums/theme.d.mts +6 -0
  220. package/dist/enums/theme.d.ts +6 -0
  221. package/dist/enums/theme.js +11 -0
  222. package/dist/enums/theme.js.map +1 -0
  223. package/dist/enums/theme.mjs +10 -0
  224. package/dist/enums/theme.mjs.map +1 -0
  225. package/dist/enums/timezone.d.mts +423 -0
  226. package/dist/enums/timezone.d.ts +423 -0
  227. package/dist/enums/timezone.js +428 -0
  228. package/dist/enums/timezone.js.map +1 -0
  229. package/dist/enums/timezone.mjs +427 -0
  230. package/dist/enums/timezone.mjs.map +1 -0
  231. package/dist/enums/vcs-reference-type.d.mts +7 -0
  232. package/dist/enums/vcs-reference-type.d.ts +7 -0
  233. package/dist/enums/vcs-reference-type.js +12 -0
  234. package/dist/enums/vcs-reference-type.js.map +1 -0
  235. package/dist/enums/vcs-reference-type.mjs +11 -0
  236. package/dist/enums/vcs-reference-type.mjs.map +1 -0
  237. package/dist/id.d.mts +22 -0
  238. package/dist/id.d.ts +22 -0
  239. package/dist/id.js +45 -0
  240. package/dist/id.js.map +1 -0
  241. package/dist/id.mjs +44 -0
  242. package/dist/id.mjs.map +1 -0
  243. package/dist/index.d.mts +72 -0
  244. package/dist/index.d.ts +72 -0
  245. package/dist/index.js +369 -0
  246. package/dist/index.js.map +1 -0
  247. package/dist/index.mjs +72 -0
  248. package/dist/index.mjs.map +1 -0
  249. package/dist/inputFile.d.mts +9 -0
  250. package/dist/inputFile.d.ts +9 -0
  251. package/dist/inputFile.js +23 -0
  252. package/dist/inputFile.js.map +1 -0
  253. package/dist/inputFile.mjs +22 -0
  254. package/dist/inputFile.mjs.map +1 -0
  255. package/dist/models.d.mts +3829 -0
  256. package/dist/models.d.ts +3829 -0
  257. package/dist/models.js +4 -0
  258. package/dist/models.js.map +1 -0
  259. package/dist/models.mjs +3 -0
  260. package/dist/models.mjs.map +1 -0
  261. package/dist/operator.d.mts +181 -0
  262. package/dist/operator.d.ts +181 -0
  263. package/dist/operator.js +268 -0
  264. package/dist/operator.js.map +1 -0
  265. package/dist/operator.mjs +266 -0
  266. package/dist/operator.mjs.map +1 -0
  267. package/dist/permission.d.mts +45 -0
  268. package/dist/permission.d.ts +45 -0
  269. package/dist/permission.js +56 -0
  270. package/dist/permission.js.map +1 -0
  271. package/dist/permission.mjs +55 -0
  272. package/dist/permission.mjs.map +1 -0
  273. package/dist/query.d.mts +391 -0
  274. package/dist/query.d.ts +391 -0
  275. package/dist/query.js +402 -0
  276. package/dist/query.js.map +1 -0
  277. package/dist/query.mjs +401 -0
  278. package/dist/query.mjs.map +1 -0
  279. package/dist/role.d.mts +72 -0
  280. package/dist/role.d.ts +72 -0
  281. package/dist/role.js +96 -0
  282. package/dist/role.js.map +1 -0
  283. package/dist/role.mjs +95 -0
  284. package/dist/role.mjs.map +1 -0
  285. package/dist/services/account.d.mts +1011 -0
  286. package/dist/services/account.d.ts +1011 -0
  287. package/dist/services/account.js +1596 -0
  288. package/dist/services/account.js.map +1 -0
  289. package/dist/services/account.mjs +1595 -0
  290. package/dist/services/account.mjs.map +1 -0
  291. package/dist/services/auth.d.mts +52 -0
  292. package/dist/services/auth.d.ts +52 -0
  293. package/dist/services/auth.js +85 -0
  294. package/dist/services/auth.js.map +1 -0
  295. package/dist/services/auth.mjs +84 -0
  296. package/dist/services/auth.mjs.map +1 -0
  297. package/dist/services/avatars.d.mts +334 -0
  298. package/dist/services/avatars.d.ts +334 -0
  299. package/dist/services/avatars.js +405 -0
  300. package/dist/services/avatars.js.map +1 -0
  301. package/dist/services/avatars.mjs +404 -0
  302. package/dist/services/avatars.mjs.map +1 -0
  303. package/dist/services/comment.d.mts +92 -0
  304. package/dist/services/comment.d.ts +92 -0
  305. package/dist/services/comment.js +175 -0
  306. package/dist/services/comment.js.map +1 -0
  307. package/dist/services/comment.mjs +174 -0
  308. package/dist/services/comment.mjs.map +1 -0
  309. package/dist/services/databases.d.mts +1991 -0
  310. package/dist/services/databases.d.ts +1991 -0
  311. package/dist/services/databases.js +2957 -0
  312. package/dist/services/databases.js.map +1 -0
  313. package/dist/services/databases.mjs +2956 -0
  314. package/dist/services/databases.mjs.map +1 -0
  315. package/dist/services/eveai-chat.d.mts +118 -0
  316. package/dist/services/eveai-chat.d.ts +118 -0
  317. package/dist/services/eveai-chat.js +115 -0
  318. package/dist/services/eveai-chat.js.map +1 -0
  319. package/dist/services/eveai-chat.mjs +114 -0
  320. package/dist/services/eveai-chat.mjs.map +1 -0
  321. package/dist/services/eveai-payment.d.mts +145 -0
  322. package/dist/services/eveai-payment.d.ts +145 -0
  323. package/dist/services/eveai-payment.js +132 -0
  324. package/dist/services/eveai-payment.js.map +1 -0
  325. package/dist/services/eveai-payment.mjs +131 -0
  326. package/dist/services/eveai-payment.mjs.map +1 -0
  327. package/dist/services/eveai-provider-discovery.d.mts +126 -0
  328. package/dist/services/eveai-provider-discovery.d.ts +126 -0
  329. package/dist/services/eveai-provider-discovery.js +96 -0
  330. package/dist/services/eveai-provider-discovery.js.map +1 -0
  331. package/dist/services/eveai-provider-discovery.mjs +95 -0
  332. package/dist/services/eveai-provider-discovery.mjs.map +1 -0
  333. package/dist/services/eveai-task.d.mts +137 -0
  334. package/dist/services/eveai-task.d.ts +137 -0
  335. package/dist/services/eveai-task.js +143 -0
  336. package/dist/services/eveai-task.js.map +1 -0
  337. package/dist/services/eveai-task.mjs +142 -0
  338. package/dist/services/eveai-task.mjs.map +1 -0
  339. package/dist/services/favorite.d.mts +68 -0
  340. package/dist/services/favorite.d.ts +68 -0
  341. package/dist/services/favorite.js +127 -0
  342. package/dist/services/favorite.js.map +1 -0
  343. package/dist/services/favorite.mjs +126 -0
  344. package/dist/services/favorite.mjs.map +1 -0
  345. package/dist/services/feed.d.mts +62 -0
  346. package/dist/services/feed.d.ts +62 -0
  347. package/dist/services/feed.js +76 -0
  348. package/dist/services/feed.js.map +1 -0
  349. package/dist/services/feed.mjs +75 -0
  350. package/dist/services/feed.mjs.map +1 -0
  351. package/dist/services/functions.d.mts +749 -0
  352. package/dist/services/functions.d.ts +749 -0
  353. package/dist/services/functions.js +1109 -0
  354. package/dist/services/functions.js.map +1 -0
  355. package/dist/services/functions.mjs +1108 -0
  356. package/dist/services/functions.mjs.map +1 -0
  357. package/dist/services/graphql.d.mts +58 -0
  358. package/dist/services/graphql.d.ts +58 -0
  359. package/dist/services/graphql.js +73 -0
  360. package/dist/services/graphql.js.map +1 -0
  361. package/dist/services/graphql.mjs +72 -0
  362. package/dist/services/graphql.mjs.map +1 -0
  363. package/dist/services/gugotik-storage.d.mts +34 -0
  364. package/dist/services/gugotik-storage.d.ts +34 -0
  365. package/dist/services/gugotik-storage.js +40 -0
  366. package/dist/services/gugotik-storage.js.map +1 -0
  367. package/dist/services/gugotik-storage.mjs +39 -0
  368. package/dist/services/gugotik-storage.mjs.map +1 -0
  369. package/dist/services/health.d.mts +351 -0
  370. package/dist/services/health.d.ts +351 -0
  371. package/dist/services/health.js +503 -0
  372. package/dist/services/health.js.map +1 -0
  373. package/dist/services/health.mjs +502 -0
  374. package/dist/services/health.mjs.map +1 -0
  375. package/dist/services/locale.d.mts +78 -0
  376. package/dist/services/locale.d.ts +78 -0
  377. package/dist/services/locale.js +157 -0
  378. package/dist/services/locale.js.map +1 -0
  379. package/dist/services/locale.mjs +156 -0
  380. package/dist/services/locale.mjs.map +1 -0
  381. package/dist/services/message.d.mts +60 -0
  382. package/dist/services/message.d.ts +60 -0
  383. package/dist/services/message.js +98 -0
  384. package/dist/services/message.js.map +1 -0
  385. package/dist/services/message.mjs +97 -0
  386. package/dist/services/message.mjs.map +1 -0
  387. package/dist/services/messaging.d.mts +2003 -0
  388. package/dist/services/messaging.d.ts +2003 -0
  389. package/dist/services/messaging.js +3054 -0
  390. package/dist/services/messaging.js.map +1 -0
  391. package/dist/services/messaging.mjs +3053 -0
  392. package/dist/services/messaging.mjs.map +1 -0
  393. package/dist/services/publish.d.mts +70 -0
  394. package/dist/services/publish.d.ts +70 -0
  395. package/dist/services/publish.js +154 -0
  396. package/dist/services/publish.js.map +1 -0
  397. package/dist/services/publish.mjs +153 -0
  398. package/dist/services/publish.mjs.map +1 -0
  399. package/dist/services/relation.d.mts +113 -0
  400. package/dist/services/relation.d.ts +113 -0
  401. package/dist/services/relation.js +239 -0
  402. package/dist/services/relation.js.map +1 -0
  403. package/dist/services/relation.mjs +238 -0
  404. package/dist/services/relation.mjs.map +1 -0
  405. package/dist/services/sites.d.mts +705 -0
  406. package/dist/services/sites.d.ts +705 -0
  407. package/dist/services/sites.js +1059 -0
  408. package/dist/services/sites.js.map +1 -0
  409. package/dist/services/sites.mjs +1058 -0
  410. package/dist/services/sites.mjs.map +1 -0
  411. package/dist/services/storage.d.mts +435 -0
  412. package/dist/services/storage.d.ts +435 -0
  413. package/dist/services/storage.js +609 -0
  414. package/dist/services/storage.js.map +1 -0
  415. package/dist/services/storage.mjs +608 -0
  416. package/dist/services/storage.mjs.map +1 -0
  417. package/dist/services/tables-db.d.mts +1934 -0
  418. package/dist/services/tables-db.d.ts +1934 -0
  419. package/dist/services/tables-db.js +2954 -0
  420. package/dist/services/tables-db.js.map +1 -0
  421. package/dist/services/tables-db.mjs +2953 -0
  422. package/dist/services/tables-db.mjs.map +1 -0
  423. package/dist/services/teams.d.mts +355 -0
  424. package/dist/services/teams.d.ts +355 -0
  425. package/dist/services/teams.js +475 -0
  426. package/dist/services/teams.js.map +1 -0
  427. package/dist/services/teams.mjs +474 -0
  428. package/dist/services/teams.mjs.map +1 -0
  429. package/dist/services/tokens.d.mts +133 -0
  430. package/dist/services/tokens.d.ts +133 -0
  431. package/dist/services/tokens.js +169 -0
  432. package/dist/services/tokens.js.map +1 -0
  433. package/dist/services/tokens.mjs +168 -0
  434. package/dist/services/tokens.mjs.map +1 -0
  435. package/dist/services/user.d.mts +66 -0
  436. package/dist/services/user.d.ts +66 -0
  437. package/dist/services/user.js +101 -0
  438. package/dist/services/user.js.map +1 -0
  439. package/dist/services/user.mjs +100 -0
  440. package/dist/services/user.mjs.map +1 -0
  441. package/dist/services/users.d.mts +1176 -0
  442. package/dist/services/users.d.ts +1176 -0
  443. package/dist/services/users.js +1742 -0
  444. package/dist/services/users.js.map +1 -0
  445. package/dist/services/users.mjs +1741 -0
  446. package/dist/services/users.mjs.map +1 -0
  447. package/package.json +15 -1
@@ -0,0 +1,2956 @@
1
+ import { AppwriteException } from '../client.mjs';
2
+
3
+ // src/services/databases.ts
4
+ var Databases = class {
5
+ constructor(client) {
6
+ this.client = client;
7
+ }
8
+ list(paramsOrFirst, ...rest) {
9
+ let params;
10
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
11
+ params = paramsOrFirst || {};
12
+ } else {
13
+ params = {
14
+ queries: paramsOrFirst,
15
+ search: rest[0],
16
+ total: rest[1]
17
+ };
18
+ }
19
+ const queries = params.queries;
20
+ const search = params.search;
21
+ const total = params.total;
22
+ const apiPath = "/databases";
23
+ const payload = {};
24
+ if (typeof queries !== "undefined") {
25
+ payload["queries"] = queries;
26
+ }
27
+ if (typeof search !== "undefined") {
28
+ payload["search"] = search;
29
+ }
30
+ if (typeof total !== "undefined") {
31
+ payload["total"] = total;
32
+ }
33
+ const uri = new URL(this.client.config.endpoint + apiPath);
34
+ const apiHeaders = {};
35
+ return this.client.call(
36
+ "get",
37
+ uri,
38
+ apiHeaders,
39
+ payload
40
+ );
41
+ }
42
+ create(paramsOrFirst, ...rest) {
43
+ let params;
44
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
45
+ params = paramsOrFirst || {};
46
+ } else {
47
+ params = {
48
+ databaseId: paramsOrFirst,
49
+ name: rest[0],
50
+ enabled: rest[1]
51
+ };
52
+ }
53
+ const databaseId = params.databaseId;
54
+ const name = params.name;
55
+ const enabled = params.enabled;
56
+ if (typeof databaseId === "undefined") {
57
+ throw new AppwriteException('Missing required parameter: "databaseId"');
58
+ }
59
+ if (typeof name === "undefined") {
60
+ throw new AppwriteException('Missing required parameter: "name"');
61
+ }
62
+ const apiPath = "/databases";
63
+ const payload = {};
64
+ if (typeof databaseId !== "undefined") {
65
+ payload["databaseId"] = databaseId;
66
+ }
67
+ if (typeof name !== "undefined") {
68
+ payload["name"] = name;
69
+ }
70
+ if (typeof enabled !== "undefined") {
71
+ payload["enabled"] = enabled;
72
+ }
73
+ const uri = new URL(this.client.config.endpoint + apiPath);
74
+ const apiHeaders = {
75
+ "content-type": "application/json"
76
+ };
77
+ return this.client.call(
78
+ "post",
79
+ uri,
80
+ apiHeaders,
81
+ payload
82
+ );
83
+ }
84
+ listTransactions(paramsOrFirst) {
85
+ let params;
86
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
87
+ params = paramsOrFirst || {};
88
+ } else {
89
+ params = {
90
+ queries: paramsOrFirst
91
+ };
92
+ }
93
+ const queries = params.queries;
94
+ const apiPath = "/databases/transactions";
95
+ const payload = {};
96
+ if (typeof queries !== "undefined") {
97
+ payload["queries"] = queries;
98
+ }
99
+ const uri = new URL(this.client.config.endpoint + apiPath);
100
+ const apiHeaders = {};
101
+ return this.client.call(
102
+ "get",
103
+ uri,
104
+ apiHeaders,
105
+ payload
106
+ );
107
+ }
108
+ createTransaction(paramsOrFirst) {
109
+ let params;
110
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
111
+ params = paramsOrFirst || {};
112
+ } else {
113
+ params = {
114
+ ttl: paramsOrFirst
115
+ };
116
+ }
117
+ const ttl = params.ttl;
118
+ const apiPath = "/databases/transactions";
119
+ const payload = {};
120
+ if (typeof ttl !== "undefined") {
121
+ payload["ttl"] = ttl;
122
+ }
123
+ const uri = new URL(this.client.config.endpoint + apiPath);
124
+ const apiHeaders = {
125
+ "content-type": "application/json"
126
+ };
127
+ return this.client.call(
128
+ "post",
129
+ uri,
130
+ apiHeaders,
131
+ payload
132
+ );
133
+ }
134
+ getTransaction(paramsOrFirst) {
135
+ let params;
136
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
137
+ params = paramsOrFirst || {};
138
+ } else {
139
+ params = {
140
+ transactionId: paramsOrFirst
141
+ };
142
+ }
143
+ const transactionId = params.transactionId;
144
+ if (typeof transactionId === "undefined") {
145
+ throw new AppwriteException('Missing required parameter: "transactionId"');
146
+ }
147
+ const apiPath = "/databases/transactions/{transactionId}".replace("{transactionId}", transactionId);
148
+ const payload = {};
149
+ const uri = new URL(this.client.config.endpoint + apiPath);
150
+ const apiHeaders = {};
151
+ return this.client.call(
152
+ "get",
153
+ uri,
154
+ apiHeaders,
155
+ payload
156
+ );
157
+ }
158
+ updateTransaction(paramsOrFirst, ...rest) {
159
+ let params;
160
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
161
+ params = paramsOrFirst || {};
162
+ } else {
163
+ params = {
164
+ transactionId: paramsOrFirst,
165
+ commit: rest[0],
166
+ rollback: rest[1]
167
+ };
168
+ }
169
+ const transactionId = params.transactionId;
170
+ const commit = params.commit;
171
+ const rollback = params.rollback;
172
+ if (typeof transactionId === "undefined") {
173
+ throw new AppwriteException('Missing required parameter: "transactionId"');
174
+ }
175
+ const apiPath = "/databases/transactions/{transactionId}".replace("{transactionId}", transactionId);
176
+ const payload = {};
177
+ if (typeof commit !== "undefined") {
178
+ payload["commit"] = commit;
179
+ }
180
+ if (typeof rollback !== "undefined") {
181
+ payload["rollback"] = rollback;
182
+ }
183
+ const uri = new URL(this.client.config.endpoint + apiPath);
184
+ const apiHeaders = {
185
+ "content-type": "application/json"
186
+ };
187
+ return this.client.call(
188
+ "patch",
189
+ uri,
190
+ apiHeaders,
191
+ payload
192
+ );
193
+ }
194
+ deleteTransaction(paramsOrFirst) {
195
+ let params;
196
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
197
+ params = paramsOrFirst || {};
198
+ } else {
199
+ params = {
200
+ transactionId: paramsOrFirst
201
+ };
202
+ }
203
+ const transactionId = params.transactionId;
204
+ if (typeof transactionId === "undefined") {
205
+ throw new AppwriteException('Missing required parameter: "transactionId"');
206
+ }
207
+ const apiPath = "/databases/transactions/{transactionId}".replace("{transactionId}", transactionId);
208
+ const payload = {};
209
+ const uri = new URL(this.client.config.endpoint + apiPath);
210
+ const apiHeaders = {
211
+ "content-type": "application/json"
212
+ };
213
+ return this.client.call(
214
+ "delete",
215
+ uri,
216
+ apiHeaders,
217
+ payload
218
+ );
219
+ }
220
+ createOperations(paramsOrFirst, ...rest) {
221
+ let params;
222
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
223
+ params = paramsOrFirst || {};
224
+ } else {
225
+ params = {
226
+ transactionId: paramsOrFirst,
227
+ operations: rest[0]
228
+ };
229
+ }
230
+ const transactionId = params.transactionId;
231
+ const operations = params.operations;
232
+ if (typeof transactionId === "undefined") {
233
+ throw new AppwriteException('Missing required parameter: "transactionId"');
234
+ }
235
+ const apiPath = "/databases/transactions/{transactionId}/operations".replace("{transactionId}", transactionId);
236
+ const payload = {};
237
+ if (typeof operations !== "undefined") {
238
+ payload["operations"] = operations;
239
+ }
240
+ const uri = new URL(this.client.config.endpoint + apiPath);
241
+ const apiHeaders = {
242
+ "content-type": "application/json"
243
+ };
244
+ return this.client.call(
245
+ "post",
246
+ uri,
247
+ apiHeaders,
248
+ payload
249
+ );
250
+ }
251
+ get(paramsOrFirst) {
252
+ let params;
253
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
254
+ params = paramsOrFirst || {};
255
+ } else {
256
+ params = {
257
+ databaseId: paramsOrFirst
258
+ };
259
+ }
260
+ const databaseId = params.databaseId;
261
+ if (typeof databaseId === "undefined") {
262
+ throw new AppwriteException('Missing required parameter: "databaseId"');
263
+ }
264
+ const apiPath = "/databases/{databaseId}".replace("{databaseId}", databaseId);
265
+ const payload = {};
266
+ const uri = new URL(this.client.config.endpoint + apiPath);
267
+ const apiHeaders = {};
268
+ return this.client.call(
269
+ "get",
270
+ uri,
271
+ apiHeaders,
272
+ payload
273
+ );
274
+ }
275
+ update(paramsOrFirst, ...rest) {
276
+ let params;
277
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
278
+ params = paramsOrFirst || {};
279
+ } else {
280
+ params = {
281
+ databaseId: paramsOrFirst,
282
+ name: rest[0],
283
+ enabled: rest[1]
284
+ };
285
+ }
286
+ const databaseId = params.databaseId;
287
+ const name = params.name;
288
+ const enabled = params.enabled;
289
+ if (typeof databaseId === "undefined") {
290
+ throw new AppwriteException('Missing required parameter: "databaseId"');
291
+ }
292
+ if (typeof name === "undefined") {
293
+ throw new AppwriteException('Missing required parameter: "name"');
294
+ }
295
+ const apiPath = "/databases/{databaseId}".replace("{databaseId}", databaseId);
296
+ const payload = {};
297
+ if (typeof name !== "undefined") {
298
+ payload["name"] = name;
299
+ }
300
+ if (typeof enabled !== "undefined") {
301
+ payload["enabled"] = enabled;
302
+ }
303
+ const uri = new URL(this.client.config.endpoint + apiPath);
304
+ const apiHeaders = {
305
+ "content-type": "application/json"
306
+ };
307
+ return this.client.call(
308
+ "put",
309
+ uri,
310
+ apiHeaders,
311
+ payload
312
+ );
313
+ }
314
+ delete(paramsOrFirst) {
315
+ let params;
316
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
317
+ params = paramsOrFirst || {};
318
+ } else {
319
+ params = {
320
+ databaseId: paramsOrFirst
321
+ };
322
+ }
323
+ const databaseId = params.databaseId;
324
+ if (typeof databaseId === "undefined") {
325
+ throw new AppwriteException('Missing required parameter: "databaseId"');
326
+ }
327
+ const apiPath = "/databases/{databaseId}".replace("{databaseId}", databaseId);
328
+ const payload = {};
329
+ const uri = new URL(this.client.config.endpoint + apiPath);
330
+ const apiHeaders = {
331
+ "content-type": "application/json"
332
+ };
333
+ return this.client.call(
334
+ "delete",
335
+ uri,
336
+ apiHeaders,
337
+ payload
338
+ );
339
+ }
340
+ listCollections(paramsOrFirst, ...rest) {
341
+ let params;
342
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
343
+ params = paramsOrFirst || {};
344
+ } else {
345
+ params = {
346
+ databaseId: paramsOrFirst,
347
+ queries: rest[0],
348
+ search: rest[1],
349
+ total: rest[2]
350
+ };
351
+ }
352
+ const databaseId = params.databaseId;
353
+ const queries = params.queries;
354
+ const search = params.search;
355
+ const total = params.total;
356
+ if (typeof databaseId === "undefined") {
357
+ throw new AppwriteException('Missing required parameter: "databaseId"');
358
+ }
359
+ const apiPath = "/databases/{databaseId}/collections".replace("{databaseId}", databaseId);
360
+ const payload = {};
361
+ if (typeof queries !== "undefined") {
362
+ payload["queries"] = queries;
363
+ }
364
+ if (typeof search !== "undefined") {
365
+ payload["search"] = search;
366
+ }
367
+ if (typeof total !== "undefined") {
368
+ payload["total"] = total;
369
+ }
370
+ const uri = new URL(this.client.config.endpoint + apiPath);
371
+ const apiHeaders = {};
372
+ return this.client.call(
373
+ "get",
374
+ uri,
375
+ apiHeaders,
376
+ payload
377
+ );
378
+ }
379
+ createCollection(paramsOrFirst, ...rest) {
380
+ let params;
381
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
382
+ params = paramsOrFirst || {};
383
+ } else {
384
+ params = {
385
+ databaseId: paramsOrFirst,
386
+ collectionId: rest[0],
387
+ name: rest[1],
388
+ permissions: rest[2],
389
+ documentSecurity: rest[3],
390
+ enabled: rest[4],
391
+ attributes: rest[5],
392
+ indexes: rest[6]
393
+ };
394
+ }
395
+ const databaseId = params.databaseId;
396
+ const collectionId = params.collectionId;
397
+ const name = params.name;
398
+ const permissions = params.permissions;
399
+ const documentSecurity = params.documentSecurity;
400
+ const enabled = params.enabled;
401
+ const attributes = params.attributes;
402
+ const indexes = params.indexes;
403
+ if (typeof databaseId === "undefined") {
404
+ throw new AppwriteException('Missing required parameter: "databaseId"');
405
+ }
406
+ if (typeof collectionId === "undefined") {
407
+ throw new AppwriteException('Missing required parameter: "collectionId"');
408
+ }
409
+ if (typeof name === "undefined") {
410
+ throw new AppwriteException('Missing required parameter: "name"');
411
+ }
412
+ const apiPath = "/databases/{databaseId}/collections".replace("{databaseId}", databaseId);
413
+ const payload = {};
414
+ if (typeof collectionId !== "undefined") {
415
+ payload["collectionId"] = collectionId;
416
+ }
417
+ if (typeof name !== "undefined") {
418
+ payload["name"] = name;
419
+ }
420
+ if (typeof permissions !== "undefined") {
421
+ payload["permissions"] = permissions;
422
+ }
423
+ if (typeof documentSecurity !== "undefined") {
424
+ payload["documentSecurity"] = documentSecurity;
425
+ }
426
+ if (typeof enabled !== "undefined") {
427
+ payload["enabled"] = enabled;
428
+ }
429
+ if (typeof attributes !== "undefined") {
430
+ payload["attributes"] = attributes;
431
+ }
432
+ if (typeof indexes !== "undefined") {
433
+ payload["indexes"] = indexes;
434
+ }
435
+ const uri = new URL(this.client.config.endpoint + apiPath);
436
+ const apiHeaders = {
437
+ "content-type": "application/json"
438
+ };
439
+ return this.client.call(
440
+ "post",
441
+ uri,
442
+ apiHeaders,
443
+ payload
444
+ );
445
+ }
446
+ getCollection(paramsOrFirst, ...rest) {
447
+ let params;
448
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
449
+ params = paramsOrFirst || {};
450
+ } else {
451
+ params = {
452
+ databaseId: paramsOrFirst,
453
+ collectionId: rest[0]
454
+ };
455
+ }
456
+ const databaseId = params.databaseId;
457
+ const collectionId = params.collectionId;
458
+ if (typeof databaseId === "undefined") {
459
+ throw new AppwriteException('Missing required parameter: "databaseId"');
460
+ }
461
+ if (typeof collectionId === "undefined") {
462
+ throw new AppwriteException('Missing required parameter: "collectionId"');
463
+ }
464
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
465
+ const payload = {};
466
+ const uri = new URL(this.client.config.endpoint + apiPath);
467
+ const apiHeaders = {};
468
+ return this.client.call(
469
+ "get",
470
+ uri,
471
+ apiHeaders,
472
+ payload
473
+ );
474
+ }
475
+ updateCollection(paramsOrFirst, ...rest) {
476
+ let params;
477
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
478
+ params = paramsOrFirst || {};
479
+ } else {
480
+ params = {
481
+ databaseId: paramsOrFirst,
482
+ collectionId: rest[0],
483
+ name: rest[1],
484
+ permissions: rest[2],
485
+ documentSecurity: rest[3],
486
+ enabled: rest[4]
487
+ };
488
+ }
489
+ const databaseId = params.databaseId;
490
+ const collectionId = params.collectionId;
491
+ const name = params.name;
492
+ const permissions = params.permissions;
493
+ const documentSecurity = params.documentSecurity;
494
+ const enabled = params.enabled;
495
+ if (typeof databaseId === "undefined") {
496
+ throw new AppwriteException('Missing required parameter: "databaseId"');
497
+ }
498
+ if (typeof collectionId === "undefined") {
499
+ throw new AppwriteException('Missing required parameter: "collectionId"');
500
+ }
501
+ if (typeof name === "undefined") {
502
+ throw new AppwriteException('Missing required parameter: "name"');
503
+ }
504
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
505
+ const payload = {};
506
+ if (typeof name !== "undefined") {
507
+ payload["name"] = name;
508
+ }
509
+ if (typeof permissions !== "undefined") {
510
+ payload["permissions"] = permissions;
511
+ }
512
+ if (typeof documentSecurity !== "undefined") {
513
+ payload["documentSecurity"] = documentSecurity;
514
+ }
515
+ if (typeof enabled !== "undefined") {
516
+ payload["enabled"] = enabled;
517
+ }
518
+ const uri = new URL(this.client.config.endpoint + apiPath);
519
+ const apiHeaders = {
520
+ "content-type": "application/json"
521
+ };
522
+ return this.client.call(
523
+ "put",
524
+ uri,
525
+ apiHeaders,
526
+ payload
527
+ );
528
+ }
529
+ deleteCollection(paramsOrFirst, ...rest) {
530
+ let params;
531
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
532
+ params = paramsOrFirst || {};
533
+ } else {
534
+ params = {
535
+ databaseId: paramsOrFirst,
536
+ collectionId: rest[0]
537
+ };
538
+ }
539
+ const databaseId = params.databaseId;
540
+ const collectionId = params.collectionId;
541
+ if (typeof databaseId === "undefined") {
542
+ throw new AppwriteException('Missing required parameter: "databaseId"');
543
+ }
544
+ if (typeof collectionId === "undefined") {
545
+ throw new AppwriteException('Missing required parameter: "collectionId"');
546
+ }
547
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
548
+ const payload = {};
549
+ const uri = new URL(this.client.config.endpoint + apiPath);
550
+ const apiHeaders = {
551
+ "content-type": "application/json"
552
+ };
553
+ return this.client.call(
554
+ "delete",
555
+ uri,
556
+ apiHeaders,
557
+ payload
558
+ );
559
+ }
560
+ listAttributes(paramsOrFirst, ...rest) {
561
+ let params;
562
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
563
+ params = paramsOrFirst || {};
564
+ } else {
565
+ params = {
566
+ databaseId: paramsOrFirst,
567
+ collectionId: rest[0],
568
+ queries: rest[1],
569
+ total: rest[2]
570
+ };
571
+ }
572
+ const databaseId = params.databaseId;
573
+ const collectionId = params.collectionId;
574
+ const queries = params.queries;
575
+ const total = params.total;
576
+ if (typeof databaseId === "undefined") {
577
+ throw new AppwriteException('Missing required parameter: "databaseId"');
578
+ }
579
+ if (typeof collectionId === "undefined") {
580
+ throw new AppwriteException('Missing required parameter: "collectionId"');
581
+ }
582
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
583
+ const payload = {};
584
+ if (typeof queries !== "undefined") {
585
+ payload["queries"] = queries;
586
+ }
587
+ if (typeof total !== "undefined") {
588
+ payload["total"] = total;
589
+ }
590
+ const uri = new URL(this.client.config.endpoint + apiPath);
591
+ const apiHeaders = {};
592
+ return this.client.call(
593
+ "get",
594
+ uri,
595
+ apiHeaders,
596
+ payload
597
+ );
598
+ }
599
+ createBooleanAttribute(paramsOrFirst, ...rest) {
600
+ let params;
601
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
602
+ params = paramsOrFirst || {};
603
+ } else {
604
+ params = {
605
+ databaseId: paramsOrFirst,
606
+ collectionId: rest[0],
607
+ key: rest[1],
608
+ required: rest[2],
609
+ xdefault: rest[3],
610
+ array: rest[4]
611
+ };
612
+ }
613
+ const databaseId = params.databaseId;
614
+ const collectionId = params.collectionId;
615
+ const key = params.key;
616
+ const required = params.required;
617
+ const xdefault = params.xdefault;
618
+ const array = params.array;
619
+ if (typeof databaseId === "undefined") {
620
+ throw new AppwriteException('Missing required parameter: "databaseId"');
621
+ }
622
+ if (typeof collectionId === "undefined") {
623
+ throw new AppwriteException('Missing required parameter: "collectionId"');
624
+ }
625
+ if (typeof key === "undefined") {
626
+ throw new AppwriteException('Missing required parameter: "key"');
627
+ }
628
+ if (typeof required === "undefined") {
629
+ throw new AppwriteException('Missing required parameter: "required"');
630
+ }
631
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/boolean".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
632
+ const payload = {};
633
+ if (typeof key !== "undefined") {
634
+ payload["key"] = key;
635
+ }
636
+ if (typeof required !== "undefined") {
637
+ payload["required"] = required;
638
+ }
639
+ if (typeof xdefault !== "undefined") {
640
+ payload["default"] = xdefault;
641
+ }
642
+ if (typeof array !== "undefined") {
643
+ payload["array"] = array;
644
+ }
645
+ const uri = new URL(this.client.config.endpoint + apiPath);
646
+ const apiHeaders = {
647
+ "content-type": "application/json"
648
+ };
649
+ return this.client.call(
650
+ "post",
651
+ uri,
652
+ apiHeaders,
653
+ payload
654
+ );
655
+ }
656
+ updateBooleanAttribute(paramsOrFirst, ...rest) {
657
+ let params;
658
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
659
+ params = paramsOrFirst || {};
660
+ } else {
661
+ params = {
662
+ databaseId: paramsOrFirst,
663
+ collectionId: rest[0],
664
+ key: rest[1],
665
+ required: rest[2],
666
+ xdefault: rest[3],
667
+ newKey: rest[4]
668
+ };
669
+ }
670
+ const databaseId = params.databaseId;
671
+ const collectionId = params.collectionId;
672
+ const key = params.key;
673
+ const required = params.required;
674
+ const xdefault = params.xdefault;
675
+ const newKey = params.newKey;
676
+ if (typeof databaseId === "undefined") {
677
+ throw new AppwriteException('Missing required parameter: "databaseId"');
678
+ }
679
+ if (typeof collectionId === "undefined") {
680
+ throw new AppwriteException('Missing required parameter: "collectionId"');
681
+ }
682
+ if (typeof key === "undefined") {
683
+ throw new AppwriteException('Missing required parameter: "key"');
684
+ }
685
+ if (typeof required === "undefined") {
686
+ throw new AppwriteException('Missing required parameter: "required"');
687
+ }
688
+ if (typeof xdefault === "undefined") {
689
+ throw new AppwriteException('Missing required parameter: "xdefault"');
690
+ }
691
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
692
+ const payload = {};
693
+ if (typeof required !== "undefined") {
694
+ payload["required"] = required;
695
+ }
696
+ if (typeof xdefault !== "undefined") {
697
+ payload["default"] = xdefault;
698
+ }
699
+ if (typeof newKey !== "undefined") {
700
+ payload["newKey"] = newKey;
701
+ }
702
+ const uri = new URL(this.client.config.endpoint + apiPath);
703
+ const apiHeaders = {
704
+ "content-type": "application/json"
705
+ };
706
+ return this.client.call(
707
+ "patch",
708
+ uri,
709
+ apiHeaders,
710
+ payload
711
+ );
712
+ }
713
+ createDatetimeAttribute(paramsOrFirst, ...rest) {
714
+ let params;
715
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
716
+ params = paramsOrFirst || {};
717
+ } else {
718
+ params = {
719
+ databaseId: paramsOrFirst,
720
+ collectionId: rest[0],
721
+ key: rest[1],
722
+ required: rest[2],
723
+ xdefault: rest[3],
724
+ array: rest[4]
725
+ };
726
+ }
727
+ const databaseId = params.databaseId;
728
+ const collectionId = params.collectionId;
729
+ const key = params.key;
730
+ const required = params.required;
731
+ const xdefault = params.xdefault;
732
+ const array = params.array;
733
+ if (typeof databaseId === "undefined") {
734
+ throw new AppwriteException('Missing required parameter: "databaseId"');
735
+ }
736
+ if (typeof collectionId === "undefined") {
737
+ throw new AppwriteException('Missing required parameter: "collectionId"');
738
+ }
739
+ if (typeof key === "undefined") {
740
+ throw new AppwriteException('Missing required parameter: "key"');
741
+ }
742
+ if (typeof required === "undefined") {
743
+ throw new AppwriteException('Missing required parameter: "required"');
744
+ }
745
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/datetime".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
746
+ const payload = {};
747
+ if (typeof key !== "undefined") {
748
+ payload["key"] = key;
749
+ }
750
+ if (typeof required !== "undefined") {
751
+ payload["required"] = required;
752
+ }
753
+ if (typeof xdefault !== "undefined") {
754
+ payload["default"] = xdefault;
755
+ }
756
+ if (typeof array !== "undefined") {
757
+ payload["array"] = array;
758
+ }
759
+ const uri = new URL(this.client.config.endpoint + apiPath);
760
+ const apiHeaders = {
761
+ "content-type": "application/json"
762
+ };
763
+ return this.client.call(
764
+ "post",
765
+ uri,
766
+ apiHeaders,
767
+ payload
768
+ );
769
+ }
770
+ updateDatetimeAttribute(paramsOrFirst, ...rest) {
771
+ let params;
772
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
773
+ params = paramsOrFirst || {};
774
+ } else {
775
+ params = {
776
+ databaseId: paramsOrFirst,
777
+ collectionId: rest[0],
778
+ key: rest[1],
779
+ required: rest[2],
780
+ xdefault: rest[3],
781
+ newKey: rest[4]
782
+ };
783
+ }
784
+ const databaseId = params.databaseId;
785
+ const collectionId = params.collectionId;
786
+ const key = params.key;
787
+ const required = params.required;
788
+ const xdefault = params.xdefault;
789
+ const newKey = params.newKey;
790
+ if (typeof databaseId === "undefined") {
791
+ throw new AppwriteException('Missing required parameter: "databaseId"');
792
+ }
793
+ if (typeof collectionId === "undefined") {
794
+ throw new AppwriteException('Missing required parameter: "collectionId"');
795
+ }
796
+ if (typeof key === "undefined") {
797
+ throw new AppwriteException('Missing required parameter: "key"');
798
+ }
799
+ if (typeof required === "undefined") {
800
+ throw new AppwriteException('Missing required parameter: "required"');
801
+ }
802
+ if (typeof xdefault === "undefined") {
803
+ throw new AppwriteException('Missing required parameter: "xdefault"');
804
+ }
805
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
806
+ const payload = {};
807
+ if (typeof required !== "undefined") {
808
+ payload["required"] = required;
809
+ }
810
+ if (typeof xdefault !== "undefined") {
811
+ payload["default"] = xdefault;
812
+ }
813
+ if (typeof newKey !== "undefined") {
814
+ payload["newKey"] = newKey;
815
+ }
816
+ const uri = new URL(this.client.config.endpoint + apiPath);
817
+ const apiHeaders = {
818
+ "content-type": "application/json"
819
+ };
820
+ return this.client.call(
821
+ "patch",
822
+ uri,
823
+ apiHeaders,
824
+ payload
825
+ );
826
+ }
827
+ createEmailAttribute(paramsOrFirst, ...rest) {
828
+ let params;
829
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
830
+ params = paramsOrFirst || {};
831
+ } else {
832
+ params = {
833
+ databaseId: paramsOrFirst,
834
+ collectionId: rest[0],
835
+ key: rest[1],
836
+ required: rest[2],
837
+ xdefault: rest[3],
838
+ array: rest[4]
839
+ };
840
+ }
841
+ const databaseId = params.databaseId;
842
+ const collectionId = params.collectionId;
843
+ const key = params.key;
844
+ const required = params.required;
845
+ const xdefault = params.xdefault;
846
+ const array = params.array;
847
+ if (typeof databaseId === "undefined") {
848
+ throw new AppwriteException('Missing required parameter: "databaseId"');
849
+ }
850
+ if (typeof collectionId === "undefined") {
851
+ throw new AppwriteException('Missing required parameter: "collectionId"');
852
+ }
853
+ if (typeof key === "undefined") {
854
+ throw new AppwriteException('Missing required parameter: "key"');
855
+ }
856
+ if (typeof required === "undefined") {
857
+ throw new AppwriteException('Missing required parameter: "required"');
858
+ }
859
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/email".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
860
+ const payload = {};
861
+ if (typeof key !== "undefined") {
862
+ payload["key"] = key;
863
+ }
864
+ if (typeof required !== "undefined") {
865
+ payload["required"] = required;
866
+ }
867
+ if (typeof xdefault !== "undefined") {
868
+ payload["default"] = xdefault;
869
+ }
870
+ if (typeof array !== "undefined") {
871
+ payload["array"] = array;
872
+ }
873
+ const uri = new URL(this.client.config.endpoint + apiPath);
874
+ const apiHeaders = {
875
+ "content-type": "application/json"
876
+ };
877
+ return this.client.call(
878
+ "post",
879
+ uri,
880
+ apiHeaders,
881
+ payload
882
+ );
883
+ }
884
+ updateEmailAttribute(paramsOrFirst, ...rest) {
885
+ let params;
886
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
887
+ params = paramsOrFirst || {};
888
+ } else {
889
+ params = {
890
+ databaseId: paramsOrFirst,
891
+ collectionId: rest[0],
892
+ key: rest[1],
893
+ required: rest[2],
894
+ xdefault: rest[3],
895
+ newKey: rest[4]
896
+ };
897
+ }
898
+ const databaseId = params.databaseId;
899
+ const collectionId = params.collectionId;
900
+ const key = params.key;
901
+ const required = params.required;
902
+ const xdefault = params.xdefault;
903
+ const newKey = params.newKey;
904
+ if (typeof databaseId === "undefined") {
905
+ throw new AppwriteException('Missing required parameter: "databaseId"');
906
+ }
907
+ if (typeof collectionId === "undefined") {
908
+ throw new AppwriteException('Missing required parameter: "collectionId"');
909
+ }
910
+ if (typeof key === "undefined") {
911
+ throw new AppwriteException('Missing required parameter: "key"');
912
+ }
913
+ if (typeof required === "undefined") {
914
+ throw new AppwriteException('Missing required parameter: "required"');
915
+ }
916
+ if (typeof xdefault === "undefined") {
917
+ throw new AppwriteException('Missing required parameter: "xdefault"');
918
+ }
919
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
920
+ const payload = {};
921
+ if (typeof required !== "undefined") {
922
+ payload["required"] = required;
923
+ }
924
+ if (typeof xdefault !== "undefined") {
925
+ payload["default"] = xdefault;
926
+ }
927
+ if (typeof newKey !== "undefined") {
928
+ payload["newKey"] = newKey;
929
+ }
930
+ const uri = new URL(this.client.config.endpoint + apiPath);
931
+ const apiHeaders = {
932
+ "content-type": "application/json"
933
+ };
934
+ return this.client.call(
935
+ "patch",
936
+ uri,
937
+ apiHeaders,
938
+ payload
939
+ );
940
+ }
941
+ createEnumAttribute(paramsOrFirst, ...rest) {
942
+ let params;
943
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
944
+ params = paramsOrFirst || {};
945
+ } else {
946
+ params = {
947
+ databaseId: paramsOrFirst,
948
+ collectionId: rest[0],
949
+ key: rest[1],
950
+ elements: rest[2],
951
+ required: rest[3],
952
+ xdefault: rest[4],
953
+ array: rest[5]
954
+ };
955
+ }
956
+ const databaseId = params.databaseId;
957
+ const collectionId = params.collectionId;
958
+ const key = params.key;
959
+ const elements = params.elements;
960
+ const required = params.required;
961
+ const xdefault = params.xdefault;
962
+ const array = params.array;
963
+ if (typeof databaseId === "undefined") {
964
+ throw new AppwriteException('Missing required parameter: "databaseId"');
965
+ }
966
+ if (typeof collectionId === "undefined") {
967
+ throw new AppwriteException('Missing required parameter: "collectionId"');
968
+ }
969
+ if (typeof key === "undefined") {
970
+ throw new AppwriteException('Missing required parameter: "key"');
971
+ }
972
+ if (typeof elements === "undefined") {
973
+ throw new AppwriteException('Missing required parameter: "elements"');
974
+ }
975
+ if (typeof required === "undefined") {
976
+ throw new AppwriteException('Missing required parameter: "required"');
977
+ }
978
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/enum".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
979
+ const payload = {};
980
+ if (typeof key !== "undefined") {
981
+ payload["key"] = key;
982
+ }
983
+ if (typeof elements !== "undefined") {
984
+ payload["elements"] = elements;
985
+ }
986
+ if (typeof required !== "undefined") {
987
+ payload["required"] = required;
988
+ }
989
+ if (typeof xdefault !== "undefined") {
990
+ payload["default"] = xdefault;
991
+ }
992
+ if (typeof array !== "undefined") {
993
+ payload["array"] = array;
994
+ }
995
+ const uri = new URL(this.client.config.endpoint + apiPath);
996
+ const apiHeaders = {
997
+ "content-type": "application/json"
998
+ };
999
+ return this.client.call(
1000
+ "post",
1001
+ uri,
1002
+ apiHeaders,
1003
+ payload
1004
+ );
1005
+ }
1006
+ updateEnumAttribute(paramsOrFirst, ...rest) {
1007
+ let params;
1008
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1009
+ params = paramsOrFirst || {};
1010
+ } else {
1011
+ params = {
1012
+ databaseId: paramsOrFirst,
1013
+ collectionId: rest[0],
1014
+ key: rest[1],
1015
+ elements: rest[2],
1016
+ required: rest[3],
1017
+ xdefault: rest[4],
1018
+ newKey: rest[5]
1019
+ };
1020
+ }
1021
+ const databaseId = params.databaseId;
1022
+ const collectionId = params.collectionId;
1023
+ const key = params.key;
1024
+ const elements = params.elements;
1025
+ const required = params.required;
1026
+ const xdefault = params.xdefault;
1027
+ const newKey = params.newKey;
1028
+ if (typeof databaseId === "undefined") {
1029
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1030
+ }
1031
+ if (typeof collectionId === "undefined") {
1032
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1033
+ }
1034
+ if (typeof key === "undefined") {
1035
+ throw new AppwriteException('Missing required parameter: "key"');
1036
+ }
1037
+ if (typeof elements === "undefined") {
1038
+ throw new AppwriteException('Missing required parameter: "elements"');
1039
+ }
1040
+ if (typeof required === "undefined") {
1041
+ throw new AppwriteException('Missing required parameter: "required"');
1042
+ }
1043
+ if (typeof xdefault === "undefined") {
1044
+ throw new AppwriteException('Missing required parameter: "xdefault"');
1045
+ }
1046
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
1047
+ const payload = {};
1048
+ if (typeof elements !== "undefined") {
1049
+ payload["elements"] = elements;
1050
+ }
1051
+ if (typeof required !== "undefined") {
1052
+ payload["required"] = required;
1053
+ }
1054
+ if (typeof xdefault !== "undefined") {
1055
+ payload["default"] = xdefault;
1056
+ }
1057
+ if (typeof newKey !== "undefined") {
1058
+ payload["newKey"] = newKey;
1059
+ }
1060
+ const uri = new URL(this.client.config.endpoint + apiPath);
1061
+ const apiHeaders = {
1062
+ "content-type": "application/json"
1063
+ };
1064
+ return this.client.call(
1065
+ "patch",
1066
+ uri,
1067
+ apiHeaders,
1068
+ payload
1069
+ );
1070
+ }
1071
+ createFloatAttribute(paramsOrFirst, ...rest) {
1072
+ let params;
1073
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1074
+ params = paramsOrFirst || {};
1075
+ } else {
1076
+ params = {
1077
+ databaseId: paramsOrFirst,
1078
+ collectionId: rest[0],
1079
+ key: rest[1],
1080
+ required: rest[2],
1081
+ min: rest[3],
1082
+ max: rest[4],
1083
+ xdefault: rest[5],
1084
+ array: rest[6]
1085
+ };
1086
+ }
1087
+ const databaseId = params.databaseId;
1088
+ const collectionId = params.collectionId;
1089
+ const key = params.key;
1090
+ const required = params.required;
1091
+ const min = params.min;
1092
+ const max = params.max;
1093
+ const xdefault = params.xdefault;
1094
+ const array = params.array;
1095
+ if (typeof databaseId === "undefined") {
1096
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1097
+ }
1098
+ if (typeof collectionId === "undefined") {
1099
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1100
+ }
1101
+ if (typeof key === "undefined") {
1102
+ throw new AppwriteException('Missing required parameter: "key"');
1103
+ }
1104
+ if (typeof required === "undefined") {
1105
+ throw new AppwriteException('Missing required parameter: "required"');
1106
+ }
1107
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/float".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
1108
+ const payload = {};
1109
+ if (typeof key !== "undefined") {
1110
+ payload["key"] = key;
1111
+ }
1112
+ if (typeof required !== "undefined") {
1113
+ payload["required"] = required;
1114
+ }
1115
+ if (typeof min !== "undefined") {
1116
+ payload["min"] = min;
1117
+ }
1118
+ if (typeof max !== "undefined") {
1119
+ payload["max"] = max;
1120
+ }
1121
+ if (typeof xdefault !== "undefined") {
1122
+ payload["default"] = xdefault;
1123
+ }
1124
+ if (typeof array !== "undefined") {
1125
+ payload["array"] = array;
1126
+ }
1127
+ const uri = new URL(this.client.config.endpoint + apiPath);
1128
+ const apiHeaders = {
1129
+ "content-type": "application/json"
1130
+ };
1131
+ return this.client.call(
1132
+ "post",
1133
+ uri,
1134
+ apiHeaders,
1135
+ payload
1136
+ );
1137
+ }
1138
+ updateFloatAttribute(paramsOrFirst, ...rest) {
1139
+ let params;
1140
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1141
+ params = paramsOrFirst || {};
1142
+ } else {
1143
+ params = {
1144
+ databaseId: paramsOrFirst,
1145
+ collectionId: rest[0],
1146
+ key: rest[1],
1147
+ required: rest[2],
1148
+ xdefault: rest[3],
1149
+ min: rest[4],
1150
+ max: rest[5],
1151
+ newKey: rest[6]
1152
+ };
1153
+ }
1154
+ const databaseId = params.databaseId;
1155
+ const collectionId = params.collectionId;
1156
+ const key = params.key;
1157
+ const required = params.required;
1158
+ const xdefault = params.xdefault;
1159
+ const min = params.min;
1160
+ const max = params.max;
1161
+ const newKey = params.newKey;
1162
+ if (typeof databaseId === "undefined") {
1163
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1164
+ }
1165
+ if (typeof collectionId === "undefined") {
1166
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1167
+ }
1168
+ if (typeof key === "undefined") {
1169
+ throw new AppwriteException('Missing required parameter: "key"');
1170
+ }
1171
+ if (typeof required === "undefined") {
1172
+ throw new AppwriteException('Missing required parameter: "required"');
1173
+ }
1174
+ if (typeof xdefault === "undefined") {
1175
+ throw new AppwriteException('Missing required parameter: "xdefault"');
1176
+ }
1177
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
1178
+ const payload = {};
1179
+ if (typeof required !== "undefined") {
1180
+ payload["required"] = required;
1181
+ }
1182
+ if (typeof min !== "undefined") {
1183
+ payload["min"] = min;
1184
+ }
1185
+ if (typeof max !== "undefined") {
1186
+ payload["max"] = max;
1187
+ }
1188
+ if (typeof xdefault !== "undefined") {
1189
+ payload["default"] = xdefault;
1190
+ }
1191
+ if (typeof newKey !== "undefined") {
1192
+ payload["newKey"] = newKey;
1193
+ }
1194
+ const uri = new URL(this.client.config.endpoint + apiPath);
1195
+ const apiHeaders = {
1196
+ "content-type": "application/json"
1197
+ };
1198
+ return this.client.call(
1199
+ "patch",
1200
+ uri,
1201
+ apiHeaders,
1202
+ payload
1203
+ );
1204
+ }
1205
+ createIntegerAttribute(paramsOrFirst, ...rest) {
1206
+ let params;
1207
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1208
+ params = paramsOrFirst || {};
1209
+ } else {
1210
+ params = {
1211
+ databaseId: paramsOrFirst,
1212
+ collectionId: rest[0],
1213
+ key: rest[1],
1214
+ required: rest[2],
1215
+ min: rest[3],
1216
+ max: rest[4],
1217
+ xdefault: rest[5],
1218
+ array: rest[6]
1219
+ };
1220
+ }
1221
+ const databaseId = params.databaseId;
1222
+ const collectionId = params.collectionId;
1223
+ const key = params.key;
1224
+ const required = params.required;
1225
+ const min = params.min;
1226
+ const max = params.max;
1227
+ const xdefault = params.xdefault;
1228
+ const array = params.array;
1229
+ if (typeof databaseId === "undefined") {
1230
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1231
+ }
1232
+ if (typeof collectionId === "undefined") {
1233
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1234
+ }
1235
+ if (typeof key === "undefined") {
1236
+ throw new AppwriteException('Missing required parameter: "key"');
1237
+ }
1238
+ if (typeof required === "undefined") {
1239
+ throw new AppwriteException('Missing required parameter: "required"');
1240
+ }
1241
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/integer".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
1242
+ const payload = {};
1243
+ if (typeof key !== "undefined") {
1244
+ payload["key"] = key;
1245
+ }
1246
+ if (typeof required !== "undefined") {
1247
+ payload["required"] = required;
1248
+ }
1249
+ if (typeof min !== "undefined") {
1250
+ payload["min"] = min;
1251
+ }
1252
+ if (typeof max !== "undefined") {
1253
+ payload["max"] = max;
1254
+ }
1255
+ if (typeof xdefault !== "undefined") {
1256
+ payload["default"] = xdefault;
1257
+ }
1258
+ if (typeof array !== "undefined") {
1259
+ payload["array"] = array;
1260
+ }
1261
+ const uri = new URL(this.client.config.endpoint + apiPath);
1262
+ const apiHeaders = {
1263
+ "content-type": "application/json"
1264
+ };
1265
+ return this.client.call(
1266
+ "post",
1267
+ uri,
1268
+ apiHeaders,
1269
+ payload
1270
+ );
1271
+ }
1272
+ updateIntegerAttribute(paramsOrFirst, ...rest) {
1273
+ let params;
1274
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1275
+ params = paramsOrFirst || {};
1276
+ } else {
1277
+ params = {
1278
+ databaseId: paramsOrFirst,
1279
+ collectionId: rest[0],
1280
+ key: rest[1],
1281
+ required: rest[2],
1282
+ xdefault: rest[3],
1283
+ min: rest[4],
1284
+ max: rest[5],
1285
+ newKey: rest[6]
1286
+ };
1287
+ }
1288
+ const databaseId = params.databaseId;
1289
+ const collectionId = params.collectionId;
1290
+ const key = params.key;
1291
+ const required = params.required;
1292
+ const xdefault = params.xdefault;
1293
+ const min = params.min;
1294
+ const max = params.max;
1295
+ const newKey = params.newKey;
1296
+ if (typeof databaseId === "undefined") {
1297
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1298
+ }
1299
+ if (typeof collectionId === "undefined") {
1300
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1301
+ }
1302
+ if (typeof key === "undefined") {
1303
+ throw new AppwriteException('Missing required parameter: "key"');
1304
+ }
1305
+ if (typeof required === "undefined") {
1306
+ throw new AppwriteException('Missing required parameter: "required"');
1307
+ }
1308
+ if (typeof xdefault === "undefined") {
1309
+ throw new AppwriteException('Missing required parameter: "xdefault"');
1310
+ }
1311
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
1312
+ const payload = {};
1313
+ if (typeof required !== "undefined") {
1314
+ payload["required"] = required;
1315
+ }
1316
+ if (typeof min !== "undefined") {
1317
+ payload["min"] = min;
1318
+ }
1319
+ if (typeof max !== "undefined") {
1320
+ payload["max"] = max;
1321
+ }
1322
+ if (typeof xdefault !== "undefined") {
1323
+ payload["default"] = xdefault;
1324
+ }
1325
+ if (typeof newKey !== "undefined") {
1326
+ payload["newKey"] = newKey;
1327
+ }
1328
+ const uri = new URL(this.client.config.endpoint + apiPath);
1329
+ const apiHeaders = {
1330
+ "content-type": "application/json"
1331
+ };
1332
+ return this.client.call(
1333
+ "patch",
1334
+ uri,
1335
+ apiHeaders,
1336
+ payload
1337
+ );
1338
+ }
1339
+ createIpAttribute(paramsOrFirst, ...rest) {
1340
+ let params;
1341
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1342
+ params = paramsOrFirst || {};
1343
+ } else {
1344
+ params = {
1345
+ databaseId: paramsOrFirst,
1346
+ collectionId: rest[0],
1347
+ key: rest[1],
1348
+ required: rest[2],
1349
+ xdefault: rest[3],
1350
+ array: rest[4]
1351
+ };
1352
+ }
1353
+ const databaseId = params.databaseId;
1354
+ const collectionId = params.collectionId;
1355
+ const key = params.key;
1356
+ const required = params.required;
1357
+ const xdefault = params.xdefault;
1358
+ const array = params.array;
1359
+ if (typeof databaseId === "undefined") {
1360
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1361
+ }
1362
+ if (typeof collectionId === "undefined") {
1363
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1364
+ }
1365
+ if (typeof key === "undefined") {
1366
+ throw new AppwriteException('Missing required parameter: "key"');
1367
+ }
1368
+ if (typeof required === "undefined") {
1369
+ throw new AppwriteException('Missing required parameter: "required"');
1370
+ }
1371
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/ip".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
1372
+ const payload = {};
1373
+ if (typeof key !== "undefined") {
1374
+ payload["key"] = key;
1375
+ }
1376
+ if (typeof required !== "undefined") {
1377
+ payload["required"] = required;
1378
+ }
1379
+ if (typeof xdefault !== "undefined") {
1380
+ payload["default"] = xdefault;
1381
+ }
1382
+ if (typeof array !== "undefined") {
1383
+ payload["array"] = array;
1384
+ }
1385
+ const uri = new URL(this.client.config.endpoint + apiPath);
1386
+ const apiHeaders = {
1387
+ "content-type": "application/json"
1388
+ };
1389
+ return this.client.call(
1390
+ "post",
1391
+ uri,
1392
+ apiHeaders,
1393
+ payload
1394
+ );
1395
+ }
1396
+ updateIpAttribute(paramsOrFirst, ...rest) {
1397
+ let params;
1398
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1399
+ params = paramsOrFirst || {};
1400
+ } else {
1401
+ params = {
1402
+ databaseId: paramsOrFirst,
1403
+ collectionId: rest[0],
1404
+ key: rest[1],
1405
+ required: rest[2],
1406
+ xdefault: rest[3],
1407
+ newKey: rest[4]
1408
+ };
1409
+ }
1410
+ const databaseId = params.databaseId;
1411
+ const collectionId = params.collectionId;
1412
+ const key = params.key;
1413
+ const required = params.required;
1414
+ const xdefault = params.xdefault;
1415
+ const newKey = params.newKey;
1416
+ if (typeof databaseId === "undefined") {
1417
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1418
+ }
1419
+ if (typeof collectionId === "undefined") {
1420
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1421
+ }
1422
+ if (typeof key === "undefined") {
1423
+ throw new AppwriteException('Missing required parameter: "key"');
1424
+ }
1425
+ if (typeof required === "undefined") {
1426
+ throw new AppwriteException('Missing required parameter: "required"');
1427
+ }
1428
+ if (typeof xdefault === "undefined") {
1429
+ throw new AppwriteException('Missing required parameter: "xdefault"');
1430
+ }
1431
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
1432
+ const payload = {};
1433
+ if (typeof required !== "undefined") {
1434
+ payload["required"] = required;
1435
+ }
1436
+ if (typeof xdefault !== "undefined") {
1437
+ payload["default"] = xdefault;
1438
+ }
1439
+ if (typeof newKey !== "undefined") {
1440
+ payload["newKey"] = newKey;
1441
+ }
1442
+ const uri = new URL(this.client.config.endpoint + apiPath);
1443
+ const apiHeaders = {
1444
+ "content-type": "application/json"
1445
+ };
1446
+ return this.client.call(
1447
+ "patch",
1448
+ uri,
1449
+ apiHeaders,
1450
+ payload
1451
+ );
1452
+ }
1453
+ createLineAttribute(paramsOrFirst, ...rest) {
1454
+ let params;
1455
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1456
+ params = paramsOrFirst || {};
1457
+ } else {
1458
+ params = {
1459
+ databaseId: paramsOrFirst,
1460
+ collectionId: rest[0],
1461
+ key: rest[1],
1462
+ required: rest[2],
1463
+ xdefault: rest[3]
1464
+ };
1465
+ }
1466
+ const databaseId = params.databaseId;
1467
+ const collectionId = params.collectionId;
1468
+ const key = params.key;
1469
+ const required = params.required;
1470
+ const xdefault = params.xdefault;
1471
+ if (typeof databaseId === "undefined") {
1472
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1473
+ }
1474
+ if (typeof collectionId === "undefined") {
1475
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1476
+ }
1477
+ if (typeof key === "undefined") {
1478
+ throw new AppwriteException('Missing required parameter: "key"');
1479
+ }
1480
+ if (typeof required === "undefined") {
1481
+ throw new AppwriteException('Missing required parameter: "required"');
1482
+ }
1483
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/line".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
1484
+ const payload = {};
1485
+ if (typeof key !== "undefined") {
1486
+ payload["key"] = key;
1487
+ }
1488
+ if (typeof required !== "undefined") {
1489
+ payload["required"] = required;
1490
+ }
1491
+ if (typeof xdefault !== "undefined") {
1492
+ payload["default"] = xdefault;
1493
+ }
1494
+ const uri = new URL(this.client.config.endpoint + apiPath);
1495
+ const apiHeaders = {
1496
+ "content-type": "application/json"
1497
+ };
1498
+ return this.client.call(
1499
+ "post",
1500
+ uri,
1501
+ apiHeaders,
1502
+ payload
1503
+ );
1504
+ }
1505
+ updateLineAttribute(paramsOrFirst, ...rest) {
1506
+ let params;
1507
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1508
+ params = paramsOrFirst || {};
1509
+ } else {
1510
+ params = {
1511
+ databaseId: paramsOrFirst,
1512
+ collectionId: rest[0],
1513
+ key: rest[1],
1514
+ required: rest[2],
1515
+ xdefault: rest[3],
1516
+ newKey: rest[4]
1517
+ };
1518
+ }
1519
+ const databaseId = params.databaseId;
1520
+ const collectionId = params.collectionId;
1521
+ const key = params.key;
1522
+ const required = params.required;
1523
+ const xdefault = params.xdefault;
1524
+ const newKey = params.newKey;
1525
+ if (typeof databaseId === "undefined") {
1526
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1527
+ }
1528
+ if (typeof collectionId === "undefined") {
1529
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1530
+ }
1531
+ if (typeof key === "undefined") {
1532
+ throw new AppwriteException('Missing required parameter: "key"');
1533
+ }
1534
+ if (typeof required === "undefined") {
1535
+ throw new AppwriteException('Missing required parameter: "required"');
1536
+ }
1537
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/line/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
1538
+ const payload = {};
1539
+ if (typeof required !== "undefined") {
1540
+ payload["required"] = required;
1541
+ }
1542
+ if (typeof xdefault !== "undefined") {
1543
+ payload["default"] = xdefault;
1544
+ }
1545
+ if (typeof newKey !== "undefined") {
1546
+ payload["newKey"] = newKey;
1547
+ }
1548
+ const uri = new URL(this.client.config.endpoint + apiPath);
1549
+ const apiHeaders = {
1550
+ "content-type": "application/json"
1551
+ };
1552
+ return this.client.call(
1553
+ "patch",
1554
+ uri,
1555
+ apiHeaders,
1556
+ payload
1557
+ );
1558
+ }
1559
+ createPointAttribute(paramsOrFirst, ...rest) {
1560
+ let params;
1561
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1562
+ params = paramsOrFirst || {};
1563
+ } else {
1564
+ params = {
1565
+ databaseId: paramsOrFirst,
1566
+ collectionId: rest[0],
1567
+ key: rest[1],
1568
+ required: rest[2],
1569
+ xdefault: rest[3]
1570
+ };
1571
+ }
1572
+ const databaseId = params.databaseId;
1573
+ const collectionId = params.collectionId;
1574
+ const key = params.key;
1575
+ const required = params.required;
1576
+ const xdefault = params.xdefault;
1577
+ if (typeof databaseId === "undefined") {
1578
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1579
+ }
1580
+ if (typeof collectionId === "undefined") {
1581
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1582
+ }
1583
+ if (typeof key === "undefined") {
1584
+ throw new AppwriteException('Missing required parameter: "key"');
1585
+ }
1586
+ if (typeof required === "undefined") {
1587
+ throw new AppwriteException('Missing required parameter: "required"');
1588
+ }
1589
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/point".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
1590
+ const payload = {};
1591
+ if (typeof key !== "undefined") {
1592
+ payload["key"] = key;
1593
+ }
1594
+ if (typeof required !== "undefined") {
1595
+ payload["required"] = required;
1596
+ }
1597
+ if (typeof xdefault !== "undefined") {
1598
+ payload["default"] = xdefault;
1599
+ }
1600
+ const uri = new URL(this.client.config.endpoint + apiPath);
1601
+ const apiHeaders = {
1602
+ "content-type": "application/json"
1603
+ };
1604
+ return this.client.call(
1605
+ "post",
1606
+ uri,
1607
+ apiHeaders,
1608
+ payload
1609
+ );
1610
+ }
1611
+ updatePointAttribute(paramsOrFirst, ...rest) {
1612
+ let params;
1613
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1614
+ params = paramsOrFirst || {};
1615
+ } else {
1616
+ params = {
1617
+ databaseId: paramsOrFirst,
1618
+ collectionId: rest[0],
1619
+ key: rest[1],
1620
+ required: rest[2],
1621
+ xdefault: rest[3],
1622
+ newKey: rest[4]
1623
+ };
1624
+ }
1625
+ const databaseId = params.databaseId;
1626
+ const collectionId = params.collectionId;
1627
+ const key = params.key;
1628
+ const required = params.required;
1629
+ const xdefault = params.xdefault;
1630
+ const newKey = params.newKey;
1631
+ if (typeof databaseId === "undefined") {
1632
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1633
+ }
1634
+ if (typeof collectionId === "undefined") {
1635
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1636
+ }
1637
+ if (typeof key === "undefined") {
1638
+ throw new AppwriteException('Missing required parameter: "key"');
1639
+ }
1640
+ if (typeof required === "undefined") {
1641
+ throw new AppwriteException('Missing required parameter: "required"');
1642
+ }
1643
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/point/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
1644
+ const payload = {};
1645
+ if (typeof required !== "undefined") {
1646
+ payload["required"] = required;
1647
+ }
1648
+ if (typeof xdefault !== "undefined") {
1649
+ payload["default"] = xdefault;
1650
+ }
1651
+ if (typeof newKey !== "undefined") {
1652
+ payload["newKey"] = newKey;
1653
+ }
1654
+ const uri = new URL(this.client.config.endpoint + apiPath);
1655
+ const apiHeaders = {
1656
+ "content-type": "application/json"
1657
+ };
1658
+ return this.client.call(
1659
+ "patch",
1660
+ uri,
1661
+ apiHeaders,
1662
+ payload
1663
+ );
1664
+ }
1665
+ createPolygonAttribute(paramsOrFirst, ...rest) {
1666
+ let params;
1667
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1668
+ params = paramsOrFirst || {};
1669
+ } else {
1670
+ params = {
1671
+ databaseId: paramsOrFirst,
1672
+ collectionId: rest[0],
1673
+ key: rest[1],
1674
+ required: rest[2],
1675
+ xdefault: rest[3]
1676
+ };
1677
+ }
1678
+ const databaseId = params.databaseId;
1679
+ const collectionId = params.collectionId;
1680
+ const key = params.key;
1681
+ const required = params.required;
1682
+ const xdefault = params.xdefault;
1683
+ if (typeof databaseId === "undefined") {
1684
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1685
+ }
1686
+ if (typeof collectionId === "undefined") {
1687
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1688
+ }
1689
+ if (typeof key === "undefined") {
1690
+ throw new AppwriteException('Missing required parameter: "key"');
1691
+ }
1692
+ if (typeof required === "undefined") {
1693
+ throw new AppwriteException('Missing required parameter: "required"');
1694
+ }
1695
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/polygon".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
1696
+ const payload = {};
1697
+ if (typeof key !== "undefined") {
1698
+ payload["key"] = key;
1699
+ }
1700
+ if (typeof required !== "undefined") {
1701
+ payload["required"] = required;
1702
+ }
1703
+ if (typeof xdefault !== "undefined") {
1704
+ payload["default"] = xdefault;
1705
+ }
1706
+ const uri = new URL(this.client.config.endpoint + apiPath);
1707
+ const apiHeaders = {
1708
+ "content-type": "application/json"
1709
+ };
1710
+ return this.client.call(
1711
+ "post",
1712
+ uri,
1713
+ apiHeaders,
1714
+ payload
1715
+ );
1716
+ }
1717
+ updatePolygonAttribute(paramsOrFirst, ...rest) {
1718
+ let params;
1719
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1720
+ params = paramsOrFirst || {};
1721
+ } else {
1722
+ params = {
1723
+ databaseId: paramsOrFirst,
1724
+ collectionId: rest[0],
1725
+ key: rest[1],
1726
+ required: rest[2],
1727
+ xdefault: rest[3],
1728
+ newKey: rest[4]
1729
+ };
1730
+ }
1731
+ const databaseId = params.databaseId;
1732
+ const collectionId = params.collectionId;
1733
+ const key = params.key;
1734
+ const required = params.required;
1735
+ const xdefault = params.xdefault;
1736
+ const newKey = params.newKey;
1737
+ if (typeof databaseId === "undefined") {
1738
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1739
+ }
1740
+ if (typeof collectionId === "undefined") {
1741
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1742
+ }
1743
+ if (typeof key === "undefined") {
1744
+ throw new AppwriteException('Missing required parameter: "key"');
1745
+ }
1746
+ if (typeof required === "undefined") {
1747
+ throw new AppwriteException('Missing required parameter: "required"');
1748
+ }
1749
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/polygon/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
1750
+ const payload = {};
1751
+ if (typeof required !== "undefined") {
1752
+ payload["required"] = required;
1753
+ }
1754
+ if (typeof xdefault !== "undefined") {
1755
+ payload["default"] = xdefault;
1756
+ }
1757
+ if (typeof newKey !== "undefined") {
1758
+ payload["newKey"] = newKey;
1759
+ }
1760
+ const uri = new URL(this.client.config.endpoint + apiPath);
1761
+ const apiHeaders = {
1762
+ "content-type": "application/json"
1763
+ };
1764
+ return this.client.call(
1765
+ "patch",
1766
+ uri,
1767
+ apiHeaders,
1768
+ payload
1769
+ );
1770
+ }
1771
+ createRelationshipAttribute(paramsOrFirst, ...rest) {
1772
+ let params;
1773
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1774
+ params = paramsOrFirst || {};
1775
+ } else {
1776
+ params = {
1777
+ databaseId: paramsOrFirst,
1778
+ collectionId: rest[0],
1779
+ relatedCollectionId: rest[1],
1780
+ type: rest[2],
1781
+ twoWay: rest[3],
1782
+ key: rest[4],
1783
+ twoWayKey: rest[5],
1784
+ onDelete: rest[6]
1785
+ };
1786
+ }
1787
+ const databaseId = params.databaseId;
1788
+ const collectionId = params.collectionId;
1789
+ const relatedCollectionId = params.relatedCollectionId;
1790
+ const type = params.type;
1791
+ const twoWay = params.twoWay;
1792
+ const key = params.key;
1793
+ const twoWayKey = params.twoWayKey;
1794
+ const onDelete = params.onDelete;
1795
+ if (typeof databaseId === "undefined") {
1796
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1797
+ }
1798
+ if (typeof collectionId === "undefined") {
1799
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1800
+ }
1801
+ if (typeof relatedCollectionId === "undefined") {
1802
+ throw new AppwriteException('Missing required parameter: "relatedCollectionId"');
1803
+ }
1804
+ if (typeof type === "undefined") {
1805
+ throw new AppwriteException('Missing required parameter: "type"');
1806
+ }
1807
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/relationship".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
1808
+ const payload = {};
1809
+ if (typeof relatedCollectionId !== "undefined") {
1810
+ payload["relatedCollectionId"] = relatedCollectionId;
1811
+ }
1812
+ if (typeof type !== "undefined") {
1813
+ payload["type"] = type;
1814
+ }
1815
+ if (typeof twoWay !== "undefined") {
1816
+ payload["twoWay"] = twoWay;
1817
+ }
1818
+ if (typeof key !== "undefined") {
1819
+ payload["key"] = key;
1820
+ }
1821
+ if (typeof twoWayKey !== "undefined") {
1822
+ payload["twoWayKey"] = twoWayKey;
1823
+ }
1824
+ if (typeof onDelete !== "undefined") {
1825
+ payload["onDelete"] = onDelete;
1826
+ }
1827
+ const uri = new URL(this.client.config.endpoint + apiPath);
1828
+ const apiHeaders = {
1829
+ "content-type": "application/json"
1830
+ };
1831
+ return this.client.call(
1832
+ "post",
1833
+ uri,
1834
+ apiHeaders,
1835
+ payload
1836
+ );
1837
+ }
1838
+ createStringAttribute(paramsOrFirst, ...rest) {
1839
+ let params;
1840
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1841
+ params = paramsOrFirst || {};
1842
+ } else {
1843
+ params = {
1844
+ databaseId: paramsOrFirst,
1845
+ collectionId: rest[0],
1846
+ key: rest[1],
1847
+ size: rest[2],
1848
+ required: rest[3],
1849
+ xdefault: rest[4],
1850
+ array: rest[5],
1851
+ encrypt: rest[6]
1852
+ };
1853
+ }
1854
+ const databaseId = params.databaseId;
1855
+ const collectionId = params.collectionId;
1856
+ const key = params.key;
1857
+ const size = params.size;
1858
+ const required = params.required;
1859
+ const xdefault = params.xdefault;
1860
+ const array = params.array;
1861
+ const encrypt = params.encrypt;
1862
+ if (typeof databaseId === "undefined") {
1863
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1864
+ }
1865
+ if (typeof collectionId === "undefined") {
1866
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1867
+ }
1868
+ if (typeof key === "undefined") {
1869
+ throw new AppwriteException('Missing required parameter: "key"');
1870
+ }
1871
+ if (typeof size === "undefined") {
1872
+ throw new AppwriteException('Missing required parameter: "size"');
1873
+ }
1874
+ if (typeof required === "undefined") {
1875
+ throw new AppwriteException('Missing required parameter: "required"');
1876
+ }
1877
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/string".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
1878
+ const payload = {};
1879
+ if (typeof key !== "undefined") {
1880
+ payload["key"] = key;
1881
+ }
1882
+ if (typeof size !== "undefined") {
1883
+ payload["size"] = size;
1884
+ }
1885
+ if (typeof required !== "undefined") {
1886
+ payload["required"] = required;
1887
+ }
1888
+ if (typeof xdefault !== "undefined") {
1889
+ payload["default"] = xdefault;
1890
+ }
1891
+ if (typeof array !== "undefined") {
1892
+ payload["array"] = array;
1893
+ }
1894
+ if (typeof encrypt !== "undefined") {
1895
+ payload["encrypt"] = encrypt;
1896
+ }
1897
+ const uri = new URL(this.client.config.endpoint + apiPath);
1898
+ const apiHeaders = {
1899
+ "content-type": "application/json"
1900
+ };
1901
+ return this.client.call(
1902
+ "post",
1903
+ uri,
1904
+ apiHeaders,
1905
+ payload
1906
+ );
1907
+ }
1908
+ updateStringAttribute(paramsOrFirst, ...rest) {
1909
+ let params;
1910
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1911
+ params = paramsOrFirst || {};
1912
+ } else {
1913
+ params = {
1914
+ databaseId: paramsOrFirst,
1915
+ collectionId: rest[0],
1916
+ key: rest[1],
1917
+ required: rest[2],
1918
+ xdefault: rest[3],
1919
+ size: rest[4],
1920
+ newKey: rest[5]
1921
+ };
1922
+ }
1923
+ const databaseId = params.databaseId;
1924
+ const collectionId = params.collectionId;
1925
+ const key = params.key;
1926
+ const required = params.required;
1927
+ const xdefault = params.xdefault;
1928
+ const size = params.size;
1929
+ const newKey = params.newKey;
1930
+ if (typeof databaseId === "undefined") {
1931
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1932
+ }
1933
+ if (typeof collectionId === "undefined") {
1934
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1935
+ }
1936
+ if (typeof key === "undefined") {
1937
+ throw new AppwriteException('Missing required parameter: "key"');
1938
+ }
1939
+ if (typeof required === "undefined") {
1940
+ throw new AppwriteException('Missing required parameter: "required"');
1941
+ }
1942
+ if (typeof xdefault === "undefined") {
1943
+ throw new AppwriteException('Missing required parameter: "xdefault"');
1944
+ }
1945
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
1946
+ const payload = {};
1947
+ if (typeof required !== "undefined") {
1948
+ payload["required"] = required;
1949
+ }
1950
+ if (typeof xdefault !== "undefined") {
1951
+ payload["default"] = xdefault;
1952
+ }
1953
+ if (typeof size !== "undefined") {
1954
+ payload["size"] = size;
1955
+ }
1956
+ if (typeof newKey !== "undefined") {
1957
+ payload["newKey"] = newKey;
1958
+ }
1959
+ const uri = new URL(this.client.config.endpoint + apiPath);
1960
+ const apiHeaders = {
1961
+ "content-type": "application/json"
1962
+ };
1963
+ return this.client.call(
1964
+ "patch",
1965
+ uri,
1966
+ apiHeaders,
1967
+ payload
1968
+ );
1969
+ }
1970
+ createUrlAttribute(paramsOrFirst, ...rest) {
1971
+ let params;
1972
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
1973
+ params = paramsOrFirst || {};
1974
+ } else {
1975
+ params = {
1976
+ databaseId: paramsOrFirst,
1977
+ collectionId: rest[0],
1978
+ key: rest[1],
1979
+ required: rest[2],
1980
+ xdefault: rest[3],
1981
+ array: rest[4]
1982
+ };
1983
+ }
1984
+ const databaseId = params.databaseId;
1985
+ const collectionId = params.collectionId;
1986
+ const key = params.key;
1987
+ const required = params.required;
1988
+ const xdefault = params.xdefault;
1989
+ const array = params.array;
1990
+ if (typeof databaseId === "undefined") {
1991
+ throw new AppwriteException('Missing required parameter: "databaseId"');
1992
+ }
1993
+ if (typeof collectionId === "undefined") {
1994
+ throw new AppwriteException('Missing required parameter: "collectionId"');
1995
+ }
1996
+ if (typeof key === "undefined") {
1997
+ throw new AppwriteException('Missing required parameter: "key"');
1998
+ }
1999
+ if (typeof required === "undefined") {
2000
+ throw new AppwriteException('Missing required parameter: "required"');
2001
+ }
2002
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
2003
+ const payload = {};
2004
+ if (typeof key !== "undefined") {
2005
+ payload["key"] = key;
2006
+ }
2007
+ if (typeof required !== "undefined") {
2008
+ payload["required"] = required;
2009
+ }
2010
+ if (typeof xdefault !== "undefined") {
2011
+ payload["default"] = xdefault;
2012
+ }
2013
+ if (typeof array !== "undefined") {
2014
+ payload["array"] = array;
2015
+ }
2016
+ const uri = new URL(this.client.config.endpoint + apiPath);
2017
+ const apiHeaders = {
2018
+ "content-type": "application/json"
2019
+ };
2020
+ return this.client.call(
2021
+ "post",
2022
+ uri,
2023
+ apiHeaders,
2024
+ payload
2025
+ );
2026
+ }
2027
+ updateUrlAttribute(paramsOrFirst, ...rest) {
2028
+ let params;
2029
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2030
+ params = paramsOrFirst || {};
2031
+ } else {
2032
+ params = {
2033
+ databaseId: paramsOrFirst,
2034
+ collectionId: rest[0],
2035
+ key: rest[1],
2036
+ required: rest[2],
2037
+ xdefault: rest[3],
2038
+ newKey: rest[4]
2039
+ };
2040
+ }
2041
+ const databaseId = params.databaseId;
2042
+ const collectionId = params.collectionId;
2043
+ const key = params.key;
2044
+ const required = params.required;
2045
+ const xdefault = params.xdefault;
2046
+ const newKey = params.newKey;
2047
+ if (typeof databaseId === "undefined") {
2048
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2049
+ }
2050
+ if (typeof collectionId === "undefined") {
2051
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2052
+ }
2053
+ if (typeof key === "undefined") {
2054
+ throw new AppwriteException('Missing required parameter: "key"');
2055
+ }
2056
+ if (typeof required === "undefined") {
2057
+ throw new AppwriteException('Missing required parameter: "required"');
2058
+ }
2059
+ if (typeof xdefault === "undefined") {
2060
+ throw new AppwriteException('Missing required parameter: "xdefault"');
2061
+ }
2062
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
2063
+ const payload = {};
2064
+ if (typeof required !== "undefined") {
2065
+ payload["required"] = required;
2066
+ }
2067
+ if (typeof xdefault !== "undefined") {
2068
+ payload["default"] = xdefault;
2069
+ }
2070
+ if (typeof newKey !== "undefined") {
2071
+ payload["newKey"] = newKey;
2072
+ }
2073
+ const uri = new URL(this.client.config.endpoint + apiPath);
2074
+ const apiHeaders = {
2075
+ "content-type": "application/json"
2076
+ };
2077
+ return this.client.call(
2078
+ "patch",
2079
+ uri,
2080
+ apiHeaders,
2081
+ payload
2082
+ );
2083
+ }
2084
+ getAttribute(paramsOrFirst, ...rest) {
2085
+ let params;
2086
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2087
+ params = paramsOrFirst || {};
2088
+ } else {
2089
+ params = {
2090
+ databaseId: paramsOrFirst,
2091
+ collectionId: rest[0],
2092
+ key: rest[1]
2093
+ };
2094
+ }
2095
+ const databaseId = params.databaseId;
2096
+ const collectionId = params.collectionId;
2097
+ const key = params.key;
2098
+ if (typeof databaseId === "undefined") {
2099
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2100
+ }
2101
+ if (typeof collectionId === "undefined") {
2102
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2103
+ }
2104
+ if (typeof key === "undefined") {
2105
+ throw new AppwriteException('Missing required parameter: "key"');
2106
+ }
2107
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
2108
+ const payload = {};
2109
+ const uri = new URL(this.client.config.endpoint + apiPath);
2110
+ const apiHeaders = {};
2111
+ return this.client.call(
2112
+ "get",
2113
+ uri,
2114
+ apiHeaders,
2115
+ payload
2116
+ );
2117
+ }
2118
+ deleteAttribute(paramsOrFirst, ...rest) {
2119
+ let params;
2120
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2121
+ params = paramsOrFirst || {};
2122
+ } else {
2123
+ params = {
2124
+ databaseId: paramsOrFirst,
2125
+ collectionId: rest[0],
2126
+ key: rest[1]
2127
+ };
2128
+ }
2129
+ const databaseId = params.databaseId;
2130
+ const collectionId = params.collectionId;
2131
+ const key = params.key;
2132
+ if (typeof databaseId === "undefined") {
2133
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2134
+ }
2135
+ if (typeof collectionId === "undefined") {
2136
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2137
+ }
2138
+ if (typeof key === "undefined") {
2139
+ throw new AppwriteException('Missing required parameter: "key"');
2140
+ }
2141
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
2142
+ const payload = {};
2143
+ const uri = new URL(this.client.config.endpoint + apiPath);
2144
+ const apiHeaders = {
2145
+ "content-type": "application/json"
2146
+ };
2147
+ return this.client.call(
2148
+ "delete",
2149
+ uri,
2150
+ apiHeaders,
2151
+ payload
2152
+ );
2153
+ }
2154
+ updateRelationshipAttribute(paramsOrFirst, ...rest) {
2155
+ let params;
2156
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2157
+ params = paramsOrFirst || {};
2158
+ } else {
2159
+ params = {
2160
+ databaseId: paramsOrFirst,
2161
+ collectionId: rest[0],
2162
+ key: rest[1],
2163
+ onDelete: rest[2],
2164
+ newKey: rest[3]
2165
+ };
2166
+ }
2167
+ const databaseId = params.databaseId;
2168
+ const collectionId = params.collectionId;
2169
+ const key = params.key;
2170
+ const onDelete = params.onDelete;
2171
+ const newKey = params.newKey;
2172
+ if (typeof databaseId === "undefined") {
2173
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2174
+ }
2175
+ if (typeof collectionId === "undefined") {
2176
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2177
+ }
2178
+ if (typeof key === "undefined") {
2179
+ throw new AppwriteException('Missing required parameter: "key"');
2180
+ }
2181
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
2182
+ const payload = {};
2183
+ if (typeof onDelete !== "undefined") {
2184
+ payload["onDelete"] = onDelete;
2185
+ }
2186
+ if (typeof newKey !== "undefined") {
2187
+ payload["newKey"] = newKey;
2188
+ }
2189
+ const uri = new URL(this.client.config.endpoint + apiPath);
2190
+ const apiHeaders = {
2191
+ "content-type": "application/json"
2192
+ };
2193
+ return this.client.call(
2194
+ "patch",
2195
+ uri,
2196
+ apiHeaders,
2197
+ payload
2198
+ );
2199
+ }
2200
+ listDocuments(paramsOrFirst, ...rest) {
2201
+ let params;
2202
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2203
+ params = paramsOrFirst || {};
2204
+ } else {
2205
+ params = {
2206
+ databaseId: paramsOrFirst,
2207
+ collectionId: rest[0],
2208
+ queries: rest[1],
2209
+ transactionId: rest[2],
2210
+ total: rest[3]
2211
+ };
2212
+ }
2213
+ const databaseId = params.databaseId;
2214
+ const collectionId = params.collectionId;
2215
+ const queries = params.queries;
2216
+ const transactionId = params.transactionId;
2217
+ const total = params.total;
2218
+ if (typeof databaseId === "undefined") {
2219
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2220
+ }
2221
+ if (typeof collectionId === "undefined") {
2222
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2223
+ }
2224
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
2225
+ const payload = {};
2226
+ if (typeof queries !== "undefined") {
2227
+ payload["queries"] = queries;
2228
+ }
2229
+ if (typeof transactionId !== "undefined") {
2230
+ payload["transactionId"] = transactionId;
2231
+ }
2232
+ if (typeof total !== "undefined") {
2233
+ payload["total"] = total;
2234
+ }
2235
+ const uri = new URL(this.client.config.endpoint + apiPath);
2236
+ const apiHeaders = {};
2237
+ return this.client.call(
2238
+ "get",
2239
+ uri,
2240
+ apiHeaders,
2241
+ payload
2242
+ );
2243
+ }
2244
+ createDocument(paramsOrFirst, ...rest) {
2245
+ let params;
2246
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2247
+ params = paramsOrFirst || {};
2248
+ } else {
2249
+ params = {
2250
+ databaseId: paramsOrFirst,
2251
+ collectionId: rest[0],
2252
+ documentId: rest[1],
2253
+ data: rest[2],
2254
+ permissions: rest[3],
2255
+ transactionId: rest[4]
2256
+ };
2257
+ }
2258
+ const databaseId = params.databaseId;
2259
+ const collectionId = params.collectionId;
2260
+ const documentId = params.documentId;
2261
+ const data = params.data;
2262
+ const permissions = params.permissions;
2263
+ const transactionId = params.transactionId;
2264
+ if (typeof databaseId === "undefined") {
2265
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2266
+ }
2267
+ if (typeof collectionId === "undefined") {
2268
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2269
+ }
2270
+ if (typeof documentId === "undefined") {
2271
+ throw new AppwriteException('Missing required parameter: "documentId"');
2272
+ }
2273
+ if (typeof data === "undefined") {
2274
+ throw new AppwriteException('Missing required parameter: "data"');
2275
+ }
2276
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
2277
+ const payload = {};
2278
+ if (typeof documentId !== "undefined") {
2279
+ payload["documentId"] = documentId;
2280
+ }
2281
+ if (typeof data !== "undefined") {
2282
+ payload["data"] = data;
2283
+ }
2284
+ if (typeof permissions !== "undefined") {
2285
+ payload["permissions"] = permissions;
2286
+ }
2287
+ if (typeof transactionId !== "undefined") {
2288
+ payload["transactionId"] = transactionId;
2289
+ }
2290
+ const uri = new URL(this.client.config.endpoint + apiPath);
2291
+ const apiHeaders = {
2292
+ "content-type": "application/json"
2293
+ };
2294
+ return this.client.call(
2295
+ "post",
2296
+ uri,
2297
+ apiHeaders,
2298
+ payload
2299
+ );
2300
+ }
2301
+ createDocuments(paramsOrFirst, ...rest) {
2302
+ let params;
2303
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2304
+ params = paramsOrFirst || {};
2305
+ } else {
2306
+ params = {
2307
+ databaseId: paramsOrFirst,
2308
+ collectionId: rest[0],
2309
+ documents: rest[1],
2310
+ transactionId: rest[2]
2311
+ };
2312
+ }
2313
+ const databaseId = params.databaseId;
2314
+ const collectionId = params.collectionId;
2315
+ const documents = params.documents;
2316
+ const transactionId = params.transactionId;
2317
+ if (typeof databaseId === "undefined") {
2318
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2319
+ }
2320
+ if (typeof collectionId === "undefined") {
2321
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2322
+ }
2323
+ if (typeof documents === "undefined") {
2324
+ throw new AppwriteException('Missing required parameter: "documents"');
2325
+ }
2326
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
2327
+ const payload = {};
2328
+ if (typeof documents !== "undefined") {
2329
+ payload["documents"] = documents;
2330
+ }
2331
+ if (typeof transactionId !== "undefined") {
2332
+ payload["transactionId"] = transactionId;
2333
+ }
2334
+ const uri = new URL(this.client.config.endpoint + apiPath);
2335
+ const apiHeaders = {
2336
+ "content-type": "application/json"
2337
+ };
2338
+ return this.client.call(
2339
+ "post",
2340
+ uri,
2341
+ apiHeaders,
2342
+ payload
2343
+ );
2344
+ }
2345
+ upsertDocuments(paramsOrFirst, ...rest) {
2346
+ let params;
2347
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2348
+ params = paramsOrFirst || {};
2349
+ } else {
2350
+ params = {
2351
+ databaseId: paramsOrFirst,
2352
+ collectionId: rest[0],
2353
+ documents: rest[1],
2354
+ transactionId: rest[2]
2355
+ };
2356
+ }
2357
+ const databaseId = params.databaseId;
2358
+ const collectionId = params.collectionId;
2359
+ const documents = params.documents;
2360
+ const transactionId = params.transactionId;
2361
+ if (typeof databaseId === "undefined") {
2362
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2363
+ }
2364
+ if (typeof collectionId === "undefined") {
2365
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2366
+ }
2367
+ if (typeof documents === "undefined") {
2368
+ throw new AppwriteException('Missing required parameter: "documents"');
2369
+ }
2370
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
2371
+ const payload = {};
2372
+ if (typeof documents !== "undefined") {
2373
+ payload["documents"] = documents;
2374
+ }
2375
+ if (typeof transactionId !== "undefined") {
2376
+ payload["transactionId"] = transactionId;
2377
+ }
2378
+ const uri = new URL(this.client.config.endpoint + apiPath);
2379
+ const apiHeaders = {
2380
+ "content-type": "application/json"
2381
+ };
2382
+ return this.client.call(
2383
+ "put",
2384
+ uri,
2385
+ apiHeaders,
2386
+ payload
2387
+ );
2388
+ }
2389
+ updateDocuments(paramsOrFirst, ...rest) {
2390
+ let params;
2391
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2392
+ params = paramsOrFirst || {};
2393
+ } else {
2394
+ params = {
2395
+ databaseId: paramsOrFirst,
2396
+ collectionId: rest[0],
2397
+ data: rest[1],
2398
+ queries: rest[2],
2399
+ transactionId: rest[3]
2400
+ };
2401
+ }
2402
+ const databaseId = params.databaseId;
2403
+ const collectionId = params.collectionId;
2404
+ const data = params.data;
2405
+ const queries = params.queries;
2406
+ const transactionId = params.transactionId;
2407
+ if (typeof databaseId === "undefined") {
2408
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2409
+ }
2410
+ if (typeof collectionId === "undefined") {
2411
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2412
+ }
2413
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
2414
+ const payload = {};
2415
+ if (typeof data !== "undefined") {
2416
+ payload["data"] = data;
2417
+ }
2418
+ if (typeof queries !== "undefined") {
2419
+ payload["queries"] = queries;
2420
+ }
2421
+ if (typeof transactionId !== "undefined") {
2422
+ payload["transactionId"] = transactionId;
2423
+ }
2424
+ const uri = new URL(this.client.config.endpoint + apiPath);
2425
+ const apiHeaders = {
2426
+ "content-type": "application/json"
2427
+ };
2428
+ return this.client.call(
2429
+ "patch",
2430
+ uri,
2431
+ apiHeaders,
2432
+ payload
2433
+ );
2434
+ }
2435
+ deleteDocuments(paramsOrFirst, ...rest) {
2436
+ let params;
2437
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2438
+ params = paramsOrFirst || {};
2439
+ } else {
2440
+ params = {
2441
+ databaseId: paramsOrFirst,
2442
+ collectionId: rest[0],
2443
+ queries: rest[1],
2444
+ transactionId: rest[2]
2445
+ };
2446
+ }
2447
+ const databaseId = params.databaseId;
2448
+ const collectionId = params.collectionId;
2449
+ const queries = params.queries;
2450
+ const transactionId = params.transactionId;
2451
+ if (typeof databaseId === "undefined") {
2452
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2453
+ }
2454
+ if (typeof collectionId === "undefined") {
2455
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2456
+ }
2457
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
2458
+ const payload = {};
2459
+ if (typeof queries !== "undefined") {
2460
+ payload["queries"] = queries;
2461
+ }
2462
+ if (typeof transactionId !== "undefined") {
2463
+ payload["transactionId"] = transactionId;
2464
+ }
2465
+ const uri = new URL(this.client.config.endpoint + apiPath);
2466
+ const apiHeaders = {
2467
+ "content-type": "application/json"
2468
+ };
2469
+ return this.client.call(
2470
+ "delete",
2471
+ uri,
2472
+ apiHeaders,
2473
+ payload
2474
+ );
2475
+ }
2476
+ getDocument(paramsOrFirst, ...rest) {
2477
+ let params;
2478
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2479
+ params = paramsOrFirst || {};
2480
+ } else {
2481
+ params = {
2482
+ databaseId: paramsOrFirst,
2483
+ collectionId: rest[0],
2484
+ documentId: rest[1],
2485
+ queries: rest[2],
2486
+ transactionId: rest[3]
2487
+ };
2488
+ }
2489
+ const databaseId = params.databaseId;
2490
+ const collectionId = params.collectionId;
2491
+ const documentId = params.documentId;
2492
+ const queries = params.queries;
2493
+ const transactionId = params.transactionId;
2494
+ if (typeof databaseId === "undefined") {
2495
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2496
+ }
2497
+ if (typeof collectionId === "undefined") {
2498
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2499
+ }
2500
+ if (typeof documentId === "undefined") {
2501
+ throw new AppwriteException('Missing required parameter: "documentId"');
2502
+ }
2503
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId);
2504
+ const payload = {};
2505
+ if (typeof queries !== "undefined") {
2506
+ payload["queries"] = queries;
2507
+ }
2508
+ if (typeof transactionId !== "undefined") {
2509
+ payload["transactionId"] = transactionId;
2510
+ }
2511
+ const uri = new URL(this.client.config.endpoint + apiPath);
2512
+ const apiHeaders = {};
2513
+ return this.client.call(
2514
+ "get",
2515
+ uri,
2516
+ apiHeaders,
2517
+ payload
2518
+ );
2519
+ }
2520
+ upsertDocument(paramsOrFirst, ...rest) {
2521
+ let params;
2522
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2523
+ params = paramsOrFirst || {};
2524
+ } else {
2525
+ params = {
2526
+ databaseId: paramsOrFirst,
2527
+ collectionId: rest[0],
2528
+ documentId: rest[1],
2529
+ data: rest[2],
2530
+ permissions: rest[3],
2531
+ transactionId: rest[4]
2532
+ };
2533
+ }
2534
+ const databaseId = params.databaseId;
2535
+ const collectionId = params.collectionId;
2536
+ const documentId = params.documentId;
2537
+ const data = params.data;
2538
+ const permissions = params.permissions;
2539
+ const transactionId = params.transactionId;
2540
+ if (typeof databaseId === "undefined") {
2541
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2542
+ }
2543
+ if (typeof collectionId === "undefined") {
2544
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2545
+ }
2546
+ if (typeof documentId === "undefined") {
2547
+ throw new AppwriteException('Missing required parameter: "documentId"');
2548
+ }
2549
+ if (typeof data === "undefined") {
2550
+ throw new AppwriteException('Missing required parameter: "data"');
2551
+ }
2552
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId);
2553
+ const payload = {};
2554
+ if (typeof data !== "undefined") {
2555
+ payload["data"] = data;
2556
+ }
2557
+ if (typeof permissions !== "undefined") {
2558
+ payload["permissions"] = permissions;
2559
+ }
2560
+ if (typeof transactionId !== "undefined") {
2561
+ payload["transactionId"] = transactionId;
2562
+ }
2563
+ const uri = new URL(this.client.config.endpoint + apiPath);
2564
+ const apiHeaders = {
2565
+ "content-type": "application/json"
2566
+ };
2567
+ return this.client.call(
2568
+ "put",
2569
+ uri,
2570
+ apiHeaders,
2571
+ payload
2572
+ );
2573
+ }
2574
+ updateDocument(paramsOrFirst, ...rest) {
2575
+ let params;
2576
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2577
+ params = paramsOrFirst || {};
2578
+ } else {
2579
+ params = {
2580
+ databaseId: paramsOrFirst,
2581
+ collectionId: rest[0],
2582
+ documentId: rest[1],
2583
+ data: rest[2],
2584
+ permissions: rest[3],
2585
+ transactionId: rest[4]
2586
+ };
2587
+ }
2588
+ const databaseId = params.databaseId;
2589
+ const collectionId = params.collectionId;
2590
+ const documentId = params.documentId;
2591
+ const data = params.data;
2592
+ const permissions = params.permissions;
2593
+ const transactionId = params.transactionId;
2594
+ if (typeof databaseId === "undefined") {
2595
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2596
+ }
2597
+ if (typeof collectionId === "undefined") {
2598
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2599
+ }
2600
+ if (typeof documentId === "undefined") {
2601
+ throw new AppwriteException('Missing required parameter: "documentId"');
2602
+ }
2603
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId);
2604
+ const payload = {};
2605
+ if (typeof data !== "undefined") {
2606
+ payload["data"] = data;
2607
+ }
2608
+ if (typeof permissions !== "undefined") {
2609
+ payload["permissions"] = permissions;
2610
+ }
2611
+ if (typeof transactionId !== "undefined") {
2612
+ payload["transactionId"] = transactionId;
2613
+ }
2614
+ const uri = new URL(this.client.config.endpoint + apiPath);
2615
+ const apiHeaders = {
2616
+ "content-type": "application/json"
2617
+ };
2618
+ return this.client.call(
2619
+ "patch",
2620
+ uri,
2621
+ apiHeaders,
2622
+ payload
2623
+ );
2624
+ }
2625
+ deleteDocument(paramsOrFirst, ...rest) {
2626
+ let params;
2627
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2628
+ params = paramsOrFirst || {};
2629
+ } else {
2630
+ params = {
2631
+ databaseId: paramsOrFirst,
2632
+ collectionId: rest[0],
2633
+ documentId: rest[1],
2634
+ transactionId: rest[2]
2635
+ };
2636
+ }
2637
+ const databaseId = params.databaseId;
2638
+ const collectionId = params.collectionId;
2639
+ const documentId = params.documentId;
2640
+ const transactionId = params.transactionId;
2641
+ if (typeof databaseId === "undefined") {
2642
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2643
+ }
2644
+ if (typeof collectionId === "undefined") {
2645
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2646
+ }
2647
+ if (typeof documentId === "undefined") {
2648
+ throw new AppwriteException('Missing required parameter: "documentId"');
2649
+ }
2650
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId);
2651
+ const payload = {};
2652
+ if (typeof transactionId !== "undefined") {
2653
+ payload["transactionId"] = transactionId;
2654
+ }
2655
+ const uri = new URL(this.client.config.endpoint + apiPath);
2656
+ const apiHeaders = {
2657
+ "content-type": "application/json"
2658
+ };
2659
+ return this.client.call(
2660
+ "delete",
2661
+ uri,
2662
+ apiHeaders,
2663
+ payload
2664
+ );
2665
+ }
2666
+ decrementDocumentAttribute(paramsOrFirst, ...rest) {
2667
+ let params;
2668
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2669
+ params = paramsOrFirst || {};
2670
+ } else {
2671
+ params = {
2672
+ databaseId: paramsOrFirst,
2673
+ collectionId: rest[0],
2674
+ documentId: rest[1],
2675
+ attribute: rest[2],
2676
+ value: rest[3],
2677
+ min: rest[4],
2678
+ transactionId: rest[5]
2679
+ };
2680
+ }
2681
+ const databaseId = params.databaseId;
2682
+ const collectionId = params.collectionId;
2683
+ const documentId = params.documentId;
2684
+ const attribute = params.attribute;
2685
+ const value = params.value;
2686
+ const min = params.min;
2687
+ const transactionId = params.transactionId;
2688
+ if (typeof databaseId === "undefined") {
2689
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2690
+ }
2691
+ if (typeof collectionId === "undefined") {
2692
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2693
+ }
2694
+ if (typeof documentId === "undefined") {
2695
+ throw new AppwriteException('Missing required parameter: "documentId"');
2696
+ }
2697
+ if (typeof attribute === "undefined") {
2698
+ throw new AppwriteException('Missing required parameter: "attribute"');
2699
+ }
2700
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/decrement".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId).replace("{attribute}", attribute);
2701
+ const payload = {};
2702
+ if (typeof value !== "undefined") {
2703
+ payload["value"] = value;
2704
+ }
2705
+ if (typeof min !== "undefined") {
2706
+ payload["min"] = min;
2707
+ }
2708
+ if (typeof transactionId !== "undefined") {
2709
+ payload["transactionId"] = transactionId;
2710
+ }
2711
+ const uri = new URL(this.client.config.endpoint + apiPath);
2712
+ const apiHeaders = {
2713
+ "content-type": "application/json"
2714
+ };
2715
+ return this.client.call(
2716
+ "patch",
2717
+ uri,
2718
+ apiHeaders,
2719
+ payload
2720
+ );
2721
+ }
2722
+ incrementDocumentAttribute(paramsOrFirst, ...rest) {
2723
+ let params;
2724
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2725
+ params = paramsOrFirst || {};
2726
+ } else {
2727
+ params = {
2728
+ databaseId: paramsOrFirst,
2729
+ collectionId: rest[0],
2730
+ documentId: rest[1],
2731
+ attribute: rest[2],
2732
+ value: rest[3],
2733
+ max: rest[4],
2734
+ transactionId: rest[5]
2735
+ };
2736
+ }
2737
+ const databaseId = params.databaseId;
2738
+ const collectionId = params.collectionId;
2739
+ const documentId = params.documentId;
2740
+ const attribute = params.attribute;
2741
+ const value = params.value;
2742
+ const max = params.max;
2743
+ const transactionId = params.transactionId;
2744
+ if (typeof databaseId === "undefined") {
2745
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2746
+ }
2747
+ if (typeof collectionId === "undefined") {
2748
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2749
+ }
2750
+ if (typeof documentId === "undefined") {
2751
+ throw new AppwriteException('Missing required parameter: "documentId"');
2752
+ }
2753
+ if (typeof attribute === "undefined") {
2754
+ throw new AppwriteException('Missing required parameter: "attribute"');
2755
+ }
2756
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/{attribute}/increment".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{documentId}", documentId).replace("{attribute}", attribute);
2757
+ const payload = {};
2758
+ if (typeof value !== "undefined") {
2759
+ payload["value"] = value;
2760
+ }
2761
+ if (typeof max !== "undefined") {
2762
+ payload["max"] = max;
2763
+ }
2764
+ if (typeof transactionId !== "undefined") {
2765
+ payload["transactionId"] = transactionId;
2766
+ }
2767
+ const uri = new URL(this.client.config.endpoint + apiPath);
2768
+ const apiHeaders = {
2769
+ "content-type": "application/json"
2770
+ };
2771
+ return this.client.call(
2772
+ "patch",
2773
+ uri,
2774
+ apiHeaders,
2775
+ payload
2776
+ );
2777
+ }
2778
+ listIndexes(paramsOrFirst, ...rest) {
2779
+ let params;
2780
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2781
+ params = paramsOrFirst || {};
2782
+ } else {
2783
+ params = {
2784
+ databaseId: paramsOrFirst,
2785
+ collectionId: rest[0],
2786
+ queries: rest[1],
2787
+ total: rest[2]
2788
+ };
2789
+ }
2790
+ const databaseId = params.databaseId;
2791
+ const collectionId = params.collectionId;
2792
+ const queries = params.queries;
2793
+ const total = params.total;
2794
+ if (typeof databaseId === "undefined") {
2795
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2796
+ }
2797
+ if (typeof collectionId === "undefined") {
2798
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2799
+ }
2800
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
2801
+ const payload = {};
2802
+ if (typeof queries !== "undefined") {
2803
+ payload["queries"] = queries;
2804
+ }
2805
+ if (typeof total !== "undefined") {
2806
+ payload["total"] = total;
2807
+ }
2808
+ const uri = new URL(this.client.config.endpoint + apiPath);
2809
+ const apiHeaders = {};
2810
+ return this.client.call(
2811
+ "get",
2812
+ uri,
2813
+ apiHeaders,
2814
+ payload
2815
+ );
2816
+ }
2817
+ createIndex(paramsOrFirst, ...rest) {
2818
+ let params;
2819
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2820
+ params = paramsOrFirst || {};
2821
+ } else {
2822
+ params = {
2823
+ databaseId: paramsOrFirst,
2824
+ collectionId: rest[0],
2825
+ key: rest[1],
2826
+ type: rest[2],
2827
+ attributes: rest[3],
2828
+ orders: rest[4],
2829
+ lengths: rest[5]
2830
+ };
2831
+ }
2832
+ const databaseId = params.databaseId;
2833
+ const collectionId = params.collectionId;
2834
+ const key = params.key;
2835
+ const type = params.type;
2836
+ const attributes = params.attributes;
2837
+ const orders = params.orders;
2838
+ const lengths = params.lengths;
2839
+ if (typeof databaseId === "undefined") {
2840
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2841
+ }
2842
+ if (typeof collectionId === "undefined") {
2843
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2844
+ }
2845
+ if (typeof key === "undefined") {
2846
+ throw new AppwriteException('Missing required parameter: "key"');
2847
+ }
2848
+ if (typeof type === "undefined") {
2849
+ throw new AppwriteException('Missing required parameter: "type"');
2850
+ }
2851
+ if (typeof attributes === "undefined") {
2852
+ throw new AppwriteException('Missing required parameter: "attributes"');
2853
+ }
2854
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId);
2855
+ const payload = {};
2856
+ if (typeof key !== "undefined") {
2857
+ payload["key"] = key;
2858
+ }
2859
+ if (typeof type !== "undefined") {
2860
+ payload["type"] = type;
2861
+ }
2862
+ if (typeof attributes !== "undefined") {
2863
+ payload["attributes"] = attributes;
2864
+ }
2865
+ if (typeof orders !== "undefined") {
2866
+ payload["orders"] = orders;
2867
+ }
2868
+ if (typeof lengths !== "undefined") {
2869
+ payload["lengths"] = lengths;
2870
+ }
2871
+ const uri = new URL(this.client.config.endpoint + apiPath);
2872
+ const apiHeaders = {
2873
+ "content-type": "application/json"
2874
+ };
2875
+ return this.client.call(
2876
+ "post",
2877
+ uri,
2878
+ apiHeaders,
2879
+ payload
2880
+ );
2881
+ }
2882
+ getIndex(paramsOrFirst, ...rest) {
2883
+ let params;
2884
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2885
+ params = paramsOrFirst || {};
2886
+ } else {
2887
+ params = {
2888
+ databaseId: paramsOrFirst,
2889
+ collectionId: rest[0],
2890
+ key: rest[1]
2891
+ };
2892
+ }
2893
+ const databaseId = params.databaseId;
2894
+ const collectionId = params.collectionId;
2895
+ const key = params.key;
2896
+ if (typeof databaseId === "undefined") {
2897
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2898
+ }
2899
+ if (typeof collectionId === "undefined") {
2900
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2901
+ }
2902
+ if (typeof key === "undefined") {
2903
+ throw new AppwriteException('Missing required parameter: "key"');
2904
+ }
2905
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
2906
+ const payload = {};
2907
+ const uri = new URL(this.client.config.endpoint + apiPath);
2908
+ const apiHeaders = {};
2909
+ return this.client.call(
2910
+ "get",
2911
+ uri,
2912
+ apiHeaders,
2913
+ payload
2914
+ );
2915
+ }
2916
+ deleteIndex(paramsOrFirst, ...rest) {
2917
+ let params;
2918
+ if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
2919
+ params = paramsOrFirst || {};
2920
+ } else {
2921
+ params = {
2922
+ databaseId: paramsOrFirst,
2923
+ collectionId: rest[0],
2924
+ key: rest[1]
2925
+ };
2926
+ }
2927
+ const databaseId = params.databaseId;
2928
+ const collectionId = params.collectionId;
2929
+ const key = params.key;
2930
+ if (typeof databaseId === "undefined") {
2931
+ throw new AppwriteException('Missing required parameter: "databaseId"');
2932
+ }
2933
+ if (typeof collectionId === "undefined") {
2934
+ throw new AppwriteException('Missing required parameter: "collectionId"');
2935
+ }
2936
+ if (typeof key === "undefined") {
2937
+ throw new AppwriteException('Missing required parameter: "key"');
2938
+ }
2939
+ const apiPath = "/databases/{databaseId}/collections/{collectionId}/indexes/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
2940
+ const payload = {};
2941
+ const uri = new URL(this.client.config.endpoint + apiPath);
2942
+ const apiHeaders = {
2943
+ "content-type": "application/json"
2944
+ };
2945
+ return this.client.call(
2946
+ "delete",
2947
+ uri,
2948
+ apiHeaders,
2949
+ payload
2950
+ );
2951
+ }
2952
+ };
2953
+
2954
+ export { Databases };
2955
+ //# sourceMappingURL=out.js.map
2956
+ //# sourceMappingURL=databases.mjs.map