@appwrite.io/console 2.3.0 → 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 (56) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +2 -2
  3. package/dist/cjs/sdk.js +294 -28
  4. package/dist/cjs/sdk.js.map +1 -1
  5. package/dist/esm/sdk.js +294 -28
  6. package/dist/esm/sdk.js.map +1 -1
  7. package/dist/iife/sdk.js +347 -61
  8. package/docs/examples/activities/get-event.md +15 -0
  9. package/docs/examples/activities/list-events.md +15 -0
  10. package/docs/examples/databases/create-longtext-attribute.md +2 -1
  11. package/docs/examples/databases/create-mediumtext-attribute.md +2 -1
  12. package/docs/examples/databases/create-text-attribute.md +2 -1
  13. package/docs/examples/databases/create-varchar-attribute.md +2 -1
  14. package/docs/examples/projects/create-schedule.md +20 -0
  15. package/docs/examples/projects/get-schedule.md +16 -0
  16. package/docs/examples/projects/list-schedules.md +17 -0
  17. package/docs/examples/tablesdb/create-longtext-column.md +2 -1
  18. package/docs/examples/tablesdb/create-mediumtext-column.md +2 -1
  19. package/docs/examples/tablesdb/create-text-column.md +2 -1
  20. package/docs/examples/tablesdb/create-varchar-column.md +2 -1
  21. package/package.json +2 -3
  22. package/src/channel.ts +4 -0
  23. package/src/client.ts +11 -3
  24. package/src/enums/build-runtime.ts +20 -3
  25. package/src/enums/email-template-type.ts +4 -4
  26. package/src/enums/o-auth-provider.ts +0 -2
  27. package/src/enums/resource-type.ts +6 -0
  28. package/src/enums/runtime.ts +20 -3
  29. package/src/enums/runtimes.ts +20 -3
  30. package/src/enums/scopes.ts +2 -0
  31. package/src/enums/sms-template-type.ts +1 -1
  32. package/src/index.ts +3 -0
  33. package/src/models.ts +250 -6
  34. package/src/services/account.ts +4 -4
  35. package/src/services/activities.ts +116 -0
  36. package/src/services/databases.ts +56 -28
  37. package/src/services/migrations.ts +2 -2
  38. package/src/services/projects.ts +223 -0
  39. package/src/services/tables-db.ts +56 -28
  40. package/types/channel.d.ts +1 -0
  41. package/types/enums/build-runtime.d.ts +20 -3
  42. package/types/enums/email-template-type.d.ts +4 -4
  43. package/types/enums/o-auth-provider.d.ts +1 -3
  44. package/types/enums/resource-type.d.ts +6 -0
  45. package/types/enums/runtime.d.ts +20 -3
  46. package/types/enums/runtimes.d.ts +20 -3
  47. package/types/enums/scopes.d.ts +2 -0
  48. package/types/enums/sms-template-type.d.ts +1 -1
  49. package/types/index.d.ts +3 -0
  50. package/types/models.d.ts +246 -6
  51. package/types/services/account.d.ts +4 -4
  52. package/types/services/activities.d.ts +46 -0
  53. package/types/services/databases.d.ts +16 -4
  54. package/types/services/migrations.d.ts +2 -2
  55. package/types/services/projects.d.ts +82 -0
  56. package/types/services/tables-db.d.ts +16 -4
@@ -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
  *
@@ -1040,6 +1040,7 @@ export declare class TablesDB {
1040
1040
  * @param {boolean} params.required - Is column required?
1041
1041
  * @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
1042
1042
  * @param {boolean} params.array - Is column an array?
1043
+ * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
1043
1044
  * @throws {AppwriteException}
1044
1045
  * @returns {Promise<Models.ColumnLongtext>}
1045
1046
  */
@@ -1050,6 +1051,7 @@ export declare class TablesDB {
1050
1051
  required: boolean;
1051
1052
  xdefault?: string;
1052
1053
  array?: boolean;
1054
+ encrypt?: boolean;
1053
1055
  }): Promise<Models.ColumnLongtext>;
1054
1056
  /**
1055
1057
  * Create a longtext column.
@@ -1061,11 +1063,12 @@ export declare class TablesDB {
1061
1063
  * @param {boolean} required - Is column required?
1062
1064
  * @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
1063
1065
  * @param {boolean} array - Is column an array?
1066
+ * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
1064
1067
  * @throws {AppwriteException}
1065
1068
  * @returns {Promise<Models.ColumnLongtext>}
1066
1069
  * @deprecated Use the object parameter style method for a better developer experience.
1067
1070
  */
