@appwrite.io/console 12.2.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.
Files changed (72) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/sdk.js +1719 -1204
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +1717 -1205
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +1736 -1221
  7. package/package.json +1 -1
  8. package/types/channel.d.ts +8 -3
  9. package/types/client.d.ts +1 -1
  10. package/types/enums/account-key-scopes.d.ts +5 -0
  11. package/types/enums/appwrite-migration-resource.d.ts +1 -0
  12. package/types/enums/backup-services.d.ts +1 -0
  13. package/types/enums/{resource-type.d.ts → block-resource-type.d.ts} +2 -6
  14. package/types/enums/{theme.d.ts → browser-theme.d.ts} +1 -1
  15. package/types/enums/cache-database.d.ts +5 -0
  16. package/types/enums/cache-target.d.ts +8 -0
  17. package/types/enums/{registration-type.d.ts → domain-registration-type.d.ts} +1 -1
  18. package/types/enums/{filter-type.d.ts → domain-suggestion-type.d.ts} +1 -1
  19. package/types/enums/{model.d.ts → embedding-model.d.ts} +1 -1
  20. package/types/enums/{runtime.d.ts → function-runtime.d.ts} +4 -2
  21. package/types/enums/function-template-use-case.d.ts +9 -0
  22. package/types/enums/{name.d.ts → health-queue-name.d.ts} +1 -1
  23. package/types/enums/{on-duplicate.d.ts → migration-on-duplicate.d.ts} +1 -1
  24. package/types/enums/o-auth-2-google-prompt.d.ts +5 -0
  25. package/types/enums/o-auth-provider.d.ts +1 -3
  26. package/types/enums/organization-addon.d.ts +4 -0
  27. package/types/enums/organization-key-scopes.d.ts +12 -0
  28. package/types/enums/{auth-method.d.ts → project-auth-method-id.d.ts} +1 -1
  29. package/types/enums/{email-template-type.d.ts → project-email-template-id.d.ts} +1 -1
  30. package/types/enums/{email-template-locale.d.ts → project-email-template-locale.d.ts} +1 -1
  31. package/types/enums/{scopes.d.ts → project-key-scopes.d.ts} +10 -8
  32. package/types/enums/project-o-auth-2-google-prompt.d.ts +5 -0
  33. package/types/enums/project-o-auth-provider-id.d.ts +45 -0
  34. package/types/enums/{project-policy.d.ts → project-policy-id.d.ts} +1 -1
  35. package/types/enums/{protocol-id.d.ts → project-protocol-id.d.ts} +1 -1
  36. package/types/enums/{service-id.d.ts → project-service-id.d.ts} +3 -2
  37. package/types/enums/project-smtp-secure.d.ts +4 -0
  38. package/types/enums/project-status.d.ts +3 -0
  39. package/types/enums/query-suggestion-resource.d.ts +10 -1
  40. package/types/enums/redirect-status-code.d.ts +6 -0
  41. package/types/enums/schedule-resource-type.d.ts +6 -0
  42. package/types/enums/{adapter.d.ts → site-adapter.d.ts} +1 -1
  43. package/types/enums/{runtimes.d.ts → site-build-runtime.d.ts} +4 -2
  44. package/types/enums/{framework.d.ts → site-framework.d.ts} +1 -1
  45. package/types/enums/{use-cases.d.ts → site-template-use-case.d.ts} +3 -8
  46. package/types/index.d.ts +36 -26
  47. package/types/models.d.ts +1186 -1185
  48. package/types/services/account.d.ts +9 -9
  49. package/types/services/avatars.d.ts +5 -5
  50. package/types/services/console.d.ts +31 -0
  51. package/types/services/documents-db.d.ts +1 -4
  52. package/types/services/domains.d.ts +216 -216
  53. package/types/services/functions.d.ts +36 -25
  54. package/types/services/health.d.ts +5 -5
  55. package/types/services/manager.d.ts +49 -9
  56. package/types/services/migrations.d.ts +13 -13
  57. package/types/services/organization.d.ts +234 -0
  58. package/types/services/organizations.d.ts +5 -131
  59. package/types/services/presences.d.ts +166 -0
  60. package/types/services/project.d.ts +226 -215
  61. package/types/services/projects.d.ts +10 -159
  62. package/types/services/proxy.d.ts +5 -5
  63. package/types/services/realtime.d.ts +45 -3
  64. package/types/services/sites.d.ts +43 -32
  65. package/types/services/usage.d.ts +50 -0
  66. package/types/services/vectors-db.d.ts +6 -9
  67. package/types/enums/addon.d.ts +0 -3
  68. package/types/enums/build-runtime.d.ts +0 -91
  69. package/types/enums/frameworks.d.ts +0 -17
  70. package/types/enums/secure.d.ts +0 -4
  71. package/types/enums/status-code.d.ts +0 -6
  72. package/types/enums/status.d.ts +0 -3
