@appwrite.io/console 2.3.0 → 2.3.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.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/sdk.js +96 -18
  3. package/dist/cjs/sdk.js.map +1 -1
  4. package/dist/esm/sdk.js +96 -19
  5. package/dist/esm/sdk.js.map +1 -1
  6. package/dist/iife/sdk.js +96 -18
  7. package/docs/examples/activities/get-event.md +15 -0
  8. package/docs/examples/activities/list-events.md +15 -0
  9. package/docs/examples/databases/create-longtext-attribute.md +2 -1
  10. package/docs/examples/databases/create-mediumtext-attribute.md +2 -1
  11. package/docs/examples/databases/create-text-attribute.md +2 -1
  12. package/docs/examples/databases/create-varchar-attribute.md +2 -1
  13. package/docs/examples/tablesdb/create-longtext-column.md +2 -1
  14. package/docs/examples/tablesdb/create-mediumtext-column.md +2 -1
  15. package/docs/examples/tablesdb/create-text-column.md +2 -1
  16. package/docs/examples/tablesdb/create-varchar-column.md +2 -1
  17. package/package.json +1 -1
  18. package/src/client.ts +1 -1
  19. package/src/enums/build-runtime.ts +0 -3
  20. package/src/enums/runtime.ts +0 -3
  21. package/src/enums/runtimes.ts +0 -3
  22. package/src/index.ts +1 -0
  23. package/src/models.ts +182 -2
  24. package/src/services/activities.ts +116 -0
  25. package/src/services/databases.ts +56 -28
  26. package/src/services/migrations.ts +2 -2
  27. package/src/services/tables-db.ts +56 -28
  28. package/types/enums/build-runtime.d.ts +0 -3
  29. package/types/enums/runtime.d.ts +0 -3
  30. package/types/enums/runtimes.d.ts +0 -3
  31. package/types/index.d.ts +1 -0
  32. package/types/models.d.ts +180 -2
  33. package/types/services/activities.d.ts +46 -0
  34. package/types/services/databases.d.ts +16 -4
  35. package/types/services/migrations.d.ts +2 -2
  36. package/types/services/tables-db.d.ts +16 -4
@@ -1070,6 +1070,7 @@ export declare class Databases {
1070
1070
  * @param {boolean} params.required - Is attribute required?
1071
1071
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1072
1072
  * @param {boolean} params.array - Is attribute an array?
1073
+ * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
1073
1074
  * @throws {AppwriteException}
1074
1075
  * @returns {Promise<Models.AttributeLongtext>}
1075
1076
  */
@@ -1080,6 +1081,7 @@ export declare class Databases {
1080
1081
  required: boolean;
1081
1082
  xdefault?: string;
1082
1083
  array?: boolean;
1084
+ encrypt?: boolean;
1083
1085
  }): Promise<Models.AttributeLongtext>;
1084
1086
  /**
1085
1087
  * Create a longtext attribute.
@@ -1091,11 +1093,12 @@ export declare class Databases {
1091
1093
  * @param {boolean} required - Is attribute required?
1092
1094
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1093
1095
  * @param {boolean} array - Is attribute an array?
1096
+ * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
1094
1097
  * @throws {AppwriteException}
1095
1098
  * @returns {Promise<Models.AttributeLongtext>}
1096
1099
  * @deprecated Use the object parameter style method for a better developer experience.
1097
1100
  */
1098
- createLongtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeLongtext>;
1101
+ createLongtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeLongtext>;
1099
1102
  /**
1100
1103
  * Update a longtext attribute. Changing the `default` value will not update already existing documents.
1101
1104
  *
@@ -1142,6 +1145,7 @@ export declare class Databases {
1142
1145
  * @param {boolean} params.required - Is attribute required?
1143
1146
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1144
1147
  * @param {boolean} params.array - Is attribute an array?
1148
+ * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
1145
1149
  * @throws {AppwriteException}
1146
1150
  * @returns {Promise<Models.AttributeMediumtext>}
1147
1151
  */
@@ -1152,6 +1156,7 @@ export declare class Databases {
1152
1156
  required: boolean;
1153
1157
  xdefault?: string;
1154
1158
  array?: boolean;
1159
+ encrypt?: boolean;
1155
1160
  }): Promise<Models.AttributeMediumtext>;
1156
1161
  /**
1157
1162
  * Create a mediumtext attribute.
@@ -1163,11 +1168,12 @@ export declare class Databases {
1163
1168
  * @param {boolean} required - Is attribute required?
1164
1169
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1165
1170
  * @param {boolean} array - Is attribute an array?
1171
+ * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
1166
1172
  * @throws {AppwriteException}
1167
1173
  * @returns {Promise<Models.AttributeMediumtext>}
1168
1174
  * @deprecated Use the object parameter style method for a better developer experience.
1169
1175
  */
1170
- createMediumtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeMediumtext>;
1176
+ createMediumtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeMediumtext>;
1171
1177
  /**
1172
1178
  * Update a mediumtext attribute. Changing the `default` value will not update already existing documents.
1173
1179
  *
@@ -1474,6 +1480,7 @@ export declare class Databases {
1474
1480
  * @param {boolean} params.required - Is attribute required?
1475
1481
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1476
1482
  * @param {boolean} params.array - Is attribute an array?
1483
+ * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
1477
1484
  * @throws {AppwriteException}
1478
1485
  * @returns {Promise<Models.AttributeText>}
1479
1486
  */
@@ -1484,6 +1491,7 @@ export declare class Databases {
1484
1491
  required: boolean;
1485
1492
  xdefault?: string;
1486
1493
  array?: boolean;
1494
+ encrypt?: boolean;
1487
1495
  }): Promise<Models.AttributeText>;
1488
1496
  /**
1489
1497
  * Create a text attribute.
@@ -1495,11 +1503,12 @@ export declare class Databases {
1495
1503
  * @param {boolean} required - Is attribute required?
1496
1504
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1497
1505
  * @param {boolean} array - Is attribute an array?
1506
+ * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
1498
1507
  * @throws {AppwriteException}
1499
1508
  * @returns {Promise<Models.AttributeText>}
1500
1509
  * @deprecated Use the object parameter style method for a better developer experience.
1501
1510
  */
1502
- createTextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeText>;
1511
+ createTextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeText>;
1503
1512
  /**
1504
1513
  * Update a text attribute. Changing the `default` value will not update already existing documents.
1505
1514
  *
@@ -1621,6 +1630,7 @@ export declare class Databases {
1621
1630
  * @param {boolean} params.required - Is attribute required?
1622
1631
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1623
1632
  * @param {boolean} params.array - Is attribute an array?
1633
+ * @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
1624
1634
  * @throws {AppwriteException}
1625
1635
  * @returns {Promise<Models.AttributeVarchar>}
1626
1636
  */
@@ -1632,6 +1642,7 @@ export declare class Databases {
1632
1642
  required: boolean;
1633
1643
  xdefault?: string;
1634
1644
  array?: boolean;
1645
+ encrypt?: boolean;
1635
1646
  }): Promise<Models.AttributeVarchar>;
1636
1647
  /**
1637
1648
  * Create a varchar attribute.
@@ -1644,11 +1655,12 @@ export declare class Databases {
1644
1655
  * @param {boolean} required - Is attribute required?
1645
1656
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1646
1657
  * @param {boolean} array - Is attribute an array?
1658
+ * @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
1647
1659
  * @throws {AppwriteException}
1648
1660
  * @returns {Promise<Models.AttributeVarchar>}
1649
1661
  * @deprecated Use the object parameter style method for a better developer experience.
1650
1662
  */
1651
- createVarcharAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeVarchar>;
1663
+ createVarcharAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeVarchar>;
1652
1664
  /**
1653
1665
  * Update a varchar attribute. Changing the `default` value will not update already existing documents.
1654
1666
  *
@@ -7,7 +7,7 @@ export declare class Migrations {
7
7
  /**
8
8
  * List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.
9
9
  *
10
- * @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors
10
+ * @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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors
11
11
  * @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
12
12
  * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
13
13
  * @throws {AppwriteException}
@@ -21,7 +21,7 @@ export declare class Migrations {
21
21
  /**
22
22
  * List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.
23
23
  *
24
- * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors
24
+ * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, resourceId, resourceType, statusCounters, resourceData, errors
25
25
  * @param {string} search - Search term to filter your list results. Max length: 256 chars.
26
26
  * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
27
27
  * @throws {AppwriteException}
@@ -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
  *