node-appwrite 14.0.0 → 14.2.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 (76) hide show
  1. package/README.md +1 -1
  2. package/dist/client.d.mts +1 -0
  3. package/dist/client.d.ts +1 -0
  4. package/dist/client.js +5 -2
  5. package/dist/client.js.map +1 -1
  6. package/dist/client.mjs +5 -2
  7. package/dist/client.mjs.map +1 -1
  8. package/dist/enums/image-format.d.mts +2 -1
  9. package/dist/enums/image-format.d.ts +2 -1
  10. package/dist/enums/image-format.js +1 -0
  11. package/dist/enums/image-format.js.map +1 -1
  12. package/dist/enums/image-format.mjs +1 -0
  13. package/dist/enums/image-format.mjs.map +1 -1
  14. package/dist/enums/message-priority.d.mts +6 -0
  15. package/dist/enums/message-priority.d.ts +6 -0
  16. package/dist/enums/message-priority.js +11 -0
  17. package/dist/enums/message-priority.js.map +1 -0
  18. package/dist/enums/message-priority.mjs +10 -0
  19. package/dist/enums/message-priority.mjs.map +1 -0
  20. package/dist/enums/runtime.d.mts +15 -2
  21. package/dist/enums/runtime.d.ts +15 -2
  22. package/dist/enums/runtime.js +14 -1
  23. package/dist/enums/runtime.js.map +1 -1
  24. package/dist/enums/runtime.mjs +14 -1
  25. package/dist/enums/runtime.mjs.map +1 -1
  26. package/dist/index.d.mts +1 -0
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.js +5 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/index.mjs +1 -0
  31. package/dist/index.mjs.map +1 -1
  32. package/dist/models.d.mts +96 -4
  33. package/dist/models.d.ts +96 -4
  34. package/dist/services/account.d.mts +11 -11
  35. package/dist/services/account.d.ts +11 -11
  36. package/dist/services/account.js +11 -11
  37. package/dist/services/account.js.map +1 -1
  38. package/dist/services/account.mjs +11 -11
  39. package/dist/services/account.mjs.map +1 -1
  40. package/dist/services/databases.d.mts +21 -10
  41. package/dist/services/databases.d.ts +21 -10
  42. package/dist/services/databases.js +54 -10
  43. package/dist/services/databases.js.map +1 -1
  44. package/dist/services/databases.mjs +54 -10
  45. package/dist/services/databases.mjs.map +1 -1
  46. package/dist/services/locale.d.mts +1 -1
  47. package/dist/services/locale.d.ts +1 -1
  48. package/dist/services/locale.js +1 -1
  49. package/dist/services/locale.js.map +1 -1
  50. package/dist/services/locale.mjs +1 -1
  51. package/dist/services/locale.mjs.map +1 -1
  52. package/dist/services/messaging.d.mts +10 -3
  53. package/dist/services/messaging.d.ts +10 -3
  54. package/dist/services/messaging.js +27 -9
  55. package/dist/services/messaging.js.map +1 -1
  56. package/dist/services/messaging.mjs +27 -9
  57. package/dist/services/messaging.mjs.map +1 -1
  58. package/dist/services/storage.d.mts +1 -1
  59. package/dist/services/storage.d.ts +1 -1
  60. package/dist/services/storage.js +1 -1
  61. package/dist/services/storage.js.map +1 -1
  62. package/dist/services/storage.mjs +1 -1
  63. package/dist/services/storage.mjs.map +1 -1
  64. package/dist/services/teams.d.mts +2 -2
  65. package/dist/services/teams.d.ts +2 -2
  66. package/dist/services/teams.js +2 -2
  67. package/dist/services/teams.js.map +1 -1
  68. package/dist/services/teams.mjs +2 -2
  69. package/dist/services/teams.mjs.map +1 -1
  70. package/dist/services/users.d.mts +10 -10
  71. package/dist/services/users.d.ts +10 -10
  72. package/dist/services/users.js +10 -10
  73. package/dist/services/users.js.map +1 -1
  74. package/dist/services/users.mjs +10 -10
  75. package/dist/services/users.mjs.map +1 -1
  76. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/services/locale.ts"],"names":[],"mappings":"AAGO,MAAM,OAAO;AAAA,EAGhB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAM,MAA8B;AAChC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;A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ACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nexport class Locale {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get user locale\n *\n * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.Locale>}\n */\n async get(): Promise<Models.Locale> {\n const apiPath = '/locale';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List Locale Codes\n *\n * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LocaleCodeList>}\n */\n async listCodes(): Promise<Models.LocaleCodeList> {\n const apiPath = '/locale/codes';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List continents\n *\n * List of all continents. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.ContinentList>}\n */\n async listContinents(): Promise<Models.ContinentList> {\n const apiPath = '/locale/continents';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries\n *\n * List of all countries. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountries(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List EU countries\n *\n * List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountriesEU(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries/eu';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries phone codes\n *\n * List of all countries phone codes. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.PhoneList>}\n */\n async listCountriesPhones(): Promise<Models.PhoneList> {\n const apiPath = '/locale/countries/phones';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List currencies\n *\n * List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CurrencyList>}\n */\n async listCurrencies(): Promise<Models.CurrencyList> {\n const apiPath = '/locale/currencies';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List languages\n *\n * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LanguageList>}\n */\n async listLanguages(): Promise<Models.LanguageList> {\n const apiPath = '/locale/languages';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/services/locale.ts"],"names":[],"mappings":"AAGO,MAAM,OAAO;AAAA,EAGhB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAM,MAA8B;AAChC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,MAAM,KAAK,OAAO;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,YAA4C;AAC9C,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,MAAM,KAAK,OAAO;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,iBAAgD;AAClD,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,MAAM,K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,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,MAAM,KAAK,OAAO;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,gBAA8C;AAChD,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,MAAM,KAAK,OAAO;AAAA,MACrB;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\nexport class Locale {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get user locale\n *\n * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.Locale>}\n */\n async get(): Promise<Models.Locale> {\n const apiPath = '/locale';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List locale codes\n *\n * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LocaleCodeList>}\n */\n async listCodes(): Promise<Models.LocaleCodeList> {\n const apiPath = '/locale/codes';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List continents\n *\n * List of all continents. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.ContinentList>}\n */\n async listContinents(): Promise<Models.ContinentList> {\n const apiPath = '/locale/continents';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries\n *\n * List of all countries. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountries(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List EU countries\n *\n * List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountriesEU(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries/eu';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries phone codes\n *\n * List of all countries phone codes. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.PhoneList>}\n */\n async listCountriesPhones(): Promise<Models.PhoneList> {\n const apiPath = '/locale/countries/phones';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List currencies\n *\n * List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CurrencyList>}\n */\n async listCurrencies(): Promise<Models.CurrencyList> {\n const apiPath = '/locale/currencies';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List languages\n *\n * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LanguageList>}\n */\n async listLanguages(): Promise<Models.LanguageList> {\n const apiPath = '/locale/languages';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
@@ -28,7 +28,7 @@ var Locale = class {
28
28
  );
29
29
  }
30
30
  /**
31
- * List Locale Codes
31
+ * List locale codes
32
32
  *
33
33
  * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
34
34
  *
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/services/locale.ts"],"names":[],"mappings":";AAGO,IAAM,SAAN,MAAa;AAAA,EAGhB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAM,MAA8B;AAChC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;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client';\nimport type { Models } from '../models';\n\nexport class Locale {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get user locale\n *\n * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.Locale>}\n */\n async get(): Promise<Models.Locale> {\n const apiPath = '/locale';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List Locale Codes\n *\n * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LocaleCodeList>}\n */\n async listCodes(): Promise<Models.LocaleCodeList> {\n const apiPath = '/locale/codes';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List continents\n *\n * List of all continents. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.ContinentList>}\n */\n async listContinents(): Promise<Models.ContinentList> {\n const apiPath = '/locale/continents';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries\n *\n * List of all countries. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountries(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List EU countries\n *\n * List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountriesEU(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries/eu';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries phone codes\n *\n * List of all countries phone codes. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.PhoneList>}\n */\n async listCountriesPhones(): Promise<Models.PhoneList> {\n const apiPath = '/locale/countries/phones';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List currencies\n *\n * List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CurrencyList>}\n */\n async listCurrencies(): Promise<Models.CurrencyList> {\n const apiPath = '/locale/currencies';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List languages\n *\n * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LanguageList>}\n */\n async listLanguages(): Promise<Models.LanguageList> {\n const apiPath = '/locale/languages';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
1
+ {"version":3,"sources":["../../src/services/locale.ts"],"names":[],"mappings":";AAGO,IAAM,SAAN,MAAa;AAAA,EAGhB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYA,MAAM,MAA8B;AAChC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,MAAM,KAAK,OAAO;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,YAA4C;AAC9C,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,MAAM,KAAK,OAAO;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,iBAAgD;AAClD,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,MAAM,KAAK,OAAO;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AA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AC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,MAAM,KAAK,OAAO;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAM,gBAA8C;AAChD,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C;AAAA,MAC7C,gBAAgB;AAAA,IACpB;AAEA,WAAO,MAAM,KAAK,OAAO;AAAA,MACrB;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\nexport class Locale {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Get user locale\n *\n * Get the current user location based on IP. Returns an object with user country code, country name, continent name, continent code, ip address and suggested currency. You can use the locale header to get the data in a supported language.\n\n([IP Geolocation by DB-IP](https://db-ip.com))\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.Locale>}\n */\n async get(): Promise<Models.Locale> {\n const apiPath = '/locale';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List locale codes\n *\n * List of all locale codes in [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LocaleCodeList>}\n */\n async listCodes(): Promise<Models.LocaleCodeList> {\n const apiPath = '/locale/codes';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List continents\n *\n * List of all continents. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.ContinentList>}\n */\n async listContinents(): Promise<Models.ContinentList> {\n const apiPath = '/locale/continents';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries\n *\n * List of all countries. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountries(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List EU countries\n *\n * List of all countries that are currently members of the EU. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CountryList>}\n */\n async listCountriesEU(): Promise<Models.CountryList> {\n const apiPath = '/locale/countries/eu';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List countries phone codes\n *\n * List of all countries phone codes. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.PhoneList>}\n */\n async listCountriesPhones(): Promise<Models.PhoneList> {\n const apiPath = '/locale/countries/phones';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List currencies\n *\n * List of all currencies, including currency symbol, name, plural, and decimal digits for all major and minor currencies. You can use the locale header to get the data in a supported language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.CurrencyList>}\n */\n async listCurrencies(): Promise<Models.CurrencyList> {\n const apiPath = '/locale/currencies';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n /**\n * List languages\n *\n * List of all languages classified by ISO 639-1 including 2-letter code, name in English, and name in the respective language.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.LanguageList>}\n */\n async listLanguages(): Promise<Models.LanguageList> {\n const apiPath = '/locale/languages';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n 'content-type': 'application/json',\n }\n\n return await this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
@@ -1,5 +1,6 @@
1
1
  import { Client } from '../client.mjs';
2
2
  import { Models } from '../models.mjs';
3
+ import { MessagePriority } from '../enums/message-priority.mjs';
3
4
  import { SmtpEncryption } from '../enums/smtp-encryption.mjs';
4
5
  import '../query.mjs';
5
6
 
@@ -78,13 +79,16 @@ declare class Messaging {
78
79
  * @param {string} sound
79
80
  * @param {string} color
80
81
  * @param {string} tag
81
- * @param {string} badge
82
+ * @param {number} badge
82
83
  * @param {boolean} draft
83
84
  * @param {string} scheduledAt
85
+ * @param {boolean} contentAvailable
86
+ * @param {boolean} critical
87
+ * @param {MessagePriority} priority
84
88
  * @throws {AppwriteException}
85
89
  * @returns {Promise<Models.Message>}
86
90
  */
87
- createPush(messageId: string, title: string, body: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
91
+ createPush(messageId: string, title?: string, body?: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
88
92
  /**
89
93
  * Update push notification
90
94
  *
@@ -107,10 +111,13 @@ declare class Messaging {
107
111
  * @param {number} badge
108
112
  * @param {boolean} draft
109
113
  * @param {string} scheduledAt
114
+ * @param {boolean} contentAvailable
115
+ * @param {boolean} critical
116
+ * @param {MessagePriority} priority
110
117
  * @throws {AppwriteException}
111
118
  * @returns {Promise<Models.Message>}
112
119
  */
113
- updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
120
+ updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
114
121
  /**
115
122
  * Create SMS
116
123
  *
@@ -1,5 +1,6 @@
1
1
  import { Client } from '../client.js';
2
2
  import { Models } from '../models.js';
3
+ import { MessagePriority } from '../enums/message-priority.js';
3
4
  import { SmtpEncryption } from '../enums/smtp-encryption.js';
4
5
  import '../query.js';
5
6
 
@@ -78,13 +79,16 @@ declare class Messaging {
78
79
  * @param {string} sound
79
80
  * @param {string} color
80
81
  * @param {string} tag
81
- * @param {string} badge
82
+ * @param {number} badge
82
83
  * @param {boolean} draft
83
84
  * @param {string} scheduledAt
85
+ * @param {boolean} contentAvailable
86
+ * @param {boolean} critical
87
+ * @param {MessagePriority} priority
84
88
  * @throws {AppwriteException}
85
89
  * @returns {Promise<Models.Message>}
86
90
  */
87
- createPush(messageId: string, title: string, body: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: string, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
91
+ createPush(messageId: string, title?: string, body?: string, topics?: string[], users?: string[], targets?: string[], data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
88
92
  /**
89
93
  * Update push notification
90
94
  *
@@ -107,10 +111,13 @@ declare class Messaging {
107
111
  * @param {number} badge
108
112
  * @param {boolean} draft
109
113
  * @param {string} scheduledAt
114
+ * @param {boolean} contentAvailable
115
+ * @param {boolean} critical
116
+ * @param {MessagePriority} priority
110
117
  * @throws {AppwriteException}
111
118
  * @returns {Promise<Models.Message>}
112
119
  */
113
- updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string): Promise<Models.Message>;
120
+ updatePush(messageId: string, topics?: string[], users?: string[], targets?: string[], title?: string, body?: string, data?: object, action?: string, image?: string, icon?: string, sound?: string, color?: string, tag?: string, badge?: number, draft?: boolean, scheduledAt?: string, contentAvailable?: boolean, critical?: boolean, priority?: MessagePriority): Promise<Models.Message>;
114
121
  /**
115
122
  * Create SMS
116
123
  *
@@ -204,22 +204,19 @@ class Messaging {
204
204
  * @param {string} sound
205
205
  * @param {string} color
206
206
  * @param {string} tag
207
- * @param {string} badge
207
+ * @param {number} badge
208
208
  * @param {boolean} draft
209
209
  * @param {string} scheduledAt
210
+ * @param {boolean} contentAvailable
211
+ * @param {boolean} critical
212
+ * @param {MessagePriority} priority
210
213
  * @throws {AppwriteException}
211
214
  * @returns {Promise<Models.Message>}
212
215
  */
213
- async createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
216
+ async createPush(messageId, title, body, topics, users, targets, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority) {
214
217
  if (typeof messageId === "undefined") {
215
218
  throw new client.AppwriteException('Missing required parameter: "messageId"');
216
219
  }
217
- if (typeof title === "undefined") {
218
- throw new client.AppwriteException('Missing required parameter: "title"');
219
- }
220
- if (typeof body === "undefined") {
221
- throw new client.AppwriteException('Missing required parameter: "body"');
222
- }
223
220
  const apiPath = "/messaging/messages/push";
224
221
  const payload = {};
225
222
  if (typeof messageId !== "undefined") {
@@ -270,6 +267,15 @@ class Messaging {
270
267
  if (typeof scheduledAt !== "undefined") {
271
268
  payload["scheduledAt"] = scheduledAt;
272
269
  }
270
+ if (typeof contentAvailable !== "undefined") {
271
+ payload["contentAvailable"] = contentAvailable;
272
+ }
273
+ if (typeof critical !== "undefined") {
274
+ payload["critical"] = critical;
275
+ }
276
+ if (typeof priority !== "undefined") {
277
+ payload["priority"] = priority;
278
+ }
273
279
  const uri = new URL(this.client.config.endpoint + apiPath);
274
280
  const apiHeaders = {
275
281
  "content-type": "application/json"
@@ -303,10 +309,13 @@ class Messaging {
303
309
  * @param {number} badge
304
310
  * @param {boolean} draft
305
311
  * @param {string} scheduledAt
312
+ * @param {boolean} contentAvailable
313
+ * @param {boolean} critical
314
+ * @param {MessagePriority} priority
306
315
  * @throws {AppwriteException}
307
316
  * @returns {Promise<Models.Message>}
308
317
  */
309
- async updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt) {
318
+ async updatePush(messageId, topics, users, targets, title, body, data, action, image, icon, sound, color, tag, badge, draft, scheduledAt, contentAvailable, critical, priority) {
310
319
  if (typeof messageId === "undefined") {
311
320
  throw new client.AppwriteException('Missing required parameter: "messageId"');
312
321
  }
@@ -357,6 +366,15 @@ class Messaging {
357
366
  if (typeof scheduledAt !== "undefined") {
358
367
  payload["scheduledAt"] = scheduledAt;
359
368
  }
369
+ if (typeof contentAvailable !== "undefined") {
370
+ payload["contentAvailable"] = contentAvailable;
371
+ }
372
+ if (typeof critical !== "undefined") {
373
+ payload["critical"] = critical;
374
+ }
375
+ if (typeof priority !== "undefined") {
376
+ payload["priority"] = priority;
377
+ }
360
378
  const uri = new URL(this.client.config.endpoint + apiPath);
361
379
  const apiHeaders = {
362
380
  "content-type": "application/json"