@appwrite.io/console 2.1.0 → 2.1.1
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/CHANGELOG.md +4 -0
- package/README.md +2 -2
- package/dist/cjs/sdk.js +55 -16
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +51 -16
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +3812 -16
- package/docs/examples/projects/update-labels.md +14 -0
- package/package.json +7 -1
- package/rollup.config.js +40 -24
- package/src/client.ts +20 -10
- package/src/models.ts +432 -424
- package/src/query.ts +14 -11
- package/src/services/account.ts +20 -20
- package/src/services/avatars.ts +117 -117
- package/src/services/backups.ts +18 -18
- package/src/services/console.ts +24 -24
- package/src/services/databases.ts +119 -119
- package/src/services/domains.ts +204 -204
- package/src/services/functions.ts +30 -30
- package/src/services/health.ts +146 -146
- package/src/services/messaging.ts +54 -54
- package/src/services/migrations.ts +36 -36
- package/src/services/organizations.ts +42 -42
- package/src/services/projects.ts +146 -83
- package/src/services/sites.ts +30 -30
- package/src/services/storage.ts +49 -49
- package/src/services/tables-db.ts +119 -119
- package/src/services/users.ts +39 -39
- package/types/client.d.ts +8 -1
- package/types/models.d.ts +432 -424
- package/types/query.d.ts +8 -8
- package/types/services/account.d.ts +11 -11
- package/types/services/avatars.d.ts +82 -82
- package/types/services/backups.d.ts +8 -8
- package/types/services/console.d.ts +14 -14
- package/types/services/databases.d.ts +70 -70
- package/types/services/domains.d.ts +104 -104
- package/types/services/functions.d.ts +15 -15
- package/types/services/health.d.ts +72 -72
- package/types/services/messaging.d.ts +24 -24
- package/types/services/migrations.d.ts +16 -16
- package/types/services/organizations.d.ts +22 -22
- package/types/services/projects.d.ts +60 -38
- package/types/services/sites.d.ts +15 -15
- package/types/services/storage.d.ts +34 -34
- package/types/services/tables-db.d.ts +70 -70
- package/types/services/users.d.ts +24 -24
package/src/services/projects.ts
CHANGED
|
@@ -25,7 +25,7 @@ export class Projects {
|
|
|
25
25
|
/**
|
|
26
26
|
* Get a list of all projects. You can use the query params to filter your results.
|
|
27
27
|
*
|
|
28
|
-
* @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, teamId
|
|
28
|
+
* @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, teamId, labels, search
|
|
29
29
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
30
30
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
31
31
|
* @throws {AppwriteException}
|
|
@@ -35,7 +35,7 @@ export class Projects {
|
|
|
35
35
|
/**
|
|
36
36
|
* Get a list of all projects. You can use the query params to filter your results.
|
|
37
37
|
*
|
|
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, teamId
|
|
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, teamId, labels, search
|
|
39
39
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
40
40
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
41
41
|
* @throws {AppwriteException}
|
|
@@ -741,33 +741,33 @@ export class Projects {
|
|
|
741
741
|
* Update how long sessions created within a project should stay active for.
|
|
742
742
|
*
|
|
743
743
|
* @param {string} params.projectId - Project unique ID.
|
|
744
|
-
* @param {number} params.duration - Project session length in seconds. Max length: 31536000 seconds.
|
|
744
|
+
* @param {number | bigint} params.duration - Project session length in seconds. Max length: 31536000 seconds.
|
|
745
745
|
* @throws {AppwriteException}
|
|
746
746
|
* @returns {Promise<Models.Project>}
|
|
747
747
|
*/
|
|
748
|
-
updateAuthDuration(params: { projectId: string, duration: number }): Promise<Models.Project>;
|
|
748
|
+
updateAuthDuration(params: { projectId: string, duration: number | bigint }): Promise<Models.Project>;
|
|
749
749
|
/**
|
|
750
750
|
* Update how long sessions created within a project should stay active for.
|
|
751
751
|
*
|
|
752
752
|
* @param {string} projectId - Project unique ID.
|
|
753
|
-
* @param {number} duration - Project session length in seconds. Max length: 31536000 seconds.
|
|
753
|
+
* @param {number | bigint} duration - Project session length in seconds. Max length: 31536000 seconds.
|
|
754
754
|
* @throws {AppwriteException}
|
|
755
755
|
* @returns {Promise<Models.Project>}
|
|
756
756
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
757
757
|
*/
|
|
758
|
-
updateAuthDuration(projectId: string, duration: number): Promise<Models.Project>;
|
|
758
|
+
updateAuthDuration(projectId: string, duration: number | bigint): Promise<Models.Project>;
|
|
759
759
|
updateAuthDuration(
|
|
760
|
-
paramsOrFirst: { projectId: string, duration: number } | string,
|
|
761
|
-
...rest: [(number)?]
|
|
760
|
+
paramsOrFirst: { projectId: string, duration: number | bigint } | string,
|
|
761
|
+
...rest: [(number | bigint)?]
|
|
762
762
|
): Promise<Models.Project> {
|
|
763
|
-
let params: { projectId: string, duration: number };
|
|
763
|
+
let params: { projectId: string, duration: number | bigint };
|
|
764
764
|
|
|
765
765
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
766
|
-
params = (paramsOrFirst || {}) as { projectId: string, duration: number };
|
|
766
|
+
params = (paramsOrFirst || {}) as { projectId: string, duration: number | bigint };
|
|
767
767
|
} else {
|
|
768
768
|
params = {
|
|
769
769
|
projectId: paramsOrFirst as string,
|
|
770
|
-
duration: rest[0] as number
|
|
770
|
+
duration: rest[0] as number | bigint
|
|
771
771
|
};
|
|
772
772
|
}
|
|
773
773
|
|
|
@@ -804,33 +804,33 @@ export class Projects {
|
|
|
804
804
|
* Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
|
|
805
805
|
*
|
|
806
806
|
* @param {string} params.projectId - Project unique ID.
|
|
807
|
-
* @param {number} params.limit - Set the max number of users allowed in this project. Use 0 for unlimited.
|
|
807
|
+
* @param {number | bigint} params.limit - Set the max number of users allowed in this project. Use 0 for unlimited.
|
|
808
808
|
* @throws {AppwriteException}
|
|
809
809
|
* @returns {Promise<Models.Project>}
|
|
810
810
|
*/
|
|
811
|
-
updateAuthLimit(params: { projectId: string, limit: number }): Promise<Models.Project>;
|
|
811
|
+
updateAuthLimit(params: { projectId: string, limit: number | bigint }): Promise<Models.Project>;
|
|
812
812
|
/**
|
|
813
813
|
* Update the maximum number of users allowed in this project. Set to 0 for unlimited users.
|
|
814
814
|
*
|
|
815
815
|
* @param {string} projectId - Project unique ID.
|
|
816
|
-
* @param {number} limit - Set the max number of users allowed in this project. Use 0 for unlimited.
|
|
816
|
+
* @param {number | bigint} limit - Set the max number of users allowed in this project. Use 0 for unlimited.
|
|
817
817
|
* @throws {AppwriteException}
|
|
818
818
|
* @returns {Promise<Models.Project>}
|
|
819
819
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
820
820
|
*/
|
|
821
|
-
updateAuthLimit(projectId: string, limit: number): Promise<Models.Project>;
|
|
821
|
+
updateAuthLimit(projectId: string, limit: number | bigint): Promise<Models.Project>;
|
|
822
822
|
updateAuthLimit(
|
|
823
|
-
paramsOrFirst: { projectId: string, limit: number } | string,
|
|
824
|
-
...rest: [(number)?]
|
|
823
|
+
paramsOrFirst: { projectId: string, limit: number | bigint } | string,
|
|
824
|
+
...rest: [(number | bigint)?]
|
|
825
825
|
): Promise<Models.Project> {
|
|
826
|
-
let params: { projectId: string, limit: number };
|
|
826
|
+
let params: { projectId: string, limit: number | bigint };
|
|
827
827
|
|
|
828
828
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
829
|
-
params = (paramsOrFirst || {}) as { projectId: string, limit: number };
|
|
829
|
+
params = (paramsOrFirst || {}) as { projectId: string, limit: number | bigint };
|
|
830
830
|
} else {
|
|
831
831
|
params = {
|
|
832
832
|
projectId: paramsOrFirst as string,
|
|
833
|
-
limit: rest[0] as number
|
|
833
|
+
limit: rest[0] as number | bigint
|
|
834
834
|
};
|
|
835
835
|
}
|
|
836
836
|
|
|
@@ -867,33 +867,33 @@ export class Projects {
|
|
|
867
867
|
* Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
|
|
868
868
|
*
|
|
869
869
|
* @param {string} params.projectId - Project unique ID.
|
|
870
|
-
* @param {number} params.limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
|
|
870
|
+
* @param {number | bigint} params.limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
|
|
871
871
|
* @throws {AppwriteException}
|
|
872
872
|
* @returns {Promise<Models.Project>}
|
|
873
873
|
*/
|
|
874
|
-
updateAuthSessionsLimit(params: { projectId: string, limit: number }): Promise<Models.Project>;
|
|
874
|
+
updateAuthSessionsLimit(params: { projectId: string, limit: number | bigint }): Promise<Models.Project>;
|
|
875
875
|
/**
|
|
876
876
|
* Update the maximum number of sessions allowed per user within the project, if the limit is hit the oldest session will be deleted to make room for new sessions.
|
|
877
877
|
*
|
|
878
878
|
* @param {string} projectId - Project unique ID.
|
|
879
|
-
* @param {number} limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
|
|
879
|
+
* @param {number | bigint} limit - Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10
|
|
880
880
|
* @throws {AppwriteException}
|
|
881
881
|
* @returns {Promise<Models.Project>}
|
|
882
882
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
883
883
|
*/
|
|
884
|
-
updateAuthSessionsLimit(projectId: string, limit: number): Promise<Models.Project>;
|
|
884
|
+
updateAuthSessionsLimit(projectId: string, limit: number | bigint): Promise<Models.Project>;
|
|
885
885
|
updateAuthSessionsLimit(
|
|
886
|
-
paramsOrFirst: { projectId: string, limit: number } | string,
|
|
887
|
-
...rest: [(number)?]
|
|
886
|
+
paramsOrFirst: { projectId: string, limit: number | bigint } | string,
|
|
887
|
+
...rest: [(number | bigint)?]
|
|
888
888
|
): Promise<Models.Project> {
|
|
889
|
-
let params: { projectId: string, limit: number };
|
|
889
|
+
let params: { projectId: string, limit: number | bigint };
|
|
890
890
|
|
|
891
891
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
892
|
-
params = (paramsOrFirst || {}) as { projectId: string, limit: number };
|
|
892
|
+
params = (paramsOrFirst || {}) as { projectId: string, limit: number | bigint };
|
|
893
893
|
} else {
|
|
894
894
|
params = {
|
|
895
895
|
projectId: paramsOrFirst as string,
|
|
896
|
-
limit: rest[0] as number
|
|
896
|
+
limit: rest[0] as number | bigint
|
|
897
897
|
};
|
|
898
898
|
}
|
|
899
899
|
|
|
@@ -1139,33 +1139,33 @@ export class Projects {
|
|
|
1139
1139
|
* Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.
|
|
1140
1140
|
*
|
|
1141
1141
|
* @param {string} params.projectId - Project unique ID.
|
|
1142
|
-
* @param {number} params.limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
|
|
1142
|
+
* @param {number | bigint} params.limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
|
|
1143
1143
|
* @throws {AppwriteException}
|
|
1144
1144
|
* @returns {Promise<Models.Project>}
|
|
1145
1145
|
*/
|
|
1146
|
-
updateAuthPasswordHistory(params: { projectId: string, limit: number }): Promise<Models.Project>;
|
|
1146
|
+
updateAuthPasswordHistory(params: { projectId: string, limit: number | bigint }): Promise<Models.Project>;
|
|
1147
1147
|
/**
|
|
1148
1148
|
* Update the authentication password history requirement. Use this endpoint to require new passwords to be different than the last X amount of previously used ones.
|
|
1149
1149
|
*
|
|
1150
1150
|
* @param {string} projectId - Project unique ID.
|
|
1151
|
-
* @param {number} limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
|
|
1151
|
+
* @param {number | bigint} limit - Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0
|
|
1152
1152
|
* @throws {AppwriteException}
|
|
1153
1153
|
* @returns {Promise<Models.Project>}
|
|
1154
1154
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1155
1155
|
*/
|
|
1156
|
-
updateAuthPasswordHistory(projectId: string, limit: number): Promise<Models.Project>;
|
|
1156
|
+
updateAuthPasswordHistory(projectId: string, limit: number | bigint): Promise<Models.Project>;
|
|
1157
1157
|
updateAuthPasswordHistory(
|
|
1158
|
-
paramsOrFirst: { projectId: string, limit: number } | string,
|
|
1159
|
-
...rest: [(number)?]
|
|
1158
|
+
paramsOrFirst: { projectId: string, limit: number | bigint } | string,
|
|
1159
|
+
...rest: [(number | bigint)?]
|
|
1160
1160
|
): Promise<Models.Project> {
|
|
1161
|
-
let params: { projectId: string, limit: number };
|
|
1161
|
+
let params: { projectId: string, limit: number | bigint };
|
|
1162
1162
|
|
|
1163
1163
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1164
|
-
params = (paramsOrFirst || {}) as { projectId: string, limit: number };
|
|
1164
|
+
params = (paramsOrFirst || {}) as { projectId: string, limit: number | bigint };
|
|
1165
1165
|
} else {
|
|
1166
1166
|
params = {
|
|
1167
1167
|
projectId: paramsOrFirst as string,
|
|
1168
|
-
limit: rest[0] as number
|
|
1168
|
+
limit: rest[0] as number | bigint
|
|
1169
1169
|
};
|
|
1170
1170
|
}
|
|
1171
1171
|
|
|
@@ -1793,35 +1793,35 @@ export class Projects {
|
|
|
1793
1793
|
*
|
|
1794
1794
|
* @param {string} params.projectId - Project unique ID.
|
|
1795
1795
|
* @param {string[]} params.scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
|
|
1796
|
-
* @param {number} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
1796
|
+
* @param {number | bigint} params.duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
1797
1797
|
* @throws {AppwriteException}
|
|
1798
1798
|
* @returns {Promise<Models.Jwt>}
|
|
1799
1799
|
*/
|
|
1800
|
-
createJWT(params: { projectId: string, scopes: string[], duration?: number }): Promise<Models.Jwt>;
|
|
1800
|
+
createJWT(params: { projectId: string, scopes: string[], duration?: number | bigint }): Promise<Models.Jwt>;
|
|
1801
1801
|
/**
|
|
1802
1802
|
* Create a new JWT token. This token can be used to authenticate users with custom scopes and expiration time.
|
|
1803
1803
|
*
|
|
1804
1804
|
* @param {string} projectId - Project unique ID.
|
|
1805
1805
|
* @param {string[]} scopes - List of scopes allowed for JWT key. Maximum of 100 scopes are allowed.
|
|
1806
|
-
* @param {number} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
1806
|
+
* @param {number | bigint} duration - Time in seconds before JWT expires. Default duration is 900 seconds, and maximum is 3600 seconds.
|
|
1807
1807
|
* @throws {AppwriteException}
|
|
1808
1808
|
* @returns {Promise<Models.Jwt>}
|
|
1809
1809
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1810
1810
|
*/
|
|
1811
|
-
createJWT(projectId: string, scopes: string[], duration?: number): Promise<Models.Jwt>;
|
|
1811
|
+
createJWT(projectId: string, scopes: string[], duration?: number | bigint): Promise<Models.Jwt>;
|
|
1812
1812
|
createJWT(
|
|
1813
|
-
paramsOrFirst: { projectId: string, scopes: string[], duration?: number } | string,
|
|
1814
|
-
...rest: [(string[])?, (number)?]
|
|
1813
|
+
paramsOrFirst: { projectId: string, scopes: string[], duration?: number | bigint } | string,
|
|
1814
|
+
...rest: [(string[])?, (number | bigint)?]
|
|
1815
1815
|
): Promise<Models.Jwt> {
|
|
1816
|
-
let params: { projectId: string, scopes: string[], duration?: number };
|
|
1816
|
+
let params: { projectId: string, scopes: string[], duration?: number | bigint };
|
|
1817
1817
|
|
|
1818
1818
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
1819
|
-
params = (paramsOrFirst || {}) as { projectId: string, scopes: string[], duration?: number };
|
|
1819
|
+
params = (paramsOrFirst || {}) as { projectId: string, scopes: string[], duration?: number | bigint };
|
|
1820
1820
|
} else {
|
|
1821
1821
|
params = {
|
|
1822
1822
|
projectId: paramsOrFirst as string,
|
|
1823
1823
|
scopes: rest[0] as string[],
|
|
1824
|
-
duration: rest[1] as number
|
|
1824
|
+
duration: rest[1] as number | bigint
|
|
1825
1825
|
};
|
|
1826
1826
|
}
|
|
1827
1827
|
|
|
@@ -2203,6 +2203,69 @@ export class Projects {
|
|
|
2203
2203
|
);
|
|
2204
2204
|
}
|
|
2205
2205
|
|
|
2206
|
+
/**
|
|
2207
|
+
* Update the project labels by its unique ID. Labels can be used to easily filter projects in an organization.
|
|
2208
|
+
*
|
|
2209
|
+
* @param {string} params.projectId - Project unique ID.
|
|
2210
|
+
* @param {string[]} params.labels - Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
|
|
2211
|
+
* @throws {AppwriteException}
|
|
2212
|
+
* @returns {Promise<Models.Project>}
|
|
2213
|
+
*/
|
|
2214
|
+
updateLabels(params: { projectId: string, labels: string[] }): Promise<Models.Project>;
|
|
2215
|
+
/**
|
|
2216
|
+
* Update the project labels by its unique ID. Labels can be used to easily filter projects in an organization.
|
|
2217
|
+
*
|
|
2218
|
+
* @param {string} projectId - Project unique ID.
|
|
2219
|
+
* @param {string[]} labels - Array of project labels. Replaces the previous labels. Maximum of 1000 labels are allowed, each up to 36 alphanumeric characters long.
|
|
2220
|
+
* @throws {AppwriteException}
|
|
2221
|
+
* @returns {Promise<Models.Project>}
|
|
2222
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2223
|
+
*/
|
|
2224
|
+
updateLabels(projectId: string, labels: string[]): Promise<Models.Project>;
|
|
2225
|
+
updateLabels(
|
|
2226
|
+
paramsOrFirst: { projectId: string, labels: string[] } | string,
|
|
2227
|
+
...rest: [(string[])?]
|
|
2228
|
+
): Promise<Models.Project> {
|
|
2229
|
+
let params: { projectId: string, labels: string[] };
|
|
2230
|
+
|
|
2231
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2232
|
+
params = (paramsOrFirst || {}) as { projectId: string, labels: string[] };
|
|
2233
|
+
} else {
|
|
2234
|
+
params = {
|
|
2235
|
+
projectId: paramsOrFirst as string,
|
|
2236
|
+
labels: rest[0] as string[]
|
|
2237
|
+
};
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
const projectId = params.projectId;
|
|
2241
|
+
const labels = params.labels;
|
|
2242
|
+
|
|
2243
|
+
if (typeof projectId === 'undefined') {
|
|
2244
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
2245
|
+
}
|
|
2246
|
+
if (typeof labels === 'undefined') {
|
|
2247
|
+
throw new AppwriteException('Missing required parameter: "labels"');
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
const apiPath = '/projects/{projectId}/labels'.replace('{projectId}', projectId);
|
|
2251
|
+
const payload: Payload = {};
|
|
2252
|
+
if (typeof labels !== 'undefined') {
|
|
2253
|
+
payload['labels'] = labels;
|
|
2254
|
+
}
|
|
2255
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2256
|
+
|
|
2257
|
+
const apiHeaders: { [header: string]: string } = {
|
|
2258
|
+
'content-type': 'application/json',
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
return this.client.call(
|
|
2262
|
+
'put',
|
|
2263
|
+
uri,
|
|
2264
|
+
apiHeaders,
|
|
2265
|
+
payload
|
|
2266
|
+
);
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2206
2269
|
/**
|
|
2207
2270
|
* Update the OAuth2 provider configurations. Use this endpoint to set up or update the OAuth2 provider credentials or enable/disable providers.
|
|
2208
2271
|
*
|
|
@@ -2795,7 +2858,7 @@ export class Projects {
|
|
|
2795
2858
|
* @param {string} params.senderEmail - Email of the sender
|
|
2796
2859
|
* @param {string} params.replyTo - Reply to email
|
|
2797
2860
|
* @param {string} params.host - SMTP server host name
|
|
2798
|
-
* @param {number} params.port - SMTP server port
|
|
2861
|
+
* @param {number | bigint} params.port - SMTP server port
|
|
2799
2862
|
* @param {string} params.username - SMTP server username
|
|
2800
2863
|
* @param {string} params.password - SMTP server password
|
|
2801
2864
|
* @param {SMTPSecure} params.secure - Does SMTP server use secure connection
|
|
@@ -2803,7 +2866,7 @@ export class Projects {
|
|
|
2803
2866
|
* @returns {Promise<Models.Project>}
|
|
2804
2867
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Projects.updateSMTP` instead.
|
|
2805
2868
|
*/
|
|
2806
|
-
updateSmtp(params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<Models.Project>;
|
|
2869
|
+
updateSmtp(params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure }): Promise<Models.Project>;
|
|
2807
2870
|
/**
|
|
2808
2871
|
* Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
|
|
2809
2872
|
*
|
|
@@ -2813,7 +2876,7 @@ export class Projects {
|
|
|
2813
2876
|
* @param {string} senderEmail - Email of the sender
|
|
2814
2877
|
* @param {string} replyTo - Reply to email
|
|
2815
2878
|
* @param {string} host - SMTP server host name
|
|
2816
|
-
* @param {number} port - SMTP server port
|
|
2879
|
+
* @param {number | bigint} port - SMTP server port
|
|
2817
2880
|
* @param {string} username - SMTP server username
|
|
2818
2881
|
* @param {string} password - SMTP server password
|
|
2819
2882
|
* @param {SMTPSecure} secure - Does SMTP server use secure connection
|
|
@@ -2821,15 +2884,15 @@ export class Projects {
|
|
|
2821
2884
|
* @returns {Promise<Models.Project>}
|
|
2822
2885
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2823
2886
|
*/
|
|
2824
|
-
updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
|
|
2887
|
+
updateSmtp(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
|
|
2825
2888
|
updateSmtp(
|
|
2826
|
-
paramsOrFirst: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
2827
|
-
...rest: [(boolean)?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
|
|
2889
|
+
paramsOrFirst: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
2890
|
+
...rest: [(boolean)?, (string)?, (string)?, (string)?, (string)?, (number | bigint)?, (string)?, (string)?, (SMTPSecure)?]
|
|
2828
2891
|
): Promise<Models.Project> {
|
|
2829
|
-
let params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
2892
|
+
let params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure };
|
|
2830
2893
|
|
|
2831
2894
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2832
|
-
params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
2895
|
+
params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure };
|
|
2833
2896
|
} else {
|
|
2834
2897
|
params = {
|
|
2835
2898
|
projectId: paramsOrFirst as string,
|
|
@@ -2838,7 +2901,7 @@ export class Projects {
|
|
|
2838
2901
|
senderEmail: rest[2] as string,
|
|
2839
2902
|
replyTo: rest[3] as string,
|
|
2840
2903
|
host: rest[4] as string,
|
|
2841
|
-
port: rest[5] as number,
|
|
2904
|
+
port: rest[5] as number | bigint,
|
|
2842
2905
|
username: rest[6] as string,
|
|
2843
2906
|
password: rest[7] as string,
|
|
2844
2907
|
secure: rest[8] as SMTPSecure
|
|
@@ -2915,14 +2978,14 @@ export class Projects {
|
|
|
2915
2978
|
* @param {string} params.senderEmail - Email of the sender
|
|
2916
2979
|
* @param {string} params.replyTo - Reply to email
|
|
2917
2980
|
* @param {string} params.host - SMTP server host name
|
|
2918
|
-
* @param {number} params.port - SMTP server port
|
|
2981
|
+
* @param {number | bigint} params.port - SMTP server port
|
|
2919
2982
|
* @param {string} params.username - SMTP server username
|
|
2920
2983
|
* @param {string} params.password - SMTP server password
|
|
2921
2984
|
* @param {SMTPSecure} params.secure - Does SMTP server use secure connection
|
|
2922
2985
|
* @throws {AppwriteException}
|
|
2923
2986
|
* @returns {Promise<Models.Project>}
|
|
2924
2987
|
*/
|
|
2925
|
-
updateSMTP(params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<Models.Project>;
|
|
2988
|
+
updateSMTP(params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure }): Promise<Models.Project>;
|
|
2926
2989
|
/**
|
|
2927
2990
|
* Update the SMTP configuration for your project. Use this endpoint to configure your project's SMTP provider with your custom settings for sending transactional emails.
|
|
2928
2991
|
*
|
|
@@ -2932,7 +2995,7 @@ export class Projects {
|
|
|
2932
2995
|
* @param {string} senderEmail - Email of the sender
|
|
2933
2996
|
* @param {string} replyTo - Reply to email
|
|
2934
2997
|
* @param {string} host - SMTP server host name
|
|
2935
|
-
* @param {number} port - SMTP server port
|
|
2998
|
+
* @param {number | bigint} port - SMTP server port
|
|
2936
2999
|
* @param {string} username - SMTP server username
|
|
2937
3000
|
* @param {string} password - SMTP server password
|
|
2938
3001
|
* @param {SMTPSecure} secure - Does SMTP server use secure connection
|
|
@@ -2940,15 +3003,15 @@ export class Projects {
|
|
|
2940
3003
|
* @returns {Promise<Models.Project>}
|
|
2941
3004
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2942
3005
|
*/
|
|
2943
|
-
updateSMTP(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
|
|
3006
|
+
updateSMTP(projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure): Promise<Models.Project>;
|
|
2944
3007
|
updateSMTP(
|
|
2945
|
-
paramsOrFirst: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
2946
|
-
...rest: [(boolean)?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
|
|
3008
|
+
paramsOrFirst: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
3009
|
+
...rest: [(boolean)?, (string)?, (string)?, (string)?, (string)?, (number | bigint)?, (string)?, (string)?, (SMTPSecure)?]
|
|
2947
3010
|
): Promise<Models.Project> {
|
|
2948
|
-
let params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3011
|
+
let params: { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure };
|
|
2949
3012
|
|
|
2950
3013
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2951
|
-
params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3014
|
+
params = (paramsOrFirst || {}) as { projectId: string, enabled: boolean, senderName?: string, senderEmail?: string, replyTo?: string, host?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure };
|
|
2952
3015
|
} else {
|
|
2953
3016
|
params = {
|
|
2954
3017
|
projectId: paramsOrFirst as string,
|
|
@@ -2957,7 +3020,7 @@ export class Projects {
|
|
|
2957
3020
|
senderEmail: rest[2] as string,
|
|
2958
3021
|
replyTo: rest[3] as string,
|
|
2959
3022
|
host: rest[4] as string,
|
|
2960
|
-
port: rest[5] as number,
|
|
3023
|
+
port: rest[5] as number | bigint,
|
|
2961
3024
|
username: rest[6] as string,
|
|
2962
3025
|
password: rest[7] as string,
|
|
2963
3026
|
secure: rest[8] as SMTPSecure
|
|
@@ -3034,7 +3097,7 @@ export class Projects {
|
|
|
3034
3097
|
* @param {string} params.senderEmail - Email of the sender
|
|
3035
3098
|
* @param {string} params.host - SMTP server host name
|
|
3036
3099
|
* @param {string} params.replyTo - Reply to email
|
|
3037
|
-
* @param {number} params.port - SMTP server port
|
|
3100
|
+
* @param {number | bigint} params.port - SMTP server port
|
|
3038
3101
|
* @param {string} params.username - SMTP server username
|
|
3039
3102
|
* @param {string} params.password - SMTP server password
|
|
3040
3103
|
* @param {SMTPSecure} params.secure - Does SMTP server use secure connection
|
|
@@ -3042,7 +3105,7 @@ export class Projects {
|
|
|
3042
3105
|
* @returns {Promise<{}>}
|
|
3043
3106
|
* @deprecated This API has been deprecated since 1.8.0. Please use `Projects.createSMTPTest` instead.
|
|
3044
3107
|
*/
|
|
3045
|
-
createSmtpTest(params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<{}>;
|
|
3108
|
+
createSmtpTest(params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure }): Promise<{}>;
|
|
3046
3109
|
/**
|
|
3047
3110
|
* Send a test email to verify SMTP configuration.
|
|
3048
3111
|
*
|
|
@@ -3052,7 +3115,7 @@ export class Projects {
|
|
|
3052
3115
|
* @param {string} senderEmail - Email of the sender
|
|
3053
3116
|
* @param {string} host - SMTP server host name
|
|
3054
3117
|
* @param {string} replyTo - Reply to email
|
|
3055
|
-
* @param {number} port - SMTP server port
|
|
3118
|
+
* @param {number | bigint} port - SMTP server port
|
|
3056
3119
|
* @param {string} username - SMTP server username
|
|
3057
3120
|
* @param {string} password - SMTP server password
|
|
3058
3121
|
* @param {SMTPSecure} secure - Does SMTP server use secure connection
|
|
@@ -3060,15 +3123,15 @@ export class Projects {
|
|
|
3060
3123
|
* @returns {Promise<{}>}
|
|
3061
3124
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3062
3125
|
*/
|
|
3063
|
-
createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
|
|
3126
|
+
createSmtpTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
|
|
3064
3127
|
createSmtpTest(
|
|
3065
|
-
paramsOrFirst: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
3066
|
-
...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
|
|
3128
|
+
paramsOrFirst: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
3129
|
+
...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (number | bigint)?, (string)?, (string)?, (SMTPSecure)?]
|
|
3067
3130
|
): Promise<{}> {
|
|
3068
|
-
let params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3131
|
+
let params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure };
|
|
3069
3132
|
|
|
3070
3133
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3071
|
-
params = (paramsOrFirst || {}) as { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3134
|
+
params = (paramsOrFirst || {}) as { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure };
|
|
3072
3135
|
} else {
|
|
3073
3136
|
params = {
|
|
3074
3137
|
projectId: paramsOrFirst as string,
|
|
@@ -3077,7 +3140,7 @@ export class Projects {
|
|
|
3077
3140
|
senderEmail: rest[2] as string,
|
|
3078
3141
|
host: rest[3] as string,
|
|
3079
3142
|
replyTo: rest[4] as string,
|
|
3080
|
-
port: rest[5] as number,
|
|
3143
|
+
port: rest[5] as number | bigint,
|
|
3081
3144
|
username: rest[6] as string,
|
|
3082
3145
|
password: rest[7] as string,
|
|
3083
3146
|
secure: rest[8] as SMTPSecure
|
|
@@ -3163,14 +3226,14 @@ export class Projects {
|
|
|
3163
3226
|
* @param {string} params.senderEmail - Email of the sender
|
|
3164
3227
|
* @param {string} params.host - SMTP server host name
|
|
3165
3228
|
* @param {string} params.replyTo - Reply to email
|
|
3166
|
-
* @param {number} params.port - SMTP server port
|
|
3229
|
+
* @param {number | bigint} params.port - SMTP server port
|
|
3167
3230
|
* @param {string} params.username - SMTP server username
|
|
3168
3231
|
* @param {string} params.password - SMTP server password
|
|
3169
3232
|
* @param {SMTPSecure} params.secure - Does SMTP server use secure connection
|
|
3170
3233
|
* @throws {AppwriteException}
|
|
3171
3234
|
* @returns {Promise<{}>}
|
|
3172
3235
|
*/
|
|
3173
|
-
createSMTPTest(params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure }): Promise<{}>;
|
|
3236
|
+
createSMTPTest(params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure }): Promise<{}>;
|
|
3174
3237
|
/**
|
|
3175
3238
|
* Send a test email to verify SMTP configuration.
|
|
3176
3239
|
*
|
|
@@ -3180,7 +3243,7 @@ export class Projects {
|
|
|
3180
3243
|
* @param {string} senderEmail - Email of the sender
|
|
3181
3244
|
* @param {string} host - SMTP server host name
|
|
3182
3245
|
* @param {string} replyTo - Reply to email
|
|
3183
|
-
* @param {number} port - SMTP server port
|
|
3246
|
+
* @param {number | bigint} port - SMTP server port
|
|
3184
3247
|
* @param {string} username - SMTP server username
|
|
3185
3248
|
* @param {string} password - SMTP server password
|
|
3186
3249
|
* @param {SMTPSecure} secure - Does SMTP server use secure connection
|
|
@@ -3188,15 +3251,15 @@ export class Projects {
|
|
|
3188
3251
|
* @returns {Promise<{}>}
|
|
3189
3252
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3190
3253
|
*/
|
|
3191
|
-
createSMTPTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
|
|
3254
|
+
createSMTPTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
|
|
3192
3255
|
createSMTPTest(
|
|
3193
|
-
paramsOrFirst: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
3194
|
-
...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (number)?, (string)?, (string)?, (SMTPSecure)?]
|
|
3256
|
+
paramsOrFirst: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure } | string,
|
|
3257
|
+
...rest: [(string[])?, (string)?, (string)?, (string)?, (string)?, (number | bigint)?, (string)?, (string)?, (SMTPSecure)?]
|
|
3195
3258
|
): Promise<{}> {
|
|
3196
|
-
let params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3259
|
+
let params: { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure };
|
|
3197
3260
|
|
|
3198
3261
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3199
|
-
params = (paramsOrFirst || {}) as { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure };
|
|
3262
|
+
params = (paramsOrFirst || {}) as { projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number | bigint, username?: string, password?: string, secure?: SMTPSecure };
|
|
3200
3263
|
} else {
|
|
3201
3264
|
params = {
|
|
3202
3265
|
projectId: paramsOrFirst as string,
|
|
@@ -3205,7 +3268,7 @@ export class Projects {
|
|
|
3205
3268
|
senderEmail: rest[2] as string,
|
|
3206
3269
|
host: rest[3] as string,
|
|
3207
3270
|
replyTo: rest[4] as string,
|
|
3208
|
-
port: rest[5] as number,
|
|
3271
|
+
port: rest[5] as number | bigint,
|
|
3209
3272
|
username: rest[6] as string,
|
|
3210
3273
|
password: rest[7] as string,
|
|
3211
3274
|
secure: rest[8] as SMTPSecure
|