appwrite-cli 5.0.1 → 5.0.2
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 +3 -3
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +2 -2
- package/lib/commands/messaging.js +19 -19
- package/package.json +1 -1
- package/scoop/appwrite.json +3 -3
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Appwrite Command Line SDK
|
|
2
2
|
|
|
3
3
|

|
|
4
|
-

|
|
5
5
|
[](https://travis-ci.com/appwrite/sdk-generator)
|
|
6
6
|
[](https://twitter.com/appwrite)
|
|
7
7
|
[](https://appwrite.io/discord)
|
|
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
|
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
$ appwrite -v
|
|
32
|
-
5.0.
|
|
32
|
+
5.0.2
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Install using prebuilt binaries
|
|
@@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
|
|
|
60
60
|
Once the installation completes, you can verify your install using
|
|
61
61
|
```
|
|
62
62
|
$ appwrite -v
|
|
63
|
-
5.0.
|
|
63
|
+
5.0.2
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Getting Started
|
package/install.ps1
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
# You can use "View source" of this page to see the full script.
|
|
14
14
|
|
|
15
15
|
# REPO
|
|
16
|
-
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.
|
|
17
|
-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.
|
|
16
|
+
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.2/appwrite-cli-win-x64.exe"
|
|
17
|
+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.2/appwrite-cli-win-arm64.exe"
|
|
18
18
|
|
|
19
19
|
$APPWRITE_BINARY_NAME = "appwrite.exe"
|
|
20
20
|
|
package/install.sh
CHANGED
|
@@ -97,7 +97,7 @@ printSuccess() {
|
|
|
97
97
|
downloadBinary() {
|
|
98
98
|
echo "[2/4] Downloading executable for $OS ($ARCH) ..."
|
|
99
99
|
|
|
100
|
-
GITHUB_LATEST_VERSION="5.0.
|
|
100
|
+
GITHUB_LATEST_VERSION="5.0.2"
|
|
101
101
|
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
|
|
102
102
|
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
|
|
103
103
|
|
package/lib/client.js
CHANGED
|
@@ -15,8 +15,8 @@ class Client {
|
|
|
15
15
|
'x-sdk-name': 'Command Line',
|
|
16
16
|
'x-sdk-platform': 'console',
|
|
17
17
|
'x-sdk-language': 'cli',
|
|
18
|
-
'x-sdk-version': '5.0.
|
|
19
|
-
'user-agent' : `AppwriteCLI/5.0.
|
|
18
|
+
'x-sdk-version': '5.0.2',
|
|
19
|
+
'user-agent' : `AppwriteCLI/5.0.2 (${os.type()} ${os.version()}; ${os.arch()})`,
|
|
20
20
|
'X-Appwrite-Response-Format' : '1.5.0',
|
|
21
21
|
};
|
|
22
22
|
}
|
|
@@ -1032,9 +1032,9 @@ const messagingUpdateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
1032
1032
|
* @typedef {Object} MessagingCreateMsg91ProviderRequestParams
|
|
1033
1033
|
* @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
1034
1034
|
* @property {string} name Provider name.
|
|
1035
|
-
* @property {string}
|
|
1036
|
-
* @property {string} senderId Msg91
|
|
1037
|
-
* @property {string} authKey Msg91
|
|
1035
|
+
* @property {string} templateId Msg91 template ID
|
|
1036
|
+
* @property {string} senderId Msg91 sender ID.
|
|
1037
|
+
* @property {string} authKey Msg91 auth key.
|
|
1038
1038
|
* @property {boolean} enabled Set as enabled.
|
|
1039
1039
|
* @property {boolean} parseOutput
|
|
1040
1040
|
* @property {libClient | undefined} sdk
|
|
@@ -1043,7 +1043,7 @@ const messagingUpdateMailgunProvider = async ({ providerId, name, apiKey, domain
|
|
|
1043
1043
|
/**
|
|
1044
1044
|
* @param {MessagingCreateMsg91ProviderRequestParams} params
|
|
1045
1045
|
*/
|
|
1046
|
-
const messagingCreateMsg91Provider = async ({ providerId, name,
|
|
1046
|
+
const messagingCreateMsg91Provider = async ({ providerId, name, templateId, senderId, authKey, enabled, parseOutput = true, sdk = undefined}) => {
|
|
1047
1047
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
1048
1048
|
let apiPath = '/messaging/providers/msg91';
|
|
1049
1049
|
let payload = {};
|
|
@@ -1053,8 +1053,8 @@ const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId,
|
|
|
1053
1053
|
if (typeof name !== 'undefined') {
|
|
1054
1054
|
payload['name'] = name;
|
|
1055
1055
|
}
|
|
1056
|
-
if (typeof
|
|
1057
|
-
payload['
|
|
1056
|
+
if (typeof templateId !== 'undefined') {
|
|
1057
|
+
payload['templateId'] = templateId;
|
|
1058
1058
|
}
|
|
1059
1059
|
if (typeof senderId !== 'undefined') {
|
|
1060
1060
|
payload['senderId'] = senderId;
|
|
@@ -1085,9 +1085,9 @@ const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId,
|
|
|
1085
1085
|
* @property {string} providerId Provider ID.
|
|
1086
1086
|
* @property {string} name Provider name.
|
|
1087
1087
|
* @property {boolean} enabled Set as enabled.
|
|
1088
|
-
* @property {string}
|
|
1089
|
-
* @property {string}
|
|
1090
|
-
* @property {string}
|
|
1088
|
+
* @property {string} templateId Msg91 template ID.
|
|
1089
|
+
* @property {string} senderId Msg91 sender ID.
|
|
1090
|
+
* @property {string} authKey Msg91 auth key.
|
|
1091
1091
|
* @property {boolean} parseOutput
|
|
1092
1092
|
* @property {libClient | undefined} sdk
|
|
1093
1093
|
*/
|
|
@@ -1095,7 +1095,7 @@ const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId,
|
|
|
1095
1095
|
/**
|
|
1096
1096
|
* @param {MessagingUpdateMsg91ProviderRequestParams} params
|
|
1097
1097
|
*/
|
|
1098
|
-
const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, senderId, authKey,
|
|
1098
|
+
const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, templateId, senderId, authKey, parseOutput = true, sdk = undefined}) => {
|
|
1099
1099
|
let client = !sdk ? await sdkForProject() : sdk;
|
|
1100
1100
|
let apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId);
|
|
1101
1101
|
let payload = {};
|
|
@@ -1105,15 +1105,15 @@ const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, senderI
|
|
|
1105
1105
|
if (typeof enabled !== 'undefined') {
|
|
1106
1106
|
payload['enabled'] = enabled;
|
|
1107
1107
|
}
|
|
1108
|
+
if (typeof templateId !== 'undefined') {
|
|
1109
|
+
payload['templateId'] = templateId;
|
|
1110
|
+
}
|
|
1108
1111
|
if (typeof senderId !== 'undefined') {
|
|
1109
1112
|
payload['senderId'] = senderId;
|
|
1110
1113
|
}
|
|
1111
1114
|
if (typeof authKey !== 'undefined') {
|
|
1112
1115
|
payload['authKey'] = authKey;
|
|
1113
1116
|
}
|
|
1114
|
-
if (typeof from !== 'undefined') {
|
|
1115
|
-
payload['from'] = from;
|
|
1116
|
-
}
|
|
1117
1117
|
|
|
1118
1118
|
let response = undefined;
|
|
1119
1119
|
|
|
@@ -2497,9 +2497,9 @@ messaging
|
|
|
2497
2497
|
.description(`Create a new MSG91 provider.`)
|
|
2498
2498
|
.requiredOption(`--providerId <providerId>`, `Provider ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
|
|
2499
2499
|
.requiredOption(`--name <name>`, `Provider name.`)
|
|
2500
|
-
.option(`--
|
|
2501
|
-
.option(`--senderId <senderId>`, `Msg91
|
|
2502
|
-
.option(`--authKey <authKey>`, `Msg91
|
|
2500
|
+
.option(`--templateId <templateId>`, `Msg91 template ID`)
|
|
2501
|
+
.option(`--senderId <senderId>`, `Msg91 sender ID.`)
|
|
2502
|
+
.option(`--authKey <authKey>`, `Msg91 auth key.`)
|
|
2503
2503
|
.option(`--enabled <enabled>`, `Set as enabled.`, parseBool)
|
|
2504
2504
|
.action(actionRunner(messagingCreateMsg91Provider))
|
|
2505
2505
|
|
|
@@ -2509,9 +2509,9 @@ messaging
|
|
|
2509
2509
|
.requiredOption(`--providerId <providerId>`, `Provider ID.`)
|
|
2510
2510
|
.option(`--name <name>`, `Provider name.`)
|
|
2511
2511
|
.option(`--enabled <enabled>`, `Set as enabled.`, parseBool)
|
|
2512
|
-
.option(`--
|
|
2513
|
-
.option(`--
|
|
2514
|
-
.option(`--
|
|
2512
|
+
.option(`--templateId <templateId>`, `Msg91 template ID.`)
|
|
2513
|
+
.option(`--senderId <senderId>`, `Msg91 sender ID.`)
|
|
2514
|
+
.option(`--authKey <authKey>`, `Msg91 auth key.`)
|
|
2515
2515
|
.action(actionRunner(messagingUpdateMsg91Provider))
|
|
2516
2516
|
|
|
2517
2517
|
messaging
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "appwrite-cli",
|
|
3
3
|
"homepage": "https://appwrite.io/support",
|
|
4
4
|
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
|
|
5
|
-
"version": "5.0.
|
|
5
|
+
"version": "5.0.2",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"bin": {
|
package/scoop/appwrite.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
4
4
|
"description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.",
|
|
5
5
|
"homepage": "https://github.com/appwrite/sdk-for-cli",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"architecture": {
|
|
8
8
|
"64bit": {
|
|
9
|
-
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.
|
|
9
|
+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.2/appwrite-cli-win-x64.exe",
|
|
10
10
|
"bin": [
|
|
11
11
|
[
|
|
12
12
|
"appwrite-cli-win-x64.exe",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"arm64": {
|
|
18
|
-
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.
|
|
18
|
+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.2/appwrite-cli-win-arm64.exe",
|
|
19
19
|
"bin": [
|
|
20
20
|
[
|
|
21
21
|
"appwrite-cli-win-arm64.exe",
|