@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
|
@@ -5052,10 +5052,11 @@ export class TablesDB {
|
|
|
5052
5052
|
* @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.
|
|
5053
5053
|
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
5054
5054
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
5055
|
+
* @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
5055
5056
|
* @throws {AppwriteException}
|
|
5056
5057
|
* @returns {Promise<Models.RowList<Row>>}
|
|
5057
5058
|
*/
|
|
5058
|
-
listRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean }): Promise<Models.RowList<Row>>;
|
|
5059
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number }): Promise<Models.RowList<Row>>;
|
|
5059
5060
|
/**
|
|
5060
5061
|
* Get a list of all the user's rows in a given table. You can use the query params to filter your results.
|
|
5061
5062
|
*
|
|
@@ -5064,26 +5065,28 @@ export class TablesDB {
|
|
|
5064
5065
|
* @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.
|
|
5065
5066
|
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
5066
5067
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
5068
|
+
* @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
5067
5069
|
* @throws {AppwriteException}
|
|
5068
5070
|
* @returns {Promise<Models.RowList<Row>>}
|
|
5069
5071
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
5070
5072
|
*/
|
|
5071
|
-
listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.RowList<Row>>;
|
|
5073
|
+
listRows<Row extends Models.Row = Models.DefaultRow>(databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number): Promise<Models.RowList<Row>>;
|
|
5072
5074
|
listRows<Row extends Models.Row = Models.DefaultRow>(
|
|
5073
|
-
paramsOrFirst: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean } | string,
|
|
5074
|
-
...rest: [(string)?, (string[])?, (string)?, (boolean)?]
|
|
5075
|
+
paramsOrFirst: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number } | string,
|
|
5076
|
+
...rest: [(string)?, (string[])?, (string)?, (boolean)?, (number)?]
|
|
5075
5077
|
): Promise<Models.RowList<Row>> {
|
|
5076
|
-
let params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean };
|
|
5078
|
+
let params: { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number };
|
|
5077
5079
|
|
|
5078
5080
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
5079
|
-
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean };
|
|
5081
|
+
params = (paramsOrFirst || {}) as { databaseId: string, tableId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number };
|
|
5080
5082
|
} else {
|
|
5081
5083
|
params = {
|
|
5082
5084
|
databaseId: paramsOrFirst as string,
|
|
5083
5085
|
tableId: rest[0] as string,
|
|
5084
5086
|
queries: rest[1] as string[],
|
|
5085
5087
|
transactionId: rest[2] as string,
|
|
5086
|
-
total: rest[3] as boolean
|
|
5088
|
+
total: rest[3] as boolean,
|
|
5089
|
+
ttl: rest[4] as number
|
|
5087
5090
|
};
|
|
5088
5091
|
}
|
|
5089
5092
|
|
|
@@ -5092,6 +5095,7 @@ export class TablesDB {
|
|
|
5092
5095
|
const queries = params.queries;
|
|
5093
5096
|
const transactionId = params.transactionId;
|
|
5094
5097
|
const total = params.total;
|
|
5098
|
+
const ttl = params.ttl;
|
|
5095
5099
|
|
|
5096
5100
|
if (typeof databaseId === 'undefined') {
|
|
5097
5101
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -5111,6 +5115,9 @@ export class TablesDB {
|
|
|
5111
5115
|
if (typeof total !== 'undefined') {
|
|
5112
5116
|
payload['total'] = total;
|
|
5113
5117
|
}
|
|
5118
|
+
if (typeof ttl !== 'undefined') {
|
|
5119
|
+
payload['ttl'] = ttl;
|
|
5120
|
+
}
|
|
5114
5121
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5115
5122
|
|
|
5116
5123
|
const apiHeaders: { [header: string]: string } = {
|
package/src/services/teams.ts
CHANGED
|
@@ -465,7 +465,7 @@ export class Teams {
|
|
|
465
465
|
*
|
|
466
466
|
*
|
|
467
467
|
* @param {string} params.teamId - Team ID.
|
|
468
|
-
* @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
|
|
468
|
+
* @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.
|
|
469
469
|
* @param {string} params.email - Email of the new team member.
|
|
470
470
|
* @param {string} params.userId - ID of the user to be added to a team.
|
|
471
471
|
* @param {string} params.phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
@@ -486,7 +486,7 @@ export class Teams {
|
|
|
486
486
|
*
|
|
487
487
|
*
|
|
488
488
|
* @param {string} teamId - Team ID.
|
|
489
|
-
* @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
|
|
489
|
+
* @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.
|
|
490
490
|
* @param {string} email - Email of the new team member.
|
|
491
491
|
* @param {string} userId - ID of the user to be added to a team.
|
|
492
492
|
* @param {string} phone - Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
|
|
@@ -631,7 +631,7 @@ export class Teams {
|
|
|
631
631
|
*
|
|
632
632
|
* @param {string} params.teamId - Team ID.
|
|
633
633
|
* @param {string} params.membershipId - Membership ID.
|
|
634
|
-
* @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
|
|
634
|
+
* @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.
|
|
635
635
|
* @throws {AppwriteException}
|
|
636
636
|
* @returns {Promise<Models.Membership>}
|
|
637
637
|
*/
|
|
@@ -642,7 +642,7 @@ export class Teams {
|
|
|
642
642
|
*
|
|
643
643
|
* @param {string} teamId - Team ID.
|
|
644
644
|
* @param {string} membershipId - Membership ID.
|
|
645
|
-
* @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
|
|
645
|
+
* @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.
|
|
646
646
|
* @throws {AppwriteException}
|
|
647
647
|
* @returns {Promise<Models.Membership>}
|
|
648
648
|
* @deprecated Use the object parameter style method for a better developer experience.
|
package/types/channel.d.ts
CHANGED
|
@@ -45,22 +45,22 @@ export declare class Channel<T> {
|
|
|
45
45
|
private next;
|
|
46
46
|
private resolve;
|
|
47
47
|
toString(): string;
|
|
48
|
-
collection(this: Channel<Database>, id
|
|
48
|
+
collection(this: Channel<Database>, id: string): Channel<Collection>;
|
|
49
49
|
document(this: Channel<Collection>, id?: string): Channel<Document>;
|
|
50
|
-
table(this: Channel<TablesDB>, id
|
|
50
|
+
table(this: Channel<TablesDB>, id: string): Channel<Table>;
|
|
51
51
|
row(this: Channel<Table>, id?: string): Channel<Row>;
|
|
52
52
|
file(this: Channel<Bucket>, id?: string): Channel<File>;
|
|
53
53
|
create(this: Channel<Actionable>): Channel<Resolved>;
|
|
54
54
|
upsert(this: Channel<Document | Row>): Channel<Resolved>;
|
|
55
55
|
update(this: Channel<Actionable>): Channel<Resolved>;
|
|
56
56
|
delete(this: Channel<Actionable>): Channel<Resolved>;
|
|
57
|
-
static database(id
|
|
58
|
-
static execution(id
|
|
59
|
-
static tablesdb(id
|
|
60
|
-
static bucket(id
|
|
61
|
-
static function(id
|
|
62
|
-
static team(id
|
|
63
|
-
static membership(id
|
|
57
|
+
static database(id: string): Channel<Database>;
|
|
58
|
+
static execution(id: string): Channel<Execution>;
|
|
59
|
+
static tablesdb(id: string): Channel<TablesDB>;
|
|
60
|
+
static bucket(id: string): Channel<Bucket>;
|
|
61
|
+
static function(id: string): Channel<Func>;
|
|
62
|
+
static team(id: string): Channel<Team>;
|
|
63
|
+
static membership(id: string): Channel<Membership>;
|
|
64
64
|
static account(): string;
|
|
65
65
|
static documents(): string;
|
|
66
66
|
static rows(): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare enum AppwriteMigrationResource {
|
|
2
|
+
User = "user",
|
|
3
|
+
Team = "team",
|
|
4
|
+
Membership = "membership",
|
|
5
|
+
Database = "database",
|
|
6
|
+
Table = "table",
|
|
7
|
+
Column = "column",
|
|
8
|
+
Index = "index",
|
|
9
|
+
Row = "row",
|
|
10
|
+
Document = "document",
|
|
11
|
+
Attribute = "attribute",
|
|
12
|
+
Collection = "collection",
|
|
13
|
+
Bucket = "bucket",
|
|
14
|
+
File = "file",
|
|
15
|
+
Function = "function",
|
|
16
|
+
Deployment = "deployment",
|
|
17
|
+
Environmentvariable = "environment-variable",
|
|
18
|
+
Site = "site",
|
|
19
|
+
Sitedeployment = "site-deployment",
|
|
20
|
+
Sitevariable = "site-variable"
|
|
21
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare enum DomainTransferStatusStatus {
|
|
2
|
+
Transferrable = "transferrable",
|
|
3
|
+
NotTransferrable = "not_transferrable",
|
|
4
|
+
PendingOwner = "pending_owner",
|
|
5
|
+
PendingAdmin = "pending_admin",
|
|
6
|
+
PendingRegistry = "pending_registry",
|
|
7
|
+
Completed = "completed",
|
|
8
|
+
Cancelled = "cancelled",
|
|
9
|
+
ServiceUnavailable = "service_unavailable"
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum FirebaseMigrationResource {
|
|
2
|
+
User = "user",
|
|
3
|
+
Database = "database",
|
|
4
|
+
Table = "table",
|
|
5
|
+
Column = "column",
|
|
6
|
+
Row = "row",
|
|
7
|
+
Document = "document",
|
|
8
|
+
Attribute = "attribute",
|
|
9
|
+
Collection = "collection",
|
|
10
|
+
Bucket = "bucket",
|
|
11
|
+
File = "file"
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum SupabaseMigrationResource {
|
|
2
|
+
User = "user",
|
|
3
|
+
Database = "database",
|
|
4
|
+
Table = "table",
|
|
5
|
+
Column = "column",
|
|
6
|
+
Index = "index",
|
|
7
|
+
Row = "row",
|
|
8
|
+
Document = "document",
|
|
9
|
+
Attribute = "attribute",
|
|
10
|
+
Collection = "collection",
|
|
11
|
+
Bucket = "bucket",
|
|
12
|
+
File = "file"
|
|
13
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -71,7 +71,10 @@ export { ExecutionMethod } from './enums/execution-method';
|
|
|
71
71
|
export { Name } from './enums/name';
|
|
72
72
|
export { MessagePriority } from './enums/message-priority';
|
|
73
73
|
export { SmtpEncryption } from './enums/smtp-encryption';
|
|
74
|
-
export {
|
|
74
|
+
export { AppwriteMigrationResource } from './enums/appwrite-migration-resource';
|
|
75
|
+
export { FirebaseMigrationResource } from './enums/firebase-migration-resource';
|
|
76
|
+
export { NHostMigrationResource } from './enums/n-host-migration-resource';
|
|
77
|
+
export { SupabaseMigrationResource } from './enums/supabase-migration-resource';
|
|
75
78
|
export { ProjectUsageRange } from './enums/project-usage-range';
|
|
76
79
|
export { Region } from './enums/region';
|
|
77
80
|
export { Api } from './enums/api';
|
|
@@ -80,6 +83,7 @@ export { PlatformType } from './enums/platform-type';
|
|
|
80
83
|
export { ResourceType } from './enums/resource-type';
|
|
81
84
|
export { ApiService } from './enums/api-service';
|
|
82
85
|
export { SMTPSecure } from './enums/smtp-secure';
|
|
86
|
+
export { Status } from './enums/status';
|
|
83
87
|
export { EmailTemplateType } from './enums/email-template-type';
|
|
84
88
|
export { EmailTemplateLocale } from './enums/email-template-locale';
|
|
85
89
|
export { SmsTemplateType } from './enums/sms-template-type';
|
|
@@ -108,3 +112,4 @@ export { ProxyRuleDeploymentResourceType } from './enums/proxy-rule-deployment-r
|
|
|
108
112
|
export { ProxyRuleStatus } from './enums/proxy-rule-status';
|
|
109
113
|
export { MessageStatus } from './enums/message-status';
|
|
110
114
|
export { BillingPlanGroup } from './enums/billing-plan-group';
|
|
115
|
+
export { DomainTransferStatusStatus } from './enums/domain-transfer-status-status';
|
package/types/models.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { ProxyRuleDeploymentResourceType } from "./enums/proxy-rule-deployment-r
|
|
|
12
12
|
import { ProxyRuleStatus } from "./enums/proxy-rule-status";
|
|
13
13
|
import { MessageStatus } from "./enums/message-status";
|
|
14
14
|
import { BillingPlanGroup } from "./enums/billing-plan-group";
|
|
15
|
+
import { DomainTransferStatusStatus } from "./enums/domain-transfer-status-status";
|
|
15
16
|
/**
|
|
16
17
|
* Appwrite Models
|
|
17
18
|
*/
|
|
@@ -2531,7 +2532,7 @@ export declare namespace Models {
|
|
|
2531
2532
|
*/
|
|
2532
2533
|
$id: string;
|
|
2533
2534
|
/**
|
|
2534
|
-
* Row
|
|
2535
|
+
* Row sequence ID.
|
|
2535
2536
|
*/
|
|
2536
2537
|
$sequence: number;
|
|
2537
2538
|
/**
|
|
@@ -2568,7 +2569,7 @@ export declare namespace Models {
|
|
|
2568
2569
|
*/
|
|
2569
2570
|
$id: string;
|
|
2570
2571
|
/**
|
|
2571
|
-
* Document
|
|
2572
|
+
* Document sequence ID.
|
|
2572
2573
|
*/
|
|
2573
2574
|
$sequence: number;
|
|
2574
2575
|
/**
|
|
@@ -3884,6 +3885,14 @@ export declare namespace Models {
|
|
|
3884
3885
|
* VCS (Version Control System) repository's default branch name.
|
|
3885
3886
|
*/
|
|
3886
3887
|
defaultBranch: string;
|
|
3888
|
+
/**
|
|
3889
|
+
* VCS (Version Control System) installation ID.
|
|
3890
|
+
*/
|
|
3891
|
+
providerInstallationId: string;
|
|
3892
|
+
/**
|
|
3893
|
+
* Is VCS (Version Control System) repository authorized for the installation?
|
|
3894
|
+
*/
|
|
3895
|
+
authorized: boolean;
|
|
3887
3896
|
/**
|
|
3888
3897
|
* Last commit date in ISO 8601 format.
|
|
3889
3898
|
*/
|
|
@@ -3921,6 +3930,14 @@ export declare namespace Models {
|
|
|
3921
3930
|
* VCS (Version Control System) repository's default branch name.
|
|
3922
3931
|
*/
|
|
3923
3932
|
defaultBranch: string;
|
|
3933
|
+
/**
|
|
3934
|
+
* VCS (Version Control System) installation ID.
|
|
3935
|
+
*/
|
|
3936
|
+
providerInstallationId: string;
|
|
3937
|
+
/**
|
|
3938
|
+
* Is VCS (Version Control System) repository authorized for the installation?
|
|
3939
|
+
*/
|
|
3940
|
+
authorized: boolean;
|
|
3924
3941
|
/**
|
|
3925
3942
|
* Last commit date in ISO 8601 format.
|
|
3926
3943
|
*/
|
|
@@ -3962,6 +3979,14 @@ export declare namespace Models {
|
|
|
3962
3979
|
* VCS (Version Control System) repository's default branch name.
|
|
3963
3980
|
*/
|
|
3964
3981
|
defaultBranch: string;
|
|
3982
|
+
/**
|
|
3983
|
+
* VCS (Version Control System) installation ID.
|
|
3984
|
+
*/
|
|
3985
|
+
providerInstallationId: string;
|
|
3986
|
+
/**
|
|
3987
|
+
* Is VCS (Version Control System) repository authorized for the installation?
|
|
3988
|
+
*/
|
|
3989
|
+
authorized: boolean;
|
|
3965
3990
|
/**
|
|
3966
3991
|
* Last commit date in ISO 8601 format.
|
|
3967
3992
|
*/
|
|
@@ -4609,6 +4634,10 @@ export declare namespace Models {
|
|
|
4609
4634
|
* Project blocks information
|
|
4610
4635
|
*/
|
|
4611
4636
|
blocks: Block[];
|
|
4637
|
+
/**
|
|
4638
|
+
* Last time the project was accessed via console. Used with plan's projectInactivityDays to determine if project is paused.
|
|
4639
|
+
*/
|
|
4640
|
+
consoleAccessedAt: string;
|
|
4612
4641
|
};
|
|
4613
4642
|
/**
|
|
4614
4643
|
* Webhook
|
|
@@ -6219,6 +6248,50 @@ export declare namespace Models {
|
|
|
6219
6248
|
* Comma-separated list of nameservers.
|
|
6220
6249
|
*/
|
|
6221
6250
|
_APP_DOMAINS_NAMESERVERS: string;
|
|
6251
|
+
/**
|
|
6252
|
+
* Database adapter in use.
|
|
6253
|
+
*/
|
|
6254
|
+
_APP_DB_ADAPTER: string;
|
|
6255
|
+
/**
|
|
6256
|
+
* Whether the database adapter supports relationships.
|
|
6257
|
+
*/
|
|
6258
|
+
supportForRelationships: boolean;
|
|
6259
|
+
/**
|
|
6260
|
+
* Whether the database adapter supports operators.
|
|
6261
|
+
*/
|
|
6262
|
+
supportForOperators: boolean;
|
|
6263
|
+
/**
|
|
6264
|
+
* Whether the database adapter supports spatial attributes.
|
|
6265
|
+
*/
|
|
6266
|
+
supportForSpatials: boolean;
|
|
6267
|
+
/**
|
|
6268
|
+
* Whether the database adapter supports spatial indexes on nullable columns.
|
|
6269
|
+
*/
|
|
6270
|
+
supportForSpatialIndexNull: boolean;
|
|
6271
|
+
/**
|
|
6272
|
+
* Whether the database adapter supports fulltext wildcard search.
|
|
6273
|
+
*/
|
|
6274
|
+
supportForFulltextWildcard: boolean;
|
|
6275
|
+
/**
|
|
6276
|
+
* Whether the database adapter supports multiple fulltext indexes per collection.
|
|
6277
|
+
*/
|
|
6278
|
+
supportForMultipleFulltextIndexes: boolean;
|
|
6279
|
+
/**
|
|
6280
|
+
* Whether the database adapter supports resizing attributes.
|
|
6281
|
+
*/
|
|
6282
|
+
supportForAttributeResizing: boolean;
|
|
6283
|
+
/**
|
|
6284
|
+
* Whether the database adapter supports fixed schemas with row width limits.
|
|
6285
|
+
*/
|
|
6286
|
+
supportForSchemas: boolean;
|
|
6287
|
+
/**
|
|
6288
|
+
* Maximum index length supported by the database adapter.
|
|
6289
|
+
*/
|
|
6290
|
+
maxIndexLength: number;
|
|
6291
|
+
/**
|
|
6292
|
+
* Whether the database adapter uses integer sequence IDs.
|
|
6293
|
+
*/
|
|
6294
|
+
supportForIntegerIds: boolean;
|
|
6222
6295
|
};
|
|
6223
6296
|
/**
|
|
6224
6297
|
* MFA Challenge
|
|
@@ -6619,6 +6692,10 @@ export declare namespace Models {
|
|
|
6619
6692
|
* Number of functions to be migrated.
|
|
6620
6693
|
*/
|
|
6621
6694
|
function: number;
|
|
6695
|
+
/**
|
|
6696
|
+
* Number of sites to be migrated.
|
|
6697
|
+
*/
|
|
6698
|
+
site: number;
|
|
6622
6699
|
/**
|
|
6623
6700
|
* Size of files to be migrated in mb.
|
|
6624
6701
|
*/
|
|
@@ -7154,6 +7231,10 @@ export declare namespace Models {
|
|
|
7154
7231
|
* Log days
|
|
7155
7232
|
*/
|
|
7156
7233
|
logs: number;
|
|
7234
|
+
/**
|
|
7235
|
+
* Number of days of console inactivity before a project is paused. 0 means pausing is disabled.
|
|
7236
|
+
*/
|
|
7237
|
+
projectInactivityDays: number;
|
|
7157
7238
|
/**
|
|
7158
7239
|
* Alert threshold percentage
|
|
7159
7240
|
*/
|
|
@@ -8374,6 +8455,10 @@ export declare namespace Models {
|
|
|
8374
8455
|
* Dns records
|
|
8375
8456
|
*/
|
|
8376
8457
|
dnsRecords: DnsRecord[];
|
|
8458
|
+
/**
|
|
8459
|
+
* Domain transfer status (e.g., "pending", "completed", "failed").
|
|
8460
|
+
*/
|
|
8461
|
+
transferStatus: string;
|
|
8377
8462
|
};
|
|
8378
8463
|
/**
|
|
8379
8464
|
* DNSRecord
|
|
@@ -8622,6 +8707,10 @@ export declare namespace Models {
|
|
|
8622
8707
|
* Price period in years.
|
|
8623
8708
|
*/
|
|
8624
8709
|
periodYears: number;
|
|
8710
|
+
/**
|
|
8711
|
+
* Whether the domain is a premium domain.
|
|
8712
|
+
*/
|
|
8713
|
+
premium: boolean;
|
|
8625
8714
|
};
|
|
8626
8715
|
/**
|
|
8627
8716
|
* DomainSuggestion
|
|
@@ -8644,6 +8733,32 @@ export declare namespace Models {
|
|
|
8644
8733
|
*/
|
|
8645
8734
|
available: boolean;
|
|
8646
8735
|
};
|
|
8736
|
+
/**
|
|
8737
|
+
* domainTransferOut
|
|
8738
|
+
*/
|
|
8739
|
+
export type DomainTransferOut = {
|
|
8740
|
+
/**
|
|
8741
|
+
* Domain transfer authorization code.
|
|
8742
|
+
*/
|
|
8743
|
+
authCode: string;
|
|
8744
|
+
};
|
|
8745
|
+
/**
|
|
8746
|
+
* domainTransferStatus
|
|
8747
|
+
*/
|
|
8748
|
+
export type DomainTransferStatus = {
|
|
8749
|
+
/**
|
|
8750
|
+
* Transfer status.
|
|
8751
|
+
*/
|
|
8752
|
+
status: DomainTransferStatusStatus;
|
|
8753
|
+
/**
|
|
8754
|
+
* Additional transfer status information.
|
|
8755
|
+
*/
|
|
8756
|
+
reason: string;
|
|
8757
|
+
/**
|
|
8758
|
+
* Transfer status timestamp in ISO 8601 format.
|
|
8759
|
+
*/
|
|
8760
|
+
timestamp: string;
|
|
8761
|
+
};
|
|
8647
8762
|
/**
|
|
8648
8763
|
* Activity event list
|
|
8649
8764
|
*/
|
|
@@ -456,7 +456,7 @@ export declare class Databases {
|
|
|
456
456
|
*
|
|
457
457
|
*
|
|
458
458
|
* @param {string} params.databaseId - Database ID.
|
|
459
|
-
* @param {string} params.collectionId - Collection ID. You can create a new
|
|
459
|
+
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
460
460
|
* @param {string} params.key - Attribute Key.
|
|
461
461
|
* @param {boolean} params.required - Is attribute required?
|
|
462
462
|
* @param {boolean} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
@@ -478,7 +478,7 @@ export declare class Databases {
|
|
|
478
478
|
*
|
|
479
479
|
*
|
|
480
480
|
* @param {string} databaseId - Database ID.
|
|
481
|
-
* @param {string} collectionId - Collection ID. You can create a new
|
|
481
|
+
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
482
482
|
* @param {string} key - Attribute Key.
|
|
483
483
|
* @param {boolean} required - Is attribute required?
|
|
484
484
|
* @param {boolean} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
@@ -1387,6 +1387,40 @@ export declare class Databases {
|
|
|
1387
1387
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1388
1388
|
*/
|
|
1389
1389
|
createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
|
|
1390
|
+
/**
|
|
1391
|
+
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
1392
|
+
*
|
|
1393
|
+
*
|
|
1394
|
+
* @param {string} params.databaseId - Database ID.
|
|
1395
|
+
* @param {string} params.collectionId - Collection ID.
|
|
1396
|
+
* @param {string} params.key - Attribute Key.
|
|
1397
|
+
* @param {RelationMutate} params.onDelete - Constraints option
|
|
1398
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
1399
|
+
* @throws {AppwriteException}
|
|
1400
|
+
* @returns {Promise<Models.AttributeRelationship>}
|
|
1401
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
|
|
1402
|
+
*/
|
|
1403
|
+
updateRelationshipAttribute(params: {
|
|
1404
|
+
databaseId: string;
|
|
1405
|
+
collectionId: string;
|
|
1406
|
+
key: string;
|
|
1407
|
+
onDelete?: RelationMutate;
|
|
1408
|
+
newKey?: string;
|
|
1409
|
+
}): Promise<Models.AttributeRelationship>;
|
|
1410
|
+
/**
|
|
1411
|
+
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
1412
|
+
*
|
|
1413
|
+
*
|
|
1414
|
+
* @param {string} databaseId - Database ID.
|
|
1415
|
+
* @param {string} collectionId - Collection ID.
|
|
1416
|
+
* @param {string} key - Attribute Key.
|
|
1417
|
+
* @param {RelationMutate} onDelete - Constraints option
|
|
1418
|
+
* @param {string} newKey - New Attribute Key.
|
|
1419
|
+
* @throws {AppwriteException}
|
|
1420
|
+
* @returns {Promise<Models.AttributeRelationship>}
|
|
1421
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1422
|
+
*/
|
|
1423
|
+
updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
|
|
1390
1424
|
/**
|
|
1391
1425
|
* Create a string attribute.
|
|
1392
1426
|
*
|
|
@@ -1752,40 +1786,6 @@ export declare class Databases {
|
|
|
1752
1786
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1753
1787
|
*/
|
|
1754
1788
|
deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
1755
|
-
/**
|
|
1756
|
-
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
1757
|
-
*
|
|
1758
|
-
*
|
|
1759
|
-
* @param {string} params.databaseId - Database ID.
|
|
1760
|
-
* @param {string} params.collectionId - Collection ID.
|
|
1761
|
-
* @param {string} params.key - Attribute Key.
|
|
1762
|
-
* @param {RelationMutate} params.onDelete - Constraints option
|
|
1763
|
-
* @param {string} params.newKey - New Attribute Key.
|
|
1764
|
-
* @throws {AppwriteException}
|
|
1765
|
-
* @returns {Promise<Models.AttributeRelationship>}
|
|
1766
|
-
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
|
|
1767
|
-
*/
|
|
1768
|
-
updateRelationshipAttribute(params: {
|
|
1769
|
-
databaseId: string;
|
|
1770
|
-
collectionId: string;
|
|
1771
|
-
key: string;
|
|
1772
|
-
onDelete?: RelationMutate;
|
|
1773
|
-
newKey?: string;
|
|
1774
|
-
}): Promise<Models.AttributeRelationship>;
|
|
1775
|
-
/**
|
|
1776
|
-
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
1777
|
-
*
|
|
1778
|
-
*
|
|
1779
|
-
* @param {string} databaseId - Database ID.
|
|
1780
|
-
* @param {string} collectionId - Collection ID.
|
|
1781
|
-
* @param {string} key - Attribute Key.
|
|
1782
|
-
* @param {RelationMutate} onDelete - Constraints option
|
|
1783
|
-
* @param {string} newKey - New Attribute Key.
|
|
1784
|
-
* @throws {AppwriteException}
|
|
1785
|
-
* @returns {Promise<Models.AttributeRelationship>}
|
|
1786
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1787
|
-
*/
|
|
1788
|
-
updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
|
|
1789
1789
|
/**
|
|
1790
1790
|
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
1791
1791
|
*
|
|
@@ -1794,6 +1794,7 @@ export declare class Databases {
|
|
|
1794
1794
|
* @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.
|
|
1795
1795
|
* @param {string} params.transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1796
1796
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1797
|
+
* @param {number} params.ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
1797
1798
|
* @throws {AppwriteException}
|
|
1798
1799
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1799
1800
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.listRows` instead.
|
|
@@ -1804,6 +1805,7 @@ export declare class Databases {
|
|
|
1804
1805
|
queries?: string[];
|
|
1805
1806
|
transactionId?: string;
|
|
1806
1807
|
total?: boolean;
|
|
1808
|
+
ttl?: number;
|
|
1807
1809
|
}): Promise<Models.DocumentList<Document>>;
|
|
1808
1810
|
/**
|
|
1809
1811
|
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
@@ -1813,11 +1815,12 @@ export declare class Databases {
|
|
|
1813
1815
|
* @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.
|
|
1814
1816
|
* @param {string} transactionId - Transaction ID to read uncommitted changes within the transaction.
|
|
1815
1817
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
1818
|
+
* @param {number} ttl - TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).
|
|
1816
1819
|
* @throws {AppwriteException}
|
|
1817
1820
|
* @returns {Promise<Models.DocumentList<Document>>}
|
|
1818
1821
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1819
1822
|
*/
|
|
1820
|
-
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean): Promise<Models.DocumentList<Document>>;
|
|
1823
|
+
listDocuments<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, queries?: string[], transactionId?: string, total?: boolean, ttl?: number): Promise<Models.DocumentList<Document>>;
|
|
1821
1824
|
/**
|
|
1822
1825
|
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
1823
1826
|
*
|