@appwrite.io/console 3.1.0 → 23.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/CHANGELOG.md +19 -0
- package/README.md +2 -2
- package/dist/cjs/sdk.js +345 -86
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +346 -87
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +345 -86
- package/docs/examples/databases/list-documents.md +2 -1
- package/docs/examples/domains/create-purchase.md +1 -1
- package/docs/examples/domains/create-transfer-in.md +18 -0
- package/docs/examples/domains/create-transfer-out.md +16 -0
- package/docs/examples/domains/get-transfer-status.md +15 -0
- package/docs/examples/health/get-console-pausing.md +16 -0
- package/docs/examples/migrations/create-appwrite-migration.md +2 -2
- package/docs/examples/migrations/create-firebase-migration.md +2 -2
- package/docs/examples/migrations/create-n-host-migration.md +2 -2
- package/docs/examples/migrations/create-supabase-migration.md +2 -2
- package/docs/examples/migrations/get-appwrite-report.md +2 -2
- package/docs/examples/migrations/get-firebase-report.md +2 -2
- package/docs/examples/migrations/get-n-host-report.md +2 -2
- package/docs/examples/migrations/get-supabase-report.md +2 -2
- package/docs/examples/projects/update-console-access.md +15 -0
- package/docs/examples/projects/update-status.md +16 -0
- package/docs/examples/sites/create-deployment.md +2 -2
- package/docs/examples/tablesdb/list-rows.md +2 -1
- package/package.json +1 -1
- package/src/channel.ts +19 -15
- package/src/client.ts +1 -1
- package/src/enums/appwrite-migration-resource.ts +21 -0
- package/src/enums/domain-transfer-status-status.ts +10 -0
- package/src/enums/firebase-migration-resource.ts +12 -0
- package/src/enums/{resources.ts → n-host-migration-resource.ts} +1 -1
- package/src/enums/status.ts +3 -0
- package/src/enums/supabase-migration-resource.ts +13 -0
- package/src/index.ts +6 -1
- package/src/models.ts +119 -2
- package/src/services/account.ts +2 -2
- package/src/services/databases.ts +100 -93
- package/src/services/domains.ts +216 -13
- package/src/services/health.ts +61 -0
- package/src/services/messaging.ts +2 -2
- package/src/services/migrations.ts +68 -65
- package/src/services/projects.ts +120 -0
- package/src/services/sites.ts +13 -16
- package/src/services/tables-db.ts +14 -7
- package/src/services/teams.ts +4 -4
- package/types/channel.d.ts +9 -9
- package/types/enums/appwrite-migration-resource.d.ts +21 -0
- package/types/enums/domain-transfer-status-status.d.ts +10 -0
- package/types/enums/firebase-migration-resource.d.ts +12 -0
- package/types/enums/{resources.d.ts → n-host-migration-resource.d.ts} +1 -1
- package/types/enums/status.d.ts +3 -0
- package/types/enums/supabase-migration-resource.d.ts +13 -0
- package/types/index.d.ts +6 -1
- package/types/models.d.ts +117 -2
- package/types/services/databases.d.ts +40 -37
- package/types/services/domains.d.ts +73 -4
- package/types/services/health.d.ts +24 -0
- package/types/services/messaging.d.ts +2 -2
- package/types/services/migrations.d.ts +36 -33
- package/types/services/projects.d.ts +46 -0
- package/types/services/sites.d.ts +4 -4
- package/types/services/tables-db.d.ts +4 -1
- package/types/services/teams.d.ts +4 -4
package/dist/iife/sdk.js
CHANGED
|
@@ -4332,7 +4332,7 @@
|
|
|
4332
4332
|
'x-sdk-name': 'Console',
|
|
4333
4333
|
'x-sdk-platform': 'console',
|
|
4334
4334
|
'x-sdk-language': 'web',
|
|
4335
|
-
'x-sdk-version': '
|
|
4335
|
+
'x-sdk-version': '23.0.0',
|
|
4336
4336
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
4337
4337
|
};
|
|
4338
4338
|
this.realtime = {
|
|
@@ -10025,6 +10025,48 @@
|
|
|
10025
10025
|
};
|
|
10026
10026
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
10027
10027
|
}
|
|
10028
|
+
updateRelationshipAttribute(paramsOrFirst, ...rest) {
|
|
10029
|
+
let params;
|
|
10030
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10031
|
+
params = (paramsOrFirst || {});
|
|
10032
|
+
}
|
|
10033
|
+
else {
|
|
10034
|
+
params = {
|
|
10035
|
+
databaseId: paramsOrFirst,
|
|
10036
|
+
collectionId: rest[0],
|
|
10037
|
+
key: rest[1],
|
|
10038
|
+
onDelete: rest[2],
|
|
10039
|
+
newKey: rest[3]
|
|
10040
|
+
};
|
|
10041
|
+
}
|
|
10042
|
+
const databaseId = params.databaseId;
|
|
10043
|
+
const collectionId = params.collectionId;
|
|
10044
|
+
const key = params.key;
|
|
10045
|
+
const onDelete = params.onDelete;
|
|
10046
|
+
const newKey = params.newKey;
|
|
10047
|
+
if (typeof databaseId === 'undefined') {
|
|
10048
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10049
|
+
}
|
|
10050
|
+
if (typeof collectionId === 'undefined') {
|
|
10051
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10052
|
+
}
|
|
10053
|
+
if (typeof key === 'undefined') {
|
|
10054
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
10055
|
+
}
|
|
10056
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
10057
|
+
const payload = {};
|
|
10058
|
+
if (typeof onDelete !== 'undefined') {
|
|
10059
|
+
payload['onDelete'] = onDelete;
|
|
10060
|
+
}
|
|
10061
|
+
if (typeof newKey !== 'undefined') {
|
|
10062
|
+
payload['newKey'] = newKey;
|
|
10063
|
+
}
|
|
10064
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10065
|
+
const apiHeaders = {
|
|
10066
|
+
'content-type': 'application/json',
|
|
10067
|
+
};
|
|
10068
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10069
|
+
}
|
|
10028
10070
|
createStringAttribute(paramsOrFirst, ...rest) {
|
|
10029
10071
|
let params;
|
|
10030
10072
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -10552,48 +10594,6 @@
|
|
|
10552
10594
|
};
|
|
10553
10595
|
return this.client.call('delete', uri, apiHeaders, payload);
|
|
10554
10596
|
}
|
|
10555
|
-
updateRelationshipAttribute(paramsOrFirst, ...rest) {
|
|
10556
|
-
let params;
|
|
10557
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10558
|
-
params = (paramsOrFirst || {});
|
|
10559
|
-
}
|
|
10560
|
-
else {
|
|
10561
|
-
params = {
|
|
10562
|
-
databaseId: paramsOrFirst,
|
|
10563
|
-
collectionId: rest[0],
|
|
10564
|
-
key: rest[1],
|
|
10565
|
-
onDelete: rest[2],
|
|
10566
|
-
newKey: rest[3]
|
|
10567
|
-
};
|
|
10568
|
-
}
|
|
10569
|
-
const databaseId = params.databaseId;
|
|
10570
|
-
const collectionId = params.collectionId;
|
|
10571
|
-
const key = params.key;
|
|
10572
|
-
const onDelete = params.onDelete;
|
|
10573
|
-
const newKey = params.newKey;
|
|
10574
|
-
if (typeof databaseId === 'undefined') {
|
|
10575
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10576
|
-
}
|
|
10577
|
-
if (typeof collectionId === 'undefined') {
|
|
10578
|
-
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
10579
|
-
}
|
|
10580
|
-
if (typeof key === 'undefined') {
|
|
10581
|
-
throw new AppwriteException('Missing required parameter: "key"');
|
|
10582
|
-
}
|
|
10583
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
10584
|
-
const payload = {};
|
|
10585
|
-
if (typeof onDelete !== 'undefined') {
|
|
10586
|
-
payload['onDelete'] = onDelete;
|
|
10587
|
-
}
|
|
10588
|
-
if (typeof newKey !== 'undefined') {
|
|
10589
|
-
payload['newKey'] = newKey;
|
|
10590
|
-
}
|
|
10591
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10592
|
-
const apiHeaders = {
|
|
10593
|
-
'content-type': 'application/json',
|
|
10594
|
-
};
|
|
10595
|
-
return this.client.call('patch', uri, apiHeaders, payload);
|
|
10596
|
-
}
|
|
10597
10597
|
listDocuments(paramsOrFirst, ...rest) {
|
|
10598
10598
|
let params;
|
|
10599
10599
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -10605,7 +10605,8 @@
|
|
|
10605
10605
|
collectionId: rest[0],
|
|
10606
10606
|
queries: rest[1],
|
|
10607
10607
|
transactionId: rest[2],
|
|
10608
|
-
total: rest[3]
|
|
10608
|
+
total: rest[3],
|
|
10609
|
+
ttl: rest[4]
|
|
10609
10610
|
};
|
|
10610
10611
|
}
|
|
10611
10612
|
const databaseId = params.databaseId;
|
|
@@ -10613,6 +10614,7 @@
|
|
|
10613
10614
|
const queries = params.queries;
|
|
10614
10615
|
const transactionId = params.transactionId;
|
|
10615
10616
|
const total = params.total;
|
|
10617
|
+
const ttl = params.ttl;
|
|
10616
10618
|
if (typeof databaseId === 'undefined') {
|
|
10617
10619
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
10618
10620
|
}
|
|
@@ -10630,6 +10632,9 @@
|
|
|
10630
10632
|
if (typeof total !== 'undefined') {
|
|
10631
10633
|
payload['total'] = total;
|
|
10632
10634
|
}
|
|
10635
|
+
if (typeof ttl !== 'undefined') {
|
|
10636
|
+
payload['ttl'] = ttl;
|
|
10637
|
+
}
|
|
10633
10638
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10634
10639
|
const apiHeaders = {};
|
|
10635
10640
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
@@ -11529,7 +11534,7 @@
|
|
|
11529
11534
|
else {
|
|
11530
11535
|
params = {
|
|
11531
11536
|
domain: paramsOrFirst,
|
|
11532
|
-
|
|
11537
|
+
organizationId: rest[0],
|
|
11533
11538
|
firstName: rest[1],
|
|
11534
11539
|
lastName: rest[2],
|
|
11535
11540
|
email: rest[3],
|
|
@@ -11542,7 +11547,7 @@
|
|
|
11542
11547
|
};
|
|
11543
11548
|
}
|
|
11544
11549
|
const domain = params.domain;
|
|
11545
|
-
const
|
|
11550
|
+
const organizationId = params.organizationId;
|
|
11546
11551
|
const firstName = params.firstName;
|
|
11547
11552
|
const lastName = params.lastName;
|
|
11548
11553
|
const email = params.email;
|
|
@@ -11555,8 +11560,8 @@
|
|
|
11555
11560
|
if (typeof domain === 'undefined') {
|
|
11556
11561
|
throw new AppwriteException('Missing required parameter: "domain"');
|
|
11557
11562
|
}
|
|
11558
|
-
if (typeof
|
|
11559
|
-
throw new AppwriteException('Missing required parameter: "
|
|
11563
|
+
if (typeof organizationId === 'undefined') {
|
|
11564
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
11560
11565
|
}
|
|
11561
11566
|
if (typeof firstName === 'undefined') {
|
|
11562
11567
|
throw new AppwriteException('Missing required parameter: "firstName"');
|
|
@@ -11581,8 +11586,8 @@
|
|
|
11581
11586
|
if (typeof domain !== 'undefined') {
|
|
11582
11587
|
payload['domain'] = domain;
|
|
11583
11588
|
}
|
|
11584
|
-
if (typeof
|
|
11585
|
-
payload['
|
|
11589
|
+
if (typeof organizationId !== 'undefined') {
|
|
11590
|
+
payload['organizationId'] = organizationId;
|
|
11586
11591
|
}
|
|
11587
11592
|
if (typeof firstName !== 'undefined') {
|
|
11588
11593
|
payload['firstName'] = firstName;
|
|
@@ -11665,6 +11670,88 @@
|
|
|
11665
11670
|
const apiHeaders = {};
|
|
11666
11671
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
11667
11672
|
}
|
|
11673
|
+
createTransferIn(paramsOrFirst, ...rest) {
|
|
11674
|
+
let params;
|
|
11675
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
11676
|
+
params = (paramsOrFirst || {});
|
|
11677
|
+
}
|
|
11678
|
+
else {
|
|
11679
|
+
params = {
|
|
11680
|
+
domain: paramsOrFirst,
|
|
11681
|
+
organizationId: rest[0],
|
|
11682
|
+
authCode: rest[1],
|
|
11683
|
+
paymentMethodId: rest[2]
|
|
11684
|
+
};
|
|
11685
|
+
}
|
|
11686
|
+
const domain = params.domain;
|
|
11687
|
+
const organizationId = params.organizationId;
|
|
11688
|
+
const authCode = params.authCode;
|
|
11689
|
+
const paymentMethodId = params.paymentMethodId;
|
|
11690
|
+
if (typeof domain === 'undefined') {
|
|
11691
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
11692
|
+
}
|
|
11693
|
+
if (typeof organizationId === 'undefined') {
|
|
11694
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
11695
|
+
}
|
|
11696
|
+
if (typeof authCode === 'undefined') {
|
|
11697
|
+
throw new AppwriteException('Missing required parameter: "authCode"');
|
|
11698
|
+
}
|
|
11699
|
+
if (typeof paymentMethodId === 'undefined') {
|
|
11700
|
+
throw new AppwriteException('Missing required parameter: "paymentMethodId"');
|
|
11701
|
+
}
|
|
11702
|
+
const apiPath = '/domains/transfers/in';
|
|
11703
|
+
const payload = {};
|
|
11704
|
+
if (typeof domain !== 'undefined') {
|
|
11705
|
+
payload['domain'] = domain;
|
|
11706
|
+
}
|
|
11707
|
+
if (typeof organizationId !== 'undefined') {
|
|
11708
|
+
payload['organizationId'] = organizationId;
|
|
11709
|
+
}
|
|
11710
|
+
if (typeof authCode !== 'undefined') {
|
|
11711
|
+
payload['authCode'] = authCode;
|
|
11712
|
+
}
|
|
11713
|
+
if (typeof paymentMethodId !== 'undefined') {
|
|
11714
|
+
payload['paymentMethodId'] = paymentMethodId;
|
|
11715
|
+
}
|
|
11716
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11717
|
+
const apiHeaders = {
|
|
11718
|
+
'content-type': 'application/json',
|
|
11719
|
+
};
|
|
11720
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
11721
|
+
}
|
|
11722
|
+
createTransferOut(paramsOrFirst, ...rest) {
|
|
11723
|
+
let params;
|
|
11724
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
11725
|
+
params = (paramsOrFirst || {});
|
|
11726
|
+
}
|
|
11727
|
+
else {
|
|
11728
|
+
params = {
|
|
11729
|
+
domainId: paramsOrFirst,
|
|
11730
|
+
organizationId: rest[0]
|
|
11731
|
+
};
|
|
11732
|
+
}
|
|
11733
|
+
const domainId = params.domainId;
|
|
11734
|
+
const organizationId = params.organizationId;
|
|
11735
|
+
if (typeof domainId === 'undefined') {
|
|
11736
|
+
throw new AppwriteException('Missing required parameter: "domainId"');
|
|
11737
|
+
}
|
|
11738
|
+
if (typeof organizationId === 'undefined') {
|
|
11739
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
11740
|
+
}
|
|
11741
|
+
const apiPath = '/domains/transfers/out';
|
|
11742
|
+
const payload = {};
|
|
11743
|
+
if (typeof domainId !== 'undefined') {
|
|
11744
|
+
payload['domainId'] = domainId;
|
|
11745
|
+
}
|
|
11746
|
+
if (typeof organizationId !== 'undefined') {
|
|
11747
|
+
payload['organizationId'] = organizationId;
|
|
11748
|
+
}
|
|
11749
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
11750
|
+
const apiHeaders = {
|
|
11751
|
+
'content-type': 'application/json',
|
|
11752
|
+
};
|
|
11753
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
11754
|
+
}
|
|
11668
11755
|
get(paramsOrFirst) {
|
|
11669
11756
|
let params;
|
|
11670
11757
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -13219,6 +13306,26 @@
|
|
|
13219
13306
|
};
|
|
13220
13307
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
13221
13308
|
}
|
|
13309
|
+
getTransferStatus(paramsOrFirst) {
|
|
13310
|
+
let params;
|
|
13311
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
13312
|
+
params = (paramsOrFirst || {});
|
|
13313
|
+
}
|
|
13314
|
+
else {
|
|
13315
|
+
params = {
|
|
13316
|
+
domainId: paramsOrFirst
|
|
13317
|
+
};
|
|
13318
|
+
}
|
|
13319
|
+
const domainId = params.domainId;
|
|
13320
|
+
if (typeof domainId === 'undefined') {
|
|
13321
|
+
throw new AppwriteException('Missing required parameter: "domainId"');
|
|
13322
|
+
}
|
|
13323
|
+
const apiPath = '/domains/{domainId}/transfers/status'.replace('{domainId}', domainId);
|
|
13324
|
+
const payload = {};
|
|
13325
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
13326
|
+
const apiHeaders = {};
|
|
13327
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
13328
|
+
}
|
|
13222
13329
|
getZone(paramsOrFirst) {
|
|
13223
13330
|
let params;
|
|
13224
13331
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -14494,6 +14601,31 @@
|
|
|
14494
14601
|
const apiHeaders = {};
|
|
14495
14602
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
14496
14603
|
}
|
|
14604
|
+
getConsolePausing(paramsOrFirst, ...rest) {
|
|
14605
|
+
let params;
|
|
14606
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14607
|
+
params = (paramsOrFirst || {});
|
|
14608
|
+
}
|
|
14609
|
+
else {
|
|
14610
|
+
params = {
|
|
14611
|
+
threshold: paramsOrFirst,
|
|
14612
|
+
inactivityDays: rest[0]
|
|
14613
|
+
};
|
|
14614
|
+
}
|
|
14615
|
+
const threshold = params.threshold;
|
|
14616
|
+
const inactivityDays = params.inactivityDays;
|
|
14617
|
+
const apiPath = '/health/console-pausing';
|
|
14618
|
+
const payload = {};
|
|
14619
|
+
if (typeof threshold !== 'undefined') {
|
|
14620
|
+
payload['threshold'] = threshold;
|
|
14621
|
+
}
|
|
14622
|
+
if (typeof inactivityDays !== 'undefined') {
|
|
14623
|
+
payload['inactivityDays'] = inactivityDays;
|
|
14624
|
+
}
|
|
14625
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14626
|
+
const apiHeaders = {};
|
|
14627
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
14628
|
+
}
|
|
14497
14629
|
/**
|
|
14498
14630
|
* Check the Appwrite database servers are up and connection is successful.
|
|
14499
14631
|
*
|
|
@@ -20741,6 +20873,28 @@
|
|
|
20741
20873
|
};
|
|
20742
20874
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20743
20875
|
}
|
|
20876
|
+
updateConsoleAccess(paramsOrFirst) {
|
|
20877
|
+
let params;
|
|
20878
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
20879
|
+
params = (paramsOrFirst || {});
|
|
20880
|
+
}
|
|
20881
|
+
else {
|
|
20882
|
+
params = {
|
|
20883
|
+
projectId: paramsOrFirst
|
|
20884
|
+
};
|
|
20885
|
+
}
|
|
20886
|
+
const projectId = params.projectId;
|
|
20887
|
+
if (typeof projectId === 'undefined') {
|
|
20888
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
20889
|
+
}
|
|
20890
|
+
const apiPath = '/projects/{projectId}/console-access'.replace('{projectId}', projectId);
|
|
20891
|
+
const payload = {};
|
|
20892
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20893
|
+
const apiHeaders = {
|
|
20894
|
+
'content-type': 'application/json',
|
|
20895
|
+
};
|
|
20896
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
20897
|
+
}
|
|
20744
20898
|
listDevKeys(paramsOrFirst, ...rest) {
|
|
20745
20899
|
let params;
|
|
20746
20900
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -21844,6 +21998,36 @@
|
|
|
21844
21998
|
};
|
|
21845
21999
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
21846
22000
|
}
|
|
22001
|
+
updateStatus(paramsOrFirst, ...rest) {
|
|
22002
|
+
let params;
|
|
22003
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
22004
|
+
params = (paramsOrFirst || {});
|
|
22005
|
+
}
|
|
22006
|
+
else {
|
|
22007
|
+
params = {
|
|
22008
|
+
projectId: paramsOrFirst,
|
|
22009
|
+
status: rest[0]
|
|
22010
|
+
};
|
|
22011
|
+
}
|
|
22012
|
+
const projectId = params.projectId;
|
|
22013
|
+
const status = params.status;
|
|
22014
|
+
if (typeof projectId === 'undefined') {
|
|
22015
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
22016
|
+
}
|
|
22017
|
+
if (typeof status === 'undefined') {
|
|
22018
|
+
throw new AppwriteException('Missing required parameter: "status"');
|
|
22019
|
+
}
|
|
22020
|
+
const apiPath = '/projects/{projectId}/status'.replace('{projectId}', projectId);
|
|
22021
|
+
const payload = {};
|
|
22022
|
+
if (typeof status !== 'undefined') {
|
|
22023
|
+
payload['status'] = status;
|
|
22024
|
+
}
|
|
22025
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
22026
|
+
const apiHeaders = {
|
|
22027
|
+
'content-type': 'application/json',
|
|
22028
|
+
};
|
|
22029
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
22030
|
+
}
|
|
21847
22031
|
updateTeam(paramsOrFirst, ...rest) {
|
|
21848
22032
|
let params;
|
|
21849
22033
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -23195,28 +23379,25 @@
|
|
|
23195
23379
|
params = {
|
|
23196
23380
|
siteId: paramsOrFirst,
|
|
23197
23381
|
code: rest[0],
|
|
23198
|
-
|
|
23199
|
-
|
|
23200
|
-
|
|
23201
|
-
|
|
23382
|
+
installCommand: rest[1],
|
|
23383
|
+
buildCommand: rest[2],
|
|
23384
|
+
outputDirectory: rest[3],
|
|
23385
|
+
activate: rest[4]
|
|
23202
23386
|
};
|
|
23203
23387
|
onProgress = rest[5];
|
|
23204
23388
|
}
|
|
23205
23389
|
const siteId = params.siteId;
|
|
23206
23390
|
const code = params.code;
|
|
23207
|
-
const activate = params.activate;
|
|
23208
23391
|
const installCommand = params.installCommand;
|
|
23209
23392
|
const buildCommand = params.buildCommand;
|
|
23210
23393
|
const outputDirectory = params.outputDirectory;
|
|
23394
|
+
const activate = params.activate;
|
|
23211
23395
|
if (typeof siteId === 'undefined') {
|
|
23212
23396
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
23213
23397
|
}
|
|
23214
23398
|
if (typeof code === 'undefined') {
|
|
23215
23399
|
throw new AppwriteException('Missing required parameter: "code"');
|
|
23216
23400
|
}
|
|
23217
|
-
if (typeof activate === 'undefined') {
|
|
23218
|
-
throw new AppwriteException('Missing required parameter: "activate"');
|
|
23219
|
-
}
|
|
23220
23401
|
const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);
|
|
23221
23402
|
const payload = {};
|
|
23222
23403
|
if (typeof installCommand !== 'undefined') {
|
|
@@ -27047,7 +27228,8 @@
|
|
|
27047
27228
|
tableId: rest[0],
|
|
27048
27229
|
queries: rest[1],
|
|
27049
27230
|
transactionId: rest[2],
|
|
27050
|
-
total: rest[3]
|
|
27231
|
+
total: rest[3],
|
|
27232
|
+
ttl: rest[4]
|
|
27051
27233
|
};
|
|
27052
27234
|
}
|
|
27053
27235
|
const databaseId = params.databaseId;
|
|
@@ -27055,6 +27237,7 @@
|
|
|
27055
27237
|
const queries = params.queries;
|
|
27056
27238
|
const transactionId = params.transactionId;
|
|
27057
27239
|
const total = params.total;
|
|
27240
|
+
const ttl = params.ttl;
|
|
27058
27241
|
if (typeof databaseId === 'undefined') {
|
|
27059
27242
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
27060
27243
|
}
|
|
@@ -27072,6 +27255,9 @@
|
|
|
27072
27255
|
if (typeof total !== 'undefined') {
|
|
27073
27256
|
payload['total'] = total;
|
|
27074
27257
|
}
|
|
27258
|
+
if (typeof ttl !== 'undefined') {
|
|
27259
|
+
payload['ttl'] = ttl;
|
|
27260
|
+
}
|
|
27075
27261
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
27076
27262
|
const apiHeaders = {};
|
|
27077
27263
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
@@ -30710,8 +30896,14 @@
|
|
|
30710
30896
|
};
|
|
30711
30897
|
|
|
30712
30898
|
function normalize(id) {
|
|
30713
|
-
|
|
30714
|
-
|
|
30899
|
+
if (id === undefined || id === null) {
|
|
30900
|
+
throw new Error("Channel ID is required");
|
|
30901
|
+
}
|
|
30902
|
+
const trimmed = String(id).trim();
|
|
30903
|
+
if (trimmed === "") {
|
|
30904
|
+
throw new Error("Channel ID is required");
|
|
30905
|
+
}
|
|
30906
|
+
return trimmed;
|
|
30715
30907
|
}
|
|
30716
30908
|
class Channel {
|
|
30717
30909
|
constructor(segments) {
|
|
@@ -30732,8 +30924,7 @@
|
|
|
30732
30924
|
// --- DATABASE ROUTE ---
|
|
30733
30925
|
// Only available on Channel<Database>
|
|
30734
30926
|
collection(id) {
|
|
30735
|
-
|
|
30736
|
-
return this.next("collections", id !== null && id !== void 0 ? id : "*");
|
|
30927
|
+
return this.next("collections", id);
|
|
30737
30928
|
}
|
|
30738
30929
|
// Only available on Channel<Collection>
|
|
30739
30930
|
document(id) {
|
|
@@ -30742,8 +30933,7 @@
|
|
|
30742
30933
|
}
|
|
30743
30934
|
// --- TABLESDB ROUTE ---
|
|
30744
30935
|
table(id) {
|
|
30745
|
-
|
|
30746
|
-
return this.next("tables", id !== null && id !== void 0 ? id : "*");
|
|
30936
|
+
return this.next("tables", id);
|
|
30747
30937
|
}
|
|
30748
30938
|
row(id) {
|
|
30749
30939
|
// Default: no row ID segment
|
|
@@ -30769,25 +30959,25 @@
|
|
|
30769
30959
|
return this.resolve("delete");
|
|
30770
30960
|
}
|
|
30771
30961
|
// --- ROOT FACTORIES ---
|
|
30772
|
-
static database(id
|
|
30962
|
+
static database(id) {
|
|
30773
30963
|
return new Channel(["databases", normalize(id)]);
|
|
30774
30964
|
}
|
|
30775
|
-
static execution(id
|
|
30965
|
+
static execution(id) {
|
|
30776
30966
|
return new Channel(["executions", normalize(id)]);
|
|
30777
30967
|
}
|
|
30778
|
-
static tablesdb(id
|
|
30968
|
+
static tablesdb(id) {
|
|
30779
30969
|
return new Channel(["tablesdb", normalize(id)]);
|
|
30780
30970
|
}
|
|
30781
|
-
static bucket(id
|
|
30971
|
+
static bucket(id) {
|
|
30782
30972
|
return new Channel(["buckets", normalize(id)]);
|
|
30783
30973
|
}
|
|
30784
|
-
static function(id
|
|
30974
|
+
static function(id) {
|
|
30785
30975
|
return new Channel(["functions", normalize(id)]);
|
|
30786
30976
|
}
|
|
30787
|
-
static team(id
|
|
30977
|
+
static team(id) {
|
|
30788
30978
|
return new Channel(["teams", normalize(id)]);
|
|
30789
30979
|
}
|
|
30790
|
-
static membership(id
|
|
30980
|
+
static membership(id) {
|
|
30791
30981
|
return new Channel(["memberships", normalize(id)]);
|
|
30792
30982
|
}
|
|
30793
30983
|
static account() {
|
|
@@ -32229,20 +32419,72 @@
|
|
|
32229
32419
|
SmtpEncryption["Tls"] = "tls";
|
|
32230
32420
|
})(exports.SmtpEncryption || (exports.SmtpEncryption = {}));
|
|
32231
32421
|
|
|
32232
|
-
exports.
|
|
32233
|
-
(function (
|
|
32234
|
-
|
|
32235
|
-
|
|
32236
|
-
|
|
32237
|
-
|
|
32238
|
-
|
|
32239
|
-
|
|
32240
|
-
|
|
32241
|
-
|
|
32242
|
-
|
|
32243
|
-
|
|
32244
|
-
|
|
32245
|
-
|
|
32422
|
+
exports.AppwriteMigrationResource = void 0;
|
|
32423
|
+
(function (AppwriteMigrationResource) {
|
|
32424
|
+
AppwriteMigrationResource["User"] = "user";
|
|
32425
|
+
AppwriteMigrationResource["Team"] = "team";
|
|
32426
|
+
AppwriteMigrationResource["Membership"] = "membership";
|
|
32427
|
+
AppwriteMigrationResource["Database"] = "database";
|
|
32428
|
+
AppwriteMigrationResource["Table"] = "table";
|
|
32429
|
+
AppwriteMigrationResource["Column"] = "column";
|
|
32430
|
+
AppwriteMigrationResource["Index"] = "index";
|
|
32431
|
+
AppwriteMigrationResource["Row"] = "row";
|
|
32432
|
+
AppwriteMigrationResource["Document"] = "document";
|
|
32433
|
+
AppwriteMigrationResource["Attribute"] = "attribute";
|
|
32434
|
+
AppwriteMigrationResource["Collection"] = "collection";
|
|
32435
|
+
AppwriteMigrationResource["Bucket"] = "bucket";
|
|
32436
|
+
AppwriteMigrationResource["File"] = "file";
|
|
32437
|
+
AppwriteMigrationResource["Function"] = "function";
|
|
32438
|
+
AppwriteMigrationResource["Deployment"] = "deployment";
|
|
32439
|
+
AppwriteMigrationResource["Environmentvariable"] = "environment-variable";
|
|
32440
|
+
AppwriteMigrationResource["Site"] = "site";
|
|
32441
|
+
AppwriteMigrationResource["Sitedeployment"] = "site-deployment";
|
|
32442
|
+
AppwriteMigrationResource["Sitevariable"] = "site-variable";
|
|
32443
|
+
})(exports.AppwriteMigrationResource || (exports.AppwriteMigrationResource = {}));
|
|
32444
|
+
|
|
32445
|
+
exports.FirebaseMigrationResource = void 0;
|
|
32446
|
+
(function (FirebaseMigrationResource) {
|
|
32447
|
+
FirebaseMigrationResource["User"] = "user";
|
|
32448
|
+
FirebaseMigrationResource["Database"] = "database";
|
|
32449
|
+
FirebaseMigrationResource["Table"] = "table";
|
|
32450
|
+
FirebaseMigrationResource["Column"] = "column";
|
|
32451
|
+
FirebaseMigrationResource["Row"] = "row";
|
|
32452
|
+
FirebaseMigrationResource["Document"] = "document";
|
|
32453
|
+
FirebaseMigrationResource["Attribute"] = "attribute";
|
|
32454
|
+
FirebaseMigrationResource["Collection"] = "collection";
|
|
32455
|
+
FirebaseMigrationResource["Bucket"] = "bucket";
|
|
32456
|
+
FirebaseMigrationResource["File"] = "file";
|
|
32457
|
+
})(exports.FirebaseMigrationResource || (exports.FirebaseMigrationResource = {}));
|
|
32458
|
+
|
|
32459
|
+
exports.NHostMigrationResource = void 0;
|
|
32460
|
+
(function (NHostMigrationResource) {
|
|
32461
|
+
NHostMigrationResource["User"] = "user";
|
|
32462
|
+
NHostMigrationResource["Database"] = "database";
|
|
32463
|
+
NHostMigrationResource["Table"] = "table";
|
|
32464
|
+
NHostMigrationResource["Column"] = "column";
|
|
32465
|
+
NHostMigrationResource["Index"] = "index";
|
|
32466
|
+
NHostMigrationResource["Row"] = "row";
|
|
32467
|
+
NHostMigrationResource["Document"] = "document";
|
|
32468
|
+
NHostMigrationResource["Attribute"] = "attribute";
|
|
32469
|
+
NHostMigrationResource["Collection"] = "collection";
|
|
32470
|
+
NHostMigrationResource["Bucket"] = "bucket";
|
|
32471
|
+
NHostMigrationResource["File"] = "file";
|
|
32472
|
+
})(exports.NHostMigrationResource || (exports.NHostMigrationResource = {}));
|
|
32473
|
+
|
|
32474
|
+
exports.SupabaseMigrationResource = void 0;
|
|
32475
|
+
(function (SupabaseMigrationResource) {
|
|
32476
|
+
SupabaseMigrationResource["User"] = "user";
|
|
32477
|
+
SupabaseMigrationResource["Database"] = "database";
|
|
32478
|
+
SupabaseMigrationResource["Table"] = "table";
|
|
32479
|
+
SupabaseMigrationResource["Column"] = "column";
|
|
32480
|
+
SupabaseMigrationResource["Index"] = "index";
|
|
32481
|
+
SupabaseMigrationResource["Row"] = "row";
|
|
32482
|
+
SupabaseMigrationResource["Document"] = "document";
|
|
32483
|
+
SupabaseMigrationResource["Attribute"] = "attribute";
|
|
32484
|
+
SupabaseMigrationResource["Collection"] = "collection";
|
|
32485
|
+
SupabaseMigrationResource["Bucket"] = "bucket";
|
|
32486
|
+
SupabaseMigrationResource["File"] = "file";
|
|
32487
|
+
})(exports.SupabaseMigrationResource || (exports.SupabaseMigrationResource = {}));
|
|
32246
32488
|
|
|
32247
32489
|
exports.ProjectUsageRange = void 0;
|
|
32248
32490
|
(function (ProjectUsageRange) {
|
|
@@ -32328,6 +32570,11 @@
|
|
|
32328
32570
|
SMTPSecure["Ssl"] = "ssl";
|
|
32329
32571
|
})(exports.SMTPSecure || (exports.SMTPSecure = {}));
|
|
32330
32572
|
|
|
32573
|
+
exports.Status = void 0;
|
|
32574
|
+
(function (Status) {
|
|
32575
|
+
Status["Active"] = "active";
|
|
32576
|
+
})(exports.Status || (exports.Status = {}));
|
|
32577
|
+
|
|
32331
32578
|
exports.EmailTemplateType = void 0;
|
|
32332
32579
|
(function (EmailTemplateType) {
|
|
32333
32580
|
EmailTemplateType["Verification"] = "verification";
|
|
@@ -32915,6 +33162,18 @@
|
|
|
32915
33162
|
BillingPlanGroup["Scale"] = "scale";
|
|
32916
33163
|
})(exports.BillingPlanGroup || (exports.BillingPlanGroup = {}));
|
|
32917
33164
|
|
|
33165
|
+
exports.DomainTransferStatusStatus = void 0;
|
|
33166
|
+
(function (DomainTransferStatusStatus) {
|
|
33167
|
+
DomainTransferStatusStatus["Transferrable"] = "transferrable";
|
|
33168
|
+
DomainTransferStatusStatus["NotTransferrable"] = "not_transferrable";
|
|
33169
|
+
DomainTransferStatusStatus["PendingOwner"] = "pending_owner";
|
|
33170
|
+
DomainTransferStatusStatus["PendingAdmin"] = "pending_admin";
|
|
33171
|
+
DomainTransferStatusStatus["PendingRegistry"] = "pending_registry";
|
|
33172
|
+
DomainTransferStatusStatus["Completed"] = "completed";
|
|
33173
|
+
DomainTransferStatusStatus["Cancelled"] = "cancelled";
|
|
33174
|
+
DomainTransferStatusStatus["ServiceUnavailable"] = "service_unavailable";
|
|
33175
|
+
})(exports.DomainTransferStatusStatus || (exports.DomainTransferStatusStatus = {}));
|
|
33176
|
+
|
|
32918
33177
|
exports.Account = Account;
|
|
32919
33178
|
exports.Activities = Activities;
|
|
32920
33179
|
exports.AppwriteException = AppwriteException;
|
|
@@ -12,7 +12,8 @@ const result = await databases.listDocuments({
|
|
|
12
12
|
collectionId: '<COLLECTION_ID>',
|
|
13
13
|
queries: [], // optional
|
|
14
14
|
transactionId: '<TRANSACTION_ID>', // optional
|
|
15
|
-
total: false // optional
|
|
15
|
+
total: false, // optional
|
|
16
|
+
ttl: 0 // optional
|
|
16
17
|
});
|
|
17
18
|
|
|
18
19
|
console.log(result);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
```javascript
|
|
2
|
+
import { Client, Domains } from "@appwrite.io/console";
|
|
3
|
+
|
|
4
|
+
const client = new Client()
|
|
5
|
+
.setEndpoint('https://<REGION>.cloud.appwrite.io/v1') // Your API Endpoint
|
|
6
|
+
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
|
|
7
|
+
|
|
8
|
+
const domains = new Domains(client);
|
|
9
|
+
|
|
10
|
+
const result = await domains.createTransferIn({
|
|
11
|
+
domain: '',
|
|
12
|
+
organizationId: '<ORGANIZATION_ID>',
|
|
13
|
+
authCode: '<AUTH_CODE>',
|
|
14
|
+
paymentMethodId: '<PAYMENT_METHOD_ID>'
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
console.log(result);
|
|
18
|
+
```
|