appwrite-cli 18.2.0 → 19.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/README.md +6 -6
- package/dist/bundle-win-arm64.mjs +2308 -2610
- package/dist/cli.cjs +2459 -2761
- package/dist/index.cjs +697 -1215
- package/dist/index.js +697 -1215
- package/dist/lib/commands/config.d.ts +0 -2
- package/dist/lib/commands/config.d.ts.map +1 -1
- package/dist/lib/commands/init.d.ts.map +1 -1
- package/dist/lib/commands/pull.d.ts.map +1 -1
- package/dist/lib/commands/push.d.ts.map +1 -1
- package/dist/lib/commands/services/account.d.ts.map +1 -1
- package/dist/lib/commands/services/backups.d.ts.map +1 -1
- package/dist/lib/commands/services/databases.d.ts.map +1 -1
- package/dist/lib/commands/services/functions.d.ts.map +1 -1
- package/dist/lib/commands/services/messaging.d.ts.map +1 -1
- package/dist/lib/commands/services/migrations.d.ts.map +1 -1
- package/dist/lib/commands/services/organizations.d.ts.map +1 -1
- package/dist/lib/commands/services/project.d.ts.map +1 -1
- package/dist/lib/commands/services/projects.d.ts.map +1 -1
- package/dist/lib/commands/services/proxy.d.ts.map +1 -1
- package/dist/lib/commands/services/sites.d.ts.map +1 -1
- package/dist/lib/commands/services/storage.d.ts.map +1 -1
- package/dist/lib/commands/services/tables-db.d.ts.map +1 -1
- package/dist/lib/commands/services/teams.d.ts.map +1 -1
- package/dist/lib/commands/services/tokens.d.ts.map +1 -1
- package/dist/lib/commands/services/users.d.ts.map +1 -1
- package/dist/lib/commands/services/vcs.d.ts.map +1 -1
- package/dist/lib/commands/services/webhooks.d.ts.map +1 -1
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/commands/utils/query.d.ts +15 -0
- package/dist/lib/commands/utils/query.d.ts.map +1 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +3 -1
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/questions.d.ts.map +1 -1
- package/dist/lib/response-config.d.ts.map +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/package.json +5 -3
package/dist/index.cjs
CHANGED
|
@@ -65008,10 +65008,12 @@ var id_default = ID;
|
|
|
65008
65008
|
// lib/constants.ts
|
|
65009
65009
|
var SDK_TITLE = "Appwrite";
|
|
65010
65010
|
var SDK_TITLE_LOWER = "appwrite";
|
|
65011
|
-
var SDK_VERSION = "
|
|
65011
|
+
var SDK_VERSION = "19.1.0";
|
|
65012
65012
|
var SDK_LOGO = "\n _ _ _ ___ __ _____\n /_\\ _ __ _ ____ ___ __(_) |_ ___ / __\\ / / \\_ \\\n //_\\\\| '_ \\| '_ \\ \\ /\\ / / '__| | __/ _ \\ / / / / / /\\/\n / _ \\ |_) | |_) \\ V V /| | | | || __/ / /___/ /___/\\/ /_\n \\_/ \\_/ .__/| .__/ \\_/\\_/ |_| |_|\\__\\___| \\____/\\____/\\____/\n |_| |_|\n\n";
|
|
65013
65013
|
var EXECUTABLE_NAME = "appwrite";
|
|
65014
65014
|
var UPDATE_CHECK_INTERVAL_MS = 24 * 60 * 60 * 1e3;
|
|
65015
|
+
var HOMEBREW_TAP = "appwrite/appwrite";
|
|
65016
|
+
var HOMEBREW_FORMULA = `${HOMEBREW_TAP}/appwrite`;
|
|
65015
65017
|
var NPM_PACKAGE_NAME = "appwrite-cli";
|
|
65016
65018
|
var NPM_REGISTRY_URL = `https://registry.npmjs.org/${NPM_PACKAGE_NAME}/latest`;
|
|
65017
65019
|
var GITHUB_REPO = "appwrite/appwrite-cli";
|
|
@@ -79012,7 +79014,6 @@ var SiteSchema = external_exports.object({
|
|
|
79012
79014
|
path: external_exports.string().optional(),
|
|
79013
79015
|
$id: external_exports.string(),
|
|
79014
79016
|
name: external_exports.string(),
|
|
79015
|
-
enabled: external_exports.boolean().optional(),
|
|
79016
79017
|
logging: external_exports.boolean().optional(),
|
|
79017
79018
|
timeout: external_exports.union([external_exports.number(), external_exports.bigint()]).optional(),
|
|
79018
79019
|
framework: external_exports.string().optional(),
|
|
@@ -79286,7 +79287,6 @@ var siteRequiresBuildCommand = (site) => {
|
|
|
79286
79287
|
return !(site.framework === "other" && site.adapter === "static");
|
|
79287
79288
|
};
|
|
79288
79289
|
var WINDOWS_EXECUTABLE_NAME = `${EXECUTABLE_NAME.toLowerCase()}.exe`;
|
|
79289
|
-
var HOMEBREW_FORMULA_NAME = EXECUTABLE_NAME.toLowerCase();
|
|
79290
79290
|
var isCloudHostname = (hostname3) => hostname3 === "cloud.appwrite.io" || hostname3.endsWith(".cloud.appwrite.io");
|
|
79291
79291
|
var getConsoleBaseUrl = (endpoint) => {
|
|
79292
79292
|
try {
|
|
@@ -79455,6 +79455,7 @@ function pruneDeprecatedSiteFields(data) {
|
|
|
79455
79455
|
sanitized.sites = sanitized.sites.map((site) => {
|
|
79456
79456
|
if (site && typeof site === "object") {
|
|
79457
79457
|
const {
|
|
79458
|
+
enabled: _enabled,
|
|
79458
79459
|
vars: _vars,
|
|
79459
79460
|
ignore: _ignore,
|
|
79460
79461
|
...rest
|
|
@@ -79628,13 +79629,16 @@ var Local = class _Local extends Config {
|
|
|
79628
79629
|
if (!this.has("sites")) {
|
|
79629
79630
|
return [];
|
|
79630
79631
|
}
|
|
79631
|
-
return this.get("sites") ?? []
|
|
79632
|
+
return (this.get("sites") ?? []).map((site) => {
|
|
79633
|
+
const { enabled: _enabled, vars: _vars, ignore: _ignore, ...rest } = site;
|
|
79634
|
+
return rest;
|
|
79635
|
+
});
|
|
79632
79636
|
}
|
|
79633
79637
|
getSite($id) {
|
|
79634
79638
|
if (!this.has("sites")) {
|
|
79635
79639
|
return {};
|
|
79636
79640
|
}
|
|
79637
|
-
const sites = this.
|
|
79641
|
+
const sites = this.getSites();
|
|
79638
79642
|
for (let i = 0; i < sites.length; i++) {
|
|
79639
79643
|
if (sites[i]["$id"] == $id) {
|
|
79640
79644
|
return sites[i];
|
|
@@ -83693,6 +83697,41 @@ function __classPrivateFieldGet(receiver, state, kind, f2) {
|
|
|
83693
83697
|
if (typeof state === "function" ? receiver !== state || !f2 : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
83694
83698
|
return kind === "m" ? f2 : kind === "a" ? f2.call(receiver) : f2 ? f2.value : state.get(receiver);
|
|
83695
83699
|
}
|
|
83700
|
+
var _a2;
|
|
83701
|
+
var _ID_hexTimestamp;
|
|
83702
|
+
var ID2 = class {
|
|
83703
|
+
/**
|
|
83704
|
+
* Uses the provided ID as the ID for the resource.
|
|
83705
|
+
*
|
|
83706
|
+
* @param {string} id
|
|
83707
|
+
* @returns {string}
|
|
83708
|
+
*/
|
|
83709
|
+
static custom(id) {
|
|
83710
|
+
return id;
|
|
83711
|
+
}
|
|
83712
|
+
/**
|
|
83713
|
+
* Have Appwrite generate a unique ID for you.
|
|
83714
|
+
*
|
|
83715
|
+
* @param {number} padding. Default is 7.
|
|
83716
|
+
* @returns {string}
|
|
83717
|
+
*/
|
|
83718
|
+
static unique(padding = 7) {
|
|
83719
|
+
const baseId = __classPrivateFieldGet(_a2, _a2, "m", _ID_hexTimestamp).call(_a2);
|
|
83720
|
+
let randomPadding = "";
|
|
83721
|
+
for (let i = 0; i < padding; i++) {
|
|
83722
|
+
const randomHexDigit = Math.floor(Math.random() * 16).toString(16);
|
|
83723
|
+
randomPadding += randomHexDigit;
|
|
83724
|
+
}
|
|
83725
|
+
return baseId + randomPadding;
|
|
83726
|
+
}
|
|
83727
|
+
};
|
|
83728
|
+
_a2 = ID2, _ID_hexTimestamp = function _ID_hexTimestamp2() {
|
|
83729
|
+
const now = /* @__PURE__ */ new Date();
|
|
83730
|
+
const sec = Math.floor(now.getTime() / 1e3);
|
|
83731
|
+
const msec = now.getMilliseconds();
|
|
83732
|
+
const hexTimestamp = sec.toString(16) + msec.toString(16).padStart(5, "0");
|
|
83733
|
+
return hexTimestamp;
|
|
83734
|
+
};
|
|
83696
83735
|
var JSONbig$1 = (0, import_json_bigint2.default)({ useNativeBigInt: true });
|
|
83697
83736
|
var Query = class {
|
|
83698
83737
|
/**
|
|
@@ -83848,8 +83887,8 @@ var Client = class _Client {
|
|
|
83848
83887
|
"x-sdk-name": "Console",
|
|
83849
83888
|
"x-sdk-platform": "console",
|
|
83850
83889
|
"x-sdk-language": "web",
|
|
83851
|
-
"x-sdk-version": "
|
|
83852
|
-
"X-Appwrite-Response-Format": "1.9.
|
|
83890
|
+
"x-sdk-version": "11.0.0",
|
|
83891
|
+
"X-Appwrite-Response-Format": "1.9.2"
|
|
83853
83892
|
};
|
|
83854
83893
|
this.realtime = {
|
|
83855
83894
|
socket: void 0,
|
|
@@ -83857,11 +83896,8 @@ var Client = class _Client {
|
|
|
83857
83896
|
heartbeat: void 0,
|
|
83858
83897
|
url: "",
|
|
83859
83898
|
channels: /* @__PURE__ */ new Set(),
|
|
83860
|
-
queries: /* @__PURE__ */ new Set(),
|
|
83861
83899
|
subscriptions: /* @__PURE__ */ new Map(),
|
|
83862
|
-
|
|
83863
|
-
subscriptionIdToSlot: /* @__PURE__ */ new Map(),
|
|
83864
|
-
subscriptionsCounter: 0,
|
|
83900
|
+
pendingSubscribes: /* @__PURE__ */ new Map(),
|
|
83865
83901
|
reconnect: true,
|
|
83866
83902
|
reconnectAttempts: 0,
|
|
83867
83903
|
lastMessage: void 0,
|
|
@@ -83895,26 +83931,14 @@ var Client = class _Client {
|
|
|
83895
83931
|
}, 2e4);
|
|
83896
83932
|
},
|
|
83897
83933
|
createSocket: () => {
|
|
83898
|
-
var _a3, _b, _c, _d;
|
|
83934
|
+
var _a3, _b, _c, _d, _e2;
|
|
83899
83935
|
if (this.realtime.subscriptions.size < 1) {
|
|
83900
83936
|
this.realtime.reconnect = false;
|
|
83901
83937
|
(_a3 = this.realtime.socket) === null || _a3 === void 0 ? void 0 : _a3.close();
|
|
83902
83938
|
return;
|
|
83903
83939
|
}
|
|
83904
83940
|
const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : "");
|
|
83905
|
-
|
|
83906
|
-
this.realtime.channels.forEach((channel) => {
|
|
83907
|
-
queryParams += "&channels[]=" + encodeURIComponent(channel);
|
|
83908
|
-
});
|
|
83909
|
-
const selectAllQuery = Query.select(["*"]).toString();
|
|
83910
|
-
this.realtime.subscriptions.forEach((sub, slot) => {
|
|
83911
|
-
const queries = sub.queries.length > 0 ? sub.queries : [selectAllQuery];
|
|
83912
|
-
sub.channels.forEach((channel) => {
|
|
83913
|
-
queries.forEach((query) => {
|
|
83914
|
-
queryParams += "&" + encodeURIComponent(channel) + "[" + slot + "][]=" + encodeURIComponent(query);
|
|
83915
|
-
});
|
|
83916
|
-
});
|
|
83917
|
-
});
|
|
83941
|
+
const queryParams = "project=" + encodedProject;
|
|
83918
83942
|
const url2 = this.config.endpointRealtime + "/realtime?" + queryParams;
|
|
83919
83943
|
if (url2 !== this.realtime.url || // Check if URL is present
|
|
83920
83944
|
!this.realtime.socket || // Check if WebSocket has not been created
|
|
@@ -83944,8 +83968,24 @@ var Client = class _Client {
|
|
|
83944
83968
|
this.realtime.createSocket();
|
|
83945
83969
|
}, timeout);
|
|
83946
83970
|
});
|
|
83971
|
+
} else if (((_e2 = this.realtime.socket) === null || _e2 === void 0 ? void 0 : _e2.readyState) === WebSocket.OPEN) {
|
|
83972
|
+
this.realtime.sendPendingSubscribes();
|
|
83947
83973
|
}
|
|
83948
83974
|
},
|
|
83975
|
+
sendPendingSubscribes: () => {
|
|
83976
|
+
if (!this.realtime.socket || this.realtime.socket.readyState !== WebSocket.OPEN) {
|
|
83977
|
+
return;
|
|
83978
|
+
}
|
|
83979
|
+
if (this.realtime.pendingSubscribes.size < 1) {
|
|
83980
|
+
return;
|
|
83981
|
+
}
|
|
83982
|
+
const rows = Array.from(this.realtime.pendingSubscribes.values());
|
|
83983
|
+
this.realtime.pendingSubscribes.clear();
|
|
83984
|
+
this.realtime.socket.send(JSONbig.stringify({
|
|
83985
|
+
type: "subscribe",
|
|
83986
|
+
data: rows
|
|
83987
|
+
}));
|
|
83988
|
+
},
|
|
83949
83989
|
onMessage: (event) => {
|
|
83950
83990
|
var _a3, _b;
|
|
83951
83991
|
try {
|
|
@@ -83954,17 +83994,6 @@ var Client = class _Client {
|
|
|
83954
83994
|
switch (message.type) {
|
|
83955
83995
|
case "connected": {
|
|
83956
83996
|
const messageData = message.data;
|
|
83957
|
-
if (messageData === null || messageData === void 0 ? void 0 : messageData.subscriptions) {
|
|
83958
|
-
this.realtime.slotToSubscriptionId.clear();
|
|
83959
|
-
this.realtime.subscriptionIdToSlot.clear();
|
|
83960
|
-
for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
|
|
83961
|
-
const slot = Number(slotStr);
|
|
83962
|
-
if (!isNaN(slot) && typeof subscriptionId === "string") {
|
|
83963
|
-
this.realtime.slotToSubscriptionId.set(slot, subscriptionId);
|
|
83964
|
-
this.realtime.subscriptionIdToSlot.set(subscriptionId, slot);
|
|
83965
|
-
}
|
|
83966
|
-
}
|
|
83967
|
-
}
|
|
83968
83997
|
let session = this.config.session;
|
|
83969
83998
|
if (!session) {
|
|
83970
83999
|
const cookie = JSONbig.parse((_a3 = window.localStorage.getItem("cookieFallback")) !== null && _a3 !== void 0 ? _a3 : "{}");
|
|
@@ -83978,8 +84007,19 @@ var Client = class _Client {
|
|
|
83978
84007
|
}
|
|
83979
84008
|
}));
|
|
83980
84009
|
}
|
|
84010
|
+
this.realtime.subscriptions.forEach((sub, subscriptionId) => {
|
|
84011
|
+
var _a4;
|
|
84012
|
+
this.realtime.pendingSubscribes.set(subscriptionId, {
|
|
84013
|
+
subscriptionId,
|
|
84014
|
+
channels: sub.channels,
|
|
84015
|
+
queries: (_a4 = sub.queries) !== null && _a4 !== void 0 ? _a4 : []
|
|
84016
|
+
});
|
|
84017
|
+
});
|
|
84018
|
+
this.realtime.sendPendingSubscribes();
|
|
83981
84019
|
break;
|
|
83982
84020
|
}
|
|
84021
|
+
case "response":
|
|
84022
|
+
break;
|
|
83983
84023
|
case "event": {
|
|
83984
84024
|
const data = message.data;
|
|
83985
84025
|
if (!(data === null || data === void 0 ? void 0 : data.channels))
|
|
@@ -83987,12 +84027,9 @@ var Client = class _Client {
|
|
|
83987
84027
|
const eventSubIds = data.subscriptions;
|
|
83988
84028
|
if (eventSubIds && eventSubIds.length > 0) {
|
|
83989
84029
|
for (const subscriptionId of eventSubIds) {
|
|
83990
|
-
const
|
|
83991
|
-
if (
|
|
83992
|
-
|
|
83993
|
-
if (subscription) {
|
|
83994
|
-
setTimeout(() => subscription.callback(data));
|
|
83995
|
-
}
|
|
84030
|
+
const subscription = this.realtime.subscriptions.get(subscriptionId);
|
|
84031
|
+
if (subscription) {
|
|
84032
|
+
setTimeout(() => subscription.callback(data));
|
|
83996
84033
|
}
|
|
83997
84034
|
}
|
|
83998
84035
|
} else {
|
|
@@ -84018,29 +84055,6 @@ var Client = class _Client {
|
|
|
84018
84055
|
} catch (e) {
|
|
84019
84056
|
console.error(e);
|
|
84020
84057
|
}
|
|
84021
|
-
},
|
|
84022
|
-
cleanUp: (channels, queries) => {
|
|
84023
|
-
this.realtime.channels.forEach((channel) => {
|
|
84024
|
-
if (channels.includes(channel)) {
|
|
84025
|
-
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
84026
|
-
return subscription.channels.includes(channel);
|
|
84027
|
-
});
|
|
84028
|
-
if (!found) {
|
|
84029
|
-
this.realtime.channels.delete(channel);
|
|
84030
|
-
}
|
|
84031
|
-
}
|
|
84032
|
-
});
|
|
84033
|
-
this.realtime.queries.forEach((query) => {
|
|
84034
|
-
if (queries.includes(query)) {
|
|
84035
|
-
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
84036
|
-
var _a3;
|
|
84037
|
-
return (_a3 = subscription.queries) === null || _a3 === void 0 ? void 0 : _a3.includes(query);
|
|
84038
|
-
});
|
|
84039
|
-
if (!found) {
|
|
84040
|
-
this.realtime.queries.delete(query);
|
|
84041
|
-
}
|
|
84042
|
-
}
|
|
84043
|
-
});
|
|
84044
84058
|
}
|
|
84045
84059
|
};
|
|
84046
84060
|
}
|
|
@@ -84287,17 +84301,41 @@ var Client = class _Client {
|
|
|
84287
84301
|
});
|
|
84288
84302
|
channelStrings.forEach((channel) => this.realtime.channels.add(channel));
|
|
84289
84303
|
const queryStrings = (queries !== null && queries !== void 0 ? queries : []).map((q2) => typeof q2 === "string" ? q2 : q2.toString());
|
|
84290
|
-
|
|
84291
|
-
const
|
|
84292
|
-
|
|
84304
|
+
let subscriptionId = "";
|
|
84305
|
+
const attempts = this.realtime.subscriptions.size + 1;
|
|
84306
|
+
for (let i = 0; i < attempts; i++) {
|
|
84307
|
+
const candidate = ID2.unique();
|
|
84308
|
+
if (!this.realtime.subscriptions.has(candidate)) {
|
|
84309
|
+
subscriptionId = candidate;
|
|
84310
|
+
break;
|
|
84311
|
+
}
|
|
84312
|
+
}
|
|
84313
|
+
if (subscriptionId === "") {
|
|
84314
|
+
throw new AppwriteException("Failed to generate unique subscription id");
|
|
84315
|
+
}
|
|
84316
|
+
this.realtime.subscriptions.set(subscriptionId, {
|
|
84293
84317
|
channels: channelStrings,
|
|
84294
84318
|
queries: queryStrings,
|
|
84295
84319
|
callback
|
|
84296
84320
|
});
|
|
84321
|
+
this.realtime.pendingSubscribes.set(subscriptionId, {
|
|
84322
|
+
subscriptionId,
|
|
84323
|
+
channels: channelStrings,
|
|
84324
|
+
queries: queryStrings
|
|
84325
|
+
});
|
|
84297
84326
|
this.realtime.connect();
|
|
84298
84327
|
return () => {
|
|
84299
|
-
this.realtime.subscriptions.delete(
|
|
84300
|
-
this.realtime.
|
|
84328
|
+
this.realtime.subscriptions.delete(subscriptionId);
|
|
84329
|
+
this.realtime.pendingSubscribes.delete(subscriptionId);
|
|
84330
|
+
const stillUsed = /* @__PURE__ */ new Set();
|
|
84331
|
+
this.realtime.subscriptions.forEach((sub) => {
|
|
84332
|
+
sub.channels.forEach((channel) => stillUsed.add(channel));
|
|
84333
|
+
});
|
|
84334
|
+
this.realtime.channels.forEach((channel) => {
|
|
84335
|
+
if (!stillUsed.has(channel)) {
|
|
84336
|
+
this.realtime.channels.delete(channel);
|
|
84337
|
+
}
|
|
84338
|
+
});
|
|
84301
84339
|
this.realtime.connect();
|
|
84302
84340
|
};
|
|
84303
84341
|
}
|
|
@@ -93961,7 +93999,240 @@ var Project = class {
|
|
|
93961
93999
|
};
|
|
93962
94000
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
93963
94001
|
}
|
|
93964
|
-
|
|
94002
|
+
updateMembershipPrivacyPolicy(paramsOrFirst, ...rest) {
|
|
94003
|
+
let params;
|
|
94004
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94005
|
+
params = paramsOrFirst || {};
|
|
94006
|
+
} else {
|
|
94007
|
+
params = {
|
|
94008
|
+
userId: paramsOrFirst,
|
|
94009
|
+
userEmail: rest[0],
|
|
94010
|
+
userPhone: rest[1],
|
|
94011
|
+
userName: rest[2],
|
|
94012
|
+
userMFA: rest[3]
|
|
94013
|
+
};
|
|
94014
|
+
}
|
|
94015
|
+
const userId = params.userId;
|
|
94016
|
+
const userEmail = params.userEmail;
|
|
94017
|
+
const userPhone = params.userPhone;
|
|
94018
|
+
const userName = params.userName;
|
|
94019
|
+
const userMFA = params.userMFA;
|
|
94020
|
+
const apiPath = "/project/policies/membership-privacy";
|
|
94021
|
+
const payload = {};
|
|
94022
|
+
if (typeof userId !== "undefined") {
|
|
94023
|
+
payload["userId"] = userId;
|
|
94024
|
+
}
|
|
94025
|
+
if (typeof userEmail !== "undefined") {
|
|
94026
|
+
payload["userEmail"] = userEmail;
|
|
94027
|
+
}
|
|
94028
|
+
if (typeof userPhone !== "undefined") {
|
|
94029
|
+
payload["userPhone"] = userPhone;
|
|
94030
|
+
}
|
|
94031
|
+
if (typeof userName !== "undefined") {
|
|
94032
|
+
payload["userName"] = userName;
|
|
94033
|
+
}
|
|
94034
|
+
if (typeof userMFA !== "undefined") {
|
|
94035
|
+
payload["userMFA"] = userMFA;
|
|
94036
|
+
}
|
|
94037
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94038
|
+
const apiHeaders = {
|
|
94039
|
+
"content-type": "application/json"
|
|
94040
|
+
};
|
|
94041
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94042
|
+
}
|
|
94043
|
+
updatePasswordDictionaryPolicy(paramsOrFirst) {
|
|
94044
|
+
let params;
|
|
94045
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94046
|
+
params = paramsOrFirst || {};
|
|
94047
|
+
} else {
|
|
94048
|
+
params = {
|
|
94049
|
+
enabled: paramsOrFirst
|
|
94050
|
+
};
|
|
94051
|
+
}
|
|
94052
|
+
const enabled = params.enabled;
|
|
94053
|
+
if (typeof enabled === "undefined") {
|
|
94054
|
+
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94055
|
+
}
|
|
94056
|
+
const apiPath = "/project/policies/password-dictionary";
|
|
94057
|
+
const payload = {};
|
|
94058
|
+
if (typeof enabled !== "undefined") {
|
|
94059
|
+
payload["enabled"] = enabled;
|
|
94060
|
+
}
|
|
94061
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94062
|
+
const apiHeaders = {
|
|
94063
|
+
"content-type": "application/json"
|
|
94064
|
+
};
|
|
94065
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94066
|
+
}
|
|
94067
|
+
updatePasswordHistoryPolicy(paramsOrFirst) {
|
|
94068
|
+
let params;
|
|
94069
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94070
|
+
params = paramsOrFirst || {};
|
|
94071
|
+
} else {
|
|
94072
|
+
params = {
|
|
94073
|
+
total: paramsOrFirst
|
|
94074
|
+
};
|
|
94075
|
+
}
|
|
94076
|
+
const total = params.total;
|
|
94077
|
+
if (typeof total === "undefined") {
|
|
94078
|
+
throw new AppwriteException('Missing required parameter: "total"');
|
|
94079
|
+
}
|
|
94080
|
+
const apiPath = "/project/policies/password-history";
|
|
94081
|
+
const payload = {};
|
|
94082
|
+
if (typeof total !== "undefined") {
|
|
94083
|
+
payload["total"] = total;
|
|
94084
|
+
}
|
|
94085
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94086
|
+
const apiHeaders = {
|
|
94087
|
+
"content-type": "application/json"
|
|
94088
|
+
};
|
|
94089
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94090
|
+
}
|
|
94091
|
+
updatePasswordPersonalDataPolicy(paramsOrFirst) {
|
|
94092
|
+
let params;
|
|
94093
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94094
|
+
params = paramsOrFirst || {};
|
|
94095
|
+
} else {
|
|
94096
|
+
params = {
|
|
94097
|
+
enabled: paramsOrFirst
|
|
94098
|
+
};
|
|
94099
|
+
}
|
|
94100
|
+
const enabled = params.enabled;
|
|
94101
|
+
if (typeof enabled === "undefined") {
|
|
94102
|
+
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94103
|
+
}
|
|
94104
|
+
const apiPath = "/project/policies/password-personal-data";
|
|
94105
|
+
const payload = {};
|
|
94106
|
+
if (typeof enabled !== "undefined") {
|
|
94107
|
+
payload["enabled"] = enabled;
|
|
94108
|
+
}
|
|
94109
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94110
|
+
const apiHeaders = {
|
|
94111
|
+
"content-type": "application/json"
|
|
94112
|
+
};
|
|
94113
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94114
|
+
}
|
|
94115
|
+
updateSessionAlertPolicy(paramsOrFirst) {
|
|
94116
|
+
let params;
|
|
94117
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94118
|
+
params = paramsOrFirst || {};
|
|
94119
|
+
} else {
|
|
94120
|
+
params = {
|
|
94121
|
+
enabled: paramsOrFirst
|
|
94122
|
+
};
|
|
94123
|
+
}
|
|
94124
|
+
const enabled = params.enabled;
|
|
94125
|
+
if (typeof enabled === "undefined") {
|
|
94126
|
+
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94127
|
+
}
|
|
94128
|
+
const apiPath = "/project/policies/session-alert";
|
|
94129
|
+
const payload = {};
|
|
94130
|
+
if (typeof enabled !== "undefined") {
|
|
94131
|
+
payload["enabled"] = enabled;
|
|
94132
|
+
}
|
|
94133
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94134
|
+
const apiHeaders = {
|
|
94135
|
+
"content-type": "application/json"
|
|
94136
|
+
};
|
|
94137
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94138
|
+
}
|
|
94139
|
+
updateSessionDurationPolicy(paramsOrFirst) {
|
|
94140
|
+
let params;
|
|
94141
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94142
|
+
params = paramsOrFirst || {};
|
|
94143
|
+
} else {
|
|
94144
|
+
params = {
|
|
94145
|
+
duration: paramsOrFirst
|
|
94146
|
+
};
|
|
94147
|
+
}
|
|
94148
|
+
const duration3 = params.duration;
|
|
94149
|
+
if (typeof duration3 === "undefined") {
|
|
94150
|
+
throw new AppwriteException('Missing required parameter: "duration"');
|
|
94151
|
+
}
|
|
94152
|
+
const apiPath = "/project/policies/session-duration";
|
|
94153
|
+
const payload = {};
|
|
94154
|
+
if (typeof duration3 !== "undefined") {
|
|
94155
|
+
payload["duration"] = duration3;
|
|
94156
|
+
}
|
|
94157
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94158
|
+
const apiHeaders = {
|
|
94159
|
+
"content-type": "application/json"
|
|
94160
|
+
};
|
|
94161
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94162
|
+
}
|
|
94163
|
+
updateSessionInvalidationPolicy(paramsOrFirst) {
|
|
94164
|
+
let params;
|
|
94165
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94166
|
+
params = paramsOrFirst || {};
|
|
94167
|
+
} else {
|
|
94168
|
+
params = {
|
|
94169
|
+
enabled: paramsOrFirst
|
|
94170
|
+
};
|
|
94171
|
+
}
|
|
94172
|
+
const enabled = params.enabled;
|
|
94173
|
+
if (typeof enabled === "undefined") {
|
|
94174
|
+
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94175
|
+
}
|
|
94176
|
+
const apiPath = "/project/policies/session-invalidation";
|
|
94177
|
+
const payload = {};
|
|
94178
|
+
if (typeof enabled !== "undefined") {
|
|
94179
|
+
payload["enabled"] = enabled;
|
|
94180
|
+
}
|
|
94181
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94182
|
+
const apiHeaders = {
|
|
94183
|
+
"content-type": "application/json"
|
|
94184
|
+
};
|
|
94185
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94186
|
+
}
|
|
94187
|
+
updateSessionLimitPolicy(paramsOrFirst) {
|
|
94188
|
+
let params;
|
|
94189
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94190
|
+
params = paramsOrFirst || {};
|
|
94191
|
+
} else {
|
|
94192
|
+
params = {
|
|
94193
|
+
total: paramsOrFirst
|
|
94194
|
+
};
|
|
94195
|
+
}
|
|
94196
|
+
const total = params.total;
|
|
94197
|
+
if (typeof total === "undefined") {
|
|
94198
|
+
throw new AppwriteException('Missing required parameter: "total"');
|
|
94199
|
+
}
|
|
94200
|
+
const apiPath = "/project/policies/session-limit";
|
|
94201
|
+
const payload = {};
|
|
94202
|
+
if (typeof total !== "undefined") {
|
|
94203
|
+
payload["total"] = total;
|
|
94204
|
+
}
|
|
94205
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94206
|
+
const apiHeaders = {
|
|
94207
|
+
"content-type": "application/json"
|
|
94208
|
+
};
|
|
94209
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94210
|
+
}
|
|
94211
|
+
updateUserLimitPolicy(paramsOrFirst) {
|
|
94212
|
+
let params;
|
|
94213
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94214
|
+
params = paramsOrFirst || {};
|
|
94215
|
+
} else {
|
|
94216
|
+
params = {
|
|
94217
|
+
total: paramsOrFirst
|
|
94218
|
+
};
|
|
94219
|
+
}
|
|
94220
|
+
const total = params.total;
|
|
94221
|
+
if (typeof total === "undefined") {
|
|
94222
|
+
throw new AppwriteException('Missing required parameter: "total"');
|
|
94223
|
+
}
|
|
94224
|
+
const apiPath = "/project/policies/user-limit";
|
|
94225
|
+
const payload = {};
|
|
94226
|
+
if (typeof total !== "undefined") {
|
|
94227
|
+
payload["total"] = total;
|
|
94228
|
+
}
|
|
94229
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94230
|
+
const apiHeaders = {
|
|
94231
|
+
"content-type": "application/json"
|
|
94232
|
+
};
|
|
94233
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94234
|
+
}
|
|
94235
|
+
updateProtocol(paramsOrFirst, ...rest) {
|
|
93965
94236
|
let params;
|
|
93966
94237
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("protocolId" in paramsOrFirst || "enabled" in paramsOrFirst)) {
|
|
93967
94238
|
params = paramsOrFirst || {};
|
|
@@ -93979,7 +94250,7 @@ var Project = class {
|
|
|
93979
94250
|
if (typeof enabled === "undefined") {
|
|
93980
94251
|
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
93981
94252
|
}
|
|
93982
|
-
const apiPath = "/project/protocols/{protocolId}
|
|
94253
|
+
const apiPath = "/project/protocols/{protocolId}".replace("{protocolId}", protocolId);
|
|
93983
94254
|
const payload = {};
|
|
93984
94255
|
if (typeof enabled !== "undefined") {
|
|
93985
94256
|
payload["enabled"] = enabled;
|
|
@@ -93990,7 +94261,7 @@ var Project = class {
|
|
|
93990
94261
|
};
|
|
93991
94262
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
93992
94263
|
}
|
|
93993
|
-
|
|
94264
|
+
updateService(paramsOrFirst, ...rest) {
|
|
93994
94265
|
let params;
|
|
93995
94266
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("serviceId" in paramsOrFirst || "enabled" in paramsOrFirst)) {
|
|
93996
94267
|
params = paramsOrFirst || {};
|
|
@@ -94008,7 +94279,7 @@ var Project = class {
|
|
|
94008
94279
|
if (typeof enabled === "undefined") {
|
|
94009
94280
|
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94010
94281
|
}
|
|
94011
|
-
const apiPath = "/project/services/{serviceId}
|
|
94282
|
+
const apiPath = "/project/services/{serviceId}".replace("{serviceId}", serviceId);
|
|
94012
94283
|
const payload = {};
|
|
94013
94284
|
if (typeof enabled !== "undefined") {
|
|
94014
94285
|
payload["enabled"] = enabled;
|
|
@@ -94019,6 +94290,179 @@ var Project = class {
|
|
|
94019
94290
|
};
|
|
94020
94291
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94021
94292
|
}
|
|
94293
|
+
updateSMTP(paramsOrFirst, ...rest) {
|
|
94294
|
+
let params;
|
|
94295
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94296
|
+
params = paramsOrFirst || {};
|
|
94297
|
+
} else {
|
|
94298
|
+
params = {
|
|
94299
|
+
host: paramsOrFirst,
|
|
94300
|
+
port: rest[0],
|
|
94301
|
+
username: rest[1],
|
|
94302
|
+
password: rest[2],
|
|
94303
|
+
senderEmail: rest[3],
|
|
94304
|
+
senderName: rest[4],
|
|
94305
|
+
replyToEmail: rest[5],
|
|
94306
|
+
replyToName: rest[6],
|
|
94307
|
+
secure: rest[7],
|
|
94308
|
+
enabled: rest[8]
|
|
94309
|
+
};
|
|
94310
|
+
}
|
|
94311
|
+
const host = params.host;
|
|
94312
|
+
const port = params.port;
|
|
94313
|
+
const username = params.username;
|
|
94314
|
+
const password = params.password;
|
|
94315
|
+
const senderEmail = params.senderEmail;
|
|
94316
|
+
const senderName = params.senderName;
|
|
94317
|
+
const replyToEmail = params.replyToEmail;
|
|
94318
|
+
const replyToName = params.replyToName;
|
|
94319
|
+
const secure = params.secure;
|
|
94320
|
+
const enabled = params.enabled;
|
|
94321
|
+
const apiPath = "/project/smtp";
|
|
94322
|
+
const payload = {};
|
|
94323
|
+
if (typeof host !== "undefined") {
|
|
94324
|
+
payload["host"] = host;
|
|
94325
|
+
}
|
|
94326
|
+
if (typeof port !== "undefined") {
|
|
94327
|
+
payload["port"] = port;
|
|
94328
|
+
}
|
|
94329
|
+
if (typeof username !== "undefined") {
|
|
94330
|
+
payload["username"] = username;
|
|
94331
|
+
}
|
|
94332
|
+
if (typeof password !== "undefined") {
|
|
94333
|
+
payload["password"] = password;
|
|
94334
|
+
}
|
|
94335
|
+
if (typeof senderEmail !== "undefined") {
|
|
94336
|
+
payload["senderEmail"] = senderEmail;
|
|
94337
|
+
}
|
|
94338
|
+
if (typeof senderName !== "undefined") {
|
|
94339
|
+
payload["senderName"] = senderName;
|
|
94340
|
+
}
|
|
94341
|
+
if (typeof replyToEmail !== "undefined") {
|
|
94342
|
+
payload["replyToEmail"] = replyToEmail;
|
|
94343
|
+
}
|
|
94344
|
+
if (typeof replyToName !== "undefined") {
|
|
94345
|
+
payload["replyToName"] = replyToName;
|
|
94346
|
+
}
|
|
94347
|
+
if (typeof secure !== "undefined") {
|
|
94348
|
+
payload["secure"] = secure;
|
|
94349
|
+
}
|
|
94350
|
+
if (typeof enabled !== "undefined") {
|
|
94351
|
+
payload["enabled"] = enabled;
|
|
94352
|
+
}
|
|
94353
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94354
|
+
const apiHeaders = {
|
|
94355
|
+
"content-type": "application/json"
|
|
94356
|
+
};
|
|
94357
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94358
|
+
}
|
|
94359
|
+
createSMTPTest(paramsOrFirst) {
|
|
94360
|
+
let params;
|
|
94361
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94362
|
+
params = paramsOrFirst || {};
|
|
94363
|
+
} else {
|
|
94364
|
+
params = {
|
|
94365
|
+
emails: paramsOrFirst
|
|
94366
|
+
};
|
|
94367
|
+
}
|
|
94368
|
+
const emails = params.emails;
|
|
94369
|
+
if (typeof emails === "undefined") {
|
|
94370
|
+
throw new AppwriteException('Missing required parameter: "emails"');
|
|
94371
|
+
}
|
|
94372
|
+
const apiPath = "/project/smtp/tests";
|
|
94373
|
+
const payload = {};
|
|
94374
|
+
if (typeof emails !== "undefined") {
|
|
94375
|
+
payload["emails"] = emails;
|
|
94376
|
+
}
|
|
94377
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94378
|
+
const apiHeaders = {
|
|
94379
|
+
"content-type": "application/json"
|
|
94380
|
+
};
|
|
94381
|
+
return this.client.call("post", uri, apiHeaders, payload);
|
|
94382
|
+
}
|
|
94383
|
+
updateEmailTemplate(paramsOrFirst, ...rest) {
|
|
94384
|
+
let params;
|
|
94385
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("templateId" in paramsOrFirst || "locale" in paramsOrFirst || "subject" in paramsOrFirst || "message" in paramsOrFirst || "senderName" in paramsOrFirst || "senderEmail" in paramsOrFirst || "replyToEmail" in paramsOrFirst || "replyToName" in paramsOrFirst)) {
|
|
94386
|
+
params = paramsOrFirst || {};
|
|
94387
|
+
} else {
|
|
94388
|
+
params = {
|
|
94389
|
+
templateId: paramsOrFirst,
|
|
94390
|
+
locale: rest[0],
|
|
94391
|
+
subject: rest[1],
|
|
94392
|
+
message: rest[2],
|
|
94393
|
+
senderName: rest[3],
|
|
94394
|
+
senderEmail: rest[4],
|
|
94395
|
+
replyToEmail: rest[5],
|
|
94396
|
+
replyToName: rest[6]
|
|
94397
|
+
};
|
|
94398
|
+
}
|
|
94399
|
+
const templateId = params.templateId;
|
|
94400
|
+
const locale = params.locale;
|
|
94401
|
+
const subject = params.subject;
|
|
94402
|
+
const message = params.message;
|
|
94403
|
+
const senderName = params.senderName;
|
|
94404
|
+
const senderEmail = params.senderEmail;
|
|
94405
|
+
const replyToEmail = params.replyToEmail;
|
|
94406
|
+
const replyToName = params.replyToName;
|
|
94407
|
+
if (typeof templateId === "undefined") {
|
|
94408
|
+
throw new AppwriteException('Missing required parameter: "templateId"');
|
|
94409
|
+
}
|
|
94410
|
+
const apiPath = "/project/templates/email";
|
|
94411
|
+
const payload = {};
|
|
94412
|
+
if (typeof templateId !== "undefined") {
|
|
94413
|
+
payload["templateId"] = templateId;
|
|
94414
|
+
}
|
|
94415
|
+
if (typeof locale !== "undefined") {
|
|
94416
|
+
payload["locale"] = locale;
|
|
94417
|
+
}
|
|
94418
|
+
if (typeof subject !== "undefined") {
|
|
94419
|
+
payload["subject"] = subject;
|
|
94420
|
+
}
|
|
94421
|
+
if (typeof message !== "undefined") {
|
|
94422
|
+
payload["message"] = message;
|
|
94423
|
+
}
|
|
94424
|
+
if (typeof senderName !== "undefined") {
|
|
94425
|
+
payload["senderName"] = senderName;
|
|
94426
|
+
}
|
|
94427
|
+
if (typeof senderEmail !== "undefined") {
|
|
94428
|
+
payload["senderEmail"] = senderEmail;
|
|
94429
|
+
}
|
|
94430
|
+
if (typeof replyToEmail !== "undefined") {
|
|
94431
|
+
payload["replyToEmail"] = replyToEmail;
|
|
94432
|
+
}
|
|
94433
|
+
if (typeof replyToName !== "undefined") {
|
|
94434
|
+
payload["replyToName"] = replyToName;
|
|
94435
|
+
}
|
|
94436
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94437
|
+
const apiHeaders = {
|
|
94438
|
+
"content-type": "application/json"
|
|
94439
|
+
};
|
|
94440
|
+
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94441
|
+
}
|
|
94442
|
+
getEmailTemplate(paramsOrFirst, ...rest) {
|
|
94443
|
+
let params;
|
|
94444
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("templateId" in paramsOrFirst || "locale" in paramsOrFirst)) {
|
|
94445
|
+
params = paramsOrFirst || {};
|
|
94446
|
+
} else {
|
|
94447
|
+
params = {
|
|
94448
|
+
templateId: paramsOrFirst,
|
|
94449
|
+
locale: rest[0]
|
|
94450
|
+
};
|
|
94451
|
+
}
|
|
94452
|
+
const templateId = params.templateId;
|
|
94453
|
+
const locale = params.locale;
|
|
94454
|
+
if (typeof templateId === "undefined") {
|
|
94455
|
+
throw new AppwriteException('Missing required parameter: "templateId"');
|
|
94456
|
+
}
|
|
94457
|
+
const apiPath = "/project/templates/email/{templateId}".replace("{templateId}", templateId);
|
|
94458
|
+
const payload = {};
|
|
94459
|
+
if (typeof locale !== "undefined") {
|
|
94460
|
+
payload["locale"] = locale;
|
|
94461
|
+
}
|
|
94462
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94463
|
+
const apiHeaders = {};
|
|
94464
|
+
return this.client.call("get", uri, apiHeaders, payload);
|
|
94465
|
+
}
|
|
94022
94466
|
getUsage(paramsOrFirst, ...rest) {
|
|
94023
94467
|
let params;
|
|
94024
94468
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -94437,138 +94881,6 @@ var Projects = class {
|
|
|
94437
94881
|
};
|
|
94438
94882
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
94439
94883
|
}
|
|
94440
|
-
updateAuthDuration(paramsOrFirst, ...rest) {
|
|
94441
|
-
let params;
|
|
94442
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94443
|
-
params = paramsOrFirst || {};
|
|
94444
|
-
} else {
|
|
94445
|
-
params = {
|
|
94446
|
-
projectId: paramsOrFirst,
|
|
94447
|
-
duration: rest[0]
|
|
94448
|
-
};
|
|
94449
|
-
}
|
|
94450
|
-
const projectId = params.projectId;
|
|
94451
|
-
const duration3 = params.duration;
|
|
94452
|
-
if (typeof projectId === "undefined") {
|
|
94453
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94454
|
-
}
|
|
94455
|
-
if (typeof duration3 === "undefined") {
|
|
94456
|
-
throw new AppwriteException('Missing required parameter: "duration"');
|
|
94457
|
-
}
|
|
94458
|
-
const apiPath = "/projects/{projectId}/auth/duration".replace("{projectId}", projectId);
|
|
94459
|
-
const payload = {};
|
|
94460
|
-
if (typeof duration3 !== "undefined") {
|
|
94461
|
-
payload["duration"] = duration3;
|
|
94462
|
-
}
|
|
94463
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94464
|
-
const apiHeaders = {
|
|
94465
|
-
"content-type": "application/json"
|
|
94466
|
-
};
|
|
94467
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94468
|
-
}
|
|
94469
|
-
updateAuthLimit(paramsOrFirst, ...rest) {
|
|
94470
|
-
let params;
|
|
94471
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94472
|
-
params = paramsOrFirst || {};
|
|
94473
|
-
} else {
|
|
94474
|
-
params = {
|
|
94475
|
-
projectId: paramsOrFirst,
|
|
94476
|
-
limit: rest[0]
|
|
94477
|
-
};
|
|
94478
|
-
}
|
|
94479
|
-
const projectId = params.projectId;
|
|
94480
|
-
const limit = params.limit;
|
|
94481
|
-
if (typeof projectId === "undefined") {
|
|
94482
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94483
|
-
}
|
|
94484
|
-
if (typeof limit === "undefined") {
|
|
94485
|
-
throw new AppwriteException('Missing required parameter: "limit"');
|
|
94486
|
-
}
|
|
94487
|
-
const apiPath = "/projects/{projectId}/auth/limit".replace("{projectId}", projectId);
|
|
94488
|
-
const payload = {};
|
|
94489
|
-
if (typeof limit !== "undefined") {
|
|
94490
|
-
payload["limit"] = limit;
|
|
94491
|
-
}
|
|
94492
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94493
|
-
const apiHeaders = {
|
|
94494
|
-
"content-type": "application/json"
|
|
94495
|
-
};
|
|
94496
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94497
|
-
}
|
|
94498
|
-
updateAuthSessionsLimit(paramsOrFirst, ...rest) {
|
|
94499
|
-
let params;
|
|
94500
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94501
|
-
params = paramsOrFirst || {};
|
|
94502
|
-
} else {
|
|
94503
|
-
params = {
|
|
94504
|
-
projectId: paramsOrFirst,
|
|
94505
|
-
limit: rest[0]
|
|
94506
|
-
};
|
|
94507
|
-
}
|
|
94508
|
-
const projectId = params.projectId;
|
|
94509
|
-
const limit = params.limit;
|
|
94510
|
-
if (typeof projectId === "undefined") {
|
|
94511
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94512
|
-
}
|
|
94513
|
-
if (typeof limit === "undefined") {
|
|
94514
|
-
throw new AppwriteException('Missing required parameter: "limit"');
|
|
94515
|
-
}
|
|
94516
|
-
const apiPath = "/projects/{projectId}/auth/max-sessions".replace("{projectId}", projectId);
|
|
94517
|
-
const payload = {};
|
|
94518
|
-
if (typeof limit !== "undefined") {
|
|
94519
|
-
payload["limit"] = limit;
|
|
94520
|
-
}
|
|
94521
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94522
|
-
const apiHeaders = {
|
|
94523
|
-
"content-type": "application/json"
|
|
94524
|
-
};
|
|
94525
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94526
|
-
}
|
|
94527
|
-
updateMembershipsPrivacy(paramsOrFirst, ...rest) {
|
|
94528
|
-
let params;
|
|
94529
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94530
|
-
params = paramsOrFirst || {};
|
|
94531
|
-
} else {
|
|
94532
|
-
params = {
|
|
94533
|
-
projectId: paramsOrFirst,
|
|
94534
|
-
userName: rest[0],
|
|
94535
|
-
userEmail: rest[1],
|
|
94536
|
-
mfa: rest[2]
|
|
94537
|
-
};
|
|
94538
|
-
}
|
|
94539
|
-
const projectId = params.projectId;
|
|
94540
|
-
const userName = params.userName;
|
|
94541
|
-
const userEmail = params.userEmail;
|
|
94542
|
-
const mfa = params.mfa;
|
|
94543
|
-
if (typeof projectId === "undefined") {
|
|
94544
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94545
|
-
}
|
|
94546
|
-
if (typeof userName === "undefined") {
|
|
94547
|
-
throw new AppwriteException('Missing required parameter: "userName"');
|
|
94548
|
-
}
|
|
94549
|
-
if (typeof userEmail === "undefined") {
|
|
94550
|
-
throw new AppwriteException('Missing required parameter: "userEmail"');
|
|
94551
|
-
}
|
|
94552
|
-
if (typeof mfa === "undefined") {
|
|
94553
|
-
throw new AppwriteException('Missing required parameter: "mfa"');
|
|
94554
|
-
}
|
|
94555
|
-
const apiPath = "/projects/{projectId}/auth/memberships-privacy".replace("{projectId}", projectId);
|
|
94556
|
-
const payload = {};
|
|
94557
|
-
if (typeof userName !== "undefined") {
|
|
94558
|
-
payload["userName"] = userName;
|
|
94559
|
-
}
|
|
94560
|
-
if (typeof userEmail !== "undefined") {
|
|
94561
|
-
payload["userEmail"] = userEmail;
|
|
94562
|
-
}
|
|
94563
|
-
if (typeof mfa !== "undefined") {
|
|
94564
|
-
payload["mfa"] = mfa;
|
|
94565
|
-
}
|
|
94566
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94567
|
-
const apiHeaders = {
|
|
94568
|
-
"content-type": "application/json"
|
|
94569
|
-
};
|
|
94570
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94571
|
-
}
|
|
94572
94884
|
updateMockNumbers(paramsOrFirst, ...rest) {
|
|
94573
94885
|
let params;
|
|
94574
94886
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -94598,151 +94910,6 @@ var Projects = class {
|
|
|
94598
94910
|
};
|
|
94599
94911
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94600
94912
|
}
|
|
94601
|
-
updateAuthPasswordDictionary(paramsOrFirst, ...rest) {
|
|
94602
|
-
let params;
|
|
94603
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94604
|
-
params = paramsOrFirst || {};
|
|
94605
|
-
} else {
|
|
94606
|
-
params = {
|
|
94607
|
-
projectId: paramsOrFirst,
|
|
94608
|
-
enabled: rest[0]
|
|
94609
|
-
};
|
|
94610
|
-
}
|
|
94611
|
-
const projectId = params.projectId;
|
|
94612
|
-
const enabled = params.enabled;
|
|
94613
|
-
if (typeof projectId === "undefined") {
|
|
94614
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94615
|
-
}
|
|
94616
|
-
if (typeof enabled === "undefined") {
|
|
94617
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94618
|
-
}
|
|
94619
|
-
const apiPath = "/projects/{projectId}/auth/password-dictionary".replace("{projectId}", projectId);
|
|
94620
|
-
const payload = {};
|
|
94621
|
-
if (typeof enabled !== "undefined") {
|
|
94622
|
-
payload["enabled"] = enabled;
|
|
94623
|
-
}
|
|
94624
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94625
|
-
const apiHeaders = {
|
|
94626
|
-
"content-type": "application/json"
|
|
94627
|
-
};
|
|
94628
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94629
|
-
}
|
|
94630
|
-
updateAuthPasswordHistory(paramsOrFirst, ...rest) {
|
|
94631
|
-
let params;
|
|
94632
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94633
|
-
params = paramsOrFirst || {};
|
|
94634
|
-
} else {
|
|
94635
|
-
params = {
|
|
94636
|
-
projectId: paramsOrFirst,
|
|
94637
|
-
limit: rest[0]
|
|
94638
|
-
};
|
|
94639
|
-
}
|
|
94640
|
-
const projectId = params.projectId;
|
|
94641
|
-
const limit = params.limit;
|
|
94642
|
-
if (typeof projectId === "undefined") {
|
|
94643
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94644
|
-
}
|
|
94645
|
-
if (typeof limit === "undefined") {
|
|
94646
|
-
throw new AppwriteException('Missing required parameter: "limit"');
|
|
94647
|
-
}
|
|
94648
|
-
const apiPath = "/projects/{projectId}/auth/password-history".replace("{projectId}", projectId);
|
|
94649
|
-
const payload = {};
|
|
94650
|
-
if (typeof limit !== "undefined") {
|
|
94651
|
-
payload["limit"] = limit;
|
|
94652
|
-
}
|
|
94653
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94654
|
-
const apiHeaders = {
|
|
94655
|
-
"content-type": "application/json"
|
|
94656
|
-
};
|
|
94657
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94658
|
-
}
|
|
94659
|
-
updatePersonalDataCheck(paramsOrFirst, ...rest) {
|
|
94660
|
-
let params;
|
|
94661
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94662
|
-
params = paramsOrFirst || {};
|
|
94663
|
-
} else {
|
|
94664
|
-
params = {
|
|
94665
|
-
projectId: paramsOrFirst,
|
|
94666
|
-
enabled: rest[0]
|
|
94667
|
-
};
|
|
94668
|
-
}
|
|
94669
|
-
const projectId = params.projectId;
|
|
94670
|
-
const enabled = params.enabled;
|
|
94671
|
-
if (typeof projectId === "undefined") {
|
|
94672
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94673
|
-
}
|
|
94674
|
-
if (typeof enabled === "undefined") {
|
|
94675
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94676
|
-
}
|
|
94677
|
-
const apiPath = "/projects/{projectId}/auth/personal-data".replace("{projectId}", projectId);
|
|
94678
|
-
const payload = {};
|
|
94679
|
-
if (typeof enabled !== "undefined") {
|
|
94680
|
-
payload["enabled"] = enabled;
|
|
94681
|
-
}
|
|
94682
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94683
|
-
const apiHeaders = {
|
|
94684
|
-
"content-type": "application/json"
|
|
94685
|
-
};
|
|
94686
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94687
|
-
}
|
|
94688
|
-
updateSessionAlerts(paramsOrFirst, ...rest) {
|
|
94689
|
-
let params;
|
|
94690
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94691
|
-
params = paramsOrFirst || {};
|
|
94692
|
-
} else {
|
|
94693
|
-
params = {
|
|
94694
|
-
projectId: paramsOrFirst,
|
|
94695
|
-
alerts: rest[0]
|
|
94696
|
-
};
|
|
94697
|
-
}
|
|
94698
|
-
const projectId = params.projectId;
|
|
94699
|
-
const alerts = params.alerts;
|
|
94700
|
-
if (typeof projectId === "undefined") {
|
|
94701
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94702
|
-
}
|
|
94703
|
-
if (typeof alerts === "undefined") {
|
|
94704
|
-
throw new AppwriteException('Missing required parameter: "alerts"');
|
|
94705
|
-
}
|
|
94706
|
-
const apiPath = "/projects/{projectId}/auth/session-alerts".replace("{projectId}", projectId);
|
|
94707
|
-
const payload = {};
|
|
94708
|
-
if (typeof alerts !== "undefined") {
|
|
94709
|
-
payload["alerts"] = alerts;
|
|
94710
|
-
}
|
|
94711
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94712
|
-
const apiHeaders = {
|
|
94713
|
-
"content-type": "application/json"
|
|
94714
|
-
};
|
|
94715
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94716
|
-
}
|
|
94717
|
-
updateSessionInvalidation(paramsOrFirst, ...rest) {
|
|
94718
|
-
let params;
|
|
94719
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94720
|
-
params = paramsOrFirst || {};
|
|
94721
|
-
} else {
|
|
94722
|
-
params = {
|
|
94723
|
-
projectId: paramsOrFirst,
|
|
94724
|
-
enabled: rest[0]
|
|
94725
|
-
};
|
|
94726
|
-
}
|
|
94727
|
-
const projectId = params.projectId;
|
|
94728
|
-
const enabled = params.enabled;
|
|
94729
|
-
if (typeof projectId === "undefined") {
|
|
94730
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94731
|
-
}
|
|
94732
|
-
if (typeof enabled === "undefined") {
|
|
94733
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94734
|
-
}
|
|
94735
|
-
const apiPath = "/projects/{projectId}/auth/session-invalidation".replace("{projectId}", projectId);
|
|
94736
|
-
const payload = {};
|
|
94737
|
-
if (typeof enabled !== "undefined") {
|
|
94738
|
-
payload["enabled"] = enabled;
|
|
94739
|
-
}
|
|
94740
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94741
|
-
const apiHeaders = {
|
|
94742
|
-
"content-type": "application/json"
|
|
94743
|
-
};
|
|
94744
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94745
|
-
}
|
|
94746
94913
|
updateAuthStatus(paramsOrFirst, ...rest) {
|
|
94747
94914
|
let params;
|
|
94748
94915
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -95137,300 +95304,6 @@ var Projects = class {
|
|
|
95137
95304
|
const apiHeaders = {};
|
|
95138
95305
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
95139
95306
|
}
|
|
95140
|
-
updateSmtp(paramsOrFirst, ...rest) {
|
|
95141
|
-
let params;
|
|
95142
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95143
|
-
params = paramsOrFirst || {};
|
|
95144
|
-
} else {
|
|
95145
|
-
params = {
|
|
95146
|
-
projectId: paramsOrFirst,
|
|
95147
|
-
enabled: rest[0],
|
|
95148
|
-
senderName: rest[1],
|
|
95149
|
-
senderEmail: rest[2],
|
|
95150
|
-
replyTo: rest[3],
|
|
95151
|
-
host: rest[4],
|
|
95152
|
-
port: rest[5],
|
|
95153
|
-
username: rest[6],
|
|
95154
|
-
password: rest[7],
|
|
95155
|
-
secure: rest[8]
|
|
95156
|
-
};
|
|
95157
|
-
}
|
|
95158
|
-
const projectId = params.projectId;
|
|
95159
|
-
const enabled = params.enabled;
|
|
95160
|
-
const senderName = params.senderName;
|
|
95161
|
-
const senderEmail = params.senderEmail;
|
|
95162
|
-
const replyTo = params.replyTo;
|
|
95163
|
-
const host = params.host;
|
|
95164
|
-
const port = params.port;
|
|
95165
|
-
const username = params.username;
|
|
95166
|
-
const password = params.password;
|
|
95167
|
-
const secure = params.secure;
|
|
95168
|
-
if (typeof projectId === "undefined") {
|
|
95169
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95170
|
-
}
|
|
95171
|
-
if (typeof enabled === "undefined") {
|
|
95172
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
95173
|
-
}
|
|
95174
|
-
const apiPath = "/projects/{projectId}/smtp".replace("{projectId}", projectId);
|
|
95175
|
-
const payload = {};
|
|
95176
|
-
if (typeof enabled !== "undefined") {
|
|
95177
|
-
payload["enabled"] = enabled;
|
|
95178
|
-
}
|
|
95179
|
-
if (typeof senderName !== "undefined") {
|
|
95180
|
-
payload["senderName"] = senderName;
|
|
95181
|
-
}
|
|
95182
|
-
if (typeof senderEmail !== "undefined") {
|
|
95183
|
-
payload["senderEmail"] = senderEmail;
|
|
95184
|
-
}
|
|
95185
|
-
if (typeof replyTo !== "undefined") {
|
|
95186
|
-
payload["replyTo"] = replyTo;
|
|
95187
|
-
}
|
|
95188
|
-
if (typeof host !== "undefined") {
|
|
95189
|
-
payload["host"] = host;
|
|
95190
|
-
}
|
|
95191
|
-
if (typeof port !== "undefined") {
|
|
95192
|
-
payload["port"] = port;
|
|
95193
|
-
}
|
|
95194
|
-
if (typeof username !== "undefined") {
|
|
95195
|
-
payload["username"] = username;
|
|
95196
|
-
}
|
|
95197
|
-
if (typeof password !== "undefined") {
|
|
95198
|
-
payload["password"] = password;
|
|
95199
|
-
}
|
|
95200
|
-
if (typeof secure !== "undefined") {
|
|
95201
|
-
payload["secure"] = secure;
|
|
95202
|
-
}
|
|
95203
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95204
|
-
const apiHeaders = {
|
|
95205
|
-
"content-type": "application/json"
|
|
95206
|
-
};
|
|
95207
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95208
|
-
}
|
|
95209
|
-
updateSMTP(paramsOrFirst, ...rest) {
|
|
95210
|
-
let params;
|
|
95211
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95212
|
-
params = paramsOrFirst || {};
|
|
95213
|
-
} else {
|
|
95214
|
-
params = {
|
|
95215
|
-
projectId: paramsOrFirst,
|
|
95216
|
-
enabled: rest[0],
|
|
95217
|
-
senderName: rest[1],
|
|
95218
|
-
senderEmail: rest[2],
|
|
95219
|
-
replyTo: rest[3],
|
|
95220
|
-
host: rest[4],
|
|
95221
|
-
port: rest[5],
|
|
95222
|
-
username: rest[6],
|
|
95223
|
-
password: rest[7],
|
|
95224
|
-
secure: rest[8]
|
|
95225
|
-
};
|
|
95226
|
-
}
|
|
95227
|
-
const projectId = params.projectId;
|
|
95228
|
-
const enabled = params.enabled;
|
|
95229
|
-
const senderName = params.senderName;
|
|
95230
|
-
const senderEmail = params.senderEmail;
|
|
95231
|
-
const replyTo = params.replyTo;
|
|
95232
|
-
const host = params.host;
|
|
95233
|
-
const port = params.port;
|
|
95234
|
-
const username = params.username;
|
|
95235
|
-
const password = params.password;
|
|
95236
|
-
const secure = params.secure;
|
|
95237
|
-
if (typeof projectId === "undefined") {
|
|
95238
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95239
|
-
}
|
|
95240
|
-
if (typeof enabled === "undefined") {
|
|
95241
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
95242
|
-
}
|
|
95243
|
-
const apiPath = "/projects/{projectId}/smtp".replace("{projectId}", projectId);
|
|
95244
|
-
const payload = {};
|
|
95245
|
-
if (typeof enabled !== "undefined") {
|
|
95246
|
-
payload["enabled"] = enabled;
|
|
95247
|
-
}
|
|
95248
|
-
if (typeof senderName !== "undefined") {
|
|
95249
|
-
payload["senderName"] = senderName;
|
|
95250
|
-
}
|
|
95251
|
-
if (typeof senderEmail !== "undefined") {
|
|
95252
|
-
payload["senderEmail"] = senderEmail;
|
|
95253
|
-
}
|
|
95254
|
-
if (typeof replyTo !== "undefined") {
|
|
95255
|
-
payload["replyTo"] = replyTo;
|
|
95256
|
-
}
|
|
95257
|
-
if (typeof host !== "undefined") {
|
|
95258
|
-
payload["host"] = host;
|
|
95259
|
-
}
|
|
95260
|
-
if (typeof port !== "undefined") {
|
|
95261
|
-
payload["port"] = port;
|
|
95262
|
-
}
|
|
95263
|
-
if (typeof username !== "undefined") {
|
|
95264
|
-
payload["username"] = username;
|
|
95265
|
-
}
|
|
95266
|
-
if (typeof password !== "undefined") {
|
|
95267
|
-
payload["password"] = password;
|
|
95268
|
-
}
|
|
95269
|
-
if (typeof secure !== "undefined") {
|
|
95270
|
-
payload["secure"] = secure;
|
|
95271
|
-
}
|
|
95272
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95273
|
-
const apiHeaders = {
|
|
95274
|
-
"content-type": "application/json"
|
|
95275
|
-
};
|
|
95276
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95277
|
-
}
|
|
95278
|
-
createSmtpTest(paramsOrFirst, ...rest) {
|
|
95279
|
-
let params;
|
|
95280
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95281
|
-
params = paramsOrFirst || {};
|
|
95282
|
-
} else {
|
|
95283
|
-
params = {
|
|
95284
|
-
projectId: paramsOrFirst,
|
|
95285
|
-
emails: rest[0],
|
|
95286
|
-
senderName: rest[1],
|
|
95287
|
-
senderEmail: rest[2],
|
|
95288
|
-
host: rest[3],
|
|
95289
|
-
replyTo: rest[4],
|
|
95290
|
-
port: rest[5],
|
|
95291
|
-
username: rest[6],
|
|
95292
|
-
password: rest[7],
|
|
95293
|
-
secure: rest[8]
|
|
95294
|
-
};
|
|
95295
|
-
}
|
|
95296
|
-
const projectId = params.projectId;
|
|
95297
|
-
const emails = params.emails;
|
|
95298
|
-
const senderName = params.senderName;
|
|
95299
|
-
const senderEmail = params.senderEmail;
|
|
95300
|
-
const host = params.host;
|
|
95301
|
-
const replyTo = params.replyTo;
|
|
95302
|
-
const port = params.port;
|
|
95303
|
-
const username = params.username;
|
|
95304
|
-
const password = params.password;
|
|
95305
|
-
const secure = params.secure;
|
|
95306
|
-
if (typeof projectId === "undefined") {
|
|
95307
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95308
|
-
}
|
|
95309
|
-
if (typeof emails === "undefined") {
|
|
95310
|
-
throw new AppwriteException('Missing required parameter: "emails"');
|
|
95311
|
-
}
|
|
95312
|
-
if (typeof senderName === "undefined") {
|
|
95313
|
-
throw new AppwriteException('Missing required parameter: "senderName"');
|
|
95314
|
-
}
|
|
95315
|
-
if (typeof senderEmail === "undefined") {
|
|
95316
|
-
throw new AppwriteException('Missing required parameter: "senderEmail"');
|
|
95317
|
-
}
|
|
95318
|
-
if (typeof host === "undefined") {
|
|
95319
|
-
throw new AppwriteException('Missing required parameter: "host"');
|
|
95320
|
-
}
|
|
95321
|
-
const apiPath = "/projects/{projectId}/smtp/tests".replace("{projectId}", projectId);
|
|
95322
|
-
const payload = {};
|
|
95323
|
-
if (typeof emails !== "undefined") {
|
|
95324
|
-
payload["emails"] = emails;
|
|
95325
|
-
}
|
|
95326
|
-
if (typeof senderName !== "undefined") {
|
|
95327
|
-
payload["senderName"] = senderName;
|
|
95328
|
-
}
|
|
95329
|
-
if (typeof senderEmail !== "undefined") {
|
|
95330
|
-
payload["senderEmail"] = senderEmail;
|
|
95331
|
-
}
|
|
95332
|
-
if (typeof replyTo !== "undefined") {
|
|
95333
|
-
payload["replyTo"] = replyTo;
|
|
95334
|
-
}
|
|
95335
|
-
if (typeof host !== "undefined") {
|
|
95336
|
-
payload["host"] = host;
|
|
95337
|
-
}
|
|
95338
|
-
if (typeof port !== "undefined") {
|
|
95339
|
-
payload["port"] = port;
|
|
95340
|
-
}
|
|
95341
|
-
if (typeof username !== "undefined") {
|
|
95342
|
-
payload["username"] = username;
|
|
95343
|
-
}
|
|
95344
|
-
if (typeof password !== "undefined") {
|
|
95345
|
-
payload["password"] = password;
|
|
95346
|
-
}
|
|
95347
|
-
if (typeof secure !== "undefined") {
|
|
95348
|
-
payload["secure"] = secure;
|
|
95349
|
-
}
|
|
95350
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95351
|
-
const apiHeaders = {
|
|
95352
|
-
"content-type": "application/json"
|
|
95353
|
-
};
|
|
95354
|
-
return this.client.call("post", uri, apiHeaders, payload);
|
|
95355
|
-
}
|
|
95356
|
-
createSMTPTest(paramsOrFirst, ...rest) {
|
|
95357
|
-
let params;
|
|
95358
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95359
|
-
params = paramsOrFirst || {};
|
|
95360
|
-
} else {
|
|
95361
|
-
params = {
|
|
95362
|
-
projectId: paramsOrFirst,
|
|
95363
|
-
emails: rest[0],
|
|
95364
|
-
senderName: rest[1],
|
|
95365
|
-
senderEmail: rest[2],
|
|
95366
|
-
host: rest[3],
|
|
95367
|
-
replyTo: rest[4],
|
|
95368
|
-
port: rest[5],
|
|
95369
|
-
username: rest[6],
|
|
95370
|
-
password: rest[7],
|
|
95371
|
-
secure: rest[8]
|
|
95372
|
-
};
|
|
95373
|
-
}
|
|
95374
|
-
const projectId = params.projectId;
|
|
95375
|
-
const emails = params.emails;
|
|
95376
|
-
const senderName = params.senderName;
|
|
95377
|
-
const senderEmail = params.senderEmail;
|
|
95378
|
-
const host = params.host;
|
|
95379
|
-
const replyTo = params.replyTo;
|
|
95380
|
-
const port = params.port;
|
|
95381
|
-
const username = params.username;
|
|
95382
|
-
const password = params.password;
|
|
95383
|
-
const secure = params.secure;
|
|
95384
|
-
if (typeof projectId === "undefined") {
|
|
95385
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95386
|
-
}
|
|
95387
|
-
if (typeof emails === "undefined") {
|
|
95388
|
-
throw new AppwriteException('Missing required parameter: "emails"');
|
|
95389
|
-
}
|
|
95390
|
-
if (typeof senderName === "undefined") {
|
|
95391
|
-
throw new AppwriteException('Missing required parameter: "senderName"');
|
|
95392
|
-
}
|
|
95393
|
-
if (typeof senderEmail === "undefined") {
|
|
95394
|
-
throw new AppwriteException('Missing required parameter: "senderEmail"');
|
|
95395
|
-
}
|
|
95396
|
-
if (typeof host === "undefined") {
|
|
95397
|
-
throw new AppwriteException('Missing required parameter: "host"');
|
|
95398
|
-
}
|
|
95399
|
-
const apiPath = "/projects/{projectId}/smtp/tests".replace("{projectId}", projectId);
|
|
95400
|
-
const payload = {};
|
|
95401
|
-
if (typeof emails !== "undefined") {
|
|
95402
|
-
payload["emails"] = emails;
|
|
95403
|
-
}
|
|
95404
|
-
if (typeof senderName !== "undefined") {
|
|
95405
|
-
payload["senderName"] = senderName;
|
|
95406
|
-
}
|
|
95407
|
-
if (typeof senderEmail !== "undefined") {
|
|
95408
|
-
payload["senderEmail"] = senderEmail;
|
|
95409
|
-
}
|
|
95410
|
-
if (typeof replyTo !== "undefined") {
|
|
95411
|
-
payload["replyTo"] = replyTo;
|
|
95412
|
-
}
|
|
95413
|
-
if (typeof host !== "undefined") {
|
|
95414
|
-
payload["host"] = host;
|
|
95415
|
-
}
|
|
95416
|
-
if (typeof port !== "undefined") {
|
|
95417
|
-
payload["port"] = port;
|
|
95418
|
-
}
|
|
95419
|
-
if (typeof username !== "undefined") {
|
|
95420
|
-
payload["username"] = username;
|
|
95421
|
-
}
|
|
95422
|
-
if (typeof password !== "undefined") {
|
|
95423
|
-
payload["password"] = password;
|
|
95424
|
-
}
|
|
95425
|
-
if (typeof secure !== "undefined") {
|
|
95426
|
-
payload["secure"] = secure;
|
|
95427
|
-
}
|
|
95428
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95429
|
-
const apiHeaders = {
|
|
95430
|
-
"content-type": "application/json"
|
|
95431
|
-
};
|
|
95432
|
-
return this.client.call("post", uri, apiHeaders, payload);
|
|
95433
|
-
}
|
|
95434
95307
|
updateStatus(paramsOrFirst, ...rest) {
|
|
95435
95308
|
let params;
|
|
95436
95309
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -95489,326 +95362,6 @@ var Projects = class {
|
|
|
95489
95362
|
};
|
|
95490
95363
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95491
95364
|
}
|
|
95492
|
-
getEmailTemplate(paramsOrFirst, ...rest) {
|
|
95493
|
-
let params;
|
|
95494
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95495
|
-
params = paramsOrFirst || {};
|
|
95496
|
-
} else {
|
|
95497
|
-
params = {
|
|
95498
|
-
projectId: paramsOrFirst,
|
|
95499
|
-
type: rest[0],
|
|
95500
|
-
locale: rest[1]
|
|
95501
|
-
};
|
|
95502
|
-
}
|
|
95503
|
-
const projectId = params.projectId;
|
|
95504
|
-
const type = params.type;
|
|
95505
|
-
const locale = params.locale;
|
|
95506
|
-
if (typeof projectId === "undefined") {
|
|
95507
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95508
|
-
}
|
|
95509
|
-
if (typeof type === "undefined") {
|
|
95510
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95511
|
-
}
|
|
95512
|
-
if (typeof locale === "undefined") {
|
|
95513
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95514
|
-
}
|
|
95515
|
-
const apiPath = "/projects/{projectId}/templates/email/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95516
|
-
const payload = {};
|
|
95517
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95518
|
-
const apiHeaders = {};
|
|
95519
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
95520
|
-
}
|
|
95521
|
-
updateEmailTemplate(paramsOrFirst, ...rest) {
|
|
95522
|
-
let params;
|
|
95523
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95524
|
-
params = paramsOrFirst || {};
|
|
95525
|
-
} else {
|
|
95526
|
-
params = {
|
|
95527
|
-
projectId: paramsOrFirst,
|
|
95528
|
-
type: rest[0],
|
|
95529
|
-
locale: rest[1],
|
|
95530
|
-
subject: rest[2],
|
|
95531
|
-
message: rest[3],
|
|
95532
|
-
senderName: rest[4],
|
|
95533
|
-
senderEmail: rest[5],
|
|
95534
|
-
replyTo: rest[6]
|
|
95535
|
-
};
|
|
95536
|
-
}
|
|
95537
|
-
const projectId = params.projectId;
|
|
95538
|
-
const type = params.type;
|
|
95539
|
-
const locale = params.locale;
|
|
95540
|
-
const subject = params.subject;
|
|
95541
|
-
const message = params.message;
|
|
95542
|
-
const senderName = params.senderName;
|
|
95543
|
-
const senderEmail = params.senderEmail;
|
|
95544
|
-
const replyTo = params.replyTo;
|
|
95545
|
-
if (typeof projectId === "undefined") {
|
|
95546
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95547
|
-
}
|
|
95548
|
-
if (typeof type === "undefined") {
|
|
95549
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95550
|
-
}
|
|
95551
|
-
if (typeof locale === "undefined") {
|
|
95552
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95553
|
-
}
|
|
95554
|
-
if (typeof subject === "undefined") {
|
|
95555
|
-
throw new AppwriteException('Missing required parameter: "subject"');
|
|
95556
|
-
}
|
|
95557
|
-
if (typeof message === "undefined") {
|
|
95558
|
-
throw new AppwriteException('Missing required parameter: "message"');
|
|
95559
|
-
}
|
|
95560
|
-
const apiPath = "/projects/{projectId}/templates/email/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95561
|
-
const payload = {};
|
|
95562
|
-
if (typeof subject !== "undefined") {
|
|
95563
|
-
payload["subject"] = subject;
|
|
95564
|
-
}
|
|
95565
|
-
if (typeof message !== "undefined") {
|
|
95566
|
-
payload["message"] = message;
|
|
95567
|
-
}
|
|
95568
|
-
if (typeof senderName !== "undefined") {
|
|
95569
|
-
payload["senderName"] = senderName;
|
|
95570
|
-
}
|
|
95571
|
-
if (typeof senderEmail !== "undefined") {
|
|
95572
|
-
payload["senderEmail"] = senderEmail;
|
|
95573
|
-
}
|
|
95574
|
-
if (typeof replyTo !== "undefined") {
|
|
95575
|
-
payload["replyTo"] = replyTo;
|
|
95576
|
-
}
|
|
95577
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95578
|
-
const apiHeaders = {
|
|
95579
|
-
"content-type": "application/json"
|
|
95580
|
-
};
|
|
95581
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95582
|
-
}
|
|
95583
|
-
deleteEmailTemplate(paramsOrFirst, ...rest) {
|
|
95584
|
-
let params;
|
|
95585
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95586
|
-
params = paramsOrFirst || {};
|
|
95587
|
-
} else {
|
|
95588
|
-
params = {
|
|
95589
|
-
projectId: paramsOrFirst,
|
|
95590
|
-
type: rest[0],
|
|
95591
|
-
locale: rest[1]
|
|
95592
|
-
};
|
|
95593
|
-
}
|
|
95594
|
-
const projectId = params.projectId;
|
|
95595
|
-
const type = params.type;
|
|
95596
|
-
const locale = params.locale;
|
|
95597
|
-
if (typeof projectId === "undefined") {
|
|
95598
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95599
|
-
}
|
|
95600
|
-
if (typeof type === "undefined") {
|
|
95601
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95602
|
-
}
|
|
95603
|
-
if (typeof locale === "undefined") {
|
|
95604
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95605
|
-
}
|
|
95606
|
-
const apiPath = "/projects/{projectId}/templates/email/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95607
|
-
const payload = {};
|
|
95608
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95609
|
-
const apiHeaders = {
|
|
95610
|
-
"content-type": "application/json"
|
|
95611
|
-
};
|
|
95612
|
-
return this.client.call("delete", uri, apiHeaders, payload);
|
|
95613
|
-
}
|
|
95614
|
-
getSmsTemplate(paramsOrFirst, ...rest) {
|
|
95615
|
-
let params;
|
|
95616
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95617
|
-
params = paramsOrFirst || {};
|
|
95618
|
-
} else {
|
|
95619
|
-
params = {
|
|
95620
|
-
projectId: paramsOrFirst,
|
|
95621
|
-
type: rest[0],
|
|
95622
|
-
locale: rest[1]
|
|
95623
|
-
};
|
|
95624
|
-
}
|
|
95625
|
-
const projectId = params.projectId;
|
|
95626
|
-
const type = params.type;
|
|
95627
|
-
const locale = params.locale;
|
|
95628
|
-
if (typeof projectId === "undefined") {
|
|
95629
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95630
|
-
}
|
|
95631
|
-
if (typeof type === "undefined") {
|
|
95632
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95633
|
-
}
|
|
95634
|
-
if (typeof locale === "undefined") {
|
|
95635
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95636
|
-
}
|
|
95637
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95638
|
-
const payload = {};
|
|
95639
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95640
|
-
const apiHeaders = {};
|
|
95641
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
95642
|
-
}
|
|
95643
|
-
getSMSTemplate(paramsOrFirst, ...rest) {
|
|
95644
|
-
let params;
|
|
95645
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95646
|
-
params = paramsOrFirst || {};
|
|
95647
|
-
} else {
|
|
95648
|
-
params = {
|
|
95649
|
-
projectId: paramsOrFirst,
|
|
95650
|
-
type: rest[0],
|
|
95651
|
-
locale: rest[1]
|
|
95652
|
-
};
|
|
95653
|
-
}
|
|
95654
|
-
const projectId = params.projectId;
|
|
95655
|
-
const type = params.type;
|
|
95656
|
-
const locale = params.locale;
|
|
95657
|
-
if (typeof projectId === "undefined") {
|
|
95658
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95659
|
-
}
|
|
95660
|
-
if (typeof type === "undefined") {
|
|
95661
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95662
|
-
}
|
|
95663
|
-
if (typeof locale === "undefined") {
|
|
95664
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95665
|
-
}
|
|
95666
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95667
|
-
const payload = {};
|
|
95668
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95669
|
-
const apiHeaders = {};
|
|
95670
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
95671
|
-
}
|
|
95672
|
-
updateSmsTemplate(paramsOrFirst, ...rest) {
|
|
95673
|
-
let params;
|
|
95674
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95675
|
-
params = paramsOrFirst || {};
|
|
95676
|
-
} else {
|
|
95677
|
-
params = {
|
|
95678
|
-
projectId: paramsOrFirst,
|
|
95679
|
-
type: rest[0],
|
|
95680
|
-
locale: rest[1],
|
|
95681
|
-
message: rest[2]
|
|
95682
|
-
};
|
|
95683
|
-
}
|
|
95684
|
-
const projectId = params.projectId;
|
|
95685
|
-
const type = params.type;
|
|
95686
|
-
const locale = params.locale;
|
|
95687
|
-
const message = params.message;
|
|
95688
|
-
if (typeof projectId === "undefined") {
|
|
95689
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95690
|
-
}
|
|
95691
|
-
if (typeof type === "undefined") {
|
|
95692
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95693
|
-
}
|
|
95694
|
-
if (typeof locale === "undefined") {
|
|
95695
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95696
|
-
}
|
|
95697
|
-
if (typeof message === "undefined") {
|
|
95698
|
-
throw new AppwriteException('Missing required parameter: "message"');
|
|
95699
|
-
}
|
|
95700
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95701
|
-
const payload = {};
|
|
95702
|
-
if (typeof message !== "undefined") {
|
|
95703
|
-
payload["message"] = message;
|
|
95704
|
-
}
|
|
95705
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95706
|
-
const apiHeaders = {
|
|
95707
|
-
"content-type": "application/json"
|
|
95708
|
-
};
|
|
95709
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95710
|
-
}
|
|
95711
|
-
updateSMSTemplate(paramsOrFirst, ...rest) {
|
|
95712
|
-
let params;
|
|
95713
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95714
|
-
params = paramsOrFirst || {};
|
|
95715
|
-
} else {
|
|
95716
|
-
params = {
|
|
95717
|
-
projectId: paramsOrFirst,
|
|
95718
|
-
type: rest[0],
|
|
95719
|
-
locale: rest[1],
|
|
95720
|
-
message: rest[2]
|
|
95721
|
-
};
|
|
95722
|
-
}
|
|
95723
|
-
const projectId = params.projectId;
|
|
95724
|
-
const type = params.type;
|
|
95725
|
-
const locale = params.locale;
|
|
95726
|
-
const message = params.message;
|
|
95727
|
-
if (typeof projectId === "undefined") {
|
|
95728
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95729
|
-
}
|
|
95730
|
-
if (typeof type === "undefined") {
|
|
95731
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95732
|
-
}
|
|
95733
|
-
if (typeof locale === "undefined") {
|
|
95734
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95735
|
-
}
|
|
95736
|
-
if (typeof message === "undefined") {
|
|
95737
|
-
throw new AppwriteException('Missing required parameter: "message"');
|
|
95738
|
-
}
|
|
95739
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95740
|
-
const payload = {};
|
|
95741
|
-
if (typeof message !== "undefined") {
|
|
95742
|
-
payload["message"] = message;
|
|
95743
|
-
}
|
|
95744
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95745
|
-
const apiHeaders = {
|
|
95746
|
-
"content-type": "application/json"
|
|
95747
|
-
};
|
|
95748
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95749
|
-
}
|
|
95750
|
-
deleteSmsTemplate(paramsOrFirst, ...rest) {
|
|
95751
|
-
let params;
|
|
95752
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95753
|
-
params = paramsOrFirst || {};
|
|
95754
|
-
} else {
|
|
95755
|
-
params = {
|
|
95756
|
-
projectId: paramsOrFirst,
|
|
95757
|
-
type: rest[0],
|
|
95758
|
-
locale: rest[1]
|
|
95759
|
-
};
|
|
95760
|
-
}
|
|
95761
|
-
const projectId = params.projectId;
|
|
95762
|
-
const type = params.type;
|
|
95763
|
-
const locale = params.locale;
|
|
95764
|
-
if (typeof projectId === "undefined") {
|
|
95765
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95766
|
-
}
|
|
95767
|
-
if (typeof type === "undefined") {
|
|
95768
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95769
|
-
}
|
|
95770
|
-
if (typeof locale === "undefined") {
|
|
95771
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95772
|
-
}
|
|
95773
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95774
|
-
const payload = {};
|
|
95775
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95776
|
-
const apiHeaders = {
|
|
95777
|
-
"content-type": "application/json"
|
|
95778
|
-
};
|
|
95779
|
-
return this.client.call("delete", uri, apiHeaders, payload);
|
|
95780
|
-
}
|
|
95781
|
-
deleteSMSTemplate(paramsOrFirst, ...rest) {
|
|
95782
|
-
let params;
|
|
95783
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95784
|
-
params = paramsOrFirst || {};
|
|
95785
|
-
} else {
|
|
95786
|
-
params = {
|
|
95787
|
-
projectId: paramsOrFirst,
|
|
95788
|
-
type: rest[0],
|
|
95789
|
-
locale: rest[1]
|
|
95790
|
-
};
|
|
95791
|
-
}
|
|
95792
|
-
const projectId = params.projectId;
|
|
95793
|
-
const type = params.type;
|
|
95794
|
-
const locale = params.locale;
|
|
95795
|
-
if (typeof projectId === "undefined") {
|
|
95796
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95797
|
-
}
|
|
95798
|
-
if (typeof type === "undefined") {
|
|
95799
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95800
|
-
}
|
|
95801
|
-
if (typeof locale === "undefined") {
|
|
95802
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95803
|
-
}
|
|
95804
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95805
|
-
const payload = {};
|
|
95806
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95807
|
-
const apiHeaders = {
|
|
95808
|
-
"content-type": "application/json"
|
|
95809
|
-
};
|
|
95810
|
-
return this.client.call("delete", uri, apiHeaders, payload);
|
|
95811
|
-
}
|
|
95812
95365
|
};
|
|
95813
95366
|
var Proxy2 = class {
|
|
95814
95367
|
constructor(client) {
|
|
@@ -101609,41 +101162,6 @@ Permission.update = (role) => {
|
|
|
101609
101162
|
Permission.delete = (role) => {
|
|
101610
101163
|
return `delete("${role}")`;
|
|
101611
101164
|
};
|
|
101612
|
-
var _a2;
|
|
101613
|
-
var _ID_hexTimestamp;
|
|
101614
|
-
var ID2 = class {
|
|
101615
|
-
/**
|
|
101616
|
-
* Uses the provided ID as the ID for the resource.
|
|
101617
|
-
*
|
|
101618
|
-
* @param {string} id
|
|
101619
|
-
* @returns {string}
|
|
101620
|
-
*/
|
|
101621
|
-
static custom(id) {
|
|
101622
|
-
return id;
|
|
101623
|
-
}
|
|
101624
|
-
/**
|
|
101625
|
-
* Have Appwrite generate a unique ID for you.
|
|
101626
|
-
*
|
|
101627
|
-
* @param {number} padding. Default is 7.
|
|
101628
|
-
* @returns {string}
|
|
101629
|
-
*/
|
|
101630
|
-
static unique(padding = 7) {
|
|
101631
|
-
const baseId = __classPrivateFieldGet(_a2, _a2, "m", _ID_hexTimestamp).call(_a2);
|
|
101632
|
-
let randomPadding = "";
|
|
101633
|
-
for (let i = 0; i < padding; i++) {
|
|
101634
|
-
const randomHexDigit = Math.floor(Math.random() * 16).toString(16);
|
|
101635
|
-
randomPadding += randomHexDigit;
|
|
101636
|
-
}
|
|
101637
|
-
return baseId + randomPadding;
|
|
101638
|
-
}
|
|
101639
|
-
};
|
|
101640
|
-
_a2 = ID2, _ID_hexTimestamp = function _ID_hexTimestamp2() {
|
|
101641
|
-
const now = /* @__PURE__ */ new Date();
|
|
101642
|
-
const sec = Math.floor(now.getTime() / 1e3);
|
|
101643
|
-
const msec = now.getMilliseconds();
|
|
101644
|
-
const hexTimestamp = sec.toString(16) + msec.toString(16).padStart(5, "0");
|
|
101645
|
-
return hexTimestamp;
|
|
101646
|
-
};
|
|
101647
101165
|
var Condition;
|
|
101648
101166
|
(function(Condition2) {
|
|
101649
101167
|
Condition2["Equal"] = "equal";
|
|
@@ -101848,6 +101366,8 @@ var Scopes;
|
|
|
101848
101366
|
Scopes2["PlatformsRead"] = "platforms.read";
|
|
101849
101367
|
Scopes2["PlatformsWrite"] = "platforms.write";
|
|
101850
101368
|
Scopes2["PoliciesWrite"] = "policies.write";
|
|
101369
|
+
Scopes2["TemplatesRead"] = "templates.read";
|
|
101370
|
+
Scopes2["TemplatesWrite"] = "templates.write";
|
|
101851
101371
|
Scopes2["PoliciesRead"] = "policies.read";
|
|
101852
101372
|
Scopes2["ArchivesRead"] = "archives.read";
|
|
101853
101373
|
Scopes2["ArchivesWrite"] = "archives.write";
|
|
@@ -102659,6 +102179,12 @@ var OrderBy;
|
|
|
102659
102179
|
OrderBy2["Asc"] = "asc";
|
|
102660
102180
|
OrderBy2["Desc"] = "desc";
|
|
102661
102181
|
})(OrderBy || (OrderBy = {}));
|
|
102182
|
+
var DocumentsDBIndexType;
|
|
102183
|
+
(function(DocumentsDBIndexType2) {
|
|
102184
|
+
DocumentsDBIndexType2["Key"] = "key";
|
|
102185
|
+
DocumentsDBIndexType2["Fulltext"] = "fulltext";
|
|
102186
|
+
DocumentsDBIndexType2["Unique"] = "unique";
|
|
102187
|
+
})(DocumentsDBIndexType || (DocumentsDBIndexType = {}));
|
|
102662
102188
|
var RegistrationType;
|
|
102663
102189
|
(function(RegistrationType2) {
|
|
102664
102190
|
RegistrationType2["New"] = "new";
|
|
@@ -103023,46 +102549,11 @@ var ServiceId;
|
|
|
103023
102549
|
ServiceId3["Migrations"] = "migrations";
|
|
103024
102550
|
ServiceId3["Messaging"] = "messaging";
|
|
103025
102551
|
})(ServiceId || (ServiceId = {}));
|
|
103026
|
-
var
|
|
103027
|
-
(function(
|
|
103028
|
-
|
|
103029
|
-
|
|
103030
|
-
})(
|
|
103031
|
-
var Region;
|
|
103032
|
-
(function(Region2) {
|
|
103033
|
-
Region2["Fra"] = "fra";
|
|
103034
|
-
Region2["Nyc"] = "nyc";
|
|
103035
|
-
Region2["Syd"] = "syd";
|
|
103036
|
-
Region2["Sfo"] = "sfo";
|
|
103037
|
-
Region2["Sgp"] = "sgp";
|
|
103038
|
-
Region2["Tor"] = "tor";
|
|
103039
|
-
})(Region || (Region = {}));
|
|
103040
|
-
var AuthMethod;
|
|
103041
|
-
(function(AuthMethod3) {
|
|
103042
|
-
AuthMethod3["Emailpassword"] = "email-password";
|
|
103043
|
-
AuthMethod3["Magicurl"] = "magic-url";
|
|
103044
|
-
AuthMethod3["Emailotp"] = "email-otp";
|
|
103045
|
-
AuthMethod3["Anonymous"] = "anonymous";
|
|
103046
|
-
AuthMethod3["Invites"] = "invites";
|
|
103047
|
-
AuthMethod3["Jwt"] = "jwt";
|
|
103048
|
-
AuthMethod3["Phone"] = "phone";
|
|
103049
|
-
})(AuthMethod || (AuthMethod = {}));
|
|
103050
|
-
var ResourceType;
|
|
103051
|
-
(function(ResourceType2) {
|
|
103052
|
-
ResourceType2["Function"] = "function";
|
|
103053
|
-
ResourceType2["Execution"] = "execution";
|
|
103054
|
-
ResourceType2["Message"] = "message";
|
|
103055
|
-
ResourceType2["Backup"] = "backup";
|
|
103056
|
-
})(ResourceType || (ResourceType = {}));
|
|
103057
|
-
var SMTPSecure;
|
|
103058
|
-
(function(SMTPSecure2) {
|
|
103059
|
-
SMTPSecure2["Tls"] = "tls";
|
|
103060
|
-
SMTPSecure2["Ssl"] = "ssl";
|
|
103061
|
-
})(SMTPSecure || (SMTPSecure = {}));
|
|
103062
|
-
var Status;
|
|
103063
|
-
(function(Status2) {
|
|
103064
|
-
Status2["Active"] = "active";
|
|
103065
|
-
})(Status || (Status = {}));
|
|
102552
|
+
var Secure;
|
|
102553
|
+
(function(Secure2) {
|
|
102554
|
+
Secure2["Tls"] = "tls";
|
|
102555
|
+
Secure2["Ssl"] = "ssl";
|
|
102556
|
+
})(Secure || (Secure = {}));
|
|
103066
102557
|
var EmailTemplateType;
|
|
103067
102558
|
(function(EmailTemplateType2) {
|
|
103068
102559
|
EmailTemplateType2["Verification"] = "verification";
|
|
@@ -103207,147 +102698,41 @@ var EmailTemplateLocale;
|
|
|
103207
102698
|
EmailTemplateLocale2["Zhtw"] = "zh-tw";
|
|
103208
102699
|
EmailTemplateLocale2["Zu"] = "zu";
|
|
103209
102700
|
})(EmailTemplateLocale || (EmailTemplateLocale = {}));
|
|
103210
|
-
var
|
|
103211
|
-
(function(
|
|
103212
|
-
|
|
103213
|
-
|
|
103214
|
-
|
|
103215
|
-
|
|
103216
|
-
|
|
103217
|
-
|
|
103218
|
-
|
|
103219
|
-
|
|
103220
|
-
|
|
103221
|
-
|
|
103222
|
-
|
|
103223
|
-
|
|
103224
|
-
|
|
103225
|
-
|
|
103226
|
-
|
|
103227
|
-
|
|
103228
|
-
|
|
103229
|
-
|
|
103230
|
-
|
|
103231
|
-
|
|
103232
|
-
|
|
103233
|
-
|
|
103234
|
-
|
|
103235
|
-
|
|
103236
|
-
|
|
103237
|
-
|
|
103238
|
-
|
|
103239
|
-
|
|
103240
|
-
|
|
103241
|
-
|
|
103242
|
-
|
|
103243
|
-
|
|
103244
|
-
|
|
103245
|
-
SmsTemplateLocale2["Cy"] = "cy";
|
|
103246
|
-
SmsTemplateLocale2["Da"] = "da";
|
|
103247
|
-
SmsTemplateLocale2["De"] = "de";
|
|
103248
|
-
SmsTemplateLocale2["Deat"] = "de-at";
|
|
103249
|
-
SmsTemplateLocale2["Dech"] = "de-ch";
|
|
103250
|
-
SmsTemplateLocale2["Deli"] = "de-li";
|
|
103251
|
-
SmsTemplateLocale2["Delu"] = "de-lu";
|
|
103252
|
-
SmsTemplateLocale2["El"] = "el";
|
|
103253
|
-
SmsTemplateLocale2["En"] = "en";
|
|
103254
|
-
SmsTemplateLocale2["Enau"] = "en-au";
|
|
103255
|
-
SmsTemplateLocale2["Enbz"] = "en-bz";
|
|
103256
|
-
SmsTemplateLocale2["Enca"] = "en-ca";
|
|
103257
|
-
SmsTemplateLocale2["Engb"] = "en-gb";
|
|
103258
|
-
SmsTemplateLocale2["Enie"] = "en-ie";
|
|
103259
|
-
SmsTemplateLocale2["Enjm"] = "en-jm";
|
|
103260
|
-
SmsTemplateLocale2["Ennz"] = "en-nz";
|
|
103261
|
-
SmsTemplateLocale2["Entt"] = "en-tt";
|
|
103262
|
-
SmsTemplateLocale2["Enus"] = "en-us";
|
|
103263
|
-
SmsTemplateLocale2["Enza"] = "en-za";
|
|
103264
|
-
SmsTemplateLocale2["Eo"] = "eo";
|
|
103265
|
-
SmsTemplateLocale2["Es"] = "es";
|
|
103266
|
-
SmsTemplateLocale2["Esar"] = "es-ar";
|
|
103267
|
-
SmsTemplateLocale2["Esbo"] = "es-bo";
|
|
103268
|
-
SmsTemplateLocale2["Escl"] = "es-cl";
|
|
103269
|
-
SmsTemplateLocale2["Esco"] = "es-co";
|
|
103270
|
-
SmsTemplateLocale2["Escr"] = "es-cr";
|
|
103271
|
-
SmsTemplateLocale2["Esdo"] = "es-do";
|
|
103272
|
-
SmsTemplateLocale2["Esec"] = "es-ec";
|
|
103273
|
-
SmsTemplateLocale2["Esgt"] = "es-gt";
|
|
103274
|
-
SmsTemplateLocale2["Eshn"] = "es-hn";
|
|
103275
|
-
SmsTemplateLocale2["Esmx"] = "es-mx";
|
|
103276
|
-
SmsTemplateLocale2["Esni"] = "es-ni";
|
|
103277
|
-
SmsTemplateLocale2["Espa"] = "es-pa";
|
|
103278
|
-
SmsTemplateLocale2["Espe"] = "es-pe";
|
|
103279
|
-
SmsTemplateLocale2["Espr"] = "es-pr";
|
|
103280
|
-
SmsTemplateLocale2["Espy"] = "es-py";
|
|
103281
|
-
SmsTemplateLocale2["Essv"] = "es-sv";
|
|
103282
|
-
SmsTemplateLocale2["Esuy"] = "es-uy";
|
|
103283
|
-
SmsTemplateLocale2["Esve"] = "es-ve";
|
|
103284
|
-
SmsTemplateLocale2["Et"] = "et";
|
|
103285
|
-
SmsTemplateLocale2["Eu"] = "eu";
|
|
103286
|
-
SmsTemplateLocale2["Fa"] = "fa";
|
|
103287
|
-
SmsTemplateLocale2["Fi"] = "fi";
|
|
103288
|
-
SmsTemplateLocale2["Fo"] = "fo";
|
|
103289
|
-
SmsTemplateLocale2["Fr"] = "fr";
|
|
103290
|
-
SmsTemplateLocale2["Frbe"] = "fr-be";
|
|
103291
|
-
SmsTemplateLocale2["Frca"] = "fr-ca";
|
|
103292
|
-
SmsTemplateLocale2["Frch"] = "fr-ch";
|
|
103293
|
-
SmsTemplateLocale2["Frlu"] = "fr-lu";
|
|
103294
|
-
SmsTemplateLocale2["Ga"] = "ga";
|
|
103295
|
-
SmsTemplateLocale2["Gd"] = "gd";
|
|
103296
|
-
SmsTemplateLocale2["He"] = "he";
|
|
103297
|
-
SmsTemplateLocale2["Hi"] = "hi";
|
|
103298
|
-
SmsTemplateLocale2["Hr"] = "hr";
|
|
103299
|
-
SmsTemplateLocale2["Hu"] = "hu";
|
|
103300
|
-
SmsTemplateLocale2["Id"] = "id";
|
|
103301
|
-
SmsTemplateLocale2["Is"] = "is";
|
|
103302
|
-
SmsTemplateLocale2["It"] = "it";
|
|
103303
|
-
SmsTemplateLocale2["Itch"] = "it-ch";
|
|
103304
|
-
SmsTemplateLocale2["Ja"] = "ja";
|
|
103305
|
-
SmsTemplateLocale2["Ji"] = "ji";
|
|
103306
|
-
SmsTemplateLocale2["Ko"] = "ko";
|
|
103307
|
-
SmsTemplateLocale2["Ku"] = "ku";
|
|
103308
|
-
SmsTemplateLocale2["Lt"] = "lt";
|
|
103309
|
-
SmsTemplateLocale2["Lv"] = "lv";
|
|
103310
|
-
SmsTemplateLocale2["Mk"] = "mk";
|
|
103311
|
-
SmsTemplateLocale2["Ml"] = "ml";
|
|
103312
|
-
SmsTemplateLocale2["Ms"] = "ms";
|
|
103313
|
-
SmsTemplateLocale2["Mt"] = "mt";
|
|
103314
|
-
SmsTemplateLocale2["Nb"] = "nb";
|
|
103315
|
-
SmsTemplateLocale2["Ne"] = "ne";
|
|
103316
|
-
SmsTemplateLocale2["Nl"] = "nl";
|
|
103317
|
-
SmsTemplateLocale2["Nlbe"] = "nl-be";
|
|
103318
|
-
SmsTemplateLocale2["Nn"] = "nn";
|
|
103319
|
-
SmsTemplateLocale2["No"] = "no";
|
|
103320
|
-
SmsTemplateLocale2["Pa"] = "pa";
|
|
103321
|
-
SmsTemplateLocale2["Pl"] = "pl";
|
|
103322
|
-
SmsTemplateLocale2["Pt"] = "pt";
|
|
103323
|
-
SmsTemplateLocale2["Ptbr"] = "pt-br";
|
|
103324
|
-
SmsTemplateLocale2["Rm"] = "rm";
|
|
103325
|
-
SmsTemplateLocale2["Ro"] = "ro";
|
|
103326
|
-
SmsTemplateLocale2["Romd"] = "ro-md";
|
|
103327
|
-
SmsTemplateLocale2["Ru"] = "ru";
|
|
103328
|
-
SmsTemplateLocale2["Rumd"] = "ru-md";
|
|
103329
|
-
SmsTemplateLocale2["Sb"] = "sb";
|
|
103330
|
-
SmsTemplateLocale2["Sk"] = "sk";
|
|
103331
|
-
SmsTemplateLocale2["Sl"] = "sl";
|
|
103332
|
-
SmsTemplateLocale2["Sq"] = "sq";
|
|
103333
|
-
SmsTemplateLocale2["Sr"] = "sr";
|
|
103334
|
-
SmsTemplateLocale2["Sv"] = "sv";
|
|
103335
|
-
SmsTemplateLocale2["Svfi"] = "sv-fi";
|
|
103336
|
-
SmsTemplateLocale2["Th"] = "th";
|
|
103337
|
-
SmsTemplateLocale2["Tn"] = "tn";
|
|
103338
|
-
SmsTemplateLocale2["Tr"] = "tr";
|
|
103339
|
-
SmsTemplateLocale2["Ts"] = "ts";
|
|
103340
|
-
SmsTemplateLocale2["Ua"] = "ua";
|
|
103341
|
-
SmsTemplateLocale2["Ur"] = "ur";
|
|
103342
|
-
SmsTemplateLocale2["Ve"] = "ve";
|
|
103343
|
-
SmsTemplateLocale2["Vi"] = "vi";
|
|
103344
|
-
SmsTemplateLocale2["Xh"] = "xh";
|
|
103345
|
-
SmsTemplateLocale2["Zhcn"] = "zh-cn";
|
|
103346
|
-
SmsTemplateLocale2["Zhhk"] = "zh-hk";
|
|
103347
|
-
SmsTemplateLocale2["Zhsg"] = "zh-sg";
|
|
103348
|
-
SmsTemplateLocale2["Zhtw"] = "zh-tw";
|
|
103349
|
-
SmsTemplateLocale2["Zu"] = "zu";
|
|
103350
|
-
})(SmsTemplateLocale || (SmsTemplateLocale = {}));
|
|
102701
|
+
var ProjectUsageRange;
|
|
102702
|
+
(function(ProjectUsageRange2) {
|
|
102703
|
+
ProjectUsageRange2["OneHour"] = "1h";
|
|
102704
|
+
ProjectUsageRange2["OneDay"] = "1d";
|
|
102705
|
+
})(ProjectUsageRange || (ProjectUsageRange = {}));
|
|
102706
|
+
var Region;
|
|
102707
|
+
(function(Region2) {
|
|
102708
|
+
Region2["Fra"] = "fra";
|
|
102709
|
+
Region2["Nyc"] = "nyc";
|
|
102710
|
+
Region2["Syd"] = "syd";
|
|
102711
|
+
Region2["Sfo"] = "sfo";
|
|
102712
|
+
Region2["Sgp"] = "sgp";
|
|
102713
|
+
Region2["Tor"] = "tor";
|
|
102714
|
+
})(Region || (Region = {}));
|
|
102715
|
+
var AuthMethod;
|
|
102716
|
+
(function(AuthMethod3) {
|
|
102717
|
+
AuthMethod3["Emailpassword"] = "email-password";
|
|
102718
|
+
AuthMethod3["Magicurl"] = "magic-url";
|
|
102719
|
+
AuthMethod3["Emailotp"] = "email-otp";
|
|
102720
|
+
AuthMethod3["Anonymous"] = "anonymous";
|
|
102721
|
+
AuthMethod3["Invites"] = "invites";
|
|
102722
|
+
AuthMethod3["Jwt"] = "jwt";
|
|
102723
|
+
AuthMethod3["Phone"] = "phone";
|
|
102724
|
+
})(AuthMethod || (AuthMethod = {}));
|
|
102725
|
+
var ResourceType;
|
|
102726
|
+
(function(ResourceType2) {
|
|
102727
|
+
ResourceType2["Function"] = "function";
|
|
102728
|
+
ResourceType2["Execution"] = "execution";
|
|
102729
|
+
ResourceType2["Message"] = "message";
|
|
102730
|
+
ResourceType2["Backup"] = "backup";
|
|
102731
|
+
})(ResourceType || (ResourceType = {}));
|
|
102732
|
+
var Status;
|
|
102733
|
+
(function(Status2) {
|
|
102734
|
+
Status2["Active"] = "active";
|
|
102735
|
+
})(Status || (Status = {}));
|
|
103351
102736
|
var StatusCode;
|
|
103352
102737
|
(function(StatusCode2) {
|
|
103353
102738
|
StatusCode2["MovedPermanently301"] = "301";
|
|
@@ -103542,6 +102927,19 @@ var VCSDetectionType;
|
|
|
103542
102927
|
VCSDetectionType2["Runtime"] = "runtime";
|
|
103543
102928
|
VCSDetectionType2["Framework"] = "framework";
|
|
103544
102929
|
})(VCSDetectionType || (VCSDetectionType = {}));
|
|
102930
|
+
var Model;
|
|
102931
|
+
(function(Model2) {
|
|
102932
|
+
Model2["Embeddinggemma"] = "embeddinggemma";
|
|
102933
|
+
})(Model || (Model = {}));
|
|
102934
|
+
var VectorsDBIndexType;
|
|
102935
|
+
(function(VectorsDBIndexType2) {
|
|
102936
|
+
VectorsDBIndexType2["HnswEuclidean"] = "hnsw_euclidean";
|
|
102937
|
+
VectorsDBIndexType2["HnswDot"] = "hnsw_dot";
|
|
102938
|
+
VectorsDBIndexType2["HnswCosine"] = "hnsw_cosine";
|
|
102939
|
+
VectorsDBIndexType2["Object"] = "object";
|
|
102940
|
+
VectorsDBIndexType2["Key"] = "key";
|
|
102941
|
+
VectorsDBIndexType2["Unique"] = "unique";
|
|
102942
|
+
})(VectorsDBIndexType || (VectorsDBIndexType = {}));
|
|
103545
102943
|
var DatabaseType;
|
|
103546
102944
|
(function(DatabaseType2) {
|
|
103547
102945
|
DatabaseType2["Legacy"] = "legacy";
|
|
@@ -103573,6 +102971,14 @@ var IndexStatus;
|
|
|
103573
102971
|
IndexStatus2["Stuck"] = "stuck";
|
|
103574
102972
|
IndexStatus2["Failed"] = "failed";
|
|
103575
102973
|
})(IndexStatus || (IndexStatus = {}));
|
|
102974
|
+
var DetectionFrameworkType;
|
|
102975
|
+
(function(DetectionFrameworkType2) {
|
|
102976
|
+
DetectionFrameworkType2["Framework"] = "framework";
|
|
102977
|
+
})(DetectionFrameworkType || (DetectionFrameworkType = {}));
|
|
102978
|
+
var DetectionRuntimeType;
|
|
102979
|
+
(function(DetectionRuntimeType2) {
|
|
102980
|
+
DetectionRuntimeType2["Runtime"] = "runtime";
|
|
102981
|
+
})(DetectionRuntimeType || (DetectionRuntimeType = {}));
|
|
103576
102982
|
var DeploymentStatus;
|
|
103577
102983
|
(function(DeploymentStatus2) {
|
|
103578
102984
|
DeploymentStatus2["Waiting"] = "waiting";
|
|
@@ -103670,7 +103076,7 @@ var package_default = {
|
|
|
103670
103076
|
type: "module",
|
|
103671
103077
|
homepage: "https://appwrite.io/support",
|
|
103672
103078
|
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",
|
|
103673
|
-
version: "
|
|
103079
|
+
version: "19.1.0",
|
|
103674
103080
|
license: "BSD-3-Clause",
|
|
103675
103081
|
main: "dist/index.cjs",
|
|
103676
103082
|
module: "dist/index.js",
|
|
@@ -103718,7 +103124,7 @@ var package_default = {
|
|
|
103718
103124
|
"windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --external:terminal-image --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
|
|
103719
103125
|
},
|
|
103720
103126
|
dependencies: {
|
|
103721
|
-
"@appwrite.io/console": "
|
|
103127
|
+
"@appwrite.io/console": "11.0.0",
|
|
103722
103128
|
chalk: "4.1.2",
|
|
103723
103129
|
chokidar: "^3.6.0",
|
|
103724
103130
|
"cli-progress": "^3.12.0",
|
|
@@ -103739,7 +103145,9 @@ var package_default = {
|
|
|
103739
103145
|
zod: "^4.3.5"
|
|
103740
103146
|
},
|
|
103741
103147
|
overrides: {
|
|
103742
|
-
phin: "3.7.1"
|
|
103148
|
+
phin: "3.7.1",
|
|
103149
|
+
"@xmldom/xmldom": "^0.9.10",
|
|
103150
|
+
tmp: "0.2.5"
|
|
103743
103151
|
},
|
|
103744
103152
|
devDependencies: {
|
|
103745
103153
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
@@ -103913,6 +103321,19 @@ var InvoiceSummarySchema = createSummarySchema(
|
|
|
103913
103321
|
["plan", "status", "dueAt"],
|
|
103914
103322
|
"Expected an invoice summary row"
|
|
103915
103323
|
);
|
|
103324
|
+
var RuntimeSummarySchema = createSummarySchema(
|
|
103325
|
+
{
|
|
103326
|
+
$id: external_exports.string().nullable().optional(),
|
|
103327
|
+
key: external_exports.string().nullable().optional(),
|
|
103328
|
+
name: external_exports.string().nullable().optional(),
|
|
103329
|
+
version: external_exports.union([external_exports.string(), external_exports.number()]).nullable().optional(),
|
|
103330
|
+
base: external_exports.string().nullable().optional(),
|
|
103331
|
+
image: external_exports.string().nullable().optional(),
|
|
103332
|
+
logo: external_exports.string().nullable().optional()
|
|
103333
|
+
},
|
|
103334
|
+
["$id", "name", "version", "base", "image"],
|
|
103335
|
+
"Expected a runtime summary row"
|
|
103336
|
+
);
|
|
103916
103337
|
var paymentMethodLabel = (row) => {
|
|
103917
103338
|
const brand = valueFrom(row, "brand") ?? "";
|
|
103918
103339
|
const last4 = valueFrom(row, "last4") ?? "";
|
|
@@ -103948,7 +103369,35 @@ var paymentMethodStatus = (row) => {
|
|
|
103948
103369
|
}
|
|
103949
103370
|
return "status: pending";
|
|
103950
103371
|
};
|
|
103372
|
+
var runtimeLabel = (row) => {
|
|
103373
|
+
const name = compactText(valueFrom(row, "name"), "");
|
|
103374
|
+
const key = compactText(valueFrom(row, "key"), "");
|
|
103375
|
+
const version2 = valueFrom(row, "version");
|
|
103376
|
+
const runtimeName = name || (key ? toTitleCase(key) : "Runtime");
|
|
103377
|
+
if (version2 == null || String(version2).trim() === "") {
|
|
103378
|
+
return runtimeName;
|
|
103379
|
+
}
|
|
103380
|
+
return `${runtimeName} ${version2}`;
|
|
103381
|
+
};
|
|
103951
103382
|
var structuredCollectionRenderers = {
|
|
103383
|
+
runtimes: createColumnRenderer(RuntimeSummarySchema, [
|
|
103384
|
+
{
|
|
103385
|
+
header: "runtime",
|
|
103386
|
+
value: (row, context) => indexedLabel(runtimeLabel(row), context)
|
|
103387
|
+
},
|
|
103388
|
+
{
|
|
103389
|
+
header: "id",
|
|
103390
|
+
value: (row) => compactText(valueFrom(row, "$id"))
|
|
103391
|
+
},
|
|
103392
|
+
{
|
|
103393
|
+
header: "base",
|
|
103394
|
+
value: (row) => compactText(valueFrom(row, "base"))
|
|
103395
|
+
},
|
|
103396
|
+
{
|
|
103397
|
+
header: "image",
|
|
103398
|
+
value: (row) => compactText(valueFrom(row, "image"))
|
|
103399
|
+
}
|
|
103400
|
+
]),
|
|
103952
103401
|
identities: createColumnRenderer(IdentitySummarySchema, [
|
|
103953
103402
|
{
|
|
103954
103403
|
header: "identity",
|
|
@@ -104466,6 +103915,15 @@ var drawTable = (data, options = {}) => {
|
|
|
104466
103915
|
var drawJSON = (data) => {
|
|
104467
103916
|
console.log(JSON.stringify(data, null, 2));
|
|
104468
103917
|
};
|
|
103918
|
+
var isQueryError = (message) => /Invalid query(?: method)?/i.test(message) || /query[^.:\n]*syntax error|syntax error[^.:\n]*query/i.test(message);
|
|
103919
|
+
var printQueryErrorHint = (err) => {
|
|
103920
|
+
if (!isQueryError(err.message)) {
|
|
103921
|
+
return;
|
|
103922
|
+
}
|
|
103923
|
+
hint(
|
|
103924
|
+
`For common list filters, use flags like --limit 25, --sort-desc '$createdAt', or --where 'status=active'. Raw --queries values must be Appwrite JSON query strings, for example: ${EXECUTABLE_NAME} tables-db list-rows --queries '{"method":"limit","values":[25]}'`
|
|
103925
|
+
);
|
|
103926
|
+
};
|
|
104469
103927
|
var parseError = (err) => {
|
|
104470
103928
|
if (cliConfig.report) {
|
|
104471
103929
|
void (async () => {
|
|
@@ -104514,6 +103972,7 @@ ${stack}`
|
|
|
104514
103972
|
${githubIssueUrl.href}
|
|
104515
103973
|
`
|
|
104516
103974
|
);
|
|
103975
|
+
printQueryErrorHint(err);
|
|
104517
103976
|
error48("\n Stack Trace: \n");
|
|
104518
103977
|
console.error(err);
|
|
104519
103978
|
process.exit(1);
|
|
@@ -104521,9 +103980,11 @@ ${stack}`
|
|
|
104521
103980
|
} else {
|
|
104522
103981
|
if (cliConfig.verbose) {
|
|
104523
103982
|
console.error(err);
|
|
103983
|
+
printQueryErrorHint(err);
|
|
104524
103984
|
} else {
|
|
104525
103985
|
log("For detailed error pass the --verbose or --report flag");
|
|
104526
103986
|
error48(err.message);
|
|
103987
|
+
printQueryErrorHint(err);
|
|
104527
103988
|
}
|
|
104528
103989
|
process.exit(1);
|
|
104529
103990
|
}
|
|
@@ -106875,6 +106336,37 @@ function getDeploymentProgressText(status, waitingSince) {
|
|
|
106875
106336
|
function getDeploymentTimeoutErrorMessage() {
|
|
106876
106337
|
return `Deployment got stuck for more than ${DEPLOYMENT_TIMEOUT_MINUTES} minutes`;
|
|
106877
106338
|
}
|
|
106339
|
+
function getDeploymentProgressSignature(deployment) {
|
|
106340
|
+
const status = typeof deployment["status"] === "string" ? deployment["status"] : "";
|
|
106341
|
+
const buildLogs = typeof deployment["buildLogs"] === "string" ? deployment["buildLogs"] : "";
|
|
106342
|
+
const updatedAt = typeof deployment["$updatedAt"] === "string" ? deployment["$updatedAt"] : "";
|
|
106343
|
+
const { screenshotLight, screenshotDark } = getSiteDeploymentScreenshots(deployment);
|
|
106344
|
+
return JSON.stringify({
|
|
106345
|
+
status,
|
|
106346
|
+
updatedAt,
|
|
106347
|
+
buildLogsLength: buildLogs.length,
|
|
106348
|
+
buildLogsTail: buildLogs.slice(-200),
|
|
106349
|
+
screenshotLight: screenshotLight ?? "",
|
|
106350
|
+
screenshotDark: screenshotDark ?? ""
|
|
106351
|
+
});
|
|
106352
|
+
}
|
|
106353
|
+
function createDeploymentTimeoutTracker(deployment) {
|
|
106354
|
+
let lastActivityAt = Date.now();
|
|
106355
|
+
let lastSignature = null;
|
|
106356
|
+
const touch = (nextDeployment) => {
|
|
106357
|
+
const nextSignature = getDeploymentProgressSignature(nextDeployment);
|
|
106358
|
+
if (nextSignature === lastSignature) {
|
|
106359
|
+
return;
|
|
106360
|
+
}
|
|
106361
|
+
lastSignature = nextSignature;
|
|
106362
|
+
lastActivityAt = Date.now();
|
|
106363
|
+
};
|
|
106364
|
+
touch(deployment);
|
|
106365
|
+
return {
|
|
106366
|
+
touch,
|
|
106367
|
+
hasTimedOut: () => Date.now() - lastActivityAt > DEPLOYMENT_TIMEOUT_MS
|
|
106368
|
+
};
|
|
106369
|
+
}
|
|
106878
106370
|
async function getTerminalImage() {
|
|
106879
106371
|
terminalImageModulePromise ??= import("terminal-image").then(
|
|
106880
106372
|
(module2) => module2.default
|
|
@@ -107393,7 +106885,7 @@ var Push = class {
|
|
|
107393
106885
|
if (settings.services) {
|
|
107394
106886
|
this.log("Applying service statuses ...");
|
|
107395
106887
|
for (const [service, status] of Object.entries(settings.services)) {
|
|
107396
|
-
await projectService.
|
|
106888
|
+
await projectService.updateService({
|
|
107397
106889
|
serviceId: service,
|
|
107398
106890
|
enabled: status
|
|
107399
106891
|
});
|
|
@@ -107402,7 +106894,7 @@ var Push = class {
|
|
|
107402
106894
|
if (settings.protocols) {
|
|
107403
106895
|
this.log("Applying protocol statuses ...");
|
|
107404
106896
|
for (const [protocol, status] of Object.entries(settings.protocols)) {
|
|
107405
|
-
await projectService.
|
|
106897
|
+
await projectService.updateProtocol({
|
|
107406
106898
|
protocolId: protocol,
|
|
107407
106899
|
enabled: status
|
|
107408
106900
|
});
|
|
@@ -107411,33 +106903,26 @@ var Push = class {
|
|
|
107411
106903
|
if (settings.auth) {
|
|
107412
106904
|
if (settings.auth.security) {
|
|
107413
106905
|
this.log("Applying auth security settings ...");
|
|
107414
|
-
await
|
|
107415
|
-
projectId,
|
|
106906
|
+
await projectService.updateSessionDurationPolicy({
|
|
107416
106907
|
duration: Number(settings.auth.security.duration)
|
|
107417
106908
|
});
|
|
107418
|
-
await
|
|
107419
|
-
|
|
107420
|
-
limit: Number(settings.auth.security.limit)
|
|
106909
|
+
await projectService.updateUserLimitPolicy({
|
|
106910
|
+
total: Number(settings.auth.security.limit)
|
|
107421
106911
|
});
|
|
107422
|
-
await
|
|
107423
|
-
|
|
107424
|
-
limit: Number(settings.auth.security.sessionsLimit)
|
|
106912
|
+
await projectService.updateSessionLimitPolicy({
|
|
106913
|
+
total: Number(settings.auth.security.sessionsLimit)
|
|
107425
106914
|
});
|
|
107426
|
-
await
|
|
107427
|
-
projectId,
|
|
106915
|
+
await projectService.updatePasswordDictionaryPolicy({
|
|
107428
106916
|
enabled: settings.auth.security.passwordDictionary
|
|
107429
106917
|
});
|
|
107430
|
-
await
|
|
107431
|
-
|
|
107432
|
-
limit: Number(settings.auth.security.passwordHistory)
|
|
106918
|
+
await projectService.updatePasswordHistoryPolicy({
|
|
106919
|
+
total: Number(settings.auth.security.passwordHistory)
|
|
107433
106920
|
});
|
|
107434
|
-
await
|
|
107435
|
-
projectId,
|
|
106921
|
+
await projectService.updatePasswordPersonalDataPolicy({
|
|
107436
106922
|
enabled: settings.auth.security.personalDataCheck
|
|
107437
106923
|
});
|
|
107438
|
-
await
|
|
107439
|
-
|
|
107440
|
-
alerts: settings.auth.security.sessionAlerts
|
|
106924
|
+
await projectService.updateSessionAlertPolicy({
|
|
106925
|
+
enabled: settings.auth.security.sessionAlerts
|
|
107441
106926
|
});
|
|
107442
106927
|
await projectsService.updateMockNumbers({
|
|
107443
106928
|
projectId,
|
|
@@ -107890,6 +107375,7 @@ var Push = class {
|
|
|
107890
107375
|
deploymentId
|
|
107891
107376
|
);
|
|
107892
107377
|
let waitingSince = null;
|
|
107378
|
+
const deploymentTimeoutTracker = createDeploymentTimeoutTracker(response);
|
|
107893
107379
|
const deploymentLogPrinter = createDeploymentLogPrinter({
|
|
107894
107380
|
label: `function:${func.name}`,
|
|
107895
107381
|
showPrefix: functions.length > 1,
|
|
@@ -107900,6 +107386,7 @@ var Push = class {
|
|
|
107900
107386
|
endpoint: localConfig.getEndpoint() || globalConfig2.getEndpoint(),
|
|
107901
107387
|
event: `functions.${func["$id"]}.deployments.${deploymentId}.update`,
|
|
107902
107388
|
onDeploymentUpdate: (deployment) => {
|
|
107389
|
+
deploymentTimeoutTracker.touch(deployment);
|
|
107903
107390
|
deploymentLogPrinter.ingest(deployment);
|
|
107904
107391
|
},
|
|
107905
107392
|
onClose: () => {
|
|
@@ -107929,9 +107416,8 @@ var Push = class {
|
|
|
107929
107416
|
deploymentLogsController
|
|
107930
107417
|
)
|
|
107931
107418
|
});
|
|
107932
|
-
let timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS;
|
|
107933
107419
|
while (true) {
|
|
107934
|
-
if (
|
|
107420
|
+
if (deploymentTimeoutTracker.hasTimedOut()) {
|
|
107935
107421
|
deploymentLogPrinter.complete();
|
|
107936
107422
|
failedDeployments.push({
|
|
107937
107423
|
name: func["name"],
|
|
@@ -107955,6 +107441,7 @@ var Push = class {
|
|
|
107955
107441
|
functionId: func["$id"],
|
|
107956
107442
|
deploymentId
|
|
107957
107443
|
});
|
|
107444
|
+
deploymentTimeoutTracker.touch(response);
|
|
107958
107445
|
deploymentLogPrinter.ingest(response);
|
|
107959
107446
|
const status = response["status"];
|
|
107960
107447
|
if (status === "waiting") {
|
|
@@ -108124,7 +107611,6 @@ var Push = class {
|
|
|
108124
107611
|
siteId: site["$id"],
|
|
108125
107612
|
name: site.name,
|
|
108126
107613
|
framework: site.framework,
|
|
108127
|
-
enabled: site.enabled,
|
|
108128
107614
|
logging: site.logging,
|
|
108129
107615
|
timeout: site.timeout,
|
|
108130
107616
|
installCommand: site.installCommand,
|
|
@@ -108155,7 +107641,6 @@ var Push = class {
|
|
|
108155
107641
|
siteId: site.$id,
|
|
108156
107642
|
name: site.name,
|
|
108157
107643
|
framework: site.framework,
|
|
108158
|
-
enabled: site.enabled,
|
|
108159
107644
|
logging: site.logging,
|
|
108160
107645
|
timeout: site.timeout,
|
|
108161
107646
|
installCommand: site.installCommand,
|
|
@@ -108318,6 +107803,7 @@ var Push = class {
|
|
|
108318
107803
|
let waitingSince = null;
|
|
108319
107804
|
let readyWithoutScreenshotsSince = null;
|
|
108320
107805
|
let activationApplied = false;
|
|
107806
|
+
const deploymentTimeoutTracker = createDeploymentTimeoutTracker(response);
|
|
108321
107807
|
const deploymentLogPrinter = createDeploymentLogPrinter({
|
|
108322
107808
|
label: `site:${site.name}`,
|
|
108323
107809
|
showPrefix: sites.length > 1,
|
|
@@ -108328,6 +107814,7 @@ var Push = class {
|
|
|
108328
107814
|
endpoint: localConfig.getEndpoint() || globalConfig2.getEndpoint(),
|
|
108329
107815
|
event: `sites.${site["$id"]}.deployments.${deploymentId}.update`,
|
|
108330
107816
|
onDeploymentUpdate: (deployment) => {
|
|
107817
|
+
deploymentTimeoutTracker.touch(deployment);
|
|
108331
107818
|
deploymentLogPrinter.ingest(deployment);
|
|
108332
107819
|
},
|
|
108333
107820
|
onClose: () => {
|
|
@@ -108357,9 +107844,8 @@ var Push = class {
|
|
|
108357
107844
|
deploymentLogsController
|
|
108358
107845
|
)
|
|
108359
107846
|
});
|
|
108360
|
-
let timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS;
|
|
108361
107847
|
while (true) {
|
|
108362
|
-
if (
|
|
107848
|
+
if (deploymentTimeoutTracker.hasTimedOut()) {
|
|
108363
107849
|
deploymentLogPrinter.complete();
|
|
108364
107850
|
failedDeployments.push({
|
|
108365
107851
|
name: site["name"],
|
|
@@ -108383,6 +107869,7 @@ var Push = class {
|
|
|
108383
107869
|
siteId: site["$id"],
|
|
108384
107870
|
deploymentId
|
|
108385
107871
|
});
|
|
107872
|
+
deploymentTimeoutTracker.touch(response);
|
|
108386
107873
|
deploymentLogPrinter.ingest(response);
|
|
108387
107874
|
const status = response["status"];
|
|
108388
107875
|
if (status === "waiting") {
|
|
@@ -108413,10 +107900,6 @@ var Push = class {
|
|
|
108413
107900
|
}
|
|
108414
107901
|
if (!screenshotsReady) {
|
|
108415
107902
|
readyWithoutScreenshotsSince ??= Date.now();
|
|
108416
|
-
timeoutDeadline = Math.max(
|
|
108417
|
-
timeoutDeadline,
|
|
108418
|
-
readyWithoutScreenshotsSince + SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS
|
|
108419
|
-
);
|
|
108420
107903
|
if (Date.now() - readyWithoutScreenshotsSince < SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS) {
|
|
108421
107904
|
currentDeploymentEnd = "Finalizing deployment preview...";
|
|
108422
107905
|
updaterRow.update({
|
|
@@ -110003,7 +109486,6 @@ var Pull = class {
|
|
|
110003
109486
|
name: site.name,
|
|
110004
109487
|
path: sitePath,
|
|
110005
109488
|
framework: site.framework,
|
|
110006
|
-
enabled: site.enabled,
|
|
110007
109489
|
logging: site.logging,
|
|
110008
109490
|
timeout: site.timeout,
|
|
110009
109491
|
buildRuntime: site.buildRuntime,
|