@@ -1,159 +1,10 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
- import { Region } from '../enums/region';
4
- import { ResourceType } from '../enums/resource-type';
5
- import { Status } from '../enums/status';
3
+ import { ScheduleResourceType } from '../enums/schedule-resource-type';
4
+ import { ProjectStatus } from '../enums/project-status';
6
5
  export declare class Projects {
7
6
  client: Client;
8
7
  constructor(client: Client);
9
- /**
10
- * Get a list of all projects. You can use the query params to filter your results.
11
- *
12
- * @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
13
- * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
14
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
15
- * @throws {AppwriteException}
16
- * @returns {Promise<Models.ProjectList>}
17
- */
18
- list(params?: {
19
- queries?: string[];
20
- search?: string;
21
- total?: boolean;
22
- }): Promise<Models.ProjectList>;
23
- /**
24
- * Get a list of all projects. You can use the query params to filter your results.
25
- *
26
- * @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
27
- * @param {string} search - Search term to filter your list results. Max length: 256 chars.
28
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
29
- * @throws {AppwriteException}
30
- * @returns {Promise<Models.ProjectList>}
31
- * @deprecated Use the object parameter style method for a better developer experience.
32
- */
33
- list(queries?: string[], search?: string, total?: boolean): Promise<Models.ProjectList>;
34
- /**
35
- * Create a new project. You can create a maximum of 100 projects per account.
36
- *
37
- * @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.
38
- * @param {string} params.name - Project name. Max length: 128 chars.
39
- * @param {string} params.teamId - Team unique ID.
40
- * @param {Region} params.region - Project Region.
41
- * @param {string} params.description - Project description. Max length: 256 chars.
42
- * @param {string} params.logo - Project logo.
43
- * @param {string} params.url - Project URL.
44
- * @param {string} params.legalName - Project legal Name. Max length: 256 chars.
45
- * @param {string} params.legalCountry - Project legal Country. Max length: 256 chars.
46
- * @param {string} params.legalState - Project legal State. Max length: 256 chars.
47
- * @param {string} params.legalCity - Project legal City. Max length: 256 chars.
48
- * @param {string} params.legalAddress - Project legal Address. Max length: 256 chars.
49
- * @param {string} params.legalTaxId - Project legal Tax ID. Max length: 256 chars.
50
- * @throws {AppwriteException}
51
- * @returns {Promise<Models.Project>}
52
- */
53
- create(params: {
54
- projectId: string;
55
- name: string;
56
- teamId: string;
57
- region?: Region;
58
- description?: string;
59
- logo?: string;
60
- url?: string;
61
- legalName?: string;
62
- legalCountry?: string;
63
- legalState?: string;
64
- legalCity?: string;
65
- legalAddress?: string;
66
- legalTaxId?: string;
67
- }): Promise<Models.Project>;
68
- /**
69
- * Create a new project. You can create a maximum of 100 projects per account.
70
- *
71
- * @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.
72
- * @param {string} name - Project name. Max length: 128 chars.
73
- * @param {string} teamId - Team unique ID.
74
- * @param {Region} region - Project Region.
75
- * @param {string} description - Project description. Max length: 256 chars.
76
- * @param {string} logo - Project logo.
77
- * @param {string} url - Project URL.
78
- * @param {string} legalName - Project legal Name. Max length: 256 chars.
79
- * @param {string} legalCountry - Project legal Country. Max length: 256 chars.
80
- * @param {string} legalState - Project legal State. Max length: 256 chars.
81
- * @param {string} legalCity - Project legal City. Max length: 256 chars.
82
- * @param {string} legalAddress - Project legal Address. Max length: 256 chars.
83
- * @param {string} legalTaxId - Project legal Tax ID. Max length: 256 chars.
84
- * @throws {AppwriteException}
85
- * @returns {Promise<Models.Project>}
86
- * @deprecated Use the object parameter style method for a better developer experience.
87
- */
88
- create(projectId: string, name: string, teamId: string, region?: Region, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project>;
89
- /**
90
- * Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata.
91
- *
92
- * @param {string} params.projectId - Project unique ID.
93
- * @throws {AppwriteException}
94
- * @returns {Promise<Models.Project>}
95
- */
96
- get(params: {
97
- projectId: string;
98
- }): Promise<Models.Project>;
99
- /**
100
- * Get a project by its unique ID. This endpoint allows you to retrieve the project's details, including its name, description, team, region, and other metadata.
101
- *
102
- * @param {string} projectId - Project unique ID.
103
- * @throws {AppwriteException}
104
- * @returns {Promise<Models.Project>}
105
- * @deprecated Use the object parameter style method for a better developer experience.
106
- */
107
- get(projectId: string): Promise<Models.Project>;
108
- /**
109
- * Update a project by its unique ID.
110
- *
111
- * @param {string} params.projectId - Project unique ID.
112
- * @param {string} params.name - Project name. Max length: 128 chars.
113
- * @param {string} params.description - Project description. Max length: 256 chars.
114
- * @param {string} params.logo - Project logo.
115
- * @param {string} params.url - Project URL.
116
- * @param {string} params.legalName - Project legal name. Max length: 256 chars.
117
- * @param {string} params.legalCountry - Project legal country. Max length: 256 chars.
118
- * @param {string} params.legalState - Project legal state. Max length: 256 chars.
119
- * @param {string} params.legalCity - Project legal city. Max length: 256 chars.
120
- * @param {string} params.legalAddress - Project legal address. Max length: 256 chars.
121
- * @param {string} params.legalTaxId - Project legal tax ID. Max length: 256 chars.
122
- * @throws {AppwriteException}
123
- * @returns {Promise<Models.Project>}
124
- */
125
- update(params: {
126
- projectId: string;
127
- name: string;
128
- description?: string;
129
- logo?: string;
130
- url?: string;
131
- legalName?: string;
132
- legalCountry?: string;
133
- legalState?: string;
134
- legalCity?: string;
135
- legalAddress?: string;
136
- legalTaxId?: string;
137
- }): Promise<Models.Project>;
138
- /**
139
- * Update a project by its unique ID.
140
- *
141
- * @param {string} projectId - Project unique ID.
142
- * @param {string} name - Project name. Max length: 128 chars.
143
- * @param {string} description - Project description. Max length: 256 chars.
144
- * @param {string} logo - Project logo.
145
- * @param {string} url - Project URL.
146
- * @param {string} legalName - Project legal name. Max length: 256 chars.
147
- * @param {string} legalCountry - Project legal country. Max length: 256 chars.
148
- * @param {string} legalState - Project legal state. Max length: 256 chars.
149
- * @param {string} legalCity - Project legal city. Max length: 256 chars.
150
- * @param {string} legalAddress - Project legal address. Max length: 256 chars.
151
- * @param {string} legalTaxId - Project legal tax ID. Max length: 256 chars.
152
- * @throws {AppwriteException}
153
- * @returns {Promise<Models.Project>}
154
- * @deprecated Use the object parameter style method for a better developer experience.
155
- */
156
- update(projectId: string, name: string, description?: string, logo?: string, url?: string, legalName?: string, legalCountry?: string, legalState?: string, legalCity?: string, legalAddress?: string, legalTaxId?: string): Promise<Models.Project>;
157
8
  /**
158
9
  * Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
159
10
  *
@@ -323,7 +174,7 @@ export declare class Projects {
323
174
  * Create a new schedule for a resource.
324
175
  *
325
176
  * @param {string} params.projectId - Project unique ID.
326
- * @param {ResourceType} params.resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
177
+ * @param {ScheduleResourceType} params.resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
327
178
  * @param {string} params.resourceId - The resource ID to associate with this schedule.
328
179
  * @param {string} params.schedule - Schedule CRON expression.
329
180
  * @param {boolean} params.active - Whether the schedule is active.
@@ -333,7 +184,7 @@ export declare class Projects {
333
184
  */
334
185
  createSchedule(params: {
335
186
  projectId: string;
336
- resourceType: ResourceType;
187
+ resourceType: ScheduleResourceType;
337
188
  resourceId: string;
338
189
  schedule: string;
339
190
  active?: boolean;
@@ -343,7 +194,7 @@ export declare class Projects {
343
194
  * Create a new schedule for a resource.
344
195
  *
345
196
  * @param {string} projectId - Project unique ID.
346
- * @param {ResourceType} resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
197
+ * @param {ScheduleResourceType} resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
347
198
  * @param {string} resourceId - The resource ID to associate with this schedule.
348
199
  * @param {string} schedule - Schedule CRON expression.
349
200
  * @param {boolean} active - Whether the schedule is active.
@@ -352,7 +203,7 @@ export declare class Projects {
352
203
  * @returns {Promise<Models.Schedule>}
353
204
  * @deprecated Use the object parameter style method for a better developer experience.
354
205
  */
355
- createSchedule(projectId: string, resourceType: ResourceType, resourceId: string, schedule: string, active?: boolean, data?: object): Promise<Models.Schedule>;
206
+ createSchedule(projectId: string, resourceType: ScheduleResourceType, resourceId: string, schedule: string, active?: boolean, data?: object): Promise<Models.Schedule>;
356
207
  /**
357
208
  * Get a schedule by its unique ID.
358
209
  *
@@ -380,25 +231,25 @@ export declare class Projects {
380
231
  *
381
232
  *
382
233
  * @param {string} params.projectId - Project ID
383
- * @param {Status} params.status - New status for the project
234
+ * @param {ProjectStatus} params.status - New status for the project
384
235
  * @throws {AppwriteException}
385
236
  * @returns {Promise<{}>}
386
237
  */
387
238
  updateStatus(params: {
388
239
  projectId: string;
389
- status: Status;
240
+ status: ProjectStatus;
390
241
  }): Promise<{}>;
391
242
  /**
392
243
  * Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
393
244
  *
394
245
  *
395
246
  * @param {string} projectId - Project ID
396
- * @param {Status} status - New status for the project
247
+ * @param {ProjectStatus} status - New status for the project
397
248
  * @throws {AppwriteException}
398
249
  * @returns {Promise<{}>}
399
250
  * @deprecated Use the object parameter style method for a better developer experience.
400
251
  */
401
- updateStatus(projectId: string, status: Status): Promise<{}>;
252
+ updateStatus(projectId: string, status: ProjectStatus): Promise<{}>;
402
253
  /**
403
254
  * Update the team ID of a project allowing for it to be transferred to another team.
404
255
  *
@@ -1,6 +1,6 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
- import { StatusCode } from '../enums/status-code';
3
+ import { RedirectStatusCode } from '../enums/redirect-status-code';
4
4
  import { ProxyResourceType } from '../enums/proxy-resource-type';
5
5
  export declare class Proxy {
6
6
  client: Client;
@@ -86,7 +86,7 @@ export declare class Proxy {
86
86
  *
87
87
  * @param {string} params.domain - Domain name.
88
88
  * @param {string} params.url - Target URL of redirection
89
- * @param {StatusCode} params.statusCode - Status code of redirection
89
+ * @param {RedirectStatusCode} params.statusCode - Status code of redirection
90
90
  * @param {string} params.resourceId - ID of parent resource.
91
91
  * @param {ProxyResourceType} params.resourceType - Type of parent resource.
92
92
  * @throws {AppwriteException}
@@ -95,7 +95,7 @@ export declare class Proxy {
95
95
  createRedirectRule(params: {
96
96
  domain: string;
97
97
  url: string;
98
- statusCode: StatusCode;
98
+ statusCode: RedirectStatusCode;
99
99
  resourceId: string;
100
100
  resourceType: ProxyResourceType;
101
101
  }): Promise<Models.ProxyRule>;
@@ -106,14 +106,14 @@ export declare class Proxy {
106
106
  *
107
107
  * @param {string} domain - Domain name.
108
108
  * @param {string} url - Target URL of redirection
109
- * @param {StatusCode} statusCode - Status code of redirection
109
+ * @param {RedirectStatusCode} statusCode - Status code of redirection
110
110
  * @param {string} resourceId - ID of parent resource.
111
111
  * @param {ProxyResourceType} resourceType - Type of parent resource.
112
112
  * @throws {AppwriteException}
113
113
  * @returns {Promise<Models.ProxyRule>}
114
114
  * @deprecated Use the object parameter style method for a better developer experience.
115
115
  */
116
- createRedirectRule(domain: string, url: string, statusCode: StatusCode, resourceId: string, resourceType: ProxyResourceType): Promise<Models.ProxyRule>;
116
+ createRedirectRule(domain: string, url: string, statusCode: RedirectStatusCode, resourceId: string, resourceType: ProxyResourceType): Promise<Models.ProxyRule>;
117
117
  /**
118
118
  * Create a new proxy rule for serving Appwrite Site on custom domain.
119
119
  *
@@ -42,9 +42,27 @@ export type RealtimeResponseConnected = {
42
42
  user?: object;
43
43
  };
44
44
  export type RealtimeRequest = {
45
- type: 'authentication' | 'subscribe' | 'unsubscribe';
45
+ type: 'authentication' | 'subscribe' | 'unsubscribe' | 'presence';
46
46
  data: any;
47
47
  };
48
+ export type RealtimePresence = {
49
+ $id: string;
50
+ $sequence?: string | number;
51
+ $createdAt: string;
52
+ $updatedAt: string;
53
+ $permissions: string[];
54
+ userInternalId: string;
55
+ userId: string;
56
+ status?: string;
57
+ source: string;
58
+ metadata?: Record<string, any>;
59
+ };
60
+ export type RealtimePresenceCreate = {
61
+ status: string;
62
+ presenceId: string;
63
+ permissions?: string[];
64
+ metadata?: Record<string, any>;
65
+ };
48
66
  export declare enum RealtimeCode {
49
67
  NORMAL_CLOSURE = 1000,
50
68
  POLICY_VIOLATION = 1008,
@@ -55,14 +73,16 @@ export declare class Realtime {
55
73
  private readonly TYPE_EVENT;
56
74
  private readonly TYPE_PONG;
57
75
  private readonly TYPE_CONNECTED;
58
- private readonly TYPE_RESPONSE;
59
76
  private readonly DEBOUNCE_MS;
60
77
  private readonly HEARTBEAT_INTERVAL;
61
78
  private client;
62
79
  private socket?;
63
80
  private activeSubscriptions;
64
81
  private pendingSubscribes;
82
+ private pendingPresence?;
83
+ private appConnected;
65
84
  private heartbeatTimer?;
85
+ private socketCreationPromise?;
66
86
  private subCallDepth;
67
87
  private reconnectAttempts;
68
88
  private connectionId;
@@ -94,7 +114,16 @@ export declare class Realtime {
94
114
  onOpen(callback: () => void): void;
95
115
  private startHeartbeat;
96
116
  private stopHeartbeat;
117
+ /**
118
+ * Idempotent socket opener. Both `subscribe()` and `upsertPresence()` can
119
+ * call this; the single-flight lock (`socketCreationPromise`) guarantees
120
+ * only one `new WebSocket(...)` is ever in flight, so concurrent callers
121
+ * join the same connection attempt instead of opening duplicates.
122
+ *
123
+ * Returns early when a healthy socket is already present.
124
+ */
97
125
  private createSocket;
126
+ private createSocketLocked;
98
127
  private closeSocket;
99
128
  private getTimeout;
100
129
  private sleep;
@@ -147,9 +176,22 @@ export declare class Realtime {
147
176
  * @returns {Promise<RealtimeSubscription>} Subscription object with close method
148
177
  */
149
178
  subscribe<T>(channels: (string | Channel<any> | ActionableChannel | ResolvedChannel)[], callback: (event: RealtimeResponseEvent<T>) => void, queries?: (string | Query)[]): Promise<RealtimeSubscription>;
179
+ /**
180
+ * Fire-and-forget presence upsert. Records the latest payload in state so
181
+ * that — if the WebSocket isn't open yet, or later reconnects — only the
182
+ * most recent presence is automatically (re)sent on the next `connected`
183
+ * event. Repeated calls while the socket is closed collapse to the latest
184
+ * payload (older ones are discarded).
185
+ *
186
+ * Returns a `Promise<void>` for API consistency; the promise resolves as
187
+ * soon as the payload has been stored and the opportunistic send attempted.
188
+ *
189
+ * @param {RealtimePresenceCreate} params - Presence payload (status and presenceId required, permissions/metadata optional)
190
+ */
191
+ upsertPresence(params: RealtimePresenceCreate): Promise<void>;
192
+ private flushPendingPresence;
150
193
  private handleMessage;
151
194
  private handleResponseConnected;
152
195
  private handleResponseError;
153
196
  private handleResponseEvent;
154
- private handleResponseAction;
155
197
  }
@@ -1,10 +1,9 @@
1
1
  import { Client, UploadProgress } from '../client';
2
2
  import type { Models } from '../models';
3
- import { Framework } from '../enums/framework';
4
- import { BuildRuntime } from '../enums/build-runtime';
5
- import { Adapter } from '../enums/adapter';
6
- import { Frameworks } from '../enums/frameworks';
7
- import { UseCases } from '../enums/use-cases';
3
+ import { SiteFramework } from '../enums/site-framework';
4
+ import { SiteBuildRuntime } from '../enums/site-build-runtime';
5
+ import { SiteAdapter } from '../enums/site-adapter';
6
+ import { SiteTemplateUseCase } from '../enums/site-template-use-case';
8
7
  import { UsageRange } from '../enums/usage-range';
9
8
  import { TemplateReferenceType } from '../enums/template-reference-type';
10
9
  import { VCSReferenceType } from '../enums/vcs-reference-type';
@@ -42,8 +41,8 @@ export declare class Sites {
42
41
  *
43
42
  * @param {string} params.siteId - Site 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.
44
43
  * @param {string} params.name - Site name. Max length: 128 chars.
45
- * @param {Framework} params.framework - Sites framework.
46
- * @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
44
+ * @param {SiteFramework} params.framework - Sites framework.
45
+ * @param {SiteBuildRuntime} params.buildRuntime - Runtime to use during build step.
47
46
  * @param {boolean} params.enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
48
47
  * @param {boolean} params.logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
49
48
  * @param {number} params.timeout - Maximum request time in seconds.
@@ -51,13 +50,15 @@ export declare class Sites {
51
50
  * @param {string} params.buildCommand - Build Command.
52
51
  * @param {string} params.startCommand - Custom start command. Leave empty to use default.
53
52
  * @param {string} params.outputDirectory - Output Directory for site.
54
- * @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
53
+ * @param {SiteAdapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
55
54
  * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
56
55
  * @param {string} params.fallbackFile - Fallback file for single page application sites.
57
56
  * @param {string} params.providerRepositoryId - Repository ID of the repo linked to the site.
58
57
  * @param {string} params.providerBranch - Production branch for the repo linked to the site.
59
58
  * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
60
59
  * @param {string} params.providerRootDirectory - Path to site code in the linked repo.
60
+ * @param {string[]} params.providerBranches - List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.
61
+ * @param {string[]} params.providerPaths - List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
61
62
  * @param {string} params.buildSpecification - Build specification for the site deployments.
62
63
  * @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
63
64
  * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
@@ -67,8 +68,8 @@ export declare class Sites {
67
68
  create(params: {
68
69
  siteId: string;
69
70
  name: string;
70
- framework: Framework;
71
- buildRuntime: BuildRuntime;
71
+ framework: SiteFramework;
72
+ buildRuntime: SiteBuildRuntime;
72
73
  enabled?: boolean;
73
74
  logging?: boolean;
74
75
  timeout?: number;
@@ -76,13 +77,15 @@ export declare class Sites {
76
77
  buildCommand?: string;
77
78
  startCommand?: string;
78
79
  outputDirectory?: string;
79
- adapter?: Adapter;
80
+ adapter?: SiteAdapter;
80
81
  installationId?: string;
81
82
  fallbackFile?: string;
82
83
  providerRepositoryId?: string;
83
84
  providerBranch?: string;
84
85
  providerSilentMode?: boolean;
85
86
  providerRootDirectory?: string;
87
+ providerBranches?: string[];
88
+ providerPaths?: string[];
86
89
  buildSpecification?: string;
87
90
  runtimeSpecification?: string;
88
91
  deploymentRetention?: number;
@@ -92,8 +95,8 @@ export declare class Sites {
92
95
  *
93
96
  * @param {string} siteId - Site 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.
94
97
  * @param {string} name - Site name. Max length: 128 chars.
95
- * @param {Framework} framework - Sites framework.
96
- * @param {BuildRuntime} buildRuntime - Runtime to use during build step.
98
+ * @param {SiteFramework} framework - Sites framework.
99
+ * @param {SiteBuildRuntime} buildRuntime - Runtime to use during build step.
97
100
  * @param {boolean} enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
98
101
  * @param {boolean} logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
99
102
  * @param {number} timeout - Maximum request time in seconds.
@@ -101,13 +104,15 @@ export declare class Sites {
101
104
  * @param {string} buildCommand - Build Command.
102
105
  * @param {string} startCommand - Custom start command. Leave empty to use default.
103
106
  * @param {string} outputDirectory - Output Directory for site.
104
- * @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
107
+ * @param {SiteAdapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
105
108
  * @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
106
109
  * @param {string} fallbackFile - Fallback file for single page application sites.
107
110
  * @param {string} providerRepositoryId - Repository ID of the repo linked to the site.
108
111
  * @param {string} providerBranch - Production branch for the repo linked to the site.
109
112
  * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
110
113
  * @param {string} providerRootDirectory - Path to site code in the linked repo.
114
+ * @param {string[]} providerBranches - List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.
115
+ * @param {string[]} providerPaths - List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
111
116
  * @param {string} buildSpecification - Build specification for the site deployments.
112
117
  * @param {string} runtimeSpecification - Runtime specification for the SSR executions.
113
118
  * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
@@ -115,7 +120,7 @@ export declare class Sites {
115
120
  * @returns {Promise<Models.Site>}
116
121
  * @deprecated Use the object parameter style method for a better developer experience.
117
122
  */
118
- create(siteId: string, name: string, framework: Framework, buildRuntime: BuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, adapter?: Adapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
123
+ create(siteId: string, name: string, framework: SiteFramework, buildRuntime: SiteBuildRuntime, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, adapter?: SiteAdapter, installationId?: string, fallbackFile?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
119
124
  /**
120
125
  * Get a list of all frameworks that are currently available on the server instance.
121
126
  *
@@ -133,31 +138,31 @@ export declare class Sites {
133
138
  /**
134
139
  * List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
135
140
  *
136
- * @param {Frameworks[]} params.frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
137
- * @param {UseCases[]} params.useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
141
+ * @param {SiteFramework[]} params.frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
142
+ * @param {SiteTemplateUseCase[]} params.useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
138
143
  * @param {number} params.limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
139
144
  * @param {number} params.offset - Offset the list of returned templates. Maximum offset is 5000.
140
145
  * @throws {AppwriteException}
141
146
  * @returns {Promise<Models.TemplateSiteList>}
142
147
  */
143
148
  listTemplates(params?: {
144
- frameworks?: Frameworks[];
145
- useCases?: UseCases[];
149
+ frameworks?: SiteFramework[];
150
+ useCases?: SiteTemplateUseCase[];
146
151
  limit?: number;
147
152
  offset?: number;
148
153
  }): Promise<Models.TemplateSiteList>;
149
154
  /**
150
155
  * List available site templates. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
151
156
  *
152
- * @param {Frameworks[]} frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
153
- * @param {UseCases[]} useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
157
+ * @param {SiteFramework[]} frameworks - List of frameworks allowed for filtering site templates. Maximum of 100 frameworks are allowed.
158
+ * @param {SiteTemplateUseCase[]} useCases - List of use cases allowed for filtering site templates. Maximum of 100 use cases are allowed.
154
159
  * @param {number} limit - Limit the number of templates returned in the response. Default limit is 25, and maximum limit is 5000.
155
160
  * @param {number} offset - Offset the list of returned templates. Maximum offset is 5000.
156
161
  * @throws {AppwriteException}
157
162
  * @returns {Promise<Models.TemplateSiteList>}
158
163
  * @deprecated Use the object parameter style method for a better developer experience.
159
164
  */
160
- listTemplates(frameworks?: Frameworks[], useCases?: UseCases[], limit?: number, offset?: number): Promise<Models.TemplateSiteList>;
165
+ listTemplates(frameworks?: SiteFramework[], useCases?: SiteTemplateUseCase[], limit?: number, offset?: number): Promise<Models.TemplateSiteList>;
161
166
  /**
162
167
  * Get a site template using ID. You can use template details in [createSite](/docs/references/cloud/server-nodejs/sites#create) method.
163
168
  *
@@ -220,7 +225,7 @@ export declare class Sites {
220
225
  *
221
226
  * @param {string} params.siteId - Site ID.
222
227
  * @param {string} params.name - Site name. Max length: 128 chars.
223
- * @param {Framework} params.framework - Sites framework.
228
+ * @param {SiteFramework} params.framework - Sites framework.
224
229
  * @param {boolean} params.enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
225
230
  * @param {boolean} params.logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
226
231
  * @param {number} params.timeout - Maximum request time in seconds.
@@ -228,14 +233,16 @@ export declare class Sites {
228
233
  * @param {string} params.buildCommand - Build Command.
229
234
  * @param {string} params.startCommand - Custom start command. Leave empty to use default.
230
235
  * @param {string} params.outputDirectory - Output Directory for site.
231
- * @param {BuildRuntime} params.buildRuntime - Runtime to use during build step.
232
- * @param {Adapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
236
+ * @param {SiteBuildRuntime} params.buildRuntime - Runtime to use during build step.
237
+ * @param {SiteAdapter} params.adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
233
238
  * @param {string} params.fallbackFile - Fallback file for single page application sites.
234
239
  * @param {string} params.installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
235
240
  * @param {string} params.providerRepositoryId - Repository ID of the repo linked to the site.
236
241
  * @param {string} params.providerBranch - Production branch for the repo linked to the site.
237
242
  * @param {boolean} params.providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
238
243
  * @param {string} params.providerRootDirectory - Path to site code in the linked repo.
244
+ * @param {string[]} params.providerBranches - List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.
245
+ * @param {string[]} params.providerPaths - List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
239
246
  * @param {string} params.buildSpecification - Build specification for the site deployments.
240
247
  * @param {string} params.runtimeSpecification - Runtime specification for the SSR executions.
241
248
  * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
@@ -245,7 +252,7 @@ export declare class Sites {
245
252
  update(params: {
246
253
  siteId: string;
247
254
  name: string;
248
- framework: Framework;
255
+ framework: SiteFramework;
249
256
  enabled?: boolean;
250
257
  logging?: boolean;
251
258
  timeout?: number;
@@ -253,14 +260,16 @@ export declare class Sites {
253
260
  buildCommand?: string;
254
261
  startCommand?: string;
255
262
  outputDirectory?: string;
256
- buildRuntime?: BuildRuntime;
257
- adapter?: Adapter;
263
+ buildRuntime?: SiteBuildRuntime;
264
+ adapter?: SiteAdapter;
258
265
  fallbackFile?: string;
259
266
  installationId?: string;
260
267
  providerRepositoryId?: string;
261
268
  providerBranch?: string;
262
269
  providerSilentMode?: boolean;
263
270
  providerRootDirectory?: string;
271
+ providerBranches?: string[];
272
+ providerPaths?: string[];
264
273
  buildSpecification?: string;
265
274
  runtimeSpecification?: string;
266
275
  deploymentRetention?: number;
@@ -270,7 +279,7 @@ export declare class Sites {
270
279
  *
271
280
  * @param {string} siteId - Site ID.
272
281
  * @param {string} name - Site name. Max length: 128 chars.
273
- * @param {Framework} framework - Sites framework.
282
+ * @param {SiteFramework} framework - Sites framework.
274
283
  * @param {boolean} enabled - Is site enabled? When set to 'disabled', users cannot access the site but Server SDKs with and API key can still access the site. No data is lost when this is toggled.
275
284
  * @param {boolean} logging - When disabled, request logs will exclude logs and errors, and site responses will be slightly faster.
276
285
  * @param {number} timeout - Maximum request time in seconds.
@@ -278,14 +287,16 @@ export declare class Sites {
278
287
  * @param {string} buildCommand - Build Command.
279
288
  * @param {string} startCommand - Custom start command. Leave empty to use default.
280
289
  * @param {string} outputDirectory - Output Directory for site.
281
- * @param {BuildRuntime} buildRuntime - Runtime to use during build step.
282
- * @param {Adapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
290
+ * @param {SiteBuildRuntime} buildRuntime - Runtime to use during build step.
291
+ * @param {SiteAdapter} adapter - Framework adapter defining rendering strategy. Allowed values are: static, ssr
283
292
  * @param {string} fallbackFile - Fallback file for single page application sites.
284
293
  * @param {string} installationId - Appwrite Installation ID for VCS (Version Control System) deployment.
285
294
  * @param {string} providerRepositoryId - Repository ID of the repo linked to the site.
286
295
  * @param {string} providerBranch - Production branch for the repo linked to the site.
287
296
  * @param {boolean} providerSilentMode - Is the VCS (Version Control System) connection in silent mode for the repo linked to the site? In silent mode, comments will not be made on commits and pull requests.
288
297
  * @param {string} providerRootDirectory - Path to site code in the linked repo.
298
+ * @param {string[]} providerBranches - List of branch name patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all branches.
299
+ * @param {string[]} providerPaths - List of file path patterns to trigger automatic deployments. Supports wildcards. Leave empty to deploy on all file changes.
289
300
  * @param {string} buildSpecification - Build specification for the site deployments.
290
301
  * @param {string} runtimeSpecification - Runtime specification for the SSR executions.
291
302
  * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
@@ -293,7 +304,7 @@ export declare class Sites {
293
304
  * @returns {Promise<Models.Site>}
294
305
  * @deprecated Use the object parameter style method for a better developer experience.
295
306
  */
296
- update(siteId: string, name: string, framework: Framework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, buildRuntime?: BuildRuntime, adapter?: Adapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
307
+ update(siteId: string, name: string, framework: SiteFramework, enabled?: boolean, logging?: boolean, timeout?: number, installCommand?: string, buildCommand?: string, startCommand?: string, outputDirectory?: string, buildRuntime?: SiteBuildRuntime, adapter?: SiteAdapter, fallbackFile?: string, installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Site>;
297
308
  /**
298
309
  * Delete a site by its unique ID.
299
310
  *