@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/dist/esm/sdk.js
CHANGED
|
@@ -534,7 +534,7 @@ class Client {
|
|
|
534
534
|
'x-sdk-name': 'Console',
|
|
535
535
|
'x-sdk-platform': 'console',
|
|
536
536
|
'x-sdk-language': 'web',
|
|
537
|
-
'x-sdk-version': '2.3.
|
|
537
|
+
'x-sdk-version': '2.3.1',
|
|
538
538
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
539
539
|
};
|
|
540
540
|
this.realtime = {
|
|
@@ -3187,6 +3187,52 @@ class Account {
|
|
|
3187
3187
|
}
|
|
3188
3188
|
}
|
|
3189
3189
|
|
|
3190
|
+
class Activities {
|
|
3191
|
+
constructor(client) {
|
|
3192
|
+
this.client = client;
|
|
3193
|
+
}
|
|
3194
|
+
listEvents(paramsOrFirst) {
|
|
3195
|
+
let params;
|
|
3196
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3197
|
+
params = (paramsOrFirst || {});
|
|
3198
|
+
}
|
|
3199
|
+
else {
|
|
3200
|
+
params = {
|
|
3201
|
+
queries: paramsOrFirst
|
|
3202
|
+
};
|
|
3203
|
+
}
|
|
3204
|
+
const queries = params.queries;
|
|
3205
|
+
const apiPath = '/activities/events';
|
|
3206
|
+
const payload = {};
|
|
3207
|
+
if (typeof queries !== 'undefined') {
|
|
3208
|
+
payload['queries'] = queries;
|
|
3209
|
+
}
|
|
3210
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3211
|
+
const apiHeaders = {};
|
|
3212
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
3213
|
+
}
|
|
3214
|
+
getEvent(paramsOrFirst) {
|
|
3215
|
+
let params;
|
|
3216
|
+
if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
3217
|
+
params = (paramsOrFirst || {});
|
|
3218
|
+
}
|
|
3219
|
+
else {
|
|
3220
|
+
params = {
|
|
3221
|
+
eventId: paramsOrFirst
|
|
3222
|
+
};
|
|
3223
|
+
}
|
|
3224
|
+
const eventId = params.eventId;
|
|
3225
|
+
if (typeof eventId === 'undefined') {
|
|
3226
|
+
throw new AppwriteException('Missing required parameter: "eventId"');
|
|
3227
|
+
}
|
|
3228
|
+
const apiPath = '/activities/events/{eventId}'.replace('{eventId}', eventId);
|
|
3229
|
+
const payload = {};
|
|
3230
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
3231
|
+
const apiHeaders = {};
|
|
3232
|
+
return this.client.call('get', uri, apiHeaders, payload);
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3190
3236
|
class Avatars {
|
|
3191
3237
|
constructor(client) {
|
|
3192
3238
|
this.client = client;
|
|
@@ -5712,7 +5758,8 @@ class Databases {
|
|
|
5712
5758
|
key: rest[1],
|
|
5713
5759
|
required: rest[2],
|
|
5714
5760
|
xdefault: rest[3],
|
|
5715
|
-
array: rest[4]
|
|
5761
|
+
array: rest[4],
|
|
5762
|
+
encrypt: rest[5]
|
|
5716
5763
|
};
|
|
5717
5764
|
}
|
|
5718
5765
|
const databaseId = params.databaseId;
|
|
@@ -5721,6 +5768,7 @@ class Databases {
|
|
|
5721
5768
|
const required = params.required;
|
|
5722
5769
|
const xdefault = params.xdefault;
|
|
5723
5770
|
const array = params.array;
|
|
5771
|
+
const encrypt = params.encrypt;
|
|
5724
5772
|
if (typeof databaseId === 'undefined') {
|
|
5725
5773
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
5726
5774
|
}
|
|
@@ -5747,6 +5795,9 @@ class Databases {
|
|
|
5747
5795
|
if (typeof array !== 'undefined') {
|
|
5748
5796
|
payload['array'] = array;
|
|
5749
5797
|
}
|
|
5798
|
+
if (typeof encrypt !== 'undefined') {
|
|
5799
|
+
payload['encrypt'] = encrypt;
|
|
5800
|
+
}
|
|
5750
5801
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5751
5802
|
const apiHeaders = {
|
|
5752
5803
|
'content-type': 'application/json',
|
|
@@ -5818,7 +5869,8 @@ class Databases {
|
|
|
5818
5869
|
key: rest[1],
|
|
5819
5870
|
required: rest[2],
|
|
5820
5871
|
xdefault: rest[3],
|
|
5821
|
-
array: rest[4]
|
|
5872
|
+
array: rest[4],
|
|
5873
|
+
encrypt: rest[5]
|
|
5822
5874
|
};
|
|
5823
5875
|
}
|
|
5824
5876
|
const databaseId = params.databaseId;
|
|
@@ -5827,6 +5879,7 @@ class Databases {
|
|
|
5827
5879
|
const required = params.required;
|
|
5828
5880
|
const xdefault = params.xdefault;
|
|
5829
5881
|
const array = params.array;
|
|
5882
|
+
const encrypt = params.encrypt;
|
|
5830
5883
|
if (typeof databaseId === 'undefined') {
|
|
5831
5884
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
5832
5885
|
}
|
|
@@ -5853,6 +5906,9 @@ class Databases {
|
|
|
5853
5906
|
if (typeof array !== 'undefined') {
|
|
5854
5907
|
payload['array'] = array;
|
|
5855
5908
|
}
|
|
5909
|
+
if (typeof encrypt !== 'undefined') {
|
|
5910
|
+
payload['encrypt'] = encrypt;
|
|
5911
|
+
}
|
|
5856
5912
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
5857
5913
|
const apiHeaders = {
|
|
5858
5914
|
'content-type': 'application/json',
|
|
@@ -6307,7 +6363,8 @@ class Databases {
|
|
|
6307
6363
|
key: rest[1],
|
|
6308
6364
|
required: rest[2],
|
|
6309
6365
|
xdefault: rest[3],
|
|
6310
|
-
array: rest[4]
|
|
6366
|
+
array: rest[4],
|
|
6367
|
+
encrypt: rest[5]
|
|
6311
6368
|
};
|
|
6312
6369
|
}
|
|
6313
6370
|
const databaseId = params.databaseId;
|
|
@@ -6316,6 +6373,7 @@ class Databases {
|
|
|
6316
6373
|
const required = params.required;
|
|
6317
6374
|
const xdefault = params.xdefault;
|
|
6318
6375
|
const array = params.array;
|
|
6376
|
+
const encrypt = params.encrypt;
|
|
6319
6377
|
if (typeof databaseId === 'undefined') {
|
|
6320
6378
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6321
6379
|
}
|
|
@@ -6342,6 +6400,9 @@ class Databases {
|
|
|
6342
6400
|
if (typeof array !== 'undefined') {
|
|
6343
6401
|
payload['array'] = array;
|
|
6344
6402
|
}
|
|
6403
|
+
if (typeof encrypt !== 'undefined') {
|
|
6404
|
+
payload['encrypt'] = encrypt;
|
|
6405
|
+
}
|
|
6345
6406
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6346
6407
|
const apiHeaders = {
|
|
6347
6408
|
'content-type': 'application/json',
|
|
@@ -6520,7 +6581,8 @@ class Databases {
|
|
|
6520
6581
|
size: rest[2],
|
|
6521
6582
|
required: rest[3],
|
|
6522
6583
|
xdefault: rest[4],
|
|
6523
|
-
array: rest[5]
|
|
6584
|
+
array: rest[5],
|
|
6585
|
+
encrypt: rest[6]
|
|
6524
6586
|
};
|
|
6525
6587
|
}
|
|
6526
6588
|
const databaseId = params.databaseId;
|
|
@@ -6530,6 +6592,7 @@ class Databases {
|
|
|
6530
6592
|
const required = params.required;
|
|
6531
6593
|
const xdefault = params.xdefault;
|
|
6532
6594
|
const array = params.array;
|
|
6595
|
+
const encrypt = params.encrypt;
|
|
6533
6596
|
if (typeof databaseId === 'undefined') {
|
|
6534
6597
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
6535
6598
|
}
|
|
@@ -6562,6 +6625,9 @@ class Databases {
|
|
|
6562
6625
|
if (typeof array !== 'undefined') {
|
|
6563
6626
|
payload['array'] = array;
|
|
6564
6627
|
}
|
|
6628
|
+
if (typeof encrypt !== 'undefined') {
|
|
6629
|
+
payload['encrypt'] = encrypt;
|
|
6630
|
+
}
|
|
6565
6631
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
6566
6632
|
const apiHeaders = {
|
|
6567
6633
|
'content-type': 'application/json',
|
|
@@ -21734,7 +21800,8 @@ class TablesDB {
|
|
|
21734
21800
|
key: rest[1],
|
|
21735
21801
|
required: rest[2],
|
|
21736
21802
|
xdefault: rest[3],
|
|
21737
|
-
array: rest[4]
|
|
21803
|
+
array: rest[4],
|
|
21804
|
+
encrypt: rest[5]
|
|
21738
21805
|
};
|
|
21739
21806
|
}
|
|
21740
21807
|
const databaseId = params.databaseId;
|
|
@@ -21743,6 +21810,7 @@ class TablesDB {
|
|
|
21743
21810
|
const required = params.required;
|
|
21744
21811
|
const xdefault = params.xdefault;
|
|
21745
21812
|
const array = params.array;
|
|
21813
|
+
const encrypt = params.encrypt;
|
|
21746
21814
|
if (typeof databaseId === 'undefined') {
|
|
21747
21815
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21748
21816
|
}
|
|
@@ -21769,6 +21837,9 @@ class TablesDB {
|
|
|
21769
21837
|
if (typeof array !== 'undefined') {
|
|
21770
21838
|
payload['array'] = array;
|
|
21771
21839
|
}
|
|
21840
|
+
if (typeof encrypt !== 'undefined') {
|
|
21841
|
+
payload['encrypt'] = encrypt;
|
|
21842
|
+
}
|
|
21772
21843
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21773
21844
|
const apiHeaders = {
|
|
21774
21845
|
'content-type': 'application/json',
|
|
@@ -21840,7 +21911,8 @@ class TablesDB {
|
|
|
21840
21911
|
key: rest[1],
|
|
21841
21912
|
required: rest[2],
|
|
21842
21913
|
xdefault: rest[3],
|
|
21843
|
-
array: rest[4]
|
|
21914
|
+
array: rest[4],
|
|
21915
|
+
encrypt: rest[5]
|
|
21844
21916
|
};
|
|
21845
21917
|
}
|
|
21846
21918
|
const databaseId = params.databaseId;
|
|
@@ -21849,6 +21921,7 @@ class TablesDB {
|
|
|
21849
21921
|
const required = params.required;
|
|
21850
21922
|
const xdefault = params.xdefault;
|
|
21851
21923
|
const array = params.array;
|
|
21924
|
+
const encrypt = params.encrypt;
|
|
21852
21925
|
if (typeof databaseId === 'undefined') {
|
|
21853
21926
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
21854
21927
|
}
|
|
@@ -21875,6 +21948,9 @@ class TablesDB {
|
|
|
21875
21948
|
if (typeof array !== 'undefined') {
|
|
21876
21949
|
payload['array'] = array;
|
|
21877
21950
|
}
|
|
21951
|
+
if (typeof encrypt !== 'undefined') {
|
|
21952
|
+
payload['encrypt'] = encrypt;
|
|
21953
|
+
}
|
|
21878
21954
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21879
21955
|
const apiHeaders = {
|
|
21880
21956
|
'content-type': 'application/json',
|
|
@@ -22329,7 +22405,8 @@ class TablesDB {
|
|
|
22329
22405
|
key: rest[1],
|
|
22330
22406
|
required: rest[2],
|
|
22331
22407
|
xdefault: rest[3],
|
|
22332
|
-
array: rest[4]
|
|
22408
|
+
array: rest[4],
|
|
22409
|
+
encrypt: rest[5]
|
|
22333
22410
|
};
|
|
22334
22411
|
}
|
|
22335
22412
|
const databaseId = params.databaseId;
|
|
@@ -22338,6 +22415,7 @@ class TablesDB {
|
|
|
22338
22415
|
const required = params.required;
|
|
22339
22416
|
const xdefault = params.xdefault;
|
|
22340
22417
|
const array = params.array;
|
|
22418
|
+
const encrypt = params.encrypt;
|
|
22341
22419
|
if (typeof databaseId === 'undefined') {
|
|
22342
22420
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
22343
22421
|
}
|
|
@@ -22364,6 +22442,9 @@ class TablesDB {
|
|
|
22364
22442
|
if (typeof array !== 'undefined') {
|
|
22365
22443
|
payload['array'] = array;
|
|
22366
22444
|
}
|
|
22445
|
+
if (typeof encrypt !== 'undefined') {
|
|
22446
|
+
payload['encrypt'] = encrypt;
|
|
22447
|
+
}
|
|
22367
22448
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
22368
22449
|
const apiHeaders = {
|
|
22369
22450
|
'content-type': 'application/json',
|
|
@@ -22542,7 +22623,8 @@ class TablesDB {
|
|
|
22542
22623
|
size: rest[2],
|
|
22543
22624
|
required: rest[3],
|
|
22544
22625
|
xdefault: rest[4],
|
|
22545
|
-
array: rest[5]
|
|
22626
|
+
array: rest[5],
|
|
22627
|
+
encrypt: rest[6]
|
|
22546
22628
|
};
|
|
22547
22629
|
}
|
|
22548
22630
|
const databaseId = params.databaseId;
|
|
@@ -22552,6 +22634,7 @@ class TablesDB {
|
|
|
22552
22634
|
const required = params.required;
|
|
22553
22635
|
const xdefault = params.xdefault;
|
|
22554
22636
|
const array = params.array;
|
|
22637
|
+
const encrypt = params.encrypt;
|
|
22555
22638
|
if (typeof databaseId === 'undefined') {
|
|
22556
22639
|
throw new AppwriteException('Missing required parameter: "databaseId"');
|
|
22557
22640
|
}
|
|
@@ -22584,6 +22667,9 @@ class TablesDB {
|
|
|
22584
22667
|
if (typeof array !== 'undefined') {
|
|
22585
22668
|
payload['array'] = array;
|
|
22586
22669
|
}
|
|
22670
|
+
if (typeof encrypt !== 'undefined') {
|
|
22671
|
+
payload['encrypt'] = encrypt;
|
|
22672
|
+
}
|
|
22587
22673
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
22588
22674
|
const apiHeaders = {
|
|
22589
22675
|
'content-type': 'application/json',
|
|
@@ -27900,9 +27986,6 @@ var Runtime;
|
|
|
27900
27986
|
Runtime["Python312"] = "python-3.12";
|
|
27901
27987
|
Runtime["Pythonml311"] = "python-ml-3.11";
|
|
27902
27988
|
Runtime["Pythonml312"] = "python-ml-3.12";
|
|
27903
|
-
Runtime["Deno121"] = "deno-1.21";
|
|
27904
|
-
Runtime["Deno124"] = "deno-1.24";
|
|
27905
|
-
Runtime["Deno135"] = "deno-1.35";
|
|
27906
27989
|
Runtime["Deno140"] = "deno-1.40";
|
|
27907
27990
|
Runtime["Deno146"] = "deno-1.46";
|
|
27908
27991
|
Runtime["Deno20"] = "deno-2.0";
|
|
@@ -27973,9 +28056,6 @@ var Runtimes;
|
|
|
27973
28056
|
Runtimes["Python312"] = "python-3.12";
|
|
27974
28057
|
Runtimes["Pythonml311"] = "python-ml-3.11";
|
|
27975
28058
|
Runtimes["Pythonml312"] = "python-ml-3.12";
|
|
27976
|
-
Runtimes["Deno121"] = "deno-1.21";
|
|
27977
|
-
Runtimes["Deno124"] = "deno-1.24";
|
|
27978
|
-
Runtimes["Deno135"] = "deno-1.35";
|
|
27979
28059
|
Runtimes["Deno140"] = "deno-1.40";
|
|
27980
28060
|
Runtimes["Deno146"] = "deno-1.46";
|
|
27981
28061
|
Runtimes["Deno20"] = "deno-2.0";
|
|
@@ -28533,9 +28613,6 @@ var BuildRuntime;
|
|
|
28533
28613
|
BuildRuntime["Python312"] = "python-3.12";
|
|
28534
28614
|
BuildRuntime["Pythonml311"] = "python-ml-3.11";
|
|
28535
28615
|
BuildRuntime["Pythonml312"] = "python-ml-3.12";
|
|
28536
|
-
BuildRuntime["Deno121"] = "deno-1.21";
|
|
28537
|
-
BuildRuntime["Deno124"] = "deno-1.24";
|
|
28538
|
-
BuildRuntime["Deno135"] = "deno-1.35";
|
|
28539
28616
|
BuildRuntime["Deno140"] = "deno-1.40";
|
|
28540
28617
|
BuildRuntime["Deno146"] = "deno-1.46";
|
|
28541
28618
|
BuildRuntime["Deno20"] = "deno-2.0";
|
|
@@ -28757,5 +28834,5 @@ var BillingPlanGroup;
|
|
|
28757
28834
|
BillingPlanGroup["Scale"] = "scale";
|
|
28758
28835
|
})(BillingPlanGroup || (BillingPlanGroup = {}));
|
|
28759
28836
|
|
|
28760
|
-
export { Account, Adapter, Api, ApiService, AppwriteException, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, BackupServices, Backups, BillingPlanGroup, Browser, BrowserPermission, BuildRuntime, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DeploymentDownloadType, DeploymentStatus, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, FilterType, Flag, Framework, Frameworks, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, IndexType, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Operator, OrderBy, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RegistrationType, RelationMutate, RelationshipType, Resources, Role, Runtime, Runtimes, SMTPSecure, Scopes, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, StatusCode, Storage, TablesDB, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, UseCases, Users, VCSDetectionType, VCSReferenceType, Vcs };
|
|
28837
|
+
export { Account, Activities, Adapter, Api, ApiService, AppwriteException, Assistant, AttributeStatus, AuthMethod, AuthenticationFactor, AuthenticatorType, Avatars, BackupServices, Backups, BillingPlanGroup, Browser, BrowserPermission, BuildRuntime, Channel, Client, ColumnStatus, Compression, Condition, Console, ConsoleResourceType, CreditCard, DatabaseType, Databases, DeploymentDownloadType, DeploymentStatus, Domains, EmailTemplateLocale, EmailTemplateType, ExecutionMethod, ExecutionStatus, ExecutionTrigger, FilterType, Flag, Framework, Frameworks, Functions, Graphql, Health, HealthAntivirusStatus, HealthCheckStatus, ID, ImageFormat, ImageGravity, IndexStatus, IndexType, Locale, MessagePriority, MessageStatus, Messaging, MessagingProviderType, Migrations, Name, OAuthProvider, Operator, OrderBy, Organizations, PasswordHash, Permission, Platform, PlatformType, Project, ProjectUsageRange, Projects, Proxy, ProxyResourceType, ProxyRuleDeploymentResourceType, ProxyRuleStatus, Query, Realtime, Region, RegistrationType, RelationMutate, RelationshipType, Resources, Role, Runtime, Runtimes, SMTPSecure, Scopes, Sites, SmsTemplateLocale, SmsTemplateType, SmtpEncryption, StatusCode, Storage, TablesDB, Teams, TemplateReferenceType, Theme, Timezone, Tokens, UsageRange, UseCases, Users, VCSDetectionType, VCSReferenceType, Vcs };
|
|
28761
28838
|
//# sourceMappingURL=sdk.js.map
|