@appwrite.io/console 16.1.0 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/cjs/sdk.js +1808 -412
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1805 -413
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +4339 -944
- package/package.json +5 -2
- package/types/client.d.ts +24 -11
- package/types/enums/billing-plan-group.d.ts +2 -1
- package/types/enums/build-runtime.d.ts +3 -0
- package/types/enums/cache-database.d.ts +1 -2
- package/types/enums/conversation-type.d.ts +9 -0
- package/types/enums/framework.d.ts +1 -0
- package/types/enums/id-token-provider.d.ts +4 -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/organization-key-scopes.d.ts +2 -4
- package/types/enums/project-email-template-id.d.ts +3 -1
- package/types/enums/project-key-scopes.d.ts +1 -0
- 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/project-policy-id.d.ts +1 -0
- package/types/enums/query-suggestion-resource.d.ts +1 -3
- package/types/enums/runtime.d.ts +3 -0
- package/types/index.d.ts +23 -2
- package/types/models.d.ts +271 -562
- package/types/services/account.d.ts +167 -24
- package/types/services/console.d.ts +2 -2
- package/types/services/databases.d.ts +4 -4
- package/types/services/growth.d.ts +100 -0
- package/types/services/manager.d.ts +39 -14
- package/types/services/messaging.d.ts +94 -8
- package/types/services/organization.d.ts +165 -0
- package/types/services/organizations.d.ts +0 -19
- package/types/services/project.d.ts +93 -50
- package/types/services/projects.d.ts +0 -94
- package/types/services/push.d.ts +153 -0
- package/types/services/storage.d.ts +4 -4
- package/types/services/tables-db.d.ts +37 -37
- package/types/services/teams.d.ts +0 -25
- package/types/services/users.d.ts +4 -29
- package/types/topic.d.ts +34 -0
- package/types/enums/project-usage-range.d.ts +0 -4
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { Client } from '../client';
|
|
2
|
+
import { Service } from '../service';
|
|
3
|
+
import type { ResolvedTopic, Topic } from '../topic';
|
|
4
|
+
/** A message delivered on a subscribed topic (the MQTT analog of a Realtime event). */
|
|
5
|
+
export interface PushMessage {
|
|
6
|
+
topic: string;
|
|
7
|
+
/** The payload decoded as UTF-8 text, as it was sent. */
|
|
8
|
+
data: string;
|
|
9
|
+
/** The raw payload, for binary messages. */
|
|
10
|
+
payload: Uint8Array;
|
|
11
|
+
qos: number;
|
|
12
|
+
}
|
|
13
|
+
export type MessageCallback = (message: PushMessage) => void | Promise<void>;
|
|
14
|
+
/** Per-subscription options passed to `subscribe` and `PushSubscription.update`. */
|
|
15
|
+
export interface SubscribeOptions {
|
|
16
|
+
/**
|
|
17
|
+
* Also surface each matching message as a browser notification while the tab is
|
|
18
|
+
* open. Defaults to false.
|
|
19
|
+
*/
|
|
20
|
+
background?: boolean;
|
|
21
|
+
/** Notification title for this subscription. Defaults to the message topic. */
|
|
22
|
+
title?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Retry delivery of messages missed while disconnected. `true` (the default) subscribes
|
|
25
|
+
* at QoS 1 so the broker holds this topic's messages and redelivers them on reconnect;
|
|
26
|
+
* `false` uses QoS 0 (at-most-once, may be lost). Per-subscription — the connection
|
|
27
|
+
* always keeps its session (clean start off).
|
|
28
|
+
*/
|
|
29
|
+
retry?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Handle for a live subscription. `unsubscribe()` drops it (and closes the connection
|
|
33
|
+
* once the last one is gone); `update()` toggles this subscription's per-message options
|
|
34
|
+
* without resubscribing.
|
|
35
|
+
*/
|
|
36
|
+
export interface PushSubscription {
|
|
37
|
+
unsubscribe(): void;
|
|
38
|
+
update(options: SubscribeOptions): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Appwrite native push service — the Realtime analog over an MQTT broker, without
|
|
42
|
+
* FCM or APNS. In the browser the transport is MQTT 5 over WebSocket: while the page is
|
|
43
|
+
* open the connection stays up and each message is handed to your callback, and a
|
|
44
|
+
* subscription may also opt into a browser notification per message.
|
|
45
|
+
*
|
|
46
|
+
* The connection has no tunables — it always keeps its session (clean start off) so the
|
|
47
|
+
* broker can redeliver missed messages, and reliability is chosen per subscription via
|
|
48
|
+
* `retry`. `subscribe` opens the connection lazily and returns a
|
|
49
|
+
* {@link PushSubscription} handle (unlike Realtime's bare unsubscribe callable — Push
|
|
50
|
+
* carries per-subscription state). The credential is read off the client — set a JWT or
|
|
51
|
+
* session on it (`Client.setJWT` / `Client.setSession`), the same way every other service
|
|
52
|
+
* reads auth.
|
|
53
|
+
*
|
|
54
|
+
* const client = new Client().setEndpoint(...).setProject(...).setJWT(jwt);
|
|
55
|
+
* const push = new Push(client);
|
|
56
|
+
* const sub = await push.subscribe('user/123/#', (m) =>
|
|
57
|
+
* console.log(m.topic, m.data),
|
|
58
|
+
* );
|
|
59
|
+
* // sub.update({ background: true }); sub.unsubscribe();
|
|
60
|
+
*/
|
|
61
|
+
export declare class Push extends Service {
|
|
62
|
+
private mqtt;
|
|
63
|
+
private connecting;
|
|
64
|
+
/** Set once the first CONNACK lands, so 'connect' events after are reconnects. */
|
|
65
|
+
private everConnected;
|
|
66
|
+
private onOpenCb?;
|
|
67
|
+
private onCloseCb?;
|
|
68
|
+
private onErrorCb?;
|
|
69
|
+
/** Errors already handed to onError, so one failure is reported once. */
|
|
70
|
+
private reported;
|
|
71
|
+
/** mqtt.js connect errors mapped to the error handed out for them (see connectError). */
|
|
72
|
+
private connectErrors;
|
|
73
|
+
/** True while the first connect is in flight: its errors go to the waiting caller. */
|
|
74
|
+
private opening;
|
|
75
|
+
/**
|
|
76
|
+
* The client id when the credential names no user (and none was set): random, but kept for
|
|
77
|
+
* this instance so reconnects resume the same broker session.
|
|
78
|
+
*/
|
|
79
|
+
private readonly fallbackClientId;
|
|
80
|
+
private readonly subscriptions;
|
|
81
|
+
constructor(client: Client);
|
|
82
|
+
private effectiveQos;
|
|
83
|
+
/** Register a callback invoked when the connection opens (CONNACK success). */
|
|
84
|
+
onOpen(callback: () => void): this;
|
|
85
|
+
/** Register a callback invoked when the connection closes. */
|
|
86
|
+
onClose(callback: () => void): this;
|
|
87
|
+
/** Register a callback invoked on a connection error. */
|
|
88
|
+
onError(callback: (error: Error) => void): this;
|
|
89
|
+
/**
|
|
90
|
+
* The signed-in user's own topic, `users/<userId>`, for a topic-less subscribe. The id comes
|
|
91
|
+
* from the credential the connection authenticates with: the JWT when one is set (never
|
|
92
|
+
* the session, which could belong to a different user), else the session.
|
|
93
|
+
*/
|
|
94
|
+
private userTopic;
|
|
95
|
+
/**
|
|
96
|
+
* Hand an error to the onError callback, once per error. These errors happen outside any
|
|
97
|
+
* call (reconnects, broker DISCONNECTs, background re-subscribes), so they are never
|
|
98
|
+
* thrown, which would crash the app from inside mqtt.js: with no callback registered
|
|
99
|
+
* they are logged, like Realtime does.
|
|
100
|
+
*/
|
|
101
|
+
private report;
|
|
102
|
+
/**
|
|
103
|
+
* For a call that fails to its caller: report the error to onError when a callback is
|
|
104
|
+
* registered, then throw it to the caller, who can catch it.
|
|
105
|
+
*/
|
|
106
|
+
private fail;
|
|
107
|
+
/**
|
|
108
|
+
* Subscribe to one or more topics. Resolves to a {@link PushSubscription} handle.
|
|
109
|
+
*
|
|
110
|
+
* Each topic is a string or a `Topic` builder, e.g.
|
|
111
|
+
* `Topic.path(['user', userId]).all()`.
|
|
112
|
+
*
|
|
113
|
+
* Called with only a callback, `subscribe((message) => {...}, options)` subscribes to the
|
|
114
|
+
* signed-in user's own topic, `users/<userId>`, like FCM/APNs delivery to a device. The
|
|
115
|
+
* user id is read from the JWT (or session) set on the client. This form defaults to
|
|
116
|
+
* `background: true` and `retry: true` (QoS 1); pass either in the options to override.
|
|
117
|
+
*
|
|
118
|
+
* Awaiting resolves only once the broker has acked every SUBSCRIBE (SUBACK):
|
|
119
|
+
* the broker only starts routing a topic once its subscription is registered,
|
|
120
|
+
* so publishing before the ack races the message ahead of the subscription and
|
|
121
|
+
* it is dropped (no retained replay on MQTT). Awaiting here makes
|
|
122
|
+
* subscribe-then-publish reliable.
|
|
123
|
+
*
|
|
124
|
+
* Pass `{ background: true, title }` to also show a browser notification per matching
|
|
125
|
+
* message while the tab is open, and `{ retry: false }` for at-most-once
|
|
126
|
+
* (QoS 0) delivery; toggle either later with the handle's `update`.
|
|
127
|
+
*/
|
|
128
|
+
subscribe(callback: MessageCallback, options?: SubscribeOptions): Promise<PushSubscription>;
|
|
129
|
+
subscribe(topics: string | Topic | ResolvedTopic | (string | Topic | ResolvedTopic)[], callback: MessageCallback, options?: SubscribeOptions): Promise<PushSubscription>;
|
|
130
|
+
private subscribeWith;
|
|
131
|
+
/** Tear down the connection and drop all active subscriptions. */
|
|
132
|
+
close(): void;
|
|
133
|
+
/**
|
|
134
|
+
* Re-register every active subscription. Called on each reconnect so a client that
|
|
135
|
+
* reconnects with a fresh (or cleared) session does not silently stop receiving;
|
|
136
|
+
* re-subscribing an existing filter is idempotent.
|
|
137
|
+
*/
|
|
138
|
+
private resubscribeAll;
|
|
139
|
+
private connect;
|
|
140
|
+
private endpointUrl;
|
|
141
|
+
private open;
|
|
142
|
+
/**
|
|
143
|
+
* The error for a failed connect: the broker's Reason String when it sent one (a refused
|
|
144
|
+
* CONNACK), else mqtt.js's error. Memoized so both error listeners hand out the same
|
|
145
|
+
* object and it is reported once.
|
|
146
|
+
*/
|
|
147
|
+
private connectError;
|
|
148
|
+
/** Fan a delivered packet out to every subscription whose filter matches. */
|
|
149
|
+
private dispatch;
|
|
150
|
+
private requestNotificationPermission;
|
|
151
|
+
/** Post a browser notification for a message a background subscription matched. */
|
|
152
|
+
private notify;
|
|
153
|
+
}
|
|
@@ -39,7 +39,7 @@ export declare class Storage {
|
|
|
39
39
|
* @param {string[]} params.permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
40
40
|
* @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
41
41
|
* @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
|
|
42
|
-
* @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is
|
|
42
|
+
* @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
|
|
43
43
|
* @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
|
|
44
44
|
* @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
45
45
|
* @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
@@ -69,7 +69,7 @@ export declare class Storage {
|
|
|
69
69
|
* @param {string[]} permissions - An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
70
70
|
* @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
71
71
|
* @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
|
|
72
|
-
* @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is
|
|
72
|
+
* @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
|
|
73
73
|
* @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
|
|
74
74
|
* @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
75
75
|
* @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
@@ -107,7 +107,7 @@ export declare class Storage {
|
|
|
107
107
|
* @param {string[]} params.permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
108
108
|
* @param {boolean} params.fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
109
109
|
* @param {boolean} params.enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
|
|
110
|
-
* @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is
|
|
110
|
+
* @param {number} params.maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
|
|
111
111
|
* @param {string[]} params.allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
|
|
112
112
|
* @param {Compression} params.compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
113
113
|
* @param {boolean} params.encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
@@ -137,7 +137,7 @@ export declare class Storage {
|
|
|
137
137
|
* @param {string[]} permissions - An array of permission strings. By default, the current permissions are inherited. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
138
138
|
* @param {boolean} fileSecurity - Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
139
139
|
* @param {boolean} enabled - Is bucket enabled? When set to 'disabled', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.
|
|
140
|
-
* @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is
|
|
140
|
+
* @param {number} maximumFileSize - Maximum file size allowed in bytes. Maximum allowed value is 5GB.
|
|
141
141
|
* @param {string[]} allowedFileExtensions - Allowed file extensions. Maximum of 100 extensions are allowed, each 64 characters long.
|
|
142
142
|
* @param {Compression} compression - Compression algorithm chosen for compression. Can be one of none, [gzip](https://en.wikipedia.org/wiki/Gzip), or [zstd](https://en.wikipedia.org/wiki/Zstd), For file size above 20MB compression is skipped even if it's enabled
|
|
143
143
|
* @param {boolean} encryption - Is encryption enabled? For file size above 20MB encryption is skipped even if it's enabled
|
|
@@ -1642,6 +1642,39 @@ export declare class TablesDB {
|
|
|
1642
1642
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1643
1643
|
*/
|
|
1644
1644
|
createRelationshipColumn(databaseId: string, tableId: string, relatedTableId: string, type: RelationshipType, twoWay?: boolean, key?: string, twoWayKey?: string, onDelete?: RelationMutate): Promise<Models.ColumnRelationship>;
|
|
1645
|
+
/**
|
|
1646
|
+
* Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
1647
|
+
*
|
|
1648
|
+
*
|
|
1649
|
+
* @param {string} params.databaseId - Database ID.
|
|
1650
|
+
* @param {string} params.tableId - Table ID.
|
|
1651
|
+
* @param {string} params.key - Column Key.
|
|
1652
|
+
* @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
|
|
1653
|
+
* @param {string} params.newKey - New Column Key.
|
|
1654
|
+
* @throws {AppwriteException}
|
|
1655
|
+
* @returns {Promise<Models.ColumnRelationship>}
|
|
1656
|
+
*/
|
|
1657
|
+
updateRelationshipColumn(params: {
|
|
1658
|
+
databaseId: string;
|
|
1659
|
+
tableId: string;
|
|
1660
|
+
key: string;
|
|
1661
|
+
onDelete?: RelationMutate;
|
|
1662
|
+
newKey?: string;
|
|
1663
|
+
}): Promise<Models.ColumnRelationship>;
|
|
1664
|
+
/**
|
|
1665
|
+
* Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
1666
|
+
*
|
|
1667
|
+
*
|
|
1668
|
+
* @param {string} databaseId - Database ID.
|
|
1669
|
+
* @param {string} tableId - Table ID.
|
|
1670
|
+
* @param {string} key - Column Key.
|
|
1671
|
+
* @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
|
|
1672
|
+
* @param {string} newKey - New Column Key.
|
|
1673
|
+
* @throws {AppwriteException}
|
|
1674
|
+
* @returns {Promise<Models.ColumnRelationship>}
|
|
1675
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1676
|
+
*/
|
|
1677
|
+
updateRelationshipColumn(databaseId: string, tableId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.ColumnRelationship>;
|
|
1645
1678
|
/**
|
|
1646
1679
|
* Create a string column.
|
|
1647
1680
|
*
|
|
@@ -1960,13 +1993,13 @@ export declare class TablesDB {
|
|
|
1960
1993
|
* @param {string} params.tableId - Table ID.
|
|
1961
1994
|
* @param {string} params.key - Column Key.
|
|
1962
1995
|
* @throws {AppwriteException}
|
|
1963
|
-
* @returns {Promise<Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnString>}
|
|
1996
|
+
* @returns {Promise<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>}
|
|
1964
1997
|
*/
|
|
1965
1998
|
getColumn(params: {
|
|
1966
1999
|
databaseId: string;
|
|
1967
2000
|
tableId: string;
|
|
1968
2001
|
key: string;
|
|
1969
|
-
}): Promise<Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnString>;
|
|
2002
|
+
}): Promise<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>;
|
|
1970
2003
|
/**
|
|
1971
2004
|
* Get column by ID.
|
|
1972
2005
|
*
|
|
@@ -1974,10 +2007,10 @@ export declare class TablesDB {
|
|
|
1974
2007
|
* @param {string} tableId - Table ID.
|
|
1975
2008
|
* @param {string} key - Column Key.
|
|
1976
2009
|
* @throws {AppwriteException}
|
|
1977
|
-
* @returns {Promise<Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnString>}
|
|
2010
|
+
* @returns {Promise<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>}
|
|
1978
2011
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1979
2012
|
*/
|
|
1980
|
-
getColumn(databaseId: string, tableId: string, key: string): Promise<Models.ColumnBoolean | Models.ColumnInteger | Models.ColumnFloat | Models.ColumnEmail | Models.ColumnEnum | Models.ColumnUrl | Models.ColumnIp | Models.ColumnDatetime | Models.ColumnRelationship | Models.ColumnString>;
|
|
2013
|
+
getColumn(databaseId: string, tableId: string, key: string): Promise<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>;
|
|
1981
2014
|
/**
|
|
1982
2015
|
* Deletes a column.
|
|
1983
2016
|
*
|
|
@@ -2003,39 +2036,6 @@ export declare class TablesDB {
|
|
|
2003
2036
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2004
2037
|
*/
|
|
2005
2038
|
deleteColumn(databaseId: string, tableId: string, key: string): Promise<{}>;
|
|
2006
|
-
/**
|
|
2007
|
-
* Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
2008
|
-
*
|
|
2009
|
-
*
|
|
2010
|
-
* @param {string} params.databaseId - Database ID.
|
|
2011
|
-
* @param {string} params.tableId - Table ID.
|
|
2012
|
-
* @param {string} params.key - Column Key.
|
|
2013
|
-
* @param {RelationMutate} params.onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
|
|
2014
|
-
* @param {string} params.newKey - New Column Key.
|
|
2015
|
-
* @throws {AppwriteException}
|
|
2016
|
-
* @returns {Promise<Models.ColumnRelationship>}
|
|
2017
|
-
*/
|
|
2018
|
-
updateRelationshipColumn(params: {
|
|
2019
|
-
databaseId: string;
|
|
2020
|
-
tableId: string;
|
|
2021
|
-
key: string;
|
|
2022
|
-
onDelete?: RelationMutate;
|
|
2023
|
-
newKey?: string;
|
|
2024
|
-
}): Promise<Models.ColumnRelationship>;
|
|
2025
|
-
/**
|
|
2026
|
-
* Update relationship column. [Learn more about relationship columns](https://appwrite.io/docs/databases-relationships#relationship-columns).
|
|
2027
|
-
*
|
|
2028
|
-
*
|
|
2029
|
-
* @param {string} databaseId - Database ID.
|
|
2030
|
-
* @param {string} tableId - Table ID.
|
|
2031
|
-
* @param {string} key - Column Key.
|
|
2032
|
-
* @param {RelationMutate} onDelete - Delete constraint. Possible values are: cascade, restrict, setNull.
|
|
2033
|
-
* @param {string} newKey - New Column Key.
|
|
2034
|
-
* @throws {AppwriteException}
|
|
2035
|
-
* @returns {Promise<Models.ColumnRelationship>}
|
|
2036
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2037
|
-
*/
|
|
2038
|
-
updateRelationshipColumn(databaseId: string, tableId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.ColumnRelationship>;
|
|
2039
2039
|
/**
|
|
2040
2040
|
* List indexes on the table.
|
|
2041
2041
|
*
|
|
@@ -232,31 +232,6 @@ export declare class Teams {
|
|
|
232
232
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
233
233
|
*/
|
|
234
234
|
deleteInstallation(teamId: string, installationId: string): Promise<{}>;
|
|
235
|
-
/**
|
|
236
|
-
* Get the team activity logs list by its unique ID.
|
|
237
|
-
*
|
|
238
|
-
* @param {string} params.teamId - Team ID.
|
|
239
|
-
* @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). Only supported methods are limit and offset
|
|
240
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
241
|
-
* @throws {AppwriteException}
|
|
242
|
-
* @returns {Promise<Models.LogList>}
|
|
243
|
-
*/
|
|
244
|
-
listLogs(params: {
|
|
245
|
-
teamId: string;
|
|
246
|
-
queries?: string[];
|
|
247
|
-
total?: boolean;
|
|
248
|
-
}): Promise<Models.LogList>;
|
|
249
|
-
/**
|
|
250
|
-
* Get the team activity logs list by its unique ID.
|
|
251
|
-
*
|
|
252
|
-
* @param {string} teamId - Team ID.
|
|
253
|
-
* @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). Only supported methods are limit and offset
|
|
254
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
255
|
-
* @throws {AppwriteException}
|
|
256
|
-
* @returns {Promise<Models.LogList>}
|
|
257
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
258
|
-
*/
|
|
259
|
-
listLogs(teamId: string, queries?: string[], total?: boolean): Promise<Models.LogList>;
|
|
260
235
|
/**
|
|
261
236
|
* Use this endpoint to list a team's members using the team's ID. All team members have read access to this endpoint. Hide sensitive attributes from the response by toggling membership privacy in the Console.
|
|
262
237
|
*
|
|
@@ -10,7 +10,7 @@ export declare class Users {
|
|
|
10
10
|
/**
|
|
11
11
|
* Get a list of all the project's users. You can use the query params to filter your results.
|
|
12
12
|
*
|
|
13
|
-
* @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: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator, accessedAt
|
|
13
|
+
* @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: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, passwordPwned, labels, impersonator, accessedAt
|
|
14
14
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
15
15
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
16
16
|
* @throws {AppwriteException}
|
|
@@ -24,7 +24,7 @@ export declare class Users {
|
|
|
24
24
|
/**
|
|
25
25
|
* Get a list of all the project's users. You can use the query params to filter your results.
|
|
26
26
|
*
|
|
27
|
-
* @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: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, labels, impersonator, accessedAt
|
|
27
|
+
* @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: name, email, phone, status, passwordUpdate, registration, emailVerification, phoneVerification, passwordPwned, labels, impersonator, accessedAt
|
|
28
28
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
29
29
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
30
30
|
* @throws {AppwriteException}
|
|
@@ -412,7 +412,7 @@ export declare class Users {
|
|
|
412
412
|
*/
|
|
413
413
|
updateEmail<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, email: string): Promise<Models.User<Preferences>>;
|
|
414
414
|
/**
|
|
415
|
-
* Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.
|
|
415
|
+
* Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data. Account endpoints are read-only while impersonating: they report the target's account, and anything that would change it is refused, so an impersonator cannot alter the target's credentials or delete their account.
|
|
416
416
|
*
|
|
417
417
|
*
|
|
418
418
|
* @param {string} params.userId - User ID.
|
|
@@ -425,7 +425,7 @@ export declare class Users {
|
|
|
425
425
|
impersonator: boolean;
|
|
426
426
|
}): Promise<Models.User<Preferences>>;
|
|
427
427
|
/**
|
|
428
|
-
* Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data.
|
|
428
|
+
* Enable or disable whether a user can impersonate other users. When impersonation headers are used, the request runs as the target user for API behavior, while internal audit logs still attribute the action to the original impersonator and store the impersonated target details only in internal audit payload data. Account endpoints are read-only while impersonating: they report the target's account, and anything that would change it is refused, so an impersonator cannot alter the target's credentials or delete their account.
|
|
429
429
|
*
|
|
430
430
|
*
|
|
431
431
|
* @param {string} userId - User ID.
|
|
@@ -486,31 +486,6 @@ export declare class Users {
|
|
|
486
486
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
487
487
|
*/
|
|
488
488
|
updateLabels<Preferences extends Models.Preferences = Models.DefaultPreferences>(userId: string, labels: string[]): Promise<Models.User<Preferences>>;
|
|
489
|
-
/**
|
|
490
|
-
* Get the user activity logs list by its unique ID.
|
|
491
|
-
*
|
|
492
|
-
* @param {string} params.userId - User ID.
|
|
493
|
-
* @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). Only supported methods are limit and offset
|
|
494
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
495
|
-
* @throws {AppwriteException}
|
|
496
|
-
* @returns {Promise<Models.LogList>}
|
|
497
|
-
*/
|
|
498
|
-
listLogs(params: {
|
|
499
|
-
userId: string;
|
|
500
|
-
queries?: string[];
|
|
501
|
-
total?: boolean;
|
|
502
|
-
}): Promise<Models.LogList>;
|
|
503
|
-
/**
|
|
504
|
-
* Get the user activity logs list by its unique ID.
|
|
505
|
-
*
|
|
506
|
-
* @param {string} userId - User ID.
|
|
507
|
-
* @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). Only supported methods are limit and offset
|
|
508
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
509
|
-
* @throws {AppwriteException}
|
|
510
|
-
* @returns {Promise<Models.LogList>}
|
|
511
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
512
|
-
*/
|
|
513
|
-
listLogs(userId: string, queries?: string[], total?: boolean): Promise<Models.LogList>;
|
|
514
489
|
/**
|
|
515
490
|
* Get the user membership list by its unique ID.
|
|
516
491
|
*
|
package/types/topic.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Helper to build MQTT topics for `Push`, level by level.
|
|
3
|
+
*
|
|
4
|
+
* Topic.path(['user', userId, 'notification']); // "user/123/notification"
|
|
5
|
+
* Topic.path(['user']).any().path(['notification']); // "user/+/notification"
|
|
6
|
+
* Topic.path(['org']).any().path(['logs']).all(); // "org/+/logs/#"
|
|
7
|
+
*
|
|
8
|
+
* `any()` matches exactly one level and `all()` everything below, at any depth (including the
|
|
9
|
+
* parent itself). `all()` ends the topic, so it returns a {@link ResolvedTopic}.
|
|
10
|
+
*/
|
|
11
|
+
export declare class Topic {
|
|
12
|
+
private readonly levels;
|
|
13
|
+
private constructor();
|
|
14
|
+
/** Start a topic with the given levels, e.g. `Topic.path(['user', userId])`. */
|
|
15
|
+
static path(levels: string[]): Topic;
|
|
16
|
+
/** Start a topic with a single-level wildcard (`+`). */
|
|
17
|
+
static any(): Topic;
|
|
18
|
+
/** The multi-level wildcard alone (`#`): matches every topic. */
|
|
19
|
+
static all(): ResolvedTopic;
|
|
20
|
+
/** Append the given levels. */
|
|
21
|
+
path(levels: string[]): Topic;
|
|
22
|
+
/** Append a single-level wildcard (`+`): matches exactly one level. */
|
|
23
|
+
any(): Topic;
|
|
24
|
+
/** Append the multi-level wildcard (`#`) and end the topic. */
|
|
25
|
+
all(): ResolvedTopic;
|
|
26
|
+
toString(): string;
|
|
27
|
+
}
|
|
28
|
+
/** A topic ended by `all()`: nothing can be appended after the `#` wildcard. */
|
|
29
|
+
export declare class ResolvedTopic {
|
|
30
|
+
private readonly levels;
|
|
31
|
+
/** @internal Created by {@link Topic.all}. */
|
|
32
|
+
constructor(levels: readonly string[]);
|
|
33
|
+
toString(): string;
|
|
34
|
+
}
|