Merge branch '1.5.x' of https://github.com/appwrite/appwrite into feat-add-messaging-response-models

This commit is contained in:
Prateek Banga
2023-09-14 02:17:34 +05:30
123 changed files with 1122 additions and 528 deletions
@@ -11,7 +11,6 @@ Teams teams = new Teams(client);
teams.createMembership(
"[TEAM_ID]",
listOf(),
"https://example.com",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -10,5 +10,4 @@ val teams = Teams(client)
val response = teams.createMembership(
teamId = "[TEAM_ID]",
roles = listOf(),
url = "https://example.com",
)
@@ -8,7 +8,6 @@ let teams = Teams(client)
let membership = try await teams.createMembership(
teamId: "[TEAM_ID]",
roles: [],
url: "https://example.com"
roles: []
)
@@ -11,7 +11,6 @@ void main() { // Init SDK
Future result = teams.createMembership(
teamId: '[TEAM_ID]',
roles: [],
url: 'https://example.com',
);
result
@@ -1,8 +1,7 @@
mutation {
teamsCreateMembership(
teamId: "[TEAM_ID]",
roles: [],
url: "https://example.com"
roles: []
) {
_id
_createdAt
@@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = teams.createMembership('[TEAM_ID]', [], 'https://example.com');
const promise = teams.createMembership('[TEAM_ID]', []);
promise.then(function (response) {
console.log(response); // Success
@@ -1,7 +1,7 @@
appwrite functions create \
--functionId [FUNCTION_ID] \
--name [NAME] \
--runtime node-14.5 \
--runtime node-18.0 \
@@ -1,7 +1,7 @@
appwrite functions update \
--functionId [FUNCTION_ID] \
--name [NAME] \
--runtime node-14.5 \
@@ -1,7 +1,7 @@
appwrite teams createMembership \
--teamId [TEAM_ID] \
--roles one two three \
--url https://example.com \
@@ -0,0 +1,18 @@
import { Client, Account } from "@appwrite.io/console";
const client = new Client();
const account = new Account(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = account.createWithInviteCode('[USER_ID]', 'email@example.com', 'password');
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
@@ -6,6 +6,7 @@ const assistant = new Assistant(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = assistant.chat('[PROMPT]');
@@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-14.5');
const promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-18.0');
promise.then(function (response) {
console.log(response); // Success
@@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = functions.update('[FUNCTION_ID]', '[NAME]', 'node-14.5');
const promise = functions.update('[FUNCTION_ID]', '[NAME]');
promise.then(function (response) {
console.log(response); // Success
@@ -6,6 +6,7 @@ const migrations = new Migrations(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = migrations.deleteFirebaseAuth();
@@ -6,6 +6,7 @@ const migrations = new Migrations(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = migrations.listFirebaseProjects();
@@ -0,0 +1,18 @@
import { Client, Projects } from "@appwrite.io/console";
const client = new Client();
const projects = new Projects(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = projects.createDomain('[PROJECT_ID]', '');
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
@@ -0,0 +1,18 @@
import { Client, Projects } from "@appwrite.io/console";
const client = new Client();
const projects = new Projects(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = projects.deleteDomain('[PROJECT_ID]', '[DOMAIN_ID]');
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
@@ -0,0 +1,18 @@
import { Client, Projects } from "@appwrite.io/console";
const client = new Client();
const projects = new Projects(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = projects.getDomain('[PROJECT_ID]', '[DOMAIN_ID]');
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
@@ -0,0 +1,18 @@
import { Client, Projects } from "@appwrite.io/console";
const client = new Client();
const projects = new Projects(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = projects.listDomains('[PROJECT_ID]');
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
@@ -0,0 +1,18 @@
import { Client, Projects } from "@appwrite.io/console";
const client = new Client();
const projects = new Projects(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = projects.updateDomainVerification('[PROJECT_ID]', '[DOMAIN_ID]');
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
@@ -9,7 +9,7 @@ client
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = teams.createMembership('[TEAM_ID]', [], 'https://example.com');
const promise = teams.createMembership('[TEAM_ID]', []);
promise.then(function (response) {
console.log(response); // Success
@@ -0,0 +1,18 @@
import { Client, Teams } from "@appwrite.io/console";
const client = new Client();
const teams = new Teams(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = teams.updateMembershipRoles('[TEAM_ID]', '[MEMBERSHIP_ID]', []);
promise.then(function (response) {
console.log(response); // Success
}, function (error) {
console.log(error); // Failure
});
@@ -6,6 +6,7 @@ const vcs = new Vcs(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = vcs.createRepositoryDetection('[INSTALLATION_ID]', '[PROVIDER_REPOSITORY_ID]');
@@ -6,6 +6,7 @@ const vcs = new Vcs(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = vcs.createRepository('[INSTALLATION_ID]', '[NAME]', false);
@@ -6,6 +6,7 @@ const vcs = new Vcs(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = vcs.deleteInstallation('[INSTALLATION_ID]');
@@ -6,6 +6,7 @@ const vcs = new Vcs(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = vcs.getInstallation('[INSTALLATION_ID]');
@@ -6,6 +6,7 @@ const vcs = new Vcs(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = vcs.getRepository('[INSTALLATION_ID]', '[PROVIDER_REPOSITORY_ID]');
@@ -6,6 +6,7 @@ const vcs = new Vcs(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = vcs.listInstallations();
@@ -6,6 +6,7 @@ const vcs = new Vcs(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = vcs.listRepositories('[INSTALLATION_ID]');
@@ -6,6 +6,7 @@ const vcs = new Vcs(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = vcs.listRepositoryBranches('[INSTALLATION_ID]', '[PROVIDER_REPOSITORY_ID]');
@@ -6,6 +6,7 @@ const vcs = new Vcs(client);
client
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2') // Your project ID
;
const promise = vcs.updateExternalDeployments('[INSTALLATION_ID]', '[REPOSITORY_ID]', '[PROVIDER_PULL_REQUEST_ID]');
@@ -13,7 +13,7 @@ void main() { // Init SDK
Future result = functions.create(
functionId: '[FUNCTION_ID]',
name: '[NAME]',
runtime: 'node-14.5',
runtime: 'node-18.0',
);
result
@@ -13,7 +13,6 @@ void main() { // Init SDK
Future result = functions.update(
functionId: '[FUNCTION_ID]',
name: '[NAME]',
runtime: 'node-14.5',
);
result
@@ -13,7 +13,6 @@ void main() { // Init SDK
Future result = teams.createMembership(
teamId: '[TEAM_ID]',
roles: [],
url: 'https://example.com',
);
result
@@ -12,7 +12,7 @@ client
;
let promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-14.5');
let promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-18.0');
promise.then(function (response) {
console.log(response);
@@ -12,7 +12,7 @@ client
;
let promise = functions.update('[FUNCTION_ID]', '[NAME]', 'node-14.5');
let promise = functions.update('[FUNCTION_ID]', '[NAME]');
promise.then(function (response) {
console.log(response);
@@ -12,7 +12,7 @@ client
;
let promise = teams.createMembership('[TEAM_ID]', [], 'https://example.com');
let promise = teams.createMembership('[TEAM_ID]', []);
promise.then(function (response) {
console.log(response);
@@ -12,4 +12,4 @@ var functions = new Functions(client);
Function result = await functions.Create(
functionId: "[FUNCTION_ID]",
name: "[NAME]",
runtime: "node-14.5");
runtime: "node-18.0");
@@ -11,5 +11,4 @@ var functions = new Functions(client);
Function result = await functions.Update(
functionId: "[FUNCTION_ID]",
name: "[NAME]",
runtime: "node-14.5");
name: "[NAME]");
@@ -11,5 +11,4 @@ var teams = new Teams(client);
Membership result = await teams.CreateMembership(
teamId: "[TEAM_ID]",
roles: new List<string> {},
url: "https://example.com");
roles: new List<string> {});
@@ -2,7 +2,7 @@ mutation {
functionsCreate(
functionId: "[FUNCTION_ID]",
name: "[NAME]",
runtime: "node-14.5"
runtime: "node-18.0"
) {
_id
_createdAt
@@ -1,8 +1,7 @@
mutation {
functionsUpdate(
functionId: "[FUNCTION_ID]",
name: "[NAME]",
runtime: "node-14.5"
name: "[NAME]"
) {
_id
_createdAt
@@ -1,8 +1,7 @@
mutation {
teamsCreateMembership(
teamId: "[TEAM_ID]",
roles: [],
url: "https://example.com"
roles: []
) {
_id
_createdAt
@@ -12,7 +12,7 @@ Functions functions = new Functions(client);
functions.create(
"[FUNCTION_ID]",
"[NAME]",
"node-14.5",
"node-18.0",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -12,7 +12,6 @@ Functions functions = new Functions(client);
functions.update(
"[FUNCTION_ID]",
"[NAME]",
"node-14.5",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -12,7 +12,6 @@ Teams teams = new Teams(client);
teams.createMembership(
"[TEAM_ID]",
listOf(),
"https://example.com",
new CoroutineCallback<>((result, error) -> {
if (error != null) {
error.printStackTrace();
@@ -11,5 +11,5 @@ val functions = Functions(client)
val response = functions.create(
functionId = "[FUNCTION_ID]",
name = "[NAME]",
runtime = "node-14.5",
runtime = "node-18.0",
)
@@ -11,5 +11,4 @@ val functions = Functions(client)
val response = functions.update(
functionId = "[FUNCTION_ID]",
name = "[NAME]",
runtime = "node-14.5",
)
@@ -11,5 +11,4 @@ val teams = Teams(client)
val response = teams.createMembership(
teamId = "[TEAM_ID]",
roles = listOf(),
url = "https://example.com",
)
@@ -11,7 +11,7 @@ client
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
;
const promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-14.5');
const promise = functions.create('[FUNCTION_ID]', '[NAME]', 'node-18.0');
promise.then(function (response) {
console.log(response);
@@ -11,7 +11,7 @@ client
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
;
const promise = functions.update('[FUNCTION_ID]', '[NAME]', 'node-14.5');
const promise = functions.update('[FUNCTION_ID]', '[NAME]');
promise.then(function (response) {
console.log(response);
@@ -11,7 +11,7 @@ client
.setKey('919c2d18fb5d4...a2ae413da83346ad2') // Your secret API key
;
const promise = teams.createMembership('[TEAM_ID]', [], 'https://example.com');
const promise = teams.createMembership('[TEAM_ID]', []);
promise.then(function (response) {
console.log(response);
@@ -13,4 +13,4 @@ $client
$functions = new Functions($client);
$result = $functions->create('[FUNCTION_ID]', '[NAME]', 'node-14.5');
$result = $functions->create('[FUNCTION_ID]', '[NAME]', 'node-18.0');
@@ -13,4 +13,4 @@ $client
$functions = new Functions($client);
$result = $functions->update('[FUNCTION_ID]', '[NAME]', 'node-14.5');
$result = $functions->update('[FUNCTION_ID]', '[NAME]');
@@ -13,4 +13,4 @@ $client
$teams = new Teams($client);
$result = $teams->createMembership('[TEAM_ID]', [], 'https://example.com');
$result = $teams->createMembership('[TEAM_ID]', []);
@@ -11,4 +11,4 @@ client = Client()
functions = Functions(client)
result = functions.create('[FUNCTION_ID]', '[NAME]', 'node-14.5')
result = functions.create('[FUNCTION_ID]', '[NAME]', 'node-18.0')
@@ -11,4 +11,4 @@ client = Client()
functions = Functions(client)
result = functions.update('[FUNCTION_ID]', '[NAME]', 'node-14.5')
result = functions.update('[FUNCTION_ID]', '[NAME]')
@@ -11,4 +11,4 @@ client = Client()
teams = Teams(client)
result = teams.create_membership('[TEAM_ID]', [], 'https://example.com')
result = teams.create_membership('[TEAM_ID]', [])
@@ -8,7 +8,7 @@ X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2
{
"functionId": "[FUNCTION_ID]",
"name": "[NAME]",
"runtime": "node-14.5",
"runtime": "node-18.0",
"execute": ["any"],
"events": [],
"schedule": ,
@@ -7,7 +7,7 @@ X-Appwrite-Key: 919c2d18fb5d4...a2ae413da83346ad2
{
"name": "[NAME]",
"runtime": "node-14.5",
"runtime": "node-18.0",
"execute": ["any"],
"events": [],
"schedule": ,
@@ -9,6 +9,6 @@ client = Client.new
functions = Functions.new(client)
response = functions.create(function_id: '[FUNCTION_ID]', name: '[NAME]', runtime: 'node-14.5')
response = functions.create(function_id: '[FUNCTION_ID]', name: '[NAME]', runtime: 'node-18.0')
puts response.inspect
@@ -9,6 +9,6 @@ client = Client.new
functions = Functions.new(client)
response = functions.update(function_id: '[FUNCTION_ID]', name: '[NAME]', runtime: 'node-14.5')
response = functions.update(function_id: '[FUNCTION_ID]', name: '[NAME]')
puts response.inspect
@@ -9,6 +9,6 @@ client = Client.new
teams = Teams.new(client)
response = teams.create_membership(team_id: '[TEAM_ID]', roles: [], url: 'https://example.com')
response = teams.create_membership(team_id: '[TEAM_ID]', roles: [])
puts response.inspect
@@ -10,6 +10,6 @@ let functions = Functions(client)
let function = try await functions.create(
functionId: "[FUNCTION_ID]",
name: "[NAME]",
runtime: "node-14.5"
runtime: "node-18.0"
)
@@ -9,7 +9,6 @@ let functions = Functions(client)
let function = try await functions.update(
functionId: "[FUNCTION_ID]",
name: "[NAME]",
runtime: "node-14.5"
name: "[NAME]"
)
@@ -9,7 +9,6 @@ let teams = Teams(client)
let membership = try await teams.createMembership(
teamId: "[TEAM_ID]",
roles: [],
url: "https://example.com"
roles: []
)
+17
View File
@@ -1,3 +1,14 @@
## 10.0.0
* Parameter `url` is now optional in the `createMembership` endpoint
* Parameter `runtime` is now optional in the `update` endpoint of the `Functions` class
## 9.0.1
* Added a new `label` function to the `Role` helper class
* Update internal variable names to prevent name collision
* Fix: content range header inconsistency in chunked uploads [#648](https://github.com/appwrite/sdk-generator/pull/648)
## 9.0.0
* Support for Appwrite 1.4.0
@@ -13,6 +24,12 @@
* The `updateFile` method now includes the ability to update the file name.
* The `updateMembershipRoles` method has been renamed to `updateMembership`.
## 8.0.1
* Added documentation comments
* Added unit tests
* Upgraded dependencies
## 8.0.0
* Added relationships support
+16
View File
@@ -1,3 +1,13 @@
## 11.0.0
* Parameter `url` is now optional in the `createMembership` endpoint
## 10.0.1
* Added a new `label` function to the `Role` helper class
* Update internal variable names to prevent name collision
* Fix: content range header inconsistency in chunked uploads [#648](https://github.com/appwrite/sdk-generator/pull/648)
## 10.0.0
* Support for Appwrite 1.4.0
@@ -12,6 +22,12 @@
* The `updateFile` method now includes the ability to update the file name.
* The `updateMembershipRoles` method has been renamed to `updateMembership`.
## 9.0.1
* Added documentation comments
* Added unit tests
* Upgraded dependencies
## 9.0.0
* Added relationships support