node-appwrite 21.1.0 → 22.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +2 -2
  3. package/dist/client.js +37 -5
  4. package/dist/client.js.map +1 -1
  5. package/dist/client.mjs +1505 -5
  6. package/dist/client.mjs.map +1 -1
  7. package/dist/enums/browser-permission.d.mts +24 -0
  8. package/dist/enums/browser-permission.d.ts +24 -0
  9. package/dist/enums/browser-permission.js +29 -0
  10. package/dist/enums/browser-permission.js.map +1 -0
  11. package/dist/enums/browser-permission.mjs +28 -0
  12. package/dist/enums/browser-permission.mjs.map +1 -0
  13. package/dist/enums/deployment-status.d.mts +1 -0
  14. package/dist/enums/deployment-status.d.ts +1 -0
  15. package/dist/enums/deployment-status.js +1 -0
  16. package/dist/enums/deployment-status.js.map +1 -1
  17. package/dist/enums/deployment-status.mjs +1 -0
  18. package/dist/enums/deployment-status.mjs.map +1 -1
  19. package/dist/enums/name.d.mts +1 -0
  20. package/dist/enums/name.d.ts +1 -0
  21. package/dist/enums/name.js +1 -0
  22. package/dist/enums/name.js.map +1 -1
  23. package/dist/enums/name.mjs +1 -0
  24. package/dist/enums/name.mjs.map +1 -1
  25. package/dist/enums/o-auth-provider.d.mts +1 -2
  26. package/dist/enums/o-auth-provider.d.ts +1 -2
  27. package/dist/enums/o-auth-provider.js +0 -1
  28. package/dist/enums/o-auth-provider.js.map +1 -1
  29. package/dist/enums/o-auth-provider.mjs +0 -1
  30. package/dist/enums/o-auth-provider.mjs.map +1 -1
  31. package/dist/enums/order-by.d.mts +6 -0
  32. package/dist/enums/order-by.d.ts +6 -0
  33. package/dist/enums/order-by.js +11 -0
  34. package/dist/enums/order-by.js.map +1 -0
  35. package/dist/enums/order-by.mjs +10 -0
  36. package/dist/enums/order-by.mjs.map +1 -0
  37. package/dist/enums/roles.d.mts +7 -0
  38. package/dist/enums/roles.d.ts +7 -0
  39. package/dist/enums/roles.js +12 -0
  40. package/dist/enums/roles.js.map +1 -0
  41. package/dist/enums/roles.mjs +11 -0
  42. package/dist/enums/roles.mjs.map +1 -0
  43. package/dist/enums/scopes.d.mts +59 -0
  44. package/dist/enums/scopes.d.ts +59 -0
  45. package/dist/enums/scopes.js +64 -0
  46. package/dist/enums/scopes.js.map +1 -0
  47. package/dist/enums/scopes.mjs +63 -0
  48. package/dist/enums/scopes.mjs.map +1 -0
  49. package/dist/index.d.mts +5 -2
  50. package/dist/index.d.ts +5 -2
  51. package/dist/index.js +21 -6
  52. package/dist/index.js.map +1 -1
  53. package/dist/index.mjs +5 -2
  54. package/dist/index.mjs.map +1 -1
  55. package/dist/models.d.mts +367 -6
  56. package/dist/models.d.ts +367 -6
  57. package/dist/query.d.mts +38 -8
  58. package/dist/query.d.ts +38 -8
  59. package/dist/query.js +48 -7
  60. package/dist/query.js.map +1 -1
  61. package/dist/query.mjs +44 -7
  62. package/dist/query.mjs.map +1 -1
  63. package/dist/services/account.d.mts +13 -1
  64. package/dist/services/account.d.ts +13 -1
  65. package/dist/services/account.js +13 -7
  66. package/dist/services/account.js.map +1 -1
  67. package/dist/services/account.mjs +13 -7
  68. package/dist/services/account.mjs.map +1 -1
  69. package/dist/services/avatars.d.mts +9 -8
  70. package/dist/services/avatars.d.ts +9 -8
  71. package/dist/services/avatars.js.map +1 -1
  72. package/dist/services/avatars.mjs.map +1 -1
  73. package/dist/services/databases.d.mts +329 -34
  74. package/dist/services/databases.d.ts +329 -34
  75. package/dist/services/databases.js +469 -9
  76. package/dist/services/databases.js.map +1 -1
  77. package/dist/services/databases.mjs +469 -9
  78. package/dist/services/databases.mjs.map +1 -1
  79. package/dist/services/functions.d.mts +9 -8
  80. package/dist/services/functions.d.ts +9 -8
  81. package/dist/services/functions.js.map +1 -1
  82. package/dist/services/functions.mjs.map +1 -1
  83. package/dist/services/graphql.js.map +1 -1
  84. package/dist/services/graphql.mjs.map +1 -1
  85. package/dist/services/health.d.mts +25 -6
  86. package/dist/services/health.d.ts +25 -6
  87. package/dist/services/health.js +27 -3
  88. package/dist/services/health.js.map +1 -1
  89. package/dist/services/health.mjs +27 -3
  90. package/dist/services/health.mjs.map +1 -1
  91. package/dist/services/messaging.js.map +1 -1
  92. package/dist/services/messaging.mjs.map +1 -1
  93. package/dist/services/sites.js.map +1 -1
  94. package/dist/services/sites.mjs.map +1 -1
  95. package/dist/services/storage.d.mts +12 -12
  96. package/dist/services/storage.d.ts +12 -12
  97. package/dist/services/storage.js.map +1 -1
  98. package/dist/services/storage.mjs.map +1 -1
  99. package/dist/services/tables-db.d.mts +329 -32
  100. package/dist/services/tables-db.d.ts +329 -32
  101. package/dist/services/tables-db.js +469 -6
  102. package/dist/services/tables-db.js.map +1 -1
  103. package/dist/services/tables-db.mjs +469 -6
  104. package/dist/services/tables-db.mjs.map +1 -1
  105. package/dist/services/teams.d.mts +9 -8
  106. package/dist/services/teams.d.ts +9 -8
  107. package/dist/services/teams.js.map +1 -1
  108. package/dist/services/teams.mjs.map +1 -1
  109. package/dist/services/tokens.js.map +1 -1
  110. package/dist/services/tokens.mjs.map +1 -1
  111. package/dist/services/users.js.map +1 -1
  112. package/dist/services/users.mjs.map +1 -1
  113. package/package.json +4 -2
  114. package/dist/enums/output.d.mts +0 -11
  115. package/dist/enums/output.d.ts +0 -11
  116. package/dist/enums/output.js +0 -16
  117. package/dist/enums/output.js.map +0 -1
  118. package/dist/enums/output.mjs +0 -15
  119. package/dist/enums/output.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/services/graphql.ts"],"names":[],"mappings":"AAAA,SAAS,yBAA+D;AAIjE,MAAM,QAAQ;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAmBA,MACI,eACW;AACX,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,KAAK,WAAW,eAAgB;AACnH,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,OAAO;AAAA,MACX;AAAA,IACJ;AAEA,UAAM,QAAQ,OAAO;AAErB,QAAI,OAAO,UAAU,aAAa;AAC9B,YAAM,IAAI,kBAAkB,qCAAqC;AAAA,IACrE;AAEA,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA,EAmBA,SACI,eACW;AACX,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,KAAK,WAAW,eAAgB;AACnH,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,OAAO;AAAA,MACX;AAAA,IACJ;AAEA,UAAM,QAAQ,OAAO;AAErB,QAAI,OAAO,UAAU,aAAa;AAC9B,YAAM,IAAI,kBAAkB,qCAAqC;AAAA,IACrE;AAEA,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\n\nexport class Graphql {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} params.query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n query(params: { query: object }): Promise<{}>;\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n query(query: object): Promise<{}>;\n query(\n paramsOrFirst: { query: object } | object \n ): Promise<{}> {\n let params: { query: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { query: object };\n } else {\n params = {\n query: paramsOrFirst as object \n };\n }\n \n const query = params.query;\n\n if (typeof query === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"query\"');\n }\n\n const apiPath = '/graphql';\n const payload: Payload = {};\n if (typeof query !== 'undefined') {\n payload['query'] = query;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'x-sdk-graphql': 'true',\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} params.query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n mutation(params: { query: object }): Promise<{}>;\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n mutation(query: object): Promise<{}>;\n mutation(\n paramsOrFirst: { query: object } | object \n ): Promise<{}> {\n let params: { query: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { query: object };\n } else {\n params = {\n query: paramsOrFirst as object \n };\n }\n \n const query = params.query;\n\n if (typeof query === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"query\"');\n }\n\n const apiPath = '/graphql/mutation';\n const payload: Payload = {};\n if (typeof query !== 'undefined') {\n payload['query'] = query;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'x-sdk-graphql': 'true',\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/services/graphql.ts"],"names":[],"mappings":"AAAA,SAAS,yBAA+D;AAIjE,MAAM,QAAQ;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAmBA,MACI,eACW;AACX,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,KAAK,WAAW,eAAgB;AACnH,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,OAAO;AAAA,MACX;AAAA,IACJ;AAEA,UAAM,QAAQ,OAAO;AAErB,QAAI,OAAO,UAAU,aAAa;AAC9B,YAAM,IAAI,kBAAkB,qCAAqC;AAAA,IACrE;AAEA,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA,EAmBA,SACI,eACW;AACX,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,KAAK,WAAW,eAAgB;AACnH,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,OAAO;AAAA,MACX;AAAA,IACJ;AAEA,UAAM,QAAQ,OAAO;AAErB,QAAI,OAAO,UAAU,aAAa;AAC9B,YAAM,IAAI,kBAAkB,qCAAqC;AAAA,IACrE;AAEA,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\n\nexport class Graphql {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} params.query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n query(params: { query: object }): Promise<{}>;\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n query(query: object): Promise<{}>;\n query(\n paramsOrFirst: { query: object } | object \n ): Promise<{}> {\n let params: { query: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { query: object };\n } else {\n params = {\n query: paramsOrFirst as object \n };\n }\n \n const query = params.query;\n\n if (typeof query === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"query\"');\n }\n\n const apiPath = '/graphql';\n const payload: Payload = {};\n if (typeof query !== 'undefined') {\n payload['query'] = query;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'x-sdk-graphql': 'true',\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} params.query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n mutation(params: { query: object }): Promise<{}>;\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n mutation(query: object): Promise<{}>;\n mutation(\n paramsOrFirst: { query: object } | object \n ): Promise<{}> {\n let params: { query: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { query: object };\n } else {\n params = {\n query: paramsOrFirst as object \n };\n }\n \n const query = params.query;\n\n if (typeof query === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"query\"');\n }\n\n const apiPath = '/graphql/mutation';\n const payload: Payload = {};\n if (typeof query !== 'undefined') {\n payload['query'] = query;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'x-sdk-graphql': 'true',\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/services/graphql.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAIjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAmBA,MACI,eACW;AACX,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QA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cesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\n\nexport class Graphql {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} params.query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n query(params: { query: object }): Promise<{}>;\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n query(query: object): Promise<{}>;\n query(\n paramsOrFirst: { query: object } | object \n ): Promise<{}> {\n let params: { query: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { query: object };\n } else {\n params = {\n query: paramsOrFirst as object \n };\n }\n \n const query = params.query;\n\n if (typeof query === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"query\"');\n }\n\n const apiPath = '/graphql';\n const payload: Payload = {};\n if (typeof query !== 'undefined') {\n payload['query'] = query;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'x-sdk-graphql': 'true',\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} params.query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n mutation(params: { query: object }): Promise<{}>;\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n mutation(query: object): Promise<{}>;\n mutation(\n paramsOrFirst: { query: object } | object \n ): Promise<{}> {\n let params: { query: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { query: object };\n } else {\n params = {\n query: paramsOrFirst as object \n };\n }\n \n const query = params.query;\n\n if (typeof query === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"query\"');\n }\n\n const apiPath = '/graphql/mutation';\n const payload: Payload = {};\n if (typeof query !== 'undefined') {\n payload['query'] = query;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'x-sdk-graphql': 'true',\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/services/graphql.ts"],"names":[],"mappings":";AAAA,SAAS,yBAA+D;AAIjE,IAAM,UAAN,MAAc;AAAA,EAGjB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA,EAmBA,MACI,eACW;AACX,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,KAAK,WAAW,eAAgB;AACnH,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,OAAO;AAAA,MACX;AAAA,IACJ;AAEA,UAAM,QAAQ,OAAO;AAErB,QAAI,OAAO,UAAU,aAAa;AAC9B,YAAM,IAAI,kBAAkB,qCAAqC;AAAA,IACrE;AAEA,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA,EAmBA,SACI,eACW;AACX,QAAI;AAEJ,QAAK,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,KAAK,WAAW,eAAgB;AACnH,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAAO;AACH,eAAS;AAAA,QACL,OAAO;AAAA,MACX;AAAA,IACJ;AAEA,UAAM,QAAQ,OAAO;AAErB,QAAI,OAAO,UAAU,aAAa;AAC9B,YAAM,IAAI,kBAAkB,qCAAqC;AAAA,IACrE;AAEA,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,QAAI,OAAO,UAAU,aAAa;AAC9B,cAAQ,OAAO,IAAI;AAAA,IACvB;AACA,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,IACpB;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\n\nexport class Graphql {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} params.query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n query(params: { query: object }): Promise<{}>;\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n query(query: object): Promise<{}>;\n query(\n paramsOrFirst: { query: object } | object \n ): Promise<{}> {\n let params: { query: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { query: object };\n } else {\n params = {\n query: paramsOrFirst as object \n };\n }\n \n const query = params.query;\n\n if (typeof query === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"query\"');\n }\n\n const apiPath = '/graphql';\n const payload: Payload = {};\n if (typeof query !== 'undefined') {\n payload['query'] = query;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'x-sdk-graphql': 'true',\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} params.query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n */\n mutation(params: { query: object }): Promise<{}>;\n /**\n * Execute a GraphQL mutation.\n *\n * @param {object} query - The query or queries to execute.\n * @throws {AppwriteException}\n * @returns {Promise<{}>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n mutation(query: object): Promise<{}>;\n mutation(\n paramsOrFirst: { query: object } | object \n ): Promise<{}> {\n let params: { query: object };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'query' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { query: object };\n } else {\n params = {\n query: paramsOrFirst as object \n };\n }\n \n const query = params.query;\n\n if (typeof query === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"query\"');\n }\n\n const apiPath = '/graphql/mutation';\n const payload: Payload = {};\n if (typeof query !== 'undefined') {\n payload['query'] = query;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'x-sdk-graphql': 'true',\n 'content-type': 'application/json',\n }\n\n return this.client.call(\n 'post',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
