node-appwrite 20.1.0 → 20.3.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 (95) hide show
  1. package/dist/client.js +2 -2
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.mjs +2 -2
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/enums/execution-status.d.mts +2 -1
  6. package/dist/enums/execution-status.d.ts +2 -1
  7. package/dist/enums/execution-status.js +1 -0
  8. package/dist/enums/execution-status.js.map +1 -1
  9. package/dist/enums/execution-status.mjs +1 -0
  10. package/dist/enums/execution-status.mjs.map +1 -1
  11. package/dist/enums/framework.d.mts +1 -0
  12. package/dist/enums/framework.d.ts +1 -0
  13. package/dist/enums/framework.js +1 -0
  14. package/dist/enums/framework.js.map +1 -1
  15. package/dist/enums/framework.mjs +1 -0
  16. package/dist/enums/framework.mjs.map +1 -1
  17. package/dist/index.d.mts +1 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +9 -0
  20. package/dist/index.js.map +1 -1
  21. package/dist/index.mjs +1 -0
  22. package/dist/index.mjs.map +1 -1
  23. package/dist/models.d.mts +43 -1
  24. package/dist/models.d.ts +43 -1
  25. package/dist/operator.d.mts +181 -0
  26. package/dist/operator.d.ts +181 -0
  27. package/dist/operator.js +268 -0
  28. package/dist/operator.js.map +1 -0
  29. package/dist/operator.mjs +266 -0
  30. package/dist/operator.mjs.map +1 -0
  31. package/dist/query.js +6 -6
  32. package/dist/query.js.map +1 -1
  33. package/dist/query.mjs +6 -6
  34. package/dist/query.mjs.map +1 -1
  35. package/dist/services/account.d.mts +8 -2
  36. package/dist/services/account.d.ts +8 -2
  37. package/dist/services/account.js +14 -4
  38. package/dist/services/account.js.map +1 -1
  39. package/dist/services/account.mjs +14 -4
  40. package/dist/services/account.mjs.map +1 -1
  41. package/dist/services/databases.d.mts +192 -18
  42. package/dist/services/databases.d.ts +192 -18
  43. package/dist/services/databases.js +268 -16
  44. package/dist/services/databases.js.map +1 -1
  45. package/dist/services/databases.mjs +268 -16
  46. package/dist/services/databases.mjs.map +1 -1
  47. package/dist/services/functions.d.mts +12 -3
  48. package/dist/services/functions.d.ts +12 -3
  49. package/dist/services/functions.js +18 -3
  50. package/dist/services/functions.js.map +1 -1
  51. package/dist/services/functions.mjs +18 -3
  52. package/dist/services/functions.mjs.map +1 -1
  53. package/dist/services/messaging.d.mts +116 -9
  54. package/dist/services/messaging.d.ts +116 -9
  55. package/dist/services/messaging.js +182 -9
  56. package/dist/services/messaging.js.map +1 -1
  57. package/dist/services/messaging.mjs +182 -9
  58. package/dist/services/messaging.mjs.map +1 -1
  59. package/dist/services/sites.d.mts +12 -3
  60. package/dist/services/sites.d.ts +12 -3
  61. package/dist/services/sites.js +18 -3
  62. package/dist/services/sites.js.map +1 -1
  63. package/dist/services/sites.mjs +18 -3
  64. package/dist/services/sites.mjs.map +1 -1
  65. package/dist/services/storage.d.mts +8 -2
  66. package/dist/services/storage.d.ts +8 -2
  67. package/dist/services/storage.js +12 -2
  68. package/dist/services/storage.js.map +1 -1
  69. package/dist/services/storage.mjs +12 -2
  70. package/dist/services/storage.mjs.map +1 -1
  71. package/dist/services/tables-db.d.mts +190 -16
  72. package/dist/services/tables-db.d.ts +190 -16
  73. package/dist/services/tables-db.js +268 -16
  74. package/dist/services/tables-db.js.map +1 -1
  75. package/dist/services/tables-db.mjs +268 -16
  76. package/dist/services/tables-db.mjs.map +1 -1
  77. package/dist/services/teams.d.mts +8 -2
  78. package/dist/services/teams.d.ts +8 -2
  79. package/dist/services/teams.js +12 -2
  80. package/dist/services/teams.js.map +1 -1
  81. package/dist/services/teams.mjs +12 -2
  82. package/dist/services/teams.mjs.map +1 -1
  83. package/dist/services/tokens.d.mts +4 -1
  84. package/dist/services/tokens.d.ts +4 -1
  85. package/dist/services/tokens.js +6 -1
  86. package/dist/services/tokens.js.map +1 -1
  87. package/dist/services/tokens.mjs +6 -1
  88. package/dist/services/tokens.mjs.map +1 -1
  89. package/dist/services/users.d.mts +24 -6
  90. package/dist/services/users.d.ts +24 -6
  91. package/dist/services/users.js +37 -7
  92. package/dist/services/users.js.map +1 -1
  93. package/dist/services/users.mjs +37 -7
  94. package/dist/services/users.mjs.map +1 -1
  95. package/package.json +1 -1
