appwrite-cli 13.6.1 → 14.0.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/.github/workflows/ci.yml +66 -0
- package/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/dist/bundle-win-arm64.mjs +274 -100
- package/dist/cli.cjs +274 -100
- package/dist/index.cjs +200 -81
- package/dist/index.js +200 -81
- package/dist/lib/commands/generate.d.ts +2 -0
- package/dist/lib/commands/generate.d.ts.map +1 -1
- package/dist/lib/commands/generators/base.d.ts +20 -2
- package/dist/lib/commands/generators/base.d.ts.map +1 -1
- package/dist/lib/commands/generators/index.d.ts +1 -1
- package/dist/lib/commands/generators/index.d.ts.map +1 -1
- package/dist/lib/commands/generators/typescript/databases.d.ts +2 -2
- package/dist/lib/commands/generators/typescript/databases.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/docs/examples/projects/update-status.md +5 -0
- package/docs/examples/sites/create-deployment.md +1 -2
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/commands/generate.ts +15 -2
- package/lib/commands/generators/base.ts +27 -2
- package/lib/commands/generators/index.ts +1 -0
- package/lib/commands/generators/typescript/databases.ts +22 -12
- package/lib/commands/services/account.ts +1 -1
- package/lib/commands/services/databases.ts +20 -19
- package/lib/commands/services/health.ts +13 -0
- package/lib/commands/services/messaging.ts +1 -1
- package/lib/commands/services/projects.ts +25 -0
- package/lib/commands/services/sites.ts +8 -3
- package/lib/commands/services/tables-db.ts +3 -2
- package/lib/commands/services/teams.ts +2 -2
- package/lib/constants.ts +1 -1
- package/package.json +2 -2
- package/scoop/appwrite.config.json +3 -3
package/dist/cli.cjs
CHANGED
|
@@ -92089,7 +92089,7 @@ var package_default = {
|
|
|
92089
92089
|
type: "module",
|
|
92090
92090
|
homepage: "https://appwrite.io/support",
|
|
92091
92091
|
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",
|
|
92092
|
-
version: "
|
|
92092
|
+
version: "14.0.0",
|
|
92093
92093
|
license: "BSD-3-Clause",
|
|
92094
92094
|
main: "dist/index.cjs",
|
|
92095
92095
|
module: "dist/index.js",
|
|
@@ -92133,7 +92133,7 @@ var package_default = {
|
|
|
92133
92133
|
"windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
|
|
92134
92134
|
},
|
|
92135
92135
|
dependencies: {
|
|
92136
|
-
"@appwrite.io/console": "^
|
|
92136
|
+
"@appwrite.io/console": "^4.0.0",
|
|
92137
92137
|
chalk: "4.1.2",
|
|
92138
92138
|
chokidar: "^3.6.0",
|
|
92139
92139
|
"cli-progress": "^3.12.0",
|
|
@@ -106372,7 +106372,7 @@ var import_undici = __toESM(require_undici(), 1);
|
|
|
106372
106372
|
// lib/constants.ts
|
|
106373
106373
|
var SDK_TITLE = "Appwrite";
|
|
106374
106374
|
var SDK_TITLE_LOWER = "appwrite";
|
|
106375
|
-
var SDK_VERSION = "
|
|
106375
|
+
var SDK_VERSION = "14.0.0";
|
|
106376
106376
|
var SDK_NAME = "Command Line";
|
|
106377
106377
|
var SDK_PLATFORM = "console";
|
|
106378
106378
|
var SDK_LANGUAGE = "cli";
|
|
@@ -107411,7 +107411,7 @@ var Client = class _Client {
|
|
|
107411
107411
|
"x-sdk-name": "Console",
|
|
107412
107412
|
"x-sdk-platform": "console",
|
|
107413
107413
|
"x-sdk-language": "web",
|
|
107414
|
-
"x-sdk-version": "
|
|
107414
|
+
"x-sdk-version": "4.0.0",
|
|
107415
107415
|
"X-Appwrite-Response-Format": "1.8.0"
|
|
107416
107416
|
};
|
|
107417
107417
|
this.realtime = {
|
|
@@ -112533,6 +112533,47 @@ var Databases = class {
|
|
|
112533
112533
|
};
|
|
112534
112534
|
return this.client.call("post", uri, apiHeaders, payload);
|
|
112535
112535
|
}
|
|
112536
|
+
updateRelationshipAttribute(paramsOrFirst, ...rest) {
|
|
112537
|
+
let params;
|
|
112538
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
112539
|
+
params = paramsOrFirst || {};
|
|
112540
|
+
} else {
|
|
112541
|
+
params = {
|
|
112542
|
+
databaseId: paramsOrFirst,
|
|
112543
|
+
collectionId: rest[0],
|
|
112544
|
+
key: rest[1],
|
|
112545
|
+
onDelete: rest[2],
|
|
112546
|
+
newKey: rest[3]
|
|
112547
|
+
};
|
|
112548
|
+
}
|
|
112549
|
+
const databaseId = params.databaseId;
|
|
112550
|
+
const collectionId = params.collectionId;
|
|
112551
|
+
const key = params.key;
|
|
112552
|
+
const onDelete = params.onDelete;
|
|
112553
|
+
const newKey = params.newKey;
|
|
112554
|
+
if (typeof databaseId === "undefined") {
|
|
112555
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
112556
|
+
}
|
|
112557
|
+
if (typeof collectionId === "undefined") {
|
|
112558
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
112559
|
+
}
|
|
112560
|
+
if (typeof key === "undefined") {
|
|
112561
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
112562
|
+
}
|
|
112563
|
+
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key}".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
112564
|
+
const payload = {};
|
|
112565
|
+
if (typeof onDelete !== "undefined") {
|
|
112566
|
+
payload["onDelete"] = onDelete;
|
|
112567
|
+
}
|
|
112568
|
+
if (typeof newKey !== "undefined") {
|
|
112569
|
+
payload["newKey"] = newKey;
|
|
112570
|
+
}
|
|
112571
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
112572
|
+
const apiHeaders = {
|
|
112573
|
+
"content-type": "application/json"
|
|
112574
|
+
};
|
|
112575
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
112576
|
+
}
|
|
112536
112577
|
createStringAttribute(paramsOrFirst, ...rest) {
|
|
112537
112578
|
let params;
|
|
112538
112579
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -113050,47 +113091,6 @@ var Databases = class {
|
|
|
113050
113091
|
};
|
|
113051
113092
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
113052
113093
|
}
|
|
113053
|
-
updateRelationshipAttribute(paramsOrFirst, ...rest) {
|
|
113054
|
-
let params;
|
|
113055
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
113056
|
-
params = paramsOrFirst || {};
|
|
113057
|
-
} else {
|
|
113058
|
-
params = {
|
|
113059
|
-
databaseId: paramsOrFirst,
|
|
113060
|
-
collectionId: rest[0],
|
|
113061
|
-
key: rest[1],
|
|
113062
|
-
onDelete: rest[2],
|
|
113063
|
-
newKey: rest[3]
|
|
113064
|
-
};
|
|
113065
|
-
}
|
|
113066
|
-
const databaseId = params.databaseId;
|
|
113067
|
-
const collectionId = params.collectionId;
|
|
113068
|
-
const key = params.key;
|
|
113069
|
-
const onDelete = params.onDelete;
|
|
113070
|
-
const newKey = params.newKey;
|
|
113071
|
-
if (typeof databaseId === "undefined") {
|
|
113072
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
113073
|
-
}
|
|
113074
|
-
if (typeof collectionId === "undefined") {
|
|
113075
|
-
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
113076
|
-
}
|
|
113077
|
-
if (typeof key === "undefined") {
|
|
113078
|
-
throw new AppwriteException('Missing required parameter: "key"');
|
|
113079
|
-
}
|
|
113080
|
-
const apiPath = "/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship".replace("{databaseId}", databaseId).replace("{collectionId}", collectionId).replace("{key}", key);
|
|
113081
|
-
const payload = {};
|
|
113082
|
-
if (typeof onDelete !== "undefined") {
|
|
113083
|
-
payload["onDelete"] = onDelete;
|
|
113084
|
-
}
|
|
113085
|
-
if (typeof newKey !== "undefined") {
|
|
113086
|
-
payload["newKey"] = newKey;
|
|
113087
|
-
}
|
|
113088
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
113089
|
-
const apiHeaders = {
|
|
113090
|
-
"content-type": "application/json"
|
|
113091
|
-
};
|
|
113092
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
113093
|
-
}
|
|
113094
113094
|
listDocuments(paramsOrFirst, ...rest) {
|
|
113095
113095
|
let params;
|
|
113096
113096
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -113101,7 +113101,8 @@ var Databases = class {
|
|
|
113101
113101
|
collectionId: rest[0],
|
|
113102
113102
|
queries: rest[1],
|
|
113103
113103
|
transactionId: rest[2],
|
|
113104
|
-
total: rest[3]
|
|
113104
|
+
total: rest[3],
|
|
113105
|
+
ttl: rest[4]
|
|
113105
113106
|
};
|
|
113106
113107
|
}
|
|
113107
113108
|
const databaseId = params.databaseId;
|
|
@@ -113109,6 +113110,7 @@ var Databases = class {
|
|
|
113109
113110
|
const queries = params.queries;
|
|
113110
113111
|
const transactionId = params.transactionId;
|
|
113111
113112
|
const total = params.total;
|
|
113113
|
+
const ttl = params.ttl;
|
|
113112
113114
|
if (typeof databaseId === "undefined") {
|
|
113113
113115
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
113114
113116
|
}
|
|
@@ -113126,6 +113128,9 @@ var Databases = class {
|
|
|
113126
113128
|
if (typeof total !== "undefined") {
|
|
113127
113129
|
payload["total"] = total;
|
|
113128
113130
|
}
|
|
113131
|
+
if (typeof ttl !== "undefined") {
|
|
113132
|
+
payload["ttl"] = ttl;
|
|
113133
|
+
}
|
|
113129
113134
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
113130
113135
|
const apiHeaders = {};
|
|
113131
113136
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
@@ -115091,6 +115096,30 @@ var Health = class {
|
|
|
115091
115096
|
const apiHeaders = {};
|
|
115092
115097
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
115093
115098
|
}
|
|
115099
|
+
getConsolePausing(paramsOrFirst, ...rest) {
|
|
115100
|
+
let params;
|
|
115101
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
115102
|
+
params = paramsOrFirst || {};
|
|
115103
|
+
} else {
|
|
115104
|
+
params = {
|
|
115105
|
+
threshold: paramsOrFirst,
|
|
115106
|
+
inactivityDays: rest[0]
|
|
115107
|
+
};
|
|
115108
|
+
}
|
|
115109
|
+
const threshold = params.threshold;
|
|
115110
|
+
const inactivityDays = params.inactivityDays;
|
|
115111
|
+
const apiPath = "/health/console-pausing";
|
|
115112
|
+
const payload = {};
|
|
115113
|
+
if (typeof threshold !== "undefined") {
|
|
115114
|
+
payload["threshold"] = threshold;
|
|
115115
|
+
}
|
|
115116
|
+
if (typeof inactivityDays !== "undefined") {
|
|
115117
|
+
payload["inactivityDays"] = inactivityDays;
|
|
115118
|
+
}
|
|
115119
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
115120
|
+
const apiHeaders = {};
|
|
115121
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
115122
|
+
}
|
|
115094
115123
|
/**
|
|
115095
115124
|
* Check the Appwrite database servers are up and connection is successful.
|
|
115096
115125
|
*
|
|
@@ -121176,6 +121205,27 @@ var Projects = class {
|
|
|
121176
121205
|
};
|
|
121177
121206
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
121178
121207
|
}
|
|
121208
|
+
updateConsoleAccess(paramsOrFirst) {
|
|
121209
|
+
let params;
|
|
121210
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
121211
|
+
params = paramsOrFirst || {};
|
|
121212
|
+
} else {
|
|
121213
|
+
params = {
|
|
121214
|
+
projectId: paramsOrFirst
|
|
121215
|
+
};
|
|
121216
|
+
}
|
|
121217
|
+
const projectId = params.projectId;
|
|
121218
|
+
if (typeof projectId === "undefined") {
|
|
121219
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
121220
|
+
}
|
|
121221
|
+
const apiPath = "/projects/{projectId}/console-access".replace("{projectId}", projectId);
|
|
121222
|
+
const payload = {};
|
|
121223
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
121224
|
+
const apiHeaders = {
|
|
121225
|
+
"content-type": "application/json"
|
|
121226
|
+
};
|
|
121227
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
121228
|
+
}
|
|
121179
121229
|
listDevKeys(paramsOrFirst, ...rest) {
|
|
121180
121230
|
let params;
|
|
121181
121231
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -122252,6 +122302,35 @@ var Projects = class {
|
|
|
122252
122302
|
};
|
|
122253
122303
|
return this.client.call("post", uri, apiHeaders, payload);
|
|
122254
122304
|
}
|
|
122305
|
+
updateStatus(paramsOrFirst, ...rest) {
|
|
122306
|
+
let params;
|
|
122307
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
122308
|
+
params = paramsOrFirst || {};
|
|
122309
|
+
} else {
|
|
122310
|
+
params = {
|
|
122311
|
+
projectId: paramsOrFirst,
|
|
122312
|
+
status: rest[0]
|
|
122313
|
+
};
|
|
122314
|
+
}
|
|
122315
|
+
const projectId = params.projectId;
|
|
122316
|
+
const status = params.status;
|
|
122317
|
+
if (typeof projectId === "undefined") {
|
|
122318
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
122319
|
+
}
|
|
122320
|
+
if (typeof status === "undefined") {
|
|
122321
|
+
throw new AppwriteException('Missing required parameter: "status"');
|
|
122322
|
+
}
|
|
122323
|
+
const apiPath = "/projects/{projectId}/status".replace("{projectId}", projectId);
|
|
122324
|
+
const payload = {};
|
|
122325
|
+
if (typeof status !== "undefined") {
|
|
122326
|
+
payload["status"] = status;
|
|
122327
|
+
}
|
|
122328
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
122329
|
+
const apiHeaders = {
|
|
122330
|
+
"content-type": "application/json"
|
|
122331
|
+
};
|
|
122332
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
122333
|
+
}
|
|
122255
122334
|
updateTeam(paramsOrFirst, ...rest) {
|
|
122256
122335
|
let params;
|
|
122257
122336
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -123566,28 +123645,25 @@ var Sites = class {
|
|
|
123566
123645
|
params = {
|
|
123567
123646
|
siteId: paramsOrFirst,
|
|
123568
123647
|
code: rest[0],
|
|
123569
|
-
|
|
123570
|
-
|
|
123571
|
-
|
|
123572
|
-
|
|
123648
|
+
installCommand: rest[1],
|
|
123649
|
+
buildCommand: rest[2],
|
|
123650
|
+
outputDirectory: rest[3],
|
|
123651
|
+
activate: rest[4]
|
|
123573
123652
|
};
|
|
123574
123653
|
onProgress = rest[5];
|
|
123575
123654
|
}
|
|
123576
123655
|
const siteId = params.siteId;
|
|
123577
123656
|
const code = params.code;
|
|
123578
|
-
const activate = params.activate;
|
|
123579
123657
|
const installCommand = params.installCommand;
|
|
123580
123658
|
const buildCommand = params.buildCommand;
|
|
123581
123659
|
const outputDirectory = params.outputDirectory;
|
|
123660
|
+
const activate = params.activate;
|
|
123582
123661
|
if (typeof siteId === "undefined") {
|
|
123583
123662
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
123584
123663
|
}
|
|
123585
123664
|
if (typeof code === "undefined") {
|
|
123586
123665
|
throw new AppwriteException('Missing required parameter: "code"');
|
|
123587
123666
|
}
|
|
123588
|
-
if (typeof activate === "undefined") {
|
|
123589
|
-
throw new AppwriteException('Missing required parameter: "activate"');
|
|
123590
|
-
}
|
|
123591
123667
|
const apiPath = "/sites/{siteId}/deployments".replace("{siteId}", siteId);
|
|
123592
123668
|
const payload = {};
|
|
123593
123669
|
if (typeof installCommand !== "undefined") {
|
|
@@ -127325,7 +127401,8 @@ var TablesDB = class {
|
|
|
127325
127401
|
tableId: rest[0],
|
|
127326
127402
|
queries: rest[1],
|
|
127327
127403
|
transactionId: rest[2],
|
|
127328
|
-
total: rest[3]
|
|
127404
|
+
total: rest[3],
|
|
127405
|
+
ttl: rest[4]
|
|
127329
127406
|
};
|
|
127330
127407
|
}
|
|
127331
127408
|
const databaseId = params.databaseId;
|
|
@@ -127333,6 +127410,7 @@ var TablesDB = class {
|
|
|
127333
127410
|
const queries = params.queries;
|
|
127334
127411
|
const transactionId = params.transactionId;
|
|
127335
127412
|
const total = params.total;
|
|
127413
|
+
const ttl = params.ttl;
|
|
127336
127414
|
if (typeof databaseId === "undefined") {
|
|
127337
127415
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
127338
127416
|
}
|
|
@@ -127350,6 +127428,9 @@ var TablesDB = class {
|
|
|
127350
127428
|
if (typeof total !== "undefined") {
|
|
127351
127429
|
payload["total"] = total;
|
|
127352
127430
|
}
|
|
127431
|
+
if (typeof ttl !== "undefined") {
|
|
127432
|
+
payload["ttl"] = ttl;
|
|
127433
|
+
}
|
|
127353
127434
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
127354
127435
|
const apiHeaders = {};
|
|
127355
127436
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
@@ -131616,20 +131697,69 @@ var SmtpEncryption;
|
|
|
131616
131697
|
SmtpEncryption2["Ssl"] = "ssl";
|
|
131617
131698
|
SmtpEncryption2["Tls"] = "tls";
|
|
131618
131699
|
})(SmtpEncryption || (SmtpEncryption = {}));
|
|
131619
|
-
var
|
|
131620
|
-
(function(
|
|
131621
|
-
|
|
131622
|
-
|
|
131623
|
-
|
|
131624
|
-
|
|
131625
|
-
|
|
131626
|
-
|
|
131627
|
-
|
|
131628
|
-
|
|
131629
|
-
|
|
131630
|
-
|
|
131631
|
-
|
|
131632
|
-
|
|
131700
|
+
var AppwriteMigrationResource;
|
|
131701
|
+
(function(AppwriteMigrationResource2) {
|
|
131702
|
+
AppwriteMigrationResource2["User"] = "user";
|
|
131703
|
+
AppwriteMigrationResource2["Team"] = "team";
|
|
131704
|
+
AppwriteMigrationResource2["Membership"] = "membership";
|
|
131705
|
+
AppwriteMigrationResource2["Database"] = "database";
|
|
131706
|
+
AppwriteMigrationResource2["Table"] = "table";
|
|
131707
|
+
AppwriteMigrationResource2["Column"] = "column";
|
|
131708
|
+
AppwriteMigrationResource2["Index"] = "index";
|
|
131709
|
+
AppwriteMigrationResource2["Row"] = "row";
|
|
131710
|
+
AppwriteMigrationResource2["Document"] = "document";
|
|
131711
|
+
AppwriteMigrationResource2["Attribute"] = "attribute";
|
|
131712
|
+
AppwriteMigrationResource2["Collection"] = "collection";
|
|
131713
|
+
AppwriteMigrationResource2["Bucket"] = "bucket";
|
|
131714
|
+
AppwriteMigrationResource2["File"] = "file";
|
|
131715
|
+
AppwriteMigrationResource2["Function"] = "function";
|
|
131716
|
+
AppwriteMigrationResource2["Deployment"] = "deployment";
|
|
131717
|
+
AppwriteMigrationResource2["Environmentvariable"] = "environment-variable";
|
|
131718
|
+
AppwriteMigrationResource2["Site"] = "site";
|
|
131719
|
+
AppwriteMigrationResource2["Sitedeployment"] = "site-deployment";
|
|
131720
|
+
AppwriteMigrationResource2["Sitevariable"] = "site-variable";
|
|
131721
|
+
})(AppwriteMigrationResource || (AppwriteMigrationResource = {}));
|
|
131722
|
+
var FirebaseMigrationResource;
|
|
131723
|
+
(function(FirebaseMigrationResource2) {
|
|
131724
|
+
FirebaseMigrationResource2["User"] = "user";
|
|
131725
|
+
FirebaseMigrationResource2["Database"] = "database";
|
|
131726
|
+
FirebaseMigrationResource2["Table"] = "table";
|
|
131727
|
+
FirebaseMigrationResource2["Column"] = "column";
|
|
131728
|
+
FirebaseMigrationResource2["Row"] = "row";
|
|
131729
|
+
FirebaseMigrationResource2["Document"] = "document";
|
|
131730
|
+
FirebaseMigrationResource2["Attribute"] = "attribute";
|
|
131731
|
+
FirebaseMigrationResource2["Collection"] = "collection";
|
|
131732
|
+
FirebaseMigrationResource2["Bucket"] = "bucket";
|
|
131733
|
+
FirebaseMigrationResource2["File"] = "file";
|
|
131734
|
+
})(FirebaseMigrationResource || (FirebaseMigrationResource = {}));
|
|
131735
|
+
var NHostMigrationResource;
|
|
131736
|
+
(function(NHostMigrationResource2) {
|
|
131737
|
+
NHostMigrationResource2["User"] = "user";
|
|
131738
|
+
NHostMigrationResource2["Database"] = "database";
|
|
131739
|
+
NHostMigrationResource2["Table"] = "table";
|
|
131740
|
+
NHostMigrationResource2["Column"] = "column";
|
|
131741
|
+
NHostMigrationResource2["Index"] = "index";
|
|
131742
|
+
NHostMigrationResource2["Row"] = "row";
|
|
131743
|
+
NHostMigrationResource2["Document"] = "document";
|
|
131744
|
+
NHostMigrationResource2["Attribute"] = "attribute";
|
|
131745
|
+
NHostMigrationResource2["Collection"] = "collection";
|
|
131746
|
+
NHostMigrationResource2["Bucket"] = "bucket";
|
|
131747
|
+
NHostMigrationResource2["File"] = "file";
|
|
131748
|
+
})(NHostMigrationResource || (NHostMigrationResource = {}));
|
|
131749
|
+
var SupabaseMigrationResource;
|
|
131750
|
+
(function(SupabaseMigrationResource2) {
|
|
131751
|
+
SupabaseMigrationResource2["User"] = "user";
|
|
131752
|
+
SupabaseMigrationResource2["Database"] = "database";
|
|
131753
|
+
SupabaseMigrationResource2["Table"] = "table";
|
|
131754
|
+
SupabaseMigrationResource2["Column"] = "column";
|
|
131755
|
+
SupabaseMigrationResource2["Index"] = "index";
|
|
131756
|
+
SupabaseMigrationResource2["Row"] = "row";
|
|
131757
|
+
SupabaseMigrationResource2["Document"] = "document";
|
|
131758
|
+
SupabaseMigrationResource2["Attribute"] = "attribute";
|
|
131759
|
+
SupabaseMigrationResource2["Collection"] = "collection";
|
|
131760
|
+
SupabaseMigrationResource2["Bucket"] = "bucket";
|
|
131761
|
+
SupabaseMigrationResource2["File"] = "file";
|
|
131762
|
+
})(SupabaseMigrationResource || (SupabaseMigrationResource = {}));
|
|
131633
131763
|
var ProjectUsageRange;
|
|
131634
131764
|
(function(ProjectUsageRange2) {
|
|
131635
131765
|
ProjectUsageRange2["OneHour"] = "1h";
|
|
@@ -131706,6 +131836,10 @@ var SMTPSecure;
|
|
|
131706
131836
|
SMTPSecure2["Tls"] = "tls";
|
|
131707
131837
|
SMTPSecure2["Ssl"] = "ssl";
|
|
131708
131838
|
})(SMTPSecure || (SMTPSecure = {}));
|
|
131839
|
+
var Status;
|
|
131840
|
+
(function(Status2) {
|
|
131841
|
+
Status2["Active"] = "active";
|
|
131842
|
+
})(Status || (Status = {}));
|
|
131709
131843
|
var EmailTemplateType;
|
|
131710
131844
|
(function(EmailTemplateType2) {
|
|
131711
131845
|
EmailTemplateType2["Verification"] = "verification";
|
|
@@ -132265,6 +132399,17 @@ var BillingPlanGroup;
|
|
|
132265
132399
|
BillingPlanGroup2["Pro"] = "pro";
|
|
132266
132400
|
BillingPlanGroup2["Scale"] = "scale";
|
|
132267
132401
|
})(BillingPlanGroup || (BillingPlanGroup = {}));
|
|
132402
|
+
var DomainTransferStatusStatus;
|
|
132403
|
+
(function(DomainTransferStatusStatus2) {
|
|
132404
|
+
DomainTransferStatusStatus2["Transferrable"] = "transferrable";
|
|
132405
|
+
DomainTransferStatusStatus2["NotTransferrable"] = "not_transferrable";
|
|
132406
|
+
DomainTransferStatusStatus2["PendingOwner"] = "pending_owner";
|
|
132407
|
+
DomainTransferStatusStatus2["PendingAdmin"] = "pending_admin";
|
|
132408
|
+
DomainTransferStatusStatus2["PendingRegistry"] = "pending_registry";
|
|
132409
|
+
DomainTransferStatusStatus2["Completed"] = "completed";
|
|
132410
|
+
DomainTransferStatusStatus2["Cancelled"] = "cancelled";
|
|
132411
|
+
DomainTransferStatusStatus2["ServiceUnavailable"] = "service_unavailable";
|
|
132412
|
+
})(DomainTransferStatusStatus || (DomainTransferStatusStatus = {}));
|
|
132268
132413
|
|
|
132269
132414
|
// lib/parser.ts
|
|
132270
132415
|
var { description } = package_default;
|
|
@@ -142123,12 +142268,11 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
142123
142268
|
delete: <D extends DatabaseId>(databaseId: D) => Promise<void>;` : ""}
|
|
142124
142269
|
};`;
|
|
142125
142270
|
}
|
|
142126
|
-
generateTypesFile(config2) {
|
|
142271
|
+
generateTypesFile(config2, appwriteDep) {
|
|
142127
142272
|
const entities = config2.tables?.length ? config2.tables : config2.collections;
|
|
142128
142273
|
if (!entities || entities.length === 0) {
|
|
142129
142274
|
return "// No tables or collections found in configuration\n";
|
|
142130
142275
|
}
|
|
142131
|
-
const appwriteDep = getAppwriteDependency();
|
|
142132
142276
|
const enums = this.generateEnums(entities);
|
|
142133
142277
|
const types2 = entities.map((entity) => this.generateTableType(entity, entities)).join("\n\n");
|
|
142134
142278
|
const entitiesByDb = this.groupEntitiesByDb(entities);
|
|
@@ -142216,13 +142360,12 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
142216
142360
|
delete (api as Record<string, unknown>).deleteMany;
|
|
142217
142361
|
}`;
|
|
142218
142362
|
}
|
|
142219
|
-
generateDatabasesFile(config2, importExt) {
|
|
142363
|
+
generateDatabasesFile(config2, importExt, appwriteDep) {
|
|
142220
142364
|
const entities = config2.tables?.length ? config2.tables : config2.collections;
|
|
142221
142365
|
if (!entities || entities.length === 0) {
|
|
142222
142366
|
return "// No tables or collections found in configuration\n";
|
|
142223
142367
|
}
|
|
142224
142368
|
const entitiesByDb = this.groupEntitiesByDb(entities);
|
|
142225
|
-
const appwriteDep = getAppwriteDependency();
|
|
142226
142369
|
const supportsServerSide = supportsServerSideMethods(
|
|
142227
142370
|
appwriteDep,
|
|
142228
142371
|
this.serverSideOverride
|
|
@@ -142245,8 +142388,7 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
142245
142388
|
importExt
|
|
142246
142389
|
});
|
|
142247
142390
|
}
|
|
142248
|
-
generateConstantsFile(config2) {
|
|
142249
|
-
const appwriteDep = getAppwriteDependency();
|
|
142391
|
+
generateConstantsFile(config2, appwriteDep) {
|
|
142250
142392
|
const supportsServerSide = supportsServerSideMethods(
|
|
142251
142393
|
appwriteDep,
|
|
142252
142394
|
this.serverSideOverride
|
|
@@ -142258,11 +142400,12 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
142258
142400
|
requiresApiKey: supportsServerSide
|
|
142259
142401
|
});
|
|
142260
142402
|
}
|
|
142261
|
-
async generate(config2) {
|
|
142403
|
+
async generate(config2, options) {
|
|
142262
142404
|
if (!config2.projectId) {
|
|
142263
142405
|
throw new Error("Project ID is required in configuration");
|
|
142264
142406
|
}
|
|
142265
|
-
const
|
|
142407
|
+
const appwriteDep = options?.appwriteImportSource ?? getAppwriteDependency();
|
|
142408
|
+
const importExt = options?.importExtension ?? detectImportExtension();
|
|
142266
142409
|
const hasEntities = config2.tables && config2.tables.length > 0 || config2.collections && config2.collections.length > 0;
|
|
142267
142410
|
if (!hasEntities) {
|
|
142268
142411
|
console.log(
|
|
@@ -142272,14 +142415,14 @@ ${supportsServerSide ? ` create: (databaseId: string, name: string, options?: {
|
|
|
142272
142415
|
dbContent: "// No tables or collections found in configuration\n",
|
|
142273
142416
|
typesContent: "// No tables or collections found in configuration\n",
|
|
142274
142417
|
indexContent: this.generateIndexFile(importExt),
|
|
142275
|
-
constantsContent: this.generateConstantsFile(config2)
|
|
142418
|
+
constantsContent: this.generateConstantsFile(config2, appwriteDep)
|
|
142276
142419
|
};
|
|
142277
142420
|
}
|
|
142278
142421
|
return {
|
|
142279
|
-
dbContent: this.generateDatabasesFile(config2, importExt),
|
|
142280
|
-
typesContent: this.generateTypesFile(config2),
|
|
142422
|
+
dbContent: this.generateDatabasesFile(config2, importExt, appwriteDep),
|
|
142423
|
+
typesContent: this.generateTypesFile(config2, appwriteDep),
|
|
142281
142424
|
indexContent: this.generateIndexFile(importExt),
|
|
142282
|
-
constantsContent: this.generateConstantsFile(config2)
|
|
142425
|
+
constantsContent: this.generateConstantsFile(config2, appwriteDep)
|
|
142283
142426
|
};
|
|
142284
142427
|
}
|
|
142285
142428
|
};
|
|
@@ -142386,7 +142529,10 @@ Use --language to specify the target language. Supported: ${supported}`
|
|
|
142386
142529
|
`Generating type-safe ${detectedLanguage} SDK to ${absoluteOutputDir}...`
|
|
142387
142530
|
);
|
|
142388
142531
|
try {
|
|
142389
|
-
const result = await generator.generate(config2
|
|
142532
|
+
const result = await generator.generate(config2, {
|
|
142533
|
+
appwriteImportSource: options.appwriteImportSource,
|
|
142534
|
+
importExtension: options.importExtension
|
|
142535
|
+
});
|
|
142390
142536
|
await generator.writeFiles(absoluteOutputDir, result);
|
|
142391
142537
|
const generatedFiles = generator.getGeneratedFilePaths(result);
|
|
142392
142538
|
success2(`Generated files:`);
|
|
@@ -142398,7 +142544,7 @@ Use --language to specify the target language. Supported: ${supported}`
|
|
|
142398
142544
|
const firstEntity = entities?.[0];
|
|
142399
142545
|
const dbId = firstEntity?.databaseId ?? "databaseId";
|
|
142400
142546
|
const tableName = firstEntity?.name ?? "tableName";
|
|
142401
|
-
const importExt = detectImportExtension();
|
|
142547
|
+
const importExt = options.importExtension ?? detectImportExtension();
|
|
142402
142548
|
console.log("");
|
|
142403
142549
|
log(`Import the generated SDK in your project:`);
|
|
142404
142550
|
console.log(
|
|
@@ -142435,6 +142581,12 @@ var generate = new Command("generate").description(
|
|
|
142435
142581
|
"--server <mode>",
|
|
142436
142582
|
"Override server-side generation (auto|true|false)",
|
|
142437
142583
|
"auto"
|
|
142584
|
+
).option(
|
|
142585
|
+
"--appwrite-import-source <source>",
|
|
142586
|
+
"Override Appwrite import source in generated files (e.g. node-appwrite, appwrite, @appwrite.io/console). Auto-detected from package.json/deno.json if not provided."
|
|
142587
|
+
).option(
|
|
142588
|
+
"--import-extension <ext>",
|
|
142589
|
+
'Override import file extension in generated files (.js for ESM, empty string for CJS). Auto-detected from package.json "type" field if not provided.'
|
|
142438
142590
|
).addHelpText(
|
|
142439
142591
|
"after",
|
|
142440
142592
|
`
|
|
@@ -142538,7 +142690,7 @@ account.command(`create-jwt`).description(`Use this endpoint to create a JSON We
|
|
|
142538
142690
|
async ({ duration: duration3 }) => parse3(await (await getAccountClient()).createJWT(duration3))
|
|
142539
142691
|
)
|
|
142540
142692
|
);
|
|
142541
|
-
account.command(`list-keys`).description(`Get a list of all API keys from the current account
|
|
142693
|
+
account.command(`list-keys`).description(`Get a list of all API keys from the current account.`).option(
|
|
142542
142694
|
`--total [value]`,
|
|
142543
142695
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
142544
142696
|
(value) => value === void 0 ? true : parseBool(value)
|
|
@@ -143116,7 +143268,7 @@ databases.command(`list-attributes`).description(`List attributes in the collect
|
|
|
143116
143268
|
)
|
|
143117
143269
|
);
|
|
143118
143270
|
databases.command(`create-boolean-attribute`).description(`Create a boolean attribute.
|
|
143119
|
-
`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new
|
|
143271
|
+
`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`).requiredOption(`--key <key>`, `Attribute Key.`).requiredOption(`--required <required>`, `Is attribute required?`, parseBool).option(
|
|
143120
143272
|
`--xdefault [value]`,
|
|
143121
143273
|
`Default value for attribute when not provided. Cannot be set when attribute is required.`,
|
|
143122
143274
|
(value) => value === void 0 ? true : parseBool(value)
|
|
@@ -143308,6 +143460,12 @@ databases.command(`create-relationship-attribute`).description(`Create relations
|
|
|
143308
143460
|
async ({ databaseId, collectionId, relatedCollectionId, type, twoWay, key, twoWayKey, onDelete }) => parse3(await (await getDatabasesClient()).createRelationshipAttribute(databaseId, collectionId, relatedCollectionId, type, twoWay, key, twoWayKey, onDelete))
|
|
143309
143461
|
)
|
|
143310
143462
|
);
|
|
143463
|
+
databases.command(`update-relationship-attribute`).description(`Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
143464
|
+
`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).requiredOption(`--key <key>`, `Attribute Key.`).option(`--on-delete <on-delete>`, `Constraints option`).option(`--new-key <new-key>`, `New Attribute Key.`).action(
|
|
143465
|
+
actionRunner(
|
|
143466
|
+
async ({ databaseId, collectionId, key, onDelete, newKey }) => parse3(await (await getDatabasesClient()).updateRelationshipAttribute(databaseId, collectionId, key, onDelete, newKey))
|
|
143467
|
+
)
|
|
143468
|
+
);
|
|
143311
143469
|
databases.command(`create-string-attribute`).description(`Create a string attribute.
|
|
143312
143470
|
`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`).requiredOption(`--key <key>`, `Attribute Key.`).requiredOption(`--size <size>`, `Attribute size for text attributes, in number of characters.`, parseInteger).requiredOption(`--required <required>`, `Is attribute required?`, parseBool).option(`--xdefault <xdefault>`, `Default value for attribute when not provided. Cannot be set when attribute is required.`).option(
|
|
143313
143471
|
`--array [value]`,
|
|
@@ -143394,19 +143552,13 @@ databases.command(`delete-attribute`).description(`Deletes an attribute.`).requi
|
|
|
143394
143552
|
async ({ databaseId, collectionId, key }) => parse3(await (await getDatabasesClient()).deleteAttribute(databaseId, collectionId, key))
|
|
143395
143553
|
)
|
|
143396
143554
|
);
|
|
143397
|
-
databases.command(`update-relationship-attribute`).description(`Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
143398
|
-
`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID.`).requiredOption(`--key <key>`, `Attribute Key.`).option(`--on-delete <on-delete>`, `Constraints option`).option(`--new-key <new-key>`, `New Attribute Key.`).action(
|
|
143399
|
-
actionRunner(
|
|
143400
|
-
async ({ databaseId, collectionId, key, onDelete, newKey }) => parse3(await (await getDatabasesClient()).updateRelationshipAttribute(databaseId, collectionId, key, onDelete, newKey))
|
|
143401
|
-
)
|
|
143402
|
-
);
|
|
143403
143555
|
databases.command(`list-documents`).description(`Get a list of all the user's documents in a given collection. You can use the query params to filter your results.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.`).option(`--transaction-id <transaction-id>`, `Transaction ID to read uncommitted changes within the transaction.`).option(
|
|
143404
143556
|
`--total [value]`,
|
|
143405
143557
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
143406
143558
|
(value) => value === void 0 ? true : parseBool(value)
|
|
143407
|
-
).action(
|
|
143559
|
+
).option(`--ttl <ttl>`, `TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).`, parseInteger).action(
|
|
143408
143560
|
actionRunner(
|
|
143409
|
-
async ({ databaseId, collectionId, queries, transactionId, total }) => parse3(await (await getDatabasesClient()).listDocuments(databaseId, collectionId, queries, transactionId, total))
|
|
143561
|
+
async ({ databaseId, collectionId, queries, transactionId, total, ttl }) => parse3(await (await getDatabasesClient()).listDocuments(databaseId, collectionId, queries, transactionId, total, ttl))
|
|
143410
143562
|
)
|
|
143411
143563
|
);
|
|
143412
143564
|
databases.command(`create-document`).description(`Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection). Make sure to define attributes before creating documents.`).requiredOption(`--document-id <document-id>`, `Document ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).requiredOption(`--data <data>`, `Document data as JSON object.`).option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
|
|
@@ -143809,6 +143961,12 @@ health.command(`get-certificate`).description(`Get the SSL certificate for a dom
|
|
|
143809
143961
|
async ({ domain: domain2 }) => parse3(await (await getHealthClient()).getCertificate(domain2))
|
|
143810
143962
|
)
|
|
143811
143963
|
);
|
|
143964
|
+
health.command(`get-console-pausing`).description(`Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.
|
|
143965
|
+
`).option(`--threshold <threshold>`, `Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.`, parseInteger).option(`--inactivity-days <inactivity-days>`, `Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.`, parseInteger).action(
|
|
143966
|
+
actionRunner(
|
|
143967
|
+
async ({ threshold, inactivityDays }) => parse3(await (await getHealthClient()).getConsolePausing(threshold, inactivityDays))
|
|
143968
|
+
)
|
|
143969
|
+
);
|
|
143812
143970
|
health.command(`get-db`).description(`Check the Appwrite database servers are up and connection is successful.`).action(
|
|
143813
143971
|
actionRunner(
|
|
143814
143972
|
async () => parse3(await (await getHealthClient()).getDB())
|
|
@@ -144417,7 +144575,7 @@ messaging.command(`list-topic-logs`).description(`Get the topic activity logs li
|
|
|
144417
144575
|
async ({ topicId, queries, total }) => parse3(await (await getMessagingClient()).listTopicLogs(topicId, queries, total))
|
|
144418
144576
|
)
|
|
144419
144577
|
);
|
|
144420
|
-
messaging.command(`list-subscribers`).description(`Get a list of all subscribers from the current Appwrite project.`).requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID subscribed to.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes:
|
|
144578
|
+
messaging.command(`list-subscribers`).description(`Get a list of all subscribers from the current Appwrite project.`).requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID subscribed to.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).option(
|
|
144421
144579
|
`--total [value]`,
|
|
144422
144580
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
144423
144581
|
(value) => value === void 0 ? true : parseBool(value)
|
|
@@ -144699,6 +144857,12 @@ projects.command(`update-auth-status`).description(`Update the status of a speci
|
|
|
144699
144857
|
async ({ projectId, method, status }) => parse3(await (await getProjectsClient()).updateAuthStatus(projectId, method, status))
|
|
144700
144858
|
)
|
|
144701
144859
|
);
|
|
144860
|
+
projects.command(`update-console-access`).description(`Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
|
|
144861
|
+
`).requiredOption(`--project-id <project-id>`, `Project ID`).action(
|
|
144862
|
+
actionRunner(
|
|
144863
|
+
async ({ projectId }) => parse3(await (await getProjectsClient()).updateConsoleAccess(projectId))
|
|
144864
|
+
)
|
|
144865
|
+
);
|
|
144702
144866
|
projects.command(`list-dev-keys`).description(`List all the project's dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: accessedAt, expire`).action(
|
|
144703
144867
|
actionRunner(
|
|
144704
144868
|
async ({ projectId, queries }) => parse3(await (await getProjectsClient()).listDevKeys(projectId, queries))
|
|
@@ -144844,6 +145008,12 @@ projects.command(`create-smtp-test`).description(`Send a test email to verify SM
|
|
|
144844
145008
|
async ({ projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure }) => parse3(await (await getProjectsClient()).createSmtpTest(projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure))
|
|
144845
145009
|
)
|
|
144846
145010
|
);
|
|
145011
|
+
projects.command(`update-status`).description(`Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
|
|
145012
|
+
`).requiredOption(`--project-id <project-id>`, `Project ID`).requiredOption(`--status <status>`, `New status for the project`).action(
|
|
145013
|
+
actionRunner(
|
|
145014
|
+
async ({ projectId, status }) => parse3(await (await getProjectsClient()).updateStatus(projectId, status))
|
|
145015
|
+
)
|
|
145016
|
+
);
|
|
144847
145017
|
projects.command(`update-team`).description(`Update the team ID of a project allowing for it to be transferred to another team.`).requiredOption(`--project-id <project-id>`, `Project unique ID.`).requiredOption(`--team-id <team-id>`, `Team ID of the team to transfer project to.`).action(
|
|
144848
145018
|
actionRunner(
|
|
144849
145019
|
async ({ projectId, teamId }) => parse3(await (await getProjectsClient()).updateTeam(projectId, teamId))
|
|
@@ -145084,9 +145254,13 @@ sites.command(`list-deployments`).description(`Get a list of all the site's code
|
|
|
145084
145254
|
async ({ siteId, queries, search, total }) => parse3(await (await getSitesClient()).listDeployments(siteId, queries, search, total))
|
|
145085
145255
|
)
|
|
145086
145256
|
);
|
|
145087
|
-
sites.command(`create-deployment`).description(`Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.`).requiredOption(`--site-id <site-id>`, `Site ID.`).requiredOption(`--code <code>`, `Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.`).
|
|
145257
|
+
sites.command(`create-deployment`).description(`Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.`).requiredOption(`--site-id <site-id>`, `Site ID.`).requiredOption(`--code <code>`, `Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.`).option(`--install-command <install-command>`, `Install Commands.`).option(`--build-command <build-command>`, `Build Commands.`).option(`--output-directory <output-directory>`, `Output Directory.`).option(
|
|
145258
|
+
`--activate [value]`,
|
|
145259
|
+
`Automatically activate the deployment when it is finished building.`,
|
|
145260
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
145261
|
+
).action(
|
|
145088
145262
|
actionRunner(
|
|
145089
|
-
async ({ siteId, code,
|
|
145263
|
+
async ({ siteId, code, installCommand, buildCommand, outputDirectory, activate }) => parse3(await (await getSitesClient()).createDeployment(siteId, code, installCommand, buildCommand, outputDirectory, activate))
|
|
145090
145264
|
)
|
|
145091
145265
|
);
|
|
145092
145266
|
sites.command(`create-duplicate-deployment`).description(`Create a new build for an existing site deployment. This endpoint allows you to rebuild a deployment with the updated site configuration, including its commands and output directory if they have been modified. The build process will be queued and executed asynchronously. The original deployment's code will be preserved and used for the new build.`).requiredOption(`--site-id <site-id>`, `Site ID.`).requiredOption(`--deployment-id <deployment-id>`, `Deployment ID.`).action(
|
|
@@ -145829,9 +146003,9 @@ tablesDB.command(`list-rows`).description(`Get a list of all the user's rows in
|
|
|
145829
146003
|
`--total [value]`,
|
|
145830
146004
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
145831
146005
|
(value) => value === void 0 ? true : parseBool(value)
|
|
145832
|
-
).action(
|
|
146006
|
+
).option(`--ttl <ttl>`, `TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).`, parseInteger).action(
|
|
145833
146007
|
actionRunner(
|
|
145834
|
-
async ({ databaseId, tableId, queries, transactionId, total }) => parse3(await (await getTablesDBClient()).listRows(databaseId, tableId, queries, transactionId, total))
|
|
146008
|
+
async ({ databaseId, tableId, queries, transactionId, total, ttl }) => parse3(await (await getTablesDBClient()).listRows(databaseId, tableId, queries, transactionId, total, ttl))
|
|
145835
146009
|
)
|
|
145836
146010
|
);
|
|
145837
146011
|
tablesDB.command(`create-row`).description(`Create a new Row. Before using this route, you should create a new table resource using either a [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable) API or directly from your database console.`).requiredOption(`--database-id <database-id>`, `Database ID.`).requiredOption(`--table-id <table-id>`, `Table ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/references/cloud/server-dart/tablesDB#createTable). Make sure to define columns before creating rows.`).requiredOption(`--row-id <row-id>`, `Row ID. Choose a custom ID or generate a random ID with \`ID.unique()\`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`).requiredOption(`--data <data>`, `Row data as JSON object.`).option(`--permissions [permissions...]`, `An array of permissions strings. By default, only the current user is granted all permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).`).option(`--transaction-id <transaction-id>`, `Transaction ID for staging the operation.`).action(
|
|
@@ -145972,7 +146146,7 @@ You only need to provide one of a user ID, email, or phone number. Appwrite will
|
|
|
145972
146146
|
Use the \`url\` parameter to redirect the user from the invitation email to your app. After the user is redirected, use the [Update Team Membership Status](https://appwrite.io/docs/references/cloud/client-web/teams#updateMembershipStatus) endpoint to allow the user to accept the invitation to the team.
|
|
145973
146147
|
|
|
145974
146148
|
Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.
|
|
145975
|
-
`).requiredOption(`--team-id <team-id>`, `Team ID.`).requiredOption(`--roles [roles...]`, `Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
146149
|
+
`).requiredOption(`--team-id <team-id>`, `Team ID.`).requiredOption(`--roles [roles...]`, `Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.`).option(`--email <email>`, `Email of the new team member.`).option(`--user-id <user-id>`, `ID of the user to be added to a team.`).option(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`).option(`--url <url>`, `URL to redirect the user back to your app from the invitation email. This parameter is not required when an API key is supplied. Only URLs from hostnames in your project platform list are allowed. This requirement helps to prevent an [open redirect](https://cheatsheetseries.owasp.org/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.html) attack against your project API.`).option(`--name <name>`, `Name of the new team member. Max length: 128 chars.`).action(
|
|
145976
146150
|
actionRunner(
|
|
145977
146151
|
async ({ teamId, roles, email: email3, userId, phone, url: url2, name }) => parse3(await (await getTeamsClient()).createMembership(teamId, roles, email3, userId, phone, url2, name))
|
|
145978
146152
|
)
|
|
@@ -145983,7 +146157,7 @@ teams.command(`get-membership`).description(`Get a team member by the membership
|
|
|
145983
146157
|
)
|
|
145984
146158
|
);
|
|
145985
146159
|
teams.command(`update-membership`).description(`Modify the roles of a team member. Only team members with the owner role have access to this endpoint. Learn more about [roles and permissions](https://appwrite.io/docs/permissions).
|
|
145986
|
-
`).requiredOption(`--team-id <team-id>`, `Team ID.`).requiredOption(`--membership-id <membership-id>`, `Membership ID.`).requiredOption(`--roles [roles...]`, `An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
146160
|
+
`).requiredOption(`--team-id <team-id>`, `Team ID.`).requiredOption(`--membership-id <membership-id>`, `Membership ID.`).requiredOption(`--roles [roles...]`, `An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.`).action(
|
|
145987
146161
|
actionRunner(
|
|
145988
146162
|
async ({ teamId, membershipId, roles }) => parse3(await (await getTeamsClient()).updateMembership(teamId, membershipId, roles))
|
|
145989
146163
|
)
|