@appwrite.io/console 0.1.0 → 0.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.
package/dist/esm/sdk.js CHANGED
@@ -55,6 +55,12 @@ Query.lessThan = (attribute, value) => Query.addQuery(attribute, "lessThan", val
55
55
  Query.lessThanEqual = (attribute, value) => Query.addQuery(attribute, "lessThanEqual", value);
56
56
  Query.greaterThan = (attribute, value) => Query.addQuery(attribute, "greaterThan", value);
57
57
  Query.greaterThanEqual = (attribute, value) => Query.addQuery(attribute, "greaterThanEqual", value);
58
+ Query.isNull = (attribute) => `isNull("${attribute}")`;
59
+ Query.isNotNull = (attribute) => `isNotNull("${attribute}")`;
60
+ Query.between = (attribute, start, end) => `between("${attribute}", [${Query.parseValues(start)},${Query.parseValues(end)}])`;
61
+ Query.startsWith = (attribute, value) => Query.addQuery(attribute, "startsWith", value);
62
+ Query.endsWith = (attribute, value) => Query.addQuery(attribute, "endsWith", value);
63
+ Query.select = (attributes) => `select([${attributes.map((attr) => `"${attr}"`).join(",")}])`;
58
64
  Query.search = (attribute, value) => Query.addQuery(attribute, "search", value);
59
65
  Query.orderDesc = (attribute) => `orderDesc("${attribute}")`;
60
66
  Query.orderAsc = (attribute) => `orderAsc("${attribute}")`;
@@ -96,7 +102,7 @@ class Client {
96
102
  'x-sdk-name': 'Console',
97
103
  'x-sdk-platform': 'console',
98
104
  'x-sdk-language': 'web',
99
- 'x-sdk-version': '0.1.0',
105
+ 'x-sdk-version': '0.1.1',
100
106
  'X-Appwrite-Response-Format': '1.0.0',
101
107
  };
102
108
  this.realtime = {
@@ -1646,6 +1652,30 @@ class Avatars extends Service {
1646
1652
  }
1647
1653
  }
1648
1654
 
1655
+ class Console extends Service {
1656
+ constructor(client) {
1657
+ super(client);
1658
+ }
1659
+ /**
1660
+ * Get Variables
1661
+ *
1662
+ * Get all Environment Variables that are relevant for the console.
1663
+ *
1664
+ * @throws {AppwriteException}
1665
+ * @returns {Promise}
1666
+ */
1667
+ variables() {
1668
+ return __awaiter(this, void 0, void 0, function* () {
1669
+ let path = '/console/variables';
1670
+ let payload = {};
1671
+ const uri = new URL(this.client.config.endpoint + path);
1672
+ return yield this.client.call('get', uri, {
1673
+ 'content-type': 'application/json',
1674
+ }, payload);
1675
+ });
1676
+ }
1677
+ }
1678
+
1649
1679
  class Databases extends Service {
1650
1680
  constructor(client) {
1651
1681
  super(client);
@@ -2727,7 +2757,7 @@ class Databases extends Service {
2727
2757
  * Create Relationship Attribute
2728
2758
  *
2729
2759
  * Create relationship attribute. [Learn more about relationship
2730
- * attributes](docs/databases-relationships#relationship-attributes).
2760
+ * attributes](/docs/databases-relationships#relationship-attributes).
2731
2761
  *
2732
2762
  *
2733
2763
  * @param {string} databaseId
@@ -3040,7 +3070,7 @@ class Databases extends Service {
3040
3070
  * Update Relationship Attribute
3041
3071
  *
3042
3072
  * Update relationship attribute. [Learn more about relationship
3043
- * attributes](docs/databases-relationships#relationship-attributes).
3073
+ * attributes](/docs/databases-relationships#relationship-attributes).
3044
3074
  *
3045
3075
  *
3046
3076
  * @param {string} databaseId
@@ -7819,5 +7849,5 @@ class ID {
7819
7849
  }
7820
7850
  }
7821
7851
 
7822
- export { Account, AppwriteException, Avatars, Client, Databases, Functions, Graphql, Health, ID, Locale, Permission, Projects, Query, Role, Storage, Teams, Users };
7852
+ export { Account, AppwriteException, Avatars, Client, Console, Databases, Functions, Graphql, Health, ID, Locale, Permission, Projects, Query, Role, Storage, Teams, Users };
7823
7853
  //# sourceMappingURL=sdk.js.map