@appwrite.io/console 2.3.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +199 -11
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +200 -11
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +252 -44
  8. package/docs/examples/projects/create-schedule.md +20 -0
  9. package/docs/examples/projects/get-schedule.md +16 -0
  10. package/docs/examples/projects/list-schedules.md +17 -0
  11. package/package.json +2 -3
  12. package/src/channel.ts +4 -0
  13. package/src/client.ts +11 -3
  14. package/src/enums/build-runtime.ts +20 -0
  15. package/src/enums/email-template-type.ts +4 -4
  16. package/src/enums/o-auth-provider.ts +0 -2
  17. package/src/enums/resource-type.ts +6 -0
  18. package/src/enums/runtime.ts +20 -0
  19. package/src/enums/runtimes.ts +20 -0
  20. package/src/enums/scopes.ts +2 -0
  21. package/src/enums/sms-template-type.ts +1 -1
  22. package/src/index.ts +2 -0
  23. package/src/models.ts +68 -4
  24. package/src/services/account.ts +4 -4
  25. package/src/services/projects.ts +223 -0
  26. package/types/channel.d.ts +1 -0
  27. package/types/enums/build-runtime.d.ts +20 -0
  28. package/types/enums/email-template-type.d.ts +4 -4
  29. package/types/enums/o-auth-provider.d.ts +1 -3
  30. package/types/enums/resource-type.d.ts +6 -0
  31. package/types/enums/runtime.d.ts +20 -0
  32. package/types/enums/runtimes.d.ts +20 -0
  33. package/types/enums/scopes.d.ts +2 -0
  34. package/types/enums/sms-template-type.d.ts +1 -1
  35. package/types/index.d.ts +2 -0
  36. package/types/models.d.ts +66 -4
  37. package/types/services/account.d.ts +4 -4
  38. package/types/services/projects.d.ts +82 -0
@@ -6,6 +6,7 @@ import { AuthMethod } from '../enums/auth-method';
6
6
  import { Scopes } from '../enums/scopes';
7
7
  import { OAuthProvider } from '../enums/o-auth-provider';
8
8
  import { PlatformType } from '../enums/platform-type';
9
+ import { ResourceType } from '../enums/resource-type';
9
10
  import { ApiService } from '../enums/api-service';
10
11
  import { SMTPSecure } from '../enums/smtp-secure';
11
12
  import { EmailTemplateType } from '../enums/email-template-type';
@@ -991,6 +992,87 @@ export declare class Projects {
991
992
  * @deprecated Use the object parameter style method for a better developer experience.
992
993
  */
993
994
  deletePlatform(projectId: string, platformId: string): Promise<{}>;
995
+ /**
996
+ * Get a list of all the project's schedules. You can use the query params to filter your results.
997
+ *
998
+ * @param {string} params.projectId - Project unique ID.
999
+ * @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: resourceType, resourceId, projectId, schedule, active, region
1000
+ * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
1001
+ * @throws {AppwriteException}
1002
+ * @returns {Promise<Models.ScheduleList>}
1003
+ */
1004
+ listSchedules(params: {
1005
+ projectId: string;
1006
+ queries?: string[];
1007
+ total?: boolean;
1008
+ }): Promise<Models.ScheduleList>;
1009
+ /**
1010
+ * Get a list of all the project's schedules. You can use the query params to filter your results.
1011
+ *
1012
+ * @param {string} projectId - Project unique ID.
1013
+ * @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: resourceType, resourceId, projectId, schedule, active, region
1014
+ * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
1015
+ * @throws {AppwriteException}
1016
+ * @returns {Promise<Models.ScheduleList>}
1017
+ * @deprecated Use the object parameter style method for a better developer experience.
1018
+ */
1019
+ listSchedules(projectId: string, queries?: string[], total?: boolean): Promise<Models.ScheduleList>;
1020
+ /**
1021
+ * Create a new schedule for a resource.
1022
+ *
1023
+ * @param {string} params.projectId - Project unique ID.
1024
+ * @param {ResourceType} params.resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
1025
+ * @param {string} params.resourceId - The resource ID to associate with this schedule.
1026
+ * @param {string} params.schedule - Schedule CRON expression.
1027
+ * @param {boolean} params.active - Whether the schedule is active.
1028
+ * @param {object} params.data - Schedule data as a JSON string. Used to store resource-specific context needed for execution.
1029
+ * @throws {AppwriteException}
1030
+ * @returns {Promise<Models.Schedule>}
1031
+ */
1032
+ createSchedule(params: {
1033
+ projectId: string;
1034
+ resourceType: ResourceType;
1035
+ resourceId: string;
1036
+ schedule: string;
1037
+ active?: boolean;
1038
+ data?: object;
1039
+ }): Promise<Models.Schedule>;
1040
+ /**
1041
+ * Create a new schedule for a resource.
1042
+ *
1043
+ * @param {string} projectId - Project unique ID.
1044
+ * @param {ResourceType} resourceType - The resource type for the schedule. Possible values: function, execution, message, backup.
1045
+ * @param {string} resourceId - The resource ID to associate with this schedule.
1046
+ * @param {string} schedule - Schedule CRON expression.
1047
+ * @param {boolean} active - Whether the schedule is active.
1048
+ * @param {object} data - Schedule data as a JSON string. Used to store resource-specific context needed for execution.
1049
+ * @throws {AppwriteException}
1050
+ * @returns {Promise<Models.Schedule>}
1051
+ * @deprecated Use the object parameter style method for a better developer experience.
1052
+ */
1053
+ createSchedule(projectId: string, resourceType: ResourceType, resourceId: string, schedule: string, active?: boolean, data?: object): Promise<Models.Schedule>;
1054
+ /**
1055
+ * Get a schedule by its unique ID.
1056
+ *
1057
+ * @param {string} params.projectId - Project unique ID.
1058
+ * @param {string} params.scheduleId - Schedule ID.
1059
+ * @throws {AppwriteException}
1060
+ * @returns {Promise<Models.Schedule>}
1061
+ */
1062
+ getSchedule(params: {
1063
+ projectId: string;
1064
+ scheduleId: string;
1065
+ }): Promise<Models.Schedule>;
1066
+ /**
1067
+ * Get a schedule by its unique ID.
1068
+ *
1069
+ * @param {string} projectId - Project unique ID.
1070
+ * @param {string} scheduleId - Schedule ID.
1071
+ * @throws {AppwriteException}
1072
+ * @returns {Promise<Models.Schedule>}
1073
+ * @deprecated Use the object parameter style method for a better developer experience.
1074
+ */
1075
+ getSchedule(projectId: string, scheduleId: string): Promise<Models.Schedule>;
994
1076
  /**
995
1077
  * Update the status of a specific service. Use this endpoint to enable or disable a service in your project.
996
1078
  *