@@ -83,21 +83,24 @@ declare class Account {
83
83
  * Get the list of identities for the currently logged in user.
84
84
  *
85
85
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
86
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
86
87
  * @throws {AppwriteException}
87
88
  * @returns {Promise<Models.IdentityList>}
88
89
  */
89
90
  listIdentities(params?: {
90
91
  queries?: string[];
92
+ total?: boolean;
91
93
  }): Promise<Models.IdentityList>;
92
94
  /**
93
95
  * Get the list of identities for the currently logged in user.
94
96
  *
95
97
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
98
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
96
99
  * @throws {AppwriteException}
97
100
  * @returns {Promise<Models.IdentityList>}
98
101
  * @deprecated Use the object parameter style method for a better developer experience.
99
102
  */
100
- listIdentities(queries?: string[]): Promise<Models.IdentityList>;
103
+ listIdentities(queries?: string[], total?: boolean): Promise<Models.IdentityList>;
101
104
  /**
102
105
  * Delete an identity by its unique ID.
103
106
  *
@@ -128,21 +131,24 @@ declare class Account {
128
131
  * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
129
132
  *
130
133
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
134
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
131
135
  * @throws {AppwriteException}
132
136
  * @returns {Promise<Models.LogList>}
133
137
  */
134
138
  listLogs(params?: {
135
139
  queries?: string[];
140
+ total?: boolean;
136
141
  }): Promise<Models.LogList>;
137
142
  /**
138
143
  * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
139
144
  *
140
145
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
146
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
141
147
  * @throws {AppwriteException}
142
148
  * @returns {Promise<Models.LogList>}
143
149
  * @deprecated Use the object parameter style method for a better developer experience.
144
150
  */
145
- listLogs(queries?: string[]): Promise<Models.LogList>;
151
+ listLogs(queries?: string[], total?: boolean): Promise<Models.LogList>;
146
152
  /**
147
153
  * Enable or disable MFA on an account.
148
154
  *
@@ -83,21 +83,24 @@ declare class Account {
83
83
  * Get the list of identities for the currently logged in user.
84
84
  *
85
85
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
86
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
86
87
  * @throws {AppwriteException}
87
88
  * @returns {Promise<Models.IdentityList>}
88
89
  */
89
90
  listIdentities(params?: {
90
91
  queries?: string[];
92
+ total?: boolean;
91
93
  }): Promise<Models.IdentityList>;
92
94
  /**
93
95
  * Get the list of identities for the currently logged in user.
94
96
  *
95
97
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, provider, providerUid, providerEmail, providerAccessTokenExpiry
98
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
96
99
  * @throws {AppwriteException}
97
100
  * @returns {Promise<Models.IdentityList>}
98
101
  * @deprecated Use the object parameter style method for a better developer experience.
99
102
  */
100
- listIdentities(queries?: string[]): Promise<Models.IdentityList>;
103
+ listIdentities(queries?: string[], total?: boolean): Promise<Models.IdentityList>;
101
104
  /**
102
105
  * Delete an identity by its unique ID.
103
106
  *
@@ -128,21 +131,24 @@ declare class Account {
128
131
  * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
129
132
  *
130
133
  * @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
134
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
131
135
  * @throws {AppwriteException}
132
136
  * @returns {Promise<Models.LogList>}
133
137
  */
134
138
  listLogs(params?: {
135
139
  queries?: string[];
140
+ total?: boolean;
136
141
  }): Promise<Models.LogList>;
137
142
  /**
138
143
  * Get the list of latest security activity logs for the currently logged in user. Each log returns user IP address, location and date and time of log.
139
144
  *
140
145
  * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
146
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
141
147
  * @throws {AppwriteException}
142
148
  * @returns {Promise<Models.LogList>}
143
149
  * @deprecated Use the object parameter style method for a better developer experience.
144
150
  */
145
- listLogs(queries?: string[]): Promise<Models.LogList>;
151
+ listLogs(queries?: string[], total?: boolean): Promise<Models.LogList>;
146
152
  /**
147
153
  * Enable or disable MFA on an account.
148
154
  *
@@ -111,21 +111,26 @@ class Account {
111
111
  payload
112
112
  );
113
113
  }
114
- listIdentities(paramsOrFirst) {
114
+ listIdentities(paramsOrFirst, ...rest) {
115
115
  let params;
116
116
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
117
117
  params = paramsOrFirst || {};
118
118
  } else {
119
119
  params = {
120
- queries: paramsOrFirst
120
+ queries: paramsOrFirst,
121
+ total: rest[0]
121
122
  };
122
123
  }
123
124
  const queries = params.queries;
125
+ const total = params.total;
124
126
  const apiPath = "/account/identities";
125
127
  const payload = {};
126
128
  if (typeof queries !== "undefined") {
127
129
  payload["queries"] = queries;
128
130
  }
131
+ if (typeof total !== "undefined") {
132
+ payload["total"] = total;
133
+ }
129
134
  const uri = new URL(this.client.config.endpoint + apiPath);
130
135
  const apiHeaders = {};
131
136
  return this.client.call(
@@ -181,21 +186,26 @@ class Account {
181
186
  payload
182
187
  );
183
188
  }
184
- listLogs(paramsOrFirst) {
189
+ listLogs(paramsOrFirst, ...rest) {
185
190
  let params;
186
191
  if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
187
192
  params = paramsOrFirst || {};
188
193
  } else {
189
194
  params = {
190
- queries: paramsOrFirst
195
+ queries: paramsOrFirst,
196
+ total: rest[0]
191
197
  };
192
198
  }
193
199
  const queries = params.queries;
200
+ const total = params.total;
194
201
  const apiPath = "/account/logs";
195
202
  const payload = {};
196
203
  if (typeof queries !== "undefined") {
197
204
  payload["queries"] = queries;
198
205
  }
206
+ if (typeof total !== "undefined") {
207
+ payload["total"] = total;
208
+ }
199
209
  const uri = new URL(this.client.config.endpoint + apiPath);
200
210
  const apiHeaders = {};
201
211
  return this.client.call(