@appwrite.io/console 2.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +1564 -187
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1565 -188
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1564 -187
- package/docs/examples/account/create-key.md +15 -0
- package/docs/examples/account/delete-key.md +13 -0
- package/docs/examples/account/get-key.md +13 -0
- package/docs/examples/account/list-keys.md +13 -0
- package/docs/examples/account/update-key.md +16 -0
- package/docs/examples/avatars/get-screenshot.md +5 -5
- package/docs/examples/backups/create-archive.md +2 -2
- package/docs/examples/backups/create-policy.md +2 -2
- package/docs/examples/backups/create-restoration.md +2 -2
- package/docs/examples/console/{get-regions.md → list-regions.md} +1 -3
- package/docs/examples/databases/create-index.md +2 -2
- package/docs/examples/databases/create-longtext-attribute.md +18 -0
- package/docs/examples/databases/create-mediumtext-attribute.md +18 -0
- package/docs/examples/databases/create-text-attribute.md +18 -0
- package/docs/examples/databases/create-varchar-attribute.md +19 -0
- package/docs/examples/databases/update-collection.md +1 -1
- package/docs/examples/databases/update-longtext-attribute.md +18 -0
- package/docs/examples/databases/update-mediumtext-attribute.md +18 -0
- package/docs/examples/databases/update-text-attribute.md +18 -0
- package/docs/examples/databases/update-varchar-attribute.md +19 -0
- package/docs/examples/databases/update.md +1 -1
- package/docs/examples/functions/create.md +2 -2
- package/docs/examples/functions/list-templates.md +3 -3
- package/docs/examples/functions/update.md +2 -2
- package/docs/examples/migrations/create-appwrite-migration.md +2 -2
- package/docs/examples/migrations/create-firebase-migration.md +2 -2
- package/docs/examples/migrations/create-n-host-migration.md +2 -2
- package/docs/examples/migrations/create-supabase-migration.md +2 -2
- package/docs/examples/migrations/get-appwrite-report.md +2 -2
- package/docs/examples/migrations/get-firebase-report.md +2 -2
- package/docs/examples/migrations/get-n-host-report.md +2 -2
- package/docs/examples/migrations/get-supabase-report.md +2 -2
- package/docs/examples/organizations/create-key.md +16 -0
- package/docs/examples/organizations/create.md +2 -2
- package/docs/examples/organizations/delete-key.md +14 -0
- package/docs/examples/organizations/estimation-create-organization.md +2 -2
- package/docs/examples/organizations/estimation-update-plan.md +2 -2
- package/docs/examples/organizations/get-key.md +14 -0
- package/docs/examples/organizations/list-keys.md +14 -0
- package/docs/examples/organizations/list-regions.md +13 -0
- package/docs/examples/organizations/update-key.md +17 -0
- package/docs/examples/organizations/update-plan.md +2 -2
- package/docs/examples/projects/create-jwt.md +2 -2
- package/docs/examples/projects/create-key.md +2 -2
- package/docs/examples/projects/update-key.md +2 -2
- package/docs/examples/sites/list-templates.md +3 -3
- package/docs/examples/tablesdb/create-index.md +2 -2
- package/docs/examples/tablesdb/create-longtext-column.md +18 -0
- package/docs/examples/tablesdb/create-mediumtext-column.md +18 -0
- package/docs/examples/tablesdb/create-text-column.md +18 -0
- package/docs/examples/tablesdb/create-varchar-column.md +19 -0
- package/docs/examples/tablesdb/update-longtext-column.md +18 -0
- package/docs/examples/tablesdb/update-mediumtext-column.md +18 -0
- package/docs/examples/tablesdb/update-table.md +1 -1
- package/docs/examples/tablesdb/update-text-column.md +18 -0
- package/docs/examples/tablesdb/update-varchar-column.md +19 -0
- package/docs/examples/tablesdb/update.md +1 -1
- package/docs/examples/teams/create-membership.md +2 -2
- package/docs/examples/teams/update-membership.md +2 -2
- package/package.json +1 -1
- package/src/channel.ts +8 -4
- package/src/client.ts +3 -28
- package/src/enums/browser-permission.ts +22 -0
- package/src/enums/deployment-status.ts +1 -0
- package/src/enums/frameworks.ts +17 -0
- package/src/enums/order-by.ts +4 -0
- package/src/enums/resources.ts +13 -0
- package/src/enums/roles.ts +7 -0
- package/src/enums/runtimes.ts +66 -0
- package/src/enums/scopes.ts +65 -0
- package/src/enums/services.ts +5 -0
- package/src/enums/use-cases.ts +11 -0
- package/src/index.ts +9 -1
- package/src/models.ts +349 -1
- package/src/services/account.ts +364 -56
- package/src/services/assistant.ts +1 -1
- package/src/services/avatars.ts +17 -16
- package/src/services/backups.ts +37 -36
- package/src/services/console.ts +11 -42
- package/src/services/databases.ts +1060 -280
- package/src/services/domains.ts +44 -44
- package/src/services/functions.ts +60 -57
- package/src/services/graphql.ts +2 -2
- package/src/services/health.ts +22 -20
- package/src/services/messaging.ts +56 -56
- package/src/services/migrations.ts +79 -78
- package/src/services/organizations.ts +466 -70
- package/src/services/project.ts +5 -5
- package/src/services/projects.ts +86 -85
- package/src/services/proxy.ts +8 -8
- package/src/services/sites.ts +42 -40
- package/src/services/storage.ts +16 -16
- package/src/services/tables-db.ts +1050 -268
- package/src/services/teams.ts +31 -30
- package/src/services/tokens.ts +5 -5
- package/src/services/users.ts +49 -49
- package/src/services/vcs.ts +10 -10
- package/types/channel.d.ts +5 -4
- package/types/enums/browser-permission.d.ts +22 -0
- package/types/enums/deployment-status.d.ts +1 -0
- package/types/enums/frameworks.d.ts +17 -0
- package/types/enums/order-by.d.ts +4 -0
- package/types/enums/resources.d.ts +13 -0
- package/types/enums/roles.d.ts +7 -0
- package/types/enums/runtimes.d.ts +66 -0
- package/types/enums/scopes.d.ts +65 -0
- package/types/enums/services.d.ts +5 -0
- package/types/enums/use-cases.d.ts +11 -0
- package/types/index.d.ts +9 -1
- package/types/models.d.ts +341 -1
- package/types/services/account.d.ts +111 -0
- package/types/services/avatars.d.ts +5 -4
- package/types/services/backups.d.ts +13 -12
- package/types/services/console.d.ts +1 -13
- package/types/services/databases.d.ts +303 -8
- package/types/services/functions.d.ts +18 -15
- package/types/services/health.d.ts +2 -0
- package/types/services/migrations.d.ts +33 -32
- package/types/services/organizations.d.ts +161 -17
- package/types/services/projects.d.ts +13 -12
- package/types/services/sites.d.ts +9 -7
- package/types/services/tables-db.d.ts +305 -8
- package/types/services/teams.d.ts +9 -8
- package/src/enums/billing-plan.ts +0 -17
- package/types/enums/billing-plan.d.ts +0 -17
package/src/services/proxy.ts
CHANGED
|
@@ -21,7 +21,7 @@ export class Proxy {
|
|
|
21
21
|
* @throws {AppwriteException}
|
|
22
22
|
* @returns {Promise<Models.ProxyRuleList>}
|
|
23
23
|
*/
|
|
24
|
-
listRules(params?: { queries?: string[], search?: string, total?: boolean
|
|
24
|
+
listRules(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.ProxyRuleList>;
|
|
25
25
|
/**
|
|
26
26
|
* Get a list of all the proxy rules. You can use the query params to filter your results.
|
|
27
27
|
*
|
|
@@ -85,7 +85,7 @@ export class Proxy {
|
|
|
85
85
|
* @throws {AppwriteException}
|
|
86
86
|
* @returns {Promise<Models.ProxyRule>}
|
|
87
87
|
*/
|
|
88
|
-
createAPIRule(params: { domain: string
|
|
88
|
+
createAPIRule(params: { domain: string }): Promise<Models.ProxyRule>;
|
|
89
89
|
/**
|
|
90
90
|
* Create a new proxy rule for serving Appwrite's API on custom domain.
|
|
91
91
|
*
|
|
@@ -142,7 +142,7 @@ export class Proxy {
|
|
|
142
142
|
* @throws {AppwriteException}
|
|
143
143
|
* @returns {Promise<Models.ProxyRule>}
|
|
144
144
|
*/
|
|
145
|
-
createFunctionRule(params: { domain: string, functionId: string, branch?: string
|
|
145
|
+
createFunctionRule(params: { domain: string, functionId: string, branch?: string }): Promise<Models.ProxyRule>;
|
|
146
146
|
/**
|
|
147
147
|
* Create a new proxy rule for executing Appwrite Function on custom domain.
|
|
148
148
|
*
|
|
@@ -217,7 +217,7 @@ export class Proxy {
|
|
|
217
217
|
* @throws {AppwriteException}
|
|
218
218
|
* @returns {Promise<Models.ProxyRule>}
|
|
219
219
|
*/
|
|
220
|
-
createRedirectRule(params: { domain: string, url: string, statusCode: StatusCode, resourceId: string, resourceType: ProxyResourceType
|
|
220
|
+
createRedirectRule(params: { domain: string, url: string, statusCode: StatusCode, resourceId: string, resourceType: ProxyResourceType }): Promise<Models.ProxyRule>;
|
|
221
221
|
/**
|
|
222
222
|
* Create a new proxy rule for to redirect from custom domain to another domain.
|
|
223
223
|
*
|
|
@@ -311,7 +311,7 @@ export class Proxy {
|
|
|
311
311
|
* @throws {AppwriteException}
|
|
312
312
|
* @returns {Promise<Models.ProxyRule>}
|
|
313
313
|
*/
|
|
314
|
-
createSiteRule(params: { domain: string, siteId: string, branch?: string
|
|
314
|
+
createSiteRule(params: { domain: string, siteId: string, branch?: string }): Promise<Models.ProxyRule>;
|
|
315
315
|
/**
|
|
316
316
|
* Create a new proxy rule for serving Appwrite Site on custom domain.
|
|
317
317
|
*
|
|
@@ -382,7 +382,7 @@ export class Proxy {
|
|
|
382
382
|
* @throws {AppwriteException}
|
|
383
383
|
* @returns {Promise<Models.ProxyRule>}
|
|
384
384
|
*/
|
|
385
|
-
getRule(params: { ruleId: string
|
|
385
|
+
getRule(params: { ruleId: string }): Promise<Models.ProxyRule>;
|
|
386
386
|
/**
|
|
387
387
|
* Get a proxy rule by its unique ID.
|
|
388
388
|
*
|
|
@@ -433,7 +433,7 @@ export class Proxy {
|
|
|
433
433
|
* @throws {AppwriteException}
|
|
434
434
|
* @returns {Promise<{}>}
|
|
435
435
|
*/
|
|
436
|
-
deleteRule(params: { ruleId: string
|
|
436
|
+
deleteRule(params: { ruleId: string }): Promise<{}>;
|
|
437
437
|
/**
|
|
438
438
|
* Delete a proxy rule by its unique ID.
|
|
439
439
|
*
|
|
@@ -485,7 +485,7 @@ export class Proxy {
|
|
|
485
485
|
* @throws {AppwriteException}
|
|
486
486
|
* @returns {Promise<Models.ProxyRule>}
|
|
487
487
|
*/
|
|
488
|
-
updateRuleVerification(params: { ruleId: string
|
|
488
|
+
updateRuleVerification(params: { ruleId: string }): Promise<Models.ProxyRule>;
|
|
489
489
|
/**
|
|
490
490
|
* Retry getting verification process of a proxy rule. This endpoint triggers domain verification by checking DNS records (CNAME) against the configured target domain. If verification is successful, a TLS certificate will be automatically provisioned for the domain.
|
|
491
491
|
*
|
package/src/services/sites.ts
CHANGED
|
@@ -5,6 +5,8 @@ import type { Models } from '../models';
|
|
|
5
5
|
import { Framework } from '../enums/framework';
|
|
6
6
|
import { BuildRuntime } from '../enums/build-runtime';
|
|
7
7
|
import { Adapter } from '../enums/adapter';
|
|
8
|
+
import { Frameworks } from '../enums/frameworks';
|
|
9
|
+
import { UseCases } from '../enums/use-cases';
|
|
8
10
|
import { UsageRange } from '../enums/usage-range';
|
|
9
11
|
import { TemplateReferenceType } from '../enums/template-reference-type';
|
|
10
12
|
import { VCSReferenceType } from '../enums/vcs-reference-type';
|
|
@@ -26,7 +28,7 @@ export class Sites {
|
|
|
26
28
|
* @throws {AppwriteException}
|
|
27
29
|
* @returns {Promise<Models.SiteList>}
|
|
28
30
|
*/
|
|
29
|
-
list(params?: { queries?: string[], search?: string, total?: boolean
|
|
31
|
+
list(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.SiteList>;
|
|
30
32
|
/**
|
|
31
33
|
* Get a list of all the project's sites. You can use the query params to filter your results.
|
|
32
34
|
*
|
|
@@ -107,7 +109,7 @@ export class Sites {
|
|
|
107
109
|
* @throws {AppwriteException}
|
|
108
110
|
* @returns {Promise<Models.Site>}
|
|
109
111
|
*/
|
|
110
|
-
create(params: { siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string
|
|
112
|
+
create(params: { siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Site>;
|
|
111
113
|
/**
|
|
112
114
|
* Create a new site.
|
|
113
115
|
*
|
|
@@ -316,38 +318,38 @@ export class Sites {
|
|
|
316
318
|
/**
|
|
317
319
|
* List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
|
|
318
320
|
*
|
|
319
|
-
* @param {
|
|
320
|
-
* @param {
|
|
321
|
+
* @param {Frameworks[]} params.frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
|
|
322
|
+
* @param {UseCases[]} params.useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
|
|
321
323
|
* @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
322
324
|
* @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
|
|
323
325
|
* @throws {AppwriteException}
|
|
324
326
|
* @returns {Promise<Models.TemplateSiteList>}
|
|
325
327
|
*/
|
|
326
|
-
listTemplates(params?: { frameworks?:
|
|
328
|
+
listTemplates(params?: { frameworks?: Frameworks[], useCases?: UseCases[], limit?: number, offset?: number }): Promise<Models.TemplateSiteList>;
|
|
327
329
|
/**
|
|
328
330
|
* List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
|
|
329
331
|
*
|
|
330
|
-
* @param {
|
|
331
|
-
* @param {
|
|
332
|
+
* @param {Frameworks[]} frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
|
|
333
|
+
* @param {UseCases[]} useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
|
|
332
334
|
* @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
|
|
333
335
|
* @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
|
|
334
336
|
* @throws {AppwriteException}
|
|
335
337
|
* @returns {Promise<Models.TemplateSiteList>}
|
|
336
338
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
337
339
|
*/
|
|
338
|
-
listTemplates(frameworks?:
|
|
340
|
+
listTemplates(frameworks?: Frameworks[], useCases?: UseCases[], limit?: number, offset?: number): Promise<Models.TemplateSiteList>;
|
|
339
341
|
listTemplates(
|
|
340
|
-
paramsOrFirst?: { frameworks?:
|
|
341
|
-
...rest: [(
|
|
342
|
+
paramsOrFirst?: { frameworks?: Frameworks[], useCases?: UseCases[], limit?: number, offset?: number } | Frameworks[],
|
|
343
|
+
...rest: [(UseCases[])?, (number)?, (number)?]
|
|
342
344
|
): Promise<Models.TemplateSiteList> {
|
|
343
|
-
let params: { frameworks?:
|
|
345
|
+
let params: { frameworks?: Frameworks[], useCases?: UseCases[], limit?: number, offset?: number };
|
|
344
346
|
|
|
345
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
346
|
-
params = (paramsOrFirst || {}) as { frameworks?:
|
|
347
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'frameworks' in paramsOrFirst)) {
|
|
348
|
+
params = (paramsOrFirst || {}) as { frameworks?: Frameworks[], useCases?: UseCases[], limit?: number, offset?: number };
|
|
347
349
|
} else {
|
|
348
350
|
params = {
|
|
349
|
-
frameworks: paramsOrFirst as
|
|
350
|
-
useCases: rest[0] as
|
|
351
|
+
frameworks: paramsOrFirst as Frameworks[],
|
|
352
|
+
useCases: rest[0] as UseCases[],
|
|
351
353
|
limit: rest[1] as number,
|
|
352
354
|
offset: rest[2] as number
|
|
353
355
|
};
|
|
@@ -393,7 +395,7 @@ export class Sites {
|
|
|
393
395
|
* @throws {AppwriteException}
|
|
394
396
|
* @returns {Promise<Models.TemplateSite>}
|
|
395
397
|
*/
|
|
396
|
-
getTemplate(params: { templateId: string
|
|
398
|
+
getTemplate(params: { templateId: string }): Promise<Models.TemplateSite>;
|
|
397
399
|
/**
|
|
398
400
|
* Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
|
|
399
401
|
*
|
|
@@ -444,7 +446,7 @@ export class Sites {
|
|
|
444
446
|
* @throws {AppwriteException}
|
|
445
447
|
* @returns {Promise<Models.UsageSites>}
|
|
446
448
|
*/
|
|
447
|
-
listUsage(params?: { range?: UsageRange
|
|
449
|
+
listUsage(params?: { range?: UsageRange }): Promise<Models.UsageSites>;
|
|
448
450
|
/**
|
|
449
451
|
* Get usage metrics and statistics for all sites in the project. View statistics including total deployments, builds, logs, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
|
|
450
452
|
*
|
|
@@ -495,7 +497,7 @@ export class Sites {
|
|
|
495
497
|
* @throws {AppwriteException}
|
|
496
498
|
* @returns {Promise<Models.Site>}
|
|
497
499
|
*/
|
|
498
|
-
get(params: { siteId: string
|
|
500
|
+
get(params: { siteId: string }): Promise<Models.Site>;
|
|
499
501
|
/**
|
|
500
502
|
* Get a site by its unique ID.
|
|
501
503
|
*
|
|
@@ -563,7 +565,7 @@ export class Sites {
|
|
|
563
565
|
* @throws {AppwriteException}
|
|
564
566
|
* @returns {Promise<Models.Site>}
|
|
565
567
|
*/
|
|
566
|
-
update(params: { siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string
|
|
568
|
+
update(params: { siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, specification?: string }): Promise<Models.Site>;
|
|
567
569
|
/**
|
|
568
570
|
* Update site by its unique ID.
|
|
569
571
|
*
|
|
@@ -724,7 +726,7 @@ export class Sites {
|
|
|
724
726
|
* @throws {AppwriteException}
|
|
725
727
|
* @returns {Promise<{}>}
|
|
726
728
|
*/
|
|
727
|
-
delete(params: { siteId: string
|
|
729
|
+
delete(params: { siteId: string }): Promise<{}>;
|
|
728
730
|
/**
|
|
729
731
|
* Delete a site by its unique ID.
|
|
730
732
|
*
|
|
@@ -777,7 +779,7 @@ export class Sites {
|
|
|
777
779
|
* @throws {AppwriteException}
|
|
778
780
|
* @returns {Promise<Models.Site>}
|
|
779
781
|
*/
|
|
780
|
-
updateSiteDeployment(params: { siteId: string, deploymentId: string
|
|
782
|
+
updateSiteDeployment(params: { siteId: string, deploymentId: string }): Promise<Models.Site>;
|
|
781
783
|
/**
|
|
782
784
|
* Update the site active deployment. Use this endpoint to switch the code deployment that should be used when visitor opens your site.
|
|
783
785
|
*
|
|
@@ -842,7 +844,7 @@ export class Sites {
|
|
|
842
844
|
* @throws {AppwriteException}
|
|
843
845
|
* @returns {Promise<Models.DeploymentList>}
|
|
844
846
|
*/
|
|
845
|
-
listDeployments(params: { siteId: string, queries?: string[], search?: string, total?: boolean
|
|
847
|
+
listDeployments(params: { siteId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.DeploymentList>;
|
|
846
848
|
/**
|
|
847
849
|
* Get a list of all the site's code deployments. You can use the query params to filter your results.
|
|
848
850
|
*
|
|
@@ -917,7 +919,7 @@ export class Sites {
|
|
|
917
919
|
* @throws {AppwriteException}
|
|
918
920
|
* @returns {Promise<Models.Deployment>}
|
|
919
921
|
*/
|
|
920
|
-
createDeployment(params: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string
|
|
922
|
+
createDeployment(params: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress?: (progress: UploadProgress) => void }): Promise<Models.Deployment>;
|
|
921
923
|
/**
|
|
922
924
|
* Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.
|
|
923
925
|
*
|
|
@@ -933,7 +935,7 @@ export class Sites {
|
|
|
933
935
|
*/
|
|
934
936
|
createDeployment(siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress?: (progress: UploadProgress) => void): Promise<Models.Deployment>;
|
|
935
937
|
createDeployment(
|
|
936
|
-
paramsOrFirst: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress?: (progress: UploadProgress) => void
|
|
938
|
+
paramsOrFirst: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string, onProgress?: (progress: UploadProgress) => void } | string,
|
|
937
939
|
...rest: [(File)?, (boolean)?, (string)?, (string)?, (string)?,((progress: UploadProgress) => void)?]
|
|
938
940
|
): Promise<Models.Deployment> {
|
|
939
941
|
let params: { siteId: string, code: File, activate: boolean, installCommand?: string, buildCommand?: string, outputDirectory?: string };
|
|
@@ -1011,7 +1013,7 @@ export class Sites {
|
|
|
1011
1013
|
* @throws {AppwriteException}
|
|
1012
1014
|
* @returns {Promise<Models.Deployment>}
|
|
1013
1015
|
*/
|
|
1014
|
-
createDuplicateDeployment(params: { siteId: string, deploymentId: string
|
|
1016
|
+
createDuplicateDeployment(params: { siteId: string, deploymentId: string }): Promise<Models.Deployment>;
|
|
1015
1017
|
/**
|
|
1016
1018
|
* Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.
|
|
1017
1019
|
*
|
|
@@ -1081,7 +1083,7 @@ export class Sites {
|
|
|
1081
1083
|
* @throws {AppwriteException}
|
|
1082
1084
|
* @returns {Promise<Models.Deployment>}
|
|
1083
1085
|
*/
|
|
1084
|
-
createTemplateDeployment(params: { siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean
|
|
1086
|
+
createTemplateDeployment(params: { siteId: string, repository: string, owner: string, rootDirectory: string, type: TemplateReferenceType, reference: string, activate?: boolean }): Promise<Models.Deployment>;
|
|
1085
1087
|
/**
|
|
1086
1088
|
* Create a deployment based on a template.
|
|
1087
1089
|
*
|
|
@@ -1192,7 +1194,7 @@ export class Sites {
|
|
|
1192
1194
|
* @throws {AppwriteException}
|
|
1193
1195
|
* @returns {Promise<Models.Deployment>}
|
|
1194
1196
|
*/
|
|
1195
|
-
createVcsDeployment(params: { siteId: string, type: VCSReferenceType, reference: string, activate?: boolean
|
|
1197
|
+
createVcsDeployment(params: { siteId: string, type: VCSReferenceType, reference: string, activate?: boolean }): Promise<Models.Deployment>;
|
|
1196
1198
|
/**
|
|
1197
1199
|
* Create a deployment when a site is connected to VCS.
|
|
1198
1200
|
*
|
|
@@ -1272,7 +1274,7 @@ export class Sites {
|
|
|
1272
1274
|
* @throws {AppwriteException}
|
|
1273
1275
|
* @returns {Promise<Models.Deployment>}
|
|
1274
1276
|
*/
|
|
1275
|
-
getDeployment(params: { siteId: string, deploymentId: string
|
|
1277
|
+
getDeployment(params: { siteId: string, deploymentId: string }): Promise<Models.Deployment>;
|
|
1276
1278
|
/**
|
|
1277
1279
|
* Get a site deployment by its unique ID.
|
|
1278
1280
|
*
|
|
@@ -1331,7 +1333,7 @@ export class Sites {
|
|
|
1331
1333
|
* @throws {AppwriteException}
|
|
1332
1334
|
* @returns {Promise<{}>}
|
|
1333
1335
|
*/
|
|
1334
|
-
deleteDeployment(params: { siteId: string, deploymentId: string
|
|
1336
|
+
deleteDeployment(params: { siteId: string, deploymentId: string }): Promise<{}>;
|
|
1335
1337
|
/**
|
|
1336
1338
|
* Delete a site deployment by its unique ID.
|
|
1337
1339
|
*
|
|
@@ -1392,7 +1394,7 @@ export class Sites {
|
|
|
1392
1394
|
* @throws {AppwriteException}
|
|
1393
1395
|
* @returns {string}
|
|
1394
1396
|
*/
|
|
1395
|
-
getDeploymentDownload(params: { siteId: string, deploymentId: string, type?: DeploymentDownloadType
|
|
1397
|
+
getDeploymentDownload(params: { siteId: string, deploymentId: string, type?: DeploymentDownloadType }): string;
|
|
1396
1398
|
/**
|
|
1397
1399
|
* Get a site deployment content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
|
|
1398
1400
|
*
|
|
@@ -1458,7 +1460,7 @@ export class Sites {
|
|
|
1458
1460
|
* @throws {AppwriteException}
|
|
1459
1461
|
* @returns {Promise<Models.Deployment>}
|
|
1460
1462
|
*/
|
|
1461
|
-
updateDeploymentStatus(params: { siteId: string, deploymentId: string
|
|
1463
|
+
updateDeploymentStatus(params: { siteId: string, deploymentId: string }): Promise<Models.Deployment>;
|
|
1462
1464
|
/**
|
|
1463
1465
|
* Cancel an ongoing site deployment build. If the build is already in progress, it will be stopped and marked as canceled. If the build hasn't started yet, it will be marked as canceled without executing. You cannot cancel builds that have already completed (status 'ready') or failed. The response includes the final build status and details.
|
|
1464
1466
|
*
|
|
@@ -1519,7 +1521,7 @@ export class Sites {
|
|
|
1519
1521
|
* @throws {AppwriteException}
|
|
1520
1522
|
* @returns {Promise<Models.ExecutionList>}
|
|
1521
1523
|
*/
|
|
1522
|
-
listLogs(params: { siteId: string, queries?: string[], total?: boolean
|
|
1524
|
+
listLogs(params: { siteId: string, queries?: string[], total?: boolean }): Promise<Models.ExecutionList>;
|
|
1523
1525
|
/**
|
|
1524
1526
|
* Get a list of all site logs. You can use the query params to filter your results.
|
|
1525
1527
|
*
|
|
@@ -1584,7 +1586,7 @@ export class Sites {
|
|
|
1584
1586
|
* @throws {AppwriteException}
|
|
1585
1587
|
* @returns {Promise<Models.Execution>}
|
|
1586
1588
|
*/
|
|
1587
|
-
getLog(params: { siteId: string, logId: string
|
|
1589
|
+
getLog(params: { siteId: string, logId: string }): Promise<Models.Execution>;
|
|
1588
1590
|
/**
|
|
1589
1591
|
* Get a site request log by its unique ID.
|
|
1590
1592
|
*
|
|
@@ -1643,7 +1645,7 @@ export class Sites {
|
|
|
1643
1645
|
* @throws {AppwriteException}
|
|
1644
1646
|
* @returns {Promise<{}>}
|
|
1645
1647
|
*/
|
|
1646
|
-
deleteLog(params: { siteId: string, logId: string
|
|
1648
|
+
deleteLog(params: { siteId: string, logId: string }): Promise<{}>;
|
|
1647
1649
|
/**
|
|
1648
1650
|
* Delete a site log by its unique ID.
|
|
1649
1651
|
*
|
|
@@ -1703,7 +1705,7 @@ export class Sites {
|
|
|
1703
1705
|
* @throws {AppwriteException}
|
|
1704
1706
|
* @returns {Promise<Models.UsageSite>}
|
|
1705
1707
|
*/
|
|
1706
|
-
getUsage(params: { siteId: string, range?: UsageRange
|
|
1708
|
+
getUsage(params: { siteId: string, range?: UsageRange }): Promise<Models.UsageSite>;
|
|
1707
1709
|
/**
|
|
1708
1710
|
* Get usage metrics and statistics for a for a specific site. View statistics including total deployments, builds, executions, storage usage, and compute time. The response includes both current totals and historical data for each metric. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, defaults to 30 days.
|
|
1709
1711
|
*
|
|
@@ -1761,7 +1763,7 @@ export class Sites {
|
|
|
1761
1763
|
* @throws {AppwriteException}
|
|
1762
1764
|
* @returns {Promise<Models.VariableList>}
|
|
1763
1765
|
*/
|
|
1764
|
-
listVariables(params: { siteId: string
|
|
1766
|
+
listVariables(params: { siteId: string }): Promise<Models.VariableList>;
|
|
1765
1767
|
/**
|
|
1766
1768
|
* Get a list of all variables of a specific site.
|
|
1767
1769
|
*
|
|
@@ -1815,7 +1817,7 @@ export class Sites {
|
|
|
1815
1817
|
* @throws {AppwriteException}
|
|
1816
1818
|
* @returns {Promise<Models.Variable>}
|
|
1817
1819
|
*/
|
|
1818
|
-
createVariable(params: { siteId: string, key: string, value: string, secret?: boolean
|
|
1820
|
+
createVariable(params: { siteId: string, key: string, value: string, secret?: boolean }): Promise<Models.Variable>;
|
|
1819
1821
|
/**
|
|
1820
1822
|
* Create a new site variable. These variables can be accessed during build and runtime (server-side rendering) as environment variables.
|
|
1821
1823
|
*
|
|
@@ -1893,7 +1895,7 @@ export class Sites {
|
|
|
1893
1895
|
* @throws {AppwriteException}
|
|
1894
1896
|
* @returns {Promise<Models.Variable>}
|
|
1895
1897
|
*/
|
|
1896
|
-
getVariable(params: { siteId: string, variableId: string
|
|
1898
|
+
getVariable(params: { siteId: string, variableId: string }): Promise<Models.Variable>;
|
|
1897
1899
|
/**
|
|
1898
1900
|
* Get a variable by its unique ID.
|
|
1899
1901
|
*
|
|
@@ -1955,7 +1957,7 @@ export class Sites {
|
|
|
1955
1957
|
* @throws {AppwriteException}
|
|
1956
1958
|
* @returns {Promise<Models.Variable>}
|
|
1957
1959
|
*/
|
|
1958
|
-
updateVariable(params: { siteId: string, variableId: string, key: string, value?: string, secret?: boolean
|
|
1960
|
+
updateVariable(params: { siteId: string, variableId: string, key: string, value?: string, secret?: boolean }): Promise<Models.Variable>;
|
|
1959
1961
|
/**
|
|
1960
1962
|
* Update variable by its unique ID.
|
|
1961
1963
|
*
|
|
@@ -2036,7 +2038,7 @@ export class Sites {
|
|
|
2036
2038
|
* @throws {AppwriteException}
|
|
2037
2039
|
* @returns {Promise<{}>}
|
|
2038
2040
|
*/
|
|
2039
|
-
deleteVariable(params: { siteId: string, variableId: string
|
|
2041
|
+
deleteVariable(params: { siteId: string, variableId: string }): Promise<{}>;
|
|
2040
2042
|
/**
|
|
2041
2043
|
* Delete a variable by its unique ID.
|
|
2042
2044
|
*
|
package/src/services/storage.ts
CHANGED
|
@@ -23,7 +23,7 @@ export class Storage {
|
|
|
23
23
|
* @throws {AppwriteException}
|
|
24
24
|
* @returns {Promise<Models.BucketList>}
|
|
25
25
|
*/
|
|
26
|
-
listBuckets(params?: { queries?: string[], search?: string, total?: boolean
|
|
26
|
+
listBuckets(params?: { queries?: string[], search?: string, total?: boolean }): Promise<Models.BucketList>;
|
|
27
27
|
/**
|
|
28
28
|
* Get a list of all the storage buckets. You can use the query params to filter your results.
|
|
29
29
|
*
|
|
@@ -97,7 +97,7 @@ export class Storage {
|
|
|
97
97
|
* @throws {AppwriteException}
|
|
98
98
|
* @returns {Promise<Models.Bucket>}
|
|
99
99
|
*/
|
|
100
|
-
createBucket(params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean
|
|
100
|
+
createBucket(params: { 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>;
|
|
101
101
|
/**
|
|
102
102
|
* Create a new storage bucket.
|
|
103
103
|
*
|
|
@@ -216,7 +216,7 @@ export class Storage {
|
|
|
216
216
|
* @throws {AppwriteException}
|
|
217
217
|
* @returns {Promise<Models.Bucket>}
|
|
218
218
|
*/
|
|
219
|
-
getBucket(params: { bucketId: string
|
|
219
|
+
getBucket(params: { bucketId: string }): Promise<Models.Bucket>;
|
|
220
220
|
/**
|
|
221
221
|
* Get a storage bucket by its unique ID. This endpoint response returns a JSON object with the storage bucket metadata.
|
|
222
222
|
*
|
|
@@ -277,7 +277,7 @@ export class Storage {
|
|
|
277
277
|
* @throws {AppwriteException}
|
|
278
278
|
* @returns {Promise<Models.Bucket>}
|
|
279
279
|
*/
|
|
280
|
-
updateBucket(params: { bucketId: string, name: string, permissions?: string[], fileSecurity?: boolean, enabled?: boolean, maximumFileSize?: number, allowedFileExtensions?: string[], compression?: Compression, encryption?: boolean, antivirus?: boolean, transformations?: boolean
|
|
280
|
+
updateBucket(params: { 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>;
|
|
281
281
|
/**
|
|
282
282
|
* Update a storage bucket by its unique ID.
|
|
283
283
|
*
|
|
@@ -393,7 +393,7 @@ export class Storage {
|
|
|
393
393
|
* @throws {AppwriteException}
|
|
394
394
|
* @returns {Promise<{}>}
|
|
395
395
|
*/
|
|
396
|
-
deleteBucket(params: { bucketId: string
|
|
396
|
+
deleteBucket(params: { bucketId: string }): Promise<{}>;
|
|
397
397
|
/**
|
|
398
398
|
* Delete a storage bucket by its unique ID.
|
|
399
399
|
*
|
|
@@ -448,7 +448,7 @@ export class Storage {
|
|
|
448
448
|
* @throws {AppwriteException}
|
|
449
449
|
* @returns {Promise<Models.FileList>}
|
|
450
450
|
*/
|
|
451
|
-
listFiles(params: { bucketId: string, queries?: string[], search?: string, total?: boolean
|
|
451
|
+
listFiles(params: { bucketId: string, queries?: string[], search?: string, total?: boolean }): Promise<Models.FileList>;
|
|
452
452
|
/**
|
|
453
453
|
* Get a list of all the user files. You can use the query params to filter your results.
|
|
454
454
|
*
|
|
@@ -528,7 +528,7 @@ export class Storage {
|
|
|
528
528
|
* @throws {AppwriteException}
|
|
529
529
|
* @returns {Promise<Models.File>}
|
|
530
530
|
*/
|
|
531
|
-
createFile(params: { bucketId: string, fileId: string, file: File, permissions?: string[]
|
|
531
|
+
createFile(params: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void }): Promise<Models.File>;
|
|
532
532
|
/**
|
|
533
533
|
* 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.
|
|
534
534
|
*
|
|
@@ -549,7 +549,7 @@ export class Storage {
|
|
|
549
549
|
*/
|
|
550
550
|
createFile(bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void): Promise<Models.File>;
|
|
551
551
|
createFile(
|
|
552
|
-
paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void
|
|
552
|
+
paramsOrFirst: { bucketId: string, fileId: string, file: File, permissions?: string[], onProgress?: (progress: UploadProgress) => void } | string,
|
|
553
553
|
...rest: [(string)?, (File)?, (string[])?,((progress: UploadProgress) => void)?]
|
|
554
554
|
): Promise<Models.File> {
|
|
555
555
|
let params: { bucketId: string, fileId: string, file: File, permissions?: string[] };
|
|
@@ -617,7 +617,7 @@ export class Storage {
|
|
|
617
617
|
* @throws {AppwriteException}
|
|
618
618
|
* @returns {Promise<Models.File>}
|
|
619
619
|
*/
|
|
620
|
-
getFile(params: { bucketId: string, fileId: string
|
|
620
|
+
getFile(params: { bucketId: string, fileId: string }): Promise<Models.File>;
|
|
621
621
|
/**
|
|
622
622
|
* Get a file by its unique ID. This endpoint response returns a JSON object with the file metadata.
|
|
623
623
|
*
|
|
@@ -678,7 +678,7 @@ export class Storage {
|
|
|
678
678
|
* @throws {AppwriteException}
|
|
679
679
|
* @returns {Promise<Models.File>}
|
|
680
680
|
*/
|
|
681
|
-
updateFile(params: { bucketId: string, fileId: string, name?: string, permissions?: string[]
|
|
681
|
+
updateFile(params: { bucketId: string, fileId: string, name?: string, permissions?: string[] }): Promise<Models.File>;
|
|
682
682
|
/**
|
|
683
683
|
* Update a file by its unique ID. Only users with write permissions have access to update this resource.
|
|
684
684
|
*
|
|
@@ -750,7 +750,7 @@ export class Storage {
|
|
|
750
750
|
* @throws {AppwriteException}
|
|
751
751
|
* @returns {Promise<{}>}
|
|
752
752
|
*/
|
|
753
|
-
deleteFile(params: { bucketId: string, fileId: string
|
|
753
|
+
deleteFile(params: { bucketId: string, fileId: string }): Promise<{}>;
|
|
754
754
|
/**
|
|
755
755
|
* Delete a file by its unique ID. Only users with write permissions have access to delete this resource.
|
|
756
756
|
*
|
|
@@ -811,7 +811,7 @@ export class Storage {
|
|
|
811
811
|
* @throws {AppwriteException}
|
|
812
812
|
* @returns {string}
|
|
813
813
|
*/
|
|
814
|
-
getFileDownload(params: { bucketId: string, fileId: string, token?: string
|
|
814
|
+
getFileDownload(params: { bucketId: string, fileId: string, token?: string }): string;
|
|
815
815
|
/**
|
|
816
816
|
* Get a file content by its unique ID. The endpoint response return with a 'Content-Disposition: attachment' header that tells the browser to start downloading the file to user downloads directory.
|
|
817
817
|
*
|
|
@@ -889,7 +889,7 @@ export class Storage {
|
|
|
889
889
|
* @throws {AppwriteException}
|
|
890
890
|
* @returns {string}
|
|
891
891
|
*/
|
|
892
|
-
getFilePreview(params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string
|
|
892
|
+
getFilePreview(params: { bucketId: string, fileId: string, width?: number, height?: number, gravity?: ImageGravity, quality?: number, borderWidth?: number, borderColor?: string, borderRadius?: number, opacity?: number, rotation?: number, background?: string, output?: ImageFormat, token?: string }): string;
|
|
893
893
|
/**
|
|
894
894
|
* Get a file preview image. Currently, this method supports preview for image files (jpg, png, and gif), other supported formats, like pdf, docs, slides, and spreadsheets, will return the file icon image. You can also pass query string arguments for cutting and resizing your preview image. Preview is supported only for image files smaller than 10MB.
|
|
895
895
|
*
|
|
@@ -1022,7 +1022,7 @@ export class Storage {
|
|
|
1022
1022
|
* @throws {AppwriteException}
|
|
1023
1023
|
* @returns {string}
|
|
1024
1024
|
*/
|
|
1025
|
-
getFileView(params: { bucketId: string, fileId: string, token?: string
|
|
1025
|
+
getFileView(params: { bucketId: string, fileId: string, token?: string }): string;
|
|
1026
1026
|
/**
|
|
1027
1027
|
* Get a file content by its unique ID. This endpoint is similar to the download method but returns with no 'Content-Disposition: attachment' header.
|
|
1028
1028
|
*
|
|
@@ -1088,7 +1088,7 @@ export class Storage {
|
|
|
1088
1088
|
* @throws {AppwriteException}
|
|
1089
1089
|
* @returns {Promise<Models.UsageStorage>}
|
|
1090
1090
|
*/
|
|
1091
|
-
getUsage(params?: { range?: UsageRange
|
|
1091
|
+
getUsage(params?: { range?: UsageRange }): Promise<Models.UsageStorage>;
|
|
1092
1092
|
/**
|
|
1093
1093
|
* Get usage metrics and statistics for all buckets in the project. You can view the total number of buckets, files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
1094
1094
|
*
|
|
@@ -1142,7 +1142,7 @@ export class Storage {
|
|
|
1142
1142
|
* @throws {AppwriteException}
|
|
1143
1143
|
* @returns {Promise<Models.UsageBuckets>}
|
|
1144
1144
|
*/
|
|
1145
|
-
getBucketUsage(params: { bucketId: string, range?: UsageRange
|
|
1145
|
+
getBucketUsage(params: { bucketId: string, range?: UsageRange }): Promise<Models.UsageBuckets>;
|
|
1146
1146
|
/**
|
|
1147
1147
|
* Get usage metrics and statistics a specific bucket in the project. You can view the total number of files, storage usage. The response includes both current totals and historical data over time. Use the optional range parameter to specify the time window for historical data: 24h (last 24 hours), 30d (last 30 days), or 90d (last 90 days). If not specified, range defaults to 30 days.
|
|
1148
1148
|
*
|