mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge branch '1.9.x' into claude/apply-cloud-user-pattern-az7qg
This commit is contained in:
+35
-24
@@ -250,26 +250,16 @@ return [
|
||||
],
|
||||
],
|
||||
],
|
||||
[
|
||||
'key' => 'markdown',
|
||||
'name' => 'Markdown',
|
||||
'version' => '0.3.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-md.git',
|
||||
'package' => 'https://www.npmjs.com/package/@appwrite.io/docs',
|
||||
'enabled' => true,
|
||||
'beta' => false,
|
||||
'dev' => false,
|
||||
'hidden' => false,
|
||||
'family' => APP_SDK_PLATFORM_CONSOLE,
|
||||
'prism' => 'markdown',
|
||||
'source' => \realpath(__DIR__ . '/../sdks/console-md'),
|
||||
'gitUrl' => 'git@github.com:appwrite/sdk-for-md.git',
|
||||
'gitRepoName' => 'sdk-for-md',
|
||||
'gitUserName' => 'appwrite',
|
||||
'gitBranch' => 'dev',
|
||||
'repoBranch' => 'main',
|
||||
'changelog' => \realpath(__DIR__ . '/../../docs/sdks/md/CHANGELOG.md'),
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
APP_SDK_PLATFORM_STATIC => [
|
||||
'key' => APP_SDK_PLATFORM_STATIC,
|
||||
'name' => 'Static',
|
||||
'description' => 'SDK artifacts for Appwrite integrations that do not require a generated platform API specification.',
|
||||
'enabled' => true,
|
||||
'beta' => false,
|
||||
'sdks' => [
|
||||
[
|
||||
'key' => 'agent-skills',
|
||||
'name' => 'AgentSkills',
|
||||
@@ -279,9 +269,10 @@ return [
|
||||
'beta' => false,
|
||||
'dev' => false,
|
||||
'hidden' => false,
|
||||
'family' => APP_SDK_PLATFORM_CONSOLE,
|
||||
'spec' => 'static',
|
||||
'family' => APP_SDK_PLATFORM_STATIC,
|
||||
'prism' => 'agent-skills',
|
||||
'source' => \realpath(__DIR__ . '/../sdks/console-agent-skills'),
|
||||
'source' => \realpath(__DIR__ . '/../sdks/static-agent-skills'),
|
||||
'gitUrl' => 'git@github.com:appwrite/agent-skills.git',
|
||||
'gitRepoName' => 'agent-skills',
|
||||
'gitUserName' => 'appwrite',
|
||||
@@ -298,9 +289,10 @@ return [
|
||||
'beta' => false,
|
||||
'dev' => false,
|
||||
'hidden' => false,
|
||||
'family' => APP_SDK_PLATFORM_CONSOLE,
|
||||
'spec' => 'static',
|
||||
'family' => APP_SDK_PLATFORM_STATIC,
|
||||
'prism' => 'cursor-plugin',
|
||||
'source' => \realpath(__DIR__ . '/../sdks/console-cursor-plugin'),
|
||||
'source' => \realpath(__DIR__ . '/../sdks/static-cursor-plugin'),
|
||||
'gitUrl' => 'git@github.com:appwrite/cursor-plugin.git',
|
||||
'gitRepoName' => 'cursor-plugin',
|
||||
'gitUserName' => 'appwrite',
|
||||
@@ -494,6 +486,25 @@ return [
|
||||
'gitBranch' => 'dev',
|
||||
'changelog' => \realpath(__DIR__ . '/../../docs/sdks/swift/CHANGELOG.md'),
|
||||
],
|
||||
[
|
||||
'key' => 'rust',
|
||||
'name' => 'Rust',
|
||||
'version' => '0.1.0',
|
||||
'url' => 'https://github.com/appwrite/sdk-for-rust',
|
||||
'package' => 'https://crates.io/crates/appwrite',
|
||||
'enabled' => true,
|
||||
'beta' => true,
|
||||
'dev' => true,
|
||||
'hidden' => false,
|
||||
'family' => APP_SDK_PLATFORM_SERVER,
|
||||
'prism' => 'rust',
|
||||
'source' => \realpath(__DIR__ . '/../sdks/server-rust'),
|
||||
'gitUrl' => 'git@github.com:appwrite/sdk-for-rust.git',
|
||||
'gitRepoName' => 'sdk-for-rust',
|
||||
'gitUserName' => 'appwrite',
|
||||
'gitBranch' => 'dev',
|
||||
'changelog' => \realpath(__DIR__ . '/../../docs/sdks/rust/CHANGELOG.md'),
|
||||
],
|
||||
[
|
||||
'key' => 'graphql',
|
||||
'name' => 'GraphQL',
|
||||
|
||||
@@ -97,6 +97,7 @@ const APP_COMPUTE_DEPLOYMENT_MAX_RETENTION = 100 * 365; // 100 years
|
||||
const APP_SDK_PLATFORM_SERVER = 'server';
|
||||
const APP_SDK_PLATFORM_CLIENT = 'client';
|
||||
const APP_SDK_PLATFORM_CONSOLE = 'console';
|
||||
const APP_SDK_PLATFORM_STATIC = 'static';
|
||||
const APP_VCS_GITHUB_USERNAME = 'Appwrite';
|
||||
const APP_VCS_GITHUB_EMAIL = 'team@appwrite.io';
|
||||
const APP_VCS_GITHUB_URL = 'https://github.com/TeamAppwrite';
|
||||
|
||||
Generated
+45
-45
@@ -1226,16 +1226,16 @@
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/api",
|
||||
"version": "1.8.0",
|
||||
"version": "1.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opentelemetry-php/api.git",
|
||||
"reference": "df5197c6fd0ddd8e9883b87de042d9341300e2ad"
|
||||
"reference": "6f8d237ce2c304ca85f31970f788e7f074d147be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/api/zipball/df5197c6fd0ddd8e9883b87de042d9341300e2ad",
|
||||
"reference": "df5197c6fd0ddd8e9883b87de042d9341300e2ad",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/api/zipball/6f8d237ce2c304ca85f31970f788e7f074d147be",
|
||||
"reference": "6f8d237ce2c304ca85f31970f788e7f074d147be",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1292,20 +1292,20 @@
|
||||
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
|
||||
"source": "https://github.com/open-telemetry/opentelemetry-php"
|
||||
},
|
||||
"time": "2026-01-21T04:14:03+00:00"
|
||||
"time": "2026-02-25T13:24:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/context",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opentelemetry-php/context.git",
|
||||
"reference": "d4c4470b541ce72000d18c339cfee633e4c8e0cf"
|
||||
"reference": "3c414b246e0dabb7d6145404e6a5e4536ca18d07"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/context/zipball/d4c4470b541ce72000d18c339cfee633e4c8e0cf",
|
||||
"reference": "d4c4470b541ce72000d18c339cfee633e4c8e0cf",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/context/zipball/3c414b246e0dabb7d6145404e6a5e4536ca18d07",
|
||||
"reference": "3c414b246e0dabb7d6145404e6a5e4536ca18d07",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1347,11 +1347,11 @@
|
||||
],
|
||||
"support": {
|
||||
"chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
|
||||
"docs": "https://opentelemetry.io/docs/php",
|
||||
"docs": "https://opentelemetry.io/docs/languages/php",
|
||||
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
|
||||
"source": "https://github.com/open-telemetry/opentelemetry-php"
|
||||
},
|
||||
"time": "2025-09-19T00:05:49+00:00"
|
||||
"time": "2025-10-19T06:44:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/exporter-otlp",
|
||||
@@ -1419,16 +1419,16 @@
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/gen-otlp-protobuf",
|
||||
"version": "1.8.0",
|
||||
"version": "1.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opentelemetry-php/gen-otlp-protobuf.git",
|
||||
"reference": "673af5b06545b513466081884b47ef15a536edde"
|
||||
"reference": "a229cf161d42001d64c8f21e8f678581fe1c66b9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/673af5b06545b513466081884b47ef15a536edde",
|
||||
"reference": "673af5b06545b513466081884b47ef15a536edde",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/gen-otlp-protobuf/zipball/a229cf161d42001d64c8f21e8f678581fe1c66b9",
|
||||
"reference": "a229cf161d42001d64c8f21e8f678581fe1c66b9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1474,30 +1474,30 @@
|
||||
],
|
||||
"support": {
|
||||
"chat": "https://app.slack.com/client/T08PSQ7BQ/C01NFPCV44V",
|
||||
"docs": "https://opentelemetry.io/docs/php",
|
||||
"docs": "https://opentelemetry.io/docs/languages/php",
|
||||
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
|
||||
"source": "https://github.com/open-telemetry/opentelemetry-php"
|
||||
},
|
||||
"time": "2025-09-17T23:10:12+00:00"
|
||||
"time": "2025-10-19T06:44:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/sdk",
|
||||
"version": "1.13.0",
|
||||
"version": "1.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/opentelemetry-php/sdk.git",
|
||||
"reference": "c76f91203bf7ef98ab3f4e0a82ca21699af185e1"
|
||||
"reference": "6e3d0ce93e76555dd5e2f1d19443ff45b990e410"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/c76f91203bf7ef98ab3f4e0a82ca21699af185e1",
|
||||
"reference": "c76f91203bf7ef98ab3f4e0a82ca21699af185e1",
|
||||
"url": "https://api.github.com/repos/opentelemetry-php/sdk/zipball/6e3d0ce93e76555dd5e2f1d19443ff45b990e410",
|
||||
"reference": "6e3d0ce93e76555dd5e2f1d19443ff45b990e410",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"nyholm/psr7-server": "^1.1",
|
||||
"open-telemetry/api": "^1.7",
|
||||
"open-telemetry/api": "^1.8",
|
||||
"open-telemetry/context": "^1.4",
|
||||
"open-telemetry/sem-conv": "^1.0",
|
||||
"php": "^8.1",
|
||||
@@ -1575,7 +1575,7 @@
|
||||
"issues": "https://github.com/open-telemetry/opentelemetry-php/issues",
|
||||
"source": "https://github.com/open-telemetry/opentelemetry-php"
|
||||
},
|
||||
"time": "2026-01-28T11:38:11+00:00"
|
||||
"time": "2026-03-21T11:50:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "open-telemetry/sem-conv",
|
||||
@@ -3403,16 +3403,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/agents",
|
||||
"version": "1.2.1",
|
||||
"version": "1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/agents.git",
|
||||
"reference": "052227953678a30ecc4b5467401fcb0b2386471e"
|
||||
"reference": "06064fd9fb19b77ae45a12ec7bcbc17670912c30"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/agents/zipball/052227953678a30ecc4b5467401fcb0b2386471e",
|
||||
"reference": "052227953678a30ecc4b5467401fcb0b2386471e",
|
||||
"url": "https://api.github.com/repos/utopia-php/agents/zipball/06064fd9fb19b77ae45a12ec7bcbc17670912c30",
|
||||
"reference": "06064fd9fb19b77ae45a12ec7bcbc17670912c30",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3450,9 +3450,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/agents/issues",
|
||||
"source": "https://github.com/utopia-php/agents/tree/1.2.1"
|
||||
"source": "https://github.com/utopia-php/agents/tree/1.3.0"
|
||||
},
|
||||
"time": "2026-02-24T06:03:55+00:00"
|
||||
"time": "2026-03-26T03:51:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/analytics",
|
||||
@@ -4002,16 +4002,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/dns",
|
||||
"version": "1.6.5",
|
||||
"version": "1.6.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/dns.git",
|
||||
"reference": "574327f0f5fabefa7048030c5634cde33ad10640"
|
||||
"reference": "917901ecfe5f09a540e4f689b6cbb80b9f55035d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/dns/zipball/574327f0f5fabefa7048030c5634cde33ad10640",
|
||||
"reference": "574327f0f5fabefa7048030c5634cde33ad10640",
|
||||
"url": "https://api.github.com/repos/utopia-php/dns/zipball/917901ecfe5f09a540e4f689b6cbb80b9f55035d",
|
||||
"reference": "917901ecfe5f09a540e4f689b6cbb80b9f55035d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4053,9 +4053,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/dns/issues",
|
||||
"source": "https://github.com/utopia-php/dns/tree/1.6.5"
|
||||
"source": "https://github.com/utopia-php/dns/tree/1.6.6"
|
||||
},
|
||||
"time": "2026-02-19T16:06:46+00:00"
|
||||
"time": "2026-03-27T11:13:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/domains",
|
||||
@@ -5439,16 +5439,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "appwrite/sdk-generator",
|
||||
"version": "1.12.1",
|
||||
"version": "1.14.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/appwrite/sdk-generator.git",
|
||||
"reference": "a724aa8db52f83ea35854a004837fa5ce990b736"
|
||||
"reference": "7e7e257b10a8c1384a237e7d8d73452e2108901e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/a724aa8db52f83ea35854a004837fa5ce990b736",
|
||||
"reference": "a724aa8db52f83ea35854a004837fa5ce990b736",
|
||||
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/7e7e257b10a8c1384a237e7d8d73452e2108901e",
|
||||
"reference": "7e7e257b10a8c1384a237e7d8d73452e2108901e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5484,9 +5484,9 @@
|
||||
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
|
||||
"support": {
|
||||
"issues": "https://github.com/appwrite/sdk-generator/issues",
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/1.12.1"
|
||||
"source": "https://github.com/appwrite/sdk-generator/tree/1.14.0"
|
||||
},
|
||||
"time": "2026-03-24T05:18:43+00:00"
|
||||
"time": "2026-03-26T12:50:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "brianium/paratest",
|
||||
@@ -6195,11 +6195,11 @@
|
||||
},
|
||||
{
|
||||
"name": "phpstan/phpstan",
|
||||
"version": "2.1.42",
|
||||
"version": "2.1.44",
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/1279e1ce86ba768f0780c9d889852b4e02ff40d0",
|
||||
"reference": "1279e1ce86ba768f0780c9d889852b4e02ff40d0",
|
||||
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/4a88c083c668b2c364a425c9b3171b2d9ea5d218",
|
||||
"reference": "4a88c083c668b2c364a425c9b3171b2d9ea5d218",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -6244,7 +6244,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2026-03-17T14:58:32+00:00"
|
||||
"time": "2026-03-25T17:34:21+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpunit/php-code-coverage",
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# Change Log
|
||||
|
||||
## 0.3.0
|
||||
|
||||
* Add `bytesMax` and `bytesUsed` properties to Collection and Table documentation
|
||||
* Add `queries` parameter to `listKeys` and `keyId` parameter to `createKey` documentation
|
||||
* Add `dart-3.10` and `flutter-3.38` runtimes
|
||||
* Fix Teams membership docs to use `string[]` instead of `Roles[]`
|
||||
|
||||
## 0.2.0
|
||||
|
||||
* Document array-based enum parameters in Markdown examples (e.g., `permissions: BrowserPermission[]`).
|
||||
* Breaking change: `Output` enum has been removed; use `ImageFormat` instead.
|
||||
|
||||
## 0.1.0
|
||||
|
||||
* Initial release
|
||||
@@ -0,0 +1,5 @@
|
||||
# Change Log
|
||||
|
||||
## 0.1.0
|
||||
|
||||
* Initial release
|
||||
@@ -0,0 +1,68 @@
|
||||
## Getting Started
|
||||
|
||||
### Init your SDK
|
||||
Initialize your SDK with your Appwrite server API endpoint and project ID which can be found on your project settings page and your new API secret Key from project's API keys section.
|
||||
|
||||
```rust
|
||||
use appwrite::client::Client;
|
||||
|
||||
let client = Client::new()
|
||||
.set_endpoint("https://[HOSTNAME_OR_IP]/v1") // Your API Endpoint
|
||||
.set_project("5df5acd0d48c2") // Your project ID
|
||||
.set_key("919c2d18fb5d4...a2ae413da83346ad2") // Your secret API key
|
||||
.set_self_signed(true); // Use only on dev mode with a self-signed SSL cert
|
||||
```
|
||||
|
||||
### Make Your First Request
|
||||
Once your SDK object is set, create any of the Appwrite service objects and choose any request to send. Full documentation for any service method you would like to use can be found in your SDK documentation or in the [API References](https://appwrite.io/docs) section.
|
||||
|
||||
```rust
|
||||
use appwrite::client::Client;
|
||||
use appwrite::services::users::Users;
|
||||
use appwrite::id::ID;
|
||||
|
||||
let client = Client::new()
|
||||
.set_endpoint("https://[HOSTNAME_OR_IP]/v1")
|
||||
.set_project("5df5acd0d48c2")
|
||||
.set_key("919c2d18fb5d4...a2ae413da83346ad2")
|
||||
.set_self_signed(true);
|
||||
|
||||
let users = Users::new(&client);
|
||||
|
||||
let user = users.create(
|
||||
ID::unique(),
|
||||
Some("email@example.com"),
|
||||
Some("+123456789"),
|
||||
Some("password"),
|
||||
Some("Walter O'Brien"),
|
||||
).await?;
|
||||
|
||||
println!("{}", user.name);
|
||||
println!("{}", user.email);
|
||||
```
|
||||
|
||||
### Error Handling
|
||||
The Appwrite Rust SDK returns `Result` types. You can handle errors using standard Rust error handling patterns. Below is an example.
|
||||
|
||||
```rust
|
||||
use appwrite::error::AppwriteError;
|
||||
|
||||
match users.create(
|
||||
ID::unique(),
|
||||
Some("email@example.com"),
|
||||
Some("+123456789"),
|
||||
Some("password"),
|
||||
Some("Walter O'Brien"),
|
||||
).await {
|
||||
Ok(user) => println!("{}", user.name),
|
||||
Err(AppwriteError { message, code, .. }) => {
|
||||
eprintln!("Error {}: {}", code, message);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Learn more
|
||||
You can use the following resources to learn more and get help
|
||||
- 🚀 [Getting Started Tutorial](https://appwrite.io/docs/getting-started-for-server)
|
||||
- 📜 [Appwrite Docs](https://appwrite.io/docs)
|
||||
- 💬 [Discord Community](https://appwrite.io/discord)
|
||||
@@ -588,12 +588,6 @@ parameters:
|
||||
count: 1
|
||||
path: src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$currentDocumentId on left side of \?\? always exists and is always null\.$#'
|
||||
identifier: nullCoalesce.variable
|
||||
count: 1
|
||||
path: src/Appwrite/Platform/Modules/Databases/Http/Databases/Transactions/Update.php
|
||||
|
||||
-
|
||||
message: '#^Offset ''deviceBrand'' does not exist on int\.$#'
|
||||
identifier: offsetAccess.notFound
|
||||
|
||||
@@ -14,16 +14,17 @@ use Appwrite\SDK\Language\Flutter;
|
||||
use Appwrite\SDK\Language\Go;
|
||||
use Appwrite\SDK\Language\GraphQL;
|
||||
use Appwrite\SDK\Language\Kotlin;
|
||||
use Appwrite\SDK\Language\Markdown;
|
||||
use Appwrite\SDK\Language\Node;
|
||||
use Appwrite\SDK\Language\PHP;
|
||||
use Appwrite\SDK\Language\Python;
|
||||
use Appwrite\SDK\Language\ReactNative;
|
||||
use Appwrite\SDK\Language\REST;
|
||||
use Appwrite\SDK\Language\Ruby;
|
||||
use Appwrite\SDK\Language\Rust;
|
||||
use Appwrite\SDK\Language\Swift;
|
||||
use Appwrite\SDK\Language\Web;
|
||||
use Appwrite\SDK\SDK;
|
||||
use Appwrite\Spec\StaticSpec;
|
||||
use Appwrite\Spec\Swagger2;
|
||||
use CzProject\GitPhp\Git;
|
||||
use Utopia\Agents\Adapters\OpenAI;
|
||||
@@ -49,7 +50,10 @@ class SDKs extends Action
|
||||
|
||||
public static function getPlatforms(): array
|
||||
{
|
||||
return Specs::getPlatforms();
|
||||
return [
|
||||
...Specs::getPlatforms(),
|
||||
APP_SDK_PLATFORM_STATIC,
|
||||
];
|
||||
}
|
||||
|
||||
protected function getSdkConfigPath(): string
|
||||
@@ -170,16 +174,22 @@ class SDKs extends Action
|
||||
|
||||
Console::log('');
|
||||
Console::info("━━━ {$language['name']} SDK ({$platform['name']}, {$version}) ━━━");
|
||||
Console::log(' Fetching API spec...');
|
||||
$specFormat = $language['spec'] ?? 'swagger2';
|
||||
$spec = null;
|
||||
if ($specFormat === 'static') {
|
||||
Console::log(' Using static SDK spec...');
|
||||
} else {
|
||||
Console::log(' Fetching API spec...');
|
||||
|
||||
$specPath = __DIR__ . '/../../../../app/config/specs/swagger2-' . $version . '-' . $language['family'] . '.json';
|
||||
$specPath = __DIR__ . '/../../../../app/config/specs/swagger2-' . $version . '-' . $language['family'] . '.json';
|
||||
|
||||
if (!file_exists($specPath)) {
|
||||
throw new \Exception('Spec file not found: ' . $specPath . '. Please run "docker compose exec appwrite specs --version=' . $version . '" first to generate the specs.');
|
||||
if (!file_exists($specPath)) {
|
||||
throw new \Exception('Spec file not found: ' . $specPath . '. Please run "docker compose exec appwrite specs --version=' . $version . '" first to generate the specs.');
|
||||
}
|
||||
|
||||
$spec = file_get_contents($specPath);
|
||||
}
|
||||
|
||||
$spec = file_get_contents($specPath);
|
||||
|
||||
$cover = 'https://github.com/appwrite/appwrite/raw/main/public/images/github.png';
|
||||
$result = \realpath(__DIR__ . '/../../../../app') . '/sdks/' . $key . '-' . $language['key'];
|
||||
$resultExamples = \realpath(__DIR__ . '/../../../..') . '/docs/examples/' . $version . '/' . $key . '-' . $language['key'];
|
||||
@@ -301,16 +311,15 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
$config = new Kotlin();
|
||||
$warning = $warning . "\n\n > This is the Kotlin SDK for integrating with Appwrite from your Kotlin server-side code. If you're looking for the Android SDK you should check [appwrite/sdk-for-android](https://github.com/appwrite/sdk-for-android)";
|
||||
break;
|
||||
case 'rust':
|
||||
$config = new Rust();
|
||||
break;
|
||||
case 'graphql':
|
||||
$config = new GraphQL();
|
||||
break;
|
||||
case 'rest':
|
||||
$config = new REST();
|
||||
break;
|
||||
case 'markdown':
|
||||
$config = new Markdown();
|
||||
$config->setNPMPackage('@appwrite.io/docs');
|
||||
break;
|
||||
case 'agent-skills':
|
||||
$config = new AgentSkills();
|
||||
break;
|
||||
@@ -438,7 +447,18 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
? ' Generating examples...'
|
||||
: ' Generating SDK...');
|
||||
|
||||
$sdk = new SDK($config, new Swagger2($spec));
|
||||
$sdk = new SDK(
|
||||
$config,
|
||||
$specFormat === 'static'
|
||||
? new StaticSpec(
|
||||
title: 'Appwrite',
|
||||
description: 'Appwrite backend as a service',
|
||||
version: $version,
|
||||
licenseName: 'BSD-3-Clause',
|
||||
licenseURL: 'https://raw.githubusercontent.com/appwrite/appwrite/master/LICENSE',
|
||||
)
|
||||
: new Swagger2($spec)
|
||||
);
|
||||
|
||||
$sdk
|
||||
->setName($language['name'])
|
||||
@@ -479,6 +499,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
|
||||
try {
|
||||
$sdk->generate($result);
|
||||
Console::success($examplesOnly
|
||||
? " Examples generated at {$result}"
|
||||
: " SDK generated at {$result}");
|
||||
} catch (\Throwable $exception) {
|
||||
Console::error($exception->getMessage());
|
||||
}
|
||||
|
||||
@@ -14,13 +14,13 @@ class MFAType extends Model
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'Secret token used for TOTP factor.',
|
||||
'default' => '',
|
||||
'example' => true
|
||||
'example' => '[SHARED_SECRET]'
|
||||
])
|
||||
->addRule('uri', [
|
||||
'type' => self::TYPE_STRING,
|
||||
'description' => 'URI for authenticator apps.',
|
||||
'default' => '',
|
||||
'example' => true
|
||||
'example' => 'otpauth://totp/appwrite:user@example.com?secret=[SHARED_SECRET]&issuer=appwrite'
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user