node-appwrite 20.2.1 → 21.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/build-runtime.d.mts +3 -1
- package/dist/enums/build-runtime.d.ts +3 -1
- package/dist/enums/build-runtime.js +2 -0
- package/dist/enums/build-runtime.js.map +1 -1
- package/dist/enums/build-runtime.mjs +2 -0
- package/dist/enums/build-runtime.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/enums/output.d.mts +11 -0
- package/dist/enums/output.d.ts +11 -0
- package/dist/enums/output.js +16 -0
- package/dist/enums/output.js.map +1 -0
- package/dist/enums/output.mjs +15 -0
- package/dist/enums/output.mjs.map +1 -0
- package/dist/enums/runtime.d.mts +3 -1
- package/dist/enums/runtime.d.ts +3 -1
- package/dist/enums/runtime.js +2 -0
- package/dist/enums/runtime.js.map +1 -1
- package/dist/enums/runtime.mjs +2 -0
- package/dist/enums/runtime.mjs.map +1 -1
- package/dist/enums/template-reference-type.d.mts +7 -0
- package/dist/enums/template-reference-type.d.ts +7 -0
- package/dist/enums/template-reference-type.js +12 -0
- package/dist/enums/template-reference-type.js.map +1 -0
- package/dist/enums/template-reference-type.mjs +11 -0
- package/dist/enums/template-reference-type.mjs.map +1 -0
- package/dist/enums/theme.d.mts +6 -0
- package/dist/enums/theme.d.ts +6 -0
- package/dist/enums/theme.js +11 -0
- package/dist/enums/theme.js.map +1 -0
- package/dist/enums/theme.mjs +10 -0
- package/dist/enums/theme.mjs.map +1 -0
- package/dist/enums/timezone.d.mts +423 -0
- package/dist/enums/timezone.d.ts +423 -0
- package/dist/enums/timezone.js +428 -0
- package/dist/enums/timezone.js.map +1 -0
- package/dist/enums/timezone.mjs +427 -0
- package/dist/enums/timezone.mjs.map +1 -0
- package/dist/enums/{vcs-deployment-type.d.mts → vcs-reference-type.d.mts} +2 -2
- package/dist/enums/{vcs-deployment-type.d.ts → vcs-reference-type.d.ts} +2 -2
- package/dist/enums/vcs-reference-type.js +12 -0
- package/dist/enums/vcs-reference-type.js.map +1 -0
- package/dist/enums/vcs-reference-type.mjs +11 -0
- package/dist/enums/vcs-reference-type.mjs.map +1 -0
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +32 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +5 -1
- package/dist/models.d.ts +5 -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 +18 -8
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +18 -8
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/avatars.d.mts +87 -0
- package/dist/services/avatars.d.ts +87 -0
- package/dist/services/avatars.js +123 -0
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +123 -0
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/databases.d.mts +20 -5
- package/dist/services/databases.d.ts +20 -5
- package/dist/services/databases.js +30 -5
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +30 -5
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +25 -12
- package/dist/services/functions.d.ts +25 -12
- package/dist/services/functions.js +33 -10
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +33 -10
- 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 +27 -14
- package/dist/services/sites.d.ts +27 -14
- package/dist/services/sites.js +33 -10
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +33 -10
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +18 -6
- package/dist/services/storage.d.ts +18 -6
- package/dist/services/storage.js +24 -4
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +24 -4
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +22 -7
- package/dist/services/tables-db.d.ts +22 -7
- package/dist/services/tables-db.js +30 -5
- package/dist/services/tables-db.js.map +1 -1
- package/dist/services/tables-db.mjs +30 -5
- 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
- package/dist/enums/vcs-deployment-type.js +0 -12
- package/dist/enums/vcs-deployment-type.js.map +0 -1
- package/dist/enums/vcs-deployment-type.mjs +0 -11
- package/dist/enums/vcs-deployment-type.mjs.map +0 -1
|
@@ -21,25 +21,28 @@ declare class Storage {
|
|
|
21
21
|
/**
|
|
22
22
|
* Get a list of all the storage buckets. You can use the query params to filter your results.
|
|
23
23
|
*
|
|
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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus
|
|
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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations
|
|
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.BucketList>}
|
|
28
29
|
*/
|
|
29
30
|
listBuckets(params?: {
|
|
30
31
|
queries?: string[];
|
|
31
32
|
search?: string;
|
|
33
|
+
total?: boolean;
|
|
32
34
|
}): Promise<Models.BucketList>;
|
|
33
35
|
/**
|
|
34
36
|
* Get a list of all the storage buckets. You can use the query params to filter your results.
|
|
35
37
|
*
|
|
36
|
-
* @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus
|
|
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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations
|
|
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.BucketList>}
|
|
40
43
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
41
44
|
*/
|
|
42
|
-
listBuckets(queries?: string[], search?: string): Promise<Models.BucketList>;
|
|
45
|
+
listBuckets(queries?: string[], search?: string, total?: boolean): Promise<Models.BucketList>;
|
|
43
46
|
/**
|
|
44
47
|
* Create a new storage bucket.
|
|
45
48
|
*
|
|
@@ -53,6 +56,7 @@ declare class Storage {
|
|
|
53
56
|
* @param {Compression} params.compression - Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
54
57
|
* @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
55
58
|
* @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
|
59
|
+
* @param {boolean} params.transformations - Are image transformations enabled?
|
|
56
60
|
* @throws {AppwriteException}
|
|
57
61
|
* @returns {Promise<Models.Bucket>}
|
|
58
62
|
*/
|
|
@@ -67,6 +71,7 @@ declare class Storage {
|
|
|
67
71
|
compression?: Compression;
|
|
68
72
|
encryption?: boolean;
|
|
69
73
|
antivirus?: boolean;
|
|
74
|
+
transformations?: boolean;
|
|
70
75
|
}): Promise<Models.Bucket>;
|
|
71
76
|
/**
|
|
72
77
|
* Create a new storage bucket.
|
|
@@ -81,11 +86,12 @@ declare class Storage {
|
|
|
81
86
|
* @param {Compression} compression - Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
82
87
|
* @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
83
88
|
* @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
|
89
|
+
* @param {boolean} transformations - Are image transformations enabled?
|
|
84
90
|
* @throws {AppwriteException}
|
|
85
91
|
* @returns {Promise<Models.Bucket>}
|
|
86
92
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
87
93
|
*/
|
|
88
|
-
createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
|
|
94
|
+
createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;
|
|
89
95
|
/**
|
|
90
96
|
* Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.
|
|
91
97
|
*
|
|
@@ -118,6 +124,7 @@ declare class Storage {
|
|
|
118
124
|
* @param {Compression} params.compression - Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
119
125
|
* @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
120
126
|
* @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
|
127
|
+
* @param {boolean} params.transformations - Are image transformations enabled?
|
|
121
128
|
* @throws {AppwriteException}
|
|
122
129
|
* @returns {Promise<Models.Bucket>}
|
|
123
130
|
*/
|
|
@@ -132,6 +139,7 @@ declare class Storage {
|
|
|
132
139
|
compression?: Compression;
|
|
133
140
|
encryption?: boolean;
|
|
134
141
|
antivirus?: boolean;
|
|
142
|
+
transformations?: boolean;
|
|
135
143
|
}): Promise<Models.Bucket>;
|
|
136
144
|
/**
|
|
137
145
|
* Update a storage bucket by its unique ID.
|
|
@@ -146,11 +154,12 @@ declare class Storage {
|
|
|
146
154
|
* @param {Compression} compression - Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
147
155
|
* @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
148
156
|
* @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
|
157
|
+
* @param {boolean} transformations - Are image transformations enabled?
|
|
149
158
|
* @throws {AppwriteException}
|
|
150
159
|
* @returns {Promise<Models.Bucket>}
|
|
151
160
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
152
161
|
*/
|
|
153
|
-
updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
|
|
162
|
+
updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;
|
|
154
163
|
/**
|
|
155
164
|
* Delete a storage bucket by its unique ID.
|
|
156
165
|
*
|
|
@@ -176,6 +185,7 @@ declare class Storage {
|
|
|
176
185
|
* @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
|
|
177
186
|
* @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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded
|
|
178
187
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
188
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
179
189
|
* @throws {AppwriteException}
|
|
180
190
|
* @returns {Promise<Models.FileList>}
|
|
181
191
|
*/
|
|
@@ -183,6 +193,7 @@ declare class Storage {
|
|
|
183
193
|
bucketId: string;
|
|
184
194
|
queries?: string[];
|
|
185
195
|
search?: string;
|
|
196
|
+
total?: boolean;
|
|
186
197
|
}): Promise<Models.FileList>;
|
|
187
198
|
/**
|
|
188
199
|
* Get a list of all the user files. You can use the query params to filter your results.
|
|
@@ -190,11 +201,12 @@ declare class Storage {
|
|
|
190
201
|
* @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
|
|
191
202
|
* @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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded
|
|
192
203
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
204
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
193
205
|
* @throws {AppwriteException}
|
|
194
206
|
* @returns {Promise<Models.FileList>}
|
|
195
207
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
196
208
|
*/
|
|
197
|
-
listFiles(bucketId: string, queries?: string[], search?: string): Promise<Models.FileList>;
|
|
209
|
+
listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;
|
|
198
210
|
/**
|
|
199
211
|
* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
|
|
200
212
|
*
|
|
@@ -21,25 +21,28 @@ declare class Storage {
|
|
|
21
21
|
/**
|
|
22
22
|
* Get a list of all the storage buckets. You can use the query params to filter your results.
|
|
23
23
|
*
|
|
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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus
|
|
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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations
|
|
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.BucketList>}
|
|
28
29
|
*/
|
|
29
30
|
listBuckets(params?: {
|
|
30
31
|
queries?: string[];
|
|
31
32
|
search?: string;
|
|
33
|
+
total?: boolean;
|
|
32
34
|
}): Promise<Models.BucketList>;
|
|
33
35
|
/**
|
|
34
36
|
* Get a list of all the storage buckets. You can use the query params to filter your results.
|
|
35
37
|
*
|
|
36
|
-
* @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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus
|
|
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: enabled, name, fileSecurity, maximumFileSize, encryption, antivirus, transformations
|
|
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.BucketList>}
|
|
40
43
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
41
44
|
*/
|
|
42
|
-
listBuckets(queries?: string[], search?: string): Promise<Models.BucketList>;
|
|
45
|
+
listBuckets(queries?: string[], search?: string, total?: boolean): Promise<Models.BucketList>;
|
|
43
46
|
/**
|
|
44
47
|
* Create a new storage bucket.
|
|
45
48
|
*
|
|
@@ -53,6 +56,7 @@ declare class Storage {
|
|
|
53
56
|
* @param {Compression} params.compression - Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
54
57
|
* @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
55
58
|
* @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
|
59
|
+
* @param {boolean} params.transformations - Are image transformations enabled?
|
|
56
60
|
* @throws {AppwriteException}
|
|
57
61
|
* @returns {Promise<Models.Bucket>}
|
|
58
62
|
*/
|
|
@@ -67,6 +71,7 @@ declare class Storage {
|
|
|
67
71
|
compression?: Compression;
|
|
68
72
|
encryption?: boolean;
|
|
69
73
|
antivirus?: boolean;
|
|
74
|
+
transformations?: boolean;
|
|
70
75
|
}): Promise<Models.Bucket>;
|
|
71
76
|
/**
|
|
72
77
|
* Create a new storage bucket.
|
|
@@ -81,11 +86,12 @@ declare class Storage {
|
|
|
81
86
|
* @param {Compression} compression - Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
82
87
|
* @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
83
88
|
* @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
|
89
|
+
* @param {boolean} transformations - Are image transformations enabled?
|
|
84
90
|
* @throws {AppwriteException}
|
|
85
91
|
* @returns {Promise<Models.Bucket>}
|
|
86
92
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
87
93
|
*/
|
|
88
|
-
createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
|
|
94
|
+
createBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;
|
|
89
95
|
/**
|
|
90
96
|
* Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.
|
|
91
97
|
*
|
|
@@ -118,6 +124,7 @@ declare class Storage {
|
|
|
118
124
|
* @param {Compression} params.compression - Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
119
125
|
* @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
120
126
|
* @param {boolean} params.antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
|
127
|
+
* @param {boolean} params.transformations - Are image transformations enabled?
|
|
121
128
|
* @throws {AppwriteException}
|
|
122
129
|
* @returns {Promise<Models.Bucket>}
|
|
123
130
|
*/
|
|
@@ -132,6 +139,7 @@ declare class Storage {
|
|
|
132
139
|
compression?: Compression;
|
|
133
140
|
encryption?: boolean;
|
|
134
141
|
antivirus?: boolean;
|
|
142
|
+
transformations?: boolean;
|
|
135
143
|
}): Promise<Models.Bucket>;
|
|
136
144
|
/**
|
|
137
145
|
* Update a storage bucket by its unique ID.
|
|
@@ -146,11 +154,12 @@ declare class Storage {
|
|
|
146
154
|
* @param {Compression} compression - Compression algorithm choosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
147
155
|
* @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
148
156
|
* @param {boolean} antivirus - Is virus scanning enabled? For file size above 20MB AntiVirus scanning is skipped even if it's enabled
|
|
157
|
+
* @param {boolean} transformations - Are image transformations enabled?
|
|
149
158
|
* @throws {AppwriteException}
|
|
150
159
|
* @returns {Promise<Models.Bucket>}
|
|
151
160
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
152
161
|
*/
|
|
153
|
-
updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean): Promise<Models.Bucket>;
|
|
162
|
+
updateBucket(bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean): Promise<Models.Bucket>;
|
|
154
163
|
/**
|
|
155
164
|
* Delete a storage bucket by its unique ID.
|
|
156
165
|
*
|
|
@@ -176,6 +185,7 @@ declare class Storage {
|
|
|
176
185
|
* @param {string} params.bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
|
|
177
186
|
* @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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded
|
|
178
187
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
188
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
179
189
|
* @throws {AppwriteException}
|
|
180
190
|
* @returns {Promise<Models.FileList>}
|
|
181
191
|
*/
|
|
@@ -183,6 +193,7 @@ declare class Storage {
|
|
|
183
193
|
bucketId: string;
|
|
184
194
|
queries?: string[];
|
|
185
195
|
search?: string;
|
|
196
|
+
total?: boolean;
|
|
186
197
|
}): Promise<Models.FileList>;
|
|
187
198
|
/**
|
|
188
199
|
* Get a list of all the user files. You can use the query params to filter your results.
|
|
@@ -190,11 +201,12 @@ declare class Storage {
|
|
|
190
201
|
* @param {string} bucketId - Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
|
|
191
202
|
* @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, signature, mimeType, sizeOriginal, chunksTotal, chunksUploaded
|
|
192
203
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
204
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
193
205
|
* @throws {AppwriteException}
|
|
194
206
|
* @returns {Promise<Models.FileList>}
|
|
195
207
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
196
208
|
*/
|
|
197
|
-
listFiles(bucketId: string, queries?: string[], search?: string): Promise<Models.FileList>;
|
|
209
|
+
listFiles(bucketId: string, queries?: string[], search?: string, total?: boolean): Promise<Models.FileList>;
|
|
198
210
|
/**
|
|
199
211
|
* Create a new file. Before using this route, you should create a new bucket resource using either a [server integration](https://appwrite.io/docs/server/storage#storageCreateBucket) API or directly from your Appwrite console.
|
|
200
212
|
*
|
package/dist/services/storage.js
CHANGED
|
@@ -13,11 +13,13 @@ class Storage {
|
|
|
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 = "/storage/buckets";
|
|
22
24
|
const payload = {};
|
|
23
25
|
if (typeof queries !== "undefined") {
|
|
@@ -26,6 +28,9 @@ class Storage {
|
|
|
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(
|
|
@@ -50,7 +55,8 @@ class Storage {
|
|
|
50
55
|
allowedFileExtensions: rest[5],
|
|
51
56
|
compression: rest[6],
|
|
52
57
|
encryption: rest[7],
|
|
53
|
-
antivirus: rest[8]
|
|
58
|
+
antivirus: rest[8],
|
|
59
|
+
transformations: rest[9]
|
|
54
60
|
};
|
|
55
61
|
}
|
|
56
62
|
const bucketId = params.bucketId;
|
|
@@ -63,6 +69,7 @@ class Storage {
|
|
|
63
69
|
const compression = params.compression;
|
|
64
70
|
const encryption = params.encryption;
|
|
65
71
|
const antivirus = params.antivirus;
|
|
72
|
+
const transformations = params.transformations;
|
|
66
73
|
if (typeof bucketId === "undefined") {
|
|
67
74
|
throw new client.AppwriteException('Missing required parameter: "bucketId"');
|
|
68
75
|
}
|
|
@@ -101,6 +108,9 @@ class Storage {
|
|
|
101
108
|
if (typeof antivirus !== "undefined") {
|
|
102
109
|
payload["antivirus"] = antivirus;
|
|
103
110
|
}
|
|
111
|
+
if (typeof transformations !== "undefined") {
|
|
112
|
+
payload["transformations"] = transformations;
|
|
113
|
+
}
|
|
104
114
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
105
115
|
const apiHeaders = {
|
|
106
116
|
"content-type": "application/json"
|
|
@@ -151,7 +161,8 @@ class Storage {
|
|
|
151
161
|
allowedFileExtensions: rest[5],
|
|
152
162
|
compression: rest[6],
|
|
153
163
|
encryption: rest[7],
|
|
154
|
-
antivirus: rest[8]
|
|
164
|
+
antivirus: rest[8],
|
|
165
|
+
transformations: rest[9]
|
|
155
166
|
};
|
|
156
167
|
}
|
|
157
168
|
const bucketId = params.bucketId;
|
|
@@ -164,6 +175,7 @@ class Storage {
|
|
|
164
175
|
const compression = params.compression;
|
|
165
176
|
const encryption = params.encryption;
|
|
166
177
|
const antivirus = params.antivirus;
|
|
178
|
+
const transformations = params.transformations;
|
|
167
179
|
if (typeof bucketId === "undefined") {
|
|
168
180
|
throw new client.AppwriteException('Missing required parameter: "bucketId"');
|
|
169
181
|
}
|
|
@@ -199,6 +211,9 @@ class Storage {
|
|
|
199
211
|
if (typeof antivirus !== "undefined") {
|
|
200
212
|
payload["antivirus"] = antivirus;
|
|
201
213
|
}
|
|
214
|
+
if (typeof transformations !== "undefined") {
|
|
215
|
+
payload["transformations"] = transformations;
|
|
216
|
+
}
|
|
202
217
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
203
218
|
const apiHeaders = {
|
|
204
219
|
"content-type": "application/json"
|
|
@@ -244,12 +259,14 @@ class Storage {
|
|
|
244
259
|
params = {
|
|
245
260
|
bucketId: paramsOrFirst,
|
|
246
261
|
queries: rest[0],
|
|
247
|
-
search: rest[1]
|
|
262
|
+
search: rest[1],
|
|
263
|
+
total: rest[2]
|
|
248
264
|
};
|
|
249
265
|
}
|
|
250
266
|
const bucketId = params.bucketId;
|
|
251
267
|
const queries = params.queries;
|
|
252
268
|
const search = params.search;
|
|
269
|
+
const total = params.total;
|
|
253
270
|
if (typeof bucketId === "undefined") {
|
|
254
271
|
throw new client.AppwriteException('Missing required parameter: "bucketId"');
|
|
255
272
|
}
|
|
@@ -261,6 +278,9 @@ class Storage {
|
|
|
261
278
|
if (typeof search !== "undefined") {
|
|
262
279
|
payload["search"] = search;
|
|
263
280
|
}
|
|
281
|
+
if (typeof total !== "undefined") {
|
|
282
|
+
payload["total"] = total;
|
|
283
|
+
}
|
|
264
284
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
265
285
|
const apiHeaders = {};
|
|
266
286
|
return this.client.call(
|