1068
- createLongtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnLongtext>;
1071
+ createLongtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnLongtext>;
1069
1072
  /**
1070
1073
  * Update a longtext column. Changing the `default` value will not update already existing rows.
1071
1074
  *
@@ -1112,6 +1115,7 @@ export declare class TablesDB {
1112
1115
  * @param {boolean} params.required - Is column required?
1113
1116
  * @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
1114
1117
  * @param {boolean} params.array - Is column an array?
1118
+ * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
1115
1119
  * @throws {AppwriteException}
1116
1120
  * @returns {Promise<Models.ColumnMediumtext>}
1117
1121
  */
@@ -1122,6 +1126,7 @@ export declare class TablesDB {
1122
1126
  required: boolean;
1123
1127
  xdefault?: string;
1124
1128
  array?: boolean;
1129
+ encrypt?: boolean;
1125
1130
  }): Promise<Models.ColumnMediumtext>;
1126
1131
  /**
1127
1132
  * Create a mediumtext column.
@@ -1133,11 +1138,12 @@ export declare class TablesDB {
1133
1138
  * @param {boolean} required - Is column required?
1134
1139
  * @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
1135
1140
  * @param {boolean} array - Is column an array?
1141
+ * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
1136
1142
  * @throws {AppwriteException}
1137
1143
  * @returns {Promise<Models.ColumnMediumtext>}
1138
1144
  * @deprecated Use the object parameter style method for a better developer experience.
1139
1145
  */
1140
- createMediumtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnMediumtext>;
1146
+ createMediumtextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnMediumtext>;
1141
1147
  /**
1142
1148
  * Update a mediumtext column. Changing the `default` value will not update already existing rows.
1143
1149
  *
@@ -1439,6 +1445,7 @@ export declare class TablesDB {
1439
1445
  * @param {boolean} params.required - Is column required?
1440
1446
  * @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
1441
1447
  * @param {boolean} params.array - Is column an array?
1448
+ * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
1442
1449
  * @throws {AppwriteException}
1443
1450
  * @returns {Promise<Models.ColumnText>}
1444
1451
  */
@@ -1449,6 +1456,7 @@ export declare class TablesDB {
1449
1456
  required: boolean;
1450
1457
  xdefault?: string;
1451
1458
  array?: boolean;
1459
+ encrypt?: boolean;
1452
1460
  }): Promise<Models.ColumnText>;
1453
1461
  /**
1454
1462
  * Create a text column.
@@ -1460,11 +1468,12 @@ export declare class TablesDB {
1460
1468
  * @param {boolean} required - Is column required?
1461
1469
  * @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
1462
1470
  * @param {boolean} array - Is column an array?
1471
+ * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
1463
1472
  * @throws {AppwriteException}
1464
1473
  * @returns {Promise<Models.ColumnText>}
1465
1474
  * @deprecated Use the object parameter style method for a better developer experience.
1466
1475
  */
1467
- createTextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnText>;
1476
+ createTextColumn(databaseId: string, tableId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnText>;
1468
1477
  /**
1469
1478
  * Update a text column. Changing the `default` value will not update already existing rows.
1470
1479
  *
@@ -1584,6 +1593,7 @@ export declare class TablesDB {
1584
1593
  * @param {boolean} params.required - Is column required?
1585
1594
  * @param {string} params.xdefault - Default value for column when not provided. Cannot be set when column is required.
1586
1595
  * @param {boolean} params.array - Is column an array?
1596
+ * @param {boolean} params.encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
1587
1597
  * @throws {AppwriteException}
1588
1598
  * @returns {Promise<Models.ColumnVarchar>}
1589
1599
  */
@@ -1595,6 +1605,7 @@ export declare class TablesDB {
1595
1605
  required: boolean;
1596
1606
  xdefault?: string;
1597
1607
  array?: boolean;
1608
+ encrypt?: boolean;
1598
1609
  }): Promise<Models.ColumnVarchar>;
1599
1610
  /**
1600
1611
  * Create a varchar column.
@@ -1607,11 +1618,12 @@ export declare class TablesDB {
1607
1618
  * @param {boolean} required - Is column required?
1608
1619
  * @param {string} xdefault - Default value for column when not provided. Cannot be set when column is required.
1609
1620
  * @param {boolean} array - Is column an array?
1621
+ * @param {boolean} encrypt - Toggle encryption for the column. Encryption enhances security by not storing any plain text values in the database. However, encrypted columns cannot be queried.
1610
1622
  * @throws {AppwriteException}
1611
1623
  * @returns {Promise<Models.ColumnVarchar>}
1612
1624
  * @deprecated Use the object parameter style method for a better developer experience.
1613
1625
  */
1614
- createVarcharColumn(databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.ColumnVarchar>;
1626
+ createVarcharColumn(databaseId: string, tableId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.ColumnVarchar>;
1615
1627
  /**
1616
1628
  * Update a varchar column. Changing the `default` value will not update already existing rows.
1617
1629
  *