@appwrite.io/console 1.5.2 → 1.6.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 +3 -3
- package/dist/cjs/sdk.js +7673 -9723
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +7673 -9723
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +7673 -9723
- package/docs/examples/organizations/validate-invoice.md +14 -0
- package/package.json +1 -1
- package/src/client.ts +21 -4
- package/src/enums/o-auth-provider.ts +1 -0
- package/src/models.ts +118 -6
- package/src/services/account.ts +126 -430
- package/src/services/assistant.ts +2 -7
- package/src/services/avatars.ts +7 -21
- package/src/services/backups.ts +24 -84
- package/src/services/console.ts +14 -49
- package/src/services/databases.ts +96 -336
- package/src/services/functions.ts +55 -192
- package/src/services/graphql.ts +4 -14
- package/src/services/health.ts +50 -175
- package/src/services/locale.ts +16 -56
- package/src/services/messaging.ts +92 -322
- package/src/services/migrations.ts +24 -84
- package/src/services/organizations.ts +86 -196
- package/src/services/project.ts +12 -42
- package/src/services/projects.ts +92 -322
- package/src/services/proxy.ts +10 -35
- package/src/services/storage.ts +27 -93
- package/src/services/teams.ts +28 -98
- package/src/services/users.ts +86 -301
- package/src/services/vcs.ts +20 -70
- package/types/enums/o-auth-provider.d.ts +1 -0
- package/types/models.d.ts +118 -6
- package/types/services/account.d.ts +4 -128
- package/types/services/assistant.d.ts +0 -2
- package/types/services/avatars.d.ts +0 -14
- package/types/services/backups.d.ts +0 -24
- package/types/services/console.d.ts +0 -14
- package/types/services/databases.d.ts +0 -96
- package/types/services/functions.d.ts +0 -56
- package/types/services/graphql.d.ts +0 -4
- package/types/services/health.d.ts +0 -50
- package/types/services/locale.d.ts +0 -16
- package/types/services/messaging.d.ts +0 -92
- package/types/services/migrations.d.ts +0 -24
- package/types/services/organizations.d.ts +11 -58
- package/types/services/project.d.ts +0 -12
- package/types/services/projects.d.ts +0 -92
- package/types/services/proxy.d.ts +0 -10
- package/types/services/storage.d.ts +0 -30
- package/types/services/teams.d.ts +0 -28
- package/types/services/users.d.ts +0 -86
- package/types/services/vcs.d.ts +0 -20
|
@@ -4,8 +4,6 @@ export declare class Backups {
|
|
|
4
4
|
client: Client;
|
|
5
5
|
constructor(client: Client);
|
|
6
6
|
/**
|
|
7
|
-
* List archives
|
|
8
|
-
*
|
|
9
7
|
* List all archives for a project.
|
|
10
8
|
*
|
|
11
9
|
* @param {string[]} queries
|
|
@@ -14,8 +12,6 @@ export declare class Backups {
|
|
|
14
12
|
*/
|
|
15
13
|
listArchives(queries?: string[]): Promise<Models.BackupArchiveList>;
|
|
16
14
|
/**
|
|
17
|
-
* Create archive
|
|
18
|
-
*
|
|
19
15
|
* Create a new archive asynchronously for a project.
|
|
20
16
|
*
|
|
21
17
|
* @param {string[]} services
|
|
@@ -25,8 +21,6 @@ export declare class Backups {
|
|
|
25
21
|
*/
|
|
26
22
|
createArchive(services: string[], resourceId?: string): Promise<Models.BackupArchive>;
|
|
27
23
|
/**
|
|
28
|
-
* Get backup archive
|
|
29
|
-
*
|
|
30
24
|
* Get a backup archive using it's ID.
|
|
31
25
|
*
|
|
32
26
|
* @param {string} archiveId
|
|
@@ -35,8 +29,6 @@ export declare class Backups {
|
|
|
35
29
|
*/
|
|
36
30
|
getArchive(archiveId: string): Promise<Models.BackupArchive>;
|
|
37
31
|
/**
|
|
38
|
-
* Delete archive
|
|
39
|
-
*
|
|
40
32
|
* Delete an existing archive for a project.
|
|
41
33
|
*
|
|
42
34
|
* @param {string} archiveId
|
|
@@ -45,8 +37,6 @@ export declare class Backups {
|
|
|
45
37
|
*/
|
|
46
38
|
deleteArchive(archiveId: string): Promise<{}>;
|
|
47
39
|
/**
|
|
48
|
-
* List backup policies
|
|
49
|
-
*
|
|
50
40
|
* List all policies for a project.
|
|
51
41
|
*
|
|
52
42
|
* @param {string[]} queries
|
|
@@ -55,8 +45,6 @@ export declare class Backups {
|
|
|
55
45
|
*/
|
|
56
46
|
listPolicies(queries?: string[]): Promise<Models.BackupPolicyList>;
|
|
57
47
|
/**
|
|
58
|
-
* Create backup policy
|
|
59
|
-
*
|
|
60
48
|
* Create a new backup policy.
|
|
61
49
|
*
|
|
62
50
|
* @param {string} policyId
|
|
@@ -71,8 +59,6 @@ export declare class Backups {
|
|
|
71
59
|
*/
|
|
72
60
|
createPolicy(policyId: string, services: string[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
73
61
|
/**
|
|
74
|
-
* Get backup policy
|
|
75
|
-
*
|
|
76
62
|
* Get a backup policy using it's ID.
|
|
77
63
|
*
|
|
78
64
|
* @param {string} policyId
|
|
@@ -81,8 +67,6 @@ export declare class Backups {
|
|
|
81
67
|
*/
|
|
82
68
|
getPolicy(policyId: string): Promise<Models.BackupPolicy>;
|
|
83
69
|
/**
|
|
84
|
-
* Update backup policy
|
|
85
|
-
*
|
|
86
70
|
* Update an existing policy using it's ID.
|
|
87
71
|
*
|
|
88
72
|
* @param {string} policyId
|
|
@@ -95,8 +79,6 @@ export declare class Backups {
|
|
|
95
79
|
*/
|
|
96
80
|
updatePolicy(policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
97
81
|
/**
|
|
98
|
-
* Delete backup policy
|
|
99
|
-
*
|
|
100
82
|
* Delete a policy using it's ID.
|
|
101
83
|
*
|
|
102
84
|
* @param {string} policyId
|
|
@@ -105,8 +87,6 @@ export declare class Backups {
|
|
|
105
87
|
*/
|
|
106
88
|
deletePolicy(policyId: string): Promise<{}>;
|
|
107
89
|
/**
|
|
108
|
-
* Create restoration
|
|
109
|
-
*
|
|
110
90
|
* Create and trigger a new restoration for a backup on a project.
|
|
111
91
|
*
|
|
112
92
|
* @param {string} archiveId
|
|
@@ -118,8 +98,6 @@ export declare class Backups {
|
|
|
118
98
|
*/
|
|
119
99
|
createRestoration(archiveId: string, services: string[], newResourceId?: string, newResourceName?: string): Promise<Models.BackupRestoration>;
|
|
120
100
|
/**
|
|
121
|
-
* List restorations
|
|
122
|
-
*
|
|
123
101
|
* List all backup restorations for a project.
|
|
124
102
|
*
|
|
125
103
|
* @param {string[]} queries
|
|
@@ -128,8 +106,6 @@ export declare class Backups {
|
|
|
128
106
|
*/
|
|
129
107
|
listRestorations(queries?: string[]): Promise<Models.BackupRestorationList>;
|
|
130
108
|
/**
|
|
131
|
-
* Get backup restoration
|
|
132
|
-
*
|
|
133
109
|
* Get the current status of a backup restoration.
|
|
134
110
|
*
|
|
135
111
|
* @param {string} restorationId
|
|
@@ -4,8 +4,6 @@ export declare class Console {
|
|
|
4
4
|
client: Client;
|
|
5
5
|
constructor(client: Client);
|
|
6
6
|
/**
|
|
7
|
-
* Get campaign details
|
|
8
|
-
*
|
|
9
7
|
* Recieve the details of a compaign using it's ID.
|
|
10
8
|
*
|
|
11
9
|
* @param {string} campaignId
|
|
@@ -14,8 +12,6 @@ export declare class Console {
|
|
|
14
12
|
*/
|
|
15
13
|
getCampaign(campaignId: string): Promise<Models.Campaign>;
|
|
16
14
|
/**
|
|
17
|
-
* Get coupon details
|
|
18
|
-
*
|
|
19
15
|
* Get the details of a coupon using it's coupon ID.
|
|
20
16
|
*
|
|
21
17
|
* @param {string} couponId
|
|
@@ -24,8 +20,6 @@ export declare class Console {
|
|
|
24
20
|
*/
|
|
25
21
|
getCoupon(couponId: string): Promise<Models.Coupon>;
|
|
26
22
|
/**
|
|
27
|
-
* Get plans
|
|
28
|
-
*
|
|
29
23
|
* Return a list of all available plans.
|
|
30
24
|
*
|
|
31
25
|
* @throws {AppwriteException}
|
|
@@ -33,8 +27,6 @@ export declare class Console {
|
|
|
33
27
|
*/
|
|
34
28
|
plans(): Promise<Models.BillingPlanList>;
|
|
35
29
|
/**
|
|
36
|
-
* Create program membership
|
|
37
|
-
*
|
|
38
30
|
* Create a new membership for an account to a program.
|
|
39
31
|
*
|
|
40
32
|
* @param {string} programId
|
|
@@ -43,8 +35,6 @@ export declare class Console {
|
|
|
43
35
|
*/
|
|
44
36
|
createProgramMembership<Preferences extends Models.Preferences>(programId: string): Promise<Models.Organization<Preferences>>;
|
|
45
37
|
/**
|
|
46
|
-
* Get Regions
|
|
47
|
-
*
|
|
48
38
|
* Get all available regions for the console.
|
|
49
39
|
*
|
|
50
40
|
* @throws {AppwriteException}
|
|
@@ -52,8 +42,6 @@ export declare class Console {
|
|
|
52
42
|
*/
|
|
53
43
|
regions(): Promise<Models.ConsoleRegionList>;
|
|
54
44
|
/**
|
|
55
|
-
* Create source
|
|
56
|
-
*
|
|
57
45
|
* Create a new source.
|
|
58
46
|
*
|
|
59
47
|
* @param {string} ref
|
|
@@ -66,8 +54,6 @@ export declare class Console {
|
|
|
66
54
|
*/
|
|
67
55
|
createSource(ref?: string, referrer?: string, utmSource?: string, utmCampaign?: string, utmMedium?: string): Promise<{}>;
|
|
68
56
|
/**
|
|
69
|
-
* Get variables
|
|
70
|
-
*
|
|
71
57
|
* Get all Environment Variables that are relevant for the console.
|
|
72
58
|
*
|
|
73
59
|
* @throws {AppwriteException}
|
|
@@ -8,8 +8,6 @@ export declare class Databases {
|
|
|
8
8
|
client: Client;
|
|
9
9
|
constructor(client: Client);
|
|
10
10
|
/**
|
|
11
|
-
* List databases
|
|
12
|
-
*
|
|
13
11
|
* Get a list of all databases from the current Appwrite project. You can use the search parameter to filter your results.
|
|
14
12
|
*
|
|
15
13
|
* @param {string[]} queries
|
|
@@ -19,8 +17,6 @@ export declare class Databases {
|
|
|
19
17
|
*/
|
|
20
18
|
list(queries?: string[], search?: string): Promise<Models.DatabaseList>;
|
|
21
19
|
/**
|
|
22
|
-
* Create database
|
|
23
|
-
*
|
|
24
20
|
* Create a new Database.
|
|
25
21
|
|
|
26
22
|
*
|
|
@@ -32,8 +28,6 @@ export declare class Databases {
|
|
|
32
28
|
*/
|
|
33
29
|
create(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
34
30
|
/**
|
|
35
|
-
* Get databases usage stats
|
|
36
|
-
*
|
|
37
31
|
* Get usage metrics and statistics for all databases in the project. You can view the total number of databases, collections, documents, and 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.
|
|
38
32
|
*
|
|
39
33
|
* @param {DatabaseUsageRange} range
|
|
@@ -42,8 +36,6 @@ export declare class Databases {
|
|
|
42
36
|
*/
|
|
43
37
|
getUsage(range?: DatabaseUsageRange): Promise<Models.UsageDatabases>;
|
|
44
38
|
/**
|
|
45
|
-
* Get database
|
|
46
|
-
*
|
|
47
39
|
* Get a database by its unique ID. This endpoint response returns a JSON object with the database metadata.
|
|
48
40
|
*
|
|
49
41
|
* @param {string} databaseId
|
|
@@ -52,8 +44,6 @@ export declare class Databases {
|
|
|
52
44
|
*/
|
|
53
45
|
get(databaseId: string): Promise<Models.Database>;
|
|
54
46
|
/**
|
|
55
|
-
* Update database
|
|
56
|
-
*
|
|
57
47
|
* Update a database by its unique ID.
|
|
58
48
|
*
|
|
59
49
|
* @param {string} databaseId
|
|
@@ -64,8 +54,6 @@ export declare class Databases {
|
|
|
64
54
|
*/
|
|
65
55
|
update(databaseId: string, name: string, enabled?: boolean): Promise<Models.Database>;
|
|
66
56
|
/**
|
|
67
|
-
* Delete database
|
|
68
|
-
*
|
|
69
57
|
* Delete a database by its unique ID. Only API keys with with databases.write scope can delete a database.
|
|
70
58
|
*
|
|
71
59
|
* @param {string} databaseId
|
|
@@ -74,8 +62,6 @@ export declare class Databases {
|
|
|
74
62
|
*/
|
|
75
63
|
delete(databaseId: string): Promise<{}>;
|
|
76
64
|
/**
|
|
77
|
-
* List collections
|
|
78
|
-
*
|
|
79
65
|
* Get a list of all collections that belong to the provided databaseId. You can use the search parameter to filter your results.
|
|
80
66
|
*
|
|
81
67
|
* @param {string} databaseId
|
|
@@ -86,8 +72,6 @@ export declare class Databases {
|
|
|
86
72
|
*/
|
|
87
73
|
listCollections(databaseId: string, queries?: string[], search?: string): Promise<Models.CollectionList>;
|
|
88
74
|
/**
|
|
89
|
-
* Create collection
|
|
90
|
-
*
|
|
91
75
|
* Create a new Collection. Before using this route, you should create a new database resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
|
|
92
76
|
*
|
|
93
77
|
* @param {string} databaseId
|
|
@@ -101,8 +85,6 @@ export declare class Databases {
|
|
|
101
85
|
*/
|
|
102
86
|
createCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
|
|
103
87
|
/**
|
|
104
|
-
* Get collection
|
|
105
|
-
*
|
|
106
88
|
* Get a collection by its unique ID. This endpoint response returns a JSON object with the collection metadata.
|
|
107
89
|
*
|
|
108
90
|
* @param {string} databaseId
|
|
@@ -112,8 +94,6 @@ export declare class Databases {
|
|
|
112
94
|
*/
|
|
113
95
|
getCollection(databaseId: string, collectionId: string): Promise<Models.Collection>;
|
|
114
96
|
/**
|
|
115
|
-
* Update collection
|
|
116
|
-
*
|
|
117
97
|
* Update a collection by its unique ID.
|
|
118
98
|
*
|
|
119
99
|
* @param {string} databaseId
|
|
@@ -127,8 +107,6 @@ export declare class Databases {
|
|
|
127
107
|
*/
|
|
128
108
|
updateCollection(databaseId: string, collectionId: string, name: string, permissions?: string[], documentSecurity?: boolean, enabled?: boolean): Promise<Models.Collection>;
|
|
129
109
|
/**
|
|
130
|
-
* Delete collection
|
|
131
|
-
*
|
|
132
110
|
* Delete a collection by its unique ID. Only users with write permissions have access to delete this resource.
|
|
133
111
|
*
|
|
134
112
|
* @param {string} databaseId
|
|
@@ -138,8 +116,6 @@ export declare class Databases {
|
|
|
138
116
|
*/
|
|
139
117
|
deleteCollection(databaseId: string, collectionId: string): Promise<{}>;
|
|
140
118
|
/**
|
|
141
|
-
* List attributes
|
|
142
|
-
*
|
|
143
119
|
* List attributes in the collection.
|
|
144
120
|
*
|
|
145
121
|
* @param {string} databaseId
|
|
@@ -150,8 +126,6 @@ export declare class Databases {
|
|
|
150
126
|
*/
|
|
151
127
|
listAttributes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.AttributeList>;
|
|
152
128
|
/**
|
|
153
|
-
* Create boolean attribute
|
|
154
|
-
*
|
|
155
129
|
* Create a boolean attribute.
|
|
156
130
|
|
|
157
131
|
*
|
|
@@ -166,8 +140,6 @@ export declare class Databases {
|
|
|
166
140
|
*/
|
|
167
141
|
createBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, array?: boolean): Promise<Models.AttributeBoolean>;
|
|
168
142
|
/**
|
|
169
|
-
* Update boolean attribute
|
|
170
|
-
*
|
|
171
143
|
* Update a boolean attribute. Changing the `default` value will not update already existing documents.
|
|
172
144
|
*
|
|
173
145
|
* @param {string} databaseId
|
|
@@ -181,8 +153,6 @@ export declare class Databases {
|
|
|
181
153
|
*/
|
|
182
154
|
updateBooleanAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: boolean, newKey?: string): Promise<Models.AttributeBoolean>;
|
|
183
155
|
/**
|
|
184
|
-
* Create datetime attribute
|
|
185
|
-
*
|
|
186
156
|
* Create a date time attribute according to the ISO 8601 standard.
|
|
187
157
|
*
|
|
188
158
|
* @param {string} databaseId
|
|
@@ -196,8 +166,6 @@ export declare class Databases {
|
|
|
196
166
|
*/
|
|
197
167
|
createDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeDatetime>;
|
|
198
168
|
/**
|
|
199
|
-
* Update dateTime attribute
|
|
200
|
-
*
|
|
201
169
|
* Update a date time attribute. Changing the `default` value will not update already existing documents.
|
|
202
170
|
*
|
|
203
171
|
* @param {string} databaseId
|
|
@@ -211,8 +179,6 @@ export declare class Databases {
|
|
|
211
179
|
*/
|
|
212
180
|
updateDatetimeAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeDatetime>;
|
|
213
181
|
/**
|
|
214
|
-
* Create email attribute
|
|
215
|
-
*
|
|
216
182
|
* Create an email attribute.
|
|
217
183
|
|
|
218
184
|
*
|
|
@@ -227,8 +193,6 @@ export declare class Databases {
|
|
|
227
193
|
*/
|
|
228
194
|
createEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEmail>;
|
|
229
195
|
/**
|
|
230
|
-
* Update email attribute
|
|
231
|
-
*
|
|
232
196
|
* Update an email attribute. Changing the `default` value will not update already existing documents.
|
|
233
197
|
|
|
234
198
|
*
|
|
@@ -243,8 +207,6 @@ export declare class Databases {
|
|
|
243
207
|
*/
|
|
244
208
|
updateEmailAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEmail>;
|
|
245
209
|
/**
|
|
246
|
-
* Create enum attribute
|
|
247
|
-
*
|
|
248
210
|
* Create an enumeration attribute. The `elements` param acts as a white-list of accepted values for this attribute.
|
|
249
211
|
|
|
250
212
|
*
|
|
@@ -260,8 +222,6 @@ export declare class Databases {
|
|
|
260
222
|
*/
|
|
261
223
|
createEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeEnum>;
|
|
262
224
|
/**
|
|
263
|
-
* Update enum attribute
|
|
264
|
-
*
|
|
265
225
|
* Update an enum attribute. Changing the `default` value will not update already existing documents.
|
|
266
226
|
|
|
267
227
|
*
|
|
@@ -277,8 +237,6 @@ export declare class Databases {
|
|
|
277
237
|
*/
|
|
278
238
|
updateEnumAttribute(databaseId: string, collectionId: string, key: string, elements: string[], required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeEnum>;
|
|
279
239
|
/**
|
|
280
|
-
* Create float attribute
|
|
281
|
-
*
|
|
282
240
|
* Create a float attribute. Optionally, minimum and maximum values can be provided.
|
|
283
241
|
|
|
284
242
|
*
|
|
@@ -295,8 +253,6 @@ export declare class Databases {
|
|
|
295
253
|
*/
|
|
296
254
|
createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
|
|
297
255
|
/**
|
|
298
|
-
* Update float attribute
|
|
299
|
-
*
|
|
300
256
|
* Update a float attribute. Changing the `default` value will not update already existing documents.
|
|
301
257
|
|
|
302
258
|
*
|
|
@@ -313,8 +269,6 @@ export declare class Databases {
|
|
|
313
269
|
*/
|
|
314
270
|
updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeFloat>;
|
|
315
271
|
/**
|
|
316
|
-
* Create integer attribute
|
|
317
|
-
*
|
|
318
272
|
* Create an integer attribute. Optionally, minimum and maximum values can be provided.
|
|
319
273
|
|
|
320
274
|
*
|
|
@@ -331,8 +285,6 @@ export declare class Databases {
|
|
|
331
285
|
*/
|
|
332
286
|
createIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeInteger>;
|
|
333
287
|
/**
|
|
334
|
-
* Update integer attribute
|
|
335
|
-
*
|
|
336
288
|
* Update an integer attribute. Changing the `default` value will not update already existing documents.
|
|
337
289
|
|
|
338
290
|
*
|
|
@@ -349,8 +301,6 @@ export declare class Databases {
|
|
|
349
301
|
*/
|
|
350
302
|
updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeInteger>;
|
|
351
303
|
/**
|
|
352
|
-
* Create IP address attribute
|
|
353
|
-
*
|
|
354
304
|
* Create IP address attribute.
|
|
355
305
|
|
|
356
306
|
*
|
|
@@ -365,8 +315,6 @@ export declare class Databases {
|
|
|
365
315
|
*/
|
|
366
316
|
createIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeIp>;
|
|
367
317
|
/**
|
|
368
|
-
* Update IP address attribute
|
|
369
|
-
*
|
|
370
318
|
* Update an ip attribute. Changing the `default` value will not update already existing documents.
|
|
371
319
|
|
|
372
320
|
*
|
|
@@ -381,8 +329,6 @@ export declare class Databases {
|
|
|
381
329
|
*/
|
|
382
330
|
updateIpAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeIp>;
|
|
383
331
|
/**
|
|
384
|
-
* Create relationship attribute
|
|
385
|
-
*
|
|
386
332
|
* Create relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
387
333
|
|
|
388
334
|
*
|
|
@@ -399,8 +345,6 @@ export declare class Databases {
|
|
|
399
345
|
*/
|
|
400
346
|
createRelationshipAttribute(databaseId: string, collectionId: string, relatedCollectionId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.AttributeRelationship>;
|
|
401
347
|
/**
|
|
402
|
-
* Create string attribute
|
|
403
|
-
*
|
|
404
348
|
* Create a string attribute.
|
|
405
349
|
|
|
406
350
|
*
|
|
@@ -417,8 +361,6 @@ export declare class Databases {
|
|
|
417
361
|
*/
|
|
418
362
|
createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
|
|
419
363
|
/**
|
|
420
|
-
* Update string attribute
|
|
421
|
-
*
|
|
422
364
|
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
423
365
|
|
|
424
366
|
*
|
|
@@ -434,8 +376,6 @@ export declare class Databases {
|
|
|
434
376
|
*/
|
|
435
377
|
updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString>;
|
|
436
378
|
/**
|
|
437
|
-
* Create URL attribute
|
|
438
|
-
*
|
|
439
379
|
* Create a URL attribute.
|
|
440
380
|
|
|
441
381
|
*
|
|
@@ -450,8 +390,6 @@ export declare class Databases {
|
|
|
450
390
|
*/
|
|
451
391
|
createUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeUrl>;
|
|
452
392
|
/**
|
|
453
|
-
* Update URL attribute
|
|
454
|
-
*
|
|
455
393
|
* Update an url attribute. Changing the `default` value will not update already existing documents.
|
|
456
394
|
|
|
457
395
|
*
|
|
@@ -466,8 +404,6 @@ export declare class Databases {
|
|
|
466
404
|
*/
|
|
467
405
|
updateUrlAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, newKey?: string): Promise<Models.AttributeUrl>;
|
|
468
406
|
/**
|
|
469
|
-
* Get attribute
|
|
470
|
-
*
|
|
471
407
|
* Get attribute by ID.
|
|
472
408
|
*
|
|
473
409
|
* @param {string} databaseId
|
|
@@ -478,8 +414,6 @@ export declare class Databases {
|
|
|
478
414
|
*/
|
|
479
415
|
getAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
480
416
|
/**
|
|
481
|
-
* Delete attribute
|
|
482
|
-
*
|
|
483
417
|
* Deletes an attribute.
|
|
484
418
|
*
|
|
485
419
|
* @param {string} databaseId
|
|
@@ -490,8 +424,6 @@ export declare class Databases {
|
|
|
490
424
|
*/
|
|
491
425
|
deleteAttribute(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
492
426
|
/**
|
|
493
|
-
* Update relationship attribute
|
|
494
|
-
*
|
|
495
427
|
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
496
428
|
|
|
497
429
|
*
|
|
@@ -505,8 +437,6 @@ export declare class Databases {
|
|
|
505
437
|
*/
|
|
506
438
|
updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
|
|
507
439
|
/**
|
|
508
|
-
* List documents
|
|
509
|
-
*
|
|
510
440
|
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
|
|
511
441
|
*
|
|
512
442
|
* @param {string} databaseId
|
|
@@ -517,8 +447,6 @@ export declare class Databases {
|
|
|
517
447
|
*/
|
|
518
448
|
listDocuments<Document extends Models.Document>(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.DocumentList<Document>>;
|
|
519
449
|
/**
|
|
520
|
-
* Create document
|
|
521
|
-
*
|
|
522
450
|
* 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.
|
|
523
451
|
|
|
524
452
|
*
|
|
@@ -532,8 +460,6 @@ export declare class Databases {
|
|
|
532
460
|
*/
|
|
533
461
|
createDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data: Omit<Document, keyof Models.Document>, permissions?: string[]): Promise<Document>;
|
|
534
462
|
/**
|
|
535
|
-
* Get document
|
|
536
|
-
*
|
|
537
463
|
* Get a document by its unique ID. This endpoint response returns a JSON object with the document data.
|
|
538
464
|
*
|
|
539
465
|
* @param {string} databaseId
|
|
@@ -545,8 +471,6 @@ export declare class Databases {
|
|
|
545
471
|
*/
|
|
546
472
|
getDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Document>;
|
|
547
473
|
/**
|
|
548
|
-
* Update document
|
|
549
|
-
*
|
|
550
474
|
* Update a document by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
551
475
|
*
|
|
552
476
|
* @param {string} databaseId
|
|
@@ -559,8 +483,6 @@ export declare class Databases {
|
|
|
559
483
|
*/
|
|
560
484
|
updateDocument<Document extends Models.Document>(databaseId: string, collectionId: string, documentId: string, data?: Partial<Omit<Document, keyof Models.Document>>, permissions?: string[]): Promise<Document>;
|
|
561
485
|
/**
|
|
562
|
-
* Delete document
|
|
563
|
-
*
|
|
564
486
|
* Delete a document by its unique ID.
|
|
565
487
|
*
|
|
566
488
|
* @param {string} databaseId
|
|
@@ -571,8 +493,6 @@ export declare class Databases {
|
|
|
571
493
|
*/
|
|
572
494
|
deleteDocument(databaseId: string, collectionId: string, documentId: string): Promise<{}>;
|
|
573
495
|
/**
|
|
574
|
-
* List document logs
|
|
575
|
-
*
|
|
576
496
|
* Get the document activity logs list by its unique ID.
|
|
577
497
|
*
|
|
578
498
|
* @param {string} databaseId
|
|
@@ -584,8 +504,6 @@ export declare class Databases {
|
|
|
584
504
|
*/
|
|
585
505
|
listDocumentLogs(databaseId: string, collectionId: string, documentId: string, queries?: string[]): Promise<Models.LogList>;
|
|
586
506
|
/**
|
|
587
|
-
* List indexes
|
|
588
|
-
*
|
|
589
507
|
* List indexes in the collection.
|
|
590
508
|
*
|
|
591
509
|
* @param {string} databaseId
|
|
@@ -596,8 +514,6 @@ export declare class Databases {
|
|
|
596
514
|
*/
|
|
597
515
|
listIndexes(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.IndexList>;
|
|
598
516
|
/**
|
|
599
|
-
* Create index
|
|
600
|
-
*
|
|
601
517
|
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
602
518
|
Attributes can be `key`, `fulltext`, and `unique`.
|
|
603
519
|
*
|
|
@@ -612,8 +528,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
|
|
|
612
528
|
*/
|
|
613
529
|
createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[]): Promise<Models.Index>;
|
|
614
530
|
/**
|
|
615
|
-
* Get index
|
|
616
|
-
*
|
|
617
531
|
* Get index by ID.
|
|
618
532
|
*
|
|
619
533
|
* @param {string} databaseId
|
|
@@ -624,8 +538,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
|
|
|
624
538
|
*/
|
|
625
539
|
getIndex(databaseId: string, collectionId: string, key: string): Promise<Models.Index>;
|
|
626
540
|
/**
|
|
627
|
-
* Delete index
|
|
628
|
-
*
|
|
629
541
|
* Delete an index.
|
|
630
542
|
*
|
|
631
543
|
* @param {string} databaseId
|
|
@@ -636,8 +548,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
|
|
|
636
548
|
*/
|
|
637
549
|
deleteIndex(databaseId: string, collectionId: string, key: string): Promise<{}>;
|
|
638
550
|
/**
|
|
639
|
-
* List collection logs
|
|
640
|
-
*
|
|
641
551
|
* Get the collection activity logs list by its unique ID.
|
|
642
552
|
*
|
|
643
553
|
* @param {string} databaseId
|
|
@@ -648,8 +558,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
|
|
|
648
558
|
*/
|
|
649
559
|
listCollectionLogs(databaseId: string, collectionId: string, queries?: string[]): Promise<Models.LogList>;
|
|
650
560
|
/**
|
|
651
|
-
* Get collection usage stats
|
|
652
|
-
*
|
|
653
561
|
* Get usage metrics and statistics for a collection. Returning the total number of documents. 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.
|
|
654
562
|
*
|
|
655
563
|
* @param {string} databaseId
|
|
@@ -660,8 +568,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
|
|
|
660
568
|
*/
|
|
661
569
|
getCollectionUsage(databaseId: string, collectionId: string, range?: DatabaseUsageRange): Promise<Models.UsageCollection>;
|
|
662
570
|
/**
|
|
663
|
-
* List database logs
|
|
664
|
-
*
|
|
665
571
|
* Get the database activity logs list by its unique ID.
|
|
666
572
|
*
|
|
667
573
|
* @param {string} databaseId
|
|
@@ -671,8 +577,6 @@ Attributes can be `key`, `fulltext`, and `unique`.
|
|
|
671
577
|
*/
|
|
672
578
|
listLogs(databaseId: string, queries?: string[]): Promise<Models.LogList>;
|
|
673
579
|
/**
|
|
674
|
-
* Get database usage stats
|
|
675
|
-
*
|
|
676
580
|
* Get usage metrics and statistics for a database. You can view the total number of collections, documents, and 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.
|
|
677
581
|
*
|
|
678
582
|
* @param {string} databaseId
|