@appwrite.io/console 3.1.0 → 4.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 +1 -1
- 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/esm/sdk.js
CHANGED
|
@@ -568,7 +568,7 @@ class Client {
|
|
|
568
568
|
'x-sdk-name': 'Console',
|
|
569
569
|
'x-sdk-platform': 'console',
|
|
570
570
|
'x-sdk-language': 'web',
|
|
571
|
-
'x-sdk-version': '
|
|
571
|
+
'x-sdk-version': '4.0.0',
|
|
572
572
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
573
573
|
};
|
|
574
574
|
this.realtime = {
|
|
@@ -6261,6 +6261,48 @@ class Databases {
|
|
|
6261
6261
|
};
|
|
6262
6262
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
6263
6263
|
}
|
|
6264
|
+
updateRelationshipAttribute(paramsOrFirst, ...rest) {
|
|
6265
|
+
let params;
|
|
6266
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6267
|
+
params = (paramsOrFirst || {});
|
|
6268
|
+
}
|
|
6269
|
+
else {
|
|
6270
|
+
params = {
|
|
6271
|
+
databaseId: paramsOrFirst,
|
|
6272
|
+
collectionId: rest[0],
|
|
6273
|
+
key: rest[1],
|
|
6274
|
+
onDelete: rest[2],
|
|
6275
|
+
newKey: rest[3]
|
|
6276
|
+
};
|
|
6277
|
+
}
|
|
6278
|
+
const databaseId = params.databaseId;
|
|
6279
|
+
const collectionId = params.collectionId;
|
|
6280
|
+
const key = params.key;
|
|
6281
|
+
const onDelete = params.onDelete;
|
|
6282
|
+
const newKey = params.newKey;
|
|
6283
|
+
if (typeof databaseId === 'undefined') {
|
|
6284
|
+
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6285
|
+
}
|
|
6286
|
+
if (typeof collectionId === 'undefined') {
|
|
6287
|
+
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6288
|
+
}
|
|
6289
|
+
if (typeof key === 'undefined') {
|
|
6290
|
+
throw new AppwriteException('Missing required parameter: "key"');
|
|
6291
|
+
}
|
|
6292
|
+
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
6293
|
+
const payload = {};
|
|
6294
|
+
if (typeof onDelete !== 'undefined') {
|
|
6295
|
+
payload['onDelete'] = onDelete;
|
|
6296
|
+
}
|
|
6297
|
+
if (typeof newKey !== 'undefined') {
|
|
6298
|
+
payload['newKey'] = newKey;
|
|
6299
|
+
}
|
|
6300
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6301
|
+
const apiHeaders = {
|
|
6302
|
+
'content-type': 'application/json',
|
|
6303
|
+
};
|
|
6304
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
6305
|
+
}
|
|
6264
6306
|
createStringAttribute(paramsOrFirst, ...rest) {
|
|
6265
6307
|
let params;
|
|
6266
6308
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -6788,48 +6830,6 @@ class Databases {
|
|
|
6788
6830
|
};
|
|
6789
6831
|
return this.client.call('delete', uri, apiHeaders, payload);
|
|
6790
6832
|
}
|
|
6791
|
-
updateRelationshipAttribute(paramsOrFirst, ...rest) {
|
|
6792
|
-
let params;
|
|
6793
|
-
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
6794
|
-
params = (paramsOrFirst || {});
|
|
6795
|
-
}
|
|
6796
|
-
else {
|
|
6797
|
-
params = {
|
|
6798
|
-
databaseId: paramsOrFirst,
|
|
6799
|
-
collectionId: rest[0],
|
|
6800
|
-
key: rest[1],
|
|
6801
|
-
onDelete: rest[2],
|
|
6802
|
-
newKey: rest[3]
|
|
6803
|
-
};
|
|
6804
|
-
}
|
|
6805
|
-
const databaseId = params.databaseId;
|
|
6806
|
-
const collectionId = params.collectionId;
|
|
6807
|
-
const key = params.key;
|
|
6808
|
-
const onDelete = params.onDelete;
|
|
6809
|
-
const newKey = params.newKey;
|
|
6810
|
-
if (typeof databaseId === 'undefined') {
|
|
6811
|
-
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6812
|
-
}
|
|
6813
|
-
if (typeof collectionId === 'undefined') {
|
|
6814
|
-
throw new AppwriteException('Missing required parameter: "collectionId"');
|
|
6815
|
-
}
|
|
6816
|
-
if (typeof key === 'undefined') {
|
|
6817
|
-
throw new AppwriteException('Missing required parameter: "key"');
|
|
6818
|
-
}
|
|
6819
|
-
const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
|
|
6820
|
-
const payload = {};
|
|
6821
|
-
if (typeof onDelete !== 'undefined') {
|
|
6822
|
-
payload['onDelete'] = onDelete;
|
|
6823
|
-
}
|
|
6824
|
-
if (typeof newKey !== 'undefined') {
|
|
6825
|
-
payload['newKey'] = newKey;
|
|
6826
|
-
}
|
|
6827
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6828
|
-
const apiHeaders = {
|
|
6829
|
-
'content-type': 'application/json',
|
|
6830
|
-
};
|
|
6831
|
-
return this.client.call('patch', uri, apiHeaders, payload);
|
|
6832
|
-
}
|
|
6833
6833
|
listDocuments(paramsOrFirst, ...rest) {
|
|
6834
6834
|
let params;
|
|
6835
6835
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -6841,7 +6841,8 @@ class Databases {
|
|
|
6841
6841
|
collectionId: rest[0],
|
|
6842
6842
|
queries: rest[1],
|
|
6843
6843
|
transactionId: rest[2],
|
|
6844
|
-
total: rest[3]
|
|
6844
|
+
total: rest[3],
|
|
6845
|
+
ttl: rest[4]
|
|
6845
6846
|
};
|
|
6846
6847
|
}
|
|
6847
6848
|
const databaseId = params.databaseId;
|
|
@@ -6849,6 +6850,7 @@ class Databases {
|
|
|
6849
6850
|
const queries = params.queries;
|
|
6850
6851
|
const transactionId = params.transactionId;
|
|
6851
6852
|
const total = params.total;
|
|
6853
|
+
const ttl = params.ttl;
|
|
6852
6854
|
if (typeof databaseId === 'undefined') {
|
|
6853
6855
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6854
6856
|
}
|
|
@@ -6866,6 +6868,9 @@ class Databases {
|
|
|
6866
6868
|
if (typeof total !== 'undefined') {
|
|
6867
6869
|
payload['total'] = total;
|
|
6868
6870
|
}
|
|
6871
|
+
if (typeof ttl !== 'undefined') {
|
|
6872
|
+
payload['ttl'] = ttl;
|
|
6873
|
+
}
|
|
6869
6874
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6870
6875
|
const apiHeaders = {};
|
|
6871
6876
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
@@ -7765,7 +7770,7 @@ class Domains {
|
|
|
7765
7770
|
else {
|
|
7766
7771
|
params = {
|
|
7767
7772
|
domain: paramsOrFirst,
|
|
7768
|
-
|
|
7773
|
+
organizationId: rest[0],
|
|
7769
7774
|
firstName: rest[1],
|
|
7770
7775
|
lastName: rest[2],
|
|
7771
7776
|
email: rest[3],
|
|
@@ -7778,7 +7783,7 @@ class Domains {
|
|
|
7778
7783
|
};
|
|
7779
7784
|
}
|
|
7780
7785
|
const domain = params.domain;
|
|
7781
|
-
const
|
|
7786
|
+
const organizationId = params.organizationId;
|
|
7782
7787
|
const firstName = params.firstName;
|
|
7783
7788
|
const lastName = params.lastName;
|
|
7784
7789
|
const email = params.email;
|
|
@@ -7791,8 +7796,8 @@ class Domains {
|
|
|
7791
7796
|
if (typeof domain === 'undefined') {
|
|
7792
7797
|
throw new AppwriteException('Missing required parameter: "domain"');
|
|
7793
7798
|
}
|
|
7794
|
-
if (typeof
|
|
7795
|
-
throw new AppwriteException('Missing required parameter: "
|
|
7799
|
+
if (typeof organizationId === 'undefined') {
|
|
7800
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
7796
7801
|
}
|
|
7797
7802
|
if (typeof firstName === 'undefined') {
|
|
7798
7803
|
throw new AppwriteException('Missing required parameter: "firstName"');
|
|
@@ -7817,8 +7822,8 @@ class Domains {
|
|
|
7817
7822
|
if (typeof domain !== 'undefined') {
|
|
7818
7823
|
payload['domain'] = domain;
|
|
7819
7824
|
}
|
|
7820
|
-
if (typeof
|
|
7821
|
-
payload['
|
|
7825
|
+
if (typeof organizationId !== 'undefined') {
|
|
7826
|
+
payload['organizationId'] = organizationId;
|
|
7822
7827
|
}
|
|
7823
7828
|
if (typeof firstName !== 'undefined') {
|
|
7824
7829
|
payload['firstName'] = firstName;
|
|
@@ -7901,6 +7906,88 @@ class Domains {
|
|
|
7901
7906
|
const apiHeaders = {};
|
|
7902
7907
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
7903
7908
|
}
|
|
7909
|
+
createTransferIn(paramsOrFirst, ...rest) {
|
|
7910
|
+
let params;
|
|
7911
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
7912
|
+
params = (paramsOrFirst || {});
|
|
7913
|
+
}
|
|
7914
|
+
else {
|
|
7915
|
+
params = {
|
|
7916
|
+
domain: paramsOrFirst,
|
|
7917
|
+
organizationId: rest[0],
|
|
7918
|
+
authCode: rest[1],
|
|
7919
|
+
paymentMethodId: rest[2]
|
|
7920
|
+
};
|
|
7921
|
+
}
|
|
7922
|
+
const domain = params.domain;
|
|
7923
|
+
const organizationId = params.organizationId;
|
|
7924
|
+
const authCode = params.authCode;
|
|
7925
|
+
const paymentMethodId = params.paymentMethodId;
|
|
7926
|
+
if (typeof domain === 'undefined') {
|
|
7927
|
+
throw new AppwriteException('Missing required parameter: "domain"');
|
|
7928
|
+
}
|
|
7929
|
+
if (typeof organizationId === 'undefined') {
|
|
7930
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
7931
|
+
}
|
|
7932
|
+
if (typeof authCode === 'undefined') {
|
|
7933
|
+
throw new AppwriteException('Missing required parameter: "authCode"');
|
|
7934
|
+
}
|
|
7935
|
+
if (typeof paymentMethodId === 'undefined') {
|
|
7936
|
+
throw new AppwriteException('Missing required parameter: "paymentMethodId"');
|
|
7937
|
+
}
|
|
7938
|
+
const apiPath = '/domains/transfers/in';
|
|
7939
|
+
const payload = {};
|
|
7940
|
+
if (typeof domain !== 'undefined') {
|
|
7941
|
+
payload['domain'] = domain;
|
|
7942
|
+
}
|
|
7943
|
+
if (typeof organizationId !== 'undefined') {
|
|
7944
|
+
payload['organizationId'] = organizationId;
|
|
7945
|
+
}
|
|
7946
|
+
if (typeof authCode !== 'undefined') {
|
|
7947
|
+
payload['authCode'] = authCode;
|
|
7948
|
+
}
|
|
7949
|
+
if (typeof paymentMethodId !== 'undefined') {
|
|
7950
|
+
payload['paymentMethodId'] = paymentMethodId;
|
|
7951
|
+
}
|
|
7952
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
7953
|
+
const apiHeaders = {
|
|
7954
|
+
'content-type': 'application/json',
|
|
7955
|
+
};
|
|
7956
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
7957
|
+
}
|
|
7958
|
+
createTransferOut(paramsOrFirst, ...rest) {
|
|
7959
|
+
let params;
|
|
7960
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
7961
|
+
params = (paramsOrFirst || {});
|
|
7962
|
+
}
|
|
7963
|
+
else {
|
|
7964
|
+
params = {
|
|
7965
|
+
domainId: paramsOrFirst,
|
|
7966
|
+
organizationId: rest[0]
|
|
7967
|
+
};
|
|
7968
|
+
}
|
|
7969
|
+
const domainId = params.domainId;
|
|
7970
|
+
const organizationId = params.organizationId;
|
|
7971
|
+
if (typeof domainId === 'undefined') {
|
|
7972
|
+
throw new AppwriteException('Missing required parameter: "domainId"');
|
|
7973
|
+
}
|
|
7974
|
+
if (typeof organizationId === 'undefined') {
|
|
7975
|
+
throw new AppwriteException('Missing required parameter: "organizationId"');
|
|
7976
|
+
}
|
|
7977
|
+
const apiPath = '/domains/transfers/out';
|
|
7978
|
+
const payload = {};
|
|
7979
|
+
if (typeof domainId !== 'undefined') {
|
|
7980
|
+
payload['domainId'] = domainId;
|
|
7981
|
+
}
|
|
7982
|
+
if (typeof organizationId !== 'undefined') {
|
|
7983
|
+
payload['organizationId'] = organizationId;
|
|
7984
|
+
}
|
|
7985
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
7986
|
+
const apiHeaders = {
|
|
7987
|
+
'content-type': 'application/json',
|
|
7988
|
+
};
|
|
7989
|
+
return this.client.call('post', uri, apiHeaders, payload);
|
|
7990
|
+
}
|
|
7904
7991
|
get(paramsOrFirst) {
|
|
7905
7992
|
let params;
|
|
7906
7993
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -9455,6 +9542,26 @@ class Domains {
|
|
|
9455
9542
|
};
|
|
9456
9543
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
9457
9544
|
}
|
|
9545
|
+
getTransferStatus(paramsOrFirst) {
|
|
9546
|
+
let params;
|
|
9547
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
9548
|
+
params = (paramsOrFirst || {});
|
|
9549
|
+
}
|
|
9550
|
+
else {
|
|
9551
|
+
params = {
|
|
9552
|
+
domainId: paramsOrFirst
|
|
9553
|
+
};
|
|
9554
|
+
}
|
|
9555
|
+
const domainId = params.domainId;
|
|
9556
|
+
if (typeof domainId === 'undefined') {
|
|
9557
|
+
throw new AppwriteException('Missing required parameter: "domainId"');
|
|
9558
|
+
}
|
|
9559
|
+
const apiPath = '/domains/{domainId}/transfers/status'.replace('{domainId}', domainId);
|
|
9560
|
+
const payload = {};
|
|
9561
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
9562
|
+
const apiHeaders = {};
|
|
9563
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
9564
|
+
}
|
|
9458
9565
|
getZone(paramsOrFirst) {
|
|
9459
9566
|
let params;
|
|
9460
9567
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -10730,6 +10837,31 @@ class Health {
|
|
|
10730
10837
|
const apiHeaders = {};
|
|
10731
10838
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
10732
10839
|
}
|
|
10840
|
+
getConsolePausing(paramsOrFirst, ...rest) {
|
|
10841
|
+
let params;
|
|
10842
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
10843
|
+
params = (paramsOrFirst || {});
|
|
10844
|
+
}
|
|
10845
|
+
else {
|
|
10846
|
+
params = {
|
|
10847
|
+
threshold: paramsOrFirst,
|
|
10848
|
+
inactivityDays: rest[0]
|
|
10849
|
+
};
|
|
10850
|
+
}
|
|
10851
|
+
const threshold = params.threshold;
|
|
10852
|
+
const inactivityDays = params.inactivityDays;
|
|
10853
|
+
const apiPath = '/health/console-pausing';
|
|
10854
|
+
const payload = {};
|
|
10855
|
+
if (typeof threshold !== 'undefined') {
|
|
10856
|
+
payload['threshold'] = threshold;
|
|
10857
|
+
}
|
|
10858
|
+
if (typeof inactivityDays !== 'undefined') {
|
|
10859
|
+
payload['inactivityDays'] = inactivityDays;
|
|
10860
|
+
}
|
|
10861
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
10862
|
+
const apiHeaders = {};
|
|
10863
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
10864
|
+
}
|
|
10733
10865
|
/**
|
|
10734
10866
|
* Check the Appwrite database servers are up and connection is successful.
|
|
10735
10867
|
*
|
|
@@ -16977,6 +17109,28 @@ class Projects {
|
|
|
16977
17109
|
};
|
|
16978
17110
|
return this.client.call('patch', uri, apiHeaders, payload);
|
|
16979
17111
|
}
|
|
17112
|
+
updateConsoleAccess(paramsOrFirst) {
|
|
17113
|
+
let params;
|
|
17114
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
17115
|
+
params = (paramsOrFirst || {});
|
|
17116
|
+
}
|
|
17117
|
+
else {
|
|
17118
|
+
params = {
|
|
17119
|
+
projectId: paramsOrFirst
|
|
17120
|
+
};
|
|
17121
|
+
}
|
|
17122
|
+
const projectId = params.projectId;
|
|
17123
|
+
if (typeof projectId === 'undefined') {
|
|
17124
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
17125
|
+
}
|
|
17126
|
+
const apiPath = '/projects/{projectId}/console-access'.replace('{projectId}', projectId);
|
|
17127
|
+
const payload = {};
|
|
17128
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
17129
|
+
const apiHeaders = {
|
|
17130
|
+
'content-type': 'application/json',
|
|
17131
|
+
};
|
|
17132
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
17133
|
+
}
|
|
16980
17134
|
listDevKeys(paramsOrFirst, ...rest) {
|
|
16981
17135
|
let params;
|
|
16982
17136
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -18080,6 +18234,36 @@ class Projects {
|
|
|
18080
18234
|
};
|
|
18081
18235
|
return this.client.call('post', uri, apiHeaders, payload);
|
|
18082
18236
|
}
|
|
18237
|
+
updateStatus(paramsOrFirst, ...rest) {
|
|
18238
|
+
let params;
|
|
18239
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
18240
|
+
params = (paramsOrFirst || {});
|
|
18241
|
+
}
|
|
18242
|
+
else {
|
|
18243
|
+
params = {
|
|
18244
|
+
projectId: paramsOrFirst,
|
|
18245
|
+
status: rest[0]
|
|
18246
|
+
};
|
|
18247
|
+
}
|
|
18248
|
+
const projectId = params.projectId;
|
|
18249
|
+
const status = params.status;
|
|
18250
|
+
if (typeof projectId === 'undefined') {
|
|
18251
|
+
throw new AppwriteException('Missing required parameter: "projectId"');
|
|
18252
|
+
}
|
|
18253
|
+
if (typeof status === 'undefined') {
|
|
18254
|
+
throw new AppwriteException('Missing required parameter: "status"');
|
|
18255
|
+
}
|
|
18256
|
+
const apiPath = '/projects/{projectId}/status'.replace('{projectId}', projectId);
|
|
18257
|
+
const payload = {};
|
|
18258
|
+
if (typeof status !== 'undefined') {
|
|
18259
|
+
payload['status'] = status;
|
|
18260
|
+
}
|
|
18261
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
18262
|
+
const apiHeaders = {
|
|
18263
|
+
'content-type': 'application/json',
|
|
18264
|
+
};
|
|
18265
|
+
return this.client.call('patch', uri, apiHeaders, payload);
|
|
18266
|
+
}
|
|
18083
18267
|
updateTeam(paramsOrFirst, ...rest) {
|
|
18084
18268
|
let params;
|
|
18085
18269
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -19431,28 +19615,25 @@ class Sites {
|
|
|
19431
19615
|
params = {
|
|
19432
19616
|
siteId: paramsOrFirst,
|
|
19433
19617
|
code: rest[0],
|
|
19434
|
-
|
|
19435
|
-
|
|
19436
|
-
|
|
19437
|
-
|
|
19618
|
+
installCommand: rest[1],
|
|
19619
|
+
buildCommand: rest[2],
|
|
19620
|
+
outputDirectory: rest[3],
|
|
19621
|
+
activate: rest[4]
|
|
19438
19622
|
};
|
|
19439
19623
|
onProgress = rest[5];
|
|
19440
19624
|
}
|
|
19441
19625
|
const siteId = params.siteId;
|
|
19442
19626
|
const code = params.code;
|
|
19443
|
-
const activate = params.activate;
|
|
19444
19627
|
const installCommand = params.installCommand;
|
|
19445
19628
|
const buildCommand = params.buildCommand;
|
|
19446
19629
|
const outputDirectory = params.outputDirectory;
|
|
19630
|
+
const activate = params.activate;
|
|
19447
19631
|
if (typeof siteId === 'undefined') {
|
|
19448
19632
|
throw new AppwriteException('Missing required parameter: "siteId"');
|
|
19449
19633
|
}
|
|
19450
19634
|
if (typeof code === 'undefined') {
|
|
19451
19635
|
throw new AppwriteException('Missing required parameter: "code"');
|
|
19452
19636
|
}
|
|
19453
|
-
if (typeof activate === 'undefined') {
|
|
19454
|
-
throw new AppwriteException('Missing required parameter: "activate"');
|
|
19455
|
-
}
|
|
19456
19637
|
const apiPath = '/sites/{siteId}/deployments'.replace('{siteId}', siteId);
|
|
19457
19638
|
const payload = {};
|
|
19458
19639
|
if (typeof installCommand !== 'undefined') {
|
|
@@ -23283,7 +23464,8 @@ class TablesDB {
|
|
|
23283
23464
|
tableId: rest[0],
|
|
23284
23465
|
queries: rest[1],
|
|
23285
23466
|
transactionId: rest[2],
|
|
23286
|
-
total: rest[3]
|
|
23467
|
+
total: rest[3],
|
|
23468
|
+
ttl: rest[4]
|
|
23287
23469
|
};
|
|
23288
23470
|
}
|
|
23289
23471
|
const databaseId = params.databaseId;
|
|
@@ -23291,6 +23473,7 @@ class TablesDB {
|
|
|
23291
23473
|
const queries = params.queries;
|
|
23292
23474
|
const transactionId = params.transactionId;
|
|
23293
23475
|
const total = params.total;
|
|
23476
|
+
const ttl = params.ttl;
|
|
23294
23477
|
if (typeof databaseId === 'undefined') {
|
|
23295
23478
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
23296
23479
|
}
|
|
@@ -23308,6 +23491,9 @@ class TablesDB {
|
|
|
23308
23491
|
if (typeof total !== 'undefined') {
|
|
23309
23492
|
payload['total'] = total;
|
|
23310
23493
|
}
|
|
23494
|
+
if (typeof ttl !== 'undefined') {
|
|
23495
|
+
payload['ttl'] = ttl;
|
|
23496
|
+
}
|
|
23311
23497
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
23312
23498
|
const apiHeaders = {};
|
|
23313
23499
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
@@ -26946,8 +27132,14 @@ _a = ID, _ID_hexTimestamp = function _ID_hexTimestamp() {
|
|
|
26946
27132
|
};
|
|
26947
27133
|
|
|
26948
27134
|
function normalize(id) {
|
|
26949
|
-
|
|
26950
|
-
|
|
27135
|
+
if (id === undefined || id === null) {
|
|
27136
|
+
throw new Error("Channel ID is required");
|
|
27137
|
+
}
|
|
27138
|
+
const trimmed = String(id).trim();
|
|
27139
|
+
if (trimmed === "") {
|
|
27140
|
+
throw new Error("Channel ID is required");
|
|
27141
|
+
}
|
|
27142
|
+
return trimmed;
|
|
26951
27143
|
}
|
|
26952
27144
|
class Channel {
|
|
26953
27145
|
constructor(segments) {
|
|
@@ -26968,8 +27160,7 @@ class Channel {
|
|
|
26968
27160
|
// --- DATABASE ROUTE ---
|
|
26969
27161
|
// Only available on Channel<Database>
|
|
26970
27162
|
collection(id) {
|
|
26971
|
-
|
|
26972
|
-
return this.next("collections", id !== null && id !== void 0 ? id : "*");
|
|
27163
|
+
return this.next("collections", id);
|
|
26973
27164
|
}
|
|
26974
27165
|
// Only available on Channel<Collection>
|
|
26975
27166
|
document(id) {
|
|
@@ -26978,8 +27169,7 @@ class Channel {
|
|
|
26978
27169
|
}
|
|
26979
27170
|
// --- TABLESDB ROUTE ---
|
|
26980
27171
|
table(id) {
|
|
26981
|
-
|
|
26982
|
-
return this.next("tables", id !== null && id !== void 0 ? id : "*");
|
|
27172
|
+
return this.next("tables", id);
|
|
26983
27173
|
}
|
|
26984
27174
|
row(id) {
|
|
26985
27175
|
// Default: no row ID segment
|
|
@@ -27005,25 +27195,25 @@ class Channel {
|
|
|
27005
27195
|
return this.resolve("delete");
|
|
27006
27196
|
}
|
|
27007
27197
|
// --- ROOT FACTORIES ---
|
|
27008
|
-
static database(id
|
|
27198
|
+
static database(id) {
|
|
27009
27199
|
return new Channel(["databases", normalize(id)]);
|
|
27010
27200
|
}
|
|
27011
|
-
static execution(id
|
|
27201
|
+
static execution(id) {
|
|
27012
27202
|
return new Channel(["executions", normalize(id)]);
|
|
27013
27203
|
}
|
|
27014
|
-
static tablesdb(id
|
|
27204
|
+
static tablesdb(id) {
|
|
27015
27205
|
return new Channel(["tablesdb", normalize(id)]);
|
|
27016
27206
|
}
|
|
27017
|
-
static bucket(id
|
|
27207
|
+
static bucket(id) {
|
|
27018
27208
|
return new Channel(["buckets", normalize(id)]);
|
|
27019
27209
|
}
|
|
27020
|
-
static function(id
|
|
27210
|
+
static function(id) {
|
|
27021
27211
|
return new Channel(["functions", normalize(id)]);
|
|
27022
27212
|
}
|
|
27023
|
-
static team(id
|
|
27213
|
+
static team(id) {
|
|
27024
27214
|
return new Channel(["teams", normalize(id)]);
|
|
27025
27215
|
}
|
|
27026
|
-
static membership(id
|
|
27216
|
+
static membership(id) {
|
|
27027
27217
|
return new Channel(["memberships", normalize(id)]);
|
|
27028
27218
|
}
|
|
27029
27219
|
static account() {
|
|
@@ -28465,20 +28655,72 @@ var SmtpEncryption;
|
|
|
28465
28655
|
SmtpEncryption["Tls"] = "tls";
|
|
28466
28656
|
})(SmtpEncryption || (SmtpEncryption = {}));
|
|
28467
28657
|
|
|
28468
|
-
var
|
|
28469
|
-
(function (
|
|
28470
|
-
|
|
28471
|
-
|
|
28472
|
-
|
|
28473
|
-
|
|
28474
|
-
|
|
28475
|
-
|
|
28476
|
-
|
|
28477
|
-
|
|
28478
|
-
|
|
28479
|
-
|
|
28480
|
-
|
|
28481
|
-
|
|
28658
|
+
var AppwriteMigrationResource;
|
|
28659
|
+
(function (AppwriteMigrationResource) {
|
|
28660
|
+
AppwriteMigrationResource["User"] = "user";
|
|
28661
|
+
AppwriteMigrationResource["Team"] = "team";
|
|
28662
|
+
AppwriteMigrationResource["Membership"] = "membership";
|
|
28663
|
+
AppwriteMigrationResource["Database"] = "database";
|
|
28664
|
+
AppwriteMigrationResource["Table"] = "table";
|
|
28665
|
+
AppwriteMigrationResource["Column"] = "column";
|
|
28666
|
+
AppwriteMigrationResource["Index"] = "index";
|
|
28667
|
+
AppwriteMigrationResource["Row"] = "row";
|
|
28668
|
+
AppwriteMigrationResource["Document"] = "document";
|
|
28669
|
+
AppwriteMigrationResource["Attribute"] = "attribute";
|
|
28670
|
+
AppwriteMigrationResource["Collection"] = "collection";
|
|
28671
|
+
AppwriteMigrationResource["Bucket"] = "bucket";
|
|
28672
|
+
AppwriteMigrationResource["File"] = "file";
|
|
28673
|
+
AppwriteMigrationResource["Function"] = "function";
|
|
28674
|
+
AppwriteMigrationResource["Deployment"] = "deployment";
|
|
28675
|
+
AppwriteMigrationResource["Environmentvariable"] = "environment-variable";
|
|
28676
|
+
AppwriteMigrationResource["Site"] = "site";
|
|
28677
|
+
AppwriteMigrationResource["Sitedeployment"] = "site-deployment";
|
|
28678
|
+
AppwriteMigrationResource["Sitevariable"] = "site-variable";
|
|
28679
|
+
})(AppwriteMigrationResource || (AppwriteMigrationResource = {}));
|
|
28680
|
+
|
|
28681
|
+
var FirebaseMigrationResource;
|
|
28682
|
+
(function (FirebaseMigrationResource) {
|
|
28683
|
+
FirebaseMigrationResource["User"] = "user";
|
|
28684
|
+
FirebaseMigrationResource["Database"] = "database";
|
|
28685
|
+
FirebaseMigrationResource["Table"] = "table";
|
|
28686
|
+
FirebaseMigrationResource["Column"] = "column";
|
|
28687
|
+
FirebaseMigrationResource["Row"] = "row";
|
|
28688
|
+
FirebaseMigrationResource["Document"] = "document";
|
|
28689
|
+
FirebaseMigrationResource["Attribute"] = "attribute";
|
|
28690
|
+
FirebaseMigrationResource["Collection"] = "collection";
|
|
28691
|
+
FirebaseMigrationResource["Bucket"] = "bucket";
|
|
28692
|
+
FirebaseMigrationResource["File"] = "file";
|
|
28693
|
+
})(FirebaseMigrationResource || (FirebaseMigrationResource = {}));
|
|
28694
|
+
|
|
28695
|
+
var NHostMigrationResource;
|
|
28696
|
+
(function (NHostMigrationResource) {
|
|
28697
|
+
NHostMigrationResource["User"] = "user";
|
|
28698
|
+
NHostMigrationResource["Database"] = "database";
|
|
28699
|
+
NHostMigrationResource["Table"] = "table";
|
|
28700
|
+
NHostMigrationResource["Column"] = "column";
|
|
28701
|
+
NHostMigrationResource["Index"] = "index";
|
|
28702
|
+
NHostMigrationResource["Row"] = "row";
|
|
28703
|
+
NHostMigrationResource["Document"] = "document";
|
|
28704
|
+
NHostMigrationResource["Attribute"] = "attribute";
|
|
28705
|
+
NHostMigrationResource["Collection"] = "collection";
|
|
28706
|
+
NHostMigrationResource["Bucket"] = "bucket";
|
|
28707
|
+
NHostMigrationResource["File"] = "file";
|
|
28708
|
+
})(NHostMigrationResource || (NHostMigrationResource = {}));
|
|
28709
|
+
|
|
28710
|
+
var SupabaseMigrationResource;
|
|
28711
|
+
(function (SupabaseMigrationResource) {
|
|
28712
|
+
SupabaseMigrationResource["User"] = "user";
|
|
28713
|
+
SupabaseMigrationResource["Database"] = "database";
|
|
28714
|
+
SupabaseMigrationResource["Table"] = "table";
|
|
28715
|
+
SupabaseMigrationResource["Column"] = "column";
|
|
28716
|
+
SupabaseMigrationResource["Index"] = "index";
|
|
28717
|
+
SupabaseMigrationResource["Row"] = "row";
|
|
28718
|
+
SupabaseMigrationResource["Document"] = "document";
|
|
28719
|
+
SupabaseMigrationResource["Attribute"] = "attribute";
|
|
28720
|
+
SupabaseMigrationResource["Collection"] = "collection";
|
|
28721
|
+
SupabaseMigrationResource["Bucket"] = "bucket";
|
|
28722
|
+
SupabaseMigrationResource["File"] = "file";
|
|
28723
|
+
})(SupabaseMigrationResource || (SupabaseMigrationResource = {}));
|
|
28482
28724
|
|
|
28483
28725
|
var ProjectUsageRange;
|
|
28484
28726
|
(function (ProjectUsageRange) {
|
|
@@ -28564,6 +28806,11 @@ var SMTPSecure;
|
|
|
28564
28806
|
SMTPSecure["Ssl"] = "ssl";
|
|
28565
28807
|
})(SMTPSecure || (SMTPSecure = {}));
|
|
28566
28808
|
|
|
28809
|
+
var Status;
|
|
28810
|
+
(function (Status) {
|
|
28811
|
+
Status["Active"] = "active";
|
|
28812
|
+
})(Status || (Status = {}));
|
|
28813
|
+
|
|
28567
28814
|
var EmailTemplateType;
|
|
28568
28815
|
(function (EmailTemplateType) {
|
|
28569
28816
|
EmailTemplateType["Verification"] = "verification";
|
|
@@ -29151,5 +29398,17 @@ var BillingPlanGroup;
|
|
|
29151
29398
|
BillingPlanGroup["Scale"] = "scale";
|
|
29152
29399
|
})(BillingPlanGroup || (BillingPlanGroup = {}));
|
|
29153
29400
|
|
|
29154
|
-
|
|
29401
|
+
var DomainTransferStatusStatus;
|
|
29402
|
+
(function (DomainTransferStatusStatus) {
|
|
29403
|
+
DomainTransferStatusStatus["Transferrable"] = "transferrable";
|
|
29404
|
+
DomainTransferStatusStatus["NotTransferrable"] = "not_transferrable";
|
|
29405
|
+
DomainTransferStatusStatus["PendingOwner"] = "pending_owner";
|
|
29406
|
+
DomainTransferStatusStatus["PendingAdmin"] = "pending_admin";
|
|
29407
|
+
DomainTransferStatusStatus["PendingRegistry"] = "pending_registry";
|
|
29408
|
+
DomainTransferStatusStatus["Completed"] = "completed";
|
|
29409
|
+
DomainTransferStatusStatus["Cancelled"] = "cancelled";
|
|
29410
|
+
DomainTransferStatusStatus["ServiceUnavailable"] = "service_unavailable";
|
|
29411
|
+
})(DomainTransferStatusStatus || (DomainTransferStatusStatus = {}));
|
|
29412
|
+
|
|
29413
|
+
export { Account, Activities, Adapter, Api, ApiService, AppwriteException, AppwriteMigrationResource, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, BackupServices, Backups, BillingPlanGroup, Browser, BrowserPermission, BuildRuntime, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DeploymentDownloadType, DeploymentStatus, DomainTransferStatusStatus, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, FilterType, FirebaseMigrationResource, Flag, Framework, Frameworks, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, IndexType, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, NHostMigrationResource, Name, OAuthProvider, Operator, OrderBy, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RegistrationType, RelationMutate, RelationshipType, ResourceType, Role, Runtime, Runtimes, SMTPSecure, Scopes, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, Status, StatusCode, Storage, SupabaseMigrationResource, TablesDB, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, UseCases, Users, VCSDetectionType, VCSReferenceType, Vcs };
|
|
29155
29414
|
//# sourceMappingURL=sdk.js.map
|