@appwrite.io/console 2.1.1 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +99 -7
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +100 -8
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +99 -7
- package/docs/examples/domains/list-suggestions.md +18 -0
- package/docs/examples/health/get-queue-audits.md +13 -0
- package/docs/examples/organizations/create.md +2 -2
- package/docs/examples/organizations/estimation-create-organization.md +2 -2
- package/docs/examples/organizations/estimation-update-plan.md +2 -2
- package/docs/examples/organizations/update-plan.md +2 -2
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/billing-plan.ts +17 -0
- package/src/enums/filter-type.ts +4 -0
- package/src/enums/name.ts +1 -0
- package/src/enums/o-auth-provider.ts +0 -2
- package/src/index.ts +2 -0
- package/src/models.ts +437 -375
- package/src/services/account.ts +20 -20
- package/src/services/avatars.ts +117 -117
- package/src/services/backups.ts +18 -18
- package/src/services/console.ts +24 -24
- package/src/services/databases.ts +89 -89
- package/src/services/domains.ts +295 -204
- package/src/services/functions.ts +30 -30
- package/src/services/health.ts +201 -152
- package/src/services/messaging.ts +54 -54
- package/src/services/migrations.ts +36 -36
- package/src/services/organizations.ts +67 -66
- package/src/services/projects.ts +81 -81
- package/src/services/sites.ts +30 -30
- package/src/services/storage.ts +45 -45
- package/src/services/tables-db.ts +89 -89
- package/src/services/users.ts +39 -39
- package/types/enums/billing-plan.d.ts +17 -0
- package/types/enums/filter-type.d.ts +4 -0
- package/types/enums/name.d.ts +1 -0
- package/types/enums/o-auth-provider.d.ts +0 -2
- package/types/index.d.ts +2 -0
- package/types/models.d.ts +434 -375
- package/types/services/account.d.ts +11 -11
- package/types/services/avatars.d.ts +82 -82
- package/types/services/backups.d.ts +8 -8
- package/types/services/console.d.ts +14 -14
- package/types/services/databases.d.ts +50 -50
- package/types/services/domains.d.ts +139 -104
- package/types/services/functions.d.ts +15 -15
- package/types/services/health.d.ts +95 -78
- package/types/services/messaging.d.ts +24 -24
- package/types/services/migrations.d.ts +16 -16
- package/types/services/organizations.d.ts +37 -36
- package/types/services/projects.d.ts +36 -36
- package/types/services/sites.d.ts +15 -15
- package/types/services/storage.d.ts +30 -30
- package/types/services/tables-db.d.ts +50 -50
- package/types/services/users.d.ts +24 -24
|
@@ -83,22 +83,22 @@ export declare class Databases {
|
|
|
83
83
|
/**
|
|
84
84
|
* Create a new transaction.
|
|
85
85
|
*
|
|
86
|
-
* @param {number
|
|
86
|
+
* @param {number} params.ttl - Seconds before the transaction expires.
|
|
87
87
|
* @throws {AppwriteException}
|
|
88
88
|
* @returns {Promise<Models.Transaction>}
|
|
89
89
|
*/
|
|
90
90
|
createTransaction(params?: {
|
|
91
|
-
ttl?: number
|
|
91
|
+
ttl?: number;
|
|
92
92
|
}): Promise<Models.Transaction>;
|
|
93
93
|
/**
|
|
94
94
|
* Create a new transaction.
|
|
95
95
|
*
|
|
96
|
-
* @param {number
|
|
96
|
+
* @param {number} ttl - Seconds before the transaction expires.
|
|
97
97
|
* @throws {AppwriteException}
|
|
98
98
|
* @returns {Promise<Models.Transaction>}
|
|
99
99
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
100
100
|
*/
|
|
101
|
-
createTransaction(ttl?: number
|
|
101
|
+
createTransaction(ttl?: number): Promise<Models.Transaction>;
|
|
102
102
|
/**
|
|
103
103
|
* Get a transaction by its unique ID.
|
|
104
104
|
*
|
|
@@ -754,9 +754,9 @@ export declare class Databases {
|
|
|
754
754
|
* @param {string} params.collectionId - Collection ID.
|
|
755
755
|
* @param {string} params.key - Attribute Key.
|
|
756
756
|
* @param {boolean} params.required - Is attribute required?
|
|
757
|
-
* @param {number
|
|
758
|
-
* @param {number
|
|
759
|
-
* @param {number
|
|
757
|
+
* @param {number} params.min - Minimum value.
|
|
758
|
+
* @param {number} params.max - Maximum value.
|
|
759
|
+
* @param {number} params.xdefault - Default value. Cannot be set when required.
|
|
760
760
|
* @param {boolean} params.array - Is attribute an array?
|
|
761
761
|
* @throws {AppwriteException}
|
|
762
762
|
* @returns {Promise<Models.AttributeFloat>}
|
|
@@ -767,9 +767,9 @@ export declare class Databases {
|
|
|
767
767
|
collectionId: string;
|
|
768
768
|
key: string;
|
|
769
769
|
required: boolean;
|
|
770
|
-
min?: number
|
|
771
|
-
max?: number
|
|
772
|
-
xdefault?: number
|
|
770
|
+
min?: number;
|
|
771
|
+
max?: number;
|
|
772
|
+
xdefault?: number;
|
|
773
773
|
array?: boolean;
|
|
774
774
|
}): Promise<Models.AttributeFloat>;
|
|
775
775
|
/**
|
|
@@ -780,15 +780,15 @@ export declare class Databases {
|
|
|
780
780
|
* @param {string} collectionId - Collection ID.
|
|
781
781
|
* @param {string} key - Attribute Key.
|
|
782
782
|
* @param {boolean} required - Is attribute required?
|
|
783
|
-
* @param {number
|
|
784
|
-
* @param {number
|
|
785
|
-
* @param {number
|
|
783
|
+
* @param {number} min - Minimum value.
|
|
784
|
+
* @param {number} max - Maximum value.
|
|
785
|
+
* @param {number} xdefault - Default value. Cannot be set when required.
|
|
786
786
|
* @param {boolean} array - Is attribute an array?
|
|
787
787
|
* @throws {AppwriteException}
|
|
788
788
|
* @returns {Promise<Models.AttributeFloat>}
|
|
789
789
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
790
790
|
*/
|
|
791
|
-
createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number
|
|
791
|
+
createFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min?: number, max?: number, xdefault?: number, array?: boolean): Promise<Models.AttributeFloat>;
|
|
792
792
|
/**
|
|
793
793
|
* Update a float attribute. Changing the `default` value will not update already existing documents.
|
|
794
794
|
*
|
|
@@ -797,9 +797,9 @@ export declare class Databases {
|
|
|
797
797
|
* @param {string} params.collectionId - Collection ID.
|
|
798
798
|
* @param {string} params.key - Attribute Key.
|
|
799
799
|
* @param {boolean} params.required - Is attribute required?
|
|
800
|
-
* @param {number
|
|
801
|
-
* @param {number
|
|
802
|
-
* @param {number
|
|
800
|
+
* @param {number} params.xdefault - Default value. Cannot be set when required.
|
|
801
|
+
* @param {number} params.min - Minimum value.
|
|
802
|
+
* @param {number} params.max - Maximum value.
|
|
803
803
|
* @param {string} params.newKey - New Attribute Key.
|
|
804
804
|
* @throws {AppwriteException}
|
|
805
805
|
* @returns {Promise<Models.AttributeFloat>}
|
|
@@ -810,9 +810,9 @@ export declare class Databases {
|
|
|
810
810
|
collectionId: string;
|
|
811
811
|
key: string;
|
|
812
812
|
required: boolean;
|
|
813
|
-
xdefault?: number
|
|
814
|
-
min?: number
|
|
815
|
-
max?: number
|
|
813
|
+
xdefault?: number;
|
|
814
|
+
min?: number;
|
|
815
|
+
max?: number;
|
|
816
816
|
newKey?: string;
|
|
817
817
|
}): Promise<Models.AttributeFloat>;
|
|
818
818
|
/**
|
|
@@ -823,15 +823,15 @@ export declare class Databases {
|
|
|
823
823
|
* @param {string} collectionId - Collection ID.
|
|
824
824
|
* @param {string} key - Attribute Key.
|
|
825
825
|
* @param {boolean} required - Is attribute required?
|
|
826
|
-
* @param {number
|
|
827
|
-
* @param {number
|
|
828
|
-
* @param {number
|
|
826
|
+
* @param {number} xdefault - Default value. Cannot be set when required.
|
|
827
|
+
* @param {number} min - Minimum value.
|
|
828
|
+
* @param {number} max - Maximum value.
|
|
829
829
|
* @param {string} newKey - New Attribute Key.
|
|
830
830
|
* @throws {AppwriteException}
|
|
831
831
|
* @returns {Promise<Models.AttributeFloat>}
|
|
832
832
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
833
833
|
*/
|
|
834
|
-
updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number
|
|
834
|
+
updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeFloat>;
|
|
835
835
|
/**
|
|
836
836
|
* Create an integer attribute. Optionally, minimum and maximum values can be provided.
|
|
837
837
|
*
|
|
@@ -1243,7 +1243,7 @@ export declare class Databases {
|
|
|
1243
1243
|
* @param {string} params.databaseId - Database ID.
|
|
1244
1244
|
* @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1245
1245
|
* @param {string} params.key - Attribute Key.
|
|
1246
|
-
* @param {number
|
|
1246
|
+
* @param {number} params.size - Attribute size for text attributes, in number of characters.
|
|
1247
1247
|
* @param {boolean} params.required - Is attribute required?
|
|
1248
1248
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1249
1249
|
* @param {boolean} params.array - Is attribute an array?
|
|
@@ -1256,7 +1256,7 @@ export declare class Databases {
|
|
|
1256
1256
|
databaseId: string;
|
|
1257
1257
|
collectionId: string;
|
|
1258
1258
|
key: string;
|
|
1259
|
-
size: number
|
|
1259
|
+
size: number;
|
|
1260
1260
|
required: boolean;
|
|
1261
1261
|
xdefault?: string;
|
|
1262
1262
|
array?: boolean;
|
|
@@ -1269,7 +1269,7 @@ export declare class Databases {
|
|
|
1269
1269
|
* @param {string} databaseId - Database ID.
|
|
1270
1270
|
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
|
|
1271
1271
|
* @param {string} key - Attribute Key.
|
|
1272
|
-
* @param {number
|
|
1272
|
+
* @param {number} size - Attribute size for text attributes, in number of characters.
|
|
1273
1273
|
* @param {boolean} required - Is attribute required?
|
|
1274
1274
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1275
1275
|
* @param {boolean} array - Is attribute an array?
|
|
@@ -1278,7 +1278,7 @@ export declare class Databases {
|
|
|
1278
1278
|
* @returns {Promise<Models.AttributeString>}
|
|
1279
1279
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1280
1280
|
*/
|
|
1281
|
-
createStringAttribute(databaseId: string, collectionId: string, key: string, size: number
|
|
1281
|
+
createStringAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeString>;
|
|
1282
1282
|
/**
|
|
1283
1283
|
* Update a string attribute. Changing the `default` value will not update already existing documents.
|
|
1284
1284
|
*
|
|
@@ -1288,7 +1288,7 @@ export declare class Databases {
|
|
|
1288
1288
|
* @param {string} params.key - Attribute Key.
|
|
1289
1289
|
* @param {boolean} params.required - Is attribute required?
|
|
1290
1290
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1291
|
-
* @param {number
|
|
1291
|
+
* @param {number} params.size - Maximum size of the string attribute.
|
|
1292
1292
|
* @param {string} params.newKey - New Attribute Key.
|
|
1293
1293
|
* @throws {AppwriteException}
|
|
1294
1294
|
* @returns {Promise<Models.AttributeString>}
|
|
@@ -1300,7 +1300,7 @@ export declare class Databases {
|
|
|
1300
1300
|
key: string;
|
|
1301
1301
|
required: boolean;
|
|
1302
1302
|
xdefault?: string;
|
|
1303
|
-
size?: number
|
|
1303
|
+
size?: number;
|
|
1304
1304
|
newKey?: string;
|
|
1305
1305
|
}): Promise<Models.AttributeString>;
|
|
1306
1306
|
/**
|
|
@@ -1312,13 +1312,13 @@ export declare class Databases {
|
|
|
1312
1312
|
* @param {string} key - Attribute Key.
|
|
1313
1313
|
* @param {boolean} required - Is attribute required?
|
|
1314
1314
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1315
|
-
* @param {number
|
|
1315
|
+
* @param {number} size - Maximum size of the string attribute.
|
|
1316
1316
|
* @param {string} newKey - New Attribute Key.
|
|
1317
1317
|
* @throws {AppwriteException}
|
|
1318
1318
|
* @returns {Promise<Models.AttributeString>}
|
|
1319
1319
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1320
1320
|
*/
|
|
1321
|
-
updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number
|
|
1321
|
+
updateStringAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, size?: number, newKey?: string): Promise<Models.AttributeString>;
|
|
1322
1322
|
/**
|
|
1323
1323
|
* Create a URL attribute.
|
|
1324
1324
|
*
|
|
@@ -1834,8 +1834,8 @@ export declare class Databases {
|
|
|
1834
1834
|
* @param {string} params.collectionId - Collection ID.
|
|
1835
1835
|
* @param {string} params.documentId - Document ID.
|
|
1836
1836
|
* @param {string} params.attribute - Attribute key.
|
|
1837
|
-
* @param {number
|
|
1838
|
-
* @param {number
|
|
1837
|
+
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
1838
|
+
* @param {number} params.min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
1839
1839
|
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1840
1840
|
* @throws {AppwriteException}
|
|
1841
1841
|
* @returns {Promise<Document>}
|
|
@@ -1846,8 +1846,8 @@ export declare class Databases {
|
|
|
1846
1846
|
collectionId: string;
|
|
1847
1847
|
documentId: string;
|
|
1848
1848
|
attribute: string;
|
|
1849
|
-
value?: number
|
|
1850
|
-
min?: number
|
|
1849
|
+
value?: number;
|
|
1850
|
+
min?: number;
|
|
1851
1851
|
transactionId?: string;
|
|
1852
1852
|
}): Promise<Document>;
|
|
1853
1853
|
/**
|
|
@@ -1857,14 +1857,14 @@ export declare class Databases {
|
|
|
1857
1857
|
* @param {string} collectionId - Collection ID.
|
|
1858
1858
|
* @param {string} documentId - Document ID.
|
|
1859
1859
|
* @param {string} attribute - Attribute key.
|
|
1860
|
-
* @param {number
|
|
1861
|
-
* @param {number
|
|
1860
|
+
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
1861
|
+
* @param {number} min - Minimum value for the attribute. If the current value is lesser than this value, an exception will be thrown.
|
|
1862
1862
|
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1863
1863
|
* @throws {AppwriteException}
|
|
1864
1864
|
* @returns {Promise<Document>}
|
|
1865
1865
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1866
1866
|
*/
|
|
1867
|
-
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
1867
|
+
decrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, min?: number, transactionId?: string): Promise<Document>;
|
|
1868
1868
|
/**
|
|
1869
1869
|
* Increment a specific attribute of a document by a given value.
|
|
1870
1870
|
*
|
|
@@ -1872,8 +1872,8 @@ export declare class Databases {
|
|
|
1872
1872
|
* @param {string} params.collectionId - Collection ID.
|
|
1873
1873
|
* @param {string} params.documentId - Document ID.
|
|
1874
1874
|
* @param {string} params.attribute - Attribute key.
|
|
1875
|
-
* @param {number
|
|
1876
|
-
* @param {number
|
|
1875
|
+
* @param {number} params.value - Value to increment the attribute by. The value must be a number.
|
|
1876
|
+
* @param {number} params.max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
1877
1877
|
* @param {string} params.transactionId - Transaction ID for staging the operation.
|
|
1878
1878
|
* @throws {AppwriteException}
|
|
1879
1879
|
* @returns {Promise<Document>}
|
|
@@ -1884,8 +1884,8 @@ export declare class Databases {
|
|
|
1884
1884
|
collectionId: string;
|
|
1885
1885
|
documentId: string;
|
|
1886
1886
|
attribute: string;
|
|
1887
|
-
value?: number
|
|
1888
|
-
max?: number
|
|
1887
|
+
value?: number;
|
|
1888
|
+
max?: number;
|
|
1889
1889
|
transactionId?: string;
|
|
1890
1890
|
}): Promise<Document>;
|
|
1891
1891
|
/**
|
|
@@ -1895,14 +1895,14 @@ export declare class Databases {
|
|
|
1895
1895
|
* @param {string} collectionId - Collection ID.
|
|
1896
1896
|
* @param {string} documentId - Document ID.
|
|
1897
1897
|
* @param {string} attribute - Attribute key.
|
|
1898
|
-
* @param {number
|
|
1899
|
-
* @param {number
|
|
1898
|
+
* @param {number} value - Value to increment the attribute by. The value must be a number.
|
|
1899
|
+
* @param {number} max - Maximum value for the attribute. If the current value is greater than this value, an error will be thrown.
|
|
1900
1900
|
* @param {string} transactionId - Transaction ID for staging the operation.
|
|
1901
1901
|
* @throws {AppwriteException}
|
|
1902
1902
|
* @returns {Promise<Document>}
|
|
1903
1903
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1904
1904
|
*/
|
|
1905
|
-
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number
|
|
1905
|
+
incrementDocumentAttribute<Document extends Models.Document = Models.DefaultDocument>(databaseId: string, collectionId: string, documentId: string, attribute: string, value?: number, max?: number, transactionId?: string): Promise<Document>;
|
|
1906
1906
|
/**
|
|
1907
1907
|
* List indexes in the collection.
|
|
1908
1908
|
*
|
|
@@ -1942,7 +1942,7 @@ export declare class Databases {
|
|
|
1942
1942
|
* @param {IndexType} params.type - Index type.
|
|
1943
1943
|
* @param {string[]} params.attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
1944
1944
|
* @param {string[]} params.orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
1945
|
-
* @param {number
|
|
1945
|
+
* @param {number[]} params.lengths - Length of index. Maximum of 100
|
|
1946
1946
|
* @throws {AppwriteException}
|
|
1947
1947
|
* @returns {Promise<Models.Index>}
|
|
1948
1948
|
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.createIndex` instead.
|
|
@@ -1954,7 +1954,7 @@ export declare class Databases {
|
|
|
1954
1954
|
type: IndexType;
|
|
1955
1955
|
attributes: string[];
|
|
1956
1956
|
orders?: string[];
|
|
1957
|
-
lengths?: number
|
|
1957
|
+
lengths?: number[];
|
|
1958
1958
|
}): Promise<Models.Index>;
|
|
1959
1959
|
/**
|
|
1960
1960
|
* Creates an index on the attributes listed. Your index should include all the attributes you will query in a single request.
|
|
@@ -1966,12 +1966,12 @@ export declare class Databases {
|
|
|
1966
1966
|
* @param {IndexType} type - Index type.
|
|
1967
1967
|
* @param {string[]} attributes - Array of attributes to index. Maximum of 100 attributes are allowed, each 32 characters long.
|
|
1968
1968
|
* @param {string[]} orders - Array of index orders. Maximum of 100 orders are allowed.
|
|
1969
|
-
* @param {number
|
|
1969
|
+
* @param {number[]} lengths - Length of index. Maximum of 100
|
|
1970
1970
|
* @throws {AppwriteException}
|
|
1971
1971
|
* @returns {Promise<Models.Index>}
|
|
1972
1972
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
1973
1973
|
*/
|
|
1974
|
-
createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number
|
|
1974
|
+
createIndex(databaseId: string, collectionId: string, key: string, type: IndexType, attributes: string[], orders?: string[], lengths?: number[]): Promise<Models.Index>;
|
|
1975
1975
|
/**
|
|
1976
1976
|
* Get an index by its unique ID.
|
|
1977
1977
|
*
|