@appwrite.io/console 2.1.1 → 2.1.3
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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +311 -17
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +310 -18
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +344 -70
- package/docs/examples/domains/list-suggestions.md +18 -0
- package/docs/examples/health/get-queue-audits.md +13 -0
- package/docs/examples/organizations/create.md +2 -2
- package/docs/examples/organizations/estimation-create-organization.md +2 -2
- package/docs/examples/organizations/estimation-update-plan.md +2 -2
- package/docs/examples/organizations/update-plan.md +2 -2
- package/package.json +3 -2
- package/src/channel.ts +134 -0
- package/src/client.ts +79 -9
- package/src/enums/billing-plan.ts +17 -0
- package/src/enums/filter-type.ts +4 -0
- package/src/enums/name.ts +1 -0
- package/src/enums/o-auth-provider.ts +0 -2
- package/src/index.ts +3 -0
- package/src/models.ts +437 -375
- package/src/query.ts +42 -0
- package/src/services/account.ts +20 -20
- package/src/services/avatars.ts +117 -117
- package/src/services/backups.ts +18 -18
- package/src/services/console.ts +24 -24
- package/src/services/databases.ts +89 -89
- package/src/services/domains.ts +295 -204
- package/src/services/functions.ts +30 -30
- package/src/services/health.ts +201 -152
- package/src/services/messaging.ts +54 -54
- package/src/services/migrations.ts +36 -36
- package/src/services/organizations.ts +67 -66
- package/src/services/projects.ts +81 -81
- package/src/services/realtime.ts +35 -12
- package/src/services/sites.ts +30 -30
- package/src/services/storage.ts +45 -45
- package/src/services/tables-db.ts +89 -89
- package/src/services/users.ts +39 -39
- package/types/channel.d.ts +71 -0
- package/types/client.d.ts +11 -3
- package/types/enums/billing-plan.d.ts +17 -0
- package/types/enums/filter-type.d.ts +4 -0
- package/types/enums/name.d.ts +1 -0
- package/types/enums/o-auth-provider.d.ts +0 -2
- package/types/index.d.ts +3 -0
- package/types/models.d.ts +434 -375
- package/types/query.d.ts +30 -0
- package/types/services/account.d.ts +11 -11
- package/types/services/avatars.d.ts +82 -82
- package/types/services/backups.d.ts +8 -8
- package/types/services/console.d.ts +14 -14
- package/types/services/databases.d.ts +50 -50
- package/types/services/domains.d.ts +139 -104
- package/types/services/functions.d.ts +15 -15
- package/types/services/health.d.ts +95 -78
- package/types/services/messaging.d.ts +24 -24
- package/types/services/migrations.d.ts +16 -16
- package/types/services/organizations.d.ts +37 -36
- package/types/services/projects.d.ts +36 -36
- package/types/services/realtime.d.ts +17 -8
- package/types/services/sites.d.ts +15 -15
- package/types/services/storage.d.ts +30 -30
- package/types/services/tables-db.d.ts +50 -50
- package/types/services/users.d.ts +24 -24
package/dist/esm/sdk.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import JSONbigModule from 'json-bigint';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
2
3
|
|
|
3
4
|
/******************************************************************************
|
|
4
5
|
Copyright (c) Microsoft Corporation.
|
|
@@ -84,6 +85,14 @@ Query.equal = (attribute, value) => new Query("equal", attribute, value).toStrin
|
|
|
84
85
|
* @returns {string}
|
|
85
86
|
*/
|
|
86
87
|
Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
|
|
88
|
+
/**
|
|
89
|
+
* Filter resources where attribute matches a regular expression pattern.
|
|
90
|
+
*
|
|
91
|
+
* @param {string} attribute The attribute to filter on.
|
|
92
|
+
* @param {string} pattern The regular expression pattern to match.
|
|
93
|
+
* @returns {string}
|
|
94
|
+
*/
|
|
95
|
+
Query.regex = (attribute, pattern) => new Query("regex", attribute, pattern).toString();
|
|
87
96
|
/**
|
|
88
97
|
* Filter resources where attribute is less than value.
|
|
89
98
|
*
|
|
@@ -130,6 +139,20 @@ Query.isNull = (attribute) => new Query("isNull", attribute).toString();
|
|
|
130
139
|
* @returns {string}
|
|
131
140
|
*/
|
|
132
141
|
Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
|
|
142
|
+
/**
|
|
143
|
+
* Filter resources where the specified attributes exist.
|
|
144
|
+
*
|
|
145
|
+
* @param {string[]} attributes The list of attributes that must exist.
|
|
146
|
+
* @returns {string}
|
|
147
|
+
*/
|
|
148
|
+
Query.exists = (attributes) => new Query("exists", undefined, attributes).toString();
|
|
149
|
+
/**
|
|
150
|
+
* Filter resources where the specified attributes do not exist.
|
|
151
|
+
*
|
|
152
|
+
* @param {string[]} attributes The list of attributes that must not exist.
|
|
153
|
+
* @returns {string}
|
|
154
|
+
*/
|
|
155
|
+
Query.notExists = (attributes) => new Query("notExists", undefined, attributes).toString();
|
|
133
156
|
/**
|
|
134
157
|
* Filter resources where attribute is between start and end (inclusive).
|
|
135
158
|
*
|
|
@@ -327,6 +350,14 @@ Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSONbi
|
|
|
327
350
|
* @returns {string}
|
|
328
351
|
*/
|
|
329
352
|
Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSONbig$1.parse(query))).toString();
|
|
353
|
+
/**
|
|
354
|
+
* Filter array elements where at least one element matches all the specified queries.
|
|
355
|
+
*
|
|
356
|
+
* @param {string} attribute The attribute containing the array to filter on.
|
|
357
|
+
* @param {string[]} queries The list of query strings to match against array elements.
|
|
358
|
+
* @returns {string}
|
|
359
|
+
*/
|
|
360
|
+
Query.elemMatch = (attribute, queries) => new Query("elemMatch", attribute, queries.map((query) => JSONbig$1.parse(query))).toString();
|
|
330
361
|
/**
|
|
331
362
|
* Filter resources where attribute is at a specific distance from the given coordinates.
|
|
332
363
|
*
|
|
@@ -432,7 +463,47 @@ Query.touches = (attribute, values) => new Query("touches", attribute, [values])
|
|
|
432
463
|
*/
|
|
433
464
|
Query.notTouches = (attribute, values) => new Query("notTouches", attribute, [values]).toString();
|
|
434
465
|
|
|
435
|
-
const
|
|
466
|
+
const JSONbigParser = JSONbigModule({ storeAsString: false });
|
|
467
|
+
const JSONbigSerializer = JSONbigModule({ useNativeBigInt: true });
|
|
468
|
+
/**
|
|
469
|
+
* Converts BigNumber objects from json-bigint to native types.
|
|
470
|
+
* - Integer BigNumbers → BigInt (if unsafe) or number (if safe)
|
|
471
|
+
* - Float BigNumbers → number
|
|
472
|
+
* - Strings remain strings (never converted to BigNumber by json-bigint)
|
|
473
|
+
*/
|
|
474
|
+
const MAX_SAFE = BigInt(Number.MAX_SAFE_INTEGER);
|
|
475
|
+
const MIN_SAFE = BigInt(Number.MIN_SAFE_INTEGER);
|
|
476
|
+
function convertBigNumbers(value) {
|
|
477
|
+
if (value === null || value === undefined)
|
|
478
|
+
return value;
|
|
479
|
+
if (Array.isArray(value)) {
|
|
480
|
+
return value.map(convertBigNumbers);
|
|
481
|
+
}
|
|
482
|
+
if (BigNumber.isBigNumber(value)) {
|
|
483
|
+
if (value.isInteger()) {
|
|
484
|
+
const str = value.toFixed();
|
|
485
|
+
const bi = BigInt(str);
|
|
486
|
+
if (bi >= MIN_SAFE && bi <= MAX_SAFE) {
|
|
487
|
+
return Number(str);
|
|
488
|
+
}
|
|
489
|
+
return bi;
|
|
490
|
+
}
|
|
491
|
+
// float
|
|
492
|
+
return value.toNumber();
|
|
493
|
+
}
|
|
494
|
+
if (typeof value === 'object') {
|
|
495
|
+
const result = {};
|
|
496
|
+
for (const [k, v] of Object.entries(value)) {
|
|
497
|
+
result[k] = convertBigNumbers(v);
|
|
498
|
+
}
|
|
499
|
+
return result;
|
|
500
|
+
}
|
|
501
|
+
return value;
|
|
502
|
+
}
|
|
503
|
+
const JSONbig = {
|
|
504
|
+
parse: (text) => convertBigNumbers(JSONbigParser.parse(text)),
|
|
505
|
+
stringify: JSONbigSerializer.stringify
|
|
506
|
+
};
|
|
436
507
|
/**
|
|
437
508
|
* Exception thrown by the package
|
|
438
509
|
*/
|
|
@@ -482,7 +553,7 @@ class Client {
|
|
|
482
553
|
'x-sdk-name': 'Console',
|
|
483
554
|
'x-sdk-platform': 'console',
|
|
484
555
|
'x-sdk-language': 'web',
|
|
485
|
-
'x-sdk-version': '2.1.
|
|
556
|
+
'x-sdk-version': '2.1.3',
|
|
486
557
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
487
558
|
};
|
|
488
559
|
this.realtime = {
|
|
@@ -784,8 +855,8 @@ class Client {
|
|
|
784
855
|
* @deprecated Use the Realtime service instead.
|
|
785
856
|
* @see Realtime
|
|
786
857
|
*
|
|
787
|
-
* @param {string|string[]} channels
|
|
788
|
-
* Channel to subscribe - pass a single channel as a string or multiple with an array
|
|
858
|
+
* @param {string|string[]|Channel<any>|ActionableChannel|ResolvedChannel|(Channel<any>|ActionableChannel|ResolvedChannel)[]} channels
|
|
859
|
+
* Channel to subscribe - pass a single channel as a string or Channel builder instance, or multiple with an array.
|
|
789
860
|
*
|
|
790
861
|
* Possible channels are:
|
|
791
862
|
* - account
|
|
@@ -803,21 +874,40 @@ class Client {
|
|
|
803
874
|
* - teams.[ID]
|
|
804
875
|
* - memberships
|
|
805
876
|
* - memberships.[ID]
|
|
877
|
+
*
|
|
878
|
+
* You can also use Channel builders:
|
|
879
|
+
* - Channel.database('db').collection('col').document('doc').create()
|
|
880
|
+
* - Channel.bucket('bucket').file('file').update()
|
|
881
|
+
* - Channel.function('func').execution('exec').delete()
|
|
882
|
+
* - Channel.team('team').create()
|
|
883
|
+
* - Channel.membership('membership').update()
|
|
806
884
|
* @param {(payload: RealtimeMessage) => void} callback Is called on every realtime update.
|
|
807
885
|
* @returns {() => void} Unsubscribes from events.
|
|
808
886
|
*/
|
|
809
887
|
subscribe(channels, callback) {
|
|
810
|
-
|
|
811
|
-
|
|
888
|
+
const channelArray = Array.isArray(channels) ? channels : [channels];
|
|
889
|
+
// Convert Channel instances to strings
|
|
890
|
+
const channelStrings = channelArray.map(ch => {
|
|
891
|
+
if (typeof ch === 'string') {
|
|
892
|
+
return ch;
|
|
893
|
+
}
|
|
894
|
+
// All Channel instances have toString() method
|
|
895
|
+
if (ch && typeof ch.toString === 'function') {
|
|
896
|
+
return ch.toString();
|
|
897
|
+
}
|
|
898
|
+
// Fallback to generic string conversion
|
|
899
|
+
return String(ch);
|
|
900
|
+
});
|
|
901
|
+
channelStrings.forEach(channel => this.realtime.channels.add(channel));
|
|
812
902
|
const counter = this.realtime.subscriptionsCounter++;
|
|
813
903
|
this.realtime.subscriptions.set(counter, {
|
|
814
|
-
channels:
|
|
904
|
+
channels: channelStrings,
|
|
815
905
|
callback
|
|
816
906
|
});
|
|
817
907
|
this.realtime.connect();
|
|
818
908
|
return () => {
|
|
819
909
|
this.realtime.subscriptions.delete(counter);
|
|
820
|
-
this.realtime.cleanUp(
|
|
910
|
+
this.realtime.cleanUp(channelStrings);
|
|
821
911
|
this.realtime.connect();
|
|
822
912
|
};
|
|
823
913
|
}
|
|
@@ -6937,6 +7027,54 @@ class Domains {
|
|
|
6937
7027
|
};
|
|
6938
7028
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
6939
7029
|
}
|
|
7030
|
+
listSuggestions(paramsOrFirst, ...rest) {
|
|
7031
|
+
let params;
|
|
7032
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
7033
|
+
params = (paramsOrFirst || {});
|
|
7034
|
+
}
|
|
7035
|
+
else {
|
|
7036
|
+
params = {
|
|
7037
|
+
query: paramsOrFirst,
|
|
7038
|
+
tlds: rest[0],
|
|
7039
|
+
limit: rest[1],
|
|
7040
|
+
filterType: rest[2],
|
|
7041
|
+
priceMax: rest[3],
|
|
7042
|
+
priceMin: rest[4]
|
|
7043
|
+
};
|
|
7044
|
+
}
|
|
7045
|
+
const query = params.query;
|
|
7046
|
+
const tlds = params.tlds;
|
|
7047
|
+
const limit = params.limit;
|
|
7048
|
+
const filterType = params.filterType;
|
|
7049
|
+
const priceMax = params.priceMax;
|
|
7050
|
+
const priceMin = params.priceMin;
|
|
7051
|
+
if (typeof query === 'undefined') {
|
|
7052
|
+
throw new AppwriteException('Missing required parameter: "query"');
|
|
7053
|
+
}
|
|
7054
|
+
const apiPath = '/domains/suggestions';
|
|
7055
|
+
const payload = {};
|
|
7056
|
+
if (typeof query !== 'undefined') {
|
|
7057
|
+
payload['query'] = query;
|
|
7058
|
+
}
|
|
7059
|
+
if (typeof tlds !== 'undefined') {
|
|
7060
|
+
payload['tlds'] = tlds;
|
|
7061
|
+
}
|
|
7062
|
+
if (typeof limit !== 'undefined') {
|
|
7063
|
+
payload['limit'] = limit;
|
|
7064
|
+
}
|
|
7065
|
+
if (typeof filterType !== 'undefined') {
|
|
7066
|
+
payload['filterType'] = filterType;
|
|
7067
|
+
}
|
|
7068
|
+
if (typeof priceMax !== 'undefined') {
|
|
7069
|
+
payload['priceMax'] = priceMax;
|
|
7070
|
+
}
|
|
7071
|
+
if (typeof priceMin !== 'undefined') {
|
|
7072
|
+
payload['priceMin'] = priceMin;
|
|
7073
|
+
}
|
|
7074
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
7075
|
+
const apiHeaders = {};
|
|
7076
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
7077
|
+
}
|
|
6940
7078
|
get(paramsOrFirst) {
|
|
6941
7079
|
let params;
|
|
6942
7080
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -9737,7 +9875,7 @@ class Health {
|
|
|
9737
9875
|
* Check the Appwrite in-memory cache servers are up and connection is successful.
|
|
9738
9876
|
*
|
|
9739
9877
|
* @throws {AppwriteException}
|
|
9740
|
-
* @returns {Promise<Models.
|
|
9878
|
+
* @returns {Promise<Models.HealthStatusList>}
|
|
9741
9879
|
*/
|
|
9742
9880
|
getCache() {
|
|
9743
9881
|
const apiPath = '/health/cache';
|
|
@@ -9770,7 +9908,7 @@ class Health {
|
|
|
9770
9908
|
* Check the Appwrite database servers are up and connection is successful.
|
|
9771
9909
|
*
|
|
9772
9910
|
* @throws {AppwriteException}
|
|
9773
|
-
* @returns {Promise<Models.
|
|
9911
|
+
* @returns {Promise<Models.HealthStatusList>}
|
|
9774
9912
|
*/
|
|
9775
9913
|
getDB() {
|
|
9776
9914
|
const apiPath = '/health/db';
|
|
@@ -9783,7 +9921,7 @@ class Health {
|
|
|
9783
9921
|
* Check the Appwrite pub-sub servers are up and connection is successful.
|
|
9784
9922
|
*
|
|
9785
9923
|
* @throws {AppwriteException}
|
|
9786
|
-
* @returns {Promise<Models.
|
|
9924
|
+
* @returns {Promise<Models.HealthStatusList>}
|
|
9787
9925
|
*/
|
|
9788
9926
|
getPubSub() {
|
|
9789
9927
|
const apiPath = '/health/pubsub';
|
|
@@ -9792,6 +9930,26 @@ class Health {
|
|
|
9792
9930
|
const apiHeaders = {};
|
|
9793
9931
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
9794
9932
|
}
|
|
9933
|
+
getQueueAudits(paramsOrFirst) {
|
|
9934
|
+
let params;
|
|
9935
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9936
|
+
params = (paramsOrFirst || {});
|
|
9937
|
+
}
|
|
9938
|
+
else {
|
|
9939
|
+
params = {
|
|
9940
|
+
threshold: paramsOrFirst
|
|
9941
|
+
};
|
|
9942
|
+
}
|
|
9943
|
+
const threshold = params.threshold;
|
|
9944
|
+
const apiPath = '/health/queue/audits';
|
|
9945
|
+
const payload = {};
|
|
9946
|
+
if (typeof threshold !== 'undefined') {
|
|
9947
|
+
payload['threshold'] = threshold;
|
|
9948
|
+
}
|
|
9949
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9950
|
+
const apiHeaders = {};
|
|
9951
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
9952
|
+
}
|
|
9795
9953
|
getQueueBillingProjectAggregation(paramsOrFirst) {
|
|
9796
9954
|
let params;
|
|
9797
9955
|
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -13911,7 +14069,7 @@ class Organizations {
|
|
|
13911
14069
|
}
|
|
13912
14070
|
estimationCreateOrganization(paramsOrFirst, ...rest) {
|
|
13913
14071
|
let params;
|
|
13914
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14072
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'billingPlan' in paramsOrFirst)) {
|
|
13915
14073
|
params = (paramsOrFirst || {});
|
|
13916
14074
|
}
|
|
13917
14075
|
else {
|
|
@@ -24849,11 +25007,31 @@ class Realtime {
|
|
|
24849
25007
|
sleep(ms) {
|
|
24850
25008
|
return new Promise(resolve => setTimeout(resolve, ms));
|
|
24851
25009
|
}
|
|
25010
|
+
/**
|
|
25011
|
+
* Convert a channel value to a string
|
|
25012
|
+
*
|
|
25013
|
+
* @private
|
|
25014
|
+
* @param {string | Channel<any> | ActionableChannel | ResolvedChannel} channel - Channel value (string or Channel builder instance)
|
|
25015
|
+
* @returns {string} Channel string representation
|
|
25016
|
+
*/
|
|
25017
|
+
channelToString(channel) {
|
|
25018
|
+
if (typeof channel === 'string') {
|
|
25019
|
+
return channel;
|
|
25020
|
+
}
|
|
25021
|
+
// All Channel instances have toString() method
|
|
25022
|
+
if (channel && typeof channel.toString === 'function') {
|
|
25023
|
+
return channel.toString();
|
|
25024
|
+
}
|
|
25025
|
+
return String(channel);
|
|
25026
|
+
}
|
|
24852
25027
|
subscribe(channelsOrChannel, callback) {
|
|
24853
25028
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24854
|
-
const
|
|
24855
|
-
?
|
|
24856
|
-
:
|
|
25029
|
+
const channelArray = Array.isArray(channelsOrChannel)
|
|
25030
|
+
? channelsOrChannel
|
|
25031
|
+
: [channelsOrChannel];
|
|
25032
|
+
// Convert all channels to strings
|
|
25033
|
+
const channelStrings = channelArray.map(ch => this.channelToString(ch));
|
|
25034
|
+
const channels = new Set(channelStrings);
|
|
24857
25035
|
this.subscriptionsCounter++;
|
|
24858
25036
|
const count = this.subscriptionsCounter;
|
|
24859
25037
|
for (const channel of channels) {
|
|
@@ -25157,6 +25335,96 @@ _a = ID, _ID_hexTimestamp = function _ID_hexTimestamp() {
|
|
|
25157
25335
|
return hexTimestamp;
|
|
25158
25336
|
};
|
|
25159
25337
|
|
|
25338
|
+
function normalize(id) {
|
|
25339
|
+
const trimmed = id.trim();
|
|
25340
|
+
return trimmed === "" ? "*" : trimmed;
|
|
25341
|
+
}
|
|
25342
|
+
class Channel {
|
|
25343
|
+
constructor(segments) {
|
|
25344
|
+
this.segments = segments;
|
|
25345
|
+
}
|
|
25346
|
+
next(segment, id = "*") {
|
|
25347
|
+
return new Channel([...this.segments, segment, normalize(id)]);
|
|
25348
|
+
}
|
|
25349
|
+
resolve(action) {
|
|
25350
|
+
return new Channel([...this.segments, action]);
|
|
25351
|
+
}
|
|
25352
|
+
toString() {
|
|
25353
|
+
return this.segments.join(".");
|
|
25354
|
+
}
|
|
25355
|
+
// --- DATABASE ROUTE ---
|
|
25356
|
+
// Only available on Channel<Database>
|
|
25357
|
+
collection(id = "*") {
|
|
25358
|
+
return this.next("collections", id);
|
|
25359
|
+
}
|
|
25360
|
+
// Only available on Channel<Collection>
|
|
25361
|
+
document(id = "*") {
|
|
25362
|
+
return this.next("documents", id);
|
|
25363
|
+
}
|
|
25364
|
+
// --- TABLESDB ROUTE ---
|
|
25365
|
+
table(id = "*") {
|
|
25366
|
+
return this.next("tables", id);
|
|
25367
|
+
}
|
|
25368
|
+
row(id = "*") {
|
|
25369
|
+
return this.next("rows", id);
|
|
25370
|
+
}
|
|
25371
|
+
// --- BUCKET ROUTE ---
|
|
25372
|
+
file(id = "*") {
|
|
25373
|
+
return this.next("files", id);
|
|
25374
|
+
}
|
|
25375
|
+
// --- FUNCTION ROUTE ---
|
|
25376
|
+
execution(id = "*") {
|
|
25377
|
+
return this.next("executions", id);
|
|
25378
|
+
}
|
|
25379
|
+
// --- TERMINAL ACTIONS ---
|
|
25380
|
+
// Restricted to the Actionable union
|
|
25381
|
+
create() {
|
|
25382
|
+
return this.resolve("create");
|
|
25383
|
+
}
|
|
25384
|
+
update() {
|
|
25385
|
+
return this.resolve("update");
|
|
25386
|
+
}
|
|
25387
|
+
delete() {
|
|
25388
|
+
return this.resolve("delete");
|
|
25389
|
+
}
|
|
25390
|
+
// --- ROOT FACTORIES ---
|
|
25391
|
+
static database(id = "*") {
|
|
25392
|
+
return new Channel(["databases", normalize(id)]);
|
|
25393
|
+
}
|
|
25394
|
+
static tablesdb(id = "*") {
|
|
25395
|
+
return new Channel(["tablesdb", normalize(id)]);
|
|
25396
|
+
}
|
|
25397
|
+
static bucket(id = "*") {
|
|
25398
|
+
return new Channel(["buckets", normalize(id)]);
|
|
25399
|
+
}
|
|
25400
|
+
static function(id = "*") {
|
|
25401
|
+
return new Channel(["functions", normalize(id)]);
|
|
25402
|
+
}
|
|
25403
|
+
static team(id = "*") {
|
|
25404
|
+
return new Channel(["teams", normalize(id)]);
|
|
25405
|
+
}
|
|
25406
|
+
static membership(id = "*") {
|
|
25407
|
+
return new Channel(["memberships", normalize(id)]);
|
|
25408
|
+
}
|
|
25409
|
+
static account(userId = "") {
|
|
25410
|
+
const id = normalize(userId);
|
|
25411
|
+
return id === "*" ? "account" : `account.${id}`;
|
|
25412
|
+
}
|
|
25413
|
+
// Global events
|
|
25414
|
+
static get documents() {
|
|
25415
|
+
return "documents";
|
|
25416
|
+
}
|
|
25417
|
+
static get rows() {
|
|
25418
|
+
return "rows";
|
|
25419
|
+
}
|
|
25420
|
+
static get files() {
|
|
25421
|
+
return "files";
|
|
25422
|
+
}
|
|
25423
|
+
static get executions() {
|
|
25424
|
+
return "executions";
|
|
25425
|
+
}
|
|
25426
|
+
}
|
|
25427
|
+
|
|
25160
25428
|
var Condition;
|
|
25161
25429
|
(function (Condition) {
|
|
25162
25430
|
Condition["Equal"] = "equal";
|
|
@@ -25476,8 +25744,6 @@ var OAuthProvider;
|
|
|
25476
25744
|
OAuthProvider["Yandex"] = "yandex";
|
|
25477
25745
|
OAuthProvider["Zoho"] = "zoho";
|
|
25478
25746
|
OAuthProvider["Zoom"] = "zoom";
|
|
25479
|
-
OAuthProvider["Mock"] = "mock";
|
|
25480
|
-
OAuthProvider["Mockunverified"] = "mock-unverified";
|
|
25481
25747
|
OAuthProvider["GithubImagine"] = "githubImagine";
|
|
25482
25748
|
OAuthProvider["GoogleImagine"] = "googleImagine";
|
|
25483
25749
|
})(OAuthProvider || (OAuthProvider = {}));
|
|
@@ -26201,6 +26467,12 @@ var IndexType;
|
|
|
26201
26467
|
IndexType["Spatial"] = "spatial";
|
|
26202
26468
|
})(IndexType || (IndexType = {}));
|
|
26203
26469
|
|
|
26470
|
+
var FilterType;
|
|
26471
|
+
(function (FilterType) {
|
|
26472
|
+
FilterType["Premium"] = "premium";
|
|
26473
|
+
FilterType["Suggestion"] = "suggestion";
|
|
26474
|
+
})(FilterType || (FilterType = {}));
|
|
26475
|
+
|
|
26204
26476
|
var Runtime;
|
|
26205
26477
|
(function (Runtime) {
|
|
26206
26478
|
Runtime["Node145"] = "node-14.5";
|
|
@@ -26312,6 +26584,7 @@ var Name;
|
|
|
26312
26584
|
Name["V1webhooks"] = "v1-webhooks";
|
|
26313
26585
|
Name["V1certificates"] = "v1-certificates";
|
|
26314
26586
|
Name["V1builds"] = "v1-builds";
|
|
26587
|
+
Name["V1screenshots"] = "v1-screenshots";
|
|
26315
26588
|
Name["V1messaging"] = "v1-messaging";
|
|
26316
26589
|
Name["V1migrations"] = "v1-migrations";
|
|
26317
26590
|
})(Name || (Name = {}));
|
|
@@ -26329,6 +26602,25 @@ var SmtpEncryption;
|
|
|
26329
26602
|
SmtpEncryption["Tls"] = "tls";
|
|
26330
26603
|
})(SmtpEncryption || (SmtpEncryption = {}));
|
|
26331
26604
|
|
|
26605
|
+
var BillingPlan;
|
|
26606
|
+
(function (BillingPlan) {
|
|
26607
|
+
BillingPlan["Tier0"] = "tier-0";
|
|
26608
|
+
BillingPlan["Tier1"] = "tier-1";
|
|
26609
|
+
BillingPlan["Tier2"] = "tier-2";
|
|
26610
|
+
BillingPlan["Imaginetier0"] = "imagine-tier-0";
|
|
26611
|
+
BillingPlan["Imaginetier1"] = "imagine-tier-1";
|
|
26612
|
+
BillingPlan["Imaginetier150"] = "imagine-tier-1-50";
|
|
26613
|
+
BillingPlan["Imaginetier1100"] = "imagine-tier-1-100";
|
|
26614
|
+
BillingPlan["Imaginetier1200"] = "imagine-tier-1-200";
|
|
26615
|
+
BillingPlan["Imaginetier1290"] = "imagine-tier-1-290";
|
|
26616
|
+
BillingPlan["Imaginetier1480"] = "imagine-tier-1-480";
|
|
26617
|
+
BillingPlan["Imaginetier1700"] = "imagine-tier-1-700";
|
|
26618
|
+
BillingPlan["Imaginetier1900"] = "imagine-tier-1-900";
|
|
26619
|
+
BillingPlan["Imaginetier11100"] = "imagine-tier-1-1100";
|
|
26620
|
+
BillingPlan["Imaginetier11650"] = "imagine-tier-1-1650";
|
|
26621
|
+
BillingPlan["Imaginetier12200"] = "imagine-tier-1-2200";
|
|
26622
|
+
})(BillingPlan || (BillingPlan = {}));
|
|
26623
|
+
|
|
26332
26624
|
var ProjectUsageRange;
|
|
26333
26625
|
(function (ProjectUsageRange) {
|
|
26334
26626
|
ProjectUsageRange["OneHour"] = "1h";
|
|
@@ -26956,5 +27248,5 @@ var BillingPlanGroup;
|
|
|
26956
27248
|
BillingPlanGroup["Scale"] = "scale";
|
|
26957
27249
|
})(BillingPlanGroup || (BillingPlanGroup = {}));
|
|
26958
27250
|
|
|
26959
|
-
export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, Backups, BillingPlanGroup, Browser, BuildRuntime, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DeploymentDownloadType, DeploymentStatus, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, Flag, Framework, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, IndexType, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Operator, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RelationMutate, RelationshipType, Role, Runtime, SMTPSecure, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, Status, StatusCode, Storage, TablesDB, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, Users, VCSDetectionType, VCSReferenceType, Vcs };
|
|
27251
|
+
export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, Backups, BillingPlan, BillingPlanGroup, Browser, BuildRuntime, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DeploymentDownloadType, DeploymentStatus, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, FilterType, Flag, Framework, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, IndexType, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Operator, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RelationMutate, RelationshipType, Role, Runtime, SMTPSecure, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, Status, StatusCode, Storage, TablesDB, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, Users, VCSDetectionType, VCSReferenceType, Vcs };
|
|
26960
27252
|
//# sourceMappingURL=sdk.js.map
|