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.
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -2
- package/dist/client.mjs.map +1 -1
- package/dist/enums/execution-status.d.mts +2 -1
- package/dist/enums/execution-status.d.ts +2 -1
- package/dist/enums/execution-status.js +1 -0
- package/dist/enums/execution-status.js.map +1 -1
- package/dist/enums/execution-status.mjs +1 -0
- package/dist/enums/execution-status.mjs.map +1 -1
- package/dist/enums/framework.d.mts +1 -0
- package/dist/enums/framework.d.ts +1 -0
- package/dist/enums/framework.js +1 -0
- package/dist/enums/framework.js.map +1 -1
- package/dist/enums/framework.mjs +1 -0
- package/dist/enums/framework.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +43 -1
- package/dist/models.d.ts +43 -1
- package/dist/operator.d.mts +181 -0
- package/dist/operator.d.ts +181 -0
- package/dist/operator.js +268 -0
- package/dist/operator.js.map +1 -0
- package/dist/operator.mjs +266 -0
- package/dist/operator.mjs.map +1 -0
- package/dist/query.js +6 -6
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +6 -6
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.d.mts +8 -2
- package/dist/services/account.d.ts +8 -2
- package/dist/services/account.js +14 -4
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +14 -4
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/databases.d.mts +192 -18
- package/dist/services/databases.d.ts +192 -18
- package/dist/services/databases.js +268 -16
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +268 -16
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +12 -3
- package/dist/services/functions.d.ts +12 -3
- package/dist/services/functions.js +18 -3
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +18 -3
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/messaging.d.mts +116 -9
- package/dist/services/messaging.d.ts +116 -9
- package/dist/services/messaging.js +182 -9
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +182 -9
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/sites.d.mts +12 -3
- package/dist/services/sites.d.ts +12 -3
- package/dist/services/sites.js +18 -3
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +18 -3
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +8 -2
- package/dist/services/storage.d.ts +8 -2
- package/dist/services/storage.js +12 -2
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +12 -2
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +190 -16
- package/dist/services/tables-db.d.ts +190 -16
- package/dist/services/tables-db.js +268 -16
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +268 -16
- package/dist/services/tables-db.mjs.map +1 -1
- package/dist/services/teams.d.mts +8 -2
- package/dist/services/teams.d.ts +8 -2
- package/dist/services/teams.js +12 -2
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +12 -2
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/tokens.d.mts +4 -1
- package/dist/services/tokens.d.ts +4 -1
- package/dist/services/tokens.js +6 -1
- package/dist/services/tokens.js.map +1 -1
- package/dist/services/tokens.mjs +6 -1
- package/dist/services/tokens.mjs.map +1 -1
- package/dist/services/users.d.mts +24 -6
- package/dist/services/users.d.ts +24 -6
- package/dist/services/users.js +37 -7
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +37 -7
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -23,23 +23,26 @@ declare class Users {
|
|
|
23
23
|
*
|
|
24
24
|
* @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: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels
|
|
25
25
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
26
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
26
27
|
* @throws {AppwriteException}
|
|
27
28
|
* @returns {Promise<Models.UserList<Preferences>>}
|
|
28
29
|
*/
|
|
29
30
|
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: {
|
|
30
31
|
queries?: string[];
|
|
31
32
|
search?: string;
|
|
33
|
+
total?: boolean;
|
|
32
34
|
}): Promise<Models.UserList<Preferences>>;
|
|
33
35
|
/**
|
|
34
36
|
* Get a list of all the project's users. You can use the query params to filter your results.
|
|
35
37
|
*
|
|
36
38
|
* @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: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels
|
|
37
39
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
40
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
38
41
|
* @throws {AppwriteException}
|
|
39
42
|
* @returns {Promise<Models.UserList<Preferences>>}
|
|
40
43
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
41
44
|
*/
|
|
42
|
-
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>>;
|
|
45
|
+
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string, total?: boolean): Promise<Models.UserList<Preferences>>;
|
|
43
46
|
/**
|
|
44
47
|
* Create a new user.
|
|
45
48
|
*
|
|
@@ -132,23 +135,26 @@ declare class Users {
|
|
|
132
135
|
*
|
|
133
136
|
* @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
|
|
134
137
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
138
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
135
139
|
* @throws {AppwriteException}
|
|
136
140
|
* @returns {Promise<Models.IdentityList>}
|
|
137
141
|
*/
|
|
138
142
|
listIdentities(params?: {
|
|
139
143
|
queries?: string[];
|
|
140
144
|
search?: string;
|
|
145
|
+
total?: boolean;
|
|
141
146
|
}): Promise<Models.IdentityList>;
|
|
142
147
|
/**
|
|
143
148
|
* Get identities for all users.
|
|
144
149
|
*
|
|
145
150
|
* @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
|
|
146
151
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
152
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
147
153
|
* @throws {AppwriteException}
|
|
148
154
|
* @returns {Promise<Models.IdentityList>}
|
|
149
155
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
150
156
|
*/
|
|
151
|
-
listIdentities(queries?: string[], search?: string): Promise<Models.IdentityList>;
|
|
157
|
+
listIdentities(queries?: string[], search?: string, total?: boolean): Promise<Models.IdentityList>;
|
|
152
158
|
/**
|
|
153
159
|
* Delete an identity by its unique ID.
|
|
154
160
|
*
|
|
@@ -451,29 +457,33 @@ declare class Users {
|
|
|
451
457
|
*
|
|
452
458
|
* @param {string} params.userId - User ID.
|
|
453
459
|
* @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
|
|
460
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
454
461
|
* @throws {AppwriteException}
|
|
455
462
|
* @returns {Promise<Models.LogList>}
|
|
456
463
|
*/
|
|
457
464
|
listLogs(params: {
|
|
458
465
|
userId: string;
|
|
459
466
|
queries?: string[];
|
|
467
|
+
total?: boolean;
|
|
460
468
|
}): Promise<Models.LogList>;
|
|
461
469
|
/**
|
|
462
470
|
* Get the user activity logs list by its unique ID.
|
|
463
471
|
*
|
|
464
472
|
* @param {string} userId - User ID.
|
|
465
473
|
* @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
|
|
474
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
466
475
|
* @throws {AppwriteException}
|
|
467
476
|
* @returns {Promise<Models.LogList>}
|
|
468
477
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
469
478
|
*/
|
|
470
|
-
listLogs(userId: string, queries?: string[]): Promise<Models.LogList>;
|
|
479
|
+
listLogs(userId: string, queries?: string[], total?: boolean): Promise<Models.LogList>;
|
|
471
480
|
/**
|
|
472
481
|
* Get the user membership list by its unique ID.
|
|
473
482
|
*
|
|
474
483
|
* @param {string} params.userId - User ID.
|
|
475
484
|
* @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, teamId, invited, joined, confirm, roles
|
|
476
485
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
486
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
477
487
|
* @throws {AppwriteException}
|
|
478
488
|
* @returns {Promise<Models.MembershipList>}
|
|
479
489
|
*/
|
|
@@ -481,6 +491,7 @@ declare class Users {
|
|
|
481
491
|
userId: string;
|
|
482
492
|
queries?: string[];
|
|
483
493
|
search?: string;
|
|
494
|
+
total?: boolean;
|
|
484
495
|
}): Promise<Models.MembershipList>;
|
|
485
496
|
/**
|
|
486
497
|
* Get the user membership list by its unique ID.
|
|
@@ -488,11 +499,12 @@ declare class Users {
|
|
|
488
499
|
* @param {string} userId - User ID.
|
|
489
500
|
* @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, teamId, invited, joined, confirm, roles
|
|
490
501
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
502
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
491
503
|
* @throws {AppwriteException}
|
|
492
504
|
* @returns {Promise<Models.MembershipList>}
|
|
493
505
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
494
506
|
*/
|
|
495
|
-
listMemberships(userId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
|
|
507
|
+
listMemberships(userId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.MembershipList>;
|
|
496
508
|
/**
|
|
497
509
|
* Enable or disable MFA on a user account.
|
|
498
510
|
*
|
|
@@ -850,21 +862,24 @@ declare class Users {
|
|
|
850
862
|
* Get the user sessions list by its unique ID.
|
|
851
863
|
*
|
|
852
864
|
* @param {string} params.userId - User ID.
|
|
865
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
853
866
|
* @throws {AppwriteException}
|
|
854
867
|
* @returns {Promise<Models.SessionList>}
|
|
855
868
|
*/
|
|
856
869
|
listSessions(params: {
|
|
857
870
|
userId: string;
|
|
871
|
+
total?: boolean;
|
|
858
872
|
}): Promise<Models.SessionList>;
|
|
859
873
|
/**
|
|
860
874
|
* Get the user sessions list by its unique ID.
|
|
861
875
|
*
|
|
862
876
|
* @param {string} userId - User ID.
|
|
877
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
863
878
|
* @throws {AppwriteException}
|
|
864
879
|
* @returns {Promise<Models.SessionList>}
|
|
865
880
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
866
881
|
*/
|
|
867
|
-
listSessions(userId: string): Promise<Models.SessionList>;
|
|
882
|
+
listSessions(userId: string, total?: boolean): Promise<Models.SessionList>;
|
|
868
883
|
/**
|
|
869
884
|
* Creates a session for a user. Returns an immediately usable session object.
|
|
870
885
|
*
|
|
@@ -956,23 +971,26 @@ declare class Users {
|
|
|
956
971
|
*
|
|
957
972
|
* @param {string} params.userId - User ID.
|
|
958
973
|
* @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, providerId, identifier, providerType
|
|
974
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
959
975
|
* @throws {AppwriteException}
|
|
960
976
|
* @returns {Promise<Models.TargetList>}
|
|
961
977
|
*/
|
|
962
978
|
listTargets(params: {
|
|
963
979
|
userId: string;
|
|
964
980
|
queries?: string[];
|
|
981
|
+
total?: boolean;
|
|
965
982
|
}): Promise<Models.TargetList>;
|
|
966
983
|
/**
|
|
967
984
|
* List the messaging targets that are associated with a user.
|
|
968
985
|
*
|
|
969
986
|
* @param {string} userId - User ID.
|
|
970
987
|
* @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, providerId, identifier, providerType
|
|
988
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
971
989
|
* @throws {AppwriteException}
|
|
972
990
|
* @returns {Promise<Models.TargetList>}
|
|
973
991
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
974
992
|
*/
|
|
975
|
-
listTargets(userId: string, queries?: string[]): Promise<Models.TargetList>;
|
|
993
|
+
listTargets(userId: string, queries?: string[], total?: boolean): Promise<Models.TargetList>;
|
|
976
994
|
/**
|
|
977
995
|
* Create a messaging target.
|
|
978
996
|
*
|
package/dist/services/users.d.ts
CHANGED
|
@@ -23,23 +23,26 @@ declare class Users {
|
|
|
23
23
|
*
|
|
24
24
|
* @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: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels
|
|
25
25
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
26
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
26
27
|
* @throws {AppwriteException}
|
|
27
28
|
* @returns {Promise<Models.UserList<Preferences>>}
|
|
28
29
|
*/
|
|
29
30
|
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(params?: {
|
|
30
31
|
queries?: string[];
|
|
31
32
|
search?: string;
|
|
33
|
+
total?: boolean;
|
|
32
34
|
}): Promise<Models.UserList<Preferences>>;
|
|
33
35
|
/**
|
|
34
36
|
* Get a list of all the project's users. You can use the query params to filter your results.
|
|
35
37
|
*
|
|
36
38
|
* @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: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels
|
|
37
39
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
40
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
38
41
|
* @throws {AppwriteException}
|
|
39
42
|
* @returns {Promise<Models.UserList<Preferences>>}
|
|
40
43
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
41
44
|
*/
|
|
42
|
-
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string): Promise<Models.UserList<Preferences>>;
|
|
45
|
+
list<Preferences extends Models.Preferences = Models.DefaultPreferences>(queries?: string[], search?: string, total?: boolean): Promise<Models.UserList<Preferences>>;
|
|
43
46
|
/**
|
|
44
47
|
* Create a new user.
|
|
45
48
|
*
|
|
@@ -132,23 +135,26 @@ declare class Users {
|
|
|
132
135
|
*
|
|
133
136
|
* @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
|
|
134
137
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
138
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
135
139
|
* @throws {AppwriteException}
|
|
136
140
|
* @returns {Promise<Models.IdentityList>}
|
|
137
141
|
*/
|
|
138
142
|
listIdentities(params?: {
|
|
139
143
|
queries?: string[];
|
|
140
144
|
search?: string;
|
|
145
|
+
total?: boolean;
|
|
141
146
|
}): Promise<Models.IdentityList>;
|
|
142
147
|
/**
|
|
143
148
|
* Get identities for all users.
|
|
144
149
|
*
|
|
145
150
|
* @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
|
|
146
151
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
152
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
147
153
|
* @throws {AppwriteException}
|
|
148
154
|
* @returns {Promise<Models.IdentityList>}
|
|
149
155
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
150
156
|
*/
|
|
151
|
-
listIdentities(queries?: string[], search?: string): Promise<Models.IdentityList>;
|
|
157
|
+
listIdentities(queries?: string[], search?: string, total?: boolean): Promise<Models.IdentityList>;
|
|
152
158
|
/**
|
|
153
159
|
* Delete an identity by its unique ID.
|
|
154
160
|
*
|
|
@@ -451,29 +457,33 @@ declare class Users {
|
|
|
451
457
|
*
|
|
452
458
|
* @param {string} params.userId - User ID.
|
|
453
459
|
* @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
|
|
460
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
454
461
|
* @throws {AppwriteException}
|
|
455
462
|
* @returns {Promise<Models.LogList>}
|
|
456
463
|
*/
|
|
457
464
|
listLogs(params: {
|
|
458
465
|
userId: string;
|
|
459
466
|
queries?: string[];
|
|
467
|
+
total?: boolean;
|
|
460
468
|
}): Promise<Models.LogList>;
|
|
461
469
|
/**
|
|
462
470
|
* Get the user activity logs list by its unique ID.
|
|
463
471
|
*
|
|
464
472
|
* @param {string} userId - User ID.
|
|
465
473
|
* @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
|
|
474
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
466
475
|
* @throws {AppwriteException}
|
|
467
476
|
* @returns {Promise<Models.LogList>}
|
|
468
477
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
469
478
|
*/
|
|
470
|
-
listLogs(userId: string, queries?: string[]): Promise<Models.LogList>;
|
|
479
|
+
listLogs(userId: string, queries?: string[], total?: boolean): Promise<Models.LogList>;
|
|
471
480
|
/**
|
|
472
481
|
* Get the user membership list by its unique ID.
|
|
473
482
|
*
|
|
474
483
|
* @param {string} params.userId - User ID.
|
|
475
484
|
* @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, teamId, invited, joined, confirm, roles
|
|
476
485
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
486
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
477
487
|
* @throws {AppwriteException}
|
|
478
488
|
* @returns {Promise<Models.MembershipList>}
|
|
479
489
|
*/
|
|
@@ -481,6 +491,7 @@ declare class Users {
|
|
|
481
491
|
userId: string;
|
|
482
492
|
queries?: string[];
|
|
483
493
|
search?: string;
|
|
494
|
+
total?: boolean;
|
|
484
495
|
}): Promise<Models.MembershipList>;
|
|
485
496
|
/**
|
|
486
497
|
* Get the user membership list by its unique ID.
|
|
@@ -488,11 +499,12 @@ declare class Users {
|
|
|
488
499
|
* @param {string} userId - User ID.
|
|
489
500
|
* @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, teamId, invited, joined, confirm, roles
|
|
490
501
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
502
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
491
503
|
* @throws {AppwriteException}
|
|
492
504
|
* @returns {Promise<Models.MembershipList>}
|
|
493
505
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
494
506
|
*/
|
|
495
|
-
listMemberships(userId: string, queries?: string[], search?: string): Promise<Models.MembershipList>;
|
|
507
|
+
listMemberships(userId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.MembershipList>;
|
|
496
508
|
/**
|
|
497
509
|
* Enable or disable MFA on a user account.
|
|
498
510
|
*
|
|
@@ -850,21 +862,24 @@ declare class Users {
|
|
|
850
862
|
* Get the user sessions list by its unique ID.
|
|
851
863
|
*
|
|
852
864
|
* @param {string} params.userId - User ID.
|
|
865
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
853
866
|
* @throws {AppwriteException}
|
|
854
867
|
* @returns {Promise<Models.SessionList>}
|
|
855
868
|
*/
|
|
856
869
|
listSessions(params: {
|
|
857
870
|
userId: string;
|
|
871
|
+
total?: boolean;
|
|
858
872
|
}): Promise<Models.SessionList>;
|
|
859
873
|
/**
|
|
860
874
|
* Get the user sessions list by its unique ID.
|
|
861
875
|
*
|
|
862
876
|
* @param {string} userId - User ID.
|
|
877
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
863
878
|
* @throws {AppwriteException}
|
|
864
879
|
* @returns {Promise<Models.SessionList>}
|
|
865
880
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
866
881
|
*/
|
|
867
|
-
listSessions(userId: string): Promise<Models.SessionList>;
|
|
882
|
+
listSessions(userId: string, total?: boolean): Promise<Models.SessionList>;
|
|
868
883
|
/**
|
|
869
884
|
* Creates a session for a user. Returns an immediately usable session object.
|
|
870
885
|
*
|
|
@@ -956,23 +971,26 @@ declare class Users {
|
|
|
956
971
|
*
|
|
957
972
|
* @param {string} params.userId - User ID.
|
|
958
973
|
* @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, providerId, identifier, providerType
|
|
974
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
959
975
|
* @throws {AppwriteException}
|
|
960
976
|
* @returns {Promise<Models.TargetList>}
|
|
961
977
|
*/
|
|
962
978
|
listTargets(params: {
|
|
963
979
|
userId: string;
|
|
964
980
|
queries?: string[];
|
|
981
|
+
total?: boolean;
|
|
965
982
|
}): Promise<Models.TargetList>;
|
|
966
983
|
/**
|
|
967
984
|
* List the messaging targets that are associated with a user.
|
|
968
985
|
*
|
|
969
986
|
* @param {string} userId - User ID.
|
|
970
987
|
* @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, providerId, identifier, providerType
|
|
988
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
971
989
|
* @throws {AppwriteException}
|
|
972
990
|
* @returns {Promise<Models.TargetList>}
|
|
973
991
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
974
992
|
*/
|
|
975
|
-
listTargets(userId: string, queries?: string[]): Promise<Models.TargetList>;
|
|
993
|
+
listTargets(userId: string, queries?: string[], total?: boolean): Promise<Models.TargetList>;
|
|
976
994
|
/**
|
|
977
995
|
* Create a messaging target.
|
|
978
996
|
*
|
package/dist/services/users.js
CHANGED
|
@@ -13,11 +13,13 @@ class Users {
|
|
|
13
13
|
} else {
|
|
14
14
|
params = {
|
|
15
15
|
queries: paramsOrFirst,
|
|
16
|
-
search: rest[0]
|
|
16
|
+
search: rest[0],
|
|
17
|
+
total: rest[1]
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
20
|
const queries = params.queries;
|
|
20
21
|
const search = params.search;
|
|
22
|
+
const total = params.total;
|
|
21
23
|
const apiPath = "/users";
|
|
22
24
|
const payload = {};
|
|
23
25
|
if (typeof queries !== "undefined") {
|
|
@@ -26,6 +28,9 @@ class Users {
|
|
|
26
28
|
if (typeof search !== "undefined") {
|
|
27
29
|
payload["search"] = search;
|
|
28
30
|
}
|
|
31
|
+
if (typeof total !== "undefined") {
|
|
32
|
+
payload["total"] = total;
|
|
33
|
+
}
|
|
29
34
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
30
35
|
const apiHeaders = {};
|
|
31
36
|
return this.client.call(
|
|
@@ -191,11 +196,13 @@ class Users {
|
|
|
191
196
|
} else {
|
|
192
197
|
params = {
|
|
193
198
|
queries: paramsOrFirst,
|
|
194
|
-
search: rest[0]
|
|
199
|
+
search: rest[0],
|
|
200
|
+
total: rest[1]
|
|
195
201
|
};
|
|
196
202
|
}
|
|
197
203
|
const queries = params.queries;
|
|
198
204
|
const search = params.search;
|
|
205
|
+
const total = params.total;
|
|
199
206
|
const apiPath = "/users/identities";
|
|
200
207
|
const payload = {};
|
|
201
208
|
if (typeof queries !== "undefined") {
|
|
@@ -204,6 +211,9 @@ class Users {
|
|
|
204
211
|
if (typeof search !== "undefined") {
|
|
205
212
|
payload["search"] = search;
|
|
206
213
|
}
|
|
214
|
+
if (typeof total !== "undefined") {
|
|
215
|
+
payload["total"] = total;
|
|
216
|
+
}
|
|
207
217
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
208
218
|
const apiHeaders = {};
|
|
209
219
|
return this.client.call(
|
|
@@ -719,11 +729,13 @@ class Users {
|
|
|
719
729
|
} else {
|
|
720
730
|
params = {
|
|
721
731
|
userId: paramsOrFirst,
|
|
722
|
-
queries: rest[0]
|
|
732
|
+
queries: rest[0],
|
|
733
|
+
total: rest[1]
|
|
723
734
|
};
|
|
724
735
|
}
|
|
725
736
|
const userId = params.userId;
|
|
726
737
|
const queries = params.queries;
|
|
738
|
+
const total = params.total;
|
|
727
739
|
if (typeof userId === "undefined") {
|
|
728
740
|
throw new client.AppwriteException('Missing required parameter: "userId"');
|
|
729
741
|
}
|
|
@@ -732,6 +744,9 @@ class Users {
|
|
|
732
744
|
if (typeof queries !== "undefined") {
|
|
733
745
|
payload["queries"] = queries;
|
|
734
746
|
}
|
|
747
|
+
if (typeof total !== "undefined") {
|
|
748
|
+
payload["total"] = total;
|
|
749
|
+
}
|
|
735
750
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
736
751
|
const apiHeaders = {};
|
|
737
752
|
return this.client.call(
|
|
@@ -749,12 +764,14 @@ class Users {
|
|
|
749
764
|
params = {
|
|
750
765
|
userId: paramsOrFirst,
|
|
751
766
|
queries: rest[0],
|
|
752
|
-
search: rest[1]
|
|
767
|
+
search: rest[1],
|
|
768
|
+
total: rest[2]
|
|
753
769
|
};
|
|
754
770
|
}
|
|
755
771
|
const userId = params.userId;
|
|
756
772
|
const queries = params.queries;
|
|
757
773
|
const search = params.search;
|
|
774
|
+
const total = params.total;
|
|
758
775
|
if (typeof userId === "undefined") {
|
|
759
776
|
throw new client.AppwriteException('Missing required parameter: "userId"');
|
|
760
777
|
}
|
|
@@ -766,6 +783,9 @@ class Users {
|
|
|
766
783
|
if (typeof search !== "undefined") {
|
|
767
784
|
payload["search"] = search;
|
|
768
785
|
}
|
|
786
|
+
if (typeof total !== "undefined") {
|
|
787
|
+
payload["total"] = total;
|
|
788
|
+
}
|
|
769
789
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
770
790
|
const apiHeaders = {};
|
|
771
791
|
return this.client.call(
|
|
@@ -1265,21 +1285,26 @@ class Users {
|
|
|
1265
1285
|
payload
|
|
1266
1286
|
);
|
|
1267
1287
|
}
|
|
1268
|
-
listSessions(paramsOrFirst) {
|
|
1288
|
+
listSessions(paramsOrFirst, ...rest) {
|
|
1269
1289
|
let params;
|
|
1270
1290
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
1271
1291
|
params = paramsOrFirst || {};
|
|
1272
1292
|
} else {
|
|
1273
1293
|
params = {
|
|
1274
|
-
userId: paramsOrFirst
|
|
1294
|
+
userId: paramsOrFirst,
|
|
1295
|
+
total: rest[0]
|
|
1275
1296
|
};
|
|
1276
1297
|
}
|
|
1277
1298
|
const userId = params.userId;
|
|
1299
|
+
const total = params.total;
|
|
1278
1300
|
if (typeof userId === "undefined") {
|
|
1279
1301
|
throw new client.AppwriteException('Missing required parameter: "userId"');
|
|
1280
1302
|
}
|
|
1281
1303
|
const apiPath = "/users/{userId}/sessions".replace("{userId}", userId);
|
|
1282
1304
|
const payload = {};
|
|
1305
|
+
if (typeof total !== "undefined") {
|
|
1306
|
+
payload["total"] = total;
|
|
1307
|
+
}
|
|
1283
1308
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1284
1309
|
const apiHeaders = {};
|
|
1285
1310
|
return this.client.call(
|
|
@@ -1413,11 +1438,13 @@ class Users {
|
|
|
1413
1438
|
} else {
|
|
1414
1439
|
params = {
|
|
1415
1440
|
userId: paramsOrFirst,
|
|
1416
|
-
queries: rest[0]
|
|
1441
|
+
queries: rest[0],
|
|
1442
|
+
total: rest[1]
|
|
1417
1443
|
};
|
|
1418
1444
|
}
|
|
1419
1445
|
const userId = params.userId;
|
|
1420
1446
|
const queries = params.queries;
|
|
1447
|
+
const total = params.total;
|
|
1421
1448
|
if (typeof userId === "undefined") {
|
|
1422
1449
|
throw new client.AppwriteException('Missing required parameter: "userId"');
|
|
1423
1450
|
}
|
|
@@ -1426,6 +1453,9 @@ class Users {
|
|
|
1426
1453
|
if (typeof queries !== "undefined") {
|
|
1427
1454
|
payload["queries"] = queries;
|
|
1428
1455
|
}
|
|
1456
|
+
if (typeof total !== "undefined") {
|
|
1457
|
+
payload["total"] = total;
|
|
1458
|
+
}
|
|
1429
1459
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
1430
1460
|
const apiHeaders = {};
|
|
1431
1461
|
return this.client.call(
|