@appwrite.io/console 17.0.0 → 18.1.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 +6007 -4860
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +6004 -4861
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +8009 -4863
- package/package.json +5 -2
- package/types/client.d.ts +25 -1
- package/types/enums/conversation-type.d.ts +9 -0
- package/types/enums/o-auth-2-auth-0-prompt.d.ts +5 -0
- package/types/enums/o-auth-2-discord-prompt.d.ts +4 -0
- package/types/enums/o-auth-2-github-prompt.d.ts +3 -0
- package/types/enums/o-auth-2-kakao-prompt.d.ts +6 -0
- package/types/enums/o-auth-2-microsoft-prompt.d.ts +6 -0
- package/types/enums/o-auth-2-okta-prompt.d.ts +5 -0
- package/types/enums/o-auth-2-salesforce-prompt.d.ts +4 -0
- package/types/enums/o-auth-2-zoho-prompt.d.ts +3 -0
- package/types/enums/project-email-template-id.d.ts +2 -1
- package/types/enums/project-o-auth-2-auth-0-prompt.d.ts +5 -0
- package/types/enums/project-o-auth-2-discord-prompt.d.ts +4 -0
- package/types/enums/project-o-auth-2-git-hub-prompt.d.ts +3 -0
- package/types/enums/project-o-auth-2-kakao-prompt.d.ts +6 -0
- package/types/enums/project-o-auth-2-microsoft-prompt.d.ts +6 -0
- package/types/enums/project-o-auth-2-okta-prompt.d.ts +5 -0
- package/types/enums/project-o-auth-2-salesforce-prompt.d.ts +4 -0
- package/types/enums/project-o-auth-2-zoho-prompt.d.ts +3 -0
- package/types/enums/query-suggestion-resource.d.ts +1 -1
- package/types/index.d.ts +22 -1
- package/types/models.d.ts +68 -7
- package/types/services/account.d.ts +57 -2
- package/types/services/assistant.d.ts +4 -4
- package/types/services/console.d.ts +2 -2
- package/types/services/databases.d.ts +4 -4
- package/types/services/domains.d.ts +4 -4
- package/types/services/growth.d.ts +100 -0
- package/types/services/manager.d.ts +25 -0
- package/types/services/messaging.d.ts +14 -2
- package/types/services/organizations.d.ts +0 -19
- package/types/services/project.d.ts +52 -20
- package/types/services/push.d.ts +153 -0
- package/types/services/tables-db.d.ts +37 -37
- package/types/services/users.d.ts +2 -2
- package/types/topic.d.ts +34 -0
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": "
|
|
5
|
+
"version": "18.1.0",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "dist/cjs/sdk.js",
|
|
8
8
|
"exports": {
|
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
"node": ">=18.0.0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"
|
|
40
|
+
"buffer": "6.0.3",
|
|
41
|
+
"json-bigint": "1.0.0",
|
|
42
|
+
"mqtt": "5.15.2"
|
|
41
43
|
},
|
|
42
44
|
"devDependencies": {
|
|
43
45
|
"@eslint/js": "10.0.1",
|
|
@@ -49,6 +51,7 @@
|
|
|
49
51
|
"playwright": "1.56.1",
|
|
50
52
|
"prettier": "3.9.6",
|
|
51
53
|
"rollup": "4.63.2",
|
|
54
|
+
"rollup-plugin-polyfill-node": "0.13.0",
|
|
52
55
|
"serve-handler": "6.1.7",
|
|
53
56
|
"tslib": "2.8.1",
|
|
54
57
|
"typescript": "5.9.3",
|
package/types/client.d.ts
CHANGED
|
@@ -108,6 +108,8 @@ declare class Client {
|
|
|
108
108
|
config: {
|
|
109
109
|
endpoint: string;
|
|
110
110
|
endpointRealtime: string;
|
|
111
|
+
endpointPush: string;
|
|
112
|
+
pushClientId: string;
|
|
111
113
|
project: string;
|
|
112
114
|
key: string;
|
|
113
115
|
organization: string;
|
|
@@ -155,6 +157,28 @@ declare class Client {
|
|
|
155
157
|
* @returns {this}
|
|
156
158
|
*/
|
|
157
159
|
setEndpointRealtime(endpointRealtime: string): this;
|
|
160
|
+
/**
|
|
161
|
+
* Set Push Endpoint
|
|
162
|
+
*
|
|
163
|
+
* The MQTT-over-WebSocket URL the AppwritePush service connects to.
|
|
164
|
+
*
|
|
165
|
+
* @param {string} endpointPush
|
|
166
|
+
*
|
|
167
|
+
* @returns {this}
|
|
168
|
+
*/
|
|
169
|
+
setPushEndpoint(endpointPush: string): this;
|
|
170
|
+
/**
|
|
171
|
+
* Set Push Client Id
|
|
172
|
+
*
|
|
173
|
+
* A stable client id for the AppwritePush service. The broker keys its
|
|
174
|
+
* offline-replay cursor on this id, so pass a stable value to resume replay across
|
|
175
|
+
* reloads/restarts. Defaults to a per-connection id when unset.
|
|
176
|
+
*
|
|
177
|
+
* @param {string} pushClientId
|
|
178
|
+
*
|
|
179
|
+
* @returns {this}
|
|
180
|
+
*/
|
|
181
|
+
setPushClientId(pushClientId: string): this;
|
|
158
182
|
/**
|
|
159
183
|
* Set self-signed
|
|
160
184
|
*
|
|
@@ -341,7 +365,7 @@ declare class Client {
|
|
|
341
365
|
uri: string;
|
|
342
366
|
options: RequestInit;
|
|
343
367
|
};
|
|
344
|
-
chunkedUpload(method: string, url: URL, headers: Headers | undefined, originalPayload: Payload | undefined, onProgress: (progress: UploadProgress) => void): Promise<any>;
|
|
368
|
+
chunkedUpload(method: string, url: URL, headers: Headers | undefined, originalPayload: Payload | undefined, onProgress: (progress: UploadProgress) => void, responseType?: string): Promise<any>;
|
|
345
369
|
ping(): Promise<unknown>;
|
|
346
370
|
call(method: string, url: URL, headers?: Headers, params?: Payload, responseType?: string): Promise<any>;
|
|
347
371
|
static flatten(data: Payload, prefix?: string): Payload;
|
|
@@ -40,7 +40,7 @@ export declare enum QuerySuggestionResource {
|
|
|
40
40
|
Buckets = "buckets",
|
|
41
41
|
Providers = "providers",
|
|
42
42
|
Messages = "messages",
|
|
43
|
-
|
|
43
|
+
PushLedger = "pushledger",
|
|
44
44
|
Topics = "topics",
|
|
45
45
|
Subscribers = "subscribers",
|
|
46
46
|
Targets = "targets",
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Appwrite Console SDK
|
|
3
3
|
*
|
|
4
|
-
* This SDK targets Appwrite server version 2.
|
|
4
|
+
* This SDK targets Appwrite server version 2.3.x as shipped on Appwrite Cloud.
|
|
5
5
|
* Self-hosted releases can lag behind Cloud — if you run an older self-hosted
|
|
6
6
|
* build, use a matching older SDK from
|
|
7
7
|
* [previous releases](https://github.com/appwrite/sdk-for-console/releases)
|
|
@@ -22,6 +22,7 @@ export { Domains } from './services/domains';
|
|
|
22
22
|
export { Embeddings } from './services/embeddings';
|
|
23
23
|
export { Functions } from './services/functions';
|
|
24
24
|
export { Graphql } from './services/graphql';
|
|
25
|
+
export { Growth } from './services/growth';
|
|
25
26
|
export { Locale } from './services/locale';
|
|
26
27
|
export { Manager } from './services/manager';
|
|
27
28
|
export { Messaging } from './services/messaging';
|
|
@@ -50,12 +51,15 @@ export { VectorsDB } from './services/vectors-db';
|
|
|
50
51
|
export { Waf } from './services/waf';
|
|
51
52
|
export { Webhooks } from './services/webhooks';
|
|
52
53
|
export { Realtime } from './services/realtime';
|
|
54
|
+
export { Push } from './services/push';
|
|
53
55
|
export type { Models, Payload, RealtimeResponseEvent, UploadProgress, } from './client';
|
|
54
56
|
export type { RealtimeSubscription } from './services/realtime';
|
|
57
|
+
export type { PushMessage, PushSubscription, SubscribeOptions, MessageCallback, } from './services/push';
|
|
55
58
|
export type { QueryTypes, QueryTypesList } from './query';
|
|
56
59
|
export { Permission } from './permission';
|
|
57
60
|
export { Role } from './role';
|
|
58
61
|
export { ID } from './id';
|
|
62
|
+
export { Topic, ResolvedTopic } from './topic';
|
|
59
63
|
export { Channel } from './channel';
|
|
60
64
|
export { Operator, Condition } from './operator';
|
|
61
65
|
export { AccountKeyScopes } from './enums/account-key-scopes';
|
|
@@ -91,6 +95,7 @@ export { TemplateReferenceType } from './enums/template-reference-type';
|
|
|
91
95
|
export { VCSReferenceType } from './enums/vcs-reference-type';
|
|
92
96
|
export { DeploymentDownloadType } from './enums/deployment-download-type';
|
|
93
97
|
export { ExecutionMethod } from './enums/execution-method';
|
|
98
|
+
export { ConversationType } from './enums/conversation-type';
|
|
94
99
|
export { BlockResourceType } from './enums/block-resource-type';
|
|
95
100
|
export { BlockMode } from './enums/block-mode';
|
|
96
101
|
export { Region } from './enums/region';
|
|
@@ -107,8 +112,16 @@ export { OrganizationKeyScopes } from './enums/organization-key-scopes';
|
|
|
107
112
|
export { AddonKey } from './enums/addon-key';
|
|
108
113
|
export { UsageRange } from './enums/usage-range';
|
|
109
114
|
export { ProjectAuthMethodId } from './enums/project-auth-method-id';
|
|
115
|
+
export { ProjectOAuth2Auth0Prompt } from './enums/project-o-auth-2-auth-0-prompt';
|
|
116
|
+
export { ProjectOAuth2DiscordPrompt } from './enums/project-o-auth-2-discord-prompt';
|
|
117
|
+
export { ProjectOAuth2GitHubPrompt } from './enums/project-o-auth-2-git-hub-prompt';
|
|
110
118
|
export { ProjectOAuth2GooglePrompt } from './enums/project-o-auth-2-google-prompt';
|
|
119
|
+
export { ProjectOAuth2KakaoPrompt } from './enums/project-o-auth-2-kakao-prompt';
|
|
120
|
+
export { ProjectOAuth2MicrosoftPrompt } from './enums/project-o-auth-2-microsoft-prompt';
|
|
111
121
|
export { ProjectOAuth2OidcPrompt } from './enums/project-o-auth-2-oidc-prompt';
|
|
122
|
+
export { ProjectOAuth2OktaPrompt } from './enums/project-o-auth-2-okta-prompt';
|
|
123
|
+
export { ProjectOAuth2SalesforcePrompt } from './enums/project-o-auth-2-salesforce-prompt';
|
|
124
|
+
export { ProjectOAuth2ZohoPrompt } from './enums/project-o-auth-2-zoho-prompt';
|
|
112
125
|
export { ProjectOAuthProviderId } from './enums/project-o-auth-provider-id';
|
|
113
126
|
export { ProjectPolicyId } from './enums/project-policy-id';
|
|
114
127
|
export { ProjectProtocolId } from './enums/project-protocol-id';
|
|
@@ -148,8 +161,16 @@ export { DeploymentStatus } from './enums/deployment-status';
|
|
|
148
161
|
export { ExecutionResourceType } from './enums/execution-resource-type';
|
|
149
162
|
export { ExecutionTrigger } from './enums/execution-trigger';
|
|
150
163
|
export { ExecutionStatus } from './enums/execution-status';
|
|
164
|
+
export { OAuth2GithubPrompt } from './enums/o-auth-2-github-prompt';
|
|
165
|
+
export { OAuth2DiscordPrompt } from './enums/o-auth-2-discord-prompt';
|
|
151
166
|
export { OAuth2GooglePrompt } from './enums/o-auth-2-google-prompt';
|
|
167
|
+
export { OAuth2ZohoPrompt } from './enums/o-auth-2-zoho-prompt';
|
|
168
|
+
export { OAuth2SalesforcePrompt } from './enums/o-auth-2-salesforce-prompt';
|
|
169
|
+
export { OAuth2Auth0Prompt } from './enums/o-auth-2-auth-0-prompt';
|
|
152
170
|
export { OAuth2OidcPrompt } from './enums/o-auth-2-oidc-prompt';
|
|
171
|
+
export { OAuth2OktaPrompt } from './enums/o-auth-2-okta-prompt';
|
|
172
|
+
export { OAuth2MicrosoftPrompt } from './enums/o-auth-2-microsoft-prompt';
|
|
173
|
+
export { OAuth2KakaoPrompt } from './enums/o-auth-2-kakao-prompt';
|
|
153
174
|
export { PlatformType } from './enums/platform-type';
|
|
154
175
|
export { ProxyRuleDeploymentResourceType } from './enums/proxy-rule-deployment-resource-type';
|
|
155
176
|
export { ProxyRuleStatus } from './enums/proxy-rule-status';
|
package/types/models.d.ts
CHANGED
|
@@ -11,8 +11,16 @@ import { ExecutionStatus } from './enums/execution-status';
|
|
|
11
11
|
import { ProjectAuthMethodId } from './enums/project-auth-method-id';
|
|
12
12
|
import { ProjectServiceId } from './enums/project-service-id';
|
|
13
13
|
import { ProjectProtocolId } from './enums/project-protocol-id';
|
|
14
|
+
import { OAuth2GithubPrompt } from './enums/o-auth-2-github-prompt';
|
|
15
|
+
import { OAuth2DiscordPrompt } from './enums/o-auth-2-discord-prompt';
|
|
14
16
|
import { OAuth2GooglePrompt } from './enums/o-auth-2-google-prompt';
|
|
17
|
+
import { OAuth2ZohoPrompt } from './enums/o-auth-2-zoho-prompt';
|
|
18
|
+
import { OAuth2SalesforcePrompt } from './enums/o-auth-2-salesforce-prompt';
|
|
19
|
+
import { OAuth2Auth0Prompt } from './enums/o-auth-2-auth-0-prompt';
|
|
15
20
|
import { OAuth2OidcPrompt } from './enums/o-auth-2-oidc-prompt';
|
|
21
|
+
import { OAuth2OktaPrompt } from './enums/o-auth-2-okta-prompt';
|
|
22
|
+
import { OAuth2MicrosoftPrompt } from './enums/o-auth-2-microsoft-prompt';
|
|
23
|
+
import { OAuth2KakaoPrompt } from './enums/o-auth-2-kakao-prompt';
|
|
16
24
|
import { PlatformType } from './enums/platform-type';
|
|
17
25
|
import { ProxyRuleDeploymentResourceType } from './enums/proxy-rule-deployment-resource-type';
|
|
18
26
|
import { ProxyRuleStatus } from './enums/proxy-rule-status';
|
|
@@ -4427,6 +4435,10 @@ export declare namespace Models {
|
|
|
4427
4435
|
* VCS (Version Control System) installation ID.
|
|
4428
4436
|
*/
|
|
4429
4437
|
providerInstallationId: string;
|
|
4438
|
+
/**
|
|
4439
|
+
* VCS (Version Control System) organization URL. Points at the configured instance, which is not the provider's own host for a self-hosted install.
|
|
4440
|
+
*/
|
|
4441
|
+
organizationUrl: string;
|
|
4430
4442
|
};
|
|
4431
4443
|
/**
|
|
4432
4444
|
* ProviderRepository
|
|
@@ -5357,6 +5369,10 @@ export declare namespace Models {
|
|
|
5357
5369
|
* GitHub OAuth2 client secret.
|
|
5358
5370
|
*/
|
|
5359
5371
|
clientSecret: string;
|
|
5372
|
+
/**
|
|
5373
|
+
* GitHub OAuth2 prompt values.
|
|
5374
|
+
*/
|
|
5375
|
+
prompt: OAuth2GithubPrompt[];
|
|
5360
5376
|
};
|
|
5361
5377
|
/**
|
|
5362
5378
|
* OAuth2Discord
|
|
@@ -5378,6 +5394,10 @@ export declare namespace Models {
|
|
|
5378
5394
|
* Discord OAuth2 client secret.
|
|
5379
5395
|
*/
|
|
5380
5396
|
clientSecret: string;
|
|
5397
|
+
/**
|
|
5398
|
+
* Discord OAuth2 prompt values.
|
|
5399
|
+
*/
|
|
5400
|
+
prompt: OAuth2DiscordPrompt[];
|
|
5381
5401
|
};
|
|
5382
5402
|
/**
|
|
5383
5403
|
* OAuth2Figma
|
|
@@ -5600,6 +5620,10 @@ export declare namespace Models {
|
|
|
5600
5620
|
* Zoho OAuth2 client secret.
|
|
5601
5621
|
*/
|
|
5602
5622
|
clientSecret: string;
|
|
5623
|
+
/**
|
|
5624
|
+
* Zoho OAuth2 prompt values.
|
|
5625
|
+
*/
|
|
5626
|
+
prompt: OAuth2ZohoPrompt[];
|
|
5603
5627
|
};
|
|
5604
5628
|
/**
|
|
5605
5629
|
* OAuth2Yandex
|
|
@@ -5810,6 +5834,10 @@ export declare namespace Models {
|
|
|
5810
5834
|
* Salesforce OAuth2 consumer secret.
|
|
5811
5835
|
*/
|
|
5812
5836
|
customerSecret: string;
|
|
5837
|
+
/**
|
|
5838
|
+
* Salesforce OAuth2 prompt values.
|
|
5839
|
+
*/
|
|
5840
|
+
prompt: OAuth2SalesforcePrompt[];
|
|
5813
5841
|
};
|
|
5814
5842
|
/**
|
|
5815
5843
|
* OAuth2Yahoo
|
|
@@ -6112,6 +6140,10 @@ export declare namespace Models {
|
|
|
6112
6140
|
* Auth0 OAuth2 client secret.
|
|
6113
6141
|
*/
|
|
6114
6142
|
clientSecret: string;
|
|
6143
|
+
/**
|
|
6144
|
+
* Auth0 OAuth2 prompt values.
|
|
6145
|
+
*/
|
|
6146
|
+
prompt: OAuth2Auth0Prompt[];
|
|
6115
6147
|
/**
|
|
6116
6148
|
* Auth0 OAuth2 endpoint domain.
|
|
6117
6149
|
*/
|
|
@@ -6191,6 +6223,10 @@ export declare namespace Models {
|
|
|
6191
6223
|
* OpenID Connect OAuth2 client secret.
|
|
6192
6224
|
*/
|
|
6193
6225
|
clientSecret: string;
|
|
6226
|
+
/**
|
|
6227
|
+
* OpenID Connect prompt values controlling the authentication and consent screens.
|
|
6228
|
+
*/
|
|
6229
|
+
prompt: OAuth2OidcPrompt[];
|
|
6194
6230
|
/**
|
|
6195
6231
|
* OpenID Connect well-known configuration URL. When set, authorization, token, and user info endpoints can be discovered automatically.
|
|
6196
6232
|
*/
|
|
@@ -6207,10 +6243,6 @@ export declare namespace Models {
|
|
|
6207
6243
|
* OpenID Connect user info endpoint URL.
|
|
6208
6244
|
*/
|
|
6209
6245
|
userInfoURL: string;
|
|
6210
|
-
/**
|
|
6211
|
-
* OpenID Connect prompt values controlling the authentication and consent screens.
|
|
6212
|
-
*/
|
|
6213
|
-
prompt: OAuth2OidcPrompt[];
|
|
6214
6246
|
/**
|
|
6215
6247
|
* Maximum authentication age in seconds. When set, the user must have authenticated within this many seconds.
|
|
6216
6248
|
*/
|
|
@@ -6236,6 +6268,10 @@ export declare namespace Models {
|
|
|
6236
6268
|
* Okta OAuth2 client secret.
|
|
6237
6269
|
*/
|
|
6238
6270
|
clientSecret: string;
|
|
6271
|
+
/**
|
|
6272
|
+
* Okta OAuth2 prompt values.
|
|
6273
|
+
*/
|
|
6274
|
+
prompt: OAuth2OktaPrompt[];
|
|
6239
6275
|
/**
|
|
6240
6276
|
* Okta OAuth2 domain.
|
|
6241
6277
|
*/
|
|
@@ -6323,6 +6359,10 @@ export declare namespace Models {
|
|
|
6323
6359
|
* Microsoft OAuth2 application secret.
|
|
6324
6360
|
*/
|
|
6325
6361
|
applicationSecret: string;
|
|
6362
|
+
/**
|
|
6363
|
+
* Microsoft OAuth2 prompt values.
|
|
6364
|
+
*/
|
|
6365
|
+
prompt: OAuth2MicrosoftPrompt[];
|
|
6326
6366
|
/**
|
|
6327
6367
|
* Microsoft Entra ID tenant identifier. Use 'common', 'organizations', 'consumers' or a specific tenant ID.
|
|
6328
6368
|
*/
|
|
@@ -6390,6 +6430,10 @@ export declare namespace Models {
|
|
|
6390
6430
|
* Kakao OAuth2 client secret.
|
|
6391
6431
|
*/
|
|
6392
6432
|
clientSecret: string;
|
|
6433
|
+
/**
|
|
6434
|
+
* Kakao OAuth2 prompt values.
|
|
6435
|
+
*/
|
|
6436
|
+
prompt: OAuth2KakaoPrompt[];
|
|
6393
6437
|
};
|
|
6394
6438
|
/**
|
|
6395
6439
|
* OAuth2 Providers List
|
|
@@ -6481,15 +6525,15 @@ export declare namespace Models {
|
|
|
6481
6525
|
*/
|
|
6482
6526
|
$id: string;
|
|
6483
6527
|
/**
|
|
6484
|
-
* Whether
|
|
6528
|
+
* Whether passwords are checked against known data breaches and the result recorded on the user.
|
|
6485
6529
|
*/
|
|
6486
6530
|
enabled: boolean;
|
|
6487
6531
|
/**
|
|
6488
|
-
* Whether
|
|
6532
|
+
* Whether a sign-in with a breached password is refused until the password is reset.
|
|
6489
6533
|
*/
|
|
6490
6534
|
sessions: boolean;
|
|
6491
6535
|
/**
|
|
6492
|
-
* Whether
|
|
6536
|
+
* Whether a breached password is rejected when a user signs up or sets a new password.
|
|
6493
6537
|
*/
|
|
6494
6538
|
users: boolean;
|
|
6495
6539
|
};
|
|
@@ -10650,6 +10694,23 @@ export declare namespace Models {
|
|
|
10650
10694
|
*/
|
|
10651
10695
|
organizationCredits: number;
|
|
10652
10696
|
};
|
|
10697
|
+
/**
|
|
10698
|
+
* Growth Conversation
|
|
10699
|
+
*/
|
|
10700
|
+
export type GrowthConversation = {
|
|
10701
|
+
/**
|
|
10702
|
+
* Conversation type.
|
|
10703
|
+
*/
|
|
10704
|
+
type: string;
|
|
10705
|
+
/**
|
|
10706
|
+
* Email address the conversation was filed under. For a signed in console user this is the account email.
|
|
10707
|
+
*/
|
|
10708
|
+
email: string;
|
|
10709
|
+
/**
|
|
10710
|
+
* Organization ID the conversation was filed against. Empty when none was given or the user is not a member.
|
|
10711
|
+
*/
|
|
10712
|
+
organizationId: string;
|
|
10713
|
+
};
|
|
10653
10714
|
/**
|
|
10654
10715
|
* Extensions
|
|
10655
10716
|
*/
|
|
@@ -1106,6 +1106,61 @@ export declare class Account {
|
|
|
1106
1106
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1107
1107
|
*/
|
|
1108
1108
|
updateRecovery(userId: string, secret: string, password: string): Promise<Models.Token>;
|
|
1109
|
+
/**
|
|
1110
|
+
* Use this endpoint to send a 6-digit password recovery code to the user's email address. Unlike [createRecovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a recovery page. Learn more about how to [complete the recovery process](https://appwrite.io/docs/references/cloud/client-web/account#updateRecoveryOTP). The code sent to the user's email address is valid for 15 minutes.
|
|
1111
|
+
*
|
|
1112
|
+
* Enable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing.
|
|
1113
|
+
*
|
|
1114
|
+
*
|
|
1115
|
+
* @param {string} params.email - User email.
|
|
1116
|
+
* @param {boolean} params.phrase - Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
|
1117
|
+
* @throws {AppwriteException}
|
|
1118
|
+
* @returns {Promise<Models.Token>}
|
|
1119
|
+
*/
|
|
1120
|
+
createRecoveryOTP(params: {
|
|
1121
|
+
email: string;
|
|
1122
|
+
phrase?: boolean;
|
|
1123
|
+
}): Promise<Models.Token>;
|
|
1124
|
+
/**
|
|
1125
|
+
* Use this endpoint to send a 6-digit password recovery code to the user's email address. Unlike [createRecovery](https://appwrite.io/docs/references/cloud/client-web/account#createRecovery), this method requires no redirect URL, which makes it suitable for mobile and desktop apps that cannot host a recovery page. Learn more about how to [complete the recovery process](https://appwrite.io/docs/references/cloud/client-web/account#updateRecoveryOTP). The code sent to the user's email address is valid for 15 minutes.
|
|
1126
|
+
*
|
|
1127
|
+
* Enable the **phrase** parameter to include a randomly generated security phrase in both the email and the response. Showing that phrase in your app lets the user confirm the email genuinely came from your request, which helps protect against phishing.
|
|
1128
|
+
*
|
|
1129
|
+
*
|
|
1130
|
+
* @param {string} email - User email.
|
|
1131
|
+
* @param {boolean} phrase - Toggle for security phrase. If enabled, email will be sent with a randomly generated phrase and the phrase will also be included in the response. Confirming phrases match increases the security of your authentication flow.
|
|
1132
|
+
* @throws {AppwriteException}
|
|
1133
|
+
* @returns {Promise<Models.Token>}
|
|
1134
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1135
|
+
*/
|
|
1136
|
+
createRecoveryOTP(email: string, phrase?: boolean): Promise<Models.Token>;
|
|
1137
|
+
/**
|
|
1138
|
+
* Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated.
|
|
1139
|
+
*
|
|
1140
|
+
*
|
|
1141
|
+
* @param {string} params.userId - User ID.
|
|
1142
|
+
* @param {string} params.secret - Valid recovery OTP code.
|
|
1143
|
+
* @param {string} params.password - New user password. Must be between 8 and 256 chars.
|
|
1144
|
+
* @throws {AppwriteException}
|
|
1145
|
+
* @returns {Promise<Models.Token>}
|
|
1146
|
+
*/
|
|
1147
|
+
updateRecoveryOTP(params: {
|
|
1148
|
+
userId: string;
|
|
1149
|
+
secret: string;
|
|
1150
|
+
password: string;
|
|
1151
|
+
}): Promise<Models.Token>;
|
|
1152
|
+
/**
|
|
1153
|
+
* Use this endpoint to complete the user password recovery process using the 6-digit code that was emailed by [createRecoveryOTP](https://appwrite.io/docs/references/cloud/client-web/account#createRecoveryOTP). Pass the **userId** of the user along with the **secret** code from the email and the new **password** to set. If confirmed, this route will return a 200 status code, the code is consumed and the user's password is updated.
|
|
1154
|
+
*
|
|
1155
|
+
*
|
|
1156
|
+
* @param {string} userId - User ID.
|
|
1157
|
+
* @param {string} secret - Valid recovery OTP code.
|
|
1158
|
+
* @param {string} password - New user password. Must be between 8 and 256 chars.
|
|
1159
|
+
* @throws {AppwriteException}
|
|
1160
|
+
* @returns {Promise<Models.Token>}
|
|
1161
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1162
|
+
*/
|
|
1163
|
+
updateRecoveryOTP(userId: string, secret: string, password: string): Promise<Models.Token>;
|
|
1109
1164
|
/**
|
|
1110
1165
|
* Get the list of active sessions across different devices for the currently logged in user.
|
|
1111
1166
|
*
|
|
@@ -1380,7 +1435,7 @@ export declare class Account {
|
|
|
1380
1435
|
*/
|
|
1381
1436
|
updateStatus<Preferences extends Models.Preferences = Models.DefaultPreferences>(): Promise<Models.User<Preferences>>;
|
|
1382
1437
|
/**
|
|
1383
|
-
* Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.
|
|
1438
|
+
* Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. A session holds one push target per provider, so if one already exists this endpoint updates and returns that target instead of creating a second one, and a device that rotates its token is never notified twice.
|
|
1384
1439
|
*
|
|
1385
1440
|
* @param {string} params.targetId - Target 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.
|
|
1386
1441
|
* @param {string} params.identifier - The target identifier (token, email, phone etc.)
|
|
@@ -1394,7 +1449,7 @@ export declare class Account {
|
|
|
1394
1449
|
providerId?: string;
|
|
1395
1450
|
}): Promise<Models.Target>;
|
|
1396
1451
|
/**
|
|
1397
|
-
* Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model.
|
|
1452
|
+
* Use this endpoint to register a device for push notifications. Provide a target ID (custom or generated using ID.unique()), a device identifier (usually a device token), and optionally specify which provider should send notifications to this target. The target is automatically linked to the current session and includes device information like brand and model. A session holds one push target per provider, so if one already exists this endpoint updates and returns that target instead of creating a second one, and a device that rotates its token is never notified twice.
|
|
1398
1453
|
*
|
|
1399
1454
|
* @param {string} targetId - Target 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.
|
|
1400
1455
|
* @param {string} identifier - The target identifier (token, email, phone etc.)
|
|
@@ -7,18 +7,18 @@ export declare class Assistant {
|
|
|
7
7
|
*
|
|
8
8
|
* @param {string} params.prompt - Prompt. A string containing questions asked to the AI assistant.
|
|
9
9
|
* @throws {AppwriteException}
|
|
10
|
-
* @returns {Promise<
|
|
10
|
+
* @returns {Promise<string>}
|
|
11
11
|
*/
|
|
12
12
|
chat(params: {
|
|
13
13
|
prompt: string;
|
|
14
|
-
}): Promise<
|
|
14
|
+
}): Promise<string>;
|
|
15
15
|
/**
|
|
16
16
|
* Send a prompt to the AI assistant and receive a response. This endpoint allows you to interact with Appwrite's AI assistant by sending questions or prompts and receiving helpful responses in real-time through a server-sent events stream.
|
|
17
17
|
*
|
|
18
18
|
* @param {string} prompt - Prompt. A string containing questions asked to the AI assistant.
|
|
19
19
|
* @throws {AppwriteException}
|
|
20
|
-
* @returns {Promise<
|
|
20
|
+
* @returns {Promise<string>}
|
|
21
21
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
22
22
|
*/
|
|
23
|
-
chat(prompt: string): Promise<
|
|
23
|
+
chat(prompt: string): Promise<string>;
|
|
24
24
|
}
|
|
@@ -330,7 +330,7 @@ export declare class Console {
|
|
|
330
330
|
/**
|
|
331
331
|
* Get the Appwrite built-in default email template for the specified type and locale. Always returns the unmodified default, ignoring any custom project overrides.
|
|
332
332
|
*
|
|
333
|
-
* @param {ProjectEmailTemplateId} params.templateId - Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification
|
|
333
|
+
* @param {ProjectEmailTemplateId} params.templateId - Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery
|
|
334
334
|
* @param {ProjectEmailTemplateLocale} params.locale - Template locale. If left empty, the fallback locale (en) will be used.
|
|
335
335
|
* @throws {AppwriteException}
|
|
336
336
|
* @returns {Promise<Models.EmailTemplate>}
|
|
@@ -342,7 +342,7 @@ export declare class Console {
|
|
|
342
342
|
/**
|
|
343
343
|
* Get the Appwrite built-in default email template for the specified type and locale. Always returns the unmodified default, ignoring any custom project overrides.
|
|
344
344
|
*
|
|
345
|
-
* @param {ProjectEmailTemplateId} templateId - Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification
|
|
345
|
+
* @param {ProjectEmailTemplateId} templateId - Email template type. Can be one of: verification, magicSession, recovery, invitation, mfaChallenge, sessionAlert, otpSession, otpVerification, otpRecovery
|
|
346
346
|
* @param {ProjectEmailTemplateLocale} locale - Template locale. If left empty, the fallback locale (en) will be used.
|
|
347
347
|
* @throws {AppwriteException}
|
|
348
348
|
* @returns {Promise<Models.EmailTemplate>}
|
|
@@ -1823,14 +1823,14 @@ export declare class Databases {
|
|
|
1823
1823
|
* @param {string} params.collectionId - Collection ID.
|
|
1824
1824
|
* @param {string} params.key - Attribute Key.
|
|
1825
1825
|
* @throws {AppwriteException}
|
|
1826
|
-
* @returns {Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>}
|
|
1826
|
+
* @returns {Promise<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>}
|
|
1827
1827
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.getColumn` instead.
|
|
1828
1828
|
*/
|
|
1829
1829
|
getAttribute(params: {
|
|
1830
1830
|
databaseId: string;
|
|
1831
1831
|
collectionId: string;
|
|
1832
1832
|
key: string;
|
|
1833
|
-
}): Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>;
|
|
1833
|
+
}): Promise<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>;
|
|
1834
1834
|
/**
|
|
1835
1835
|
* Get attribute by ID.
|
|
1836
1836
|
*
|
|
@@ -1838,10 +1838,10 @@ export declare class Databases {
|
|
|
1838
1838
|
* @param {string} collectionId - Collection ID.
|
|
1839
1839
|
* @param {string} key - Attribute Key.
|
|
1840
1840
|
* @throws {AppwriteException}
|
|
1841
|
-
* @returns {Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>}
|
|
1841
|
+
* @returns {Promise<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>}
|
|
1842
1842
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1843
1843
|
*/
|
|
1844
|
-
getAttribute(databaseId: string, collectionId: string, key: string): Promise<Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributeString>;
|
|
1844
|
+
getAttribute(databaseId: string, collectionId: string, key: string): Promise<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>;
|
|
1845
1845
|
/**
|
|
1846
1846
|
* Deletes an attribute.
|
|
1847
1847
|
*
|