@appwrite.io/console 2.3.0 → 2.3.1
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 +96 -18
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +96 -19
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +96 -18
- package/docs/examples/activities/get-event.md +15 -0
- package/docs/examples/activities/list-events.md +15 -0
- package/docs/examples/databases/create-longtext-attribute.md +2 -1
- package/docs/examples/databases/create-mediumtext-attribute.md +2 -1
- package/docs/examples/databases/create-text-attribute.md +2 -1
- package/docs/examples/databases/create-varchar-attribute.md +2 -1
- package/docs/examples/tablesdb/create-longtext-column.md +2 -1
- package/docs/examples/tablesdb/create-mediumtext-column.md +2 -1
- package/docs/examples/tablesdb/create-text-column.md +2 -1
- package/docs/examples/tablesdb/create-varchar-column.md +2 -1
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/build-runtime.ts +0 -3
- package/src/enums/runtime.ts +0 -3
- package/src/enums/runtimes.ts +0 -3
- package/src/index.ts +1 -0
- package/src/models.ts +182 -2
- package/src/services/activities.ts +116 -0
- package/src/services/databases.ts +56 -28
- package/src/services/migrations.ts +2 -2
- package/src/services/tables-db.ts +56 -28
- package/types/enums/build-runtime.d.ts +0 -3
- package/types/enums/runtime.d.ts +0 -3
- package/types/enums/runtimes.d.ts +0 -3
- package/types/index.d.ts +1 -0
- package/types/models.d.ts +180 -2
- package/types/services/activities.d.ts +46 -0
- package/types/services/databases.d.ts +16 -4
- package/types/services/migrations.d.ts +2 -2
- package/types/services/tables-db.d.ts +16 -4
package/src/models.ts
CHANGED
|
@@ -811,7 +811,7 @@ export namespace Models {
|
|
|
811
811
|
/**
|
|
812
812
|
* Collection attributes.
|
|
813
813
|
*/
|
|
814
|
-
attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeString)[];
|
|
814
|
+
attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
|
|
815
815
|
/**
|
|
816
816
|
* Collection indexes.
|
|
817
817
|
*/
|
|
@@ -837,7 +837,7 @@ export namespace Models {
|
|
|
837
837
|
/**
|
|
838
838
|
* List of attributes.
|
|
839
839
|
*/
|
|
840
|
-
attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeString)[];
|
|
840
|
+
attributes: (Models.AttributeBoolean | Models.AttributeInteger | Models.AttributeFloat | Models.AttributeEmail | Models.AttributeEnum | Models.AttributeUrl | Models.AttributeIp | Models.AttributeDatetime | Models.AttributeRelationship | Models.AttributePoint | Models.AttributeLine | Models.AttributePolygon | Models.AttributeVarchar | Models.AttributeText | Models.AttributeMediumtext | Models.AttributeLongtext | Models.AttributeString)[];
|
|
841
841
|
}
|
|
842
842
|
|
|
843
843
|
/**
|
|
@@ -1498,6 +1498,10 @@ export namespace Models {
|
|
|
1498
1498
|
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1499
1499
|
*/
|
|
1500
1500
|
default?: string;
|
|
1501
|
+
/**
|
|
1502
|
+
* Defines whether this attribute is encrypted or not.
|
|
1503
|
+
*/
|
|
1504
|
+
encrypt?: boolean;
|
|
1501
1505
|
}
|
|
1502
1506
|
|
|
1503
1507
|
/**
|
|
@@ -1540,6 +1544,10 @@ export namespace Models {
|
|
|
1540
1544
|
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1541
1545
|
*/
|
|
1542
1546
|
default?: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* Defines whether this attribute is encrypted or not.
|
|
1549
|
+
*/
|
|
1550
|
+
encrypt?: boolean;
|
|
1543
1551
|
}
|
|
1544
1552
|
|
|
1545
1553
|
/**
|
|
@@ -1582,6 +1590,10 @@ export namespace Models {
|
|
|
1582
1590
|
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1583
1591
|
*/
|
|
1584
1592
|
default?: string;
|
|
1593
|
+
/**
|
|
1594
|
+
* Defines whether this attribute is encrypted or not.
|
|
1595
|
+
*/
|
|
1596
|
+
encrypt?: boolean;
|
|
1585
1597
|
}
|
|
1586
1598
|
|
|
1587
1599
|
/**
|
|
@@ -1624,6 +1636,10 @@ export namespace Models {
|
|
|
1624
1636
|
* Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
1625
1637
|
*/
|
|
1626
1638
|
default?: string;
|
|
1639
|
+
/**
|
|
1640
|
+
* Defines whether this attribute is encrypted or not.
|
|
1641
|
+
*/
|
|
1642
|
+
encrypt?: boolean;
|
|
1627
1643
|
}
|
|
1628
1644
|
|
|
1629
1645
|
/**
|
|
@@ -2352,6 +2368,10 @@ export namespace Models {
|
|
|
2352
2368
|
* Default value for column when not provided. Cannot be set when column is required.
|
|
2353
2369
|
*/
|
|
2354
2370
|
default?: string;
|
|
2371
|
+
/**
|
|
2372
|
+
* Defines whether this column is encrypted or not.
|
|
2373
|
+
*/
|
|
2374
|
+
encrypt?: boolean;
|
|
2355
2375
|
}
|
|
2356
2376
|
|
|
2357
2377
|
/**
|
|
@@ -2394,6 +2414,10 @@ export namespace Models {
|
|
|
2394
2414
|
* Default value for column when not provided. Cannot be set when column is required.
|
|
2395
2415
|
*/
|
|
2396
2416
|
default?: string;
|
|
2417
|
+
/**
|
|
2418
|
+
* Defines whether this column is encrypted or not.
|
|
2419
|
+
*/
|
|
2420
|
+
encrypt?: boolean;
|
|
2397
2421
|
}
|
|
2398
2422
|
|
|
2399
2423
|
/**
|
|
@@ -2436,6 +2460,10 @@ export namespace Models {
|
|
|
2436
2460
|
* Default value for column when not provided. Cannot be set when column is required.
|
|
2437
2461
|
*/
|
|
2438
2462
|
default?: string;
|
|
2463
|
+
/**
|
|
2464
|
+
* Defines whether this column is encrypted or not.
|
|
2465
|
+
*/
|
|
2466
|
+
encrypt?: boolean;
|
|
2439
2467
|
}
|
|
2440
2468
|
|
|
2441
2469
|
/**
|
|
@@ -2478,6 +2506,10 @@ export namespace Models {
|
|
|
2478
2506
|
* Default value for column when not provided. Cannot be set when column is required.
|
|
2479
2507
|
*/
|
|
2480
2508
|
default?: string;
|
|
2509
|
+
/**
|
|
2510
|
+
* Defines whether this column is encrypted or not.
|
|
2511
|
+
*/
|
|
2512
|
+
encrypt?: boolean;
|
|
2481
2513
|
}
|
|
2482
2514
|
|
|
2483
2515
|
/**
|
|
@@ -6727,6 +6759,140 @@ export namespace Models {
|
|
|
6727
6759
|
version: string;
|
|
6728
6760
|
}
|
|
6729
6761
|
|
|
6762
|
+
/**
|
|
6763
|
+
* ActivityEvent
|
|
6764
|
+
*/
|
|
6765
|
+
export type ActivityEvent = {
|
|
6766
|
+
/**
|
|
6767
|
+
* Event ID.
|
|
6768
|
+
*/
|
|
6769
|
+
$id: string;
|
|
6770
|
+
/**
|
|
6771
|
+
* User type.
|
|
6772
|
+
*/
|
|
6773
|
+
userType: string;
|
|
6774
|
+
/**
|
|
6775
|
+
* User ID.
|
|
6776
|
+
*/
|
|
6777
|
+
userId: string;
|
|
6778
|
+
/**
|
|
6779
|
+
* User Email.
|
|
6780
|
+
*/
|
|
6781
|
+
userEmail: string;
|
|
6782
|
+
/**
|
|
6783
|
+
* User Name.
|
|
6784
|
+
*/
|
|
6785
|
+
userName: string;
|
|
6786
|
+
/**
|
|
6787
|
+
* Resource parent.
|
|
6788
|
+
*/
|
|
6789
|
+
resourceParent: string;
|
|
6790
|
+
/**
|
|
6791
|
+
* Resource type.
|
|
6792
|
+
*/
|
|
6793
|
+
resourceType: string;
|
|
6794
|
+
/**
|
|
6795
|
+
* Resource ID.
|
|
6796
|
+
*/
|
|
6797
|
+
resourceId: string;
|
|
6798
|
+
/**
|
|
6799
|
+
* Resource.
|
|
6800
|
+
*/
|
|
6801
|
+
resource: string;
|
|
6802
|
+
/**
|
|
6803
|
+
* Event name.
|
|
6804
|
+
*/
|
|
6805
|
+
event: string;
|
|
6806
|
+
/**
|
|
6807
|
+
* User agent.
|
|
6808
|
+
*/
|
|
6809
|
+
userAgent: string;
|
|
6810
|
+
/**
|
|
6811
|
+
* IP address.
|
|
6812
|
+
*/
|
|
6813
|
+
ip: string;
|
|
6814
|
+
/**
|
|
6815
|
+
* API mode when event triggered.
|
|
6816
|
+
*/
|
|
6817
|
+
mode: string;
|
|
6818
|
+
/**
|
|
6819
|
+
* Location.
|
|
6820
|
+
*/
|
|
6821
|
+
country: string;
|
|
6822
|
+
/**
|
|
6823
|
+
* Log creation date in ISO 8601 format.
|
|
6824
|
+
*/
|
|
6825
|
+
time: string;
|
|
6826
|
+
/**
|
|
6827
|
+
* Project ID.
|
|
6828
|
+
*/
|
|
6829
|
+
projectId: string;
|
|
6830
|
+
/**
|
|
6831
|
+
* Team ID.
|
|
6832
|
+
*/
|
|
6833
|
+
teamId: string;
|
|
6834
|
+
/**
|
|
6835
|
+
* Hostname.
|
|
6836
|
+
*/
|
|
6837
|
+
hostname: string;
|
|
6838
|
+
/**
|
|
6839
|
+
* Operating system code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/os.json).
|
|
6840
|
+
*/
|
|
6841
|
+
osCode: string;
|
|
6842
|
+
/**
|
|
6843
|
+
* Operating system name.
|
|
6844
|
+
*/
|
|
6845
|
+
osName: string;
|
|
6846
|
+
/**
|
|
6847
|
+
* Operating system version.
|
|
6848
|
+
*/
|
|
6849
|
+
osVersion: string;
|
|
6850
|
+
/**
|
|
6851
|
+
* Client type.
|
|
6852
|
+
*/
|
|
6853
|
+
clientType: string;
|
|
6854
|
+
/**
|
|
6855
|
+
* Client code name. View list of [available options](https://github.com/appwrite/appwrite/blob/master/docs/lists/clients.json).
|
|
6856
|
+
*/
|
|
6857
|
+
clientCode: string;
|
|
6858
|
+
/**
|
|
6859
|
+
* Client name.
|
|
6860
|
+
*/
|
|
6861
|
+
clientName: string;
|
|
6862
|
+
/**
|
|
6863
|
+
* Client version.
|
|
6864
|
+
*/
|
|
6865
|
+
clientVersion: string;
|
|
6866
|
+
/**
|
|
6867
|
+
* Client engine name.
|
|
6868
|
+
*/
|
|
6869
|
+
clientEngine: string;
|
|
6870
|
+
/**
|
|
6871
|
+
* Client engine name.
|
|
6872
|
+
*/
|
|
6873
|
+
clientEngineVersion: string;
|
|
6874
|
+
/**
|
|
6875
|
+
* Device name.
|
|
6876
|
+
*/
|
|
6877
|
+
deviceName: string;
|
|
6878
|
+
/**
|
|
6879
|
+
* Device brand name.
|
|
6880
|
+
*/
|
|
6881
|
+
deviceBrand: string;
|
|
6882
|
+
/**
|
|
6883
|
+
* Device model name.
|
|
6884
|
+
*/
|
|
6885
|
+
deviceModel: string;
|
|
6886
|
+
/**
|
|
6887
|
+
* Country two-character ISO 3166-1 alpha code.
|
|
6888
|
+
*/
|
|
6889
|
+
countryCode: string;
|
|
6890
|
+
/**
|
|
6891
|
+
* Country name.
|
|
6892
|
+
*/
|
|
6893
|
+
countryName: string;
|
|
6894
|
+
}
|
|
6895
|
+
|
|
6730
6896
|
/**
|
|
6731
6897
|
* AdditionalResource
|
|
6732
6898
|
*/
|
|
@@ -8645,6 +8811,20 @@ export namespace Models {
|
|
|
8645
8811
|
available: boolean;
|
|
8646
8812
|
}
|
|
8647
8813
|
|
|
8814
|
+
/**
|
|
8815
|
+
* Activity event list
|
|
8816
|
+
*/
|
|
8817
|
+
export type ActivityEventList = {
|
|
8818
|
+
/**
|
|
8819
|
+
* Total number of events that matched your query.
|
|
8820
|
+
*/
|
|
8821
|
+
total: number;
|
|
8822
|
+
/**
|
|
8823
|
+
* List of events.
|
|
8824
|
+
*/
|
|
8825
|
+
events: ActivityEvent[];
|
|
8826
|
+
}
|
|
8827
|
+
|
|
8648
8828
|
/**
|
|
8649
8829
|
* Aggregation team list
|
|
8650
8830
|
*/
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Service } from '../service';
|
|
2
|
+
import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
|
|
3
|
+
import type { Models } from '../models';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class Activities {
|
|
7
|
+
client: Client;
|
|
8
|
+
|
|
9
|
+
constructor(client: Client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* List all events for selected filters.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} params.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 attributes such as userId, teamId, etc.
|
|
17
|
+
* @throws {AppwriteException}
|
|
18
|
+
* @returns {Promise<Models.ActivityEventList>}
|
|
19
|
+
*/
|
|
20
|
+
listEvents(params?: { queries?: string }): Promise<Models.ActivityEventList>;
|
|
21
|
+
/**
|
|
22
|
+
* List all events for selected filters.
|
|
23
|
+
*
|
|
24
|
+
* @param {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 attributes such as userId, teamId, etc.
|
|
25
|
+
* @throws {AppwriteException}
|
|
26
|
+
* @returns {Promise<Models.ActivityEventList>}
|
|
27
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
28
|
+
*/
|
|
29
|
+
listEvents(queries?: string): Promise<Models.ActivityEventList>;
|
|
30
|
+
listEvents(
|
|
31
|
+
paramsOrFirst?: { queries?: string } | string
|
|
32
|
+
): Promise<Models.ActivityEventList> {
|
|
33
|
+
let params: { queries?: string };
|
|
34
|
+
|
|
35
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
36
|
+
params = (paramsOrFirst || {}) as { queries?: string };
|
|
37
|
+
} else {
|
|
38
|
+
params = {
|
|
39
|
+
queries: paramsOrFirst as string
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const queries = params.queries;
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
const apiPath = '/activities/events';
|
|
47
|
+
const payload: Payload = {};
|
|
48
|
+
if (typeof queries !== 'undefined') {
|
|
49
|
+
payload['queries'] = queries;
|
|
50
|
+
}
|
|
51
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
52
|
+
|
|
53
|
+
const apiHeaders: { [header: string]: string } = {
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return this.client.call(
|
|
57
|
+
'get',
|
|
58
|
+
uri,
|
|
59
|
+
apiHeaders,
|
|
60
|
+
payload
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Get event by ID.
|
|
66
|
+
*
|
|
67
|
+
*
|
|
68
|
+
* @param {string} params.eventId - Event ID.
|
|
69
|
+
* @throws {AppwriteException}
|
|
70
|
+
* @returns {Promise<Models.ActivityEvent>}
|
|
71
|
+
*/
|
|
72
|
+
getEvent(params: { eventId: string }): Promise<Models.ActivityEvent>;
|
|
73
|
+
/**
|
|
74
|
+
* Get event by ID.
|
|
75
|
+
*
|
|
76
|
+
*
|
|
77
|
+
* @param {string} eventId - Event ID.
|
|
78
|
+
* @throws {AppwriteException}
|
|
79
|
+
* @returns {Promise<Models.ActivityEvent>}
|
|
80
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
81
|
+
*/
|
|
82
|
+
getEvent(eventId: string): Promise<Models.ActivityEvent>;
|
|
83
|
+
getEvent(
|
|
84
|
+
paramsOrFirst: { eventId: string } | string
|
|
85
|
+
): Promise<Models.ActivityEvent> {
|
|
86
|
+
let params: { eventId: string };
|
|
87
|
+
|
|
88
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
89
|
+
params = (paramsOrFirst || {}) as { eventId: string };
|
|
90
|
+
} else {
|
|
91
|
+
params = {
|
|
92
|
+
eventId: paramsOrFirst as string
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const eventId = params.eventId;
|
|
97
|
+
|
|
98
|
+
if (typeof eventId === 'undefined') {
|
|
99
|
+
throw new AppwriteException('Missing required parameter: "eventId"');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const apiPath = '/activities/events/{eventId}'.replace('{eventId}', eventId);
|
|
103
|
+
const payload: Payload = {};
|
|
104
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
105
|
+
|
|
106
|
+
const apiHeaders: { [header: string]: string } = {
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return this.client.call(
|
|
110
|
+
'get',
|
|
111
|
+
uri,
|
|
112
|
+
apiHeaders,
|
|
113
|
+
payload
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -2801,10 +2801,11 @@ export class Databases {
|
|
|
2801
2801
|
* @param {boolean} params.required - Is attribute required?
|
|
2802
2802
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2803
2803
|
* @param {boolean} params.array - Is attribute an array?
|
|
2804
|
+
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
2804
2805
|
* @throws {AppwriteException}
|
|
2805
2806
|
* @returns {Promise<Models.AttributeLongtext>}
|
|
2806
2807
|
*/
|
|
2807
|
-
createLongtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.AttributeLongtext>;
|
|
2808
|
+
createLongtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeLongtext>;
|
|
2808
2809
|
/**
|
|
2809
2810
|
* Create a longtext attribute.
|
|
2810
2811
|
*
|
|
@@ -2815,19 +2816,20 @@ export class Databases {
|
|
|
2815
2816
|
* @param {boolean} required - Is attribute required?
|
|
2816
2817
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2817
2818
|
* @param {boolean} array - Is attribute an array?
|
|
2819
|
+
* @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
2818
2820
|
* @throws {AppwriteException}
|
|
2819
2821
|
* @returns {Promise<Models.AttributeLongtext>}
|
|
2820
2822
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
2821
2823
|
*/
|
|
2822
|
-
createLongtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeLongtext>;
|
|
2824
|
+
createLongtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeLongtext>;
|
|
2823
2825
|
createLongtextAttribute(
|
|
2824
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
2825
|
-
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?]
|
|
2826
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
2827
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
2826
2828
|
): Promise<Models.AttributeLongtext> {
|
|
2827
|
-
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
2829
|
+
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
2828
2830
|
|
|
2829
2831
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
2830
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
2832
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
2831
2833
|
} else {
|
|
2832
2834
|
params = {
|
|
2833
2835
|
databaseId: paramsOrFirst as string,
|
|
@@ -2835,7 +2837,8 @@ export class Databases {
|
|
|
2835
2837
|
key: rest[1] as string,
|
|
2836
2838
|
required: rest[2] as boolean,
|
|
2837
2839
|
xdefault: rest[3] as string,
|
|
2838
|
-
array: rest[4] as boolean
|
|
2840
|
+
array: rest[4] as boolean,
|
|
2841
|
+
encrypt: rest[5] as boolean
|
|
2839
2842
|
};
|
|
2840
2843
|
}
|
|
2841
2844
|
|
|
@@ -2845,6 +2848,7 @@ export class Databases {
|
|
|
2845
2848
|
const required = params.required;
|
|
2846
2849
|
const xdefault = params.xdefault;
|
|
2847
2850
|
const array = params.array;
|
|
2851
|
+
const encrypt = params.encrypt;
|
|
2848
2852
|
|
|
2849
2853
|
if (typeof databaseId === 'undefined') {
|
|
2850
2854
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -2873,6 +2877,9 @@ export class Databases {
|
|
|
2873
2877
|
if (typeof array !== 'undefined') {
|
|
2874
2878
|
payload['array'] = array;
|
|
2875
2879
|
}
|
|
2880
|
+
if (typeof encrypt !== 'undefined') {
|
|
2881
|
+
payload['encrypt'] = encrypt;
|
|
2882
|
+
}
|
|
2876
2883
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
2877
2884
|
|
|
2878
2885
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -2993,10 +3000,11 @@ export class Databases {
|
|
|
2993
3000
|
* @param {boolean} params.required - Is attribute required?
|
|
2994
3001
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
2995
3002
|
* @param {boolean} params.array - Is attribute an array?
|
|
3003
|
+
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
2996
3004
|
* @throws {AppwriteException}
|
|
2997
3005
|
* @returns {Promise<Models.AttributeMediumtext>}
|
|
2998
3006
|
*/
|
|
2999
|
-
createMediumtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.AttributeMediumtext>;
|
|
3007
|
+
createMediumtextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeMediumtext>;
|
|
3000
3008
|
/**
|
|
3001
3009
|
* Create a mediumtext attribute.
|
|
3002
3010
|
*
|
|
@@ -3007,19 +3015,20 @@ export class Databases {
|
|
|
3007
3015
|
* @param {boolean} required - Is attribute required?
|
|
3008
3016
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3009
3017
|
* @param {boolean} array - Is attribute an array?
|
|
3018
|
+
* @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
3010
3019
|
* @throws {AppwriteException}
|
|
3011
3020
|
* @returns {Promise<Models.AttributeMediumtext>}
|
|
3012
3021
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3013
3022
|
*/
|
|
3014
|
-
createMediumtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeMediumtext>;
|
|
3023
|
+
createMediumtextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeMediumtext>;
|
|
3015
3024
|
createMediumtextAttribute(
|
|
3016
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
3017
|
-
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?]
|
|
3025
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
3026
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
3018
3027
|
): Promise<Models.AttributeMediumtext> {
|
|
3019
|
-
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
3028
|
+
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3020
3029
|
|
|
3021
3030
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3022
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
3031
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3023
3032
|
} else {
|
|
3024
3033
|
params = {
|
|
3025
3034
|
databaseId: paramsOrFirst as string,
|
|
@@ -3027,7 +3036,8 @@ export class Databases {
|
|
|
3027
3036
|
key: rest[1] as string,
|
|
3028
3037
|
required: rest[2] as boolean,
|
|
3029
3038
|
xdefault: rest[3] as string,
|
|
3030
|
-
array: rest[4] as boolean
|
|
3039
|
+
array: rest[4] as boolean,
|
|
3040
|
+
encrypt: rest[5] as boolean
|
|
3031
3041
|
};
|
|
3032
3042
|
}
|
|
3033
3043
|
|
|
@@ -3037,6 +3047,7 @@ export class Databases {
|
|
|
3037
3047
|
const required = params.required;
|
|
3038
3048
|
const xdefault = params.xdefault;
|
|
3039
3049
|
const array = params.array;
|
|
3050
|
+
const encrypt = params.encrypt;
|
|
3040
3051
|
|
|
3041
3052
|
if (typeof databaseId === 'undefined') {
|
|
3042
3053
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -3065,6 +3076,9 @@ export class Databases {
|
|
|
3065
3076
|
if (typeof array !== 'undefined') {
|
|
3066
3077
|
payload['array'] = array;
|
|
3067
3078
|
}
|
|
3079
|
+
if (typeof encrypt !== 'undefined') {
|
|
3080
|
+
payload['encrypt'] = encrypt;
|
|
3081
|
+
}
|
|
3068
3082
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3069
3083
|
|
|
3070
3084
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -3874,10 +3888,11 @@ export class Databases {
|
|
|
3874
3888
|
* @param {boolean} params.required - Is attribute required?
|
|
3875
3889
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3876
3890
|
* @param {boolean} params.array - Is attribute an array?
|
|
3891
|
+
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
3877
3892
|
* @throws {AppwriteException}
|
|
3878
3893
|
* @returns {Promise<Models.AttributeText>}
|
|
3879
3894
|
*/
|
|
3880
|
-
createTextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.AttributeText>;
|
|
3895
|
+
createTextAttribute(params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeText>;
|
|
3881
3896
|
/**
|
|
3882
3897
|
* Create a text attribute.
|
|
3883
3898
|
*
|
|
@@ -3888,19 +3903,20 @@ export class Databases {
|
|
|
3888
3903
|
* @param {boolean} required - Is attribute required?
|
|
3889
3904
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
3890
3905
|
* @param {boolean} array - Is attribute an array?
|
|
3906
|
+
* @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
3891
3907
|
* @throws {AppwriteException}
|
|
3892
3908
|
* @returns {Promise<Models.AttributeText>}
|
|
3893
3909
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
3894
3910
|
*/
|
|
3895
|
-
createTextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeText>;
|
|
3911
|
+
createTextAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeText>;
|
|
3896
3912
|
createTextAttribute(
|
|
3897
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
3898
|
-
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?]
|
|
3913
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
3914
|
+
...rest: [(string)?, (string)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
3899
3915
|
): Promise<Models.AttributeText> {
|
|
3900
|
-
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
3916
|
+
let params: { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3901
3917
|
|
|
3902
3918
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3903
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean };
|
|
3919
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
3904
3920
|
} else {
|
|
3905
3921
|
params = {
|
|
3906
3922
|
databaseId: paramsOrFirst as string,
|
|
@@ -3908,7 +3924,8 @@ export class Databases {
|
|
|
3908
3924
|
key: rest[1] as string,
|
|
3909
3925
|
required: rest[2] as boolean,
|
|
3910
3926
|
xdefault: rest[3] as string,
|
|
3911
|
-
array: rest[4] as boolean
|
|
3927
|
+
array: rest[4] as boolean,
|
|
3928
|
+
encrypt: rest[5] as boolean
|
|
3912
3929
|
};
|
|
3913
3930
|
}
|
|
3914
3931
|
|
|
@@ -3918,6 +3935,7 @@ export class Databases {
|
|
|
3918
3935
|
const required = params.required;
|
|
3919
3936
|
const xdefault = params.xdefault;
|
|
3920
3937
|
const array = params.array;
|
|
3938
|
+
const encrypt = params.encrypt;
|
|
3921
3939
|
|
|
3922
3940
|
if (typeof databaseId === 'undefined') {
|
|
3923
3941
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -3946,6 +3964,9 @@ export class Databases {
|
|
|
3946
3964
|
if (typeof array !== 'undefined') {
|
|
3947
3965
|
payload['array'] = array;
|
|
3948
3966
|
}
|
|
3967
|
+
if (typeof encrypt !== 'undefined') {
|
|
3968
|
+
payload['encrypt'] = encrypt;
|
|
3969
|
+
}
|
|
3949
3970
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3950
3971
|
|
|
3951
3972
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -4261,10 +4282,11 @@ export class Databases {
|
|
|
4261
4282
|
* @param {boolean} params.required - Is attribute required?
|
|
4262
4283
|
* @param {string} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
4263
4284
|
* @param {boolean} params.array - Is attribute an array?
|
|
4285
|
+
* @param {boolean} params.encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
4264
4286
|
* @throws {AppwriteException}
|
|
4265
4287
|
* @returns {Promise<Models.AttributeVarchar>}
|
|
4266
4288
|
*/
|
|
4267
|
-
createVarcharAttribute(params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean }): Promise<Models.AttributeVarchar>;
|
|
4289
|
+
createVarcharAttribute(params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean }): Promise<Models.AttributeVarchar>;
|
|
4268
4290
|
/**
|
|
4269
4291
|
* Create a varchar attribute.
|
|
4270
4292
|
*
|
|
@@ -4276,19 +4298,20 @@ export class Databases {
|
|
|
4276
4298
|
* @param {boolean} required - Is attribute required?
|
|
4277
4299
|
* @param {string} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
|
|
4278
4300
|
* @param {boolean} array - Is attribute an array?
|
|
4301
|
+
* @param {boolean} encrypt - Toggle encryption for the attribute. Encryption enhances security by not storing any plain text values in the database. However, encrypted attributes cannot be queried.
|
|
4279
4302
|
* @throws {AppwriteException}
|
|
4280
4303
|
* @returns {Promise<Models.AttributeVarchar>}
|
|
4281
4304
|
* @deprecated Use the object parameter style method for a better developer experience.
|
|
4282
4305
|
*/
|
|
4283
|
-
createVarcharAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean): Promise<Models.AttributeVarchar>;
|
|
4306
|
+
createVarcharAttribute(databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean): Promise<Models.AttributeVarchar>;
|
|
4284
4307
|
createVarcharAttribute(
|
|
4285
|
-
paramsOrFirst: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean } | string,
|
|
4286
|
-
...rest: [(string)?, (string)?, (number)?, (boolean)?, (string)?, (boolean)?]
|
|
4308
|
+
paramsOrFirst: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean } | string,
|
|
4309
|
+
...rest: [(string)?, (string)?, (number)?, (boolean)?, (string)?, (boolean)?, (boolean)?]
|
|
4287
4310
|
): Promise<Models.AttributeVarchar> {
|
|
4288
|
-
let params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean };
|
|
4311
|
+
let params: { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
4289
4312
|
|
|
4290
4313
|
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
4291
|
-
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean };
|
|
4314
|
+
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, size: number, required: boolean, xdefault?: string, array?: boolean, encrypt?: boolean };
|
|
4292
4315
|
} else {
|
|
4293
4316
|
params = {
|
|
4294
4317
|
databaseId: paramsOrFirst as string,
|
|
@@ -4297,7 +4320,8 @@ export class Databases {
|
|
|
4297
4320
|
size: rest[2] as number,
|
|
4298
4321
|
required: rest[3] as boolean,
|
|
4299
4322
|
xdefault: rest[4] as string,
|
|
4300
|
-
array: rest[5] as boolean
|
|
4323
|
+
array: rest[5] as boolean,
|
|
4324
|
+
encrypt: rest[6] as boolean
|
|
4301
4325
|
};
|
|
4302
4326
|
}
|
|
4303
4327
|
|
|
@@ -4308,6 +4332,7 @@ export class Databases {
|
|
|
4308
4332
|
const required = params.required;
|
|
4309
4333
|
const xdefault = params.xdefault;
|
|
4310
4334
|
const array = params.array;
|
|
4335
|
+
const encrypt = params.encrypt;
|
|
4311
4336
|
|
|
4312
4337
|
if (typeof databaseId === 'undefined') {
|
|
4313
4338
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
@@ -4342,6 +4367,9 @@ export class Databases {
|
|
|
4342
4367
|
if (typeof array !== 'undefined') {
|
|
4343
4368
|
payload['array'] = array;
|
|
4344
4369
|
}
|
|
4370
|
+
if (typeof encrypt !== 'undefined') {
|
|
4371
|
+
payload['encrypt'] = encrypt;
|
|
4372
|
+
}
|
|
4345
4373
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
4346
4374
|
|
|
4347
4375
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -14,7 +14,7 @@ export class Migrations {
|
|
|
14
14
|
/**
|
|
15
15
|
* 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.
|
|
16
16
|
*
|
|
17
|
-
* @param {string[]} params.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
|
|
17
|
+
* @param {string[]} params.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, resourceId, resourceType, statusCounters, resourceData, errors
|
|
18
18
|
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
|
|
19
19
|
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
20
20
|
* @throws {AppwriteException}
|
|
@@ -24,7 +24,7 @@ export class Migrations {
|
|
|
24
24
|
/**
|
|
25
25
|
* 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.
|
|
26
26
|
*
|
|
27
|
-
* @param {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
|
|
27
|
+
* @param {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, resourceId, resourceType, statusCounters, resourceData, errors
|
|
28
28
|
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
|
|
29
29
|
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
|
|
30
30
|
* @throws {AppwriteException}
|