@appwrite.io/console 13.0.0 → 13.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 +2 -2
- package/dist/cjs/sdk.js +1658 -1162
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +1656 -1163
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +1676 -1180
- package/package.json +1 -1
- package/types/channel.d.ts +8 -3
- package/types/client.d.ts +1 -1
- package/types/enums/account-key-scopes.d.ts +5 -0
- package/types/enums/appwrite-migration-resource.d.ts +1 -0
- package/types/enums/backup-services.d.ts +1 -0
- package/types/enums/{resource-type.d.ts → block-resource-type.d.ts} +2 -6
- package/types/enums/{theme.d.ts → browser-theme.d.ts} +1 -1
- package/types/enums/cache-database.d.ts +5 -0
- package/types/enums/cache-target.d.ts +8 -0
- package/types/enums/{registration-type.d.ts → domain-registration-type.d.ts} +1 -1
- package/types/enums/{filter-type.d.ts → domain-suggestion-type.d.ts} +1 -1
- package/types/enums/{model.d.ts → embedding-model.d.ts} +1 -1
- package/types/enums/{runtime.d.ts → function-runtime.d.ts} +4 -2
- package/types/enums/function-template-use-case.d.ts +9 -0
- package/types/enums/{name.d.ts → health-queue-name.d.ts} +1 -1
- package/types/enums/{on-duplicate.d.ts → migration-on-duplicate.d.ts} +1 -1
- package/types/enums/o-auth-provider.d.ts +1 -3
- package/types/enums/organization-addon.d.ts +4 -0
- package/types/enums/organization-key-scopes.d.ts +12 -0
- package/types/enums/{auth-method.d.ts → project-auth-method-id.d.ts} +1 -1
- package/types/enums/{email-template-type.d.ts → project-email-template-id.d.ts} +1 -1
- package/types/enums/{email-template-locale.d.ts → project-email-template-locale.d.ts} +1 -1
- package/types/enums/{scopes.d.ts → project-key-scopes.d.ts} +10 -8
- package/types/enums/{prompt.d.ts → project-o-auth-2-google-prompt.d.ts} +1 -1
- package/types/enums/project-o-auth-provider-id.d.ts +45 -0
- package/types/enums/{project-policy.d.ts → project-policy-id.d.ts} +1 -1
- package/types/enums/{protocol-id.d.ts → project-protocol-id.d.ts} +1 -1
- package/types/enums/{service-id.d.ts → project-service-id.d.ts} +3 -2
- package/types/enums/project-smtp-secure.d.ts +4 -0
- package/types/enums/project-status.d.ts +3 -0
- package/types/enums/query-suggestion-resource.d.ts +10 -1
- package/types/enums/redirect-status-code.d.ts +6 -0
- package/types/enums/schedule-resource-type.d.ts +6 -0
- package/types/enums/{adapter.d.ts → site-adapter.d.ts} +1 -1
- package/types/enums/{runtimes.d.ts → site-build-runtime.d.ts} +4 -2
- package/types/enums/{framework.d.ts → site-framework.d.ts} +1 -1
- package/types/enums/{use-cases.d.ts → site-template-use-case.d.ts} +3 -8
- package/types/index.d.ts +35 -27
- package/types/models.d.ts +1183 -1187
- package/types/services/account.d.ts +9 -9
- package/types/services/avatars.d.ts +5 -5
- package/types/services/console.d.ts +31 -0
- package/types/services/documents-db.d.ts +1 -4
- package/types/services/domains.d.ts +216 -216
- package/types/services/functions.d.ts +36 -25
- package/types/services/health.d.ts +5 -5
- package/types/services/manager.d.ts +49 -9
- package/types/services/migrations.d.ts +13 -13
- package/types/services/organization.d.ts +234 -0
- package/types/services/organizations.d.ts +5 -131
- package/types/services/presences.d.ts +166 -0
- package/types/services/project.d.ts +93 -86
- package/types/services/projects.d.ts +10 -159
- package/types/services/proxy.d.ts +5 -5
- package/types/services/realtime.d.ts +45 -3
- package/types/services/sites.d.ts +43 -32
- package/types/services/usage.d.ts +50 -0
- package/types/services/vectors-db.d.ts +6 -9
- package/types/enums/addon.d.ts +0 -3
- package/types/enums/build-runtime.d.ts +0 -91
- package/types/enums/frameworks.d.ts +0 -17
- package/types/enums/secure.d.ts +0 -4
- package/types/enums/status-code.d.ts +0 -6
- package/types/enums/status.d.ts +0 -3
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { Client } from '../client';
|
|
2
|
+
import type { Models } from '../models';
|
|
3
|
+
import { OrganizationKeyScopes } from '../enums/organization-key-scopes';
|
|
4
|
+
import { Region } from '../enums/region';
|
|
5
|
+
export declare class Organization {
|
|
6
|
+
client: Client;
|
|
7
|
+
constructor(client: Client);
|
|
8
|
+
/**
|
|
9
|
+
* Get a list of all API keys from the current organization.
|
|
10
|
+
*
|
|
11
|
+
* @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: expire, accessedAt, name, scopes
|
|
12
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
13
|
+
* @throws {AppwriteException}
|
|
14
|
+
* @returns {Promise<Models.KeyList>}
|
|
15
|
+
*/
|
|
16
|
+
listKeys(params?: {
|
|
17
|
+
queries?: string[];
|
|
18
|
+
total?: boolean;
|
|
19
|
+
}): Promise<Models.KeyList>;
|
|
20
|
+
/**
|
|
21
|
+
* Get a list of all API keys from the current organization.
|
|
22
|
+
*
|
|
23
|
+
* @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: expire, accessedAt, name, scopes
|
|
24
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
25
|
+
* @throws {AppwriteException}
|
|
26
|
+
* @returns {Promise<Models.KeyList>}
|
|
27
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
28
|
+
*/
|
|
29
|
+
listKeys(queries?: string[], total?: boolean): Promise<Models.KeyList>;
|
|
30
|
+
/**
|
|
31
|
+
* Create a new organization API key.
|
|
32
|
+
*
|
|
33
|
+
* @param {string} params.keyId - Key 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.
|
|
34
|
+
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
35
|
+
* @param {OrganizationKeyScopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
36
|
+
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
37
|
+
* @throws {AppwriteException}
|
|
38
|
+
* @returns {Promise<Models.Key>}
|
|
39
|
+
*/
|
|
40
|
+
createKey(params: {
|
|
41
|
+
keyId: string;
|
|
42
|
+
name: string;
|
|
43
|
+
scopes: OrganizationKeyScopes[];
|
|
44
|
+
expire?: string;
|
|
45
|
+
}): Promise<Models.Key>;
|
|
46
|
+
/**
|
|
47
|
+
* Create a new organization API key.
|
|
48
|
+
*
|
|
49
|
+
* @param {string} keyId - Key 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.
|
|
50
|
+
* @param {string} name - Key name. Max length: 128 chars.
|
|
51
|
+
* @param {OrganizationKeyScopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
52
|
+
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
53
|
+
* @throws {AppwriteException}
|
|
54
|
+
* @returns {Promise<Models.Key>}
|
|
55
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
56
|
+
*/
|
|
57
|
+
createKey(keyId: string, name: string, scopes: OrganizationKeyScopes[], expire?: string): Promise<Models.Key>;
|
|
58
|
+
/**
|
|
59
|
+
* Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including its scopes.
|
|
60
|
+
*
|
|
61
|
+
* @param {string} params.keyId - Key unique ID.
|
|
62
|
+
* @throws {AppwriteException}
|
|
63
|
+
* @returns {Promise<Models.Key>}
|
|
64
|
+
*/
|
|
65
|
+
getKey(params: {
|
|
66
|
+
keyId: string;
|
|
67
|
+
}): Promise<Models.Key>;
|
|
68
|
+
/**
|
|
69
|
+
* Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including its scopes.
|
|
70
|
+
*
|
|
71
|
+
* @param {string} keyId - Key unique ID.
|
|
72
|
+
* @throws {AppwriteException}
|
|
73
|
+
* @returns {Promise<Models.Key>}
|
|
74
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
75
|
+
*/
|
|
76
|
+
getKey(keyId: string): Promise<Models.Key>;
|
|
77
|
+
/**
|
|
78
|
+
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
79
|
+
*
|
|
80
|
+
* @param {string} params.keyId - Key unique ID.
|
|
81
|
+
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
82
|
+
* @param {OrganizationKeyScopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
83
|
+
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
84
|
+
* @throws {AppwriteException}
|
|
85
|
+
* @returns {Promise<Models.Key>}
|
|
86
|
+
*/
|
|
87
|
+
updateKey(params: {
|
|
88
|
+
keyId: string;
|
|
89
|
+
name: string;
|
|
90
|
+
scopes: OrganizationKeyScopes[];
|
|
91
|
+
expire?: string;
|
|
92
|
+
}): Promise<Models.Key>;
|
|
93
|
+
/**
|
|
94
|
+
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
95
|
+
*
|
|
96
|
+
* @param {string} keyId - Key unique ID.
|
|
97
|
+
* @param {string} name - Key name. Max length: 128 chars.
|
|
98
|
+
* @param {OrganizationKeyScopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
99
|
+
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
100
|
+
* @throws {AppwriteException}
|
|
101
|
+
* @returns {Promise<Models.Key>}
|
|
102
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
103
|
+
*/
|
|
104
|
+
updateKey(keyId: string, name: string, scopes: OrganizationKeyScopes[], expire?: string): Promise<Models.Key>;
|
|
105
|
+
/**
|
|
106
|
+
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
107
|
+
*
|
|
108
|
+
* @param {string} params.keyId - Key unique ID.
|
|
109
|
+
* @throws {AppwriteException}
|
|
110
|
+
* @returns {Promise<{}>}
|
|
111
|
+
*/
|
|
112
|
+
deleteKey(params: {
|
|
113
|
+
keyId: string;
|
|
114
|
+
}): Promise<{}>;
|
|
115
|
+
/**
|
|
116
|
+
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
117
|
+
*
|
|
118
|
+
* @param {string} keyId - Key unique ID.
|
|
119
|
+
* @throws {AppwriteException}
|
|
120
|
+
* @returns {Promise<{}>}
|
|
121
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
122
|
+
*/
|
|
123
|
+
deleteKey(keyId: string): Promise<{}>;
|
|
124
|
+
/**
|
|
125
|
+
* Get a list of all projects. You can use the query params to filter your results.
|
|
126
|
+
*
|
|
127
|
+
* @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, teamId, labels, search
|
|
128
|
+
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
129
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
130
|
+
* @throws {AppwriteException}
|
|
131
|
+
* @returns {Promise<Models.ProjectList>}
|
|
132
|
+
*/
|
|
133
|
+
listProjects(params?: {
|
|
134
|
+
queries?: string[];
|
|
135
|
+
search?: string;
|
|
136
|
+
total?: boolean;
|
|
137
|
+
}): Promise<Models.ProjectList>;
|
|
138
|
+
/**
|
|
139
|
+
* Get a list of all projects. You can use the query params to filter your results.
|
|
140
|
+
*
|
|
141
|
+
* @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, teamId, labels, search
|
|
142
|
+
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
143
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
144
|
+
* @throws {AppwriteException}
|
|
145
|
+
* @returns {Promise<Models.ProjectList>}
|
|
146
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
147
|
+
*/
|
|
148
|
+
listProjects(queries?: string[], search?: string, total?: boolean): Promise<Models.ProjectList>;
|
|
149
|
+
/**
|
|
150
|
+
* Create a new project.
|
|
151
|
+
*
|
|
152
|
+
* @param {string} params.projectId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
|
|
153
|
+
* @param {string} params.name - Project name. Max length: 128 chars.
|
|
154
|
+
* @param {Region} params.region - Project Region.
|
|
155
|
+
* @throws {AppwriteException}
|
|
156
|
+
* @returns {Promise<Models.Project>}
|
|
157
|
+
*/
|
|
158
|
+
createProject(params: {
|
|
159
|
+
projectId: string;
|
|
160
|
+
name: string;
|
|
161
|
+
region?: Region;
|
|
162
|
+
}): Promise<Models.Project>;
|
|
163
|
+
/**
|
|
164
|
+
* Create a new project.
|
|
165
|
+
*
|
|
166
|
+
* @param {string} projectId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, and hyphen. Can't start with a special char. Max length is 36 chars.
|
|
167
|
+
* @param {string} name - Project name. Max length: 128 chars.
|
|
168
|
+
* @param {Region} region - Project Region.
|
|
169
|
+
* @throws {AppwriteException}
|
|
170
|
+
* @returns {Promise<Models.Project>}
|
|
171
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
172
|
+
*/
|
|
173
|
+
createProject(projectId: string, name: string, region?: Region): Promise<Models.Project>;
|
|
174
|
+
/**
|
|
175
|
+
* Get a project.
|
|
176
|
+
*
|
|
177
|
+
* @param {string} params.projectId - Project unique ID.
|
|
178
|
+
* @throws {AppwriteException}
|
|
179
|
+
* @returns {Promise<Models.Project>}
|
|
180
|
+
*/
|
|
181
|
+
getProject(params: {
|
|
182
|
+
projectId: string;
|
|
183
|
+
}): Promise<Models.Project>;
|
|
184
|
+
/**
|
|
185
|
+
* Get a project.
|
|
186
|
+
*
|
|
187
|
+
* @param {string} projectId - Project unique ID.
|
|
188
|
+
* @throws {AppwriteException}
|
|
189
|
+
* @returns {Promise<Models.Project>}
|
|
190
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
191
|
+
*/
|
|
192
|
+
getProject(projectId: string): Promise<Models.Project>;
|
|
193
|
+
/**
|
|
194
|
+
* Update a project by its unique ID.
|
|
195
|
+
*
|
|
196
|
+
* @param {string} params.projectId - Project unique ID.
|
|
197
|
+
* @param {string} params.name - Project name. Max length: 128 chars.
|
|
198
|
+
* @throws {AppwriteException}
|
|
199
|
+
* @returns {Promise<Models.Project>}
|
|
200
|
+
*/
|
|
201
|
+
updateProject(params: {
|
|
202
|
+
projectId: string;
|
|
203
|
+
name: string;
|
|
204
|
+
}): Promise<Models.Project>;
|
|
205
|
+
/**
|
|
206
|
+
* Update a project by its unique ID.
|
|
207
|
+
*
|
|
208
|
+
* @param {string} projectId - Project unique ID.
|
|
209
|
+
* @param {string} name - Project name. Max length: 128 chars.
|
|
210
|
+
* @throws {AppwriteException}
|
|
211
|
+
* @returns {Promise<Models.Project>}
|
|
212
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
213
|
+
*/
|
|
214
|
+
updateProject(projectId: string, name: string): Promise<Models.Project>;
|
|
215
|
+
/**
|
|
216
|
+
* Delete a project by its unique ID.
|
|
217
|
+
*
|
|
218
|
+
* @param {string} params.projectId - Project unique ID.
|
|
219
|
+
* @throws {AppwriteException}
|
|
220
|
+
* @returns {Promise<{}>}
|
|
221
|
+
*/
|
|
222
|
+
deleteProject(params: {
|
|
223
|
+
projectId: string;
|
|
224
|
+
}): Promise<{}>;
|
|
225
|
+
/**
|
|
226
|
+
* Delete a project by its unique ID.
|
|
227
|
+
*
|
|
228
|
+
* @param {string} projectId - Project unique ID.
|
|
229
|
+
* @throws {AppwriteException}
|
|
230
|
+
* @returns {Promise<{}>}
|
|
231
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
232
|
+
*/
|
|
233
|
+
deleteProject(projectId: string): Promise<{}>;
|
|
234
|
+
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Client } from '../client';
|
|
2
2
|
import type { Models } from '../models';
|
|
3
3
|
import { Platform } from '../enums/platform';
|
|
4
|
-
import {
|
|
5
|
-
import { Scopes } from '../enums/scopes';
|
|
4
|
+
import { OrganizationAddon } from '../enums/organization-addon';
|
|
6
5
|
export declare class Organizations {
|
|
7
6
|
client: Client;
|
|
8
7
|
constructor(client: Client);
|
|
@@ -245,25 +244,25 @@ export declare class Organizations {
|
|
|
245
244
|
*
|
|
246
245
|
*
|
|
247
246
|
* @param {string} params.organizationId - Organization ID
|
|
248
|
-
* @param {
|
|
247
|
+
* @param {OrganizationAddon} params.addon - Addon key identifier (e.g. baa).
|
|
249
248
|
* @throws {AppwriteException}
|
|
250
249
|
* @returns {Promise<Models.AddonPrice>}
|
|
251
250
|
*/
|
|
252
251
|
getAddonPrice(params: {
|
|
253
252
|
organizationId: string;
|
|
254
|
-
addon:
|
|
253
|
+
addon: OrganizationAddon;
|
|
255
254
|
}): Promise<Models.AddonPrice>;
|
|
256
255
|
/**
|
|
257
256
|
* Get the price details for a billing addon for an organization.
|
|
258
257
|
*
|
|
259
258
|
*
|
|
260
259
|
* @param {string} organizationId - Organization ID
|
|
261
|
-
* @param {
|
|
260
|
+
* @param {OrganizationAddon} addon - Addon key identifier (e.g. baa).
|
|
262
261
|
* @throws {AppwriteException}
|
|
263
262
|
* @returns {Promise<Models.AddonPrice>}
|
|
264
263
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
265
264
|
*/
|
|
266
|
-
getAddonPrice(organizationId: string, addon:
|
|
265
|
+
getAddonPrice(organizationId: string, addon: OrganizationAddon): Promise<Models.AddonPrice>;
|
|
267
266
|
/**
|
|
268
267
|
* Get a list of all aggregations for an organization.
|
|
269
268
|
*
|
|
@@ -726,131 +725,6 @@ export declare class Organizations {
|
|
|
726
725
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
727
726
|
*/
|
|
728
727
|
getInvoiceView(organizationId: string, invoiceId: string): Promise<Models.PaymentMethod>;
|
|
729
|
-
/**
|
|
730
|
-
* Get a list of all API keys from the current organization.
|
|
731
|
-
*
|
|
732
|
-
* @param {string} params.organizationId - Organization Unique ID
|
|
733
|
-
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
734
|
-
* @throws {AppwriteException}
|
|
735
|
-
* @returns {Promise<Models.KeyList>}
|
|
736
|
-
*/
|
|
737
|
-
listKeys(params: {
|
|
738
|
-
organizationId: string;
|
|
739
|
-
total?: boolean;
|
|
740
|
-
}): Promise<Models.KeyList>;
|
|
741
|
-
/**
|
|
742
|
-
* Get a list of all API keys from the current organization.
|
|
743
|
-
*
|
|
744
|
-
* @param {string} organizationId - Organization Unique ID
|
|
745
|
-
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
746
|
-
* @throws {AppwriteException}
|
|
747
|
-
* @returns {Promise<Models.KeyList>}
|
|
748
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
749
|
-
*/
|
|
750
|
-
listKeys(organizationId: string, total?: boolean): Promise<Models.KeyList>;
|
|
751
|
-
/**
|
|
752
|
-
* Create a new organization API key.
|
|
753
|
-
*
|
|
754
|
-
* @param {string} params.organizationId - Organization Unique ID
|
|
755
|
-
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
756
|
-
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
757
|
-
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
758
|
-
* @throws {AppwriteException}
|
|
759
|
-
* @returns {Promise<Models.Key>}
|
|
760
|
-
*/
|
|
761
|
-
createKey(params: {
|
|
762
|
-
organizationId: string;
|
|
763
|
-
name: string;
|
|
764
|
-
scopes: Scopes[];
|
|
765
|
-
expire?: string;
|
|
766
|
-
}): Promise<Models.Key>;
|
|
767
|
-
/**
|
|
768
|
-
* Create a new organization API key.
|
|
769
|
-
*
|
|
770
|
-
* @param {string} organizationId - Organization Unique ID
|
|
771
|
-
* @param {string} name - Key name. Max length: 128 chars.
|
|
772
|
-
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
773
|
-
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
774
|
-
* @throws {AppwriteException}
|
|
775
|
-
* @returns {Promise<Models.Key>}
|
|
776
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
777
|
-
*/
|
|
778
|
-
createKey(organizationId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
|
|
779
|
-
/**
|
|
780
|
-
* Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.
|
|
781
|
-
*
|
|
782
|
-
* @param {string} params.organizationId - Organization Unique ID
|
|
783
|
-
* @param {string} params.keyId - Key unique ID.
|
|
784
|
-
* @throws {AppwriteException}
|
|
785
|
-
* @returns {Promise<Models.Key>}
|
|
786
|
-
*/
|
|
787
|
-
getKey(params: {
|
|
788
|
-
organizationId: string;
|
|
789
|
-
keyId: string;
|
|
790
|
-
}): Promise<Models.Key>;
|
|
791
|
-
/**
|
|
792
|
-
* Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.
|
|
793
|
-
*
|
|
794
|
-
* @param {string} organizationId - Organization Unique ID
|
|
795
|
-
* @param {string} keyId - Key unique ID.
|
|
796
|
-
* @throws {AppwriteException}
|
|
797
|
-
* @returns {Promise<Models.Key>}
|
|
798
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
799
|
-
*/
|
|
800
|
-
getKey(organizationId: string, keyId: string): Promise<Models.Key>;
|
|
801
|
-
/**
|
|
802
|
-
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
803
|
-
*
|
|
804
|
-
* @param {string} params.organizationId - Organization Unique ID
|
|
805
|
-
* @param {string} params.keyId - Key unique ID.
|
|
806
|
-
* @param {string} params.name - Key name. Max length: 128 chars.
|
|
807
|
-
* @param {Scopes[]} params.scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
808
|
-
* @param {string} params.expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
809
|
-
* @throws {AppwriteException}
|
|
810
|
-
* @returns {Promise<Models.Key>}
|
|
811
|
-
*/
|
|
812
|
-
updateKey(params: {
|
|
813
|
-
organizationId: string;
|
|
814
|
-
keyId: string;
|
|
815
|
-
name: string;
|
|
816
|
-
scopes: Scopes[];
|
|
817
|
-
expire?: string;
|
|
818
|
-
}): Promise<Models.Key>;
|
|
819
|
-
/**
|
|
820
|
-
* Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.
|
|
821
|
-
*
|
|
822
|
-
* @param {string} organizationId - Organization Unique ID
|
|
823
|
-
* @param {string} keyId - Key unique ID.
|
|
824
|
-
* @param {string} name - Key name. Max length: 128 chars.
|
|
825
|
-
* @param {Scopes[]} scopes - Key scopes list. Maximum of 100 scopes are allowed.
|
|
826
|
-
* @param {string} expire - Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.
|
|
827
|
-
* @throws {AppwriteException}
|
|
828
|
-
* @returns {Promise<Models.Key>}
|
|
829
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
830
|
-
*/
|
|
831
|
-
updateKey(organizationId: string, keyId: string, name: string, scopes: Scopes[], expire?: string): Promise<Models.Key>;
|
|
832
|
-
/**
|
|
833
|
-
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
834
|
-
*
|
|
835
|
-
* @param {string} params.organizationId - Organization Unique ID
|
|
836
|
-
* @param {string} params.keyId - Key unique ID.
|
|
837
|
-
* @throws {AppwriteException}
|
|
838
|
-
* @returns {Promise<{}>}
|
|
839
|
-
*/
|
|
840
|
-
deleteKey(params: {
|
|
841
|
-
organizationId: string;
|
|
842
|
-
keyId: string;
|
|
843
|
-
}): Promise<{}>;
|
|
844
|
-
/**
|
|
845
|
-
* Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.
|
|
846
|
-
*
|
|
847
|
-
* @param {string} organizationId - Organization Unique ID
|
|
848
|
-
* @param {string} keyId - Key unique ID.
|
|
849
|
-
* @throws {AppwriteException}
|
|
850
|
-
* @returns {Promise<{}>}
|
|
851
|
-
* @deprecated Use the object parameter style method for a better developer experience.
|
|
852
|
-
*/
|
|
853
|
-
deleteKey(organizationId: string, keyId: string): Promise<{}>;
|
|
854
728
|
/**
|
|
855
729
|
* Set a organization's default payment method.
|
|
856
730
|
*
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { Client } from '../client';
|
|
2
|
+
import type { Models } from '../models';
|
|
3
|
+
import { UsageRange } from '../enums/usage-range';
|
|
4
|
+
export declare class Presences {
|
|
5
|
+
client: Client;
|
|
6
|
+
constructor(client: Client);
|
|
7
|
+
/**
|
|
8
|
+
* List presence logs. Expired entries are filtered out automatically.
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK.
|
|
12
|
+
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
13
|
+
* @param {number} params.ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).
|
|
14
|
+
* @throws {AppwriteException}
|
|
15
|
+
* @returns {Promise<Models.PresenceList>}
|
|
16
|
+
*/
|
|
17
|
+
list(params?: {
|
|
18
|
+
queries?: string[];
|
|
19
|
+
total?: boolean;
|
|
20
|
+
ttl?: number;
|
|
21
|
+
}): Promise<Models.PresenceList>;
|
|
22
|
+
/**
|
|
23
|
+
* List presence logs. Expired entries are filtered out automatically.
|
|
24
|
+
*
|
|
25
|
+
*
|
|
26
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK.
|
|
27
|
+
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
28
|
+
* @param {number} ttl - TTL (seconds) for caching list responses. Responses are stored in an in-memory key-value cache, keyed per project, collection, schema version (attributes and indexes), caller authorization roles, and the exact query — so users with different permissions never share cached entries. Schema changes invalidate cached entries automatically; document writes do not, so choose a TTL you are comfortable serving as stale data. Set to 0 to disable caching. Must be between 0 and 86400 (24 hours).
|
|
29
|
+
* @throws {AppwriteException}
|
|
30
|
+
* @returns {Promise<Models.PresenceList>}
|
|
31
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
32
|
+
*/
|
|
33
|
+
list(queries?: string[], total?: boolean, ttl?: number): Promise<Models.PresenceList>;
|
|
34
|
+
/**
|
|
35
|
+
* Get presence usage metrics, including the current total of online users and historical online user counts for the selected time range.
|
|
36
|
+
*
|
|
37
|
+
*
|
|
38
|
+
* @param {UsageRange} params.range - Date range.
|
|
39
|
+
* @throws {AppwriteException}
|
|
40
|
+
* @returns {Promise<Models.UsagePresence>}
|
|
41
|
+
*/
|
|
42
|
+
getUsage(params?: {
|
|
43
|
+
range?: UsageRange;
|
|
44
|
+
}): Promise<Models.UsagePresence>;
|
|
45
|
+
/**
|
|
46
|
+
* Get presence usage metrics, including the current total of online users and historical online user counts for the selected time range.
|
|
47
|
+
*
|
|
48
|
+
*
|
|
49
|
+
* @param {UsageRange} range - Date range.
|
|
50
|
+
* @throws {AppwriteException}
|
|
51
|
+
* @returns {Promise<Models.UsagePresence>}
|
|
52
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
53
|
+
*/
|
|
54
|
+
getUsage(range?: UsageRange): Promise<Models.UsagePresence>;
|
|
55
|
+
/**
|
|
56
|
+
* Get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found.
|
|
57
|
+
*
|
|
58
|
+
*
|
|
59
|
+
* @param {string} params.presenceId - Presence unique ID.
|
|
60
|
+
* @throws {AppwriteException}
|
|
61
|
+
* @returns {Promise<Models.Presence>}
|
|
62
|
+
*/
|
|
63
|
+
get(params: {
|
|
64
|
+
presenceId: string;
|
|
65
|
+
}): Promise<Models.Presence>;
|
|
66
|
+
/**
|
|
67
|
+
* Get a presence log by its unique ID. Entries whose `expiresAt` is in the past are treated as not found.
|
|
68
|
+
*
|
|
69
|
+
*
|
|
70
|
+
* @param {string} presenceId - Presence unique ID.
|
|
71
|
+
* @throws {AppwriteException}
|
|
72
|
+
* @returns {Promise<Models.Presence>}
|
|
73
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
74
|
+
*/
|
|
75
|
+
get(presenceId: string): Promise<Models.Presence>;
|
|
76
|
+
/**
|
|
77
|
+
* Create or update a presence log by its user ID.
|
|
78
|
+
*
|
|
79
|
+
*
|
|
80
|
+
* @param {string} params.presenceId - Presence unique ID.
|
|
81
|
+
* @param {string} params.status - Presence status.
|
|
82
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
83
|
+
* @param {string} params.expiresAt - Presence expiry datetime.
|
|
84
|
+
* @param {object} params.metadata - Presence metadata object.
|
|
85
|
+
* @throws {AppwriteException}
|
|
86
|
+
* @returns {Promise<Models.Presence>}
|
|
87
|
+
*/
|
|
88
|
+
upsert(params: {
|
|
89
|
+
presenceId: string;
|
|
90
|
+
status: string;
|
|
91
|
+
permissions?: string[];
|
|
92
|
+
expiresAt?: string;
|
|
93
|
+
metadata?: object;
|
|
94
|
+
}): Promise<Models.Presence>;
|
|
95
|
+
/**
|
|
96
|
+
* Create or update a presence log by its user ID.
|
|
97
|
+
*
|
|
98
|
+
*
|
|
99
|
+
* @param {string} presenceId - Presence unique ID.
|
|
100
|
+
* @param {string} status - Presence status.
|
|
101
|
+
* @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
102
|
+
* @param {string} expiresAt - Presence expiry datetime.
|
|
103
|
+
* @param {object} metadata - Presence metadata object.
|
|
104
|
+
* @throws {AppwriteException}
|
|
105
|
+
* @returns {Promise<Models.Presence>}
|
|
106
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
107
|
+
*/
|
|
108
|
+
upsert(presenceId: string, status: string, permissions?: string[], expiresAt?: string, metadata?: object): Promise<Models.Presence>;
|
|
109
|
+
/**
|
|
110
|
+
* Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
111
|
+
*
|
|
112
|
+
*
|
|
113
|
+
* @param {string} params.presenceId - Presence unique ID.
|
|
114
|
+
* @param {string} params.status - Presence status.
|
|
115
|
+
* @param {string} params.expiresAt - Presence expiry datetime.
|
|
116
|
+
* @param {object} params.metadata - Presence metadata object.
|
|
117
|
+
* @param {string[]} params.permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
118
|
+
* @param {boolean} params.purge - When true, purge cached responses used by list presences endpoint.
|
|
119
|
+
* @throws {AppwriteException}
|
|
120
|
+
* @returns {Promise<Models.Presence>}
|
|
121
|
+
*/
|
|
122
|
+
update(params: {
|
|
123
|
+
presenceId: string;
|
|
124
|
+
status?: string;
|
|
125
|
+
expiresAt?: string;
|
|
126
|
+
metadata?: object;
|
|
127
|
+
permissions?: string[];
|
|
128
|
+
purge?: boolean;
|
|
129
|
+
}): Promise<Models.Presence>;
|
|
130
|
+
/**
|
|
131
|
+
* Update a presence log by its unique ID. Using the patch method you can pass only specific fields that will get updated.
|
|
132
|
+
*
|
|
133
|
+
*
|
|
134
|
+
* @param {string} presenceId - Presence unique ID.
|
|
135
|
+
* @param {string} status - Presence status.
|
|
136
|
+
* @param {string} expiresAt - Presence expiry datetime.
|
|
137
|
+
* @param {object} metadata - Presence metadata object.
|
|
138
|
+
* @param {string[]} permissions - An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).
|
|
139
|
+
* @param {boolean} purge - When true, purge cached responses used by list presences endpoint.
|
|
140
|
+
* @throws {AppwriteException}
|
|
141
|
+
* @returns {Promise<Models.Presence>}
|
|
142
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
143
|
+
*/
|
|
144
|
+
update(presenceId: string, status?: string, expiresAt?: string, metadata?: object, permissions?: string[], purge?: boolean): Promise<Models.Presence>;
|
|
145
|
+
/**
|
|
146
|
+
* Delete a presence log by its unique ID.
|
|
147
|
+
*
|
|
148
|
+
*
|
|
149
|
+
* @param {string} params.presenceId - Presence unique ID.
|
|
150
|
+
* @throws {AppwriteException}
|
|
151
|
+
* @returns {Promise<{}>}
|
|
152
|
+
*/
|
|
153
|
+
delete(params: {
|
|
154
|
+
presenceId: string;
|
|
155
|
+
}): Promise<{}>;
|
|
156
|
+
/**
|
|
157
|
+
* Delete a presence log by its unique ID.
|
|
158
|
+
*
|
|
159
|
+
*
|
|
160
|
+
* @param {string} presenceId - Presence unique ID.
|
|
161
|
+
* @throws {AppwriteException}
|
|
162
|
+
* @returns {Promise<{}>}
|
|
163
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
164
|
+
*/
|
|
165
|
+
delete(presenceId: string): Promise<{}>;
|
|
166
|
+
}
|