@appwrite.io/console 12.0.0 → 12.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cjs/sdk.js +552 -80
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +553 -81
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +553 -81
- package/package.json +1 -1
- package/types/client.d.ts +23 -2
- package/types/enums/{method-id.d.ts → auth-method.d.ts} +1 -1
- package/types/enums/o-auth-provider.d.ts +3 -1
- package/types/enums/on-duplicate.d.ts +5 -0
- package/types/enums/{policy-id.d.ts → project-policy.d.ts} +1 -1
- package/types/enums/proxy-rule-status.d.ts +2 -3
- package/types/enums/query-suggestion-resource.d.ts +74 -0
- package/types/enums/scopes.d.ts +6 -2
- package/types/index.d.ts +4 -2
- package/types/models.d.ts +107 -9
- package/types/services/console.d.ts +31 -0
- package/types/services/databases.d.ts +86 -0
- package/types/services/functions.d.ts +13 -4
- package/types/services/migrations.d.ts +13 -3
- package/types/services/project.d.ts +128 -112
- package/types/services/proxy.d.ts +21 -8
- package/types/services/sites.d.ts +13 -4
- package/types/services/tables-db.d.ts +84 -0
- package/types/services/vcs.d.ts +9 -3
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@appwrite.io/console",
|
|
3
3
|
"homepage": "https://appwrite.io/support",
|
|
4
4
|
"description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
5
|
-
"version": "12.
|
|
5
|
+
"version": "12.2.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
package/types/client.d.ts
CHANGED
|
@@ -114,12 +114,13 @@ declare class Client {
|
|
|
114
114
|
locale: string;
|
|
115
115
|
mode: string;
|
|
116
116
|
cookie: string;
|
|
117
|
+
session: string;
|
|
118
|
+
devkey: string;
|
|
117
119
|
impersonateuserid: string;
|
|
118
120
|
impersonateuseremail: string;
|
|
119
121
|
impersonateuserphone: string;
|
|
120
122
|
platform: string;
|
|
121
123
|
selfSigned: boolean;
|
|
122
|
-
session?: string;
|
|
123
124
|
};
|
|
124
125
|
/**
|
|
125
126
|
* Custom headers for API requests.
|
|
@@ -209,13 +210,33 @@ declare class Client {
|
|
|
209
210
|
/**
|
|
210
211
|
* Set Cookie
|
|
211
212
|
*
|
|
212
|
-
* The user cookie to authenticate with
|
|
213
|
+
* The user cookie to authenticate with. Used by SDKs that forward an incoming Cookie header in server-side runtimes.
|
|
213
214
|
*
|
|
214
215
|
* @param value string
|
|
215
216
|
*
|
|
216
217
|
* @return {this}
|
|
217
218
|
*/
|
|
218
219
|
setCookie(value: string): this;
|
|
220
|
+
/**
|
|
221
|
+
* Set Session
|
|
222
|
+
*
|
|
223
|
+
* The user session to authenticate with
|
|
224
|
+
*
|
|
225
|
+
* @param value string
|
|
226
|
+
*
|
|
227
|
+
* @return {this}
|
|
228
|
+
*/
|
|
229
|
+
setSession(value: string): this;
|
|
230
|
+
/**
|
|
231
|
+
* Set DevKey
|
|
232
|
+
*
|
|
233
|
+
* Your secret dev API key
|
|
234
|
+
*
|
|
235
|
+
* @param value string
|
|
236
|
+
*
|
|
237
|
+
* @return {this}
|
|
238
|
+
*/
|
|
239
|
+
setDevKey(value: string): this;
|
|
219
240
|
/**
|
|
220
241
|
* Set ImpersonateUserId
|
|
221
242
|
*
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
export declare enum QuerySuggestionResource {
|
|
2
|
+
Activities = "activities",
|
|
3
|
+
ActivityEvents = "activityevents",
|
|
4
|
+
Archives = "archives",
|
|
5
|
+
Credits = "credits",
|
|
6
|
+
DnsRecords = "dnsrecords",
|
|
7
|
+
Domains = "domains",
|
|
8
|
+
Invoices = "invoices",
|
|
9
|
+
PaymentMethods = "paymentmethods",
|
|
10
|
+
Policies = "policies",
|
|
11
|
+
Projects = "projects",
|
|
12
|
+
Restorations = "restorations",
|
|
13
|
+
TeamAggregations = "teamaggregations",
|
|
14
|
+
Teams = "teams",
|
|
15
|
+
Databases = "databases",
|
|
16
|
+
Tables = "tables",
|
|
17
|
+
Rows = "rows",
|
|
18
|
+
Schedules = "schedules",
|
|
19
|
+
Platforms = "platforms",
|
|
20
|
+
Keys = "keys",
|
|
21
|
+
DevKeys = "devkeys",
|
|
22
|
+
Webhooks = "webhooks",
|
|
23
|
+
Certificates = "certificates",
|
|
24
|
+
Realtime = "realtime",
|
|
25
|
+
Rules = "rules",
|
|
26
|
+
Installations = "installations",
|
|
27
|
+
Repositories = "repositories",
|
|
28
|
+
VcsComments = "vcscomments",
|
|
29
|
+
VcsCommentLocks = "vcscommentlocks",
|
|
30
|
+
Users = "users",
|
|
31
|
+
Cache = "cache",
|
|
32
|
+
Tokens = "tokens",
|
|
33
|
+
Authenticators = "authenticators",
|
|
34
|
+
Challenges = "challenges",
|
|
35
|
+
Sessions = "sessions",
|
|
36
|
+
Identities = "identities",
|
|
37
|
+
Memberships = "memberships",
|
|
38
|
+
Buckets = "buckets",
|
|
39
|
+
Providers = "providers",
|
|
40
|
+
Messages = "messages",
|
|
41
|
+
Topics = "topics",
|
|
42
|
+
Subscribers = "subscribers",
|
|
43
|
+
Targets = "targets",
|
|
44
|
+
Companies = "companies",
|
|
45
|
+
BillingAddresses = "billingaddresses",
|
|
46
|
+
BillingAggregations = "billingaggregations",
|
|
47
|
+
BillingAggregationResources = "billingaggregationresources",
|
|
48
|
+
BillingTeamProjectAggregations = "billingteamprojectaggregations",
|
|
49
|
+
BillingTeamAggregationsV2 = "billingteamaggregations_v2",
|
|
50
|
+
BillingTeamAggregationResources = "billingteamaggregationresources",
|
|
51
|
+
BillingInvoicesV2 = "billinginvoices_v2",
|
|
52
|
+
BillingAddons = "billingaddons",
|
|
53
|
+
Alerts = "alerts",
|
|
54
|
+
Payments = "payments",
|
|
55
|
+
BillingDiscounts = "billingdiscounts",
|
|
56
|
+
Sources = "sources",
|
|
57
|
+
Deals = "deals",
|
|
58
|
+
Blocks = "blocks",
|
|
59
|
+
Threats = "threats",
|
|
60
|
+
Feedbacks = "feedbacks",
|
|
61
|
+
ShInstallations = "sh_installations",
|
|
62
|
+
Attributes = "attributes",
|
|
63
|
+
Indexes = "indexes",
|
|
64
|
+
Functions = "functions",
|
|
65
|
+
Sites = "sites",
|
|
66
|
+
Deployments = "deployments",
|
|
67
|
+
Executions = "executions",
|
|
68
|
+
Variables = "variables",
|
|
69
|
+
Migrations = "migrations",
|
|
70
|
+
ResourceTokens = "resourcetokens",
|
|
71
|
+
Transactions = "transactions",
|
|
72
|
+
TransactionLogs = "transactionlogs",
|
|
73
|
+
Stats = "stats"
|
|
74
|
+
}
|
package/types/enums/scopes.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export declare enum Scopes {
|
|
|
12
12
|
MocksWrite = "mocks.write",
|
|
13
13
|
PoliciesRead = "policies.read",
|
|
14
14
|
PoliciesWrite = "policies.write",
|
|
15
|
+
ProjectPoliciesRead = "project.policies.read",
|
|
16
|
+
ProjectPoliciesWrite = "project.policies.write",
|
|
15
17
|
TemplatesRead = "templates.read",
|
|
16
18
|
TemplatesWrite = "templates.write",
|
|
17
19
|
Oauth2Read = "oauth2.read",
|
|
@@ -62,6 +64,8 @@ export declare enum Scopes {
|
|
|
62
64
|
TargetsWrite = "targets.write",
|
|
63
65
|
MessagesRead = "messages.read",
|
|
64
66
|
MessagesWrite = "messages.write",
|
|
67
|
+
RulesRead = "rules.read",
|
|
68
|
+
RulesWrite = "rules.write",
|
|
65
69
|
WebhooksRead = "webhooks.read",
|
|
66
70
|
WebhooksWrite = "webhooks.write",
|
|
67
71
|
LocaleRead = "locale.read",
|
|
@@ -74,8 +78,8 @@ export declare enum Scopes {
|
|
|
74
78
|
SchedulesWrite = "schedules.write",
|
|
75
79
|
VcsRead = "vcs.read",
|
|
76
80
|
VcsWrite = "vcs.write",
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
BackupsPoliciesRead = "backups.policies.read",
|
|
82
|
+
BackupsPoliciesWrite = "backups.policies.write",
|
|
79
83
|
ArchivesRead = "archives.read",
|
|
80
84
|
ArchivesWrite = "archives.write",
|
|
81
85
|
RestorationsRead = "restorations.read",
|
package/types/index.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export { ImageFormat } from './enums/image-format';
|
|
|
58
58
|
export { BackupServices } from './enums/backup-services';
|
|
59
59
|
export { Platform } from './enums/platform';
|
|
60
60
|
export { ConsoleResourceType } from './enums/console-resource-type';
|
|
61
|
+
export { QuerySuggestionResource } from './enums/query-suggestion-resource';
|
|
61
62
|
export { UsageRange } from './enums/usage-range';
|
|
62
63
|
export { RelationshipType } from './enums/relationship-type';
|
|
63
64
|
export { RelationMutate } from './enums/relation-mutate';
|
|
@@ -78,12 +79,13 @@ export { ResourceType } from './enums/resource-type';
|
|
|
78
79
|
export { MessagePriority } from './enums/message-priority';
|
|
79
80
|
export { SmtpEncryption } from './enums/smtp-encryption';
|
|
80
81
|
export { AppwriteMigrationResource } from './enums/appwrite-migration-resource';
|
|
82
|
+
export { OnDuplicate } from './enums/on-duplicate';
|
|
81
83
|
export { FirebaseMigrationResource } from './enums/firebase-migration-resource';
|
|
82
84
|
export { NHostMigrationResource } from './enums/n-host-migration-resource';
|
|
83
85
|
export { SupabaseMigrationResource } from './enums/supabase-migration-resource';
|
|
84
86
|
export { Addon } from './enums/addon';
|
|
85
|
-
export {
|
|
86
|
-
export {
|
|
87
|
+
export { AuthMethod } from './enums/auth-method';
|
|
88
|
+
export { ProjectPolicy } from './enums/project-policy';
|
|
87
89
|
export { ProtocolId } from './enums/protocol-id';
|
|
88
90
|
export { ServiceId } from './enums/service-id';
|
|
89
91
|
export { Secure } from './enums/secure';
|
package/types/models.d.ts
CHANGED
|
@@ -854,7 +854,7 @@ export declare namespace Models {
|
|
|
854
854
|
/**
|
|
855
855
|
* Collection attributes.
|
|
856
856
|
*/
|
|
857
|
-
attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
|
|
857
|
+
attributes: (Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
|
|
858
858
|
/**
|
|
859
859
|
* Collection indexes.
|
|
860
860
|
*/
|
|
@@ -879,7 +879,7 @@ export declare namespace Models {
|
|
|
879
879
|
/**
|
|
880
880
|
* List of attributes.
|
|
881
881
|
*/
|
|
882
|
-
attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
|
|
882
|
+
attributes: (Models.AttributeBoolean | Models.AttributeBigint | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
|
|
883
883
|
};
|
|
884
884
|
/**
|
|
885
885
|
* AttributeString
|
|
@@ -979,6 +979,55 @@ export declare namespace Models {
|
|
|
979
979
|
*/
|
|
980
980
|
default?: number;
|
|
981
981
|
};
|
|
982
|
+
/**
|
|
983
|
+
* AttributeBigInt
|
|
984
|
+
*/
|
|
985
|
+
export type AttributeBigint = {
|
|
986
|
+
/**
|
|
987
|
+
* Attribute Key.
|
|
988
|
+
*/
|
|
989
|
+
key: string;
|
|
990
|
+
/**
|
|
991
|
+
* Attribute type.
|
|
992
|
+
*/
|
|
993
|
+
type: string;
|
|
994
|
+
/**
|
|
995
|
+
* Attribute status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
996
|
+
*/
|
|
997
|
+
status: AttributeStatus;
|
|
998
|
+
/**
|
|
999
|
+
* Error message. Displays error generated on failure of creating or deleting an attribute.
|
|
1000
|
+
*/
|
|
1001
|
+
error: string;
|
|
1002
|
+
/**
|
|
1003
|
+
* Is attribute required?
|
|
1004
|
+
*/
|
|
1005
|
+
required: boolean;
|
|
1006
|
+
/**
|
|
1007
|
+
* Is attribute an array?
|
|
1008
|
+
*/
|
|
1009
|
+
array?: boolean;
|
|
1010
|
+
/**
|
|
1011
|
+
* Attribute creation date in ISO 8601 format.
|
|
1012
|
+
*/
|
|
1013
|
+
$createdAt: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* Attribute update date in ISO 8601 format.
|
|
1016
|
+
*/
|
|
1017
|
+
$updatedAt: string;
|
|
1018
|
+
/**
|
|
1019
|
+
* Minimum value to enforce for new documents.
|
|
1020
|
+
*/
|
|
1021
|
+
min?: number | bigint;
|
|
1022
|
+
/**
|
|
1023
|
+
* Maximum value to enforce for new documents.
|
|
1024
|
+
*/
|
|
1025
|
+
max?: number | bigint;
|
|
1026
|
+
/**
|
|
1027
|
+
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1028
|
+
*/
|
|
1029
|
+
default?: number | bigint;
|
|
1030
|
+
};
|
|
982
1031
|
/**
|
|
983
1032
|
* AttributeFloat
|
|
984
1033
|
*/
|
|
@@ -1995,7 +2044,7 @@ export declare namespace Models {
|
|
|
1995
2044
|
/**
|
|
1996
2045
|
* Table columns.
|
|
1997
2046
|
*/
|
|
1998
|
-
columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
|
|
2047
|
+
columns: (Models.ColumnBoolean | Models.ColumnBigint | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
|
|
1999
2048
|
/**
|
|
2000
2049
|
* Table indexes.
|
|
2001
2050
|
*/
|
|
@@ -2020,7 +2069,7 @@ export declare namespace Models {
|
|
|
2020
2069
|
/**
|
|
2021
2070
|
* List of columns.
|
|
2022
2071
|
*/
|
|
2023
|
-
columns: (Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
|
|
2072
|
+
columns: (Models.ColumnBoolean | Models.ColumnBigint | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnPoint | Models.ColumnLine | Models.ColumnPolygon | Models.ColumnVarchar | Models.ColumnText | Models.ColumnMediumtext | Models.ColumnLongtext | Models.ColumnString)[];
|
|
2024
2073
|
};
|
|
2025
2074
|
/**
|
|
2026
2075
|
* ColumnString
|
|
@@ -2120,6 +2169,55 @@ export declare namespace Models {
|
|
|
2120
2169
|
*/
|
|
2121
2170
|
default?: number;
|
|
2122
2171
|
};
|
|
2172
|
+
/**
|
|
2173
|
+
* ColumnBigInt
|
|
2174
|
+
*/
|
|
2175
|
+
export type ColumnBigint = {
|
|
2176
|
+
/**
|
|
2177
|
+
* Column Key.
|
|
2178
|
+
*/
|
|
2179
|
+
key: string;
|
|
2180
|
+
/**
|
|
2181
|
+
* Column type.
|
|
2182
|
+
*/
|
|
2183
|
+
type: string;
|
|
2184
|
+
/**
|
|
2185
|
+
* Column status. Possible values: `available`, `processing`, `deleting`, `stuck`, or `failed`
|
|
2186
|
+
*/
|
|
2187
|
+
status: ColumnStatus;
|
|
2188
|
+
/**
|
|
2189
|
+
* Error message. Displays error generated on failure of creating or deleting an column.
|
|
2190
|
+
*/
|
|
2191
|
+
error: string;
|
|
2192
|
+
/**
|
|
2193
|
+
* Is column required?
|
|
2194
|
+
*/
|
|
2195
|
+
required: boolean;
|
|
2196
|
+
/**
|
|
2197
|
+
* Is column an array?
|
|
2198
|
+
*/
|
|
2199
|
+
array?: boolean;
|
|
2200
|
+
/**
|
|
2201
|
+
* Column creation date in ISO 8601 format.
|
|
2202
|
+
*/
|
|
2203
|
+
$createdAt: string;
|
|
2204
|
+
/**
|
|
2205
|
+
* Column update date in ISO 8601 format.
|
|
2206
|
+
*/
|
|
2207
|
+
$updatedAt: string;
|
|
2208
|
+
/**
|
|
2209
|
+
* Minimum value to enforce for new documents.
|
|
2210
|
+
*/
|
|
2211
|
+
min?: number | bigint;
|
|
2212
|
+
/**
|
|
2213
|
+
* Maximum value to enforce for new documents.
|
|
2214
|
+
*/
|
|
2215
|
+
max?: number | bigint;
|
|
2216
|
+
/**
|
|
2217
|
+
* Default value for column when not provided. Cannot be set when column is required.
|
|
2218
|
+
*/
|
|
2219
|
+
default?: number | bigint;
|
|
2220
|
+
};
|
|
2123
2221
|
/**
|
|
2124
2222
|
* ColumnFloat
|
|
2125
2223
|
*/
|
|
@@ -6096,11 +6194,11 @@ export declare namespace Models {
|
|
|
6096
6194
|
/**
|
|
6097
6195
|
* OpenID Connect token endpoint URL.
|
|
6098
6196
|
*/
|
|
6099
|
-
|
|
6197
|
+
tokenURL: string;
|
|
6100
6198
|
/**
|
|
6101
6199
|
* OpenID Connect user info endpoint URL.
|
|
6102
6200
|
*/
|
|
6103
|
-
|
|
6201
|
+
userInfoURL: string;
|
|
6104
6202
|
};
|
|
6105
6203
|
/**
|
|
6106
6204
|
* OAuth2Okta
|
|
@@ -7895,7 +7993,7 @@ export declare namespace Models {
|
|
|
7895
7993
|
*/
|
|
7896
7994
|
deploymentResourceType?: ProxyRuleDeploymentResourceType;
|
|
7897
7995
|
/**
|
|
7898
|
-
* ID deployment's resource. Used if type is "deployment"
|
|
7996
|
+
* ID of deployment's resource (site or function ID). Used if type is "deployment"
|
|
7899
7997
|
*/
|
|
7900
7998
|
deploymentResourceId: string;
|
|
7901
7999
|
/**
|
|
@@ -7903,7 +8001,7 @@ export declare namespace Models {
|
|
|
7903
8001
|
*/
|
|
7904
8002
|
deploymentVcsProviderBranch: string;
|
|
7905
8003
|
/**
|
|
7906
|
-
* Domain verification status. Possible values are "
|
|
8004
|
+
* Domain verification status. Possible values are "unverified", "verifying", "verified"
|
|
7907
8005
|
*/
|
|
7908
8006
|
status: ProxyRuleStatus;
|
|
7909
8007
|
/**
|
|
@@ -8956,7 +9054,7 @@ export declare namespace Models {
|
|
|
8956
9054
|
*/
|
|
8957
9055
|
size: number;
|
|
8958
9056
|
/**
|
|
8959
|
-
* The status of the archive creation. Possible values: pending, processing, uploading, completed, failed.
|
|
9057
|
+
* The status of the archive creation. Possible values: pending, processing, uploading, completed, failed, skipped.
|
|
8960
9058
|
*/
|
|
8961
9059
|
status: string;
|
|
8962
9060
|
/**
|
|
@@ -2,6 +2,7 @@ import { Client } from '../client';
|
|
|
2
2
|
import type { Models } from '../models';
|
|
3
3
|
import { Platform } from '../enums/platform';
|
|
4
4
|
import { ConsoleResourceType } from '../enums/console-resource-type';
|
|
5
|
+
import { QuerySuggestionResource } from '../enums/query-suggestion-resource';
|
|
5
6
|
export declare class Console {
|
|
6
7
|
client: Client;
|
|
7
8
|
constructor(client: Client);
|
|
@@ -252,6 +253,36 @@ export declare class Console {
|
|
|
252
253
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
253
254
|
*/
|
|
254
255
|
suggestIndexes(databaseId: string, tableId: string, min?: number, max?: number): Promise<Models.ColumnIndexList>;
|
|
256
|
+
/**
|
|
257
|
+
* Suggest valid Appwrite query JSON objects for a supported list resource from free-text user intent. The endpoint picks a validator based on `resource` — for system resources it uses the static validator and its allowed attributes, and for user-owned table rows it loads the table schema and validates against those attributes at request time. The returned queries are guaranteed to parse and pass the relevant queries validator.
|
|
258
|
+
*
|
|
259
|
+
*
|
|
260
|
+
* @param {QuerySuggestionResource} params.resource - Resource to generate queries for.
|
|
261
|
+
* @param {string} params.input - Natural language query intent used to generate filters/sorting/pagination.
|
|
262
|
+
* @param {string} params.databaseId - Database ID. Required when resource is `tables` or `rows`.
|
|
263
|
+
* @param {string} params.tableId - Table ID. Required when resource is `rows`.
|
|
264
|
+
* @throws {AppwriteException}
|
|
265
|
+
* @returns {Promise<{}>}
|
|
266
|
+
*/
|
|
267
|
+
suggestQueries(params: {
|
|
268
|
+
resource: QuerySuggestionResource;
|
|
269
|
+
input: string;
|
|
270
|
+
databaseId?: string;
|
|
271
|
+
tableId?: string;
|
|
272
|
+
}): Promise<{}>;
|
|
273
|
+
/**
|
|
274
|
+
* Suggest valid Appwrite query JSON objects for a supported list resource from free-text user intent. The endpoint picks a validator based on `resource` — for system resources it uses the static validator and its allowed attributes, and for user-owned table rows it loads the table schema and validates against those attributes at request time. The returned queries are guaranteed to parse and pass the relevant queries validator.
|
|
275
|
+
*
|
|
276
|
+
*
|
|
277
|
+
* @param {QuerySuggestionResource} resource - Resource to generate queries for.
|
|
278
|
+
* @param {string} input - Natural language query intent used to generate filters/sorting/pagination.
|
|
279
|
+
* @param {string} databaseId - Database ID. Required when resource is `tables` or `rows`.
|
|
280
|
+
* @param {string} tableId - Table ID. Required when resource is `rows`.
|
|
281
|
+
* @throws {AppwriteException}
|
|
282
|
+
* @returns {Promise<{}>}
|
|
283
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
284
|
+
*/
|
|
285
|
+
suggestQueries(resource: QuerySuggestionResource, input: string, databaseId?: string, tableId?: string): Promise<{}>;
|
|
255
286
|
/**
|
|
256
287
|
* Get all Environment Variables that are relevant for the console.
|
|
257
288
|
*
|
|
@@ -454,6 +454,92 @@ export declare class Databases {
|
|
|
454
454
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
455
455
|
*/
|
|
456
456
|
listAttributes(databaseId: string, collectionId: string, queries?: string[], total?: boolean): Promise<Models.AttributeList>;
|
|
457
|
+
/**
|
|
458
|
+
* Create a bigint attribute. Optionally, minimum and maximum values can be provided.
|
|
459
|
+
*
|
|
460
|
+
*
|
|
461
|
+
* @param {string} params.databaseId - Database ID.
|
|
462
|
+
* @param {string} params.collectionId - Collection ID.
|
|
463
|
+
* @param {string} params.key - Attribute Key.
|
|
464
|
+
* @param {boolean} params.required - Is attribute required?
|
|
465
|
+
* @param {number | bigint} params.min - Minimum value
|
|
466
|
+
* @param {number | bigint} params.max - Maximum value
|
|
467
|
+
* @param {number | bigint} params.xdefault - Default value. Cannot be set when attribute is required.
|
|
468
|
+
* @param {boolean} params.array - Is attribute an array?
|
|
469
|
+
* @throws {AppwriteException}
|
|
470
|
+
* @returns {Promise<Models.AttributeBigint>}
|
|
471
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createBigIntColumn` instead.
|
|
472
|
+
*/
|
|
473
|
+
createBigIntAttribute(params: {
|
|
474
|
+
databaseId: string;
|
|
475
|
+
collectionId: string;
|
|
476
|
+
key: string;
|
|
477
|
+
required: boolean;
|
|
478
|
+
min?: number | bigint;
|
|
479
|
+
max?: number | bigint;
|
|
480
|
+
xdefault?: number | bigint;
|
|
481
|
+
array?: boolean;
|
|
482
|
+
}): Promise<Models.AttributeBigint>;
|
|
483
|
+
/**
|
|
484
|
+
* Create a bigint attribute. Optionally, minimum and maximum values can be provided.
|
|
485
|
+
*
|
|
486
|
+
*
|
|
487
|
+
* @param {string} databaseId - Database ID.
|
|
488
|
+
* @param {string} collectionId - Collection ID.
|
|
489
|
+
* @param {string} key - Attribute Key.
|
|
490
|
+
* @param {boolean} required - Is attribute required?
|
|
491
|
+
* @param {number | bigint} min - Minimum value
|
|
492
|
+
* @param {number | bigint} max - Maximum value
|
|
493
|
+
* @param {number | bigint} xdefault - Default value. Cannot be set when attribute is required.
|
|
494
|
+
* @param {boolean} array - Is attribute an array?
|
|
495
|
+
* @throws {AppwriteException}
|
|
496
|
+
* @returns {Promise<Models.AttributeBigint>}
|
|
497
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
498
|
+
*/
|
|
499
|
+
createBigIntAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number | bigint, max?: number | bigint, xdefault?: number | bigint, array?: boolean): Promise<Models.AttributeBigint>;
|
|
500
|
+
/**
|
|
501
|
+
* Update a bigint attribute. Changing the `default` value will not update already existing documents.
|
|
502
|
+
*
|
|
503
|
+
*
|
|
504
|
+
* @param {string} params.databaseId - Database ID.
|
|
505
|
+
* @param {string} params.collectionId - Collection ID.
|
|
506
|
+
* @param {string} params.key - Attribute Key.
|
|
507
|
+
* @param {boolean} params.required - Is attribute required?
|
|
508
|
+
* @param {number | bigint} params.xdefault - Default value. Cannot be set when attribute is required.
|
|
509
|
+
* @param {number | bigint} params.min - Minimum value
|
|
510
|
+
* @param {number | bigint} params.max - Maximum value
|
|
511
|
+
* @param {string} params.newKey - New Attribute Key.
|
|
512
|
+
* @throws {AppwriteException}
|
|
513
|
+
* @returns {Promise<Models.AttributeBigint>}
|
|
514
|
+
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateBigIntColumn` instead.
|
|
515
|
+
*/
|
|
516
|
+
updateBigIntAttribute(params: {
|
|
517
|
+
databaseId: string;
|
|
518
|
+
collectionId: string;
|
|
519
|
+
key: string;
|
|
520
|
+
required: boolean;
|
|
521
|
+
xdefault?: number | bigint;
|
|
522
|
+
min?: number | bigint;
|
|
523
|
+
max?: number | bigint;
|
|
524
|
+
newKey?: string;
|
|
525
|
+
}): Promise<Models.AttributeBigint>;
|
|
526
|
+
/**
|
|
527
|
+
* Update a bigint attribute. Changing the `default` value will not update already existing documents.
|
|
528
|
+
*
|
|
529
|
+
*
|
|
530
|
+
* @param {string} databaseId - Database ID.
|
|
531
|
+
* @param {string} collectionId - Collection ID.
|
|
532
|
+
* @param {string} key - Attribute Key.
|
|
533
|
+
* @param {boolean} required - Is attribute required?
|
|
534
|
+
* @param {number | bigint} xdefault - Default value. Cannot be set when attribute is required.
|
|
535
|
+
* @param {number | bigint} min - Minimum value
|
|
536
|
+
* @param {number | bigint} max - Maximum value
|
|
537
|
+
* @param {string} newKey - New Attribute Key.
|
|
538
|
+
* @throws {AppwriteException}
|
|
539
|
+
* @returns {Promise<Models.AttributeBigint>}
|
|
540
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
541
|
+
*/
|
|
542
|
+
updateBigIntAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number | bigint, min?: number | bigint, max?: number | bigint, newKey?: string): Promise<Models.AttributeBigint>;
|
|
457
543
|
/**
|
|
458
544
|
* Create a boolean attribute.
|
|
459
545
|
*
|
|
@@ -721,25 +721,32 @@ export declare class Functions {
|
|
|
721
721
|
* Get a list of all variables of a specific function.
|
|
722
722
|
*
|
|
723
723
|
* @param {string} params.functionId - Function unique ID.
|
|
724
|
+
* @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: key, resourceType, resourceId, secret
|
|
725
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
724
726
|
* @throws {AppwriteException}
|
|
725
727
|
* @returns {Promise<Models.VariableList>}
|
|
726
728
|
*/
|
|
727
729
|
listVariables(params: {
|
|
728
730
|
functionId: string;
|
|
731
|
+
queries?: string[];
|
|
732
|
+
total?: boolean;
|
|
729
733
|
}): Promise<Models.VariableList>;
|
|
730
734
|
/**
|
|
731
735
|
* Get a list of all variables of a specific function.
|
|
732
736
|
*
|
|
733
737
|
* @param {string} functionId - Function unique ID.
|
|
738
|
+
* @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: key, resourceType, resourceId, secret
|
|
739
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
734
740
|
* @throws {AppwriteException}
|
|
735
741
|
* @returns {Promise<Models.VariableList>}
|
|
736
742
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
737
743
|
*/
|
|
738
|
-
listVariables(functionId: string): Promise<Models.VariableList>;
|
|
744
|
+
listVariables(functionId: string, queries?: string[], total?: boolean): Promise<Models.VariableList>;
|
|
739
745
|
/**
|
|
740
746
|
* Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
|
|
741
747
|
*
|
|
742
748
|
* @param {string} params.functionId - Function unique ID.
|
|
749
|
+
* @param {string} params.variableId - Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
743
750
|
* @param {string} params.key - Variable key. Max length: 255 chars.
|
|
744
751
|
* @param {string} params.value - Variable value. Max length: 8192 chars.
|
|
745
752
|
* @param {boolean} params.secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
|
|
@@ -748,6 +755,7 @@ export declare class Functions {
|
|
|
748
755
|
*/
|
|
749
756
|
createVariable(params: {
|
|
750
757
|
functionId: string;
|
|
758
|
+
variableId: string;
|
|
751
759
|
key: string;
|
|
752
760
|
value: string;
|
|
753
761
|
secret?: boolean;
|
|
@@ -756,6 +764,7 @@ export declare class Functions {
|
|
|
756
764
|
* Create a new function environment variable. These variables can be accessed in the function at runtime as environment variables.
|
|
757
765
|
*
|
|
758
766
|
* @param {string} functionId - Function unique ID.
|
|
767
|
+
* @param {string} variableId - Variable ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
759
768
|
* @param {string} key - Variable key. Max length: 255 chars.
|
|
760
769
|
* @param {string} value - Variable value. Max length: 8192 chars.
|
|
761
770
|
* @param {boolean} secret - Secret variables can be updated or deleted, but only functions can read them during build and runtime.
|
|
@@ -763,7 +772,7 @@ export declare class Functions {
|
|
|
763
772
|
* @returns {Promise<Models.Variable>}
|
|
764
773
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
765
774
|
*/
|
|
766
|
-
createVariable(functionId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;
|
|
775
|
+
createVariable(functionId: string, variableId: string, key: string, value: string, secret?: boolean): Promise<Models.Variable>;
|
|
767
776
|
/**
|
|
768
777
|
* Get a variable by its unique ID.
|
|
769
778
|
*
|
|
@@ -800,7 +809,7 @@ export declare class Functions {
|
|
|
800
809
|
updateVariable(params: {
|
|
801
810
|
functionId: string;
|
|
802
811
|
variableId: string;
|
|
803
|
-
key
|
|
812
|
+
key?: string;
|
|
804
813
|
value?: string;
|
|
805
814
|
secret?: boolean;
|
|
806
815
|
}): Promise<Models.Variable>;
|
|
@@ -816,7 +825,7 @@ export declare class Functions {
|
|
|
816
825
|
* @returns {Promise<Models.Variable>}
|
|
817
826
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
818
827
|
*/
|
|
819
|
-
updateVariable(functionId: string, variableId: string, key
|
|
828
|
+
updateVariable(functionId: string, variableId: string, key?: string, value?: string, secret?: boolean): Promise<Models.Variable>;
|
|
820
829
|
/**
|
|
821
830
|
* Delete a variable by its unique ID.
|
|
822
831
|
*
|