appwrite-cli 17.0.0 → 17.1.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/CHANGELOG.md +6 -0
- package/README.md +2 -2
- package/cli.ts +6 -0
- package/dist/bundle-win-arm64.mjs +489 -122
- package/dist/cli.cjs +489 -122
- package/dist/index.cjs +175 -85
- package/dist/index.js +175 -85
- package/dist/lib/commands/services/organizations.d.ts +3 -0
- package/dist/lib/commands/services/organizations.d.ts.map +1 -0
- package/dist/lib/commands/services/teams.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/emulation/utils.d.ts.map +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/types.d.ts +1 -0
- package/dist/lib/types.d.ts.map +1 -1
- package/docs/examples/organizations/add-credit.md +5 -0
- package/docs/examples/organizations/cancel-downgrade.md +4 -0
- package/docs/examples/organizations/create-downgrade-feedback.md +8 -0
- package/docs/examples/organizations/create-invoice-payment.md +6 -0
- package/docs/examples/organizations/create-key.md +6 -0
- package/docs/examples/organizations/create.md +6 -0
- package/docs/examples/organizations/delete-backup-payment-method.md +4 -0
- package/docs/examples/organizations/delete-default-payment-method.md +4 -0
- package/docs/examples/organizations/delete-key.md +5 -0
- package/docs/examples/organizations/delete.md +4 -0
- package/docs/examples/organizations/estimation-create-organization.md +4 -0
- package/docs/examples/organizations/estimation-delete-organization.md +4 -0
- package/docs/examples/organizations/estimation-update-plan.md +5 -0
- package/docs/examples/organizations/get-aggregation.md +5 -0
- package/docs/examples/organizations/get-available-credits.md +4 -0
- package/docs/examples/organizations/get-credit.md +5 -0
- package/docs/examples/organizations/get-invoice-download.md +5 -0
- package/docs/examples/organizations/get-invoice-view.md +5 -0
- package/docs/examples/organizations/get-invoice.md +5 -0
- package/docs/examples/organizations/get-key.md +5 -0
- package/docs/examples/organizations/get-plan.md +4 -0
- package/docs/examples/organizations/get-scopes.md +4 -0
- package/docs/examples/organizations/get-usage.md +4 -0
- package/docs/examples/organizations/list-aggregations.md +4 -0
- package/docs/examples/organizations/list-credits.md +4 -0
- package/docs/examples/organizations/list-keys.md +4 -0
- package/docs/examples/organizations/list-regions.md +4 -0
- package/docs/examples/organizations/list.md +3 -0
- package/docs/examples/organizations/set-backup-payment-method.md +5 -0
- package/docs/examples/organizations/set-billing-address.md +5 -0
- package/docs/examples/organizations/set-billing-email.md +5 -0
- package/docs/examples/organizations/set-billing-tax-id.md +5 -0
- package/docs/examples/organizations/set-default-payment-method.md +5 -0
- package/docs/examples/organizations/update-budget.md +5 -0
- package/docs/examples/organizations/update-key.md +7 -0
- package/docs/examples/organizations/update-plan.md +5 -0
- package/docs/examples/organizations/validate-invoice.md +5 -0
- package/docs/examples/organizations/validate-payment.md +4 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/commands/services/migrations.ts +2 -2
- package/lib/commands/services/organizations.ts +517 -0
- package/lib/commands/services/projects.ts +2 -2
- package/lib/commands/services/proxy.ts +2 -2
- package/lib/commands/services/teams.ts +10 -1
- package/lib/commands/services/vcs.ts +2 -2
- package/lib/constants.ts +1 -1
- package/lib/emulation/utils.ts +3 -2
- package/lib/parser.ts +149 -27
- package/lib/questions.ts +2 -2
- package/lib/sdks.ts +1 -0
- package/lib/types.ts +1 -0
- package/package.json +1 -1
- package/scoop/appwrite.config.json +3 -3
package/dist/cli.cjs
CHANGED
|
@@ -21975,7 +21975,6 @@ var require_safe_buffer = __commonJS({
|
|
|
21975
21975
|
function SafeBuffer(arg, encodingOrOffset, length) {
|
|
21976
21976
|
return Buffer2(arg, encodingOrOffset, length);
|
|
21977
21977
|
}
|
|
21978
|
-
SafeBuffer.prototype = Object.create(Buffer2.prototype);
|
|
21979
21978
|
copyProps(Buffer2, SafeBuffer);
|
|
21980
21979
|
SafeBuffer.from = function(arg, encodingOrOffset, length) {
|
|
21981
21980
|
if (typeof arg === "number") {
|
|
@@ -24518,16 +24517,16 @@ var require_base = __commonJS({
|
|
|
24518
24517
|
}),
|
|
24519
24518
|
share()
|
|
24520
24519
|
);
|
|
24521
|
-
const
|
|
24520
|
+
const success22 = validation.pipe(
|
|
24522
24521
|
filter((state) => state.isValid === true),
|
|
24523
24522
|
take(1)
|
|
24524
24523
|
);
|
|
24525
24524
|
const error49 = validation.pipe(
|
|
24526
24525
|
filter((state) => state.isValid !== true),
|
|
24527
|
-
takeUntil(
|
|
24526
|
+
takeUntil(success22)
|
|
24528
24527
|
);
|
|
24529
24528
|
return {
|
|
24530
|
-
success:
|
|
24529
|
+
success: success22,
|
|
24531
24530
|
error: error49
|
|
24532
24531
|
};
|
|
24533
24532
|
}
|
|
@@ -63453,14 +63452,14 @@ var require_base2 = __commonJS({
|
|
|
63453
63452
|
return { isValid: err };
|
|
63454
63453
|
});
|
|
63455
63454
|
}).share();
|
|
63456
|
-
var
|
|
63455
|
+
var success22 = validation.filter(function(state) {
|
|
63457
63456
|
return state.isValid === true;
|
|
63458
63457
|
}).take(1);
|
|
63459
63458
|
var error49 = validation.filter(function(state) {
|
|
63460
63459
|
return state.isValid !== true;
|
|
63461
|
-
}).takeUntil(
|
|
63460
|
+
}).takeUntil(success22);
|
|
63462
63461
|
return {
|
|
63463
|
-
success:
|
|
63462
|
+
success: success22,
|
|
63464
63463
|
error: error49
|
|
63465
63464
|
};
|
|
63466
63465
|
};
|
|
@@ -80511,7 +80510,7 @@ var require_helpers = __commonJS({
|
|
|
80511
80510
|
if (instance.helpers[helperName]) {
|
|
80512
80511
|
instance.hooks[helperName] = instance.helpers[helperName];
|
|
80513
80512
|
if (!keepHelper) {
|
|
80514
|
-
|
|
80513
|
+
instance.helpers[helperName] = void 0;
|
|
80515
80514
|
}
|
|
80516
80515
|
}
|
|
80517
80516
|
}
|
|
@@ -80603,22 +80602,6 @@ var require_logger = __commonJS({
|
|
|
80603
80602
|
}
|
|
80604
80603
|
});
|
|
80605
80604
|
|
|
80606
|
-
// node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js
|
|
80607
|
-
var require_create_new_lookup_object = __commonJS({
|
|
80608
|
-
"node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js"(exports2) {
|
|
80609
|
-
"use strict";
|
|
80610
|
-
exports2.__esModule = true;
|
|
80611
|
-
exports2.createNewLookupObject = createNewLookupObject;
|
|
80612
|
-
var _utils = require_utils9();
|
|
80613
|
-
function createNewLookupObject() {
|
|
80614
|
-
for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
|
|
80615
|
-
sources[_key] = arguments[_key];
|
|
80616
|
-
}
|
|
80617
|
-
return _utils.extend.apply(void 0, [/* @__PURE__ */ Object.create(null)].concat(sources));
|
|
80618
|
-
}
|
|
80619
|
-
}
|
|
80620
|
-
});
|
|
80621
|
-
|
|
80622
80605
|
// node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js
|
|
80623
80606
|
var require_proto_access = __commonJS({
|
|
80624
80607
|
"node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js"(exports2) {
|
|
@@ -80630,25 +80613,28 @@ var require_proto_access = __commonJS({
|
|
|
80630
80613
|
function _interopRequireDefault(obj) {
|
|
80631
80614
|
return obj && obj.__esModule ? obj : { "default": obj };
|
|
80632
80615
|
}
|
|
80633
|
-
var
|
|
80616
|
+
var _utils = require_utils9();
|
|
80634
80617
|
var _logger = require_logger();
|
|
80635
80618
|
var _logger2 = _interopRequireDefault(_logger);
|
|
80636
80619
|
var loggedProperties = /* @__PURE__ */ Object.create(null);
|
|
80637
80620
|
function createProtoAccessControl(runtimeOptions) {
|
|
80638
|
-
var
|
|
80639
|
-
|
|
80640
|
-
|
|
80641
|
-
|
|
80642
|
-
|
|
80643
|
-
|
|
80644
|
-
|
|
80621
|
+
var propertyWhiteList = /* @__PURE__ */ Object.create(null);
|
|
80622
|
+
propertyWhiteList["__proto__"] = false;
|
|
80623
|
+
_utils.extend(propertyWhiteList, runtimeOptions.allowedProtoProperties);
|
|
80624
|
+
var methodWhiteList = /* @__PURE__ */ Object.create(null);
|
|
80625
|
+
methodWhiteList["constructor"] = false;
|
|
80626
|
+
methodWhiteList["__defineGetter__"] = false;
|
|
80627
|
+
methodWhiteList["__defineSetter__"] = false;
|
|
80628
|
+
methodWhiteList["__lookupGetter__"] = false;
|
|
80629
|
+
methodWhiteList["__lookupSetter__"] = false;
|
|
80630
|
+
_utils.extend(methodWhiteList, runtimeOptions.allowedProtoMethods);
|
|
80645
80631
|
return {
|
|
80646
80632
|
properties: {
|
|
80647
|
-
whitelist:
|
|
80633
|
+
whitelist: propertyWhiteList,
|
|
80648
80634
|
defaultValue: runtimeOptions.allowProtoPropertiesByDefault
|
|
80649
80635
|
},
|
|
80650
80636
|
methods: {
|
|
80651
|
-
whitelist:
|
|
80637
|
+
whitelist: methodWhiteList,
|
|
80652
80638
|
defaultValue: runtimeOptions.allowProtoMethodsByDefault
|
|
80653
80639
|
}
|
|
80654
80640
|
};
|
|
@@ -80701,7 +80687,7 @@ var require_base3 = __commonJS({
|
|
|
80701
80687
|
var _logger = require_logger();
|
|
80702
80688
|
var _logger2 = _interopRequireDefault(_logger);
|
|
80703
80689
|
var _internalProtoAccess = require_proto_access();
|
|
80704
|
-
var VERSION = "4.7.
|
|
80690
|
+
var VERSION = "4.7.9";
|
|
80705
80691
|
exports2.VERSION = VERSION;
|
|
80706
80692
|
var COMPILER_REVISION = 8;
|
|
80707
80693
|
exports2.COMPILER_REVISION = COMPILER_REVISION;
|
|
@@ -80887,14 +80873,12 @@ var require_runtime = __commonJS({
|
|
|
80887
80873
|
}
|
|
80888
80874
|
}
|
|
80889
80875
|
partial2 = env.VM.resolvePartial.call(this, partial2, context, options);
|
|
80890
|
-
|
|
80891
|
-
|
|
80892
|
-
|
|
80893
|
-
});
|
|
80894
|
-
var result = env.VM.invokePartial.call(this, partial2, context, extendedOptions);
|
|
80876
|
+
options.hooks = this.hooks;
|
|
80877
|
+
options.protoAccessControl = this.protoAccessControl;
|
|
80878
|
+
var result = env.VM.invokePartial.call(this, partial2, context, options);
|
|
80895
80879
|
if (result == null && env.compile) {
|
|
80896
80880
|
options.partials[options.name] = env.compile(partial2, templateSpec.compilerOptions, env);
|
|
80897
|
-
result = options.partials[options.name](context,
|
|
80881
|
+
result = options.partials[options.name](context, options);
|
|
80898
80882
|
}
|
|
80899
80883
|
if (result != null) {
|
|
80900
80884
|
if (options.indent) {
|
|
@@ -80939,7 +80923,7 @@ var require_runtime = __commonJS({
|
|
|
80939
80923
|
for (var i = 0; i < len; i++) {
|
|
80940
80924
|
var result = depths[i] && container.lookupProperty(depths[i], name);
|
|
80941
80925
|
if (result != null) {
|
|
80942
|
-
return
|
|
80926
|
+
return result;
|
|
80943
80927
|
}
|
|
80944
80928
|
}
|
|
80945
80929
|
},
|
|
@@ -81005,8 +80989,9 @@ var require_runtime = __commonJS({
|
|
|
81005
80989
|
ret.isTop = true;
|
|
81006
80990
|
ret._setup = function(options) {
|
|
81007
80991
|
if (!options.partial) {
|
|
81008
|
-
var mergedHelpers =
|
|
81009
|
-
|
|
80992
|
+
var mergedHelpers = {};
|
|
80993
|
+
addHelpers(mergedHelpers, env.helpers, container);
|
|
80994
|
+
addHelpers(mergedHelpers, options.helpers, container);
|
|
81010
80995
|
container.helpers = mergedHelpers;
|
|
81011
80996
|
if (templateSpec.usePartial) {
|
|
81012
80997
|
container.partials = container.mergeIfNeeded(options.partials, env.partials);
|
|
@@ -81056,18 +81041,18 @@ var require_runtime = __commonJS({
|
|
|
81056
81041
|
function resolvePartial(partial2, context, options) {
|
|
81057
81042
|
if (!partial2) {
|
|
81058
81043
|
if (options.name === "@partial-block") {
|
|
81059
|
-
partial2 = options.data
|
|
81044
|
+
partial2 = lookupOwnProperty(options.data, "partial-block");
|
|
81060
81045
|
} else {
|
|
81061
|
-
partial2 = options.partials
|
|
81046
|
+
partial2 = lookupOwnProperty(options.partials, options.name);
|
|
81062
81047
|
}
|
|
81063
81048
|
} else if (!partial2.call && !options.name) {
|
|
81064
81049
|
options.name = partial2;
|
|
81065
|
-
partial2 = options.partials
|
|
81050
|
+
partial2 = lookupOwnProperty(options.partials, partial2);
|
|
81066
81051
|
}
|
|
81067
81052
|
return partial2;
|
|
81068
81053
|
}
|
|
81069
81054
|
function invokePartial(partial2, context, options) {
|
|
81070
|
-
var currentPartialBlock = options.data
|
|
81055
|
+
var currentPartialBlock = lookupOwnProperty(options.data, "partial-block");
|
|
81071
81056
|
options.partial = true;
|
|
81072
81057
|
if (options.ids) {
|
|
81073
81058
|
options.data.contextPath = options.ids[0] || options.data.contextPath;
|
|
@@ -81100,6 +81085,11 @@ var require_runtime = __commonJS({
|
|
|
81100
81085
|
function noop() {
|
|
81101
81086
|
return "";
|
|
81102
81087
|
}
|
|
81088
|
+
function lookupOwnProperty(obj, name) {
|
|
81089
|
+
if (obj && Object.prototype.hasOwnProperty.call(obj, name)) {
|
|
81090
|
+
return obj[name];
|
|
81091
|
+
}
|
|
81092
|
+
}
|
|
81103
81093
|
function initData(context, data) {
|
|
81104
81094
|
if (!data || !("root" in data)) {
|
|
81105
81095
|
data = data ? _base.createFrame(data) : {};
|
|
@@ -81115,16 +81105,18 @@ var require_runtime = __commonJS({
|
|
|
81115
81105
|
}
|
|
81116
81106
|
return prog;
|
|
81117
81107
|
}
|
|
81118
|
-
function
|
|
81119
|
-
|
|
81120
|
-
|
|
81108
|
+
function addHelpers(mergedHelpers, helpers, container) {
|
|
81109
|
+
if (!helpers) return;
|
|
81110
|
+
Object.keys(helpers).forEach(function(helperName) {
|
|
81111
|
+
var helper = helpers[helperName];
|
|
81121
81112
|
mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
|
|
81122
81113
|
});
|
|
81123
81114
|
}
|
|
81124
81115
|
function passLookupPropertyOption(helper, container) {
|
|
81125
81116
|
var lookupProperty = container.lookupProperty;
|
|
81126
81117
|
return _internalWrapHelper.wrapHelper(helper, function(options) {
|
|
81127
|
-
|
|
81118
|
+
options.lookupProperty = lookupProperty;
|
|
81119
|
+
return options;
|
|
81128
81120
|
});
|
|
81129
81121
|
}
|
|
81130
81122
|
}
|
|
@@ -81934,7 +81926,7 @@ var require_parser = __commonJS({
|
|
|
81934
81926
|
break;
|
|
81935
81927
|
}
|
|
81936
81928
|
};
|
|
81937
|
-
lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[
|
|
81929
|
+
lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^\/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
|
|
81938
81930
|
lexer2.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
|
|
81939
81931
|
return lexer2;
|
|
81940
81932
|
})();
|
|
@@ -82441,12 +82433,15 @@ var require_base4 = __commonJS({
|
|
|
82441
82433
|
var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
|
|
82442
82434
|
var _helpers = require_helpers2();
|
|
82443
82435
|
var Helpers = _interopRequireWildcard(_helpers);
|
|
82436
|
+
var _exception = require_exception();
|
|
82437
|
+
var _exception2 = _interopRequireDefault(_exception);
|
|
82444
82438
|
var _utils = require_utils9();
|
|
82445
82439
|
exports2.parser = _parser2["default"];
|
|
82446
82440
|
var yy = {};
|
|
82447
82441
|
_utils.extend(yy, Helpers);
|
|
82448
82442
|
function parseWithoutProcessing(input, options) {
|
|
82449
82443
|
if (input.type === "Program") {
|
|
82444
|
+
validateInputAst(input);
|
|
82450
82445
|
return input;
|
|
82451
82446
|
}
|
|
82452
82447
|
_parser2["default"].yy = yy;
|
|
@@ -82461,6 +82456,51 @@ var require_base4 = __commonJS({
|
|
|
82461
82456
|
var strip = new _whitespaceControl2["default"](options);
|
|
82462
82457
|
return strip.accept(ast);
|
|
82463
82458
|
}
|
|
82459
|
+
function validateInputAst(ast) {
|
|
82460
|
+
validateAstNode(ast);
|
|
82461
|
+
}
|
|
82462
|
+
function validateAstNode(node) {
|
|
82463
|
+
if (node == null) {
|
|
82464
|
+
return;
|
|
82465
|
+
}
|
|
82466
|
+
if (Array.isArray(node)) {
|
|
82467
|
+
node.forEach(validateAstNode);
|
|
82468
|
+
return;
|
|
82469
|
+
}
|
|
82470
|
+
if (typeof node !== "object") {
|
|
82471
|
+
return;
|
|
82472
|
+
}
|
|
82473
|
+
if (node.type === "PathExpression") {
|
|
82474
|
+
if (!isValidDepth(node.depth)) {
|
|
82475
|
+
throw new _exception2["default"]("Invalid AST: PathExpression.depth must be an integer");
|
|
82476
|
+
}
|
|
82477
|
+
if (!Array.isArray(node.parts)) {
|
|
82478
|
+
throw new _exception2["default"]("Invalid AST: PathExpression.parts must be an array");
|
|
82479
|
+
}
|
|
82480
|
+
for (var i = 0; i < node.parts.length; i++) {
|
|
82481
|
+
if (typeof node.parts[i] !== "string") {
|
|
82482
|
+
throw new _exception2["default"]("Invalid AST: PathExpression.parts must only contain strings");
|
|
82483
|
+
}
|
|
82484
|
+
}
|
|
82485
|
+
} else if (node.type === "NumberLiteral") {
|
|
82486
|
+
if (typeof node.value !== "number" || !isFinite(node.value)) {
|
|
82487
|
+
throw new _exception2["default"]("Invalid AST: NumberLiteral.value must be a number");
|
|
82488
|
+
}
|
|
82489
|
+
} else if (node.type === "BooleanLiteral") {
|
|
82490
|
+
if (typeof node.value !== "boolean") {
|
|
82491
|
+
throw new _exception2["default"]("Invalid AST: BooleanLiteral.value must be a boolean");
|
|
82492
|
+
}
|
|
82493
|
+
}
|
|
82494
|
+
Object.keys(node).forEach(function(propertyName) {
|
|
82495
|
+
if (propertyName === "loc") {
|
|
82496
|
+
return;
|
|
82497
|
+
}
|
|
82498
|
+
validateAstNode(node[propertyName]);
|
|
82499
|
+
});
|
|
82500
|
+
}
|
|
82501
|
+
function isValidDepth(depth) {
|
|
82502
|
+
return typeof depth === "number" && isFinite(depth) && Math.floor(depth) === depth && depth >= 0;
|
|
82503
|
+
}
|
|
82464
82504
|
}
|
|
82465
82505
|
});
|
|
82466
82506
|
|
|
@@ -84889,12 +84929,10 @@ var require_javascript_compiler = __commonJS({
|
|
|
84889
84929
|
var programs = _context.programs;
|
|
84890
84930
|
var decorators = _context.decorators;
|
|
84891
84931
|
for (i = 0, l = programs.length; i < l; i++) {
|
|
84892
|
-
|
|
84893
|
-
|
|
84894
|
-
|
|
84895
|
-
|
|
84896
|
-
ret.useDecorators = true;
|
|
84897
|
-
}
|
|
84932
|
+
ret[i] = programs[i];
|
|
84933
|
+
if (decorators[i]) {
|
|
84934
|
+
ret[i + "_d"] = decorators[i];
|
|
84935
|
+
ret.useDecorators = true;
|
|
84898
84936
|
}
|
|
84899
84937
|
}
|
|
84900
84938
|
if (this.environment.usePartial) {
|
|
@@ -85155,22 +85193,25 @@ var require_javascript_compiler = __commonJS({
|
|
|
85155
85193
|
}
|
|
85156
85194
|
this.resolvePath("data", parts, 0, true, strict);
|
|
85157
85195
|
},
|
|
85158
|
-
resolvePath: function resolvePath(type, parts,
|
|
85196
|
+
resolvePath: function resolvePath(type, parts, startPartIndex, falsy, strict) {
|
|
85159
85197
|
var _this2 = this;
|
|
85160
85198
|
if (this.options.strict || this.options.assumeObjects) {
|
|
85161
|
-
this.push(strictLookup(this.options.strict && strict, this, parts,
|
|
85199
|
+
this.push(strictLookup(this.options.strict && strict, this, parts, startPartIndex, type));
|
|
85162
85200
|
return;
|
|
85163
85201
|
}
|
|
85164
85202
|
var len = parts.length;
|
|
85165
|
-
|
|
85166
|
-
|
|
85167
|
-
var lookup = _this2.nameLookup(current, parts[
|
|
85203
|
+
var _loop = function(i2) {
|
|
85204
|
+
_this2.replaceStack(function(current) {
|
|
85205
|
+
var lookup = _this2.nameLookup(current, parts[i2], type);
|
|
85168
85206
|
if (!falsy) {
|
|
85169
85207
|
return [" != null ? ", lookup, " : ", current];
|
|
85170
85208
|
} else {
|
|
85171
85209
|
return [" && ", lookup];
|
|
85172
85210
|
}
|
|
85173
85211
|
});
|
|
85212
|
+
};
|
|
85213
|
+
for (var i = startPartIndex; i < len; i++) {
|
|
85214
|
+
_loop(i);
|
|
85174
85215
|
}
|
|
85175
85216
|
},
|
|
85176
85217
|
// [resolvePossibleLambda]
|
|
@@ -85274,7 +85315,9 @@ var require_javascript_compiler = __commonJS({
|
|
|
85274
85315
|
// and inserts the decorator into the decorators list.
|
|
85275
85316
|
registerDecorator: function registerDecorator(paramSize, name) {
|
|
85276
85317
|
var foundDecorator = this.nameLookup("decorators", name, "decorator"), options = this.setupHelperArgs(name, paramSize);
|
|
85277
|
-
this.decorators.push(["
|
|
85318
|
+
this.decorators.push(["var decorator = ", foundDecorator, ";"]);
|
|
85319
|
+
this.decorators.push(['if (typeof decorator !== "function") { throw new Error(', this.quotedString('Missing decorator: "' + name + '"'), "); }"]);
|
|
85320
|
+
this.decorators.push(["fn = ", this.decorators.functionCall("decorator", "", ["fn", "props", "container", options]), " || fn;"]);
|
|
85278
85321
|
},
|
|
85279
85322
|
// [invokeHelper]
|
|
85280
85323
|
//
|
|
@@ -85421,8 +85464,7 @@ var require_javascript_compiler = __commonJS({
|
|
|
85421
85464
|
compiler = new this.compiler();
|
|
85422
85465
|
var existing = this.matchExistingProgram(child);
|
|
85423
85466
|
if (existing == null) {
|
|
85424
|
-
this.context.programs.push("");
|
|
85425
|
-
var index = this.context.programs.length;
|
|
85467
|
+
var index = this.context.programs.push("") - 1;
|
|
85426
85468
|
child.index = index;
|
|
85427
85469
|
child.name = "program" + index;
|
|
85428
85470
|
this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
|
|
@@ -85666,16 +85708,16 @@ var require_javascript_compiler = __commonJS({
|
|
|
85666
85708
|
JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
|
|
85667
85709
|
return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
|
|
85668
85710
|
};
|
|
85669
|
-
function strictLookup(requireTerminal, compiler, parts,
|
|
85711
|
+
function strictLookup(requireTerminal, compiler, parts, startPartIndex, type) {
|
|
85670
85712
|
var stack = compiler.popStack(), len = parts.length;
|
|
85671
85713
|
if (requireTerminal) {
|
|
85672
85714
|
len--;
|
|
85673
85715
|
}
|
|
85674
|
-
for (; i < len; i++) {
|
|
85716
|
+
for (var i = startPartIndex; i < len; i++) {
|
|
85675
85717
|
stack = compiler.nameLookup(stack, parts[i], type);
|
|
85676
85718
|
}
|
|
85677
85719
|
if (requireTerminal) {
|
|
85678
|
-
return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[
|
|
85720
|
+
return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[len]), ", ", JSON.stringify(compiler.source.currentLocation), " )"];
|
|
85679
85721
|
} else {
|
|
85680
85722
|
return stack;
|
|
85681
85723
|
}
|
|
@@ -85925,7 +85967,7 @@ var package_default = {
|
|
|
85925
85967
|
type: "module",
|
|
85926
85968
|
homepage: "https://appwrite.io/support",
|
|
85927
85969
|
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",
|
|
85928
|
-
version: "17.
|
|
85970
|
+
version: "17.1.0",
|
|
85929
85971
|
license: "BSD-3-Clause",
|
|
85930
85972
|
main: "dist/index.cjs",
|
|
85931
85973
|
module: "dist/index.js",
|
|
@@ -100213,7 +100255,7 @@ var import_undici = __toESM(require_undici(), 1);
|
|
|
100213
100255
|
// lib/constants.ts
|
|
100214
100256
|
var SDK_TITLE = "Appwrite";
|
|
100215
100257
|
var SDK_TITLE_LOWER = "appwrite";
|
|
100216
|
-
var SDK_VERSION = "17.
|
|
100258
|
+
var SDK_VERSION = "17.1.0";
|
|
100217
100259
|
var SDK_NAME = "Command Line";
|
|
100218
100260
|
var SDK_PLATFORM = "console";
|
|
100219
100261
|
var SDK_LANGUAGE = "cli";
|
|
@@ -103296,7 +103338,7 @@ var Account = class {
|
|
|
103296
103338
|
};
|
|
103297
103339
|
}
|
|
103298
103340
|
const provider = params.provider;
|
|
103299
|
-
const
|
|
103341
|
+
const success22 = params.success;
|
|
103300
103342
|
const failure = params.failure;
|
|
103301
103343
|
const scopes = params.scopes;
|
|
103302
103344
|
if (typeof provider === "undefined") {
|
|
@@ -103304,8 +103346,8 @@ var Account = class {
|
|
|
103304
103346
|
}
|
|
103305
103347
|
const apiPath = "/account/sessions/oauth2/{provider}".replace("{provider}", provider);
|
|
103306
103348
|
const payload = {};
|
|
103307
|
-
if (typeof
|
|
103308
|
-
payload["success"] =
|
|
103349
|
+
if (typeof success22 !== "undefined") {
|
|
103350
|
+
payload["success"] = success22;
|
|
103309
103351
|
}
|
|
103310
103352
|
if (typeof failure !== "undefined") {
|
|
103311
103353
|
payload["failure"] = failure;
|
|
@@ -103644,7 +103686,7 @@ var Account = class {
|
|
|
103644
103686
|
};
|
|
103645
103687
|
}
|
|
103646
103688
|
const provider = params.provider;
|
|
103647
|
-
const
|
|
103689
|
+
const success22 = params.success;
|
|
103648
103690
|
const failure = params.failure;
|
|
103649
103691
|
const scopes = params.scopes;
|
|
103650
103692
|
if (typeof provider === "undefined") {
|
|
@@ -103652,8 +103694,8 @@ var Account = class {
|
|
|
103652
103694
|
}
|
|
103653
103695
|
const apiPath = "/account/tokens/oauth2/{provider}".replace("{provider}", provider);
|
|
103654
103696
|
const payload = {};
|
|
103655
|
-
if (typeof
|
|
103656
|
-
payload["success"] =
|
|
103697
|
+
if (typeof success22 !== "undefined") {
|
|
103698
|
+
payload["success"] = success22;
|
|
103657
103699
|
}
|
|
103658
103700
|
if (typeof failure !== "undefined") {
|
|
103659
103701
|
payload["failure"] = failure;
|
|
@@ -126421,10 +126463,14 @@ var DomainPurchaseStatus;
|
|
|
126421
126463
|
})(DomainPurchaseStatus || (DomainPurchaseStatus = {}));
|
|
126422
126464
|
|
|
126423
126465
|
// lib/parser.ts
|
|
126466
|
+
BigInt.prototype.toJSON = function() {
|
|
126467
|
+
return this.toString();
|
|
126468
|
+
};
|
|
126424
126469
|
var { description } = package_default;
|
|
126425
126470
|
var cliConfig = {
|
|
126426
126471
|
verbose: false,
|
|
126427
126472
|
json: false,
|
|
126473
|
+
raw: false,
|
|
126428
126474
|
force: false,
|
|
126429
126475
|
all: false,
|
|
126430
126476
|
ids: [],
|
|
@@ -126447,34 +126493,108 @@ var extractReportCommandArgs = (value) => {
|
|
|
126447
126493
|
}
|
|
126448
126494
|
return reportData.data.args;
|
|
126449
126495
|
};
|
|
126496
|
+
var filterObject = (obj) => {
|
|
126497
|
+
const result = {};
|
|
126498
|
+
for (const key of Object.keys(obj)) {
|
|
126499
|
+
const value = obj[key];
|
|
126500
|
+
if (typeof value === "function") continue;
|
|
126501
|
+
if (value == null) continue;
|
|
126502
|
+
if (value?.constructor?.name === "BigNumber") {
|
|
126503
|
+
result[key] = String(value);
|
|
126504
|
+
continue;
|
|
126505
|
+
}
|
|
126506
|
+
if (typeof value === "object") continue;
|
|
126507
|
+
if (typeof value === "string" && value.trim() === "") continue;
|
|
126508
|
+
result[key] = value;
|
|
126509
|
+
}
|
|
126510
|
+
return result;
|
|
126511
|
+
};
|
|
126512
|
+
var filterData = (data) => {
|
|
126513
|
+
const result = {};
|
|
126514
|
+
for (const key of Object.keys(data)) {
|
|
126515
|
+
const value = data[key];
|
|
126516
|
+
if (typeof value === "function") continue;
|
|
126517
|
+
if (value == null) continue;
|
|
126518
|
+
if (value?.constructor?.name === "BigNumber") {
|
|
126519
|
+
result[key] = String(value);
|
|
126520
|
+
continue;
|
|
126521
|
+
}
|
|
126522
|
+
if (Array.isArray(value)) {
|
|
126523
|
+
result[key] = value.map((item) => {
|
|
126524
|
+
if (item?.constructor?.name === "BigNumber") return String(item);
|
|
126525
|
+
return item && typeof item === "object" && !Array.isArray(item) ? filterObject(item) : item;
|
|
126526
|
+
});
|
|
126527
|
+
} else if (typeof value === "object") {
|
|
126528
|
+
continue;
|
|
126529
|
+
} else if (typeof value === "string" && value.trim() === "") {
|
|
126530
|
+
continue;
|
|
126531
|
+
} else {
|
|
126532
|
+
result[key] = value;
|
|
126533
|
+
}
|
|
126534
|
+
}
|
|
126535
|
+
return result;
|
|
126536
|
+
};
|
|
126450
126537
|
var parse3 = (data) => {
|
|
126451
|
-
if (cliConfig.
|
|
126538
|
+
if (cliConfig.raw) {
|
|
126452
126539
|
drawJSON(data);
|
|
126453
126540
|
return;
|
|
126454
126541
|
}
|
|
126455
|
-
|
|
126456
|
-
|
|
126542
|
+
if (cliConfig.json) {
|
|
126543
|
+
drawJSON(filterData(data));
|
|
126544
|
+
return;
|
|
126545
|
+
}
|
|
126546
|
+
const keys = Object.keys(data).filter((k2) => typeof data[k2] !== "function");
|
|
126547
|
+
let printedScalar = false;
|
|
126548
|
+
for (const key of keys) {
|
|
126549
|
+
const value = data[key];
|
|
126550
|
+
if (value === null) {
|
|
126457
126551
|
console.log(`${import_chalk.default.yellow.bold(key)} : null`);
|
|
126458
|
-
|
|
126552
|
+
printedScalar = true;
|
|
126553
|
+
} else if (Array.isArray(value)) {
|
|
126554
|
+
if (printedScalar) console.log("");
|
|
126459
126555
|
console.log(`${import_chalk.default.yellow.bold.underline(key)}`);
|
|
126460
|
-
if (typeof
|
|
126461
|
-
drawTable(
|
|
126556
|
+
if (typeof value[0] === "object") {
|
|
126557
|
+
drawTable(value);
|
|
126462
126558
|
} else {
|
|
126463
|
-
drawJSON(
|
|
126464
|
-
}
|
|
126465
|
-
|
|
126466
|
-
|
|
126467
|
-
|
|
126559
|
+
drawJSON(value);
|
|
126560
|
+
}
|
|
126561
|
+
printedScalar = false;
|
|
126562
|
+
} else if (typeof value === "object") {
|
|
126563
|
+
if (printedScalar) console.log("");
|
|
126564
|
+
if (value?.constructor?.name === "BigNumber") {
|
|
126565
|
+
console.log(`${import_chalk.default.yellow.bold(key)} : ${value}`);
|
|
126566
|
+
printedScalar = true;
|
|
126468
126567
|
} else {
|
|
126469
126568
|
console.log(`${import_chalk.default.yellow.bold.underline(key)}`);
|
|
126470
|
-
const tableRow = toJsonObject(
|
|
126569
|
+
const tableRow = toJsonObject(value) ?? {};
|
|
126471
126570
|
drawTable([tableRow]);
|
|
126571
|
+
printedScalar = false;
|
|
126472
126572
|
}
|
|
126473
126573
|
} else {
|
|
126474
|
-
console.log(`${import_chalk.default.yellow.bold(key)} : ${
|
|
126574
|
+
console.log(`${import_chalk.default.yellow.bold(key)} : ${value}`);
|
|
126575
|
+
printedScalar = true;
|
|
126475
126576
|
}
|
|
126476
126577
|
}
|
|
126477
126578
|
};
|
|
126579
|
+
var MAX_COL_WIDTH = 40;
|
|
126580
|
+
var formatCellValue = (value) => {
|
|
126581
|
+
if (value == null) return "-";
|
|
126582
|
+
if (Array.isArray(value)) {
|
|
126583
|
+
if (value.length === 0) return "[]";
|
|
126584
|
+
return `[${value.length} items]`;
|
|
126585
|
+
}
|
|
126586
|
+
if (typeof value === "object") {
|
|
126587
|
+
if (value?.constructor?.name === "BigNumber") return String(value);
|
|
126588
|
+
const keys = Object.keys(value);
|
|
126589
|
+
if (keys.length === 0) return "{}";
|
|
126590
|
+
return `{${keys.length} keys}`;
|
|
126591
|
+
}
|
|
126592
|
+
const str = String(value);
|
|
126593
|
+
if (str.length > MAX_COL_WIDTH) {
|
|
126594
|
+
return str.slice(0, MAX_COL_WIDTH - 1) + "\u2026";
|
|
126595
|
+
}
|
|
126596
|
+
return str;
|
|
126597
|
+
};
|
|
126478
126598
|
var drawTable = (data) => {
|
|
126479
126599
|
if (data.length == 0) {
|
|
126480
126600
|
console.log("[]");
|
|
@@ -126482,19 +126602,55 @@ var drawTable = (data) => {
|
|
|
126482
126602
|
}
|
|
126483
126603
|
const rows = data.map((item) => toJsonObject(item) ?? {});
|
|
126484
126604
|
const obj = rows.reduce((res, item) => ({ ...res, ...item }), {});
|
|
126485
|
-
const
|
|
126486
|
-
if (
|
|
126605
|
+
const allKeys = Object.keys(obj);
|
|
126606
|
+
if (allKeys.length === 0) {
|
|
126487
126607
|
drawJSON(data);
|
|
126488
126608
|
return;
|
|
126489
126609
|
}
|
|
126490
|
-
const
|
|
126610
|
+
const maxColumns = 6;
|
|
126611
|
+
if (allKeys.length > maxColumns) {
|
|
126612
|
+
const rowEntries = rows.map((row) => {
|
|
126613
|
+
const entries = [];
|
|
126614
|
+
for (const key of Object.keys(row)) {
|
|
126615
|
+
const value = row[key];
|
|
126616
|
+
if (typeof value === "function") continue;
|
|
126617
|
+
if (value == null) continue;
|
|
126618
|
+
if (value?.constructor?.name === "BigNumber") {
|
|
126619
|
+
entries.push([key, String(value)]);
|
|
126620
|
+
continue;
|
|
126621
|
+
}
|
|
126622
|
+
if (typeof value === "object") continue;
|
|
126623
|
+
if (typeof value === "string" && value.trim() === "") continue;
|
|
126624
|
+
entries.push([key, String(value)]);
|
|
126625
|
+
}
|
|
126626
|
+
return entries;
|
|
126627
|
+
});
|
|
126628
|
+
const flatEntries = rowEntries.flat();
|
|
126629
|
+
if (flatEntries.length === 0) {
|
|
126630
|
+
drawJSON(data);
|
|
126631
|
+
return;
|
|
126632
|
+
}
|
|
126633
|
+
const maxKeyLen = Math.max(...flatEntries.map(([key]) => key.length));
|
|
126634
|
+
const separatorLen = Math.min(maxKeyLen + 2 + MAX_COL_WIDTH, process.stdout.columns || 80);
|
|
126635
|
+
rowEntries.forEach((entries, idx) => {
|
|
126636
|
+
if (idx > 0) console.log(import_chalk.default.cyan("\u2500".repeat(separatorLen)));
|
|
126637
|
+
for (const [key, value] of entries) {
|
|
126638
|
+
const paddedKey = key.padEnd(maxKeyLen);
|
|
126639
|
+
console.log(`${import_chalk.default.yellow.bold(paddedKey)} ${value}`);
|
|
126640
|
+
}
|
|
126641
|
+
});
|
|
126642
|
+
return;
|
|
126643
|
+
}
|
|
126644
|
+
const columns = allKeys;
|
|
126645
|
+
const def = allKeys.reduce((result, key) => {
|
|
126491
126646
|
result[key] = "-";
|
|
126492
126647
|
return result;
|
|
126493
126648
|
}, {});
|
|
126494
126649
|
const normalizedData = rows.map((item) => ({ ...def, ...item }));
|
|
126495
|
-
const columns = Object.keys(normalizedData[0]);
|
|
126496
126650
|
const table = new import_cli_table3.default({
|
|
126497
126651
|
head: columns.map((c) => import_chalk.default.cyan.italic.bold(c)),
|
|
126652
|
+
colWidths: columns.map(() => null),
|
|
126653
|
+
wordWrap: false,
|
|
126498
126654
|
chars: {
|
|
126499
126655
|
top: " ",
|
|
126500
126656
|
"top-mid": " ",
|
|
@@ -126516,15 +126672,7 @@ var drawTable = (data) => {
|
|
|
126516
126672
|
normalizedData.forEach((row) => {
|
|
126517
126673
|
const rowValues = [];
|
|
126518
126674
|
for (const key of columns) {
|
|
126519
|
-
|
|
126520
|
-
rowValues.push("-");
|
|
126521
|
-
} else if (Array.isArray(row[key])) {
|
|
126522
|
-
rowValues.push(JSON.stringify(row[key]));
|
|
126523
|
-
} else if (typeof row[key] === "object") {
|
|
126524
|
-
rowValues.push(JSON.stringify(row[key]));
|
|
126525
|
-
} else {
|
|
126526
|
-
rowValues.push(String(row[key]));
|
|
126527
|
-
}
|
|
126675
|
+
rowValues.push(formatCellValue(row[key]));
|
|
126528
126676
|
}
|
|
126529
126677
|
table.push(rowValues);
|
|
126530
126678
|
});
|
|
@@ -126652,7 +126800,7 @@ var commandDescriptions = {
|
|
|
126652
126800
|
locale: `The locale command allows you to customize your app based on your users' location.`,
|
|
126653
126801
|
sites: `The sites command allows you to view, create and manage your Appwrite Sites.`,
|
|
126654
126802
|
storage: `The storage command allows you to manage your project files.`,
|
|
126655
|
-
teams: `The teams command allows you to group users of your project to enable them to share read and write access to your project resources.`,
|
|
126803
|
+
teams: `The teams command allows you to group users of your project to enable them to share read and write access to your project resources. Requires a linked project. To manage console-level teams, use the 'organizations' command instead.`,
|
|
126656
126804
|
update: `The update command allows you to update the ${SDK_TITLE} CLI to the latest version.`,
|
|
126657
126805
|
users: `The users command allows you to manage your project users.`,
|
|
126658
126806
|
projects: `The projects command allows you to manage your projects, add platforms, manage API keys, Dev Keys etc.`,
|
|
@@ -127028,14 +127176,14 @@ var questionsInitProject = [
|
|
|
127028
127176
|
name: "project",
|
|
127029
127177
|
message: "What would you like to name your project?",
|
|
127030
127178
|
default: "My Awesome Project",
|
|
127031
|
-
when: (answer) => answer.start !== "existing"
|
|
127179
|
+
when: (answer) => whenOverride(answer) && answer.start !== "existing"
|
|
127032
127180
|
},
|
|
127033
127181
|
{
|
|
127034
127182
|
type: "input",
|
|
127035
127183
|
name: "id",
|
|
127036
127184
|
message: "What ID would you like to have for your project?",
|
|
127037
127185
|
default: "unique()",
|
|
127038
|
-
when: (answer) => answer.start !== "existing"
|
|
127186
|
+
when: (answer) => whenOverride(answer) && answer.start !== "existing"
|
|
127039
127187
|
},
|
|
127040
127188
|
{
|
|
127041
127189
|
type: "search-list",
|
|
@@ -134628,7 +134776,6 @@ var JwtManager = {
|
|
|
134628
134776
|
timerError: null,
|
|
134629
134777
|
async setup(userId = null, projectScopes = []) {
|
|
134630
134778
|
const consoleClient = await sdkForConsole();
|
|
134631
|
-
const usersClient2 = new Users(consoleClient);
|
|
134632
134779
|
const projectsClient2 = new Projects(consoleClient);
|
|
134633
134780
|
if (this.timerWarn) {
|
|
134634
134781
|
clearTimeout(this.timerWarn);
|
|
@@ -134654,6 +134801,8 @@ var JwtManager = {
|
|
|
134654
134801
|
1e3 * 60 * 60
|
|
134655
134802
|
);
|
|
134656
134803
|
if (userId) {
|
|
134804
|
+
const projectClient2 = await sdkForProject();
|
|
134805
|
+
const usersClient2 = new Users(projectClient2);
|
|
134657
134806
|
await usersClient2.get({
|
|
134658
134807
|
userId
|
|
134659
134808
|
});
|
|
@@ -139828,8 +139977,8 @@ If there is already an active session, the new session will be attached to the l
|
|
|
139828
139977
|
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
|
|
139829
139978
|
`).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's 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(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
|
|
139830
139979
|
actionRunner(
|
|
139831
|
-
async ({ provider, success:
|
|
139832
|
-
const url2 = (await getAccountClient()).createOAuth2Session(provider,
|
|
139980
|
+
async ({ provider, success: success22, failure, scopes }) => {
|
|
139981
|
+
const url2 = (await getAccountClient()).createOAuth2Session(provider, success22, failure, scopes);
|
|
139833
139982
|
if (url2) console.log(url2);
|
|
139834
139983
|
}
|
|
139835
139984
|
)
|
|
@@ -139909,8 +140058,8 @@ If authentication succeeds, \`userId\` and \`secret\` of a token will be appende
|
|
|
139909
140058
|
|
|
139910
140059
|
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).`).requiredOption(`--provider <provider>`, `OAuth2 Provider. Currently, supported providers are: amazon, apple, auth0, authentik, autodesk, bitbucket, bitly, box, dailymotion, discord, disqus, dropbox, etsy, facebook, figma, github, gitlab, google, linkedin, microsoft, notion, oidc, okta, paypal, paypalSandbox, podio, salesforce, slack, spotify, stripe, tradeshift, tradeshiftBox, twitch, wordpress, yahoo, yammer, yandex, zoho, zoom.`).option(`--success <success>`, `URL to redirect back to your app after a successful login attempt. Only URLs from hostnames in your project's 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(`--failure <failure>`, `URL to redirect back to your app after a failed login attempt. Only URLs from hostnames in your project's 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(`--scopes [scopes...]`, `A list of custom OAuth2 scopes. Check each provider internal docs for a list of supported scopes. Maximum of 100 scopes are allowed, each 4096 characters long.`).action(
|
|
139911
140060
|
actionRunner(
|
|
139912
|
-
async ({ provider, success:
|
|
139913
|
-
const url2 = (await getAccountClient()).createOAuth2Token(provider,
|
|
140061
|
+
async ({ provider, success: success22, failure, scopes }) => {
|
|
140062
|
+
const url2 = (await getAccountClient()).createOAuth2Token(provider, success22, failure, scopes);
|
|
139914
140063
|
if (url2) console.log(url2);
|
|
139915
140064
|
}
|
|
139916
140065
|
)
|
|
@@ -141518,7 +141667,7 @@ messaging.command(`delete-subscriber`).description(`Delete a subscriber by its u
|
|
|
141518
141667
|
var migrationsClient = null;
|
|
141519
141668
|
var getMigrationsClient = async () => {
|
|
141520
141669
|
if (!migrationsClient) {
|
|
141521
|
-
const sdkClient = await
|
|
141670
|
+
const sdkClient = await sdkForConsole();
|
|
141522
141671
|
migrationsClient = new Migrations(sdkClient);
|
|
141523
141672
|
}
|
|
141524
141673
|
return migrationsClient;
|
|
@@ -141613,6 +141762,217 @@ migrations.command(`delete`).description(`Delete a migration by its unique ID. T
|
|
|
141613
141762
|
)
|
|
141614
141763
|
);
|
|
141615
141764
|
|
|
141765
|
+
// lib/commands/services/organizations.ts
|
|
141766
|
+
var organizationsClient = null;
|
|
141767
|
+
var getOrganizationsClient = async () => {
|
|
141768
|
+
if (!organizationsClient) {
|
|
141769
|
+
const sdkClient = await sdkForConsole();
|
|
141770
|
+
organizationsClient = new Organizations(sdkClient);
|
|
141771
|
+
}
|
|
141772
|
+
return organizationsClient;
|
|
141773
|
+
};
|
|
141774
|
+
var organizations = new Command("organizations").description(commandDescriptions["organizations"] ?? "").configureHelp({
|
|
141775
|
+
helpWidth: process.stdout.columns || 80
|
|
141776
|
+
});
|
|
141777
|
+
organizations.command(`list`).description(`Get a list of all the teams in which the current user is a member. You can use the parameters to filter your results.`).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: name, total, billingPlan, paymentMethodId, backupPaymentMethodId, platform`).option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`).action(
|
|
141778
|
+
actionRunner(
|
|
141779
|
+
async ({ queries, search }) => parse3(await (await getOrganizationsClient()).list(queries, search))
|
|
141780
|
+
)
|
|
141781
|
+
);
|
|
141782
|
+
organizations.command(`create`).description(`Create a new organization.
|
|
141783
|
+
`).requiredOption(`--organization-id <organization-id>`, `Organization 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(`--name <name>`, `Organization name. Max length: 128 chars.`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--payment-method-id <payment-method-id>`, `Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.`).option(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).option(`--tax-id <tax-id>`, `Tax Id associated to billing.`).option(`--budget <budget>`, `Budget limit for additional usage set for the organization`, parseInteger).option(`--platform <platform>`, `Platform type`).action(
|
|
141784
|
+
actionRunner(
|
|
141785
|
+
async ({ organizationId, name, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget, platform }) => parse3(await (await getOrganizationsClient()).create(organizationId, name, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget, platform))
|
|
141786
|
+
)
|
|
141787
|
+
);
|
|
141788
|
+
organizations.command(`estimation-create-organization`).description(`Get estimation for creating an organization.`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--payment-method-id <payment-method-id>`, `Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).option(`--platform <platform>`, `Platform type`).action(
|
|
141789
|
+
actionRunner(
|
|
141790
|
+
async ({ billingPlan, paymentMethodId, invites, couponId, platform }) => parse3(await (await getOrganizationsClient()).estimationCreateOrganization(billingPlan, paymentMethodId, invites, couponId, platform))
|
|
141791
|
+
)
|
|
141792
|
+
);
|
|
141793
|
+
organizations.command(`delete`).description(`Delete an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
|
|
141794
|
+
actionRunner(
|
|
141795
|
+
async ({ organizationId }) => parse3(await (await getOrganizationsClient()).delete(organizationId))
|
|
141796
|
+
)
|
|
141797
|
+
);
|
|
141798
|
+
organizations.command(`list-aggregations`).description(`Get a list of all aggregations for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization 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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, from, to`).action(
|
|
141799
|
+
actionRunner(
|
|
141800
|
+
async ({ organizationId, queries }) => parse3(await (await getOrganizationsClient()).listAggregations(organizationId, queries))
|
|
141801
|
+
)
|
|
141802
|
+
);
|
|
141803
|
+
organizations.command(`get-aggregation`).description(`Get a specific aggregation using it's aggregation ID.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--aggregation-id <aggregation-id>`, `Invoice unique ID`).option(`--limit <limit>`, `Maximum number of project aggregations to return in response. By default will return maximum 5 results. Maximum of 10 results allowed per request.`, parseInteger).option(`--offset <offset>`, `Offset value. The default value is 0. Use this param to manage pagination.`, parseInteger).action(
|
|
141804
|
+
actionRunner(
|
|
141805
|
+
async ({ organizationId, aggregationId, limit, offset }) => parse3(await (await getOrganizationsClient()).getAggregation(organizationId, aggregationId, limit, offset))
|
|
141806
|
+
)
|
|
141807
|
+
);
|
|
141808
|
+
organizations.command(`set-billing-address`).description(`Set a billing address for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).action(
|
|
141809
|
+
actionRunner(
|
|
141810
|
+
async ({ organizationId, billingAddressId }) => parse3(await (await getOrganizationsClient()).setBillingAddress(organizationId, billingAddressId))
|
|
141811
|
+
)
|
|
141812
|
+
);
|
|
141813
|
+
organizations.command(`set-billing-email`).description(`Set the current billing email for the organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--billing-email <billing-email>`, `Billing email for the organization.`).action(
|
|
141814
|
+
actionRunner(
|
|
141815
|
+
async ({ organizationId, billingEmail }) => parse3(await (await getOrganizationsClient()).setBillingEmail(organizationId, billingEmail))
|
|
141816
|
+
)
|
|
141817
|
+
);
|
|
141818
|
+
organizations.command(`update-budget`).description(`Update the budget limit for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--budget <budget>`, `Budget limit for additional usage set for the organization`, parseInteger).option(`--alerts [alerts...]`, `Budget alert limit percentage`).action(
|
|
141819
|
+
actionRunner(
|
|
141820
|
+
async ({ organizationId, budget, alerts }) => parse3(await (await getOrganizationsClient()).updateBudget(organizationId, budget, alerts))
|
|
141821
|
+
)
|
|
141822
|
+
);
|
|
141823
|
+
organizations.command(`list-credits`).description(`List all credits for an organization.
|
|
141824
|
+
`).requiredOption(`--organization-id <organization-id>`, `Organization 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/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, couponId, credits, expiration, status`).action(
|
|
141825
|
+
actionRunner(
|
|
141826
|
+
async ({ organizationId, queries }) => parse3(await (await getOrganizationsClient()).listCredits(organizationId, queries))
|
|
141827
|
+
)
|
|
141828
|
+
);
|
|
141829
|
+
organizations.command(`add-credit`).description(`Add credit to an organization using a coupon.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--coupon-id <coupon-id>`, `ID of the coupon`).action(
|
|
141830
|
+
actionRunner(
|
|
141831
|
+
async ({ organizationId, couponId }) => parse3(await (await getOrganizationsClient()).addCredit(organizationId, couponId))
|
|
141832
|
+
)
|
|
141833
|
+
);
|
|
141834
|
+
organizations.command(`get-available-credits`).description(`Get total available valid credits for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
|
|
141835
|
+
actionRunner(
|
|
141836
|
+
async ({ organizationId }) => parse3(await (await getOrganizationsClient()).getAvailableCredits(organizationId))
|
|
141837
|
+
)
|
|
141838
|
+
);
|
|
141839
|
+
organizations.command(`get-credit`).description(`Get credit details.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--credit-id <credit-id>`, `Credit Unique ID`).action(
|
|
141840
|
+
actionRunner(
|
|
141841
|
+
async ({ organizationId, creditId }) => parse3(await (await getOrganizationsClient()).getCredit(organizationId, creditId))
|
|
141842
|
+
)
|
|
141843
|
+
);
|
|
141844
|
+
organizations.command(`estimation-delete-organization`).description(`Get estimation for deleting an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
|
|
141845
|
+
actionRunner(
|
|
141846
|
+
async ({ organizationId }) => parse3(await (await getOrganizationsClient()).estimationDeleteOrganization(organizationId))
|
|
141847
|
+
)
|
|
141848
|
+
);
|
|
141849
|
+
organizations.command(`estimation-update-plan`).description(`Get estimation for updating the organization plan.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).action(
|
|
141850
|
+
actionRunner(
|
|
141851
|
+
async ({ organizationId, billingPlan, invites, couponId }) => parse3(await (await getOrganizationsClient()).estimationUpdatePlan(organizationId, billingPlan, invites, couponId))
|
|
141852
|
+
)
|
|
141853
|
+
);
|
|
141854
|
+
organizations.command(`create-downgrade-feedback`).description(`Submit feedback about downgrading from a paid plan to a lower tier. This helps the team understand user experience and improve the platform.
|
|
141855
|
+
`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--reason <reason>`, `Feedback reason`).requiredOption(`--message <message>`, `Feedback message`).requiredOption(`--from-plan-id <from-plan-id>`, `Plan downgrading from`).requiredOption(`--to-plan-id <to-plan-id>`, `Plan downgrading to`).action(
|
|
141856
|
+
actionRunner(
|
|
141857
|
+
async ({ organizationId, reason, message, fromPlanId, toPlanId }) => parse3(await (await getOrganizationsClient()).createDowngradeFeedback(organizationId, reason, message, fromPlanId, toPlanId))
|
|
141858
|
+
)
|
|
141859
|
+
);
|
|
141860
|
+
organizations.command(`get-invoice`).description(`Get an invoice by its unique ID.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
|
|
141861
|
+
actionRunner(
|
|
141862
|
+
async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoice(organizationId, invoiceId))
|
|
141863
|
+
)
|
|
141864
|
+
);
|
|
141865
|
+
organizations.command(`get-invoice-download`).description(`Download invoice in PDF`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
|
|
141866
|
+
actionRunner(
|
|
141867
|
+
async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoiceDownload(organizationId, invoiceId))
|
|
141868
|
+
)
|
|
141869
|
+
);
|
|
141870
|
+
organizations.command(`create-invoice-payment`).description(`Initiate payment for failed invoice to pay live from console`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).requiredOption(`--payment-method-id <payment-method-id>`, `Payment method ID`).action(
|
|
141871
|
+
actionRunner(
|
|
141872
|
+
async ({ organizationId, invoiceId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).createInvoicePayment(organizationId, invoiceId, paymentMethodId))
|
|
141873
|
+
)
|
|
141874
|
+
);
|
|
141875
|
+
organizations.command(`validate-invoice`).description(`Validates the payment linked with the invoice and updates the invoice status if the payment status is changed.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
|
|
141876
|
+
actionRunner(
|
|
141877
|
+
async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).validateInvoice(organizationId, invoiceId))
|
|
141878
|
+
)
|
|
141879
|
+
);
|
|
141880
|
+
organizations.command(`get-invoice-view`).description(`View invoice in PDF`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--invoice-id <invoice-id>`, `Invoice unique ID`).action(
|
|
141881
|
+
actionRunner(
|
|
141882
|
+
async ({ organizationId, invoiceId }) => parse3(await (await getOrganizationsClient()).getInvoiceView(organizationId, invoiceId))
|
|
141883
|
+
)
|
|
141884
|
+
);
|
|
141885
|
+
organizations.command(`list-keys`).description(`Get a list of all API keys from the current organization. `).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).option(
|
|
141886
|
+
`--total [value]`,
|
|
141887
|
+
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
141888
|
+
(value) => value === void 0 ? true : parseBool(value)
|
|
141889
|
+
).action(
|
|
141890
|
+
actionRunner(
|
|
141891
|
+
async ({ organizationId, total }) => parse3(await (await getOrganizationsClient()).listKeys(organizationId, total))
|
|
141892
|
+
)
|
|
141893
|
+
);
|
|
141894
|
+
organizations.command(`create-key`).description(`Create a new organization API key.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`).action(
|
|
141895
|
+
actionRunner(
|
|
141896
|
+
async ({ organizationId, name, scopes, expire }) => parse3(await (await getOrganizationsClient()).createKey(organizationId, name, scopes, expire))
|
|
141897
|
+
)
|
|
141898
|
+
);
|
|
141899
|
+
organizations.command(`get-key`).description(`Get a key by its unique ID. This endpoint returns details about a specific API key in your organization including it's scopes.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).action(
|
|
141900
|
+
actionRunner(
|
|
141901
|
+
async ({ organizationId, keyId }) => parse3(await (await getOrganizationsClient()).getKey(organizationId, keyId))
|
|
141902
|
+
)
|
|
141903
|
+
);
|
|
141904
|
+
organizations.command(`update-key`).description(`Update a key by its unique ID. Use this endpoint to update the name, scopes, or expiration time of an API key.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`).requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`).option(`--expire <expire>`, `Expiration time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Use null for unlimited expiration.`).action(
|
|
141905
|
+
actionRunner(
|
|
141906
|
+
async ({ organizationId, keyId, name, scopes, expire }) => parse3(await (await getOrganizationsClient()).updateKey(organizationId, keyId, name, scopes, expire))
|
|
141907
|
+
)
|
|
141908
|
+
);
|
|
141909
|
+
organizations.command(`delete-key`).description(`Delete a key by its unique ID. Once deleted, the key can no longer be used to authenticate API calls.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--key-id <key-id>`, `Key unique ID.`).action(
|
|
141910
|
+
actionRunner(
|
|
141911
|
+
async ({ organizationId, keyId }) => parse3(await (await getOrganizationsClient()).deleteKey(organizationId, keyId))
|
|
141912
|
+
)
|
|
141913
|
+
);
|
|
141914
|
+
organizations.command(`set-default-payment-method`).description(`Set a organization's default payment method.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
|
|
141915
|
+
actionRunner(
|
|
141916
|
+
async ({ organizationId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).setDefaultPaymentMethod(organizationId, paymentMethodId))
|
|
141917
|
+
)
|
|
141918
|
+
);
|
|
141919
|
+
organizations.command(`delete-default-payment-method`).description(`Delete the default payment method for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
|
|
141920
|
+
actionRunner(
|
|
141921
|
+
async ({ organizationId }) => parse3(await (await getOrganizationsClient()).deleteDefaultPaymentMethod(organizationId))
|
|
141922
|
+
)
|
|
141923
|
+
);
|
|
141924
|
+
organizations.command(`set-backup-payment-method`).description(`Set an organization's backup payment method.
|
|
141925
|
+
`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--payment-method-id <payment-method-id>`, `Unique ID of payment method`).action(
|
|
141926
|
+
actionRunner(
|
|
141927
|
+
async ({ organizationId, paymentMethodId }) => parse3(await (await getOrganizationsClient()).setBackupPaymentMethod(organizationId, paymentMethodId))
|
|
141928
|
+
)
|
|
141929
|
+
);
|
|
141930
|
+
organizations.command(`delete-backup-payment-method`).description(`Delete a backup payment method for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).action(
|
|
141931
|
+
actionRunner(
|
|
141932
|
+
async ({ organizationId }) => parse3(await (await getOrganizationsClient()).deleteBackupPaymentMethod(organizationId))
|
|
141933
|
+
)
|
|
141934
|
+
);
|
|
141935
|
+
organizations.command(`get-plan`).description(`Get the details of the current billing plan for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).action(
|
|
141936
|
+
actionRunner(
|
|
141937
|
+
async ({ organizationId }) => parse3(await (await getOrganizationsClient()).getPlan(organizationId))
|
|
141938
|
+
)
|
|
141939
|
+
);
|
|
141940
|
+
organizations.command(`update-plan`).description(`Update the billing plan for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).requiredOption(`--billing-plan <billing-plan>`, `Organization billing plan chosen`).option(`--payment-method-id <payment-method-id>`, `Payment method ID. Required for pro plans when trial is not available and user doesn't have default payment method set.`).option(`--billing-address-id <billing-address-id>`, `Unique ID of billing address`).option(`--invites [invites...]`, `Additional member invites`).option(`--coupon-id <coupon-id>`, `Coupon id`).option(`--tax-id <tax-id>`, `Tax Id associated to billing.`).option(`--budget <budget>`, `Budget limit for additional usage set for the organization`, parseInteger).action(
|
|
141941
|
+
actionRunner(
|
|
141942
|
+
async ({ organizationId, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget }) => parse3(await (await getOrganizationsClient()).updatePlan(organizationId, billingPlan, paymentMethodId, billingAddressId, invites, couponId, taxId, budget))
|
|
141943
|
+
)
|
|
141944
|
+
);
|
|
141945
|
+
organizations.command(`cancel-downgrade`).description(`Cancel the downgrade initiated for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization Unique ID`).action(
|
|
141946
|
+
actionRunner(
|
|
141947
|
+
async ({ organizationId }) => parse3(await (await getOrganizationsClient()).cancelDowngrade(organizationId))
|
|
141948
|
+
)
|
|
141949
|
+
);
|
|
141950
|
+
organizations.command(`list-regions`).description(`Get all available regions for an organization.`).requiredOption(`--organization-id <organization-id>`, `Team ID.`).action(
|
|
141951
|
+
actionRunner(
|
|
141952
|
+
async ({ organizationId }) => parse3(await (await getOrganizationsClient()).listRegions(organizationId))
|
|
141953
|
+
)
|
|
141954
|
+
);
|
|
141955
|
+
organizations.command(`get-scopes`).description(`Get Scopes`).requiredOption(`--organization-id <organization-id>`, `Organization id`).option(`--project-id <project-id>`, `Project id`).action(
|
|
141956
|
+
actionRunner(
|
|
141957
|
+
async ({ organizationId, projectId }) => parse3(await (await getOrganizationsClient()).getScopes(organizationId, projectId))
|
|
141958
|
+
)
|
|
141959
|
+
);
|
|
141960
|
+
organizations.command(`set-billing-tax-id`).description(`Set an organization's billing tax ID.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).requiredOption(`--tax-id <tax-id>`, `Tax Id associated to billing.`).action(
|
|
141961
|
+
actionRunner(
|
|
141962
|
+
async ({ organizationId, taxId }) => parse3(await (await getOrganizationsClient()).setBillingTaxId(organizationId, taxId))
|
|
141963
|
+
)
|
|
141964
|
+
);
|
|
141965
|
+
organizations.command(`get-usage`).description(`Get the usage data for an organization.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--start-date <start-date>`, `Starting date for the usage`).option(`--end-date <end-date>`, `End date for the usage`).action(
|
|
141966
|
+
actionRunner(
|
|
141967
|
+
async ({ organizationId, startDate, endDate }) => parse3(await (await getOrganizationsClient()).getUsage(organizationId, startDate, endDate))
|
|
141968
|
+
)
|
|
141969
|
+
);
|
|
141970
|
+
organizations.command(`validate-payment`).description(`Validate payment for team after creation or upgrade.`).requiredOption(`--organization-id <organization-id>`, `Organization ID`).option(`--invites [invites...]`, `Additional member invites`).action(
|
|
141971
|
+
actionRunner(
|
|
141972
|
+
async ({ organizationId, invites }) => parse3(await (await getOrganizationsClient()).validatePayment(organizationId, invites))
|
|
141973
|
+
)
|
|
141974
|
+
);
|
|
141975
|
+
|
|
141616
141976
|
// lib/commands/services/project.ts
|
|
141617
141977
|
var projectClient = null;
|
|
141618
141978
|
var getProjectClient = async () => {
|
|
@@ -141672,7 +142032,7 @@ project.command(`delete-variable`).description(`Delete a variable by its unique
|
|
|
141672
142032
|
var projectsClient = null;
|
|
141673
142033
|
var getProjectsClient = async () => {
|
|
141674
142034
|
if (!projectsClient) {
|
|
141675
|
-
const sdkClient = await
|
|
142035
|
+
const sdkClient = await sdkForConsole();
|
|
141676
142036
|
projectsClient = new Projects(sdkClient);
|
|
141677
142037
|
}
|
|
141678
142038
|
return projectsClient;
|
|
@@ -141965,7 +142325,7 @@ projects.command(`delete-sms-template`).description(`Reset a custom SMS template
|
|
|
141965
142325
|
var proxyClient = null;
|
|
141966
142326
|
var getProxyClient = async () => {
|
|
141967
142327
|
if (!proxyClient) {
|
|
141968
|
-
const sdkClient = await
|
|
142328
|
+
const sdkClient = await sdkForConsole();
|
|
141969
142329
|
proxyClient = new Proxy2(sdkClient);
|
|
141970
142330
|
}
|
|
141971
142331
|
return proxyClient;
|
|
@@ -142953,7 +143313,15 @@ tablesDB.command(`get-usage`).description(`Get usage metrics and statistics for
|
|
|
142953
143313
|
var teamsClient = null;
|
|
142954
143314
|
var getTeamsClient = async () => {
|
|
142955
143315
|
if (!teamsClient) {
|
|
142956
|
-
|
|
143316
|
+
let sdkClient;
|
|
143317
|
+
try {
|
|
143318
|
+
sdkClient = await sdkForProject();
|
|
143319
|
+
} catch (e) {
|
|
143320
|
+
if (e instanceof Error && e.message.includes("Project is not set")) {
|
|
143321
|
+
hint(`To manage console-level teams, use the 'organizations' command instead.`);
|
|
143322
|
+
}
|
|
143323
|
+
throw e;
|
|
143324
|
+
}
|
|
142957
143325
|
teamsClient = new Teams(sdkClient);
|
|
142958
143326
|
}
|
|
142959
143327
|
return teamsClient;
|
|
@@ -143365,7 +143733,7 @@ users.command(`update-phone-verification`).description(`Update the user phone ve
|
|
|
143365
143733
|
var vcsClient = null;
|
|
143366
143734
|
var getVcsClient = async () => {
|
|
143367
143735
|
if (!vcsClient) {
|
|
143368
|
-
const sdkClient = await
|
|
143736
|
+
const sdkClient = await sdkForConsole();
|
|
143369
143737
|
vcsClient = new Vcs(sdkClient);
|
|
143370
143738
|
}
|
|
143371
143739
|
return vcsClient;
|
|
@@ -143531,8 +143899,10 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
|
|
|
143531
143899
|
program.description(commandDescriptions["main"]).configureHelp({
|
|
143532
143900
|
helpWidth: process.stdout.columns || 80,
|
|
143533
143901
|
sortSubcommands: true
|
|
143534
|
-
}).helpOption("-h, --help", "Display help for command").version(version3, "-v, --version", "Output the version number").option("-V, --verbose", "Show complete error log").option("-j, --json", "Output in JSON format").hook("preAction", migrate).option("-f,--force", "Flag to confirm all warnings").option("-a,--all", "Flag to push all resources").option("--id [id...]", "Flag to pass a list of ids for a given action").option("--report", "Enable reporting in case of CLI errors").on("option:json", () => {
|
|
143902
|
+
}).helpOption("-h, --help", "Display help for command").version(version3, "-v, --version", "Output the version number").option("-V, --verbose", "Show complete error log").option("-j, --json", "Output in JSON format").option("-R, --raw", "Output full raw JSON (no filtering)").hook("preAction", migrate).option("-f,--force", "Flag to confirm all warnings").option("-a,--all", "Flag to push all resources").option("--id [id...]", "Flag to pass a list of ids for a given action").option("--report", "Enable reporting in case of CLI errors").on("option:json", () => {
|
|
143535
143903
|
cliConfig.json = true;
|
|
143904
|
+
}).on("option:raw", () => {
|
|
143905
|
+
cliConfig.raw = true;
|
|
143536
143906
|
}).on("option:verbose", () => {
|
|
143537
143907
|
cliConfig.verbose = true;
|
|
143538
143908
|
}).on("option:report", function() {
|
|
@@ -143544,14 +143914,11 @@ if (process.argv.includes("-v") || process.argv.includes("--version")) {
|
|
|
143544
143914
|
cliConfig.all = true;
|
|
143545
143915
|
}).on("option:id", function() {
|
|
143546
143916
|
cliConfig.ids = this.opts().id;
|
|
143547
|
-
}).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(webhooks).addCommand(client).parse(process.argv);
|
|
143917
|
+
}).showSuggestionAfterError().addCommand(whoami).addCommand(register).addCommand(login).addCommand(init).addCommand(pull).addCommand(push).addCommand(types).addCommand(deploy).addCommand(run).addCommand(update).addCommand(generate).addCommand(logout).addCommand(account).addCommand(activities).addCommand(backups).addCommand(databases).addCommand(functions).addCommand(graphql).addCommand(health).addCommand(locale).addCommand(messaging).addCommand(migrations).addCommand(organizations).addCommand(project).addCommand(projects).addCommand(proxy).addCommand(sites).addCommand(storage).addCommand(tablesDB).addCommand(teams).addCommand(tokens).addCommand(users).addCommand(vcs).addCommand(webhooks).addCommand(client).parse(process.argv);
|
|
143548
143918
|
process.stdout.columns = oldWidth;
|
|
143549
143919
|
}
|
|
143550
143920
|
/*! Bundled license information:
|
|
143551
143921
|
|
|
143552
|
-
safe-buffer/index.js:
|
|
143553
|
-
(*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> *)
|
|
143554
|
-
|
|
143555
143922
|
undici/lib/fetch/body.js:
|
|
143556
143923
|
(*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> *)
|
|
143557
143924
|
|