appwrite-cli 22.3.0 → 22.5.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.
- package/README.md +4 -4
- package/dist/cli.cjs +1306 -534
- package/dist/index.cjs +715 -352
- package/dist/index.js +715 -352
- package/dist/lib/auth/session.d.ts.map +1 -1
- package/dist/lib/commands/generic.d.ts.map +1 -1
- package/dist/lib/commands/services/notifications.d.ts +3 -0
- package/dist/lib/commands/services/notifications.d.ts.map +1 -0
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
- package/dist/lib/config-filters.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +3 -2
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -35929,7 +35929,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
35929
35929
|
}
|
|
35930
35930
|
return positiveOption || option2;
|
|
35931
35931
|
};
|
|
35932
|
-
const
|
|
35932
|
+
const getErrorMessage3 = (option2) => {
|
|
35933
35933
|
const bestOption = findBestOptionFromValue(option2);
|
|
35934
35934
|
const optionKey = bestOption.attributeName();
|
|
35935
35935
|
const source = this.getOptionValueSource(optionKey);
|
|
@@ -35938,7 +35938,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
35938
35938
|
}
|
|
35939
35939
|
return `option '${bestOption.flags}'`;
|
|
35940
35940
|
};
|
|
35941
|
-
const message = `error: ${
|
|
35941
|
+
const message = `error: ${getErrorMessage3(option)} cannot be used with ${getErrorMessage3(conflictingOption)}`;
|
|
35942
35942
|
this.error(message, { code: "commander.conflictingOption" });
|
|
35943
35943
|
}
|
|
35944
35944
|
/**
|
|
@@ -65565,7 +65565,7 @@ var id_default = ID;
|
|
|
65565
65565
|
// lib/constants.ts
|
|
65566
65566
|
var SDK_TITLE = "Appwrite";
|
|
65567
65567
|
var SDK_TITLE_LOWER = "appwrite";
|
|
65568
|
-
var SDK_VERSION = "22.
|
|
65568
|
+
var SDK_VERSION = "22.5.0";
|
|
65569
65569
|
var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
|
|
65570
65570
|
var EXECUTABLE_NAME = "appwrite";
|
|
65571
65571
|
var UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
@@ -80712,6 +80712,9 @@ Query.distanceEqual = (attribute, values, distance, meters = true) => new Query(
|
|
|
80712
80712
|
Query.distanceNotEqual = (attribute, values, distance, meters = true) => new Query("distanceNotEqual", attribute, [[values, distance, meters]]).toString();
|
|
80713
80713
|
Query.distanceGreaterThan = (attribute, values, distance, meters = true) => new Query("distanceGreaterThan", attribute, [[values, distance, meters]]).toString();
|
|
80714
80714
|
Query.distanceLessThan = (attribute, values, distance, meters = true) => new Query("distanceLessThan", attribute, [[values, distance, meters]]).toString();
|
|
80715
|
+
Query.vectorDot = (attribute, vector) => new Query("vectorDot", attribute, [vector]).toString();
|
|
80716
|
+
Query.vectorCosine = (attribute, vector) => new Query("vectorCosine", attribute, [vector]).toString();
|
|
80717
|
+
Query.vectorEuclidean = (attribute, vector) => new Query("vectorEuclidean", attribute, [vector]).toString();
|
|
80715
80718
|
Query.intersects = (attribute, values) => new Query("intersects", attribute, [values]).toString();
|
|
80716
80719
|
Query.notIntersects = (attribute, values) => new Query("notIntersects", attribute, [values]).toString();
|
|
80717
80720
|
Query.crosses = (attribute, values) => new Query("crosses", attribute, [values]).toString();
|
|
@@ -80776,6 +80779,7 @@ var Client = class _Client {
|
|
|
80776
80779
|
project: "",
|
|
80777
80780
|
key: "",
|
|
80778
80781
|
jwt: "",
|
|
80782
|
+
bearer: "",
|
|
80779
80783
|
locale: "",
|
|
80780
80784
|
mode: "",
|
|
80781
80785
|
cookie: "",
|
|
@@ -80792,7 +80796,7 @@ var Client = class _Client {
|
|
|
80792
80796
|
"x-sdk-name": "Console",
|
|
80793
80797
|
"x-sdk-platform": "console",
|
|
80794
80798
|
"x-sdk-language": "web",
|
|
80795
|
-
"x-sdk-version": "15.
|
|
80799
|
+
"x-sdk-version": "15.2.0",
|
|
80796
80800
|
"X-Appwrite-Response-Format": "1.9.5"
|
|
80797
80801
|
};
|
|
80798
80802
|
this.realtime = {
|
|
@@ -80843,7 +80847,10 @@ var Client = class _Client {
|
|
|
80843
80847
|
return;
|
|
80844
80848
|
}
|
|
80845
80849
|
const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : "");
|
|
80846
|
-
|
|
80850
|
+
let queryParams = "project=" + encodedProject;
|
|
80851
|
+
if (this.config.jwt) {
|
|
80852
|
+
queryParams += "&jwt=" + encodeURIComponent(this.config.jwt);
|
|
80853
|
+
}
|
|
80847
80854
|
const url2 = this.config.endpointRealtime + "/realtime?" + queryParams;
|
|
80848
80855
|
if (url2 !== this.realtime.url || // Check if URL is present
|
|
80849
80856
|
!this.realtime.socket || // Check if WebSocket has not been created
|
|
@@ -81099,6 +81106,20 @@ var Client = class _Client {
|
|
|
81099
81106
|
this.config.jwt = value;
|
|
81100
81107
|
return this;
|
|
81101
81108
|
}
|
|
81109
|
+
/**
|
|
81110
|
+
* Set Bearer
|
|
81111
|
+
*
|
|
81112
|
+
* The OAuth access token to authenticate with
|
|
81113
|
+
*
|
|
81114
|
+
* @param value string
|
|
81115
|
+
*
|
|
81116
|
+
* @return {this}
|
|
81117
|
+
*/
|
|
81118
|
+
setBearer(value) {
|
|
81119
|
+
this.headers["Authorization"] = value;
|
|
81120
|
+
this.config.bearer = value;
|
|
81121
|
+
return this;
|
|
81122
|
+
}
|
|
81102
81123
|
/**
|
|
81103
81124
|
* Set Locale
|
|
81104
81125
|
*
|
|
@@ -81470,7 +81491,7 @@ var Client = class _Client {
|
|
|
81470
81491
|
}
|
|
81471
81492
|
call(method_1, url_1) {
|
|
81472
81493
|
return __awaiter(this, arguments, void 0, function* (method, url2, headers = {}, params = {}, responseType = "json") {
|
|
81473
|
-
var _a4, _b;
|
|
81494
|
+
var _a4, _b, _c;
|
|
81474
81495
|
const { uri, options } = this.prepareRequest(method, url2, headers, params);
|
|
81475
81496
|
let data = null;
|
|
81476
81497
|
const response = yield fetch(uri, options);
|
|
@@ -81497,7 +81518,7 @@ var Client = class _Client {
|
|
|
81497
81518
|
} else {
|
|
81498
81519
|
responseText = data === null || data === void 0 ? void 0 : data.message;
|
|
81499
81520
|
}
|
|
81500
|
-
throw new AppwriteException(data === null || data === void 0 ? void 0 : data.message, response.status, data === null || data === void 0 ? void 0 : data.type, responseText);
|
|
81521
|
+
throw new AppwriteException((_c = data === null || data === void 0 ? void 0 : data.message) !== null && _c !== void 0 ? _c : responseText, response.status, data === null || data === void 0 ? void 0 : data.type, responseText);
|
|
81501
81522
|
}
|
|
81502
81523
|
const cookieFallback = response.headers.get("X-Fallback-Cookies");
|
|
81503
81524
|
if (typeof window !== "undefined" && window.localStorage && cookieFallback && this.shouldUseFallbackCredentials(url2)) {
|
|
@@ -81595,6 +81616,38 @@ var Console = class {
|
|
|
81595
81616
|
};
|
|
81596
81617
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
81597
81618
|
}
|
|
81619
|
+
listDatabases(paramsOrFirst, ...rest) {
|
|
81620
|
+
let params;
|
|
81621
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
81622
|
+
params = paramsOrFirst || {};
|
|
81623
|
+
} else {
|
|
81624
|
+
params = {
|
|
81625
|
+
queries: paramsOrFirst,
|
|
81626
|
+
search: rest[0],
|
|
81627
|
+
total: rest[1]
|
|
81628
|
+
};
|
|
81629
|
+
}
|
|
81630
|
+
const queries = params.queries;
|
|
81631
|
+
const search = params.search;
|
|
81632
|
+
const total = params.total;
|
|
81633
|
+
const apiPath = "/console/databases";
|
|
81634
|
+
const payload = {};
|
|
81635
|
+
if (typeof queries !== "undefined") {
|
|
81636
|
+
payload["queries"] = queries;
|
|
81637
|
+
}
|
|
81638
|
+
if (typeof search !== "undefined") {
|
|
81639
|
+
payload["search"] = search;
|
|
81640
|
+
}
|
|
81641
|
+
if (typeof total !== "undefined") {
|
|
81642
|
+
payload["total"] = total;
|
|
81643
|
+
}
|
|
81644
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
81645
|
+
const apiHeaders = {
|
|
81646
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
81647
|
+
"accept": "application/json"
|
|
81648
|
+
};
|
|
81649
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
81650
|
+
}
|
|
81598
81651
|
/**
|
|
81599
81652
|
* List all OAuth2 providers supported by the Appwrite server, along with the parameters required to configure each provider. The response excludes mock providers but includes sandbox providers.
|
|
81600
81653
|
*
|
|
@@ -81655,6 +81708,23 @@ var Console = class {
|
|
|
81655
81708
|
};
|
|
81656
81709
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
81657
81710
|
}
|
|
81711
|
+
/**
|
|
81712
|
+
* Get the catalog of Postgres extensions that can be installed on a dedicated Postgres database.
|
|
81713
|
+
*
|
|
81714
|
+
*
|
|
81715
|
+
* @throws {AppwriteException}
|
|
81716
|
+
* @returns {Promise<Models.PostgresExtensionList>}
|
|
81717
|
+
*/
|
|
81718
|
+
listPostgresExtensions() {
|
|
81719
|
+
const apiPath = "/console/postgres-extensions";
|
|
81720
|
+
const payload = {};
|
|
81721
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
81722
|
+
const apiHeaders = {
|
|
81723
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
81724
|
+
"accept": "application/json"
|
|
81725
|
+
};
|
|
81726
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
81727
|
+
}
|
|
81658
81728
|
getProgram(paramsOrFirst) {
|
|
81659
81729
|
let params;
|
|
81660
81730
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -85119,43 +85189,6 @@ var Databases = class {
|
|
|
85119
85189
|
};
|
|
85120
85190
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
85121
85191
|
}
|
|
85122
|
-
listDocumentLogs(paramsOrFirst, ...rest) {
|
|
85123
|
-
let params;
|
|
85124
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
85125
|
-
params = paramsOrFirst || {};
|
|
85126
|
-
} else {
|
|
85127
|
-
params = {
|
|
85128
|
-
databaseId: paramsOrFirst,
|
|
85129
|
-
collectionId: rest[0],
|
|
85130
|
-
documentId: rest[1],
|
|
85131
|
-
queries: rest[2]
|
|
85132
|
-
};
|
|
85133
|
-
}
|
|
85134
|
-
const databaseId = params.databaseId;
|
|
85135
|
-
const collectionId = params.collectionId;
|
|
85136
|
-
const documentId = params.documentId;
|
|
85137
|
-
const queries = params.queries;
|
|
85138
|
-
if (typeof databaseId === "undefined") {
|
|
85139
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
85140
|
-
}
|
|
85141
|
-
if (typeof collectionId === "undefined") {
|
|
85142
|
-
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
85143
|
-
}
|
|
85144
|
-
if (typeof documentId === "undefined") {
|
|
85145
|
-
throw new AppwriteException('Missing required parameter: "documentId"');
|
|
85146
|
-
}
|
|
85147
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/documents/{documentId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{collectionId}", encodeURIComponent(String(collectionId))).replace("{documentId}", encodeURIComponent(String(documentId)));
|
|
85148
|
-
const payload = {};
|
|
85149
|
-
if (typeof queries !== "undefined") {
|
|
85150
|
-
payload["queries"] = queries;
|
|
85151
|
-
}
|
|
85152
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
85153
|
-
const apiHeaders = {
|
|
85154
|
-
"X-Appwrite-Project": this.client.config.project,
|
|
85155
|
-
"accept": "application/json"
|
|
85156
|
-
};
|
|
85157
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
85158
|
-
}
|
|
85159
85192
|
decrementDocumentAttribute(paramsOrFirst, ...rest) {
|
|
85160
85193
|
let params;
|
|
85161
85194
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -85425,38 +85458,6 @@ var Databases = class {
|
|
|
85425
85458
|
};
|
|
85426
85459
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
85427
85460
|
}
|
|
85428
|
-
listCollectionLogs(paramsOrFirst, ...rest) {
|
|
85429
|
-
let params;
|
|
85430
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
85431
|
-
params = paramsOrFirst || {};
|
|
85432
|
-
} else {
|
|
85433
|
-
params = {
|
|
85434
|
-
databaseId: paramsOrFirst,
|
|
85435
|
-
collectionId: rest[0],
|
|
85436
|
-
queries: rest[1]
|
|
85437
|
-
};
|
|
85438
|
-
}
|
|
85439
|
-
const databaseId = params.databaseId;
|
|
85440
|
-
const collectionId = params.collectionId;
|
|
85441
|
-
const queries = params.queries;
|
|
85442
|
-
if (typeof databaseId === "undefined") {
|
|
85443
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
85444
|
-
}
|
|
85445
|
-
if (typeof collectionId === "undefined") {
|
|
85446
|
-
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
85447
|
-
}
|
|
85448
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{collectionId}", encodeURIComponent(String(collectionId)));
|
|
85449
|
-
const payload = {};
|
|
85450
|
-
if (typeof queries !== "undefined") {
|
|
85451
|
-
payload["queries"] = queries;
|
|
85452
|
-
}
|
|
85453
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
85454
|
-
const apiHeaders = {
|
|
85455
|
-
"X-Appwrite-Project": this.client.config.project,
|
|
85456
|
-
"accept": "application/json"
|
|
85457
|
-
};
|
|
85458
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
85459
|
-
}
|
|
85460
85461
|
getCollectionUsage(paramsOrFirst, ...rest) {
|
|
85461
85462
|
let params;
|
|
85462
85463
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -85489,33 +85490,6 @@ var Databases = class {
|
|
|
85489
85490
|
};
|
|
85490
85491
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
85491
85492
|
}
|
|
85492
|
-
listLogs(paramsOrFirst, ...rest) {
|
|
85493
|
-
let params;
|
|
85494
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
85495
|
-
params = paramsOrFirst || {};
|
|
85496
|
-
} else {
|
|
85497
|
-
params = {
|
|
85498
|
-
databaseId: paramsOrFirst,
|
|
85499
|
-
queries: rest[0]
|
|
85500
|
-
};
|
|
85501
|
-
}
|
|
85502
|
-
const databaseId = params.databaseId;
|
|
85503
|
-
const queries = params.queries;
|
|
85504
|
-
if (typeof databaseId === "undefined") {
|
|
85505
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
85506
|
-
}
|
|
85507
|
-
const apiPath = "/databases/{databaseId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId)));
|
|
85508
|
-
const payload = {};
|
|
85509
|
-
if (typeof queries !== "undefined") {
|
|
85510
|
-
payload["queries"] = queries;
|
|
85511
|
-
}
|
|
85512
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
85513
|
-
const apiHeaders = {
|
|
85514
|
-
"X-Appwrite-Project": this.client.config.project,
|
|
85515
|
-
"accept": "application/json"
|
|
85516
|
-
};
|
|
85517
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
85518
|
-
}
|
|
85519
85493
|
getUsage(paramsOrFirst, ...rest) {
|
|
85520
85494
|
let params;
|
|
85521
85495
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -87448,38 +87422,6 @@ var Messaging = class {
|
|
|
87448
87422
|
};
|
|
87449
87423
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
87450
87424
|
}
|
|
87451
|
-
listMessageLogs(paramsOrFirst, ...rest) {
|
|
87452
|
-
let params;
|
|
87453
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
87454
|
-
params = paramsOrFirst || {};
|
|
87455
|
-
} else {
|
|
87456
|
-
params = {
|
|
87457
|
-
messageId: paramsOrFirst,
|
|
87458
|
-
queries: rest[0],
|
|
87459
|
-
total: rest[1]
|
|
87460
|
-
};
|
|
87461
|
-
}
|
|
87462
|
-
const messageId = params.messageId;
|
|
87463
|
-
const queries = params.queries;
|
|
87464
|
-
const total = params.total;
|
|
87465
|
-
if (typeof messageId === "undefined") {
|
|
87466
|
-
throw new AppwriteException('Missing required parameter: "messageId"');
|
|
87467
|
-
}
|
|
87468
|
-
const apiPath = "/messaging/messages/{messageId}/logs".replace("{messageId}", encodeURIComponent(String(messageId)));
|
|
87469
|
-
const payload = {};
|
|
87470
|
-
if (typeof queries !== "undefined") {
|
|
87471
|
-
payload["queries"] = queries;
|
|
87472
|
-
}
|
|
87473
|
-
if (typeof total !== "undefined") {
|
|
87474
|
-
payload["total"] = total;
|
|
87475
|
-
}
|
|
87476
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
87477
|
-
const apiHeaders = {
|
|
87478
|
-
"X-Appwrite-Project": this.client.config.project,
|
|
87479
|
-
"accept": "application/json"
|
|
87480
|
-
};
|
|
87481
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
87482
|
-
}
|
|
87483
87425
|
listTargets(paramsOrFirst, ...rest) {
|
|
87484
87426
|
let params;
|
|
87485
87427
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -89404,70 +89346,6 @@ var Messaging = class {
|
|
|
89404
89346
|
};
|
|
89405
89347
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
89406
89348
|
}
|
|
89407
|
-
listProviderLogs(paramsOrFirst, ...rest) {
|
|
89408
|
-
let params;
|
|
89409
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89410
|
-
params = paramsOrFirst || {};
|
|
89411
|
-
} else {
|
|
89412
|
-
params = {
|
|
89413
|
-
providerId: paramsOrFirst,
|
|
89414
|
-
queries: rest[0],
|
|
89415
|
-
total: rest[1]
|
|
89416
|
-
};
|
|
89417
|
-
}
|
|
89418
|
-
const providerId = params.providerId;
|
|
89419
|
-
const queries = params.queries;
|
|
89420
|
-
const total = params.total;
|
|
89421
|
-
if (typeof providerId === "undefined") {
|
|
89422
|
-
throw new AppwriteException('Missing required parameter: "providerId"');
|
|
89423
|
-
}
|
|
89424
|
-
const apiPath = "/messaging/providers/{providerId}/logs".replace("{providerId}", encodeURIComponent(String(providerId)));
|
|
89425
|
-
const payload = {};
|
|
89426
|
-
if (typeof queries !== "undefined") {
|
|
89427
|
-
payload["queries"] = queries;
|
|
89428
|
-
}
|
|
89429
|
-
if (typeof total !== "undefined") {
|
|
89430
|
-
payload["total"] = total;
|
|
89431
|
-
}
|
|
89432
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
89433
|
-
const apiHeaders = {
|
|
89434
|
-
"X-Appwrite-Project": this.client.config.project,
|
|
89435
|
-
"accept": "application/json"
|
|
89436
|
-
};
|
|
89437
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
89438
|
-
}
|
|
89439
|
-
listSubscriberLogs(paramsOrFirst, ...rest) {
|
|
89440
|
-
let params;
|
|
89441
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89442
|
-
params = paramsOrFirst || {};
|
|
89443
|
-
} else {
|
|
89444
|
-
params = {
|
|
89445
|
-
subscriberId: paramsOrFirst,
|
|
89446
|
-
queries: rest[0],
|
|
89447
|
-
total: rest[1]
|
|
89448
|
-
};
|
|
89449
|
-
}
|
|
89450
|
-
const subscriberId = params.subscriberId;
|
|
89451
|
-
const queries = params.queries;
|
|
89452
|
-
const total = params.total;
|
|
89453
|
-
if (typeof subscriberId === "undefined") {
|
|
89454
|
-
throw new AppwriteException('Missing required parameter: "subscriberId"');
|
|
89455
|
-
}
|
|
89456
|
-
const apiPath = "/messaging/subscribers/{subscriberId}/logs".replace("{subscriberId}", encodeURIComponent(String(subscriberId)));
|
|
89457
|
-
const payload = {};
|
|
89458
|
-
if (typeof queries !== "undefined") {
|
|
89459
|
-
payload["queries"] = queries;
|
|
89460
|
-
}
|
|
89461
|
-
if (typeof total !== "undefined") {
|
|
89462
|
-
payload["total"] = total;
|
|
89463
|
-
}
|
|
89464
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
89465
|
-
const apiHeaders = {
|
|
89466
|
-
"X-Appwrite-Project": this.client.config.project,
|
|
89467
|
-
"accept": "application/json"
|
|
89468
|
-
};
|
|
89469
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
89470
|
-
}
|
|
89471
89349
|
listTopics(paramsOrFirst, ...rest) {
|
|
89472
89350
|
let params;
|
|
89473
89351
|
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -89616,38 +89494,6 @@ var Messaging = class {
|
|
|
89616
89494
|
};
|
|
89617
89495
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
89618
89496
|
}
|
|
89619
|
-
listTopicLogs(paramsOrFirst, ...rest) {
|
|
89620
|
-
let params;
|
|
89621
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89622
|
-
params = paramsOrFirst || {};
|
|
89623
|
-
} else {
|
|
89624
|
-
params = {
|
|
89625
|
-
topicId: paramsOrFirst,
|
|
89626
|
-
queries: rest[0],
|
|
89627
|
-
total: rest[1]
|
|
89628
|
-
};
|
|
89629
|
-
}
|
|
89630
|
-
const topicId = params.topicId;
|
|
89631
|
-
const queries = params.queries;
|
|
89632
|
-
const total = params.total;
|
|
89633
|
-
if (typeof topicId === "undefined") {
|
|
89634
|
-
throw new AppwriteException('Missing required parameter: "topicId"');
|
|
89635
|
-
}
|
|
89636
|
-
const apiPath = "/messaging/topics/{topicId}/logs".replace("{topicId}", encodeURIComponent(String(topicId)));
|
|
89637
|
-
const payload = {};
|
|
89638
|
-
if (typeof queries !== "undefined") {
|
|
89639
|
-
payload["queries"] = queries;
|
|
89640
|
-
}
|
|
89641
|
-
if (typeof total !== "undefined") {
|
|
89642
|
-
payload["total"] = total;
|
|
89643
|
-
}
|
|
89644
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
89645
|
-
const apiHeaders = {
|
|
89646
|
-
"X-Appwrite-Project": this.client.config.project,
|
|
89647
|
-
"accept": "application/json"
|
|
89648
|
-
};
|
|
89649
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
89650
|
-
}
|
|
89651
89497
|
listSubscribers(paramsOrFirst, ...rest) {
|
|
89652
89498
|
let params;
|
|
89653
89499
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -89790,11 +89636,13 @@ var Oauth2 = class {
|
|
|
89790
89636
|
} else {
|
|
89791
89637
|
params = {
|
|
89792
89638
|
grantId: paramsOrFirst,
|
|
89793
|
-
authorizationDetails: rest[0]
|
|
89639
|
+
authorizationDetails: rest[0],
|
|
89640
|
+
scope: rest[1]
|
|
89794
89641
|
};
|
|
89795
89642
|
}
|
|
89796
89643
|
const grantId = params.grantId;
|
|
89797
89644
|
const authorizationDetails = params.authorizationDetails;
|
|
89645
|
+
const scope = params.scope;
|
|
89798
89646
|
if (typeof grantId === "undefined") {
|
|
89799
89647
|
throw new AppwriteException('Missing required parameter: "grantId"');
|
|
89800
89648
|
}
|
|
@@ -89806,6 +89654,9 @@ var Oauth2 = class {
|
|
|
89806
89654
|
if (typeof authorizationDetails !== "undefined") {
|
|
89807
89655
|
payload["authorization_details"] = authorizationDetails;
|
|
89808
89656
|
}
|
|
89657
|
+
if (typeof scope !== "undefined") {
|
|
89658
|
+
payload["scope"] = scope;
|
|
89659
|
+
}
|
|
89809
89660
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
89810
89661
|
const apiHeaders = {
|
|
89811
89662
|
"content-type": "application/json",
|
|
@@ -89815,7 +89666,7 @@ var Oauth2 = class {
|
|
|
89815
89666
|
}
|
|
89816
89667
|
authorize(paramsOrFirst, ...rest) {
|
|
89817
89668
|
let params;
|
|
89818
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89669
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89819
89670
|
params = paramsOrFirst || {};
|
|
89820
89671
|
} else {
|
|
89821
89672
|
params = {
|
|
@@ -89830,7 +89681,8 @@ var Oauth2 = class {
|
|
|
89830
89681
|
prompt: rest[7],
|
|
89831
89682
|
maxAge: rest[8],
|
|
89832
89683
|
authorizationDetails: rest[9],
|
|
89833
|
-
resource: rest[10]
|
|
89684
|
+
resource: rest[10],
|
|
89685
|
+
requestUri: rest[11]
|
|
89834
89686
|
};
|
|
89835
89687
|
}
|
|
89836
89688
|
const clientId = params.clientId;
|
|
@@ -89845,18 +89697,7 @@ var Oauth2 = class {
|
|
|
89845
89697
|
const maxAge = params.maxAge;
|
|
89846
89698
|
const authorizationDetails = params.authorizationDetails;
|
|
89847
89699
|
const resource = params.resource;
|
|
89848
|
-
|
|
89849
|
-
throw new AppwriteException('Missing required parameter: "clientId"');
|
|
89850
|
-
}
|
|
89851
|
-
if (typeof redirectUri === "undefined") {
|
|
89852
|
-
throw new AppwriteException('Missing required parameter: "redirectUri"');
|
|
89853
|
-
}
|
|
89854
|
-
if (typeof responseType === "undefined") {
|
|
89855
|
-
throw new AppwriteException('Missing required parameter: "responseType"');
|
|
89856
|
-
}
|
|
89857
|
-
if (typeof scope === "undefined") {
|
|
89858
|
-
throw new AppwriteException('Missing required parameter: "scope"');
|
|
89859
|
-
}
|
|
89700
|
+
const requestUri = params.requestUri;
|
|
89860
89701
|
const apiPath = "/oauth2/{project_id}/authorize".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
|
|
89861
89702
|
const payload = {};
|
|
89862
89703
|
if (typeof clientId !== "undefined") {
|
|
@@ -89895,6 +89736,9 @@ var Oauth2 = class {
|
|
|
89895
89736
|
if (typeof resource !== "undefined") {
|
|
89896
89737
|
payload["resource"] = resource;
|
|
89897
89738
|
}
|
|
89739
|
+
if (typeof requestUri !== "undefined") {
|
|
89740
|
+
payload["request_uri"] = requestUri;
|
|
89741
|
+
}
|
|
89898
89742
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
89899
89743
|
const apiHeaders = {
|
|
89900
89744
|
"accept": "application/json"
|
|
@@ -90030,6 +89874,157 @@ var Oauth2 = class {
|
|
|
90030
89874
|
};
|
|
90031
89875
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
90032
89876
|
}
|
|
89877
|
+
listOrganizations(paramsOrFirst, ...rest) {
|
|
89878
|
+
let params;
|
|
89879
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89880
|
+
params = paramsOrFirst || {};
|
|
89881
|
+
} else {
|
|
89882
|
+
params = {
|
|
89883
|
+
limit: paramsOrFirst,
|
|
89884
|
+
offset: rest[0],
|
|
89885
|
+
search: rest[1]
|
|
89886
|
+
};
|
|
89887
|
+
}
|
|
89888
|
+
const limit = params.limit;
|
|
89889
|
+
const offset = params.offset;
|
|
89890
|
+
const search = params.search;
|
|
89891
|
+
const apiPath = "/oauth2/{project_id}/organizations".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
|
|
89892
|
+
const payload = {};
|
|
89893
|
+
if (typeof limit !== "undefined") {
|
|
89894
|
+
payload["limit"] = limit;
|
|
89895
|
+
}
|
|
89896
|
+
if (typeof offset !== "undefined") {
|
|
89897
|
+
payload["offset"] = offset;
|
|
89898
|
+
}
|
|
89899
|
+
if (typeof search !== "undefined") {
|
|
89900
|
+
payload["search"] = search;
|
|
89901
|
+
}
|
|
89902
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
89903
|
+
const apiHeaders = {
|
|
89904
|
+
"accept": "application/json"
|
|
89905
|
+
};
|
|
89906
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
89907
|
+
}
|
|
89908
|
+
createPAR(paramsOrFirst, ...rest) {
|
|
89909
|
+
let params;
|
|
89910
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
89911
|
+
params = paramsOrFirst || {};
|
|
89912
|
+
} else {
|
|
89913
|
+
params = {
|
|
89914
|
+
clientId: paramsOrFirst,
|
|
89915
|
+
redirectUri: rest[0],
|
|
89916
|
+
responseType: rest[1],
|
|
89917
|
+
scope: rest[2],
|
|
89918
|
+
state: rest[3],
|
|
89919
|
+
nonce: rest[4],
|
|
89920
|
+
codeChallenge: rest[5],
|
|
89921
|
+
codeChallengeMethod: rest[6],
|
|
89922
|
+
prompt: rest[7],
|
|
89923
|
+
maxAge: rest[8],
|
|
89924
|
+
authorizationDetails: rest[9],
|
|
89925
|
+
resource: rest[10]
|
|
89926
|
+
};
|
|
89927
|
+
}
|
|
89928
|
+
const clientId = params.clientId;
|
|
89929
|
+
const redirectUri = params.redirectUri;
|
|
89930
|
+
const responseType = params.responseType;
|
|
89931
|
+
const scope = params.scope;
|
|
89932
|
+
const state = params.state;
|
|
89933
|
+
const nonce = params.nonce;
|
|
89934
|
+
const codeChallenge = params.codeChallenge;
|
|
89935
|
+
const codeChallengeMethod = params.codeChallengeMethod;
|
|
89936
|
+
const prompt = params.prompt;
|
|
89937
|
+
const maxAge = params.maxAge;
|
|
89938
|
+
const authorizationDetails = params.authorizationDetails;
|
|
89939
|
+
const resource = params.resource;
|
|
89940
|
+
if (typeof clientId === "undefined") {
|
|
89941
|
+
throw new AppwriteException('Missing required parameter: "clientId"');
|
|
89942
|
+
}
|
|
89943
|
+
if (typeof redirectUri === "undefined") {
|
|
89944
|
+
throw new AppwriteException('Missing required parameter: "redirectUri"');
|
|
89945
|
+
}
|
|
89946
|
+
if (typeof responseType === "undefined") {
|
|
89947
|
+
throw new AppwriteException('Missing required parameter: "responseType"');
|
|
89948
|
+
}
|
|
89949
|
+
if (typeof scope === "undefined") {
|
|
89950
|
+
throw new AppwriteException('Missing required parameter: "scope"');
|
|
89951
|
+
}
|
|
89952
|
+
const apiPath = "/oauth2/{project_id}/par".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
|
|
89953
|
+
const payload = {};
|
|
89954
|
+
if (typeof clientId !== "undefined") {
|
|
89955
|
+
payload["client_id"] = clientId;
|
|
89956
|
+
}
|
|
89957
|
+
if (typeof redirectUri !== "undefined") {
|
|
89958
|
+
payload["redirect_uri"] = redirectUri;
|
|
89959
|
+
}
|
|
89960
|
+
if (typeof responseType !== "undefined") {
|
|
89961
|
+
payload["response_type"] = responseType;
|
|
89962
|
+
}
|
|
89963
|
+
if (typeof scope !== "undefined") {
|
|
89964
|
+
payload["scope"] = scope;
|
|
89965
|
+
}
|
|
89966
|
+
if (typeof state !== "undefined") {
|
|
89967
|
+
payload["state"] = state;
|
|
89968
|
+
}
|
|
89969
|
+
if (typeof nonce !== "undefined") {
|
|
89970
|
+
payload["nonce"] = nonce;
|
|
89971
|
+
}
|
|
89972
|
+
if (typeof codeChallenge !== "undefined") {
|
|
89973
|
+
payload["code_challenge"] = codeChallenge;
|
|
89974
|
+
}
|
|
89975
|
+
if (typeof codeChallengeMethod !== "undefined") {
|
|
89976
|
+
payload["code_challenge_method"] = codeChallengeMethod;
|
|
89977
|
+
}
|
|
89978
|
+
if (typeof prompt !== "undefined") {
|
|
89979
|
+
payload["prompt"] = prompt;
|
|
89980
|
+
}
|
|
89981
|
+
if (typeof maxAge !== "undefined") {
|
|
89982
|
+
payload["max_age"] = maxAge;
|
|
89983
|
+
}
|
|
89984
|
+
if (typeof authorizationDetails !== "undefined") {
|
|
89985
|
+
payload["authorization_details"] = authorizationDetails;
|
|
89986
|
+
}
|
|
89987
|
+
if (typeof resource !== "undefined") {
|
|
89988
|
+
payload["resource"] = resource;
|
|
89989
|
+
}
|
|
89990
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
89991
|
+
const apiHeaders = {
|
|
89992
|
+
"content-type": "application/json",
|
|
89993
|
+
"accept": "application/json"
|
|
89994
|
+
};
|
|
89995
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
89996
|
+
}
|
|
89997
|
+
listProjects(paramsOrFirst, ...rest) {
|
|
89998
|
+
let params;
|
|
89999
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90000
|
+
params = paramsOrFirst || {};
|
|
90001
|
+
} else {
|
|
90002
|
+
params = {
|
|
90003
|
+
limit: paramsOrFirst,
|
|
90004
|
+
offset: rest[0],
|
|
90005
|
+
search: rest[1]
|
|
90006
|
+
};
|
|
90007
|
+
}
|
|
90008
|
+
const limit = params.limit;
|
|
90009
|
+
const offset = params.offset;
|
|
90010
|
+
const search = params.search;
|
|
90011
|
+
const apiPath = "/oauth2/{project_id}/projects".replace("{project_id}", encodeURIComponent(String(this.client.config.project)));
|
|
90012
|
+
const payload = {};
|
|
90013
|
+
if (typeof limit !== "undefined") {
|
|
90014
|
+
payload["limit"] = limit;
|
|
90015
|
+
}
|
|
90016
|
+
if (typeof offset !== "undefined") {
|
|
90017
|
+
payload["offset"] = offset;
|
|
90018
|
+
}
|
|
90019
|
+
if (typeof search !== "undefined") {
|
|
90020
|
+
payload["search"] = search;
|
|
90021
|
+
}
|
|
90022
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90023
|
+
const apiHeaders = {
|
|
90024
|
+
"accept": "application/json"
|
|
90025
|
+
};
|
|
90026
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
90027
|
+
}
|
|
90033
90028
|
reject(paramsOrFirst) {
|
|
90034
90029
|
let params;
|
|
90035
90030
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -90165,6 +90160,64 @@ var Organization = class {
|
|
|
90165
90160
|
constructor(client) {
|
|
90166
90161
|
this.client = client;
|
|
90167
90162
|
}
|
|
90163
|
+
/**
|
|
90164
|
+
* Get the current organization.
|
|
90165
|
+
*
|
|
90166
|
+
* @throws {AppwriteException}
|
|
90167
|
+
* @returns {Promise<Models.Organization<Preferences>>}
|
|
90168
|
+
*/
|
|
90169
|
+
get() {
|
|
90170
|
+
const apiPath = "/organization";
|
|
90171
|
+
const payload = {};
|
|
90172
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90173
|
+
const apiHeaders = {
|
|
90174
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
90175
|
+
"accept": "application/json"
|
|
90176
|
+
};
|
|
90177
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
90178
|
+
}
|
|
90179
|
+
update(paramsOrFirst) {
|
|
90180
|
+
let params;
|
|
90181
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90182
|
+
params = paramsOrFirst || {};
|
|
90183
|
+
} else {
|
|
90184
|
+
params = {
|
|
90185
|
+
name: paramsOrFirst
|
|
90186
|
+
};
|
|
90187
|
+
}
|
|
90188
|
+
const name = params.name;
|
|
90189
|
+
if (typeof name === "undefined") {
|
|
90190
|
+
throw new AppwriteException('Missing required parameter: "name"');
|
|
90191
|
+
}
|
|
90192
|
+
const apiPath = "/organization";
|
|
90193
|
+
const payload = {};
|
|
90194
|
+
if (typeof name !== "undefined") {
|
|
90195
|
+
payload["name"] = name;
|
|
90196
|
+
}
|
|
90197
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90198
|
+
const apiHeaders = {
|
|
90199
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
90200
|
+
"content-type": "application/json",
|
|
90201
|
+
"accept": "application/json"
|
|
90202
|
+
};
|
|
90203
|
+
return this.client.call("put", uri, apiHeaders, payload);
|
|
90204
|
+
}
|
|
90205
|
+
/**
|
|
90206
|
+
* Delete the current organization. All projects that belong to the organization are deleted as well.
|
|
90207
|
+
*
|
|
90208
|
+
* @throws {AppwriteException}
|
|
90209
|
+
* @returns {Promise<{}>}
|
|
90210
|
+
*/
|
|
90211
|
+
delete() {
|
|
90212
|
+
const apiPath = "/organization";
|
|
90213
|
+
const payload = {};
|
|
90214
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90215
|
+
const apiHeaders = {
|
|
90216
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
90217
|
+
"content-type": "application/json"
|
|
90218
|
+
};
|
|
90219
|
+
return this.client.call("delete", uri, apiHeaders, payload);
|
|
90220
|
+
}
|
|
90168
90221
|
listKeys(paramsOrFirst, ...rest) {
|
|
90169
90222
|
let params;
|
|
90170
90223
|
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -90327,6 +90380,164 @@ var Organization = class {
|
|
|
90327
90380
|
};
|
|
90328
90381
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
90329
90382
|
}
|
|
90383
|
+
listMemberships(paramsOrFirst, ...rest) {
|
|
90384
|
+
let params;
|
|
90385
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90386
|
+
params = paramsOrFirst || {};
|
|
90387
|
+
} else {
|
|
90388
|
+
params = {
|
|
90389
|
+
queries: paramsOrFirst,
|
|
90390
|
+
search: rest[0],
|
|
90391
|
+
total: rest[1]
|
|
90392
|
+
};
|
|
90393
|
+
}
|
|
90394
|
+
const queries = params.queries;
|
|
90395
|
+
const search = params.search;
|
|
90396
|
+
const total = params.total;
|
|
90397
|
+
const apiPath = "/organization/memberships";
|
|
90398
|
+
const payload = {};
|
|
90399
|
+
if (typeof queries !== "undefined") {
|
|
90400
|
+
payload["queries"] = queries;
|
|
90401
|
+
}
|
|
90402
|
+
if (typeof search !== "undefined") {
|
|
90403
|
+
payload["search"] = search;
|
|
90404
|
+
}
|
|
90405
|
+
if (typeof total !== "undefined") {
|
|
90406
|
+
payload["total"] = total;
|
|
90407
|
+
}
|
|
90408
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90409
|
+
const apiHeaders = {
|
|
90410
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
90411
|
+
"accept": "application/json"
|
|
90412
|
+
};
|
|
90413
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
90414
|
+
}
|
|
90415
|
+
createMembership(paramsOrFirst, ...rest) {
|
|
90416
|
+
let params;
|
|
90417
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90418
|
+
params = paramsOrFirst || {};
|
|
90419
|
+
} else {
|
|
90420
|
+
params = {
|
|
90421
|
+
roles: paramsOrFirst,
|
|
90422
|
+
email: rest[0],
|
|
90423
|
+
userId: rest[1],
|
|
90424
|
+
phone: rest[2],
|
|
90425
|
+
url: rest[3],
|
|
90426
|
+
name: rest[4]
|
|
90427
|
+
};
|
|
90428
|
+
}
|
|
90429
|
+
const roles = params.roles;
|
|
90430
|
+
const email3 = params.email;
|
|
90431
|
+
const userId = params.userId;
|
|
90432
|
+
const phone = params.phone;
|
|
90433
|
+
const url2 = params.url;
|
|
90434
|
+
const name = params.name;
|
|
90435
|
+
if (typeof roles === "undefined") {
|
|
90436
|
+
throw new AppwriteException('Missing required parameter: "roles"');
|
|
90437
|
+
}
|
|
90438
|
+
const apiPath = "/organization/memberships";
|
|
90439
|
+
const payload = {};
|
|
90440
|
+
if (typeof email3 !== "undefined") {
|
|
90441
|
+
payload["email"] = email3;
|
|
90442
|
+
}
|
|
90443
|
+
if (typeof userId !== "undefined") {
|
|
90444
|
+
payload["userId"] = userId;
|
|
90445
|
+
}
|
|
90446
|
+
if (typeof phone !== "undefined") {
|
|
90447
|
+
payload["phone"] = phone;
|
|
90448
|
+
}
|
|
90449
|
+
if (typeof roles !== "undefined") {
|
|
90450
|
+
payload["roles"] = roles;
|
|
90451
|
+
}
|
|
90452
|
+
if (typeof url2 !== "undefined") {
|
|
90453
|
+
payload["url"] = url2;
|
|
90454
|
+
}
|
|
90455
|
+
if (typeof name !== "undefined") {
|
|
90456
|
+
payload["name"] = name;
|
|
90457
|
+
}
|
|
90458
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90459
|
+
const apiHeaders = {
|
|
90460
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
90461
|
+
"content-type": "application/json",
|
|
90462
|
+
"accept": "application/json"
|
|
90463
|
+
};
|
|
90464
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
90465
|
+
}
|
|
90466
|
+
getMembership(paramsOrFirst) {
|
|
90467
|
+
let params;
|
|
90468
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90469
|
+
params = paramsOrFirst || {};
|
|
90470
|
+
} else {
|
|
90471
|
+
params = {
|
|
90472
|
+
membershipId: paramsOrFirst
|
|
90473
|
+
};
|
|
90474
|
+
}
|
|
90475
|
+
const membershipId = params.membershipId;
|
|
90476
|
+
if (typeof membershipId === "undefined") {
|
|
90477
|
+
throw new AppwriteException('Missing required parameter: "membershipId"');
|
|
90478
|
+
}
|
|
90479
|
+
const apiPath = "/organization/memberships/{membershipId}".replace("{membershipId}", encodeURIComponent(String(membershipId)));
|
|
90480
|
+
const payload = {};
|
|
90481
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90482
|
+
const apiHeaders = {
|
|
90483
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
90484
|
+
"accept": "application/json"
|
|
90485
|
+
};
|
|
90486
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
90487
|
+
}
|
|
90488
|
+
updateMembership(paramsOrFirst, ...rest) {
|
|
90489
|
+
let params;
|
|
90490
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90491
|
+
params = paramsOrFirst || {};
|
|
90492
|
+
} else {
|
|
90493
|
+
params = {
|
|
90494
|
+
membershipId: paramsOrFirst,
|
|
90495
|
+
roles: rest[0]
|
|
90496
|
+
};
|
|
90497
|
+
}
|
|
90498
|
+
const membershipId = params.membershipId;
|
|
90499
|
+
const roles = params.roles;
|
|
90500
|
+
if (typeof membershipId === "undefined") {
|
|
90501
|
+
throw new AppwriteException('Missing required parameter: "membershipId"');
|
|
90502
|
+
}
|
|
90503
|
+
if (typeof roles === "undefined") {
|
|
90504
|
+
throw new AppwriteException('Missing required parameter: "roles"');
|
|
90505
|
+
}
|
|
90506
|
+
const apiPath = "/organization/memberships/{membershipId}".replace("{membershipId}", encodeURIComponent(String(membershipId)));
|
|
90507
|
+
const payload = {};
|
|
90508
|
+
if (typeof roles !== "undefined") {
|
|
90509
|
+
payload["roles"] = roles;
|
|
90510
|
+
}
|
|
90511
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90512
|
+
const apiHeaders = {
|
|
90513
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
90514
|
+
"content-type": "application/json",
|
|
90515
|
+
"accept": "application/json"
|
|
90516
|
+
};
|
|
90517
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
90518
|
+
}
|
|
90519
|
+
deleteMembership(paramsOrFirst) {
|
|
90520
|
+
let params;
|
|
90521
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90522
|
+
params = paramsOrFirst || {};
|
|
90523
|
+
} else {
|
|
90524
|
+
params = {
|
|
90525
|
+
membershipId: paramsOrFirst
|
|
90526
|
+
};
|
|
90527
|
+
}
|
|
90528
|
+
const membershipId = params.membershipId;
|
|
90529
|
+
if (typeof membershipId === "undefined") {
|
|
90530
|
+
throw new AppwriteException('Missing required parameter: "membershipId"');
|
|
90531
|
+
}
|
|
90532
|
+
const apiPath = "/organization/memberships/{membershipId}".replace("{membershipId}", encodeURIComponent(String(membershipId)));
|
|
90533
|
+
const payload = {};
|
|
90534
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90535
|
+
const apiHeaders = {
|
|
90536
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
90537
|
+
"content-type": "application/json"
|
|
90538
|
+
};
|
|
90539
|
+
return this.client.call("delete", uri, apiHeaders, payload);
|
|
90540
|
+
}
|
|
90330
90541
|
listProjects(paramsOrFirst, ...rest) {
|
|
90331
90542
|
let params;
|
|
90332
90543
|
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -90695,6 +90906,29 @@ var Organizations = class {
|
|
|
90695
90906
|
};
|
|
90696
90907
|
return this.client.call("post", uri, apiHeaders, payload);
|
|
90697
90908
|
}
|
|
90909
|
+
createPremiumGeoDBAddon(paramsOrFirst) {
|
|
90910
|
+
let params;
|
|
90911
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
90912
|
+
params = paramsOrFirst || {};
|
|
90913
|
+
} else {
|
|
90914
|
+
params = {
|
|
90915
|
+
organizationId: paramsOrFirst
|
|
90916
|
+
};
|
|
90917
|
+
}
|
|
90918
|
+
const organizationId = params.organizationId;
|
|
90919
|
+
if (typeof organizationId === "undefined") {
|
|
90920
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
90921
|
+
}
|
|
90922
|
+
const apiPath = "/organizations/{organizationId}/addons/premium-geo-db".replace("{organizationId}", encodeURIComponent(String(organizationId)));
|
|
90923
|
+
const payload = {};
|
|
90924
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
90925
|
+
const apiHeaders = {
|
|
90926
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
90927
|
+
"content-type": "application/json",
|
|
90928
|
+
"accept": "application/json"
|
|
90929
|
+
};
|
|
90930
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
90931
|
+
}
|
|
90698
90932
|
getAddon(paramsOrFirst, ...rest) {
|
|
90699
90933
|
let params;
|
|
90700
90934
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -93240,7 +93474,9 @@ var Project = class {
|
|
|
93240
93474
|
authorizationURL: rest[2],
|
|
93241
93475
|
tokenURL: rest[3],
|
|
93242
93476
|
userInfoURL: rest[4],
|
|
93243
|
-
|
|
93477
|
+
prompt: rest[5],
|
|
93478
|
+
maxAge: rest[6],
|
|
93479
|
+
enabled: rest[7]
|
|
93244
93480
|
};
|
|
93245
93481
|
}
|
|
93246
93482
|
const clientId = params.clientId;
|
|
@@ -93249,6 +93485,8 @@ var Project = class {
|
|
|
93249
93485
|
const authorizationURL = params.authorizationURL;
|
|
93250
93486
|
const tokenURL = params.tokenURL;
|
|
93251
93487
|
const userInfoURL = params.userInfoURL;
|
|
93488
|
+
const prompt = params.prompt;
|
|
93489
|
+
const maxAge = params.maxAge;
|
|
93252
93490
|
const enabled = params.enabled;
|
|
93253
93491
|
const apiPath = "/project/oauth2/oidc";
|
|
93254
93492
|
const payload = {};
|
|
@@ -93270,6 +93508,12 @@ var Project = class {
|
|
|
93270
93508
|
if (typeof userInfoURL !== "undefined") {
|
|
93271
93509
|
payload["userInfoURL"] = userInfoURL;
|
|
93272
93510
|
}
|
|
93511
|
+
if (typeof prompt !== "undefined") {
|
|
93512
|
+
payload["prompt"] = prompt;
|
|
93513
|
+
}
|
|
93514
|
+
if (typeof maxAge !== "undefined") {
|
|
93515
|
+
payload["maxAge"] = maxAge;
|
|
93516
|
+
}
|
|
93273
93517
|
if (typeof enabled !== "undefined") {
|
|
93274
93518
|
payload["enabled"] = enabled;
|
|
93275
93519
|
}
|
|
@@ -97359,13 +97603,13 @@ var TablesDB = class {
|
|
|
97359
97603
|
databaseId: paramsOrFirst,
|
|
97360
97604
|
name: rest[0],
|
|
97361
97605
|
enabled: rest[1],
|
|
97362
|
-
|
|
97606
|
+
specification: rest[2]
|
|
97363
97607
|
};
|
|
97364
97608
|
}
|
|
97365
97609
|
const databaseId = params.databaseId;
|
|
97366
97610
|
const name = params.name;
|
|
97367
97611
|
const enabled = params.enabled;
|
|
97368
|
-
const
|
|
97612
|
+
const specification = params.specification;
|
|
97369
97613
|
if (typeof databaseId === "undefined") {
|
|
97370
97614
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
97371
97615
|
}
|
|
@@ -97383,8 +97627,8 @@ var TablesDB = class {
|
|
|
97383
97627
|
if (typeof enabled !== "undefined") {
|
|
97384
97628
|
payload["enabled"] = enabled;
|
|
97385
97629
|
}
|
|
97386
|
-
if (typeof
|
|
97387
|
-
payload["
|
|
97630
|
+
if (typeof specification !== "undefined") {
|
|
97631
|
+
payload["specification"] = specification;
|
|
97388
97632
|
}
|
|
97389
97633
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
97390
97634
|
const apiHeaders = {
|
|
@@ -97643,6 +97887,114 @@ var TablesDB = class {
|
|
|
97643
97887
|
};
|
|
97644
97888
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
97645
97889
|
}
|
|
97890
|
+
listMigrations(paramsOrFirst) {
|
|
97891
|
+
let params;
|
|
97892
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
97893
|
+
params = paramsOrFirst || {};
|
|
97894
|
+
} else {
|
|
97895
|
+
params = {
|
|
97896
|
+
databaseId: paramsOrFirst
|
|
97897
|
+
};
|
|
97898
|
+
}
|
|
97899
|
+
const databaseId = params.databaseId;
|
|
97900
|
+
if (typeof databaseId === "undefined") {
|
|
97901
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
97902
|
+
}
|
|
97903
|
+
const apiPath = "/tablesdb/{databaseId}/migrations".replace("{databaseId}", encodeURIComponent(String(databaseId)));
|
|
97904
|
+
const payload = {};
|
|
97905
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
97906
|
+
const apiHeaders = {
|
|
97907
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
97908
|
+
"accept": "application/json"
|
|
97909
|
+
};
|
|
97910
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
97911
|
+
}
|
|
97912
|
+
createMigration(paramsOrFirst, ...rest) {
|
|
97913
|
+
let params;
|
|
97914
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
97915
|
+
params = paramsOrFirst || {};
|
|
97916
|
+
} else {
|
|
97917
|
+
params = {
|
|
97918
|
+
databaseId: paramsOrFirst,
|
|
97919
|
+
specification: rest[0]
|
|
97920
|
+
};
|
|
97921
|
+
}
|
|
97922
|
+
const databaseId = params.databaseId;
|
|
97923
|
+
const specification = params.specification;
|
|
97924
|
+
if (typeof databaseId === "undefined") {
|
|
97925
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
97926
|
+
}
|
|
97927
|
+
if (typeof specification === "undefined") {
|
|
97928
|
+
throw new AppwriteException('Missing required parameter: "specification"');
|
|
97929
|
+
}
|
|
97930
|
+
const apiPath = "/tablesdb/{databaseId}/migrations".replace("{databaseId}", encodeURIComponent(String(databaseId)));
|
|
97931
|
+
const payload = {};
|
|
97932
|
+
if (typeof specification !== "undefined") {
|
|
97933
|
+
payload["specification"] = specification;
|
|
97934
|
+
}
|
|
97935
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
97936
|
+
const apiHeaders = {
|
|
97937
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
97938
|
+
"content-type": "application/json",
|
|
97939
|
+
"accept": "application/json"
|
|
97940
|
+
};
|
|
97941
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
97942
|
+
}
|
|
97943
|
+
getMigration(paramsOrFirst, ...rest) {
|
|
97944
|
+
let params;
|
|
97945
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
97946
|
+
params = paramsOrFirst || {};
|
|
97947
|
+
} else {
|
|
97948
|
+
params = {
|
|
97949
|
+
databaseId: paramsOrFirst,
|
|
97950
|
+
migrationId: rest[0]
|
|
97951
|
+
};
|
|
97952
|
+
}
|
|
97953
|
+
const databaseId = params.databaseId;
|
|
97954
|
+
const migrationId = params.migrationId;
|
|
97955
|
+
if (typeof databaseId === "undefined") {
|
|
97956
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
97957
|
+
}
|
|
97958
|
+
if (typeof migrationId === "undefined") {
|
|
97959
|
+
throw new AppwriteException('Missing required parameter: "migrationId"');
|
|
97960
|
+
}
|
|
97961
|
+
const apiPath = "/tablesdb/{databaseId}/migrations/{migrationId}".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{migrationId}", encodeURIComponent(String(migrationId)));
|
|
97962
|
+
const payload = {};
|
|
97963
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
97964
|
+
const apiHeaders = {
|
|
97965
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
97966
|
+
"accept": "application/json"
|
|
97967
|
+
};
|
|
97968
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
97969
|
+
}
|
|
97970
|
+
deleteMigration(paramsOrFirst, ...rest) {
|
|
97971
|
+
let params;
|
|
97972
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
97973
|
+
params = paramsOrFirst || {};
|
|
97974
|
+
} else {
|
|
97975
|
+
params = {
|
|
97976
|
+
databaseId: paramsOrFirst,
|
|
97977
|
+
migrationId: rest[0]
|
|
97978
|
+
};
|
|
97979
|
+
}
|
|
97980
|
+
const databaseId = params.databaseId;
|
|
97981
|
+
const migrationId = params.migrationId;
|
|
97982
|
+
if (typeof databaseId === "undefined") {
|
|
97983
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
97984
|
+
}
|
|
97985
|
+
if (typeof migrationId === "undefined") {
|
|
97986
|
+
throw new AppwriteException('Missing required parameter: "migrationId"');
|
|
97987
|
+
}
|
|
97988
|
+
const apiPath = "/tablesdb/{databaseId}/migrations/{migrationId}".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{migrationId}", encodeURIComponent(String(migrationId)));
|
|
97989
|
+
const payload = {};
|
|
97990
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
97991
|
+
const apiHeaders = {
|
|
97992
|
+
"X-Appwrite-Project": this.client.config.project,
|
|
97993
|
+
"content-type": "application/json",
|
|
97994
|
+
"accept": "application/json"
|
|
97995
|
+
};
|
|
97996
|
+
return this.client.call("delete", uri, apiHeaders, payload);
|
|
97997
|
+
}
|
|
97646
97998
|
listTables(paramsOrFirst, ...rest) {
|
|
97647
97999
|
let params;
|
|
97648
98000
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -100161,38 +100513,6 @@ var TablesDB = class {
|
|
|
100161
100513
|
};
|
|
100162
100514
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
100163
100515
|
}
|
|
100164
|
-
listTableLogs(paramsOrFirst, ...rest) {
|
|
100165
|
-
let params;
|
|
100166
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
100167
|
-
params = paramsOrFirst || {};
|
|
100168
|
-
} else {
|
|
100169
|
-
params = {
|
|
100170
|
-
databaseId: paramsOrFirst,
|
|
100171
|
-
tableId: rest[0],
|
|
100172
|
-
queries: rest[1]
|
|
100173
|
-
};
|
|
100174
|
-
}
|
|
100175
|
-
const databaseId = params.databaseId;
|
|
100176
|
-
const tableId = params.tableId;
|
|
100177
|
-
const queries = params.queries;
|
|
100178
|
-
if (typeof databaseId === "undefined") {
|
|
100179
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
100180
|
-
}
|
|
100181
|
-
if (typeof tableId === "undefined") {
|
|
100182
|
-
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
100183
|
-
}
|
|
100184
|
-
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{tableId}", encodeURIComponent(String(tableId)));
|
|
100185
|
-
const payload = {};
|
|
100186
|
-
if (typeof queries !== "undefined") {
|
|
100187
|
-
payload["queries"] = queries;
|
|
100188
|
-
}
|
|
100189
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
100190
|
-
const apiHeaders = {
|
|
100191
|
-
"X-Appwrite-Project": this.client.config.project,
|
|
100192
|
-
"accept": "application/json"
|
|
100193
|
-
};
|
|
100194
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
100195
|
-
}
|
|
100196
100516
|
listRows(paramsOrFirst, ...rest) {
|
|
100197
100517
|
let params;
|
|
100198
100518
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -100632,43 +100952,6 @@ var TablesDB = class {
|
|
|
100632
100952
|
};
|
|
100633
100953
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
100634
100954
|
}
|
|
100635
|
-
listRowLogs(paramsOrFirst, ...rest) {
|
|
100636
|
-
let params;
|
|
100637
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
100638
|
-
params = paramsOrFirst || {};
|
|
100639
|
-
} else {
|
|
100640
|
-
params = {
|
|
100641
|
-
databaseId: paramsOrFirst,
|
|
100642
|
-
tableId: rest[0],
|
|
100643
|
-
rowId: rest[1],
|
|
100644
|
-
queries: rest[2]
|
|
100645
|
-
};
|
|
100646
|
-
}
|
|
100647
|
-
const databaseId = params.databaseId;
|
|
100648
|
-
const tableId = params.tableId;
|
|
100649
|
-
const rowId = params.rowId;
|
|
100650
|
-
const queries = params.queries;
|
|
100651
|
-
if (typeof databaseId === "undefined") {
|
|
100652
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
100653
|
-
}
|
|
100654
|
-
if (typeof tableId === "undefined") {
|
|
100655
|
-
throw new AppwriteException('Missing required parameter: "tableId"');
|
|
100656
|
-
}
|
|
100657
|
-
if (typeof rowId === "undefined") {
|
|
100658
|
-
throw new AppwriteException('Missing required parameter: "rowId"');
|
|
100659
|
-
}
|
|
100660
|
-
const apiPath = "/tablesdb/{databaseId}/tables/{tableId}/rows/{rowId}/logs".replace("{databaseId}", encodeURIComponent(String(databaseId))).replace("{tableId}", encodeURIComponent(String(tableId))).replace("{rowId}", encodeURIComponent(String(rowId)));
|
|
100661
|
-
const payload = {};
|
|
100662
|
-
if (typeof queries !== "undefined") {
|
|
100663
|
-
payload["queries"] = queries;
|
|
100664
|
-
}
|
|
100665
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
100666
|
-
const apiHeaders = {
|
|
100667
|
-
"X-Appwrite-Project": this.client.config.project,
|
|
100668
|
-
"accept": "application/json"
|
|
100669
|
-
};
|
|
100670
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
100671
|
-
}
|
|
100672
100955
|
decrementRowColumn(paramsOrFirst, ...rest) {
|
|
100673
100956
|
let params;
|
|
100674
100957
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -102502,6 +102785,7 @@ var QuerySuggestionResource;
|
|
|
102502
102785
|
QuerySuggestionResource2["Keys"] = "keys";
|
|
102503
102786
|
QuerySuggestionResource2["DevKeys"] = "devkeys";
|
|
102504
102787
|
QuerySuggestionResource2["Webhooks"] = "webhooks";
|
|
102788
|
+
QuerySuggestionResource2["Notifications"] = "notifications";
|
|
102505
102789
|
QuerySuggestionResource2["Certificates"] = "certificates";
|
|
102506
102790
|
QuerySuggestionResource2["Realtime"] = "realtime";
|
|
102507
102791
|
QuerySuggestionResource2["Rules"] = "rules";
|
|
@@ -102545,6 +102829,8 @@ var QuerySuggestionResource;
|
|
|
102545
102829
|
QuerySuggestionResource2["Feedbacks"] = "feedbacks";
|
|
102546
102830
|
QuerySuggestionResource2["Disputes"] = "disputes";
|
|
102547
102831
|
QuerySuggestionResource2["ShInstallations"] = "sh_installations";
|
|
102832
|
+
QuerySuggestionResource2["MigrationDatabases"] = "migrationdatabases";
|
|
102833
|
+
QuerySuggestionResource2["MigrationProjects"] = "migrationprojects";
|
|
102548
102834
|
QuerySuggestionResource2["Apps"] = "apps";
|
|
102549
102835
|
QuerySuggestionResource2["AppSecrets"] = "appsecrets";
|
|
102550
102836
|
QuerySuggestionResource2["Oauth2Grants"] = "oauth2grants";
|
|
@@ -102868,8 +103154,12 @@ var ProjectKeyScopes;
|
|
|
102868
103154
|
ProjectKeyScopes2["PoliciesWrite"] = "policies.write";
|
|
102869
103155
|
ProjectKeyScopes2["ProjectPoliciesRead"] = "project.policies.read";
|
|
102870
103156
|
ProjectKeyScopes2["ProjectPoliciesWrite"] = "project.policies.write";
|
|
103157
|
+
ProjectKeyScopes2["ProjectOauth2Read"] = "project.oauth2.read";
|
|
103158
|
+
ProjectKeyScopes2["ProjectOauth2Write"] = "project.oauth2.write";
|
|
102871
103159
|
ProjectKeyScopes2["TemplatesRead"] = "templates.read";
|
|
102872
103160
|
ProjectKeyScopes2["TemplatesWrite"] = "templates.write";
|
|
103161
|
+
ProjectKeyScopes2["StagesRead"] = "stages.read";
|
|
103162
|
+
ProjectKeyScopes2["StagesWrite"] = "stages.write";
|
|
102873
103163
|
ProjectKeyScopes2["Oauth2Read"] = "oauth2.read";
|
|
102874
103164
|
ProjectKeyScopes2["Oauth2Write"] = "oauth2.write";
|
|
102875
103165
|
ProjectKeyScopes2["UsersRead"] = "users.read";
|
|
@@ -103006,6 +103296,7 @@ var HealthQueueName;
|
|
|
103006
103296
|
HealthQueueName2["V1screenshots"] = "v1-screenshots";
|
|
103007
103297
|
HealthQueueName2["V1messaging"] = "v1-messaging";
|
|
103008
103298
|
HealthQueueName2["V1migrations"] = "v1-migrations";
|
|
103299
|
+
HealthQueueName2["V1notifications"] = "v1-notifications";
|
|
103009
103300
|
})(HealthQueueName || (HealthQueueName = {}));
|
|
103010
103301
|
var BlockResourceType;
|
|
103011
103302
|
(function(BlockResourceType2) {
|
|
@@ -103019,6 +103310,11 @@ var BlockResourceType;
|
|
|
103019
103310
|
BlockResourceType2["Subscribers"] = "subscribers";
|
|
103020
103311
|
BlockResourceType2["Messages"] = "messages";
|
|
103021
103312
|
})(BlockResourceType || (BlockResourceType = {}));
|
|
103313
|
+
var BlockMode;
|
|
103314
|
+
(function(BlockMode2) {
|
|
103315
|
+
BlockMode2["Full"] = "full";
|
|
103316
|
+
BlockMode2["Readonly"] = "readonly";
|
|
103317
|
+
})(BlockMode || (BlockMode = {}));
|
|
103022
103318
|
var Region;
|
|
103023
103319
|
(function(Region2) {
|
|
103024
103320
|
Region2["Fra"] = "fra";
|
|
@@ -103151,6 +103447,10 @@ var OrganizationKeyScopes;
|
|
|
103151
103447
|
OrganizationKeyScopes2["DevKeysWrite"] = "devKeys.write";
|
|
103152
103448
|
OrganizationKeyScopes2["OrganizationKeysRead"] = "organization.keys.read";
|
|
103153
103449
|
OrganizationKeyScopes2["OrganizationKeysWrite"] = "organization.keys.write";
|
|
103450
|
+
OrganizationKeyScopes2["OrganizationMembershipsRead"] = "organization.memberships.read";
|
|
103451
|
+
OrganizationKeyScopes2["OrganizationMembershipsWrite"] = "organization.memberships.write";
|
|
103452
|
+
OrganizationKeyScopes2["OrganizationRead"] = "organization.read";
|
|
103453
|
+
OrganizationKeyScopes2["OrganizationWrite"] = "organization.write";
|
|
103154
103454
|
OrganizationKeyScopes2["DomainsRead"] = "domains.read";
|
|
103155
103455
|
OrganizationKeyScopes2["DomainsWrite"] = "domains.write";
|
|
103156
103456
|
OrganizationKeyScopes2["KeysRead"] = "keys.read";
|
|
@@ -103159,6 +103459,8 @@ var OrganizationKeyScopes;
|
|
|
103159
103459
|
var Addon;
|
|
103160
103460
|
(function(Addon2) {
|
|
103161
103461
|
Addon2["Baa"] = "baa";
|
|
103462
|
+
Addon2["Premiumgeodb"] = "premiumgeodb";
|
|
103463
|
+
Addon2["Premiumgeodborg"] = "premiumgeodborg";
|
|
103162
103464
|
Addon2["BackupRecovery"] = "backup_recovery";
|
|
103163
103465
|
})(Addon || (Addon = {}));
|
|
103164
103466
|
var ProjectAuthMethodId;
|
|
@@ -103177,6 +103479,13 @@ var ProjectOAuth2GooglePrompt;
|
|
|
103177
103479
|
ProjectOAuth2GooglePrompt2["Consent"] = "consent";
|
|
103178
103480
|
ProjectOAuth2GooglePrompt2["SelectAccount"] = "select_account";
|
|
103179
103481
|
})(ProjectOAuth2GooglePrompt || (ProjectOAuth2GooglePrompt = {}));
|
|
103482
|
+
var ProjectOAuth2OidcPrompt;
|
|
103483
|
+
(function(ProjectOAuth2OidcPrompt2) {
|
|
103484
|
+
ProjectOAuth2OidcPrompt2["None"] = "none";
|
|
103485
|
+
ProjectOAuth2OidcPrompt2["Login"] = "login";
|
|
103486
|
+
ProjectOAuth2OidcPrompt2["Consent"] = "consent";
|
|
103487
|
+
ProjectOAuth2OidcPrompt2["SelectAccount"] = "select_account";
|
|
103488
|
+
})(ProjectOAuth2OidcPrompt || (ProjectOAuth2OidcPrompt = {}));
|
|
103180
103489
|
var ProjectOAuthProviderId;
|
|
103181
103490
|
(function(ProjectOAuthProviderId2) {
|
|
103182
103491
|
ProjectOAuthProviderId2["Amazon"] = "amazon";
|
|
@@ -103503,6 +103812,12 @@ var DatabaseType;
|
|
|
103503
103812
|
DatabaseType2["Documentsdb"] = "documentsdb";
|
|
103504
103813
|
DatabaseType2["Vectorsdb"] = "vectorsdb";
|
|
103505
103814
|
})(DatabaseType || (DatabaseType = {}));
|
|
103815
|
+
var DatabaseStatus;
|
|
103816
|
+
(function(DatabaseStatus2) {
|
|
103817
|
+
DatabaseStatus2["Provisioning"] = "provisioning";
|
|
103818
|
+
DatabaseStatus2["Ready"] = "ready";
|
|
103819
|
+
DatabaseStatus2["Failed"] = "failed";
|
|
103820
|
+
})(DatabaseStatus || (DatabaseStatus = {}));
|
|
103506
103821
|
var AttributeStatus;
|
|
103507
103822
|
(function(AttributeStatus2) {
|
|
103508
103823
|
AttributeStatus2["Available"] = "available";
|
|
@@ -103564,6 +103879,13 @@ var OAuth2GooglePrompt;
|
|
|
103564
103879
|
OAuth2GooglePrompt2["Consent"] = "consent";
|
|
103565
103880
|
OAuth2GooglePrompt2["SelectAccount"] = "select_account";
|
|
103566
103881
|
})(OAuth2GooglePrompt || (OAuth2GooglePrompt = {}));
|
|
103882
|
+
var OAuth2OidcPrompt;
|
|
103883
|
+
(function(OAuth2OidcPrompt2) {
|
|
103884
|
+
OAuth2OidcPrompt2["None"] = "none";
|
|
103885
|
+
OAuth2OidcPrompt2["Login"] = "login";
|
|
103886
|
+
OAuth2OidcPrompt2["Consent"] = "consent";
|
|
103887
|
+
OAuth2OidcPrompt2["SelectAccount"] = "select_account";
|
|
103888
|
+
})(OAuth2OidcPrompt || (OAuth2OidcPrompt = {}));
|
|
103567
103889
|
var PlatformType;
|
|
103568
103890
|
(function(PlatformType2) {
|
|
103569
103891
|
PlatformType2["Windows"] = "windows";
|
|
@@ -103718,6 +104040,20 @@ var getSafeDirectoryName = (value, fallback) => {
|
|
|
103718
104040
|
var siteRequiresBuildCommand = (site) => {
|
|
103719
104041
|
return !(site.framework === "other" && site.adapter === "static");
|
|
103720
104042
|
};
|
|
104043
|
+
var getErrorMessage = (error52) => {
|
|
104044
|
+
if (error52 instanceof Error) {
|
|
104045
|
+
const message = typeof error52.message === "string" ? error52.message.trim() : "";
|
|
104046
|
+
if (message) {
|
|
104047
|
+
return message;
|
|
104048
|
+
}
|
|
104049
|
+
const response = error52.response;
|
|
104050
|
+
if (typeof response === "string" && response.trim() !== "") {
|
|
104051
|
+
return response.trim();
|
|
104052
|
+
}
|
|
104053
|
+
return "An unknown error occurred.";
|
|
104054
|
+
}
|
|
104055
|
+
return String(error52);
|
|
104056
|
+
};
|
|
103721
104057
|
var WINDOWS_EXECUTABLE_NAME = `${EXECUTABLE_NAME.toLowerCase()}.exe`;
|
|
103722
104058
|
var CLOUD_REGION_CODES = /* @__PURE__ */ new Set(["fra", "nyc", "syd", "sfo", "sgp", "tor"]);
|
|
103723
104059
|
var CLOUD_LOGIN_ENVIRONMENTS = /* @__PURE__ */ new Set(["stage"]);
|
|
@@ -104945,7 +105281,7 @@ var package_default = {
|
|
|
104945
105281
|
type: "module",
|
|
104946
105282
|
homepage: "https://appwrite.io/support",
|
|
104947
105283
|
description: "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
104948
|
-
version: "22.
|
|
105284
|
+
version: "22.5.0",
|
|
104949
105285
|
license: "BSD-3-Clause",
|
|
104950
105286
|
main: "dist/index.cjs",
|
|
104951
105287
|
module: "dist/index.js",
|
|
@@ -104993,7 +105329,7 @@ var package_default = {
|
|
|
104993
105329
|
"windows-arm64": "bun build cli.ts --compile --minify --target=bun-windows-arm64 --outfile build/appwrite-cli-win-arm64.exe"
|
|
104994
105330
|
},
|
|
104995
105331
|
dependencies: {
|
|
104996
|
-
"@appwrite.io/console": "
|
|
105332
|
+
"@appwrite.io/console": "15.3.0-rc.1",
|
|
104997
105333
|
"@napi-rs/keyring": "^1.3.0",
|
|
104998
105334
|
chalk: "4.1.2",
|
|
104999
105335
|
chokidar: "^3.6.0",
|
|
@@ -105021,21 +105357,21 @@ var package_default = {
|
|
|
105021
105357
|
esbuild: "^0.28.1"
|
|
105022
105358
|
},
|
|
105023
105359
|
devDependencies: {
|
|
105024
|
-
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
105025
|
-
"@typescript-eslint/parser": "^8.0.0",
|
|
105026
105360
|
"@types/bun": "^1.3.5",
|
|
105027
|
-
eslint: "^9.0.0",
|
|
105028
|
-
"eslint-plugin-unused-imports": "^4.0.0",
|
|
105029
|
-
"typescript-eslint": "^8.0.0",
|
|
105030
105361
|
"@types/cli-progress": "^3.11.5",
|
|
105031
105362
|
"@types/inquirer": "^8.2.10",
|
|
105032
105363
|
"@types/json-bigint": "^1.0.4",
|
|
105033
105364
|
"@types/node": "^18.19.0",
|
|
105034
105365
|
"@types/tar": "^6.1.13",
|
|
105366
|
+
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
105367
|
+
"@typescript-eslint/parser": "^8.0.0",
|
|
105035
105368
|
esbuild: "^0.28.1",
|
|
105369
|
+
eslint: "^9.0.0",
|
|
105370
|
+
"eslint-plugin-unused-imports": "^4.0.0",
|
|
105036
105371
|
prettier: "^3.7.4",
|
|
105037
105372
|
tsx: "^4.21.0",
|
|
105038
|
-
typescript: "^5.3.3"
|
|
105373
|
+
typescript: "^5.3.3",
|
|
105374
|
+
"typescript-eslint": "^8.0.0"
|
|
105039
105375
|
}
|
|
105040
105376
|
};
|
|
105041
105377
|
|
|
@@ -105945,26 +106281,51 @@ var printQueryErrorHint = (err) => {
|
|
|
105945
106281
|
);
|
|
105946
106282
|
};
|
|
105947
106283
|
var ERROR_DETAIL_KEYS = ["code", "type", "response"];
|
|
106284
|
+
var ERROR_DETAIL_INDENT = " ";
|
|
106285
|
+
var ERROR_DETAIL_LABEL_WIDTH = Math.max(...ERROR_DETAIL_KEYS.map((key) => key.length)) + 2;
|
|
106286
|
+
var formatErrorDetail = (value) => {
|
|
106287
|
+
if (typeof value === "string") {
|
|
106288
|
+
const text = value;
|
|
106289
|
+
try {
|
|
106290
|
+
const parsed = JSON.parse(text);
|
|
106291
|
+
if (parsed && typeof parsed === "object") {
|
|
106292
|
+
value = parsed;
|
|
106293
|
+
}
|
|
106294
|
+
} catch {
|
|
106295
|
+
return text;
|
|
106296
|
+
}
|
|
106297
|
+
}
|
|
106298
|
+
try {
|
|
106299
|
+
const json2 = JSON.stringify(value, null, 2) ?? String(value);
|
|
106300
|
+
return json2.split("\n").map((line, index) => index === 0 ? line : ERROR_DETAIL_INDENT + line).join("\n");
|
|
106301
|
+
} catch {
|
|
106302
|
+
return String(value);
|
|
106303
|
+
}
|
|
106304
|
+
};
|
|
105948
106305
|
var formatErrorForLog = (err) => {
|
|
105949
|
-
const
|
|
105950
|
-
|
|
106306
|
+
const lines = [
|
|
106307
|
+
`${import_chalk2.default.red.bold(err.name || "Error")}${import_chalk2.default.red(`: ${getErrorMessage(err)}`)}`
|
|
106308
|
+
];
|
|
106309
|
+
for (const key of ERROR_DETAIL_KEYS) {
|
|
105951
106310
|
if (!Object.prototype.hasOwnProperty.call(err, key)) {
|
|
105952
|
-
|
|
106311
|
+
continue;
|
|
105953
106312
|
}
|
|
105954
106313
|
const value = err[key];
|
|
105955
|
-
|
|
105956
|
-
|
|
105957
|
-
|
|
105958
|
-
|
|
105959
|
-
|
|
105960
|
-
|
|
105961
|
-
|
|
105962
|
-
|
|
105963
|
-
|
|
105964
|
-
|
|
106314
|
+
lines.push(
|
|
106315
|
+
`${ERROR_DETAIL_INDENT}${import_chalk2.default.cyan(`${key}:`.padEnd(ERROR_DETAIL_LABEL_WIDTH))}${formatErrorDetail(value)}`
|
|
106316
|
+
);
|
|
106317
|
+
}
|
|
106318
|
+
const frames = (err.stack ?? "").split("\n").filter((line) => line.trim().startsWith("at "));
|
|
106319
|
+
if (frames.length > 0) {
|
|
106320
|
+
lines.push(
|
|
106321
|
+
"",
|
|
106322
|
+
import_chalk2.default.dim(`${ERROR_DETAIL_INDENT}Stack trace:`),
|
|
106323
|
+
...frames.map(
|
|
106324
|
+
(frame) => import_chalk2.default.dim(`${ERROR_DETAIL_INDENT.repeat(2)}${frame.trim()}`)
|
|
106325
|
+
)
|
|
106326
|
+
);
|
|
105965
106327
|
}
|
|
105966
|
-
|
|
105967
|
-
return [summary, ...detailLines, ...frames].join("\n");
|
|
106328
|
+
return lines.join("\n");
|
|
105968
106329
|
};
|
|
105969
106330
|
var parseError = (err) => {
|
|
105970
106331
|
if (cliConfig.report) {
|
|
@@ -105995,7 +106356,7 @@ Is Cloud: ${isCloud()}`;
|
|
|
105995
106356
|
githubIssueUrl.searchParams.append("template", "bug.yaml");
|
|
105996
106357
|
githubIssueUrl.searchParams.append(
|
|
105997
106358
|
"title",
|
|
105998
|
-
`\u{1F41B} Bug Report: ${err
|
|
106359
|
+
`\u{1F41B} Bug Report: ${getErrorMessage(err)}`
|
|
105999
106360
|
);
|
|
106000
106361
|
githubIssueUrl.searchParams.append(
|
|
106001
106362
|
"actual-behavior",
|
|
@@ -106025,7 +106386,7 @@ ${stack}`
|
|
|
106025
106386
|
printQueryErrorHint(err);
|
|
106026
106387
|
} else {
|
|
106027
106388
|
log("For detailed error pass the --verbose or --report flag");
|
|
106028
|
-
error51(err
|
|
106389
|
+
error51(getErrorMessage(err));
|
|
106029
106390
|
printQueryErrorHint(err);
|
|
106030
106391
|
}
|
|
106031
106392
|
process.exit(1);
|
|
@@ -106071,7 +106432,7 @@ var commandDescriptions = {
|
|
|
106071
106432
|
avatars: `The avatars command aims to help you complete everyday tasks related to your app image, icons, and avatars.`,
|
|
106072
106433
|
databases: `(Legacy) The databases command allows you to create structured collections of documents and query and filter lists of documents.`,
|
|
106073
106434
|
"tables-db": `The tables-db command allows you to create structured tables of columns and query and filter lists of rows.`,
|
|
106074
|
-
init: `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, messaging-topics, and
|
|
106435
|
+
init: `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, messaging-topics, and skills in ${SDK_TITLE}.`,
|
|
106075
106436
|
push: `The push command provides a convenient wrapper for pushing your functions, collections, buckets, teams, and messaging-topics.`,
|
|
106076
106437
|
run: `The run command allows you to run the project locally to allow easy development and quick debugging.`,
|
|
106077
106438
|
functions: `The functions command allows you to view, create, and manage your Cloud Functions.`,
|
|
@@ -106120,7 +106481,9 @@ var configFilters = [
|
|
|
106120
106481
|
new URL(
|
|
106121
106482
|
`${consoleClient.config.endpoint}/projects/${encodeURIComponent(config2.projectId)}`
|
|
106122
106483
|
),
|
|
106123
|
-
{
|
|
106484
|
+
{
|
|
106485
|
+
"X-Appwrite-Project": "console"
|
|
106486
|
+
},
|
|
106124
106487
|
{}
|
|
106125
106488
|
);
|
|
106126
106489
|
organizationId = project.teamId;
|
|
@@ -110154,7 +110517,7 @@ async function downloadDeploymentCode(params) {
|
|
|
110154
110517
|
}
|
|
110155
110518
|
} catch (e) {
|
|
110156
110519
|
if (e instanceof AppwriteException) {
|
|
110157
|
-
error51(e
|
|
110520
|
+
error51(getErrorMessage(e));
|
|
110158
110521
|
return;
|
|
110159
110522
|
} else {
|
|
110160
110523
|
throw e;
|
|
@@ -112077,12 +112440,12 @@ async function getTerminalImage() {
|
|
|
112077
112440
|
);
|
|
112078
112441
|
return terminalImageModulePromise;
|
|
112079
112442
|
}
|
|
112080
|
-
function
|
|
112443
|
+
function getErrorMessage2(error52) {
|
|
112081
112444
|
if (error52 instanceof Error && error52.message.trim().length > 0) {
|
|
112082
112445
|
return error52.message.trim();
|
|
112083
112446
|
}
|
|
112084
112447
|
if (Array.isArray(error52)) {
|
|
112085
|
-
const messages = error52.map((entry) =>
|
|
112448
|
+
const messages = error52.map((entry) => getErrorMessage2(entry)).filter((entry) => entry !== "Unknown error");
|
|
112086
112449
|
if (messages.length > 0) {
|
|
112087
112450
|
return messages.join("; ");
|
|
112088
112451
|
}
|
|
@@ -112240,7 +112603,7 @@ async function renderSiteTerminalPreview(params) {
|
|
|
112240
112603
|
};
|
|
112241
112604
|
} catch (previewError) {
|
|
112242
112605
|
warnings.add(
|
|
112243
|
-
`${label === "dark" ? "Dark mode" : "Light mode"} screenshot: ${
|
|
112606
|
+
`${label === "dark" ? "Dark mode" : "Light mode"} screenshot: ${getErrorMessage2(previewError)}`
|
|
112244
112607
|
);
|
|
112245
112608
|
}
|
|
112246
112609
|
}
|
|
@@ -113966,7 +114329,7 @@ var Push = class {
|
|
|
113966
114329
|
storageService: await getStorageService(consoleClient)
|
|
113967
114330
|
};
|
|
113968
114331
|
} catch (previewSetupError) {
|
|
113969
|
-
sitePreviewSetupWarning =
|
|
114332
|
+
sitePreviewSetupWarning = getErrorMessage2(previewSetupError);
|
|
113970
114333
|
}
|
|
113971
114334
|
}
|
|
113972
114335
|
process.stdout.write("\n");
|