diff --git a/app/config/specs/open-api3-1.8.x-console.json b/app/config/specs/open-api3-1.8.x-console.json index ab36ae475c..5eac3ca9f6 100644 --- a/app/config/specs/open-api3-1.8.x-console.json +++ b/app/config/specs/open-api3-1.8.x-console.json @@ -25153,7 +25153,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", @@ -53440,16 +53440,24 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", "flutter-web", "flutter-ios", "flutter-android", - "ios", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", "android", - "unity" + "unity", + "react-native-ios", + "react-native-android" ] }, "key": { diff --git a/app/config/specs/open-api3-latest-console.json b/app/config/specs/open-api3-latest-console.json index ab36ae475c..5eac3ca9f6 100644 --- a/app/config/specs/open-api3-latest-console.json +++ b/app/config/specs/open-api3-latest-console.json @@ -25153,7 +25153,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", @@ -53440,16 +53440,24 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", "flutter-web", "flutter-ios", "flutter-android", - "ios", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", "android", - "unity" + "unity", + "react-native-ios", + "react-native-android" ] }, "key": { diff --git a/app/config/specs/swagger2-1.8.x-console.json b/app/config/specs/swagger2-1.8.x-console.json index e830f768be..0a6bdf0889 100644 --- a/app/config/specs/swagger2-1.8.x-console.json +++ b/app/config/specs/swagger2-1.8.x-console.json @@ -25305,7 +25305,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "default": null, "x-example": "web", "enum": [ @@ -53396,16 +53396,24 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", "flutter-web", "flutter-ios", "flutter-android", - "ios", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", "android", - "unity" + "unity", + "react-native-ios", + "react-native-android" ] }, "key": { diff --git a/app/config/specs/swagger2-latest-console.json b/app/config/specs/swagger2-latest-console.json index e830f768be..0a6bdf0889 100644 --- a/app/config/specs/swagger2-latest-console.json +++ b/app/config/specs/swagger2-latest-console.json @@ -25305,7 +25305,7 @@ "properties": { "type": { "type": "string", - "description": "Platform type.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "default": null, "x-example": "web", "enum": [ @@ -53396,16 +53396,24 @@ }, "type": { "type": "string", - "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.", + "description": "Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.", "x-example": "web", "enum": [ "web", "flutter-web", "flutter-ios", "flutter-android", - "ios", + "flutter-linux", + "flutter-macos", + "flutter-windows", + "apple-ios", + "apple-macos", + "apple-watchos", + "apple-tvos", "android", - "unity" + "unity", + "react-native-ios", + "react-native-android" ] }, "key": { diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index ea3a00dcb6..80d407322e 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -1756,7 +1756,28 @@ App::post('/v1/projects/:projectId/platforms') ] )) ->param('projectId', '', new UID(), 'Project unique ID.') - ->param('type', null, new WhiteList([Platform::TYPE_WEB, Platform::TYPE_FLUTTER_WEB, Platform::TYPE_FLUTTER_IOS, Platform::TYPE_FLUTTER_ANDROID, Platform::TYPE_FLUTTER_LINUX, Platform::TYPE_FLUTTER_MACOS, Platform::TYPE_FLUTTER_WINDOWS, Platform::TYPE_APPLE_IOS, Platform::TYPE_APPLE_MACOS, Platform::TYPE_APPLE_WATCHOS, Platform::TYPE_APPLE_TVOS, Platform::TYPE_ANDROID, Platform::TYPE_UNITY, Platform::TYPE_REACT_NATIVE_IOS, Platform::TYPE_REACT_NATIVE_ANDROID], true), 'Platform type.') + ->param( + 'type', + null, + new WhiteList([ + Platform::TYPE_WEB, + Platform::TYPE_FLUTTER_WEB, + Platform::TYPE_FLUTTER_IOS, + Platform::TYPE_FLUTTER_ANDROID, + Platform::TYPE_FLUTTER_LINUX, + Platform::TYPE_FLUTTER_MACOS, + Platform::TYPE_FLUTTER_WINDOWS, + Platform::TYPE_APPLE_IOS, + Platform::TYPE_APPLE_MACOS, + Platform::TYPE_APPLE_WATCHOS, + Platform::TYPE_APPLE_TVOS, + Platform::TYPE_ANDROID, + Platform::TYPE_UNITY, + Platform::TYPE_REACT_NATIVE_IOS, + Platform::TYPE_REACT_NATIVE_ANDROID, + ], true), + 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.' + ) ->param('name', null, new Text(128), 'Platform name. Max length: 128 chars.') ->param('key', '', new Text(256), 'Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.', true) ->param('store', '', new Text(256), 'App store or Google Play store ID. Max length: 256 chars.', true) diff --git a/src/Appwrite/Utopia/Response/Model/Platform.php b/src/Appwrite/Utopia/Response/Model/Platform.php index 65f3c343d4..151e43780d 100644 --- a/src/Appwrite/Utopia/Response/Model/Platform.php +++ b/src/Appwrite/Utopia/Response/Model/Platform.php @@ -41,10 +41,10 @@ class Platform extends Model ]) ->addRule('type', [ 'type' => self::TYPE_ENUM, - 'description' => 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, ios, android, and unity.', + 'description' => 'Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.', 'default' => '', 'example' => 'web', - 'enum' => ['web', 'flutter-web', 'flutter-ios', 'flutter-android', 'ios', 'android', 'unity'], + 'enum' => ['web', 'flutter-web', 'flutter-ios', 'flutter-android', 'flutter-linux', 'flutter-macos', 'flutter-windows', 'apple-ios', 'apple-macos', 'apple-watchos', 'apple-tvos', 'android', 'unity', 'react-native-ios', 'react-native-android'], ]) ->addRule('key', [ 'type' => self::TYPE_STRING,