Skip to content

Commit

Permalink
update: regen sdk.
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzNotABug committed Jan 28, 2025
1 parent 71ffdcb commit 619f00b
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 50 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
[![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
[![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)

**This SDK is compatible with Appwrite server version 1.6.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console/releases).**
**This SDK is compatible with Appwrite server version latest. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-console/releases).**

Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Console SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)

Expand All @@ -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/[email protected].0"></script>
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/[email protected].1"></script>
```


Expand Down
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.0",
"version": "1.5.1",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
Expand Down
8 changes: 5 additions & 3 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ type Headers = {
*/
type RealtimeResponse = {
/**
* Type of the response: 'error', 'event', 'connected', 'pong', or 'response'.
* Type of the response: 'error', 'event', 'connected', 'response' or 'pong'.
*/
type: 'error' | 'event' | 'connected' | 'response' | 'pong';

/**
* Data associated with the response based on the response type.
*/
data: RealtimeResponseAuthenticated | RealtimeResponseConnected | RealtimeResponseError | RealtimeResponseEvent<unknown>;
data: RealtimeResponseAuthenticated | RealtimeResponseConnected | RealtimeResponseError | RealtimeResponseEvent<unknown> | undefined;
}

/**
Expand Down 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.0',
'x-sdk-version': '1.5.1',
'X-Appwrite-Response-Format': '1.6.0',
};

Expand Down Expand Up @@ -544,6 +544,8 @@ class Client {
})
}
break;
case 'pong':
break; // Handle pong response if needed
case 'error':
throw message.data;
default:
Expand Down
48 changes: 48 additions & 0 deletions src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3135,6 +3135,14 @@ export namespace Models {
* Total aggregated number of total databases storage in bytes.
*/
storageTotal: number;
/**
* Total number of databases reads.
*/
databasesReadsTotal: number;
/**
* Total number of databases writes.
*/
databasesWritesTotal: number;
/**
* Aggregated number of databases per period.
*/
Expand All @@ -3151,6 +3159,14 @@ export namespace Models {
* An array of the aggregated number of databases storage in bytes per period.
*/
storage: Metric[];
/**
* An array of aggregated number of database reads.
*/
databasesReads: Metric[];
/**
* An array of aggregated number of database writes.
*/
databasesWrites: Metric[];
}
/**
* UsageDatabase
Expand All @@ -3172,6 +3188,14 @@ export namespace Models {
* Total aggregated number of total storage used in bytes.
*/
storageTotal: number;
/**
* Total number of databases reads.
*/
databaseReadsTotal: number;
/**
* Total number of databases writes.
*/
databaseWritesTotal: number;
/**
* Aggregated number of collections per period.
*/
Expand All @@ -3184,6 +3208,14 @@ export namespace Models {
* Aggregated storage used in bytes per period.
*/
storage: Metric[];
/**
* An array of aggregated number of database reads.
*/
databaseReads: Metric[];
/**
* An array of aggregated number of database writes.
*/
databaseWrites: Metric[];
}
/**
* UsageCollection
Expand Down Expand Up @@ -3507,6 +3539,14 @@ export namespace Models {
* Total aggregated number of function builds mbSeconds.
*/
buildsMbSecondsTotal: number;
/**
* Total number of databases reads.
*/
databasesReadsTotal: number;
/**
* Total number of databases writes.
*/
databasesWritesTotal: number;
/**
* Aggregated number of requests per period.
*/
Expand Down Expand Up @@ -3559,6 +3599,14 @@ export namespace Models {
* Aggregated breakdown in totals of phone auth by country.
*/
authPhoneCountryBreakdown: MetricBreakdown[];
/**
* An array of aggregated number of database reads.
*/
databasesReads: Metric[];
/**
* An array of aggregated number of database writes.
*/
databasesWrites: Metric[];
}
/**
* Headers
Expand Down
28 changes: 0 additions & 28 deletions src/services/avatars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ When one dimension is specified and the other is 0, the image is scaled with pre

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
/**
Expand Down Expand Up @@ -103,10 +99,6 @@ When one dimension is specified and the other is 0, the image is scaled with pre

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
/**
Expand Down Expand Up @@ -142,10 +134,6 @@ This endpoint does not follow HTTP redirects.

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
/**
Expand Down Expand Up @@ -191,10 +179,6 @@ When one dimension is specified and the other is 0, the image is scaled with pre

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
/**
Expand Down Expand Up @@ -240,10 +224,6 @@ This endpoint does not follow HTTP redirects.

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
/**
Expand Down Expand Up @@ -291,10 +271,6 @@ When one dimension is specified and the other is 0, the image is scaled with pre

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
/**
Expand Down Expand Up @@ -341,10 +317,6 @@ When one dimension is specified and the other is 0, the image is scaled with pre

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
}
4 changes: 0 additions & 4 deletions src/services/functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -769,10 +769,6 @@ Use the &quot;command&quot; param to set the entrypoint used to execute your cod

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
/**
Expand Down
12 changes: 0 additions & 12 deletions src/services/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,6 @@ If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunk

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
/**
Expand Down Expand Up @@ -556,10 +552,6 @@ If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunk

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
/**
Expand Down Expand Up @@ -594,10 +586,6 @@ If you&#039;re creating a new file using one of the Appwrite SDKs, all the chunk

payload['project'] = this.client.config.project;

for (const [key, value] of Object.entries(Client.flatten(payload))) {
uri.searchParams.append(key, value);
}

return uri.toString();
}
/**
Expand Down

0 comments on commit 619f00b

Please sign in to comment.