diff --git a/app/config/specs/open-api3-latest-client.json b/app/config/specs/open-api3-latest-client.json index 3cf675c5ad..1364e2e053 100644 --- a/app/config/specs/open-api3-latest-client.json +++ b/app/config/specs/open-api3-latest-client.json @@ -4489,6 +4489,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/components\/schemas\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index 0bfebf37b9..cfce70b45b 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -39698,6 +39698,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -39710,6 +39715,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt" ] }, @@ -39742,6 +39748,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -39759,6 +39770,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "framework" ] @@ -39792,6 +39804,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -39809,6 +39826,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "runtime" ] diff --git a/app/config/specs/swagger2-latest-client.json b/app/config/specs/swagger2-latest-client.json index 95d88bb925..23f1e122b8 100644 --- a/app/config/specs/swagger2-latest-client.json +++ b/app/config/specs/swagger2-latest-client.json @@ -4626,6 +4626,30 @@ } ], "description": "Create a new Document. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." + }, + { + "name": "createDocuments", + "auth": { + "Admin": [], + "Key": [] + }, + "parameters": [ + "databaseId", + "collectionId", + "documents" + ], + "required": [ + "databaseId", + "collectionId", + "documents" + ], + "responses": [ + { + "code": 201, + "model": "#\/definitions\/documentList" + } + ], + "description": "**WARNING: Experimental Feature** - This endpoint is experimental and not yet officially supported. It may be subject to breaking changes or removal in future versions.\n\nCreate new Documents. Before using this route, you should create a new collection resource using either a [server integration](https:\/\/appwrite.io\/docs\/server\/databases#databasesCreateCollection) API or directly from your database console." } ], "auth": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index 314564477c..92317a7532 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -39874,6 +39874,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -39886,6 +39891,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt" ] }, @@ -39918,6 +39924,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -39935,6 +39946,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "framework" ] @@ -39968,6 +39980,11 @@ "description": "Is VCS (Version Control System) repository private?", "x-example": true }, + "defaultBranch": { + "type": "string", + "description": "VCS (Version Control System) repository's default branch name.", + "x-example": "main" + }, "pushedAt": { "type": "string", "description": "Last commit date in ISO 8601 format.", @@ -39985,6 +40002,7 @@ "organization", "provider", "private", + "defaultBranch", "pushedAt", "runtime" ] diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 82300bff47..9271e87448 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -1137,6 +1137,7 @@ App::get('/v1/vcs/github/installations/:installationId/providerRepositories/:pro $repository['pushedAt'] = $repository['pushed_at'] ?? ''; $repository['organization'] = $installation->getAttribute('organization', ''); $repository['provider'] = $installation->getAttribute('provider', ''); + $repository['defaultBranch'] = $repository['default_branch'] ?? ''; $response->dynamic(new Document($repository), Response::MODEL_PROVIDER_REPOSITORY); }); diff --git a/src/Appwrite/Utopia/Response/Model/ProviderRepository.php b/src/Appwrite/Utopia/Response/Model/ProviderRepository.php index 518b5de9ee..eee058a05b 100644 --- a/src/Appwrite/Utopia/Response/Model/ProviderRepository.php +++ b/src/Appwrite/Utopia/Response/Model/ProviderRepository.php @@ -41,6 +41,12 @@ class ProviderRepository extends Model 'default' => false, 'example' => true, ]) + ->addRule('defaultBranch', [ + 'type' => self::TYPE_STRING, + 'description' => "VCS (Version Control System) repository's default branch name.", + 'default' => '', + 'example' => 'main', + ]) ->addRule('pushedAt', [ 'type' => self::TYPE_DATETIME, 'description' => 'Last commit date in ISO 8601 format.',