@appwrite.io/console 3.1.0 → 4.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/README.md +1 -1
- package/dist/cjs/sdk.js +345 -86
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +346 -87
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +345 -86
- package/docs/examples/databases/list-documents.md +2 -1
- package/docs/examples/domains/create-purchase.md +1 -1
- package/docs/examples/domains/create-transfer-in.md +18 -0
- package/docs/examples/domains/create-transfer-out.md +16 -0
- package/docs/examples/domains/get-transfer-status.md +15 -0
- package/docs/examples/health/get-console-pausing.md +16 -0
- 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/projects/update-console-access.md +15 -0
- package/docs/examples/projects/update-status.md +16 -0
- package/docs/examples/sites/create-deployment.md +2 -2
- package/docs/examples/tablesdb/list-rows.md +2 -1
- package/package.json +1 -1
- package/src/channel.ts +19 -15
- package/src/client.ts +1 -1
- package/src/enums/appwrite-migration-resource.ts +21 -0
- package/src/enums/domain-transfer-status-status.ts +10 -0
- package/src/enums/firebase-migration-resource.ts +12 -0
- package/src/enums/{resources.ts → n-host-migration-resource.ts} +1 -1
- package/src/enums/status.ts +3 -0
- package/src/enums/supabase-migration-resource.ts +13 -0
- package/src/index.ts +6 -1
- package/src/models.ts +119 -2
- package/src/services/account.ts +2 -2
- package/src/services/databases.ts +100 -93
- package/src/services/domains.ts +216 -13
- package/src/services/health.ts +61 -0
- package/src/services/messaging.ts +2 -2
- package/src/services/migrations.ts +68 -65
- package/src/services/projects.ts +120 -0
- package/src/services/sites.ts +13 -16
- package/src/services/tables-db.ts +14 -7
- package/src/services/teams.ts +4 -4
- package/types/channel.d.ts +9 -9
- package/types/enums/appwrite-migration-resource.d.ts +21 -0
- package/types/enums/domain-transfer-status-status.d.ts +10 -0
- package/types/enums/firebase-migration-resource.d.ts +12 -0
- package/types/enums/{resources.d.ts → n-host-migration-resource.d.ts} +1 -1
- package/types/enums/status.d.ts +3 -0
- package/types/enums/supabase-migration-resource.d.ts +13 -0
- package/types/index.d.ts +6 -1
- package/types/models.d.ts +117 -2
- package/types/services/databases.d.ts +40 -37
- package/types/services/domains.d.ts +73 -4
- package/types/services/health.d.ts +24 -0
- package/types/services/messaging.d.ts +2 -2
- package/types/services/migrations.d.ts +36 -33
- package/types/services/projects.d.ts +46 -0
- package/types/services/sites.d.ts +4 -4
- package/types/services/tables-db.d.ts +4 -1
- package/types/services/teams.d.ts +4 -4
|
@@ -78,7 +78,7 @@ export declare class Domains {
|
|
|
78
78
|
* Create a domain purchase with registrant information.
|
|
79
79
|
*
|
|
80
80
|
* @param {string} params.domain - Fully qualified domain name to purchase (for example, example.com).
|
|
81
|
-
* @param {string} params.
|
|
81
|
+
* @param {string} params.organizationId - Team ID that will own the domain.
|
|
82
82
|
* @param {string} params.firstName - Registrant first name used for domain registration.
|
|
83
83
|
* @param {string} params.lastName - Registrant last name used for domain registration.
|
|
84
84
|
* @param {string} params.email - Registrant email address for registration and notices.
|
|
@@ -93,7 +93,7 @@ export declare class Domains {
|
|
|
93
93
|
*/
|
|
94
94
|
createPurchase(params: {
|
|
95
95
|
domain: string;
|
|
96
|
-
|
|
96
|
+
organizationId: string;
|
|
97
97
|
firstName: string;
|
|
98
98
|
lastName: string;
|
|
99
99
|
email: string;
|
|
@@ -108,7 +108,7 @@ export declare class Domains {
|
|
|
108
108
|
* Create a domain purchase with registrant information.
|
|
109
109
|
*
|
|
110
110
|
* @param {string} domain - Fully qualified domain name to purchase (for example, example.com).
|
|
111
|
-
* @param {string}
|
|
111
|
+
* @param {string} organizationId - Team ID that will own the domain.
|
|
112
112
|
* @param {string} firstName - Registrant first name used for domain registration.
|
|
113
113
|
* @param {string} lastName - Registrant last name used for domain registration.
|
|
114
114
|
* @param {string} email - Registrant email address for registration and notices.
|
|
@@ -122,7 +122,7 @@ export declare class Domains {
|
|
|
122
122
|
* @returns {Promise<Models.Domain>}
|
|
123
123
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
124
124
|
*/
|
|
125
|
-
createPurchase(domain: string,
|
|
125
|
+
createPurchase(domain: string, organizationId: string, firstName: string, lastName: string, email: string, phone: string, billingAddressId: string, paymentMethodId: string, addressLine3?: string, companyName?: string, periodYears?: number): Promise<Models.Domain>;
|
|
126
126
|
/**
|
|
127
127
|
* List domain suggestions.
|
|
128
128
|
*
|
|
@@ -157,6 +157,56 @@ export declare class Domains {
|
|
|
157
157
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
158
158
|
*/
|
|
159
159
|
listSuggestions(query: string, tlds?: string[], limit?: number, filterType?: FilterType, priceMax?: number, priceMin?: number): Promise<Models.DomainSuggestionsList>;
|
|
160
|
+
/**
|
|
161
|
+
* Create a domain transfer in with authorization code and registrant information.
|
|
162
|
+
*
|
|
163
|
+
* @param {string} params.domain - Domain name to transfer in.
|
|
164
|
+
* @param {string} params.organizationId - Organization ID that this domain will belong to.
|
|
165
|
+
* @param {string} params.authCode - Authorization code for the domain transfer.
|
|
166
|
+
* @param {string} params.paymentMethodId - Payment method ID to authorize and capture the transfer.
|
|
167
|
+
* @throws {AppwriteException}
|
|
168
|
+
* @returns {Promise<Models.Domain>}
|
|
169
|
+
*/
|
|
170
|
+
createTransferIn(params: {
|
|
171
|
+
domain: string;
|
|
172
|
+
organizationId: string;
|
|
173
|
+
authCode: string;
|
|
174
|
+
paymentMethodId: string;
|
|
175
|
+
}): Promise<Models.Domain>;
|
|
176
|
+
/**
|
|
177
|
+
* Create a domain transfer in with authorization code and registrant information.
|
|
178
|
+
*
|
|
179
|
+
* @param {string} domain - Domain name to transfer in.
|
|
180
|
+
* @param {string} organizationId - Organization ID that this domain will belong to.
|
|
181
|
+
* @param {string} authCode - Authorization code for the domain transfer.
|
|
182
|
+
* @param {string} paymentMethodId - Payment method ID to authorize and capture the transfer.
|
|
183
|
+
* @throws {AppwriteException}
|
|
184
|
+
* @returns {Promise<Models.Domain>}
|
|
185
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
186
|
+
*/
|
|
187
|
+
createTransferIn(domain: string, organizationId: string, authCode: string, paymentMethodId: string): Promise<Models.Domain>;
|
|
188
|
+
/**
|
|
189
|
+
* Create a domain transfer out and return the authorization code.
|
|
190
|
+
*
|
|
191
|
+
* @param {string} params.domainId - Domain unique ID.
|
|
192
|
+
* @param {string} params.organizationId - Organization ID that this domain belongs to.
|
|
193
|
+
* @throws {AppwriteException}
|
|
194
|
+
* @returns {Promise<Models.DomainTransferOut>}
|
|
195
|
+
*/
|
|
196
|
+
createTransferOut(params: {
|
|
197
|
+
domainId: string;
|
|
198
|
+
organizationId: string;
|
|
199
|
+
}): Promise<Models.DomainTransferOut>;
|
|
200
|
+
/**
|
|
201
|
+
* Create a domain transfer out and return the authorization code.
|
|
202
|
+
*
|
|
203
|
+
* @param {string} domainId - Domain unique ID.
|
|
204
|
+
* @param {string} organizationId - Organization ID that this domain belongs to.
|
|
205
|
+
* @throws {AppwriteException}
|
|
206
|
+
* @returns {Promise<Models.DomainTransferOut>}
|
|
207
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
208
|
+
*/
|
|
209
|
+
createTransferOut(domainId: string, organizationId: string): Promise<Models.DomainTransferOut>;
|
|
160
210
|
/**
|
|
161
211
|
* Get a domain by its unique ID.
|
|
162
212
|
*
|
|
@@ -1338,6 +1388,25 @@ export declare class Domains {
|
|
|
1338
1388
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1339
1389
|
*/
|
|
1340
1390
|
updateTeam(domainId: string, teamId: string): Promise<Models.Domain>;
|
|
1391
|
+
/**
|
|
1392
|
+
* Get the transfer status for a domain.
|
|
1393
|
+
*
|
|
1394
|
+
* @param {string} params.domainId - Domain unique ID.
|
|
1395
|
+
* @throws {AppwriteException}
|
|
1396
|
+
* @returns {Promise<Models.DomainTransferStatus>}
|
|
1397
|
+
*/
|
|
1398
|
+
getTransferStatus(params: {
|
|
1399
|
+
domainId: string;
|
|
1400
|
+
}): Promise<Models.DomainTransferStatus>;
|
|
1401
|
+
/**
|
|
1402
|
+
* Get the transfer status for a domain.
|
|
1403
|
+
*
|
|
1404
|
+
* @param {string} domainId - Domain unique ID.
|
|
1405
|
+
* @throws {AppwriteException}
|
|
1406
|
+
* @returns {Promise<Models.DomainTransferStatus>}
|
|
1407
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1408
|
+
*/
|
|
1409
|
+
getTransferStatus(domainId: string): Promise<Models.DomainTransferStatus>;
|
|
1341
1410
|
/**
|
|
1342
1411
|
* Retrieve the DNS zone file for the given domain. This endpoint will return the DNS
|
|
1343
1412
|
* zone file in a standardized format that can be used to configure DNS servers.
|
|
@@ -44,6 +44,30 @@ export declare class Health {
|
|
|
44
44
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
45
45
|
*/
|
|
46
46
|
getCertificate(domain?: string): Promise<Models.HealthCertificate>;
|
|
47
|
+
/**
|
|
48
|
+
* Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.
|
|
49
|
+
*
|
|
50
|
+
*
|
|
51
|
+
* @param {number} params.threshold - Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.
|
|
52
|
+
* @param {number} params.inactivityDays - Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.
|
|
53
|
+
* @throws {AppwriteException}
|
|
54
|
+
* @returns {Promise<Models.HealthStatus>}
|
|
55
|
+
*/
|
|
56
|
+
getConsolePausing(params?: {
|
|
57
|
+
threshold?: number;
|
|
58
|
+
inactivityDays?: number;
|
|
59
|
+
}): Promise<Models.HealthStatus>;
|
|
60
|
+
/**
|
|
61
|
+
* Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.
|
|
62
|
+
*
|
|
63
|
+
*
|
|
64
|
+
* @param {number} threshold - Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.
|
|
65
|
+
* @param {number} inactivityDays - Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.
|
|
66
|
+
* @throws {AppwriteException}
|
|
67
|
+
* @returns {Promise<Models.HealthStatus>}
|
|
68
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
69
|
+
*/
|
|
70
|
+
getConsolePausing(threshold?: number, inactivityDays?: number): Promise<Models.HealthStatus>;
|
|
47
71
|
/**
|
|
48
72
|
* Check the Appwrite database servers are up and connection is successful.
|
|
49
73
|
*
|
|
@@ -1891,7 +1891,7 @@ export declare class Messaging {
|
|
|
1891
1891
|
* Get a list of all subscribers from the current Appwrite project.
|
|
1892
1892
|
*
|
|
1893
1893
|
* @param {string} params.topicId - Topic ID. The topic ID subscribed to.
|
|
1894
|
-
* @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:
|
|
1894
|
+
* @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: targetId, topicId, userId, providerType
|
|
1895
1895
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
1896
1896
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1897
1897
|
* @throws {AppwriteException}
|
|
@@ -1907,7 +1907,7 @@ export declare class Messaging {
|
|
|
1907
1907
|
* Get a list of all subscribers from the current Appwrite project.
|
|
1908
1908
|
*
|
|
1909
1909
|
* @param {string} topicId - Topic ID. The topic ID subscribed to.
|
|
1910
|
-
* @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:
|
|
1910
|
+
* @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: targetId, topicId, userId, providerType
|
|
1911
1911
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
1912
1912
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1913
1913
|
* @throws {AppwriteException}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
|
-
import {
|
|
3
|
+
import { AppwriteMigrationResource } from '../enums/appwrite-migration-resource';
|
|
4
|
+
import { FirebaseMigrationResource } from '../enums/firebase-migration-resource';
|
|
5
|
+
import { NHostMigrationResource } from '../enums/n-host-migration-resource';
|
|
6
|
+
import { SupabaseMigrationResource } from '../enums/supabase-migration-resource';
|
|
4
7
|
export declare class Migrations {
|
|
5
8
|
client: Client;
|
|
6
9
|
constructor(client: Client);
|
|
@@ -32,7 +35,7 @@ export declare class Migrations {
|
|
|
32
35
|
/**
|
|
33
36
|
* Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project.
|
|
34
37
|
*
|
|
35
|
-
* @param {
|
|
38
|
+
* @param {AppwriteMigrationResource[]} params.resources - List of resources to migrate
|
|
36
39
|
* @param {string} params.endpoint - Source Appwrite endpoint
|
|
37
40
|
* @param {string} params.projectId - Source Project ID
|
|
38
41
|
* @param {string} params.apiKey - Source API Key
|
|
@@ -40,7 +43,7 @@ export declare class Migrations {
|
|
|
40
43
|
* @returns {Promise<Models.Migration>}
|
|
41
44
|
*/
|
|
42
45
|
createAppwriteMigration(params: {
|
|
43
|
-
resources:
|
|
46
|
+
resources: AppwriteMigrationResource[];
|
|
44
47
|
endpoint: string;
|
|
45
48
|
projectId: string;
|
|
46
49
|
apiKey: string;
|
|
@@ -48,7 +51,7 @@ export declare class Migrations {
|
|
|
48
51
|
/**
|
|
49
52
|
* Migrate data from another Appwrite project to your current project. This endpoint allows you to migrate resources like databases, collections, documents, users, and files from an existing Appwrite project.
|
|
50
53
|
*
|
|
51
|
-
* @param {
|
|
54
|
+
* @param {AppwriteMigrationResource[]} resources - List of resources to migrate
|
|
52
55
|
* @param {string} endpoint - Source Appwrite endpoint
|
|
53
56
|
* @param {string} projectId - Source Project ID
|
|
54
57
|
* @param {string} apiKey - Source API Key
|
|
@@ -56,11 +59,11 @@ export declare class Migrations {
|
|
|
56
59
|
* @returns {Promise<Models.Migration>}
|
|
57
60
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
58
61
|
*/
|
|
59
|
-
createAppwriteMigration(resources:
|
|
62
|
+
createAppwriteMigration(resources: AppwriteMigrationResource[], endpoint: string, projectId: string, apiKey: string): Promise<Models.Migration>;
|
|
60
63
|
/**
|
|
61
64
|
* Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
62
65
|
*
|
|
63
|
-
* @param {
|
|
66
|
+
* @param {AppwriteMigrationResource[]} params.resources - List of resources to migrate
|
|
64
67
|
* @param {string} params.endpoint - Source's Appwrite Endpoint
|
|
65
68
|
* @param {string} params.projectID - Source's Project ID
|
|
66
69
|
* @param {string} params.key - Source's API Key
|
|
@@ -68,7 +71,7 @@ export declare class Migrations {
|
|
|
68
71
|
* @returns {Promise<Models.MigrationReport>}
|
|
69
72
|
*/
|
|
70
73
|
getAppwriteReport(params: {
|
|
71
|
-
resources:
|
|
74
|
+
resources: AppwriteMigrationResource[];
|
|
72
75
|
endpoint: string;
|
|
73
76
|
projectID: string;
|
|
74
77
|
key: string;
|
|
@@ -76,7 +79,7 @@ export declare class Migrations {
|
|
|
76
79
|
/**
|
|
77
80
|
* Generate a report of the data in an Appwrite project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
78
81
|
*
|
|
79
|
-
* @param {
|
|
82
|
+
* @param {AppwriteMigrationResource[]} resources - List of resources to migrate
|
|
80
83
|
* @param {string} endpoint - Source's Appwrite Endpoint
|
|
81
84
|
* @param {string} projectID - Source's Project ID
|
|
82
85
|
* @param {string} key - Source's API Key
|
|
@@ -84,7 +87,7 @@ export declare class Migrations {
|
|
|
84
87
|
* @returns {Promise<Models.MigrationReport>}
|
|
85
88
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
86
89
|
*/
|
|
87
|
-
getAppwriteReport(resources:
|
|
90
|
+
getAppwriteReport(resources: AppwriteMigrationResource[], endpoint: string, projectID: string, key: string): Promise<Models.MigrationReport>;
|
|
88
91
|
/**
|
|
89
92
|
* Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in a secure internal bucket. You'll receive an email with a download link when the export is complete.
|
|
90
93
|
*
|
|
@@ -159,51 +162,51 @@ export declare class Migrations {
|
|
|
159
162
|
/**
|
|
160
163
|
* Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project.
|
|
161
164
|
*
|
|
162
|
-
* @param {
|
|
165
|
+
* @param {FirebaseMigrationResource[]} params.resources - List of resources to migrate
|
|
163
166
|
* @param {string} params.serviceAccount - JSON of the Firebase service account credentials
|
|
164
167
|
* @throws {AppwriteException}
|
|
165
168
|
* @returns {Promise<Models.Migration>}
|
|
166
169
|
*/
|
|
167
170
|
createFirebaseMigration(params: {
|
|
168
|
-
resources:
|
|
171
|
+
resources: FirebaseMigrationResource[];
|
|
169
172
|
serviceAccount: string;
|
|
170
173
|
}): Promise<Models.Migration>;
|
|
171
174
|
/**
|
|
172
175
|
* Migrate data from a Firebase project to your Appwrite project. This endpoint allows you to migrate resources like authentication and other supported services from a Firebase project.
|
|
173
176
|
*
|
|
174
|
-
* @param {
|
|
177
|
+
* @param {FirebaseMigrationResource[]} resources - List of resources to migrate
|
|
175
178
|
* @param {string} serviceAccount - JSON of the Firebase service account credentials
|
|
176
179
|
* @throws {AppwriteException}
|
|
177
180
|
* @returns {Promise<Models.Migration>}
|
|
178
181
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
179
182
|
*/
|
|
180
|
-
createFirebaseMigration(resources:
|
|
183
|
+
createFirebaseMigration(resources: FirebaseMigrationResource[], serviceAccount: string): Promise<Models.Migration>;
|
|
181
184
|
/**
|
|
182
185
|
* Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
183
186
|
*
|
|
184
|
-
* @param {
|
|
187
|
+
* @param {FirebaseMigrationResource[]} params.resources - List of resources to migrate
|
|
185
188
|
* @param {string} params.serviceAccount - JSON of the Firebase service account credentials
|
|
186
189
|
* @throws {AppwriteException}
|
|
187
190
|
* @returns {Promise<Models.MigrationReport>}
|
|
188
191
|
*/
|
|
189
192
|
getFirebaseReport(params: {
|
|
190
|
-
resources:
|
|
193
|
+
resources: FirebaseMigrationResource[];
|
|
191
194
|
serviceAccount: string;
|
|
192
195
|
}): Promise<Models.MigrationReport>;
|
|
193
196
|
/**
|
|
194
197
|
* Generate a report of the data in a Firebase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
195
198
|
*
|
|
196
|
-
* @param {
|
|
199
|
+
* @param {FirebaseMigrationResource[]} resources - List of resources to migrate
|
|
197
200
|
* @param {string} serviceAccount - JSON of the Firebase service account credentials
|
|
198
201
|
* @throws {AppwriteException}
|
|
199
202
|
* @returns {Promise<Models.MigrationReport>}
|
|
200
203
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
201
204
|
*/
|
|
202
|
-
getFirebaseReport(resources:
|
|
205
|
+
getFirebaseReport(resources: FirebaseMigrationResource[], serviceAccount: string): Promise<Models.MigrationReport>;
|
|
203
206
|
/**
|
|
204
207
|
* Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project.
|
|
205
208
|
*
|
|
206
|
-
* @param {
|
|
209
|
+
* @param {NHostMigrationResource[]} params.resources - List of resources to migrate
|
|
207
210
|
* @param {string} params.subdomain - Source's Subdomain
|
|
208
211
|
* @param {string} params.region - Source's Region
|
|
209
212
|
* @param {string} params.adminSecret - Source's Admin Secret
|
|
@@ -215,7 +218,7 @@ export declare class Migrations {
|
|
|
215
218
|
* @returns {Promise<Models.Migration>}
|
|
216
219
|
*/
|
|
217
220
|
createNHostMigration(params: {
|
|
218
|
-
resources:
|
|
221
|
+
resources: NHostMigrationResource[];
|
|
219
222
|
subdomain: string;
|
|
220
223
|
region: string;
|
|
221
224
|
adminSecret: string;
|
|
@@ -227,7 +230,7 @@ export declare class Migrations {
|
|
|
227
230
|
/**
|
|
228
231
|
* Migrate data from an NHost project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from an NHost project.
|
|
229
232
|
*
|
|
230
|
-
* @param {
|
|
233
|
+
* @param {NHostMigrationResource[]} resources - List of resources to migrate
|
|
231
234
|
* @param {string} subdomain - Source's Subdomain
|
|
232
235
|
* @param {string} region - Source's Region
|
|
233
236
|
* @param {string} adminSecret - Source's Admin Secret
|
|
@@ -239,11 +242,11 @@ export declare class Migrations {
|
|
|
239
242
|
* @returns {Promise<Models.Migration>}
|
|
240
243
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
241
244
|
*/
|
|
242
|
-
createNHostMigration(resources:
|
|
245
|
+
createNHostMigration(resources: NHostMigrationResource[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.Migration>;
|
|
243
246
|
/**
|
|
244
247
|
* Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
245
248
|
*
|
|
246
|
-
* @param {
|
|
249
|
+
* @param {NHostMigrationResource[]} params.resources - List of resources to migrate.
|
|
247
250
|
* @param {string} params.subdomain - Source's Subdomain.
|
|
248
251
|
* @param {string} params.region - Source's Region.
|
|
249
252
|
* @param {string} params.adminSecret - Source's Admin Secret.
|
|
@@ -255,7 +258,7 @@ export declare class Migrations {
|
|
|
255
258
|
* @returns {Promise<Models.MigrationReport>}
|
|
256
259
|
*/
|
|
257
260
|
getNHostReport(params: {
|
|
258
|
-
resources:
|
|
261
|
+
resources: NHostMigrationResource[];
|
|
259
262
|
subdomain: string;
|
|
260
263
|
region: string;
|
|
261
264
|
adminSecret: string;
|
|
@@ -267,7 +270,7 @@ export declare class Migrations {
|
|
|
267
270
|
/**
|
|
268
271
|
* Generate a detailed report of the data in an NHost project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
269
272
|
*
|
|
270
|
-
* @param {
|
|
273
|
+
* @param {NHostMigrationResource[]} resources - List of resources to migrate.
|
|
271
274
|
* @param {string} subdomain - Source's Subdomain.
|
|
272
275
|
* @param {string} region - Source's Region.
|
|
273
276
|
* @param {string} adminSecret - Source's Admin Secret.
|
|
@@ -279,11 +282,11 @@ export declare class Migrations {
|
|
|
279
282
|
* @returns {Promise<Models.MigrationReport>}
|
|
280
283
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
281
284
|
*/
|
|
282
|
-
getNHostReport(resources:
|
|
285
|
+
getNHostReport(resources: NHostMigrationResource[], subdomain: string, region: string, adminSecret: string, database: string, username: string, password: string, port?: number): Promise<Models.MigrationReport>;
|
|
283
286
|
/**
|
|
284
287
|
* Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project.
|
|
285
288
|
*
|
|
286
|
-
* @param {
|
|
289
|
+
* @param {SupabaseMigrationResource[]} params.resources - List of resources to migrate
|
|
287
290
|
* @param {string} params.endpoint - Source's Supabase Endpoint
|
|
288
291
|
* @param {string} params.apiKey - Source's API Key
|
|
289
292
|
* @param {string} params.databaseHost - Source's Database Host
|
|
@@ -294,7 +297,7 @@ export declare class Migrations {
|
|
|
294
297
|
* @returns {Promise<Models.Migration>}
|
|
295
298
|
*/
|
|
296
299
|
createSupabaseMigration(params: {
|
|
297
|
-
resources:
|
|
300
|
+
resources: SupabaseMigrationResource[];
|
|
298
301
|
endpoint: string;
|
|
299
302
|
apiKey: string;
|
|
300
303
|
databaseHost: string;
|
|
@@ -305,7 +308,7 @@ export declare class Migrations {
|
|
|
305
308
|
/**
|
|
306
309
|
* Migrate data from a Supabase project to your Appwrite project. This endpoint allows you to migrate resources like authentication, databases, and other supported services from a Supabase project.
|
|
307
310
|
*
|
|
308
|
-
* @param {
|
|
311
|
+
* @param {SupabaseMigrationResource[]} resources - List of resources to migrate
|
|
309
312
|
* @param {string} endpoint - Source's Supabase Endpoint
|
|
310
313
|
* @param {string} apiKey - Source's API Key
|
|
311
314
|
* @param {string} databaseHost - Source's Database Host
|
|
@@ -316,11 +319,11 @@ export declare class Migrations {
|
|
|
316
319
|
* @returns {Promise<Models.Migration>}
|
|
317
320
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
318
321
|
*/
|
|
319
|
-
createSupabaseMigration(resources:
|
|
322
|
+
createSupabaseMigration(resources: SupabaseMigrationResource[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.Migration>;
|
|
320
323
|
/**
|
|
321
324
|
* Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
322
325
|
*
|
|
323
|
-
* @param {
|
|
326
|
+
* @param {SupabaseMigrationResource[]} params.resources - List of resources to migrate
|
|
324
327
|
* @param {string} params.endpoint - Source's Supabase Endpoint.
|
|
325
328
|
* @param {string} params.apiKey - Source's API Key.
|
|
326
329
|
* @param {string} params.databaseHost - Source's Database Host.
|
|
@@ -331,7 +334,7 @@ export declare class Migrations {
|
|
|
331
334
|
* @returns {Promise<Models.MigrationReport>}
|
|
332
335
|
*/
|
|
333
336
|
getSupabaseReport(params: {
|
|
334
|
-
resources:
|
|
337
|
+
resources: SupabaseMigrationResource[];
|
|
335
338
|
endpoint: string;
|
|
336
339
|
apiKey: string;
|
|
337
340
|
databaseHost: string;
|
|
@@ -342,7 +345,7 @@ export declare class Migrations {
|
|
|
342
345
|
/**
|
|
343
346
|
* Generate a report of the data in a Supabase project before migrating. This endpoint analyzes the source project and returns information about the resources that can be migrated.
|
|
344
347
|
*
|
|
345
|
-
* @param {
|
|
348
|
+
* @param {SupabaseMigrationResource[]} resources - List of resources to migrate
|
|
346
349
|
* @param {string} endpoint - Source's Supabase Endpoint.
|
|
347
350
|
* @param {string} apiKey - Source's API Key.
|
|
348
351
|
* @param {string} databaseHost - Source's Database Host.
|
|
@@ -353,7 +356,7 @@ export declare class Migrations {
|
|
|
353
356
|
* @returns {Promise<Models.MigrationReport>}
|
|
354
357
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
355
358
|
*/
|
|
356
|
-
getSupabaseReport(resources:
|
|
359
|
+
getSupabaseReport(resources: SupabaseMigrationResource[], endpoint: string, apiKey: string, databaseHost: string, username: string, password: string, port?: number): Promise<Models.MigrationReport>;
|
|
357
360
|
/**
|
|
358
361
|
* Get a migration by its unique ID. This endpoint returns detailed information about a specific migration including its current status, progress, and any errors that occurred during the migration process.
|
|
359
362
|
*
|
|
@@ -9,6 +9,7 @@ import { PlatformType } from '../enums/platform-type';
|
|
|
9
9
|
import { ResourceType } from '../enums/resource-type';
|
|
10
10
|
import { ApiService } from '../enums/api-service';
|
|
11
11
|
import { SMTPSecure } from '../enums/smtp-secure';
|
|
12
|
+
import { Status } from '../enums/status';
|
|
12
13
|
import { EmailTemplateType } from '../enums/email-template-type';
|
|
13
14
|
import { EmailTemplateLocale } from '../enums/email-template-locale';
|
|
14
15
|
import { SmsTemplateType } from '../enums/sms-template-type';
|
|
@@ -530,6 +531,27 @@ export declare class Projects {
|
|
|
530
531
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
531
532
|
*/
|
|
532
533
|
updateAuthStatus(projectId: string, method: AuthMethod, status: boolean): Promise<Models.Project>;
|
|
534
|
+
/**
|
|
535
|
+
* Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
|
|
536
|
+
*
|
|
537
|
+
*
|
|
538
|
+
* @param {string} params.projectId - Project ID
|
|
539
|
+
* @throws {AppwriteException}
|
|
540
|
+
* @returns {Promise<{}>}
|
|
541
|
+
*/
|
|
542
|
+
updateConsoleAccess(params: {
|
|
543
|
+
projectId: string;
|
|
544
|
+
}): Promise<{}>;
|
|
545
|
+
/**
|
|
546
|
+
* Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
|
|
547
|
+
*
|
|
548
|
+
*
|
|
549
|
+
* @param {string} projectId - Project ID
|
|
550
|
+
* @throws {AppwriteException}
|
|
551
|
+
* @returns {Promise<{}>}
|
|
552
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
553
|
+
*/
|
|
554
|
+
updateConsoleAccess(projectId: string): Promise<{}>;
|
|
533
555
|
/**
|
|
534
556
|
* List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'
|
|
535
557
|
*
|
|
@@ -1306,6 +1328,30 @@ export declare class Projects {
|
|
|
1306
1328
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1307
1329
|
*/
|
|
1308
1330
|
createSMTPTest(projectId: string, emails: string[], senderName: string, senderEmail: string, host: string, replyTo?: string, port?: number, username?: string, password?: string, secure?: SMTPSecure): Promise<{}>;
|
|
1331
|
+
/**
|
|
1332
|
+
* Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
|
|
1333
|
+
*
|
|
1334
|
+
*
|
|
1335
|
+
* @param {string} params.projectId - Project ID
|
|
1336
|
+
* @param {Status} params.status - New status for the project
|
|
1337
|
+
* @throws {AppwriteException}
|
|
1338
|
+
* @returns {Promise<{}>}
|
|
1339
|
+
*/
|
|
1340
|
+
updateStatus(params: {
|
|
1341
|
+
projectId: string;
|
|
1342
|
+
status: Status;
|
|
1343
|
+
}): Promise<{}>;
|
|
1344
|
+
/**
|
|
1345
|
+
* Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
|
|
1346
|
+
*
|
|
1347
|
+
*
|
|
1348
|
+
* @param {string} projectId - Project ID
|
|
1349
|
+
* @param {Status} status - New status for the project
|
|
1350
|
+
* @throws {AppwriteException}
|
|
1351
|
+
* @returns {Promise<{}>}
|
|
1352
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1353
|
+
*/
|
|
1354
|
+
updateStatus(projectId: string, status: Status): Promise<{}>;
|
|
1309
1355
|
/**
|
|
1310
1356
|
* Update the team ID of a project allowing for it to be transferred to another team.
|
|
1311
1357
|
*
|
|
@@ -350,20 +350,20 @@ export declare class Sites {
|
|
|
350
350
|
*
|
|
351
351
|
* @param {string} params.siteId - Site ID.
|
|
352
352
|
* @param {File} params.code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
353
|
-
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
354
353
|
* @param {string} params.installCommand - Install Commands.
|
|
355
354
|
* @param {string} params.buildCommand - Build Commands.
|
|
356
355
|
* @param {string} params.outputDirectory - Output Directory.
|
|
356
|
+
* @param {boolean} params.activate - Automatically activate the deployment when it is finished building.
|
|
357
357
|
* @throws {AppwriteException}
|
|
358
358
|
* @returns {Promise<Models.Deployment>}
|
|
359
359
|
*/
|
|
360
360
|
createDeployment(params: {
|
|
361
361
|
siteId: string;
|
|
362
362
|
code: File;
|
|
363
|
-
activate: boolean;
|
|
364
363
|
installCommand?: string;
|
|
365
364
|
buildCommand?: string;
|
|
366
365
|
outputDirectory?: string;
|
|
366
|
+
activate?: boolean;
|
|
367
367
|
onProgress?: (progress: UploadProgress) => void;
|
|
368
368
|
}): Promise<Models.Deployment>;
|
|
369
369
|
/**
|
|
@@ -371,15 +371,15 @@ export declare class Sites {
|
|
|
371
371
|
*
|
|
372
372
|
* @param {string} siteId - Site ID.
|
|
373
373
|
* @param {File} code - Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.
|
|
374
|
-
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
375
374
|
* @param {string} installCommand - Install Commands.
|
|
376
375
|
* @param {string} buildCommand - Build Commands.
|
|
377
376
|
* @param {string} outputDirectory - Output Directory.
|
|
377
|
+
* @param {boolean} activate - Automatically activate the deployment when it is finished building.
|
|
378
378
|
* @throws {AppwriteException}
|
|
379
379
|
* @returns {Promise<Models.Deployment>}
|
|
380
380
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
381
381
|
*/
|
|
382
|
-
createDeployment(siteId: string, code: File,
|
|
382
|
+
createDeployment(siteId: string, code: File, installCommand?: string, buildCommand?: string, outputDirectory?: string, activate?: boolean, onProgress?: (progress: UploadProgress) => void): Promise<Models.Deployment>;
|
|
383
383
|
/**
|
|
384
384
|
* 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.
|
|
385
385
|
*
|
|
@@ -1896,6 +1896,7 @@ export declare class TablesDB {
|
|
|
1896
1896
|
* @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.
|
|
1897
1897
|
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1898
1898
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1899
|
+
* @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
1899
1900
|
* @throws {AppwriteException}
|
|
1900
1901
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1901
1902
|
*/
|
|
@@ -1905,6 +1906,7 @@ export declare class TablesDB {
|
|
|
1905
1906
|
queries?: string[];
|
|
1906
1907
|
transactionId?: string;
|
|
1907
1908
|
total?: boolean;
|
|
1909
|
+
ttl?: number;
|
|
1908
1910
|
}): Promise<Models.RowList<Row>>;
|
|
1909
1911
|
/**
|
|
1910
1912
|
* Get a list of all the user's rows in a given table. You can use the query params to filter your results.
|
|
@@ -1914,11 +1916,12 @@ export declare class TablesDB {
|
|
|
1914
1916
|
* @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.
|
|
1915
1917
|
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1916
1918
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1919
|
+
* @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
1917
1920
|
* @throws {AppwriteException}
|
|
1918
1921
|
* @returns {Promise<Models.RowList<Row>>}
|
|
1919
1922
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1920
1923
|
*/
|
|
1921
|
-
listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.RowList<Row>>;
|
|
1924
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number): Promise<Models.RowList<Row>>;
|
|
1922
1925
|
/**
|
|
1923
1926
|
* Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.
|
|
1924
1927
|
*
|
|
@@ -177,7 +177,7 @@ export declare class Teams {
|
|
|
177
177
|
*
|
|
178
178
|
*
|
|
179
179
|
* @param {string} params.teamId - Team ID.
|
|
180
|
-
* @param {string[]} params.roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
180
|
+
* @param {string[]} params.roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
181
181
|
* @param {string} params.email - Email of the new team member.
|
|
182
182
|
* @param {string} params.userId - ID of the user to be added to a team.
|
|
183
183
|
* @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
@@ -206,7 +206,7 @@ export declare class Teams {
|
|
|
206
206
|
*
|
|
207
207
|
*
|
|
208
208
|
* @param {string} teamId - Team ID.
|
|
209
|
-
* @param {string[]} roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
209
|
+
* @param {string[]} roles - Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
210
210
|
* @param {string} email - Email of the new team member.
|
|
211
211
|
* @param {string} userId - ID of the user to be added to a team.
|
|
212
212
|
* @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
@@ -245,7 +245,7 @@ export declare class Teams {
|
|
|
245
245
|
*
|
|
246
246
|
* @param {string} params.teamId - Team ID.
|
|
247
247
|
* @param {string} params.membershipId - Membership ID.
|
|
248
|
-
* @param {string[]} params.roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
248
|
+
* @param {string[]} params.roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
249
249
|
* @throws {AppwriteException}
|
|
250
250
|
* @returns {Promise<Models.Membership>}
|
|
251
251
|
*/
|
|
@@ -260,7 +260,7 @@ export declare class Teams {
|
|
|
260
260
|
*
|
|
261
261
|
* @param {string} teamId - Team ID.
|
|
262
262
|
* @param {string} membershipId - Membership ID.
|
|
263
|
-
* @param {string[]} roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
263
|
+
* @param {string[]} roles - An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.
|
|
264
264
|
* @throws {AppwriteException}
|
|
265
265
|
* @returns {Promise<Models.Membership>}
|
|
266
266
|
* @deprecated Use the object parameter style method for a better developer experience.
|