Skip to content

Commit e51c93f

Browse files
authoredMar 5, 2025
Merge pull request #37 from appwrite/dev
chore: regenerate sdks
2 parents 4f0aa4a + 1d5e903 commit e51c93f

17 files changed

+162
-81
lines changed
 

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
3333
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
3434

3535
```html
36-
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.5.1"></script>
36+
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.5.2"></script>
3737
```
3838

3939

@@ -108,4 +108,4 @@ This library is auto-generated by Appwrite custom [SDK Generator](https://github
108108

109109
## License
110110

111-
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
111+
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.

‎docs/examples/databases/update-float-attribute.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ const result = await databases.updateFloatAttribute(
1111
'<COLLECTION_ID>', // collectionId
1212
'', // key
1313
false, // required
14-
null, // min
15-
null, // max
1614
null, // default
15+
null, // min (optional)
16+
null, // max (optional)
1717
'' // newKey (optional)
1818
);
1919

‎docs/examples/databases/update-integer-attribute.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ const result = await databases.updateIntegerAttribute(
1111
'<COLLECTION_ID>', // collectionId
1212
'', // key
1313
false, // required
14-
null, // min
15-
null, // max
1614
null, // default
15+
null, // min (optional)
16+
null, // max (optional)
1717
'' // newKey (optional)
1818
);
1919

‎docs/examples/health/get-queue-usage-count.md ‎docs/examples/health/get-queue-stats-resources.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const client = new Client()
66

77
const health = new Health(client);
88

9-
const result = await health.getQueueUsageCount(
9+
const result = await health.getQueueStatsResources(
1010
null // threshold (optional)
1111
);
1212

‎docs/examples/health/get-queue-usage-dump.md ‎docs/examples/health/get-queue-stats-usage-dump.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const client = new Client()
66

77
const health = new Health(client);
88

9-
const result = await health.getQueueUsageDump(
9+
const result = await health.getQueueStatsUsageDump(
1010
null // threshold (optional)
1111
);
1212

‎docs/examples/health/get-queue.md

-11
This file was deleted.

‎docs/examples/organizations/create.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ const result = await organizations.create(
1111
'<NAME>', // name
1212
.Tier0, // billingPlan
1313
'<PAYMENT_METHOD_ID>', // paymentMethodId (optional)
14-
'<BILLING_ADDRESS_ID>' // billingAddressId (optional)
14+
'<BILLING_ADDRESS_ID>', // billingAddressId (optional)
15+
[], // invites (optional)
16+
'<COUPON_ID>', // couponId (optional)
17+
'<TAX_ID>', // taxId (optional)
18+
0 // budget (optional)
1519
);
1620

1721
console.log(result);

‎docs/examples/organizations/update-plan.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ const result = await organizations.updatePlan(
1010
'<ORGANIZATION_ID>', // organizationId
1111
.Tier0, // billingPlan
1212
'<PAYMENT_METHOD_ID>', // paymentMethodId (optional)
13-
'<BILLING_ADDRESS_ID>' // billingAddressId (optional)
13+
'<BILLING_ADDRESS_ID>', // billingAddressId (optional)
14+
[], // invites (optional)
15+
'<COUPON_ID>', // couponId (optional)
16+
'<TAX_ID>', // taxId (optional)
17+
0 // budget (optional)
1418
);
1519

1620
console.log(result);

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@appwrite.io/console",
33
"homepage": "https://appwrite.io/support",
44
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
5-
"version": "1.5.1",
5+
"version": "1.5.2",
66
"license": "BSD-3-Clause",
77
"main": "dist/cjs/sdk.js",
88
"exports": {

‎src/client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ class Client {
316316
'x-sdk-name': 'Console',
317317
'x-sdk-platform': 'console',
318318
'x-sdk-language': 'web',
319-
'x-sdk-version': '1.5.1',
319+
'x-sdk-version': '1.5.2',
320320
'X-Appwrite-Response-Format': '1.6.0',
321321
};
322322

‎src/enums/credit-card.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ export enum CreditCard {
1515
Visa = 'visa',
1616
MIR = 'mir',
1717
Maestro = 'maestro',
18+
Rupay = 'rupay',
1819
}

‎src/enums/name.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ export enum Name {
44
V1audits = 'v1-audits',
55
V1mails = 'v1-mails',
66
V1functions = 'v1-functions',
7-
V1usage = 'v1-usage',
8-
V1usagedump = 'v1-usage-dump',
7+
V1statsresources = 'v1-stats-resources',
8+
V1statsusage = 'v1-stats-usage',
9+
V1statsusagedump = 'v1-stats-usage-dump',
910
V1webhooks = 'v1-webhooks',
1011
V1certificates = 'v1-certificates',
1112
V1builds = 'v1-builds',

‎src/enums/runtime.ts

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export enum Runtime {
2020
Python311 = 'python-3.11',
2121
Python312 = 'python-3.12',
2222
Pythonml311 = 'python-ml-3.11',
23+
Deno121 = 'deno-1.21',
24+
Deno124 = 'deno-1.24',
25+
Deno135 = 'deno-1.35',
2326
Deno140 = 'deno-1.40',
2427
Deno146 = 'deno-1.46',
2528
Deno20 = 'deno-2.0',

‎src/models.ts

+86-1
Original file line numberDiff line numberDiff line change
@@ -3316,6 +3316,14 @@ export namespace Models {
33163316
* Aggregated number of bucket storage files (in bytes) per period.
33173317
*/
33183318
storage: Metric[];
3319+
/**
3320+
* Aggregated number of files transformations per period.
3321+
*/
3322+
imageTransformations: Metric[];
3323+
/**
3324+
* Total aggregated number of files transformations.
3325+
*/
3326+
imageTransformationsTotal: number;
33193327
}
33203328
/**
33213329
* UsageFunctions
@@ -3607,6 +3615,14 @@ export namespace Models {
36073615
* An array of aggregated number of database writes.
36083616
*/
36093617
databasesWrites: Metric[];
3618+
/**
3619+
* An array of aggregated number of image transformations.
3620+
*/
3621+
imageTransformations: Metric[];
3622+
/**
3623+
* Total aggregated number of image transformations.
3624+
*/
3625+
imageTransformationsTotal: number;
36103626
}
36113627
/**
36123628
* Headers
@@ -4254,6 +4270,10 @@ export namespace Models {
42544270
* Additional realtime usage cost
42554271
*/
42564272
additionalRealtimeAmount: number;
4273+
/**
4274+
* Billing plan
4275+
*/
4276+
plan: string;
42574277
/**
42584278
* Aggregated amount
42594279
*/
@@ -4357,6 +4377,10 @@ export namespace Models {
43574377
* Plan name
43584378
*/
43594379
name: string;
4380+
/**
4381+
* Plan description
4382+
*/
4383+
desc: string;
43604384
/**
43614385
* Plan order
43624386
*/
@@ -4377,6 +4401,10 @@ export namespace Models {
43774401
* Storage
43784402
*/
43794403
storage: number;
4404+
/**
4405+
* Image Transformations
4406+
*/
4407+
imageTransformations: number;
43804408
/**
43814409
* Members
43824410
*/
@@ -4428,7 +4456,11 @@ export namespace Models {
44284456
/**
44294457
* Additional resources
44304458
*/
4431-
addons: AdditionalResource;
4459+
usage: AdditionalResource[];
4460+
/**
4461+
* Addons
4462+
*/
4463+
addons: BillingPlanAddon[];
44324464
/**
44334465
* Custom SMTP
44344466
*/
@@ -4465,6 +4497,10 @@ export namespace Models {
44654497
* Does plan support mock numbers
44664498
*/
44674499
supportsMockNumbers: boolean;
4500+
/**
4501+
* Does plan support credit
4502+
*/
4503+
supportsCredits: boolean;
44684504
/**
44694505
* Does plan support backup policies.
44704506
*/
@@ -4474,6 +4510,35 @@ export namespace Models {
44744510
*/
44754511
backupPolicies: number;
44764512
}
4513+
/**
4514+
* BillingPlanAddon
4515+
*/
4516+
export type BillingPlanAddon = {
4517+
/**
4518+
* Is the addon supported in the plan?
4519+
*/
4520+
supported: boolean;
4521+
/**
4522+
* Addon limit
4523+
*/
4524+
limit: number;
4525+
/**
4526+
* Addon type
4527+
*/
4528+
type: string;
4529+
/**
4530+
* Price currency
4531+
*/
4532+
currency: string;
4533+
/**
4534+
* Price
4535+
*/
4536+
price: number;
4537+
/**
4538+
* Resource value
4539+
*/
4540+
value: number;
4541+
}
44774542
/**
44784543
* Campaign
44794544
*/
@@ -4787,6 +4852,10 @@ export namespace Models {
47874852
* Current active aggregation id.
47884853
*/
47894854
billingAggregationId: string;
4855+
/**
4856+
* Current active aggregation id.
4857+
*/
4858+
billingInvoiceId: string;
47904859
/**
47914860
* Default payment method.
47924861
*/
@@ -4799,6 +4868,14 @@ export namespace Models {
47994868
* Backup payment method.
48004869
*/
48014870
backupPaymentMethodId: string;
4871+
/**
4872+
* Team status.
4873+
*/
4874+
status: string;
4875+
/**
4876+
* Remarks on team status.
4877+
*/
4878+
remarks: string;
48024879
/**
48034880
* Organization agreements
48044881
*/
@@ -5098,6 +5175,14 @@ export namespace Models {
50985175
* Aggregated stats for database writes.
50995176
*/
51005177
databasesWrites: Metric[];
5178+
/**
5179+
* Aggregated stats for file transformations.
5180+
*/
5181+
imageTransformations: Metric[];
5182+
/**
5183+
* Aggregated stats for total file transformations.
5184+
*/
5185+
imageTransformationsTotal: number;
51015186
/**
51025187
* Aggregated stats for total users.
51035188
*/

‎src/services/databases.ts

+5-16
Original file line numberDiff line numberDiff line change
@@ -1039,14 +1039,14 @@ export class Databases {
10391039
* @param {string} collectionId
10401040
* @param {string} key
10411041
* @param {boolean} required
1042+
* @param {number} xdefault
10421043
* @param {number} min
10431044
* @param {number} max
1044-
* @param {number} xdefault
10451045
* @param {string} newKey
10461046
* @throws {AppwriteException}
10471047
* @returns {Promise<Models.AttributeFloat>}
10481048
*/
1049-
async updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number, newKey?: string): Promise<Models.AttributeFloat> {
1049+
async updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeFloat> {
10501050
if (typeof databaseId === 'undefined') {
10511051
throw new AppwriteException('Missing required parameter: "databaseId"');
10521052
}
@@ -1059,12 +1059,6 @@ export class Databases {
10591059
if (typeof required === 'undefined') {
10601060
throw new AppwriteException('Missing required parameter: "required"');
10611061
}
1062-
if (typeof min === 'undefined') {
1063-
throw new AppwriteException('Missing required parameter: "min"');
1064-
}
1065-
if (typeof max === 'undefined') {
1066-
throw new AppwriteException('Missing required parameter: "max"');
1067-
}
10681062
if (typeof xdefault === 'undefined') {
10691063
throw new AppwriteException('Missing required parameter: "xdefault"');
10701064
}
@@ -1177,14 +1171,14 @@ export class Databases {
11771171
* @param {string} collectionId
11781172
* @param {string} key
11791173
* @param {boolean} required
1174+
* @param {number} xdefault
11801175
* @param {number} min
11811176
* @param {number} max
1182-
* @param {number} xdefault
11831177
* @param {string} newKey
11841178
* @throws {AppwriteException}
11851179
* @returns {Promise<Models.AttributeInteger>}
11861180
*/
1187-
async updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number, newKey?: string): Promise<Models.AttributeInteger> {
1181+
async updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeInteger> {
11881182
if (typeof databaseId === 'undefined') {
11891183
throw new AppwriteException('Missing required parameter: "databaseId"');
11901184
}
@@ -1197,12 +1191,6 @@ export class Databases {
11971191
if (typeof required === 'undefined') {
11981192
throw new AppwriteException('Missing required parameter: "required"');
11991193
}
1200-
if (typeof min === 'undefined') {
1201-
throw new AppwriteException('Missing required parameter: "min"');
1202-
}
1203-
if (typeof max === 'undefined') {
1204-
throw new AppwriteException('Missing required parameter: "max"');
1205-
}
12061194
if (typeof xdefault === 'undefined') {
12071195
throw new AppwriteException('Missing required parameter: "xdefault"');
12081196
}
@@ -1837,6 +1825,7 @@ export class Databases {
18371825
* Create document
18381826
*
18391827
* Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection) API or directly from your database console.
1828+
18401829
*
18411830
* @param {string} databaseId
18421831
* @param {string} collectionId

‎src/services/health.ts

+10-37
Original file line numberDiff line numberDiff line change
@@ -169,33 +169,6 @@ export class Health {
169169
payload['project'] = this.client.config.project;
170170

171171

172-
return await this.client.call(
173-
'get',
174-
uri,
175-
apiHeaders,
176-
payload
177-
);
178-
}
179-
/**
180-
* Get queue
181-
*
182-
* Check the Appwrite queue messaging servers are up and connection is successful.
183-
*
184-
* @throws {AppwriteException}
185-
* @returns {Promise<Models.HealthStatus>}
186-
*/
187-
async getQueue(): Promise<Models.HealthStatus> {
188-
const apiPath = '/health/queue';
189-
const payload: Payload = {};
190-
const uri = new URL(this.client.config.endpoint + apiPath);
191-
192-
const apiHeaders: { [header: string]: string } = {
193-
'content-type': 'application/json',
194-
}
195-
196-
payload['project'] = this.client.config.project;
197-
198-
199172
return await this.client.call(
200173
'get',
201174
uri,
@@ -585,16 +558,16 @@ export class Health {
585558
);
586559
}
587560
/**
588-
* Get usage queue
561+
* Get stats resources queue
589562
*
590-
* Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.
563+
* Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.
591564
*
592565
* @param {number} threshold
593566
* @throws {AppwriteException}
594567
* @returns {Promise<Models.HealthQueue>}
595568
*/
596-
async getQueueUsage(threshold?: number): Promise<Models.HealthQueue> {
597-
const apiPath = '/health/queue/usage';
569+
async getQueueStatsResources(threshold?: number): Promise<Models.HealthQueue> {
570+
const apiPath = '/health/queue/stats-resources';
598571
const payload: Payload = {};
599572
if (typeof threshold !== 'undefined') {
600573
payload['threshold'] = threshold;
@@ -616,16 +589,16 @@ export class Health {
616589
);
617590
}
618591
/**
619-
* Get usage count aggregation queue
592+
* Get stats usage queue
620593
*
621-
* Get the usage count aggregation queue.
594+
* Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.
622595
*
623596
* @param {number} threshold
624597
* @throws {AppwriteException}
625598
* @returns {Promise<Models.HealthQueue>}
626599
*/
627-
async getQueueUsageCount(threshold?: number): Promise<Models.HealthQueue> {
628-
const apiPath = '/health/queue/usage-count';
600+
async getQueueUsage(threshold?: number): Promise<Models.HealthQueue> {
601+
const apiPath = '/health/queue/stats-usage';
629602
const payload: Payload = {};
630603
if (typeof threshold !== 'undefined') {
631604
payload['threshold'] = threshold;
@@ -655,8 +628,8 @@ export class Health {
655628
* @throws {AppwriteException}
656629
* @returns {Promise<Models.HealthQueue>}
657630
*/
658-
async getQueueUsageDump(threshold?: number): Promise<Models.HealthQueue> {
659-
const apiPath = '/health/queue/usage-dump';
631+
async getQueueStatsUsageDump(threshold?: number): Promise<Models.HealthQueue> {
632+
const apiPath = '/health/queue/stats-usage-dump';
660633
const payload: Payload = {};
661634
if (typeof threshold !== 'undefined') {
662635
payload['threshold'] = threshold;

‎src/services/organizations.ts

+34-2
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@ export class Organizations {
5656
* @param {BillingPlan} billingPlan
5757
* @param {string} paymentMethodId
5858
* @param {string} billingAddressId
59+
* @param {string[]} invites
60+
* @param {string} couponId
61+
* @param {string} taxId
62+
* @param {number} budget
5963
* @throws {AppwriteException}
6064
* @returns {Promise<Models.Organization<Preferences>>}
6165
*/
62-
async create<Preferences extends Models.Preferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string): Promise<Models.Organization<Preferences>> {
66+
async create<Preferences extends Models.Preferences>(organizationId: string, name: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>> {
6367
if (typeof organizationId === 'undefined') {
6468
throw new AppwriteException('Missing required parameter: "organizationId"');
6569
}
@@ -86,6 +90,18 @@ export class Organizations {
8690
if (typeof billingAddressId !== 'undefined') {
8791
payload['billingAddressId'] = billingAddressId;
8892
}
93+
if (typeof invites !== 'undefined') {
94+
payload['invites'] = invites;
95+
}
96+
if (typeof couponId !== 'undefined') {
97+
payload['couponId'] = couponId;
98+
}
99+
if (typeof taxId !== 'undefined') {
100+
payload['taxId'] = taxId;
101+
}
102+
if (typeof budget !== 'undefined') {
103+
payload['budget'] = budget;
104+
}
89105
const uri = new URL(this.client.config.endpoint + apiPath);
90106

91107
const apiHeaders: { [header: string]: string } = {
@@ -892,10 +908,14 @@ export class Organizations {
892908
* @param {BillingPlan} billingPlan
893909
* @param {string} paymentMethodId
894910
* @param {string} billingAddressId
911+
* @param {string[]} invites
912+
* @param {string} couponId
913+
* @param {string} taxId
914+
* @param {number} budget
895915
* @throws {AppwriteException}
896916
* @returns {Promise<Models.Organization<Preferences>>}
897917
*/
898-
async updatePlan<Preferences extends Models.Preferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string): Promise<Models.Organization<Preferences>> {
918+
async updatePlan<Preferences extends Models.Preferences>(organizationId: string, billingPlan: BillingPlan, paymentMethodId?: string, billingAddressId?: string, invites?: string[], couponId?: string, taxId?: string, budget?: number): Promise<Models.Organization<Preferences>> {
899919
if (typeof organizationId === 'undefined') {
900920
throw new AppwriteException('Missing required parameter: "organizationId"');
901921
}
@@ -913,6 +933,18 @@ export class Organizations {
913933
if (typeof billingAddressId !== 'undefined') {
914934
payload['billingAddressId'] = billingAddressId;
915935
}
936+
if (typeof invites !== 'undefined') {
937+
payload['invites'] = invites;
938+
}
939+
if (typeof couponId !== 'undefined') {
940+
payload['couponId'] = couponId;
941+
}
942+
if (typeof taxId !== 'undefined') {
943+
payload['taxId'] = taxId;
944+
}
945+
if (typeof budget !== 'undefined') {
946+
payload['budget'] = budget;
947+
}
916948
const uri = new URL(this.client.config.endpoint + apiPath);
917949

918950
const apiHeaders: { [header: string]: string } = {

0 commit comments

Comments
 (0)
Please sign in to comment.