@appwrite.io/console 18.3.0-rc.2 → 18.4.0-rc.1

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/dist/iife/sdk.js CHANGED
@@ -4467,7 +4467,7 @@
4467
4467
  'x-sdk-name': 'Console',
4468
4468
  'x-sdk-platform': 'console',
4469
4469
  'x-sdk-language': 'web',
4470
- 'x-sdk-version': '18.3.0-rc.2',
4470
+ 'x-sdk-version': '18.4.0-rc.1',
4471
4471
  'X-Appwrite-Response-Format': '2.3.0',
4472
4472
  };
4473
4473
  this.realtime = {
@@ -19226,6 +19226,7 @@
19226
19226
  buildSpecification: rest[18],
19227
19227
  runtimeSpecification: rest[19],
19228
19228
  deploymentRetention: rest[20],
19229
+ interval: rest[21],
19229
19230
  };
19230
19231
  }
19231
19232
  const functionId = params.functionId;
@@ -19250,6 +19251,7 @@
19250
19251
  const buildSpecification = params.buildSpecification;
19251
19252
  const runtimeSpecification = params.runtimeSpecification;
19252
19253
  const deploymentRetention = params.deploymentRetention;
19254
+ const interval = params.interval;
19253
19255
  if (typeof functionId === 'undefined') {
19254
19256
  throw new AppwriteException('Missing required parameter: "functionId"');
19255
19257
  }
@@ -19327,6 +19329,9 @@
19327
19329
  if (typeof deploymentRetention !== 'undefined') {
19328
19330
  apiPayload['deploymentRetention'] = deploymentRetention;
19329
19331
  }
19332
+ if (typeof interval !== 'undefined') {
19333
+ apiPayload['interval'] = interval;
19334
+ }
19330
19335
  const uri = new URL(this.client.config.endpoint + apiPath);
19331
19336
  const apiHeaders = {
19332
19337
  'X-Appwrite-Project': this.client.config.project,
@@ -19524,6 +19529,7 @@
19524
19529
  buildSpecification: rest[18],
19525
19530
  runtimeSpecification: rest[19],
19526
19531
  deploymentRetention: rest[20],
19532
+ interval: rest[21],
19527
19533
  };
19528
19534
  }
19529
19535
  const functionId = params.functionId;
@@ -19548,6 +19554,7 @@
19548
19554
  const buildSpecification = params.buildSpecification;
19549
19555
  const runtimeSpecification = params.runtimeSpecification;
19550
19556
  const deploymentRetention = params.deploymentRetention;
19557
+ const interval = params.interval;
19551
19558
  if (typeof functionId === 'undefined' || functionId === '') {
19552
19559
  throw new AppwriteException('Missing required parameter: "functionId"');
19553
19560
  }
@@ -19619,6 +19626,9 @@
19619
19626
  if (typeof deploymentRetention !== 'undefined') {
19620
19627
  apiPayload['deploymentRetention'] = deploymentRetention;
19621
19628
  }
19629
+ if (typeof interval !== 'undefined') {
19630
+ apiPayload['interval'] = interval;
19631
+ }
19622
19632
  const uri = new URL(this.client.config.endpoint + apiPath);
19623
19633
  const apiHeaders = {
19624
19634
  'X-Appwrite-Project': this.client.config.project,
@@ -37399,6 +37409,7 @@
37399
37409
  schedule: rest[2],
37400
37410
  active: rest[3],
37401
37411
  data: rest[4],
37412
+ interval: rest[5],
37402
37413
  };
37403
37414
  }
37404
37415
  const projectId = params.projectId;
@@ -37407,6 +37418,7 @@
37407
37418
  const schedule = params.schedule;
37408
37419
  const active = params.active;
37409
37420
  const data = params.data;
37421
+ const interval = params.interval;
37410
37422
  if (typeof projectId === 'undefined' || projectId === '') {
37411
37423
  throw new AppwriteException('Missing required parameter: "projectId"');
37412
37424
  }