@@ -34,9 +34,9 @@ declare class Health {
34
34
  * Check the Appwrite in-memory cache servers are up and connection is successful.
35
35
  *
36
36
  * @throws {AppwriteException}
37
- * @returns {Promise<Models.HealthStatus>}
37
+ * @returns {Promise<Models.HealthStatusList>}
38
38
  */
39
- getCache(): Promise<Models.HealthStatus>;
39
+ getCache(): Promise<Models.HealthStatusList>;
40
40
  /**
41
41
  * Get the SSL certificate for a domain
42
42
  *
@@ -60,16 +60,35 @@ declare class Health {
60
60
  * Check the Appwrite database servers are up and connection is successful.
61
61
  *
62
62
  * @throws {AppwriteException}
63
- * @returns {Promise<Models.HealthStatus>}
63
+ * @returns {Promise<Models.HealthStatusList>}
64
64
  */
65
- getDB(): Promise<Models.HealthStatus>;
65
+ getDB(): Promise<Models.HealthStatusList>;
66
66
  /**
67
67
  * Check the Appwrite pub-sub servers are up and connection is successful.
68
68
  *
69
69
  * @throws {AppwriteException}
70
- * @returns {Promise<Models.HealthStatus>}
70
+ * @returns {Promise<Models.HealthStatusList>}
71
+ */
72
+ getPubSub(): Promise<Models.HealthStatusList>;
73
+ /**
74
+ * Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.
75
+ *
76
+ * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
77
+ * @throws {AppwriteException}
78
+ * @returns {Promise<Models.HealthQueue>}
79
+ */
80
+ getQueueAudits(params?: {
81
+ threshold?: number;
82
+ }): Promise<Models.HealthQueue>;
83
+ /**
84
+ * Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.
85
+ *
86
+ * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
87
+ * @throws {AppwriteException}
88
+ * @returns {Promise<Models.HealthQueue>}
89
+ * @deprecated Use the object parameter style method for a better developer experience.
71
90
  */
72
- getPubSub(): Promise<Models.HealthStatus>;
91
+ getQueueAudits(threshold?: number): Promise<Models.HealthQueue>;
73
92
  /**
74
93
  * Get the number of builds that are waiting to be processed in the Appwrite internal queue server.
75
94
  *
@@ -34,9 +34,9 @@ declare class Health {
34
34
  * Check the Appwrite in-memory cache servers are up and connection is successful.
35
35
  *
36
36
  * @throws {AppwriteException}
37
- * @returns {Promise<Models.HealthStatus>}
37
+ * @returns {Promise<Models.HealthStatusList>}
38
38
  */
39
- getCache(): Promise<Models.HealthStatus>;
39
+ getCache(): Promise<Models.HealthStatusList>;
40
40
  /**
41
41
  * Get the SSL certificate for a domain
42
42
  *
@@ -60,16 +60,35 @@ declare class Health {
60
60
  * Check the Appwrite database servers are up and connection is successful.
61
61
  *
62
62
  * @throws {AppwriteException}
63
- * @returns {Promise<Models.HealthStatus>}
63
+ * @returns {Promise<Models.HealthStatusList>}
64
64
  */
65
- getDB(): Promise<Models.HealthStatus>;
65
+ getDB(): Promise<Models.HealthStatusList>;
66
66
  /**
67
67
  * Check the Appwrite pub-sub servers are up and connection is successful.
68
68
  *
69
69
  * @throws {AppwriteException}
70
- * @returns {Promise<Models.HealthStatus>}
70
+ * @returns {Promise<Models.HealthStatusList>}
71
+ */
72
+ getPubSub(): Promise<Models.HealthStatusList>;
73
+ /**
74
+ * Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.
75
+ *
76
+ * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
77
+ * @throws {AppwriteException}
78
+ * @returns {Promise<Models.HealthQueue>}
79
+ */
80
+ getQueueAudits(params?: {
81
+ threshold?: number;
82
+ }): Promise<Models.HealthQueue>;
83
+ /**
84
+ * Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.
85
+ *
86
+ * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
87
+ * @throws {AppwriteException}
88
+ * @returns {Promise<Models.HealthQueue>}
89
+ * @deprecated Use the object parameter style method for a better developer experience.
71
90
  */
72
- getPubSub(): Promise<Models.HealthStatus>;
91
+ getQueueAudits(threshold?: number): Promise<Models.HealthQueue>;
73
92
  /**
74
93
  * Get the number of builds that are waiting to be processed in the Appwrite internal queue server.
75
94
  *
@@ -46,7 +46,7 @@ class Health {
46
46
  * Check the Appwrite in-memory cache servers are up and connection is successful.
47
47
  *
48
48
  * @throws {AppwriteException}
49
- * @returns {Promise<Models.HealthStatus>}
49
+ * @returns {Promise<Models.HealthStatusList>}
50
50
  */
51
51
  getCache() {
52
52
  const apiPath = "/health/cache";
@@ -88,7 +88,7 @@ class Health {
88
88
  * Check the Appwrite database servers are up and connection is successful.
89
89
  *
90
90
  * @throws {AppwriteException}
91
- * @returns {Promise<Models.HealthStatus>}
91
+ * @returns {Promise<Models.HealthStatusList>}
92
92
  */
93
93
  getDB() {
94
94
  const apiPath = "/health/db";
@@ -106,7 +106,7 @@ class Health {
106
106
  * Check the Appwrite pub-sub servers are up and connection is successful.
107
107
  *
108
108
  * @throws {AppwriteException}
109
- * @returns {Promise<Models.HealthStatus>}
109
+ * @returns {Promise<Models.HealthStatusList>}
110
110
  */
111
111
  getPubSub() {
112
112
  const apiPath = "/health/pubsub";
@@ -120,6 +120,30 @@ class Health {
120
120
  payload
121
121
  );
122
122
  }
123
+ getQueueAudits(paramsOrFirst) {
124
+ let params;
125
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
126
+ params = paramsOrFirst || {};
127
+ } else {
128
+ params = {
129
+ threshold: paramsOrFirst
130
+ };
131
+ }
132
+ const threshold = params.threshold;
133
+ const apiPath = "/health/queue/audits";
134
+ const payload = {};
135
+ if (typeof threshold !== "undefined") {
136
+ payload["threshold"] = threshold;
137
+ }
138
+ const uri = new URL(this.client.config.endpoint + apiPath);
139
+ const apiHeaders = {};
140
+ return this.client.call(
141
+ "get",
142
+ uri,
143
+ apiHeaders,
144
+ payload
145
+ );
146
+ }
123
147
  getQueueBuilds(paramsOrFirst) {
124
148
  let params;
125
149
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/services/health.ts"],"names":[],"mappings":"AAAA,SAAS,yBAA+D;AAKjE,MAAM,OAAO;AAAA,EAGhB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,M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O,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { Name } from '../enums/name';\n\nexport class Health {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Check the Appwrite HTTP server is up and responsive.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n get(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite Antivirus server is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthAntivirus>}\n */\n getAntivirus(): Promise<Models.HealthAntivirus> {\n\n const apiPath = '/health/anti-virus';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite in-memory cache servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getCache(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/cache';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the SSL certificate for a domain\n *\n * @param {string} params.domain - string\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthCertificate>}\n */\n getCertificate(params?: { domain?: string }): Promise<Models.HealthCertificate>;\n /**\n * Get the SSL certificate for a domain\n *\n * @param {string} domain - string\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthCertificate>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getCertificate(domain?: string): Promise<Models.HealthCertificate>;\n getCertificate(\n paramsOrFirst?: { domain?: string } | string \n ): Promise<Models.HealthCertificate> {\n let params: { domain?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { domain?: string };\n } else {\n params = {\n domain: paramsOrFirst as string \n };\n }\n \n const domain = params.domain;\n\n\n const apiPath = '/health/certificate';\n const payload: Payload = {};\n if (typeof domain !== 'undefined') {\n payload['domain'] = domain;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite database servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getDB(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/db';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite pub-sub servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getPubSub(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/pubsub';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of builds that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueBuilds(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of builds that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueBuilds(threshold?: number): Promise<Models.HealthQueue>;\n getQueueBuilds(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/builds';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueCertificates(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueCertificates(threshold?: number): Promise<Models.HealthQueue>;\n getQueueCertificates(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/certificates';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {string} params.name - Queue name for which to check the queue size\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueDatabases(params?: { name?: string, threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {string} name - Queue name for which to check the queue size\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueDatabases(name?: string, threshold?: number): Promise<Models.HealthQueue>;\n getQueueDatabases(\n paramsOrFirst?: { name?: string, threshold?: number } | string,\n ...rest: [(number)?] \n ): Promise<Models.HealthQueue> {\n let params: { name?: string, threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { name?: string, threshold?: number };\n } else {\n params = {\n name: paramsOrFirst as string,\n threshold: rest[0] as number \n };\n }\n \n const name = params.name;\n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/databases';\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueDeletes(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueDeletes(threshold?: number): Promise<Models.HealthQueue>;\n getQueueDeletes(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/deletes';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Returns the amount of failed jobs in a given queue.\n * \n *\n * @param {Name} params.name - The name of the queue\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getFailedJobs(params: { name: Name, threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Returns the amount of failed jobs in a given queue.\n * \n *\n * @param {Name} name - The name of the queue\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFailedJobs(name: Name, threshold?: number): Promise<Models.HealthQueue>;\n getFailedJobs(\n paramsOrFirst: { name: Name, threshold?: number } | Name,\n ...rest: [(number)?] \n ): Promise<Models.HealthQueue> {\n let params: { name: Name, threshold?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'name' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { name: Name, threshold?: number };\n } else {\n params = {\n name: paramsOrFirst as Name,\n threshold: rest[0] as number \n };\n }\n \n const name = params.name;\n const threshold = params.threshold;\n\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/health/queue/failed/{name}'.replace('{name}', name);\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueFunctions(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueFunctions(threshold?: number): Promise<Models.HealthQueue>;\n getQueueFunctions(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/functions';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of logs that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueLogs(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of logs that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueLogs(threshold?: number): Promise<Models.HealthQueue>;\n getQueueLogs(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/logs';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of mails that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMails(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of mails that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueMails(threshold?: number): Promise<Models.HealthQueue>;\n getQueueMails(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/mails';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of messages that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMessaging(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of messages that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueMessaging(threshold?: number): Promise<Models.HealthQueue>;\n getQueueMessaging(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/messaging';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMigrations(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueMigrations(threshold?: number): Promise<Models.HealthQueue>;\n getQueueMigrations(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/migrations';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueStatsResources(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueStatsResources(threshold?: number): Promise<Models.HealthQueue>;\n getQueueStatsResources(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/stats-resources';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueUsage(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueUsage(threshold?: number): Promise<Models.HealthQueue>;\n getQueueUsage(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/stats-usage';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueWebhooks(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueWebhooks(threshold?: number): Promise<Models.HealthQueue>;\n getQueueWebhooks(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/webhooks';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite storage device is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getStorage(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/storage';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite local storage device is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getStorageLocal(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/storage/local';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthTime>}\n */\n getTime(): Promise<Models.HealthTime> {\n\n const apiPath = '/health/time';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/services/health.ts"],"names":[],"mappings":"AAAA,SAAS,yBAA+D;AAKjE,MAAM,OAAO;AAAA,EAGhB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAoC;AAEhC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,eAAgD;AAE5C,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,WAA6C;AAEzC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA,EAmBA,eACI,eACiC;AACjC,QAAI;AAEJ,QAAI,CAAC,iBAAkB,iBAAiB,OAAO,kBAAkB,YAAY,CAAC,MAAM,QAAQ,aAAa,GAAI;AACzG,eAAU,iBAAiB,CAAC;AAAA,IAChC,OAA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AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,aAA2C;AAEvC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,kBAAgD;AAE5C,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,UAAsC;AAElC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { Name } from '../enums/name';\n\nexport class Health {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Check the Appwrite HTTP server is up and responsive.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n get(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite Antivirus server is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthAntivirus>}\n */\n getAntivirus(): Promise<Models.HealthAntivirus> {\n\n const apiPath = '/health/anti-virus';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite in-memory cache servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatusList>}\n */\n getCache(): Promise<Models.HealthStatusList> {\n\n const apiPath = '/health/cache';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the SSL certificate for a domain\n *\n * @param {string} params.domain - string\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthCertificate>}\n */\n getCertificate(params?: { domain?: string }): Promise<Models.HealthCertificate>;\n /**\n * Get the SSL certificate for a domain\n *\n * @param {string} domain - string\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthCertificate>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getCertificate(domain?: string): Promise<Models.HealthCertificate>;\n getCertificate(\n paramsOrFirst?: { domain?: string } | string \n ): Promise<Models.HealthCertificate> {\n let params: { domain?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { domain?: string };\n } else {\n params = {\n domain: paramsOrFirst as string \n };\n }\n \n const domain = params.domain;\n\n\n const apiPath = '/health/certificate';\n const payload: Payload = {};\n if (typeof domain !== 'undefined') {\n payload['domain'] = domain;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite database servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatusList>}\n */\n getDB(): Promise<Models.HealthStatusList> {\n\n const apiPath = '/health/db';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite pub-sub servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatusList>}\n */\n getPubSub(): Promise<Models.HealthStatusList> {\n\n const apiPath = '/health/pubsub';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueAudits(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of audit logs that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueAudits(threshold?: number): Promise<Models.HealthQueue>;\n getQueueAudits(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/audits';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of builds that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueBuilds(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of builds that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueBuilds(threshold?: number): Promise<Models.HealthQueue>;\n getQueueBuilds(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/builds';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueCertificates(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueCertificates(threshold?: number): Promise<Models.HealthQueue>;\n getQueueCertificates(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/certificates';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {string} params.name - Queue name for which to check the queue size\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueDatabases(params?: { name?: string, threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {string} name - Queue name for which to check the queue size\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueDatabases(name?: string, threshold?: number): Promise<Models.HealthQueue>;\n getQueueDatabases(\n paramsOrFirst?: { name?: string, threshold?: number } | string,\n ...rest: [(number)?] \n ): Promise<Models.HealthQueue> {\n let params: { name?: string, threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { name?: string, threshold?: number };\n } else {\n params = {\n name: paramsOrFirst as string,\n threshold: rest[0] as number \n };\n }\n \n const name = params.name;\n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/databases';\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueDeletes(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueDeletes(threshold?: number): Promise<Models.HealthQueue>;\n getQueueDeletes(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/deletes';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Returns the amount of failed jobs in a given queue.\n * \n *\n * @param {Name} params.name - The name of the queue\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getFailedJobs(params: { name: Name, threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Returns the amount of failed jobs in a given queue.\n * \n *\n * @param {Name} name - The name of the queue\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFailedJobs(name: Name, threshold?: number): Promise<Models.HealthQueue>;\n getFailedJobs(\n paramsOrFirst: { name: Name, threshold?: number } | Name,\n ...rest: [(number)?] \n ): Promise<Models.HealthQueue> {\n let params: { name: Name, threshold?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'name' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { name: Name, threshold?: number };\n } else {\n params = {\n name: paramsOrFirst as Name,\n threshold: rest[0] as number \n };\n }\n \n const name = params.name;\n const threshold = params.threshold;\n\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/health/queue/failed/{name}'.replace('{name}', name);\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueFunctions(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueFunctions(threshold?: number): Promise<Models.HealthQueue>;\n getQueueFunctions(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/functions';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of logs that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueLogs(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of logs that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueLogs(threshold?: number): Promise<Models.HealthQueue>;\n getQueueLogs(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/logs';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of mails that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMails(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of mails that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueMails(threshold?: number): Promise<Models.HealthQueue>;\n getQueueMails(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/mails';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of messages that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMessaging(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of messages that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueMessaging(threshold?: number): Promise<Models.HealthQueue>;\n getQueueMessaging(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/messaging';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMigrations(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueMigrations(threshold?: number): Promise<Models.HealthQueue>;\n getQueueMigrations(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/migrations';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueStatsResources(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueStatsResources(threshold?: number): Promise<Models.HealthQueue>;\n getQueueStatsResources(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/stats-resources';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueUsage(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueUsage(threshold?: number): Promise<Models.HealthQueue>;\n getQueueUsage(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/stats-usage';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueWebhooks(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueWebhooks(threshold?: number): Promise<Models.HealthQueue>;\n getQueueWebhooks(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/webhooks';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite storage device is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getStorage(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/storage';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite local storage device is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getStorageLocal(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/storage/local';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthTime>}\n */\n getTime(): Promise<Models.HealthTime> {\n\n const apiPath = '/health/time';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
@@ -45,7 +45,7 @@ var Health = class {
45
45
  * Check the Appwrite in-memory cache servers are up and connection is successful.
46
46
  *
47
47
  * @throws {AppwriteException}
48
- * @returns {Promise<Models.HealthStatus>}
48
+ * @returns {Promise<Models.HealthStatusList>}
49
49
  */
50
50
  getCache() {
51
51
  const apiPath = "/health/cache";
@@ -87,7 +87,7 @@ var Health = class {
87
87
  * Check the Appwrite database servers are up and connection is successful.
88
88
  *
89
89
  * @throws {AppwriteException}
90
- * @returns {Promise<Models.HealthStatus>}
90
+ * @returns {Promise<Models.HealthStatusList>}
91
91
  */
92
92
  getDB() {
93
93
  const apiPath = "/health/db";
@@ -105,7 +105,7 @@ var Health = class {
105
105
  * Check the Appwrite pub-sub servers are up and connection is successful.
106
106
  *
107
107
  * @throws {AppwriteException}
108
- * @returns {Promise<Models.HealthStatus>}
108
+ * @returns {Promise<Models.HealthStatusList>}
109
109
  */
110
110
  getPubSub() {
111
111
  const apiPath = "/health/pubsub";
@@ -119,6 +119,30 @@ var Health = class {
119
119
  payload
120
120
  );
121
121
  }
122
+ getQueueAudits(paramsOrFirst) {
123
+ let params;
124
+ if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
125
+ params = paramsOrFirst || {};
126
+ } else {
127
+ params = {
128
+ threshold: paramsOrFirst
129
+ };
130
+ }
131
+ const threshold = params.threshold;
132
+ const apiPath = "/health/queue/audits";
133
+ const payload = {};
134
+ if (typeof threshold !== "undefined") {
135
+ payload["threshold"] = threshold;
136
+ }
137
+ const uri = new URL(this.client.config.endpoint + apiPath);
138
+ const apiHeaders = {};
139
+ return this.client.call(
140
+ "get",
141
+ uri,
142
+ apiHeaders,
143
+ payload
144
+ );
145
+ }
122
146
  getQueueBuilds(paramsOrFirst) {
123
147
  let params;
124
148
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {