node-appwrite 22.0.0 → 22.1.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 (97) hide show
  1. package/dist/client.js +6 -5
  2. package/dist/client.js.map +1 -1
  3. package/dist/client.mjs +6 -1477
  4. package/dist/client.mjs.map +1 -1
  5. package/dist/enums/backup-services.d.mts +7 -0
  6. package/dist/enums/backup-services.d.ts +7 -0
  7. package/dist/enums/backup-services.js +12 -0
  8. package/dist/enums/backup-services.js.map +1 -0
  9. package/dist/enums/backup-services.mjs +11 -0
  10. package/dist/enums/backup-services.mjs.map +1 -0
  11. package/dist/enums/build-runtime.d.mts +23 -4
  12. package/dist/enums/build-runtime.d.ts +23 -4
  13. package/dist/enums/build-runtime.js +22 -3
  14. package/dist/enums/build-runtime.js.map +1 -1
  15. package/dist/enums/build-runtime.mjs +22 -3
  16. package/dist/enums/build-runtime.mjs.map +1 -1
  17. package/dist/enums/runtime.d.mts +23 -4
  18. package/dist/enums/runtime.d.ts +23 -4
  19. package/dist/enums/runtime.js +22 -3
  20. package/dist/enums/runtime.js.map +1 -1
  21. package/dist/enums/runtime.mjs +22 -3
  22. package/dist/enums/runtime.mjs.map +1 -1
  23. package/dist/enums/scopes.d.mts +12 -1
  24. package/dist/enums/scopes.d.ts +12 -1
  25. package/dist/enums/scopes.js +11 -0
  26. package/dist/enums/scopes.js.map +1 -1
  27. package/dist/enums/scopes.mjs +11 -0
  28. package/dist/enums/scopes.mjs.map +1 -1
  29. package/dist/index.d.mts +3 -1
  30. package/dist/index.d.ts +3 -1
  31. package/dist/index.js +15 -5
  32. package/dist/index.js.map +1 -1
  33. package/dist/index.mjs +3 -1
  34. package/dist/index.mjs.map +1 -1
  35. package/dist/models.d.mts +396 -4
  36. package/dist/models.d.ts +396 -4
  37. package/dist/query.d.mts +22 -0
  38. package/dist/query.d.ts +22 -0
  39. package/dist/query.js +22 -0
  40. package/dist/query.js.map +1 -1
  41. package/dist/query.mjs +22 -0
  42. package/dist/query.mjs.map +1 -1
  43. package/dist/services/account.js +3 -3
  44. package/dist/services/account.js.map +1 -1
  45. package/dist/services/account.mjs +3 -3
  46. package/dist/services/account.mjs.map +1 -1
  47. package/dist/services/activities.d.mts +60 -0
  48. package/dist/services/activities.d.ts +60 -0
  49. package/dist/services/activities.js +61 -0
  50. package/dist/services/activities.js.map +1 -0
  51. package/dist/services/activities.mjs +60 -0
  52. package/dist/services/activities.mjs.map +1 -0
  53. package/dist/services/avatars.js +3 -3
  54. package/dist/services/avatars.js.map +1 -1
  55. package/dist/services/avatars.mjs +3 -3
  56. package/dist/services/avatars.mjs.map +1 -1
  57. package/dist/services/backups.d.mts +291 -0
  58. package/dist/services/backups.d.ts +291 -0
  59. package/dist/services/backups.js +404 -0
  60. package/dist/services/backups.js.map +1 -0
  61. package/dist/services/backups.mjs +403 -0
  62. package/dist/services/backups.mjs.map +1 -0
  63. package/dist/services/databases.d.mts +16 -4
  64. package/dist/services/databases.d.ts +16 -4
  65. package/dist/services/databases.js +24 -4
  66. package/dist/services/databases.js.map +1 -1
  67. package/dist/services/databases.mjs +24 -4
  68. package/dist/services/databases.mjs.map +1 -1
  69. package/dist/services/graphql.js.map +1 -1
  70. package/dist/services/graphql.mjs.map +1 -1
  71. package/dist/services/health.d.mts +95 -0
  72. package/dist/services/health.d.ts +95 -0
  73. package/dist/services/health.js +121 -1
  74. package/dist/services/health.js.map +1 -1
  75. package/dist/services/health.mjs +121 -1
  76. package/dist/services/health.mjs.map +1 -1
  77. package/dist/services/storage.d.mts +4 -4
  78. package/dist/services/storage.d.ts +4 -4
  79. package/dist/services/storage.js.map +1 -1
  80. package/dist/services/storage.mjs.map +1 -1
  81. package/dist/services/tables-db.d.mts +16 -4
  82. package/dist/services/tables-db.d.ts +16 -4
  83. package/dist/services/tables-db.js +24 -4
  84. package/dist/services/tables-db.js.map +1 -1
  85. package/dist/services/tables-db.mjs +24 -4
  86. package/dist/services/tables-db.mjs.map +1 -1
  87. package/dist/services/teams.d.mts +8 -9
  88. package/dist/services/teams.d.ts +8 -9
  89. package/dist/services/teams.js.map +1 -1
  90. package/dist/services/teams.mjs.map +1 -1
  91. package/package.json +1 -1
  92. package/dist/enums/roles.d.mts +0 -7
  93. package/dist/enums/roles.d.ts +0 -7
  94. package/dist/enums/roles.js +0 -12
  95. package/dist/enums/roles.js.map +0 -1
  96. package/dist/enums/roles.mjs +0 -11
  97. package/dist/enums/roles.mjs.map +0 -1
@@ -1061,6 +1061,7 @@ declare class Databases {
1061
1061
  * @param {boolean} params.required - Is attribute required?
1062
1062
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1063
1063
  * @param {boolean} params.array - Is attribute an array?
1064
+ * @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.
1064
1065
  * @throws {AppwriteException}
1065
1066
  * @returns {Promise<Models.AttributeLongtext>}
1066
1067
  */
@@ -1071,6 +1072,7 @@ declare class Databases {
1071
1072
  required: boolean;
1072
1073
  xdefault?: string;
1073
1074
  array?: boolean;
1075
+ encrypt?: boolean;
1074
1076
  }): Promise<Models.AttributeLongtext>;
1075
1077
  /**
1076
1078
  * Create a longtext attribute.
@@ -1082,11 +1084,12 @@ declare class Databases {
1082
1084
  * @param {boolean} required - Is attribute required?
1083
1085
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1084
1086
  * @param {boolean} array - Is attribute an array?
1087
+ * @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.
1085
1088
  * @throws {AppwriteException}
1086
1089
  * @returns {Promise<Models.AttributeLongtext>}
1087
1090
  * @deprecated Use the object parameter style method for a better developer experience.
1088
1091
  */
1089
- createLongtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeLongtext>;
1092
+ createLongtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeLongtext>;
1090
1093
  /**
1091
1094
  * Update a longtext attribute. Changing the `default` value will not update already existing documents.
1092
1095
  *
@@ -1133,6 +1136,7 @@ declare class Databases {
1133
1136
  * @param {boolean} params.required - Is attribute required?
1134
1137
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1135
1138
  * @param {boolean} params.array - Is attribute an array?
1139
+ * @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.
1136
1140
  * @throws {AppwriteException}
1137
1141
  * @returns {Promise<Models.AttributeMediumtext>}
1138
1142
  */
@@ -1143,6 +1147,7 @@ declare class Databases {
1143
1147
  required: boolean;
1144
1148
  xdefault?: string;
1145
1149
  array?: boolean;
1150
+ encrypt?: boolean;
1146
1151
  }): Promise<Models.AttributeMediumtext>;
1147
1152
  /**
1148
1153
  * Create a mediumtext attribute.
@@ -1154,11 +1159,12 @@ declare class Databases {
1154
1159
  * @param {boolean} required - Is attribute required?
1155
1160
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1156
1161
  * @param {boolean} array - Is attribute an array?
1162
+ * @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.
1157
1163
  * @throws {AppwriteException}
1158
1164
  * @returns {Promise<Models.AttributeMediumtext>}
1159
1165
  * @deprecated Use the object parameter style method for a better developer experience.
1160
1166
  */
1161
- createMediumtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeMediumtext>;
1167
+ createMediumtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeMediumtext>;
1162
1168
  /**
1163
1169
  * Update a mediumtext attribute. Changing the `default` value will not update already existing documents.
1164
1170
  *
@@ -1465,6 +1471,7 @@ declare class Databases {
1465
1471
  * @param {boolean} params.required - Is attribute required?
1466
1472
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1467
1473
  * @param {boolean} params.array - Is attribute an array?
1474
+ * @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.
1468
1475
  * @throws {AppwriteException}
1469
1476
  * @returns {Promise<Models.AttributeText>}
1470
1477
  */
@@ -1475,6 +1482,7 @@ declare class Databases {
1475
1482
  required: boolean;
1476
1483
  xdefault?: string;
1477
1484
  array?: boolean;
1485
+ encrypt?: boolean;
1478
1486
  }): Promise<Models.AttributeText>;
1479
1487
  /**
1480
1488
  * Create a text attribute.
@@ -1486,11 +1494,12 @@ declare class Databases {
1486
1494
  * @param {boolean} required - Is attribute required?
1487
1495
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1488
1496
  * @param {boolean} array - Is attribute an array?
1497
+ * @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.
1489
1498
  * @throws {AppwriteException}
1490
1499
  * @returns {Promise<Models.AttributeText>}
1491
1500
  * @deprecated Use the object parameter style method for a better developer experience.
1492
1501
  */
1493
- createTextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeText>;
1502
+ createTextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeText>;
1494
1503
  /**
1495
1504
  * Update a text attribute. Changing the `default` value will not update already existing documents.
1496
1505
  *
@@ -1612,6 +1621,7 @@ declare class Databases {
1612
1621
  * @param {boolean} params.required - Is attribute required?
1613
1622
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1614
1623
  * @param {boolean} params.array - Is attribute an array?
1624
+ * @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.
1615
1625
  * @throws {AppwriteException}
1616
1626
  * @returns {Promise<Models.AttributeVarchar>}
1617
1627
  */
@@ -1623,6 +1633,7 @@ declare class Databases {
1623
1633
  required: boolean;
1624
1634
  xdefault?: string;
1625
1635
  array?: boolean;
1636
+ encrypt?: boolean;
1626
1637
  }): Promise<Models.AttributeVarchar>;
1627
1638
  /**
1628
1639
  * Create a varchar attribute.
@@ -1635,11 +1646,12 @@ declare class Databases {
1635
1646
  * @param {boolean} required - Is attribute required?
1636
1647
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1637
1648
  * @param {boolean} array - Is attribute an array?
1649
+ * @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.
1638
1650
  * @throws {AppwriteException}
1639
1651
  * @returns {Promise<Models.AttributeVarchar>}
1640
1652
  * @deprecated Use the object parameter style method for a better developer experience.
1641
1653
  */
1642
- createVarcharAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeVarchar>;
1654
+ createVarcharAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeVarchar>;
1643
1655
  /**
1644
1656
  * Update a varchar attribute. Changing the `default` value will not update already existing documents.
1645
1657
  *
@@ -1061,6 +1061,7 @@ declare class Databases {
1061
1061
  * @param {boolean} params.required - Is attribute required?
1062
1062
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1063
1063
  * @param {boolean} params.array - Is attribute an array?
1064
+ * @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.
1064
1065
  * @throws {AppwriteException}
1065
1066
  * @returns {Promise<Models.AttributeLongtext>}
1066
1067
  */
@@ -1071,6 +1072,7 @@ declare class Databases {
1071
1072
  required: boolean;
1072
1073
  xdefault?: string;
1073
1074
  array?: boolean;
1075
+ encrypt?: boolean;
1074
1076
  }): Promise<Models.AttributeLongtext>;
1075
1077
  /**
1076
1078
  * Create a longtext attribute.
@@ -1082,11 +1084,12 @@ declare class Databases {
1082
1084
  * @param {boolean} required - Is attribute required?
1083
1085
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1084
1086
  * @param {boolean} array - Is attribute an array?
1087
+ * @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.
1085
1088
  * @throws {AppwriteException}
1086
1089
  * @returns {Promise<Models.AttributeLongtext>}
1087
1090
  * @deprecated Use the object parameter style method for a better developer experience.
1088
1091
  */
1089
- createLongtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeLongtext>;
1092
+ createLongtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeLongtext>;
1090
1093
  /**
1091
1094
  * Update a longtext attribute. Changing the `default` value will not update already existing documents.
1092
1095
  *
@@ -1133,6 +1136,7 @@ declare class Databases {
1133
1136
  * @param {boolean} params.required - Is attribute required?
1134
1137
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1135
1138
  * @param {boolean} params.array - Is attribute an array?
1139
+ * @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.
1136
1140
  * @throws {AppwriteException}
1137
1141
  * @returns {Promise<Models.AttributeMediumtext>}
1138
1142
  */
@@ -1143,6 +1147,7 @@ declare class Databases {
1143
1147
  required: boolean;
1144
1148
  xdefault?: string;
1145
1149
  array?: boolean;
1150
+ encrypt?: boolean;
1146
1151
  }): Promise<Models.AttributeMediumtext>;
1147
1152
  /**
1148
1153
  * Create a mediumtext attribute.
@@ -1154,11 +1159,12 @@ declare class Databases {
1154
1159
  * @param {boolean} required - Is attribute required?
1155
1160
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1156
1161
  * @param {boolean} array - Is attribute an array?
1162
+ * @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.
1157
1163
  * @throws {AppwriteException}
1158
1164
  * @returns {Promise<Models.AttributeMediumtext>}
1159
1165
  * @deprecated Use the object parameter style method for a better developer experience.
1160
1166
  */
1161
- createMediumtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeMediumtext>;
1167
+ createMediumtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeMediumtext>;
1162
1168
  /**
1163
1169
  * Update a mediumtext attribute. Changing the `default` value will not update already existing documents.
1164
1170
  *
@@ -1465,6 +1471,7 @@ declare class Databases {
1465
1471
  * @param {boolean} params.required - Is attribute required?
1466
1472
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1467
1473
  * @param {boolean} params.array - Is attribute an array?
1474
+ * @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.
1468
1475
  * @throws {AppwriteException}
1469
1476
  * @returns {Promise<Models.AttributeText>}
1470
1477
  */
@@ -1475,6 +1482,7 @@ declare class Databases {
1475
1482
  required: boolean;
1476
1483
  xdefault?: string;
1477
1484
  array?: boolean;
1485
+ encrypt?: boolean;
1478
1486
  }): Promise<Models.AttributeText>;
1479
1487
  /**
1480
1488
  * Create a text attribute.
@@ -1486,11 +1494,12 @@ declare class Databases {
1486
1494
  * @param {boolean} required - Is attribute required?
1487
1495
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1488
1496
  * @param {boolean} array - Is attribute an array?
1497
+ * @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.
1489
1498
  * @throws {AppwriteException}
1490
1499
  * @returns {Promise<Models.AttributeText>}
1491
1500
  * @deprecated Use the object parameter style method for a better developer experience.
1492
1501
  */
1493
- createTextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeText>;
1502
+ createTextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeText>;
1494
1503
  /**
1495
1504
  * Update a text attribute. Changing the `default` value will not update already existing documents.
1496
1505
  *
@@ -1612,6 +1621,7 @@ declare class Databases {
1612
1621
  * @param {boolean} params.required - Is attribute required?
1613
1622
  * @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1614
1623
  * @param {boolean} params.array - Is attribute an array?
1624
+ * @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.
1615
1625
  * @throws {AppwriteException}
1616
1626
  * @returns {Promise<Models.AttributeVarchar>}
1617
1627
  */
@@ -1623,6 +1633,7 @@ declare class Databases {
1623
1633
  required: boolean;
1624
1634
  xdefault?: string;
1625
1635
  array?: boolean;
1636
+ encrypt?: boolean;
1626
1637
  }): Promise<Models.AttributeVarchar>;
1627
1638
  /**
1628
1639
  * Create a varchar attribute.
@@ -1635,11 +1646,12 @@ declare class Databases {
1635
1646
  * @param {boolean} required - Is attribute required?
1636
1647
  * @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
1637
1648
  * @param {boolean} array - Is attribute an array?
1649
+ * @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.
1638
1650
  * @throws {AppwriteException}
1639
1651
  * @returns {Promise<Models.AttributeVarchar>}
1640
1652
  * @deprecated Use the object parameter style method for a better developer experience.
1641
1653
  */
1642
- createVarcharAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeVarchar>;
1654
+ createVarcharAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeVarchar>;
1643
1655
  /**
1644
1656
  * Update a varchar attribute. Changing the `default` value will not update already existing documents.
1645
1657
  *
@@ -1562,7 +1562,8 @@ class Databases {
1562
1562
  key: rest[1],
1563
1563
  required: rest[2],
1564
1564
  xdefault: rest[3],
1565
- array: rest[4]
1565
+ array: rest[4],
1566
+ encrypt: rest[5]
1566
1567
  };
1567
1568
  }
1568
1569
  const databaseId = params.databaseId;
@@ -1571,6 +1572,7 @@ class Databases {
1571
1572
  const required = params.required;
1572
1573
  const xdefault = params.xdefault;
1573
1574
  const array = params.array;
1575
+ const encrypt = params.encrypt;
1574
1576
  if (typeof databaseId === "undefined") {
1575
1577
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
1576
1578
  }
@@ -1597,6 +1599,9 @@ class Databases {
1597
1599
  if (typeof array !== "undefined") {
1598
1600
  payload["array"] = array;
1599
1601
  }
1602
+ if (typeof encrypt !== "undefined") {
1603
+ payload["encrypt"] = encrypt;
1604
+ }
1600
1605
  const uri = new URL(this.client.config.endpoint + apiPath);
1601
1606
  const apiHeaders = {
1602
1607
  "content-type": "application/json"
@@ -1676,7 +1681,8 @@ class Databases {
1676
1681
  key: rest[1],
1677
1682
  required: rest[2],
1678
1683
  xdefault: rest[3],
1679
- array: rest[4]
1684
+ array: rest[4],
1685
+ encrypt: rest[5]
1680
1686
  };
1681
1687
  }
1682
1688
  const databaseId = params.databaseId;
@@ -1685,6 +1691,7 @@ class Databases {
1685
1691
  const required = params.required;
1686
1692
  const xdefault = params.xdefault;
1687
1693
  const array = params.array;
1694
+ const encrypt = params.encrypt;
1688
1695
  if (typeof databaseId === "undefined") {
1689
1696
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
1690
1697
  }
@@ -1711,6 +1718,9 @@ class Databases {
1711
1718
  if (typeof array !== "undefined") {
1712
1719
  payload["array"] = array;
1713
1720
  }
1721
+ if (typeof encrypt !== "undefined") {
1722
+ payload["encrypt"] = encrypt;
1723
+ }
1714
1724
  const uri = new URL(this.client.config.endpoint + apiPath);
1715
1725
  const apiHeaders = {
1716
1726
  "content-type": "application/json"
@@ -2201,7 +2211,8 @@ class Databases {
2201
2211
  key: rest[1],
2202
2212
  required: rest[2],
2203
2213
  xdefault: rest[3],
2204
- array: rest[4]
2214
+ array: rest[4],
2215
+ encrypt: rest[5]
2205
2216
  };
2206
2217
  }
2207
2218
  const databaseId = params.databaseId;
@@ -2210,6 +2221,7 @@ class Databases {
2210
2221
  const required = params.required;
2211
2222
  const xdefault = params.xdefault;
2212
2223
  const array = params.array;
2224
+ const encrypt = params.encrypt;
2213
2225
  if (typeof databaseId === "undefined") {
2214
2226
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
2215
2227
  }
@@ -2236,6 +2248,9 @@ class Databases {
2236
2248
  if (typeof array !== "undefined") {
2237
2249
  payload["array"] = array;
2238
2250
  }
2251
+ if (typeof encrypt !== "undefined") {
2252
+ payload["encrypt"] = encrypt;
2253
+ }
2239
2254
  const uri = new URL(this.client.config.endpoint + apiPath);
2240
2255
  const apiHeaders = {
2241
2256
  "content-type": "application/json"
@@ -2430,7 +2445,8 @@ class Databases {
2430
2445
  size: rest[2],
2431
2446
  required: rest[3],
2432
2447
  xdefault: rest[4],
2433
- array: rest[5]
2448
+ array: rest[5],
2449
+ encrypt: rest[6]
2434
2450
  };
2435
2451
  }
2436
2452
  const databaseId = params.databaseId;
@@ -2440,6 +2456,7 @@ class Databases {
2440
2456
  const required = params.required;
2441
2457
  const xdefault = params.xdefault;
2442
2458
  const array = params.array;
2459
+ const encrypt = params.encrypt;
2443
2460
  if (typeof databaseId === "undefined") {
2444
2461
  throw new client.AppwriteException('Missing required parameter: "databaseId"');
2445
2462
  }
@@ -2472,6 +2489,9 @@ class Databases {
2472
2489
  if (typeof array !== "undefined") {
2473
2490
  payload["array"] = array;
2474
2491
  }
2492
+ if (typeof encrypt !== "undefined") {
2493
+ payload["encrypt"] = encrypt;
2494
+ }
2475
2495
  const uri = new URL(this.client.config.endpoint + apiPath);
2476
2496
  const apiHeaders = {
2477
2497
  "content-type": "application/json"