@appwrite.io/console 1.6.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (595) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +3 -3
  3. package/dist/cjs/sdk.js +6731 -3907
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +6729 -3908
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +6731 -3907
  8. package/docs/examples/account/create-anonymous-session.md +1 -1
  9. package/docs/examples/account/create-billing-address.md +1 -1
  10. package/docs/examples/account/create-email-password-session.md +1 -1
  11. package/docs/examples/account/create-email-token.md +1 -1
  12. package/docs/examples/account/create-j-w-t.md +1 -1
  13. package/docs/examples/account/create-magic-u-r-l-token.md +1 -1
  14. package/docs/examples/account/create-mfa-authenticator.md +1 -1
  15. package/docs/examples/account/create-mfa-challenge.md +1 -1
  16. package/docs/examples/account/create-mfa-recovery-codes.md +1 -1
  17. package/docs/examples/account/create-o-auth2session.md +1 -1
  18. package/docs/examples/account/create-o-auth2token.md +1 -1
  19. package/docs/examples/account/create-payment-method.md +1 -1
  20. package/docs/examples/account/create-phone-token.md +1 -1
  21. package/docs/examples/account/create-phone-verification.md +1 -1
  22. package/docs/examples/account/create-push-target.md +1 -1
  23. package/docs/examples/account/create-recovery.md +1 -1
  24. package/docs/examples/account/create-session.md +1 -1
  25. package/docs/examples/account/create-verification.md +1 -1
  26. package/docs/examples/account/create.md +1 -1
  27. package/docs/examples/account/delete-billing-address.md +1 -1
  28. package/docs/examples/account/delete-identity.md +1 -1
  29. package/docs/examples/account/delete-mfa-authenticator.md +1 -1
  30. package/docs/examples/account/delete-payment-method.md +1 -1
  31. package/docs/examples/account/delete-push-target.md +1 -1
  32. package/docs/examples/account/delete-session.md +1 -1
  33. package/docs/examples/account/delete-sessions.md +1 -1
  34. package/docs/examples/account/delete.md +1 -1
  35. package/docs/examples/account/get-billing-address.md +1 -1
  36. package/docs/examples/account/get-coupon.md +1 -1
  37. package/docs/examples/account/get-mfa-recovery-codes.md +1 -1
  38. package/docs/examples/account/get-payment-method.md +1 -1
  39. package/docs/examples/account/get-prefs.md +1 -1
  40. package/docs/examples/account/get-session.md +1 -1
  41. package/docs/examples/account/get.md +1 -1
  42. package/docs/examples/account/list-billing-addresses.md +1 -1
  43. package/docs/examples/account/list-identities.md +1 -1
  44. package/docs/examples/account/list-invoices.md +1 -1
  45. package/docs/examples/account/list-logs.md +1 -1
  46. package/docs/examples/account/list-mfa-factors.md +1 -1
  47. package/docs/examples/account/list-payment-methods.md +1 -1
  48. package/docs/examples/account/list-sessions.md +1 -1
  49. package/docs/examples/account/update-billing-address.md +1 -1
  50. package/docs/examples/account/update-email.md +1 -1
  51. package/docs/examples/account/update-m-f-a.md +1 -1
  52. package/docs/examples/account/update-magic-u-r-l-session.md +1 -1
  53. package/docs/examples/account/update-mfa-authenticator.md +1 -1
  54. package/docs/examples/account/update-mfa-challenge.md +1 -1
  55. package/docs/examples/account/update-mfa-recovery-codes.md +1 -1
  56. package/docs/examples/account/update-name.md +1 -1
  57. package/docs/examples/account/update-password.md +1 -1
  58. package/docs/examples/account/update-payment-method-mandate-options.md +1 -1
  59. package/docs/examples/account/update-payment-method-provider.md +1 -1
  60. package/docs/examples/account/update-payment-method.md +1 -1
  61. package/docs/examples/account/update-phone-session.md +1 -1
  62. package/docs/examples/account/update-phone-verification.md +1 -1
  63. package/docs/examples/account/update-phone.md +1 -1
  64. package/docs/examples/account/update-prefs.md +1 -1
  65. package/docs/examples/account/update-push-target.md +1 -1
  66. package/docs/examples/account/update-recovery.md +1 -1
  67. package/docs/examples/account/update-session.md +1 -1
  68. package/docs/examples/account/update-status.md +1 -1
  69. package/docs/examples/account/update-verification.md +1 -1
  70. package/docs/examples/assistant/chat.md +1 -1
  71. package/docs/examples/avatars/get-browser.md +2 -2
  72. package/docs/examples/avatars/get-credit-card.md +2 -2
  73. package/docs/examples/avatars/get-favicon.md +1 -1
  74. package/docs/examples/avatars/get-flag.md +2 -2
  75. package/docs/examples/avatars/get-image.md +1 -1
  76. package/docs/examples/avatars/get-initials.md +1 -1
  77. package/docs/examples/avatars/get-q-r.md +1 -1
  78. package/docs/examples/backups/create-archive.md +1 -1
  79. package/docs/examples/backups/create-policy.md +1 -1
  80. package/docs/examples/backups/create-restoration.md +1 -1
  81. package/docs/examples/backups/delete-archive.md +1 -1
  82. package/docs/examples/backups/delete-policy.md +1 -1
  83. package/docs/examples/backups/get-archive.md +1 -1
  84. package/docs/examples/backups/get-policy.md +1 -1
  85. package/docs/examples/backups/get-restoration.md +1 -1
  86. package/docs/examples/backups/list-archives.md +1 -1
  87. package/docs/examples/backups/list-policies.md +1 -1
  88. package/docs/examples/backups/list-restorations.md +1 -1
  89. package/docs/examples/backups/update-policy.md +1 -1
  90. package/docs/examples/console/create-program-membership.md +1 -1
  91. package/docs/examples/console/create-source.md +1 -1
  92. package/docs/examples/console/get-campaign.md +1 -1
  93. package/docs/examples/console/get-coupon.md +1 -1
  94. package/docs/examples/console/get-resource.md +14 -0
  95. package/docs/examples/console/plans.md +1 -1
  96. package/docs/examples/console/regions.md +1 -1
  97. package/docs/examples/console/variables.md +1 -1
  98. package/docs/examples/databases/create-boolean-attribute.md +1 -1
  99. package/docs/examples/databases/create-collection.md +1 -1
  100. package/docs/examples/databases/create-datetime-attribute.md +1 -1
  101. package/docs/examples/databases/create-document.md +4 -2
  102. package/docs/examples/databases/create-documents.md +15 -0
  103. package/docs/examples/databases/create-email-attribute.md +1 -1
  104. package/docs/examples/databases/create-enum-attribute.md +1 -1
  105. package/docs/examples/databases/create-float-attribute.md +1 -1
  106. package/docs/examples/databases/create-index.md +3 -2
  107. package/docs/examples/databases/create-integer-attribute.md +1 -1
  108. package/docs/examples/databases/create-ip-attribute.md +1 -1
  109. package/docs/examples/databases/create-relationship-attribute.md +1 -1
  110. package/docs/examples/databases/create-string-attribute.md +1 -1
  111. package/docs/examples/databases/create-url-attribute.md +1 -1
  112. package/docs/examples/databases/create.md +1 -1
  113. package/docs/examples/databases/delete-attribute.md +1 -1
  114. package/docs/examples/databases/delete-collection.md +1 -1
  115. package/docs/examples/databases/delete-document.md +1 -1
  116. package/docs/examples/databases/delete-documents.md +15 -0
  117. package/docs/examples/databases/delete-index.md +1 -1
  118. package/docs/examples/databases/delete.md +1 -1
  119. package/docs/examples/databases/get-attribute.md +1 -1
  120. package/docs/examples/databases/get-collection-usage.md +1 -1
  121. package/docs/examples/databases/get-collection.md +1 -1
  122. package/docs/examples/databases/get-database-usage.md +1 -1
  123. package/docs/examples/databases/get-document.md +1 -1
  124. package/docs/examples/databases/get-index.md +1 -1
  125. package/docs/examples/databases/get-usage.md +1 -1
  126. package/docs/examples/databases/get.md +1 -1
  127. package/docs/examples/databases/list-attributes.md +1 -1
  128. package/docs/examples/databases/list-collection-logs.md +1 -1
  129. package/docs/examples/databases/list-collections.md +1 -1
  130. package/docs/examples/databases/list-document-logs.md +1 -1
  131. package/docs/examples/databases/list-documents.md +1 -1
  132. package/docs/examples/databases/list-indexes.md +1 -1
  133. package/docs/examples/databases/list-logs.md +1 -1
  134. package/docs/examples/databases/list.md +1 -1
  135. package/docs/examples/databases/update-boolean-attribute.md +1 -1
  136. package/docs/examples/databases/update-collection.md +1 -1
  137. package/docs/examples/databases/update-datetime-attribute.md +1 -1
  138. package/docs/examples/databases/update-document.md +1 -1
  139. package/docs/examples/databases/update-documents.md +16 -0
  140. package/docs/examples/databases/update-email-attribute.md +1 -1
  141. package/docs/examples/databases/update-enum-attribute.md +1 -1
  142. package/docs/examples/databases/update-float-attribute.md +1 -1
  143. package/docs/examples/databases/update-integer-attribute.md +1 -1
  144. package/docs/examples/databases/update-ip-attribute.md +1 -1
  145. package/docs/examples/databases/update-relationship-attribute.md +1 -1
  146. package/docs/examples/databases/update-string-attribute.md +1 -1
  147. package/docs/examples/databases/update-url-attribute.md +1 -1
  148. package/docs/examples/databases/update.md +1 -1
  149. package/docs/examples/databases/upsert-documents.md +15 -0
  150. package/docs/examples/domains/create-preset-google-workspace.md +13 -0
  151. package/docs/examples/domains/create-preset-i-cloud.md +13 -0
  152. package/docs/examples/domains/create-preset-mailgun.md +13 -0
  153. package/docs/examples/domains/create-preset-outlook.md +13 -0
  154. package/docs/examples/domains/create-preset-proton-mail.md +13 -0
  155. package/docs/examples/domains/create-preset-zoho.md +13 -0
  156. package/docs/examples/domains/create-record-a-a-a-a.md +17 -0
  157. package/docs/examples/domains/create-record-a.md +17 -0
  158. package/docs/examples/domains/create-record-alias.md +17 -0
  159. package/docs/examples/domains/create-record-c-a-a.md +17 -0
  160. package/docs/examples/domains/create-record-c-n-a-m-e.md +17 -0
  161. package/docs/examples/domains/create-record-h-t-t-p-s.md +17 -0
  162. package/docs/examples/domains/create-record-m-x.md +18 -0
  163. package/docs/examples/domains/create-record-n-s.md +17 -0
  164. package/docs/examples/domains/create-record-s-r-v.md +20 -0
  165. package/docs/examples/domains/create-record-t-x-t.md +17 -0
  166. package/docs/examples/domains/create.md +14 -0
  167. package/docs/examples/domains/delete-record.md +14 -0
  168. package/docs/examples/domains/delete.md +13 -0
  169. package/docs/examples/domains/get-preset-google-workspace.md +13 -0
  170. package/docs/examples/domains/get-preset-i-cloud.md +13 -0
  171. package/docs/examples/domains/get-preset-mailgun.md +13 -0
  172. package/docs/examples/domains/get-preset-outlook.md +13 -0
  173. package/docs/examples/domains/get-preset-proton-mail.md +13 -0
  174. package/docs/examples/domains/get-preset-zoho.md +13 -0
  175. package/docs/examples/domains/get-record.md +14 -0
  176. package/docs/examples/domains/get-zone.md +13 -0
  177. package/docs/examples/domains/get.md +13 -0
  178. package/docs/examples/domains/list-records.md +14 -0
  179. package/docs/examples/domains/list.md +14 -0
  180. package/docs/examples/domains/update-nameservers.md +13 -0
  181. package/docs/examples/domains/update-record-a-a-a-a.md +18 -0
  182. package/docs/examples/domains/update-record-a.md +18 -0
  183. package/docs/examples/domains/update-record-alias.md +18 -0
  184. package/docs/examples/domains/update-record-c-a-a.md +18 -0
  185. package/docs/examples/domains/update-record-c-n-a-m-e.md +18 -0
  186. package/docs/examples/domains/update-record-h-t-t-p-s.md +18 -0
  187. package/docs/examples/domains/update-record-m-x.md +19 -0
  188. package/docs/examples/domains/update-record-n-s.md +18 -0
  189. package/docs/examples/domains/update-record-s-r-v.md +21 -0
  190. package/docs/examples/domains/update-record-t-x-t.md +18 -0
  191. package/docs/examples/domains/update-team.md +14 -0
  192. package/docs/examples/domains/update-zone.md +14 -0
  193. package/docs/examples/functions/create-deployment.md +1 -1
  194. package/docs/examples/functions/create-duplicate-deployment.md +15 -0
  195. package/docs/examples/functions/create-execution.md +1 -1
  196. package/docs/examples/functions/create-template-deployment.md +18 -0
  197. package/docs/examples/functions/create-variable.md +3 -2
  198. package/docs/examples/functions/create-vcs-deployment.md +16 -0
  199. package/docs/examples/functions/create.md +3 -3
  200. package/docs/examples/functions/delete-deployment.md +1 -1
  201. package/docs/examples/functions/delete-execution.md +1 -1
  202. package/docs/examples/functions/delete-variable.md +1 -1
  203. package/docs/examples/functions/delete.md +1 -1
  204. package/docs/examples/functions/get-deployment-download.md +4 -3
  205. package/docs/examples/functions/get-deployment.md +1 -1
  206. package/docs/examples/functions/get-execution.md +1 -1
  207. package/docs/examples/functions/get-template.md +1 -1
  208. package/docs/examples/functions/get-usage.md +2 -1
  209. package/docs/examples/functions/get-variable.md +1 -1
  210. package/docs/examples/functions/get.md +1 -1
  211. package/docs/examples/functions/list-deployments.md +1 -1
  212. package/docs/examples/functions/list-executions.md +2 -3
  213. package/docs/examples/functions/list-runtimes.md +1 -1
  214. package/docs/examples/functions/list-specifications.md +1 -1
  215. package/docs/examples/functions/list-templates.md +1 -1
  216. package/docs/examples/functions/list-usage.md +13 -0
  217. package/docs/examples/functions/list-variables.md +1 -1
  218. package/docs/examples/functions/list.md +1 -1
  219. package/docs/examples/functions/update-deployment-status.md +14 -0
  220. package/docs/examples/functions/update-function-deployment.md +14 -0
  221. package/docs/examples/functions/update-variable.md +3 -2
  222. package/docs/examples/functions/update.md +1 -1
  223. package/docs/examples/graphql/mutation.md +1 -1
  224. package/docs/examples/graphql/query.md +1 -1
  225. package/docs/examples/health/get-antivirus.md +1 -1
  226. package/docs/examples/health/get-cache.md +1 -1
  227. package/docs/examples/health/get-certificate.md +1 -1
  228. package/docs/examples/health/get-d-b.md +1 -1
  229. package/docs/examples/health/get-failed-jobs.md +1 -1
  230. package/docs/examples/health/get-pub-sub.md +1 -1
  231. package/docs/examples/health/get-queue-billing-aggregation.md +1 -1
  232. package/docs/examples/health/get-queue-builds.md +1 -1
  233. package/docs/examples/health/get-queue-certificates.md +1 -1
  234. package/docs/examples/health/get-queue-databases.md +1 -1
  235. package/docs/examples/health/get-queue-deletes.md +1 -1
  236. package/docs/examples/health/get-queue-functions.md +1 -1
  237. package/docs/examples/health/get-queue-logs.md +1 -1
  238. package/docs/examples/health/get-queue-mails.md +1 -1
  239. package/docs/examples/health/get-queue-messaging.md +1 -1
  240. package/docs/examples/health/get-queue-migrations.md +1 -1
  241. package/docs/examples/health/get-queue-priority-builds.md +1 -1
  242. package/docs/examples/health/get-queue-region-manager.md +13 -0
  243. package/docs/examples/health/get-queue-stats-resources.md +1 -1
  244. package/docs/examples/health/get-queue-usage.md +1 -1
  245. package/docs/examples/health/get-queue-webhooks.md +1 -1
  246. package/docs/examples/health/get-storage-local.md +1 -1
  247. package/docs/examples/health/get-storage.md +1 -1
  248. package/docs/examples/health/get-time.md +1 -1
  249. package/docs/examples/health/get.md +1 -1
  250. package/docs/examples/locale/get.md +1 -1
  251. package/docs/examples/locale/list-codes.md +1 -1
  252. package/docs/examples/locale/list-continents.md +1 -1
  253. package/docs/examples/locale/list-countries-e-u.md +1 -1
  254. package/docs/examples/locale/list-countries-phones.md +1 -1
  255. package/docs/examples/locale/list-countries.md +1 -1
  256. package/docs/examples/locale/list-currencies.md +1 -1
  257. package/docs/examples/locale/list-languages.md +1 -1
  258. package/docs/examples/messaging/create-apns-provider.md +1 -1
  259. package/docs/examples/messaging/create-email.md +1 -1
  260. package/docs/examples/messaging/create-fcm-provider.md +1 -1
  261. package/docs/examples/messaging/create-mailgun-provider.md +1 -1
  262. package/docs/examples/messaging/create-msg91provider.md +1 -1
  263. package/docs/examples/messaging/create-push.md +1 -1
  264. package/docs/examples/messaging/create-sendgrid-provider.md +1 -1
  265. package/docs/examples/messaging/create-sms.md +1 -1
  266. package/docs/examples/messaging/create-smtp-provider.md +1 -1
  267. package/docs/examples/messaging/create-subscriber.md +1 -1
  268. package/docs/examples/messaging/create-telesign-provider.md +1 -1
  269. package/docs/examples/messaging/create-textmagic-provider.md +1 -1
  270. package/docs/examples/messaging/create-topic.md +1 -1
  271. package/docs/examples/messaging/create-twilio-provider.md +1 -1
  272. package/docs/examples/messaging/create-vonage-provider.md +1 -1
  273. package/docs/examples/messaging/delete-provider.md +1 -1
  274. package/docs/examples/messaging/delete-subscriber.md +1 -1
  275. package/docs/examples/messaging/delete-topic.md +1 -1
  276. package/docs/examples/messaging/delete.md +1 -1
  277. package/docs/examples/messaging/get-message.md +1 -1
  278. package/docs/examples/messaging/get-provider.md +1 -1
  279. package/docs/examples/messaging/get-subscriber.md +1 -1
  280. package/docs/examples/messaging/get-topic.md +1 -1
  281. package/docs/examples/messaging/list-message-logs.md +1 -1
  282. package/docs/examples/messaging/list-messages.md +1 -1
  283. package/docs/examples/messaging/list-provider-logs.md +1 -1
  284. package/docs/examples/messaging/list-providers.md +1 -1
  285. package/docs/examples/messaging/list-subscriber-logs.md +1 -1
  286. package/docs/examples/messaging/list-subscribers.md +1 -1
  287. package/docs/examples/messaging/list-targets.md +1 -1
  288. package/docs/examples/messaging/list-topic-logs.md +1 -1
  289. package/docs/examples/messaging/list-topics.md +1 -1
  290. package/docs/examples/messaging/update-apns-provider.md +1 -1
  291. package/docs/examples/messaging/update-email.md +1 -1
  292. package/docs/examples/messaging/update-fcm-provider.md +1 -1
  293. package/docs/examples/messaging/update-mailgun-provider.md +1 -1
  294. package/docs/examples/messaging/update-msg91provider.md +1 -1
  295. package/docs/examples/messaging/update-push.md +1 -1
  296. package/docs/examples/messaging/update-sendgrid-provider.md +1 -1
  297. package/docs/examples/messaging/update-sms.md +1 -1
  298. package/docs/examples/messaging/update-smtp-provider.md +1 -1
  299. package/docs/examples/messaging/update-telesign-provider.md +1 -1
  300. package/docs/examples/messaging/update-textmagic-provider.md +1 -1
  301. package/docs/examples/messaging/update-topic.md +1 -1
  302. package/docs/examples/messaging/update-twilio-provider.md +1 -1
  303. package/docs/examples/messaging/update-vonage-provider.md +1 -1
  304. package/docs/examples/migrations/create-appwrite-migration.md +1 -1
  305. package/docs/examples/migrations/create-csv-migration.md +15 -0
  306. package/docs/examples/migrations/create-firebase-migration.md +1 -1
  307. package/docs/examples/migrations/create-n-host-migration.md +1 -1
  308. package/docs/examples/migrations/create-supabase-migration.md +1 -1
  309. package/docs/examples/migrations/delete.md +1 -1
  310. package/docs/examples/migrations/get-appwrite-report.md +1 -1
  311. package/docs/examples/migrations/get-firebase-report.md +1 -1
  312. package/docs/examples/migrations/get-n-host-report.md +1 -1
  313. package/docs/examples/migrations/get-supabase-report.md +1 -1
  314. package/docs/examples/migrations/get.md +1 -1
  315. package/docs/examples/migrations/list.md +1 -1
  316. package/docs/examples/migrations/retry.md +1 -1
  317. package/docs/examples/organizations/add-credit.md +1 -1
  318. package/docs/examples/organizations/create-invoice-payment.md +1 -1
  319. package/docs/examples/organizations/create.md +1 -1
  320. package/docs/examples/organizations/delete-backup-payment-method.md +1 -1
  321. package/docs/examples/organizations/delete-billing-address.md +1 -1
  322. package/docs/examples/organizations/delete-default-payment-method.md +1 -1
  323. package/docs/examples/organizations/delete.md +1 -1
  324. package/docs/examples/organizations/get-aggregation.md +1 -1
  325. package/docs/examples/organizations/get-billing-address.md +1 -1
  326. package/docs/examples/organizations/get-credit.md +1 -1
  327. package/docs/examples/organizations/get-invoice-download.md +1 -1
  328. package/docs/examples/organizations/get-invoice-view.md +1 -1
  329. package/docs/examples/organizations/get-invoice.md +1 -1
  330. package/docs/examples/organizations/get-payment-method.md +1 -1
  331. package/docs/examples/organizations/get-plan.md +1 -1
  332. package/docs/examples/organizations/get-scopes.md +1 -1
  333. package/docs/examples/organizations/list-aggregations.md +1 -1
  334. package/docs/examples/organizations/list-credits.md +1 -1
  335. package/docs/examples/organizations/list-invoices.md +1 -1
  336. package/docs/examples/organizations/list.md +1 -1
  337. package/docs/examples/organizations/set-backup-payment-method.md +1 -1
  338. package/docs/examples/organizations/set-billing-address.md +1 -1
  339. package/docs/examples/organizations/set-billing-email.md +1 -1
  340. package/docs/examples/organizations/set-billing-tax-id.md +1 -1
  341. package/docs/examples/organizations/set-default-payment-method.md +1 -1
  342. package/docs/examples/organizations/update-budget.md +1 -1
  343. package/docs/examples/organizations/update-plan.md +1 -1
  344. package/docs/examples/organizations/validate-invoice.md +1 -1
  345. package/docs/examples/project/create-variable.md +3 -2
  346. package/docs/examples/project/delete-variable.md +1 -1
  347. package/docs/examples/project/get-usage.md +1 -1
  348. package/docs/examples/project/get-variable.md +1 -1
  349. package/docs/examples/project/list-variables.md +1 -1
  350. package/docs/examples/project/update-variable.md +3 -2
  351. package/docs/examples/projects/create-dev-key.md +15 -0
  352. package/docs/examples/projects/create-j-w-t.md +1 -1
  353. package/docs/examples/projects/create-key.md +1 -1
  354. package/docs/examples/projects/create-platform.md +1 -1
  355. package/docs/examples/projects/create-smtp-test.md +1 -1
  356. package/docs/examples/projects/create-webhook.md +1 -1
  357. package/docs/examples/projects/create.md +2 -2
  358. package/docs/examples/projects/delete-dev-key.md +14 -0
  359. package/docs/examples/projects/delete-email-template.md +1 -1
  360. package/docs/examples/projects/delete-key.md +1 -1
  361. package/docs/examples/projects/delete-platform.md +1 -1
  362. package/docs/examples/projects/delete-sms-template.md +1 -1
  363. package/docs/examples/projects/delete-webhook.md +1 -1
  364. package/docs/examples/projects/delete.md +1 -1
  365. package/docs/examples/projects/get-dev-key.md +14 -0
  366. package/docs/examples/projects/get-email-template.md +1 -1
  367. package/docs/examples/projects/get-key.md +1 -1
  368. package/docs/examples/projects/get-platform.md +1 -1
  369. package/docs/examples/projects/get-sms-template.md +1 -1
  370. package/docs/examples/projects/get-webhook.md +1 -1
  371. package/docs/examples/projects/get.md +1 -1
  372. package/docs/examples/projects/list-dev-keys.md +14 -0
  373. package/docs/examples/projects/list-keys.md +1 -1
  374. package/docs/examples/projects/list-platforms.md +1 -1
  375. package/docs/examples/projects/list-webhooks.md +1 -1
  376. package/docs/examples/projects/list.md +1 -1
  377. package/docs/examples/projects/update-api-status-all.md +1 -1
  378. package/docs/examples/projects/update-api-status.md +1 -1
  379. package/docs/examples/projects/update-auth-duration.md +1 -1
  380. package/docs/examples/projects/update-auth-limit.md +1 -1
  381. package/docs/examples/projects/update-auth-password-dictionary.md +1 -1
  382. package/docs/examples/projects/update-auth-password-history.md +1 -1
  383. package/docs/examples/projects/update-auth-sessions-limit.md +1 -1
  384. package/docs/examples/projects/update-auth-status.md +1 -1
  385. package/docs/examples/projects/update-dev-key.md +16 -0
  386. package/docs/examples/projects/update-email-template.md +1 -1
  387. package/docs/examples/projects/update-key.md +1 -1
  388. package/docs/examples/projects/update-memberships-privacy.md +1 -1
  389. package/docs/examples/projects/update-mock-numbers.md +1 -1
  390. package/docs/examples/projects/update-o-auth2.md +1 -1
  391. package/docs/examples/projects/update-personal-data-check.md +1 -1
  392. package/docs/examples/projects/update-platform.md +1 -1
  393. package/docs/examples/projects/update-service-status-all.md +1 -1
  394. package/docs/examples/projects/update-service-status.md +1 -1
  395. package/docs/examples/projects/update-session-alerts.md +1 -1
  396. package/docs/examples/projects/update-sms-template.md +1 -1
  397. package/docs/examples/projects/update-smtp.md +1 -1
  398. package/docs/examples/projects/update-team.md +1 -1
  399. package/docs/examples/projects/update-webhook-signature.md +1 -1
  400. package/docs/examples/projects/update-webhook.md +1 -1
  401. package/docs/examples/projects/update.md +1 -1
  402. package/docs/examples/proxy/create-a-p-i-rule.md +13 -0
  403. package/docs/examples/proxy/create-function-rule.md +15 -0
  404. package/docs/examples/proxy/create-redirect-rule.md +15 -0
  405. package/docs/examples/proxy/create-site-rule.md +15 -0
  406. package/docs/examples/proxy/delete-rule.md +1 -1
  407. package/docs/examples/proxy/get-rule.md +1 -1
  408. package/docs/examples/proxy/list-rules.md +1 -1
  409. package/docs/examples/proxy/update-rule-verification.md +1 -1
  410. package/docs/examples/sites/create-deployment.md +18 -0
  411. package/docs/examples/sites/create-duplicate-deployment.md +14 -0
  412. package/docs/examples/sites/create-template-deployment.md +18 -0
  413. package/docs/examples/sites/create-variable.md +16 -0
  414. package/docs/examples/sites/create-vcs-deployment.md +16 -0
  415. package/docs/examples/sites/create.md +30 -0
  416. package/docs/examples/sites/delete-deployment.md +14 -0
  417. package/docs/examples/sites/delete-log.md +14 -0
  418. package/docs/examples/sites/delete-variable.md +14 -0
  419. package/docs/examples/sites/delete.md +13 -0
  420. package/docs/examples/sites/get-deployment-download.md +15 -0
  421. package/docs/examples/sites/get-deployment.md +14 -0
  422. package/docs/examples/sites/get-log.md +14 -0
  423. package/docs/examples/sites/get-template.md +13 -0
  424. package/docs/examples/sites/get-usage.md +14 -0
  425. package/docs/examples/sites/get-variable.md +14 -0
  426. package/docs/examples/sites/get.md +13 -0
  427. package/docs/examples/sites/list-deployments.md +15 -0
  428. package/docs/examples/sites/list-frameworks.md +11 -0
  429. package/docs/examples/sites/list-logs.md +14 -0
  430. package/docs/examples/sites/list-specifications.md +11 -0
  431. package/docs/examples/sites/list-templates.md +16 -0
  432. package/docs/examples/sites/list-usage.md +13 -0
  433. package/docs/examples/sites/list-variables.md +13 -0
  434. package/docs/examples/sites/list.md +14 -0
  435. package/docs/examples/sites/update-deployment-status.md +14 -0
  436. package/docs/examples/sites/update-site-deployment.md +14 -0
  437. package/docs/examples/sites/update-variable.md +17 -0
  438. package/docs/examples/sites/update.md +30 -0
  439. package/docs/examples/storage/create-bucket.md +1 -1
  440. package/docs/examples/storage/create-file.md +1 -1
  441. package/docs/examples/storage/delete-bucket.md +1 -1
  442. package/docs/examples/storage/delete-file.md +1 -1
  443. package/docs/examples/storage/get-bucket-usage.md +1 -1
  444. package/docs/examples/storage/get-bucket.md +1 -1
  445. package/docs/examples/storage/get-file-download.md +3 -2
  446. package/docs/examples/storage/get-file-preview.md +4 -3
  447. package/docs/examples/storage/get-file-view.md +3 -2
  448. package/docs/examples/storage/get-file.md +1 -1
  449. package/docs/examples/storage/get-usage.md +1 -1
  450. package/docs/examples/storage/list-buckets.md +1 -1
  451. package/docs/examples/storage/list-files.md +1 -1
  452. package/docs/examples/storage/update-bucket.md +1 -1
  453. package/docs/examples/storage/update-file.md +1 -1
  454. package/docs/examples/teams/create-membership.md +1 -1
  455. package/docs/examples/teams/create.md +1 -1
  456. package/docs/examples/teams/delete-membership.md +1 -1
  457. package/docs/examples/teams/delete.md +1 -1
  458. package/docs/examples/teams/get-membership.md +1 -1
  459. package/docs/examples/teams/get-prefs.md +1 -1
  460. package/docs/examples/teams/get.md +1 -1
  461. package/docs/examples/teams/list-logs.md +1 -1
  462. package/docs/examples/teams/list-memberships.md +1 -1
  463. package/docs/examples/teams/list.md +1 -1
  464. package/docs/examples/teams/update-membership-status.md +1 -1
  465. package/docs/examples/teams/update-membership.md +1 -1
  466. package/docs/examples/teams/update-name.md +1 -1
  467. package/docs/examples/teams/update-prefs.md +1 -1
  468. package/docs/examples/tokens/create-file-token.md +15 -0
  469. package/docs/examples/tokens/delete.md +13 -0
  470. package/docs/examples/tokens/get.md +13 -0
  471. package/docs/examples/tokens/list.md +15 -0
  472. package/docs/examples/tokens/update.md +14 -0
  473. package/docs/examples/users/create-argon2user.md +1 -1
  474. package/docs/examples/users/create-bcrypt-user.md +1 -1
  475. package/docs/examples/users/create-j-w-t.md +1 -1
  476. package/docs/examples/users/create-m-d5user.md +1 -1
  477. package/docs/examples/users/create-mfa-recovery-codes.md +1 -1
  478. package/docs/examples/users/create-p-h-pass-user.md +1 -1
  479. package/docs/examples/users/create-s-h-a-user.md +1 -1
  480. package/docs/examples/users/create-scrypt-modified-user.md +1 -1
  481. package/docs/examples/users/create-scrypt-user.md +1 -1
  482. package/docs/examples/users/create-session.md +1 -1
  483. package/docs/examples/users/create-target.md +1 -1
  484. package/docs/examples/users/create-token.md +1 -1
  485. package/docs/examples/users/create.md +1 -1
  486. package/docs/examples/users/delete-identity.md +1 -1
  487. package/docs/examples/users/delete-mfa-authenticator.md +1 -1
  488. package/docs/examples/users/delete-session.md +1 -1
  489. package/docs/examples/users/delete-sessions.md +1 -1
  490. package/docs/examples/users/delete-target.md +1 -1
  491. package/docs/examples/users/delete.md +1 -1
  492. package/docs/examples/users/get-mfa-recovery-codes.md +1 -1
  493. package/docs/examples/users/get-prefs.md +1 -1
  494. package/docs/examples/users/get-target.md +1 -1
  495. package/docs/examples/users/get-usage.md +1 -1
  496. package/docs/examples/users/get.md +1 -1
  497. package/docs/examples/users/list-identities.md +1 -1
  498. package/docs/examples/users/list-logs.md +1 -1
  499. package/docs/examples/users/list-memberships.md +4 -2
  500. package/docs/examples/users/list-mfa-factors.md +1 -1
  501. package/docs/examples/users/list-sessions.md +1 -1
  502. package/docs/examples/users/list-targets.md +1 -1
  503. package/docs/examples/users/list.md +1 -1
  504. package/docs/examples/users/update-email-verification.md +1 -1
  505. package/docs/examples/users/update-email.md +1 -1
  506. package/docs/examples/users/update-labels.md +1 -1
  507. package/docs/examples/users/update-mfa-recovery-codes.md +1 -1
  508. package/docs/examples/users/update-mfa.md +1 -1
  509. package/docs/examples/users/update-name.md +1 -1
  510. package/docs/examples/users/update-password.md +1 -1
  511. package/docs/examples/users/update-phone-verification.md +1 -1
  512. package/docs/examples/users/update-phone.md +1 -1
  513. package/docs/examples/users/update-prefs.md +1 -1
  514. package/docs/examples/users/update-status.md +1 -1
  515. package/docs/examples/users/update-target.md +1 -1
  516. package/docs/examples/vcs/create-repository-detection.md +3 -2
  517. package/docs/examples/vcs/create-repository.md +1 -1
  518. package/docs/examples/vcs/delete-installation.md +1 -1
  519. package/docs/examples/vcs/get-installation.md +1 -1
  520. package/docs/examples/vcs/get-repository-contents.md +1 -1
  521. package/docs/examples/vcs/get-repository.md +1 -1
  522. package/docs/examples/vcs/list-installations.md +1 -1
  523. package/docs/examples/vcs/list-repositories.md +3 -2
  524. package/docs/examples/vcs/list-repository-branches.md +1 -1
  525. package/docs/examples/vcs/update-external-deployments.md +1 -1
  526. package/package.json +1 -1
  527. package/src/client.ts +12 -2
  528. package/src/enums/adapter.ts +4 -0
  529. package/src/enums/api-service.ts +1 -0
  530. package/src/enums/build-runtime.ts +62 -0
  531. package/src/enums/console-resource-type.ts +3 -0
  532. package/src/enums/deployment-download-type.ts +4 -0
  533. package/src/enums/framework.ts +16 -0
  534. package/src/enums/image-format.ts +0 -1
  535. package/src/enums/name.ts +0 -1
  536. package/src/enums/region.ts +2 -1
  537. package/src/enums/runtime.ts +4 -3
  538. package/src/enums/site-usage-range.ts +5 -0
  539. package/src/enums/status-code.ts +6 -0
  540. package/src/enums/v-c-s-deployment-type.ts +5 -0
  541. package/src/enums/v-c-s-detection-type.ts +4 -0
  542. package/src/index.ts +13 -2
  543. package/src/models.ts +1092 -221
  544. package/src/services/account.ts +0 -16
  545. package/src/services/avatars.ts +0 -7
  546. package/src/services/backups.ts +0 -6
  547. package/src/services/console.ts +36 -5
  548. package/src/services/databases.ts +149 -18
  549. package/src/services/domains.ts +1821 -0
  550. package/src/services/functions.ts +174 -69
  551. package/src/services/health.ts +9 -34
  552. package/src/services/locale.ts +0 -8
  553. package/src/services/messaging.ts +0 -13
  554. package/src/services/migrations.ts +43 -6
  555. package/src/services/organizations.ts +0 -47
  556. package/src/services/project.ts +10 -5
  557. package/src/services/projects.ts +172 -10
  558. package/src/services/proxy.ts +124 -14
  559. package/src/services/sites.ts +1104 -0
  560. package/src/services/storage.ts +15 -12
  561. package/src/services/teams.ts +0 -6
  562. package/src/services/tokens.ts +160 -0
  563. package/src/services/users.ts +9 -13
  564. package/src/services/vcs.ts +54 -42
  565. package/types/enums/adapter.d.ts +4 -0
  566. package/types/enums/api-service.d.ts +1 -0
  567. package/types/enums/build-runtime.d.ts +62 -0
  568. package/types/enums/console-resource-type.d.ts +3 -0
  569. package/types/enums/deployment-download-type.d.ts +4 -0
  570. package/types/enums/framework.d.ts +16 -0
  571. package/types/enums/image-format.d.ts +0 -1
  572. package/types/enums/name.d.ts +0 -1
  573. package/types/enums/region.d.ts +3 -2
  574. package/types/enums/runtime.d.ts +5 -4
  575. package/types/enums/site-usage-range.d.ts +5 -0
  576. package/types/enums/status-code.d.ts +6 -0
  577. package/types/enums/v-c-s-deployment-type.d.ts +5 -0
  578. package/types/enums/v-c-s-detection-type.d.ts +4 -0
  579. package/types/index.d.ts +13 -2
  580. package/types/models.d.ts +1092 -221
  581. package/types/services/console.d.ts +10 -0
  582. package/types/services/databases.d.ts +44 -2
  583. package/types/services/domains.d.ts +524 -0
  584. package/types/services/functions.d.ts +60 -30
  585. package/types/services/health.d.ts +6 -6
  586. package/types/services/migrations.d.ts +10 -0
  587. package/types/services/organizations.d.ts +0 -10
  588. package/types/services/project.d.ts +4 -2
  589. package/types/services/projects.d.ts +48 -0
  590. package/types/services/proxy.d.ts +33 -5
  591. package/types/services/sites.d.ts +319 -0
  592. package/types/services/storage.d.ts +6 -3
  593. package/types/services/tokens.d.ts +51 -0
  594. package/types/services/users.d.ts +3 -1
  595. package/types/services/vcs.d.ts +15 -12
