diff --git a/CHANGELOG.md b/CHANGELOG.md
index c55ea7bc..bbee4e7c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,10 @@
# Change Log
+## 25.1.1
+
+* Fixed: Removed `Advisor` service and `Insight`, `InsightCTA`, `InsightList`, `Report`, `ReportList` models (admin-only endpoints, not intended for client SDKs)
+* Added: `sizeActual` field to `File` model
+
## 25.1.0
* Added: Realtime `presences` channel and `RealtimePresence` types for presence subscriptions
diff --git a/README.md b/README.md
index 91363506..6ebf9c36 100644
--- a/README.md
+++ b/README.md
@@ -33,7 +33,7 @@ import { Client, Account } from "appwrite";
To install with a CDN (content delivery network) add the following scripts to the bottom of your
tag, but before you use any Appwrite services:
```html
-
+
```
diff --git a/docs/examples/advisor/get-insight.md b/docs/examples/advisor/get-insight.md
deleted file mode 100644
index 28661f98..00000000
--- a/docs/examples/advisor/get-insight.md
+++ /dev/null
@@ -1,16 +0,0 @@
-```javascript
-import { Client, Advisor } from "appwrite";
-
-const client = new Client()
- .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
- .setProject(''); // Your project ID
-
-const advisor = new Advisor(client);
-
-const result = await advisor.getInsight({
- reportId: '',
- insightId: ''
-});
-
-console.log(result);
-```
diff --git a/docs/examples/advisor/get-report.md b/docs/examples/advisor/get-report.md
deleted file mode 100644
index 79736784..00000000
--- a/docs/examples/advisor/get-report.md
+++ /dev/null
@@ -1,15 +0,0 @@
-```javascript
-import { Client, Advisor } from "appwrite";
-
-const client = new Client()
- .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
- .setProject(''); // Your project ID
-
-const advisor = new Advisor(client);
-
-const result = await advisor.getReport({
- reportId: ''
-});
-
-console.log(result);
-```
diff --git a/docs/examples/advisor/list-insights.md b/docs/examples/advisor/list-insights.md
deleted file mode 100644
index c9b8f2ea..00000000
--- a/docs/examples/advisor/list-insights.md
+++ /dev/null
@@ -1,17 +0,0 @@
-```javascript
-import { Client, Advisor } from "appwrite";
-
-const client = new Client()
- .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
- .setProject(''); // Your project ID
-
-const advisor = new Advisor(client);
-
-const result = await advisor.listInsights({
- reportId: '',
- queries: [], // optional
- total: false // optional
-});
-
-console.log(result);
-```
diff --git a/docs/examples/advisor/list-reports.md b/docs/examples/advisor/list-reports.md
deleted file mode 100644
index 9480e970..00000000
--- a/docs/examples/advisor/list-reports.md
+++ /dev/null
@@ -1,16 +0,0 @@
-```javascript
-import { Client, Advisor } from "appwrite";
-
-const client = new Client()
- .setEndpoint('https://.cloud.appwrite.io/v1') // Your API Endpoint
- .setProject(''); // Your project ID
-
-const advisor = new Advisor(client);
-
-const result = await advisor.listReports({
- queries: [], // optional
- total: false // optional
-});
-
-console.log(result);
-```
diff --git a/package-lock.json b/package-lock.json
index 0adf962c..ee1f26d3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "appwrite",
- "version": "25.1.0",
+ "version": "25.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "appwrite",
- "version": "25.1.0",
+ "version": "25.1.1",
"license": "BSD-3-Clause",
"dependencies": {
"json-bigint": "1.0.0"
diff --git a/package.json b/package.json
index 42b5b992..af76357c 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "appwrite",
"homepage": "https://appwrite.io/support",
"description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
- "version": "25.1.0",
+ "version": "25.1.1",
"license": "BSD-3-Clause",
"main": "dist/cjs/sdk.js",
"exports": {
diff --git a/src/client.ts b/src/client.ts
index 67ad9829..26012676 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -382,7 +382,7 @@ class Client {
'x-sdk-name': 'Web',
'x-sdk-platform': 'client',
'x-sdk-language': 'web',
- 'x-sdk-version': '25.1.0',
+ 'x-sdk-version': '25.1.1',
'X-Appwrite-Response-Format': '1.9.5',
};
diff --git a/src/index.ts b/src/index.ts
index 49067db4..89b0a515 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -14,7 +14,6 @@ export { Graphql } from './services/graphql';
export { Locale } from './services/locale';
export { Messaging } from './services/messaging';
export { Presences } from './services/presences';
-export { Advisor } from './services/advisor';
export { Storage } from './services/storage';
export { TablesDB } from './services/tables-db';
export { Teams } from './services/teams';
diff --git a/src/models.ts b/src/models.ts
index b1ef4d8f..9556fba0 100644
--- a/src/models.ts
+++ b/src/models.ts
@@ -246,34 +246,6 @@ export namespace Models {
transactions: Transaction[];
}
- /**
- * Insights List
- */
- export type InsightList = {
- /**
- * Total number of insights that matched your query.
- */
- total: number;
- /**
- * List of insights.
- */
- insights: Insight[];
- }
-
- /**
- * Reports List
- */
- export type ReportList = {
- /**
- * Total number of reports that matched your query.
- */
- total: number;
- /**
- * List of reports.
- */
- reports: Report[];
- }
-
/**
* Row
*/
@@ -996,6 +968,10 @@ export namespace Models {
* File original size in bytes.
*/
sizeOriginal: number;
+ /**
+ * File actual stored size in bytes after compression and/or encryption.
+ */
+ sizeActual: number;
/**
* Total number of chunks available
*/
@@ -1477,154 +1453,4 @@ export namespace Models {
*/
expired: boolean;
}
-
- /**
- * Insight
- */
- export type Insight = {
- /**
- * Insight ID.
- */
- $id: string;
- /**
- * Insight creation date in ISO 8601 format.
- */
- $createdAt: string;
- /**
- * Insight update date in ISO 8601 format.
- */
- $updatedAt: string;
- /**
- * Parent report ID. Insights always belong to a report.
- */
- reportId: string;
- /**
- * Insight type. One of databaseIndex (legacy), tablesDBIndex, documentsDBIndex, vectorsDBIndex, databasePerformance, sitePerformance, siteAccessibility, siteSeo, functionPerformance. The index types are engine-specific so each CTA can pair the right service+method (databases.createIndex, tablesDB.createIndex, documentsDB.createIndex, or vectorsDB.createIndex).
- */
- type: string;
- /**
- * Insight severity. One of info, warning, critical.
- */
- severity: string;
- /**
- * Insight status. One of active, dismissed.
- */
- status: string;
- /**
- * Type of the resource the insight is about. Plural noun, e.g. databases, sites, functions.
- */
- resourceType: string;
- /**
- * ID of the resource the insight is about.
- */
- resourceId: string;
- /**
- * Plural noun for the parent resource that contains the insight's resource, e.g. an insight about a column index on a table → resourceType=indexes, parentResourceType=tables. Empty when the resource has no parent.
- */
- parentResourceType: string;
- /**
- * ID of the parent resource. Empty when the resource has no parent.
- */
- parentResourceId: string;
- /**
- * Insight title.
- */
- title: string;
- /**
- * Short markdown summary describing the insight.
- */
- summary: string;
- /**
- * List of call-to-action buttons attached to this insight.
- */
- ctas: InsightCTA[];
- /**
- * Time the insight was analyzed in ISO 8601 format.
- */
- analyzedAt?: string;
- /**
- * Time the insight was dismissed in ISO 8601 format. Empty when not dismissed.
- */
- dismissedAt?: string;
- /**
- * User ID that dismissed the insight. Empty when not dismissed.
- */
- dismissedBy?: string;
- }
-
- /**
- * InsightCTA
- */
- export type InsightCTA = {
- /**
- * Human-readable label for the CTA, used in UI.
- */
- label: string;
- /**
- * Public API service (SDK namespace) the client should invoke. Must match the engine that owns the resource — for index suggestions: databases (legacy), tablesDB, documentsDB, or vectorsDB.
- */
- service: string;
- /**
- * Public API method on the chosen service the client should invoke when this CTA is triggered.
- */
- method: string;
- /**
- * Parameter map the client should pass to the service method when this CTA is triggered. Keys match the target API's parameter names (e.g. databaseId/tableId/columns for tablesDB, databaseId/collectionId/attributes for the legacy Databases API).
- */
- params: object;
- }
-
- /**
- * Report
- */
- export type Report = {
- /**
- * Report ID.
- */
- $id: string;
- /**
- * Report creation date in ISO 8601 format.
- */
- $createdAt: string;
- /**
- * Report update date in ISO 8601 format.
- */
- $updatedAt: string;
- /**
- * ID of the third-party app that submitted the report.
- */
- appId: string;
- /**
- * Analyzer that produced this report. e.g. lighthouse, audit, databaseAnalyzer.
- */
- type: string;
- /**
- * Short, human-readable title for the report.
- */
- title: string;
- /**
- * Markdown summary describing the report.
- */
- summary: string;
- /**
- * Plural noun describing what the report analyzes, e.g. databases, sites, urls.
- */
- targetType: string;
- /**
- * Free-form target identifier (URL for lighthouse, resource ID for db).
- */
- target: string;
- /**
- * Categories covered by the report, e.g. performance, accessibility.
- */
- categories: string[];
- /**
- * Insights nested under this report.
- */
- insights: Insight[];
- /**
- * Time the report was analyzed in ISO 8601 format.
- */
- analyzedAt?: string;
- }
}
diff --git a/src/services/advisor.ts b/src/services/advisor.ts
deleted file mode 100644
index a2365390..00000000
--- a/src/services/advisor.ts
+++ /dev/null
@@ -1,255 +0,0 @@
-import { Service } from '../service';
-import { AppwriteException, Client, type Payload, UploadProgress } from '../client';
-import type { Models } from '../models';
-
-
-export class Advisor {
- client: Client;
-
- constructor(client: Client) {
- this.client = client;
- }
-
- /**
- * Get a list of all the project's analyzer reports. You can use the query params to filter your results.
- *
- *
- * @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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: appId, type, targetType, target, analyzedAt
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
- * @throws {AppwriteException}
- * @returns {Promise}
- */
- listReports(params?: { queries?: string[], total?: boolean }): Promise;
- /**
- * Get a list of all the project's analyzer reports. You can use the query params to filter your results.
- *
- *
- * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: appId, type, targetType, target, analyzedAt
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
- * @throws {AppwriteException}
- * @returns {Promise}
- * @deprecated Use the object parameter style method for a better developer experience.
- */
- listReports(queries?: string[], total?: boolean): Promise;
- listReports(
- paramsOrFirst?: { queries?: string[], total?: boolean } | string[],
- ...rest: [(boolean)?]
- ): Promise {
- let params: { queries?: string[], total?: boolean };
-
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
- params = (paramsOrFirst || {}) as { queries?: string[], total?: boolean };
- } else {
- params = {
- queries: paramsOrFirst as string[],
- total: rest[0] as boolean
- };
- }
-
- const queries = params.queries;
- const total = params.total;
-
-
- const apiPath = '/reports';
- const payload: Payload = {};
- if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
- }
- if (typeof total !== 'undefined') {
- payload['total'] = total;
- }
- const uri = new URL(this.client.config.endpoint + apiPath);
-
- const apiHeaders: { [header: string]: string } = {
- }
-
- return this.client.call(
- 'get',
- uri,
- apiHeaders,
- payload
- );
- }
-
- /**
- * Get an analyzer report by its unique ID. The response includes the report's metadata and the nested insights it produced.
- *
- *
- * @param {string} params.reportId - Report ID.
- * @throws {AppwriteException}
- * @returns {Promise}
- */
- getReport(params: { reportId: string }): Promise;
- /**
- * Get an analyzer report by its unique ID. The response includes the report's metadata and the nested insights it produced.
- *
- *
- * @param {string} reportId - Report ID.
- * @throws {AppwriteException}
- * @returns {Promise}
- * @deprecated Use the object parameter style method for a better developer experience.
- */
- getReport(reportId: string): Promise;
- getReport(
- paramsOrFirst: { reportId: string } | string
- ): Promise {
- let params: { reportId: string };
-
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
- params = (paramsOrFirst || {}) as { reportId: string };
- } else {
- params = {
- reportId: paramsOrFirst as string
- };
- }
-
- const reportId = params.reportId;
-
- if (typeof reportId === 'undefined') {
- throw new AppwriteException('Missing required parameter: "reportId"');
- }
-
- const apiPath = '/reports/{reportId}'.replace('{reportId}', reportId);
- const payload: Payload = {};
- const uri = new URL(this.client.config.endpoint + apiPath);
-
- const apiHeaders: { [header: string]: string } = {
- }
-
- return this.client.call(
- 'get',
- uri,
- apiHeaders,
- payload
- );
- }
-
- /**
- * List the insights produced under a single analyzer report. You can use the query params to filter your results further.
- *
- *
- * @param {string} params.reportId - Parent report ID.
- * @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/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, severity, status, resourceType, resourceId, parentResourceType, parentResourceId, analyzedAt, dismissedAt, dismissedBy
- * @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
- * @throws {AppwriteException}
- * @returns {Promise}
- */
- listInsights(params: { reportId: string, queries?: string[], total?: boolean }): Promise;
- /**
- * List the insights produced under a single analyzer report. You can use the query params to filter your results further.
- *
- *
- * @param {string} reportId - Parent report ID.
- * @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, severity, status, resourceType, resourceId, parentResourceType, parentResourceId, analyzedAt, dismissedAt, dismissedBy
- * @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
- * @throws {AppwriteException}
- * @returns {Promise}
- * @deprecated Use the object parameter style method for a better developer experience.
- */
- listInsights(reportId: string, queries?: string[], total?: boolean): Promise;
- listInsights(
- paramsOrFirst: { reportId: string, queries?: string[], total?: boolean } | string,
- ...rest: [(string[])?, (boolean)?]
- ): Promise {
- let params: { reportId: string, queries?: string[], total?: boolean };
-
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
- params = (paramsOrFirst || {}) as { reportId: string, queries?: string[], total?: boolean };
- } else {
- params = {
- reportId: paramsOrFirst as string,
- queries: rest[0] as string[],
- total: rest[1] as boolean
- };
- }
-
- const reportId = params.reportId;
- const queries = params.queries;
- const total = params.total;
-
- if (typeof reportId === 'undefined') {
- throw new AppwriteException('Missing required parameter: "reportId"');
- }
-
- const apiPath = '/reports/{reportId}/insights'.replace('{reportId}', reportId);
- const payload: Payload = {};
- if (typeof queries !== 'undefined') {
- payload['queries'] = queries;
- }
- if (typeof total !== 'undefined') {
- payload['total'] = total;
- }
- const uri = new URL(this.client.config.endpoint + apiPath);
-
- const apiHeaders: { [header: string]: string } = {
- }
-
- return this.client.call(
- 'get',
- uri,
- apiHeaders,
- payload
- );
- }
-
- /**
- * Get an insight by its unique ID, scoped to its parent report.
- *
- *
- * @param {string} params.reportId - Parent report ID.
- * @param {string} params.insightId - Insight ID.
- * @throws {AppwriteException}
- * @returns {Promise}
- */
- getInsight(params: { reportId: string, insightId: string }): Promise;
- /**
- * Get an insight by its unique ID, scoped to its parent report.
- *
- *
- * @param {string} reportId - Parent report ID.
- * @param {string} insightId - Insight ID.
- * @throws {AppwriteException}
- * @returns {Promise}
- * @deprecated Use the object parameter style method for a better developer experience.
- */
- getInsight(reportId: string, insightId: string): Promise;
- getInsight(
- paramsOrFirst: { reportId: string, insightId: string } | string,
- ...rest: [(string)?]
- ): Promise {
- let params: { reportId: string, insightId: string };
-
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
- params = (paramsOrFirst || {}) as { reportId: string, insightId: string };
- } else {
- params = {
- reportId: paramsOrFirst as string,
- insightId: rest[0] as string
- };
- }
-
- const reportId = params.reportId;
- const insightId = params.insightId;
-
- if (typeof reportId === 'undefined') {
- throw new AppwriteException('Missing required parameter: "reportId"');
- }
- if (typeof insightId === 'undefined') {
- throw new AppwriteException('Missing required parameter: "insightId"');
- }
-
- const apiPath = '/reports/{reportId}/insights/{insightId}'.replace('{reportId}', reportId).replace('{insightId}', insightId);
- const payload: Payload = {};
- const uri = new URL(this.client.config.endpoint + apiPath);
-
- const apiHeaders: { [header: string]: string } = {
- }
-
- return this.client.call(
- 'get',
- uri,
- apiHeaders,
- payload
- );
- }
-}