appwrite-cli 10.2.3 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/README.md +2 -2
- package/docs/examples/messaging/create-resend-provider.md +3 -0
- package/docs/examples/messaging/update-resend-provider.md +2 -0
- package/docs/examples/migrations/create-csv-export.md +4 -0
- package/docs/examples/migrations/{create-csv-migration.md → create-csv-import.md} +1 -1
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +2 -2
- package/lib/commands/account.js +12 -2
- package/lib/commands/databases.js +30 -5
- package/lib/commands/functions.js +24 -4
- package/lib/commands/messaging.js +201 -9
- package/lib/commands/migrations.js +100 -8
- package/lib/commands/projects.js +24 -4
- package/lib/commands/proxy.js +6 -1
- package/lib/commands/push.js +123 -2
- package/lib/commands/sites.js +18 -3
- package/lib/commands/storage.js +12 -2
- package/lib/commands/tables-db.js +30 -5
- package/lib/commands/teams.js +18 -3
- package/lib/commands/tokens.js +6 -1
- package/lib/commands/users.js +36 -6
- package/lib/commands/vcs.js +6 -1
- package/lib/parser.js +1 -1
- package/package.json +2 -2
- package/scoop/appwrite.config.json +3 -3
|
@@ -43,6 +43,7 @@ const messaging = new Command("messaging").description(commandDescriptions['mess
|
|
|
43
43
|
* @typedef {Object} MessagingListMessagesRequestParams
|
|
44
44
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType
|
|
45
45
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
46
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
46
47
|
* @property {boolean} overrideForCli
|
|
47
48
|
* @property {boolean} parseOutput
|
|
48
49
|
* @property {libClient | undefined} sdk
|
|
@@ -51,7 +52,7 @@ const messaging = new Command("messaging").description(commandDescriptions['mess
|
|
|
51
52
|
/**
|
|
52
53
|
* @param {MessagingListMessagesRequestParams} params
|
|
53
54
|
*/
|
|
54
|
-
const messagingListMessages = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
55
|
+
const messagingListMessages = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
55
56
|
let client = !sdk ? await sdkForProject() :
|
|
56
57
|
sdk;
|
|
57
58
|
let apiPath = '/messaging/messages';
|
|
@@ -62,6 +63,9 @@ const messagingListMessages = async ({queries,search,parseOutput = true, overrid
|
|
|
62
63
|
if (typeof search !== 'undefined') {
|
|
63
64
|
payload['search'] = search;
|
|
64
65
|
}
|
|
66
|
+
if (typeof total !== 'undefined') {
|
|
67
|
+
payload['total'] = total;
|
|
68
|
+
}
|
|
65
69
|
|
|
66
70
|
let response = undefined;
|
|
67
71
|
|
|
@@ -639,6 +643,7 @@ const messagingDelete = async ({messageId,parseOutput = true, overrideForCli = f
|
|
|
639
643
|
* @typedef {Object} MessagingListMessageLogsRequestParams
|
|
640
644
|
* @property {string} messageId Message ID.
|
|
641
645
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
646
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
642
647
|
* @property {boolean} overrideForCli
|
|
643
648
|
* @property {boolean} parseOutput
|
|
644
649
|
* @property {libClient | undefined} sdk
|
|
@@ -647,7 +652,7 @@ const messagingDelete = async ({messageId,parseOutput = true, overrideForCli = f
|
|
|
647
652
|
/**
|
|
648
653
|
* @param {MessagingListMessageLogsRequestParams} params
|
|
649
654
|
*/
|
|
650
|
-
const messagingListMessageLogs = async ({messageId,queries,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
655
|
+
const messagingListMessageLogs = async ({messageId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
651
656
|
let client = !sdk ? await sdkForProject() :
|
|
652
657
|
sdk;
|
|
653
658
|
let apiPath = '/messaging/messages/{messageId}/logs'.replace('{messageId}', messageId);
|
|
@@ -655,6 +660,9 @@ const messagingListMessageLogs = async ({messageId,queries,parseOutput = true, o
|
|
|
655
660
|
if (typeof queries !== 'undefined') {
|
|
656
661
|
payload['queries'] = queries;
|
|
657
662
|
}
|
|
663
|
+
if (typeof total !== 'undefined') {
|
|
664
|
+
payload['total'] = total;
|
|
665
|
+
}
|
|
658
666
|
|
|
659
667
|
let response = undefined;
|
|
660
668
|
|
|
@@ -676,6 +684,7 @@ const messagingListMessageLogs = async ({messageId,queries,parseOutput = true, o
|
|
|
676
684
|
* @typedef {Object} MessagingListTargetsRequestParams
|
|
677
685
|
* @property {string} messageId Message ID.
|
|
678
686
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType
|
|
687
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
679
688
|
* @property {boolean} overrideForCli
|
|
680
689
|
* @property {boolean} parseOutput
|
|
681
690
|
* @property {libClient | undefined} sdk
|
|
@@ -684,7 +693,7 @@ const messagingListMessageLogs = async ({messageId,queries,parseOutput = true, o
|
|
|
684
693
|
/**
|
|
685
694
|
* @param {MessagingListTargetsRequestParams} params
|
|
686
695
|
*/
|
|
687
|
-
const messagingListTargets = async ({messageId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
696
|
+
const messagingListTargets = async ({messageId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
688
697
|
let client = !sdk ? await sdkForProject() :
|
|
689
698
|
sdk;
|
|
690
699
|
let apiPath = '/messaging/messages/{messageId}/targets'.replace('{messageId}', messageId);
|
|
@@ -692,6 +701,9 @@ const messagingListTargets = async ({messageId,queries,parseOutput = true, overr
|
|
|
692
701
|
if (typeof queries !== 'undefined') {
|
|
693
702
|
payload['queries'] = queries;
|
|
694
703
|
}
|
|
704
|
+
if (typeof total !== 'undefined') {
|
|
705
|
+
payload['total'] = total;
|
|
706
|
+
}
|
|
695
707
|
|
|
696
708
|
let response = undefined;
|
|
697
709
|
|
|
@@ -709,6 +721,7 @@ const messagingListTargets = async ({messageId,queries,parseOutput = true, overr
|
|
|
709
721
|
* @typedef {Object} MessagingListProvidersRequestParams
|
|
710
722
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
|
|
711
723
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
724
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
712
725
|
* @property {boolean} overrideForCli
|
|
713
726
|
* @property {boolean} parseOutput
|
|
714
727
|
* @property {libClient | undefined} sdk
|
|
@@ -717,7 +730,7 @@ const messagingListTargets = async ({messageId,queries,parseOutput = true, overr
|
|
|
717
730
|
/**
|
|
718
731
|
* @param {MessagingListProvidersRequestParams} params
|
|
719
732
|
*/
|
|
720
|
-
const messagingListProviders = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
733
|
+
const messagingListProviders = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
721
734
|
let client = !sdk ? await sdkForProject() :
|
|
722
735
|
sdk;
|
|
723
736
|
let apiPath = '/messaging/providers';
|
|
@@ -728,6 +741,9 @@ const messagingListProviders = async ({queries,search,parseOutput = true, overri
|
|
|
728
741
|
if (typeof search !== 'undefined') {
|
|
729
742
|
payload['search'] = search;
|
|
730
743
|
}
|
|
744
|
+
if (typeof total !== 'undefined') {
|
|
745
|
+
payload['total'] = total;
|
|
746
|
+
}
|
|
731
747
|
|
|
732
748
|
let response = undefined;
|
|
733
749
|
|
|
@@ -1188,6 +1204,125 @@ const messagingUpdateMsg91Provider = async ({providerId,name,enabled,templateId,
|
|
|
1188
1204
|
|
|
1189
1205
|
return response;
|
|
1190
1206
|
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* @typedef {Object} MessagingCreateResendProviderRequestParams
|
|
1210
|
+
* @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.
|
|
1211
|
+
* @property {string} name Provider name.
|
|
1212
|
+
* @property {string} apiKey Resend API key.
|
|
1213
|
+
* @property {string} fromName Sender Name.
|
|
1214
|
+
* @property {string} fromEmail Sender email address.
|
|
1215
|
+
* @property {string} replyToName Name set in the reply to field for the mail. Default value is sender name.
|
|
1216
|
+
* @property {string} replyToEmail Email set in the reply to field for the mail. Default value is sender email.
|
|
1217
|
+
* @property {boolean} enabled Set as enabled.
|
|
1218
|
+
* @property {boolean} overrideForCli
|
|
1219
|
+
* @property {boolean} parseOutput
|
|
1220
|
+
* @property {libClient | undefined} sdk
|
|
1221
|
+
*/
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* @param {MessagingCreateResendProviderRequestParams} params
|
|
1225
|
+
*/
|
|
1226
|
+
const messagingCreateResendProvider = async ({providerId,name,apiKey,fromName,fromEmail,replyToName,replyToEmail,enabled,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1227
|
+
let client = !sdk ? await sdkForProject() :
|
|
1228
|
+
sdk;
|
|
1229
|
+
let apiPath = '/messaging/providers/resend';
|
|
1230
|
+
let payload = {};
|
|
1231
|
+
if (typeof providerId !== 'undefined') {
|
|
1232
|
+
payload['providerId'] = providerId;
|
|
1233
|
+
}
|
|
1234
|
+
if (typeof name !== 'undefined') {
|
|
1235
|
+
payload['name'] = name;
|
|
1236
|
+
}
|
|
1237
|
+
if (typeof apiKey !== 'undefined') {
|
|
1238
|
+
payload['apiKey'] = apiKey;
|
|
1239
|
+
}
|
|
1240
|
+
if (typeof fromName !== 'undefined') {
|
|
1241
|
+
payload['fromName'] = fromName;
|
|
1242
|
+
}
|
|
1243
|
+
if (typeof fromEmail !== 'undefined') {
|
|
1244
|
+
payload['fromEmail'] = fromEmail;
|
|
1245
|
+
}
|
|
1246
|
+
if (typeof replyToName !== 'undefined') {
|
|
1247
|
+
payload['replyToName'] = replyToName;
|
|
1248
|
+
}
|
|
1249
|
+
if (typeof replyToEmail !== 'undefined') {
|
|
1250
|
+
payload['replyToEmail'] = replyToEmail;
|
|
1251
|
+
}
|
|
1252
|
+
if (typeof enabled !== 'undefined') {
|
|
1253
|
+
payload['enabled'] = enabled;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
let response = undefined;
|
|
1257
|
+
|
|
1258
|
+
response = await client.call('post', apiPath, {
|
|
1259
|
+
'content-type': 'application/json',
|
|
1260
|
+
}, payload);
|
|
1261
|
+
|
|
1262
|
+
if (parseOutput) {
|
|
1263
|
+
parse(response)
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
return response;
|
|
1267
|
+
|
|
1268
|
+
}
|
|
1269
|
+
/**
|
|
1270
|
+
* @typedef {Object} MessagingUpdateResendProviderRequestParams
|
|
1271
|
+
* @property {string} providerId Provider ID.
|
|
1272
|
+
* @property {string} name Provider name.
|
|
1273
|
+
* @property {boolean} enabled Set as enabled.
|
|
1274
|
+
* @property {string} apiKey Resend API key.
|
|
1275
|
+
* @property {string} fromName Sender Name.
|
|
1276
|
+
* @property {string} fromEmail Sender email address.
|
|
1277
|
+
* @property {string} replyToName Name set in the Reply To field for the mail. Default value is Sender Name.
|
|
1278
|
+
* @property {string} replyToEmail Email set in the Reply To field for the mail. Default value is Sender Email.
|
|
1279
|
+
* @property {boolean} overrideForCli
|
|
1280
|
+
* @property {boolean} parseOutput
|
|
1281
|
+
* @property {libClient | undefined} sdk
|
|
1282
|
+
*/
|
|
1283
|
+
|
|
1284
|
+
/**
|
|
1285
|
+
* @param {MessagingUpdateResendProviderRequestParams} params
|
|
1286
|
+
*/
|
|
1287
|
+
const messagingUpdateResendProvider = async ({providerId,name,enabled,apiKey,fromName,fromEmail,replyToName,replyToEmail,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1288
|
+
let client = !sdk ? await sdkForProject() :
|
|
1289
|
+
sdk;
|
|
1290
|
+
let apiPath = '/messaging/providers/resend/{providerId}'.replace('{providerId}', providerId);
|
|
1291
|
+
let payload = {};
|
|
1292
|
+
if (typeof name !== 'undefined') {
|
|
1293
|
+
payload['name'] = name;
|
|
1294
|
+
}
|
|
1295
|
+
if (typeof enabled !== 'undefined') {
|
|
1296
|
+
payload['enabled'] = enabled;
|
|
1297
|
+
}
|
|
1298
|
+
if (typeof apiKey !== 'undefined') {
|
|
1299
|
+
payload['apiKey'] = apiKey;
|
|
1300
|
+
}
|
|
1301
|
+
if (typeof fromName !== 'undefined') {
|
|
1302
|
+
payload['fromName'] = fromName;
|
|
1303
|
+
}
|
|
1304
|
+
if (typeof fromEmail !== 'undefined') {
|
|
1305
|
+
payload['fromEmail'] = fromEmail;
|
|
1306
|
+
}
|
|
1307
|
+
if (typeof replyToName !== 'undefined') {
|
|
1308
|
+
payload['replyToName'] = replyToName;
|
|
1309
|
+
}
|
|
1310
|
+
if (typeof replyToEmail !== 'undefined') {
|
|
1311
|
+
payload['replyToEmail'] = replyToEmail;
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
let response = undefined;
|
|
1315
|
+
|
|
1316
|
+
response = await client.call('patch', apiPath, {
|
|
1317
|
+
'content-type': 'application/json',
|
|
1318
|
+
}, payload);
|
|
1319
|
+
|
|
1320
|
+
if (parseOutput) {
|
|
1321
|
+
parse(response)
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
return response;
|
|
1325
|
+
|
|
1191
1326
|
}
|
|
1192
1327
|
/**
|
|
1193
1328
|
* @typedef {Object} MessagingCreateSendgridProviderRequestParams
|
|
@@ -1954,6 +2089,7 @@ const messagingDeleteProvider = async ({providerId,parseOutput = true, overrideF
|
|
|
1954
2089
|
* @typedef {Object} MessagingListProviderLogsRequestParams
|
|
1955
2090
|
* @property {string} providerId Provider ID.
|
|
1956
2091
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
2092
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
1957
2093
|
* @property {boolean} overrideForCli
|
|
1958
2094
|
* @property {boolean} parseOutput
|
|
1959
2095
|
* @property {libClient | undefined} sdk
|
|
@@ -1962,7 +2098,7 @@ const messagingDeleteProvider = async ({providerId,parseOutput = true, overrideF
|
|
|
1962
2098
|
/**
|
|
1963
2099
|
* @param {MessagingListProviderLogsRequestParams} params
|
|
1964
2100
|
*/
|
|
1965
|
-
const messagingListProviderLogs = async ({providerId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2101
|
+
const messagingListProviderLogs = async ({providerId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1966
2102
|
let client = !sdk ? await sdkForProject() :
|
|
1967
2103
|
sdk;
|
|
1968
2104
|
let apiPath = '/messaging/providers/{providerId}/logs'.replace('{providerId}', providerId);
|
|
@@ -1970,6 +2106,9 @@ const messagingListProviderLogs = async ({providerId,queries,parseOutput = true,
|
|
|
1970
2106
|
if (typeof queries !== 'undefined') {
|
|
1971
2107
|
payload['queries'] = queries;
|
|
1972
2108
|
}
|
|
2109
|
+
if (typeof total !== 'undefined') {
|
|
2110
|
+
payload['total'] = total;
|
|
2111
|
+
}
|
|
1973
2112
|
|
|
1974
2113
|
let response = undefined;
|
|
1975
2114
|
|
|
@@ -1987,6 +2126,7 @@ const messagingListProviderLogs = async ({providerId,queries,parseOutput = true,
|
|
|
1987
2126
|
* @typedef {Object} MessagingListSubscriberLogsRequestParams
|
|
1988
2127
|
* @property {string} subscriberId Subscriber ID.
|
|
1989
2128
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
2129
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
1990
2130
|
* @property {boolean} overrideForCli
|
|
1991
2131
|
* @property {boolean} parseOutput
|
|
1992
2132
|
* @property {libClient | undefined} sdk
|
|
@@ -1995,7 +2135,7 @@ const messagingListProviderLogs = async ({providerId,queries,parseOutput = true,
|
|
|
1995
2135
|
/**
|
|
1996
2136
|
* @param {MessagingListSubscriberLogsRequestParams} params
|
|
1997
2137
|
*/
|
|
1998
|
-
const messagingListSubscriberLogs = async ({subscriberId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2138
|
+
const messagingListSubscriberLogs = async ({subscriberId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
1999
2139
|
let client = !sdk ? await sdkForProject() :
|
|
2000
2140
|
sdk;
|
|
2001
2141
|
let apiPath = '/messaging/subscribers/{subscriberId}/logs'.replace('{subscriberId}', subscriberId);
|
|
@@ -2003,6 +2143,9 @@ const messagingListSubscriberLogs = async ({subscriberId,queries,parseOutput = t
|
|
|
2003
2143
|
if (typeof queries !== 'undefined') {
|
|
2004
2144
|
payload['queries'] = queries;
|
|
2005
2145
|
}
|
|
2146
|
+
if (typeof total !== 'undefined') {
|
|
2147
|
+
payload['total'] = total;
|
|
2148
|
+
}
|
|
2006
2149
|
|
|
2007
2150
|
let response = undefined;
|
|
2008
2151
|
|
|
@@ -2020,6 +2163,7 @@ const messagingListSubscriberLogs = async ({subscriberId,queries,parseOutput = t
|
|
|
2020
2163
|
* @typedef {Object} MessagingListTopicsRequestParams
|
|
2021
2164
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal
|
|
2022
2165
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
2166
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
2023
2167
|
* @property {boolean} overrideForCli
|
|
2024
2168
|
* @property {boolean} parseOutput
|
|
2025
2169
|
* @property {libClient | undefined} sdk
|
|
@@ -2028,7 +2172,7 @@ const messagingListSubscriberLogs = async ({subscriberId,queries,parseOutput = t
|
|
|
2028
2172
|
/**
|
|
2029
2173
|
* @param {MessagingListTopicsRequestParams} params
|
|
2030
2174
|
*/
|
|
2031
|
-
const messagingListTopics = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2175
|
+
const messagingListTopics = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2032
2176
|
let client = !sdk ? await sdkForProject() :
|
|
2033
2177
|
sdk;
|
|
2034
2178
|
let apiPath = '/messaging/topics';
|
|
@@ -2039,6 +2183,9 @@ const messagingListTopics = async ({queries,search,parseOutput = true, overrideF
|
|
|
2039
2183
|
if (typeof search !== 'undefined') {
|
|
2040
2184
|
payload['search'] = search;
|
|
2041
2185
|
}
|
|
2186
|
+
if (typeof total !== 'undefined') {
|
|
2187
|
+
payload['total'] = total;
|
|
2188
|
+
}
|
|
2042
2189
|
|
|
2043
2190
|
let response = undefined;
|
|
2044
2191
|
|
|
@@ -2204,6 +2351,7 @@ const messagingDeleteTopic = async ({topicId,parseOutput = true, overrideForCli
|
|
|
2204
2351
|
* @typedef {Object} MessagingListTopicLogsRequestParams
|
|
2205
2352
|
* @property {string} topicId Topic ID.
|
|
2206
2353
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
|
|
2354
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
2207
2355
|
* @property {boolean} overrideForCli
|
|
2208
2356
|
* @property {boolean} parseOutput
|
|
2209
2357
|
* @property {libClient | undefined} sdk
|
|
@@ -2212,7 +2360,7 @@ const messagingDeleteTopic = async ({topicId,parseOutput = true, overrideForCli
|
|
|
2212
2360
|
/**
|
|
2213
2361
|
* @param {MessagingListTopicLogsRequestParams} params
|
|
2214
2362
|
*/
|
|
2215
|
-
const messagingListTopicLogs = async ({topicId,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2363
|
+
const messagingListTopicLogs = async ({topicId,queries,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
2216
2364
|
let client = !sdk ? await sdkForProject() :
|
|
2217
2365
|
sdk;
|
|
2218
2366
|
let apiPath = '/messaging/topics/{topicId}/logs'.replace('{topicId}', topicId);
|
|
@@ -2220,6 +2368,9 @@ const messagingListTopicLogs = async ({topicId,queries,parseOutput = true, overr
|
|
|
2220
2368
|
if (typeof queries !== 'undefined') {
|
|
2221
2369
|
payload['queries'] = queries;
|
|
2222
2370
|
}
|
|
2371
|
+
if (typeof total !== 'undefined') {
|
|
2372
|
+
payload['total'] = total;
|
|
2373
|
+
}
|
|
2223
2374
|
|
|
2224
2375
|
let response = undefined;
|
|
2225
2376
|
|
|
@@ -2238,6 +2389,7 @@ const messagingListTopicLogs = async ({topicId,queries,parseOutput = true, overr
|
|
|
2238
2389
|
* @property {string} topicId Topic ID. The topic ID subscribed to.
|
|
2239
2390
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
|
|
2240
2391
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
2392
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
2241
2393
|
* @property {boolean} overrideForCli
|
|
2242
2394
|
* @property {boolean} parseOutput
|
|
2243
2395
|
* @property {libClient | undefined} sdk
|
|
@@ -2246,7 +2398,7 @@ const messagingListTopicLogs = async ({topicId,queries,parseOutput = true, overr
|
|
|
2246
2398
|
/**
|
|
2247
2399
|
* @param {MessagingListSubscribersRequestParams} params
|
|
2248
2400
|
*/
|
|
2249
|
-
const messagingListSubscribers = async ({topicId,queries,search,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2401
|
+
const messagingListSubscribers = async ({topicId,queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined, console}) => {
|
|
2250
2402
|
let client = !sdk ? await sdkForProject() :
|
|
2251
2403
|
sdk;
|
|
2252
2404
|
let apiPath = '/messaging/topics/{topicId}/subscribers'.replace('{topicId}', topicId);
|
|
@@ -2257,6 +2409,9 @@ const messagingListSubscribers = async ({topicId,queries,search,parseOutput = tr
|
|
|
2257
2409
|
if (typeof search !== 'undefined') {
|
|
2258
2410
|
payload['search'] = search;
|
|
2259
2411
|
}
|
|
2412
|
+
if (typeof total !== 'undefined') {
|
|
2413
|
+
payload['total'] = total;
|
|
2414
|
+
}
|
|
2260
2415
|
|
|
2261
2416
|
let response = undefined;
|
|
2262
2417
|
|
|
@@ -2378,6 +2533,7 @@ messaging
|
|
|
2378
2533
|
.description(`Get a list of all messages from the current Appwrite project.`)
|
|
2379
2534
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType`)
|
|
2380
2535
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2536
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2381
2537
|
.option(`--console`, `Get the resource console url`)
|
|
2382
2538
|
.action(actionRunner(messagingListMessages))
|
|
2383
2539
|
|
|
@@ -2505,6 +2661,7 @@ messaging
|
|
|
2505
2661
|
.description(`Get the message activity logs listed by its unique ID.`)
|
|
2506
2662
|
.requiredOption(`--message-id <message-id>`, `Message ID.`)
|
|
2507
2663
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
|
|
2664
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2508
2665
|
.option(`--console`, `Get the resource console url`)
|
|
2509
2666
|
.action(actionRunner(messagingListMessageLogs))
|
|
2510
2667
|
|
|
@@ -2513,6 +2670,7 @@ messaging
|
|
|
2513
2670
|
.description(`Get a list of the targets associated with a message.`)
|
|
2514
2671
|
.requiredOption(`--message-id <message-id>`, `Message ID.`)
|
|
2515
2672
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType`)
|
|
2673
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2516
2674
|
.action(actionRunner(messagingListTargets))
|
|
2517
2675
|
|
|
2518
2676
|
messaging
|
|
@@ -2520,6 +2678,7 @@ messaging
|
|
|
2520
2678
|
.description(`Get a list of all providers from the current Appwrite project.`)
|
|
2521
2679
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled`)
|
|
2522
2680
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2681
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2523
2682
|
.option(`--console`, `Get the resource console url`)
|
|
2524
2683
|
.action(actionRunner(messagingListProviders))
|
|
2525
2684
|
|
|
@@ -2619,6 +2778,32 @@ messaging
|
|
|
2619
2778
|
.option(`--auth-key <auth-key>`, `Msg91 auth key.`)
|
|
2620
2779
|
.action(actionRunner(messagingUpdateMsg91Provider))
|
|
2621
2780
|
|
|
2781
|
+
messaging
|
|
2782
|
+
.command(`create-resend-provider`)
|
|
2783
|
+
.description(`Create a new Resend provider.`)
|
|
2784
|
+
.requiredOption(`--provider-id <provider-id>`, `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.`)
|
|
2785
|
+
.requiredOption(`--name <name>`, `Provider name.`)
|
|
2786
|
+
.option(`--api-key <api-key>`, `Resend API key.`)
|
|
2787
|
+
.option(`--from-name <from-name>`, `Sender Name.`)
|
|
2788
|
+
.option(`--from-email <from-email>`, `Sender email address.`)
|
|
2789
|
+
.option(`--reply-to-name <reply-to-name>`, `Name set in the reply to field for the mail. Default value is sender name.`)
|
|
2790
|
+
.option(`--reply-to-email <reply-to-email>`, `Email set in the reply to field for the mail. Default value is sender email.`)
|
|
2791
|
+
.option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
|
|
2792
|
+
.action(actionRunner(messagingCreateResendProvider))
|
|
2793
|
+
|
|
2794
|
+
messaging
|
|
2795
|
+
.command(`update-resend-provider`)
|
|
2796
|
+
.description(`Update a Resend provider by its unique ID.`)
|
|
2797
|
+
.requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
|
|
2798
|
+
.option(`--name <name>`, `Provider name.`)
|
|
2799
|
+
.option(`--enabled [value]`, `Set as enabled.`, (value) => value === undefined ? true : parseBool(value))
|
|
2800
|
+
.option(`--api-key <api-key>`, `Resend API key.`)
|
|
2801
|
+
.option(`--from-name <from-name>`, `Sender Name.`)
|
|
2802
|
+
.option(`--from-email <from-email>`, `Sender email address.`)
|
|
2803
|
+
.option(`--reply-to-name <reply-to-name>`, `Name set in the Reply To field for the mail. Default value is Sender Name.`)
|
|
2804
|
+
.option(`--reply-to-email <reply-to-email>`, `Email set in the Reply To field for the mail. Default value is Sender Email.`)
|
|
2805
|
+
.action(actionRunner(messagingUpdateResendProvider))
|
|
2806
|
+
|
|
2622
2807
|
messaging
|
|
2623
2808
|
.command(`create-sendgrid-provider`)
|
|
2624
2809
|
.description(`Create a new Sendgrid provider.`)
|
|
@@ -2789,6 +2974,7 @@ messaging
|
|
|
2789
2974
|
.description(`Get the provider activity logs listed by its unique ID.`)
|
|
2790
2975
|
.requiredOption(`--provider-id <provider-id>`, `Provider ID.`)
|
|
2791
2976
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
|
|
2977
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2792
2978
|
.action(actionRunner(messagingListProviderLogs))
|
|
2793
2979
|
|
|
2794
2980
|
messaging
|
|
@@ -2796,6 +2982,7 @@ messaging
|
|
|
2796
2982
|
.description(`Get the subscriber activity logs listed by its unique ID.`)
|
|
2797
2983
|
.requiredOption(`--subscriber-id <subscriber-id>`, `Subscriber ID.`)
|
|
2798
2984
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
|
|
2985
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2799
2986
|
.action(actionRunner(messagingListSubscriberLogs))
|
|
2800
2987
|
|
|
2801
2988
|
messaging
|
|
@@ -2803,6 +2990,7 @@ messaging
|
|
|
2803
2990
|
.description(`Get a list of all topics from the current Appwrite project.`)
|
|
2804
2991
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal`)
|
|
2805
2992
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
2993
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2806
2994
|
.option(`--console`, `Get the resource console url`)
|
|
2807
2995
|
.action(actionRunner(messagingListTopics))
|
|
2808
2996
|
|
|
@@ -2840,6 +3028,7 @@ messaging
|
|
|
2840
3028
|
.description(`Get the topic activity logs listed by its unique ID.`)
|
|
2841
3029
|
.requiredOption(`--topic-id <topic-id>`, `Topic ID.`)
|
|
2842
3030
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
|
|
3031
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2843
3032
|
.action(actionRunner(messagingListTopicLogs))
|
|
2844
3033
|
|
|
2845
3034
|
messaging
|
|
@@ -2848,6 +3037,7 @@ messaging
|
|
|
2848
3037
|
.requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID subscribed to.`)
|
|
2849
3038
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled`)
|
|
2850
3039
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
3040
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
2851
3041
|
.option(`--console`, `Get the resource console url`)
|
|
2852
3042
|
.action(actionRunner(messagingListSubscribers))
|
|
2853
3043
|
|
|
@@ -2895,6 +3085,8 @@ module.exports = {
|
|
|
2895
3085
|
messagingUpdateMailgunProvider,
|
|
2896
3086
|
messagingCreateMsg91Provider,
|
|
2897
3087
|
messagingUpdateMsg91Provider,
|
|
3088
|
+
messagingCreateResendProvider,
|
|
3089
|
+
messagingUpdateResendProvider,
|
|
2898
3090
|
messagingCreateSendgridProvider,
|
|
2899
3091
|
messagingUpdateSendgridProvider,
|
|
2900
3092
|
messagingCreateSMTPProvider,
|
|
@@ -43,6 +43,7 @@ const migrations = new Command("migrations").description(commandDescriptions['mi
|
|
|
43
43
|
* @typedef {Object} MigrationsListRequestParams
|
|
44
44
|
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors
|
|
45
45
|
* @property {string} search Search term to filter your list results. Max length: 256 chars.
|
|
46
|
+
* @property {boolean} total When set to false, the total count returned will be 0 and will not be calculated.
|
|
46
47
|
* @property {boolean} overrideForCli
|
|
47
48
|
* @property {boolean} parseOutput
|
|
48
49
|
* @property {libClient | undefined} sdk
|
|
@@ -51,7 +52,7 @@ const migrations = new Command("migrations").description(commandDescriptions['mi
|
|
|
51
52
|
/**
|
|
52
53
|
* @param {MigrationsListRequestParams} params
|
|
53
54
|
*/
|
|
54
|
-
const migrationsList = async ({queries,search,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
55
|
+
const migrationsList = async ({queries,search,total,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
55
56
|
let client = !sdk ? await sdkForProject() :
|
|
56
57
|
sdk;
|
|
57
58
|
let apiPath = '/migrations';
|
|
@@ -62,6 +63,9 @@ const migrationsList = async ({queries,search,parseOutput = true, overrideForCli
|
|
|
62
63
|
if (typeof search !== 'undefined') {
|
|
63
64
|
payload['search'] = search;
|
|
64
65
|
}
|
|
66
|
+
if (typeof total !== 'undefined') {
|
|
67
|
+
payload['total'] = total;
|
|
68
|
+
}
|
|
65
69
|
|
|
66
70
|
let response = undefined;
|
|
67
71
|
|
|
@@ -166,7 +170,78 @@ const migrationsGetAppwriteReport = async ({resources,endpoint,projectID,key,par
|
|
|
166
170
|
|
|
167
171
|
}
|
|
168
172
|
/**
|
|
169
|
-
* @typedef {Object}
|
|
173
|
+
* @typedef {Object} MigrationsCreateCSVExportRequestParams
|
|
174
|
+
* @property {string} resourceId Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.
|
|
175
|
+
* @property {string} bucketId Storage bucket unique ID where the exported CSV will be stored.
|
|
176
|
+
* @property {string} filename The name of the file to be created for the export, excluding the .csv extension.
|
|
177
|
+
* @property {string[]} columns List of attributes to export. If empty, all attributes will be exported. You can use the '*' wildcard to export all attributes from the collection.
|
|
178
|
+
* @property {string[]} queries Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
179
|
+
* @property {string} delimiter The character that separates each column value. Default is comma.
|
|
180
|
+
* @property {string} enclosure The character that encloses each column value. Default is double quotes.
|
|
181
|
+
* @property {string} escape The escape character for the enclosure character. Default is double quotes.
|
|
182
|
+
* @property {boolean} header Whether to include the header row with column names. Default is true.
|
|
183
|
+
* @property {boolean} notify Set to true to receive an email when the export is complete. Default is true.
|
|
184
|
+
* @property {boolean} overrideForCli
|
|
185
|
+
* @property {boolean} parseOutput
|
|
186
|
+
* @property {libClient | undefined} sdk
|
|
187
|
+
*/
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* @param {MigrationsCreateCSVExportRequestParams} params
|
|
191
|
+
*/
|
|
192
|
+
const migrationsCreateCSVExport = async ({resourceId,bucketId,filename,columns,queries,delimiter,enclosure,escape,header,notify,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
193
|
+
let client = !sdk ? await sdkForProject() :
|
|
194
|
+
sdk;
|
|
195
|
+
let apiPath = '/migrations/csv/exports';
|
|
196
|
+
let payload = {};
|
|
197
|
+
if (typeof resourceId !== 'undefined') {
|
|
198
|
+
payload['resourceId'] = resourceId;
|
|
199
|
+
}
|
|
200
|
+
if (typeof bucketId !== 'undefined') {
|
|
201
|
+
payload['bucketId'] = bucketId;
|
|
202
|
+
}
|
|
203
|
+
if (typeof filename !== 'undefined') {
|
|
204
|
+
payload['filename'] = filename;
|
|
205
|
+
}
|
|
206
|
+
columns = columns === true ? [] : columns;
|
|
207
|
+
if (typeof columns !== 'undefined') {
|
|
208
|
+
payload['columns'] = columns;
|
|
209
|
+
}
|
|
210
|
+
queries = queries === true ? [] : queries;
|
|
211
|
+
if (typeof queries !== 'undefined') {
|
|
212
|
+
payload['queries'] = queries;
|
|
213
|
+
}
|
|
214
|
+
if (typeof delimiter !== 'undefined') {
|
|
215
|
+
payload['delimiter'] = delimiter;
|
|
216
|
+
}
|
|
217
|
+
if (typeof enclosure !== 'undefined') {
|
|
218
|
+
payload['enclosure'] = enclosure;
|
|
219
|
+
}
|
|
220
|
+
if (typeof escape !== 'undefined') {
|
|
221
|
+
payload['escape'] = escape;
|
|
222
|
+
}
|
|
223
|
+
if (typeof header !== 'undefined') {
|
|
224
|
+
payload['header'] = header;
|
|
225
|
+
}
|
|
226
|
+
if (typeof notify !== 'undefined') {
|
|
227
|
+
payload['notify'] = notify;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
let response = undefined;
|
|
231
|
+
|
|
232
|
+
response = await client.call('post', apiPath, {
|
|
233
|
+
'content-type': 'application/json',
|
|
234
|
+
}, payload);
|
|
235
|
+
|
|
236
|
+
if (parseOutput) {
|
|
237
|
+
parse(response)
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
return response;
|
|
241
|
+
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @typedef {Object} MigrationsCreateCSVImportRequestParams
|
|
170
245
|
* @property {string} bucketId Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).
|
|
171
246
|
* @property {string} fileId File ID.
|
|
172
247
|
* @property {string} resourceId Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.
|
|
@@ -177,12 +252,12 @@ const migrationsGetAppwriteReport = async ({resources,endpoint,projectID,key,par
|
|
|
177
252
|
*/
|
|
178
253
|
|
|
179
254
|
/**
|
|
180
|
-
* @param {
|
|
255
|
+
* @param {MigrationsCreateCSVImportRequestParams} params
|
|
181
256
|
*/
|
|
182
|
-
const
|
|
257
|
+
const migrationsCreateCSVImport = async ({bucketId,fileId,resourceId,internalFile,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
183
258
|
let client = !sdk ? await sdkForProject() :
|
|
184
259
|
sdk;
|
|
185
|
-
let apiPath = '/migrations/csv';
|
|
260
|
+
let apiPath = '/migrations/csv/imports';
|
|
186
261
|
let payload = {};
|
|
187
262
|
if (typeof bucketId !== 'undefined') {
|
|
188
263
|
payload['bucketId'] = bucketId;
|
|
@@ -614,6 +689,7 @@ migrations
|
|
|
614
689
|
.description(`List all migrations in the current project. This endpoint returns a list of all migrations including their status, progress, and any errors that occurred during the migration process.`)
|
|
615
690
|
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: status, stage, source, destination, resources, statusCounters, resourceData, errors`)
|
|
616
691
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
692
|
+
.option(`--total [value]`, `When set to false, the total count returned will be 0 and will not be calculated.`, (value) => value === undefined ? true : parseBool(value))
|
|
617
693
|
.action(actionRunner(migrationsList))
|
|
618
694
|
|
|
619
695
|
migrations
|
|
@@ -635,13 +711,28 @@ migrations
|
|
|
635
711
|
.action(actionRunner(migrationsGetAppwriteReport))
|
|
636
712
|
|
|
637
713
|
migrations
|
|
638
|
-
.command(`create-csv-
|
|
714
|
+
.command(`create-csv-export`)
|
|
715
|
+
.description(`Export documents to a CSV file from your Appwrite database. This endpoint allows you to export documents to a CSV file stored in an Appwrite Storage bucket.`)
|
|
716
|
+
.requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database to export.`)
|
|
717
|
+
.requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID where the exported CSV will be stored.`)
|
|
718
|
+
.requiredOption(`--filename <filename>`, `The name of the file to be created for the export, excluding the .csv extension.`)
|
|
719
|
+
.option(`--columns [columns...]`, `List of attributes to export. If empty, all attributes will be exported. You can use the '*' wildcard to export all attributes from the collection.`)
|
|
720
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK to filter documents to export. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long.`)
|
|
721
|
+
.option(`--delimiter <delimiter>`, `The character that separates each column value. Default is comma.`)
|
|
722
|
+
.option(`--enclosure <enclosure>`, `The character that encloses each column value. Default is double quotes.`)
|
|
723
|
+
.option(`--escape <escape>`, `The escape character for the enclosure character. Default is double quotes.`)
|
|
724
|
+
.option(`--header [value]`, `Whether to include the header row with column names. Default is true.`, (value) => value === undefined ? true : parseBool(value))
|
|
725
|
+
.option(`--notify [value]`, `Set to true to receive an email when the export is complete. Default is true.`, (value) => value === undefined ? true : parseBool(value))
|
|
726
|
+
.action(actionRunner(migrationsCreateCSVExport))
|
|
727
|
+
|
|
728
|
+
migrations
|
|
729
|
+
.command(`create-csv-import`)
|
|
639
730
|
.description(`Import documents from a CSV file into your Appwrite database. This endpoint allows you to import documents from a CSV file uploaded to Appwrite Storage bucket.`)
|
|
640
731
|
.requiredOption(`--bucket-id <bucket-id>`, `Storage bucket unique ID. You can create a new storage bucket using the Storage service [server integration](https://appwrite.io/docs/server/storage#createBucket).`)
|
|
641
732
|
.requiredOption(`--file-id <file-id>`, `File ID.`)
|
|
642
733
|
.requiredOption(`--resource-id <resource-id>`, `Composite ID in the format {databaseId:collectionId}, identifying a collection within a database.`)
|
|
643
734
|
.option(`--internal-file [value]`, `Is the file stored in an internal bucket?`, (value) => value === undefined ? true : parseBool(value))
|
|
644
|
-
.action(actionRunner(
|
|
735
|
+
.action(actionRunner(migrationsCreateCSVImport))
|
|
645
736
|
|
|
646
737
|
migrations
|
|
647
738
|
.command(`create-firebase-migration`)
|
|
@@ -730,7 +821,8 @@ module.exports = {
|
|
|
730
821
|
migrationsList,
|
|
731
822
|
migrationsCreateAppwriteMigration,
|
|
732
823
|
migrationsGetAppwriteReport,
|
|
733
|
-
|
|
824
|
+
migrationsCreateCSVExport,
|
|
825
|
+
migrationsCreateCSVImport,
|
|
734
826
|
migrationsCreateFirebaseMigration,
|
|
735
827
|
migrationsGetFirebaseReport,
|
|
736
828
|
migrationsCreateNHostMigration,
|