@@ -0,0 +1,1821 @@
1
+ import { Service } from '../service';
2
+ import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
3
+ import type { Models } from '../models';
4
+
5
+ export class Domains {
6
+ client: Client;
7
+
8
+ constructor(client: Client) {
9
+ this.client = client;
10
+ }
11
+
12
+ /**
13
+ * List all domains registered for this project. This endpoint supports pagination.
14
+ *
15
+ * @param {string[]} queries
16
+ * @param {string} search
17
+ * @throws {AppwriteException}
18
+ * @returns {Promise<Models.DomainsList>}
19
+ */
20
+ list(queries?: string[], search?: string): Promise<Models.DomainsList> {
21
+ const apiPath = '/domains';
22
+ const payload: Payload = {};
23
+ if (typeof queries !== 'undefined') {
24
+ payload['queries'] = queries;
25
+ }
26
+ if (typeof search !== 'undefined') {
27
+ payload['search'] = search;
28
+ }
29
+ const uri = new URL(this.client.config.endpoint + apiPath);
30
+
31
+ const apiHeaders: { [header: string]: string } = {
32
+ }
33
+
34
+ return this.client.call(
35
+ 'get',
36
+ uri,
37
+ apiHeaders,
38
+ payload
39
+ );
40
+ }
41
+ /**
42
+ * Create a new domain. Before creating a domain, you need to ensure that your DNS provider is properly configured. After creating the domain, you can use the verification endpoint to check if the domain is ready to be used.
43
+ *
44
+ * @param {string} teamId
45
+ * @param {string} domain
46
+ * @throws {AppwriteException}
47
+ * @returns {Promise<Models.Domain>}
48
+ */
49
+ create(teamId: string, domain: string): Promise<Models.Domain> {
50
+ if (typeof teamId === 'undefined') {
51
+ throw new AppwriteException('Missing required parameter: "teamId"');
52
+ }
53
+ if (typeof domain === 'undefined') {
54
+ throw new AppwriteException('Missing required parameter: "domain"');
55
+ }
56
+ const apiPath = '/domains';
57
+ const payload: Payload = {};
58
+ if (typeof teamId !== 'undefined') {
59
+ payload['teamId'] = teamId;
60
+ }
61
+ if (typeof domain !== 'undefined') {
62
+ payload['domain'] = domain;
63
+ }
64
+ const uri = new URL(this.client.config.endpoint + apiPath);
65
+
66
+ const apiHeaders: { [header: string]: string } = {
67
+ 'content-type': 'application/json',
68
+ }
69
+
70
+ return this.client.call(
71
+ 'post',
72
+ uri,
73
+ apiHeaders,
74
+ payload
75
+ );
76
+ }
77
+ /**
78
+ * Get a domain by its unique ID.
79
+ *
80
+ * @param {string} domainId
81
+ * @throws {AppwriteException}
82
+ * @returns {Promise<Models.Domain>}
83
+ */
84
+ get(domainId: string): Promise<Models.Domain> {
85
+ if (typeof domainId === 'undefined') {
86
+ throw new AppwriteException('Missing required parameter: "domainId"');
87
+ }
88
+ const apiPath = '/domains/{domainId}'.replace('{domainId}', domainId);
89
+ const payload: Payload = {};
90
+ const uri = new URL(this.client.config.endpoint + apiPath);
91
+
92
+ const apiHeaders: { [header: string]: string } = {
93
+ }
94
+
95
+ return this.client.call(
96
+ 'get',
97
+ uri,
98
+ apiHeaders,
99
+ payload
100
+ );
101
+ }
102
+ /**
103
+ * Delete a domain by its unique ID. This endpoint can be used to delete a domain from your project.
104
+ Once deleted, the domain will no longer be available for use and all associated resources will be removed.
105
+ *
106
+ * @param {string} domainId
107
+ * @throws {AppwriteException}
108
+ * @returns {Promise<{}>}
109
+ */
110
+ delete(domainId: string): Promise<{}> {
111
+ if (typeof domainId === 'undefined') {
112
+ throw new AppwriteException('Missing required parameter: "domainId"');
113
+ }
114
+ const apiPath = '/domains/{domainId}'.replace('{domainId}', domainId);
115
+ const payload: Payload = {};
116
+ const uri = new URL(this.client.config.endpoint + apiPath);
117
+
118
+ const apiHeaders: { [header: string]: string } = {
119
+ 'content-type': 'application/json',
120
+ }
121
+
122
+ return this.client.call(
123
+ 'delete',
124
+ uri,
125
+ apiHeaders,
126
+ payload
127
+ );
128
+ }
129
+ /**
130
+ * Verify which NS records are used and update the domain accordingly. This will check the domain&#039;s
131
+ nameservers and update the domain&#039;s status based on whether the nameservers match the expected
132
+ Appwrite nameservers.
133
+ *
134
+ * @param {string} domainId
135
+ * @throws {AppwriteException}
136
+ * @returns {Promise<Models.Domain>}
137
+ */
138
+ updateNameservers(domainId: string): Promise<Models.Domain> {
139
+ if (typeof domainId === 'undefined') {
140
+ throw new AppwriteException('Missing required parameter: "domainId"');
141
+ }
142
+ const apiPath = '/domains/{domainId}/nameservers'.replace('{domainId}', domainId);
143
+ const payload: Payload = {};
144
+ const uri = new URL(this.client.config.endpoint + apiPath);
145
+
146
+ const apiHeaders: { [header: string]: string } = {
147
+ 'content-type': 'application/json',
148
+ }
149
+
150
+ return this.client.call(
151
+ 'patch',
152
+ uri,
153
+ apiHeaders,
154
+ payload
155
+ );
156
+ }
157
+ /**
158
+ * List Google Workspace DNS records.
159
+ *
160
+ * @param {string} domainId
161
+ * @throws {AppwriteException}
162
+ * @returns {Promise<Models.DnsRecordsList>}
163
+ */
164
+ getPresetGoogleWorkspace(domainId: string): Promise<Models.DnsRecordsList> {
165
+ if (typeof domainId === 'undefined') {
166
+ throw new AppwriteException('Missing required parameter: "domainId"');
167
+ }
168
+ const apiPath = '/domains/{domainId}/presets/google-workspace'.replace('{domainId}', domainId);
169
+ const payload: Payload = {};
170
+ const uri = new URL(this.client.config.endpoint + apiPath);
171
+
172
+ const apiHeaders: { [header: string]: string } = {
173
+ }
174
+
175
+ return this.client.call(
176
+ 'get',
177
+ uri,
178
+ apiHeaders,
179
+ payload
180
+ );
181
+ }
182
+ /**
183
+ * Add Google Workspace DNS records to the domain. This will create the required MX records
184
+ for Google Workspace email hosting.
185
+ *
186
+ * @param {string} domainId
187
+ * @throws {AppwriteException}
188
+ * @returns {Promise<Models.DnsRecordsList>}
189
+ */
190
+ createPresetGoogleWorkspace(domainId: string): Promise<Models.DnsRecordsList> {
191
+ if (typeof domainId === 'undefined') {
192
+ throw new AppwriteException('Missing required parameter: "domainId"');
193
+ }
194
+ const apiPath = '/domains/{domainId}/presets/google-workspace'.replace('{domainId}', domainId);
195
+ const payload: Payload = {};
196
+ const uri = new URL(this.client.config.endpoint + apiPath);
197
+
198
+ const apiHeaders: { [header: string]: string } = {
199
+ 'content-type': 'application/json',
200
+ }
201
+
202
+ return this.client.call(
203
+ 'post',
204
+ uri,
205
+ apiHeaders,
206
+ payload
207
+ );
208
+ }
209
+ /**
210
+ * List iCloud DNS records.
211
+ *
212
+ * @param {string} domainId
213
+ * @throws {AppwriteException}
214
+ * @returns {Promise<Models.DnsRecordsList>}
215
+ */
216
+ getPresetICloud(domainId: string): Promise<Models.DnsRecordsList> {
217
+ if (typeof domainId === 'undefined') {
218
+ throw new AppwriteException('Missing required parameter: "domainId"');
219
+ }
220
+ const apiPath = '/domains/{domainId}/presets/icloud'.replace('{domainId}', domainId);
221
+ const payload: Payload = {};
222
+ const uri = new URL(this.client.config.endpoint + apiPath);
223
+
224
+ const apiHeaders: { [header: string]: string } = {
225
+ }
226
+
227
+ return this.client.call(
228
+ 'get',
229
+ uri,
230
+ apiHeaders,
231
+ payload
232
+ );
233
+ }
234
+ /**
235
+ * Add iCloud DNS records to the domain. This will create the required MX and SPF records
236
+ for using iCloud email services with your domain.
237
+ *
238
+ * @param {string} domainId
239
+ * @throws {AppwriteException}
240
+ * @returns {Promise<Models.DnsRecordsList>}
241
+ */
242
+ createPresetICloud(domainId: string): Promise<Models.DnsRecordsList> {
243
+ if (typeof domainId === 'undefined') {
244
+ throw new AppwriteException('Missing required parameter: "domainId"');
245
+ }
246
+ const apiPath = '/domains/{domainId}/presets/icloud'.replace('{domainId}', domainId);
247
+ const payload: Payload = {};
248
+ const uri = new URL(this.client.config.endpoint + apiPath);
249
+
250
+ const apiHeaders: { [header: string]: string } = {
251
+ 'content-type': 'application/json',
252
+ }
253
+
254
+ return this.client.call(
255
+ 'post',
256
+ uri,
257
+ apiHeaders,
258
+ payload
259
+ );
260
+ }
261
+ /**
262
+ * List Mailgun DNS records.
263
+ *
264
+ * @param {string} domainId
265
+ * @throws {AppwriteException}
266
+ * @returns {Promise<Models.DnsRecordsList>}
267
+ */
268
+ getPresetMailgun(domainId: string): Promise<Models.DnsRecordsList> {
269
+ if (typeof domainId === 'undefined') {
270
+ throw new AppwriteException('Missing required parameter: "domainId"');
271
+ }
272
+ const apiPath = '/domains/{domainId}/presets/mailgun'.replace('{domainId}', domainId);
273
+ const payload: Payload = {};
274
+ const uri = new URL(this.client.config.endpoint + apiPath);
275
+
276
+ const apiHeaders: { [header: string]: string } = {
277
+ }
278
+
279
+ return this.client.call(
280
+ 'get',
281
+ uri,
282
+ apiHeaders,
283
+ payload
284
+ );
285
+ }
286
+ /**
287
+ * Add Mailgun DNS records to the domain. This endpoint will create the required DNS records
288
+ for Mailgun in the specified domain.
289
+ *
290
+ * @param {string} domainId
291
+ * @throws {AppwriteException}
292
+ * @returns {Promise<Models.DnsRecordsList>}
293
+ */
294
+ createPresetMailgun(domainId: string): Promise<Models.DnsRecordsList> {
295
+ if (typeof domainId === 'undefined') {
296
+ throw new AppwriteException('Missing required parameter: "domainId"');
297
+ }
298
+ const apiPath = '/domains/{domainId}/presets/mailgun'.replace('{domainId}', domainId);
299
+ const payload: Payload = {};
300
+ const uri = new URL(this.client.config.endpoint + apiPath);
301
+
302
+ const apiHeaders: { [header: string]: string } = {
303
+ 'content-type': 'application/json',
304
+ }
305
+
306
+ return this.client.call(
307
+ 'post',
308
+ uri,
309
+ apiHeaders,
310
+ payload
311
+ );
312
+ }
313
+ /**
314
+ * List Outlook DNS records.
315
+ *
316
+ * @param {string} domainId
317
+ * @throws {AppwriteException}
318
+ * @returns {Promise<Models.DnsRecordsList>}
319
+ */
320
+ getPresetOutlook(domainId: string): Promise<Models.DnsRecordsList> {
321
+ if (typeof domainId === 'undefined') {
322
+ throw new AppwriteException('Missing required parameter: "domainId"');
323
+ }
324
+ const apiPath = '/domains/{domainId}/presets/outlook'.replace('{domainId}', domainId);
325
+ const payload: Payload = {};
326
+ const uri = new URL(this.client.config.endpoint + apiPath);
327
+
328
+ const apiHeaders: { [header: string]: string } = {
329
+ }
330
+
331
+ return this.client.call(
332
+ 'get',
333
+ uri,
334
+ apiHeaders,
335
+ payload
336
+ );
337
+ }
338
+ /**
339
+ * Add Outlook DNS records to the domain. This will create the required MX records
340
+ for setting up Outlook email hosting for your domain.
341
+ *
342
+ * @param {string} domainId
343
+ * @throws {AppwriteException}
344
+ * @returns {Promise<Models.DnsRecordsList>}
345
+ */
346
+ createPresetOutlook(domainId: string): Promise<Models.DnsRecordsList> {
347
+ if (typeof domainId === 'undefined') {
348
+ throw new AppwriteException('Missing required parameter: "domainId"');
349
+ }
350
+ const apiPath = '/domains/{domainId}/presets/outlook'.replace('{domainId}', domainId);
351
+ const payload: Payload = {};
352
+ const uri = new URL(this.client.config.endpoint + apiPath);
353
+
354
+ const apiHeaders: { [header: string]: string } = {
355
+ 'content-type': 'application/json',
356
+ }
357
+
358
+ return this.client.call(
359
+ 'post',
360
+ uri,
361
+ apiHeaders,
362
+ payload
363
+ );
364
+ }
365
+ /**
366
+ * List ProtonMail DNS records.
367
+ *
368
+ * @param {string} domainId
369
+ * @throws {AppwriteException}
370
+ * @returns {Promise<Models.DnsRecordsList>}
371
+ */
372
+ getPresetProtonMail(domainId: string): Promise<Models.DnsRecordsList> {
373
+ if (typeof domainId === 'undefined') {
374
+ throw new AppwriteException('Missing required parameter: "domainId"');
375
+ }
376
+ const apiPath = '/domains/{domainId}/presets/proton-mail'.replace('{domainId}', domainId);
377
+ const payload: Payload = {};
378
+ const uri = new URL(this.client.config.endpoint + apiPath);
379
+
380
+ const apiHeaders: { [header: string]: string } = {
381
+ }
382
+
383
+ return this.client.call(
384
+ 'get',
385
+ uri,
386
+ apiHeaders,
387
+ payload
388
+ );
389
+ }
390
+ /**
391
+ * Add ProtonMail DNS records to the domain. This will create the required MX records
392
+ for using ProtonMail with your custom domain.
393
+ *
394
+ * @param {string} domainId
395
+ * @throws {AppwriteException}
396
+ * @returns {Promise<Models.DnsRecordsList>}
397
+ */
398
+ createPresetProtonMail(domainId: string): Promise<Models.DnsRecordsList> {
399
+ if (typeof domainId === 'undefined') {
400
+ throw new AppwriteException('Missing required parameter: "domainId"');
401
+ }
402
+ const apiPath = '/domains/{domainId}/presets/proton-mail'.replace('{domainId}', domainId);
403
+ const payload: Payload = {};
404
+ const uri = new URL(this.client.config.endpoint + apiPath);
405
+
406
+ const apiHeaders: { [header: string]: string } = {
407
+ 'content-type': 'application/json',
408
+ }
409
+
410
+ return this.client.call(
411
+ 'post',
412
+ uri,
413
+ apiHeaders,
414
+ payload
415
+ );
416
+ }
417
+ /**
418
+ * List Zoho DNS records.
419
+ *
420
+ * @param {string} domainId
421
+ * @throws {AppwriteException}
422
+ * @returns {Promise<Models.DnsRecordsList>}
423
+ */
424
+ getPresetZoho(domainId: string): Promise<Models.DnsRecordsList> {
425
+ if (typeof domainId === 'undefined') {
426
+ throw new AppwriteException('Missing required parameter: "domainId"');
427
+ }
428
+ const apiPath = '/domains/{domainId}/presets/zoho'.replace('{domainId}', domainId);
429
+ const payload: Payload = {};
430
+ const uri = new URL(this.client.config.endpoint + apiPath);
431
+
432
+ const apiHeaders: { [header: string]: string } = {
433
+ }
434
+
435
+ return this.client.call(
436
+ 'get',
437
+ uri,
438
+ apiHeaders,
439
+ payload
440
+ );
441
+ }
442
+ /**
443
+ * Add Zoho Mail DNS records to the domain. This will create the required MX records
444
+ for setting up Zoho Mail on your domain.
445
+ *
446
+ * @param {string} domainId
447
+ * @throws {AppwriteException}
448
+ * @returns {Promise<Models.DnsRecordsList>}
449
+ */
450
+ createPresetZoho(domainId: string): Promise<Models.DnsRecordsList> {
451
+ if (typeof domainId === 'undefined') {
452
+ throw new AppwriteException('Missing required parameter: "domainId"');
453
+ }
454
+ const apiPath = '/domains/{domainId}/presets/zoho'.replace('{domainId}', domainId);
455
+ const payload: Payload = {};
456
+ const uri = new URL(this.client.config.endpoint + apiPath);
457
+
458
+ const apiHeaders: { [header: string]: string } = {
459
+ 'content-type': 'application/json',
460
+ }
461
+
462
+ return this.client.call(
463
+ 'post',
464
+ uri,
465
+ apiHeaders,
466
+ payload
467
+ );
468
+ }
469
+ /**
470
+ * List DNS records for a given domain. You can use this endpoint to list all the DNS records
471
+ associated with your domain.
472
+ *
473
+ * @param {string} domainId
474
+ * @param {string[]} queries
475
+ * @throws {AppwriteException}
476
+ * @returns {Promise<Models.DnsRecordsList>}
477
+ */
478
+ listRecords(domainId: string, queries?: string[]): Promise<Models.DnsRecordsList> {
479
+ if (typeof domainId === 'undefined') {
480
+ throw new AppwriteException('Missing required parameter: "domainId"');
481
+ }
482
+ const apiPath = '/domains/{domainId}/records'.replace('{domainId}', domainId);
483
+ const payload: Payload = {};
484
+ if (typeof queries !== 'undefined') {
485
+ payload['queries'] = queries;
486
+ }
487
+ const uri = new URL(this.client.config.endpoint + apiPath);
488
+
489
+ const apiHeaders: { [header: string]: string } = {
490
+ }
491
+
492
+ return this.client.call(
493
+ 'get',
494
+ uri,
495
+ apiHeaders,
496
+ payload
497
+ );
498
+ }
499
+ /**
500
+ * Create a new A record for the given domain. A records are used to point a domain name
501
+ to an IPv4 address. The record value should be a valid IPv4 address.
502
+ *
503
+ * @param {string} domainId
504
+ * @param {string} name
505
+ * @param {string} value
506
+ * @param {number} ttl
507
+ * @param {string} comment
508
+ * @throws {AppwriteException}
509
+ * @returns {Promise<Models.DnsRecord>}
510
+ */
511
+ createRecordA(domainId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
512
+ if (typeof domainId === 'undefined') {
513
+ throw new AppwriteException('Missing required parameter: "domainId"');
514
+ }
515
+ if (typeof name === 'undefined') {
516
+ throw new AppwriteException('Missing required parameter: "name"');
517
+ }
518
+ if (typeof value === 'undefined') {
519
+ throw new AppwriteException('Missing required parameter: "value"');
520
+ }
521
+ if (typeof ttl === 'undefined') {
522
+ throw new AppwriteException('Missing required parameter: "ttl"');
523
+ }
524
+ const apiPath = '/domains/{domainId}/records/a'.replace('{domainId}', domainId);
525
+ const payload: Payload = {};
526
+ if (typeof name !== 'undefined') {
527
+ payload['name'] = name;
528
+ }
529
+ if (typeof value !== 'undefined') {
530
+ payload['value'] = value;
531
+ }
532
+ if (typeof ttl !== 'undefined') {
533
+ payload['ttl'] = ttl;
534
+ }
535
+ if (typeof comment !== 'undefined') {
536
+ payload['comment'] = comment;
537
+ }
538
+ const uri = new URL(this.client.config.endpoint + apiPath);
539
+
540
+ const apiHeaders: { [header: string]: string } = {
541
+ 'content-type': 'application/json',
542
+ }
543
+
544
+ return this.client.call(
545
+ 'post',
546
+ uri,
547
+ apiHeaders,
548
+ payload
549
+ );
550
+ }
551
+ /**
552
+ * Update an existing A record for the given domain. This endpoint allows you to modify
553
+ the properties of an A record including its name (subdomain), IPv4 address, TTL,
554
+ and optional comment.
555
+ *
556
+ * @param {string} domainId
557
+ * @param {string} recordId
558
+ * @param {string} name
559
+ * @param {string} value
560
+ * @param {number} ttl
561
+ * @param {string} comment
562
+ * @throws {AppwriteException}
563
+ * @returns {Promise<Models.DnsRecord>}
564
+ */
565
+ updateRecordA(domainId: string, recordId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
566
+ if (typeof domainId === 'undefined') {
567
+ throw new AppwriteException('Missing required parameter: "domainId"');
568
+ }
569
+ if (typeof recordId === 'undefined') {
570
+ throw new AppwriteException('Missing required parameter: "recordId"');
571
+ }
572
+ if (typeof name === 'undefined') {
573
+ throw new AppwriteException('Missing required parameter: "name"');
574
+ }
575
+ if (typeof value === 'undefined') {
576
+ throw new AppwriteException('Missing required parameter: "value"');
577
+ }
578
+ if (typeof ttl === 'undefined') {
579
+ throw new AppwriteException('Missing required parameter: "ttl"');
580
+ }
581
+ const apiPath = '/domains/{domainId}/records/a/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
582
+ const payload: Payload = {};
583
+ if (typeof name !== 'undefined') {
584
+ payload['name'] = name;
585
+ }
586
+ if (typeof value !== 'undefined') {
587
+ payload['value'] = value;
588
+ }
589
+ if (typeof ttl !== 'undefined') {
590
+ payload['ttl'] = ttl;
591
+ }
592
+ if (typeof comment !== 'undefined') {
593
+ payload['comment'] = comment;
594
+ }
595
+ const uri = new URL(this.client.config.endpoint + apiPath);
596
+
597
+ const apiHeaders: { [header: string]: string } = {
598
+ 'content-type': 'application/json',
599
+ }
600
+
601
+ return this.client.call(
602
+ 'put',
603
+ uri,
604
+ apiHeaders,
605
+ payload
606
+ );
607
+ }
608
+ /**
609
+ * Create a new AAAA record for the given domain. This endpoint allows you to add a new IPv6 DNS record
610
+ to your domain. The record will be used to point a hostname to an IPv6 address.
611
+ *
612
+ * @param {string} domainId
613
+ * @param {string} name
614
+ * @param {string} value
615
+ * @param {number} ttl
616
+ * @param {string} comment
617
+ * @throws {AppwriteException}
618
+ * @returns {Promise<Models.DnsRecord>}
619
+ */
620
+ createRecordAAAA(domainId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
621
+ if (typeof domainId === 'undefined') {
622
+ throw new AppwriteException('Missing required parameter: "domainId"');
623
+ }
624
+ if (typeof name === 'undefined') {
625
+ throw new AppwriteException('Missing required parameter: "name"');
626
+ }
627
+ if (typeof value === 'undefined') {
628
+ throw new AppwriteException('Missing required parameter: "value"');
629
+ }
630
+ if (typeof ttl === 'undefined') {
631
+ throw new AppwriteException('Missing required parameter: "ttl"');
632
+ }
633
+ const apiPath = '/domains/{domainId}/records/aaaa'.replace('{domainId}', domainId);
634
+ const payload: Payload = {};
635
+ if (typeof name !== 'undefined') {
636
+ payload['name'] = name;
637
+ }
638
+ if (typeof value !== 'undefined') {
639
+ payload['value'] = value;
640
+ }
641
+ if (typeof ttl !== 'undefined') {
642
+ payload['ttl'] = ttl;
643
+ }
644
+ if (typeof comment !== 'undefined') {
645
+ payload['comment'] = comment;
646
+ }
647
+ const uri = new URL(this.client.config.endpoint + apiPath);
648
+
649
+ const apiHeaders: { [header: string]: string } = {
650
+ 'content-type': 'application/json',
651
+ }
652
+
653
+ return this.client.call(
654
+ 'post',
655
+ uri,
656
+ apiHeaders,
657
+ payload
658
+ );
659
+ }
660
+ /**
661
+ * Update an existing AAAA record for the given domain. This endpoint allows you to modify
662
+ the properties of an existing AAAA record, including its name (subdomain), IPv6 address,
663
+ TTL, and optional comment.
664
+ *
665
+ * @param {string} domainId
666
+ * @param {string} recordId
667
+ * @param {string} name
668
+ * @param {string} value
669
+ * @param {number} ttl
670
+ * @param {string} comment
671
+ * @throws {AppwriteException}
672
+ * @returns {Promise<Models.DnsRecord>}
673
+ */
674
+ updateRecordAAAA(domainId: string, recordId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
675
+ if (typeof domainId === 'undefined') {
676
+ throw new AppwriteException('Missing required parameter: "domainId"');
677
+ }
678
+ if (typeof recordId === 'undefined') {
679
+ throw new AppwriteException('Missing required parameter: "recordId"');
680
+ }
681
+ if (typeof name === 'undefined') {
682
+ throw new AppwriteException('Missing required parameter: "name"');
683
+ }
684
+ if (typeof value === 'undefined') {
685
+ throw new AppwriteException('Missing required parameter: "value"');
686
+ }
687
+ if (typeof ttl === 'undefined') {
688
+ throw new AppwriteException('Missing required parameter: "ttl"');
689
+ }
690
+ const apiPath = '/domains/{domainId}/records/aaaa/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
691
+ const payload: Payload = {};
692
+ if (typeof name !== 'undefined') {
693
+ payload['name'] = name;
694
+ }
695
+ if (typeof value !== 'undefined') {
696
+ payload['value'] = value;
697
+ }
698
+ if (typeof ttl !== 'undefined') {
699
+ payload['ttl'] = ttl;
700
+ }
701
+ if (typeof comment !== 'undefined') {
702
+ payload['comment'] = comment;
703
+ }
704
+ const uri = new URL(this.client.config.endpoint + apiPath);
705
+
706
+ const apiHeaders: { [header: string]: string } = {
707
+ 'content-type': 'application/json',
708
+ }
709
+
710
+ return this.client.call(
711
+ 'put',
712
+ uri,
713
+ apiHeaders,
714
+ payload
715
+ );
716
+ }
717
+ /**
718
+ * Create a new ALIAS record for the given domain. This record type can be used to point your domain
719
+ to another domain name that will serve as an alias. This is particularly useful when you want to
720
+ map your domain to a target domain that may change its IP address.
721
+ *
722
+ * @param {string} domainId
723
+ * @param {string} name
724
+ * @param {string} value
725
+ * @param {number} ttl
726
+ * @param {string} comment
727
+ * @throws {AppwriteException}
728
+ * @returns {Promise<Models.DnsRecord>}
729
+ */
730
+ createRecordAlias(domainId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
731
+ if (typeof domainId === 'undefined') {
732
+ throw new AppwriteException('Missing required parameter: "domainId"');
733
+ }
734
+ if (typeof name === 'undefined') {
735
+ throw new AppwriteException('Missing required parameter: "name"');
736
+ }
737
+ if (typeof value === 'undefined') {
738
+ throw new AppwriteException('Missing required parameter: "value"');
739
+ }
740
+ if (typeof ttl === 'undefined') {
741
+ throw new AppwriteException('Missing required parameter: "ttl"');
742
+ }
743
+ const apiPath = '/domains/{domainId}/records/alias'.replace('{domainId}', domainId);
744
+ const payload: Payload = {};
745
+ if (typeof name !== 'undefined') {
746
+ payload['name'] = name;
747
+ }
748
+ if (typeof value !== 'undefined') {
749
+ payload['value'] = value;
750
+ }
751
+ if (typeof ttl !== 'undefined') {
752
+ payload['ttl'] = ttl;
753
+ }
754
+ if (typeof comment !== 'undefined') {
755
+ payload['comment'] = comment;
756
+ }
757
+ const uri = new URL(this.client.config.endpoint + apiPath);
758
+
759
+ const apiHeaders: { [header: string]: string } = {
760
+ 'content-type': 'application/json',
761
+ }
762
+
763
+ return this.client.call(
764
+ 'post',
765
+ uri,
766
+ apiHeaders,
767
+ payload
768
+ );
769
+ }
770
+ /**
771
+ * Update an existing ALIAS record for the specified domain. This endpoint allows you to modify
772
+ the properties of an existing ALIAS record including its name, target domain, TTL, and comment.
773
+
774
+ The ALIAS record type is similar to a CNAME record but can be used at the zone apex (root domain).
775
+ It provides a way to map one domain name to another.
776
+ *
777
+ * @param {string} domainId
778
+ * @param {string} recordId
779
+ * @param {string} name
780
+ * @param {string} value
781
+ * @param {number} ttl
782
+ * @param {string} comment
783
+ * @throws {AppwriteException}
784
+ * @returns {Promise<Models.DnsRecord>}
785
+ */
786
+ updateRecordAlias(domainId: string, recordId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
787
+ if (typeof domainId === 'undefined') {
788
+ throw new AppwriteException('Missing required parameter: "domainId"');
789
+ }
790
+ if (typeof recordId === 'undefined') {
791
+ throw new AppwriteException('Missing required parameter: "recordId"');
792
+ }
793
+ if (typeof name === 'undefined') {
794
+ throw new AppwriteException('Missing required parameter: "name"');
795
+ }
796
+ if (typeof value === 'undefined') {
797
+ throw new AppwriteException('Missing required parameter: "value"');
798
+ }
799
+ if (typeof ttl === 'undefined') {
800
+ throw new AppwriteException('Missing required parameter: "ttl"');
801
+ }
802
+ const apiPath = '/domains/{domainId}/records/alias/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
803
+ const payload: Payload = {};
804
+ if (typeof name !== 'undefined') {
805
+ payload['name'] = name;
806
+ }
807
+ if (typeof value !== 'undefined') {
808
+ payload['value'] = value;
809
+ }
810
+ if (typeof ttl !== 'undefined') {
811
+ payload['ttl'] = ttl;
812
+ }
813
+ if (typeof comment !== 'undefined') {
814
+ payload['comment'] = comment;
815
+ }
816
+ const uri = new URL(this.client.config.endpoint + apiPath);
817
+
818
+ const apiHeaders: { [header: string]: string } = {
819
+ 'content-type': 'application/json',
820
+ }
821
+
822
+ return this.client.call(
823
+ 'put',
824
+ uri,
825
+ apiHeaders,
826
+ payload
827
+ );
828
+ }
829
+ /**
830
+ * Create a new CAA record for the given domain. CAA records are used to specify which
831
+ Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for your domain.
832
+ *
833
+ * @param {string} domainId
834
+ * @param {string} name
835
+ * @param {string} value
836
+ * @param {number} ttl
837
+ * @param {string} comment
838
+ * @throws {AppwriteException}
839
+ * @returns {Promise<Models.DnsRecord>}
840
+ */
841
+ createRecordCAA(domainId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
842
+ if (typeof domainId === 'undefined') {
843
+ throw new AppwriteException('Missing required parameter: "domainId"');
844
+ }
845
+ if (typeof name === 'undefined') {
846
+ throw new AppwriteException('Missing required parameter: "name"');
847
+ }
848
+ if (typeof value === 'undefined') {
849
+ throw new AppwriteException('Missing required parameter: "value"');
850
+ }
851
+ if (typeof ttl === 'undefined') {
852
+ throw new AppwriteException('Missing required parameter: "ttl"');
853
+ }
854
+ const apiPath = '/domains/{domainId}/records/caa'.replace('{domainId}', domainId);
855
+ const payload: Payload = {};
856
+ if (typeof name !== 'undefined') {
857
+ payload['name'] = name;
858
+ }
859
+ if (typeof value !== 'undefined') {
860
+ payload['value'] = value;
861
+ }
862
+ if (typeof ttl !== 'undefined') {
863
+ payload['ttl'] = ttl;
864
+ }
865
+ if (typeof comment !== 'undefined') {
866
+ payload['comment'] = comment;
867
+ }
868
+ const uri = new URL(this.client.config.endpoint + apiPath);
869
+
870
+ const apiHeaders: { [header: string]: string } = {
871
+ 'content-type': 'application/json',
872
+ }
873
+
874
+ return this.client.call(
875
+ 'post',
876
+ uri,
877
+ apiHeaders,
878
+ payload
879
+ );
880
+ }
881
+ /**
882
+ * Update an existing CAA record for the given domain. A CAA (Certification Authority Authorization)
883
+ record is used to specify which certificate authorities (CAs) are authorized to issue certificates
884
+ for a domain.
885
+ *
886
+ * @param {string} domainId
887
+ * @param {string} recordId
888
+ * @param {string} name
889
+ * @param {string} value
890
+ * @param {number} ttl
891
+ * @param {string} comment
892
+ * @throws {AppwriteException}
893
+ * @returns {Promise<Models.DnsRecord>}
894
+ */
895
+ updateRecordCAA(domainId: string, recordId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
896
+ if (typeof domainId === 'undefined') {
897
+ throw new AppwriteException('Missing required parameter: "domainId"');
898
+ }
899
+ if (typeof recordId === 'undefined') {
900
+ throw new AppwriteException('Missing required parameter: "recordId"');
901
+ }
902
+ if (typeof name === 'undefined') {
903
+ throw new AppwriteException('Missing required parameter: "name"');
904
+ }
905
+ if (typeof value === 'undefined') {
906
+ throw new AppwriteException('Missing required parameter: "value"');
907
+ }
908
+ if (typeof ttl === 'undefined') {
909
+ throw new AppwriteException('Missing required parameter: "ttl"');
910
+ }
911
+ const apiPath = '/domains/{domainId}/records/caa/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
912
+ const payload: Payload = {};
913
+ if (typeof name !== 'undefined') {
914
+ payload['name'] = name;
915
+ }
916
+ if (typeof value !== 'undefined') {
917
+ payload['value'] = value;
918
+ }
919
+ if (typeof ttl !== 'undefined') {
920
+ payload['ttl'] = ttl;
921
+ }
922
+ if (typeof comment !== 'undefined') {
923
+ payload['comment'] = comment;
924
+ }
925
+ const uri = new URL(this.client.config.endpoint + apiPath);
926
+
927
+ const apiHeaders: { [header: string]: string } = {
928
+ 'content-type': 'application/json',
929
+ }
930
+
931
+ return this.client.call(
932
+ 'put',
933
+ uri,
934
+ apiHeaders,
935
+ payload
936
+ );
937
+ }
938
+ /**
939
+ * Create a new CNAME record for the given domain.
940
+
941
+ A CNAME record maps a subdomain to another domain name, allowing you to create aliases
942
+ for your domain. For example, you can create a CNAME record to point &#039;blog.example.com&#039;
943
+ to &#039;example.wordpress.com&#039;.
944
+ *
945
+ * @param {string} domainId
946
+ * @param {string} name
947
+ * @param {string} value
948
+ * @param {number} ttl
949
+ * @param {string} comment
950
+ * @throws {AppwriteException}
951
+ * @returns {Promise<Models.DnsRecord>}
952
+ */
953
+ createRecordCNAME(domainId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
954
+ if (typeof domainId === 'undefined') {
955
+ throw new AppwriteException('Missing required parameter: "domainId"');
956
+ }
957
+ if (typeof name === 'undefined') {
958
+ throw new AppwriteException('Missing required parameter: "name"');
959
+ }
960
+ if (typeof value === 'undefined') {
961
+ throw new AppwriteException('Missing required parameter: "value"');
962
+ }
963
+ if (typeof ttl === 'undefined') {
964
+ throw new AppwriteException('Missing required parameter: "ttl"');
965
+ }
966
+ const apiPath = '/domains/{domainId}/records/cname'.replace('{domainId}', domainId);
967
+ const payload: Payload = {};
968
+ if (typeof name !== 'undefined') {
969
+ payload['name'] = name;
970
+ }
971
+ if (typeof value !== 'undefined') {
972
+ payload['value'] = value;
973
+ }
974
+ if (typeof ttl !== 'undefined') {
975
+ payload['ttl'] = ttl;
976
+ }
977
+ if (typeof comment !== 'undefined') {
978
+ payload['comment'] = comment;
979
+ }
980
+ const uri = new URL(this.client.config.endpoint + apiPath);
981
+
982
+ const apiHeaders: { [header: string]: string } = {
983
+ 'content-type': 'application/json',
984
+ }
985
+
986
+ return this.client.call(
987
+ 'post',
988
+ uri,
989
+ apiHeaders,
990
+ payload
991
+ );
992
+ }
993
+ /**
994
+ * Update an existing CNAME record for the given domain.
995
+ *
996
+ * @param {string} domainId
997
+ * @param {string} recordId
998
+ * @param {string} name
999
+ * @param {string} value
1000
+ * @param {number} ttl
1001
+ * @param {string} comment
1002
+ * @throws {AppwriteException}
1003
+ * @returns {Promise<Models.DnsRecord>}
1004
+ */
1005
+ updateRecordCNAME(domainId: string, recordId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
1006
+ if (typeof domainId === 'undefined') {
1007
+ throw new AppwriteException('Missing required parameter: "domainId"');
1008
+ }
1009
+ if (typeof recordId === 'undefined') {
1010
+ throw new AppwriteException('Missing required parameter: "recordId"');
1011
+ }
1012
+ if (typeof name === 'undefined') {
1013
+ throw new AppwriteException('Missing required parameter: "name"');
1014
+ }
1015
+ if (typeof value === 'undefined') {
1016
+ throw new AppwriteException('Missing required parameter: "value"');
1017
+ }
1018
+ if (typeof ttl === 'undefined') {
1019
+ throw new AppwriteException('Missing required parameter: "ttl"');
1020
+ }
1021
+ const apiPath = '/domains/{domainId}/records/cname/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
1022
+ const payload: Payload = {};
1023
+ if (typeof name !== 'undefined') {
1024
+ payload['name'] = name;
1025
+ }
1026
+ if (typeof value !== 'undefined') {
1027
+ payload['value'] = value;
1028
+ }
1029
+ if (typeof ttl !== 'undefined') {
1030
+ payload['ttl'] = ttl;
1031
+ }
1032
+ if (typeof comment !== 'undefined') {
1033
+ payload['comment'] = comment;
1034
+ }
1035
+ const uri = new URL(this.client.config.endpoint + apiPath);
1036
+
1037
+ const apiHeaders: { [header: string]: string } = {
1038
+ 'content-type': 'application/json',
1039
+ }
1040
+
1041
+ return this.client.call(
1042
+ 'put',
1043
+ uri,
1044
+ apiHeaders,
1045
+ payload
1046
+ );
1047
+ }
1048
+ /**
1049
+ * Create a new HTTPS record for the given domain. This record is used to configure HTTPS
1050
+ settings for your domain, enabling secure communication over SSL/TLS.
1051
+ *
1052
+ * @param {string} domainId
1053
+ * @param {string} name
1054
+ * @param {string} value
1055
+ * @param {number} ttl
1056
+ * @param {string} comment
1057
+ * @throws {AppwriteException}
1058
+ * @returns {Promise<Models.DnsRecord>}
1059
+ */
1060
+ createRecordHTTPS(domainId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
1061
+ if (typeof domainId === 'undefined') {
1062
+ throw new AppwriteException('Missing required parameter: "domainId"');
1063
+ }
1064
+ if (typeof name === 'undefined') {
1065
+ throw new AppwriteException('Missing required parameter: "name"');
1066
+ }
1067
+ if (typeof value === 'undefined') {
1068
+ throw new AppwriteException('Missing required parameter: "value"');
1069
+ }
1070
+ if (typeof ttl === 'undefined') {
1071
+ throw new AppwriteException('Missing required parameter: "ttl"');
1072
+ }
1073
+ const apiPath = '/domains/{domainId}/records/https'.replace('{domainId}', domainId);
1074
+ const payload: Payload = {};
1075
+ if (typeof name !== 'undefined') {
1076
+ payload['name'] = name;
1077
+ }
1078
+ if (typeof value !== 'undefined') {
1079
+ payload['value'] = value;
1080
+ }
1081
+ if (typeof ttl !== 'undefined') {
1082
+ payload['ttl'] = ttl;
1083
+ }
1084
+ if (typeof comment !== 'undefined') {
1085
+ payload['comment'] = comment;
1086
+ }
1087
+ const uri = new URL(this.client.config.endpoint + apiPath);
1088
+
1089
+ const apiHeaders: { [header: string]: string } = {
1090
+ 'content-type': 'application/json',
1091
+ }
1092
+
1093
+ return this.client.call(
1094
+ 'post',
1095
+ uri,
1096
+ apiHeaders,
1097
+ payload
1098
+ );
1099
+ }
1100
+ /**
1101
+ * Update an existing HTTPS record for the given domain. This endpoint allows you to modify
1102
+ the properties of an HTTPS record associated with your domain, including the name (subdomain),
1103
+ target value, TTL, and optional comment.
1104
+ *
1105
+ * @param {string} domainId
1106
+ * @param {string} recordId
1107
+ * @param {string} name
1108
+ * @param {string} value
1109
+ * @param {number} ttl
1110
+ * @param {string} comment
1111
+ * @throws {AppwriteException}
1112
+ * @returns {Promise<Models.DnsRecord>}
1113
+ */
1114
+ updateRecordHTTPS(domainId: string, recordId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
1115
+ if (typeof domainId === 'undefined') {
1116
+ throw new AppwriteException('Missing required parameter: "domainId"');
1117
+ }
1118
+ if (typeof recordId === 'undefined') {
1119
+ throw new AppwriteException('Missing required parameter: "recordId"');
1120
+ }
1121
+ if (typeof name === 'undefined') {
1122
+ throw new AppwriteException('Missing required parameter: "name"');
1123
+ }
1124
+ if (typeof value === 'undefined') {
1125
+ throw new AppwriteException('Missing required parameter: "value"');
1126
+ }
1127
+ if (typeof ttl === 'undefined') {
1128
+ throw new AppwriteException('Missing required parameter: "ttl"');
1129
+ }
1130
+ const apiPath = '/domains/{domainId}/records/https/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
1131
+ const payload: Payload = {};
1132
+ if (typeof name !== 'undefined') {
1133
+ payload['name'] = name;
1134
+ }
1135
+ if (typeof value !== 'undefined') {
1136
+ payload['value'] = value;
1137
+ }
1138
+ if (typeof ttl !== 'undefined') {
1139
+ payload['ttl'] = ttl;
1140
+ }
1141
+ if (typeof comment !== 'undefined') {
1142
+ payload['comment'] = comment;
1143
+ }
1144
+ const uri = new URL(this.client.config.endpoint + apiPath);
1145
+
1146
+ const apiHeaders: { [header: string]: string } = {
1147
+ 'content-type': 'application/json',
1148
+ }
1149
+
1150
+ return this.client.call(
1151
+ 'put',
1152
+ uri,
1153
+ apiHeaders,
1154
+ payload
1155
+ );
1156
+ }
1157
+ /**
1158
+ * Create a new MX record for the given domain. MX records are used to define the mail servers responsible
1159
+ for accepting email messages for the domain. Multiple MX records can be created with different priorities.
1160
+ The priority parameter determines the order in which mail servers are used, with lower values indicating
1161
+ higher priority.
1162
+ *
1163
+ * @param {string} domainId
1164
+ * @param {string} name
1165
+ * @param {string} value
1166
+ * @param {number} ttl
1167
+ * @param {number} priority
1168
+ * @param {string} comment
1169
+ * @throws {AppwriteException}
1170
+ * @returns {Promise<Models.DnsRecord>}
1171
+ */
1172
+ createRecordMX(domainId: string, name: string, value: string, ttl: number, priority: number, comment?: string): Promise<Models.DnsRecord> {
1173
+ if (typeof domainId === 'undefined') {
1174
+ throw new AppwriteException('Missing required parameter: "domainId"');
1175
+ }
1176
+ if (typeof name === 'undefined') {
1177
+ throw new AppwriteException('Missing required parameter: "name"');
1178
+ }
1179
+ if (typeof value === 'undefined') {
1180
+ throw new AppwriteException('Missing required parameter: "value"');
1181
+ }
1182
+ if (typeof ttl === 'undefined') {
1183
+ throw new AppwriteException('Missing required parameter: "ttl"');
1184
+ }
1185
+ if (typeof priority === 'undefined') {
1186
+ throw new AppwriteException('Missing required parameter: "priority"');
1187
+ }
1188
+ const apiPath = '/domains/{domainId}/records/mx'.replace('{domainId}', domainId);
1189
+ const payload: Payload = {};
1190
+ if (typeof name !== 'undefined') {
1191
+ payload['name'] = name;
1192
+ }
1193
+ if (typeof value !== 'undefined') {
1194
+ payload['value'] = value;
1195
+ }
1196
+ if (typeof ttl !== 'undefined') {
1197
+ payload['ttl'] = ttl;
1198
+ }
1199
+ if (typeof priority !== 'undefined') {
1200
+ payload['priority'] = priority;
1201
+ }
1202
+ if (typeof comment !== 'undefined') {
1203
+ payload['comment'] = comment;
1204
+ }
1205
+ const uri = new URL(this.client.config.endpoint + apiPath);
1206
+
1207
+ const apiHeaders: { [header: string]: string } = {
1208
+ 'content-type': 'application/json',
1209
+ }
1210
+
1211
+ return this.client.call(
1212
+ 'post',
1213
+ uri,
1214
+ apiHeaders,
1215
+ payload
1216
+ );
1217
+ }
1218
+ /**
1219
+ * Update an existing MX record for the given domain.
1220
+ *
1221
+ * @param {string} domainId
1222
+ * @param {string} recordId
1223
+ * @param {string} name
1224
+ * @param {string} value
1225
+ * @param {number} ttl
1226
+ * @param {number} priority
1227
+ * @param {string} comment
1228
+ * @throws {AppwriteException}
1229
+ * @returns {Promise<Models.DnsRecord>}
1230
+ */
1231
+ updateRecordMX(domainId: string, recordId: string, name: string, value: string, ttl: number, priority: number, comment?: string): Promise<Models.DnsRecord> {
1232
+ if (typeof domainId === 'undefined') {
1233
+ throw new AppwriteException('Missing required parameter: "domainId"');
1234
+ }
1235
+ if (typeof recordId === 'undefined') {
1236
+ throw new AppwriteException('Missing required parameter: "recordId"');
1237
+ }
1238
+ if (typeof name === 'undefined') {
1239
+ throw new AppwriteException('Missing required parameter: "name"');
1240
+ }
1241
+ if (typeof value === 'undefined') {
1242
+ throw new AppwriteException('Missing required parameter: "value"');
1243
+ }
1244
+ if (typeof ttl === 'undefined') {
1245
+ throw new AppwriteException('Missing required parameter: "ttl"');
1246
+ }
1247
+ if (typeof priority === 'undefined') {
1248
+ throw new AppwriteException('Missing required parameter: "priority"');
1249
+ }
1250
+ const apiPath = '/domains/{domainId}/records/mx/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
1251
+ const payload: Payload = {};
1252
+ if (typeof name !== 'undefined') {
1253
+ payload['name'] = name;
1254
+ }
1255
+ if (typeof value !== 'undefined') {
1256
+ payload['value'] = value;
1257
+ }
1258
+ if (typeof ttl !== 'undefined') {
1259
+ payload['ttl'] = ttl;
1260
+ }
1261
+ if (typeof priority !== 'undefined') {
1262
+ payload['priority'] = priority;
1263
+ }
1264
+ if (typeof comment !== 'undefined') {
1265
+ payload['comment'] = comment;
1266
+ }
1267
+ const uri = new URL(this.client.config.endpoint + apiPath);
1268
+
1269
+ const apiHeaders: { [header: string]: string } = {
1270
+ 'content-type': 'application/json',
1271
+ }
1272
+
1273
+ return this.client.call(
1274
+ 'put',
1275
+ uri,
1276
+ apiHeaders,
1277
+ payload
1278
+ );
1279
+ }
1280
+ /**
1281
+ * Create a new NS record for the given domain. NS records specify the nameservers that are used
1282
+ to resolve the domain name to IP addresses. Each domain can have multiple NS records.
1283
+ *
1284
+ * @param {string} domainId
1285
+ * @param {string} name
1286
+ * @param {string} value
1287
+ * @param {number} ttl
1288
+ * @param {string} comment
1289
+ * @throws {AppwriteException}
1290
+ * @returns {Promise<Models.DnsRecord>}
1291
+ */
1292
+ createRecordNS(domainId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
1293
+ if (typeof domainId === 'undefined') {
1294
+ throw new AppwriteException('Missing required parameter: "domainId"');
1295
+ }
1296
+ if (typeof name === 'undefined') {
1297
+ throw new AppwriteException('Missing required parameter: "name"');
1298
+ }
1299
+ if (typeof value === 'undefined') {
1300
+ throw new AppwriteException('Missing required parameter: "value"');
1301
+ }
1302
+ if (typeof ttl === 'undefined') {
1303
+ throw new AppwriteException('Missing required parameter: "ttl"');
1304
+ }
1305
+ const apiPath = '/domains/{domainId}/records/ns'.replace('{domainId}', domainId);
1306
+ const payload: Payload = {};
1307
+ if (typeof name !== 'undefined') {
1308
+ payload['name'] = name;
1309
+ }
1310
+ if (typeof value !== 'undefined') {
1311
+ payload['value'] = value;
1312
+ }
1313
+ if (typeof ttl !== 'undefined') {
1314
+ payload['ttl'] = ttl;
1315
+ }
1316
+ if (typeof comment !== 'undefined') {
1317
+ payload['comment'] = comment;
1318
+ }
1319
+ const uri = new URL(this.client.config.endpoint + apiPath);
1320
+
1321
+ const apiHeaders: { [header: string]: string } = {
1322
+ 'content-type': 'application/json',
1323
+ }
1324
+
1325
+ return this.client.call(
1326
+ 'post',
1327
+ uri,
1328
+ apiHeaders,
1329
+ payload
1330
+ );
1331
+ }
1332
+ /**
1333
+ * Update an existing NS record for the given domain. This endpoint allows you to modify
1334
+ the properties of an NS (nameserver) record associated with your domain. You can update
1335
+ the record name (subdomain), target nameserver value, TTL, and add or modify comments
1336
+ for better record management.
1337
+ *
1338
+ * @param {string} domainId
1339
+ * @param {string} recordId
1340
+ * @param {string} name
1341
+ * @param {string} value
1342
+ * @param {number} ttl
1343
+ * @param {string} comment
1344
+ * @throws {AppwriteException}
1345
+ * @returns {Promise<Models.DnsRecord>}
1346
+ */
1347
+ updateRecordNS(domainId: string, recordId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
1348
+ if (typeof domainId === 'undefined') {
1349
+ throw new AppwriteException('Missing required parameter: "domainId"');
1350
+ }
1351
+ if (typeof recordId === 'undefined') {
1352
+ throw new AppwriteException('Missing required parameter: "recordId"');
1353
+ }
1354
+ if (typeof name === 'undefined') {
1355
+ throw new AppwriteException('Missing required parameter: "name"');
1356
+ }
1357
+ if (typeof value === 'undefined') {
1358
+ throw new AppwriteException('Missing required parameter: "value"');
1359
+ }
1360
+ if (typeof ttl === 'undefined') {
1361
+ throw new AppwriteException('Missing required parameter: "ttl"');
1362
+ }
1363
+ const apiPath = '/domains/{domainId}/records/ns/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
1364
+ const payload: Payload = {};
1365
+ if (typeof name !== 'undefined') {
1366
+ payload['name'] = name;
1367
+ }
1368
+ if (typeof value !== 'undefined') {
1369
+ payload['value'] = value;
1370
+ }
1371
+ if (typeof ttl !== 'undefined') {
1372
+ payload['ttl'] = ttl;
1373
+ }
1374
+ if (typeof comment !== 'undefined') {
1375
+ payload['comment'] = comment;
1376
+ }
1377
+ const uri = new URL(this.client.config.endpoint + apiPath);
1378
+
1379
+ const apiHeaders: { [header: string]: string } = {
1380
+ 'content-type': 'application/json',
1381
+ }
1382
+
1383
+ return this.client.call(
1384
+ 'put',
1385
+ uri,
1386
+ apiHeaders,
1387
+ payload
1388
+ );
1389
+ }
1390
+ /**
1391
+ * Create a new SRV record for the given domain. SRV records are used to define the location
1392
+ of servers for specific services. For example, they can be used to specify which server
1393
+ handles a specific service like SIP or XMPP for the domain.
1394
+ *
1395
+ * @param {string} domainId
1396
+ * @param {string} name
1397
+ * @param {string} value
1398
+ * @param {number} ttl
1399
+ * @param {number} priority
1400
+ * @param {number} weight
1401
+ * @param {number} port
1402
+ * @param {string} comment
1403
+ * @throws {AppwriteException}
1404
+ * @returns {Promise<Models.DnsRecord>}
1405
+ */
1406
+ createRecordSRV(domainId: string, name: string, value: string, ttl: number, priority: number, weight: number, port: number, comment?: string): Promise<Models.DnsRecord> {
1407
+ if (typeof domainId === 'undefined') {
1408
+ throw new AppwriteException('Missing required parameter: "domainId"');
1409
+ }
1410
+ if (typeof name === 'undefined') {
1411
+ throw new AppwriteException('Missing required parameter: "name"');
1412
+ }
1413
+ if (typeof value === 'undefined') {
1414
+ throw new AppwriteException('Missing required parameter: "value"');
1415
+ }
1416
+ if (typeof ttl === 'undefined') {
1417
+ throw new AppwriteException('Missing required parameter: "ttl"');
1418
+ }
1419
+ if (typeof priority === 'undefined') {
1420
+ throw new AppwriteException('Missing required parameter: "priority"');
1421
+ }
1422
+ if (typeof weight === 'undefined') {
1423
+ throw new AppwriteException('Missing required parameter: "weight"');
1424
+ }
1425
+ if (typeof port === 'undefined') {
1426
+ throw new AppwriteException('Missing required parameter: "port"');
1427
+ }
1428
+ const apiPath = '/domains/{domainId}/records/srv'.replace('{domainId}', domainId);
1429
+ const payload: Payload = {};
1430
+ if (typeof name !== 'undefined') {
1431
+ payload['name'] = name;
1432
+ }
1433
+ if (typeof value !== 'undefined') {
1434
+ payload['value'] = value;
1435
+ }
1436
+ if (typeof ttl !== 'undefined') {
1437
+ payload['ttl'] = ttl;
1438
+ }
1439
+ if (typeof priority !== 'undefined') {
1440
+ payload['priority'] = priority;
1441
+ }
1442
+ if (typeof weight !== 'undefined') {
1443
+ payload['weight'] = weight;
1444
+ }
1445
+ if (typeof port !== 'undefined') {
1446
+ payload['port'] = port;
1447
+ }
1448
+ if (typeof comment !== 'undefined') {
1449
+ payload['comment'] = comment;
1450
+ }
1451
+ const uri = new URL(this.client.config.endpoint + apiPath);
1452
+
1453
+ const apiHeaders: { [header: string]: string } = {
1454
+ 'content-type': 'application/json',
1455
+ }
1456
+
1457
+ return this.client.call(
1458
+ 'post',
1459
+ uri,
1460
+ apiHeaders,
1461
+ payload
1462
+ );
1463
+ }
1464
+ /**
1465
+ * Update an existing SRV record for the given domain.
1466
+
1467
+ Required parameters:
1468
+ - domainId: Domain unique ID
1469
+ - recordId: DNS record unique ID
1470
+ - name: Record name (service name)
1471
+ - value: Target hostname for this SRV record
1472
+ - ttl: Time to live, in seconds
1473
+ - priority: Record priority
1474
+ - weight: Record weight
1475
+ - port: Port number for the service
1476
+
1477
+ Optional parameters:
1478
+ - comment: A comment for this record
1479
+ *
1480
+ * @param {string} domainId
1481
+ * @param {string} recordId
1482
+ * @param {string} name
1483
+ * @param {string} value
1484
+ * @param {number} ttl
1485
+ * @param {number} priority
1486
+ * @param {number} weight
1487
+ * @param {number} port
1488
+ * @param {string} comment
1489
+ * @throws {AppwriteException}
1490
+ * @returns {Promise<Models.DnsRecord>}
1491
+ */
1492
+ updateRecordSRV(domainId: string, recordId: string, name: string, value: string, ttl: number, priority: number, weight: number, port: number, comment?: string): Promise<Models.DnsRecord> {
1493
+ if (typeof domainId === 'undefined') {
1494
+ throw new AppwriteException('Missing required parameter: "domainId"');
1495
+ }
1496
+ if (typeof recordId === 'undefined') {
1497
+ throw new AppwriteException('Missing required parameter: "recordId"');
1498
+ }
1499
+ if (typeof name === 'undefined') {
1500
+ throw new AppwriteException('Missing required parameter: "name"');
1501
+ }
1502
+ if (typeof value === 'undefined') {
1503
+ throw new AppwriteException('Missing required parameter: "value"');
1504
+ }
1505
+ if (typeof ttl === 'undefined') {
1506
+ throw new AppwriteException('Missing required parameter: "ttl"');
1507
+ }
1508
+ if (typeof priority === 'undefined') {
1509
+ throw new AppwriteException('Missing required parameter: "priority"');
1510
+ }
1511
+ if (typeof weight === 'undefined') {
1512
+ throw new AppwriteException('Missing required parameter: "weight"');
1513
+ }
1514
+ if (typeof port === 'undefined') {
1515
+ throw new AppwriteException('Missing required parameter: "port"');
1516
+ }
1517
+ const apiPath = '/domains/{domainId}/records/srv/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
1518
+ const payload: Payload = {};
1519
+ if (typeof name !== 'undefined') {
1520
+ payload['name'] = name;
1521
+ }
1522
+ if (typeof value !== 'undefined') {
1523
+ payload['value'] = value;
1524
+ }
1525
+ if (typeof ttl !== 'undefined') {
1526
+ payload['ttl'] = ttl;
1527
+ }
1528
+ if (typeof priority !== 'undefined') {
1529
+ payload['priority'] = priority;
1530
+ }
1531
+ if (typeof weight !== 'undefined') {
1532
+ payload['weight'] = weight;
1533
+ }
1534
+ if (typeof port !== 'undefined') {
1535
+ payload['port'] = port;
1536
+ }
1537
+ if (typeof comment !== 'undefined') {
1538
+ payload['comment'] = comment;
1539
+ }
1540
+ const uri = new URL(this.client.config.endpoint + apiPath);
1541
+
1542
+ const apiHeaders: { [header: string]: string } = {
1543
+ 'content-type': 'application/json',
1544
+ }
1545
+
1546
+ return this.client.call(
1547
+ 'put',
1548
+ uri,
1549
+ apiHeaders,
1550
+ payload
1551
+ );
1552
+ }
1553
+ /**
1554
+ * Create a new TXT record for the given domain. TXT records can be used
1555
+ to provide additional information about your domain, such as domain
1556
+ verification records, SPF records, or DKIM records.
1557
+ *
1558
+ * @param {string} domainId
1559
+ * @param {string} name
1560
+ * @param {number} ttl
1561
+ * @param {string} value
1562
+ * @param {string} comment
1563
+ * @throws {AppwriteException}
1564
+ * @returns {Promise<Models.DnsRecord>}
1565
+ */
1566
+ createRecordTXT(domainId: string, name: string, ttl: number, value?: string, comment?: string): Promise<Models.DnsRecord> {
1567
+ if (typeof domainId === 'undefined') {
1568
+ throw new AppwriteException('Missing required parameter: "domainId"');
1569
+ }
1570
+ if (typeof name === 'undefined') {
1571
+ throw new AppwriteException('Missing required parameter: "name"');
1572
+ }
1573
+ if (typeof ttl === 'undefined') {
1574
+ throw new AppwriteException('Missing required parameter: "ttl"');
1575
+ }
1576
+ const apiPath = '/domains/{domainId}/records/txt'.replace('{domainId}', domainId);
1577
+ const payload: Payload = {};
1578
+ if (typeof name !== 'undefined') {
1579
+ payload['name'] = name;
1580
+ }
1581
+ if (typeof value !== 'undefined') {
1582
+ payload['value'] = value;
1583
+ }
1584
+ if (typeof ttl !== 'undefined') {
1585
+ payload['ttl'] = ttl;
1586
+ }
1587
+ if (typeof comment !== 'undefined') {
1588
+ payload['comment'] = comment;
1589
+ }
1590
+ const uri = new URL(this.client.config.endpoint + apiPath);
1591
+
1592
+ const apiHeaders: { [header: string]: string } = {
1593
+ 'content-type': 'application/json',
1594
+ }
1595
+
1596
+ return this.client.call(
1597
+ 'post',
1598
+ uri,
1599
+ apiHeaders,
1600
+ payload
1601
+ );
1602
+ }
1603
+ /**
1604
+ * Update an existing TXT record for the given domain.
1605
+
1606
+ Update the TXT record details for a specific domain by providing the domain ID,
1607
+ record ID, and the new record configuration including name, value, TTL, and an optional comment.
1608
+ *
1609
+ * @param {string} domainId
1610
+ * @param {string} recordId
1611
+ * @param {string} name
1612
+ * @param {string} value
1613
+ * @param {number} ttl
1614
+ * @param {string} comment
1615
+ * @throws {AppwriteException}
1616
+ * @returns {Promise<Models.DnsRecord>}
1617
+ */
1618
+ updateRecordTXT(domainId: string, recordId: string, name: string, value: string, ttl: number, comment?: string): Promise<Models.DnsRecord> {
1619
+ if (typeof domainId === 'undefined') {
1620
+ throw new AppwriteException('Missing required parameter: "domainId"');
1621
+ }
1622
+ if (typeof recordId === 'undefined') {
1623
+ throw new AppwriteException('Missing required parameter: "recordId"');
1624
+ }
1625
+ if (typeof name === 'undefined') {
1626
+ throw new AppwriteException('Missing required parameter: "name"');
1627
+ }
1628
+ if (typeof value === 'undefined') {
1629
+ throw new AppwriteException('Missing required parameter: "value"');
1630
+ }
1631
+ if (typeof ttl === 'undefined') {
1632
+ throw new AppwriteException('Missing required parameter: "ttl"');
1633
+ }
1634
+ const apiPath = '/domains/{domainId}/records/txt/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
1635
+ const payload: Payload = {};
1636
+ if (typeof name !== 'undefined') {
1637
+ payload['name'] = name;
1638
+ }
1639
+ if (typeof value !== 'undefined') {
1640
+ payload['value'] = value;
1641
+ }
1642
+ if (typeof ttl !== 'undefined') {
1643
+ payload['ttl'] = ttl;
1644
+ }
1645
+ if (typeof comment !== 'undefined') {
1646
+ payload['comment'] = comment;
1647
+ }
1648
+ const uri = new URL(this.client.config.endpoint + apiPath);
1649
+
1650
+ const apiHeaders: { [header: string]: string } = {
1651
+ 'content-type': 'application/json',
1652
+ }
1653
+
1654
+ return this.client.call(
1655
+ 'put',
1656
+ uri,
1657
+ apiHeaders,
1658
+ payload
1659
+ );
1660
+ }
1661
+ /**
1662
+ * Get a single DNS record for a given domain by record ID.
1663
+
1664
+ This endpoint allows you to retrieve a specific DNS record associated with a domain
1665
+ using its unique identifier. The record contains information about the DNS configuration
1666
+ such as type, value, and TTL settings.
1667
+ *
1668
+ * @param {string} domainId
1669
+ * @param {string} recordId
1670
+ * @throws {AppwriteException}
1671
+ * @returns {Promise<Models.DnsRecord>}
1672
+ */
1673
+ getRecord(domainId: string, recordId: string): Promise<Models.DnsRecord> {
1674
+ if (typeof domainId === 'undefined') {
1675
+ throw new AppwriteException('Missing required parameter: "domainId"');
1676
+ }
1677
+ if (typeof recordId === 'undefined') {
1678
+ throw new AppwriteException('Missing required parameter: "recordId"');
1679
+ }
1680
+ const apiPath = '/domains/{domainId}/records/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
1681
+ const payload: Payload = {};
1682
+ const uri = new URL(this.client.config.endpoint + apiPath);
1683
+
1684
+ const apiHeaders: { [header: string]: string } = {
1685
+ }
1686
+
1687
+ return this.client.call(
1688
+ 'get',
1689
+ uri,
1690
+ apiHeaders,
1691
+ payload
1692
+ );
1693
+ }
1694
+ /**
1695
+ * Delete a DNS record for the given domain. This endpoint allows you to delete an existing DNS record
1696
+ from a specific domain.
1697
+ *
1698
+ * @param {string} domainId
1699
+ * @param {string} recordId
1700
+ * @throws {AppwriteException}
1701
+ * @returns {Promise<{}>}
1702
+ */
1703
+ deleteRecord(domainId: string, recordId: string): Promise<{}> {
1704
+ if (typeof domainId === 'undefined') {
1705
+ throw new AppwriteException('Missing required parameter: "domainId"');
1706
+ }
1707
+ if (typeof recordId === 'undefined') {
1708
+ throw new AppwriteException('Missing required parameter: "recordId"');
1709
+ }
1710
+ const apiPath = '/domains/{domainId}/records/{recordId}'.replace('{domainId}', domainId).replace('{recordId}', recordId);
1711
+ const payload: Payload = {};
1712
+ const uri = new URL(this.client.config.endpoint + apiPath);
1713
+
1714
+ const apiHeaders: { [header: string]: string } = {
1715
+ 'content-type': 'application/json',
1716
+ }
1717
+
1718
+ return this.client.call(
1719
+ 'delete',
1720
+ uri,
1721
+ apiHeaders,
1722
+ payload
1723
+ );
1724
+ }
1725
+ /**
1726
+ * Update the team ID for a specific domain. This endpoint requires admin access.
1727
+
1728
+ Updating the team ID will transfer ownership and access control of the domain
1729
+ and all its DNS records to the new team.
1730
+ *
1731
+ * @param {string} domainId
1732
+ * @param {string} teamId
1733
+ * @throws {AppwriteException}
1734
+ * @returns {Promise<Models.Domain>}
1735
+ */
1736
+ updateTeam(domainId: string, teamId: string): Promise<Models.Domain> {
1737
+ if (typeof domainId === 'undefined') {
1738
+ throw new AppwriteException('Missing required parameter: "domainId"');
1739
+ }
1740
+ if (typeof teamId === 'undefined') {
1741
+ throw new AppwriteException('Missing required parameter: "teamId"');
1742
+ }
1743
+ const apiPath = '/domains/{domainId}/team'.replace('{domainId}', domainId);
1744
+ const payload: Payload = {};
1745
+ if (typeof teamId !== 'undefined') {
1746
+ payload['teamId'] = teamId;
1747
+ }
1748
+ const uri = new URL(this.client.config.endpoint + apiPath);
1749
+
1750
+ const apiHeaders: { [header: string]: string } = {
1751
+ 'content-type': 'application/json',
1752
+ }
1753
+
1754
+ return this.client.call(
1755
+ 'patch',
1756
+ uri,
1757
+ apiHeaders,
1758
+ payload
1759
+ );
1760
+ }
1761
+ /**
1762
+ * Retrieve the DNS zone file for the given domain. This endpoint will return the DNS
1763
+ zone file in a standardized format that can be used to configure DNS servers.
1764
+ *
1765
+ * @param {string} domainId
1766
+ * @throws {AppwriteException}
1767
+ * @returns {Promise<{}>}
1768
+ */
1769
+ getZone(domainId: string): Promise<{}> {
1770
+ if (typeof domainId === 'undefined') {
1771
+ throw new AppwriteException('Missing required parameter: "domainId"');
1772
+ }
1773
+ const apiPath = '/domains/{domainId}/zone'.replace('{domainId}', domainId);
1774
+ const payload: Payload = {};
1775
+ const uri = new URL(this.client.config.endpoint + apiPath);
1776
+
1777
+ const apiHeaders: { [header: string]: string } = {
1778
+ }
1779
+
1780
+ return this.client.call(
1781
+ 'get',
1782
+ uri,
1783
+ apiHeaders,
1784
+ payload
1785
+ );
1786
+ }
1787
+ /**
1788
+ * Update the DNS zone for the given domain using the provided zone file content.
1789
+ All parsed records are imported and then the main domain document is returned.
1790
+ *
1791
+ * @param {string} domainId
1792
+ * @param {string} content
1793
+ * @throws {AppwriteException}
1794
+ * @returns {Promise<Models.Domain>}
1795
+ */
1796
+ updateZone(domainId: string, content: string): Promise<Models.Domain> {
1797
+ if (typeof domainId === 'undefined') {
1798
+ throw new AppwriteException('Missing required parameter: "domainId"');
1799
+ }
1800
+ if (typeof content === 'undefined') {
1801
+ throw new AppwriteException('Missing required parameter: "content"');
1802
+ }
1803
+ const apiPath = '/domains/{domainId}/zone'.replace('{domainId}', domainId);
1804
+ const payload: Payload = {};
1805
+ if (typeof content !== 'undefined') {
1806
+ payload['content'] = content;
1807
+ }
1808
+ const uri = new URL(this.client.config.endpoint + apiPath);
1809
+
1810
+ const apiHeaders: { [header: string]: string } = {
1811
+ 'content-type': 'application/json',
1812
+ }
1813
+
1814
+ return this.client.call(
1815
+ 'put',
1816
+ uri,
1817
+ apiHeaders,
1818
+ payload
1819
+ );
1820
+ }
1821
+ }