Skip to content

Commit

Permalink
Merge pull request #37 from appwrite/dev
Browse files Browse the repository at this point in the history
chore: regenerate sdks
  • Loading branch information
christyjacob4 authored Mar 5, 2025
2 parents 4f0aa4a + 1d5e903 commit e51c93f
Show file tree
Hide file tree
Showing 17 changed files with 162 additions and 81 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
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:

```html
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.5.1"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@1.5.2"></script>
```


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

## License

Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
Please see the [BSD-3-Clause license](https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE) file for more information.
4 changes: 2 additions & 2 deletions docs/examples/databases/update-float-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const result = await databases.updateFloatAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
null, // min
null, // max
null, // default
null, // min (optional)
null, // max (optional)
'' // newKey (optional)
);

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/databases/update-integer-attribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const result = await databases.updateIntegerAttribute(
'<COLLECTION_ID>', // collectionId
'', // key
false, // required
null, // min
null, // max
null, // default
null, // min (optional)
null, // max (optional)
'' // newKey (optional)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const client = new Client()

const health = new Health(client);

const result = await health.getQueueUsageCount(
const result = await health.getQueueStatsResources(
null // threshold (optional)
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const client = new Client()

const health = new Health(client);

const result = await health.getQueueUsageDump(
const result = await health.getQueueStatsUsageDump(
null // threshold (optional)
);

Expand Down
11 changes: 0 additions & 11 deletions docs/examples/health/get-queue.md

This file was deleted.

6 changes: 5 additions & 1 deletion docs/examples/organizations/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ const result = await organizations.create(
'<NAME>', // name
.Tier0, // billingPlan
'<PAYMENT_METHOD_ID>', // paymentMethodId (optional)
'<BILLING_ADDRESS_ID>' // billingAddressId (optional)
'<BILLING_ADDRESS_ID>', // billingAddressId (optional)
[], // invites (optional)
'<COUPON_ID>', // couponId (optional)
'<TAX_ID>', // taxId (optional)
0 // budget (optional)
);

console.log(result);
6 changes: 5 additions & 1 deletion docs/examples/organizations/update-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ const result = await organizations.updatePlan(
'<ORGANIZATION_ID>', // organizationId
.Tier0, // billingPlan
'<PAYMENT_METHOD_ID>', // paymentMethodId (optional)
'<BILLING_ADDRESS_ID>' // billingAddressId (optional)
'<BILLING_ADDRESS_ID>', // billingAddressId (optional)
[], // invites (optional)
'<COUPON_ID>', // couponId (optional)
'<TAX_ID>', // taxId (optional)
0 // budget (optional)
);

console.log(result);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@appwrite.io/console",
"homepage": "https://appwrite.io/support",
"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",
"version": "1.5.1",
"version": "1.5.2",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ class Client {
'x-sdk-name': 'Console',
'x-sdk-platform': 'console',
'x-sdk-language': 'web',
'x-sdk-version': '1.5.1',
'x-sdk-version': '1.5.2',
'X-Appwrite-Response-Format': '1.6.0',
};

Expand Down
1 change: 1 addition & 0 deletions src/enums/credit-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export enum CreditCard {
Visa = 'visa',
MIR = 'mir',
Maestro = 'maestro',
Rupay = 'rupay',
}
5 changes: 3 additions & 2 deletions src/enums/name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ export enum Name {
V1audits = 'v1-audits',
V1mails = 'v1-mails',
V1functions = 'v1-functions',
V1usage = 'v1-usage',
V1usagedump = 'v1-usage-dump',
V1statsresources = 'v1-stats-resources',
V1statsusage = 'v1-stats-usage',
V1statsusagedump = 'v1-stats-usage-dump',
V1webhooks = 'v1-webhooks',
V1certificates = 'v1-certificates',
V1builds = 'v1-builds',
Expand Down
3 changes: 3 additions & 0 deletions src/enums/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export enum Runtime {
Python311 = 'python-3.11',
Python312 = 'python-3.12',
Pythonml311 = 'python-ml-3.11',
Deno121 = 'deno-1.21',
Deno124 = 'deno-1.24',
Deno135 = 'deno-1.35',
Deno140 = 'deno-1.40',
Deno146 = 'deno-1.46',
Deno20 = 'deno-2.0',
Expand Down
87 changes: 86 additions & 1 deletion src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3316,6 +3316,14 @@ export namespace Models {
* Aggregated number of bucket storage files (in bytes) per period.
*/
storage: Metric[];
/**
* Aggregated number of files transformations per period.
*/
imageTransformations: Metric[];
/**
* Total aggregated number of files transformations.
*/
imageTransformationsTotal: number;
}
/**
* UsageFunctions
Expand Down Expand Up @@ -3607,6 +3615,14 @@ export namespace Models {
* An array of aggregated number of database writes.
*/
databasesWrites: Metric[];
/**
* An array of aggregated number of image transformations.
*/
imageTransformations: Metric[];
/**
* Total aggregated number of image transformations.
*/
imageTransformationsTotal: number;
}
/**
* Headers
Expand Down Expand Up @@ -4254,6 +4270,10 @@ export namespace Models {
* Additional realtime usage cost
*/
additionalRealtimeAmount: number;
/**
* Billing plan
*/
plan: string;
/**
* Aggregated amount
*/
Expand Down Expand Up @@ -4357,6 +4377,10 @@ export namespace Models {
* Plan name
*/
name: string;
/**
* Plan description
*/
desc: string;
/**
* Plan order
*/
Expand All @@ -4377,6 +4401,10 @@ export namespace Models {
* Storage
*/
storage: number;
/**
* Image Transformations
*/
imageTransformations: number;
/**
* Members
*/
Expand Down Expand Up @@ -4428,7 +4456,11 @@ export namespace Models {
/**
* Additional resources
*/
addons: AdditionalResource;
usage: AdditionalResource[];
/**
* Addons
*/
addons: BillingPlanAddon[];
/**
* Custom SMTP
*/
Expand Down Expand Up @@ -4465,6 +4497,10 @@ export namespace Models {
* Does plan support mock numbers
*/
supportsMockNumbers: boolean;
/**
* Does plan support credit
*/
supportsCredits: boolean;
/**
* Does plan support backup policies.
*/
Expand All @@ -4474,6 +4510,35 @@ export namespace Models {
*/
backupPolicies: number;
}
/**
* BillingPlanAddon
*/
export type BillingPlanAddon = {
/**
* Is the addon supported in the plan?
*/
supported: boolean;
/**
* Addon limit
*/
limit: number;
/**
* Addon type
*/
type: string;
/**
* Price currency
*/
currency: string;
/**
* Price
*/
price: number;
/**
* Resource value
*/
value: number;
}
/**
* Campaign
*/
Expand Down Expand Up @@ -4787,6 +4852,10 @@ export namespace Models {
* Current active aggregation id.
*/
billingAggregationId: string;
/**
* Current active aggregation id.
*/
billingInvoiceId: string;
/**
* Default payment method.
*/
Expand All @@ -4799,6 +4868,14 @@ export namespace Models {
* Backup payment method.
*/
backupPaymentMethodId: string;
/**
* Team status.
*/
status: string;
/**
* Remarks on team status.
*/
remarks: string;
/**
* Organization agreements
*/
Expand Down Expand Up @@ -5098,6 +5175,14 @@ export namespace Models {
* Aggregated stats for database writes.
*/
databasesWrites: Metric[];
/**
* Aggregated stats for file transformations.
*/
imageTransformations: Metric[];
/**
* Aggregated stats for total file transformations.
*/
imageTransformationsTotal: number;
/**
* Aggregated stats for total users.
*/
Expand Down
21 changes: 5 additions & 16 deletions src/services/databases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1039,14 +1039,14 @@ export class Databases {
* @param {string} collectionId
* @param {string} key
* @param {boolean} required
* @param {number} xdefault
* @param {number} min
* @param {number} max
* @param {number} xdefault
* @param {string} newKey
* @throws {AppwriteException}
* @returns {Promise<Models.AttributeFloat>}
*/
async updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number, newKey?: string): Promise<Models.AttributeFloat> {
async updateFloatAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeFloat> {
if (typeof databaseId === 'undefined') {
throw new AppwriteException('Missing required parameter: "databaseId"');
}
Expand All @@ -1059,12 +1059,6 @@ export class Databases {
if (typeof required === 'undefined') {
throw new AppwriteException('Missing required parameter: "required"');
}
if (typeof min === 'undefined') {
throw new AppwriteException('Missing required parameter: "min"');
}
if (typeof max === 'undefined') {
throw new AppwriteException('Missing required parameter: "max"');
}
if (typeof xdefault === 'undefined') {
throw new AppwriteException('Missing required parameter: "xdefault"');
}
Expand Down Expand Up @@ -1177,14 +1171,14 @@ export class Databases {
* @param {string} collectionId
* @param {string} key
* @param {boolean} required
* @param {number} xdefault
* @param {number} min
* @param {number} max
* @param {number} xdefault
* @param {string} newKey
* @throws {AppwriteException}
* @returns {Promise<Models.AttributeInteger>}
*/
async updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, min: number, max: number, xdefault?: number, newKey?: string): Promise<Models.AttributeInteger> {
async updateIntegerAttribute(databaseId: string, collectionId: string, key: string, required: boolean, xdefault?: number, min?: number, max?: number, newKey?: string): Promise<Models.AttributeInteger> {
if (typeof databaseId === 'undefined') {
throw new AppwriteException('Missing required parameter: "databaseId"');
}
Expand All @@ -1197,12 +1191,6 @@ export class Databases {
if (typeof required === 'undefined') {
throw new AppwriteException('Missing required parameter: "required"');
}
if (typeof min === 'undefined') {
throw new AppwriteException('Missing required parameter: "min"');
}
if (typeof max === 'undefined') {
throw new AppwriteException('Missing required parameter: "max"');
}
if (typeof xdefault === 'undefined') {
throw new AppwriteException('Missing required parameter: "xdefault"');
}
Expand Down Expand Up @@ -1837,6 +1825,7 @@ export class Databases {
* Create document
*
* 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.
*
* @param {string} databaseId
* @param {string} collectionId
Expand Down
Loading

0 comments on commit e51c93f

Please sign in to comment.