Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/examples/sites/create-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ const sites = new Sites(client);
const result = await sites.createDeployment({
siteId: '<SITE_ID>',
code: document.getElementById('uploader').files[0],
activate: false,
installCommand: '<INSTALL_COMMAND>', // optional
buildCommand: '<BUILD_COMMAND>', // optional
outputDirectory: '<OUTPUT_DIRECTORY>' // optional
outputDirectory: '<OUTPUT_DIRECTORY>', // optional
activate: false // optional
});

console.log(result);
Expand Down
3 changes: 3 additions & 0 deletions src/enums/build-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export enum BuildRuntime {
Pythonml311 = 'python-ml-3.11',
Pythonml312 = 'python-ml-3.12',
Pythonml313 = 'python-ml-3.13',
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
3 changes: 3 additions & 0 deletions src/enums/runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export enum Runtime {
Pythonml311 = 'python-ml-3.11',
Pythonml312 = 'python-ml-3.12',
Pythonml313 = 'python-ml-3.13',
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
3 changes: 3 additions & 0 deletions src/enums/runtimes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ export enum Runtimes {
Pythonml311 = 'python-ml-3.11',
Pythonml312 = 'python-ml-3.12',
Pythonml313 = 'python-ml-3.13',
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
48 changes: 44 additions & 4 deletions src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2627,9 +2627,9 @@ export namespace Models {
*/
$id: string;
/**
* Row automatically incrementing ID.
* Row sequence ID.
*/
$sequence: number;
$sequence: string;
/**
* Table ID.
*/
Expand Down Expand Up @@ -2666,9 +2666,9 @@ export namespace Models {
*/
$id: string;
/**
* Document automatically incrementing ID.
* Document sequence ID.
*/
$sequence: number;
$sequence: string;
/**
* Collection ID.
*/
Expand Down Expand Up @@ -6401,6 +6401,46 @@ export namespace Models {
* Comma-separated list of nameservers.
*/
_APP_DOMAINS_NAMESERVERS: string;
/**
* Database adapter in use.
*/
_APP_DB_ADAPTER: string;
/**
* Whether the database adapter supports relationships.
*/
supportForRelationships: boolean;
/**
* Whether the database adapter supports operators.
*/
supportForOperators: boolean;
/**
* Whether the database adapter supports spatial attributes.
*/
supportForSpatials: boolean;
/**
* Whether the database adapter supports spatial indexes on nullable columns.
*/
supportForSpatialIndexNull: boolean;
/**
* Whether the database adapter supports fulltext wildcard search.
*/
supportForFulltextWildcard: boolean;
/**
* Whether the database adapter supports multiple fulltext indexes per collection.
*/
supportForMultipleFulltextIndexes: boolean;
/**
* Whether the database adapter supports resizing attributes.
*/
supportForAttributeResizing: boolean;
/**
* Whether the database adapter supports fixed schemas with row width limits.
*/
supportForSchemas: boolean;
/**
* Maximum index length supported by the database adapter.
*/
maxIndexLength: number;
}

/**
Expand Down
172 changes: 86 additions & 86 deletions src/services/databases.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ export class Databases {
*
*
* @param {string} params.databaseId - Database ID.
* @param {string} params.collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
* @param {string} params.collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
* @param {string} params.key - Attribute Key.
* @param {boolean} params.required - Is attribute required?
* @param {boolean} params.xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
Expand All @@ -1203,7 +1203,7 @@ export class Databases {
*
*
* @param {string} databaseId - Database ID.
* @param {string} collectionId - Collection ID. You can create a new table using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
* @param {string} collectionId - Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).
* @param {string} key - Attribute Key.
* @param {boolean} required - Is attribute required?
* @param {boolean} xdefault - Default value for attribute when not provided. Cannot be set when attribute is required.
Expand Down Expand Up @@ -3660,6 +3660,90 @@ export class Databases {
);
}

/**
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
*
*
* @param {string} params.databaseId - Database ID.
* @param {string} params.collectionId - Collection ID.
* @param {string} params.key - Attribute Key.
* @param {RelationMutate} params.onDelete - Constraints option
* @param {string} params.newKey - New Attribute Key.
* @throws {AppwriteException}
* @returns {Promise<Models.AttributeRelationship>}
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
*/
updateRelationshipAttribute(params: { databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string }): Promise<Models.AttributeRelationship>;
/**
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
*
*
* @param {string} databaseId - Database ID.
* @param {string} collectionId - Collection ID.
* @param {string} key - Attribute Key.
* @param {RelationMutate} onDelete - Constraints option
* @param {string} newKey - New Attribute Key.
* @throws {AppwriteException}
* @returns {Promise<Models.AttributeRelationship>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
updateRelationshipAttribute(
paramsOrFirst: { databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string } | string,
...rest: [(string)?, (string)?, (RelationMutate)?, (string)?]
): Promise<Models.AttributeRelationship> {
let params: { databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string };

if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string };
} else {
params = {
databaseId: paramsOrFirst as string,
collectionId: rest[0] as string,
key: rest[1] as string,
onDelete: rest[2] as RelationMutate,
newKey: rest[3] as string
};
}

const databaseId = params.databaseId;
const collectionId = params.collectionId;
const key = params.key;
const onDelete = params.onDelete;
const newKey = params.newKey;

if (typeof databaseId === 'undefined') {
throw new AppwriteException('Missing required parameter: "databaseId"');
}
if (typeof collectionId === 'undefined') {
throw new AppwriteException('Missing required parameter: "collectionId"');
}
if (typeof key === 'undefined') {
throw new AppwriteException('Missing required parameter: "key"');
}

const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/relationship/{key}'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
const payload: Payload = {};
if (typeof onDelete !== 'undefined') {
payload['onDelete'] = onDelete;
}
if (typeof newKey !== 'undefined') {
payload['newKey'] = newKey;
}
const uri = new URL(this.client.config.endpoint + apiPath);

const apiHeaders: { [header: string]: string } = {
'content-type': 'application/json',
}

return this.client.call(
'patch',
uri,
apiHeaders,
payload
);
}

/**
* Create a string attribute.
*
Expand Down Expand Up @@ -4622,90 +4706,6 @@ export class Databases {
);
}

/**
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
*
*
* @param {string} params.databaseId - Database ID.
* @param {string} params.collectionId - Collection ID.
* @param {string} params.key - Attribute Key.
* @param {RelationMutate} params.onDelete - Constraints option
* @param {string} params.newKey - New Attribute Key.
* @throws {AppwriteException}
* @returns {Promise<Models.AttributeRelationship>}
* @deprecated This API has been deprecated since 1.8.0. Please use `TablesDB.updateRelationshipColumn` instead.
*/
updateRelationshipAttribute(params: { databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string }): Promise<Models.AttributeRelationship>;
/**
* Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
*
*
* @param {string} databaseId - Database ID.
* @param {string} collectionId - Collection ID.
* @param {string} key - Attribute Key.
* @param {RelationMutate} onDelete - Constraints option
* @param {string} newKey - New Attribute Key.
* @throws {AppwriteException}
* @returns {Promise<Models.AttributeRelationship>}
* @deprecated Use the object parameter style method for a better developer experience.
*/
updateRelationshipAttribute(databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string): Promise<Models.AttributeRelationship>;
updateRelationshipAttribute(
paramsOrFirst: { databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string } | string,
...rest: [(string)?, (string)?, (RelationMutate)?, (string)?]
): Promise<Models.AttributeRelationship> {
let params: { databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string };

if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
params = (paramsOrFirst || {}) as { databaseId: string, collectionId: string, key: string, onDelete?: RelationMutate, newKey?: string };
} else {
params = {
databaseId: paramsOrFirst as string,
collectionId: rest[0] as string,
key: rest[1] as string,
onDelete: rest[2] as RelationMutate,
newKey: rest[3] as string
};
}

const databaseId = params.databaseId;
const collectionId = params.collectionId;
const key = params.key;
const onDelete = params.onDelete;
const newKey = params.newKey;

if (typeof databaseId === 'undefined') {
throw new AppwriteException('Missing required parameter: "databaseId"');
}
if (typeof collectionId === 'undefined') {
throw new AppwriteException('Missing required parameter: "collectionId"');
}
if (typeof key === 'undefined') {
throw new AppwriteException('Missing required parameter: "key"');
}

const apiPath = '/databases/{databaseId}/collections/{collectionId}/attributes/{key}/relationship'.replace('{databaseId}', databaseId).replace('{collectionId}', collectionId).replace('{key}', key);
const payload: Payload = {};
if (typeof onDelete !== 'undefined') {
payload['onDelete'] = onDelete;
}
if (typeof newKey !== 'undefined') {
payload['newKey'] = newKey;
}
const uri = new URL(this.client.config.endpoint + apiPath);

const apiHeaders: { [header: string]: string } = {
'content-type': 'application/json',
}

return this.client.call(
'patch',
uri,
apiHeaders,
payload
);
}

/**
* Get a list of all the user's documents in a given collection. You can use the query params to filter your results.
*
Expand Down
4 changes: 2 additions & 2 deletions src/services/messaging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4929,7 +4929,7 @@ export class Messaging {
* Get a list of all subscribers from the current Appwrite project.
*
* @param {string} params.topicId - Topic ID. The topic ID subscribed to.
* @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: name, provider, type, enabled
* @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: targetId, topicId, userId, providerType
* @param {string} params.search - Search term to filter your list results. Max length: 256 chars.
* @param {boolean} params.total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
Expand All @@ -4940,7 +4940,7 @@ export class Messaging {
* Get a list of all subscribers from the current Appwrite project.
*
* @param {string} topicId - Topic ID. The topic ID subscribed to.
* @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: name, provider, type, enabled
* @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: targetId, topicId, userId, providerType
* @param {string} search - Search term to filter your list results. Max length: 256 chars.
* @param {boolean} total - When set to false, the total count returned will be 0 and will not be calculated.
* @throws {AppwriteException}
Expand Down
Loading