@@ -37416,9 +37428,6 @@
37416
37428
  if (typeof resourceId === 'undefined') {
37417
37429
  throw new AppwriteException('Missing required parameter: "resourceId"');
37418
37430
  }
37419
- if (typeof schedule === 'undefined') {
37420
- throw new AppwriteException('Missing required parameter: "schedule"');
37421
- }
37422
37431
  const apiPath = '/projects/{projectId}/schedules'.replace('{projectId}', encodeURIComponent(String(projectId)));
37423
37432
  const apiPayload = {};
37424
37433
  if (typeof resourceType !== 'undefined') {
@@ -37436,6 +37445,9 @@
37436
37445
  if (typeof data !== 'undefined') {
37437
37446
  apiPayload['data'] = data;
37438
37447
  }
37448
+ if (typeof interval !== 'undefined') {
37449
+ apiPayload['interval'] = interval;
37450
+ }
37439
37451
  const uri = new URL(this.client.config.endpoint + apiPath);
37440
37452
  const apiHeaders = {
37441
37453
  'X-Appwrite-Project': this.client.config.project,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@appwrite.io/console",
3
3
  "homepage": "https://appwrite.io/support",
4
4
  "description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
5
- "version": "18.3.0-rc.2",
5
+ "version": "18.4.0-rc.1",
6
6
  "license": "BSD-3-Clause",
7
7
  "main": "dist/cjs/sdk.js",
8
8
  "exports": {
package/types/models.d.ts CHANGED
@@ -4380,6 +4380,10 @@ export declare namespace Models {
4380
4380
  * Function execution schedule in CRON format.
4381
4381
  */
4382
4382
  schedule: string;
4383
+ /**
4384
+ * Minutes between scheduled executions. 0 when the function has no interval.
4385
+ */
4386
+ interval?: number;
4383
4387
  /**
4384
4388
  * Function execution timeout in seconds.
4385
4389
  */
@@ -7581,6 +7585,10 @@ export declare namespace Models {
7581
7585
  * The CRON schedule expression.
7582
7586
  */
7583
7587
  schedule: string;
7588
+ /**
7589
+ * Minutes between runs. 0 when the schedule has no interval.
7590
+ */
7591
+ interval?: number;
7584
7592
  /**
7585
7593
  * Schedule data used to store resource-specific context needed for execution.
7586
7594
  */
@@ -10062,6 +10070,10 @@ export declare namespace Models {
10062
10070
  * Maximum function and site deployment size in MB
10063
10071
  */
10064
10072
  buildSize: number;
10073
+ /**
10074
+ * Shortest function schedule interval allowed, in minutes. 0 allows every interval.
10075
+ */
10076
+ functionsIntervalMinimum: number;
10065
10077
  /**
10066
10078
  * Does the plan support encrypted string attributes or not.
10067
10079
  */
@@ -43,7 +43,7 @@ export declare class Functions {
43
43
  * @param {Runtime} params.runtime - Execution runtime.
44
44
  * @param {string[]} params.execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
45
45
  * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
46
- * @param {string} params.schedule - Schedule CRON syntax.
46
+ * @param {string} params.schedule - Schedule CRON syntax. Cannot be combined with interval.
47
47
  * @param {number} params.timeout - Function maximum execution time in seconds.
48
48
  * @param {boolean} params.enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
49
49
  * @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
@@ -60,6 +60,7 @@ export declare class Functions {
60
60
  * @param {string} params.buildSpecification - Build specification for the function deployments.
61
61
  * @param {string} params.runtimeSpecification - Runtime specification for the function executions.
62
62
  * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
63
+ * @param {number} params.interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule.
63
64
  * @throws {AppwriteException}
64
65
  * @returns {Promise<Models.Function>}
65
66
  */
@@ -86,6 +87,7 @@ export declare class Functions {
86
87
  buildSpecification?: string;
87
88
  runtimeSpecification?: string;
88
89
  deploymentRetention?: number;
90
+ interval?: number;
89
91
  }): Promise<Models.Function>;
90
92
  /**
91
93
  * Create a new function. You can pass a list of [permissions](https://appwrite.io/docs/permissions) to allow different project users or team with access to execute the function using the client API.
@@ -95,7 +97,7 @@ export declare class Functions {
95
97
  * @param {Runtime} runtime - Execution runtime.
96
98
  * @param {string[]} execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
97
99
  * @param {string[]} events - Events list. Maximum of 100 events are allowed.
98
- * @param {string} schedule - Schedule CRON syntax.
100
+ * @param {string} schedule - Schedule CRON syntax. Cannot be combined with interval.
99
101
  * @param {number} timeout - Function maximum execution time in seconds.
100
102
  * @param {boolean} enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
101
103
  * @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
@@ -112,11 +114,12 @@ export declare class Functions {
112
114
  * @param {string} buildSpecification - Build specification for the function deployments.
113
115
  * @param {string} runtimeSpecification - Runtime specification for the function executions.
114
116
  * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
117
+ * @param {number} interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule.
115
118
  * @throws {AppwriteException}
116
119
  * @returns {Promise<Models.Function>}
117
120
  * @deprecated Use the object parameter style method for a better developer experience.
118
121
  */
119
- create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: ProjectKeyScopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
122
+ create(functionId: string, name: string, runtime: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: ProjectKeyScopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number, interval?: number): Promise<Models.Function>;
120
123
  /**
121
124
  * Get a list of all runtimes that are currently active on your instance.
122
125
  *
@@ -235,7 +238,7 @@ export declare class Functions {
235
238
  * @param {Runtime} params.runtime - Execution runtime.
236
239
  * @param {string[]} params.execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
237
240
  * @param {string[]} params.events - Events list. Maximum of 100 events are allowed.
238
- * @param {string} params.schedule - Schedule CRON syntax.
241
+ * @param {string} params.schedule - Schedule CRON syntax. Cannot be combined with interval.
239
242
  * @param {number} params.timeout - Maximum execution time in seconds.
240
243
  * @param {boolean} params.enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
241
244
  * @param {boolean} params.logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
@@ -252,6 +255,7 @@ export declare class Functions {
252
255
  * @param {string} params.buildSpecification - Build specification for the function deployments.
253
256
  * @param {string} params.runtimeSpecification - Runtime specification for the function executions.
254
257
  * @param {number} params.deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
258
+ * @param {number} params.interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. When omitted, the current interval is kept unless schedule is set.
255
259
  * @throws {AppwriteException}
256
260
  * @returns {Promise<Models.Function>}
257
261
  */
@@ -278,6 +282,7 @@ export declare class Functions {
278
282
  buildSpecification?: string;
279
283
  runtimeSpecification?: string;
280
284
  deploymentRetention?: number;
285
+ interval?: number;
281
286
  }): Promise<Models.Function>;
282
287
  /**
283
288
  * Update function by its unique ID.
@@ -287,7 +292,7 @@ export declare class Functions {
287
292
  * @param {Runtime} runtime - Execution runtime.
288
293
  * @param {string[]} execute - An array of role strings with execution permissions. By default no user is granted with any execute permissions. [learn more about roles](https://appwrite.io/docs/permissions#permission-roles). Maximum of 100 roles are allowed, each 64 characters long.
289
294
  * @param {string[]} events - Events list. Maximum of 100 events are allowed.
290
- * @param {string} schedule - Schedule CRON syntax.
295
+ * @param {string} schedule - Schedule CRON syntax. Cannot be combined with interval.
291
296
  * @param {number} timeout - Maximum execution time in seconds.
292
297
  * @param {boolean} enabled - Is function enabled? When set to 'disabled', users cannot access the function but Server SDKs with and API key can still access the function. No data is lost when this is toggled.
293
298
  * @param {boolean} logging - When disabled, executions will exclude logs and errors, and will be slightly faster.
@@ -304,11 +309,12 @@ export declare class Functions {
304
309
  * @param {string} buildSpecification - Build specification for the function deployments.
305
310
  * @param {string} runtimeSpecification - Runtime specification for the function executions.
306
311
  * @param {number} deploymentRetention - Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.
312
+ * @param {number} interval - Minutes between scheduled executions. Appwrite picks when within each interval the function runs. Use 0 to disable. Cannot be combined with schedule. When omitted, the current interval is kept unless schedule is set.
307
313
  * @throws {AppwriteException}
308
314
  * @returns {Promise<Models.Function>}
309
315
  * @deprecated Use the object parameter style method for a better developer experience.
310
316
  */
311
- update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: ProjectKeyScopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number): Promise<Models.Function>;
317
+ update(functionId: string, name: string, runtime?: Runtime, execute?: string[], events?: string[], schedule?: string, timeout?: number, enabled?: boolean, logging?: boolean, entrypoint?: string, commands?: string, scopes?: ProjectKeyScopes[], installationId?: string, providerRepositoryId?: string, providerBranch?: string, providerSilentMode?: boolean, providerRootDirectory?: string, providerBranches?: string[], providerPaths?: string[], buildSpecification?: string, runtimeSpecification?: string, deploymentRetention?: number, interval?: number): Promise<Models.Function>;
312
318
  /**
313
319
  * Delete a function by its unique ID.
314
320
  *
@@ -195,9 +195,10 @@ export declare class Projects {
195
195
  * @param {string} params.projectId - Project unique ID.
196
196
  * @param {ScheduleResourceType} params.resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
197
197
  * @param {string} params.resourceId - The resource ID to associate with this schedule.
198
- * @param {string} params.schedule - Schedule CRON expression.
198
+ * @param {string} params.schedule - Schedule CRON expression. Cannot be combined with interval.
199
199
  * @param {boolean} params.active - Whether the schedule is active.
200
200
  * @param {object} params.data - Schedule data as a JSON string. Used to store resource-specific context needed for execution.
201
+ * @param {number} params.interval - Minutes between runs, for function schedules only. Use 0 to disable. Cannot be combined with schedule.
201
202
  * @throws {AppwriteException}
202
203
  * @returns {Promise<Models.Schedule>}
203
204
  */
@@ -205,9 +206,10 @@ export declare class Projects {
205
206
  projectId: string;
206
207
  resourceType: ScheduleResourceType;
207
208
  resourceId: string;
208
- schedule: string;
209
+ schedule?: string;
209
210
  active?: boolean;
210
211
  data?: object;
212
+ interval?: number;
211
213
  }): Promise<Models.Schedule>;
212
214
  /**
213
215
  * Create a new schedule for a resource.
@@ -215,14 +217,15 @@ export declare class Projects {
215
217
  * @param {string} projectId - Project unique ID.
216
218
  * @param {ScheduleResourceType} resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
217
219
  * @param {string} resourceId - The resource ID to associate with this schedule.
218
- * @param {string} schedule - Schedule CRON expression.
220
+ * @param {string} schedule - Schedule CRON expression. Cannot be combined with interval.
219
221
  * @param {boolean} active - Whether the schedule is active.
220
222
  * @param {object} data - Schedule data as a JSON string. Used to store resource-specific context needed for execution.
223
+ * @param {number} interval - Minutes between runs, for function schedules only. Use 0 to disable. Cannot be combined with schedule.
221
224
  * @throws {AppwriteException}
222
225
  * @returns {Promise<Models.Schedule>}
223
226
  * @deprecated Use the object parameter style method for a better developer experience.
224
227
  */
225
- createSchedule(projectId: string, resourceType: ScheduleResourceType, resourceId: string, schedule: string, active?: boolean, data?: object): Promise<Models.Schedule>;
228
+ createSchedule(projectId: string, resourceType: ScheduleResourceType, resourceId: string, schedule?: string, active?: boolean, data?: object, interval?: number): Promise<Models.Schedule>;
226
229
  /**
227
230
  * Get a schedule by its unique ID.
228
231
  *