appwrite-cli 18.1.0 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/bundle-win-arm64.mjs +2591 -2762
- package/dist/cli.cjs +2633 -2804
- package/dist/index.cjs +709 -1230
- package/dist/index.js +709 -1230
- 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/run.d.ts.map +1 -1
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +4 -2
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/emulation/docker.d.ts +1 -0
- package/dist/lib/emulation/docker.d.ts.map +1 -1
- package/dist/lib/emulation/utils.d.ts +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 +4 -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.0.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";
|
|
@@ -65027,6 +65029,7 @@ var CONFIG_RESOURCE_KEYS = [
|
|
|
65027
65029
|
"tablesDB",
|
|
65028
65030
|
"tables",
|
|
65029
65031
|
"teams",
|
|
65032
|
+
"webhooks",
|
|
65030
65033
|
"collections"
|
|
65031
65034
|
];
|
|
65032
65035
|
var TOP_LEVEL_RESOURCE_ARRAY_KEYS = new Set(
|
|
@@ -79011,7 +79014,6 @@ var SiteSchema = external_exports.object({
|
|
|
79011
79014
|
path: external_exports.string().optional(),
|
|
79012
79015
|
$id: external_exports.string(),
|
|
79013
79016
|
name: external_exports.string(),
|
|
79014
|
-
enabled: external_exports.boolean().optional(),
|
|
79015
79017
|
logging: external_exports.boolean().optional(),
|
|
79016
79018
|
timeout: external_exports.union([external_exports.number(), external_exports.bigint()]).optional(),
|
|
79017
79019
|
framework: external_exports.string().optional(),
|
|
@@ -79285,7 +79287,6 @@ var siteRequiresBuildCommand = (site) => {
|
|
|
79285
79287
|
return !(site.framework === "other" && site.adapter === "static");
|
|
79286
79288
|
};
|
|
79287
79289
|
var WINDOWS_EXECUTABLE_NAME = `${EXECUTABLE_NAME.toLowerCase()}.exe`;
|
|
79288
|
-
var HOMEBREW_FORMULA_NAME = EXECUTABLE_NAME.toLowerCase();
|
|
79289
79290
|
var isCloudHostname = (hostname3) => hostname3 === "cloud.appwrite.io" || hostname3.endsWith(".cloud.appwrite.io");
|
|
79290
79291
|
var getConsoleBaseUrl = (endpoint) => {
|
|
79291
79292
|
try {
|
|
@@ -79454,6 +79455,7 @@ function pruneDeprecatedSiteFields(data) {
|
|
|
79454
79455
|
sanitized.sites = sanitized.sites.map((site) => {
|
|
79455
79456
|
if (site && typeof site === "object") {
|
|
79456
79457
|
const {
|
|
79458
|
+
enabled: _enabled,
|
|
79457
79459
|
vars: _vars,
|
|
79458
79460
|
ignore: _ignore,
|
|
79459
79461
|
...rest
|
|
@@ -79627,13 +79629,16 @@ var Local = class _Local extends Config {
|
|
|
79627
79629
|
if (!this.has("sites")) {
|
|
79628
79630
|
return [];
|
|
79629
79631
|
}
|
|
79630
|
-
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
|
+
});
|
|
79631
79636
|
}
|
|
79632
79637
|
getSite($id) {
|
|
79633
79638
|
if (!this.has("sites")) {
|
|
79634
79639
|
return {};
|
|
79635
79640
|
}
|
|
79636
|
-
const sites = this.
|
|
79641
|
+
const sites = this.getSites();
|
|
79637
79642
|
for (let i = 0; i < sites.length; i++) {
|
|
79638
79643
|
if (sites[i]["$id"] == $id) {
|
|
79639
79644
|
return sites[i];
|
|
@@ -83692,6 +83697,41 @@ function __classPrivateFieldGet(receiver, state, kind, f2) {
|
|
|
83692
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");
|
|
83693
83698
|
return kind === "m" ? f2 : kind === "a" ? f2.call(receiver) : f2 ? f2.value : state.get(receiver);
|
|
83694
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
|
+
};
|
|
83695
83735
|
var JSONbig$1 = (0, import_json_bigint2.default)({ useNativeBigInt: true });
|
|
83696
83736
|
var Query = class {
|
|
83697
83737
|
/**
|
|
@@ -83847,8 +83887,8 @@ var Client = class _Client {
|
|
|
83847
83887
|
"x-sdk-name": "Console",
|
|
83848
83888
|
"x-sdk-platform": "console",
|
|
83849
83889
|
"x-sdk-language": "web",
|
|
83850
|
-
"x-sdk-version": "
|
|
83851
|
-
"X-Appwrite-Response-Format": "1.9.
|
|
83890
|
+
"x-sdk-version": "11.0.0",
|
|
83891
|
+
"X-Appwrite-Response-Format": "1.9.2"
|
|
83852
83892
|
};
|
|
83853
83893
|
this.realtime = {
|
|
83854
83894
|
socket: void 0,
|
|
@@ -83856,11 +83896,8 @@ var Client = class _Client {
|
|
|
83856
83896
|
heartbeat: void 0,
|
|
83857
83897
|
url: "",
|
|
83858
83898
|
channels: /* @__PURE__ */ new Set(),
|
|
83859
|
-
queries: /* @__PURE__ */ new Set(),
|
|
83860
83899
|
subscriptions: /* @__PURE__ */ new Map(),
|
|
83861
|
-
|
|
83862
|
-
subscriptionIdToSlot: /* @__PURE__ */ new Map(),
|
|
83863
|
-
subscriptionsCounter: 0,
|
|
83900
|
+
pendingSubscribes: /* @__PURE__ */ new Map(),
|
|
83864
83901
|
reconnect: true,
|
|
83865
83902
|
reconnectAttempts: 0,
|
|
83866
83903
|
lastMessage: void 0,
|
|
@@ -83894,26 +83931,14 @@ var Client = class _Client {
|
|
|
83894
83931
|
}, 2e4);
|
|
83895
83932
|
},
|
|
83896
83933
|
createSocket: () => {
|
|
83897
|
-
var _a3, _b, _c, _d;
|
|
83934
|
+
var _a3, _b, _c, _d, _e2;
|
|
83898
83935
|
if (this.realtime.subscriptions.size < 1) {
|
|
83899
83936
|
this.realtime.reconnect = false;
|
|
83900
83937
|
(_a3 = this.realtime.socket) === null || _a3 === void 0 ? void 0 : _a3.close();
|
|
83901
83938
|
return;
|
|
83902
83939
|
}
|
|
83903
83940
|
const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : "");
|
|
83904
|
-
|
|
83905
|
-
this.realtime.channels.forEach((channel) => {
|
|
83906
|
-
queryParams += "&channels[]=" + encodeURIComponent(channel);
|
|
83907
|
-
});
|
|
83908
|
-
const selectAllQuery = Query.select(["*"]).toString();
|
|
83909
|
-
this.realtime.subscriptions.forEach((sub, slot) => {
|
|
83910
|
-
const queries = sub.queries.length > 0 ? sub.queries : [selectAllQuery];
|
|
83911
|
-
sub.channels.forEach((channel) => {
|
|
83912
|
-
queries.forEach((query) => {
|
|
83913
|
-
queryParams += "&" + encodeURIComponent(channel) + "[" + slot + "][]=" + encodeURIComponent(query);
|
|
83914
|
-
});
|
|
83915
|
-
});
|
|
83916
|
-
});
|
|
83941
|
+
const queryParams = "project=" + encodedProject;
|
|
83917
83942
|
const url2 = this.config.endpointRealtime + "/realtime?" + queryParams;
|
|
83918
83943
|
if (url2 !== this.realtime.url || // Check if URL is present
|
|
83919
83944
|
!this.realtime.socket || // Check if WebSocket has not been created
|
|
@@ -83943,8 +83968,24 @@ var Client = class _Client {
|
|
|
83943
83968
|
this.realtime.createSocket();
|
|
83944
83969
|
}, timeout);
|
|
83945
83970
|
});
|
|
83971
|
+
} else if (((_e2 = this.realtime.socket) === null || _e2 === void 0 ? void 0 : _e2.readyState) === WebSocket.OPEN) {
|
|
83972
|
+
this.realtime.sendPendingSubscribes();
|
|
83946
83973
|
}
|
|
83947
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
|
+
},
|
|
83948
83989
|
onMessage: (event) => {
|
|
83949
83990
|
var _a3, _b;
|
|
83950
83991
|
try {
|
|
@@ -83953,17 +83994,6 @@ var Client = class _Client {
|
|
|
83953
83994
|
switch (message.type) {
|
|
83954
83995
|
case "connected": {
|
|
83955
83996
|
const messageData = message.data;
|
|
83956
|
-
if (messageData === null || messageData === void 0 ? void 0 : messageData.subscriptions) {
|
|
83957
|
-
this.realtime.slotToSubscriptionId.clear();
|
|
83958
|
-
this.realtime.subscriptionIdToSlot.clear();
|
|
83959
|
-
for (const [slotStr, subscriptionId] of Object.entries(messageData.subscriptions)) {
|
|
83960
|
-
const slot = Number(slotStr);
|
|
83961
|
-
if (!isNaN(slot) && typeof subscriptionId === "string") {
|
|
83962
|
-
this.realtime.slotToSubscriptionId.set(slot, subscriptionId);
|
|
83963
|
-
this.realtime.subscriptionIdToSlot.set(subscriptionId, slot);
|
|
83964
|
-
}
|
|
83965
|
-
}
|
|
83966
|
-
}
|
|
83967
83997
|
let session = this.config.session;
|
|
83968
83998
|
if (!session) {
|
|
83969
83999
|
const cookie = JSONbig.parse((_a3 = window.localStorage.getItem("cookieFallback")) !== null && _a3 !== void 0 ? _a3 : "{}");
|
|
@@ -83977,8 +84007,19 @@ var Client = class _Client {
|
|
|
83977
84007
|
}
|
|
83978
84008
|
}));
|
|
83979
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();
|
|
83980
84019
|
break;
|
|
83981
84020
|
}
|
|
84021
|
+
case "response":
|
|
84022
|
+
break;
|
|
83982
84023
|
case "event": {
|
|
83983
84024
|
const data = message.data;
|
|
83984
84025
|
if (!(data === null || data === void 0 ? void 0 : data.channels))
|
|
@@ -83986,12 +84027,9 @@ var Client = class _Client {
|
|
|
83986
84027
|
const eventSubIds = data.subscriptions;
|
|
83987
84028
|
if (eventSubIds && eventSubIds.length > 0) {
|
|
83988
84029
|
for (const subscriptionId of eventSubIds) {
|
|
83989
|
-
const
|
|
83990
|
-
if (
|
|
83991
|
-
|
|
83992
|
-
if (subscription) {
|
|
83993
|
-
setTimeout(() => subscription.callback(data));
|
|
83994
|
-
}
|
|
84030
|
+
const subscription = this.realtime.subscriptions.get(subscriptionId);
|
|
84031
|
+
if (subscription) {
|
|
84032
|
+
setTimeout(() => subscription.callback(data));
|
|
83995
84033
|
}
|
|
83996
84034
|
}
|
|
83997
84035
|
} else {
|
|
@@ -84017,29 +84055,6 @@ var Client = class _Client {
|
|
|
84017
84055
|
} catch (e) {
|
|
84018
84056
|
console.error(e);
|
|
84019
84057
|
}
|
|
84020
|
-
},
|
|
84021
|
-
cleanUp: (channels, queries) => {
|
|
84022
|
-
this.realtime.channels.forEach((channel) => {
|
|
84023
|
-
if (channels.includes(channel)) {
|
|
84024
|
-
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
84025
|
-
return subscription.channels.includes(channel);
|
|
84026
|
-
});
|
|
84027
|
-
if (!found) {
|
|
84028
|
-
this.realtime.channels.delete(channel);
|
|
84029
|
-
}
|
|
84030
|
-
}
|
|
84031
|
-
});
|
|
84032
|
-
this.realtime.queries.forEach((query) => {
|
|
84033
|
-
if (queries.includes(query)) {
|
|
84034
|
-
let found = Array.from(this.realtime.subscriptions).some(([_key, subscription]) => {
|
|
84035
|
-
var _a3;
|
|
84036
|
-
return (_a3 = subscription.queries) === null || _a3 === void 0 ? void 0 : _a3.includes(query);
|
|
84037
|
-
});
|
|
84038
|
-
if (!found) {
|
|
84039
|
-
this.realtime.queries.delete(query);
|
|
84040
|
-
}
|
|
84041
|
-
}
|
|
84042
|
-
});
|
|
84043
84058
|
}
|
|
84044
84059
|
};
|
|
84045
84060
|
}
|
|
@@ -84286,17 +84301,41 @@ var Client = class _Client {
|
|
|
84286
84301
|
});
|
|
84287
84302
|
channelStrings.forEach((channel) => this.realtime.channels.add(channel));
|
|
84288
84303
|
const queryStrings = (queries !== null && queries !== void 0 ? queries : []).map((q2) => typeof q2 === "string" ? q2 : q2.toString());
|
|
84289
|
-
|
|
84290
|
-
const
|
|
84291
|
-
|
|
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, {
|
|
84292
84317
|
channels: channelStrings,
|
|
84293
84318
|
queries: queryStrings,
|
|
84294
84319
|
callback
|
|
84295
84320
|
});
|
|
84321
|
+
this.realtime.pendingSubscribes.set(subscriptionId, {
|
|
84322
|
+
subscriptionId,
|
|
84323
|
+
channels: channelStrings,
|
|
84324
|
+
queries: queryStrings
|
|
84325
|
+
});
|
|
84296
84326
|
this.realtime.connect();
|
|
84297
84327
|
return () => {
|
|
84298
|
-
this.realtime.subscriptions.delete(
|
|
84299
|
-
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
|
+
});
|
|
84300
84339
|
this.realtime.connect();
|
|
84301
84340
|
};
|
|
84302
84341
|
}
|
|
@@ -93960,7 +93999,240 @@ var Project = class {
|
|
|
93960
93999
|
};
|
|
93961
94000
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
93962
94001
|
}
|
|
93963
|
-
|
|
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) {
|
|
93964
94236
|
let params;
|
|
93965
94237
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("protocolId" in paramsOrFirst || "enabled" in paramsOrFirst)) {
|
|
93966
94238
|
params = paramsOrFirst || {};
|
|
@@ -93978,7 +94250,7 @@ var Project = class {
|
|
|
93978
94250
|
if (typeof enabled === "undefined") {
|
|
93979
94251
|
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
93980
94252
|
}
|
|
93981
|
-
const apiPath = "/project/protocols/{protocolId}
|
|
94253
|
+
const apiPath = "/project/protocols/{protocolId}".replace("{protocolId}", protocolId);
|
|
93982
94254
|
const payload = {};
|
|
93983
94255
|
if (typeof enabled !== "undefined") {
|
|
93984
94256
|
payload["enabled"] = enabled;
|
|
@@ -93989,7 +94261,7 @@ var Project = class {
|
|
|
93989
94261
|
};
|
|
93990
94262
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
93991
94263
|
}
|
|
93992
|
-
|
|
94264
|
+
updateService(paramsOrFirst, ...rest) {
|
|
93993
94265
|
let params;
|
|
93994
94266
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && ("serviceId" in paramsOrFirst || "enabled" in paramsOrFirst)) {
|
|
93995
94267
|
params = paramsOrFirst || {};
|
|
@@ -94007,7 +94279,7 @@ var Project = class {
|
|
|
94007
94279
|
if (typeof enabled === "undefined") {
|
|
94008
94280
|
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94009
94281
|
}
|
|
94010
|
-
const apiPath = "/project/services/{serviceId}
|
|
94282
|
+
const apiPath = "/project/services/{serviceId}".replace("{serviceId}", serviceId);
|
|
94011
94283
|
const payload = {};
|
|
94012
94284
|
if (typeof enabled !== "undefined") {
|
|
94013
94285
|
payload["enabled"] = enabled;
|
|
@@ -94018,6 +94290,179 @@ var Project = class {
|
|
|
94018
94290
|
};
|
|
94019
94291
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94020
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
|
+
}
|
|
94021
94466
|
getUsage(paramsOrFirst, ...rest) {
|
|
94022
94467
|
let params;
|
|
94023
94468
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -94436,138 +94881,6 @@ var Projects = class {
|
|
|
94436
94881
|
};
|
|
94437
94882
|
return this.client.call("delete", uri, apiHeaders, payload);
|
|
94438
94883
|
}
|
|
94439
|
-
updateAuthDuration(paramsOrFirst, ...rest) {
|
|
94440
|
-
let params;
|
|
94441
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94442
|
-
params = paramsOrFirst || {};
|
|
94443
|
-
} else {
|
|
94444
|
-
params = {
|
|
94445
|
-
projectId: paramsOrFirst,
|
|
94446
|
-
duration: rest[0]
|
|
94447
|
-
};
|
|
94448
|
-
}
|
|
94449
|
-
const projectId = params.projectId;
|
|
94450
|
-
const duration3 = params.duration;
|
|
94451
|
-
if (typeof projectId === "undefined") {
|
|
94452
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94453
|
-
}
|
|
94454
|
-
if (typeof duration3 === "undefined") {
|
|
94455
|
-
throw new AppwriteException('Missing required parameter: "duration"');
|
|
94456
|
-
}
|
|
94457
|
-
const apiPath = "/projects/{projectId}/auth/duration".replace("{projectId}", projectId);
|
|
94458
|
-
const payload = {};
|
|
94459
|
-
if (typeof duration3 !== "undefined") {
|
|
94460
|
-
payload["duration"] = duration3;
|
|
94461
|
-
}
|
|
94462
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94463
|
-
const apiHeaders = {
|
|
94464
|
-
"content-type": "application/json"
|
|
94465
|
-
};
|
|
94466
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94467
|
-
}
|
|
94468
|
-
updateAuthLimit(paramsOrFirst, ...rest) {
|
|
94469
|
-
let params;
|
|
94470
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94471
|
-
params = paramsOrFirst || {};
|
|
94472
|
-
} else {
|
|
94473
|
-
params = {
|
|
94474
|
-
projectId: paramsOrFirst,
|
|
94475
|
-
limit: rest[0]
|
|
94476
|
-
};
|
|
94477
|
-
}
|
|
94478
|
-
const projectId = params.projectId;
|
|
94479
|
-
const limit = params.limit;
|
|
94480
|
-
if (typeof projectId === "undefined") {
|
|
94481
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94482
|
-
}
|
|
94483
|
-
if (typeof limit === "undefined") {
|
|
94484
|
-
throw new AppwriteException('Missing required parameter: "limit"');
|
|
94485
|
-
}
|
|
94486
|
-
const apiPath = "/projects/{projectId}/auth/limit".replace("{projectId}", projectId);
|
|
94487
|
-
const payload = {};
|
|
94488
|
-
if (typeof limit !== "undefined") {
|
|
94489
|
-
payload["limit"] = limit;
|
|
94490
|
-
}
|
|
94491
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94492
|
-
const apiHeaders = {
|
|
94493
|
-
"content-type": "application/json"
|
|
94494
|
-
};
|
|
94495
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94496
|
-
}
|
|
94497
|
-
updateAuthSessionsLimit(paramsOrFirst, ...rest) {
|
|
94498
|
-
let params;
|
|
94499
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94500
|
-
params = paramsOrFirst || {};
|
|
94501
|
-
} else {
|
|
94502
|
-
params = {
|
|
94503
|
-
projectId: paramsOrFirst,
|
|
94504
|
-
limit: rest[0]
|
|
94505
|
-
};
|
|
94506
|
-
}
|
|
94507
|
-
const projectId = params.projectId;
|
|
94508
|
-
const limit = params.limit;
|
|
94509
|
-
if (typeof projectId === "undefined") {
|
|
94510
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94511
|
-
}
|
|
94512
|
-
if (typeof limit === "undefined") {
|
|
94513
|
-
throw new AppwriteException('Missing required parameter: "limit"');
|
|
94514
|
-
}
|
|
94515
|
-
const apiPath = "/projects/{projectId}/auth/max-sessions".replace("{projectId}", projectId);
|
|
94516
|
-
const payload = {};
|
|
94517
|
-
if (typeof limit !== "undefined") {
|
|
94518
|
-
payload["limit"] = limit;
|
|
94519
|
-
}
|
|
94520
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94521
|
-
const apiHeaders = {
|
|
94522
|
-
"content-type": "application/json"
|
|
94523
|
-
};
|
|
94524
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94525
|
-
}
|
|
94526
|
-
updateMembershipsPrivacy(paramsOrFirst, ...rest) {
|
|
94527
|
-
let params;
|
|
94528
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94529
|
-
params = paramsOrFirst || {};
|
|
94530
|
-
} else {
|
|
94531
|
-
params = {
|
|
94532
|
-
projectId: paramsOrFirst,
|
|
94533
|
-
userName: rest[0],
|
|
94534
|
-
userEmail: rest[1],
|
|
94535
|
-
mfa: rest[2]
|
|
94536
|
-
};
|
|
94537
|
-
}
|
|
94538
|
-
const projectId = params.projectId;
|
|
94539
|
-
const userName = params.userName;
|
|
94540
|
-
const userEmail = params.userEmail;
|
|
94541
|
-
const mfa = params.mfa;
|
|
94542
|
-
if (typeof projectId === "undefined") {
|
|
94543
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94544
|
-
}
|
|
94545
|
-
if (typeof userName === "undefined") {
|
|
94546
|
-
throw new AppwriteException('Missing required parameter: "userName"');
|
|
94547
|
-
}
|
|
94548
|
-
if (typeof userEmail === "undefined") {
|
|
94549
|
-
throw new AppwriteException('Missing required parameter: "userEmail"');
|
|
94550
|
-
}
|
|
94551
|
-
if (typeof mfa === "undefined") {
|
|
94552
|
-
throw new AppwriteException('Missing required parameter: "mfa"');
|
|
94553
|
-
}
|
|
94554
|
-
const apiPath = "/projects/{projectId}/auth/memberships-privacy".replace("{projectId}", projectId);
|
|
94555
|
-
const payload = {};
|
|
94556
|
-
if (typeof userName !== "undefined") {
|
|
94557
|
-
payload["userName"] = userName;
|
|
94558
|
-
}
|
|
94559
|
-
if (typeof userEmail !== "undefined") {
|
|
94560
|
-
payload["userEmail"] = userEmail;
|
|
94561
|
-
}
|
|
94562
|
-
if (typeof mfa !== "undefined") {
|
|
94563
|
-
payload["mfa"] = mfa;
|
|
94564
|
-
}
|
|
94565
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94566
|
-
const apiHeaders = {
|
|
94567
|
-
"content-type": "application/json"
|
|
94568
|
-
};
|
|
94569
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94570
|
-
}
|
|
94571
94884
|
updateMockNumbers(paramsOrFirst, ...rest) {
|
|
94572
94885
|
let params;
|
|
94573
94886
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -94597,151 +94910,6 @@ var Projects = class {
|
|
|
94597
94910
|
};
|
|
94598
94911
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94599
94912
|
}
|
|
94600
|
-
updateAuthPasswordDictionary(paramsOrFirst, ...rest) {
|
|
94601
|
-
let params;
|
|
94602
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94603
|
-
params = paramsOrFirst || {};
|
|
94604
|
-
} else {
|
|
94605
|
-
params = {
|
|
94606
|
-
projectId: paramsOrFirst,
|
|
94607
|
-
enabled: rest[0]
|
|
94608
|
-
};
|
|
94609
|
-
}
|
|
94610
|
-
const projectId = params.projectId;
|
|
94611
|
-
const enabled = params.enabled;
|
|
94612
|
-
if (typeof projectId === "undefined") {
|
|
94613
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94614
|
-
}
|
|
94615
|
-
if (typeof enabled === "undefined") {
|
|
94616
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94617
|
-
}
|
|
94618
|
-
const apiPath = "/projects/{projectId}/auth/password-dictionary".replace("{projectId}", projectId);
|
|
94619
|
-
const payload = {};
|
|
94620
|
-
if (typeof enabled !== "undefined") {
|
|
94621
|
-
payload["enabled"] = enabled;
|
|
94622
|
-
}
|
|
94623
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94624
|
-
const apiHeaders = {
|
|
94625
|
-
"content-type": "application/json"
|
|
94626
|
-
};
|
|
94627
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94628
|
-
}
|
|
94629
|
-
updateAuthPasswordHistory(paramsOrFirst, ...rest) {
|
|
94630
|
-
let params;
|
|
94631
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94632
|
-
params = paramsOrFirst || {};
|
|
94633
|
-
} else {
|
|
94634
|
-
params = {
|
|
94635
|
-
projectId: paramsOrFirst,
|
|
94636
|
-
limit: rest[0]
|
|
94637
|
-
};
|
|
94638
|
-
}
|
|
94639
|
-
const projectId = params.projectId;
|
|
94640
|
-
const limit = params.limit;
|
|
94641
|
-
if (typeof projectId === "undefined") {
|
|
94642
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94643
|
-
}
|
|
94644
|
-
if (typeof limit === "undefined") {
|
|
94645
|
-
throw new AppwriteException('Missing required parameter: "limit"');
|
|
94646
|
-
}
|
|
94647
|
-
const apiPath = "/projects/{projectId}/auth/password-history".replace("{projectId}", projectId);
|
|
94648
|
-
const payload = {};
|
|
94649
|
-
if (typeof limit !== "undefined") {
|
|
94650
|
-
payload["limit"] = limit;
|
|
94651
|
-
}
|
|
94652
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94653
|
-
const apiHeaders = {
|
|
94654
|
-
"content-type": "application/json"
|
|
94655
|
-
};
|
|
94656
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94657
|
-
}
|
|
94658
|
-
updatePersonalDataCheck(paramsOrFirst, ...rest) {
|
|
94659
|
-
let params;
|
|
94660
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94661
|
-
params = paramsOrFirst || {};
|
|
94662
|
-
} else {
|
|
94663
|
-
params = {
|
|
94664
|
-
projectId: paramsOrFirst,
|
|
94665
|
-
enabled: rest[0]
|
|
94666
|
-
};
|
|
94667
|
-
}
|
|
94668
|
-
const projectId = params.projectId;
|
|
94669
|
-
const enabled = params.enabled;
|
|
94670
|
-
if (typeof projectId === "undefined") {
|
|
94671
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94672
|
-
}
|
|
94673
|
-
if (typeof enabled === "undefined") {
|
|
94674
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94675
|
-
}
|
|
94676
|
-
const apiPath = "/projects/{projectId}/auth/personal-data".replace("{projectId}", projectId);
|
|
94677
|
-
const payload = {};
|
|
94678
|
-
if (typeof enabled !== "undefined") {
|
|
94679
|
-
payload["enabled"] = enabled;
|
|
94680
|
-
}
|
|
94681
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94682
|
-
const apiHeaders = {
|
|
94683
|
-
"content-type": "application/json"
|
|
94684
|
-
};
|
|
94685
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94686
|
-
}
|
|
94687
|
-
updateSessionAlerts(paramsOrFirst, ...rest) {
|
|
94688
|
-
let params;
|
|
94689
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94690
|
-
params = paramsOrFirst || {};
|
|
94691
|
-
} else {
|
|
94692
|
-
params = {
|
|
94693
|
-
projectId: paramsOrFirst,
|
|
94694
|
-
alerts: rest[0]
|
|
94695
|
-
};
|
|
94696
|
-
}
|
|
94697
|
-
const projectId = params.projectId;
|
|
94698
|
-
const alerts = params.alerts;
|
|
94699
|
-
if (typeof projectId === "undefined") {
|
|
94700
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94701
|
-
}
|
|
94702
|
-
if (typeof alerts === "undefined") {
|
|
94703
|
-
throw new AppwriteException('Missing required parameter: "alerts"');
|
|
94704
|
-
}
|
|
94705
|
-
const apiPath = "/projects/{projectId}/auth/session-alerts".replace("{projectId}", projectId);
|
|
94706
|
-
const payload = {};
|
|
94707
|
-
if (typeof alerts !== "undefined") {
|
|
94708
|
-
payload["alerts"] = alerts;
|
|
94709
|
-
}
|
|
94710
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94711
|
-
const apiHeaders = {
|
|
94712
|
-
"content-type": "application/json"
|
|
94713
|
-
};
|
|
94714
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94715
|
-
}
|
|
94716
|
-
updateSessionInvalidation(paramsOrFirst, ...rest) {
|
|
94717
|
-
let params;
|
|
94718
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
94719
|
-
params = paramsOrFirst || {};
|
|
94720
|
-
} else {
|
|
94721
|
-
params = {
|
|
94722
|
-
projectId: paramsOrFirst,
|
|
94723
|
-
enabled: rest[0]
|
|
94724
|
-
};
|
|
94725
|
-
}
|
|
94726
|
-
const projectId = params.projectId;
|
|
94727
|
-
const enabled = params.enabled;
|
|
94728
|
-
if (typeof projectId === "undefined") {
|
|
94729
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
94730
|
-
}
|
|
94731
|
-
if (typeof enabled === "undefined") {
|
|
94732
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
94733
|
-
}
|
|
94734
|
-
const apiPath = "/projects/{projectId}/auth/session-invalidation".replace("{projectId}", projectId);
|
|
94735
|
-
const payload = {};
|
|
94736
|
-
if (typeof enabled !== "undefined") {
|
|
94737
|
-
payload["enabled"] = enabled;
|
|
94738
|
-
}
|
|
94739
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
94740
|
-
const apiHeaders = {
|
|
94741
|
-
"content-type": "application/json"
|
|
94742
|
-
};
|
|
94743
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
94744
|
-
}
|
|
94745
94913
|
updateAuthStatus(paramsOrFirst, ...rest) {
|
|
94746
94914
|
let params;
|
|
94747
94915
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -95136,300 +95304,6 @@ var Projects = class {
|
|
|
95136
95304
|
const apiHeaders = {};
|
|
95137
95305
|
return this.client.call("get", uri, apiHeaders, payload);
|
|
95138
95306
|
}
|
|
95139
|
-
updateSmtp(paramsOrFirst, ...rest) {
|
|
95140
|
-
let params;
|
|
95141
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95142
|
-
params = paramsOrFirst || {};
|
|
95143
|
-
} else {
|
|
95144
|
-
params = {
|
|
95145
|
-
projectId: paramsOrFirst,
|
|
95146
|
-
enabled: rest[0],
|
|
95147
|
-
senderName: rest[1],
|
|
95148
|
-
senderEmail: rest[2],
|
|
95149
|
-
replyTo: rest[3],
|
|
95150
|
-
host: rest[4],
|
|
95151
|
-
port: rest[5],
|
|
95152
|
-
username: rest[6],
|
|
95153
|
-
password: rest[7],
|
|
95154
|
-
secure: rest[8]
|
|
95155
|
-
};
|
|
95156
|
-
}
|
|
95157
|
-
const projectId = params.projectId;
|
|
95158
|
-
const enabled = params.enabled;
|
|
95159
|
-
const senderName = params.senderName;
|
|
95160
|
-
const senderEmail = params.senderEmail;
|
|
95161
|
-
const replyTo = params.replyTo;
|
|
95162
|
-
const host = params.host;
|
|
95163
|
-
const port = params.port;
|
|
95164
|
-
const username = params.username;
|
|
95165
|
-
const password = params.password;
|
|
95166
|
-
const secure = params.secure;
|
|
95167
|
-
if (typeof projectId === "undefined") {
|
|
95168
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95169
|
-
}
|
|
95170
|
-
if (typeof enabled === "undefined") {
|
|
95171
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
95172
|
-
}
|
|
95173
|
-
const apiPath = "/projects/{projectId}/smtp".replace("{projectId}", projectId);
|
|
95174
|
-
const payload = {};
|
|
95175
|
-
if (typeof enabled !== "undefined") {
|
|
95176
|
-
payload["enabled"] = enabled;
|
|
95177
|
-
}
|
|
95178
|
-
if (typeof senderName !== "undefined") {
|
|
95179
|
-
payload["senderName"] = senderName;
|
|
95180
|
-
}
|
|
95181
|
-
if (typeof senderEmail !== "undefined") {
|
|
95182
|
-
payload["senderEmail"] = senderEmail;
|
|
95183
|
-
}
|
|
95184
|
-
if (typeof replyTo !== "undefined") {
|
|
95185
|
-
payload["replyTo"] = replyTo;
|
|
95186
|
-
}
|
|
95187
|
-
if (typeof host !== "undefined") {
|
|
95188
|
-
payload["host"] = host;
|
|
95189
|
-
}
|
|
95190
|
-
if (typeof port !== "undefined") {
|
|
95191
|
-
payload["port"] = port;
|
|
95192
|
-
}
|
|
95193
|
-
if (typeof username !== "undefined") {
|
|
95194
|
-
payload["username"] = username;
|
|
95195
|
-
}
|
|
95196
|
-
if (typeof password !== "undefined") {
|
|
95197
|
-
payload["password"] = password;
|
|
95198
|
-
}
|
|
95199
|
-
if (typeof secure !== "undefined") {
|
|
95200
|
-
payload["secure"] = secure;
|
|
95201
|
-
}
|
|
95202
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95203
|
-
const apiHeaders = {
|
|
95204
|
-
"content-type": "application/json"
|
|
95205
|
-
};
|
|
95206
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95207
|
-
}
|
|
95208
|
-
updateSMTP(paramsOrFirst, ...rest) {
|
|
95209
|
-
let params;
|
|
95210
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95211
|
-
params = paramsOrFirst || {};
|
|
95212
|
-
} else {
|
|
95213
|
-
params = {
|
|
95214
|
-
projectId: paramsOrFirst,
|
|
95215
|
-
enabled: rest[0],
|
|
95216
|
-
senderName: rest[1],
|
|
95217
|
-
senderEmail: rest[2],
|
|
95218
|
-
replyTo: rest[3],
|
|
95219
|
-
host: rest[4],
|
|
95220
|
-
port: rest[5],
|
|
95221
|
-
username: rest[6],
|
|
95222
|
-
password: rest[7],
|
|
95223
|
-
secure: rest[8]
|
|
95224
|
-
};
|
|
95225
|
-
}
|
|
95226
|
-
const projectId = params.projectId;
|
|
95227
|
-
const enabled = params.enabled;
|
|
95228
|
-
const senderName = params.senderName;
|
|
95229
|
-
const senderEmail = params.senderEmail;
|
|
95230
|
-
const replyTo = params.replyTo;
|
|
95231
|
-
const host = params.host;
|
|
95232
|
-
const port = params.port;
|
|
95233
|
-
const username = params.username;
|
|
95234
|
-
const password = params.password;
|
|
95235
|
-
const secure = params.secure;
|
|
95236
|
-
if (typeof projectId === "undefined") {
|
|
95237
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95238
|
-
}
|
|
95239
|
-
if (typeof enabled === "undefined") {
|
|
95240
|
-
throw new AppwriteException('Missing required parameter: "enabled"');
|
|
95241
|
-
}
|
|
95242
|
-
const apiPath = "/projects/{projectId}/smtp".replace("{projectId}", projectId);
|
|
95243
|
-
const payload = {};
|
|
95244
|
-
if (typeof enabled !== "undefined") {
|
|
95245
|
-
payload["enabled"] = enabled;
|
|
95246
|
-
}
|
|
95247
|
-
if (typeof senderName !== "undefined") {
|
|
95248
|
-
payload["senderName"] = senderName;
|
|
95249
|
-
}
|
|
95250
|
-
if (typeof senderEmail !== "undefined") {
|
|
95251
|
-
payload["senderEmail"] = senderEmail;
|
|
95252
|
-
}
|
|
95253
|
-
if (typeof replyTo !== "undefined") {
|
|
95254
|
-
payload["replyTo"] = replyTo;
|
|
95255
|
-
}
|
|
95256
|
-
if (typeof host !== "undefined") {
|
|
95257
|
-
payload["host"] = host;
|
|
95258
|
-
}
|
|
95259
|
-
if (typeof port !== "undefined") {
|
|
95260
|
-
payload["port"] = port;
|
|
95261
|
-
}
|
|
95262
|
-
if (typeof username !== "undefined") {
|
|
95263
|
-
payload["username"] = username;
|
|
95264
|
-
}
|
|
95265
|
-
if (typeof password !== "undefined") {
|
|
95266
|
-
payload["password"] = password;
|
|
95267
|
-
}
|
|
95268
|
-
if (typeof secure !== "undefined") {
|
|
95269
|
-
payload["secure"] = secure;
|
|
95270
|
-
}
|
|
95271
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95272
|
-
const apiHeaders = {
|
|
95273
|
-
"content-type": "application/json"
|
|
95274
|
-
};
|
|
95275
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95276
|
-
}
|
|
95277
|
-
createSmtpTest(paramsOrFirst, ...rest) {
|
|
95278
|
-
let params;
|
|
95279
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95280
|
-
params = paramsOrFirst || {};
|
|
95281
|
-
} else {
|
|
95282
|
-
params = {
|
|
95283
|
-
projectId: paramsOrFirst,
|
|
95284
|
-
emails: rest[0],
|
|
95285
|
-
senderName: rest[1],
|
|
95286
|
-
senderEmail: rest[2],
|
|
95287
|
-
host: rest[3],
|
|
95288
|
-
replyTo: rest[4],
|
|
95289
|
-
port: rest[5],
|
|
95290
|
-
username: rest[6],
|
|
95291
|
-
password: rest[7],
|
|
95292
|
-
secure: rest[8]
|
|
95293
|
-
};
|
|
95294
|
-
}
|
|
95295
|
-
const projectId = params.projectId;
|
|
95296
|
-
const emails = params.emails;
|
|
95297
|
-
const senderName = params.senderName;
|
|
95298
|
-
const senderEmail = params.senderEmail;
|
|
95299
|
-
const host = params.host;
|
|
95300
|
-
const replyTo = params.replyTo;
|
|
95301
|
-
const port = params.port;
|
|
95302
|
-
const username = params.username;
|
|
95303
|
-
const password = params.password;
|
|
95304
|
-
const secure = params.secure;
|
|
95305
|
-
if (typeof projectId === "undefined") {
|
|
95306
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95307
|
-
}
|
|
95308
|
-
if (typeof emails === "undefined") {
|
|
95309
|
-
throw new AppwriteException('Missing required parameter: "emails"');
|
|
95310
|
-
}
|
|
95311
|
-
if (typeof senderName === "undefined") {
|
|
95312
|
-
throw new AppwriteException('Missing required parameter: "senderName"');
|
|
95313
|
-
}
|
|
95314
|
-
if (typeof senderEmail === "undefined") {
|
|
95315
|
-
throw new AppwriteException('Missing required parameter: "senderEmail"');
|
|
95316
|
-
}
|
|
95317
|
-
if (typeof host === "undefined") {
|
|
95318
|
-
throw new AppwriteException('Missing required parameter: "host"');
|
|
95319
|
-
}
|
|
95320
|
-
const apiPath = "/projects/{projectId}/smtp/tests".replace("{projectId}", projectId);
|
|
95321
|
-
const payload = {};
|
|
95322
|
-
if (typeof emails !== "undefined") {
|
|
95323
|
-
payload["emails"] = emails;
|
|
95324
|
-
}
|
|
95325
|
-
if (typeof senderName !== "undefined") {
|
|
95326
|
-
payload["senderName"] = senderName;
|
|
95327
|
-
}
|
|
95328
|
-
if (typeof senderEmail !== "undefined") {
|
|
95329
|
-
payload["senderEmail"] = senderEmail;
|
|
95330
|
-
}
|
|
95331
|
-
if (typeof replyTo !== "undefined") {
|
|
95332
|
-
payload["replyTo"] = replyTo;
|
|
95333
|
-
}
|
|
95334
|
-
if (typeof host !== "undefined") {
|
|
95335
|
-
payload["host"] = host;
|
|
95336
|
-
}
|
|
95337
|
-
if (typeof port !== "undefined") {
|
|
95338
|
-
payload["port"] = port;
|
|
95339
|
-
}
|
|
95340
|
-
if (typeof username !== "undefined") {
|
|
95341
|
-
payload["username"] = username;
|
|
95342
|
-
}
|
|
95343
|
-
if (typeof password !== "undefined") {
|
|
95344
|
-
payload["password"] = password;
|
|
95345
|
-
}
|
|
95346
|
-
if (typeof secure !== "undefined") {
|
|
95347
|
-
payload["secure"] = secure;
|
|
95348
|
-
}
|
|
95349
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95350
|
-
const apiHeaders = {
|
|
95351
|
-
"content-type": "application/json"
|
|
95352
|
-
};
|
|
95353
|
-
return this.client.call("post", uri, apiHeaders, payload);
|
|
95354
|
-
}
|
|
95355
|
-
createSMTPTest(paramsOrFirst, ...rest) {
|
|
95356
|
-
let params;
|
|
95357
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95358
|
-
params = paramsOrFirst || {};
|
|
95359
|
-
} else {
|
|
95360
|
-
params = {
|
|
95361
|
-
projectId: paramsOrFirst,
|
|
95362
|
-
emails: rest[0],
|
|
95363
|
-
senderName: rest[1],
|
|
95364
|
-
senderEmail: rest[2],
|
|
95365
|
-
host: rest[3],
|
|
95366
|
-
replyTo: rest[4],
|
|
95367
|
-
port: rest[5],
|
|
95368
|
-
username: rest[6],
|
|
95369
|
-
password: rest[7],
|
|
95370
|
-
secure: rest[8]
|
|
95371
|
-
};
|
|
95372
|
-
}
|
|
95373
|
-
const projectId = params.projectId;
|
|
95374
|
-
const emails = params.emails;
|
|
95375
|
-
const senderName = params.senderName;
|
|
95376
|
-
const senderEmail = params.senderEmail;
|
|
95377
|
-
const host = params.host;
|
|
95378
|
-
const replyTo = params.replyTo;
|
|
95379
|
-
const port = params.port;
|
|
95380
|
-
const username = params.username;
|
|
95381
|
-
const password = params.password;
|
|
95382
|
-
const secure = params.secure;
|
|
95383
|
-
if (typeof projectId === "undefined") {
|
|
95384
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95385
|
-
}
|
|
95386
|
-
if (typeof emails === "undefined") {
|
|
95387
|
-
throw new AppwriteException('Missing required parameter: "emails"');
|
|
95388
|
-
}
|
|
95389
|
-
if (typeof senderName === "undefined") {
|
|
95390
|
-
throw new AppwriteException('Missing required parameter: "senderName"');
|
|
95391
|
-
}
|
|
95392
|
-
if (typeof senderEmail === "undefined") {
|
|
95393
|
-
throw new AppwriteException('Missing required parameter: "senderEmail"');
|
|
95394
|
-
}
|
|
95395
|
-
if (typeof host === "undefined") {
|
|
95396
|
-
throw new AppwriteException('Missing required parameter: "host"');
|
|
95397
|
-
}
|
|
95398
|
-
const apiPath = "/projects/{projectId}/smtp/tests".replace("{projectId}", projectId);
|
|
95399
|
-
const payload = {};
|
|
95400
|
-
if (typeof emails !== "undefined") {
|
|
95401
|
-
payload["emails"] = emails;
|
|
95402
|
-
}
|
|
95403
|
-
if (typeof senderName !== "undefined") {
|
|
95404
|
-
payload["senderName"] = senderName;
|
|
95405
|
-
}
|
|
95406
|
-
if (typeof senderEmail !== "undefined") {
|
|
95407
|
-
payload["senderEmail"] = senderEmail;
|
|
95408
|
-
}
|
|
95409
|
-
if (typeof replyTo !== "undefined") {
|
|
95410
|
-
payload["replyTo"] = replyTo;
|
|
95411
|
-
}
|
|
95412
|
-
if (typeof host !== "undefined") {
|
|
95413
|
-
payload["host"] = host;
|
|
95414
|
-
}
|
|
95415
|
-
if (typeof port !== "undefined") {
|
|
95416
|
-
payload["port"] = port;
|
|
95417
|
-
}
|
|
95418
|
-
if (typeof username !== "undefined") {
|
|
95419
|
-
payload["username"] = username;
|
|
95420
|
-
}
|
|
95421
|
-
if (typeof password !== "undefined") {
|
|
95422
|
-
payload["password"] = password;
|
|
95423
|
-
}
|
|
95424
|
-
if (typeof secure !== "undefined") {
|
|
95425
|
-
payload["secure"] = secure;
|
|
95426
|
-
}
|
|
95427
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95428
|
-
const apiHeaders = {
|
|
95429
|
-
"content-type": "application/json"
|
|
95430
|
-
};
|
|
95431
|
-
return this.client.call("post", uri, apiHeaders, payload);
|
|
95432
|
-
}
|
|
95433
95307
|
updateStatus(paramsOrFirst, ...rest) {
|
|
95434
95308
|
let params;
|
|
95435
95309
|
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
@@ -95488,326 +95362,6 @@ var Projects = class {
|
|
|
95488
95362
|
};
|
|
95489
95363
|
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95490
95364
|
}
|
|
95491
|
-
getEmailTemplate(paramsOrFirst, ...rest) {
|
|
95492
|
-
let params;
|
|
95493
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95494
|
-
params = paramsOrFirst || {};
|
|
95495
|
-
} else {
|
|
95496
|
-
params = {
|
|
95497
|
-
projectId: paramsOrFirst,
|
|
95498
|
-
type: rest[0],
|
|
95499
|
-
locale: rest[1]
|
|
95500
|
-
};
|
|
95501
|
-
}
|
|
95502
|
-
const projectId = params.projectId;
|
|
95503
|
-
const type = params.type;
|
|
95504
|
-
const locale = params.locale;
|
|
95505
|
-
if (typeof projectId === "undefined") {
|
|
95506
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95507
|
-
}
|
|
95508
|
-
if (typeof type === "undefined") {
|
|
95509
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95510
|
-
}
|
|
95511
|
-
if (typeof locale === "undefined") {
|
|
95512
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95513
|
-
}
|
|
95514
|
-
const apiPath = "/projects/{projectId}/templates/email/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95515
|
-
const payload = {};
|
|
95516
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95517
|
-
const apiHeaders = {};
|
|
95518
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
95519
|
-
}
|
|
95520
|
-
updateEmailTemplate(paramsOrFirst, ...rest) {
|
|
95521
|
-
let params;
|
|
95522
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95523
|
-
params = paramsOrFirst || {};
|
|
95524
|
-
} else {
|
|
95525
|
-
params = {
|
|
95526
|
-
projectId: paramsOrFirst,
|
|
95527
|
-
type: rest[0],
|
|
95528
|
-
locale: rest[1],
|
|
95529
|
-
subject: rest[2],
|
|
95530
|
-
message: rest[3],
|
|
95531
|
-
senderName: rest[4],
|
|
95532
|
-
senderEmail: rest[5],
|
|
95533
|
-
replyTo: rest[6]
|
|
95534
|
-
};
|
|
95535
|
-
}
|
|
95536
|
-
const projectId = params.projectId;
|
|
95537
|
-
const type = params.type;
|
|
95538
|
-
const locale = params.locale;
|
|
95539
|
-
const subject = params.subject;
|
|
95540
|
-
const message = params.message;
|
|
95541
|
-
const senderName = params.senderName;
|
|
95542
|
-
const senderEmail = params.senderEmail;
|
|
95543
|
-
const replyTo = params.replyTo;
|
|
95544
|
-
if (typeof projectId === "undefined") {
|
|
95545
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95546
|
-
}
|
|
95547
|
-
if (typeof type === "undefined") {
|
|
95548
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95549
|
-
}
|
|
95550
|
-
if (typeof locale === "undefined") {
|
|
95551
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95552
|
-
}
|
|
95553
|
-
if (typeof subject === "undefined") {
|
|
95554
|
-
throw new AppwriteException('Missing required parameter: "subject"');
|
|
95555
|
-
}
|
|
95556
|
-
if (typeof message === "undefined") {
|
|
95557
|
-
throw new AppwriteException('Missing required parameter: "message"');
|
|
95558
|
-
}
|
|
95559
|
-
const apiPath = "/projects/{projectId}/templates/email/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95560
|
-
const payload = {};
|
|
95561
|
-
if (typeof subject !== "undefined") {
|
|
95562
|
-
payload["subject"] = subject;
|
|
95563
|
-
}
|
|
95564
|
-
if (typeof message !== "undefined") {
|
|
95565
|
-
payload["message"] = message;
|
|
95566
|
-
}
|
|
95567
|
-
if (typeof senderName !== "undefined") {
|
|
95568
|
-
payload["senderName"] = senderName;
|
|
95569
|
-
}
|
|
95570
|
-
if (typeof senderEmail !== "undefined") {
|
|
95571
|
-
payload["senderEmail"] = senderEmail;
|
|
95572
|
-
}
|
|
95573
|
-
if (typeof replyTo !== "undefined") {
|
|
95574
|
-
payload["replyTo"] = replyTo;
|
|
95575
|
-
}
|
|
95576
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95577
|
-
const apiHeaders = {
|
|
95578
|
-
"content-type": "application/json"
|
|
95579
|
-
};
|
|
95580
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95581
|
-
}
|
|
95582
|
-
deleteEmailTemplate(paramsOrFirst, ...rest) {
|
|
95583
|
-
let params;
|
|
95584
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95585
|
-
params = paramsOrFirst || {};
|
|
95586
|
-
} else {
|
|
95587
|
-
params = {
|
|
95588
|
-
projectId: paramsOrFirst,
|
|
95589
|
-
type: rest[0],
|
|
95590
|
-
locale: rest[1]
|
|
95591
|
-
};
|
|
95592
|
-
}
|
|
95593
|
-
const projectId = params.projectId;
|
|
95594
|
-
const type = params.type;
|
|
95595
|
-
const locale = params.locale;
|
|
95596
|
-
if (typeof projectId === "undefined") {
|
|
95597
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95598
|
-
}
|
|
95599
|
-
if (typeof type === "undefined") {
|
|
95600
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95601
|
-
}
|
|
95602
|
-
if (typeof locale === "undefined") {
|
|
95603
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95604
|
-
}
|
|
95605
|
-
const apiPath = "/projects/{projectId}/templates/email/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95606
|
-
const payload = {};
|
|
95607
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95608
|
-
const apiHeaders = {
|
|
95609
|
-
"content-type": "application/json"
|
|
95610
|
-
};
|
|
95611
|
-
return this.client.call("delete", uri, apiHeaders, payload);
|
|
95612
|
-
}
|
|
95613
|
-
getSmsTemplate(paramsOrFirst, ...rest) {
|
|
95614
|
-
let params;
|
|
95615
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95616
|
-
params = paramsOrFirst || {};
|
|
95617
|
-
} else {
|
|
95618
|
-
params = {
|
|
95619
|
-
projectId: paramsOrFirst,
|
|
95620
|
-
type: rest[0],
|
|
95621
|
-
locale: rest[1]
|
|
95622
|
-
};
|
|
95623
|
-
}
|
|
95624
|
-
const projectId = params.projectId;
|
|
95625
|
-
const type = params.type;
|
|
95626
|
-
const locale = params.locale;
|
|
95627
|
-
if (typeof projectId === "undefined") {
|
|
95628
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95629
|
-
}
|
|
95630
|
-
if (typeof type === "undefined") {
|
|
95631
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95632
|
-
}
|
|
95633
|
-
if (typeof locale === "undefined") {
|
|
95634
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95635
|
-
}
|
|
95636
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95637
|
-
const payload = {};
|
|
95638
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95639
|
-
const apiHeaders = {};
|
|
95640
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
95641
|
-
}
|
|
95642
|
-
getSMSTemplate(paramsOrFirst, ...rest) {
|
|
95643
|
-
let params;
|
|
95644
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95645
|
-
params = paramsOrFirst || {};
|
|
95646
|
-
} else {
|
|
95647
|
-
params = {
|
|
95648
|
-
projectId: paramsOrFirst,
|
|
95649
|
-
type: rest[0],
|
|
95650
|
-
locale: rest[1]
|
|
95651
|
-
};
|
|
95652
|
-
}
|
|
95653
|
-
const projectId = params.projectId;
|
|
95654
|
-
const type = params.type;
|
|
95655
|
-
const locale = params.locale;
|
|
95656
|
-
if (typeof projectId === "undefined") {
|
|
95657
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95658
|
-
}
|
|
95659
|
-
if (typeof type === "undefined") {
|
|
95660
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95661
|
-
}
|
|
95662
|
-
if (typeof locale === "undefined") {
|
|
95663
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95664
|
-
}
|
|
95665
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95666
|
-
const payload = {};
|
|
95667
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95668
|
-
const apiHeaders = {};
|
|
95669
|
-
return this.client.call("get", uri, apiHeaders, payload);
|
|
95670
|
-
}
|
|
95671
|
-
updateSmsTemplate(paramsOrFirst, ...rest) {
|
|
95672
|
-
let params;
|
|
95673
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95674
|
-
params = paramsOrFirst || {};
|
|
95675
|
-
} else {
|
|
95676
|
-
params = {
|
|
95677
|
-
projectId: paramsOrFirst,
|
|
95678
|
-
type: rest[0],
|
|
95679
|
-
locale: rest[1],
|
|
95680
|
-
message: rest[2]
|
|
95681
|
-
};
|
|
95682
|
-
}
|
|
95683
|
-
const projectId = params.projectId;
|
|
95684
|
-
const type = params.type;
|
|
95685
|
-
const locale = params.locale;
|
|
95686
|
-
const message = params.message;
|
|
95687
|
-
if (typeof projectId === "undefined") {
|
|
95688
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95689
|
-
}
|
|
95690
|
-
if (typeof type === "undefined") {
|
|
95691
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95692
|
-
}
|
|
95693
|
-
if (typeof locale === "undefined") {
|
|
95694
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95695
|
-
}
|
|
95696
|
-
if (typeof message === "undefined") {
|
|
95697
|
-
throw new AppwriteException('Missing required parameter: "message"');
|
|
95698
|
-
}
|
|
95699
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95700
|
-
const payload = {};
|
|
95701
|
-
if (typeof message !== "undefined") {
|
|
95702
|
-
payload["message"] = message;
|
|
95703
|
-
}
|
|
95704
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95705
|
-
const apiHeaders = {
|
|
95706
|
-
"content-type": "application/json"
|
|
95707
|
-
};
|
|
95708
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95709
|
-
}
|
|
95710
|
-
updateSMSTemplate(paramsOrFirst, ...rest) {
|
|
95711
|
-
let params;
|
|
95712
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95713
|
-
params = paramsOrFirst || {};
|
|
95714
|
-
} else {
|
|
95715
|
-
params = {
|
|
95716
|
-
projectId: paramsOrFirst,
|
|
95717
|
-
type: rest[0],
|
|
95718
|
-
locale: rest[1],
|
|
95719
|
-
message: rest[2]
|
|
95720
|
-
};
|
|
95721
|
-
}
|
|
95722
|
-
const projectId = params.projectId;
|
|
95723
|
-
const type = params.type;
|
|
95724
|
-
const locale = params.locale;
|
|
95725
|
-
const message = params.message;
|
|
95726
|
-
if (typeof projectId === "undefined") {
|
|
95727
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95728
|
-
}
|
|
95729
|
-
if (typeof type === "undefined") {
|
|
95730
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95731
|
-
}
|
|
95732
|
-
if (typeof locale === "undefined") {
|
|
95733
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95734
|
-
}
|
|
95735
|
-
if (typeof message === "undefined") {
|
|
95736
|
-
throw new AppwriteException('Missing required parameter: "message"');
|
|
95737
|
-
}
|
|
95738
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95739
|
-
const payload = {};
|
|
95740
|
-
if (typeof message !== "undefined") {
|
|
95741
|
-
payload["message"] = message;
|
|
95742
|
-
}
|
|
95743
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95744
|
-
const apiHeaders = {
|
|
95745
|
-
"content-type": "application/json"
|
|
95746
|
-
};
|
|
95747
|
-
return this.client.call("patch", uri, apiHeaders, payload);
|
|
95748
|
-
}
|
|
95749
|
-
deleteSmsTemplate(paramsOrFirst, ...rest) {
|
|
95750
|
-
let params;
|
|
95751
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95752
|
-
params = paramsOrFirst || {};
|
|
95753
|
-
} else {
|
|
95754
|
-
params = {
|
|
95755
|
-
projectId: paramsOrFirst,
|
|
95756
|
-
type: rest[0],
|
|
95757
|
-
locale: rest[1]
|
|
95758
|
-
};
|
|
95759
|
-
}
|
|
95760
|
-
const projectId = params.projectId;
|
|
95761
|
-
const type = params.type;
|
|
95762
|
-
const locale = params.locale;
|
|
95763
|
-
if (typeof projectId === "undefined") {
|
|
95764
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95765
|
-
}
|
|
95766
|
-
if (typeof type === "undefined") {
|
|
95767
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95768
|
-
}
|
|
95769
|
-
if (typeof locale === "undefined") {
|
|
95770
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95771
|
-
}
|
|
95772
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95773
|
-
const payload = {};
|
|
95774
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95775
|
-
const apiHeaders = {
|
|
95776
|
-
"content-type": "application/json"
|
|
95777
|
-
};
|
|
95778
|
-
return this.client.call("delete", uri, apiHeaders, payload);
|
|
95779
|
-
}
|
|
95780
|
-
deleteSMSTemplate(paramsOrFirst, ...rest) {
|
|
95781
|
-
let params;
|
|
95782
|
-
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
95783
|
-
params = paramsOrFirst || {};
|
|
95784
|
-
} else {
|
|
95785
|
-
params = {
|
|
95786
|
-
projectId: paramsOrFirst,
|
|
95787
|
-
type: rest[0],
|
|
95788
|
-
locale: rest[1]
|
|
95789
|
-
};
|
|
95790
|
-
}
|
|
95791
|
-
const projectId = params.projectId;
|
|
95792
|
-
const type = params.type;
|
|
95793
|
-
const locale = params.locale;
|
|
95794
|
-
if (typeof projectId === "undefined") {
|
|
95795
|
-
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
95796
|
-
}
|
|
95797
|
-
if (typeof type === "undefined") {
|
|
95798
|
-
throw new AppwriteException('Missing required parameter: "type"');
|
|
95799
|
-
}
|
|
95800
|
-
if (typeof locale === "undefined") {
|
|
95801
|
-
throw new AppwriteException('Missing required parameter: "locale"');
|
|
95802
|
-
}
|
|
95803
|
-
const apiPath = "/projects/{projectId}/templates/sms/{type}/{locale}".replace("{projectId}", projectId).replace("{type}", type).replace("{locale}", locale);
|
|
95804
|
-
const payload = {};
|
|
95805
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
95806
|
-
const apiHeaders = {
|
|
95807
|
-
"content-type": "application/json"
|
|
95808
|
-
};
|
|
95809
|
-
return this.client.call("delete", uri, apiHeaders, payload);
|
|
95810
|
-
}
|
|
95811
95365
|
};
|
|
95812
95366
|
var Proxy2 = class {
|
|
95813
95367
|
constructor(client) {
|
|
@@ -101608,41 +101162,6 @@ Permission.update = (role) => {
|
|
|
101608
101162
|
Permission.delete = (role) => {
|
|
101609
101163
|
return `delete("${role}")`;
|
|
101610
101164
|
};
|
|
101611
|
-
var _a2;
|
|
101612
|
-
var _ID_hexTimestamp;
|
|
101613
|
-
var ID2 = class {
|
|
101614
|
-
/**
|
|
101615
|
-
* Uses the provided ID as the ID for the resource.
|
|
101616
|
-
*
|
|
101617
|
-
* @param {string} id
|
|
101618
|
-
* @returns {string}
|
|
101619
|
-
*/
|
|
101620
|
-
static custom(id) {
|
|
101621
|
-
return id;
|
|
101622
|
-
}
|
|
101623
|
-
/**
|
|
101624
|
-
* Have Appwrite generate a unique ID for you.
|
|
101625
|
-
*
|
|
101626
|
-
* @param {number} padding. Default is 7.
|
|
101627
|
-
* @returns {string}
|
|
101628
|
-
*/
|
|
101629
|
-
static unique(padding = 7) {
|
|
101630
|
-
const baseId = __classPrivateFieldGet(_a2, _a2, "m", _ID_hexTimestamp).call(_a2);
|
|
101631
|
-
let randomPadding = "";
|
|
101632
|
-
for (let i = 0; i < padding; i++) {
|
|
101633
|
-
const randomHexDigit = Math.floor(Math.random() * 16).toString(16);
|
|
101634
|
-
randomPadding += randomHexDigit;
|
|
101635
|
-
}
|
|
101636
|
-
return baseId + randomPadding;
|
|
101637
|
-
}
|
|
101638
|
-
};
|
|
101639
|
-
_a2 = ID2, _ID_hexTimestamp = function _ID_hexTimestamp2() {
|
|
101640
|
-
const now = /* @__PURE__ */ new Date();
|
|
101641
|
-
const sec = Math.floor(now.getTime() / 1e3);
|
|
101642
|
-
const msec = now.getMilliseconds();
|
|
101643
|
-
const hexTimestamp = sec.toString(16) + msec.toString(16).padStart(5, "0");
|
|
101644
|
-
return hexTimestamp;
|
|
101645
|
-
};
|
|
101646
101165
|
var Condition;
|
|
101647
101166
|
(function(Condition2) {
|
|
101648
101167
|
Condition2["Equal"] = "equal";
|
|
@@ -101847,6 +101366,8 @@ var Scopes;
|
|
|
101847
101366
|
Scopes2["PlatformsRead"] = "platforms.read";
|
|
101848
101367
|
Scopes2["PlatformsWrite"] = "platforms.write";
|
|
101849
101368
|
Scopes2["PoliciesWrite"] = "policies.write";
|
|
101369
|
+
Scopes2["TemplatesRead"] = "templates.read";
|
|
101370
|
+
Scopes2["TemplatesWrite"] = "templates.write";
|
|
101850
101371
|
Scopes2["PoliciesRead"] = "policies.read";
|
|
101851
101372
|
Scopes2["ArchivesRead"] = "archives.read";
|
|
101852
101373
|
Scopes2["ArchivesWrite"] = "archives.write";
|
|
@@ -102658,6 +102179,12 @@ var OrderBy;
|
|
|
102658
102179
|
OrderBy2["Asc"] = "asc";
|
|
102659
102180
|
OrderBy2["Desc"] = "desc";
|
|
102660
102181
|
})(OrderBy || (OrderBy = {}));
|
|
102182
|
+
var DocumentsDBIndexType;
|
|
102183
|
+
(function(DocumentsDBIndexType2) {
|
|
102184
|
+
DocumentsDBIndexType2["Key"] = "key";
|
|
102185
|
+
DocumentsDBIndexType2["Fulltext"] = "fulltext";
|
|
102186
|
+
DocumentsDBIndexType2["Unique"] = "unique";
|
|
102187
|
+
})(DocumentsDBIndexType || (DocumentsDBIndexType = {}));
|
|
102661
102188
|
var RegistrationType;
|
|
102662
102189
|
(function(RegistrationType2) {
|
|
102663
102190
|
RegistrationType2["New"] = "new";
|
|
@@ -103022,46 +102549,11 @@ var ServiceId;
|
|
|
103022
102549
|
ServiceId3["Migrations"] = "migrations";
|
|
103023
102550
|
ServiceId3["Messaging"] = "messaging";
|
|
103024
102551
|
})(ServiceId || (ServiceId = {}));
|
|
103025
|
-
var
|
|
103026
|
-
(function(
|
|
103027
|
-
|
|
103028
|
-
|
|
103029
|
-
})(
|
|
103030
|
-
var Region;
|
|
103031
|
-
(function(Region2) {
|
|
103032
|
-
Region2["Fra"] = "fra";
|
|
103033
|
-
Region2["Nyc"] = "nyc";
|
|
103034
|
-
Region2["Syd"] = "syd";
|
|
103035
|
-
Region2["Sfo"] = "sfo";
|
|
103036
|
-
Region2["Sgp"] = "sgp";
|
|
103037
|
-
Region2["Tor"] = "tor";
|
|
103038
|
-
})(Region || (Region = {}));
|
|
103039
|
-
var AuthMethod;
|
|
103040
|
-
(function(AuthMethod3) {
|
|
103041
|
-
AuthMethod3["Emailpassword"] = "email-password";
|
|
103042
|
-
AuthMethod3["Magicurl"] = "magic-url";
|
|
103043
|
-
AuthMethod3["Emailotp"] = "email-otp";
|
|
103044
|
-
AuthMethod3["Anonymous"] = "anonymous";
|
|
103045
|
-
AuthMethod3["Invites"] = "invites";
|
|
103046
|
-
AuthMethod3["Jwt"] = "jwt";
|
|
103047
|
-
AuthMethod3["Phone"] = "phone";
|
|
103048
|
-
})(AuthMethod || (AuthMethod = {}));
|
|
103049
|
-
var ResourceType;
|
|
103050
|
-
(function(ResourceType2) {
|
|
103051
|
-
ResourceType2["Function"] = "function";
|
|
103052
|
-
ResourceType2["Execution"] = "execution";
|
|
103053
|
-
ResourceType2["Message"] = "message";
|
|
103054
|
-
ResourceType2["Backup"] = "backup";
|
|
103055
|
-
})(ResourceType || (ResourceType = {}));
|
|
103056
|
-
var SMTPSecure;
|
|
103057
|
-
(function(SMTPSecure2) {
|
|
103058
|
-
SMTPSecure2["Tls"] = "tls";
|
|
103059
|
-
SMTPSecure2["Ssl"] = "ssl";
|
|
103060
|
-
})(SMTPSecure || (SMTPSecure = {}));
|
|
103061
|
-
var Status;
|
|
103062
|
-
(function(Status2) {
|
|
103063
|
-
Status2["Active"] = "active";
|
|
103064
|
-
})(Status || (Status = {}));
|
|
102552
|
+
var Secure;
|
|
102553
|
+
(function(Secure2) {
|
|
102554
|
+
Secure2["Tls"] = "tls";
|
|
102555
|
+
Secure2["Ssl"] = "ssl";
|
|
102556
|
+
})(Secure || (Secure = {}));
|
|
103065
102557
|
var EmailTemplateType;
|
|
103066
102558
|
(function(EmailTemplateType2) {
|
|
103067
102559
|
EmailTemplateType2["Verification"] = "verification";
|
|
@@ -103206,147 +102698,41 @@ var EmailTemplateLocale;
|
|
|
103206
102698
|
EmailTemplateLocale2["Zhtw"] = "zh-tw";
|
|
103207
102699
|
EmailTemplateLocale2["Zu"] = "zu";
|
|
103208
102700
|
})(EmailTemplateLocale || (EmailTemplateLocale = {}));
|
|
103209
|
-
var
|
|
103210
|
-
(function(
|
|
103211
|
-
|
|
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
|
-
SmsTemplateLocale2["Cy"] = "cy";
|
|
103245
|
-
SmsTemplateLocale2["Da"] = "da";
|
|
103246
|
-
SmsTemplateLocale2["De"] = "de";
|
|
103247
|
-
SmsTemplateLocale2["Deat"] = "de-at";
|
|
103248
|
-
SmsTemplateLocale2["Dech"] = "de-ch";
|
|
103249
|
-
SmsTemplateLocale2["Deli"] = "de-li";
|
|
103250
|
-
SmsTemplateLocale2["Delu"] = "de-lu";
|
|
103251
|
-
SmsTemplateLocale2["El"] = "el";
|
|
103252
|
-
SmsTemplateLocale2["En"] = "en";
|
|
103253
|
-
SmsTemplateLocale2["Enau"] = "en-au";
|
|
103254
|
-
SmsTemplateLocale2["Enbz"] = "en-bz";
|
|
103255
|
-
SmsTemplateLocale2["Enca"] = "en-ca";
|
|
103256
|
-
SmsTemplateLocale2["Engb"] = "en-gb";
|
|
103257
|
-
SmsTemplateLocale2["Enie"] = "en-ie";
|
|
103258
|
-
SmsTemplateLocale2["Enjm"] = "en-jm";
|
|
103259
|
-
SmsTemplateLocale2["Ennz"] = "en-nz";
|
|
103260
|
-
SmsTemplateLocale2["Entt"] = "en-tt";
|
|
103261
|
-
SmsTemplateLocale2["Enus"] = "en-us";
|
|
103262
|
-
SmsTemplateLocale2["Enza"] = "en-za";
|
|
103263
|
-
SmsTemplateLocale2["Eo"] = "eo";
|
|
103264
|
-
SmsTemplateLocale2["Es"] = "es";
|
|
103265
|
-
SmsTemplateLocale2["Esar"] = "es-ar";
|
|
103266
|
-
SmsTemplateLocale2["Esbo"] = "es-bo";
|
|
103267
|
-
SmsTemplateLocale2["Escl"] = "es-cl";
|
|
103268
|
-
SmsTemplateLocale2["Esco"] = "es-co";
|
|
103269
|
-
SmsTemplateLocale2["Escr"] = "es-cr";
|
|
103270
|
-
SmsTemplateLocale2["Esdo"] = "es-do";
|
|
103271
|
-
SmsTemplateLocale2["Esec"] = "es-ec";
|
|
103272
|
-
SmsTemplateLocale2["Esgt"] = "es-gt";
|
|
103273
|
-
SmsTemplateLocale2["Eshn"] = "es-hn";
|
|
103274
|
-
SmsTemplateLocale2["Esmx"] = "es-mx";
|
|
103275
|
-
SmsTemplateLocale2["Esni"] = "es-ni";
|
|
103276
|
-
SmsTemplateLocale2["Espa"] = "es-pa";
|
|
103277
|
-
SmsTemplateLocale2["Espe"] = "es-pe";
|
|
103278
|
-
SmsTemplateLocale2["Espr"] = "es-pr";
|
|
103279
|
-
SmsTemplateLocale2["Espy"] = "es-py";
|
|
103280
|
-
SmsTemplateLocale2["Essv"] = "es-sv";
|
|
103281
|
-
SmsTemplateLocale2["Esuy"] = "es-uy";
|
|
103282
|
-
SmsTemplateLocale2["Esve"] = "es-ve";
|
|
103283
|
-
SmsTemplateLocale2["Et"] = "et";
|
|
103284
|
-
SmsTemplateLocale2["Eu"] = "eu";
|
|
103285
|
-
SmsTemplateLocale2["Fa"] = "fa";
|
|
103286
|
-
SmsTemplateLocale2["Fi"] = "fi";
|
|
103287
|
-
SmsTemplateLocale2["Fo"] = "fo";
|
|
103288
|
-
SmsTemplateLocale2["Fr"] = "fr";
|
|
103289
|
-
SmsTemplateLocale2["Frbe"] = "fr-be";
|
|
103290
|
-
SmsTemplateLocale2["Frca"] = "fr-ca";
|
|
103291
|
-
SmsTemplateLocale2["Frch"] = "fr-ch";
|
|
103292
|
-
SmsTemplateLocale2["Frlu"] = "fr-lu";
|
|
103293
|
-
SmsTemplateLocale2["Ga"] = "ga";
|
|
103294
|
-
SmsTemplateLocale2["Gd"] = "gd";
|
|
103295
|
-
SmsTemplateLocale2["He"] = "he";
|
|
103296
|
-
SmsTemplateLocale2["Hi"] = "hi";
|
|
103297
|
-
SmsTemplateLocale2["Hr"] = "hr";
|
|
103298
|
-
SmsTemplateLocale2["Hu"] = "hu";
|
|
103299
|
-
SmsTemplateLocale2["Id"] = "id";
|
|
103300
|
-
SmsTemplateLocale2["Is"] = "is";
|
|
103301
|
-
SmsTemplateLocale2["It"] = "it";
|
|
103302
|
-
SmsTemplateLocale2["Itch"] = "it-ch";
|
|
103303
|
-
SmsTemplateLocale2["Ja"] = "ja";
|
|
103304
|
-
SmsTemplateLocale2["Ji"] = "ji";
|
|
103305
|
-
SmsTemplateLocale2["Ko"] = "ko";
|
|
103306
|
-
SmsTemplateLocale2["Ku"] = "ku";
|
|
103307
|
-
SmsTemplateLocale2["Lt"] = "lt";
|
|
103308
|
-
SmsTemplateLocale2["Lv"] = "lv";
|
|
103309
|
-
SmsTemplateLocale2["Mk"] = "mk";
|
|
103310
|
-
SmsTemplateLocale2["Ml"] = "ml";
|
|
103311
|
-
SmsTemplateLocale2["Ms"] = "ms";
|
|
103312
|
-
SmsTemplateLocale2["Mt"] = "mt";
|
|
103313
|
-
SmsTemplateLocale2["Nb"] = "nb";
|
|
103314
|
-
SmsTemplateLocale2["Ne"] = "ne";
|
|
103315
|
-
SmsTemplateLocale2["Nl"] = "nl";
|
|
103316
|
-
SmsTemplateLocale2["Nlbe"] = "nl-be";
|
|
103317
|
-
SmsTemplateLocale2["Nn"] = "nn";
|
|
103318
|
-
SmsTemplateLocale2["No"] = "no";
|
|
103319
|
-
SmsTemplateLocale2["Pa"] = "pa";
|
|
103320
|
-
SmsTemplateLocale2["Pl"] = "pl";
|
|
103321
|
-
SmsTemplateLocale2["Pt"] = "pt";
|
|
103322
|
-
SmsTemplateLocale2["Ptbr"] = "pt-br";
|
|
103323
|
-
SmsTemplateLocale2["Rm"] = "rm";
|
|
103324
|
-
SmsTemplateLocale2["Ro"] = "ro";
|
|
103325
|
-
SmsTemplateLocale2["Romd"] = "ro-md";
|
|
103326
|
-
SmsTemplateLocale2["Ru"] = "ru";
|
|
103327
|
-
SmsTemplateLocale2["Rumd"] = "ru-md";
|
|
103328
|
-
SmsTemplateLocale2["Sb"] = "sb";
|
|
103329
|
-
SmsTemplateLocale2["Sk"] = "sk";
|
|
103330
|
-
SmsTemplateLocale2["Sl"] = "sl";
|
|
103331
|
-
SmsTemplateLocale2["Sq"] = "sq";
|
|
103332
|
-
SmsTemplateLocale2["Sr"] = "sr";
|
|
103333
|
-
SmsTemplateLocale2["Sv"] = "sv";
|
|
103334
|
-
SmsTemplateLocale2["Svfi"] = "sv-fi";
|
|
103335
|
-
SmsTemplateLocale2["Th"] = "th";
|
|
103336
|
-
SmsTemplateLocale2["Tn"] = "tn";
|
|
103337
|
-
SmsTemplateLocale2["Tr"] = "tr";
|
|
103338
|
-
SmsTemplateLocale2["Ts"] = "ts";
|
|
103339
|
-
SmsTemplateLocale2["Ua"] = "ua";
|
|
103340
|
-
SmsTemplateLocale2["Ur"] = "ur";
|
|
103341
|
-
SmsTemplateLocale2["Ve"] = "ve";
|
|
103342
|
-
SmsTemplateLocale2["Vi"] = "vi";
|
|
103343
|
-
SmsTemplateLocale2["Xh"] = "xh";
|
|
103344
|
-
SmsTemplateLocale2["Zhcn"] = "zh-cn";
|
|
103345
|
-
SmsTemplateLocale2["Zhhk"] = "zh-hk";
|
|
103346
|
-
SmsTemplateLocale2["Zhsg"] = "zh-sg";
|
|
103347
|
-
SmsTemplateLocale2["Zhtw"] = "zh-tw";
|
|
103348
|
-
SmsTemplateLocale2["Zu"] = "zu";
|
|
103349
|
-
})(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 = {}));
|
|
103350
102736
|
var StatusCode;
|
|
103351
102737
|
(function(StatusCode2) {
|
|
103352
102738
|
StatusCode2["MovedPermanently301"] = "301";
|
|
@@ -103541,6 +102927,19 @@ var VCSDetectionType;
|
|
|
103541
102927
|
VCSDetectionType2["Runtime"] = "runtime";
|
|
103542
102928
|
VCSDetectionType2["Framework"] = "framework";
|
|
103543
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 = {}));
|
|
103544
102943
|
var DatabaseType;
|
|
103545
102944
|
(function(DatabaseType2) {
|
|
103546
102945
|
DatabaseType2["Legacy"] = "legacy";
|
|
@@ -103572,6 +102971,14 @@ var IndexStatus;
|
|
|
103572
102971
|
IndexStatus2["Stuck"] = "stuck";
|
|
103573
102972
|
IndexStatus2["Failed"] = "failed";
|
|
103574
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 = {}));
|
|
103575
102982
|
var DeploymentStatus;
|
|
103576
102983
|
(function(DeploymentStatus2) {
|
|
103577
102984
|
DeploymentStatus2["Waiting"] = "waiting";
|
|
@@ -103669,7 +103076,7 @@ var package_default = {
|
|
|
103669
103076
|
type: "module",
|
|
103670
103077
|
homepage: "https://appwrite.io/support",
|
|
103671
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",
|
|
103672
|
-
version: "
|
|
103079
|
+
version: "19.0.0",
|
|
103673
103080
|
license: "BSD-3-Clause",
|
|
103674
103081
|
main: "dist/index.cjs",
|
|
103675
103082
|
module: "dist/index.js",
|
|
@@ -103717,7 +103124,7 @@ var package_default = {
|
|
|
103717
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"
|
|
103718
103125
|
},
|
|
103719
103126
|
dependencies: {
|
|
103720
|
-
"@appwrite.io/console": "
|
|
103127
|
+
"@appwrite.io/console": "11.0.0",
|
|
103721
103128
|
chalk: "4.1.2",
|
|
103722
103129
|
chokidar: "^3.6.0",
|
|
103723
103130
|
"cli-progress": "^3.12.0",
|
|
@@ -103738,7 +103145,8 @@ var package_default = {
|
|
|
103738
103145
|
zod: "^4.3.5"
|
|
103739
103146
|
},
|
|
103740
103147
|
overrides: {
|
|
103741
|
-
phin: "3.7.1"
|
|
103148
|
+
phin: "3.7.1",
|
|
103149
|
+
"@xmldom/xmldom": "^0.9.10"
|
|
103742
103150
|
},
|
|
103743
103151
|
devDependencies: {
|
|
103744
103152
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
@@ -103912,6 +103320,19 @@ var InvoiceSummarySchema = createSummarySchema(
|
|
|
103912
103320
|
["plan", "status", "dueAt"],
|
|
103913
103321
|
"Expected an invoice summary row"
|
|
103914
103322
|
);
|
|
103323
|
+
var RuntimeSummarySchema = createSummarySchema(
|
|
103324
|
+
{
|
|
103325
|
+
$id: external_exports.string().nullable().optional(),
|
|
103326
|
+
key: external_exports.string().nullable().optional(),
|
|
103327
|
+
name: external_exports.string().nullable().optional(),
|
|
103328
|
+
version: external_exports.union([external_exports.string(), external_exports.number()]).nullable().optional(),
|
|
103329
|
+
base: external_exports.string().nullable().optional(),
|
|
103330
|
+
image: external_exports.string().nullable().optional(),
|
|
103331
|
+
logo: external_exports.string().nullable().optional()
|
|
103332
|
+
},
|
|
103333
|
+
["$id", "name", "version", "base", "image"],
|
|
103334
|
+
"Expected a runtime summary row"
|
|
103335
|
+
);
|
|
103915
103336
|
var paymentMethodLabel = (row) => {
|
|
103916
103337
|
const brand = valueFrom(row, "brand") ?? "";
|
|
103917
103338
|
const last4 = valueFrom(row, "last4") ?? "";
|
|
@@ -103947,7 +103368,35 @@ var paymentMethodStatus = (row) => {
|
|
|
103947
103368
|
}
|
|
103948
103369
|
return "status: pending";
|
|
103949
103370
|
};
|
|
103371
|
+
var runtimeLabel = (row) => {
|
|
103372
|
+
const name = compactText(valueFrom(row, "name"), "");
|
|
103373
|
+
const key = compactText(valueFrom(row, "key"), "");
|
|
103374
|
+
const version2 = valueFrom(row, "version");
|
|
103375
|
+
const runtimeName = name || (key ? toTitleCase(key) : "Runtime");
|
|
103376
|
+
if (version2 == null || String(version2).trim() === "") {
|
|
103377
|
+
return runtimeName;
|
|
103378
|
+
}
|
|
103379
|
+
return `${runtimeName} ${version2}`;
|
|
103380
|
+
};
|
|
103950
103381
|
var structuredCollectionRenderers = {
|
|
103382
|
+
runtimes: createColumnRenderer(RuntimeSummarySchema, [
|
|
103383
|
+
{
|
|
103384
|
+
header: "runtime",
|
|
103385
|
+
value: (row, context) => indexedLabel(runtimeLabel(row), context)
|
|
103386
|
+
},
|
|
103387
|
+
{
|
|
103388
|
+
header: "id",
|
|
103389
|
+
value: (row) => compactText(valueFrom(row, "$id"))
|
|
103390
|
+
},
|
|
103391
|
+
{
|
|
103392
|
+
header: "base",
|
|
103393
|
+
value: (row) => compactText(valueFrom(row, "base"))
|
|
103394
|
+
},
|
|
103395
|
+
{
|
|
103396
|
+
header: "image",
|
|
103397
|
+
value: (row) => compactText(valueFrom(row, "image"))
|
|
103398
|
+
}
|
|
103399
|
+
]),
|
|
103951
103400
|
identities: createColumnRenderer(IdentitySummarySchema, [
|
|
103952
103401
|
{
|
|
103953
103402
|
header: "identity",
|
|
@@ -105172,11 +104621,23 @@ var getWebhooksService = async (sdk) => {
|
|
|
105172
104621
|
|
|
105173
104622
|
// lib/questions.ts
|
|
105174
104623
|
var whenOverride = (answers) => answers.override === void 0 ? true : answers.override;
|
|
104624
|
+
var buildSelectionLabel = (name, id) => `${name} (${id})`;
|
|
104625
|
+
var extractSelectionId = (value) => {
|
|
104626
|
+
const match = value.match(/\(([^()]+)\)$/);
|
|
104627
|
+
return match ? match[1] : value;
|
|
104628
|
+
};
|
|
104629
|
+
var getInitProjectOverrideMessage = () => {
|
|
104630
|
+
const projectName = localConfig.getProject().projectName;
|
|
104631
|
+
if (projectName) {
|
|
104632
|
+
return `A project is already linked to this directory (${projectName}). Override?`;
|
|
104633
|
+
}
|
|
104634
|
+
return "A project is already linked to this directory. Override?";
|
|
104635
|
+
};
|
|
105175
104636
|
var questionsInitProject = [
|
|
105176
104637
|
{
|
|
105177
104638
|
type: "confirm",
|
|
105178
104639
|
name: "override",
|
|
105179
|
-
message:
|
|
104640
|
+
message: getInitProjectOverrideMessage(),
|
|
105180
104641
|
when() {
|
|
105181
104642
|
return Object.keys(localConfig.getProject()).length !== 0;
|
|
105182
104643
|
}
|
|
@@ -105185,14 +104646,14 @@ var questionsInitProject = [
|
|
|
105185
104646
|
type: "list",
|
|
105186
104647
|
name: "start",
|
|
105187
104648
|
when: whenOverride,
|
|
105188
|
-
message: "
|
|
104649
|
+
message: "Select a setup method:",
|
|
105189
104650
|
choices: [
|
|
105190
104651
|
{
|
|
105191
|
-
name: "Create new project",
|
|
104652
|
+
name: "Create a new project",
|
|
105192
104653
|
value: "new"
|
|
105193
104654
|
},
|
|
105194
104655
|
{
|
|
105195
|
-
name: "Link directory to an existing project",
|
|
104656
|
+
name: "Link this directory to an existing project",
|
|
105196
104657
|
value: "existing"
|
|
105197
104658
|
}
|
|
105198
104659
|
]
|
|
@@ -105200,7 +104661,7 @@ var questionsInitProject = [
|
|
|
105200
104661
|
{
|
|
105201
104662
|
type: "search-list",
|
|
105202
104663
|
name: "organization",
|
|
105203
|
-
message: "Choose your organization",
|
|
104664
|
+
message: "Choose your organization:",
|
|
105204
104665
|
choices: async () => {
|
|
105205
104666
|
const client = await sdkForConsole(true);
|
|
105206
104667
|
const { teams } = isCloud() ? await paginate(
|
|
@@ -105219,9 +104680,10 @@ var questionsInitProject = [
|
|
|
105219
104680
|
"teams"
|
|
105220
104681
|
);
|
|
105221
104682
|
const choices = teams.map((team, _idx) => {
|
|
104683
|
+
const label = buildSelectionLabel(team.name, team["$id"]);
|
|
105222
104684
|
return {
|
|
105223
|
-
name:
|
|
105224
|
-
value:
|
|
104685
|
+
name: label,
|
|
104686
|
+
value: label
|
|
105225
104687
|
};
|
|
105226
104688
|
});
|
|
105227
104689
|
if (choices.length == 0) {
|
|
@@ -105250,13 +104712,13 @@ var questionsInitProject = [
|
|
|
105250
104712
|
{
|
|
105251
104713
|
type: "search-list",
|
|
105252
104714
|
name: "project",
|
|
105253
|
-
message:
|
|
104715
|
+
message: "Choose your project:",
|
|
105254
104716
|
choices: async (answers) => {
|
|
105255
104717
|
const queries = [
|
|
105256
104718
|
JSON.stringify({
|
|
105257
104719
|
method: "equal",
|
|
105258
104720
|
attribute: "teamId",
|
|
105259
|
-
values: [answers.organization]
|
|
104721
|
+
values: [extractSelectionId(answers.organization)]
|
|
105260
104722
|
}),
|
|
105261
104723
|
JSON.stringify({ method: "orderDesc", attribute: "$id" })
|
|
105262
104724
|
];
|
|
@@ -105268,14 +104730,10 @@ var questionsInitProject = [
|
|
|
105268
104730
|
queries
|
|
105269
104731
|
);
|
|
105270
104732
|
const choices = projects.map((project) => {
|
|
105271
|
-
const label =
|
|
104733
|
+
const label = buildSelectionLabel(project.name, project["$id"]);
|
|
105272
104734
|
return {
|
|
105273
104735
|
name: label,
|
|
105274
|
-
|
|
105275
|
-
value: {
|
|
105276
|
-
$id: project["$id"],
|
|
105277
|
-
region: project.region || ""
|
|
105278
|
-
}
|
|
104736
|
+
value: label
|
|
105279
104737
|
};
|
|
105280
104738
|
});
|
|
105281
104739
|
if (choices.length === 0) {
|
|
@@ -106865,6 +106323,37 @@ function getDeploymentProgressText(status, waitingSince) {
|
|
|
106865
106323
|
function getDeploymentTimeoutErrorMessage() {
|
|
106866
106324
|
return `Deployment got stuck for more than ${DEPLOYMENT_TIMEOUT_MINUTES} minutes`;
|
|
106867
106325
|
}
|
|
106326
|
+
function getDeploymentProgressSignature(deployment) {
|
|
106327
|
+
const status = typeof deployment["status"] === "string" ? deployment["status"] : "";
|
|
106328
|
+
const buildLogs = typeof deployment["buildLogs"] === "string" ? deployment["buildLogs"] : "";
|
|
106329
|
+
const updatedAt = typeof deployment["$updatedAt"] === "string" ? deployment["$updatedAt"] : "";
|
|
106330
|
+
const { screenshotLight, screenshotDark } = getSiteDeploymentScreenshots(deployment);
|
|
106331
|
+
return JSON.stringify({
|
|
106332
|
+
status,
|
|
106333
|
+
updatedAt,
|
|
106334
|
+
buildLogsLength: buildLogs.length,
|
|
106335
|
+
buildLogsTail: buildLogs.slice(-200),
|
|
106336
|
+
screenshotLight: screenshotLight ?? "",
|
|
106337
|
+
screenshotDark: screenshotDark ?? ""
|
|
106338
|
+
});
|
|
106339
|
+
}
|
|
106340
|
+
function createDeploymentTimeoutTracker(deployment) {
|
|
106341
|
+
let lastActivityAt = Date.now();
|
|
106342
|
+
let lastSignature = null;
|
|
106343
|
+
const touch = (nextDeployment) => {
|
|
106344
|
+
const nextSignature = getDeploymentProgressSignature(nextDeployment);
|
|
106345
|
+
if (nextSignature === lastSignature) {
|
|
106346
|
+
return;
|
|
106347
|
+
}
|
|
106348
|
+
lastSignature = nextSignature;
|
|
106349
|
+
lastActivityAt = Date.now();
|
|
106350
|
+
};
|
|
106351
|
+
touch(deployment);
|
|
106352
|
+
return {
|
|
106353
|
+
touch,
|
|
106354
|
+
hasTimedOut: () => Date.now() - lastActivityAt > DEPLOYMENT_TIMEOUT_MS
|
|
106355
|
+
};
|
|
106356
|
+
}
|
|
106868
106357
|
async function getTerminalImage() {
|
|
106869
106358
|
terminalImageModulePromise ??= import("terminal-image").then(
|
|
106870
106359
|
(module2) => module2.default
|
|
@@ -107383,7 +106872,7 @@ var Push = class {
|
|
|
107383
106872
|
if (settings.services) {
|
|
107384
106873
|
this.log("Applying service statuses ...");
|
|
107385
106874
|
for (const [service, status] of Object.entries(settings.services)) {
|
|
107386
|
-
await projectService.
|
|
106875
|
+
await projectService.updateService({
|
|
107387
106876
|
serviceId: service,
|
|
107388
106877
|
enabled: status
|
|
107389
106878
|
});
|
|
@@ -107392,7 +106881,7 @@ var Push = class {
|
|
|
107392
106881
|
if (settings.protocols) {
|
|
107393
106882
|
this.log("Applying protocol statuses ...");
|
|
107394
106883
|
for (const [protocol, status] of Object.entries(settings.protocols)) {
|
|
107395
|
-
await projectService.
|
|
106884
|
+
await projectService.updateProtocol({
|
|
107396
106885
|
protocolId: protocol,
|
|
107397
106886
|
enabled: status
|
|
107398
106887
|
});
|
|
@@ -107401,33 +106890,26 @@ var Push = class {
|
|
|
107401
106890
|
if (settings.auth) {
|
|
107402
106891
|
if (settings.auth.security) {
|
|
107403
106892
|
this.log("Applying auth security settings ...");
|
|
107404
|
-
await
|
|
107405
|
-
projectId,
|
|
106893
|
+
await projectService.updateSessionDurationPolicy({
|
|
107406
106894
|
duration: Number(settings.auth.security.duration)
|
|
107407
106895
|
});
|
|
107408
|
-
await
|
|
107409
|
-
|
|
107410
|
-
limit: Number(settings.auth.security.limit)
|
|
106896
|
+
await projectService.updateUserLimitPolicy({
|
|
106897
|
+
total: Number(settings.auth.security.limit)
|
|
107411
106898
|
});
|
|
107412
|
-
await
|
|
107413
|
-
|
|
107414
|
-
limit: Number(settings.auth.security.sessionsLimit)
|
|
106899
|
+
await projectService.updateSessionLimitPolicy({
|
|
106900
|
+
total: Number(settings.auth.security.sessionsLimit)
|
|
107415
106901
|
});
|
|
107416
|
-
await
|
|
107417
|
-
projectId,
|
|
106902
|
+
await projectService.updatePasswordDictionaryPolicy({
|
|
107418
106903
|
enabled: settings.auth.security.passwordDictionary
|
|
107419
106904
|
});
|
|
107420
|
-
await
|
|
107421
|
-
|
|
107422
|
-
limit: Number(settings.auth.security.passwordHistory)
|
|
106905
|
+
await projectService.updatePasswordHistoryPolicy({
|
|
106906
|
+
total: Number(settings.auth.security.passwordHistory)
|
|
107423
106907
|
});
|
|
107424
|
-
await
|
|
107425
|
-
projectId,
|
|
106908
|
+
await projectService.updatePasswordPersonalDataPolicy({
|
|
107426
106909
|
enabled: settings.auth.security.personalDataCheck
|
|
107427
106910
|
});
|
|
107428
|
-
await
|
|
107429
|
-
|
|
107430
|
-
alerts: settings.auth.security.sessionAlerts
|
|
106911
|
+
await projectService.updateSessionAlertPolicy({
|
|
106912
|
+
enabled: settings.auth.security.sessionAlerts
|
|
107431
106913
|
});
|
|
107432
106914
|
await projectsService.updateMockNumbers({
|
|
107433
106915
|
projectId,
|
|
@@ -107880,6 +107362,7 @@ var Push = class {
|
|
|
107880
107362
|
deploymentId
|
|
107881
107363
|
);
|
|
107882
107364
|
let waitingSince = null;
|
|
107365
|
+
const deploymentTimeoutTracker = createDeploymentTimeoutTracker(response);
|
|
107883
107366
|
const deploymentLogPrinter = createDeploymentLogPrinter({
|
|
107884
107367
|
label: `function:${func.name}`,
|
|
107885
107368
|
showPrefix: functions.length > 1,
|
|
@@ -107890,6 +107373,7 @@ var Push = class {
|
|
|
107890
107373
|
endpoint: localConfig.getEndpoint() || globalConfig2.getEndpoint(),
|
|
107891
107374
|
event: `functions.${func["$id"]}.deployments.${deploymentId}.update`,
|
|
107892
107375
|
onDeploymentUpdate: (deployment) => {
|
|
107376
|
+
deploymentTimeoutTracker.touch(deployment);
|
|
107893
107377
|
deploymentLogPrinter.ingest(deployment);
|
|
107894
107378
|
},
|
|
107895
107379
|
onClose: () => {
|
|
@@ -107919,9 +107403,8 @@ var Push = class {
|
|
|
107919
107403
|
deploymentLogsController
|
|
107920
107404
|
)
|
|
107921
107405
|
});
|
|
107922
|
-
let timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS;
|
|
107923
107406
|
while (true) {
|
|
107924
|
-
if (
|
|
107407
|
+
if (deploymentTimeoutTracker.hasTimedOut()) {
|
|
107925
107408
|
deploymentLogPrinter.complete();
|
|
107926
107409
|
failedDeployments.push({
|
|
107927
107410
|
name: func["name"],
|
|
@@ -107945,6 +107428,7 @@ var Push = class {
|
|
|
107945
107428
|
functionId: func["$id"],
|
|
107946
107429
|
deploymentId
|
|
107947
107430
|
});
|
|
107431
|
+
deploymentTimeoutTracker.touch(response);
|
|
107948
107432
|
deploymentLogPrinter.ingest(response);
|
|
107949
107433
|
const status = response["status"];
|
|
107950
107434
|
if (status === "waiting") {
|
|
@@ -108114,7 +107598,6 @@ var Push = class {
|
|
|
108114
107598
|
siteId: site["$id"],
|
|
108115
107599
|
name: site.name,
|
|
108116
107600
|
framework: site.framework,
|
|
108117
|
-
enabled: site.enabled,
|
|
108118
107601
|
logging: site.logging,
|
|
108119
107602
|
timeout: site.timeout,
|
|
108120
107603
|
installCommand: site.installCommand,
|
|
@@ -108145,7 +107628,6 @@ var Push = class {
|
|
|
108145
107628
|
siteId: site.$id,
|
|
108146
107629
|
name: site.name,
|
|
108147
107630
|
framework: site.framework,
|
|
108148
|
-
enabled: site.enabled,
|
|
108149
107631
|
logging: site.logging,
|
|
108150
107632
|
timeout: site.timeout,
|
|
108151
107633
|
installCommand: site.installCommand,
|
|
@@ -108308,6 +107790,7 @@ var Push = class {
|
|
|
108308
107790
|
let waitingSince = null;
|
|
108309
107791
|
let readyWithoutScreenshotsSince = null;
|
|
108310
107792
|
let activationApplied = false;
|
|
107793
|
+
const deploymentTimeoutTracker = createDeploymentTimeoutTracker(response);
|
|
108311
107794
|
const deploymentLogPrinter = createDeploymentLogPrinter({
|
|
108312
107795
|
label: `site:${site.name}`,
|
|
108313
107796
|
showPrefix: sites.length > 1,
|
|
@@ -108318,6 +107801,7 @@ var Push = class {
|
|
|
108318
107801
|
endpoint: localConfig.getEndpoint() || globalConfig2.getEndpoint(),
|
|
108319
107802
|
event: `sites.${site["$id"]}.deployments.${deploymentId}.update`,
|
|
108320
107803
|
onDeploymentUpdate: (deployment) => {
|
|
107804
|
+
deploymentTimeoutTracker.touch(deployment);
|
|
108321
107805
|
deploymentLogPrinter.ingest(deployment);
|
|
108322
107806
|
},
|
|
108323
107807
|
onClose: () => {
|
|
@@ -108347,9 +107831,8 @@ var Push = class {
|
|
|
108347
107831
|
deploymentLogsController
|
|
108348
107832
|
)
|
|
108349
107833
|
});
|
|
108350
|
-
let timeoutDeadline = Date.now() + DEPLOYMENT_TIMEOUT_MS;
|
|
108351
107834
|
while (true) {
|
|
108352
|
-
if (
|
|
107835
|
+
if (deploymentTimeoutTracker.hasTimedOut()) {
|
|
108353
107836
|
deploymentLogPrinter.complete();
|
|
108354
107837
|
failedDeployments.push({
|
|
108355
107838
|
name: site["name"],
|
|
@@ -108373,6 +107856,7 @@ var Push = class {
|
|
|
108373
107856
|
siteId: site["$id"],
|
|
108374
107857
|
deploymentId
|
|
108375
107858
|
});
|
|
107859
|
+
deploymentTimeoutTracker.touch(response);
|
|
108376
107860
|
deploymentLogPrinter.ingest(response);
|
|
108377
107861
|
const status = response["status"];
|
|
108378
107862
|
if (status === "waiting") {
|
|
@@ -108403,10 +107887,6 @@ var Push = class {
|
|
|
108403
107887
|
}
|
|
108404
107888
|
if (!screenshotsReady) {
|
|
108405
107889
|
readyWithoutScreenshotsSince ??= Date.now();
|
|
108406
|
-
timeoutDeadline = Math.max(
|
|
108407
|
-
timeoutDeadline,
|
|
108408
|
-
readyWithoutScreenshotsSince + SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS
|
|
108409
|
-
);
|
|
108410
107890
|
if (Date.now() - readyWithoutScreenshotsSince < SITE_SCREENSHOT_FINALIZATION_TIMEOUT_MS) {
|
|
108411
107891
|
currentDeploymentEnd = "Finalizing deployment preview...";
|
|
108412
107892
|
updaterRow.update({
|
|
@@ -109993,7 +109473,6 @@ var Pull = class {
|
|
|
109993
109473
|
name: site.name,
|
|
109994
109474
|
path: sitePath,
|
|
109995
109475
|
framework: site.framework,
|
|
109996
|
-
enabled: site.enabled,
|
|
109997
109476
|
logging: site.logging,
|
|
109998
109477
|
timeout: site.timeout,
|
|
109999
109478
|
buildRuntime: site.buildRuntime,
|