diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c13ce538..73c36c61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,11 @@ name: ci -on: +on: pull_request: push: branches: [master, main] -concurrency: +concurrency: group: ${{ github.workflow }}-${{ github.head_ref }} cancel-in-progress: true @@ -14,7 +14,7 @@ jobs: name: 🧪 Test & lint environment: ci runs-on: ubuntu-latest - + strategy: matrix: php-version: ['8.1', '8.2', '8.3'] @@ -29,13 +29,27 @@ jobs: extensions: curl, json tools: composer:v2 + - name: Cache composer dependencies + uses: actions/cache@v4 + with: + path: vendor + key: composer-${{ matrix.php-version }}-${{ hashFiles('composer.lock') }} + restore-keys: composer-${{ matrix.php-version }}- + - name: Install dependencies run: composer install --prefer-dist --no-interaction - - name: Test + - name: Lint & unit tests env: STREAM_API_KEY: ${{ vars.STREAM_API_KEY }} STREAM_API_SECRET: ${{ secrets.STREAM_API_SECRET }} run: | make lint - make test + make test-unit + + - name: Integration tests + if: matrix.php-version == '8.1' + env: + STREAM_API_KEY: ${{ vars.STREAM_API_KEY }} + STREAM_API_SECRET: ${{ secrets.STREAM_API_SECRET }} + run: make test-integration diff --git a/.gitignore b/.gitignore index b2ecebce..a124036e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,6 @@ # Dependencies /vendor/ -# Composer -composer.lock - # IDE files .idea/ .vscode/ @@ -34,4 +31,4 @@ logs/ # src/Models/ # src/Requests/ # src/Generated/ -# composer-generated.json \ No newline at end of file +# composer-generated.json diff --git a/Makefile b/Makefile index a58d2e5f..840200b2 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,8 @@ test: test-unit test-integration ## Run all tests test-unit: ## Run unit tests only ./vendor/bin/phpunit tests --exclude-group integration -test-integration: ## Run integration tests only - ./vendor/bin/phpunit tests/Integration/ +test-integration: ## Run integration tests in parallel (8 workers, method-level) + ./vendor/bin/paratest --processes=8 --runner=WrapperRunner --colors tests/Integration/ test-specific: ## Run a specific test (usage: make test-specific TEST=TestClassName::testMethodName) ./vendor/bin/phpunit --filter $(TEST) diff --git a/README.md b/README.md index 8a05eabb..0bb52170 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,9 @@ echo "Duration: " . $response->duration; ## Models +> **Note:** When constructing models directly, always use **named arguments** (e.g. `new Message(text: 'hello')`). +> Positional argument usage is not supported and may break across SDK updates as parameter order is not guaranteed. + ### Automatic JSON Parsing Generated models automatically handle JSON parsing and serialization: diff --git a/composer-generated.json b/composer-generated.json index 7af40105..0c06ccd6 100644 --- a/composer-generated.json +++ b/composer-generated.json @@ -7,7 +7,7 @@ "php": "^8.1", "ext-json": "*", "ext-curl": "*", - "firebase/php-jwt": "^6.0", + "firebase/php-jwt": "^7.0", "guzzlehttp/guzzle": "^7.0", "vlucas/phpdotenv": "^5.0" }, diff --git a/composer.json b/composer.json index c560c1b5..62229f42 100644 --- a/composer.json +++ b/composer.json @@ -14,13 +14,14 @@ "php": "^8.1", "ext-curl": "*", "ext-json": "*", - "firebase/php-jwt": "^6.0", + "firebase/php-jwt": "^7.0", "guzzlehttp/guzzle": "^7.0", "vlucas/phpdotenv": "^5.0" }, "require-dev": { - "phpunit/phpunit": "^10.0", + "brianium/paratest": ">=7.2 <7.9", "phpstan/phpstan": "^1.0", + "phpunit/phpunit": "^10.0", "squizlabs/php_codesniffer": "^3.7" }, "autoload": { @@ -35,6 +36,9 @@ }, "config": { "optimize-autoloader": true, + "platform": { + "php": "8.1.0" + }, "preferred-install": "dist", "sort-packages": true }, diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000..836c4d4c --- /dev/null +++ b/composer.lock @@ -0,0 +1,3735 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "191564aa94ee40f4d652a4951de2e3db", + "packages": [ + { + "name": "firebase/php-jwt", + "version": "v7.0.3", + "source": { + "type": "git", + "url": "https://github.com/firebase/php-jwt.git", + "reference": "28aa0694bcfdfa5e2959c394d5a1ee7a5083629e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/firebase/php-jwt/zipball/28aa0694bcfdfa5e2959c394d5a1ee7a5083629e", + "reference": "28aa0694bcfdfa5e2959c394d5a1ee7a5083629e", + "shasum": "" + }, + "require": { + "php": "^8.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.4", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.5", + "psr/cache": "^2.0||^3.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0" + }, + "suggest": { + "ext-sodium": "Support EdDSA (Ed25519) signatures", + "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" + }, + "type": "library", + "autoload": { + "psr-4": { + "Firebase\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Neuman Vong", + "email": "neuman+pear@twilio.com", + "role": "Developer" + }, + { + "name": "Anant Narayanan", + "email": "anant@php.net", + "role": "Developer" + } + ], + "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", + "homepage": "https://github.com/firebase/php-jwt", + "keywords": [ + "jwt", + "php" + ], + "support": { + "issues": "https://github.com/firebase/php-jwt/issues", + "source": "https://github.com/firebase/php-jwt/tree/v7.0.3" + }, + "time": "2026-02-25T22:16:40+00:00" + }, + { + "name": "graham-campbell/result-type", + "version": "v1.1.4", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/e01f4a821471308ba86aa202fed6698b6b695e3b", + "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.5" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.41 || ^9.6.22 || ^10.5.45 || ^11.5.7" + }, + "type": "library", + "autoload": { + "psr-4": { + "GrahamCampbell\\ResultType\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "An Implementation Of The Result Type", + "keywords": [ + "Graham Campbell", + "GrahamCampbell", + "Result Type", + "Result-Type", + "result" + ], + "support": { + "issues": "https://github.com/GrahamCampbell/Result-Type/issues", + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.4" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2025-12-27T19:43:20+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.10.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", + "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^2.3", + "guzzlehttp/psr7": "^2.8", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2 || ^3.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-curl": "*", + "guzzle/client-integration-tests": "3.0.2", + "php-http/message-factory": "^1.1", + "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "psr/log": "^1.1 || ^2.0 || ^3.0" + }, + "suggest": { + "ext-curl": "Required for CURL handler support", + "ext-intl": "Required for Internationalized Domain Name (IDN) support", + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "psr-18", + "psr-7", + "rest", + "web service" + ], + "support": { + "issues": "https://github.com/guzzle/guzzle/issues", + "source": "https://github.com/guzzle/guzzle/tree/7.10.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" + } + ], + "time": "2025-08-23T22:36:01+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "2.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "481557b130ef3790cf82b713667b43030dc9c957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957", + "reference": "481557b130ef3790cf82b713667b43030dc9c957", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.44 || ^9.6.25" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "support": { + "issues": "https://github.com/guzzle/promises/issues", + "source": "https://github.com/guzzle/promises/tree/2.3.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2025-08-22T14:34:08+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.8.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "21dc724a0583619cd1652f673303492272778051" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051", + "reference": "21dc724a0583619cd1652f673303492272778051", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.1 || ^2.0", + "ralouphie/getallheaders": "^3.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "http-interop/http-factory-tests": "0.9.0", + "phpunit/phpunit": "^8.5.44 || ^9.6.25" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "support": { + "issues": "https://github.com/guzzle/psr7/issues", + "source": "https://github.com/guzzle/psr7/tree/2.8.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2025-08-23T21:21:41+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.9.5", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "75365b91986c2405cf5e1e012c5595cd487a98be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/75365b91986c2405cf5e1e012c5595cd487a98be", + "reference": "75365b91986c2405cf5e1e012c5595cd487a98be", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "phpunit/phpunit": "^8.5.44 || ^9.6.25 || ^10.5.53 || ^11.5.34" + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpOption\\": "src/PhpOption/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Johannes M. Schmitt", + "email": "schmittjoh@gmail.com", + "homepage": "https://github.com/schmittjoh" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + } + ], + "description": "Option Type for PHP", + "keywords": [ + "language", + "option", + "php", + "type" + ], + "support": { + "issues": "https://github.com/schmittjoh/php-option/issues", + "source": "https://github.com/schmittjoh/php-option/tree/1.9.5" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2025-12-27T19:41:33+00:00" + }, + { + "name": "psr/http-client", + "version": "1.0.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", + "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "support": { + "source": "https://github.com/php-fig/http-client" + }, + "time": "2023-09-23T14:17:50+00:00" + }, + { + "name": "psr/http-factory", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "psr/http-message": "^1.0 || ^2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-factory" + }, + "time": "2024-04-15T12:06:14+00:00" + }, + { + "name": "psr/http-message", + "version": "2.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "support": { + "source": "https://github.com/php-fig/http-message/tree/2.0" + }, + "time": "2023-04-04T09:54:51+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "support": { + "issues": "https://github.com/ralouphie/getallheaders/issues", + "source": "https://github.com/ralouphie/getallheaders/tree/develop" + }, + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", + "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-23T08:48:59+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-01-02T08:10:11+00:00" + }, + { + "name": "vlucas/phpdotenv", + "version": "v5.6.3", + "source": { + "type": "git", + "url": "https://github.com/vlucas/phpdotenv.git", + "reference": "955e7815d677a3eaa7075231212f2110983adecc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/955e7815d677a3eaa7075231212f2110983adecc", + "reference": "955e7815d677a3eaa7075231212f2110983adecc", + "shasum": "" + }, + "require": { + "ext-pcre": "*", + "graham-campbell/result-type": "^1.1.4", + "php": "^7.2.5 || ^8.0", + "phpoption/phpoption": "^1.9.5", + "symfony/polyfill-ctype": "^1.26", + "symfony/polyfill-mbstring": "^1.26", + "symfony/polyfill-php80": "^1.26" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.8.2", + "ext-filter": "*", + "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." + }, + "type": "library", + "extra": { + "bamarni-bin": { + "bin-links": true, + "forward-command": false + }, + "branch-alias": { + "dev-master": "5.6-dev" + } + }, + "autoload": { + "psr-4": { + "Dotenv\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Vance Lucas", + "email": "vance@vancelucas.com", + "homepage": "https://github.com/vlucas" + } + ], + "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.3" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2025-12-27T19:49:13+00:00" + } + ], + "packages-dev": [ + { + "name": "brianium/paratest", + "version": "v7.3.2", + "source": { + "type": "git", + "url": "https://github.com/paratestphp/paratest.git", + "reference": "553f39a2f3d86c14e0234a40cff7e4055facbf60" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/553f39a2f3d86c14e0234a40cff7e4055facbf60", + "reference": "553f39a2f3d86c14e0234a40cff7e4055facbf60", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-simplexml": "*", + "fidry/cpu-core-counter": "^0.5.1 || ^1.0.0", + "jean85/pretty-package-versions": "^2.0.5", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", + "phpunit/php-code-coverage": "^10.1.7", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-timer": "^6.0", + "phpunit/phpunit": "^10.5.62", + "sebastian/environment": "^6.0.1", + "symfony/console": "^6.3.4 || ^7.0.0", + "symfony/process": "^6.3.4 || ^7.0.0" + }, + "require-dev": { + "doctrine/coding-standard": "^12.0.0", + "ext-pcov": "*", + "ext-posix": "*", + "infection/infection": "^0.27.6", + "phpstan/phpstan": "^1.12.32", + "phpstan/phpstan-deprecation-rules": "^1.1.4", + "phpstan/phpstan-phpunit": "^1.3.15", + "phpstan/phpstan-strict-rules": "^1.5.2", + "squizlabs/php_codesniffer": "^3.7.2", + "symfony/filesystem": "^6.3.1 || ^7.0.0" + }, + "bin": [ + "bin/paratest", + "bin/paratest.bat", + "bin/paratest_for_phpstorm" + ], + "type": "library", + "autoload": { + "psr-4": { + "ParaTest\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Scaturro", + "email": "scaturrob@gmail.com", + "role": "Developer" + }, + { + "name": "Filippo Tessarotto", + "email": "zoeslam@gmail.com", + "role": "Developer" + } + ], + "description": "Parallel testing for PHP", + "homepage": "https://github.com/paratestphp/paratest", + "keywords": [ + "concurrent", + "parallel", + "phpunit", + "testing" + ], + "support": { + "issues": "https://github.com/paratestphp/paratest/issues", + "source": "https://github.com/paratestphp/paratest/tree/v7.3.2" + }, + "funding": [ + { + "url": "https://github.com/sponsors/Slamdunk", + "type": "github" + }, + { + "url": "https://paypal.me/filippotessarotto", + "type": "paypal" + } + ], + "time": "2026-02-10T07:06:59+00:00" + }, + { + "name": "fidry/cpu-core-counter", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "db9508f7b1474469d9d3c53b86f817e344732678" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678", + "reference": "db9508f7b1474469d9d3c53b86f817e344732678", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "fidry/makefile": "^0.2.0", + "fidry/php-cs-fixer-config": "^1.1.2", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^2.0", + "phpstan/phpstan-deprecation-rules": "^2.0.0", + "phpstan/phpstan-phpunit": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "webmozarts/strict-phpunit": "^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Fidry\\CpuCoreCounter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", + "keywords": [ + "CPU", + "core" + ], + "support": { + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.3.0" + }, + "funding": [ + { + "url": "https://github.com/theofidry", + "type": "github" + } + ], + "time": "2025-08-14T07:29:31+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "2.1.1", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/4d7aa5dab42e2a76d99559706022885de0e18e1a", + "reference": "4d7aa5dab42e2a76d99559706022885de0e18e1a", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.1.0", + "php": "^7.4|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.2", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^7.5|^8.5|^9.6", + "rector/rector": "^2.0", + "vimeo/psalm": "^4.3 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A library to get pretty versions strings of installed dependencies", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.1.1" + }, + "time": "2025-03-19T14:43:43+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.13.4", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3 <3.2.2" + }, + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpspec/prophecy": "^1.10", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + }, + "type": "library", + "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "support": { + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" + }, + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2025-08-01T08:46:24+00:00" + }, + { + "name": "nikic/php-parser", + "version": "v5.7.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-json": "*", + "ext-tokenizer": "*", + "php": ">=7.4" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" + }, + "time": "2025-12-06T11:56:16+00:00" + }, + { + "name": "phar-io/manifest", + "version": "2.0.4", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "54750ef60c58e43759730615a392c31c80e23176" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/54750ef60c58e43759730615a392c31c80e23176", + "reference": "54750ef60c58e43759730615a392c31c80e23176", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "support": { + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.4" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2024-03-03T12:33:53+00:00" + }, + { + "name": "phar-io/version", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "support": { + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" + }, + "time": "2022-02-21T01:04:05+00:00" + }, + { + "name": "phpstan/phpstan", + "version": "1.12.32", + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/2770dcdf5078d0b0d53f94317e06affe88419aa8", + "reference": "2770dcdf5078d0b0d53f94317e06affe88419aa8", + "shasum": "" + }, + "require": { + "php": "^7.2|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "docs": "https://phpstan.org/user-guide/getting-started", + "forum": "https://github.com/phpstan/phpstan/discussions", + "issues": "https://github.com/phpstan/phpstan/issues", + "security": "https://github.com/phpstan/phpstan/security/policy", + "source": "https://github.com/phpstan/phpstan-src" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + } + ], + "time": "2025-09-30T10:16:31+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "10.1.16", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "7e308268858ed6baedc8704a304727d20bc07c77" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7e308268858ed6baedc8704a304727d20bc07c77", + "reference": "7e308268858ed6baedc8704a304727d20bc07c77", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-libxml": "*", + "ext-xmlwriter": "*", + "nikic/php-parser": "^4.19.1 || ^5.1.0", + "php": ">=8.1", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-text-template": "^3.0.1", + "sebastian/code-unit-reverse-lookup": "^3.0.0", + "sebastian/complexity": "^3.2.0", + "sebastian/environment": "^6.1.0", + "sebastian/lines-of-code": "^2.0.2", + "sebastian/version": "^4.0.1", + "theseer/tokenizer": "^1.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^10.1" + }, + "suggest": { + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "10.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/10.1.16" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-08-22T04:31:57+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "4.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a95037b6d9e608ba092da1b23931e537cadc3c3c", + "reference": "a95037b6d9e608ba092da1b23931e537cadc3c3c", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", + "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/4.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-31T06:24:48+00:00" + }, + { + "name": "phpunit/php-invoker", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "reference": "f5e568ba02fa5ba0ddd0f618391d5a9ea50b06d7", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-pcntl": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", + "keywords": [ + "process" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:56:09+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "reference": "0c7b06ff49e3d5072f057eb1fa59258bf287a748", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/3.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-08-31T14:07:24+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "6.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "reference": "e2a2d67966e740530f4a3343fe2e030ffdc1161d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/6.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:57:52+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "10.5.63", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "33198268dad71e926626b618f3ec3966661e4d90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/33198268dad71e926626b618f3ec3966661e4d90", + "reference": "33198268dad71e926626b618f3ec3966661e4d90", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.13.4", + "phar-io/manifest": "^2.0.4", + "phar-io/version": "^3.2.1", + "php": ">=8.1", + "phpunit/php-code-coverage": "^10.1.16", + "phpunit/php-file-iterator": "^4.1.0", + "phpunit/php-invoker": "^4.0.0", + "phpunit/php-text-template": "^3.0.1", + "phpunit/php-timer": "^6.0.0", + "sebastian/cli-parser": "^2.0.1", + "sebastian/code-unit": "^2.0.0", + "sebastian/comparator": "^5.0.5", + "sebastian/diff": "^5.1.1", + "sebastian/environment": "^6.1.0", + "sebastian/exporter": "^5.1.4", + "sebastian/global-state": "^6.0.2", + "sebastian/object-enumerator": "^5.0.0", + "sebastian/recursion-context": "^5.0.1", + "sebastian/type": "^4.0.0", + "sebastian/version": "^4.0.1" + }, + "suggest": { + "ext-soap": "To be able to generate mocks based on WSDL files" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "10.5-dev" + } + }, + "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/phpunit/issues", + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.63" + }, + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2026-01-27T05:48:37+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "2.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "reference": "c34583b87e7b7a8055bf6c450c2c77ce32a24084", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/2.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T07:12:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/a81fee9eef0b7a76af11d121767abc44c104e503", + "reference": "a81fee9eef0b7a76af11d121767abc44c104e503", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/2.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:58:43+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "reference": "5e3a687f7d8ae33fb362c5c0743794bbb2420a1d", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T06:59:15+00:00" + }, + { + "name": "sebastian/comparator", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "55dfef806eb7dfeb6e7a6935601fef866f8ca48d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55dfef806eb7dfeb6e7a6935601fef866f8ca48d", + "reference": "55dfef806eb7dfeb6e7a6935601fef866f8ca48d", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/diff": "^5.0", + "sebastian/exporter": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/comparator/issues", + "security": "https://github.com/sebastianbergmann/comparator/security/policy", + "source": "https://github.com/sebastianbergmann/comparator/tree/5.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/comparator", + "type": "tidelift" + } + ], + "time": "2026-01-24T09:25:16+00:00" + }, + { + "name": "sebastian/complexity", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "68ff824baeae169ec9f2137158ee529584553799" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/68ff824baeae169ec9f2137158ee529584553799", + "reference": "68ff824baeae169ec9f2137158ee529584553799", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.2-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "security": "https://github.com/sebastianbergmann/complexity/security/policy", + "source": "https://github.com/sebastianbergmann/complexity/tree/3.2.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-21T08:37:17+00:00" + }, + { + "name": "sebastian/diff", + "version": "5.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c41e007b4b62af48218231d6c2275e4c9b975b2e", + "reference": "c41e007b4b62af48218231d6c2275e4c9b975b2e", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0", + "symfony/process": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff", + "udiff", + "unidiff", + "unified diff" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/diff/issues", + "security": "https://github.com/sebastianbergmann/diff/security/policy", + "source": "https://github.com/sebastianbergmann/diff/tree/5.1.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T07:15:17+00:00" + }, + { + "name": "sebastian/environment", + "version": "6.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/8074dbcd93529b357029f5cc5058fd3e43666984", + "reference": "8074dbcd93529b357029f5cc5058fd3e43666984", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "suggest": { + "ext-posix": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "https://github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/environment/issues", + "security": "https://github.com/sebastianbergmann/environment/security/policy", + "source": "https://github.com/sebastianbergmann/environment/tree/6.1.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-23T08:47:14+00:00" + }, + { + "name": "sebastian/exporter", + "version": "5.1.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "0735b90f4da94969541dac1da743446e276defa6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0735b90f4da94969541dac1da743446e276defa6", + "reference": "0735b90f4da94969541dac1da743446e276defa6", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=8.1", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.1-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "https://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/exporter/issues", + "security": "https://github.com/sebastianbergmann/exporter/security/policy", + "source": "https://github.com/sebastianbergmann/exporter/tree/5.1.4" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/exporter", + "type": "tidelift" + } + ], + "time": "2025-09-24T06:09:11+00:00" + }, + { + "name": "sebastian/global-state", + "version": "6.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "reference": "987bafff24ecc4c9ac418cab1145b96dd6e9cbd9", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "6.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "https://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "security": "https://github.com/sebastianbergmann/global-state/security/policy", + "source": "https://github.com/sebastianbergmann/global-state/tree/6.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2024-03-02T07:19:19+00:00" + }, + { + "name": "sebastian/lines-of-code", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/856e7f6a75a84e339195d48c556f23be2ebf75d0", + "reference": "856e7f6a75a84e339195d48c556f23be2ebf75d0", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.18 || ^5.0", + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", + "support": { + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/2.0.2" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-12-21T08:38:20+00:00" + }, + { + "name": "sebastian/object-enumerator", + "version": "5.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/202d0e344a580d7f7d04b3fafce6933e59dae906", + "reference": "202d0e344a580d7f7d04b3fafce6933e59dae906", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "sebastian/object-reflector": "^3.0", + "sebastian/recursion-context": "^5.0" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/5.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:08:32+00:00" + }, + { + "name": "sebastian/object-reflector", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/24ed13d98130f0e7122df55d06c5c4942a577957", + "reference": "24ed13d98130f0e7122df55d06c5c4942a577957", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "support": { + "issues": "https://github.com/sebastianbergmann/object-reflector/issues", + "source": "https://github.com/sebastianbergmann/object-reflector/tree/3.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:06:18+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "5.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/47e34210757a2f37a97dcd207d032e1b01e64c7a", + "reference": "47e34210757a2f37a97dcd207d032e1b01e64c7a", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "https://github.com/sebastianbergmann/recursion-context", + "support": { + "issues": "https://github.com/sebastianbergmann/recursion-context/issues", + "security": "https://github.com/sebastianbergmann/recursion-context/security/policy", + "source": "https://github.com/sebastianbergmann/recursion-context/tree/5.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/recursion-context", + "type": "tidelift" + } + ], + "time": "2025-08-10T07:50:56+00:00" + }, + { + "name": "sebastian/type", + "version": "4.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/462699a16464c3944eefc02ebdd77882bd3925bf", + "reference": "462699a16464c3944eefc02ebdd77882bd3925bf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "phpunit/phpunit": "^10.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/4.0.0" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-03T07:10:45+00:00" + }, + { + "name": "sebastian/version", + "version": "4.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "reference": "c51fa83a5d8f43f1402e3f32a005e6262244ef17", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "4.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "support": { + "issues": "https://github.com/sebastianbergmann/version/issues", + "source": "https://github.com/sebastianbergmann/version/tree/4.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-02-07T11:34:05+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "3.13.5", + "source": { + "type": "git", + "url": "https://github.com/PHPCSStandards/PHP_CodeSniffer.git", + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPCSStandards/PHP_CodeSniffer/zipball/0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "reference": "0ca86845ce43291e8f5692c7356fccf3bcf02bf4", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4" + }, + "bin": [ + "bin/phpcbf", + "bin/phpcs" + ], + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "Former lead" + }, + { + "name": "Juliette Reinders Folmer", + "role": "Current lead" + }, + { + "name": "Contributors", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "keywords": [ + "phpcs", + "standards", + "static analysis" + ], + "support": { + "issues": "https://github.com/PHPCSStandards/PHP_CodeSniffer/issues", + "security": "https://github.com/PHPCSStandards/PHP_CodeSniffer/security/policy", + "source": "https://github.com/PHPCSStandards/PHP_CodeSniffer", + "wiki": "https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki" + }, + "funding": [ + { + "url": "https://github.com/PHPCSStandards", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + }, + { + "url": "https://thanks.dev/u/gh/phpcsstandards", + "type": "thanks_dev" + } + ], + "time": "2025-11-04T16:30:35+00:00" + }, + { + "name": "symfony/console", + "version": "v6.4.34", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "7b1f1c37eff5910ddda2831345467e593a5120ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/7b1f1c37eff5910ddda2831345467e593a5120ad", + "reference": "7b1f1c37eff5910ddda2831345467e593a5120ad", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0|^7.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0|^7.0", + "symfony/dependency-injection": "^5.4|^6.0|^7.0", + "symfony/event-dispatcher": "^5.4|^6.0|^7.0", + "symfony/http-foundation": "^6.4|^7.0", + "symfony/http-kernel": "^6.4|^7.0", + "symfony/lock": "^5.4|^6.0|^7.0", + "symfony/messenger": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/stopwatch": "^5.4|^6.0|^7.0", + "symfony/var-dumper": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.4.34" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-02-23T15:42:15+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", + "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-06-27T09:58:17+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "3833d7255cc303546435cb650316bff708a1c75c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", + "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/process", + "version": "v6.4.33", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "c46e854e79b52d07666e43924a20cb6dc546644e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/c46e854e79b52d07666e43924a20cb6dc546644e", + "reference": "c46e854e79b52d07666e43924a20cb6dc546644e", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.4.33" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-01-23T16:02:12+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.6.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", + "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-07-15T11:30:57+00:00" + }, + { + "name": "symfony/string", + "version": "v6.4.34", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "2adaf4106f2ef4c67271971bde6d3fe0a6936432" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/2adaf4106f2ef4c67271971bde6d3fe0a6936432", + "reference": "2adaf4106f2ef4c67271971bde6d3fe0a6936432", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/http-client": "^5.4|^6.0|^7.0", + "symfony/intl": "^6.2|^7.0", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.4.34" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-02-08T20:44:54+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.3.1", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b7489ce515e168639d17feec34b8847c326b0b3c", + "reference": "b7489ce515e168639d17feec34b8847c326b0b3c", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "support": { + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.3.1" + }, + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2025-11-17T20:03:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": "^8.1", + "ext-curl": "*", + "ext-json": "*" + }, + "platform-dev": {}, + "platform-overrides": { + "php": "8.1.0" + }, + "plugin-api-version": "2.9.0" +} diff --git a/generate.sh b/generate.sh index cb5992e3..713d1332 100755 --- a/generate.sh +++ b/generate.sh @@ -16,7 +16,7 @@ then exit 1; fi -set -ex +set -e # cd in API repo, generate new spec and then generate code from it ( cd $SOURCE_PATH ; make openapi ; go run ./cmd/chat-manager openapi generate-client --language php --spec ./releases/v2/serverside-api.yaml --output $DST_PATH ) diff --git a/phpunit.xml b/phpunit.xml index ae23a837..a4496a2b 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -5,7 +5,7 @@ colors="true" executionOrder="depends,defects" failOnRisky="true" - failOnWarning="true" + failOnWarning="false" stopOnFailure="false"> @@ -17,11 +17,5 @@ src - - - - - - diff --git a/src/Generated/CommonTrait.php b/src/Generated/CommonTrait.php index 7ace6997..b5027665 100644 --- a/src/Generated/CommonTrait.php +++ b/src/Generated/CommonTrait.php @@ -16,7 +16,6 @@ trait CommonTrait { /** * This Method returns the application settings - * * * @return StreamResponse * @throws StreamException @@ -30,7 +29,6 @@ public function getApp(): StreamResponse { } /** * This Method updates one or more application settings - * * * @param GeneratedModels\UpdateAppRequest $requestData * @return StreamResponse @@ -45,7 +43,6 @@ public function updateApp(GeneratedModels\UpdateAppRequest $requestData): Stream } /** * Returns all available block lists - * * * @param string $team * @return StreamResponse @@ -63,7 +60,6 @@ public function listBlockLists(string $team): StreamResponse { } /** * Creates a new application blocklist, once created the blocklist can be used by any channel type - * * * @param GeneratedModels\CreateBlockListRequest $requestData * @return StreamResponse @@ -78,7 +74,6 @@ public function createBlockList(GeneratedModels\CreateBlockListRequest $requestD } /** * Deletes previously created application blocklist - * * * @param string $name * @param string $team @@ -98,7 +93,6 @@ public function deleteBlockList(string $name, string $team): StreamResponse { } /** * Returns block list by given name - * * * @param string $name * @param string $team @@ -118,7 +112,6 @@ public function getBlockList(string $name, string $team): StreamResponse { } /** * Updates contents of the block list - * * * @param string $name * @param GeneratedModels\UpdateBlockListRequest $requestData @@ -135,7 +128,6 @@ public function updateBlockList(string $name, GeneratedModels\UpdateBlockListReq } /** * Sends a test message via push, this is a test endpoint to verify your push settings - * * * @param GeneratedModels\CheckPushRequest $requestData * @return StreamResponse @@ -150,7 +142,6 @@ public function checkPush(GeneratedModels\CheckPushRequest $requestData): Stream } /** * Validates Amazon SNS configuration - * * * @param GeneratedModels\CheckSNSRequest $requestData * @return StreamResponse @@ -165,7 +156,6 @@ public function checkSNS(GeneratedModels\CheckSNSRequest $requestData): StreamRe } /** * Validates Amazon SQS credentials - * * * @param GeneratedModels\CheckSQSRequest $requestData * @return StreamResponse @@ -180,7 +170,6 @@ public function checkSQS(GeneratedModels\CheckSQSRequest $requestData): StreamRe } /** * Deletes one device - * * * @param string $id * @param string $userID @@ -202,7 +191,6 @@ public function deleteDevice(string $id, string $userID): StreamResponse { } /** * Returns all available devices - * * * @param string $userID * @return StreamResponse @@ -220,7 +208,6 @@ public function listDevices(string $userID): StreamResponse { } /** * Adds a new device to a user, if the same device already exists the call will have no effect - * * * @param GeneratedModels\CreateDeviceRequest $requestData * @return StreamResponse @@ -235,7 +222,6 @@ public function createDevice(GeneratedModels\CreateDeviceRequest $requestData): } /** * Exports user profile, reactions and messages for list of given users - * * * @param GeneratedModels\ExportUsersRequest $requestData * @return StreamResponse @@ -250,7 +236,6 @@ public function exportUsers(GeneratedModels\ExportUsersRequest $requestData): St } /** * Lists external storage - * * * @return StreamResponse * @throws StreamException @@ -264,7 +249,6 @@ public function listExternalStorage(): StreamResponse { } /** * Creates new external storage - * * * @param GeneratedModels\CreateExternalStorageRequest $requestData * @return StreamResponse @@ -279,7 +263,6 @@ public function createExternalStorage(GeneratedModels\CreateExternalStorageReque } /** * Deletes external storage - * * * @param string $name * @return StreamResponse @@ -294,8 +277,6 @@ public function deleteExternalStorage(string $name): StreamResponse { return StreamResponse::fromJson($this->makeRequest('DELETE', $path, $queryParams, $requestData), GeneratedModels\DeleteExternalStorageResponse::class); } /** - * - * * * @param string $name * @param GeneratedModels\UpdateExternalStorageRequest $requestData @@ -311,8 +292,6 @@ public function updateExternalStorage(string $name, GeneratedModels\UpdateExtern return StreamResponse::fromJson($this->makeRequest('PUT', $path, $queryParams, $requestData), GeneratedModels\UpdateExternalStorageResponse::class); } /** - * - * * * @param string $name * @return StreamResponse @@ -327,8 +306,6 @@ public function checkExternalStorage(string $name): StreamResponse { return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\CheckExternalStorageResponse::class); } /** - * - * * * @param GeneratedModels\CreateGuestRequest $requestData * @return StreamResponse @@ -343,7 +320,6 @@ public function createGuest(GeneratedModels\CreateGuestRequest $requestData): St } /** * Creates a new import URL - * * * @param GeneratedModels\CreateImportURLRequest $requestData * @return StreamResponse @@ -358,7 +334,6 @@ public function createImportURL(GeneratedModels\CreateImportURLRequest $requestD } /** * Gets an import - * * * @return StreamResponse * @throws StreamException @@ -372,7 +347,6 @@ public function listImports(): StreamResponse { } /** * Creates a new import - * * * @param GeneratedModels\CreateImportRequest $requestData * @return StreamResponse @@ -387,7 +361,6 @@ public function createImport(GeneratedModels\CreateImportRequest $requestData): } /** * Lists all import v2 tasks for the app - * * * @param int $state * @return StreamResponse @@ -405,7 +378,6 @@ public function listImportV2Tasks(int $state): StreamResponse { } /** * Creates a new import v2 task - * * * @param GeneratedModels\CreateImportV2TaskRequest $requestData * @return StreamResponse @@ -420,7 +392,6 @@ public function createImportV2Task(GeneratedModels\CreateImportV2TaskRequest $re } /** * Deletes an import v2 task. Can only delete tasks in queued state. - * * * @param string $id * @return StreamResponse @@ -436,7 +407,6 @@ public function deleteImportV2Task(string $id): StreamResponse { } /** * Gets a single import v2 task by ID - * * * @param string $id * @return StreamResponse @@ -452,7 +422,6 @@ public function getImportV2Task(string $id): StreamResponse { } /** * Gets an import - * * * @param string $id * @return StreamResponse @@ -468,7 +437,6 @@ public function getImport(string $id): StreamResponse { } /** * Get an OpenGraph attachment for a link - * * * @param string $url * @return StreamResponse @@ -486,7 +454,6 @@ public function getOG(string $url): StreamResponse { } /** * Lists all available permissions - * * * @return StreamResponse * @throws StreamException @@ -500,7 +467,6 @@ public function listPermissions(): StreamResponse { } /** * Gets custom permission - * * * @param string $id * @return StreamResponse @@ -516,7 +482,6 @@ public function getPermission(string $id): StreamResponse { } /** * Creates a new poll - * * * @param GeneratedModels\CreatePollRequest $requestData * @return StreamResponse @@ -531,13 +496,11 @@ public function createPoll(GeneratedModels\CreatePollRequest $requestData): Stre } /** * Updates a poll - * * Sends events: * - feeds.poll.closed * - feeds.poll.updated * - poll.closed * - poll.updated - * * * @param GeneratedModels\UpdatePollRequest $requestData * @return StreamResponse @@ -552,7 +515,6 @@ public function updatePoll(GeneratedModels\UpdatePollRequest $requestData): Stre } /** * Queries polls - * * * @param string $userID * @param GeneratedModels\QueryPollsRequest $requestData @@ -571,11 +533,9 @@ public function queryPolls(string $userID, GeneratedModels\QueryPollsRequest $re } /** * Deletes a poll - * * Sends events: * - feeds.poll.deleted * - poll.deleted - * * * @param string $pollID * @param string $userID @@ -595,7 +555,6 @@ public function deletePoll(string $pollID, string $userID): StreamResponse { } /** * Retrieves a poll - * * * @param string $pollID * @param string $userID @@ -615,13 +574,11 @@ public function getPoll(string $pollID, string $userID): StreamResponse { } /** * Updates a poll partially - * * Sends events: * - feeds.poll.closed * - feeds.poll.updated * - poll.closed * - poll.updated - * * * @param string $pollID * @param GeneratedModels\UpdatePollPartialRequest $requestData @@ -638,11 +595,9 @@ public function updatePollPartial(string $pollID, GeneratedModels\UpdatePollPart } /** * Creates a poll option - * * Sends events: * - feeds.poll.updated * - poll.updated - * * * @param string $pollID * @param GeneratedModels\CreatePollOptionRequest $requestData @@ -659,11 +614,9 @@ public function createPollOption(string $pollID, GeneratedModels\CreatePollOptio } /** * Updates a poll option - * * Sends events: * - feeds.poll.updated * - poll.updated - * * * @param string $pollID * @param GeneratedModels\UpdatePollOptionRequest $requestData @@ -680,11 +633,9 @@ public function updatePollOption(string $pollID, GeneratedModels\UpdatePollOptio } /** * Deletes a poll option - * * Sends events: * - feeds.poll.updated * - poll.updated - * * * @param string $pollID * @param string $optionID @@ -706,7 +657,6 @@ public function deletePollOption(string $pollID, string $optionID, string $userI } /** * Retrieves a poll option - * * * @param string $pollID * @param string $optionID @@ -728,7 +678,6 @@ public function getPollOption(string $pollID, string $optionID, string $userID): } /** * Queries votes - * * * @param string $pollID * @param string $userID @@ -749,7 +698,6 @@ public function queryPollVotes(string $pollID, string $userID, GeneratedModels\Q } /** * Upserts the push preferences for a user and or channel member. Set to all, mentions or none - * * * @param GeneratedModels\UpsertPushPreferencesRequest $requestData * @return StreamResponse @@ -764,7 +712,6 @@ public function updatePushNotificationPreferences(GeneratedModels\UpsertPushPref } /** * List details of all push providers. - * * * @return StreamResponse * @throws StreamException @@ -778,7 +725,6 @@ public function listPushProviders(): StreamResponse { } /** * Upsert a push provider for v2 with multi bundle/package support - * * * @param GeneratedModels\UpsertPushProviderRequest $requestData * @return StreamResponse @@ -793,7 +739,6 @@ public function upsertPushProvider(GeneratedModels\UpsertPushProviderRequest $re } /** * Delete a push provider from v2 with multi bundle/package support. v1 isn't supported in this endpoint - * * * @param string $type * @param string $name @@ -811,7 +756,6 @@ public function deletePushProvider(string $type, string $name): StreamResponse { } /** * Retrieve push notification templates for Chat. - * * * @param string $pushProviderType * @param string $pushProviderName @@ -833,7 +777,6 @@ public function getPushTemplates(string $pushProviderType, string $pushProviderN } /** * Create or update a push notification template for a specific event type and push provider - * * * @param GeneratedModels\UpsertPushTemplateRequest $requestData * @return StreamResponse @@ -848,7 +791,6 @@ public function upsertPushTemplate(GeneratedModels\UpsertPushTemplateRequest $re } /** * Get rate limits usage and quotas - * * * @param bool $serverSide * @param bool $android @@ -882,7 +824,6 @@ public function getRateLimits(bool $serverSide, bool $android, bool $ios, bool $ } /** * Lists all available roles - * * * @return StreamResponse * @throws StreamException @@ -896,7 +837,6 @@ public function listRoles(): StreamResponse { } /** * Creates custom role - * * * @param GeneratedModels\CreateRoleRequest $requestData * @return StreamResponse @@ -911,7 +851,6 @@ public function createRole(GeneratedModels\CreateRoleRequest $requestData): Stre } /** * Deletes custom role - * * * @param string $name * @return StreamResponse @@ -927,7 +866,6 @@ public function deleteRole(string $name): StreamResponse { } /** * Gets status of a task - * * * @param string $id * @return StreamResponse @@ -943,7 +881,6 @@ public function getTask(string $id): StreamResponse { } /** * Deletes previously uploaded file - * * * @param string $url * @return StreamResponse @@ -961,7 +898,6 @@ public function deleteFile(string $url): StreamResponse { } /** * Uploads file - * * * @param GeneratedModels\FileUploadRequest $requestData * @return StreamResponse @@ -976,7 +912,6 @@ public function uploadFile(GeneratedModels\FileUploadRequest $requestData): Stre } /** * Deletes previously uploaded image - * * * @param string $url * @return StreamResponse @@ -994,7 +929,6 @@ public function deleteImage(string $url): StreamResponse { } /** * Uploads image - * * * @param GeneratedModels\ImageUploadRequest $requestData * @return StreamResponse @@ -1009,7 +943,6 @@ public function uploadImage(GeneratedModels\ImageUploadRequest $requestData): St } /** * Find and filter users - * * * @param GeneratedModels\QueryUsersPayload $payload * @return StreamResponse @@ -1020,19 +953,17 @@ public function queryUsers(GeneratedModels\QueryUsersPayload $payload): StreamRe $queryParams = []; if ($payload !== null) { - $queryParams['payload'] = $payload; + $queryParams['payload'] = json_encode($payload); } $requestData = null; return StreamResponse::fromJson($this->makeRequest('GET', $path, $queryParams, $requestData), GeneratedModels\QueryUsersResponse::class); } /** * Updates certain fields of the user - * * Sends events: * - user.presence.changed * - user.updated * - user.presence.changed - * * * @param GeneratedModels\UpdateUsersPartialRequest $requestData * @return StreamResponse @@ -1047,10 +978,8 @@ public function updateUsersPartial(GeneratedModels\UpdateUsersPartialRequest $re } /** * Update or create users in bulk - * * Sends events: * - user.updated - * * * @param GeneratedModels\UpdateUsersRequest $requestData * @return StreamResponse @@ -1065,7 +994,6 @@ public function updateUsers(GeneratedModels\UpdateUsersRequest $requestData): St } /** * Get list of blocked Users - * * * @param string $userID * @return StreamResponse @@ -1083,7 +1011,6 @@ public function getBlockedUsers(string $userID): StreamResponse { } /** * Block users - * * * @param GeneratedModels\BlockUsersRequest $requestData * @return StreamResponse @@ -1098,10 +1025,8 @@ public function blockUsers(GeneratedModels\BlockUsersRequest $requestData): Stre } /** * Deactivate users in batches - * * Sends events: * - user.deactivated - * * * @param GeneratedModels\DeactivateUsersRequest $requestData * @return StreamResponse @@ -1116,11 +1041,9 @@ public function deactivateUsers(GeneratedModels\DeactivateUsersRequest $requestD } /** * Deletes users and optionally all their belongings asynchronously. - * * Sends events: * - channel.deleted * - user.deleted - * * * @param GeneratedModels\DeleteUsersRequest $requestData * @return StreamResponse @@ -1135,7 +1058,6 @@ public function deleteUsers(GeneratedModels\DeleteUsersRequest $requestData): St } /** * Retrieves all active live locations for a user - * * * @param string $userID * @return StreamResponse @@ -1153,7 +1075,6 @@ public function getUserLiveLocations(string $userID): StreamResponse { } /** * Updates an existing live location with new coordinates or expiration time - * * * @param string $userID * @param GeneratedModels\UpdateLiveLocationRequest $requestData @@ -1172,11 +1093,9 @@ public function updateLiveLocation(string $userID, GeneratedModels\UpdateLiveLoc } /** * Reactivate users in batches - * * Sends events: * - user.reactivated * - user.reactivated - * * * @param GeneratedModels\ReactivateUsersRequest $requestData * @return StreamResponse @@ -1191,7 +1110,6 @@ public function reactivateUsers(GeneratedModels\ReactivateUsersRequest $requestD } /** * Restore soft deleted users - * * * @param GeneratedModels\RestoreUsersRequest $requestData * @return StreamResponse @@ -1206,7 +1124,6 @@ public function restoreUsers(GeneratedModels\RestoreUsersRequest $requestData): } /** * Unblock users - * * * @param GeneratedModels\UnblockUsersRequest $requestData * @return StreamResponse @@ -1221,10 +1138,8 @@ public function unblockUsers(GeneratedModels\UnblockUsersRequest $requestData): } /** * Deactivates user with possibility to activate it back - * * Sends events: * - user.deactivated - * * * @param string $userID * @param GeneratedModels\DeactivateUserRequest $requestData @@ -1241,7 +1156,6 @@ public function deactivateUser(string $userID, GeneratedModels\DeactivateUserReq } /** * Exports the user's profile, reactions and messages. Raises an error if a user has more than 10k messages or reactions - * * * @param string $userID * @return StreamResponse @@ -1257,10 +1171,8 @@ public function exportUser(string $userID): StreamResponse { } /** * Activates user who's been deactivated previously - * * Sends events: * - user.reactivated - * * * @param string $userID * @param GeneratedModels\ReactivateUserRequest $requestData diff --git a/src/Generated/FeedMethods.php b/src/Generated/FeedMethods.php index 7540cc63..289ff889 100644 --- a/src/Generated/FeedMethods.php +++ b/src/Generated/FeedMethods.php @@ -16,7 +16,6 @@ trait FeedMethods { /** * Delete a single feed by its ID - * * * @param bool $hardDelete * @return StreamResponse @@ -28,7 +27,6 @@ public function deleteFeed( } /** * Create a single feed for a given feed group - * * * @param GeneratedModels\GetOrCreateFeedRequest $requestData * @return StreamResponse @@ -40,7 +38,6 @@ public function getOrCreateFeed( } /** * Update an existing feed - * * * @param GeneratedModels\UpdateFeedRequest $requestData * @return StreamResponse @@ -52,7 +49,6 @@ public function updateFeed( } /** * Mark activities as read/seen/watched. Can mark by timestamp (seen), activity IDs (read), or all as read. - * * * @param GeneratedModels\MarkActivityRequest $requestData * @return StreamResponse @@ -64,7 +60,6 @@ public function markActivity( } /** * Unpin an activity from a feed. This removes the pin, so the activity will no longer be displayed at the top of the feed. - * * * @param string $activityID * @param string $userID @@ -77,7 +72,6 @@ public function unpinActivity( } /** * Pin an activity to a feed. Pinned activities are typically displayed at the top of a feed. - * * * @param string $activityID * @param GeneratedModels\PinActivityRequest $requestData @@ -90,7 +84,6 @@ public function pinActivity( } /** * Add, remove, or set members for a feed - * * * @param GeneratedModels\UpdateFeedMembersRequest $requestData * @return StreamResponse @@ -102,7 +95,6 @@ public function updateFeedMembers( } /** * Accepts a pending feed member request - * * * @param GeneratedModels\AcceptFeedMemberInviteRequest $requestData * @return StreamResponse @@ -114,7 +106,6 @@ public function acceptFeedMemberInvite( } /** * Query feed members based on filters with pagination and sorting options - * * * @param GeneratedModels\QueryFeedMembersRequest $requestData * @return StreamResponse @@ -126,7 +117,6 @@ public function queryFeedMembers( } /** * Rejects a pending feed member request - * * * @param GeneratedModels\RejectFeedMemberInviteRequest $requestData * @return StreamResponse @@ -136,6 +126,17 @@ public function rejectFeedMemberInvite( GeneratedModels\RejectFeedMemberInviteRequest $requestData): StreamResponse { return $this->feedsV3Client->rejectFeedMemberInvite($this->feedGroup, $this->feedId, $requestData); } + /** + * Query pinned activities for a feed with filter query + * + * @param GeneratedModels\QueryPinnedActivitiesRequest $requestData + * @return StreamResponse + * @throws StreamException + */ + public function queryPinnedActivities( + GeneratedModels\QueryPinnedActivitiesRequest $requestData): StreamResponse { + return $this->feedsV3Client->queryPinnedActivities($this->feedGroup, $this->feedId, $requestData); + } } diff --git a/src/Generated/FeedsTrait.php b/src/Generated/FeedsTrait.php index 508b9b3f..ccbe6010 100644 --- a/src/Generated/FeedsTrait.php +++ b/src/Generated/FeedsTrait.php @@ -16,7 +16,6 @@ trait FeedsTrait { /** * Create a new activity or update an existing one - * * * @param GeneratedModels\AddActivityRequest $requestData * @return StreamResponse @@ -31,7 +30,6 @@ public function addActivity(GeneratedModels\AddActivityRequest $requestData): St } /** * Create new activities or update existing ones in a batch operation - * * * @param GeneratedModels\UpsertActivitiesRequest $requestData * @return StreamResponse @@ -46,10 +44,8 @@ public function upsertActivities(GeneratedModels\UpsertActivitiesRequest $reques } /** * Updates certain fields of multiple activities in a batch. Use 'set' to update specific fields and 'unset' to remove fields. Activities that fail due to not found, permission denied, or no changes detected are silently skipped and not included in the response. However, validation errors (e.g., updating reserved fields, invalid field values) will fail the entire batch request. - * * Sends events: * - feeds.activity.updated - * * * @param GeneratedModels\UpdateActivitiesPartialBatchRequest $requestData * @return StreamResponse @@ -64,7 +60,6 @@ public function updateActivitiesPartialBatch(GeneratedModels\UpdateActivitiesPar } /** * Delete one or more activities by their IDs - * * * @param GeneratedModels\DeleteActivitiesRequest $requestData * @return StreamResponse @@ -79,7 +74,6 @@ public function deleteActivities(GeneratedModels\DeleteActivitiesRequest $reques } /** * Query activities based on filters with pagination and sorting options - * * * @param GeneratedModels\QueryActivitiesRequest $requestData * @return StreamResponse @@ -94,7 +88,6 @@ public function queryActivities(GeneratedModels\QueryActivitiesRequest $requestD } /** * Deletes a bookmark from an activity - * * * @param string $activityID * @param string $folderID @@ -118,7 +111,6 @@ public function deleteBookmark(string $activityID, string $folderID, string $use } /** * Updates a bookmark for an activity - * * * @param string $activityID * @param GeneratedModels\UpdateBookmarkRequest $requestData @@ -135,7 +127,6 @@ public function updateBookmark(string $activityID, GeneratedModels\UpdateBookmar } /** * Adds a bookmark to an activity - * * * @param string $activityID * @param GeneratedModels\AddBookmarkRequest $requestData @@ -152,7 +143,6 @@ public function addBookmark(string $activityID, GeneratedModels\AddBookmarkReque } /** * Submit feedback for an activity including options to show less, hide, report, or mute the user - * * * @param string $activityID * @param GeneratedModels\ActivityFeedbackRequest $requestData @@ -169,7 +159,6 @@ public function activityFeedback(string $activityID, GeneratedModels\ActivityFee } /** * Cast a vote on a poll - * * Sends events: * - feeds.poll.vote_casted * - feeds.poll.vote_changed @@ -177,7 +166,6 @@ public function activityFeedback(string $activityID, GeneratedModels\ActivityFee * - poll.vote_casted * - poll.vote_changed * - poll.vote_removed - * * * @param string $activityID * @param string $pollID @@ -196,11 +184,9 @@ public function castPollVote(string $activityID, string $pollID, GeneratedModels } /** * Delete a vote from a poll - * * Sends events: * - feeds.poll.vote_removed * - poll.vote_removed - * * * @param string $activityID * @param string $pollID @@ -224,7 +210,6 @@ public function deletePollVote(string $activityID, string $pollID, string $voteI } /** * Adds a reaction to an activity - * * * @param string $activityID * @param GeneratedModels\AddReactionRequest $requestData @@ -241,7 +226,6 @@ public function addActivityReaction(string $activityID, GeneratedModels\AddReact } /** * Query activity reactions - * * * @param string $activityID * @param GeneratedModels\QueryActivityReactionsRequest $requestData @@ -258,7 +242,6 @@ public function queryActivityReactions(string $activityID, GeneratedModels\Query } /** * Removes a reaction from an activity - * * * @param string $activityID * @param string $type @@ -284,7 +267,6 @@ public function deleteActivityReaction(string $activityID, string $type, bool $d } /** * Delete a single activity by its ID - * * * @param string $id * @param bool $hardDelete @@ -308,7 +290,6 @@ public function deleteActivity(string $id, bool $hardDelete, bool $deleteNotific } /** * Returns activity by ID - * * * @param string $id * @return StreamResponse @@ -324,10 +305,8 @@ public function getActivity(string $id): StreamResponse { } /** * Updates certain fields of the activity. Use 'set' to update specific fields and 'unset' to remove fields. This allows you to update only the fields you need without replacing the entire activity. Useful for updating reply restrictions ('restrict_replies'), mentioned users, or custom data. - * * Sends events: * - feeds.activity.updated - * * * @param string $id * @param GeneratedModels\UpdateActivityPartialRequest $requestData @@ -344,10 +323,8 @@ public function updateActivityPartial(string $id, GeneratedModels\UpdateActivity } /** * Replaces an activity with the provided data. Use this to update text, attachments, reply restrictions ('restrict_replies'), mentioned users, and other activity fields. Note: This is a full update - any fields not provided will be cleared. - * * Sends events: * - feeds.activity.updated - * * * @param string $id * @param GeneratedModels\UpdateActivityRequest $requestData @@ -364,7 +341,6 @@ public function updateActivity(string $id, GeneratedModels\UpdateActivityRequest } /** * Restores a soft-deleted activity by its ID. Only the activity owner can restore their own activities. - * * * @param string $id * @param GeneratedModels\RestoreActivityRequest $requestData @@ -381,7 +357,6 @@ public function restoreActivity(string $id, GeneratedModels\RestoreActivityReque } /** * Query bookmark folders with filter query - * * * @param GeneratedModels\QueryBookmarkFoldersRequest $requestData * @return StreamResponse @@ -396,7 +371,6 @@ public function queryBookmarkFolders(GeneratedModels\QueryBookmarkFoldersRequest } /** * Delete a bookmark folder by its ID - * * * @param string $folderID * @return StreamResponse @@ -412,7 +386,6 @@ public function deleteBookmarkFolder(string $folderID): StreamResponse { } /** * Update a bookmark folder by its ID - * * * @param string $folderID * @param GeneratedModels\UpdateBookmarkFolderRequest $requestData @@ -429,7 +402,6 @@ public function updateBookmarkFolder(string $folderID, GeneratedModels\UpdateBoo } /** * Query bookmarks with filter query - * * * @param GeneratedModels\QueryBookmarksRequest $requestData * @return StreamResponse @@ -444,7 +416,6 @@ public function queryBookmarks(GeneratedModels\QueryBookmarksRequest $requestDat } /** * Delete collections in a batch operation. Users can only delete their own collections. - * * * @param array $collectionRefs * @return StreamResponse @@ -462,7 +433,6 @@ public function deleteCollections(array $collectionRefs): StreamResponse { } /** * Read collections with optional filtering by user ID and collection name. By default, users can only read their own collections. - * * * @param array $collectionRefs * @param string $userID @@ -484,7 +454,6 @@ public function readCollections(array $collectionRefs, string $userID): StreamRe } /** * Update existing collections in a batch operation. Only the custom data field is updatable. Users can only update their own collections. - * * * @param GeneratedModels\UpdateCollectionsRequest $requestData * @return StreamResponse @@ -499,7 +468,6 @@ public function updateCollections(GeneratedModels\UpdateCollectionsRequest $requ } /** * Create new collections in a batch operation. Collections are data objects that can be attached to activities for managing shared data across multiple activities. - * * * @param GeneratedModels\CreateCollectionsRequest $requestData * @return StreamResponse @@ -514,7 +482,6 @@ public function createCollections(GeneratedModels\CreateCollectionsRequest $requ } /** * Insert new collections or update existing ones in a batch operation. Only the custom data field is updatable for existing collections. - * * * @param GeneratedModels\UpsertCollectionsRequest $requestData * @return StreamResponse @@ -529,7 +496,6 @@ public function upsertCollections(GeneratedModels\UpsertCollectionsRequest $requ } /** * Retrieve a threaded list of comments for a specific object (e.g., activity), with configurable depth, sorting, and pagination - * * * @param string $objectID * @param string $objectType @@ -579,7 +545,6 @@ public function getComments(string $objectID, string $objectType, int $depth, st } /** * Adds a comment to an object (e.g., activity) or a reply to an existing comment, and broadcasts appropriate events - * * * @param GeneratedModels\AddCommentRequest $requestData * @return StreamResponse @@ -594,7 +559,6 @@ public function addComment(GeneratedModels\AddCommentRequest $requestData): Stre } /** * Adds multiple comments in a single request. Each comment must specify the object type and ID. - * * * @param GeneratedModels\AddCommentsBatchRequest $requestData * @return StreamResponse @@ -609,7 +573,6 @@ public function addCommentsBatch(GeneratedModels\AddCommentsBatchRequest $reques } /** * Query comments using MongoDB-style filters with pagination and sorting options - * * * @param GeneratedModels\QueryCommentsRequest $requestData * @return StreamResponse @@ -624,7 +587,6 @@ public function queryComments(GeneratedModels\QueryCommentsRequest $requestData) } /** * Deletes a comment from an object (e.g., activity) and broadcasts appropriate events - * * * @param string $id * @param bool $hardDelete @@ -648,7 +610,6 @@ public function deleteComment(string $id, bool $hardDelete, bool $deleteNotifica } /** * Get a comment by ID - * * * @param string $id * @return StreamResponse @@ -664,7 +625,6 @@ public function getComment(string $id): StreamResponse { } /** * Updates a comment on an object (e.g., activity) and broadcasts appropriate events - * * * @param string $id * @param GeneratedModels\UpdateCommentRequest $requestData @@ -681,7 +641,6 @@ public function updateComment(string $id, GeneratedModels\UpdateCommentRequest $ } /** * Adds a reaction to a comment - * * * @param string $id * @param GeneratedModels\AddCommentReactionRequest $requestData @@ -698,7 +657,6 @@ public function addCommentReaction(string $id, GeneratedModels\AddCommentReactio } /** * Query comment reactions - * * * @param string $id * @param GeneratedModels\QueryCommentReactionsRequest $requestData @@ -715,7 +673,6 @@ public function queryCommentReactions(string $id, GeneratedModels\QueryCommentRe } /** * Deletes a reaction from a comment - * * * @param string $id * @param string $type @@ -741,7 +698,6 @@ public function deleteCommentReaction(string $id, string $type, bool $deleteNoti } /** * Retrieve a threaded list of replies for a single comment, with configurable depth, sorting, and pagination - * * * @param string $id * @param int $depth @@ -785,7 +741,6 @@ public function getCommentReplies(string $id, int $depth, string $sort, int $rep } /** * List all feed groups for the application - * * * @param bool $includeSoftDeleted * @return StreamResponse @@ -803,7 +758,6 @@ public function listFeedGroups(bool $includeSoftDeleted): StreamResponse { } /** * Creates a new feed group with the specified configuration - * * * @param GeneratedModels\CreateFeedGroupRequest $requestData * @return StreamResponse @@ -818,7 +772,6 @@ public function createFeedGroup(GeneratedModels\CreateFeedGroupRequest $requestD } /** * Delete a single feed by its ID - * * * @param string $feedGroupID * @param string $feedID @@ -840,7 +793,6 @@ public function deleteFeed(string $feedGroupID, string $feedID, bool $hardDelete } /** * Create a single feed for a given feed group - * * * @param string $feedGroupID * @param string $feedID @@ -859,7 +811,6 @@ public function getOrCreateFeed(string $feedGroupID, string $feedID, GeneratedMo } /** * Update an existing feed - * * * @param string $feedGroupID * @param string $feedID @@ -878,7 +829,6 @@ public function updateFeed(string $feedGroupID, string $feedID, GeneratedModels\ } /** * Mark activities as read/seen/watched. Can mark by timestamp (seen), activity IDs (read), or all as read. - * * * @param string $feedGroupID * @param string $feedID @@ -897,7 +847,6 @@ public function markActivity(string $feedGroupID, string $feedID, GeneratedModel } /** * Unpin an activity from a feed. This removes the pin, so the activity will no longer be displayed at the top of the feed. - * * * @param string $feedGroupID * @param string $feedID @@ -921,7 +870,6 @@ public function unpinActivity(string $feedGroupID, string $feedID, string $activ } /** * Pin an activity to a feed. Pinned activities are typically displayed at the top of a feed. - * * * @param string $feedGroupID * @param string $feedID @@ -942,7 +890,6 @@ public function pinActivity(string $feedGroupID, string $feedID, string $activit } /** * Add, remove, or set members for a feed - * * * @param string $feedGroupID * @param string $feedID @@ -961,7 +908,6 @@ public function updateFeedMembers(string $feedGroupID, string $feedID, Generated } /** * Accepts a pending feed member request - * * * @param string $feedID * @param string $feedGroupID @@ -980,7 +926,6 @@ public function acceptFeedMemberInvite(string $feedID, string $feedGroupID, Gene } /** * Query feed members based on filters with pagination and sorting options - * * * @param string $feedGroupID * @param string $feedID @@ -999,7 +944,6 @@ public function queryFeedMembers(string $feedGroupID, string $feedID, GeneratedM } /** * Rejects a pending feed member request - * * * @param string $feedGroupID * @param string $feedID @@ -1016,9 +960,26 @@ public function rejectFeedMemberInvite(string $feedGroupID, string $feedID, Gene // Use the provided request data array directly return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\RejectFeedMemberInviteResponse::class); } + /** + * Query pinned activities for a feed with filter query + * + * @param string $feedGroupID + * @param string $feedID + * @param GeneratedModels\QueryPinnedActivitiesRequest $requestData + * @return StreamResponse + * @throws StreamException + */ + public function queryPinnedActivities(string $feedGroupID, string $feedID, GeneratedModels\QueryPinnedActivitiesRequest $requestData): StreamResponse { + $path = '/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/pinned_activities/query'; + $path = str_replace('{feed_group_id}', (string) $feedGroupID, $path); + $path = str_replace('{feed_id}', (string) $feedID, $path); + + $queryParams = []; + // Use the provided request data array directly + return StreamResponse::fromJson($this->makeRequest('POST', $path, $queryParams, $requestData), GeneratedModels\QueryPinnedActivitiesResponse::class); + } /** * Get follow suggestions for a feed group - * * * @param string $feedGroupID * @param int $limit @@ -1042,7 +1003,6 @@ public function getFollowSuggestions(string $feedGroupID, int $limit, string $us } /** * Delete a feed group by its ID. Can perform a soft delete (default) or hard delete. - * * * @param string $id * @param bool $hardDelete @@ -1062,7 +1022,6 @@ public function deleteFeedGroup(string $id, bool $hardDelete): StreamResponse { } /** * Get a feed group by ID - * * * @param string $id * @param bool $includeSoftDeleted @@ -1082,7 +1041,6 @@ public function getFeedGroup(string $id, bool $includeSoftDeleted): StreamRespon } /** * Get an existing feed group or create a new one if it doesn't exist - * * * @param string $id * @param GeneratedModels\GetOrCreateFeedGroupRequest $requestData @@ -1099,7 +1057,6 @@ public function getOrCreateFeedGroup(string $id, GeneratedModels\GetOrCreateFeed } /** * Update a feed group by ID - * * * @param string $id * @param GeneratedModels\UpdateFeedGroupRequest $requestData @@ -1116,7 +1073,6 @@ public function updateFeedGroup(string $id, GeneratedModels\UpdateFeedGroupReque } /** * List all feed views for a feed group - * * * @return StreamResponse * @throws StreamException @@ -1130,7 +1086,6 @@ public function listFeedViews(): StreamResponse { } /** * Create a custom view for a feed group with specific selectors, ranking, or aggregation options - * * * @param GeneratedModels\CreateFeedViewRequest $requestData * @return StreamResponse @@ -1145,7 +1100,6 @@ public function createFeedView(GeneratedModels\CreateFeedViewRequest $requestDat } /** * Delete an existing custom feed view - * * * @param string $id * @return StreamResponse @@ -1161,7 +1115,6 @@ public function deleteFeedView(string $id): StreamResponse { } /** * Get a feed view by its ID - * * * @param string $id * @return StreamResponse @@ -1177,7 +1130,6 @@ public function getFeedView(string $id): StreamResponse { } /** * Get an existing feed view or create a new one if it doesn't exist - * * * @param string $id * @param GeneratedModels\GetOrCreateFeedViewRequest $requestData @@ -1194,7 +1146,6 @@ public function getOrCreateFeedView(string $id, GeneratedModels\GetOrCreateFeedV } /** * Update an existing custom feed view with new selectors, ranking, or aggregation options - * * * @param string $id * @param GeneratedModels\UpdateFeedViewRequest $requestData @@ -1211,7 +1162,6 @@ public function updateFeedView(string $id, GeneratedModels\UpdateFeedViewRequest } /** * Gets all available feed visibility configurations and their permissions - * * * @return StreamResponse * @throws StreamException @@ -1225,7 +1175,6 @@ public function listFeedVisibilities(): StreamResponse { } /** * Gets feed visibility configuration and permissions - * * * @param string $name * @return StreamResponse @@ -1241,7 +1190,6 @@ public function getFeedVisibility(string $name): StreamResponse { } /** * Updates an existing predefined feed visibility configuration - * * * @param string $name * @param GeneratedModels\UpdateFeedVisibilityRequest $requestData @@ -1258,7 +1206,6 @@ public function updateFeedVisibility(string $name, GeneratedModels\UpdateFeedVis } /** * Create multiple feeds at once for a given feed group - * * * @param GeneratedModels\CreateFeedsBatchRequest $requestData * @return StreamResponse @@ -1273,7 +1220,6 @@ public function createFeedsBatch(GeneratedModels\CreateFeedsBatchRequest $reques } /** * Delete multiple feeds by their IDs. All feeds must exist. This endpoint is server-side only. - * * * @param GeneratedModels\DeleteFeedsBatchRequest $requestData * @return StreamResponse @@ -1288,7 +1234,6 @@ public function deleteFeedsBatch(GeneratedModels\DeleteFeedsBatchRequest $reques } /** * Retrieves own_follows, own_capabilities, and/or own_membership for multiple feeds in a single request. If fields are not specified, all three fields are returned. - * * * @param GeneratedModels\OwnBatchRequest $requestData * @return StreamResponse @@ -1303,7 +1248,6 @@ public function ownBatch(GeneratedModels\OwnBatchRequest $requestData): StreamRe } /** * Query feeds with filter query - * * * @param GeneratedModels\QueryFeedsRequest $requestData * @return StreamResponse @@ -1319,7 +1263,6 @@ public function queryFeeds(GeneratedModels\QueryFeedsRequest $requestData): Stre /** * Retrieve current rate limit status for feeds operations. * Returns information about limits, usage, and remaining quota for various feed operations. - * * * @param string $endpoints * @param bool $android @@ -1353,7 +1296,6 @@ public function getFeedsRateLimits(string $endpoints, bool $android, bool $ios, } /** * Updates a follow's custom data, push preference, and follower role. Source owner can update custom data and push preference. Follower role can only be updated via server-side requests. - * * * @param GeneratedModels\UpdateFollowRequest $requestData * @return StreamResponse @@ -1368,7 +1310,6 @@ public function updateFollow(GeneratedModels\UpdateFollowRequest $requestData): } /** * Creates a follow and broadcasts FollowAddedEvent - * * * @param GeneratedModels\FollowRequest $requestData * @return StreamResponse @@ -1383,7 +1324,6 @@ public function follow(GeneratedModels\FollowRequest $requestData): StreamRespon } /** * Accepts a pending follow request - * * * @param GeneratedModels\AcceptFollowRequest $requestData * @return StreamResponse @@ -1398,7 +1338,6 @@ public function acceptFollow(GeneratedModels\AcceptFollowRequest $requestData): } /** * Creates multiple follows at once and broadcasts FollowAddedEvent for each follow - * * * @param GeneratedModels\FollowBatchRequest $requestData * @return StreamResponse @@ -1413,7 +1352,6 @@ public function followBatch(GeneratedModels\FollowBatchRequest $requestData): St } /** * Creates or updates multiple follows at once. Does not return an error if follows already exist. Broadcasts FollowAddedEvent only for newly created follows. - * * * @param GeneratedModels\FollowBatchRequest $requestData * @return StreamResponse @@ -1428,7 +1366,6 @@ public function getOrCreateFollows(GeneratedModels\FollowBatchRequest $requestDa } /** * Query follows based on filters with pagination and sorting options - * * * @param GeneratedModels\QueryFollowsRequest $requestData * @return StreamResponse @@ -1443,7 +1380,6 @@ public function queryFollows(GeneratedModels\QueryFollowsRequest $requestData): } /** * Rejects a pending follow request - * * * @param GeneratedModels\RejectFollowRequest $requestData * @return StreamResponse @@ -1458,7 +1394,6 @@ public function rejectFollow(GeneratedModels\RejectFollowRequest $requestData): } /** * Removes a follow and broadcasts FollowRemovedEvent - * * * @param string $source * @param string $target @@ -1480,7 +1415,6 @@ public function unfollow(string $source, string $target, bool $deleteNotificatio } /** * Create a new membership level with tag-based access controls - * * * @param GeneratedModels\CreateMembershipLevelRequest $requestData * @return StreamResponse @@ -1495,7 +1429,6 @@ public function createMembershipLevel(GeneratedModels\CreateMembershipLevelReque } /** * Query membership levels with filter query - * * * @param GeneratedModels\QueryMembershipLevelsRequest $requestData * @return StreamResponse @@ -1510,7 +1443,6 @@ public function queryMembershipLevels(GeneratedModels\QueryMembershipLevelsReque } /** * Delete a membership level by its UUID. This operation is irreversible. - * * * @param string $id * @return StreamResponse @@ -1526,7 +1458,6 @@ public function deleteMembershipLevel(string $id): StreamResponse { } /** * Update a membership level with partial updates. Only specified fields will be updated. - * * * @param string $id * @param GeneratedModels\UpdateMembershipLevelRequest $requestData @@ -1545,7 +1476,6 @@ public function updateMembershipLevel(string $id, GeneratedModels\UpdateMembersh * Retrieve usage statistics for feeds including activity count, follow count, and API request count. * Returns data aggregated by day with pagination support via from/to date parameters. * This endpoint is server-side only. - * * * @param GeneratedModels\QueryFeedsUsageStatsRequest $requestData * @return StreamResponse @@ -1560,7 +1490,6 @@ public function queryFeedsUsageStats(GeneratedModels\QueryFeedsUsageStatsRequest } /** * Removes multiple follows at once and broadcasts FollowRemovedEvent for each one - * * * @param GeneratedModels\UnfollowBatchRequest $requestData * @return StreamResponse @@ -1575,7 +1504,6 @@ public function unfollowBatch(GeneratedModels\UnfollowBatchRequest $requestData) } /** * Removes multiple follows and broadcasts FollowRemovedEvent for each. Does not return an error if follows don't exist. - * * * @param GeneratedModels\UnfollowBatchRequest $requestData * @return StreamResponse @@ -1590,7 +1518,6 @@ public function getOrCreateUnfollows(GeneratedModels\UnfollowBatchRequest $reque } /** * Delete all feed data for a user including: feeds, activities, follows, comments, feed reactions, bookmark folders, bookmarks, and collections owned by the user - * * * @param string $userID * @param GeneratedModels\DeleteFeedUserDataRequest $requestData @@ -1607,7 +1534,6 @@ public function deleteFeedUserData(string $userID, GeneratedModels\DeleteFeedUse } /** * Export all feed data for a user including: user profile, feeds, activities, follows, comments, feed reactions, bookmark folders, bookmarks, and collections owned by the user - * * * @param string $userID * @return StreamResponse diff --git a/src/Generated/ModerationTrait.php b/src/Generated/ModerationTrait.php index 91c04f67..b8501ca2 100644 --- a/src/Generated/ModerationTrait.php +++ b/src/Generated/ModerationTrait.php @@ -16,7 +16,6 @@ trait ModerationTrait { /** * Appeal against the moderation decision - * * * @param GeneratedModels\AppealRequest $requestData * @return StreamResponse @@ -31,7 +30,6 @@ public function appeal(GeneratedModels\AppealRequest $requestData): StreamRespon } /** * Retrieve a specific appeal item by its ID - * * * @param string $id * @return StreamResponse @@ -47,7 +45,6 @@ public function getAppeal(string $id): StreamResponse { } /** * Query Appeals - * * * @param GeneratedModels\QueryAppealsRequest $requestData * @return StreamResponse @@ -62,7 +59,6 @@ public function queryAppeals(GeneratedModels\QueryAppealsRequest $requestData): } /** * Ban a user from a channel or the entire app - * * * @param GeneratedModels\BanRequest $requestData * @return StreamResponse @@ -77,7 +73,6 @@ public function ban(GeneratedModels\BanRequest $requestData): StreamResponse { } /** * Moderate multiple images in bulk using a CSV file - * * * @param GeneratedModels\BulkImageModerationRequest $requestData * @return StreamResponse @@ -92,7 +87,6 @@ public function bulkImageModeration(GeneratedModels\BulkImageModerationRequest $ } /** * Run moderation checks on the provided content - * * * @param GeneratedModels\CheckRequest $requestData * @return StreamResponse @@ -107,7 +101,6 @@ public function check(GeneratedModels\CheckRequest $requestData): StreamResponse } /** * Create a new moderation configuration or update an existing one. Configure settings for content filtering, AI analysis, toxicity detection, and other moderation features. - * * * @param GeneratedModels\UpsertConfigRequest $requestData * @return StreamResponse @@ -122,7 +115,6 @@ public function upsertConfig(GeneratedModels\UpsertConfigRequest $requestData): } /** * Delete a specific moderation policy by its name - * * * @param string $key * @param string $team @@ -142,7 +134,6 @@ public function deleteConfig(string $key, string $team): StreamResponse { } /** * Retrieve a specific moderation configuration by its key and team. This configuration contains settings for various moderation features like toxicity detection, AI analysis, and filtering rules. - * * * @param string $key * @param string $team @@ -162,7 +153,6 @@ public function getConfig(string $key, string $team): StreamResponse { } /** * Search and filter moderation configurations across your application. This endpoint is designed for building moderation dashboards and managing multiple configuration sets. - * * * @param GeneratedModels\QueryModerationConfigsRequest $requestData * @return StreamResponse @@ -177,7 +167,6 @@ public function queryModerationConfigs(GeneratedModels\QueryModerationConfigsReq } /** * Custom check, add your own AI model reports to the review queue - * * * @param GeneratedModels\CustomCheckRequest $requestData * @return StreamResponse @@ -192,7 +181,6 @@ public function customCheck(GeneratedModels\CustomCheckRequest $requestData): St } /** * Delete a specific moderation template by its name - * * * @return StreamResponse * @throws StreamException @@ -206,7 +194,6 @@ public function v2DeleteTemplate(): StreamResponse { } /** * Retrieve a list of feed moderation templates that define preset moderation rules and configurations. Limited to 100 templates per request. - * * * @return StreamResponse * @throws StreamException @@ -220,7 +207,6 @@ public function v2QueryTemplates(): StreamResponse { } /** * Upsert feeds template for moderation - * * * @param GeneratedModels\UpsertModerationTemplateRequest $requestData * @return StreamResponse @@ -235,7 +221,6 @@ public function v2UpsertTemplate(GeneratedModels\UpsertModerationTemplateRequest } /** * Flag any type of content (messages, users, channels, activities) for moderation review. Supports custom content types and additional metadata for flagged content. - * * * @param GeneratedModels\FlagRequest $requestData * @return StreamResponse @@ -250,7 +235,6 @@ public function flag(GeneratedModels\FlagRequest $requestData): StreamResponse { } /** * Query flags associated with moderation items. This is used for building a moderation dashboard. - * * * @param GeneratedModels\QueryModerationFlagsRequest $requestData * @return StreamResponse @@ -265,7 +249,6 @@ public function queryModerationFlags(GeneratedModels\QueryModerationFlagsRequest } /** * Search and filter moderation action logs with support for pagination. View the history of moderation actions taken, including who performed them and when. - * * * @param GeneratedModels\QueryModerationLogsRequest $requestData * @return StreamResponse @@ -280,7 +263,6 @@ public function queryModerationLogs(GeneratedModels\QueryModerationLogsRequest $ } /** * Create or update a moderation rule that can apply app-wide or to specific moderation configs - * * * @param GeneratedModels\UpsertModerationRuleRequest $requestData * @return StreamResponse @@ -295,7 +277,6 @@ public function upsertModerationRule(GeneratedModels\UpsertModerationRuleRequest } /** * Delete an existing moderation rule - * * * @return StreamResponse * @throws StreamException @@ -309,7 +290,6 @@ public function deleteModerationRule(): StreamResponse { } /** * Get a specific moderation rule by ID - * * * @return StreamResponse * @throws StreamException @@ -323,7 +303,6 @@ public function getModerationRule(): StreamResponse { } /** * Search and filter moderation rules across your application. This endpoint is designed for building moderation dashboards and managing multiple rule sets. - * * * @param GeneratedModels\QueryModerationRulesRequest $requestData * @return StreamResponse @@ -338,7 +317,6 @@ public function queryModerationRules(GeneratedModels\QueryModerationRulesRequest } /** * Mute a user. Mutes are generally not visible to the user you mute, while block is something you notice. - * * * @param GeneratedModels\MuteRequest $requestData * @return StreamResponse @@ -353,7 +331,6 @@ public function mute(GeneratedModels\MuteRequest $requestData): StreamResponse { } /** * Query review queue items allows you to filter the review queue items. This is used for building a moderation dashboard. - * * * @param GeneratedModels\QueryReviewQueueRequest $requestData * @return StreamResponse @@ -368,7 +345,6 @@ public function queryReviewQueue(GeneratedModels\QueryReviewQueueRequest $reques } /** * Retrieve a specific review queue item by its ID - * * * @param string $id * @return StreamResponse @@ -384,7 +360,6 @@ public function getReviewQueueItem(string $id): StreamResponse { } /** * Take action on flagged content, such as marking content as safe, deleting content, banning users, or executing custom moderation actions. Supports various action types with configurable parameters. - * * * @param GeneratedModels\SubmitActionRequest $requestData * @return StreamResponse @@ -399,7 +374,6 @@ public function submitAction(GeneratedModels\SubmitActionRequest $requestData): } /** * Unban a user from a channel or globally. - * * * @param string $targetUserID * @param string $channelCid @@ -426,7 +400,6 @@ public function unban(string $targetUserID, string $channelCid, string $createdB } /** * Unmute a user - * * * @param GeneratedModels\UnmuteRequest $requestData * @return StreamResponse diff --git a/src/Generated/Webhook.php b/src/Generated/Webhook.php new file mode 100644 index 00000000..8b6bc855 --- /dev/null +++ b/src/Generated/Webhook.php @@ -0,0 +1,569 @@ +getMessage(), 0, $e); + } + } + + private static function parseToArray(mixed $rawEvent): array + { + if (is_array($rawEvent)) { + return $rawEvent; + } + + if (is_string($rawEvent)) { + $decoded = json_decode($rawEvent, true); + if (json_last_error() !== JSON_ERROR_NONE) { + throw new \InvalidArgumentException('Invalid JSON in webhook payload: ' . json_last_error_msg()); + } + return $decoded; + } + + throw new \InvalidArgumentException('Webhook payload must be a string or array'); + } + + private static function getEventClass(string $eventType): ?string + { + $eventClassMap = [ + '*' => CustomEvent::class, + 'appeal.accepted' => AppealAcceptedEvent::class, + 'appeal.created' => AppealCreatedEvent::class, + 'appeal.rejected' => AppealRejectedEvent::class, + 'call.accepted' => CallAcceptedEvent::class, + 'call.blocked_user' => BlockedUserEvent::class, + 'call.closed_caption' => ClosedCaptionEvent::class, + 'call.closed_captions_failed' => CallClosedCaptionsFailedEvent::class, + 'call.closed_captions_started' => CallClosedCaptionsStartedEvent::class, + 'call.closed_captions_stopped' => CallClosedCaptionsStoppedEvent::class, + 'call.created' => CallCreatedEvent::class, + 'call.deleted' => CallDeletedEvent::class, + 'call.dtmf' => CallDTMFEvent::class, + 'call.ended' => CallEndedEvent::class, + 'call.frame_recording_failed' => CallFrameRecordingFailedEvent::class, + 'call.frame_recording_ready' => CallFrameRecordingFrameReadyEvent::class, + 'call.frame_recording_started' => CallFrameRecordingStartedEvent::class, + 'call.frame_recording_stopped' => CallFrameRecordingStoppedEvent::class, + 'call.hls_broadcasting_failed' => CallHLSBroadcastingFailedEvent::class, + 'call.hls_broadcasting_started' => CallHLSBroadcastingStartedEvent::class, + 'call.hls_broadcasting_stopped' => CallHLSBroadcastingStoppedEvent::class, + 'call.kicked_user' => KickedUserEvent::class, + 'call.live_started' => CallLiveStartedEvent::class, + 'call.member_added' => CallMemberAddedEvent::class, + 'call.member_removed' => CallMemberRemovedEvent::class, + 'call.member_updated' => CallMemberUpdatedEvent::class, + 'call.member_updated_permission' => CallMemberUpdatedPermissionEvent::class, + 'call.missed' => CallMissedEvent::class, + 'call.moderation_blur' => CallModerationBlurEvent::class, + 'call.moderation_warning' => CallModerationWarningEvent::class, + 'call.notification' => CallNotificationEvent::class, + 'call.permission_request' => PermissionRequestEvent::class, + 'call.permissions_updated' => UpdatedCallPermissionsEvent::class, + 'call.reaction_new' => CallReactionEvent::class, + 'call.recording_failed' => CallRecordingFailedEvent::class, + 'call.recording_ready' => CallRecordingReadyEvent::class, + 'call.recording_started' => CallRecordingStartedEvent::class, + 'call.recording_stopped' => CallRecordingStoppedEvent::class, + 'call.rejected' => CallRejectedEvent::class, + 'call.ring' => CallRingEvent::class, + 'call.rtmp_broadcast_failed' => CallRtmpBroadcastFailedEvent::class, + 'call.rtmp_broadcast_started' => CallRtmpBroadcastStartedEvent::class, + 'call.rtmp_broadcast_stopped' => CallRtmpBroadcastStoppedEvent::class, + 'call.session_ended' => CallSessionEndedEvent::class, + 'call.session_participant_count_updated' => CallSessionParticipantCountsUpdatedEvent::class, + 'call.session_participant_joined' => CallSessionParticipantJoinedEvent::class, + 'call.session_participant_left' => CallSessionParticipantLeftEvent::class, + 'call.session_started' => CallSessionStartedEvent::class, + 'call.stats_report_ready' => CallStatsReportReadyEvent::class, + 'call.transcription_failed' => CallTranscriptionFailedEvent::class, + 'call.transcription_ready' => CallTranscriptionReadyEvent::class, + 'call.transcription_started' => CallTranscriptionStartedEvent::class, + 'call.transcription_stopped' => CallTranscriptionStoppedEvent::class, + 'call.unblocked_user' => UnblockedUserEvent::class, + 'call.updated' => CallUpdatedEvent::class, + 'call.user_feedback_submitted' => CallUserFeedbackSubmittedEvent::class, + 'call.user_muted' => CallUserMutedEvent::class, + 'campaign.completed' => CampaignCompletedEvent::class, + 'campaign.started' => CampaignStartedEvent::class, + 'channel.created' => ChannelCreatedEvent::class, + 'channel.deleted' => ChannelDeletedEvent::class, + 'channel.frozen' => ChannelFrozenEvent::class, + 'channel.hidden' => ChannelHiddenEvent::class, + 'channel.max_streak_changed' => MaxStreakChangedEvent::class, + 'channel.muted' => ChannelMutedEvent::class, + 'channel.truncated' => ChannelTruncatedEvent::class, + 'channel.unfrozen' => ChannelUnFrozenEvent::class, + 'channel.unmuted' => ChannelUnmutedEvent::class, + 'channel.updated' => ChannelUpdatedEvent::class, + 'channel.visible' => ChannelVisibleEvent::class, + 'channel_batch_update.completed' => ChannelBatchCompletedEvent::class, + 'channel_batch_update.started' => ChannelBatchStartedEvent::class, + 'custom' => CustomVideoEvent::class, + 'export.bulk_image_moderation.error' => AsyncExportErrorEvent::class, + 'export.bulk_image_moderation.success' => AsyncBulkImageModerationEvent::class, + 'export.channels.error' => AsyncExportErrorEvent::class, + 'export.channels.success' => AsyncExportChannelsEvent::class, + 'export.moderation_logs.error' => AsyncExportErrorEvent::class, + 'export.moderation_logs.success' => AsyncExportModerationLogsEvent::class, + 'export.users.error' => AsyncExportErrorEvent::class, + 'export.users.success' => AsyncExportUsersEvent::class, + 'feeds.activity.added' => ActivityAddedEvent::class, + 'feeds.activity.deleted' => ActivityDeletedEvent::class, + 'feeds.activity.feedback' => ActivityFeedbackEvent::class, + 'feeds.activity.marked' => ActivityMarkEvent::class, + 'feeds.activity.pinned' => ActivityPinnedEvent::class, + 'feeds.activity.reaction.added' => ActivityReactionAddedEvent::class, + 'feeds.activity.reaction.deleted' => ActivityReactionDeletedEvent::class, + 'feeds.activity.reaction.updated' => ActivityReactionUpdatedEvent::class, + 'feeds.activity.removed_from_feed' => ActivityRemovedFromFeedEvent::class, + 'feeds.activity.restored' => ActivityRestoredEvent::class, + 'feeds.activity.unpinned' => ActivityUnpinnedEvent::class, + 'feeds.activity.updated' => ActivityUpdatedEvent::class, + 'feeds.bookmark.added' => BookmarkAddedEvent::class, + 'feeds.bookmark.deleted' => BookmarkDeletedEvent::class, + 'feeds.bookmark.updated' => BookmarkUpdatedEvent::class, + 'feeds.bookmark_folder.deleted' => BookmarkFolderDeletedEvent::class, + 'feeds.bookmark_folder.updated' => BookmarkFolderUpdatedEvent::class, + 'feeds.comment.added' => CommentAddedEvent::class, + 'feeds.comment.deleted' => CommentDeletedEvent::class, + 'feeds.comment.reaction.added' => CommentReactionAddedEvent::class, + 'feeds.comment.reaction.deleted' => CommentReactionDeletedEvent::class, + 'feeds.comment.reaction.updated' => CommentReactionUpdatedEvent::class, + 'feeds.comment.updated' => CommentUpdatedEvent::class, + 'feeds.feed.created' => FeedCreatedEvent::class, + 'feeds.feed.deleted' => FeedDeletedEvent::class, + 'feeds.feed.updated' => FeedUpdatedEvent::class, + 'feeds.feed_group.changed' => FeedGroupChangedEvent::class, + 'feeds.feed_group.deleted' => FeedGroupDeletedEvent::class, + 'feeds.feed_member.added' => FeedMemberAddedEvent::class, + 'feeds.feed_member.removed' => FeedMemberRemovedEvent::class, + 'feeds.feed_member.updated' => FeedMemberUpdatedEvent::class, + 'feeds.follow.created' => FollowCreatedEvent::class, + 'feeds.follow.deleted' => FollowDeletedEvent::class, + 'feeds.follow.updated' => FollowUpdatedEvent::class, + 'feeds.notification_feed.updated' => NotificationFeedUpdatedEvent::class, + 'feeds.stories_feed.updated' => StoriesFeedUpdatedEvent::class, + 'flag.updated' => FlagUpdatedEvent::class, + 'ingress.error' => IngressErrorEvent::class, + 'ingress.started' => IngressStartedEvent::class, + 'ingress.stopped' => IngressStoppedEvent::class, + 'member.added' => MemberAddedEvent::class, + 'member.removed' => MemberRemovedEvent::class, + 'member.updated' => MemberUpdatedEvent::class, + 'message.deleted' => MessageDeletedEvent::class, + 'message.flagged' => MessageFlaggedEvent::class, + 'message.new' => MessageNewEvent::class, + 'message.pending' => PendingMessageEvent::class, + 'message.read' => MessageReadEvent::class, + 'message.unblocked' => MessageUnblockedEvent::class, + 'message.undeleted' => MessageUndeletedEvent::class, + 'message.updated' => MessageUpdatedEvent::class, + 'moderation.custom_action' => ModerationCustomActionEvent::class, + 'moderation.flagged' => ModerationFlaggedEvent::class, + 'moderation.mark_reviewed' => ModerationMarkReviewedEvent::class, + 'moderation_check.completed' => ModerationCheckCompletedEvent::class, + 'moderation_rule.triggered' => ModerationRulesTriggeredEvent::class, + 'notification.mark_unread' => NotificationMarkUnreadEvent::class, + 'notification.reminder_due' => ReminderNotificationEvent::class, + 'notification.thread_message_new' => NotificationThreadMessageNewEvent::class, + 'reaction.deleted' => ReactionDeletedEvent::class, + 'reaction.new' => ReactionNewEvent::class, + 'reaction.updated' => ReactionUpdatedEvent::class, + 'reminder.created' => ReminderCreatedEvent::class, + 'reminder.deleted' => ReminderDeletedEvent::class, + 'reminder.updated' => ReminderUpdatedEvent::class, + 'review_queue_item.new' => ReviewQueueItemNewEvent::class, + 'review_queue_item.updated' => ReviewQueueItemUpdatedEvent::class, + 'thread.updated' => ThreadUpdatedEvent::class, + 'user.banned' => UserBannedEvent::class, + 'user.deactivated' => UserDeactivatedEvent::class, + 'user.deleted' => UserDeletedEvent::class, + 'user.flagged' => UserFlaggedEvent::class, + 'user.messages.deleted' => UserMessagesDeletedEvent::class, + 'user.muted' => UserMutedEvent::class, + 'user.reactivated' => UserReactivatedEvent::class, + 'user.unbanned' => UserUnbannedEvent::class, + 'user.unmuted' => UserUnmutedEvent::class, + 'user.unread_message_reminder' => UserUnreadReminderEvent::class, + 'user.updated' => UserUpdatedEvent::class, + ]; + + return $eventClassMap[$eventType] ?? null; + } + + /** + * Verify the HMAC-SHA256 signature of a webhook payload. + * + * @param string $body The raw request body + * @param string $signature The signature from the X-Signature header + * @param string $secret Your webhook secret (found in the Stream Dashboard) + * @return bool true if the signature is valid, false otherwise + */ + public static function verifySignature(string $body, string $signature, string $secret): bool + { + $expected = hash_hmac('sha256', $body, $secret); + return hash_equals($signature, $expected); + } +} diff --git a/src/GeneratedModels/AIImageConfig.php b/src/GeneratedModels/AIImageConfig.php index 498715ab..072b9a30 100644 --- a/src/GeneratedModels/AIImageConfig.php +++ b/src/GeneratedModels/AIImageConfig.php @@ -3,25 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $async - * @property bool|null $enabled - * @property array|null $ocrRules - * @property array|null $rules - */ class AIImageConfig extends BaseModel { public function __construct( public ?bool $async = null, public ?bool $enabled = null, - /** @var array|null */ - #[ArrayOf(OCRRule::class)] - public ?array $ocrRules = null, /** @var array|null */ #[ArrayOf(AWSRekognitionRule::class)] public ?array $rules = null, + /** @var array|null */ + #[ArrayOf(OCRRule::class)] + public ?array $ocrRules = null, ) { } diff --git a/src/GeneratedModels/AITextConfig.php b/src/GeneratedModels/AITextConfig.php index a06bb647..de69a482 100644 --- a/src/GeneratedModels/AITextConfig.php +++ b/src/GeneratedModels/AITextConfig.php @@ -3,15 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $async - * @property bool|null $enabled - * @property string|null $profile - * @property array|null $rules - * @property array|null $severityRules - */ class AITextConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/AIVideoConfig.php b/src/GeneratedModels/AIVideoConfig.php index 030e09d3..40ba94cf 100644 --- a/src/GeneratedModels/AIVideoConfig.php +++ b/src/GeneratedModels/AIVideoConfig.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $async - * @property bool|null $enabled - * @property array|null $rules - */ class AIVideoConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/APIError.php b/src/GeneratedModels/APIError.php index b7e81e6a..6654dffe 100644 --- a/src/GeneratedModels/APIError.php +++ b/src/GeneratedModels/APIError.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $code - * @property string $duration - * @property string $message - * @property string $moreInfo - * @property int $statusCode - * @property array $details - * @property bool|null $unrecoverable - * @property array|null $exceptionFields - */ class APIError extends BaseModel { public function __construct( public ?int $code = null, // API error code - public ?string $duration = null, // Request duration public ?string $message = null, // Message describing an error - public ?string $moreInfo = null, // URL with additional information + public ?array $exceptionFields = null, // Additional error info public ?int $statusCode = null, // Response HTTP status code + public ?string $duration = null, // Request duration + public ?string $moreInfo = null, // URL with additional information public ?array $details = null, // Additional error-specific information public ?bool $unrecoverable = null, // Flag that indicates if the error is unrecoverable, requests that return unrecoverable errors should not be retried, this error only applies to the request that caused it - public ?array $exceptionFields = null, // Additional error info ) { } diff --git a/src/GeneratedModels/APNConfig.php b/src/GeneratedModels/APNConfig.php index a081d299..fefcf07d 100644 --- a/src/GeneratedModels/APNConfig.php +++ b/src/GeneratedModels/APNConfig.php @@ -3,33 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $authKey - * @property string|null $authType - * @property string|null $bundleID - * @property bool|null $development - * @property bool|null $disabled - * @property string|null $host - * @property string|null $keyID - * @property string|null $notificationTemplate - * @property string|null $p12Cert - * @property string|null $teamID - */ class APNConfig extends BaseModel { public function __construct( - public ?string $authKey = null, public ?string $authType = null, - public ?string $bundleID = null, public ?bool $development = null, - public ?bool $disabled = null, public ?string $host = null, + public ?string $bundleID = null, + public ?bool $disabled = null, + public ?string $authKey = null, public ?string $keyID = null, - public ?string $notificationTemplate = null, - public ?string $p12Cert = null, public ?string $teamID = null, + public ?string $p12Cert = null, + public ?string $notificationTemplate = null, ) { } diff --git a/src/GeneratedModels/APNConfigFields.php b/src/GeneratedModels/APNConfigFields.php index decd5db2..1dd04d00 100644 --- a/src/GeneratedModels/APNConfigFields.php +++ b/src/GeneratedModels/APNConfigFields.php @@ -3,33 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $development - * @property bool $enabled - * @property string|null $authKey - * @property string|null $authType - * @property string|null $bundleID - * @property string|null $host - * @property string|null $keyID - * @property string|null $notificationTemplate - * @property string|null $p12Cert - * @property string|null $teamID - */ class APNConfigFields extends BaseModel { public function __construct( - public ?bool $development = null, public ?bool $enabled = null, - public ?string $authKey = null, + public ?bool $development = null, public ?string $authType = null, - public ?string $bundleID = null, + public ?string $notificationTemplate = null, public ?string $host = null, + public ?string $bundleID = null, + public ?string $teamID = null, public ?string $keyID = null, - public ?string $notificationTemplate = null, + public ?string $authKey = null, public ?string $p12Cert = null, - public ?string $teamID = null, ) { } diff --git a/src/GeneratedModels/APNS.php b/src/GeneratedModels/APNS.php index 88f98e02..90e22164 100644 --- a/src/GeneratedModels/APNS.php +++ b/src/GeneratedModels/APNS.php @@ -3,24 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $body - * @property string $title - * @property int|null $contentAvailable - * @property int|null $mutableContent - * @property string|null $sound - * @property object|null $data - */ class APNS extends BaseModel { public function __construct( - public ?string $body = null, public ?string $title = null, + public ?string $body = null, + public ?string $sound = null, public ?int $contentAvailable = null, public ?int $mutableContent = null, - public ?string $sound = null, public ?object $data = null, ) { } diff --git a/src/GeneratedModels/APNSPayload.php b/src/GeneratedModels/APNSPayload.php new file mode 100644 index 00000000..bd154c2e --- /dev/null +++ b/src/GeneratedModels/APNSPayload.php @@ -0,0 +1,20 @@ +|null $attachments - * @property array|null $collectionRefs - * @property array|null $filterTags - * @property array|null $interestTags - * @property array|null $mentionedUserIds - * @property object|null $custom - * @property ActivityLocation|null $location - * @property object|null $searchData - */ class ActivityRequest extends BaseModel { public function __construct( + public ?string $id = null, // Optional ID for the activity public ?string $type = null, // Type of activity + public ?string $userID = null, // ID of the user creating the activity public ?array $feeds = null, // List of feeds to add the activity to with a default max limit of 25 feeds - public ?bool $createNotificationActivity = null, // Whether to create notification activities for mentioned users - public ?string $expiresAt = null, // Expiration time for the activity - public ?string $id = null, // Optional ID for the activity - public ?string $parentID = null, // ID of parent activity for replies/comments - public ?string $pollID = null, // ID of a poll to attach to activity - public ?string $restrictReplies = null, // Controls who can add comments/replies to this activity. Options: 'everyone' (default - anyone can reply), 'people_i_follow' (only people the activity creator follows can reply), 'nobody' (no one can reply) - public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for the activity - public ?bool $skipPush = null, // Whether to skip push notifications public ?string $text = null, // Text content of the activity - public ?string $userID = null, // ID of the user creating the activity - public ?string $visibility = null, // Visibility setting for the activity - public ?string $visibilityTag = null, // If visibility is 'tag', this is the tag name and is required - /** @var array|null List of attachments for the activity */ + /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, // List of attachments for the activity - public ?array $collectionRefs = null, // Collections that this activity references + public ?string $visibility = null, // Visibility setting for the activity. One of: public, private, tag + public ?string $visibilityTag = null, // If visibility is 'tag', this is the tag name and is required + public ?string $restrictReplies = null, // Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody + public ?ActivityLocation $location = null, + public ?string $expiresAt = null, // Expiration time for the activity + public ?array $mentionedUserIds = null, // List of users mentioned in the activity + public ?object $searchData = null, // Additional data for search indexing public ?array $filterTags = null, // Tags for filtering activities public ?array $interestTags = null, // Tags for indicating user interests - public ?array $mentionedUserIds = null, // List of users mentioned in the activity + public ?array $collectionRefs = null, // Collections that this activity references + public ?string $parentID = null, // ID of parent activity for replies/comments + public ?string $pollID = null, // ID of a poll to attach to activity public ?object $custom = null, // Custom data for the activity - public ?ActivityLocation $location = null, - public ?object $searchData = null, // Additional data for search indexing + public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for the activity + public ?bool $createNotificationActivity = null, // Whether to create notification activities for mentioned users + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) + public ?bool $skipPush = null, // Whether to skip push notifications ) { } diff --git a/src/GeneratedModels/ActivityResponse.php b/src/GeneratedModels/ActivityResponse.php index 27feba82..1b14b3a1 100644 --- a/src/GeneratedModels/ActivityResponse.php +++ b/src/GeneratedModels/ActivityResponse.php @@ -3,109 +3,71 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $bookmarkCount - * @property int $commentCount - * @property \DateTime $createdAt - * @property bool $hidden - * @property string $id - * @property int $popularity - * @property bool $preview - * @property int $reactionCount - * @property string $restrictReplies - * @property int $score - * @property int $shareCount - * @property string $type - * @property \DateTime $updatedAt - * @property string $visibility - * @property array $attachments - * @property array $comments - * @property array $feeds - * @property array $filterTags - * @property array $interestTags - * @property array $latestReactions - * @property array $mentionedUsers - * @property array $ownBookmarks - * @property array $ownReactions - * @property array $collections - * @property object $custom - * @property array $reactionGroups - * @property object $searchData - * @property UserResponse $user - * @property \DateTime|null $deletedAt - * @property \DateTime|null $editedAt - * @property \DateTime|null $expiresAt - * @property bool|null $isWatched - * @property string|null $moderationAction - * @property string|null $selectorSource - * @property string|null $text - * @property string|null $visibilityTag - * @property FeedResponse|null $currentFeed - * @property ActivityLocation|null $location - * @property ModerationV2Response|null $moderation - * @property NotificationContext|null $notificationContext - * @property ActivityResponse|null $parent - * @property PollResponseData|null $poll - */ class ActivityResponse extends BaseModel { public function __construct( - public ?int $bookmarkCount = null, // Number of bookmarks on the activity - public ?int $commentCount = null, // Number of comments on the activity - public ?\DateTime $createdAt = null, // When the activity was created - public ?bool $hidden = null, // If this activity is hidden by this user (using activity feedback) public ?string $id = null, // Unique identifier for the activity - public ?int $popularity = null, // Popularity score of the activity - public ?bool $preview = null, // If this activity is obfuscated for this user. For premium content where you want to show a preview - public ?int $reactionCount = null, // Number of reactions to the activity - public ?string $restrictReplies = null, // Controls who can reply to this activity. Values: everyone, people_i_follow, nobody - public ?int $score = null, // Ranking score for this activity - public ?int $shareCount = null, // Number of times the activity was shared public ?string $type = null, // Type of activity + public ?UserResponse $user = null, + public ?array $feeds = null, // List of feed IDs containing this activity + public ?string $visibility = null, // Visibility setting for the activity. One of: public, private, tag + public ?string $visibilityTag = null, // If visibility is 'tag', this is the tag name + public ?string $restrictReplies = null, // Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody + public ?\DateTime $createdAt = null, // When the activity was created public ?\DateTime $updatedAt = null, // When the activity was last updated - public ?string $visibility = null, // Visibility setting for the activity - /** @var array|null Media attachments for the activity */ + /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, // Media attachments for the activity - /** @var array|null Latest 5 comments of this activity (comment replies excluded) */ + /** @var array|null */ + #[ArrayOf(UserResponse::class)] + public ?array $mentionedUsers = null, // Users mentioned in the activity + public ?object $custom = null, // Custom data for the activity + public ?NotificationContext $notificationContext = null, + public ?int $popularity = null, // Popularity score of the activity + public ?int $score = null, // Ranking score for this activity + public ?string $selectorSource = null, // Which activity selector provided this activity (e.g., 'following', 'popular', 'interest'). Only set when using multiple activity selectors with ranking. + /** @var array|null */ #[ArrayOf(CommentResponse::class)] public ?array $comments = null, // Latest 5 comments of this activity (comment replies excluded) - public ?array $feeds = null, // List of feed IDs containing this activity + public ?string $text = null, // Text content of the activity + public ?ActivityLocation $location = null, + public ?ActivityResponse $parent = null, + public ?PollResponseData $poll = null, + public ?\DateTime $editedAt = null, // When the activity was last edited + public ?\DateTime $deletedAt = null, // When the activity was deleted + public ?\DateTime $expiresAt = null, // When the activity will expire + public ?object $searchData = null, // Data for search indexing public ?array $filterTags = null, // Tags for filtering public ?array $interestTags = null, // Tags for user interests - /** @var array|null Recent reactions to the activity */ + public ?ModerationV2Response $moderation = null, + public ?string $moderationAction = null, + public ?int $commentCount = null, // Number of comments on the activity + public ?int $bookmarkCount = null, // Number of bookmarks on the activity + public ?int $shareCount = null, // Number of times the activity was shared + public ?int $reactionCount = null, // Number of reactions to the activity + /** @var array|null */ #[ArrayOf(FeedsReactionResponse::class)] public ?array $latestReactions = null, // Recent reactions to the activity - /** @var array|null Users mentioned in the activity */ - #[ArrayOf(UserResponse::class)] - public ?array $mentionedUsers = null, // Users mentioned in the activity - /** @var array|null Current user's bookmarks for this activity */ - #[ArrayOf(BookmarkResponse::class)] - public ?array $ownBookmarks = null, // Current user's bookmarks for this activity - /** @var array|null Current user's reactions to this activity */ + /** @var array|null */ + #[MapOf(FeedsReactionGroupResponse::class)] + public ?array $reactionGroups = null, // Grouped reactions by type + /** @var array|null */ #[ArrayOf(FeedsReactionResponse::class)] public ?array $ownReactions = null, // Current user's reactions to this activity + /** @var array|null */ + #[ArrayOf(BookmarkResponse::class)] + public ?array $ownBookmarks = null, // Current user's bookmarks for this activity + /** @var array|null */ + #[MapOf(EnrichedCollectionResponse::class)] public ?array $collections = null, // Enriched collection data referenced by this activity - public ?object $custom = null, // Custom data for the activity - public ?array $reactionGroups = null, // Grouped reactions by type - public ?object $searchData = null, // Data for search indexing - public ?UserResponse $user = null, - public ?\DateTime $deletedAt = null, // When the activity was deleted - public ?\DateTime $editedAt = null, // When the activity was last edited - public ?\DateTime $expiresAt = null, // When the activity will expire - public ?bool $isWatched = null, - public ?string $moderationAction = null, - public ?string $selectorSource = null, // Which activity selector provided this activity (e.g., 'following', 'popular', 'interest'). Only set when using multiple activity selectors with ranking. - public ?string $text = null, // Text content of the activity - public ?string $visibilityTag = null, // If visibility is 'tag', this is the tag name + /** @var array|null */ + #[ArrayOf(FeedsReactionResponse::class)] + public ?array $friendReactions = null, // Reactions from users the current user follows or has mutual follows with + public ?int $friendReactionCount = null, // Total count of reactions from friends on this activity public ?FeedResponse $currentFeed = null, - public ?ActivityLocation $location = null, - public ?ModerationV2Response $moderation = null, - public ?NotificationContext $notificationContext = null, - public ?ActivityResponse $parent = null, - public ?PollResponseData $poll = null, + public ?bool $hidden = null, // If this activity is hidden by this user (using activity feedback) + public ?bool $preview = null, // If this activity is obfuscated for this user. For premium content where you want to show a preview + public ?bool $isWatched = null, ) { } diff --git a/src/GeneratedModels/ActivityRestoredEvent.php b/src/GeneratedModels/ActivityRestoredEvent.php index 43c52c2e..c1d4ec5b 100644 --- a/src/GeneratedModels/ActivityRestoredEvent.php +++ b/src/GeneratedModels/ActivityRestoredEvent.php @@ -5,26 +5,17 @@ namespace GetStream\GeneratedModels; /** * Emitted when an activity is restored. - * - * @property \DateTime $createdAt - * @property string $fid - * @property ActivityResponse $activity - * @property object $custom - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class ActivityRestoredEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, public ?ActivityResponse $activity = null, - public ?object $custom = null, public ?string $type = null, // The type of the event - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/ActivitySelectorConfig.php b/src/GeneratedModels/ActivitySelectorConfig.php index f0f430d0..d8c603dc 100644 --- a/src/GeneratedModels/ActivitySelectorConfig.php +++ b/src/GeneratedModels/ActivitySelectorConfig.php @@ -3,28 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $type - * @property string|null $cutoffTime - * @property string|null $cutoffWindow - * @property int|null $minPopularity - * @property array|null $sort - * @property object|null $filter - * @property object|null $params - */ class ActivitySelectorConfig extends BaseModel { public function __construct( - public ?string $type = null, // Type of selector + public ?string $type = null, // Type of selector. One of: popular, proximity, following, current_feed, query, interest, follow_suggestion + public ?object $filter = null, // Filter for activity selection + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sort parameters for activity selection public ?string $cutoffTime = null, // Time threshold for activity selection (string). Expected RFC3339 format (e.g., 2006-01-02T15:04:05Z07:00). Cannot be used together with cutoff_window public ?string $cutoffWindow = null, // Flexible relative time window for activity selection (e.g., '1h', '3d', '1y'). Activities older than this duration will be filtered out. Cannot be used together with cutoff_time public ?int $minPopularity = null, // Minimum popularity threshold - /** @var array|null Sort parameters for activity selection */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sort parameters for activity selection - public ?object $filter = null, // Filter for activity selection public ?object $params = null, ) { } diff --git a/src/GeneratedModels/ActivitySelectorConfigResponse.php b/src/GeneratedModels/ActivitySelectorConfigResponse.php index 883b1402..957418b1 100644 --- a/src/GeneratedModels/ActivitySelectorConfigResponse.php +++ b/src/GeneratedModels/ActivitySelectorConfigResponse.php @@ -3,28 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $type - * @property \DateTime|null $cutoffTime - * @property string|null $cutoffWindow - * @property int|null $minPopularity - * @property array|null $sort - * @property object|null $filter - * @property object|null $params - */ class ActivitySelectorConfigResponse extends BaseModel { public function __construct( public ?string $type = null, // Type of selector + public ?object $filter = null, // Filter for activity selection + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sort parameters for activity selection public ?\DateTime $cutoffTime = null, // Time threshold for activity selection (timestamp) public ?string $cutoffWindow = null, // Flexible relative time window for activity selection (e.g., '1h', '3d', '1y') public ?int $minPopularity = null, // Minimum popularity threshold - /** @var array|null Sort parameters for activity selection */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sort parameters for activity selection - public ?object $filter = null, // Filter for activity selection public ?object $params = null, // Generic params for selector-specific configuration ) { } diff --git a/src/GeneratedModels/ActivityUnpinnedEvent.php b/src/GeneratedModels/ActivityUnpinnedEvent.php index 2845de6a..1b9cde7d 100644 --- a/src/GeneratedModels/ActivityUnpinnedEvent.php +++ b/src/GeneratedModels/ActivityUnpinnedEvent.php @@ -5,26 +5,17 @@ namespace GetStream\GeneratedModels; /** * Emitted when an activity is unpinned. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property PinActivityResponse $pinnedActivity - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class ActivityUnpinnedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, // The ID of the feed - public ?object $custom = null, public ?PinActivityResponse $pinnedActivity = null, public ?string $type = null, // The type of event: "feeds.activity.unpinned" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, // The ID of the feed + public ?string $feedVisibility = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/ActivityUpdatedEvent.php b/src/GeneratedModels/ActivityUpdatedEvent.php index ac827edf..9591d9e8 100644 --- a/src/GeneratedModels/ActivityUpdatedEvent.php +++ b/src/GeneratedModels/ActivityUpdatedEvent.php @@ -5,26 +5,17 @@ namespace GetStream\GeneratedModels; /** * Emitted when an activity is updated. - * - * @property \DateTime $createdAt - * @property string $fid - * @property ActivityResponse $activity - * @property object $custom - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class ActivityUpdatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, public ?ActivityResponse $activity = null, - public ?object $custom = null, public ?string $type = null, // The type of the event - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/AddActivityRequest.php b/src/GeneratedModels/AddActivityRequest.php index b7add149..7bf2db01 100644 --- a/src/GeneratedModels/AddActivityRequest.php +++ b/src/GeneratedModels/AddActivityRequest.php @@ -3,59 +3,34 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $type - * @property array $feeds - * @property bool|null $createNotificationActivity - * @property string|null $expiresAt - * @property string|null $id - * @property string|null $parentID - * @property string|null $pollID - * @property string|null $restrictReplies - * @property bool|null $skipEnrichUrl - * @property bool|null $skipPush - * @property string|null $text - * @property string|null $userID - * @property string|null $visibility - * @property string|null $visibilityTag - * @property array|null $attachments - * @property array|null $collectionRefs - * @property array|null $filterTags - * @property array|null $interestTags - * @property array|null $mentionedUserIds - * @property object|null $custom - * @property ActivityLocation|null $location - * @property object|null $searchData - */ class AddActivityRequest extends BaseModel { public function __construct( + public ?string $id = null, // Optional ID for the activity public ?string $type = null, // Type of activity + public ?string $userID = null, // ID of the user creating the activity public ?array $feeds = null, // List of feeds to add the activity to with a default max limit of 25 feeds - public ?bool $createNotificationActivity = null, // Whether to create notification activities for mentioned users - public ?string $expiresAt = null, // Expiration time for the activity - public ?string $id = null, // Optional ID for the activity - public ?string $parentID = null, // ID of parent activity for replies/comments - public ?string $pollID = null, // ID of a poll to attach to activity - public ?string $restrictReplies = null, // Controls who can add comments/replies to this activity. Options: 'everyone' (default - anyone can reply), 'people_i_follow' (only people the activity creator follows can reply), 'nobody' (no one can reply) - public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for the activity - public ?bool $skipPush = null, // Whether to skip push notifications public ?string $text = null, // Text content of the activity - public ?string $userID = null, // ID of the user creating the activity - public ?string $visibility = null, // Visibility setting for the activity - public ?string $visibilityTag = null, // If visibility is 'tag', this is the tag name and is required - /** @var array|null List of attachments for the activity */ + /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, // List of attachments for the activity - public ?array $collectionRefs = null, // Collections that this activity references + public ?string $visibility = null, // Visibility setting for the activity. One of: public, private, tag + public ?string $visibilityTag = null, // If visibility is 'tag', this is the tag name and is required + public ?string $restrictReplies = null, // Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody + public ?ActivityLocation $location = null, + public ?string $expiresAt = null, // Expiration time for the activity + public ?array $mentionedUserIds = null, // List of users mentioned in the activity + public ?object $searchData = null, // Additional data for search indexing public ?array $filterTags = null, // Tags for filtering activities public ?array $interestTags = null, // Tags for indicating user interests - public ?array $mentionedUserIds = null, // List of users mentioned in the activity + public ?array $collectionRefs = null, // Collections that this activity references + public ?string $parentID = null, // ID of parent activity for replies/comments + public ?string $pollID = null, // ID of a poll to attach to activity public ?object $custom = null, // Custom data for the activity - public ?ActivityLocation $location = null, - public ?object $searchData = null, // Additional data for search indexing + public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for the activity + public ?bool $createNotificationActivity = null, // Whether to create notification activities for mentioned users + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) + public ?bool $skipPush = null, // Whether to skip push notifications ) { } diff --git a/src/GeneratedModels/AddActivityResponse.php b/src/GeneratedModels/AddActivityResponse.php index 24ac42bd..8146267c 100644 --- a/src/GeneratedModels/AddActivityResponse.php +++ b/src/GeneratedModels/AddActivityResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ActivityResponse $activity - * @property int|null $mentionNotificationsCreated - */ class AddActivityResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?ActivityResponse $activity = null, public ?int $mentionNotificationsCreated = null, // Number of mention notification activities created for mentioned users + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/AddBookmarkRequest.php b/src/GeneratedModels/AddBookmarkRequest.php index 2d633dbf..d5d76c8f 100644 --- a/src/GeneratedModels/AddBookmarkRequest.php +++ b/src/GeneratedModels/AddBookmarkRequest.php @@ -3,22 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $folderID - * @property string|null $userID - * @property object|null $custom - * @property AddFolderRequest|null $newFolder - * @property UserRequest|null $user - */ class AddBookmarkRequest extends BaseModel { public function __construct( public ?string $folderID = null, // ID of the folder to add the bookmark to - public ?string $userID = null, - public ?object $custom = null, // Custom data for the bookmark public ?AddFolderRequest $newFolder = null, + public ?object $custom = null, // Custom data for the bookmark + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/AddBookmarkResponse.php b/src/GeneratedModels/AddBookmarkResponse.php index 2389c9c7..cccb5eb8 100644 --- a/src/GeneratedModels/AddBookmarkResponse.php +++ b/src/GeneratedModels/AddBookmarkResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property BookmarkResponse $bookmark - */ class AddBookmarkResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?BookmarkResponse $bookmark = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/AddCommentReactionRequest.php b/src/GeneratedModels/AddCommentReactionRequest.php index 40cab776..70274150 100644 --- a/src/GeneratedModels/AddCommentReactionRequest.php +++ b/src/GeneratedModels/AddCommentReactionRequest.php @@ -3,26 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $type - * @property bool|null $createNotificationActivity - * @property bool|null $enforceUnique - * @property bool|null $skipPush - * @property string|null $userID - * @property object|null $custom - * @property UserRequest|null $user - */ class AddCommentReactionRequest extends BaseModel { public function __construct( public ?string $type = null, // The type of reaction, eg upvote, like, ... + public ?object $custom = null, // Optional custom data to add to the reaction public ?bool $createNotificationActivity = null, // Whether to create a notification activity for this reaction - public ?bool $enforceUnique = null, // Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one) + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) public ?bool $skipPush = null, + public ?bool $enforceUnique = null, // Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one) public ?string $userID = null, - public ?object $custom = null, // Optional custom data to add to the reaction public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/AddCommentReactionResponse.php b/src/GeneratedModels/AddCommentReactionResponse.php index ff67c179..7a483219 100644 --- a/src/GeneratedModels/AddCommentReactionResponse.php +++ b/src/GeneratedModels/AddCommentReactionResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property CommentResponse $comment - * @property FeedsReactionResponse $reaction - * @property bool|null $notificationCreated - */ class AddCommentReactionResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request public ?CommentResponse $comment = null, public ?FeedsReactionResponse $reaction = null, public ?bool $notificationCreated = null, // Whether a notification activity was successfully created + public ?string $duration = null, // Duration of the request ) { } diff --git a/src/GeneratedModels/AddCommentRequest.php b/src/GeneratedModels/AddCommentRequest.php index 9392ab0e..bbb19183 100644 --- a/src/GeneratedModels/AddCommentRequest.php +++ b/src/GeneratedModels/AddCommentRequest.php @@ -3,40 +3,24 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $comment - * @property bool|null $createNotificationActivity - * @property string|null $id - * @property string|null $objectID - * @property string|null $objectType - * @property string|null $parentID - * @property bool|null $skipEnrichUrl - * @property bool|null $skipPush - * @property string|null $userID - * @property array|null $attachments - * @property array|null $mentionedUserIds - * @property object|null $custom - * @property UserRequest|null $user - */ class AddCommentRequest extends BaseModel { public function __construct( - public ?string $comment = null, // Text content of the comment - public ?bool $createNotificationActivity = null, // Whether to create a notification activity for this comment public ?string $id = null, // Optional custom ID for the comment (max 255 characters). If not provided, a UUID will be generated. public ?string $objectID = null, // ID of the object to comment on. Required for root comments public ?string $objectType = null, // Type of the object to comment on. Required for root comments - public ?string $parentID = null, // ID of parent comment for replies. When provided, object_id and object_type are automatically inherited from the parent comment. - public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for this comment - public ?bool $skipPush = null, - public ?string $userID = null, - /** @var array|null Media attachments for the reply */ + public ?string $comment = null, // Text content of the comment + /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, // Media attachments for the reply public ?array $mentionedUserIds = null, // List of users mentioned in the reply + public ?string $parentID = null, // ID of parent comment for replies. When provided, object_id and object_type are automatically inherited from the parent comment. public ?object $custom = null, // Custom data for the comment + public ?bool $createNotificationActivity = null, // Whether to create a notification activity for this comment + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) + public ?bool $skipPush = null, + public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for this comment + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/AddCommentResponse.php b/src/GeneratedModels/AddCommentResponse.php index 4db2156d..7f720f26 100644 --- a/src/GeneratedModels/AddCommentResponse.php +++ b/src/GeneratedModels/AddCommentResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property CommentResponse $comment - * @property int|null $mentionNotificationsCreated - * @property bool|null $notificationCreated - */ class AddCommentResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?CommentResponse $comment = null, - public ?int $mentionNotificationsCreated = null, // Number of mention notification activities created for mentioned users public ?bool $notificationCreated = null, // Whether a notification activity was successfully created + public ?int $mentionNotificationsCreated = null, // Number of mention notification activities created for mentioned users + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/AddCommentsBatchRequest.php b/src/GeneratedModels/AddCommentsBatchRequest.php index d0976ef5..bf091cfa 100644 --- a/src/GeneratedModels/AddCommentsBatchRequest.php +++ b/src/GeneratedModels/AddCommentsBatchRequest.php @@ -3,15 +3,10 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $comments - */ class AddCommentsBatchRequest extends BaseModel { public function __construct( - /** @var array|null List of comments to add */ + /** @var array|null */ #[ArrayOf(AddCommentRequest::class)] public ?array $comments = null, // List of comments to add ) { diff --git a/src/GeneratedModels/AddCommentsBatchResponse.php b/src/GeneratedModels/AddCommentsBatchResponse.php index 707a45f9..18d6bd2b 100644 --- a/src/GeneratedModels/AddCommentsBatchResponse.php +++ b/src/GeneratedModels/AddCommentsBatchResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $comments - */ class AddCommentsBatchResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of comments added */ + /** @var array|null */ #[ArrayOf(CommentResponse::class)] public ?array $comments = null, // List of comments added + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/AddFolderRequest.php b/src/GeneratedModels/AddFolderRequest.php index 5aa0c84a..0e3ea0f0 100644 --- a/src/GeneratedModels/AddFolderRequest.php +++ b/src/GeneratedModels/AddFolderRequest.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $name - * @property object|null $custom - */ class AddFolderRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/AddReactionRequest.php b/src/GeneratedModels/AddReactionRequest.php index 770dd77d..e0955150 100644 --- a/src/GeneratedModels/AddReactionRequest.php +++ b/src/GeneratedModels/AddReactionRequest.php @@ -3,26 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $type - * @property bool|null $createNotificationActivity - * @property bool|null $enforceUnique - * @property bool|null $skipPush - * @property string|null $userID - * @property object|null $custom - * @property UserRequest|null $user - */ class AddReactionRequest extends BaseModel { public function __construct( public ?string $type = null, // Type of reaction + public ?object $custom = null, // Custom data for the reaction public ?bool $createNotificationActivity = null, // Whether to create a notification activity for this reaction - public ?bool $enforceUnique = null, // Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one) + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) public ?bool $skipPush = null, + public ?bool $enforceUnique = null, // Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one) public ?string $userID = null, - public ?object $custom = null, // Custom data for the reaction public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/AddReactionResponse.php b/src/GeneratedModels/AddReactionResponse.php index 8f263509..89a1c9a4 100644 --- a/src/GeneratedModels/AddReactionResponse.php +++ b/src/GeneratedModels/AddReactionResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ActivityResponse $activity - * @property FeedsReactionResponse $reaction - * @property bool|null $notificationCreated - */ class AddReactionResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?ActivityResponse $activity = null, public ?FeedsReactionResponse $reaction = null, public ?bool $notificationCreated = null, // Whether a notification activity was successfully created + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/AggregatedActivityResponse.php b/src/GeneratedModels/AggregatedActivityResponse.php index 59e35b1a..e1177202 100644 --- a/src/GeneratedModels/AggregatedActivityResponse.php +++ b/src/GeneratedModels/AggregatedActivityResponse.php @@ -3,32 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $activityCount - * @property \DateTime $createdAt - * @property string $group - * @property int $score - * @property \DateTime $updatedAt - * @property int $userCount - * @property bool $userCountTruncated - * @property array $activities - * @property bool|null $isWatched - */ class AggregatedActivityResponse extends BaseModel { public function __construct( + /** @var array|null */ + #[ArrayOf(ActivityResponse::class)] + public ?array $activities = null, // List of activities in this aggregation public ?int $activityCount = null, // Number of activities in this aggregation - public ?\DateTime $createdAt = null, // When the aggregation was created + public ?int $userCount = null, // Number of unique users in this aggregation + public ?bool $userCountTruncated = null, // Whether this activity group has been truncated due to exceeding the group size limit public ?string $group = null, // Grouping identifier public ?int $score = null, // Ranking score for this aggregation + public ?\DateTime $createdAt = null, // When the aggregation was created public ?\DateTime $updatedAt = null, // When the aggregation was last updated - public ?int $userCount = null, // Number of unique users in this aggregation - public ?bool $userCountTruncated = null, // Whether this activity group has been truncated due to exceeding the group size limit - /** @var array|null List of activities in this aggregation */ - #[ArrayOf(ActivityResponse::class)] - public ?array $activities = null, // List of activities in this aggregation public ?bool $isWatched = null, ) { } diff --git a/src/GeneratedModels/AggregationConfig.php b/src/GeneratedModels/AggregationConfig.php index 632ec886..4b050f66 100644 --- a/src/GeneratedModels/AggregationConfig.php +++ b/src/GeneratedModels/AggregationConfig.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $format - */ class AggregationConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/AppResponseFields.php b/src/GeneratedModels/AppResponseFields.php index 809ee679..4e2e9c18 100644 --- a/src/GeneratedModels/AppResponseFields.php +++ b/src/GeneratedModels/AppResponseFields.php @@ -3,121 +3,70 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $allowMultiUserDevices - * @property bool $asyncUrlEnrichEnabled - * @property bool $autoTranslationEnabled - * @property bool $campaignEnabled - * @property int $cdnExpirationSeconds - * @property string $customActionHandlerUrl - * @property bool $disableAuthChecks - * @property bool $disablePermissionsChecks - * @property string $enforceUniqueUsernames - * @property bool $guestUserCreationDisabled - * @property int $id - * @property bool $imageModerationEnabled - * @property int $maxAggregatedActivitiesLength - * @property bool $moderationBulkSubmitActionEnabled - * @property bool $moderationEnabled - * @property bool $moderationLlmConfigurabilityEnabled - * @property bool $moderationMultitenantBlocklistEnabled - * @property string $moderationWebhookUrl - * @property bool $multiTenantEnabled - * @property string $name - * @property string $organization - * @property string $permissionVersion - * @property string $placement - * @property int $remindersInterval - * @property string $snsKey - * @property string $snsSecret - * @property string $snsTopicArn - * @property string $sqsKey - * @property string $sqsSecret - * @property string $sqsUrl - * @property bool $suspended - * @property string $suspendedExplanation - * @property bool $useHookV2 - * @property bool $userResponseTimeEnabled - * @property string $webhookUrl - * @property array $eventHooks - * @property array $userSearchDisallowedRoles - * @property array $webhookEvents - * @property array $callTypes - * @property array $channelConfigs - * @property FileUploadConfig $fileUploadConfig - * @property array $grants - * @property FileUploadConfig $imageUploadConfig - * @property array $policies - * @property PushNotificationFields $pushNotifications - * @property string|null $beforeMessageSendHookUrl - * @property \DateTime|null $revokeTokensIssuedBefore - * @property array|null $allowedFlagReasons - * @property array|null $geofences - * @property array|null $imageModerationLabels - * @property DataDogInfo|null $datadogInfo - * @property ModerationDashboardPreferences|null $moderationDashboardPreferences - */ class AppResponseFields extends BaseModel { public function __construct( - public ?bool $allowMultiUserDevices = null, - public ?bool $asyncUrlEnrichEnabled = null, - public ?bool $autoTranslationEnabled = null, - public ?bool $campaignEnabled = null, - public ?int $cdnExpirationSeconds = null, - public ?string $customActionHandlerUrl = null, - public ?bool $disableAuthChecks = null, - public ?bool $disablePermissionsChecks = null, - public ?string $enforceUniqueUsernames = null, - public ?bool $guestUserCreationDisabled = null, public ?int $id = null, - public ?bool $imageModerationEnabled = null, - public ?int $maxAggregatedActivitiesLength = null, - public ?bool $moderationBulkSubmitActionEnabled = null, - public ?bool $moderationEnabled = null, - public ?bool $moderationLlmConfigurabilityEnabled = null, - public ?bool $moderationMultitenantBlocklistEnabled = null, - public ?string $moderationWebhookUrl = null, - public ?bool $multiTenantEnabled = null, public ?string $name = null, public ?string $organization = null, - public ?string $permissionVersion = null, public ?string $placement = null, - public ?int $remindersInterval = null, - public ?string $snsKey = null, - public ?string $snsSecret = null, - public ?string $snsTopicArn = null, - public ?string $sqsKey = null, - public ?string $sqsSecret = null, - public ?string $sqsUrl = null, + public ?PushNotificationFields $pushNotifications = null, + public ?string $webhookUrl = null, + public ?string $moderationWebhookUrl = null, + /** @var array|null */ + #[MapOf(ChannelConfig::class)] + public ?array $channelConfigs = null, + /** @var array|null */ + #[MapOf(CallType::class)] + public ?array $callTypes = null, + public ?array $policies = null, public ?bool $suspended = null, public ?string $suspendedExplanation = null, - public ?bool $useHookV2 = null, - public ?bool $userResponseTimeEnabled = null, - public ?string $webhookUrl = null, - /** @var array|null */ - #[ArrayOf(EventHook::class)] - public ?array $eventHooks = null, + public ?bool $disableAuthChecks = null, + public ?bool $disablePermissionsChecks = null, + public ?string $permissionVersion = null, public ?array $userSearchDisallowedRoles = null, - public ?array $webhookEvents = null, - public ?array $callTypes = null, - public ?array $channelConfigs = null, + public ?bool $multiTenantEnabled = null, + public ?bool $allowMultiUserDevices = null, + public ?bool $imageModerationEnabled = null, + public ?bool $asyncUrlEnrichEnabled = null, + public ?array $imageModerationLabels = null, + public ?array $allowedFlagReasons = null, + public ?bool $autoTranslationEnabled = null, + public ?string $beforeMessageSendHookUrl = null, + public ?string $customActionHandlerUrl = null, + public ?string $enforceUniqueUsernames = null, + public ?string $sqsUrl = null, + public ?string $sqsKey = null, + public ?string $sqsSecret = null, + public ?string $snsTopicArn = null, + public ?string $snsKey = null, + public ?string $snsSecret = null, public ?FileUploadConfig $fileUploadConfig = null, - public ?array $grants = null, public ?FileUploadConfig $imageUploadConfig = null, - public ?array $policies = null, - public ?PushNotificationFields $pushNotifications = null, - public ?string $beforeMessageSendHookUrl = null, public ?\DateTime $revokeTokensIssuedBefore = null, - public ?array $allowedFlagReasons = null, + public ?array $grants = null, + public ?bool $campaignEnabled = null, + public ?array $webhookEvents = null, + public ?int $remindersInterval = null, + public ?int $cdnExpirationSeconds = null, /** @var array|null */ #[ArrayOf(GeofenceResponse::class)] public ?array $geofences = null, - public ?array $imageModerationLabels = null, public ?DataDogInfo $datadogInfo = null, + public ?bool $moderationEnabled = null, + public ?bool $moderationMultitenantBlocklistEnabled = null, + public ?bool $guestUserCreationDisabled = null, public ?ModerationDashboardPreferences $moderationDashboardPreferences = null, + /** @var array|null */ + #[ArrayOf(EventHook::class)] + public ?array $eventHooks = null, + public ?bool $useHookV2 = null, + public ?bool $userResponseTimeEnabled = null, + public ?bool $moderationLlmConfigurabilityEnabled = null, + public ?int $maxAggregatedActivitiesLength = null, + public ?bool $moderationVideoCallModerationEnabled = null, + public ?bool $moderationAudioCallModerationEnabled = null, ) { } diff --git a/src/GeneratedModels/AppealAcceptedEvent.php b/src/GeneratedModels/AppealAcceptedEvent.php index 282ac7f7..fefe6789 100644 --- a/src/GeneratedModels/AppealAcceptedEvent.php +++ b/src/GeneratedModels/AppealAcceptedEvent.php @@ -5,20 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when an appeal is accepted - * - * @property \DateTime $createdAt - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property AppealItemResponse|null $appeal */ class AppealAcceptedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?object $custom = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?AppealItemResponse $appeal = null, ) { } diff --git a/src/GeneratedModels/AppealCreatedEvent.php b/src/GeneratedModels/AppealCreatedEvent.php index ac4d6836..cbd8e33d 100644 --- a/src/GeneratedModels/AppealCreatedEvent.php +++ b/src/GeneratedModels/AppealCreatedEvent.php @@ -5,20 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when an appeal is created - * - * @property \DateTime $createdAt - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property AppealItemResponse|null $appeal */ class AppealCreatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?object $custom = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?AppealItemResponse $appeal = null, ) { } diff --git a/src/GeneratedModels/AppealItemResponse.php b/src/GeneratedModels/AppealItemResponse.php index 2e3550a4..cdf04775 100644 --- a/src/GeneratedModels/AppealItemResponse.php +++ b/src/GeneratedModels/AppealItemResponse.php @@ -3,35 +3,20 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $appealReason - * @property \DateTime $createdAt - * @property string $entityID - * @property string $entityType - * @property string $id - * @property string $status - * @property \DateTime $updatedAt - * @property string|null $decisionReason - * @property array|null $attachments - * @property ModerationPayload|null $entityContent - * @property UserResponse|null $user - */ class AppealItemResponse extends BaseModel { public function __construct( - public ?string $appealReason = null, // Reason Text of the Appeal Item - public ?\DateTime $createdAt = null, // When the flag was created - public ?string $entityID = null, // ID of the entity - public ?string $entityType = null, // Type of entity public ?string $id = null, + public ?UserResponse $user = null, + public ?string $entityType = null, // Type of entity + public ?string $entityID = null, // ID of the entity + public ?ModerationPayload $entityContent = null, + public ?string $appealReason = null, // Reason Text of the Appeal Item public ?string $status = null, // Status of the Appeal Item - public ?\DateTime $updatedAt = null, // When the flag was last updated public ?string $decisionReason = null, // Decision Reason of the Appeal Item public ?array $attachments = null, // Attachments(e.g. Images) of the Appeal Item - public ?ModerationPayload $entityContent = null, - public ?UserResponse $user = null, + public ?\DateTime $createdAt = null, // When the flag was created + public ?\DateTime $updatedAt = null, // When the flag was last updated ) { } diff --git a/src/GeneratedModels/AppealRejectedEvent.php b/src/GeneratedModels/AppealRejectedEvent.php index 5fea3c43..f41f2a89 100644 --- a/src/GeneratedModels/AppealRejectedEvent.php +++ b/src/GeneratedModels/AppealRejectedEvent.php @@ -5,20 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when an appeal is rejected - * - * @property \DateTime $createdAt - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property AppealItemResponse|null $appeal */ class AppealRejectedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?object $custom = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?AppealItemResponse $appeal = null, ) { } diff --git a/src/GeneratedModels/AppealRequest.php b/src/GeneratedModels/AppealRequest.php index d83c06f4..e3333d2b 100644 --- a/src/GeneratedModels/AppealRequest.php +++ b/src/GeneratedModels/AppealRequest.php @@ -3,24 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $appealReason - * @property string $entityID - * @property string $entityType - * @property string|null $userID - * @property array|null $attachments - * @property UserRequest|null $user - */ class AppealRequest extends BaseModel { public function __construct( - public ?string $appealReason = null, // Explanation for why the content is being appealed public ?string $entityID = null, // Unique identifier of the entity being appealed public ?string $entityType = null, // Type of entity being appealed (e.g., message, user) - public ?string $userID = null, + public ?string $appealReason = null, // Explanation for why the content is being appealed public ?array $attachments = null, // Array of Attachment URLs(e.g., images) + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/AppealResponse.php b/src/GeneratedModels/AppealResponse.php index 3f631761..c0a6d673 100644 --- a/src/GeneratedModels/AppealResponse.php +++ b/src/GeneratedModels/AppealResponse.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $appealID - * @property string $duration - */ class AppealResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/AsyncBulkImageModerationEvent.php b/src/GeneratedModels/AsyncBulkImageModerationEvent.php index 16136add..82b6b68d 100644 --- a/src/GeneratedModels/AsyncBulkImageModerationEvent.php +++ b/src/GeneratedModels/AsyncBulkImageModerationEvent.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property \DateTime $finishedAt - * @property \DateTime $startedAt - * @property string $taskID - * @property string $url - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - */ class AsyncBulkImageModerationEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?\DateTime $finishedAt = null, - public ?\DateTime $startedAt = null, - public ?string $taskID = null, public ?string $url = null, - public ?object $custom = null, + public ?string $taskID = null, + public ?\DateTime $startedAt = null, + public ?\DateTime $finishedAt = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, ) { } diff --git a/src/GeneratedModels/AsyncExportChannelsEvent.php b/src/GeneratedModels/AsyncExportChannelsEvent.php index 753e4fdc..1018fa9d 100644 --- a/src/GeneratedModels/AsyncExportChannelsEvent.php +++ b/src/GeneratedModels/AsyncExportChannelsEvent.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property \DateTime $finishedAt - * @property \DateTime $startedAt - * @property string $taskID - * @property string $url - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - */ class AsyncExportChannelsEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?\DateTime $finishedAt = null, - public ?\DateTime $startedAt = null, - public ?string $taskID = null, public ?string $url = null, - public ?object $custom = null, + public ?string $taskID = null, + public ?\DateTime $startedAt = null, + public ?\DateTime $finishedAt = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, ) { } diff --git a/src/GeneratedModels/AsyncExportErrorEvent.php b/src/GeneratedModels/AsyncExportErrorEvent.php index 2734a464..d709439c 100644 --- a/src/GeneratedModels/AsyncExportErrorEvent.php +++ b/src/GeneratedModels/AsyncExportErrorEvent.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $error - * @property \DateTime $finishedAt - * @property \DateTime $startedAt - * @property string $taskID - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - */ class AsyncExportErrorEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, public ?string $error = null, - public ?\DateTime $finishedAt = null, - public ?\DateTime $startedAt = null, public ?string $taskID = null, - public ?object $custom = null, + public ?\DateTime $startedAt = null, + public ?\DateTime $finishedAt = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, ) { } diff --git a/src/GeneratedModels/AsyncExportModerationLogsEvent.php b/src/GeneratedModels/AsyncExportModerationLogsEvent.php index 13edd1e3..ddfaba56 100644 --- a/src/GeneratedModels/AsyncExportModerationLogsEvent.php +++ b/src/GeneratedModels/AsyncExportModerationLogsEvent.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property \DateTime $finishedAt - * @property \DateTime $startedAt - * @property string $taskID - * @property string $url - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - */ class AsyncExportModerationLogsEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?\DateTime $finishedAt = null, - public ?\DateTime $startedAt = null, - public ?string $taskID = null, public ?string $url = null, - public ?object $custom = null, + public ?string $taskID = null, + public ?\DateTime $startedAt = null, + public ?\DateTime $finishedAt = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, ) { } diff --git a/src/GeneratedModels/AsyncExportUsersEvent.php b/src/GeneratedModels/AsyncExportUsersEvent.php index d48b1b59..1969e805 100644 --- a/src/GeneratedModels/AsyncExportUsersEvent.php +++ b/src/GeneratedModels/AsyncExportUsersEvent.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property \DateTime $finishedAt - * @property \DateTime $startedAt - * @property string $taskID - * @property string $url - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - */ class AsyncExportUsersEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?\DateTime $finishedAt = null, - public ?\DateTime $startedAt = null, - public ?string $taskID = null, public ?string $url = null, - public ?object $custom = null, + public ?string $taskID = null, + public ?\DateTime $startedAt = null, + public ?\DateTime $finishedAt = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, ) { } diff --git a/src/GeneratedModels/AsyncModerationCallbackConfig.php b/src/GeneratedModels/AsyncModerationCallbackConfig.php index 57624a33..f86ebd18 100644 --- a/src/GeneratedModels/AsyncModerationCallbackConfig.php +++ b/src/GeneratedModels/AsyncModerationCallbackConfig.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $mode - * @property string|null $serverUrl - */ class AsyncModerationCallbackConfig extends BaseModel { public function __construct( - public ?string $mode = null, public ?string $serverUrl = null, + public ?string $mode = null, ) { } diff --git a/src/GeneratedModels/AsyncModerationConfiguration.php b/src/GeneratedModels/AsyncModerationConfiguration.php index 9f167049..a08cf27b 100644 --- a/src/GeneratedModels/AsyncModerationConfiguration.php +++ b/src/GeneratedModels/AsyncModerationConfiguration.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $timeoutMs - * @property AsyncModerationCallbackConfig|null $callback - */ class AsyncModerationConfiguration extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/Attachment.php b/src/GeneratedModels/Attachment.php index 7af1b976..d70ebf35 100644 --- a/src/GeneratedModels/Attachment.php +++ b/src/GeneratedModels/Attachment.php @@ -5,59 +5,36 @@ namespace GetStream\GeneratedModels; /** * An attachment is a message object that represents a file uploaded by a user. - * - * @property object $custom - * @property string|null $assetUrl - * @property string|null $authorIcon - * @property string|null $authorLink - * @property string|null $authorName - * @property string|null $color - * @property string|null $fallback - * @property string|null $footer - * @property string|null $footerIcon - * @property string|null $imageUrl - * @property string|null $ogScrapeUrl - * @property int|null $originalHeight - * @property int|null $originalWidth - * @property string|null $pretext - * @property string|null $text - * @property string|null $thumbUrl - * @property string|null $title - * @property string|null $titleLink - * @property string|null $type - * @property array|null $actions - * @property array|null $fields - * @property Images|null $giphy */ class Attachment extends BaseModel { public function __construct( - public ?object $custom = null, - public ?string $assetUrl = null, - public ?string $authorIcon = null, - public ?string $authorLink = null, - public ?string $authorName = null, - public ?string $color = null, + public ?string $type = null, // Attachment type (e.g. image, video, url) public ?string $fallback = null, - public ?string $footer = null, - public ?string $footerIcon = null, - public ?string $imageUrl = null, - public ?string $ogScrapeUrl = null, - public ?int $originalHeight = null, - public ?int $originalWidth = null, + public ?string $color = null, public ?string $pretext = null, - public ?string $text = null, - public ?string $thumbUrl = null, + public ?string $authorName = null, + public ?string $authorLink = null, + public ?string $authorIcon = null, public ?string $title = null, public ?string $titleLink = null, - public ?string $type = null, // Attachment type (e.g. image, video, url) + public ?string $text = null, + public ?string $imageUrl = null, + public ?string $thumbUrl = null, + public ?string $footer = null, + public ?string $footerIcon = null, /** @var array|null */ #[ArrayOf(Action::class)] public ?array $actions = null, /** @var array|null */ #[ArrayOf(Field::class)] public ?array $fields = null, + public ?string $assetUrl = null, + public ?object $custom = null, public ?Images $giphy = null, + public ?string $ogScrapeUrl = null, + public ?int $originalWidth = null, + public ?int $originalHeight = null, ) { } diff --git a/src/GeneratedModels/AudioSettings.php b/src/GeneratedModels/AudioSettings.php index 2be89407..f5e1fb67 100644 --- a/src/GeneratedModels/AudioSettings.php +++ b/src/GeneratedModels/AudioSettings.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $accessRequestEnabled - * @property string $defaultDevice - * @property bool $hifiAudioEnabled - * @property bool $micDefaultOn - * @property bool $opusDtxEnabled - * @property bool $redundantCodingEnabled - * @property bool $speakerDefaultOn - * @property NoiseCancellationSettings|null $noiseCancellation - */ class AudioSettings extends BaseModel { public function __construct( public ?bool $accessRequestEnabled = null, - public ?string $defaultDevice = null, - public ?bool $hifiAudioEnabled = null, - public ?bool $micDefaultOn = null, public ?bool $opusDtxEnabled = null, public ?bool $redundantCodingEnabled = null, + public ?bool $micDefaultOn = null, public ?bool $speakerDefaultOn = null, + public ?string $defaultDevice = null, public ?NoiseCancellationSettings $noiseCancellation = null, + public ?bool $hifiAudioEnabled = null, ) { } diff --git a/src/GeneratedModels/AudioSettingsRequest.php b/src/GeneratedModels/AudioSettingsRequest.php index efe2e03f..fd1f4058 100644 --- a/src/GeneratedModels/AudioSettingsRequest.php +++ b/src/GeneratedModels/AudioSettingsRequest.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $defaultDevice - * @property bool|null $accessRequestEnabled - * @property bool|null $hifiAudioEnabled - * @property bool|null $micDefaultOn - * @property bool|null $opusDtxEnabled - * @property bool|null $redundantCodingEnabled - * @property bool|null $speakerDefaultOn - * @property NoiseCancellationSettings|null $noiseCancellation - */ class AudioSettingsRequest extends BaseModel { public function __construct( - public ?string $defaultDevice = null, public ?bool $accessRequestEnabled = null, - public ?bool $hifiAudioEnabled = null, - public ?bool $micDefaultOn = null, public ?bool $opusDtxEnabled = null, public ?bool $redundantCodingEnabled = null, + public ?bool $micDefaultOn = null, public ?bool $speakerDefaultOn = null, + public ?string $defaultDevice = null, public ?NoiseCancellationSettings $noiseCancellation = null, + public ?bool $hifiAudioEnabled = null, ) { } diff --git a/src/GeneratedModels/AudioSettingsResponse.php b/src/GeneratedModels/AudioSettingsResponse.php index 45d6d0a1..efa44c2e 100644 --- a/src/GeneratedModels/AudioSettingsResponse.php +++ b/src/GeneratedModels/AudioSettingsResponse.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $accessRequestEnabled - * @property string $defaultDevice - * @property bool $hifiAudioEnabled - * @property bool $micDefaultOn - * @property bool $opusDtxEnabled - * @property bool $redundantCodingEnabled - * @property bool $speakerDefaultOn - * @property NoiseCancellationSettings|null $noiseCancellation - */ class AudioSettingsResponse extends BaseModel { public function __construct( public ?bool $accessRequestEnabled = null, - public ?string $defaultDevice = null, - public ?bool $hifiAudioEnabled = null, - public ?bool $micDefaultOn = null, public ?bool $opusDtxEnabled = null, public ?bool $redundantCodingEnabled = null, + public ?bool $micDefaultOn = null, public ?bool $speakerDefaultOn = null, + public ?string $defaultDevice = null, public ?NoiseCancellationSettings $noiseCancellation = null, + public ?bool $hifiAudioEnabled = null, ) { } diff --git a/src/GeneratedModels/AutomodDetailsResponse.php b/src/GeneratedModels/AutomodDetailsResponse.php new file mode 100644 index 00000000..190ebd01 --- /dev/null +++ b/src/GeneratedModels/AutomodDetailsResponse.php @@ -0,0 +1,19 @@ +|null $rules - */ class AutomodPlatformCircumventionConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/AutomodRule.php b/src/GeneratedModels/AutomodRule.php index 3c0b353f..d0b44815 100644 --- a/src/GeneratedModels/AutomodRule.php +++ b/src/GeneratedModels/AutomodRule.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $action - * @property string $label - * @property int $threshold - */ class AutomodRule extends BaseModel { public function __construct( - public ?string $action = null, public ?string $label = null, public ?int $threshold = null, + public ?string $action = null, ) { } diff --git a/src/GeneratedModels/AutomodSemanticFiltersConfig.php b/src/GeneratedModels/AutomodSemanticFiltersConfig.php index 246c644a..78bf8592 100644 --- a/src/GeneratedModels/AutomodSemanticFiltersConfig.php +++ b/src/GeneratedModels/AutomodSemanticFiltersConfig.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $async - * @property bool|null $enabled - * @property array|null $rules - */ class AutomodSemanticFiltersConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/AutomodSemanticFiltersRule.php b/src/GeneratedModels/AutomodSemanticFiltersRule.php index c39bb6c4..dae2d687 100644 --- a/src/GeneratedModels/AutomodSemanticFiltersRule.php +++ b/src/GeneratedModels/AutomodSemanticFiltersRule.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $action - * @property string $name - * @property int $threshold - */ class AutomodSemanticFiltersRule extends BaseModel { public function __construct( - public ?string $action = null, public ?string $name = null, public ?int $threshold = null, + public ?string $action = null, ) { } diff --git a/src/GeneratedModels/AutomodToxicityConfig.php b/src/GeneratedModels/AutomodToxicityConfig.php index e753d1b8..6e5b47cc 100644 --- a/src/GeneratedModels/AutomodToxicityConfig.php +++ b/src/GeneratedModels/AutomodToxicityConfig.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $async - * @property bool|null $enabled - * @property array|null $rules - */ class AutomodToxicityConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/AzureRequest.php b/src/GeneratedModels/AzureRequest.php index 68653b6a..51b79eff 100644 --- a/src/GeneratedModels/AzureRequest.php +++ b/src/GeneratedModels/AzureRequest.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * Config for creating Azure Blob Storage storage - * - * @property string $absAccountName - * @property string $absClientID - * @property string $absClientSecret - * @property string $absTenantID */ class AzureRequest extends BaseModel { public function __construct( public ?string $absAccountName = null, // The account name + public ?string $absTenantID = null, // The tenant id public ?string $absClientID = null, // The client id public ?string $absClientSecret = null, // The client secret - public ?string $absTenantID = null, // The tenant id ) { } diff --git a/src/GeneratedModels/BackstageSettings.php b/src/GeneratedModels/BackstageSettings.php index 3cc14269..2341c02d 100644 --- a/src/GeneratedModels/BackstageSettings.php +++ b/src/GeneratedModels/BackstageSettings.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property int|null $joinAheadTimeSeconds - */ class BackstageSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BackstageSettingsRequest.php b/src/GeneratedModels/BackstageSettingsRequest.php index b0c073ee..ef381e62 100644 --- a/src/GeneratedModels/BackstageSettingsRequest.php +++ b/src/GeneratedModels/BackstageSettingsRequest.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enabled - * @property int|null $joinAheadTimeSeconds - */ class BackstageSettingsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BackstageSettingsResponse.php b/src/GeneratedModels/BackstageSettingsResponse.php index 5b056565..3ee06a72 100644 --- a/src/GeneratedModels/BackstageSettingsResponse.php +++ b/src/GeneratedModels/BackstageSettingsResponse.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property int|null $joinAheadTimeSeconds - */ class BackstageSettingsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BanActionRequestPayload.php b/src/GeneratedModels/BanActionRequestPayload.php new file mode 100644 index 00000000..ff77bb67 --- /dev/null +++ b/src/GeneratedModels/BanActionRequestPayload.php @@ -0,0 +1,24 @@ +getAttributes(MapOf::class); + if (!empty($attributes)) { + return $attributes[0]->newInstance()->modelClass; + } + return null; + } + + /** + * Parse associative array (map) of model objects, preserving string keys + */ + private static function parseMapOfModels(array $value, string $modelClass): array + { + if (!class_exists($modelClass) || !is_subclass_of($modelClass, BaseModel::class)) { + return $value; + } + + $result = []; + foreach ($value as $key => $item) { + $result[$key] = is_array($item) ? $modelClass::fromJson($item) : $item; + } + return $result; + } + /** * Parse array of model objects */ @@ -179,7 +221,10 @@ private static function parseArrayOfModels(mixed $value, string $modelClass): ?a */ private static function camelToSnake(string $camelCase): string { - $result = preg_replace('/([a-z])([A-Z])/', '$1_$2', $camelCase); + // Handle consecutive uppercase followed by lowercase (e.g., APIKey → API_Key) + $result = preg_replace('/([A-Z]+)([A-Z][a-z])/', '$1_$2', $camelCase); + // Handle lowercase/digit followed by uppercase (e.g., s3Region → s3_Region, userId → user_Id) + $result = preg_replace('/([a-z0-9])([A-Z])/', '$1_$2', $result ?? $camelCase); return strtolower($result ?? $camelCase); } @@ -238,8 +283,8 @@ private function serializeValue(mixed $value): mixed } if ($value instanceof \DateTime) { - // Convert to nanosecond timestamp for Stream API compatibility - return (int)($value->getTimestamp() * 1000000000); + // Convert to RFC 3339 string for Stream API compatibility (matches Go SDK behavior) + return $value->format(\DateTimeInterface::RFC3339); } if ($value instanceof BaseModel) { diff --git a/src/GeneratedModels/BaseResponseModel.php b/src/GeneratedModels/BaseResponseModel.php deleted file mode 100644 index e31f0612..00000000 --- a/src/GeneratedModels/BaseResponseModel.php +++ /dev/null @@ -1,67 +0,0 @@ -|null $rules - */ class BlockListConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BlockListOptions.php b/src/GeneratedModels/BlockListOptions.php index e492f623..a2f91d0b 100644 --- a/src/GeneratedModels/BlockListOptions.php +++ b/src/GeneratedModels/BlockListOptions.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $behavior - * @property string $blocklist - */ class BlockListOptions extends BaseModel { public function __construct( - public ?string $behavior = null, // Blocklist behavior public ?string $blocklist = null, // Blocklist name + public ?string $behavior = null, // Blocklist behavior. One of: flag, block, shadow_block ) { } diff --git a/src/GeneratedModels/BlockListResponse.php b/src/GeneratedModels/BlockListResponse.php index 5fbd90d2..0bb94f0b 100644 --- a/src/GeneratedModels/BlockListResponse.php +++ b/src/GeneratedModels/BlockListResponse.php @@ -5,29 +5,19 @@ namespace GetStream\GeneratedModels; /** * Block list contains restricted words - * - * @property bool $isLeetCheckEnabled - * @property bool $isPluralCheckEnabled - * @property string $name - * @property string $type - * @property array $words - * @property \DateTime|null $createdAt - * @property string|null $id - * @property string|null $team - * @property \DateTime|null $updatedAt */ class BlockListResponse extends BaseModel { public function __construct( - public ?bool $isLeetCheckEnabled = null, - public ?bool $isPluralCheckEnabled = null, - public ?string $name = null, // Block list name - public ?string $type = null, // Block list type. - public ?array $words = null, // List of words to block public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $updatedAt = null, // Date/time of the last update public ?string $id = null, + public ?string $name = null, // Block list name + public ?string $type = null, // Block list type. One of: regex, domain, domain_allowlist, email, email_allowlist, word + public ?array $words = null, // List of words to block public ?string $team = null, - public ?\DateTime $updatedAt = null, // Date/time of the last update + public ?bool $isLeetCheckEnabled = null, + public ?bool $isPluralCheckEnabled = null, ) { } diff --git a/src/GeneratedModels/BlockListRule.php b/src/GeneratedModels/BlockListRule.php index ecf1df96..c23cbbc7 100644 --- a/src/GeneratedModels/BlockListRule.php +++ b/src/GeneratedModels/BlockListRule.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $action - * @property string|null $name - * @property string|null $team - */ class BlockListRule extends BaseModel { public function __construct( - public ?string $action = null, public ?string $name = null, public ?string $team = null, + public ?string $action = null, ) { } diff --git a/src/GeneratedModels/BlockUserRequest.php b/src/GeneratedModels/BlockUserRequest.php index 4b4b1b60..8c49e9fb 100644 --- a/src/GeneratedModels/BlockUserRequest.php +++ b/src/GeneratedModels/BlockUserRequest.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * BlockUserRequest is the payload for blocking a user. - * - * @property string $userID */ class BlockUserRequest extends BaseModel { diff --git a/src/GeneratedModels/BlockUserResponse.php b/src/GeneratedModels/BlockUserResponse.php index f21d2c9e..4b1ba3b6 100644 --- a/src/GeneratedModels/BlockUserResponse.php +++ b/src/GeneratedModels/BlockUserResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * BlockUserResponse is the payload for blocking a user. - * - * @property string $duration */ class BlockUserResponse extends BaseModel { diff --git a/src/GeneratedModels/BlockUsersRequest.php b/src/GeneratedModels/BlockUsersRequest.php index 11550a2a..0814f15b 100644 --- a/src/GeneratedModels/BlockUsersRequest.php +++ b/src/GeneratedModels/BlockUsersRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $blockedUserID - * @property string|null $userID - * @property UserRequest|null $user - */ class BlockUsersRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BlockUsersResponse.php b/src/GeneratedModels/BlockUsersResponse.php index 85dfff70..7a8cb3c4 100644 --- a/src/GeneratedModels/BlockUsersResponse.php +++ b/src/GeneratedModels/BlockUsersResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $blockedByUserID - * @property string $blockedUserID - * @property \DateTime $createdAt - * @property string $duration - */ class BlockUsersResponse extends BaseModel { public function __construct( + public ?string $duration = null, // Duration of the request in milliseconds public ?string $blockedByUserID = null, // User id who blocked another user public ?string $blockedUserID = null, // User id who got blocked public ?\DateTime $createdAt = null, // Timestamp when the user was blocked - public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/BlockedUserEvent.php b/src/GeneratedModels/BlockedUserEvent.php index 5eea684c..5aea7530 100644 --- a/src/GeneratedModels/BlockedUserEvent.php +++ b/src/GeneratedModels/BlockedUserEvent.php @@ -6,20 +6,14 @@ /** * This event is sent to call participants to notify when a user is blocked on a call, clients can use this event to show a notification. * If the user is the current user, the client should leave the call screen as well - * - * @property string $callCid - * @property \DateTime $createdAt - * @property UserResponse $user - * @property string $type - * @property UserResponse|null $blockedByUser */ class BlockedUserEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.blocked_user" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?UserResponse $user = null, - public ?string $type = null, // The type of event: "call.blocked_user" in this case public ?UserResponse $blockedByUser = null, ) { } diff --git a/src/GeneratedModels/BlockedUserResponse.php b/src/GeneratedModels/BlockedUserResponse.php index fd4a68a1..1f4a94b6 100644 --- a/src/GeneratedModels/BlockedUserResponse.php +++ b/src/GeneratedModels/BlockedUserResponse.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $blockedUserID - * @property \DateTime $createdAt - * @property string $userID - * @property UserResponse $blockedUser - * @property UserResponse $user - */ class BlockedUserResponse extends BaseModel { public function __construct( - public ?string $blockedUserID = null, // ID of the user who got blocked - public ?\DateTime $createdAt = null, + public ?UserResponse $user = null, public ?string $userID = null, // ID of the user who blocked another user public ?UserResponse $blockedUser = null, - public ?UserResponse $user = null, + public ?string $blockedUserID = null, // ID of the user who got blocked + public ?\DateTime $createdAt = null, ) { } diff --git a/src/GeneratedModels/BodyguardImageAnalysisConfig.php b/src/GeneratedModels/BodyguardImageAnalysisConfig.php index 73cd4b17..180d4759 100644 --- a/src/GeneratedModels/BodyguardImageAnalysisConfig.php +++ b/src/GeneratedModels/BodyguardImageAnalysisConfig.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $rules - */ class BodyguardImageAnalysisConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BodyguardRule.php b/src/GeneratedModels/BodyguardRule.php index 49b9b20c..24e06b2e 100644 --- a/src/GeneratedModels/BodyguardRule.php +++ b/src/GeneratedModels/BodyguardRule.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $label - * @property string|null $action - * @property array|null $severityRules - */ class BodyguardRule extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BodyguardSeverityRule.php b/src/GeneratedModels/BodyguardSeverityRule.php index 614cdad6..a18f8818 100644 --- a/src/GeneratedModels/BodyguardSeverityRule.php +++ b/src/GeneratedModels/BodyguardSeverityRule.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $action - * @property string $severity - */ class BodyguardSeverityRule extends BaseModel { public function __construct( - public ?string $action = null, public ?string $severity = null, + public ?string $action = null, ) { } diff --git a/src/GeneratedModels/BookmarkAddedEvent.php b/src/GeneratedModels/BookmarkAddedEvent.php index c853ea12..ea912587 100644 --- a/src/GeneratedModels/BookmarkAddedEvent.php +++ b/src/GeneratedModels/BookmarkAddedEvent.php @@ -5,22 +5,15 @@ namespace GetStream\GeneratedModels; /** * Emitted when a user bookmarks an activity. - * - * @property \DateTime $createdAt - * @property BookmarkResponse $bookmark - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class BookmarkAddedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation public ?BookmarkResponse $bookmark = null, - public ?object $custom = null, public ?string $type = null, // The type of event: "feeds.bookmark.added" in this case + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/BookmarkDeletedEvent.php b/src/GeneratedModels/BookmarkDeletedEvent.php index 184bde78..fd2f5fb1 100644 --- a/src/GeneratedModels/BookmarkDeletedEvent.php +++ b/src/GeneratedModels/BookmarkDeletedEvent.php @@ -5,22 +5,15 @@ namespace GetStream\GeneratedModels; /** * Emitted when a user deletes a bookmark from an activity. - * - * @property \DateTime $createdAt - * @property BookmarkResponse $bookmark - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class BookmarkDeletedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation public ?BookmarkResponse $bookmark = null, - public ?object $custom = null, public ?string $type = null, // The type of event: "feeds.bookmark.deleted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/BookmarkFolderDeletedEvent.php b/src/GeneratedModels/BookmarkFolderDeletedEvent.php index c5a2edaa..2321a587 100644 --- a/src/GeneratedModels/BookmarkFolderDeletedEvent.php +++ b/src/GeneratedModels/BookmarkFolderDeletedEvent.php @@ -5,22 +5,15 @@ namespace GetStream\GeneratedModels; /** * Emitted when a bookmark folder is deleted. - * - * @property \DateTime $createdAt - * @property BookmarkFolderResponse $bookmarkFolder - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class BookmarkFolderDeletedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation public ?BookmarkFolderResponse $bookmarkFolder = null, - public ?object $custom = null, public ?string $type = null, // The type of event: "feeds.bookmark_folder.deleted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/BookmarkFolderResponse.php b/src/GeneratedModels/BookmarkFolderResponse.php index b1c1678e..511e4de2 100644 --- a/src/GeneratedModels/BookmarkFolderResponse.php +++ b/src/GeneratedModels/BookmarkFolderResponse.php @@ -3,25 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $id - * @property string $name - * @property \DateTime $updatedAt - * @property UserResponse $user - * @property object|null $custom - */ class BookmarkFolderResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // When the folder was created public ?string $id = null, // Unique identifier for the folder - public ?string $name = null, // Name of the folder - public ?\DateTime $updatedAt = null, // When the folder was last updated public ?UserResponse $user = null, + public ?string $name = null, // Name of the folder public ?object $custom = null, // Custom data for the folder + public ?\DateTime $createdAt = null, // When the folder was created + public ?\DateTime $updatedAt = null, // When the folder was last updated ) { } diff --git a/src/GeneratedModels/BookmarkFolderUpdatedEvent.php b/src/GeneratedModels/BookmarkFolderUpdatedEvent.php index ebac80f6..3c48cf9e 100644 --- a/src/GeneratedModels/BookmarkFolderUpdatedEvent.php +++ b/src/GeneratedModels/BookmarkFolderUpdatedEvent.php @@ -5,22 +5,15 @@ namespace GetStream\GeneratedModels; /** * Emitted when a bookmark folder is updated. - * - * @property \DateTime $createdAt - * @property BookmarkFolderResponse $bookmarkFolder - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class BookmarkFolderUpdatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation public ?BookmarkFolderResponse $bookmarkFolder = null, - public ?object $custom = null, public ?string $type = null, // The type of event: "feeds.bookmark_folder.updated" in this case + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/BookmarkResponse.php b/src/GeneratedModels/BookmarkResponse.php index cfd1b385..23f25178 100644 --- a/src/GeneratedModels/BookmarkResponse.php +++ b/src/GeneratedModels/BookmarkResponse.php @@ -3,25 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property \DateTime $updatedAt - * @property ActivityResponse $activity - * @property UserResponse $user - * @property object|null $custom - * @property BookmarkFolderResponse|null $folder - */ class BookmarkResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // When the bookmark was created - public ?\DateTime $updatedAt = null, // When the bookmark was last updated - public ?ActivityResponse $activity = null, public ?UserResponse $user = null, - public ?object $custom = null, // Custom data for the bookmark + public ?ActivityResponse $activity = null, public ?BookmarkFolderResponse $folder = null, + public ?object $custom = null, // Custom data for the bookmark + public ?\DateTime $createdAt = null, // When the bookmark was created + public ?\DateTime $updatedAt = null, // When the bookmark was last updated ) { } diff --git a/src/GeneratedModels/BookmarkUpdatedEvent.php b/src/GeneratedModels/BookmarkUpdatedEvent.php index 6e71d92d..50783abe 100644 --- a/src/GeneratedModels/BookmarkUpdatedEvent.php +++ b/src/GeneratedModels/BookmarkUpdatedEvent.php @@ -5,22 +5,15 @@ namespace GetStream\GeneratedModels; /** * Emitted when a user updates a bookmark. - * - * @property \DateTime $createdAt - * @property BookmarkResponse $bookmark - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class BookmarkUpdatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation public ?BookmarkResponse $bookmark = null, - public ?object $custom = null, public ?string $type = null, // The type of event: "feeds.bookmark.updated" in this case + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/Bound.php b/src/GeneratedModels/Bound.php index cb9474e8..d421e9f8 100644 --- a/src/GeneratedModels/Bound.php +++ b/src/GeneratedModels/Bound.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $inclusive - * @property int $value - */ class Bound extends BaseModel { public function __construct( - public ?bool $inclusive = null, public ?int $value = null, + public ?bool $inclusive = null, ) { } diff --git a/src/GeneratedModels/BroadcastSettings.php b/src/GeneratedModels/BroadcastSettings.php index da8b2a83..ba813ab1 100644 --- a/src/GeneratedModels/BroadcastSettings.php +++ b/src/GeneratedModels/BroadcastSettings.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property HLSSettings|null $hls - * @property RTMPSettings|null $rtmp - */ class BroadcastSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BroadcastSettingsRequest.php b/src/GeneratedModels/BroadcastSettingsRequest.php index 0b44e91c..105e1c70 100644 --- a/src/GeneratedModels/BroadcastSettingsRequest.php +++ b/src/GeneratedModels/BroadcastSettingsRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enabled - * @property HLSSettingsRequest|null $hls - * @property RTMPSettingsRequest|null $rtmp - */ class BroadcastSettingsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BroadcastSettingsResponse.php b/src/GeneratedModels/BroadcastSettingsResponse.php index 85f503a7..5a3b55e4 100644 --- a/src/GeneratedModels/BroadcastSettingsResponse.php +++ b/src/GeneratedModels/BroadcastSettingsResponse.php @@ -5,10 +5,6 @@ namespace GetStream\GeneratedModels; /** * BroadcastSettingsResponse is the payload for broadcasting settings - * - * @property bool $enabled - * @property HLSSettingsResponse $hls - * @property RTMPSettingsResponse $rtmp */ class BroadcastSettingsResponse extends BaseModel { diff --git a/src/GeneratedModels/BrowserDataResponse.php b/src/GeneratedModels/BrowserDataResponse.php index 2709739f..4ebdfc58 100644 --- a/src/GeneratedModels/BrowserDataResponse.php +++ b/src/GeneratedModels/BrowserDataResponse.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $name - * @property string|null $version - */ class BrowserDataResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BulkImageModerationRequest.php b/src/GeneratedModels/BulkImageModerationRequest.php index 0ae2340c..ab3e1a53 100644 --- a/src/GeneratedModels/BulkImageModerationRequest.php +++ b/src/GeneratedModels/BulkImageModerationRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $csvFile - */ class BulkImageModerationRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/BulkImageModerationResponse.php b/src/GeneratedModels/BulkImageModerationResponse.php index 720947df..f69fccfb 100644 --- a/src/GeneratedModels/BulkImageModerationResponse.php +++ b/src/GeneratedModels/BulkImageModerationResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string $taskID - */ class BulkImageModerationResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?string $taskID = null, // ID of the task for processing the bulk image moderation + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CallAcceptedEvent.php b/src/GeneratedModels/CallAcceptedEvent.php index e0186e86..a8575ece 100644 --- a/src/GeneratedModels/CallAcceptedEvent.php +++ b/src/GeneratedModels/CallAcceptedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a user accepts a notification to join a call. - * - * @property string $callCid - * @property \DateTime $createdAt - * @property CallResponse $call - * @property UserResponse $user - * @property string $type */ class CallAcceptedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.accepted" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?CallResponse $call = null, public ?UserResponse $user = null, - public ?string $type = null, // The type of event: "call.accepted" in this case ) { } diff --git a/src/GeneratedModels/CallActionOptions.php b/src/GeneratedModels/CallActionOptions.php new file mode 100644 index 00000000..a79afeff --- /dev/null +++ b/src/GeneratedModels/CallActionOptions.php @@ -0,0 +1,21 @@ + $members - * @property CallResponse $call - * @property string $type */ class CallCreatedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.created" in this case public ?\DateTime $createdAt = null, - /** @var array|null the members added to this call */ + public ?string $callCid = null, + public ?CallResponse $call = null, + /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, // the members added to this call - public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.created" in this case ) { } diff --git a/src/GeneratedModels/CallCustomPropertyParameters.php b/src/GeneratedModels/CallCustomPropertyParameters.php new file mode 100644 index 00000000..45e0881b --- /dev/null +++ b/src/GeneratedModels/CallCustomPropertyParameters.php @@ -0,0 +1,16 @@ + $histogram - */ class CallDurationReport extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CallDurationReportResponse.php b/src/GeneratedModels/CallDurationReportResponse.php index 20cc7245..3a28208f 100644 --- a/src/GeneratedModels/CallDurationReportResponse.php +++ b/src/GeneratedModels/CallDurationReportResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $daily - */ class CallDurationReportResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CallEndedEvent.php b/src/GeneratedModels/CallEndedEvent.php index 343eae40..18d8654c 100644 --- a/src/GeneratedModels/CallEndedEvent.php +++ b/src/GeneratedModels/CallEndedEvent.php @@ -5,23 +5,16 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a call is mark as ended for all its participants. Clients receiving this event should leave the call screen - * - * @property string $callCid - * @property \DateTime $createdAt - * @property CallResponse $call - * @property string $type - * @property string|null $reason - * @property UserResponse|null $user */ class CallEndedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.ended" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.ended" in this case - public ?string $reason = null, // The reason why the call ended, if available public ?UserResponse $user = null, + public ?string $reason = null, // The reason why the call ended, if available ) { } diff --git a/src/GeneratedModels/CallFrameRecordingFailedEvent.php b/src/GeneratedModels/CallFrameRecordingFailedEvent.php index fdd7acdc..c01fafdd 100644 --- a/src/GeneratedModels/CallFrameRecordingFailedEvent.php +++ b/src/GeneratedModels/CallFrameRecordingFailedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when frame recording has failed - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property CallResponse $call - * @property string $type */ class CallFrameRecordingFailedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.frame_recording_failed" in this case public ?\DateTime $createdAt = null, - public ?string $egressID = null, + public ?string $callCid = null, public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.frame_recording_failed" in this case + public ?string $egressID = null, ) { } diff --git a/src/GeneratedModels/CallFrameRecordingFrameReadyEvent.php b/src/GeneratedModels/CallFrameRecordingFrameReadyEvent.php index e18bf0ac..5cae60fe 100644 --- a/src/GeneratedModels/CallFrameRecordingFrameReadyEvent.php +++ b/src/GeneratedModels/CallFrameRecordingFrameReadyEvent.php @@ -5,29 +5,21 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a frame is captured from a call - * - * @property string $callCid - * @property \DateTime $capturedAt - * @property \DateTime $createdAt - * @property string $egressID - * @property string $sessionID - * @property string $trackType - * @property string $url - * @property array $users - * @property string $type */ class CallFrameRecordingFrameReadyEvent extends BaseModel { public function __construct( - public ?string $callCid = null, - public ?\DateTime $capturedAt = null, // The time the frame was captured + public ?string $type = null, // The type of event: "call.frame_recording_ready" in this case public ?\DateTime $createdAt = null, - public ?string $egressID = null, + public ?string $callCid = null, public ?string $sessionID = null, // Call session ID public ?string $trackType = null, // The type of the track frame was captured from (TRACK_TYPE_VIDEO|TRACK_TYPE_SCREEN_SHARE) public ?string $url = null, // The URL of the frame + public ?\DateTime $capturedAt = null, // The time the frame was captured + /** @var array|null */ + #[MapOf(UserResponse::class)] public ?array $users = null, // The users in the frame - public ?string $type = null, // The type of event: "call.frame_recording_ready" in this case + public ?string $egressID = null, ) { } diff --git a/src/GeneratedModels/CallFrameRecordingStartedEvent.php b/src/GeneratedModels/CallFrameRecordingStartedEvent.php index a5acf9b0..c01edcfa 100644 --- a/src/GeneratedModels/CallFrameRecordingStartedEvent.php +++ b/src/GeneratedModels/CallFrameRecordingStartedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when frame recording has started - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property CallResponse $call - * @property string $type */ class CallFrameRecordingStartedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.frame_recording_started" in this case public ?\DateTime $createdAt = null, - public ?string $egressID = null, + public ?string $callCid = null, public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.frame_recording_started" in this case + public ?string $egressID = null, ) { } diff --git a/src/GeneratedModels/CallFrameRecordingStoppedEvent.php b/src/GeneratedModels/CallFrameRecordingStoppedEvent.php index 938a627a..85ff0d17 100644 --- a/src/GeneratedModels/CallFrameRecordingStoppedEvent.php +++ b/src/GeneratedModels/CallFrameRecordingStoppedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when frame recording has stopped - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property CallResponse $call - * @property string $type */ class CallFrameRecordingStoppedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.frame_recording_stopped" in this case public ?\DateTime $createdAt = null, - public ?string $egressID = null, + public ?string $callCid = null, public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.frame_recording_stopped" in this case + public ?string $egressID = null, ) { } diff --git a/src/GeneratedModels/CallHLSBroadcastingFailedEvent.php b/src/GeneratedModels/CallHLSBroadcastingFailedEvent.php index b1390df5..e7e0cb89 100644 --- a/src/GeneratedModels/CallHLSBroadcastingFailedEvent.php +++ b/src/GeneratedModels/CallHLSBroadcastingFailedEvent.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * This event is sent when HLS broadcasting has failed - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $type */ class CallHLSBroadcastingFailedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, - public ?\DateTime $createdAt = null, public ?string $type = null, // The type of event: "call.hls_broadcasting_failed" in this case + public ?\DateTime $createdAt = null, + public ?string $callCid = null, ) { } diff --git a/src/GeneratedModels/CallHLSBroadcastingStartedEvent.php b/src/GeneratedModels/CallHLSBroadcastingStartedEvent.php index 689c3429..3c17dd8d 100644 --- a/src/GeneratedModels/CallHLSBroadcastingStartedEvent.php +++ b/src/GeneratedModels/CallHLSBroadcastingStartedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when HLS broadcasting has started - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $hlsPlaylistUrl - * @property CallResponse $call - * @property string $type */ class CallHLSBroadcastingStartedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.hls_broadcasting_started" in this case public ?\DateTime $createdAt = null, - public ?string $hlsPlaylistUrl = null, + public ?string $callCid = null, public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.hls_broadcasting_started" in this case + public ?string $hlsPlaylistUrl = null, ) { } diff --git a/src/GeneratedModels/CallHLSBroadcastingStoppedEvent.php b/src/GeneratedModels/CallHLSBroadcastingStoppedEvent.php index 3486c8f0..3962f828 100644 --- a/src/GeneratedModels/CallHLSBroadcastingStoppedEvent.php +++ b/src/GeneratedModels/CallHLSBroadcastingStoppedEvent.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * This event is sent when HLS broadcasting has stopped - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $type */ class CallHLSBroadcastingStoppedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, - public ?\DateTime $createdAt = null, public ?string $type = null, // The type of event: "call.hls_broadcasting_stopped" in this case + public ?\DateTime $createdAt = null, + public ?string $callCid = null, ) { } diff --git a/src/GeneratedModels/CallIngressResponse.php b/src/GeneratedModels/CallIngressResponse.php index 79d195ab..22d37b96 100644 --- a/src/GeneratedModels/CallIngressResponse.php +++ b/src/GeneratedModels/CallIngressResponse.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * CallIngressResponse is the payload for ingress settings - * - * @property RTMPIngress $rtmp - * @property SRTIngress $srt - * @property WHIPIngress $whip */ class CallIngressResponse extends BaseModel { public function __construct( public ?RTMPIngress $rtmp = null, - public ?SRTIngress $srt = null, public ?WHIPIngress $whip = null, + public ?SRTIngress $srt = null, ) { } diff --git a/src/GeneratedModels/CallLiveStartedEvent.php b/src/GeneratedModels/CallLiveStartedEvent.php index 4640288f..a9d8a831 100644 --- a/src/GeneratedModels/CallLiveStartedEvent.php +++ b/src/GeneratedModels/CallLiveStartedEvent.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a call is started. Clients receiving this event should start the call. - * - * @property string $callCid - * @property \DateTime $createdAt - * @property CallResponse $call - * @property string $type */ class CallLiveStartedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.live_started" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.live_started" in this case ) { } diff --git a/src/GeneratedModels/CallMemberAddedEvent.php b/src/GeneratedModels/CallMemberAddedEvent.php index 48766747..0ba86b19 100644 --- a/src/GeneratedModels/CallMemberAddedEvent.php +++ b/src/GeneratedModels/CallMemberAddedEvent.php @@ -5,23 +5,17 @@ namespace GetStream\GeneratedModels; /** * This event is sent when one or more members are added to a call - * - * @property string $callCid - * @property \DateTime $createdAt - * @property array $members - * @property CallResponse $call - * @property string $type */ class CallMemberAddedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.member_added" in this case public ?\DateTime $createdAt = null, - /** @var array|null the members added to this call */ + public ?string $callCid = null, + public ?CallResponse $call = null, + /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, // the members added to this call - public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.member_added" in this case ) { } diff --git a/src/GeneratedModels/CallMemberRemovedEvent.php b/src/GeneratedModels/CallMemberRemovedEvent.php index 0ad45a55..f2875fdc 100644 --- a/src/GeneratedModels/CallMemberRemovedEvent.php +++ b/src/GeneratedModels/CallMemberRemovedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when one or more members are removed from a call - * - * @property string $callCid - * @property \DateTime $createdAt - * @property array $members - * @property CallResponse $call - * @property string $type */ class CallMemberRemovedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.member_removed" in this case public ?\DateTime $createdAt = null, - public ?array $members = null, // the list of member IDs removed from the call + public ?string $callCid = null, public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.member_removed" in this case + public ?array $members = null, // the list of member IDs removed from the call ) { } diff --git a/src/GeneratedModels/CallMemberUpdatedEvent.php b/src/GeneratedModels/CallMemberUpdatedEvent.php index 32c195d8..f9448296 100644 --- a/src/GeneratedModels/CallMemberUpdatedEvent.php +++ b/src/GeneratedModels/CallMemberUpdatedEvent.php @@ -5,23 +5,17 @@ namespace GetStream\GeneratedModels; /** * This event is sent when one or more members are updated - * - * @property string $callCid - * @property \DateTime $createdAt - * @property array $members - * @property CallResponse $call - * @property string $type */ class CallMemberUpdatedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.member_updated" in this case public ?\DateTime $createdAt = null, - /** @var array|null The list of members that were updated */ + public ?string $callCid = null, + public ?CallResponse $call = null, + /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, // The list of members that were updated - public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.member_updated" in this case ) { } diff --git a/src/GeneratedModels/CallMemberUpdatedPermissionEvent.php b/src/GeneratedModels/CallMemberUpdatedPermissionEvent.php index 3fd22d01..55bfdf02 100644 --- a/src/GeneratedModels/CallMemberUpdatedPermissionEvent.php +++ b/src/GeneratedModels/CallMemberUpdatedPermissionEvent.php @@ -5,25 +5,18 @@ namespace GetStream\GeneratedModels; /** * This event is sent when one or more members get its role updated - * - * @property string $callCid - * @property \DateTime $createdAt - * @property array $members - * @property CallResponse $call - * @property array $capabilitiesByRole - * @property string $type */ class CallMemberUpdatedPermissionEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.member_added" in this case public ?\DateTime $createdAt = null, - /** @var array|null The list of members that were updated */ - #[ArrayOf(MemberResponse::class)] - public ?array $members = null, // The list of members that were updated + public ?string $callCid = null, public ?CallResponse $call = null, public ?array $capabilitiesByRole = null, // The capabilities by role for this call - public ?string $type = null, // The type of event: "call.member_added" in this case + /** @var array|null */ + #[ArrayOf(MemberResponse::class)] + public ?array $members = null, // The list of members that were updated ) { } diff --git a/src/GeneratedModels/CallMissedEvent.php b/src/GeneratedModels/CallMissedEvent.php index 7aeefde0..c9509d38 100644 --- a/src/GeneratedModels/CallMissedEvent.php +++ b/src/GeneratedModels/CallMissedEvent.php @@ -5,29 +5,20 @@ namespace GetStream\GeneratedModels; /** * This event is sent to call members who did not accept/reject/join the call to notify they missed the call - * - * @property string $callCid - * @property \DateTime $createdAt - * @property bool $notifyUser - * @property string $sessionID - * @property array $members - * @property CallResponse $call - * @property UserResponse $user - * @property string $type */ class CallMissedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.notification" in this case public ?\DateTime $createdAt = null, - public ?bool $notifyUser = null, + public ?string $callCid = null, public ?string $sessionID = null, // Call session ID - /** @var array|null List of members who missed the call */ + public ?CallResponse $call = null, + /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, // List of members who missed the call - public ?CallResponse $call = null, public ?UserResponse $user = null, - public ?string $type = null, // The type of event: "call.notification" in this case + public ?bool $notifyUser = null, ) { } diff --git a/src/GeneratedModels/CallModerationBlurEvent.php b/src/GeneratedModels/CallModerationBlurEvent.php index 829e8906..5273b845 100644 --- a/src/GeneratedModels/CallModerationBlurEvent.php +++ b/src/GeneratedModels/CallModerationBlurEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a moderation blur action is applied to a user's video stream - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $userID - * @property object $custom - * @property string $type */ class CallModerationBlurEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.moderation_blur" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?string $userID = null, // The user ID whose video stream is being blurred public ?object $custom = null, // Custom data associated with the moderation action - public ?string $type = null, // The type of event: "call.moderation_blur" in this case ) { } diff --git a/src/GeneratedModels/CallModerationWarningEvent.php b/src/GeneratedModels/CallModerationWarningEvent.php index cb8e47b6..ed0a2740 100644 --- a/src/GeneratedModels/CallModerationWarningEvent.php +++ b/src/GeneratedModels/CallModerationWarningEvent.php @@ -5,23 +5,16 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a moderation warning is issued to a user - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $message - * @property string $userID - * @property object $custom - * @property string $type */ class CallModerationWarningEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.moderation_warning" in this case public ?\DateTime $createdAt = null, - public ?string $message = null, // The warning message + public ?string $callCid = null, public ?string $userID = null, // The user ID who is receiving the warning + public ?string $message = null, // The warning message public ?object $custom = null, // Custom data associated with the moderation action - public ?string $type = null, // The type of event: "call.moderation_warning" in this case ) { } diff --git a/src/GeneratedModels/CallNotificationEvent.php b/src/GeneratedModels/CallNotificationEvent.php index 66811b5a..bb241f0a 100644 --- a/src/GeneratedModels/CallNotificationEvent.php +++ b/src/GeneratedModels/CallNotificationEvent.php @@ -5,27 +5,19 @@ namespace GetStream\GeneratedModels; /** * This event is sent to all call members to notify they are getting called - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $sessionID - * @property array $members - * @property CallResponse $call - * @property UserResponse $user - * @property string $type */ class CallNotificationEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.notification" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?string $sessionID = null, // Call session ID - /** @var array|null Call members */ + public ?CallResponse $call = null, + /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, // Call members - public ?CallResponse $call = null, public ?UserResponse $user = null, - public ?string $type = null, // The type of event: "call.notification" in this case ) { } diff --git a/src/GeneratedModels/CallParticipantCountReport.php b/src/GeneratedModels/CallParticipantCountReport.php index 2b3fa682..1c031e06 100644 --- a/src/GeneratedModels/CallParticipantCountReport.php +++ b/src/GeneratedModels/CallParticipantCountReport.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $histogram - */ class CallParticipantCountReport extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CallParticipantCountReportResponse.php b/src/GeneratedModels/CallParticipantCountReportResponse.php index a352a245..f25a383c 100644 --- a/src/GeneratedModels/CallParticipantCountReportResponse.php +++ b/src/GeneratedModels/CallParticipantCountReportResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $daily - */ class CallParticipantCountReportResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CallParticipantResponse.php b/src/GeneratedModels/CallParticipantResponse.php index f8300ab1..7b376c07 100644 --- a/src/GeneratedModels/CallParticipantResponse.php +++ b/src/GeneratedModels/CallParticipantResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $joinedAt - * @property string $role - * @property string $userSessionID - * @property UserResponse $user - */ class CallParticipantResponse extends BaseModel { public function __construct( - public ?\DateTime $joinedAt = null, - public ?string $role = null, - public ?string $userSessionID = null, public ?UserResponse $user = null, + public ?string $userSessionID = null, + public ?string $role = null, + public ?\DateTime $joinedAt = null, ) { } diff --git a/src/GeneratedModels/CallParticipantTimeline.php b/src/GeneratedModels/CallParticipantTimeline.php index 82cce1ec..c38a9884 100644 --- a/src/GeneratedModels/CallParticipantTimeline.php +++ b/src/GeneratedModels/CallParticipantTimeline.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $severity - * @property \DateTime $timestamp - * @property string $type - * @property object $data - */ class CallParticipantTimeline extends BaseModel { public function __construct( - public ?string $severity = null, public ?\DateTime $timestamp = null, public ?string $type = null, + public ?string $severity = null, public ?object $data = null, ) { } diff --git a/src/GeneratedModels/CallReactionEvent.php b/src/GeneratedModels/CallReactionEvent.php index 247dc129..6d887885 100644 --- a/src/GeneratedModels/CallReactionEvent.php +++ b/src/GeneratedModels/CallReactionEvent.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a reaction is sent in a call, clients should use this to show the reaction in the call screen - * - * @property string $callCid - * @property \DateTime $createdAt - * @property ReactionResponse $reaction - * @property string $type */ class CallReactionEvent extends BaseModel { public function __construct( - public ?string $callCid = null, - public ?\DateTime $createdAt = null, - public ?ReactionResponse $reaction = null, public ?string $type = null, // The type of event: "call.reaction_new" in this case + public ?\DateTime $createdAt = null, + public ?string $callCid = null, + public ?VideoReactionResponse $reaction = null, ) { } diff --git a/src/GeneratedModels/CallRecording.php b/src/GeneratedModels/CallRecording.php index f9ba61a0..d490bb8e 100644 --- a/src/GeneratedModels/CallRecording.php +++ b/src/GeneratedModels/CallRecording.php @@ -5,23 +5,16 @@ namespace GetStream\GeneratedModels; /** * CallRecording represents a recording of a call. - * - * @property \DateTime $endTime - * @property string $filename - * @property string $recordingType - * @property string $sessionID - * @property \DateTime $startTime - * @property string $url */ class CallRecording extends BaseModel { public function __construct( - public ?\DateTime $endTime = null, public ?string $filename = null, - public ?string $recordingType = null, - public ?string $sessionID = null, - public ?\DateTime $startTime = null, public ?string $url = null, + public ?\DateTime $startTime = null, + public ?\DateTime $endTime = null, + public ?string $sessionID = null, + public ?string $recordingType = null, ) { } diff --git a/src/GeneratedModels/CallRecordingFailedEvent.php b/src/GeneratedModels/CallRecordingFailedEvent.php index 58449b01..7e67019c 100644 --- a/src/GeneratedModels/CallRecordingFailedEvent.php +++ b/src/GeneratedModels/CallRecordingFailedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when call recording has failed - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property string $recordingType - * @property string $type */ class CallRecordingFailedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.recording_failed" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?string $egressID = null, public ?string $recordingType = null, // The type of recording - public ?string $type = null, // The type of event: "call.recording_failed" in this case ) { } diff --git a/src/GeneratedModels/CallRecordingReadyEvent.php b/src/GeneratedModels/CallRecordingReadyEvent.php index 001b31dd..7f321eab 100644 --- a/src/GeneratedModels/CallRecordingReadyEvent.php +++ b/src/GeneratedModels/CallRecordingReadyEvent.php @@ -5,23 +5,16 @@ namespace GetStream\GeneratedModels; /** * This event is sent when call recording is ready - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property string $recordingType - * @property CallRecording $callRecording - * @property string $type */ class CallRecordingReadyEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.recording_ready" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, + public ?CallRecording $callRecording = null, public ?string $egressID = null, public ?string $recordingType = null, // The type of recording - public ?CallRecording $callRecording = null, - public ?string $type = null, // The type of event: "call.recording_ready" in this case ) { } diff --git a/src/GeneratedModels/CallRecordingStartedEvent.php b/src/GeneratedModels/CallRecordingStartedEvent.php index 0ebe27c8..16cb81ce 100644 --- a/src/GeneratedModels/CallRecordingStartedEvent.php +++ b/src/GeneratedModels/CallRecordingStartedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when call recording has started - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property string $recordingType - * @property string $type */ class CallRecordingStartedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, - public ?\DateTime $createdAt = null, public ?string $egressID = null, - public ?string $recordingType = null, // The type of recording public ?string $type = null, // The type of event: "call.recording_started" in this case + public ?\DateTime $createdAt = null, + public ?string $callCid = null, + public ?string $recordingType = null, // The type of recording ) { } diff --git a/src/GeneratedModels/CallRecordingStoppedEvent.php b/src/GeneratedModels/CallRecordingStoppedEvent.php index 9c6ba2c2..aeb35760 100644 --- a/src/GeneratedModels/CallRecordingStoppedEvent.php +++ b/src/GeneratedModels/CallRecordingStoppedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when call recording has stopped - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property string $recordingType - * @property string $type */ class CallRecordingStoppedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, - public ?\DateTime $createdAt = null, public ?string $egressID = null, - public ?string $recordingType = null, // The type of recording public ?string $type = null, // The type of event: "call.recording_stopped" in this case + public ?\DateTime $createdAt = null, + public ?string $callCid = null, + public ?string $recordingType = null, // The type of recording ) { } diff --git a/src/GeneratedModels/CallRejectedEvent.php b/src/GeneratedModels/CallRejectedEvent.php index 1f159d16..3e5d8537 100644 --- a/src/GeneratedModels/CallRejectedEvent.php +++ b/src/GeneratedModels/CallRejectedEvent.php @@ -5,22 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a user rejects a notification to join a call. - * - * @property string $callCid - * @property \DateTime $createdAt - * @property CallResponse $call - * @property UserResponse $user - * @property string $type - * @property string|null $reason */ class CallRejectedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.rejected" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?CallResponse $call = null, public ?UserResponse $user = null, - public ?string $type = null, // The type of event: "call.rejected" in this case public ?string $reason = null, // Provides information about why the call was rejected. You can provide any value, but the Stream API and SDKs use these default values: rejected, cancel, timeout and busy ) { } diff --git a/src/GeneratedModels/CallReportResponse.php b/src/GeneratedModels/CallReportResponse.php index c36a7d61..de2dab26 100644 --- a/src/GeneratedModels/CallReportResponse.php +++ b/src/GeneratedModels/CallReportResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $score - * @property \DateTime|null $endedAt - * @property \DateTime|null $startedAt - */ class CallReportResponse extends BaseModel { public function __construct( public ?int $score = null, - public ?\DateTime $endedAt = null, public ?\DateTime $startedAt = null, + public ?\DateTime $endedAt = null, ) { } diff --git a/src/GeneratedModels/CallRequest.php b/src/GeneratedModels/CallRequest.php index 0cd4f147..bdf5bc8f 100644 --- a/src/GeneratedModels/CallRequest.php +++ b/src/GeneratedModels/CallRequest.php @@ -5,31 +5,21 @@ namespace GetStream\GeneratedModels; /** * CallRequest is the payload for creating a call. - * - * @property string|null $channelCid - * @property string|null $createdByID - * @property \DateTime|null $startsAt - * @property string|null $team - * @property bool|null $video - * @property array|null $members - * @property UserRequest|null $createdBy - * @property object|null $custom - * @property CallSettingsRequest|null $settingsOverride */ class CallRequest extends BaseModel { public function __construct( - public ?string $channelCid = null, - public ?string $createdByID = null, - public ?\DateTime $startsAt = null, public ?string $team = null, - public ?bool $video = null, + public ?UserRequest $createdBy = null, + public ?string $createdByID = null, + public ?object $custom = null, /** @var array|null */ #[ArrayOf(MemberRequest::class)] public ?array $members = null, - public ?UserRequest $createdBy = null, - public ?object $custom = null, public ?CallSettingsRequest $settingsOverride = null, + public ?\DateTime $startsAt = null, + public ?bool $video = null, + public ?string $channelCid = null, ) { } diff --git a/src/GeneratedModels/CallResponse.php b/src/GeneratedModels/CallResponse.php index 18f7b8f4..b8b73658 100644 --- a/src/GeneratedModels/CallResponse.php +++ b/src/GeneratedModels/CallResponse.php @@ -5,61 +5,35 @@ namespace GetStream\GeneratedModels; /** * Represents a call - * - * @property bool $backstage - * @property bool $captioning - * @property string $cid - * @property \DateTime $createdAt - * @property string $currentSessionID - * @property string $id - * @property bool $recording - * @property bool $transcribing - * @property bool $translating - * @property string $type - * @property \DateTime $updatedAt - * @property array $blockedUserIds - * @property UserResponse $createdBy - * @property object $custom - * @property EgressResponse $egress - * @property CallIngressResponse $ingress - * @property CallSettingsResponse $settings - * @property string|null $channelCid - * @property \DateTime|null $endedAt - * @property int|null $joinAheadTimeSeconds - * @property string|null $routingNumber - * @property \DateTime|null $startsAt - * @property string|null $team - * @property CallSessionResponse|null $session - * @property ThumbnailResponse|null $thumbnails */ class CallResponse extends BaseModel { public function __construct( - public ?bool $backstage = null, - public ?bool $captioning = null, + public ?string $type = null, // The type of call + public ?string $id = null, // Call ID public ?string $cid = null, // The unique identifier for a call (:) - public ?\DateTime $createdAt = null, // Date/time of creation public ?string $currentSessionID = null, - public ?string $id = null, // Call ID + public ?string $team = null, + public ?UserResponse $createdBy = null, + public ?object $custom = null, // Custom data for this object + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $updatedAt = null, // Date/time of the last update public ?bool $recording = null, public ?bool $transcribing = null, + public ?bool $captioning = null, public ?bool $translating = null, - public ?string $type = null, // The type of call - public ?\DateTime $updatedAt = null, // Date/time of the last update - public ?array $blockedUserIds = null, - public ?UserResponse $createdBy = null, - public ?object $custom = null, // Custom data for this object - public ?EgressResponse $egress = null, - public ?CallIngressResponse $ingress = null, - public ?CallSettingsResponse $settings = null, - public ?string $channelCid = null, public ?\DateTime $endedAt = null, // Date/time when the call ended - public ?int $joinAheadTimeSeconds = null, - public ?string $routingNumber = null, // 10-digit routing number for SIP routing public ?\DateTime $startsAt = null, // Date/time when the call will start - public ?string $team = null, + public ?bool $backstage = null, + public ?CallSettingsResponse $settings = null, + public ?array $blockedUserIds = null, + public ?CallIngressResponse $ingress = null, public ?CallSessionResponse $session = null, + public ?EgressResponse $egress = null, public ?ThumbnailResponse $thumbnails = null, + public ?int $joinAheadTimeSeconds = null, + public ?string $channelCid = null, + public ?string $routingNumber = null, // 10-digit routing number for SIP routing ) { } diff --git a/src/GeneratedModels/CallRingEvent.php b/src/GeneratedModels/CallRingEvent.php index 212a46ea..63de5d35 100644 --- a/src/GeneratedModels/CallRingEvent.php +++ b/src/GeneratedModels/CallRingEvent.php @@ -5,29 +5,20 @@ namespace GetStream\GeneratedModels; /** * This event is sent to all call members to notify they are getting called - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $sessionID - * @property bool $video - * @property array $members - * @property CallResponse $call - * @property UserResponse $user - * @property string $type */ class CallRingEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.notification" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?string $sessionID = null, // Call session ID - public ?bool $video = null, - /** @var array|null Call members */ + public ?CallResponse $call = null, + /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, // Call members - public ?CallResponse $call = null, public ?UserResponse $user = null, - public ?string $type = null, // The type of event: "call.notification" in this case + public ?bool $video = null, ) { } diff --git a/src/GeneratedModels/CallRtmpBroadcastFailedEvent.php b/src/GeneratedModels/CallRtmpBroadcastFailedEvent.php index a7fd0e60..2d16054a 100644 --- a/src/GeneratedModels/CallRtmpBroadcastFailedEvent.php +++ b/src/GeneratedModels/CallRtmpBroadcastFailedEvent.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a call RTMP broadcast has failed - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $name - * @property string $type */ class CallRtmpBroadcastFailedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, // The unique identifier for a call (:) + public ?string $type = null, // The type of event: "call.rtmp_broadcast_failed" in this case public ?\DateTime $createdAt = null, // Date/time of creation + public ?string $callCid = null, // The unique identifier for a call (:) public ?string $name = null, // Name of the given RTMP broadcast - public ?string $type = null, // The type of event: "call.rtmp_broadcast_failed" in this case ) { } diff --git a/src/GeneratedModels/CallRtmpBroadcastStartedEvent.php b/src/GeneratedModels/CallRtmpBroadcastStartedEvent.php index 8471169f..0b7d6908 100644 --- a/src/GeneratedModels/CallRtmpBroadcastStartedEvent.php +++ b/src/GeneratedModels/CallRtmpBroadcastStartedEvent.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when RTMP broadcast has started - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $name - * @property string $type */ class CallRtmpBroadcastStartedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, // The unique identifier for a call (:) + public ?string $type = null, // The type of event: "call.rtmp_broadcast_started" in this case public ?\DateTime $createdAt = null, // Date/time of creation + public ?string $callCid = null, // The unique identifier for a call (:) public ?string $name = null, // Name of the given RTMP broadcast - public ?string $type = null, // The type of event: "call.rtmp_broadcast_started" in this case ) { } diff --git a/src/GeneratedModels/CallRtmpBroadcastStoppedEvent.php b/src/GeneratedModels/CallRtmpBroadcastStoppedEvent.php index 1fff94d2..50f1bd18 100644 --- a/src/GeneratedModels/CallRtmpBroadcastStoppedEvent.php +++ b/src/GeneratedModels/CallRtmpBroadcastStoppedEvent.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when RTMP broadcast has stopped - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $name - * @property string $type */ class CallRtmpBroadcastStoppedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, // The unique identifier for a call (:) + public ?string $type = null, // The type of event: "call.rtmp_broadcast_stopped" in this case public ?\DateTime $createdAt = null, // Date/time of creation + public ?string $callCid = null, // The unique identifier for a call (:) public ?string $name = null, // Name of the given RTMP broadcast - public ?string $type = null, // The type of event: "call.rtmp_broadcast_stopped" in this case ) { } diff --git a/src/GeneratedModels/CallRuleActionSequence.php b/src/GeneratedModels/CallRuleActionSequence.php new file mode 100644 index 00000000..38722738 --- /dev/null +++ b/src/GeneratedModels/CallRuleActionSequence.php @@ -0,0 +1,17 @@ + $participants - * @property array $acceptedBy - * @property array $missedBy - * @property array $participantsCountByRole - * @property array $rejectedBy - * @property \DateTime|null $endedAt - * @property \DateTime|null $liveEndedAt - * @property \DateTime|null $liveStartedAt - * @property \DateTime|null $startedAt - * @property \DateTime|null $timerEndsAt - */ class CallSessionResponse extends BaseModel { public function __construct( - public ?int $anonymousParticipantCount = null, public ?string $id = null, + public ?\DateTime $startedAt = null, + public ?\DateTime $endedAt = null, /** @var array|null */ #[ArrayOf(CallParticipantResponse::class)] public ?array $participants = null, - public ?array $acceptedBy = null, - public ?array $missedBy = null, public ?array $participantsCountByRole = null, + public ?int $anonymousParticipantCount = null, public ?array $rejectedBy = null, - public ?\DateTime $endedAt = null, - public ?\DateTime $liveEndedAt = null, + public ?array $acceptedBy = null, + public ?array $missedBy = null, public ?\DateTime $liveStartedAt = null, - public ?\DateTime $startedAt = null, + public ?\DateTime $liveEndedAt = null, public ?\DateTime $timerEndsAt = null, ) { } diff --git a/src/GeneratedModels/CallSessionStartedEvent.php b/src/GeneratedModels/CallSessionStartedEvent.php index 57f843f6..86c93159 100644 --- a/src/GeneratedModels/CallSessionStartedEvent.php +++ b/src/GeneratedModels/CallSessionStartedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a call session starts - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $sessionID - * @property CallResponse $call - * @property string $type */ class CallSessionStartedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.session_started" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?string $sessionID = null, // Call session ID public ?CallResponse $call = null, - public ?string $type = null, // The type of event: "call.session_started" in this case ) { } diff --git a/src/GeneratedModels/CallSettings.php b/src/GeneratedModels/CallSettings.php index b6b4fe17..9a147010 100644 --- a/src/GeneratedModels/CallSettings.php +++ b/src/GeneratedModels/CallSettings.php @@ -3,45 +3,25 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property AudioSettings|null $audio - * @property BackstageSettings|null $backstage - * @property BroadcastSettings|null $broadcasting - * @property FrameRecordSettings|null $frameRecording - * @property GeofenceSettings|null $geofencing - * @property IndividualRecordSettings|null $individualRecording - * @property IngressSettings|null $ingress - * @property LimitsSettings|null $limits - * @property RawRecordSettings|null $rawRecording - * @property RecordSettings|null $recording - * @property RingSettings|null $ring - * @property ScreensharingSettings|null $screensharing - * @property SessionSettings|null $session - * @property ThumbnailsSettings|null $thumbnails - * @property TranscriptionSettings|null $transcription - * @property VideoSettings|null $video - */ class CallSettings extends BaseModel { public function __construct( public ?AudioSettings $audio = null, public ?BackstageSettings $backstage = null, - public ?BroadcastSettings $broadcasting = null, + public ?VideoSettings $video = null, + public ?ScreensharingSettings $screensharing = null, + public ?RecordSettings $recording = null, public ?FrameRecordSettings $frameRecording = null, - public ?GeofenceSettings $geofencing = null, public ?IndividualRecordSettings $individualRecording = null, - public ?IngressSettings $ingress = null, - public ?LimitsSettings $limits = null, public ?RawRecordSettings $rawRecording = null, - public ?RecordSettings $recording = null, + public ?BroadcastSettings $broadcasting = null, + public ?GeofenceSettings $geofencing = null, + public ?TranscriptionSettings $transcription = null, public ?RingSettings $ring = null, - public ?ScreensharingSettings $screensharing = null, - public ?SessionSettings $session = null, public ?ThumbnailsSettings $thumbnails = null, - public ?TranscriptionSettings $transcription = null, - public ?VideoSettings $video = null, + public ?LimitsSettings $limits = null, + public ?SessionSettings $session = null, + public ?IngressSettings $ingress = null, ) { } diff --git a/src/GeneratedModels/CallSettingsRequest.php b/src/GeneratedModels/CallSettingsRequest.php index d3447dee..1a94b909 100644 --- a/src/GeneratedModels/CallSettingsRequest.php +++ b/src/GeneratedModels/CallSettingsRequest.php @@ -3,45 +3,25 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property AudioSettingsRequest|null $audio - * @property BackstageSettingsRequest|null $backstage - * @property BroadcastSettingsRequest|null $broadcasting - * @property FrameRecordingSettingsRequest|null $frameRecording - * @property GeofenceSettingsRequest|null $geofencing - * @property IndividualRecordingSettingsRequest|null $individualRecording - * @property IngressSettingsRequest|null $ingress - * @property LimitsSettingsRequest|null $limits - * @property RawRecordingSettingsRequest|null $rawRecording - * @property RecordSettingsRequest|null $recording - * @property RingSettingsRequest|null $ring - * @property ScreensharingSettingsRequest|null $screensharing - * @property SessionSettingsRequest|null $session - * @property ThumbnailsSettingsRequest|null $thumbnails - * @property TranscriptionSettingsRequest|null $transcription - * @property VideoSettingsRequest|null $video - */ class CallSettingsRequest extends BaseModel { public function __construct( public ?AudioSettingsRequest $audio = null, public ?BackstageSettingsRequest $backstage = null, - public ?BroadcastSettingsRequest $broadcasting = null, - public ?FrameRecordingSettingsRequest $frameRecording = null, public ?GeofenceSettingsRequest $geofencing = null, + public ?VideoSettingsRequest $video = null, + public ?RecordSettingsRequest $recording = null, public ?IndividualRecordingSettingsRequest $individualRecording = null, - public ?IngressSettingsRequest $ingress = null, - public ?LimitsSettingsRequest $limits = null, public ?RawRecordingSettingsRequest $rawRecording = null, - public ?RecordSettingsRequest $recording = null, + public ?FrameRecordingSettingsRequest $frameRecording = null, public ?RingSettingsRequest $ring = null, public ?ScreensharingSettingsRequest $screensharing = null, - public ?SessionSettingsRequest $session = null, - public ?ThumbnailsSettingsRequest $thumbnails = null, public ?TranscriptionSettingsRequest $transcription = null, - public ?VideoSettingsRequest $video = null, + public ?BroadcastSettingsRequest $broadcasting = null, + public ?ThumbnailsSettingsRequest $thumbnails = null, + public ?LimitsSettingsRequest $limits = null, + public ?SessionSettingsRequest $session = null, + public ?IngressSettingsRequest $ingress = null, ) { } diff --git a/src/GeneratedModels/CallSettingsResponse.php b/src/GeneratedModels/CallSettingsResponse.php index e3ca2937..befe4b02 100644 --- a/src/GeneratedModels/CallSettingsResponse.php +++ b/src/GeneratedModels/CallSettingsResponse.php @@ -3,44 +3,24 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property AudioSettingsResponse $audio - * @property BackstageSettingsResponse $backstage - * @property BroadcastSettingsResponse $broadcasting - * @property FrameRecordingSettingsResponse $frameRecording - * @property GeofenceSettingsResponse $geofencing - * @property IndividualRecordingSettingsResponse $individualRecording - * @property LimitsSettingsResponse $limits - * @property RawRecordingSettingsResponse $rawRecording - * @property RecordSettingsResponse $recording - * @property RingSettingsResponse $ring - * @property ScreensharingSettingsResponse $screensharing - * @property SessionSettingsResponse $session - * @property ThumbnailsSettingsResponse $thumbnails - * @property TranscriptionSettingsResponse $transcription - * @property VideoSettingsResponse $video - * @property IngressSettingsResponse|null $ingress - */ class CallSettingsResponse extends BaseModel { public function __construct( public ?AudioSettingsResponse $audio = null, public ?BackstageSettingsResponse $backstage = null, public ?BroadcastSettingsResponse $broadcasting = null, - public ?FrameRecordingSettingsResponse $frameRecording = null, public ?GeofenceSettingsResponse $geofencing = null, + public ?RecordSettingsResponse $recording = null, public ?IndividualRecordingSettingsResponse $individualRecording = null, - public ?LimitsSettingsResponse $limits = null, public ?RawRecordingSettingsResponse $rawRecording = null, - public ?RecordSettingsResponse $recording = null, + public ?FrameRecordingSettingsResponse $frameRecording = null, public ?RingSettingsResponse $ring = null, public ?ScreensharingSettingsResponse $screensharing = null, - public ?SessionSettingsResponse $session = null, - public ?ThumbnailsSettingsResponse $thumbnails = null, public ?TranscriptionSettingsResponse $transcription = null, public ?VideoSettingsResponse $video = null, + public ?ThumbnailsSettingsResponse $thumbnails = null, + public ?LimitsSettingsResponse $limits = null, + public ?SessionSettingsResponse $session = null, public ?IngressSettingsResponse $ingress = null, ) { } diff --git a/src/GeneratedModels/CallStateResponseFields.php b/src/GeneratedModels/CallStateResponseFields.php index 41194ae1..a319c4df 100644 --- a/src/GeneratedModels/CallStateResponseFields.php +++ b/src/GeneratedModels/CallStateResponseFields.php @@ -5,21 +5,17 @@ namespace GetStream\GeneratedModels; /** * CallStateResponseFields is the payload for call state response - * - * @property array $members - * @property array $ownCapabilities - * @property CallResponse $call */ class CallStateResponseFields extends BaseModel { public function __construct( - /** @var array|null List of call members */ + public ?CallResponse $call = null, + /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, // List of call members /** @var array|null */ #[ArrayOf(OwnCapability::class)] public ?array $ownCapabilities = null, - public ?CallResponse $call = null, ) { } diff --git a/src/GeneratedModels/CallStatsLocation.php b/src/GeneratedModels/CallStatsLocation.php index 80cf527f..790f1f3c 100644 --- a/src/GeneratedModels/CallStatsLocation.php +++ b/src/GeneratedModels/CallStatsLocation.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $accuracyRadiusMeters - * @property string|null $city - * @property string|null $continent - * @property string|null $country - * @property string|null $countryIsoCode - * @property int|null $latitude - * @property int|null $longitude - * @property string|null $subdivision - */ class CallStatsLocation extends BaseModel { public function __construct( - public ?int $accuracyRadiusMeters = null, public ?string $city = null, - public ?string $continent = null, + public ?string $subdivision = null, public ?string $country = null, public ?string $countryIsoCode = null, + public ?string $continent = null, public ?int $latitude = null, public ?int $longitude = null, - public ?string $subdivision = null, + public ?int $accuracyRadiusMeters = null, ) { } diff --git a/src/GeneratedModels/CallStatsMapLocation.php b/src/GeneratedModels/CallStatsMapLocation.php index fbe29ea0..c518209a 100644 --- a/src/GeneratedModels/CallStatsMapLocation.php +++ b/src/GeneratedModels/CallStatsMapLocation.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $count - * @property int $liveCount - * @property CallStatsLocation|null $location - */ class CallStatsMapLocation extends BaseModel { public function __construct( + public ?CallStatsLocation $location = null, public ?int $count = null, public ?int $liveCount = null, - public ?CallStatsLocation $location = null, ) { } diff --git a/src/GeneratedModels/CallStatsMapPublisher.php b/src/GeneratedModels/CallStatsMapPublisher.php index 582c04c3..1d18706a 100644 --- a/src/GeneratedModels/CallStatsMapPublisher.php +++ b/src/GeneratedModels/CallStatsMapPublisher.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $isLive - * @property string $userID - * @property string $userSessionID - * @property PublishedTrackFlags $publishedTracks - * @property string|null $name - * @property string|null $publisherType - * @property CallStatsLocation|null $location - */ class CallStatsMapPublisher extends BaseModel { public function __construct( - public ?bool $isLive = null, public ?string $userID = null, - public ?string $userSessionID = null, - public ?PublishedTrackFlags $publishedTracks = null, public ?string $name = null, + public ?string $userSessionID = null, public ?string $publisherType = null, public ?CallStatsLocation $location = null, + public ?PublishedTrackFlags $publishedTracks = null, + public ?bool $isLive = null, ) { } diff --git a/src/GeneratedModels/CallStatsMapPublishers.php b/src/GeneratedModels/CallStatsMapPublishers.php index a4d367f3..1f211599 100644 --- a/src/GeneratedModels/CallStatsMapPublishers.php +++ b/src/GeneratedModels/CallStatsMapPublishers.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $publishers - */ class CallStatsMapPublishers extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CallStatsMapSFUs.php b/src/GeneratedModels/CallStatsMapSFUs.php index 3ecb5f0b..94f8e6d2 100644 --- a/src/GeneratedModels/CallStatsMapSFUs.php +++ b/src/GeneratedModels/CallStatsMapSFUs.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $locations - */ class CallStatsMapSFUs extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CallStatsMapSubscriber.php b/src/GeneratedModels/CallStatsMapSubscriber.php index 61e14e47..66685f82 100644 --- a/src/GeneratedModels/CallStatsMapSubscriber.php +++ b/src/GeneratedModels/CallStatsMapSubscriber.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $isLive - * @property string $userID - * @property string $userSessionID - * @property string|null $name - * @property CallStatsLocation|null $location - */ class CallStatsMapSubscriber extends BaseModel { public function __construct( - public ?bool $isLive = null, public ?string $userID = null, - public ?string $userSessionID = null, public ?string $name = null, + public ?string $userSessionID = null, public ?CallStatsLocation $location = null, + public ?bool $isLive = null, ) { } diff --git a/src/GeneratedModels/CallStatsMapSubscribers.php b/src/GeneratedModels/CallStatsMapSubscribers.php index a29ebe18..3ebb23c5 100644 --- a/src/GeneratedModels/CallStatsMapSubscribers.php +++ b/src/GeneratedModels/CallStatsMapSubscribers.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $locations - * @property array|null $participants - */ class CallStatsMapSubscribers extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CallStatsParticipant.php b/src/GeneratedModels/CallStatsParticipant.php index 44aa12a3..85007396 100644 --- a/src/GeneratedModels/CallStatsParticipant.php +++ b/src/GeneratedModels/CallStatsParticipant.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $userID - * @property array $sessions - * @property \DateTime|null $latestActivityAt - * @property string|null $name - * @property array|null $roles - */ class CallStatsParticipant extends BaseModel { public function __construct( public ?string $userID = null, + public ?string $name = null, + public ?array $roles = null, /** @var array|null */ #[ArrayOf(CallStatsParticipantSession::class)] public ?array $sessions = null, public ?\DateTime $latestActivityAt = null, - public ?string $name = null, - public ?array $roles = null, ) { } diff --git a/src/GeneratedModels/CallStatsParticipantCounts.php b/src/GeneratedModels/CallStatsParticipantCounts.php index 7bc3fe12..9c40df85 100644 --- a/src/GeneratedModels/CallStatsParticipantCounts.php +++ b/src/GeneratedModels/CallStatsParticipantCounts.php @@ -3,26 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $liveSessions - * @property int $participants - * @property int $peakConcurrentSessions - * @property int $peakConcurrentUsers - * @property int $publishers - * @property int $sessions - * @property int|null $totalParticipantDuration - */ class CallStatsParticipantCounts extends BaseModel { public function __construct( - public ?int $liveSessions = null, public ?int $participants = null, - public ?int $peakConcurrentSessions = null, - public ?int $peakConcurrentUsers = null, - public ?int $publishers = null, public ?int $sessions = null, + public ?int $liveSessions = null, + public ?int $publishers = null, + public ?int $peakConcurrentUsers = null, + public ?int $peakConcurrentSessions = null, public ?int $totalParticipantDuration = null, ) { } diff --git a/src/GeneratedModels/CallStatsParticipantSession.php b/src/GeneratedModels/CallStatsParticipantSession.php index ea739f2a..9c45b46f 100644 --- a/src/GeneratedModels/CallStatsParticipantSession.php +++ b/src/GeneratedModels/CallStatsParticipantSession.php @@ -3,49 +3,27 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $isLive - * @property string $userSessionID - * @property PublishedTrackFlags $publishedTracks - * @property string|null $browser - * @property string|null $browserVersion - * @property int|null $cqScore - * @property string|null $currentIp - * @property string|null $currentSfu - * @property int|null $distanceToSfuKilometers - * @property \DateTime|null $endedAt - * @property string|null $os - * @property string|null $publisherType - * @property string|null $sdk - * @property string|null $sdkVersion - * @property \DateTime|null $startedAt - * @property string|null $unifiedSessionID - * @property string|null $webrtcVersion - * @property CallStatsLocation|null $location - */ class CallStatsParticipantSession extends BaseModel { public function __construct( - public ?bool $isLive = null, public ?string $userSessionID = null, - public ?PublishedTrackFlags $publishedTracks = null, - public ?string $browser = null, - public ?string $browserVersion = null, - public ?int $cqScore = null, - public ?string $currentIp = null, - public ?string $currentSfu = null, - public ?int $distanceToSfuKilometers = null, + public ?string $unifiedSessionID = null, + public ?\DateTime $startedAt = null, public ?\DateTime $endedAt = null, - public ?string $os = null, + public ?bool $isLive = null, public ?string $publisherType = null, public ?string $sdk = null, public ?string $sdkVersion = null, - public ?\DateTime $startedAt = null, - public ?string $unifiedSessionID = null, public ?string $webrtcVersion = null, + public ?string $browser = null, + public ?string $browserVersion = null, + public ?string $currentIp = null, + public ?string $currentSfu = null, + public ?int $distanceToSfuKilometers = null, public ?CallStatsLocation $location = null, + public ?PublishedTrackFlags $publishedTracks = null, + public ?int $cqScore = null, + public ?string $os = null, ) { } diff --git a/src/GeneratedModels/CallStatsReportReadyEvent.php b/src/GeneratedModels/CallStatsReportReadyEvent.php index 545e2e75..1e8d1fab 100644 --- a/src/GeneratedModels/CallStatsReportReadyEvent.php +++ b/src/GeneratedModels/CallStatsReportReadyEvent.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when the insights report is ready - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $sessionID - * @property string $type */ class CallStatsReportReadyEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event, "call.report_ready" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?string $sessionID = null, // Call session ID - public ?string $type = null, // The type of event, "call.report_ready" in this case ) { } diff --git a/src/GeneratedModels/CallStatsReportSummaryResponse.php b/src/GeneratedModels/CallStatsReportSummaryResponse.php index 6b69c478..cc50fd39 100644 --- a/src/GeneratedModels/CallStatsReportSummaryResponse.php +++ b/src/GeneratedModels/CallStatsReportSummaryResponse.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $callCid - * @property int $callDurationSeconds - * @property string $callSessionID - * @property string $callStatus - * @property \DateTime $firstStatsTime - * @property \DateTime|null $createdAt - * @property int|null $minUserRating - * @property int|null $qualityScore - */ class CallStatsReportSummaryResponse extends BaseModel { public function __construct( public ?string $callCid = null, - public ?int $callDurationSeconds = null, public ?string $callSessionID = null, - public ?string $callStatus = null, public ?\DateTime $firstStatsTime = null, - public ?\DateTime $createdAt = null, - public ?int $minUserRating = null, + public ?string $callStatus = null, public ?int $qualityScore = null, + public ?int $minUserRating = null, + public ?\DateTime $createdAt = null, + public ?int $callDurationSeconds = null, ) { } diff --git a/src/GeneratedModels/CallTranscription.php b/src/GeneratedModels/CallTranscription.php index 10aa3d63..f4d9a271 100644 --- a/src/GeneratedModels/CallTranscription.php +++ b/src/GeneratedModels/CallTranscription.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * CallTranscription represents a transcription of a call. - * - * @property \DateTime $endTime - * @property string $filename - * @property string $sessionID - * @property \DateTime $startTime - * @property string $url */ class CallTranscription extends BaseModel { public function __construct( - public ?\DateTime $endTime = null, public ?string $filename = null, - public ?string $sessionID = null, - public ?\DateTime $startTime = null, public ?string $url = null, + public ?\DateTime $startTime = null, + public ?\DateTime $endTime = null, + public ?string $sessionID = null, ) { } diff --git a/src/GeneratedModels/CallTranscriptionFailedEvent.php b/src/GeneratedModels/CallTranscriptionFailedEvent.php index 81c5b43b..ccf0c8e3 100644 --- a/src/GeneratedModels/CallTranscriptionFailedEvent.php +++ b/src/GeneratedModels/CallTranscriptionFailedEvent.php @@ -5,20 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when call transcription has failed - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property string $type - * @property string|null $error */ class CallTranscriptionFailedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.transcription_failed" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?string $egressID = null, - public ?string $type = null, // The type of event: "call.transcription_failed" in this case public ?string $error = null, // The error message detailing why transcription failed. ) { } diff --git a/src/GeneratedModels/CallTranscriptionReadyEvent.php b/src/GeneratedModels/CallTranscriptionReadyEvent.php index 5ea5d27e..9db4bc08 100644 --- a/src/GeneratedModels/CallTranscriptionReadyEvent.php +++ b/src/GeneratedModels/CallTranscriptionReadyEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when call transcription is ready - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property CallTranscription $callTranscription - * @property string $type */ class CallTranscriptionReadyEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.transcription_ready" in this case public ?\DateTime $createdAt = null, - public ?string $egressID = null, + public ?string $callCid = null, public ?CallTranscription $callTranscription = null, - public ?string $type = null, // The type of event: "call.transcription_ready" in this case + public ?string $egressID = null, ) { } diff --git a/src/GeneratedModels/CallTranscriptionStartedEvent.php b/src/GeneratedModels/CallTranscriptionStartedEvent.php index 8b1a4846..60d54f3f 100644 --- a/src/GeneratedModels/CallTranscriptionStartedEvent.php +++ b/src/GeneratedModels/CallTranscriptionStartedEvent.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when call transcription has started - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property string $type */ class CallTranscriptionStartedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, - public ?\DateTime $createdAt = null, public ?string $egressID = null, public ?string $type = null, // The type of event: "call.transcription_started" in this case + public ?\DateTime $createdAt = null, + public ?string $callCid = null, ) { } diff --git a/src/GeneratedModels/CallTranscriptionStoppedEvent.php b/src/GeneratedModels/CallTranscriptionStoppedEvent.php index dbdc5b47..08ff312f 100644 --- a/src/GeneratedModels/CallTranscriptionStoppedEvent.php +++ b/src/GeneratedModels/CallTranscriptionStoppedEvent.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when call transcription has stopped - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $egressID - * @property string $type */ class CallTranscriptionStoppedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.transcription_stopped" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?string $egressID = null, - public ?string $type = null, // The type of event: "call.transcription_stopped" in this case ) { } diff --git a/src/GeneratedModels/CallType.php b/src/GeneratedModels/CallType.php index 898ea8ea..43ca613d 100644 --- a/src/GeneratedModels/CallType.php +++ b/src/GeneratedModels/CallType.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $app - * @property \DateTime $createdAt - * @property int $id - * @property string $name - * @property string $recordingExternalStorage - * @property \DateTime $updatedAt - * @property NotificationSettings|null $notificationSettings - * @property CallSettings|null $settings - */ class CallType extends BaseModel { public function __construct( - public ?int $app = null, - public ?\DateTime $createdAt = null, public ?int $id = null, + public ?int $app = null, public ?string $name = null, - public ?string $recordingExternalStorage = null, + public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, - public ?NotificationSettings $notificationSettings = null, public ?CallSettings $settings = null, + public ?NotificationSettings $notificationSettings = null, + public ?string $recordingExternalStorage = null, ) { } diff --git a/src/GeneratedModels/CallTypeResponse.php b/src/GeneratedModels/CallTypeResponse.php index 40a8b3a9..dd5ead6d 100644 --- a/src/GeneratedModels/CallTypeResponse.php +++ b/src/GeneratedModels/CallTypeResponse.php @@ -5,24 +5,16 @@ namespace GetStream\GeneratedModels; /** * CallTypeResponse is the payload for a call type. - * - * @property \DateTime $createdAt - * @property string $name - * @property \DateTime $updatedAt - * @property array $grants - * @property NotificationSettings $notificationSettings - * @property CallSettingsResponse $settings - * @property string|null $externalStorage */ class CallTypeResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // the time the call type was created public ?string $name = null, // the name of the call type - public ?\DateTime $updatedAt = null, // the time the call type was last updated public ?array $grants = null, // the permissions granted to each role - public ?NotificationSettings $notificationSettings = null, public ?CallSettingsResponse $settings = null, + public ?NotificationSettingsResponse $notificationSettings = null, + public ?\DateTime $createdAt = null, // the time the call type was created + public ?\DateTime $updatedAt = null, // the time the call type was last updated public ?string $externalStorage = null, // the external storage for the call type ) { } diff --git a/src/GeneratedModels/CallTypeRuleParameters.php b/src/GeneratedModels/CallTypeRuleParameters.php new file mode 100644 index 00000000..7f32060f --- /dev/null +++ b/src/GeneratedModels/CallTypeRuleParameters.php @@ -0,0 +1,15 @@ + $daily - */ class CallsPerDayReportResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CampaignChannelMember.php b/src/GeneratedModels/CampaignChannelMember.php index 7018644c..e083283e 100644 --- a/src/GeneratedModels/CampaignChannelMember.php +++ b/src/GeneratedModels/CampaignChannelMember.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $userID - * @property string|null $channelRole - * @property object|null $custom - */ class CampaignChannelMember extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CampaignChannelTemplate.php b/src/GeneratedModels/CampaignChannelTemplate.php index 48bc2f98..a57910c0 100644 --- a/src/GeneratedModels/CampaignChannelTemplate.php +++ b/src/GeneratedModels/CampaignChannelTemplate.php @@ -3,27 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $type - * @property object $custom - * @property string|null $id - * @property string|null $team - * @property array|null $members - * @property array|null $membersTemplate - */ class CampaignChannelTemplate extends BaseModel { public function __construct( public ?string $type = null, - public ?object $custom = null, public ?string $id = null, - public ?string $team = null, public ?array $members = null, /** @var array|null */ #[ArrayOf(CampaignChannelMember::class)] public ?array $membersTemplate = null, + public ?string $team = null, + public ?object $custom = null, ) { } diff --git a/src/GeneratedModels/CampaignCompletedEvent.php b/src/GeneratedModels/CampaignCompletedEvent.php index 685c6d7f..aac650ee 100644 --- a/src/GeneratedModels/CampaignCompletedEvent.php +++ b/src/GeneratedModels/CampaignCompletedEvent.php @@ -3,22 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property CampaignResponse|null $campaign - */ class CampaignCompletedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?object $custom = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?CampaignResponse $campaign = null, ) { } diff --git a/src/GeneratedModels/CampaignMessageTemplate.php b/src/GeneratedModels/CampaignMessageTemplate.php index f94773f3..597a331b 100644 --- a/src/GeneratedModels/CampaignMessageTemplate.php +++ b/src/GeneratedModels/CampaignMessageTemplate.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $pollID - * @property bool $searchable - * @property string $text - * @property array $attachments - * @property object $custom - */ class CampaignMessageTemplate extends BaseModel { public function __construct( - public ?string $pollID = null, - public ?bool $searchable = null, public ?string $text = null, /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, + public ?string $pollID = null, public ?object $custom = null, + public ?bool $searchable = null, ) { } diff --git a/src/GeneratedModels/CampaignResponse.php b/src/GeneratedModels/CampaignResponse.php index 186ff29e..e8605a4d 100644 --- a/src/GeneratedModels/CampaignResponse.php +++ b/src/GeneratedModels/CampaignResponse.php @@ -3,63 +3,36 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $createChannels - * @property \DateTime $createdAt - * @property string $description - * @property string $id - * @property string $name - * @property string $senderID - * @property string $senderMode - * @property string $senderVisibility - * @property bool $showChannels - * @property bool $skipPush - * @property bool $skipWebhook - * @property string $status - * @property \DateTime $updatedAt - * @property array $segmentIds - * @property array $segments - * @property array $userIds - * @property array $users - * @property CampaignStatsResponse $stats - * @property \DateTime|null $scheduledFor - * @property \DateTime|null $stopAt - * @property CampaignChannelTemplate|null $channelTemplate - * @property CampaignMessageTemplate|null $messageTemplate - * @property UserResponse|null $sender - */ class CampaignResponse extends BaseModel { public function __construct( - public ?bool $createChannels = null, - public ?\DateTime $createdAt = null, - public ?string $description = null, public ?string $id = null, - public ?string $name = null, + public ?array $segmentIds = null, + /** @var array|null */ + #[ArrayOf(Segment::class)] + public ?array $segments = null, public ?string $senderID = null, + public ?UserResponse $sender = null, public ?string $senderMode = null, public ?string $senderVisibility = null, + public ?string $name = null, + public ?bool $createChannels = null, public ?bool $showChannels = null, + public ?string $description = null, public ?bool $skipPush = null, public ?bool $skipWebhook = null, - public ?string $status = null, - public ?\DateTime $updatedAt = null, - public ?array $segmentIds = null, - /** @var array|null */ - #[ArrayOf(Segment::class)] - public ?array $segments = null, + public ?\DateTime $scheduledFor = null, + public ?\DateTime $stopAt = null, + public ?CampaignMessageTemplate $messageTemplate = null, + public ?CampaignChannelTemplate $channelTemplate = null, public ?array $userIds = null, /** @var array|null */ #[ArrayOf(UserResponse::class)] public ?array $users = null, + public ?string $status = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, public ?CampaignStatsResponse $stats = null, - public ?\DateTime $scheduledFor = null, - public ?\DateTime $stopAt = null, - public ?CampaignChannelTemplate $channelTemplate = null, - public ?CampaignMessageTemplate $messageTemplate = null, - public ?UserResponse $sender = null, ) { } diff --git a/src/GeneratedModels/CampaignStartedEvent.php b/src/GeneratedModels/CampaignStartedEvent.php index 1d2d50c7..cbfeb2fe 100644 --- a/src/GeneratedModels/CampaignStartedEvent.php +++ b/src/GeneratedModels/CampaignStartedEvent.php @@ -3,22 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property CampaignResponse|null $campaign - */ class CampaignStartedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?object $custom = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?CampaignResponse $campaign = null, ) { } diff --git a/src/GeneratedModels/CampaignStatsResponse.php b/src/GeneratedModels/CampaignStatsResponse.php index 83c04f3f..0b4dd5fd 100644 --- a/src/GeneratedModels/CampaignStatsResponse.php +++ b/src/GeneratedModels/CampaignStatsResponse.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $progress - * @property int $statsChannelsCreated - * @property \DateTime $statsCompletedAt - * @property int $statsMessagesSent - * @property \DateTime $statsStartedAt - * @property int $statsUsersRead - * @property int $statsUsersSent - */ class CampaignStatsResponse extends BaseModel { public function __construct( - public ?int $progress = null, - public ?int $statsChannelsCreated = null, + public ?\DateTime $statsStartedAt = null, public ?\DateTime $statsCompletedAt = null, public ?int $statsMessagesSent = null, - public ?\DateTime $statsStartedAt = null, - public ?int $statsUsersRead = null, + public ?int $statsChannelsCreated = null, + public ?int $progress = null, public ?int $statsUsersSent = null, + public ?int $statsUsersRead = null, ) { } diff --git a/src/GeneratedModels/CastPollVoteRequest.php b/src/GeneratedModels/CastPollVoteRequest.php index 84494894..bbce5b9b 100644 --- a/src/GeneratedModels/CastPollVoteRequest.php +++ b/src/GeneratedModels/CastPollVoteRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $userID - * @property UserRequest|null $user - * @property VoteData|null $vote - */ class CastPollVoteRequest extends BaseModel { public function __construct( + public ?VoteData $vote = null, public ?string $userID = null, public ?UserRequest $user = null, - public ?VoteData $vote = null, ) { } diff --git a/src/GeneratedModels/ChannelBatchCompletedEvent.php b/src/GeneratedModels/ChannelBatchCompletedEvent.php index b5296544..924db849 100644 --- a/src/GeneratedModels/ChannelBatchCompletedEvent.php +++ b/src/GeneratedModels/ChannelBatchCompletedEvent.php @@ -3,37 +3,22 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $batchCreatedAt - * @property \DateTime $createdAt - * @property \DateTime $finishedAt - * @property string $operation - * @property string $status - * @property int $successChannelsCount - * @property string $taskID - * @property array $failedChannels - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - */ class ChannelBatchCompletedEvent extends BaseModel { public function __construct( - public ?\DateTime $batchCreatedAt = null, + public ?string $type = null, public ?\DateTime $createdAt = null, - public ?\DateTime $finishedAt = null, + public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?string $operation = null, public ?string $status = null, - public ?int $successChannelsCount = null, public ?string $taskID = null, /** @var array|null */ #[ArrayOf(FailedChannelUpdates::class)] public ?array $failedChannels = null, - public ?object $custom = null, - public ?string $type = null, - public ?\DateTime $receivedAt = null, + public ?int $successChannelsCount = null, + public ?\DateTime $batchCreatedAt = null, + public ?\DateTime $finishedAt = null, ) { } diff --git a/src/GeneratedModels/ChannelBatchStartedEvent.php b/src/GeneratedModels/ChannelBatchStartedEvent.php index 49d731ce..8b60fcdd 100644 --- a/src/GeneratedModels/ChannelBatchStartedEvent.php +++ b/src/GeneratedModels/ChannelBatchStartedEvent.php @@ -3,37 +3,22 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $batchCreatedAt - * @property \DateTime $createdAt - * @property \DateTime $finishedAt - * @property string $operation - * @property string $status - * @property int $successChannelsCount - * @property string $taskID - * @property array $failedChannels - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - */ class ChannelBatchStartedEvent extends BaseModel { public function __construct( - public ?\DateTime $batchCreatedAt = null, + public ?string $type = null, public ?\DateTime $createdAt = null, - public ?\DateTime $finishedAt = null, + public ?\DateTime $receivedAt = null, + public ?object $custom = null, public ?string $operation = null, public ?string $status = null, - public ?int $successChannelsCount = null, public ?string $taskID = null, /** @var array|null */ #[ArrayOf(FailedChannelUpdates::class)] public ?array $failedChannels = null, - public ?object $custom = null, - public ?string $type = null, - public ?\DateTime $receivedAt = null, + public ?int $successChannelsCount = null, + public ?\DateTime $batchCreatedAt = null, + public ?\DateTime $finishedAt = null, ) { } diff --git a/src/GeneratedModels/ChannelConfig.php b/src/GeneratedModels/ChannelConfig.php index 5ad365cf..fc89708d 100644 --- a/src/GeneratedModels/ChannelConfig.php +++ b/src/GeneratedModels/ChannelConfig.php @@ -3,83 +3,46 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $automod - * @property string $automodBehavior - * @property bool $connectEvents - * @property bool $countMessages - * @property \DateTime $createdAt - * @property bool $customEvents - * @property bool $deliveryEvents - * @property bool $markMessagesPending - * @property int $maxMessageLength - * @property bool $mutes - * @property string $name - * @property bool $polls - * @property bool $pushNotifications - * @property bool $quotes - * @property bool $reactions - * @property bool $readEvents - * @property bool $reminders - * @property bool $replies - * @property bool $search - * @property bool $sharedLocations - * @property bool $skipLastMsgUpdateForSystemMsgs - * @property bool $typingEvents - * @property \DateTime $updatedAt - * @property bool $uploads - * @property bool $urlEnrichment - * @property bool $userMessageReminders - * @property array $commands - * @property string|null $blocklist - * @property string|null $blocklistBehavior - * @property int|null $partitionSize - * @property string|null $partitionTtl - * @property array|null $allowedFlagReasons - * @property array|null $blocklists - * @property Thresholds|null $automodThresholds - */ class ChannelConfig extends BaseModel { public function __construct( - public ?string $automod = null, - public ?string $automodBehavior = null, + public ?string $name = null, + public ?bool $typingEvents = null, + public ?bool $readEvents = null, public ?bool $connectEvents = null, - public ?bool $countMessages = null, - public ?\DateTime $createdAt = null, - public ?bool $customEvents = null, public ?bool $deliveryEvents = null, - public ?bool $markMessagesPending = null, - public ?int $maxMessageLength = null, - public ?bool $mutes = null, - public ?string $name = null, - public ?bool $polls = null, - public ?bool $pushNotifications = null, - public ?bool $quotes = null, + public ?bool $search = null, public ?bool $reactions = null, - public ?bool $readEvents = null, - public ?bool $reminders = null, public ?bool $replies = null, - public ?bool $search = null, - public ?bool $sharedLocations = null, - public ?bool $skipLastMsgUpdateForSystemMsgs = null, - public ?bool $typingEvents = null, - public ?\DateTime $updatedAt = null, + public ?bool $quotes = null, + public ?bool $mutes = null, public ?bool $uploads = null, public ?bool $urlEnrichment = null, + public ?bool $customEvents = null, + public ?bool $pushNotifications = null, + public ?bool $reminders = null, + public ?bool $markMessagesPending = null, + public ?bool $polls = null, public ?bool $userMessageReminders = null, - public ?array $commands = null, // List of commands that channel supports + public ?bool $sharedLocations = null, + public ?bool $countMessages = null, + public ?int $maxMessageLength = null, + public ?string $automod = null, + public ?string $automodBehavior = null, public ?string $blocklist = null, public ?string $blocklistBehavior = null, - public ?int $partitionSize = null, - public ?string $partitionTtl = null, - public ?array $allowedFlagReasons = null, /** @var array|null */ #[ArrayOf(BlockListOptions::class)] public ?array $blocklists = null, + public ?array $allowedFlagReasons = null, public ?Thresholds $automodThresholds = null, + public ?int $partitionSize = null, + public ?string $partitionTtl = null, + public ?bool $skipLastMsgUpdateForSystemMsgs = null, + public ?string $pushLevel = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, + public ?array $commands = null, // List of commands that channel supports ) { } diff --git a/src/GeneratedModels/ChannelConfigWithInfo.php b/src/GeneratedModels/ChannelConfigWithInfo.php index e0b95b17..da40d649 100644 --- a/src/GeneratedModels/ChannelConfigWithInfo.php +++ b/src/GeneratedModels/ChannelConfigWithInfo.php @@ -3,86 +3,48 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $automod - * @property string $automodBehavior - * @property bool $connectEvents - * @property bool $countMessages - * @property \DateTime $createdAt - * @property bool $customEvents - * @property bool $deliveryEvents - * @property bool $markMessagesPending - * @property int $maxMessageLength - * @property bool $mutes - * @property string $name - * @property bool $polls - * @property bool $pushNotifications - * @property bool $quotes - * @property bool $reactions - * @property bool $readEvents - * @property bool $reminders - * @property bool $replies - * @property bool $search - * @property bool $sharedLocations - * @property bool $skipLastMsgUpdateForSystemMsgs - * @property bool $typingEvents - * @property \DateTime $updatedAt - * @property bool $uploads - * @property bool $urlEnrichment - * @property bool $userMessageReminders - * @property array $commands - * @property string|null $blocklist - * @property string|null $blocklistBehavior - * @property int|null $partitionSize - * @property string|null $partitionTtl - * @property array|null $allowedFlagReasons - * @property array|null $blocklists - * @property Thresholds|null $automodThresholds - * @property array|null $grants - */ class ChannelConfigWithInfo extends BaseModel { public function __construct( - public ?string $automod = null, - public ?string $automodBehavior = null, - public ?bool $connectEvents = null, - public ?bool $countMessages = null, public ?\DateTime $createdAt = null, - public ?bool $customEvents = null, - public ?bool $deliveryEvents = null, - public ?bool $markMessagesPending = null, - public ?int $maxMessageLength = null, - public ?bool $mutes = null, + public ?\DateTime $updatedAt = null, public ?string $name = null, - public ?bool $polls = null, - public ?bool $pushNotifications = null, - public ?bool $quotes = null, - public ?bool $reactions = null, + public ?bool $typingEvents = null, public ?bool $readEvents = null, - public ?bool $reminders = null, - public ?bool $replies = null, + public ?bool $connectEvents = null, + public ?bool $deliveryEvents = null, public ?bool $search = null, - public ?bool $sharedLocations = null, - public ?bool $skipLastMsgUpdateForSystemMsgs = null, - public ?bool $typingEvents = null, - public ?\DateTime $updatedAt = null, + public ?bool $reactions = null, + public ?bool $replies = null, + public ?bool $quotes = null, + public ?bool $mutes = null, public ?bool $uploads = null, public ?bool $urlEnrichment = null, + public ?bool $customEvents = null, + public ?bool $pushNotifications = null, + public ?bool $reminders = null, + public ?bool $markMessagesPending = null, + public ?bool $polls = null, public ?bool $userMessageReminders = null, - /** @var array|null */ - #[ArrayOf(Command::class)] - public ?array $commands = null, + public ?bool $sharedLocations = null, + public ?bool $countMessages = null, + public ?int $maxMessageLength = null, + public ?string $automod = null, + public ?string $automodBehavior = null, public ?string $blocklist = null, public ?string $blocklistBehavior = null, - public ?int $partitionSize = null, - public ?string $partitionTtl = null, - public ?array $allowedFlagReasons = null, /** @var array|null */ #[ArrayOf(BlockListOptions::class)] public ?array $blocklists = null, + public ?array $allowedFlagReasons = null, public ?Thresholds $automodThresholds = null, + public ?int $partitionSize = null, + public ?string $partitionTtl = null, + public ?bool $skipLastMsgUpdateForSystemMsgs = null, + public ?string $pushLevel = null, + /** @var array|null */ + #[ArrayOf(Command::class)] + public ?array $commands = null, public ?array $grants = null, ) { } diff --git a/src/GeneratedModels/ChannelCreatedEvent.php b/src/GeneratedModels/ChannelCreatedEvent.php index 19b9571d..bcd1d371 100644 --- a/src/GeneratedModels/ChannelCreatedEvent.php +++ b/src/GeneratedModels/ChannelCreatedEvent.php @@ -4,16 +4,24 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property string $type + * Emitted when a channel is successfully created. */ class ChannelCreatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $type = null, + public ?string $type = null, // The type of event: "channel.created" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel which was created + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel which was created + public ?string $channelID = null, // The ID of the channel which was created + public ?ChannelResponse $channel = null, + public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/ChannelDeletedEvent.php b/src/GeneratedModels/ChannelDeletedEvent.php index 9c9f5242..942d8f91 100644 --- a/src/GeneratedModels/ChannelDeletedEvent.php +++ b/src/GeneratedModels/ChannelDeletedEvent.php @@ -4,28 +4,24 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property int $channelMemberCount - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property string|null $team - * @property ChannelResponse|null $channel + * Emitted when a channel is successfully deleted. */ class ChannelDeletedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?int $channelMemberCount = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?string $team = null, + public ?string $type = null, // The type of event: "channel.deleted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel which was deleted + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel which was deleted + public ?string $channelID = null, // The ID of the channel which was deleted public ?ChannelResponse $channel = null, + public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/ChannelExport.php b/src/GeneratedModels/ChannelExport.php index 3dd58015..f4314768 100644 --- a/src/GeneratedModels/ChannelExport.php +++ b/src/GeneratedModels/ChannelExport.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $cid - * @property string|null $id - * @property \DateTime|null $messagesSince - * @property \DateTime|null $messagesUntil - * @property string|null $type - */ class ChannelExport extends BaseModel { public function __construct( - public ?string $cid = null, + public ?string $type = null, // Channel type public ?string $id = null, // Channel ID + public ?string $cid = null, public ?\DateTime $messagesSince = null, // Date to export messages since public ?\DateTime $messagesUntil = null, // Date to export messages until - public ?string $type = null, // Channel type ) { } diff --git a/src/GeneratedModels/ChannelFrozenEvent.php b/src/GeneratedModels/ChannelFrozenEvent.php index a9f5fc75..107d17e2 100644 --- a/src/GeneratedModels/ChannelFrozenEvent.php +++ b/src/GeneratedModels/ChannelFrozenEvent.php @@ -4,22 +4,18 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type + * Emitted when a channel is successfully frozen. */ class ChannelFrozenEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, + public ?string $type = null, // The type of event: "channel.frozen" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel which was frozen + public ?string $channelType = null, // The type of the channel which was frozen + public ?string $channelID = null, // The ID of the channel which was frozen ) { } diff --git a/src/GeneratedModels/ChannelGetOrCreateRequest.php b/src/GeneratedModels/ChannelGetOrCreateRequest.php index e5c49717..ab33d891 100644 --- a/src/GeneratedModels/ChannelGetOrCreateRequest.php +++ b/src/GeneratedModels/ChannelGetOrCreateRequest.php @@ -3,26 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $hideForCreator - * @property bool|null $state - * @property bool|null $threadUnreadCounts - * @property ChannelInput|null $data - * @property PaginationParams|null $members - * @property MessagePaginationParams|null $messages - * @property PaginationParams|null $watchers - */ class ChannelGetOrCreateRequest extends BaseModel { public function __construct( - public ?bool $hideForCreator = null, // Whether this channel will be hidden for the user who created the channel or not + public ?ChannelInput $data = null, public ?bool $state = null, // Refresh channel state + public ?bool $hideForCreator = null, // Whether this channel will be hidden for the user who created the channel or not public ?bool $threadUnreadCounts = null, - public ?ChannelInput $data = null, - public ?PaginationParams $members = null, public ?MessagePaginationParams $messages = null, + public ?PaginationParams $members = null, public ?PaginationParams $watchers = null, ) { } diff --git a/src/GeneratedModels/ChannelHiddenEvent.php b/src/GeneratedModels/ChannelHiddenEvent.php index 2fd4af6f..44b9142c 100644 --- a/src/GeneratedModels/ChannelHiddenEvent.php +++ b/src/GeneratedModels/ChannelHiddenEvent.php @@ -4,30 +4,25 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property int $channelMemberCount - * @property string $channelType - * @property string $cid - * @property bool $clearHistory - * @property \DateTime $createdAt - * @property string $type - * @property ChannelResponse|null $channel - * @property User|null $user + * Emitted when a channel is successfully hidden. */ class ChannelHiddenEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?int $channelMemberCount = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?bool $clearHistory = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, + public ?string $type = null, // The type of event: "channel.hidden" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel which was hidden + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel which was hidden + public ?string $channelID = null, // The ID of the channel which was hidden public ?ChannelResponse $channel = null, - public ?User $user = null, + public ?UserResponseCommonFields $user = null, + public ?bool $clearHistory = null, // Whether the history was cleared ) { } diff --git a/src/GeneratedModels/ChannelInput.php b/src/GeneratedModels/ChannelInput.php index 1b9dbf0e..b0687952 100644 --- a/src/GeneratedModels/ChannelInput.php +++ b/src/GeneratedModels/ChannelInput.php @@ -3,34 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $autoTranslationEnabled - * @property string|null $autoTranslationLanguage - * @property string|null $createdByID - * @property bool|null $disabled - * @property bool|null $frozen - * @property string|null $team - * @property string|null $truncatedByID - * @property array|null $filterTags - * @property array|null $invites - * @property array|null $members - * @property ChannelConfig|null $configOverrides - * @property UserRequest|null $createdBy - * @property object|null $custom - */ class ChannelInput extends BaseModel { public function __construct( + public ?string $team = null, // Team the channel belongs to (if multi-tenant mode is enabled) public ?bool $autoTranslationEnabled = null, // Enable or disable auto translation public ?string $autoTranslationLanguage = null, // Switch auto translation language public ?string $createdByID = null, - public ?bool $disabled = null, - public ?bool $frozen = null, // Freeze or unfreeze the channel - public ?string $team = null, // Team the channel belongs to (if multi-tenant mode is enabled) + public ?UserRequest $createdBy = null, public ?string $truncatedByID = null, - public ?array $filterTags = null, + public ?bool $frozen = null, // Freeze or unfreeze the channel + public ?bool $disabled = null, + public ?object $custom = null, /** @var array|null */ #[ArrayOf(ChannelMemberRequest::class)] public ?array $invites = null, @@ -38,8 +22,7 @@ public function __construct( #[ArrayOf(ChannelMemberRequest::class)] public ?array $members = null, public ?ChannelConfig $configOverrides = null, - public ?UserRequest $createdBy = null, - public ?object $custom = null, + public ?array $filterTags = null, ) { } diff --git a/src/GeneratedModels/ChannelInputRequest.php b/src/GeneratedModels/ChannelInputRequest.php index 3d4e3371..91032de8 100644 --- a/src/GeneratedModels/ChannelInputRequest.php +++ b/src/GeneratedModels/ChannelInputRequest.php @@ -3,37 +3,23 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $autoTranslationEnabled - * @property string|null $autoTranslationLanguage - * @property bool|null $disabled - * @property bool|null $frozen - * @property string|null $team - * @property array|null $invites - * @property array|null $members - * @property ConfigOverrides|null $configOverrides - * @property User|null $createdBy - * @property object|null $custom - */ class ChannelInputRequest extends BaseModel { public function __construct( + public ?string $team = null, public ?bool $autoTranslationEnabled = null, public ?string $autoTranslationLanguage = null, - public ?bool $disabled = null, public ?bool $frozen = null, - public ?string $team = null, - /** @var array|null */ - #[ArrayOf(ChannelMember::class)] + public ?bool $disabled = null, + public ?object $custom = null, + /** @var array|null */ + #[ArrayOf(ChannelMemberRequest::class)] public ?array $invites = null, - /** @var array|null */ - #[ArrayOf(ChannelMember::class)] + /** @var array|null */ + #[ArrayOf(ChannelMemberRequest::class)] public ?array $members = null, - public ?ConfigOverrides $configOverrides = null, - public ?User $createdBy = null, - public ?object $custom = null, + public ?ConfigOverridesRequest $configOverrides = null, + public ?UserRequest $createdBy = null, ) { } diff --git a/src/GeneratedModels/ChannelMemberRequest.php b/src/GeneratedModels/ChannelMemberRequest.php index 4c881ae2..f063656c 100644 --- a/src/GeneratedModels/ChannelMemberRequest.php +++ b/src/GeneratedModels/ChannelMemberRequest.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $userID - * @property string|null $channelRole - * @property object|null $custom - * @property UserResponse|null $user - */ class ChannelMemberRequest extends BaseModel { public function __construct( public ?string $userID = null, - public ?string $channelRole = null, // Role of the member in the channel - public ?object $custom = null, public ?UserResponse $user = null, + public ?object $custom = null, + public ?string $channelRole = null, // Role of the member in the channel ) { } diff --git a/src/GeneratedModels/ChannelMemberResponse.php b/src/GeneratedModels/ChannelMemberResponse.php index f79cbbbb..ec536a74 100644 --- a/src/GeneratedModels/ChannelMemberResponse.php +++ b/src/GeneratedModels/ChannelMemberResponse.php @@ -3,53 +3,29 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $banned - * @property string $channelRole - * @property \DateTime $createdAt - * @property bool $notificationsMuted - * @property bool $shadowBanned - * @property \DateTime $updatedAt - * @property object $custom - * @property \DateTime|null $archivedAt - * @property \DateTime|null $banExpires - * @property \DateTime|null $deletedAt - * @property \DateTime|null $inviteAcceptedAt - * @property \DateTime|null $inviteRejectedAt - * @property bool|null $invited - * @property bool|null $isModerator - * @property \DateTime|null $pinnedAt - * @property string|null $role - * @property string|null $status - * @property string|null $userID - * @property array|null $deletedMessages - * @property UserResponse|null $user - */ class ChannelMemberResponse extends BaseModel { public function __construct( - public ?bool $banned = null, // Whether member is banned this channel or not - public ?string $channelRole = null, // Role of the member in the channel - public ?\DateTime $createdAt = null, // Date/time of creation - public ?bool $notificationsMuted = null, - public ?bool $shadowBanned = null, // Whether member is shadow banned in this channel or not - public ?\DateTime $updatedAt = null, // Date/time of the last update + public ?string $userID = null, + public ?UserResponse $user = null, + public ?bool $isModerator = null, // Whether member is channel moderator or not public ?object $custom = null, - public ?\DateTime $archivedAt = null, - public ?\DateTime $banExpires = null, // Expiration date of the ban - public ?\DateTime $deletedAt = null, + public ?bool $invited = null, // Whether member was invited or not public ?\DateTime $inviteAcceptedAt = null, // Date when invite was accepted public ?\DateTime $inviteRejectedAt = null, // Date when invite was rejected - public ?bool $invited = null, // Whether member was invited or not - public ?bool $isModerator = null, // Whether member is channel moderator or not - public ?\DateTime $pinnedAt = null, - public ?string $role = null, // Permission level of the member in the channel (DEPRECATED: use channel_role instead) public ?string $status = null, - public ?string $userID = null, + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $updatedAt = null, // Date/time of the last update + public ?\DateTime $deletedAt = null, + public ?bool $banned = null, // Whether member is banned this channel or not + public ?\DateTime $banExpires = null, // Expiration date of the ban + public ?bool $shadowBanned = null, // Whether member is shadow banned in this channel or not + public ?\DateTime $pinnedAt = null, + public ?\DateTime $archivedAt = null, + public ?string $role = null, // Permission level of the member in the channel (DEPRECATED: use channel_role instead). One of: member, moderator, admin, owner + public ?string $channelRole = null, // Role of the member in the channel + public ?bool $notificationsMuted = null, public ?array $deletedMessages = null, - public ?UserResponse $user = null, ) { } diff --git a/src/GeneratedModels/ChannelMessagesResponse.php b/src/GeneratedModels/ChannelMessagesResponse.php new file mode 100644 index 00000000..c7f87ff7 --- /dev/null +++ b/src/GeneratedModels/ChannelMessagesResponse.php @@ -0,0 +1,21 @@ +|null */ + #[ArrayOf(MessageResponse::class)] + public ?array $messages = null, // List of messages + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/ChannelMute.php b/src/GeneratedModels/ChannelMute.php index e1e1289a..22100038 100644 --- a/src/GeneratedModels/ChannelMute.php +++ b/src/GeneratedModels/ChannelMute.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property \DateTime $updatedAt - * @property \DateTime|null $expires - * @property ChannelResponse|null $channel - * @property UserResponse|null $user - */ class ChannelMute extends BaseModel { public function __construct( + public ?UserResponse $user = null, + public ?ChannelResponse $channel = null, + public ?\DateTime $expires = null, // Date/time of mute expiration public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $updatedAt = null, // Date/time of the last update - public ?\DateTime $expires = null, // Date/time of mute expiration - public ?ChannelResponse $channel = null, - public ?UserResponse $user = null, ) { } diff --git a/src/GeneratedModels/ChannelMutedEvent.php b/src/GeneratedModels/ChannelMutedEvent.php index f2313dc2..6f257cfe 100644 --- a/src/GeneratedModels/ChannelMutedEvent.php +++ b/src/GeneratedModels/ChannelMutedEvent.php @@ -4,16 +4,20 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property string $type + * Emitted when a channel is successfully muted. */ class ChannelMutedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $type = null, + public ?string $type = null, // The type of event: "channel.muted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?UserResponseCommonFields $user = null, + public ?ChannelMute $mute = null, + /** @var array|null */ + #[ArrayOf(ChannelMute::class)] + public ?array $mutes = null, // The mute objects ) { } diff --git a/src/GeneratedModels/ChannelPushPreferencesResponse.php b/src/GeneratedModels/ChannelPushPreferencesResponse.php index 4c35fb5f..6bbc4f4b 100644 --- a/src/GeneratedModels/ChannelPushPreferencesResponse.php +++ b/src/GeneratedModels/ChannelPushPreferencesResponse.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $chatLevel - * @property \DateTime|null $disabledUntil - */ class ChannelPushPreferencesResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ChannelResponse.php b/src/GeneratedModels/ChannelResponse.php index 9550d096..f8b741c0 100644 --- a/src/GeneratedModels/ChannelResponse.php +++ b/src/GeneratedModels/ChannelResponse.php @@ -5,71 +5,42 @@ namespace GetStream\GeneratedModels; /** * Represents channel in chat - * - * @property string $cid - * @property \DateTime $createdAt - * @property bool $disabled - * @property bool $frozen - * @property string $id - * @property string $type - * @property \DateTime $updatedAt - * @property object $custom - * @property bool|null $autoTranslationEnabled - * @property string|null $autoTranslationLanguage - * @property bool|null $blocked - * @property int|null $cooldown - * @property \DateTime|null $deletedAt - * @property bool|null $hidden - * @property \DateTime|null $hideMessagesBefore - * @property \DateTime|null $lastMessageAt - * @property int|null $memberCount - * @property int|null $messageCount - * @property \DateTime|null $muteExpiresAt - * @property bool|null $muted - * @property string|null $team - * @property \DateTime|null $truncatedAt - * @property array|null $filterTags - * @property array|null $members - * @property array|null $ownCapabilities - * @property ChannelConfigWithInfo|null $config - * @property UserResponse|null $createdBy - * @property UserResponse|null $truncatedBy */ class ChannelResponse extends BaseModel { public function __construct( - public ?string $cid = null, // Channel CID (:) - public ?\DateTime $createdAt = null, // Date/time of creation - public ?bool $disabled = null, - public ?bool $frozen = null, // Whether channel is frozen or not public ?string $id = null, // Channel unique ID public ?string $type = null, // Type of the channel + public ?string $cid = null, // Channel CID (:) + public ?\DateTime $lastMessageAt = null, // Date of the last message sent + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $updatedAt = null, // Date/time of the last update - public ?object $custom = null, // Custom data for this object - public ?bool $autoTranslationEnabled = null, // Whether auto translation is enabled or not - public ?string $autoTranslationLanguage = null, // Language to translate to when auto translation is active - public ?bool $blocked = null, // Whether this channel is blocked by current user or not - public ?int $cooldown = null, // Cooldown period after sending each message public ?\DateTime $deletedAt = null, // Date/time of deletion - public ?bool $hidden = null, // Whether this channel is hidden by current user or not - public ?\DateTime $hideMessagesBefore = null, // Date since when the message history is accessible - public ?\DateTime $lastMessageAt = null, // Date of the last message sent + public ?UserResponse $createdBy = null, + public ?bool $frozen = null, // Whether channel is frozen or not + public ?bool $disabled = null, + /** @var array|null */ + #[ArrayOf(ChannelMemberResponse::class)] + public ?array $members = null, // List of channel members (max 100) public ?int $memberCount = null, // Number of members in the channel - public ?int $messageCount = null, // Number of messages in the channel - public ?\DateTime $muteExpiresAt = null, // Date of mute expiration + public ?ChannelConfigWithInfo $config = null, public ?bool $muted = null, // Whether this channel is muted or not + public ?\DateTime $muteExpiresAt = null, // Date of mute expiration public ?string $team = null, // Team the channel belongs to (multi-tenant only) - public ?\DateTime $truncatedAt = null, // Date of the latest truncation of the channel - public ?array $filterTags = null, // List of filter tags associated with the channel - /** @var array|null List of channel members (max 100) */ - #[ArrayOf(ChannelMemberResponse::class)] - public ?array $members = null, // List of channel members (max 100) - /** @var array|null List of channel capabilities of authenticated user */ + public ?bool $autoTranslationEnabled = null, // Whether auto translation is enabled or not + public ?string $autoTranslationLanguage = null, // Language to translate to when auto translation is active + public ?\DateTime $hideMessagesBefore = null, // Date since when the message history is accessible + public ?int $cooldown = null, // Cooldown period after sending each message + /** @var array|null */ #[ArrayOf(ChannelOwnCapability::class)] public ?array $ownCapabilities = null, // List of channel capabilities of authenticated user - public ?ChannelConfigWithInfo $config = null, - public ?UserResponse $createdBy = null, + public ?bool $hidden = null, // Whether this channel is hidden by current user or not + public ?bool $blocked = null, // Whether this channel is blocked by current user or not + public ?\DateTime $truncatedAt = null, // Date of the latest truncation of the channel public ?UserResponse $truncatedBy = null, + public ?object $custom = null, // Custom data for this object + public ?int $messageCount = null, // Number of messages in the channel + public ?array $filterTags = null, // List of filter tags associated with the channel ) { } diff --git a/src/GeneratedModels/ChannelStateResponse.php b/src/GeneratedModels/ChannelStateResponse.php index 45459a9a..f8f9ac6c 100644 --- a/src/GeneratedModels/ChannelStateResponse.php +++ b/src/GeneratedModels/ChannelStateResponse.php @@ -3,61 +3,41 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $members - * @property array $messages - * @property array $pinnedMessages - * @property array $threads - * @property bool|null $hidden - * @property \DateTime|null $hideMessagesBefore - * @property int|null $watcherCount - * @property array|null $activeLiveLocations - * @property array|null $pendingMessages - * @property array|null $read - * @property array|null $watchers - * @property ChannelResponse|null $channel - * @property DraftResponse|null $draft - * @property ChannelMemberResponse|null $membership - * @property ChannelPushPreferencesResponse|null $pushPreferences - */ class ChannelStateResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null */ - #[ArrayOf(ChannelMemberResponse::class)] - public ?array $members = null, + public ?ChannelResponse $channel = null, /** @var array|null */ #[ArrayOf(MessageResponse::class)] public ?array $messages = null, /** @var array|null */ #[ArrayOf(MessageResponse::class)] public ?array $pinnedMessages = null, + public ?int $watcherCount = null, + /** @var array|null */ + #[ArrayOf(UserResponse::class)] + public ?array $watchers = null, + /** @var array|null */ + #[ArrayOf(ReadStateResponse::class)] + public ?array $read = null, + /** @var array|null */ + #[ArrayOf(ChannelMemberResponse::class)] + public ?array $members = null, + public ?ChannelMemberResponse $membership = null, + public ?ChannelPushPreferencesResponse $pushPreferences = null, /** @var array|null */ #[ArrayOf(ThreadStateResponse::class)] public ?array $threads = null, public ?bool $hidden = null, public ?\DateTime $hideMessagesBefore = null, - public ?int $watcherCount = null, - /** @var array|null */ - #[ArrayOf(SharedLocationResponseData::class)] - public ?array $activeLiveLocations = null, /** @var array|null */ #[ArrayOf(PendingMessageResponse::class)] public ?array $pendingMessages = null, - /** @var array|null */ - #[ArrayOf(ReadStateResponse::class)] - public ?array $read = null, - /** @var array|null */ - #[ArrayOf(UserResponse::class)] - public ?array $watchers = null, - public ?ChannelResponse $channel = null, public ?DraftResponse $draft = null, - public ?ChannelMemberResponse $membership = null, - public ?ChannelPushPreferencesResponse $pushPreferences = null, + /** @var array|null */ + #[ArrayOf(SharedLocationResponseData::class)] + public ?array $activeLiveLocations = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ChannelStateResponseFields.php b/src/GeneratedModels/ChannelStateResponseFields.php index d7888306..4ea552bf 100644 --- a/src/GeneratedModels/ChannelStateResponseFields.php +++ b/src/GeneratedModels/ChannelStateResponseFields.php @@ -3,59 +3,40 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $members - * @property array $messages - * @property array $pinnedMessages - * @property array $threads - * @property bool|null $hidden - * @property \DateTime|null $hideMessagesBefore - * @property int|null $watcherCount - * @property array|null $activeLiveLocations - * @property array|null $pendingMessages - * @property array|null $read - * @property array|null $watchers - * @property ChannelResponse|null $channel - * @property DraftResponse|null $draft - * @property ChannelMemberResponse|null $membership - * @property ChannelPushPreferencesResponse|null $pushPreferences - */ class ChannelStateResponseFields extends BaseModel { public function __construct( - /** @var array|null List of channel members */ - #[ArrayOf(ChannelMemberResponse::class)] - public ?array $members = null, // List of channel members - /** @var array|null List of channel messages */ + public ?ChannelResponse $channel = null, + /** @var array|null */ #[ArrayOf(MessageResponse::class)] public ?array $messages = null, // List of channel messages - /** @var array|null List of pinned messages in the channel */ + /** @var array|null */ #[ArrayOf(MessageResponse::class)] public ?array $pinnedMessages = null, // List of pinned messages in the channel + public ?int $watcherCount = null, // Number of channel watchers + /** @var array|null */ + #[ArrayOf(UserResponse::class)] + public ?array $watchers = null, // List of user who is watching the channel + /** @var array|null */ + #[ArrayOf(ReadStateResponse::class)] + public ?array $read = null, // List of read states + /** @var array|null */ + #[ArrayOf(ChannelMemberResponse::class)] + public ?array $members = null, // List of channel members + public ?ChannelMemberResponse $membership = null, + public ?ChannelPushPreferencesResponse $pushPreferences = null, /** @var array|null */ #[ArrayOf(ThreadStateResponse::class)] public ?array $threads = null, public ?bool $hidden = null, // Whether this channel is hidden or not public ?\DateTime $hideMessagesBefore = null, // Messages before this date are hidden from the user - public ?int $watcherCount = null, // Number of channel watchers - /** @var array|null Active live locations in the channel */ - #[ArrayOf(SharedLocationResponseData::class)] - public ?array $activeLiveLocations = null, // Active live locations in the channel - /** @var array|null Pending messages that this user has sent */ + /** @var array|null */ #[ArrayOf(PendingMessageResponse::class)] public ?array $pendingMessages = null, // Pending messages that this user has sent - /** @var array|null List of read states */ - #[ArrayOf(ReadStateResponse::class)] - public ?array $read = null, // List of read states - /** @var array|null List of user who is watching the channel */ - #[ArrayOf(UserResponse::class)] - public ?array $watchers = null, // List of user who is watching the channel - public ?ChannelResponse $channel = null, public ?DraftResponse $draft = null, - public ?ChannelMemberResponse $membership = null, - public ?ChannelPushPreferencesResponse $pushPreferences = null, + /** @var array|null */ + #[ArrayOf(SharedLocationResponseData::class)] + public ?array $activeLiveLocations = null, // Active live locations in the channel ) { } diff --git a/src/GeneratedModels/ChannelTruncatedEvent.php b/src/GeneratedModels/ChannelTruncatedEvent.php index dba51e69..e7327456 100644 --- a/src/GeneratedModels/ChannelTruncatedEvent.php +++ b/src/GeneratedModels/ChannelTruncatedEvent.php @@ -4,26 +4,26 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property int $channelMemberCount - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property ChannelResponse|null $channel + * Emitted when a channel is successfully truncated. */ class ChannelTruncatedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?int $channelMemberCount = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, + public ?string $type = null, // The type of event: "channel.truncated" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel which was truncated + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel which was truncated + public ?string $channelID = null, // The ID of the channel which was truncated public ?ChannelResponse $channel = null, + public ?string $messageID = null, + public ?MessageResponse $message = null, + public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/ChannelTypeConfig.php b/src/GeneratedModels/ChannelTypeConfig.php index 490f63f5..8a541301 100644 --- a/src/GeneratedModels/ChannelTypeConfig.php +++ b/src/GeneratedModels/ChannelTypeConfig.php @@ -3,91 +3,52 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $automod - * @property string $automodBehavior - * @property bool $connectEvents - * @property bool $countMessages - * @property \DateTime $createdAt - * @property bool $customEvents - * @property bool $deliveryEvents - * @property bool $markMessagesPending - * @property int $maxMessageLength - * @property bool $mutes - * @property string $name - * @property bool $polls - * @property bool $pushNotifications - * @property bool $quotes - * @property bool $reactions - * @property bool $readEvents - * @property bool $reminders - * @property bool $replies - * @property bool $search - * @property bool $sharedLocations - * @property bool $skipLastMsgUpdateForSystemMsgs - * @property bool $typingEvents - * @property \DateTime $updatedAt - * @property bool $uploads - * @property bool $urlEnrichment - * @property bool $userMessageReminders - * @property array $commands - * @property array $permissions - * @property array $grants - * @property string|null $blocklist - * @property string|null $blocklistBehavior - * @property int|null $partitionSize - * @property string|null $partitionTtl - * @property array|null $allowedFlagReasons - * @property array|null $blocklists - * @property Thresholds|null $automodThresholds - */ class ChannelTypeConfig extends BaseModel { public function __construct( - public ?string $automod = null, - public ?string $automodBehavior = null, - public ?bool $connectEvents = null, - public ?bool $countMessages = null, + /** @var array|null */ + #[ArrayOf(PolicyRequest::class)] + public ?array $permissions = null, + public ?array $grants = null, public ?\DateTime $createdAt = null, - public ?bool $customEvents = null, - public ?bool $deliveryEvents = null, - public ?bool $markMessagesPending = null, - public ?int $maxMessageLength = null, - public ?bool $mutes = null, + public ?\DateTime $updatedAt = null, public ?string $name = null, - public ?bool $polls = null, - public ?bool $pushNotifications = null, - public ?bool $quotes = null, - public ?bool $reactions = null, + public ?bool $typingEvents = null, public ?bool $readEvents = null, - public ?bool $reminders = null, - public ?bool $replies = null, + public ?bool $connectEvents = null, + public ?bool $deliveryEvents = null, public ?bool $search = null, - public ?bool $sharedLocations = null, - public ?bool $skipLastMsgUpdateForSystemMsgs = null, - public ?bool $typingEvents = null, - public ?\DateTime $updatedAt = null, + public ?bool $reactions = null, + public ?bool $replies = null, + public ?bool $quotes = null, + public ?bool $mutes = null, public ?bool $uploads = null, public ?bool $urlEnrichment = null, + public ?bool $customEvents = null, + public ?bool $pushNotifications = null, + public ?bool $reminders = null, + public ?bool $markMessagesPending = null, + public ?bool $polls = null, public ?bool $userMessageReminders = null, - /** @var array|null */ - #[ArrayOf(Command::class)] - public ?array $commands = null, - /** @var array|null */ - #[ArrayOf(PolicyRequest::class)] - public ?array $permissions = null, - public ?array $grants = null, + public ?bool $sharedLocations = null, + public ?bool $countMessages = null, + public ?int $maxMessageLength = null, + public ?string $automod = null, + public ?string $automodBehavior = null, public ?string $blocklist = null, public ?string $blocklistBehavior = null, - public ?int $partitionSize = null, - public ?string $partitionTtl = null, - public ?array $allowedFlagReasons = null, /** @var array|null */ #[ArrayOf(BlockListOptions::class)] public ?array $blocklists = null, + public ?array $allowedFlagReasons = null, public ?Thresholds $automodThresholds = null, + public ?int $partitionSize = null, + public ?string $partitionTtl = null, + public ?bool $skipLastMsgUpdateForSystemMsgs = null, + public ?string $pushLevel = null, + /** @var array|null */ + #[ArrayOf(Command::class)] + public ?array $commands = null, ) { } diff --git a/src/GeneratedModels/ChannelUnFrozenEvent.php b/src/GeneratedModels/ChannelUnFrozenEvent.php index 718dd0ab..9b3bf2f3 100644 --- a/src/GeneratedModels/ChannelUnFrozenEvent.php +++ b/src/GeneratedModels/ChannelUnFrozenEvent.php @@ -4,22 +4,18 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type + * Emitted when a channel is successfully unfrozen. */ class ChannelUnFrozenEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, + public ?string $type = null, // The type of event: "channel.unfrozen" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel which was unfrozen + public ?string $channelType = null, // The type of the channel which was unfrozen + public ?string $channelID = null, // The ID of the channel which was unfrozen ) { } diff --git a/src/GeneratedModels/ChannelUnmutedEvent.php b/src/GeneratedModels/ChannelUnmutedEvent.php index 3e97ef62..225d9429 100644 --- a/src/GeneratedModels/ChannelUnmutedEvent.php +++ b/src/GeneratedModels/ChannelUnmutedEvent.php @@ -4,16 +4,20 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property string $type + * Emitted when a channel is successfully unmuted. */ class ChannelUnmutedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $type = null, + public ?string $type = null, // The type of event: "channel.unmuted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?UserResponseCommonFields $user = null, + public ?ChannelMute $mute = null, + /** @var array|null */ + #[ArrayOf(ChannelMute::class)] + public ?array $mutes = null, // The mute objects ) { } diff --git a/src/GeneratedModels/ChannelUpdatedEvent.php b/src/GeneratedModels/ChannelUpdatedEvent.php index cfed8f33..11e2c3d0 100644 --- a/src/GeneratedModels/ChannelUpdatedEvent.php +++ b/src/GeneratedModels/ChannelUpdatedEvent.php @@ -4,32 +4,26 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property int $channelMemberCount - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property string|null $team - * @property ChannelResponse|null $channel - * @property Message|null $message - * @property User|null $user + * Emitted when a channel is successfully updated. */ class ChannelUpdatedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?int $channelMemberCount = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?string $team = null, + public ?string $type = null, // The type of event: "channel.updated" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel which was updated + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel which was updated + public ?string $channelID = null, // The ID of the channel which was updated public ?ChannelResponse $channel = null, - public ?Message $message = null, - public ?User $user = null, + public ?string $messageID = null, + public ?MessageResponse $message = null, + public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/ChannelVisibleEvent.php b/src/GeneratedModels/ChannelVisibleEvent.php index 5a1a2bf1..003ecdb0 100644 --- a/src/GeneratedModels/ChannelVisibleEvent.php +++ b/src/GeneratedModels/ChannelVisibleEvent.php @@ -4,24 +4,24 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property User|null $user + * Emitted when a channel is successfully shown. */ class ChannelVisibleEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "channel.visible" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel which was shown + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel which was shown + public ?string $channelID = null, // The ID of the channel which was shown + public ?ChannelResponse $channel = null, + public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/ChatActivityStatsResponse.php b/src/GeneratedModels/ChatActivityStatsResponse.php index f2b7d4e6..cc435cd0 100644 --- a/src/GeneratedModels/ChatActivityStatsResponse.php +++ b/src/GeneratedModels/ChatActivityStatsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property MessageStatsResponse|null $messages - */ class ChatActivityStatsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CheckExternalStorageResponse.php b/src/GeneratedModels/CheckExternalStorageResponse.php index b31f84af..c6688434 100644 --- a/src/GeneratedModels/CheckExternalStorageResponse.php +++ b/src/GeneratedModels/CheckExternalStorageResponse.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property string $fileUrl */ class CheckExternalStorageResponse extends BaseModel { diff --git a/src/GeneratedModels/CheckPushRequest.php b/src/GeneratedModels/CheckPushRequest.php index 35115e47..33ec964d 100644 --- a/src/GeneratedModels/CheckPushRequest.php +++ b/src/GeneratedModels/CheckPushRequest.php @@ -5,29 +5,18 @@ namespace GetStream\GeneratedModels; /** * Check push request - * - * @property string|null $apnTemplate - * @property string|null $eventType - * @property string|null $firebaseDataTemplate - * @property string|null $firebaseTemplate - * @property string|null $messageID - * @property string|null $pushProviderName - * @property string|null $pushProviderType - * @property bool|null $skipDevices - * @property string|null $userID - * @property UserRequest|null $user */ class CheckPushRequest extends BaseModel { public function __construct( + public ?string $messageID = null, // Message ID to send push notification for public ?string $apnTemplate = null, // Push message template for APN - public ?string $eventType = null, // Type of event for push templates (default: message.new) - public ?string $firebaseDataTemplate = null, // Push message data template for Firebase public ?string $firebaseTemplate = null, // Push message template for Firebase - public ?string $messageID = null, // Message ID to send push notification for - public ?string $pushProviderName = null, // Name of push provider - public ?string $pushProviderType = null, // Push provider type + public ?string $firebaseDataTemplate = null, // Push message data template for Firebase public ?bool $skipDevices = null, // Don't require existing devices to render templates + public ?string $pushProviderType = null, // Push provider type. One of: firebase, apn, huawei, xiaomi + public ?string $pushProviderName = null, // Name of push provider + public ?string $eventType = null, // Type of event for push templates (default: message.new). One of: message.new, message.updated, reaction.new, reaction.updated, notification.reminder_due public ?string $userID = null, public ?UserRequest $user = null, ) { diff --git a/src/GeneratedModels/CheckPushResponse.php b/src/GeneratedModels/CheckPushResponse.php index 0780bfbf..e362a1ab 100644 --- a/src/GeneratedModels/CheckPushResponse.php +++ b/src/GeneratedModels/CheckPushResponse.php @@ -3,29 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string|null $eventType - * @property string|null $renderedApnTemplate - * @property string|null $renderedFirebaseTemplate - * @property bool|null $skipDevices - * @property array|null $generalErrors - * @property array|null $deviceErrors - * @property array|null $renderedMessage - */ class CheckPushResponse extends BaseModel { public function __construct( - public ?string $duration = null, + /** @var array|null */ + #[MapOf(DeviceErrorInfo::class)] + public ?array $deviceErrors = null, // Object with device errors + public ?array $generalErrors = null, // List of general errors + public ?bool $skipDevices = null, // Don't require existing devices to render templates public ?string $eventType = null, // The event type that was tested public ?string $renderedApnTemplate = null, public ?string $renderedFirebaseTemplate = null, - public ?bool $skipDevices = null, // Don't require existing devices to render templates - public ?array $generalErrors = null, // List of general errors - public ?array $deviceErrors = null, // Object with device errors public ?array $renderedMessage = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CheckRequest.php b/src/GeneratedModels/CheckRequest.php index fdc387dd..348728c1 100644 --- a/src/GeneratedModels/CheckRequest.php +++ b/src/GeneratedModels/CheckRequest.php @@ -3,34 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $entityCreatorID - * @property string $entityID - * @property string $entityType - * @property string|null $configKey - * @property string|null $configTeam - * @property bool|null $testMode - * @property string|null $userID - * @property ModerationConfig|null $config - * @property ModerationPayload|null $moderationPayload - * @property object|null $options - * @property UserRequest|null $user - */ class CheckRequest extends BaseModel { public function __construct( - public ?string $entityCreatorID = null, // ID of the user who created the entity - public ?string $entityID = null, // Unique identifier of the entity to moderate public ?string $entityType = null, // Type of entity to moderate + public ?string $entityID = null, // Unique identifier of the entity to moderate + public ?string $entityCreatorID = null, // ID of the user who created the entity + public ?ModerationPayload $moderationPayload = null, public ?string $configKey = null, // Key of the moderation configuration to use public ?string $configTeam = null, // Team associated with the configuration + public ?object $options = null, // Additional moderation configuration options public ?bool $testMode = null, // Whether to run moderation in test mode - public ?string $userID = null, public ?ModerationConfig $config = null, - public ?ModerationPayload $moderationPayload = null, - public ?object $options = null, // Additional moderation configuration options + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/CheckResponse.php b/src/GeneratedModels/CheckResponse.php index c8315f1c..e4bae459 100644 --- a/src/GeneratedModels/CheckResponse.php +++ b/src/GeneratedModels/CheckResponse.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string $recommendedAction - * @property string $status - * @property string|null $taskID - * @property ReviewQueueItemResponse|null $item - */ class CheckResponse extends BaseModel { public function __construct( - public ?string $duration = null, - public ?string $recommendedAction = null, // Suggested action based on moderation results public ?string $status = null, // Status of the moderation check (completed or pending) public ?string $taskID = null, // ID of the running moderation task + public ?string $recommendedAction = null, // Suggested action based on moderation results public ?ReviewQueueItemResponse $item = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CheckSNSRequest.php b/src/GeneratedModels/CheckSNSRequest.php index 331a235e..12185f0e 100644 --- a/src/GeneratedModels/CheckSNSRequest.php +++ b/src/GeneratedModels/CheckSNSRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $snsKey - * @property string|null $snsSecret - * @property string|null $snsTopicArn - */ class CheckSNSRequest extends BaseModel { public function __construct( + public ?string $snsTopicArn = null, // AWS SNS topic ARN public ?string $snsKey = null, // AWS SNS access key public ?string $snsSecret = null, // AWS SNS key secret - public ?string $snsTopicArn = null, // AWS SNS topic ARN ) { } diff --git a/src/GeneratedModels/CheckSNSResponse.php b/src/GeneratedModels/CheckSNSResponse.php index a02f698a..81a272cc 100644 --- a/src/GeneratedModels/CheckSNSResponse.php +++ b/src/GeneratedModels/CheckSNSResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string $status - * @property string|null $error - * @property object|null $data - */ class CheckSNSResponse extends BaseModel { public function __construct( - public ?string $duration = null, - public ?string $status = null, // Validation result + public ?string $status = null, // Validation result. One of: ok, error public ?string $error = null, // Error text public ?object $data = null, // Error data + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CheckSQSRequest.php b/src/GeneratedModels/CheckSQSRequest.php index d364ac50..e84606b7 100644 --- a/src/GeneratedModels/CheckSQSRequest.php +++ b/src/GeneratedModels/CheckSQSRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $sqsKey - * @property string|null $sqsSecret - * @property string|null $sqsUrl - */ class CheckSQSRequest extends BaseModel { public function __construct( + public ?string $sqsUrl = null, // AWS SQS endpoint URL public ?string $sqsKey = null, // AWS SQS access key public ?string $sqsSecret = null, // AWS SQS key secret - public ?string $sqsUrl = null, // AWS SQS endpoint URL ) { } diff --git a/src/GeneratedModels/CheckSQSResponse.php b/src/GeneratedModels/CheckSQSResponse.php index 8a3f9a28..e0060e10 100644 --- a/src/GeneratedModels/CheckSQSResponse.php +++ b/src/GeneratedModels/CheckSQSResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string $status - * @property string|null $error - * @property object|null $data - */ class CheckSQSResponse extends BaseModel { public function __construct( - public ?string $duration = null, - public ?string $status = null, // Validation result + public ?string $status = null, // Validation result. One of: ok, error public ?string $error = null, // Error text public ?object $data = null, // Error data + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ClientOSDataResponse.php b/src/GeneratedModels/ClientOSDataResponse.php index bb63a1e5..2c24f287 100644 --- a/src/GeneratedModels/ClientOSDataResponse.php +++ b/src/GeneratedModels/ClientOSDataResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $architecture - * @property string|null $name - * @property string|null $version - */ class ClientOSDataResponse extends BaseModel { public function __construct( - public ?string $architecture = null, public ?string $name = null, public ?string $version = null, + public ?string $architecture = null, ) { } diff --git a/src/GeneratedModels/ClosedCaptionEvent.php b/src/GeneratedModels/ClosedCaptionEvent.php index 6d85aca2..b49cbdd8 100644 --- a/src/GeneratedModels/ClosedCaptionEvent.php +++ b/src/GeneratedModels/ClosedCaptionEvent.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * This event is sent when closed captions are being sent in a call, clients should use this to show the closed captions in the call screen - * - * @property string $callCid - * @property \DateTime $createdAt - * @property CallClosedCaption $closedCaption - * @property string $type */ class ClosedCaptionEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.closed_caption" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?CallClosedCaption $closedCaption = null, - public ?string $type = null, // The type of event: "call.closed_caption" in this case ) { } diff --git a/src/GeneratedModels/ClosedCaptionRuleParameters.php b/src/GeneratedModels/ClosedCaptionRuleParameters.php new file mode 100644 index 00000000..54c8fdb9 --- /dev/null +++ b/src/GeneratedModels/ClosedCaptionRuleParameters.php @@ -0,0 +1,17 @@ + $mentionedUsers - * @property array $ownReactions - * @property UserResponse $user - * @property int|null $controversyScore - * @property \DateTime|null $deletedAt - * @property \DateTime|null $editedAt - * @property string|null $parentID - * @property string|null $text - * @property array|null $attachments - * @property array|null $latestReactions - * @property object|null $custom - * @property ModerationV2Response|null $moderation - * @property array|null $reactionGroups - */ class CommentResponse extends BaseModel { public function __construct( - public ?int $confidenceScore = null, // Confidence score of the comment - public ?\DateTime $createdAt = null, // When the comment was created - public ?int $downvoteCount = null, // Number of downvotes for this comment public ?string $id = null, // Unique identifier for the comment public ?string $objectID = null, // ID of the object this comment is associated with public ?string $objectType = null, // Type of the object this comment is associated with - public ?int $reactionCount = null, // Number of reactions to this comment - public ?int $replyCount = null, // Number of replies to this comment - public ?int $score = null, // Score of the comment based on reactions - public ?string $status = null, // Status of the comment (e.g., active, deleted) - public ?\DateTime $updatedAt = null, // When the comment was last updated - public ?int $upvoteCount = null, // Number of upvotes for this comment - /** @var array|null Users mentioned in the comment */ - #[ArrayOf(UserResponse::class)] - public ?array $mentionedUsers = null, // Users mentioned in the comment - /** @var array|null Current user's reactions to this activity */ - #[ArrayOf(FeedsReactionResponse::class)] - public ?array $ownReactions = null, // Current user's reactions to this activity public ?UserResponse $user = null, - public ?int $controversyScore = null, // Controversy score of the comment - public ?\DateTime $deletedAt = null, // When the comment was deleted - public ?\DateTime $editedAt = null, // When the comment was last edited - public ?string $parentID = null, // ID of parent comment for nested replies public ?string $text = null, // Text content of the comment - /** @var array|null */ - #[ArrayOf(Attachment::class)] - public ?array $attachments = null, - /** @var array|null Recent reactions to the comment */ + public ?object $custom = null, // Custom data for the comment + public ?string $parentID = null, // ID of parent comment for nested replies + public ?int $reactionCount = null, // Number of reactions to this comment + /** @var array|null */ #[ArrayOf(FeedsReactionResponse::class)] public ?array $latestReactions = null, // Recent reactions to the comment - public ?object $custom = null, // Custom data for the comment - public ?ModerationV2Response $moderation = null, + /** @var array|null */ + #[MapOf(FeedsReactionGroupResponse::class)] public ?array $reactionGroups = null, // Grouped reactions by type + /** @var array|null */ + #[ArrayOf(Attachment::class)] + public ?array $attachments = null, // Attachments associated with the comment + /** @var array|null */ + #[ArrayOf(UserResponse::class)] + public ?array $mentionedUsers = null, // Users mentioned in the comment + public ?string $status = null, // Status of the comment. One of: active, deleted, removed, hidden + public ?\DateTime $createdAt = null, // When the comment was created + public ?\DateTime $updatedAt = null, // When the comment was last updated + public ?\DateTime $editedAt = null, // When the comment was last edited + public ?\DateTime $deletedAt = null, // When the comment was deleted + public ?ModerationV2Response $moderation = null, + public ?int $replyCount = null, // Number of replies to this comment + public ?int $upvoteCount = null, // Number of upvotes for this comment + public ?int $downvoteCount = null, // Number of downvotes for this comment + public ?int $score = null, // Score of the comment based on reactions + public ?int $confidenceScore = null, // Confidence score of the comment + public ?int $controversyScore = null, // Controversy score of the comment + /** @var array|null */ + #[ArrayOf(FeedsReactionResponse::class)] + public ?array $ownReactions = null, // Current user's reactions to this activity ) { } diff --git a/src/GeneratedModels/CommentUpdatedEvent.php b/src/GeneratedModels/CommentUpdatedEvent.php index 15202d9d..0e83e296 100644 --- a/src/GeneratedModels/CommentUpdatedEvent.php +++ b/src/GeneratedModels/CommentUpdatedEvent.php @@ -5,26 +5,17 @@ namespace GetStream\GeneratedModels; /** * Emitted when a comment is updated. - * - * @property \DateTime $createdAt - * @property string $fid - * @property CommentResponse $comment - * @property object $custom - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class CommentUpdatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, public ?CommentResponse $comment = null, - public ?object $custom = null, public ?string $type = null, // The type of event: "feeds.comment.updated" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/CommitMessageRequest.php b/src/GeneratedModels/CommitMessageRequest.php index bf36d1f0..7c965593 100644 --- a/src/GeneratedModels/CommitMessageRequest.php +++ b/src/GeneratedModels/CommitMessageRequest.php @@ -3,9 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - */ class CommitMessageRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CompositeRecordingResponse.php b/src/GeneratedModels/CompositeRecordingResponse.php index dca02dd6..b9711551 100644 --- a/src/GeneratedModels/CompositeRecordingResponse.php +++ b/src/GeneratedModels/CompositeRecordingResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $status - */ class CompositeRecordingResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ConfigOverridesRequest.php b/src/GeneratedModels/ConfigOverridesRequest.php new file mode 100644 index 00000000..113bd57b --- /dev/null +++ b/src/GeneratedModels/ConfigOverridesRequest.php @@ -0,0 +1,31 @@ +|null $blocklists - * @property array|null $commands - * @property array|null $permissions - * @property array|null $grants - */ class CreateChannelTypeRequest extends BaseModel { public function __construct( - public ?string $automod = null, // Automod - public ?string $automodBehavior = null, // Automod behavior - public ?int $maxMessageLength = null, // Max message length public ?string $name = null, // Channel type name - public ?string $blocklist = null, // Blocklist - public ?string $blocklistBehavior = null, // Blocklist behavior + public ?bool $typingEvents = null, // Typing events + public ?bool $readEvents = null, // Read events public ?bool $connectEvents = null, // Connect events - public ?bool $countMessages = null, // Count messages in channel. - public ?bool $customEvents = null, // Custom events public ?bool $deliveryEvents = null, - public ?bool $markMessagesPending = null, // Mark messages pending - public ?string $messageRetention = null, // Message retention - public ?bool $mutes = null, // Mutes - public ?int $partitionSize = null, // Partition size - public ?string $partitionTtl = null, // Partition TTL - public ?bool $polls = null, // Polls - public ?bool $pushNotifications = null, // Push notifications public ?bool $reactions = null, // Reactions - public ?bool $readEvents = null, // Read events public ?bool $replies = null, // Replies public ?bool $search = null, // Search - public ?bool $sharedLocations = null, // Enables shared location messages - public ?bool $skipLastMsgUpdateForSystemMsgs = null, - public ?bool $typingEvents = null, // Typing events + public ?bool $mutes = null, // Mutes public ?bool $uploads = null, // Uploads public ?bool $urlEnrichment = null, // URL enrichment + public ?bool $customEvents = null, // Custom events + public ?bool $pushNotifications = null, // Push notifications + public ?bool $markMessagesPending = null, // Mark messages pending + public ?bool $polls = null, // Polls public ?bool $userMessageReminders = null, - /** @var array|null Blocklists */ - #[ArrayOf(BlockListOptions::class)] - public ?array $blocklists = null, // Blocklists + public ?bool $sharedLocations = null, // Enables shared location messages + public ?bool $countMessages = null, // Count messages in channel. + public ?string $messageRetention = null, // Message retention. One of: infinite, numeric + public ?int $maxMessageLength = null, // Max message length + public ?string $automod = null, // Automod. One of: disabled, simple, AI + public ?string $automodBehavior = null, // Automod behavior. One of: flag, block public ?array $commands = null, // List of commands that channel supports - /** @var array|null List of permissions for the channel type */ + /** @var array|null */ #[ArrayOf(PolicyRequest::class)] public ?array $permissions = null, // List of permissions for the channel type public ?array $grants = null, // List of grants for the channel type + public ?string $blocklist = null, // Blocklist + public ?string $blocklistBehavior = null, // Blocklist behavior. One of: flag, block, shadow_block + /** @var array|null */ + #[ArrayOf(BlockListOptions::class)] + public ?array $blocklists = null, // Blocklists + public ?int $partitionSize = null, // Partition size + public ?string $partitionTtl = null, // Partition TTL + public ?bool $skipLastMsgUpdateForSystemMsgs = null, + public ?string $pushLevel = null, // Default push notification level for the channel type. One of: all, all_mentions, mentions, direct_mentions, none ) { } diff --git a/src/GeneratedModels/CreateChannelTypeResponse.php b/src/GeneratedModels/CreateChannelTypeResponse.php index 7f200301..eca07629 100644 --- a/src/GeneratedModels/CreateChannelTypeResponse.php +++ b/src/GeneratedModels/CreateChannelTypeResponse.php @@ -3,91 +3,51 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $automod - * @property string $automodBehavior - * @property bool $connectEvents - * @property bool $countMessages - * @property \DateTime $createdAt - * @property bool $customEvents - * @property bool $deliveryEvents - * @property string $duration - * @property bool $markMessagesPending - * @property int $maxMessageLength - * @property bool $mutes - * @property string $name - * @property bool $polls - * @property bool $pushNotifications - * @property bool $quotes - * @property bool $reactions - * @property bool $readEvents - * @property bool $reminders - * @property bool $replies - * @property bool $search - * @property bool $sharedLocations - * @property bool $skipLastMsgUpdateForSystemMsgs - * @property bool $typingEvents - * @property \DateTime $updatedAt - * @property bool $uploads - * @property bool $urlEnrichment - * @property bool $userMessageReminders - * @property array $commands - * @property array $permissions - * @property array $grants - * @property string|null $blocklist - * @property string|null $blocklistBehavior - * @property int|null $partitionSize - * @property string|null $partitionTtl - * @property array|null $allowedFlagReasons - * @property array|null $blocklists - * @property Thresholds|null $automodThresholds - */ class CreateChannelTypeResponse extends BaseModel { public function __construct( - public ?string $automod = null, - public ?string $automodBehavior = null, + public ?string $name = null, + public ?bool $typingEvents = null, + public ?bool $readEvents = null, public ?bool $connectEvents = null, - public ?bool $countMessages = null, - public ?\DateTime $createdAt = null, - public ?bool $customEvents = null, public ?bool $deliveryEvents = null, - public ?string $duration = null, - public ?bool $markMessagesPending = null, - public ?int $maxMessageLength = null, - public ?bool $mutes = null, - public ?string $name = null, - public ?bool $polls = null, - public ?bool $pushNotifications = null, - public ?bool $quotes = null, + public ?bool $search = null, public ?bool $reactions = null, - public ?bool $readEvents = null, - public ?bool $reminders = null, public ?bool $replies = null, - public ?bool $search = null, - public ?bool $sharedLocations = null, - public ?bool $skipLastMsgUpdateForSystemMsgs = null, - public ?bool $typingEvents = null, - public ?\DateTime $updatedAt = null, + public ?bool $quotes = null, + public ?bool $mutes = null, public ?bool $uploads = null, public ?bool $urlEnrichment = null, + public ?bool $customEvents = null, + public ?bool $pushNotifications = null, + public ?bool $reminders = null, + public ?bool $markMessagesPending = null, + public ?bool $polls = null, public ?bool $userMessageReminders = null, - public ?array $commands = null, - /** @var array|null */ - #[ArrayOf(PolicyRequest::class)] - public ?array $permissions = null, - public ?array $grants = null, + public ?bool $sharedLocations = null, + public ?bool $countMessages = null, + public ?int $maxMessageLength = null, + public ?string $automod = null, + public ?string $automodBehavior = null, public ?string $blocklist = null, public ?string $blocklistBehavior = null, - public ?int $partitionSize = null, - public ?string $partitionTtl = null, - public ?array $allowedFlagReasons = null, /** @var array|null */ #[ArrayOf(BlockListOptions::class)] public ?array $blocklists = null, + public ?array $allowedFlagReasons = null, public ?Thresholds $automodThresholds = null, + public ?int $partitionSize = null, + public ?string $partitionTtl = null, + public ?bool $skipLastMsgUpdateForSystemMsgs = null, + public ?string $pushLevel = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, + public ?array $commands = null, + /** @var array|null */ + #[ArrayOf(PolicyRequest::class)] + public ?array $permissions = null, + public ?array $grants = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CreateCollectionsRequest.php b/src/GeneratedModels/CreateCollectionsRequest.php index ef7b0a93..c8a6e279 100644 --- a/src/GeneratedModels/CreateCollectionsRequest.php +++ b/src/GeneratedModels/CreateCollectionsRequest.php @@ -3,17 +3,10 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $collections - * @property string|null $userID - * @property UserRequest|null $user - */ class CreateCollectionsRequest extends BaseModel { public function __construct( - /** @var array|null List of collections to create */ + /** @var array|null */ #[ArrayOf(CollectionRequest::class)] public ?array $collections = null, // List of collections to create public ?string $userID = null, diff --git a/src/GeneratedModels/CreateCollectionsResponse.php b/src/GeneratedModels/CreateCollectionsResponse.php index c84bda6e..854eab63 100644 --- a/src/GeneratedModels/CreateCollectionsResponse.php +++ b/src/GeneratedModels/CreateCollectionsResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $collections - */ class CreateCollectionsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of created collections */ + /** @var array|null */ #[ArrayOf(CollectionResponse::class)] public ?array $collections = null, // List of created collections + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CreateCommandRequest.php b/src/GeneratedModels/CreateCommandRequest.php index ee39a36f..3984d61f 100644 --- a/src/GeneratedModels/CreateCommandRequest.php +++ b/src/GeneratedModels/CreateCommandRequest.php @@ -5,17 +5,12 @@ namespace GetStream\GeneratedModels; /** * Create a new command - * - * @property string $description - * @property string $name - * @property string|null $args - * @property string|null $set */ class CreateCommandRequest extends BaseModel { public function __construct( - public ?string $description = null, // Description, shown in commands auto-completion public ?string $name = null, // Unique command name + public ?string $description = null, // Description, shown in commands auto-completion public ?string $args = null, // Arguments help text, shown in commands auto-completion public ?string $set = null, // Set name used for grouping commands ) { diff --git a/src/GeneratedModels/CreateCommandResponse.php b/src/GeneratedModels/CreateCommandResponse.php index 0fa9a637..ec68916e 100644 --- a/src/GeneratedModels/CreateCommandResponse.php +++ b/src/GeneratedModels/CreateCommandResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property Command|null $command - */ class CreateCommandResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?Command $command = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CreateDeviceRequest.php b/src/GeneratedModels/CreateDeviceRequest.php index abe3dbab..1b75f1f9 100644 --- a/src/GeneratedModels/CreateDeviceRequest.php +++ b/src/GeneratedModels/CreateDeviceRequest.php @@ -5,13 +5,6 @@ namespace GetStream\GeneratedModels; /** * Create device request - * - * @property string $id - * @property string $pushProvider - * @property string|null $pushProviderName - * @property string|null $userID - * @property bool|null $voipToken - * @property UserRequest|null $user */ class CreateDeviceRequest extends BaseModel { @@ -19,8 +12,8 @@ public function __construct( public ?string $id = null, // Device ID public ?string $pushProvider = null, // Push provider public ?string $pushProviderName = null, // Push provider name - public ?string $userID = null, // **Server-side only**. User ID which server acts upon public ?bool $voipToken = null, // When true the token is for Apple VoIP push notifications + public ?string $userID = null, // **Server-side only**. User ID which server acts upon public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/CreateExternalStorageRequest.php b/src/GeneratedModels/CreateExternalStorageRequest.php index 684d3354..992497a3 100644 --- a/src/GeneratedModels/CreateExternalStorageRequest.php +++ b/src/GeneratedModels/CreateExternalStorageRequest.php @@ -5,24 +5,16 @@ namespace GetStream\GeneratedModels; /** * Create external storage - * - * @property string $bucket - * @property string $name - * @property string $storageType - * @property string|null $gcsCredentials - * @property string|null $path - * @property S3Request|null $awsS3 - * @property AzureRequest|null $azureBlob */ class CreateExternalStorageRequest extends BaseModel { public function __construct( - public ?string $bucket = null, // The name of the bucket on the service provider public ?string $name = null, // The name of the provider, this must be unique public ?string $storageType = null, // The type of storage to use - public ?string $gcsCredentials = null, + public ?string $bucket = null, // The name of the bucket on the service provider public ?string $path = null, // The path prefix to use for storing files public ?S3Request $awsS3 = null, + public ?string $gcsCredentials = null, public ?AzureRequest $azureBlob = null, ) { } diff --git a/src/GeneratedModels/CreateExternalStorageResponse.php b/src/GeneratedModels/CreateExternalStorageResponse.php index d764db71..897cd82f 100644 --- a/src/GeneratedModels/CreateExternalStorageResponse.php +++ b/src/GeneratedModels/CreateExternalStorageResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class CreateExternalStorageResponse extends BaseModel { diff --git a/src/GeneratedModels/CreateFeedGroupRequest.php b/src/GeneratedModels/CreateFeedGroupRequest.php index b382de20..45ec4d84 100644 --- a/src/GeneratedModels/CreateFeedGroupRequest.php +++ b/src/GeneratedModels/CreateFeedGroupRequest.php @@ -3,37 +3,23 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property string|null $defaultVisibility - * @property array|null $activityProcessors - * @property array|null $activitySelectors - * @property AggregationConfig|null $aggregation - * @property object|null $custom - * @property NotificationConfig|null $notification - * @property PushNotificationConfig|null $pushNotification - * @property RankingConfig|null $ranking - * @property StoriesConfig|null $stories - */ class CreateFeedGroupRequest extends BaseModel { public function __construct( public ?string $id = null, // Unique identifier for the feed group + public ?NotificationConfig $notification = null, + public ?PushNotificationConfig $pushNotification = null, + public ?StoriesConfig $stories = null, + public ?object $custom = null, // Custom data for the feed group public ?string $defaultVisibility = null, // Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'private'. Defaults to 'visible' if not provided. - /** @var array|null Configuration for activity processors */ + /** @var array|null */ #[ArrayOf(ActivityProcessorConfig::class)] public ?array $activityProcessors = null, // Configuration for activity processors - /** @var array|null Configuration for activity selectors */ + /** @var array|null */ #[ArrayOf(ActivitySelectorConfig::class)] public ?array $activitySelectors = null, // Configuration for activity selectors - public ?AggregationConfig $aggregation = null, - public ?object $custom = null, // Custom data for the feed group - public ?NotificationConfig $notification = null, - public ?PushNotificationConfig $pushNotification = null, public ?RankingConfig $ranking = null, - public ?StoriesConfig $stories = null, + public ?AggregationConfig $aggregation = null, ) { } diff --git a/src/GeneratedModels/CreateFeedGroupResponse.php b/src/GeneratedModels/CreateFeedGroupResponse.php index b45df8bd..103489d9 100644 --- a/src/GeneratedModels/CreateFeedGroupResponse.php +++ b/src/GeneratedModels/CreateFeedGroupResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FeedGroupResponse $feedGroup - */ class CreateFeedGroupResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FeedGroupResponse $feedGroup = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CreateFeedViewRequest.php b/src/GeneratedModels/CreateFeedViewRequest.php index b00a80fb..38279bdd 100644 --- a/src/GeneratedModels/CreateFeedViewRequest.php +++ b/src/GeneratedModels/CreateFeedViewRequest.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property array|null $activitySelectors - * @property AggregationConfig|null $aggregation - * @property RankingConfig|null $ranking - */ class CreateFeedViewRequest extends BaseModel { public function __construct( public ?string $id = null, // Unique identifier for the feed view - /** @var array|null Configuration for selecting activities */ + /** @var array|null */ #[ArrayOf(ActivitySelectorConfig::class)] public ?array $activitySelectors = null, // Configuration for selecting activities - public ?AggregationConfig $aggregation = null, public ?RankingConfig $ranking = null, + public ?AggregationConfig $aggregation = null, ) { } diff --git a/src/GeneratedModels/CreateFeedViewResponse.php b/src/GeneratedModels/CreateFeedViewResponse.php index 9e07aa47..38ec8cbf 100644 --- a/src/GeneratedModels/CreateFeedViewResponse.php +++ b/src/GeneratedModels/CreateFeedViewResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FeedViewResponse $feedView - */ class CreateFeedViewResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FeedViewResponse $feedView = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CreateFeedsBatchRequest.php b/src/GeneratedModels/CreateFeedsBatchRequest.php index 281d713d..b75b9ba3 100644 --- a/src/GeneratedModels/CreateFeedsBatchRequest.php +++ b/src/GeneratedModels/CreateFeedsBatchRequest.php @@ -3,15 +3,10 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $feeds - */ class CreateFeedsBatchRequest extends BaseModel { public function __construct( - /** @var array|null List of feeds to create */ + /** @var array|null */ #[ArrayOf(FeedRequest::class)] public ?array $feeds = null, // List of feeds to create ) { diff --git a/src/GeneratedModels/CreateFeedsBatchResponse.php b/src/GeneratedModels/CreateFeedsBatchResponse.php index c67a694d..10dc09ab 100644 --- a/src/GeneratedModels/CreateFeedsBatchResponse.php +++ b/src/GeneratedModels/CreateFeedsBatchResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $feeds - */ class CreateFeedsBatchResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of created feeds */ + /** @var array|null */ #[ArrayOf(FeedResponse::class)] public ?array $feeds = null, // List of created feeds + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CreateGuestRequest.php b/src/GeneratedModels/CreateGuestRequest.php index 68948729..670e1c35 100644 --- a/src/GeneratedModels/CreateGuestRequest.php +++ b/src/GeneratedModels/CreateGuestRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property UserRequest $user - */ class CreateGuestRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CreateGuestResponse.php b/src/GeneratedModels/CreateGuestResponse.php index 0993b5a8..410e37d1 100644 --- a/src/GeneratedModels/CreateGuestResponse.php +++ b/src/GeneratedModels/CreateGuestResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $accessToken - * @property string $duration - * @property UserResponse $user - */ class CreateGuestResponse extends BaseModel { public function __construct( + public ?UserResponse $user = null, public ?string $accessToken = null, // the access token to authenticate the user public ?string $duration = null, // Duration of the request in milliseconds - public ?UserResponse $user = null, ) { } diff --git a/src/GeneratedModels/CreateImportRequest.php b/src/GeneratedModels/CreateImportRequest.php index f8d85e89..b39e57e3 100644 --- a/src/GeneratedModels/CreateImportRequest.php +++ b/src/GeneratedModels/CreateImportRequest.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $mode - * @property string $path - */ class CreateImportRequest extends BaseModel { public function __construct( - public ?string $mode = null, public ?string $path = null, + public ?string $mode = null, ) { } diff --git a/src/GeneratedModels/CreateImportResponse.php b/src/GeneratedModels/CreateImportResponse.php index e455f8d3..109e8049 100644 --- a/src/GeneratedModels/CreateImportResponse.php +++ b/src/GeneratedModels/CreateImportResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property ImportTask|null $importTask */ class CreateImportResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?ImportTask $importTask = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/CreateImportURLRequest.php b/src/GeneratedModels/CreateImportURLRequest.php index 6d34c793..dbf971bb 100644 --- a/src/GeneratedModels/CreateImportURLRequest.php +++ b/src/GeneratedModels/CreateImportURLRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $filename - */ class CreateImportURLRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CreateImportURLResponse.php b/src/GeneratedModels/CreateImportURLResponse.php index 8ce26d33..61976820 100644 --- a/src/GeneratedModels/CreateImportURLResponse.php +++ b/src/GeneratedModels/CreateImportURLResponse.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property string $path - * @property string $uploadUrl */ class CreateImportURLResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?string $path = null, public ?string $uploadUrl = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/CreateImportV2TaskRequest.php b/src/GeneratedModels/CreateImportV2TaskRequest.php index 6303d239..c7956089 100644 --- a/src/GeneratedModels/CreateImportV2TaskRequest.php +++ b/src/GeneratedModels/CreateImportV2TaskRequest.php @@ -5,11 +5,6 @@ namespace GetStream\GeneratedModels; /** * Client request - * - * @property string $product - * @property ImportV2TaskSettings $settings - * @property string|null $userID - * @property UserRequest|null $user */ class CreateImportV2TaskRequest extends BaseModel { diff --git a/src/GeneratedModels/CreateImportV2TaskResponse.php b/src/GeneratedModels/CreateImportV2TaskResponse.php index e9823b83..97b9f91d 100644 --- a/src/GeneratedModels/CreateImportV2TaskResponse.php +++ b/src/GeneratedModels/CreateImportV2TaskResponse.php @@ -5,27 +5,18 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property int $appPk - * @property \DateTime $createdAt - * @property string $duration - * @property string $id - * @property string $product - * @property int $state - * @property \DateTime $updatedAt - * @property ImportV2TaskSettings $settings */ class CreateImportV2TaskResponse extends BaseModel { public function __construct( - public ?int $appPk = null, - public ?\DateTime $createdAt = null, - public ?string $duration = null, // Duration of the request in milliseconds public ?string $id = null, + public ?int $appPk = null, public ?string $product = null, public ?int $state = null, - public ?\DateTime $updatedAt = null, public ?ImportV2TaskSettings $settings = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/CreateMembershipLevelRequest.php b/src/GeneratedModels/CreateMembershipLevelRequest.php index 02128c9d..8dbe7f33 100644 --- a/src/GeneratedModels/CreateMembershipLevelRequest.php +++ b/src/GeneratedModels/CreateMembershipLevelRequest.php @@ -3,16 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property string $name - * @property string|null $description - * @property int|null $priority - * @property array|null $tags - * @property object|null $custom - */ class CreateMembershipLevelRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CreateMembershipLevelResponse.php b/src/GeneratedModels/CreateMembershipLevelResponse.php index ce6f29a2..20088804 100644 --- a/src/GeneratedModels/CreateMembershipLevelResponse.php +++ b/src/GeneratedModels/CreateMembershipLevelResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property MembershipLevelResponse $membershipLevel - */ class CreateMembershipLevelResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?MembershipLevelResponse $membershipLevel = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CreatePollOptionRequest.php b/src/GeneratedModels/CreatePollOptionRequest.php index 4256fb62..5927f5e6 100644 --- a/src/GeneratedModels/CreatePollOptionRequest.php +++ b/src/GeneratedModels/CreatePollOptionRequest.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $text - * @property string|null $userID - * @property object|null $custom - * @property UserRequest|null $user - */ class CreatePollOptionRequest extends BaseModel { public function __construct( public ?string $text = null, // Option text - public ?string $userID = null, public ?object $custom = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/CreatePollRequest.php b/src/GeneratedModels/CreatePollRequest.php index f886b440..d49d0b58 100644 --- a/src/GeneratedModels/CreatePollRequest.php +++ b/src/GeneratedModels/CreatePollRequest.php @@ -5,38 +5,24 @@ namespace GetStream\GeneratedModels; /** * Contains all information needed to create a new poll - * - * @property string $name - * @property bool|null $allowAnswers - * @property bool|null $allowUserSuggestedOptions - * @property string|null $description - * @property bool|null $enforceUniqueVote - * @property string|null $id - * @property bool|null $isClosed - * @property int|null $maxVotesAllowed - * @property string|null $userID - * @property string|null $votingVisibility - * @property array|null $options - * @property object|null $custom - * @property UserRequest|null $user */ class CreatePollRequest extends BaseModel { public function __construct( + public ?string $id = null, public ?string $name = null, // The name of the poll - public ?bool $allowAnswers = null, // Indicates whether users can suggest user defined answers - public ?bool $allowUserSuggestedOptions = null, public ?string $description = null, // A description of the poll - public ?bool $enforceUniqueVote = null, // Indicates whether users can cast multiple votes - public ?string $id = null, - public ?bool $isClosed = null, // Indicates whether the poll is open for voting - public ?int $maxVotesAllowed = null, // Indicates the maximum amount of votes a user can cast - public ?string $userID = null, - public ?string $votingVisibility = null, /** @var array|null */ #[ArrayOf(PollOptionInput::class)] public ?array $options = null, + public ?string $votingVisibility = null, + public ?bool $enforceUniqueVote = null, // Indicates whether users can cast multiple votes + public ?int $maxVotesAllowed = null, // Indicates the maximum amount of votes a user can cast + public ?bool $allowUserSuggestedOptions = null, + public ?bool $allowAnswers = null, // Indicates whether users can suggest user defined answers + public ?bool $isClosed = null, // Indicates whether the poll is open for voting public ?object $custom = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/CreateReminderRequest.php b/src/GeneratedModels/CreateReminderRequest.php index a5de2590..ca075757 100644 --- a/src/GeneratedModels/CreateReminderRequest.php +++ b/src/GeneratedModels/CreateReminderRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime|null $remindAt - * @property string|null $userID - * @property UserRequest|null $user - */ class CreateReminderRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CreateRoleRequest.php b/src/GeneratedModels/CreateRoleRequest.php index 03f199c8..a91806aa 100644 --- a/src/GeneratedModels/CreateRoleRequest.php +++ b/src/GeneratedModels/CreateRoleRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $name - */ class CreateRoleRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/CreateRoleResponse.php b/src/GeneratedModels/CreateRoleResponse.php index 59430efb..7d457410 100644 --- a/src/GeneratedModels/CreateRoleResponse.php +++ b/src/GeneratedModels/CreateRoleResponse.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property Role $role */ class CreateRoleResponse extends BaseModel { diff --git a/src/GeneratedModels/CreateSIPTrunkRequest.php b/src/GeneratedModels/CreateSIPTrunkRequest.php index f8e4ffa8..47fe3fbc 100644 --- a/src/GeneratedModels/CreateSIPTrunkRequest.php +++ b/src/GeneratedModels/CreateSIPTrunkRequest.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * Request to create a new SIP trunk - * - * @property string $name - * @property array $numbers */ class CreateSIPTrunkRequest extends BaseModel { diff --git a/src/GeneratedModels/CreateSIPTrunkResponse.php b/src/GeneratedModels/CreateSIPTrunkResponse.php index 85ee0309..ac969617 100644 --- a/src/GeneratedModels/CreateSIPTrunkResponse.php +++ b/src/GeneratedModels/CreateSIPTrunkResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Response containing the created SIP trunk - * - * @property string $duration - * @property SIPTrunkResponse|null $sipTrunk */ class CreateSIPTrunkResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?SIPTrunkResponse $sipTrunk = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CustomActionRequestPayload.php b/src/GeneratedModels/CustomActionRequestPayload.php new file mode 100644 index 00000000..7242003b --- /dev/null +++ b/src/GeneratedModels/CustomActionRequestPayload.php @@ -0,0 +1,19 @@ + $flags - * @property string|null $entityCreatorID - * @property string|null $userID - * @property ModerationPayload|null $moderationPayload - * @property UserRequest|null $user - */ class CustomCheckRequest extends BaseModel { public function __construct( - public ?string $entityID = null, // Unique identifier of the entity public ?string $entityType = null, // Type of entity to perform custom check on - /** @var array|null List of custom check flags (1-10 flags required) */ + public ?string $entityID = null, // Unique identifier of the entity + public ?string $entityCreatorID = null, // ID of the user who created the entity (required for non-message entities) + public ?ModerationPayloadRequest $moderationPayload = null, + /** @var array|null */ #[ArrayOf(CustomCheckFlag::class)] public ?array $flags = null, // List of custom check flags (1-10 flags required) - public ?string $entityCreatorID = null, // ID of the user who created the entity (required for non-message entities) public ?string $userID = null, - public ?ModerationPayload $moderationPayload = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/CustomCheckResponse.php b/src/GeneratedModels/CustomCheckResponse.php index 14adcbbb..e2f2a75b 100644 --- a/src/GeneratedModels/CustomCheckResponse.php +++ b/src/GeneratedModels/CustomCheckResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string $id - * @property string $status - * @property ReviewQueueItemResponse|null $item - */ class CustomCheckResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?string $id = null, // Unique identifier of the custom check - public ?string $status = null, // Status of the custom check public ?ReviewQueueItemResponse $item = null, + public ?string $status = null, // Status of the custom check + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/CustomEvent.php b/src/GeneratedModels/CustomEvent.php new file mode 100644 index 00000000..794cc367 --- /dev/null +++ b/src/GeneratedModels/CustomEvent.php @@ -0,0 +1,18 @@ + $daily - */ class DailyMetricStatsResponse extends BaseModel { public function __construct( - public ?int $total = null, // Total value across all days in the date range - /** @var array|null Array of daily metric values */ + /** @var array|null */ #[ArrayOf(DailyMetricResponse::class)] public ?array $daily = null, // Array of daily metric values + public ?int $total = null, // Total value across all days in the date range ) { } diff --git a/src/GeneratedModels/DailyValue.php b/src/GeneratedModels/DailyValue.php new file mode 100644 index 00000000..f88873f1 --- /dev/null +++ b/src/GeneratedModels/DailyValue.php @@ -0,0 +1,19 @@ +|null */ + #[MapOf(DeleteChannelsResultResponse::class)] public ?array $result = null, // Map of channel IDs and their deletion results + public ?string $taskID = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/DeleteChannelsResultResponse.php b/src/GeneratedModels/DeleteChannelsResultResponse.php index 73122b14..455c4c17 100644 --- a/src/GeneratedModels/DeleteChannelsResultResponse.php +++ b/src/GeneratedModels/DeleteChannelsResultResponse.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $status - * @property string|null $error - */ class DeleteChannelsResultResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/DeleteCollectionsResponse.php b/src/GeneratedModels/DeleteCollectionsResponse.php index c65c331d..48e7be16 100644 --- a/src/GeneratedModels/DeleteCollectionsResponse.php +++ b/src/GeneratedModels/DeleteCollectionsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - */ class DeleteCollectionsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/DeleteCommandResponse.php b/src/GeneratedModels/DeleteCommandResponse.php index 211ed249..6cb448f5 100644 --- a/src/GeneratedModels/DeleteCommandResponse.php +++ b/src/GeneratedModels/DeleteCommandResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string $name - */ class DeleteCommandResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?string $name = null, // Command name + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/DeleteCommentReactionResponse.php b/src/GeneratedModels/DeleteCommentReactionResponse.php index e38a9b66..8a5f1d47 100644 --- a/src/GeneratedModels/DeleteCommentReactionResponse.php +++ b/src/GeneratedModels/DeleteCommentReactionResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property CommentResponse $comment - * @property FeedsReactionResponse $reaction - */ class DeleteCommentReactionResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?CommentResponse $comment = null, public ?FeedsReactionResponse $reaction = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/DeleteCommentRequestPayload.php b/src/GeneratedModels/DeleteCommentRequestPayload.php new file mode 100644 index 00000000..687df474 --- /dev/null +++ b/src/GeneratedModels/DeleteCommentRequestPayload.php @@ -0,0 +1,19 @@ +|null $attachments - * @property array|null $mentionedUsers + * Contains the draft message content */ class DraftPayloadResponse extends BaseModel { public function __construct( - public ?string $id = null, - public ?string $text = null, - public ?object $custom = null, - public ?string $html = null, - public ?string $mml = null, - public ?string $parentID = null, - public ?string $pollID = null, - public ?string $quotedMessageID = null, - public ?bool $showInChannel = null, - public ?bool $silent = null, - public ?string $type = null, + public ?string $id = null, // Message ID is unique string identifier of the message + public ?string $text = null, // Text of the message + public ?string $mml = null, // MML content of the message /** @var array|null */ #[ArrayOf(Attachment::class)] - public ?array $attachments = null, + public ?array $attachments = null, // Array of message attachments + public ?string $parentID = null, // ID of parent message (thread) + public ?bool $showInChannel = null, // Whether thread reply should be shown in the channel as well + public ?object $custom = null, /** @var array|null */ #[ArrayOf(UserResponse::class)] - public ?array $mentionedUsers = null, + public ?array $mentionedUsers = null, // List of mentioned users + public ?string $quotedMessageID = null, + public ?string $html = null, // Contains HTML markup of the message + public ?string $type = null, // Contains type of the message. One of: regular, system + public ?bool $silent = null, // Whether message is silent or not + public ?string $pollID = null, // Identifier of the poll to include in the message ) { } diff --git a/src/GeneratedModels/DraftResponse.php b/src/GeneratedModels/DraftResponse.php index 52dcd72b..af493c7d 100644 --- a/src/GeneratedModels/DraftResponse.php +++ b/src/GeneratedModels/DraftResponse.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $channelCid - * @property \DateTime $createdAt - * @property DraftPayloadResponse $message - * @property string|null $parentID - * @property ChannelResponse|null $channel - * @property MessageResponse|null $parentMessage - * @property MessageResponse|null $quotedMessage - */ class DraftResponse extends BaseModel { public function __construct( - public ?string $channelCid = null, - public ?\DateTime $createdAt = null, public ?DraftPayloadResponse $message = null, - public ?string $parentID = null, + public ?string $channelCid = null, public ?ChannelResponse $channel = null, + public ?string $parentID = null, public ?MessageResponse $parentMessage = null, public ?MessageResponse $quotedMessage = null, + public ?\DateTime $createdAt = null, ) { } diff --git a/src/GeneratedModels/EdgeResponse.php b/src/GeneratedModels/EdgeResponse.php index 6b6a2109..d36fd2b2 100644 --- a/src/GeneratedModels/EdgeResponse.php +++ b/src/GeneratedModels/EdgeResponse.php @@ -3,33 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $continentCode - * @property string $countryIsoCode - * @property int $green - * @property string $id - * @property string $latencyTestUrl - * @property int $latitude - * @property int $longitude - * @property int $red - * @property string $subdivisionIsoCode - * @property int $yellow - */ class EdgeResponse extends BaseModel { public function __construct( - public ?string $continentCode = null, - public ?string $countryIsoCode = null, - public ?int $green = null, public ?string $id = null, public ?string $latencyTestUrl = null, + public ?int $green = null, + public ?int $yellow = null, + public ?int $red = null, public ?int $latitude = null, public ?int $longitude = null, - public ?int $red = null, public ?string $subdivisionIsoCode = null, - public ?int $yellow = null, + public ?string $countryIsoCode = null, + public ?string $continentCode = null, ) { } diff --git a/src/GeneratedModels/EgressHLSResponse.php b/src/GeneratedModels/EgressHLSResponse.php index 59efc30a..f7784422 100644 --- a/src/GeneratedModels/EgressHLSResponse.php +++ b/src/GeneratedModels/EgressHLSResponse.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $playlistUrl - * @property string $status - */ class EgressHLSResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/EgressRTMPResponse.php b/src/GeneratedModels/EgressRTMPResponse.php index af366552..b5c9f6b8 100644 --- a/src/GeneratedModels/EgressRTMPResponse.php +++ b/src/GeneratedModels/EgressRTMPResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $name - * @property \DateTime $startedAt - * @property string|null $streamKey - * @property string|null $streamUrl - */ class EgressRTMPResponse extends BaseModel { public function __construct( public ?string $name = null, - public ?\DateTime $startedAt = null, - public ?string $streamKey = null, public ?string $streamUrl = null, + public ?string $streamKey = null, + public ?\DateTime $startedAt = null, ) { } diff --git a/src/GeneratedModels/EgressResponse.php b/src/GeneratedModels/EgressResponse.php index 11b00d97..8684deed 100644 --- a/src/GeneratedModels/EgressResponse.php +++ b/src/GeneratedModels/EgressResponse.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $broadcasting - * @property array $rtmps - * @property CompositeRecordingResponse|null $compositeRecording - * @property FrameRecordingResponse|null $frameRecording - * @property EgressHLSResponse|null $hls - * @property IndividualRecordingResponse|null $individualRecording - * @property RawRecordingResponse|null $rawRecording - */ class EgressResponse extends BaseModel { public function __construct( public ?bool $broadcasting = null, + public ?EgressHLSResponse $hls = null, /** @var array|null */ #[ArrayOf(EgressRTMPResponse::class)] public ?array $rtmps = null, - public ?CompositeRecordingResponse $compositeRecording = null, public ?FrameRecordingResponse $frameRecording = null, - public ?EgressHLSResponse $hls = null, + public ?CompositeRecordingResponse $compositeRecording = null, public ?IndividualRecordingResponse $individualRecording = null, public ?RawRecordingResponse $rawRecording = null, ) { diff --git a/src/GeneratedModels/EndCallResponse.php b/src/GeneratedModels/EndCallResponse.php index 0c8772a9..1b97b78e 100644 --- a/src/GeneratedModels/EndCallResponse.php +++ b/src/GeneratedModels/EndCallResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Response for ending a call - * - * @property string $duration */ class EndCallResponse extends BaseModel { diff --git a/src/GeneratedModels/EnrichedActivity.php b/src/GeneratedModels/EnrichedActivity.php index eb69e040..b7eb2f85 100644 --- a/src/GeneratedModels/EnrichedActivity.php +++ b/src/GeneratedModels/EnrichedActivity.php @@ -3,37 +3,21 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $foreignID - * @property string|null $id - * @property int|null $score - * @property string|null $verb - * @property array|null $to - * @property Data|null $actor - * @property array|null $latestReactions - * @property Data|null $object - * @property Data|null $origin - * @property array|null $ownReactions - * @property array|null $reactionCounts - * @property Data|null $target - */ class EnrichedActivity extends BaseModel { public function __construct( - public ?string $foreignID = null, public ?string $id = null, - public ?int $score = null, - public ?string $verb = null, - public ?array $to = null, public ?Data $actor = null, - public ?array $latestReactions = null, + public ?string $verb = null, public ?Data $object = null, + public ?string $foreignID = null, + public ?Data $target = null, public ?Data $origin = null, - public ?array $ownReactions = null, + public ?array $to = null, + public ?int $score = null, public ?array $reactionCounts = null, - public ?Data $target = null, + public ?array $ownReactions = null, + public ?array $latestReactions = null, ) { } diff --git a/src/GeneratedModels/EnrichedCollectionResponse.php b/src/GeneratedModels/EnrichedCollectionResponse.php index 858975db..437e41c8 100644 --- a/src/GeneratedModels/EnrichedCollectionResponse.php +++ b/src/GeneratedModels/EnrichedCollectionResponse.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property string $name - * @property string $status - * @property \DateTime|null $createdAt - * @property \DateTime|null $updatedAt - * @property string|null $userID - * @property object|null $custom - */ class EnrichedCollectionResponse extends BaseModel { public function __construct( - public ?string $id = null, // Unique identifier for the collection within its name public ?string $name = null, // Name/type of the collection - public ?string $status = null, // Enrichment status of the collection + public ?string $id = null, // Unique identifier for the collection within its name + public ?object $custom = null, // Custom data for the collection + public ?string $userID = null, // ID of the user who owns this collection public ?\DateTime $createdAt = null, // When the collection was created public ?\DateTime $updatedAt = null, // When the collection was last updated - public ?string $userID = null, // ID of the user who owns this collection - public ?object $custom = null, // Custom data for the collection + public ?string $status = null, // Enrichment status of the collection. One of: ok, notfound ) { } diff --git a/src/GeneratedModels/EnrichedReaction.php b/src/GeneratedModels/EnrichedReaction.php index ff05fc1a..1c8e67b9 100644 --- a/src/GeneratedModels/EnrichedReaction.php +++ b/src/GeneratedModels/EnrichedReaction.php @@ -3,39 +3,22 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $activityID - * @property string $kind - * @property string $userID - * @property string|null $id - * @property string|null $parent - * @property array|null $targetFeeds - * @property array|null $childrenCounts - * @property Time|null $createdAt - * @property object|null $data - * @property array|null $latestChildren - * @property array|null $ownChildren - * @property Time|null $updatedAt - * @property Data|null $user - */ class EnrichedReaction extends BaseModel { public function __construct( - public ?string $activityID = null, + public ?string $id = null, public ?string $kind = null, + public ?string $activityID = null, public ?string $userID = null, - public ?string $id = null, - public ?string $parent = null, - public ?array $targetFeeds = null, - public ?array $childrenCounts = null, - public ?Time $createdAt = null, public ?object $data = null, + public ?array $targetFeeds = null, + public ?string $parent = null, public ?array $latestChildren = null, public ?array $ownChildren = null, - public ?Time $updatedAt = null, + public ?array $childrenCounts = null, public ?Data $user = null, + public ?Time $createdAt = null, + public ?Time $updatedAt = null, ) { } diff --git a/src/GeneratedModels/EnrichmentOptions.php b/src/GeneratedModels/EnrichmentOptions.php index bb0d565e..92dada9e 100644 --- a/src/GeneratedModels/EnrichmentOptions.php +++ b/src/GeneratedModels/EnrichmentOptions.php @@ -5,47 +5,28 @@ namespace GetStream\GeneratedModels; /** * Options to skip specific enrichments to improve performance. Default is false (enrichments are included). Setting a field to true skips that enrichment. - * - * @property bool|null $enrichOwnFollowings - * @property bool|null $skipActivity - * @property bool|null $skipActivityCollections - * @property bool|null $skipActivityComments - * @property bool|null $skipActivityCurrentFeed - * @property bool|null $skipActivityMentionedUsers - * @property bool|null $skipActivityOwnBookmarks - * @property bool|null $skipActivityParents - * @property bool|null $skipActivityPoll - * @property bool|null $skipActivityReactions - * @property bool|null $skipActivityRefreshImageUrls - * @property bool|null $skipAll - * @property bool|null $skipFeedMemberUser - * @property bool|null $skipFollowers - * @property bool|null $skipFollowing - * @property bool|null $skipOwnCapabilities - * @property bool|null $skipOwnFollows - * @property bool|null $skipPins */ class EnrichmentOptions extends BaseModel { public function __construct( - public ?bool $enrichOwnFollowings = null, // Default: false. When true, includes fetching and enriching own_followings (follows where activity author's feeds follow current user's feeds). public ?bool $skipActivity = null, // Default: false. When true, skips all activity enrichments. - public ?bool $skipActivityCollections = null, // Default: false. When true, skips enriching collections on activities. + public ?bool $skipActivityParents = null, // Default: false. When true, skips enriching parent activities. + public ?bool $skipActivityReactions = null, // Default: false. When true, skips fetching and enriching latest and own reactions on activities. Note: If reactions are already denormalized in the database, they will still be included. + public ?bool $skipActivityOwnBookmarks = null, // Default: false. When true, skips enriching own bookmarks on activities. public ?bool $skipActivityComments = null, // Default: false. When true, skips enriching comments on activities. - public ?bool $skipActivityCurrentFeed = null, // Default: false. When true, skips enriching current_feed on activities. Note: CurrentFeed is still computed for permission checks, but enrichment is skipped. public ?bool $skipActivityMentionedUsers = null, // Default: false. When true, skips enriching mentioned users on activities. - public ?bool $skipActivityOwnBookmarks = null, // Default: false. When true, skips enriching own bookmarks on activities. - public ?bool $skipActivityParents = null, // Default: false. When true, skips enriching parent activities. public ?bool $skipActivityPoll = null, // Default: false. When true, skips enriching poll data on activities. - public ?bool $skipActivityReactions = null, // Default: false. When true, skips fetching and enriching latest and own reactions on activities. Note: If reactions are already denormalized in the database, they will still be included. + public ?bool $skipActivityCollections = null, // Default: false. When true, skips enriching collections on activities. public ?bool $skipActivityRefreshImageUrls = null, // Default: false. When true, skips refreshing image URLs on activities. - public ?bool $skipAll = null, // Default: false. When true, skips all enrichments. + public ?bool $skipActivityCurrentFeed = null, // Default: false. When true, skips enriching current_feed on activities. Note: CurrentFeed is still computed for permission checks, but enrichment is skipped. + public ?bool $skipPins = null, // Default: false. When true, skips enriching pinned activities. public ?bool $skipFeedMemberUser = null, // Default: false. When true, skips enriching user data on feed members. public ?bool $skipFollowers = null, // Default: false. When true, skips fetching and enriching followers. Note: If followers_pagination is explicitly provided, followers will be fetched regardless of this setting. public ?bool $skipFollowing = null, // Default: false. When true, skips fetching and enriching following. Note: If following_pagination is explicitly provided, following will be fetched regardless of this setting. - public ?bool $skipOwnCapabilities = null, // Default: false. When true, skips computing and including capabilities for feeds. public ?bool $skipOwnFollows = null, // Default: false. When true, skips fetching and enriching own_follows (follows where user's feeds follow target feeds). - public ?bool $skipPins = null, // Default: false. When true, skips enriching pinned activities. + public ?bool $enrichOwnFollowings = null, // Default: false. When true, includes fetching and enriching own_followings (follows where activity author's feeds follow current user's feeds). + public ?bool $skipOwnCapabilities = null, // Default: false. When true, skips computing and including capabilities for feeds. + public ?bool $skipAll = null, // Default: false. When true, skips all enrichments. ) { } diff --git a/src/GeneratedModels/EntityCreatorResponse.php b/src/GeneratedModels/EntityCreatorResponse.php index 56335e0b..c869180f 100644 --- a/src/GeneratedModels/EntityCreatorResponse.php +++ b/src/GeneratedModels/EntityCreatorResponse.php @@ -3,69 +3,38 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $banCount - * @property bool $banned - * @property \DateTime $createdAt - * @property int $deletedContentCount - * @property int $flaggedCount - * @property string $id - * @property bool $invisible - * @property string $language - * @property bool $online - * @property string $role - * @property bool $shadowBanned - * @property \DateTime $updatedAt - * @property array $blockedUserIds - * @property array $teams - * @property object $custom - * @property int|null $avgResponseTime - * @property \DateTime|null $banExpires - * @property \DateTime|null $deactivatedAt - * @property \DateTime|null $deletedAt - * @property string|null $image - * @property \DateTime|null $lastActive - * @property string|null $name - * @property \DateTime|null $revokeTokensIssuedBefore - * @property array|null $devices - * @property PrivacySettingsResponse|null $privacySettings - * @property PushNotificationSettingsResponse|null $pushNotifications - * @property array|null $teamsRole - */ class EntityCreatorResponse extends BaseModel { public function __construct( - public ?int $banCount = null, // Number of minor actions performed on the user - public ?bool $banned = null, - public ?\DateTime $createdAt = null, - public ?int $deletedContentCount = null, // Number of major actions performed on the user - public ?int $flaggedCount = null, // Number of flag actions performed on the user public ?string $id = null, - public ?bool $invisible = null, + public ?string $name = null, + public ?string $image = null, + public ?object $custom = null, public ?string $language = null, - public ?bool $online = null, public ?string $role = null, - public ?bool $shadowBanned = null, - public ?\DateTime $updatedAt = null, - public ?array $blockedUserIds = null, public ?array $teams = null, - public ?object $custom = null, - public ?int $avgResponseTime = null, - public ?\DateTime $banExpires = null, - public ?\DateTime $deactivatedAt = null, + public ?array $teamsRole = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, public ?\DateTime $deletedAt = null, - public ?string $image = null, + public ?bool $banned = null, + public ?bool $online = null, public ?\DateTime $lastActive = null, - public ?string $name = null, public ?\DateTime $revokeTokensIssuedBefore = null, + public ?\DateTime $deactivatedAt = null, + public ?array $blockedUserIds = null, + public ?int $avgResponseTime = null, + public ?bool $shadowBanned = null, + public ?\DateTime $banExpires = null, + public ?PushNotificationSettingsResponse $pushNotifications = null, + public ?PrivacySettingsResponse $privacySettings = null, /** @var array|null */ #[ArrayOf(DeviceResponse::class)] public ?array $devices = null, - public ?PrivacySettingsResponse $privacySettings = null, - public ?PushNotificationSettingsResponse $pushNotifications = null, - public ?array $teamsRole = null, + public ?bool $invisible = null, + public ?int $banCount = null, // Number of minor actions performed on the user + public ?int $deletedContentCount = null, // Number of major actions performed on the user + public ?int $flaggedCount = null, // Number of flag actions performed on the user ) { } diff --git a/src/GeneratedModels/ErrorResult.php b/src/GeneratedModels/ErrorResult.php index 37c87009..d1401932 100644 --- a/src/GeneratedModels/ErrorResult.php +++ b/src/GeneratedModels/ErrorResult.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $type - * @property string|null $stacktrace - * @property string|null $version - */ class ErrorResult extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/EventHook.php b/src/GeneratedModels/EventHook.php index 33cd7e4b..f3515b94 100644 --- a/src/GeneratedModels/EventHook.php +++ b/src/GeneratedModels/EventHook.php @@ -3,61 +3,33 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime|null $createdAt - * @property bool|null $enabled - * @property string|null $hookType - * @property string|null $id - * @property string|null $product - * @property bool|null $shouldSendCustomEvents - * @property string|null $snsAuthType - * @property bool|null $snsEventBasedMessageGroupIDEnabled - * @property string|null $snsKey - * @property string|null $snsRegion - * @property string|null $snsRoleArn - * @property string|null $snsSecret - * @property string|null $snsTopicArn - * @property string|null $sqsAuthType - * @property string|null $sqsKey - * @property string|null $sqsQueueUrl - * @property string|null $sqsRegion - * @property string|null $sqsRoleArn - * @property string|null $sqsSecret - * @property int|null $timeoutMs - * @property \DateTime|null $updatedAt - * @property string|null $webhookUrl - * @property array|null $eventTypes - * @property AsyncModerationCallbackConfig|null $callback - */ class EventHook extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?bool $enabled = null, - public ?string $hookType = null, public ?string $id = null, - public ?string $product = null, - public ?bool $shouldSendCustomEvents = null, - public ?string $snsAuthType = null, - public ?bool $snsEventBasedMessageGroupIDEnabled = null, - public ?string $snsKey = null, - public ?string $snsRegion = null, - public ?string $snsRoleArn = null, - public ?string $snsSecret = null, - public ?string $snsTopicArn = null, - public ?string $sqsAuthType = null, - public ?string $sqsKey = null, + public ?string $hookType = null, + public ?bool $enabled = null, + public ?array $eventTypes = null, + public ?string $webhookUrl = null, public ?string $sqsQueueUrl = null, public ?string $sqsRegion = null, - public ?string $sqsRoleArn = null, + public ?string $sqsAuthType = null, + public ?string $sqsKey = null, public ?string $sqsSecret = null, + public ?string $sqsRoleArn = null, + public ?string $snsTopicArn = null, + public ?string $snsRegion = null, + public ?string $snsAuthType = null, + public ?string $snsKey = null, + public ?string $snsSecret = null, + public ?string $snsRoleArn = null, + public ?string $product = null, + public ?bool $shouldSendCustomEvents = null, public ?int $timeoutMs = null, - public ?\DateTime $updatedAt = null, - public ?string $webhookUrl = null, - public ?array $eventTypes = null, public ?AsyncModerationCallbackConfig $callback = null, + public ?bool $snsEventBasedMessageGroupIDEnabled = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, ) { } diff --git a/src/GeneratedModels/EventNotificationSettings.php b/src/GeneratedModels/EventNotificationSettings.php index b9c0f178..7ecaf147 100644 --- a/src/GeneratedModels/EventNotificationSettings.php +++ b/src/GeneratedModels/EventNotificationSettings.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property APNS $apns - * @property FCM $fcm - */ class EventNotificationSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/EventNotificationSettingsRequest.php b/src/GeneratedModels/EventNotificationSettingsRequest.php new file mode 100644 index 00000000..01141566 --- /dev/null +++ b/src/GeneratedModels/EventNotificationSettingsRequest.php @@ -0,0 +1,17 @@ + $channels - * @property bool|null $clearDeletedMessageText - * @property bool|null $exportUsers - * @property bool|null $includeSoftDeletedChannels - * @property bool|null $includeTruncatedMessages - * @property string|null $version - */ class ExportChannelsRequest extends BaseModel { public function __construct( - /** @var array|null Export options for channels */ + public ?string $version = null, // Export version + /** @var array|null */ #[ArrayOf(ChannelExport::class)] public ?array $channels = null, // Export options for channels public ?bool $clearDeletedMessageText = null, // Set if deleted message text should be cleared - public ?bool $exportUsers = null, - public ?bool $includeSoftDeletedChannels = null, // Set if you want to include deleted channels public ?bool $includeTruncatedMessages = null, // Set if you want to include truncated messages - public ?string $version = null, // Export version + public ?bool $includeSoftDeletedChannels = null, // Set if you want to include deleted channels + public ?bool $exportUsers = null, ) { } diff --git a/src/GeneratedModels/ExportChannelsResponse.php b/src/GeneratedModels/ExportChannelsResponse.php index 49c5b396..c692db24 100644 --- a/src/GeneratedModels/ExportChannelsResponse.php +++ b/src/GeneratedModels/ExportChannelsResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string $taskID - */ class ExportChannelsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?string $taskID = null, // ID of the task to export channels + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ExportFeedUserDataResponse.php b/src/GeneratedModels/ExportFeedUserDataResponse.php index cc9b3272..9b540801 100644 --- a/src/GeneratedModels/ExportFeedUserDataResponse.php +++ b/src/GeneratedModels/ExportFeedUserDataResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Response for exporting feed user data - * - * @property string $duration - * @property string $taskID */ class ExportFeedUserDataResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?string $taskID = null, // The task ID for the export task + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ExportUserResponse.php b/src/GeneratedModels/ExportUserResponse.php index 7b65865a..ae5e5d55 100644 --- a/src/GeneratedModels/ExportUserResponse.php +++ b/src/GeneratedModels/ExportUserResponse.php @@ -3,25 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array|null $messages - * @property array|null $reactions - * @property UserResponse|null $user - */ class ExportUserResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null List of exported messages */ + public ?UserResponse $user = null, + /** @var array|null */ #[ArrayOf(MessageResponse::class)] public ?array $messages = null, // List of exported messages - /** @var array|null List of exported reactions */ + /** @var array|null */ #[ArrayOf(ReactionResponse::class)] public ?array $reactions = null, // List of exported reactions - public ?UserResponse $user = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ExportUsersRequest.php b/src/GeneratedModels/ExportUsersRequest.php index ac0b3368..4d9514f8 100644 --- a/src/GeneratedModels/ExportUsersRequest.php +++ b/src/GeneratedModels/ExportUsersRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $userIds - */ class ExportUsersRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ExportUsersResponse.php b/src/GeneratedModels/ExportUsersResponse.php index 327034f6..5ee25115 100644 --- a/src/GeneratedModels/ExportUsersResponse.php +++ b/src/GeneratedModels/ExportUsersResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property string $taskID */ class ExportUsersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?string $taskID = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ExternalStorageResponse.php b/src/GeneratedModels/ExternalStorageResponse.php index eb8717fe..fb36c3fc 100644 --- a/src/GeneratedModels/ExternalStorageResponse.php +++ b/src/GeneratedModels/ExternalStorageResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $bucket - * @property string $name - * @property string $path - * @property string $type - */ class ExternalStorageResponse extends BaseModel { public function __construct( - public ?string $bucket = null, public ?string $name = null, - public ?string $path = null, public ?string $type = null, + public ?string $bucket = null, + public ?string $path = null, ) { } diff --git a/src/GeneratedModels/FCM.php b/src/GeneratedModels/FCM.php index 04efc73e..cce28d43 100644 --- a/src/GeneratedModels/FCM.php +++ b/src/GeneratedModels/FCM.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property object|null $data - */ class FCM extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/FCMPayload.php b/src/GeneratedModels/FCMPayload.php new file mode 100644 index 00000000..dd76cda0 --- /dev/null +++ b/src/GeneratedModels/FCMPayload.php @@ -0,0 +1,15 @@ + $members - * @property object $custom - * @property FeedResponse $feed - * @property UserResponseCommonFields $user - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt */ class FeedCreatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, + public ?FeedResponse $feed = null, /** @var array|null */ #[ArrayOf(FeedMemberResponse::class)] public ?array $members = null, - public ?object $custom = null, - public ?FeedResponse $feed = null, - public ?UserResponseCommonFields $user = null, public ?string $type = null, // The type of event: "feeds.feed.created" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, + public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/FeedDeletedEvent.php b/src/GeneratedModels/FeedDeletedEvent.php index ca2c0961..4400e4fe 100644 --- a/src/GeneratedModels/FeedDeletedEvent.php +++ b/src/GeneratedModels/FeedDeletedEvent.php @@ -5,24 +5,16 @@ namespace GetStream\GeneratedModels; /** * Emitted when a feed is deleted. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class FeedDeletedEvent extends BaseModel { public function __construct( + public ?string $type = null, // The type of event: "feeds.feed.deleted" in this case public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, + public ?\DateTime $receivedAt = null, public ?object $custom = null, - public ?string $type = null, // The type of event: "feeds.feed.deleted" in this case + public ?string $fid = null, public ?string $feedVisibility = null, - public ?\DateTime $receivedAt = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/FeedGroup.php b/src/GeneratedModels/FeedGroup.php index d0e58c89..4e16db36 100644 --- a/src/GeneratedModels/FeedGroup.php +++ b/src/GeneratedModels/FeedGroup.php @@ -3,49 +3,29 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $aggregationVersion - * @property int $appPk - * @property \DateTime $createdAt - * @property string $defaultVisibility - * @property string $groupID - * @property \DateTime $updatedAt - * @property array $activityProcessors - * @property array $activitySelectors - * @property object $custom - * @property \DateTime|null $deletedAt - * @property \DateTime|null $lastFeedGetAt - * @property AggregationConfig|null $aggregation - * @property NotificationConfig|null $notification - * @property PushNotificationConfig|null $pushNotification - * @property RankingConfig|null $ranking - * @property StoriesConfig|null $stories - */ class FeedGroup extends BaseModel { public function __construct( - public ?int $aggregationVersion = null, public ?int $appPk = null, - public ?\DateTime $createdAt = null, - public ?string $defaultVisibility = null, public ?string $groupID = null, + public ?NotificationConfig $notification = null, + public ?PushNotificationConfig $pushNotification = null, + public ?string $defaultVisibility = null, + public ?object $custom = null, + public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, + public ?\DateTime $deletedAt = null, + public ?StoriesConfig $stories = null, /** @var array|null */ #[ArrayOf(ActivityProcessorConfig::class)] public ?array $activityProcessors = null, /** @var array|null */ #[ArrayOf(ActivitySelectorConfig::class)] public ?array $activitySelectors = null, - public ?object $custom = null, - public ?\DateTime $deletedAt = null, - public ?\DateTime $lastFeedGetAt = null, - public ?AggregationConfig $aggregation = null, - public ?NotificationConfig $notification = null, - public ?PushNotificationConfig $pushNotification = null, public ?RankingConfig $ranking = null, - public ?StoriesConfig $stories = null, + public ?AggregationConfig $aggregation = null, + public ?int $aggregationVersion = null, + public ?\DateTime $lastFeedGetAt = null, ) { } diff --git a/src/GeneratedModels/FeedGroupChangedEvent.php b/src/GeneratedModels/FeedGroupChangedEvent.php index 71365dc2..f7e5ddb5 100644 --- a/src/GeneratedModels/FeedGroupChangedEvent.php +++ b/src/GeneratedModels/FeedGroupChangedEvent.php @@ -5,27 +5,18 @@ namespace GetStream\GeneratedModels; /** * Emitted when a feed group is changed. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property FeedGroup|null $feedGroup - * @property UserResponseCommonFields|null $user */ class FeedGroupChangedEvent extends BaseModel { public function __construct( + public ?string $type = null, // The type of event: "feeds.feed_group.changed" in this case public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, + public ?\DateTime $receivedAt = null, public ?object $custom = null, - public ?string $type = null, // The type of event: "feeds.feed_group.changed" in this case + public ?string $fid = null, public ?string $feedVisibility = null, - public ?\DateTime $receivedAt = null, - public ?FeedGroup $feedGroup = null, public ?UserResponseCommonFields $user = null, + public ?FeedGroup $feedGroup = null, ) { } diff --git a/src/GeneratedModels/FeedGroupDeletedEvent.php b/src/GeneratedModels/FeedGroupDeletedEvent.php index 10357e7e..44a79798 100644 --- a/src/GeneratedModels/FeedGroupDeletedEvent.php +++ b/src/GeneratedModels/FeedGroupDeletedEvent.php @@ -5,25 +5,17 @@ namespace GetStream\GeneratedModels; /** * Emitted when a feed group is deleted. - * - * @property \DateTime $createdAt - * @property string $fid - * @property string $groupID - * @property object $custom - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt */ class FeedGroupDeletedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, public ?string $groupID = null, // The ID of the feed group that was deleted - public ?object $custom = null, public ?string $type = null, // The type of event: "feeds.feed_group.deleted" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, ) { } diff --git a/src/GeneratedModels/FeedGroupResponse.php b/src/GeneratedModels/FeedGroupResponse.php index e9b8b563..c8c71e3f 100644 --- a/src/GeneratedModels/FeedGroupResponse.php +++ b/src/GeneratedModels/FeedGroupResponse.php @@ -3,43 +3,26 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $id - * @property \DateTime $updatedAt - * @property string|null $defaultVisibility - * @property \DateTime|null $deletedAt - * @property array|null $activityProcessors - * @property array|null $activitySelectors - * @property AggregationConfig|null $aggregation - * @property object|null $custom - * @property NotificationConfig|null $notification - * @property PushNotificationConfig|null $pushNotification - * @property RankingConfig|null $ranking - * @property StoriesConfig|null $stories - */ class FeedGroupResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // When the feed group was created public ?string $id = null, // Identifier within the group + public ?NotificationConfig $notification = null, + public ?PushNotificationConfig $pushNotification = null, + public ?string $defaultVisibility = null, // Default visibility for activities. One of: public, visible, followers, members, private + public ?object $custom = null, // Custom data for the feed group + public ?\DateTime $createdAt = null, // When the feed group was created public ?\DateTime $updatedAt = null, // When the feed group was last updated - public ?string $defaultVisibility = null, // Default visibility for activities public ?\DateTime $deletedAt = null, - /** @var array|null Configuration for activity processors */ + public ?StoriesConfig $stories = null, + /** @var array|null */ #[ArrayOf(ActivityProcessorConfig::class)] public ?array $activityProcessors = null, // Configuration for activity processors - /** @var array|null Configuration for activity selectors */ + /** @var array|null */ #[ArrayOf(ActivitySelectorConfigResponse::class)] public ?array $activitySelectors = null, // Configuration for activity selectors - public ?AggregationConfig $aggregation = null, - public ?object $custom = null, // Custom data for the feed group - public ?NotificationConfig $notification = null, - public ?PushNotificationConfig $pushNotification = null, public ?RankingConfig $ranking = null, - public ?StoriesConfig $stories = null, + public ?AggregationConfig $aggregation = null, ) { } diff --git a/src/GeneratedModels/FeedInput.php b/src/GeneratedModels/FeedInput.php index 9b3eb934..56cd6702 100644 --- a/src/GeneratedModels/FeedInput.php +++ b/src/GeneratedModels/FeedInput.php @@ -3,27 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $description - * @property string|null $name - * @property string|null $visibility - * @property array|null $filterTags - * @property array|null $members - * @property object|null $custom - */ class FeedInput extends BaseModel { public function __construct( - public ?string $description = null, public ?string $name = null, + public ?string $description = null, public ?string $visibility = null, + public ?object $custom = null, public ?array $filterTags = null, /** @var array|null */ #[ArrayOf(FeedMemberRequest::class)] public ?array $members = null, - public ?object $custom = null, ) { } diff --git a/src/GeneratedModels/FeedMemberAddedEvent.php b/src/GeneratedModels/FeedMemberAddedEvent.php index 69361829..a384357d 100644 --- a/src/GeneratedModels/FeedMemberAddedEvent.php +++ b/src/GeneratedModels/FeedMemberAddedEvent.php @@ -5,27 +5,18 @@ namespace GetStream\GeneratedModels; /** * Emitted when a feed member is added. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property FeedMemberResponse $member - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class FeedMemberAddedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, - public ?object $custom = null, public ?FeedMemberResponse $member = null, + public ?UserResponseCommonFields $user = null, public ?string $type = null, // The type of event: "feeds.feed_member.added" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, - public ?UserResponseCommonFields $user = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, ) { } diff --git a/src/GeneratedModels/FeedMemberRemovedEvent.php b/src/GeneratedModels/FeedMemberRemovedEvent.php index 291e1c4b..afd973a5 100644 --- a/src/GeneratedModels/FeedMemberRemovedEvent.php +++ b/src/GeneratedModels/FeedMemberRemovedEvent.php @@ -5,27 +5,18 @@ namespace GetStream\GeneratedModels; /** * Emitted when a feed member is removed. - * - * @property \DateTime $createdAt - * @property string $fid - * @property string $memberID - * @property object $custom - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class FeedMemberRemovedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, public ?string $memberID = null, - public ?object $custom = null, + public ?UserResponseCommonFields $user = null, public ?string $type = null, // The type of event: "feeds.feed_member.removed" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, - public ?UserResponseCommonFields $user = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, ) { } diff --git a/src/GeneratedModels/FeedMemberRequest.php b/src/GeneratedModels/FeedMemberRequest.php index da071532..41916556 100644 --- a/src/GeneratedModels/FeedMemberRequest.php +++ b/src/GeneratedModels/FeedMemberRequest.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $userID - * @property bool|null $invite - * @property string|null $membershipLevel - * @property string|null $role - * @property object|null $custom - */ class FeedMemberRequest extends BaseModel { public function __construct( public ?string $userID = null, // ID of the user to add as a member - public ?bool $invite = null, // Whether this is an invite to become a member - public ?string $membershipLevel = null, // ID of the membership level to assign to the member public ?string $role = null, // Role of the member in the feed + public ?string $membershipLevel = null, // ID of the membership level to assign to the member public ?object $custom = null, // Custom data for the member + public ?bool $invite = null, // Whether this is an invite to become a member ) { } diff --git a/src/GeneratedModels/FeedMemberResponse.php b/src/GeneratedModels/FeedMemberResponse.php index 00d0de83..0077c534 100644 --- a/src/GeneratedModels/FeedMemberResponse.php +++ b/src/GeneratedModels/FeedMemberResponse.php @@ -3,31 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $role - * @property string $status - * @property \DateTime $updatedAt - * @property UserResponse $user - * @property \DateTime|null $inviteAcceptedAt - * @property \DateTime|null $inviteRejectedAt - * @property object|null $custom - * @property MembershipLevelResponse|null $membershipLevel - */ class FeedMemberResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // When the membership was created - public ?string $role = null, // Role of the member in the feed - public ?string $status = null, // Status of the membership - public ?\DateTime $updatedAt = null, // When the membership was last updated public ?UserResponse $user = null, + public ?string $role = null, // Role of the member in the feed + public ?string $status = null, // Status of the membership. One of: member, pending, rejected + public ?MembershipLevelResponse $membershipLevel = null, public ?\DateTime $inviteAcceptedAt = null, // When the invite was accepted public ?\DateTime $inviteRejectedAt = null, // When the invite was rejected public ?object $custom = null, // Custom data for the membership - public ?MembershipLevelResponse $membershipLevel = null, + public ?\DateTime $createdAt = null, // When the membership was created + public ?\DateTime $updatedAt = null, // When the membership was last updated ) { } diff --git a/src/GeneratedModels/FeedMemberUpdatedEvent.php b/src/GeneratedModels/FeedMemberUpdatedEvent.php index 91168c29..04243158 100644 --- a/src/GeneratedModels/FeedMemberUpdatedEvent.php +++ b/src/GeneratedModels/FeedMemberUpdatedEvent.php @@ -5,27 +5,18 @@ namespace GetStream\GeneratedModels; /** * Emitted when a feed member is updated. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property FeedMemberResponse $member - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class FeedMemberUpdatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, - public ?object $custom = null, public ?FeedMemberResponse $member = null, + public ?UserResponseCommonFields $user = null, public ?string $type = null, // The type of event: "feeds.feed_member.updated" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, - public ?UserResponseCommonFields $user = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, ) { } diff --git a/src/GeneratedModels/FeedOwnData.php b/src/GeneratedModels/FeedOwnData.php index 7767a899..b6f69c96 100644 --- a/src/GeneratedModels/FeedOwnData.php +++ b/src/GeneratedModels/FeedOwnData.php @@ -3,26 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $ownCapabilities - * @property array|null $ownFollowings - * @property array|null $ownFollows - * @property FeedMemberResponse|null $ownMembership - */ class FeedOwnData extends BaseModel { public function __construct( - /** @var array|null Capabilities the current user has for this feed */ - #[ArrayOf(FeedOwnCapability::class)] - public ?array $ownCapabilities = null, // Capabilities the current user has for this feed - /** @var array|null Follow relationships where the feed owner's feeds are following the current user's feeds (up to 5 total) */ - #[ArrayOf(FollowResponse::class)] - public ?array $ownFollowings = null, // Follow relationships where the feed owner's feeds are following the current user's feeds (up to 5 total) - /** @var array|null Follow relationships where the current user's feeds are following this feed */ + /** @var array|null */ #[ArrayOf(FollowResponse::class)] public ?array $ownFollows = null, // Follow relationships where the current user's feeds are following this feed + /** @var array|null */ + #[ArrayOf(FollowResponse::class)] + public ?array $ownFollowings = null, // Follow relationships where the feed owner's feeds are following the current user's feeds (up to 5 total) + /** @var array|null */ + #[ArrayOf(FeedOwnCapability::class)] + public ?array $ownCapabilities = null, // Capabilities the current user has for this feed public ?FeedMemberResponse $ownMembership = null, ) { } diff --git a/src/GeneratedModels/FeedRequest.php b/src/GeneratedModels/FeedRequest.php index ff8a7eef..66140146 100644 --- a/src/GeneratedModels/FeedRequest.php +++ b/src/GeneratedModels/FeedRequest.php @@ -3,33 +3,20 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $feedGroupID - * @property string $feedID - * @property string|null $createdByID - * @property string|null $description - * @property string|null $name - * @property string|null $visibility - * @property array|null $filterTags - * @property array|null $members - * @property object|null $custom - */ class FeedRequest extends BaseModel { public function __construct( public ?string $feedGroupID = null, // ID of the feed group public ?string $feedID = null, // ID of the feed public ?string $createdByID = null, // ID of the feed creator - public ?string $description = null, // Description of the feed public ?string $name = null, // Name of the feed - public ?string $visibility = null, // Visibility setting for the feed + public ?string $description = null, // Description of the feed + public ?string $visibility = null, // Visibility setting for the feed. One of: public, visible, followers, members, private + public ?object $custom = null, // Custom data for the feed public ?array $filterTags = null, // Tags used for filtering feeds - /** @var array|null Initial members for the feed */ + /** @var array|null */ #[ArrayOf(FeedMemberRequest::class)] public ?array $members = null, // Initial members for the feed - public ?object $custom = null, // Custom data for the feed ) { } diff --git a/src/GeneratedModels/FeedResponse.php b/src/GeneratedModels/FeedResponse.php index 764d2684..4a80cfec 100644 --- a/src/GeneratedModels/FeedResponse.php +++ b/src/GeneratedModels/FeedResponse.php @@ -3,61 +3,36 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $activityCount - * @property \DateTime $createdAt - * @property string $description - * @property string $feed - * @property int $followerCount - * @property int $followingCount - * @property string $groupID - * @property string $id - * @property int $memberCount - * @property string $name - * @property int $pinCount - * @property \DateTime $updatedAt - * @property UserResponse $createdBy - * @property \DateTime|null $deletedAt - * @property string|null $visibility - * @property array|null $filterTags - * @property array|null $ownCapabilities - * @property array|null $ownFollowings - * @property array|null $ownFollows - * @property object|null $custom - * @property FeedMemberResponse|null $ownMembership - */ class FeedResponse extends BaseModel { public function __construct( - public ?int $activityCount = null, - public ?\DateTime $createdAt = null, // When the feed was created - public ?string $description = null, // Description of the feed - public ?string $feed = null, // Fully qualified feed ID (group_id:id) - public ?int $followerCount = null, // Number of followers of this feed - public ?int $followingCount = null, // Number of feeds this feed follows public ?string $groupID = null, // Group this feed belongs to public ?string $id = null, // Unique identifier for the feed - public ?int $memberCount = null, // Number of members in this feed + public ?string $feed = null, // Fully qualified feed ID (group_id:id) public ?string $name = null, // Name of the feed - public ?int $pinCount = null, // Number of pinned activities in this feed - public ?\DateTime $updatedAt = null, // When the feed was last updated - public ?UserResponse $createdBy = null, - public ?\DateTime $deletedAt = null, // When the feed was deleted - public ?string $visibility = null, // Visibility setting for the feed + public ?string $description = null, // Description of the feed + public ?object $custom = null, // Custom data for the feed public ?array $filterTags = null, // Tags used for filtering feeds - /** @var array|null Capabilities the current user has for this feed */ - #[ArrayOf(FeedOwnCapability::class)] - public ?array $ownCapabilities = null, // Capabilities the current user has for this feed - /** @var array|null Follow relationships where the feed owner’s feeds are following the current user's feeds */ - #[ArrayOf(FollowResponse::class)] - public ?array $ownFollowings = null, // Follow relationships where the feed owner’s feeds are following the current user's feeds - /** @var array|null Follow relationships where the current user's feeds are following this feed */ + public ?string $visibility = null, // Visibility setting for the feed + public ?UserResponse $createdBy = null, + public ?int $memberCount = null, // Number of members in this feed + public ?int $followerCount = null, // Number of followers of this feed + public ?int $followingCount = null, // Number of feeds this feed follows + public ?int $activityCount = null, + public ?int $pinCount = null, // Number of pinned activities in this feed + /** @var array|null */ #[ArrayOf(FollowResponse::class)] public ?array $ownFollows = null, // Follow relationships where the current user's feeds are following this feed - public ?object $custom = null, // Custom data for the feed + /** @var array|null */ + #[ArrayOf(FollowResponse::class)] + public ?array $ownFollowings = null, // Follow relationships where the feed owner’s feeds are following the current user's feeds + /** @var array|null */ + #[ArrayOf(FeedOwnCapability::class)] + public ?array $ownCapabilities = null, // Capabilities the current user has for this feed public ?FeedMemberResponse $ownMembership = null, + public ?\DateTime $createdAt = null, // When the feed was created + public ?\DateTime $updatedAt = null, // When the feed was last updated + public ?\DateTime $deletedAt = null, // When the feed was deleted ) { } diff --git a/src/GeneratedModels/FeedSuggestionResponse.php b/src/GeneratedModels/FeedSuggestionResponse.php index 47209643..25ff091e 100644 --- a/src/GeneratedModels/FeedSuggestionResponse.php +++ b/src/GeneratedModels/FeedSuggestionResponse.php @@ -3,67 +3,39 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $activityCount - * @property \DateTime $createdAt - * @property string $description - * @property string $feed - * @property int $followerCount - * @property int $followingCount - * @property string $groupID - * @property string $id - * @property int $memberCount - * @property string $name - * @property int $pinCount - * @property \DateTime $updatedAt - * @property UserResponse $createdBy - * @property \DateTime|null $deletedAt - * @property string|null $reason - * @property int|null $recommendationScore - * @property string|null $visibility - * @property array|null $filterTags - * @property array|null $ownCapabilities - * @property array|null $ownFollowings - * @property array|null $ownFollows - * @property array|null $algorithmScores - * @property object|null $custom - * @property FeedMemberResponse|null $ownMembership - */ class FeedSuggestionResponse extends BaseModel { public function __construct( - public ?int $activityCount = null, - public ?\DateTime $createdAt = null, // When the feed was created - public ?string $description = null, // Description of the feed - public ?string $feed = null, // Fully qualified feed ID (group_id:id) - public ?int $followerCount = null, // Number of followers of this feed - public ?int $followingCount = null, // Number of feeds this feed follows public ?string $groupID = null, // Group this feed belongs to public ?string $id = null, // Unique identifier for the feed - public ?int $memberCount = null, // Number of members in this feed + public ?string $feed = null, // Fully qualified feed ID (group_id:id) public ?string $name = null, // Name of the feed + public ?string $description = null, // Description of the feed + public ?object $custom = null, // Custom data for the feed + public ?array $filterTags = null, // Tags used for filtering feeds + public ?string $visibility = null, // Visibility setting for the feed + public ?UserResponse $createdBy = null, + public ?int $memberCount = null, // Number of members in this feed + public ?int $followerCount = null, // Number of followers of this feed + public ?int $followingCount = null, // Number of feeds this feed follows + public ?int $activityCount = null, public ?int $pinCount = null, // Number of pinned activities in this feed + /** @var array|null */ + #[ArrayOf(FollowResponse::class)] + public ?array $ownFollows = null, // Follow relationships where the current user's feeds are following this feed + /** @var array|null */ + #[ArrayOf(FollowResponse::class)] + public ?array $ownFollowings = null, // Follow relationships where the feed owner’s feeds are following the current user's feeds + /** @var array|null */ + #[ArrayOf(FeedOwnCapability::class)] + public ?array $ownCapabilities = null, // Capabilities the current user has for this feed + public ?FeedMemberResponse $ownMembership = null, + public ?\DateTime $createdAt = null, // When the feed was created public ?\DateTime $updatedAt = null, // When the feed was last updated - public ?UserResponse $createdBy = null, public ?\DateTime $deletedAt = null, // When the feed was deleted - public ?string $reason = null, public ?int $recommendationScore = null, - public ?string $visibility = null, // Visibility setting for the feed - public ?array $filterTags = null, // Tags used for filtering feeds - /** @var array|null Capabilities the current user has for this feed */ - #[ArrayOf(FeedOwnCapability::class)] - public ?array $ownCapabilities = null, // Capabilities the current user has for this feed - /** @var array|null Follow relationships where the feed owner’s feeds are following the current user's feeds */ - #[ArrayOf(FollowResponse::class)] - public ?array $ownFollowings = null, // Follow relationships where the feed owner’s feeds are following the current user's feeds - /** @var array|null Follow relationships where the current user's feeds are following this feed */ - #[ArrayOf(FollowResponse::class)] - public ?array $ownFollows = null, // Follow relationships where the current user's feeds are following this feed + public ?string $reason = null, public ?array $algorithmScores = null, - public ?object $custom = null, // Custom data for the feed - public ?FeedMemberResponse $ownMembership = null, ) { } diff --git a/src/GeneratedModels/FeedUpdatedEvent.php b/src/GeneratedModels/FeedUpdatedEvent.php index 89c7270c..791cb8a0 100644 --- a/src/GeneratedModels/FeedUpdatedEvent.php +++ b/src/GeneratedModels/FeedUpdatedEvent.php @@ -5,26 +5,17 @@ namespace GetStream\GeneratedModels; /** * Emitted when a feed is created. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property FeedResponse $feed - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property UserResponseCommonFields|null $user */ class FeedUpdatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $fid = null, - public ?object $custom = null, public ?FeedResponse $feed = null, public ?string $type = null, // The type of event: "feeds.feed.updated" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/FeedViewResponse.php b/src/GeneratedModels/FeedViewResponse.php index 72be5178..6fbfeaa8 100644 --- a/src/GeneratedModels/FeedViewResponse.php +++ b/src/GeneratedModels/FeedViewResponse.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property \DateTime|null $lastUsedAt - * @property array|null $activitySelectors - * @property AggregationConfig|null $aggregation - * @property RankingConfig|null $ranking - */ class FeedViewResponse extends BaseModel { public function __construct( public ?string $id = null, // Unique identifier for the custom feed view - public ?\DateTime $lastUsedAt = null, // When the feed view was last used - /** @var array|null Configured activity selectors */ + /** @var array|null */ #[ArrayOf(ActivitySelectorConfigResponse::class)] public ?array $activitySelectors = null, // Configured activity selectors - public ?AggregationConfig $aggregation = null, public ?RankingConfig $ranking = null, + public ?AggregationConfig $aggregation = null, + public ?\DateTime $lastUsedAt = null, // When the feed view was last used ) { } diff --git a/src/GeneratedModels/FeedVisibilityResponse.php b/src/GeneratedModels/FeedVisibilityResponse.php index 653a785d..ce8ea7f0 100644 --- a/src/GeneratedModels/FeedVisibilityResponse.php +++ b/src/GeneratedModels/FeedVisibilityResponse.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $name - * @property array $permissions - * @property array $grants - */ class FeedVisibilityResponse extends BaseModel { public function __construct( public ?string $name = null, // Name of the feed visibility level - /** @var array|null List of permission policies */ + public ?array $grants = null, // Permission grants for each role + /** @var array|null */ #[ArrayOf(Permission::class)] public ?array $permissions = null, // List of permission policies - public ?array $grants = null, // Permission grants for each role ) { } diff --git a/src/GeneratedModels/FeedsModerationTemplateConfigPayload.php b/src/GeneratedModels/FeedsModerationTemplateConfigPayload.php new file mode 100644 index 00000000..9e25e5be --- /dev/null +++ b/src/GeneratedModels/FeedsModerationTemplateConfigPayload.php @@ -0,0 +1,19 @@ +|null */ + #[ArrayOf(LabelResponse::class)] + public ?array $labels = null, + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/FlagMessageDetailsResponse.php b/src/GeneratedModels/FlagMessageDetailsResponse.php new file mode 100644 index 00000000..a828c323 --- /dev/null +++ b/src/GeneratedModels/FlagMessageDetailsResponse.php @@ -0,0 +1,18 @@ + $follows - */ class FollowBatchRequest extends BaseModel { public function __construct( - /** @var array|null List of follow relationships to create */ + /** @var array|null */ #[ArrayOf(FollowRequest::class)] public ?array $follows = null, // List of follow relationships to create ) { diff --git a/src/GeneratedModels/FollowBatchResponse.php b/src/GeneratedModels/FollowBatchResponse.php index 1c84377d..b76b3b7e 100644 --- a/src/GeneratedModels/FollowBatchResponse.php +++ b/src/GeneratedModels/FollowBatchResponse.php @@ -3,23 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $created - * @property array $follows - */ class FollowBatchResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of newly created follow relationships */ - #[ArrayOf(FollowResponse::class)] - public ?array $created = null, // List of newly created follow relationships - /** @var array|null List of current follow relationships */ + /** @var array|null */ #[ArrayOf(FollowResponse::class)] public ?array $follows = null, // List of current follow relationships + /** @var array|null */ + #[ArrayOf(FollowResponse::class)] + public ?array $created = null, // List of newly created follow relationships + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/FollowCreatedEvent.php b/src/GeneratedModels/FollowCreatedEvent.php index 0be9db09..66567f39 100644 --- a/src/GeneratedModels/FollowCreatedEvent.php +++ b/src/GeneratedModels/FollowCreatedEvent.php @@ -5,25 +5,17 @@ namespace GetStream\GeneratedModels; /** * Emitted when a feed follows another feed. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property FollowResponse $follow - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt */ class FollowCreatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, - public ?object $custom = null, public ?FollowResponse $follow = null, public ?string $type = null, // The type of event: "feeds.follow.created" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, ) { } diff --git a/src/GeneratedModels/FollowDeletedEvent.php b/src/GeneratedModels/FollowDeletedEvent.php index a89226f5..c51f2af3 100644 --- a/src/GeneratedModels/FollowDeletedEvent.php +++ b/src/GeneratedModels/FollowDeletedEvent.php @@ -5,25 +5,17 @@ namespace GetStream\GeneratedModels; /** * Emitted when a feed unfollows another feed. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property FollowResponse $follow - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt */ class FollowDeletedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, - public ?object $custom = null, public ?FollowResponse $follow = null, public ?string $type = null, // The type of event: "feeds.follow.deleted" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, ) { } diff --git a/src/GeneratedModels/FollowPair.php b/src/GeneratedModels/FollowPair.php index d5ab5671..ecc61de7 100644 --- a/src/GeneratedModels/FollowPair.php +++ b/src/GeneratedModels/FollowPair.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $source - * @property string $target - */ class FollowPair extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/FollowRequest.php b/src/GeneratedModels/FollowRequest.php index 75a927e7..36a1cd82 100644 --- a/src/GeneratedModels/FollowRequest.php +++ b/src/GeneratedModels/FollowRequest.php @@ -3,27 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $source - * @property string $target - * @property bool|null $createNotificationActivity - * @property string|null $pushPreference - * @property bool|null $skipPush - * @property string|null $status - * @property object|null $custom - */ class FollowRequest extends BaseModel { public function __construct( public ?string $source = null, // Fully qualified ID of the source feed public ?string $target = null, // Fully qualified ID of the target feed - public ?bool $createNotificationActivity = null, // Whether to create a notification activity for this follow + public ?object $custom = null, // Custom data for the follow relationship public ?string $pushPreference = null, // Push preference for the follow relationship + public ?bool $createNotificationActivity = null, // Whether to create a notification activity for this follow + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) public ?bool $skipPush = null, // Whether to skip push for this follow - public ?string $status = null, // Status of the follow relationship - public ?object $custom = null, // Custom data for the follow relationship + public ?string $status = null, // Status of the follow relationship. One of: accepted, pending, rejected ) { } diff --git a/src/GeneratedModels/FollowResponse.php b/src/GeneratedModels/FollowResponse.php index a205645f..f44c9222 100644 --- a/src/GeneratedModels/FollowResponse.php +++ b/src/GeneratedModels/FollowResponse.php @@ -3,33 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $followerRole - * @property string $pushPreference - * @property string $status - * @property \DateTime $updatedAt - * @property FeedResponse $sourceFeed - * @property FeedResponse $targetFeed - * @property \DateTime|null $requestAcceptedAt - * @property \DateTime|null $requestRejectedAt - * @property object|null $custom - */ class FollowResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // When the follow relationship was created - public ?string $followerRole = null, // Role of the follower (source user) in the follow relationship - public ?string $pushPreference = null, // Push preference for notifications - public ?string $status = null, // Status of the follow relationship - public ?\DateTime $updatedAt = null, // When the follow relationship was last updated public ?FeedResponse $sourceFeed = null, public ?FeedResponse $targetFeed = null, + public ?string $pushPreference = null, // Push preference for notifications. One of: all, none + public ?object $custom = null, // Custom data for the follow relationship public ?\DateTime $requestAcceptedAt = null, // When the follow request was accepted public ?\DateTime $requestRejectedAt = null, // When the follow request was rejected - public ?object $custom = null, // Custom data for the follow relationship + public ?string $status = null, // Status of the follow relationship. One of: accepted, pending, rejected + public ?string $followerRole = null, // Role of the follower (source user) in the follow relationship + public ?\DateTime $createdAt = null, // When the follow relationship was created + public ?\DateTime $updatedAt = null, // When the follow relationship was last updated ) { } diff --git a/src/GeneratedModels/FollowUpdatedEvent.php b/src/GeneratedModels/FollowUpdatedEvent.php index b2de062d..2d2af1b9 100644 --- a/src/GeneratedModels/FollowUpdatedEvent.php +++ b/src/GeneratedModels/FollowUpdatedEvent.php @@ -5,25 +5,17 @@ namespace GetStream\GeneratedModels; /** * Emitted when a follow relationship is updated. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property FollowResponse $follow - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt */ class FollowUpdatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, - public ?object $custom = null, public ?FollowResponse $follow = null, public ?string $type = null, // The type of event: "feeds.follow.updated" in this case - public ?string $feedVisibility = null, + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, + public ?string $feedVisibility = null, ) { } diff --git a/src/GeneratedModels/FrameRecordSettings.php b/src/GeneratedModels/FrameRecordSettings.php index 035745a4..5f1878ab 100644 --- a/src/GeneratedModels/FrameRecordSettings.php +++ b/src/GeneratedModels/FrameRecordSettings.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $captureIntervalInSeconds - * @property string $mode - * @property string|null $quality - */ class FrameRecordSettings extends BaseModel { public function __construct( - public ?int $captureIntervalInSeconds = null, public ?string $mode = null, public ?string $quality = null, + public ?int $captureIntervalInSeconds = null, ) { } diff --git a/src/GeneratedModels/FrameRecordingResponse.php b/src/GeneratedModels/FrameRecordingResponse.php index cad67deb..6b6dec07 100644 --- a/src/GeneratedModels/FrameRecordingResponse.php +++ b/src/GeneratedModels/FrameRecordingResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $status - */ class FrameRecordingResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/FrameRecordingSettingsRequest.php b/src/GeneratedModels/FrameRecordingSettingsRequest.php index 9dee147d..a5490a8d 100644 --- a/src/GeneratedModels/FrameRecordingSettingsRequest.php +++ b/src/GeneratedModels/FrameRecordingSettingsRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $captureIntervalInSeconds - * @property string $mode - * @property string|null $quality - */ class FrameRecordingSettingsRequest extends BaseModel { public function __construct( - public ?int $captureIntervalInSeconds = null, public ?string $mode = null, public ?string $quality = null, + public ?int $captureIntervalInSeconds = null, ) { } diff --git a/src/GeneratedModels/FrameRecordingSettingsResponse.php b/src/GeneratedModels/FrameRecordingSettingsResponse.php index 8ae2cd05..fa712dba 100644 --- a/src/GeneratedModels/FrameRecordingSettingsResponse.php +++ b/src/GeneratedModels/FrameRecordingSettingsResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $captureIntervalInSeconds - * @property string $mode - * @property string|null $quality - */ class FrameRecordingSettingsResponse extends BaseModel { public function __construct( - public ?int $captureIntervalInSeconds = null, public ?string $mode = null, public ?string $quality = null, + public ?int $captureIntervalInSeconds = null, ) { } diff --git a/src/GeneratedModels/FriendReactionsOptions.php b/src/GeneratedModels/FriendReactionsOptions.php new file mode 100644 index 00000000..e7517858 --- /dev/null +++ b/src/GeneratedModels/FriendReactionsOptions.php @@ -0,0 +1,20 @@ + $channelMutes - * @property array $devices - * @property array $mutes - * @property array $teams - * @property object $custom - * @property int|null $avgResponseTime - * @property \DateTime|null $banExpires - * @property \DateTime|null $deactivatedAt - * @property \DateTime|null $deletedAt - * @property string|null $image - * @property \DateTime|null $lastActive - * @property string|null $name - * @property \DateTime|null $revokeTokensIssuedBefore - * @property array|null $latestHiddenChannels - * @property PrivacySettingsResponse|null $privacySettings - * @property array|null $teamsRole - */ class FullUserResponse extends BaseModel { public function __construct( - public ?bool $banned = null, - public ?\DateTime $createdAt = null, public ?string $id = null, - public ?bool $invisible = null, + public ?string $name = null, + public ?string $image = null, + public ?object $custom = null, public ?string $language = null, - public ?bool $online = null, public ?string $role = null, - public ?bool $shadowBanned = null, - public ?int $totalUnreadCount = null, - public ?int $unreadChannels = null, - public ?int $unreadCount = null, - public ?int $unreadThreads = null, + public ?array $teams = null, + public ?array $teamsRole = null, + public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, - public ?array $blockedUserIds = null, - /** @var array|null */ - #[ArrayOf(ChannelMute::class)] - public ?array $channelMutes = null, + public ?\DateTime $deletedAt = null, + public ?bool $banned = null, + public ?bool $online = null, + public ?\DateTime $lastActive = null, + public ?\DateTime $revokeTokensIssuedBefore = null, + public ?\DateTime $deactivatedAt = null, + public ?int $avgResponseTime = null, + public ?PrivacySettingsResponse $privacySettings = null, /** @var array|null */ #[ArrayOf(DeviceResponse::class)] public ?array $devices = null, + public ?bool $invisible = null, /** @var array|null */ #[ArrayOf(UserMuteResponse::class)] public ?array $mutes = null, - public ?array $teams = null, - public ?object $custom = null, - public ?int $avgResponseTime = null, - public ?\DateTime $banExpires = null, - public ?\DateTime $deactivatedAt = null, - public ?\DateTime $deletedAt = null, - public ?string $image = null, - public ?\DateTime $lastActive = null, - public ?string $name = null, - public ?\DateTime $revokeTokensIssuedBefore = null, + /** @var array|null */ + #[ArrayOf(ChannelMute::class)] + public ?array $channelMutes = null, + public ?int $unreadCount = null, + public ?int $totalUnreadCount = null, + public ?int $unreadChannels = null, + public ?int $unreadThreads = null, public ?array $latestHiddenChannels = null, - public ?PrivacySettingsResponse $privacySettings = null, - public ?array $teamsRole = null, + public ?bool $shadowBanned = null, + public ?array $blockedUserIds = null, + public ?\DateTime $banExpires = null, ) { } diff --git a/src/GeneratedModels/FutureChannelBanResponse.php b/src/GeneratedModels/FutureChannelBanResponse.php index c4d93342..6fc2b150 100644 --- a/src/GeneratedModels/FutureChannelBanResponse.php +++ b/src/GeneratedModels/FutureChannelBanResponse.php @@ -3,25 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property \DateTime|null $expires - * @property string|null $reason - * @property bool|null $shadow - * @property UserResponse|null $bannedBy - * @property UserResponse|null $user - */ class FutureChannelBanResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, + public ?UserResponse $user = null, + public ?UserResponse $bannedBy = null, public ?\DateTime $expires = null, public ?string $reason = null, public ?bool $shadow = null, - public ?UserResponse $bannedBy = null, - public ?UserResponse $user = null, + public ?\DateTime $createdAt = null, ) { } diff --git a/src/GeneratedModels/GeofenceResponse.php b/src/GeneratedModels/GeofenceResponse.php index ebf56017..4118ceb5 100644 --- a/src/GeneratedModels/GeofenceResponse.php +++ b/src/GeneratedModels/GeofenceResponse.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $name - * @property string|null $description - * @property string|null $type - * @property array|null $countryCodes - */ class GeofenceResponse extends BaseModel { public function __construct( public ?string $name = null, - public ?string $description = null, public ?string $type = null, + public ?string $description = null, public ?array $countryCodes = null, ) { } diff --git a/src/GeneratedModels/GeofenceSettings.php b/src/GeneratedModels/GeofenceSettings.php index 1b79bdd4..3672ddf4 100644 --- a/src/GeneratedModels/GeofenceSettings.php +++ b/src/GeneratedModels/GeofenceSettings.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $names - */ class GeofenceSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/GeofenceSettingsRequest.php b/src/GeneratedModels/GeofenceSettingsRequest.php index 4dc2c3fc..7ee8f543 100644 --- a/src/GeneratedModels/GeofenceSettingsRequest.php +++ b/src/GeneratedModels/GeofenceSettingsRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $names - */ class GeofenceSettingsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/GeofenceSettingsResponse.php b/src/GeneratedModels/GeofenceSettingsResponse.php index d1366f9a..546e1b63 100644 --- a/src/GeneratedModels/GeofenceSettingsResponse.php +++ b/src/GeneratedModels/GeofenceSettingsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $names - */ class GeofenceSettingsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/GetActiveCallsStatusResponse.php b/src/GeneratedModels/GetActiveCallsStatusResponse.php index 20629ae4..d8a6e285 100644 --- a/src/GeneratedModels/GetActiveCallsStatusResponse.php +++ b/src/GeneratedModels/GetActiveCallsStatusResponse.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * Response containing active calls status information - * - * @property string $duration - * @property \DateTime $endTime - * @property \DateTime $startTime - * @property ActiveCallsMetrics|null $metrics - * @property ActiveCallsSummary|null $summary */ class GetActiveCallsStatusResponse extends BaseModel { public function __construct( public ?string $duration = null, - public ?\DateTime $endTime = null, // End time of the status period public ?\DateTime $startTime = null, // Start time of the status period - public ?ActiveCallsMetrics $metrics = null, + public ?\DateTime $endTime = null, // End time of the status period public ?ActiveCallsSummary $summary = null, + public ?ActiveCallsMetrics $metrics = null, ) { } diff --git a/src/GeneratedModels/GetActivityResponse.php b/src/GeneratedModels/GetActivityResponse.php index 6f48b2d1..34d647ca 100644 --- a/src/GeneratedModels/GetActivityResponse.php +++ b/src/GeneratedModels/GetActivityResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ActivityResponse $activity - */ class GetActivityResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?ActivityResponse $activity = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetAppealResponse.php b/src/GeneratedModels/GetAppealResponse.php index 073480d4..23443ffa 100644 --- a/src/GeneratedModels/GetAppealResponse.php +++ b/src/GeneratedModels/GetAppealResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property AppealItemResponse|null $item - */ class GetAppealResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?AppealItemResponse $item = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetApplicationResponse.php b/src/GeneratedModels/GetApplicationResponse.php index 944ba442..4f5a3c8f 100644 --- a/src/GeneratedModels/GetApplicationResponse.php +++ b/src/GeneratedModels/GetApplicationResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property AppResponseFields $app */ class GetApplicationResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?AppResponseFields $app = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetBlockListResponse.php b/src/GeneratedModels/GetBlockListResponse.php index a5cb2a61..78b5260b 100644 --- a/src/GeneratedModels/GetBlockListResponse.php +++ b/src/GeneratedModels/GetBlockListResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Response for get block list - * - * @property string $duration - * @property BlockListResponse|null $blocklist */ class GetBlockListResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?BlockListResponse $blocklist = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetBlockedUsersResponse.php b/src/GeneratedModels/GetBlockedUsersResponse.php index 11f6ea76..3056cfd9 100644 --- a/src/GeneratedModels/GetBlockedUsersResponse.php +++ b/src/GeneratedModels/GetBlockedUsersResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $blocks - */ class GetBlockedUsersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null Array of blocked user object */ + /** @var array|null */ #[ArrayOf(BlockedUserResponse::class)] public ?array $blocks = null, // Array of blocked user object + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetCallParticipantSessionMetricsResponse.php b/src/GeneratedModels/GetCallParticipantSessionMetricsResponse.php index 4556ca71..c08d6ab0 100644 --- a/src/GeneratedModels/GetCallParticipantSessionMetricsResponse.php +++ b/src/GeneratedModels/GetCallParticipantSessionMetricsResponse.php @@ -5,31 +5,21 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property bool|null $isPublisher - * @property bool|null $isSubscriber - * @property \DateTime|null $joinedAt - * @property string|null $publisherType - * @property string|null $userID - * @property string|null $userSessionID - * @property array|null $publishedTracks - * @property SessionClient|null $client */ class GetCallParticipantSessionMetricsResponse extends BaseModel { public function __construct( public ?string $duration = null, // Duration of the request in milliseconds - public ?bool $isPublisher = null, - public ?bool $isSubscriber = null, - public ?\DateTime $joinedAt = null, - public ?string $publisherType = null, public ?string $userID = null, public ?string $userSessionID = null, + public ?string $publisherType = null, + public ?SessionClient $client = null, + public ?\DateTime $joinedAt = null, + public ?bool $isPublisher = null, + public ?bool $isSubscriber = null, /** @var array|null */ #[ArrayOf(PublishedTrackMetrics::class)] public ?array $publishedTracks = null, - public ?SessionClient $client = null, ) { } diff --git a/src/GeneratedModels/GetCallReportResponse.php b/src/GeneratedModels/GetCallReportResponse.php index acf387e9..954f0b5b 100644 --- a/src/GeneratedModels/GetCallReportResponse.php +++ b/src/GeneratedModels/GetCallReportResponse.php @@ -5,25 +5,18 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property string $sessionID - * @property ReportResponse $report - * @property array|null $videoReactions - * @property ChatActivityStatsResponse|null $chatActivity - * @property CallSessionResponse|null $session */ class GetCallReportResponse extends BaseModel { public function __construct( public ?string $duration = null, // Duration of the request in milliseconds public ?string $sessionID = null, + public ?CallSessionResponse $session = null, public ?ReportResponse $report = null, + public ?ChatActivityStatsResponse $chatActivity = null, /** @var array|null */ #[ArrayOf(VideoReactionsResponse::class)] public ?array $videoReactions = null, - public ?ChatActivityStatsResponse $chatActivity = null, - public ?CallSessionResponse $session = null, ) { } diff --git a/src/GeneratedModels/GetCallResponse.php b/src/GeneratedModels/GetCallResponse.php index 326dee9f..f3483b8c 100644 --- a/src/GeneratedModels/GetCallResponse.php +++ b/src/GeneratedModels/GetCallResponse.php @@ -3,25 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $members - * @property array $ownCapabilities - * @property CallResponse $call - */ class GetCallResponse extends BaseModel { public function __construct( - public ?string $duration = null, + public ?CallResponse $call = null, /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, /** @var array|null */ #[ArrayOf(OwnCapability::class)] public ?array $ownCapabilities = null, - public ?CallResponse $call = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetCallSessionParticipantStatsDetailsResponse.php b/src/GeneratedModels/GetCallSessionParticipantStatsDetailsResponse.php index 6086541a..7a1b484d 100644 --- a/src/GeneratedModels/GetCallSessionParticipantStatsDetailsResponse.php +++ b/src/GeneratedModels/GetCallSessionParticipantStatsDetailsResponse.php @@ -5,31 +5,20 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $callID - * @property string $callSessionID - * @property string $callType - * @property string $duration - * @property string $userID - * @property string $userSessionID - * @property ParticipantSeriesPublisherStats|null $publisher - * @property ParticipantSeriesSubscriberStats|null $subscriber - * @property ParticipantSeriesTimeframe|null $timeframe - * @property ParticipantSeriesUserStats|null $user */ class GetCallSessionParticipantStatsDetailsResponse extends BaseModel { public function __construct( + public ?string $duration = null, // Duration of the request in milliseconds + public ?string $callType = null, public ?string $callID = null, public ?string $callSessionID = null, - public ?string $callType = null, - public ?string $duration = null, // Duration of the request in milliseconds public ?string $userID = null, public ?string $userSessionID = null, - public ?ParticipantSeriesPublisherStats $publisher = null, - public ?ParticipantSeriesSubscriberStats $subscriber = null, public ?ParticipantSeriesTimeframe $timeframe = null, public ?ParticipantSeriesUserStats $user = null, + public ?ParticipantSeriesPublisherStats $publisher = null, + public ?ParticipantSeriesSubscriberStats $subscriber = null, ) { } diff --git a/src/GeneratedModels/GetCallTypeResponse.php b/src/GeneratedModels/GetCallTypeResponse.php index 672bd74b..6506e0ac 100644 --- a/src/GeneratedModels/GetCallTypeResponse.php +++ b/src/GeneratedModels/GetCallTypeResponse.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $duration - * @property string $name - * @property \DateTime $updatedAt - * @property array $grants - * @property NotificationSettings $notificationSettings - * @property CallSettingsResponse $settings - * @property string|null $externalStorage - */ class GetCallTypeResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $duration = null, public ?string $name = null, - public ?\DateTime $updatedAt = null, public ?array $grants = null, - public ?NotificationSettings $notificationSettings = null, public ?CallSettingsResponse $settings = null, + public ?NotificationSettingsResponse $notificationSettings = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, public ?string $externalStorage = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetCampaignResponse.php b/src/GeneratedModels/GetCampaignResponse.php index 3ba3f11b..673253eb 100644 --- a/src/GeneratedModels/GetCampaignResponse.php +++ b/src/GeneratedModels/GetCampaignResponse.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property CampaignResponse|null $campaign - * @property PagerResponse|null $users */ class GetCampaignResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?CampaignResponse $campaign = null, public ?PagerResponse $users = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetChannelTypeResponse.php b/src/GeneratedModels/GetChannelTypeResponse.php index 170a7723..2ed8eb03 100644 --- a/src/GeneratedModels/GetChannelTypeResponse.php +++ b/src/GeneratedModels/GetChannelTypeResponse.php @@ -5,91 +5,54 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $automod - * @property string $automodBehavior - * @property bool $connectEvents - * @property bool $countMessages - * @property \DateTime $createdAt - * @property bool $customEvents - * @property bool $deliveryEvents - * @property string $duration - * @property bool $markMessagesPending - * @property int $maxMessageLength - * @property bool $mutes - * @property string $name - * @property bool $polls - * @property bool $pushNotifications - * @property bool $quotes - * @property bool $reactions - * @property bool $readEvents - * @property bool $reminders - * @property bool $replies - * @property bool $search - * @property bool $sharedLocations - * @property bool $skipLastMsgUpdateForSystemMsgs - * @property bool $typingEvents - * @property \DateTime $updatedAt - * @property bool $uploads - * @property bool $urlEnrichment - * @property bool $userMessageReminders - * @property array $commands - * @property array $permissions - * @property array $grants - * @property string|null $blocklist - * @property string|null $blocklistBehavior - * @property int|null $partitionSize - * @property string|null $partitionTtl - * @property array|null $allowedFlagReasons - * @property array|null $blocklists - * @property Thresholds|null $automodThresholds */ class GetChannelTypeResponse extends BaseModel { public function __construct( - public ?string $automod = null, - public ?string $automodBehavior = null, - public ?bool $connectEvents = null, - public ?bool $countMessages = null, + /** @var array|null */ + #[ArrayOf(PolicyRequest::class)] + public ?array $permissions = null, + public ?array $grants = null, public ?\DateTime $createdAt = null, - public ?bool $customEvents = null, - public ?bool $deliveryEvents = null, - public ?string $duration = null, // Duration of the request in milliseconds - public ?bool $markMessagesPending = null, - public ?int $maxMessageLength = null, - public ?bool $mutes = null, + public ?\DateTime $updatedAt = null, public ?string $name = null, - public ?bool $polls = null, - public ?bool $pushNotifications = null, - public ?bool $quotes = null, - public ?bool $reactions = null, + public ?bool $typingEvents = null, public ?bool $readEvents = null, - public ?bool $reminders = null, - public ?bool $replies = null, + public ?bool $connectEvents = null, + public ?bool $deliveryEvents = null, public ?bool $search = null, - public ?bool $sharedLocations = null, - public ?bool $skipLastMsgUpdateForSystemMsgs = null, - public ?bool $typingEvents = null, - public ?\DateTime $updatedAt = null, + public ?bool $reactions = null, + public ?bool $replies = null, + public ?bool $quotes = null, + public ?bool $mutes = null, public ?bool $uploads = null, public ?bool $urlEnrichment = null, + public ?bool $customEvents = null, + public ?bool $pushNotifications = null, + public ?bool $reminders = null, + public ?bool $markMessagesPending = null, + public ?bool $polls = null, public ?bool $userMessageReminders = null, - /** @var array|null */ - #[ArrayOf(Command::class)] - public ?array $commands = null, - /** @var array|null */ - #[ArrayOf(PolicyRequest::class)] - public ?array $permissions = null, - public ?array $grants = null, + public ?bool $sharedLocations = null, + public ?bool $countMessages = null, + public ?int $maxMessageLength = null, + public ?string $automod = null, + public ?string $automodBehavior = null, public ?string $blocklist = null, public ?string $blocklistBehavior = null, - public ?int $partitionSize = null, - public ?string $partitionTtl = null, - public ?array $allowedFlagReasons = null, /** @var array|null */ #[ArrayOf(BlockListOptions::class)] public ?array $blocklists = null, + public ?array $allowedFlagReasons = null, public ?Thresholds $automodThresholds = null, + public ?int $partitionSize = null, + public ?string $partitionTtl = null, + public ?bool $skipLastMsgUpdateForSystemMsgs = null, + public ?string $pushLevel = null, + /** @var array|null */ + #[ArrayOf(Command::class)] + public ?array $commands = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetCommandResponse.php b/src/GeneratedModels/GetCommandResponse.php index 8430bfa3..7e76f566 100644 --- a/src/GeneratedModels/GetCommandResponse.php +++ b/src/GeneratedModels/GetCommandResponse.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $args - * @property string $description - * @property string $duration - * @property string $name - * @property string $set - * @property \DateTime|null $createdAt - * @property \DateTime|null $updatedAt - */ class GetCommandResponse extends BaseModel { public function __construct( - public ?string $args = null, - public ?string $description = null, - public ?string $duration = null, - public ?string $name = null, - public ?string $set = null, public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, + public ?string $name = null, + public ?string $description = null, + public ?string $args = null, + public ?string $set = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetCommentRepliesResponse.php b/src/GeneratedModels/GetCommentRepliesResponse.php index f48c1d30..d32c5ec3 100644 --- a/src/GeneratedModels/GetCommentRepliesResponse.php +++ b/src/GeneratedModels/GetCommentRepliesResponse.php @@ -3,23 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $comments - * @property string|null $next - * @property string|null $prev - */ class GetCommentRepliesResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null Threaded listing of replies to the comment */ + /** @var array|null */ #[ArrayOf(ThreadedCommentResponse::class)] public ?array $comments = null, // Threaded listing of replies to the comment + public ?string $sort = null, // Sort order used for the replies (first, last, top, best, controversial) public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetCommentResponse.php b/src/GeneratedModels/GetCommentResponse.php index b920602f..25ca8ef8 100644 --- a/src/GeneratedModels/GetCommentResponse.php +++ b/src/GeneratedModels/GetCommentResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property CommentResponse $comment - */ class GetCommentResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?CommentResponse $comment = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetCommentsResponse.php b/src/GeneratedModels/GetCommentsResponse.php index 9f3c2c62..182b0fd0 100644 --- a/src/GeneratedModels/GetCommentsResponse.php +++ b/src/GeneratedModels/GetCommentsResponse.php @@ -3,23 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $comments - * @property string|null $next - * @property string|null $prev - */ class GetCommentsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null Threaded listing for the activity */ + /** @var array|null */ #[ArrayOf(ThreadedCommentResponse::class)] public ?array $comments = null, // Threaded listing for the activity + public ?string $sort = null, // Sort order used for the comments (first, last, top, best, controversial) public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetConfigResponse.php b/src/GeneratedModels/GetConfigResponse.php index b9ab6236..10b5e079 100644 --- a/src/GeneratedModels/GetConfigResponse.php +++ b/src/GeneratedModels/GetConfigResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ConfigResponse|null $config - */ class GetConfigResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?ConfigResponse $config = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetCustomPermissionResponse.php b/src/GeneratedModels/GetCustomPermissionResponse.php index 2ef346ec..5f2f4cd5 100644 --- a/src/GeneratedModels/GetCustomPermissionResponse.php +++ b/src/GeneratedModels/GetCustomPermissionResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property Permission $permission */ class GetCustomPermissionResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?Permission $permission = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetDraftResponse.php b/src/GeneratedModels/GetDraftResponse.php index 6a174cae..fe44818b 100644 --- a/src/GeneratedModels/GetDraftResponse.php +++ b/src/GeneratedModels/GetDraftResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property DraftResponse $draft */ class GetDraftResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?DraftResponse $draft = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetEdgesResponse.php b/src/GeneratedModels/GetEdgesResponse.php index ead771a0..1d710bf6 100644 --- a/src/GeneratedModels/GetEdgesResponse.php +++ b/src/GeneratedModels/GetEdgesResponse.php @@ -5,17 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $edges */ class GetEdgesResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(EdgeResponse::class)] public ?array $edges = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetFeedGroupResponse.php b/src/GeneratedModels/GetFeedGroupResponse.php index d9612147..0ba2e622 100644 --- a/src/GeneratedModels/GetFeedGroupResponse.php +++ b/src/GeneratedModels/GetFeedGroupResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FeedGroupResponse $feedGroup - */ class GetFeedGroupResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FeedGroupResponse $feedGroup = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetFeedViewResponse.php b/src/GeneratedModels/GetFeedViewResponse.php index 3d7740c6..624d85fb 100644 --- a/src/GeneratedModels/GetFeedViewResponse.php +++ b/src/GeneratedModels/GetFeedViewResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FeedViewResponse $feedView - */ class GetFeedViewResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FeedViewResponse $feedView = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetFeedVisibilityResponse.php b/src/GeneratedModels/GetFeedVisibilityResponse.php index 3d44b224..fb87ef58 100644 --- a/src/GeneratedModels/GetFeedVisibilityResponse.php +++ b/src/GeneratedModels/GetFeedVisibilityResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FeedVisibilityResponse $feedVisibility - */ class GetFeedVisibilityResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FeedVisibilityResponse $feedVisibility = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetFeedsRateLimitsResponse.php b/src/GeneratedModels/GetFeedsRateLimitsResponse.php index 5ab43486..690a87fb 100644 --- a/src/GeneratedModels/GetFeedsRateLimitsResponse.php +++ b/src/GeneratedModels/GetFeedsRateLimitsResponse.php @@ -3,23 +3,22 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array|null $android - * @property array|null $ios - * @property array|null $serverSide - * @property array|null $web - */ class GetFeedsRateLimitsResponse extends BaseModel { public function __construct( public ?string $duration = null, + /** @var array|null */ + #[MapOf(LimitInfoResponse::class)] public ?array $android = null, // Rate limits for Android platform (endpoint name -> limit info) + /** @var array|null */ + #[MapOf(LimitInfoResponse::class)] public ?array $ios = null, // Rate limits for iOS platform (endpoint name -> limit info) - public ?array $serverSide = null, // Rate limits for server-side platform (endpoint name -> limit info) + /** @var array|null */ + #[MapOf(LimitInfoResponse::class)] public ?array $web = null, // Rate limits for Web platform (endpoint name -> limit info) + /** @var array|null */ + #[MapOf(LimitInfoResponse::class)] + public ?array $serverSide = null, // Rate limits for server-side platform (endpoint name -> limit info) ) { } diff --git a/src/GeneratedModels/GetFollowSuggestionsResponse.php b/src/GeneratedModels/GetFollowSuggestionsResponse.php index 7eff0e8f..021cb074 100644 --- a/src/GeneratedModels/GetFollowSuggestionsResponse.php +++ b/src/GeneratedModels/GetFollowSuggestionsResponse.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $suggestions - * @property string|null $algorithmUsed - */ class GetFollowSuggestionsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of suggested feeds to follow */ + /** @var array|null */ #[ArrayOf(FeedSuggestionResponse::class)] public ?array $suggestions = null, // List of suggested feeds to follow public ?string $algorithmUsed = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetImportResponse.php b/src/GeneratedModels/GetImportResponse.php index 9e7e49f1..c2fc779a 100644 --- a/src/GeneratedModels/GetImportResponse.php +++ b/src/GeneratedModels/GetImportResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property ImportTask|null $importTask */ class GetImportResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?ImportTask $importTask = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetImportV2TaskResponse.php b/src/GeneratedModels/GetImportV2TaskResponse.php index 8f9d07a7..ef251160 100644 --- a/src/GeneratedModels/GetImportV2TaskResponse.php +++ b/src/GeneratedModels/GetImportV2TaskResponse.php @@ -5,27 +5,18 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property int $appPk - * @property \DateTime $createdAt - * @property string $duration - * @property string $id - * @property string $product - * @property int $state - * @property \DateTime $updatedAt - * @property ImportV2TaskSettings $settings */ class GetImportV2TaskResponse extends BaseModel { public function __construct( - public ?int $appPk = null, - public ?\DateTime $createdAt = null, - public ?string $duration = null, // Duration of the request in milliseconds public ?string $id = null, + public ?int $appPk = null, public ?string $product = null, public ?int $state = null, - public ?\DateTime $updatedAt = null, public ?ImportV2TaskSettings $settings = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetManyMessagesResponse.php b/src/GeneratedModels/GetManyMessagesResponse.php index 1467beab..2dc284dc 100644 --- a/src/GeneratedModels/GetManyMessagesResponse.php +++ b/src/GeneratedModels/GetManyMessagesResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $messages - */ class GetManyMessagesResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of messages */ + /** @var array|null */ #[ArrayOf(MessageResponse::class)] public ?array $messages = null, // List of messages + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetMessageResponse.php b/src/GeneratedModels/GetMessageResponse.php index 7e160ac5..91d4b763 100644 --- a/src/GeneratedModels/GetMessageResponse.php +++ b/src/GeneratedModels/GetMessageResponse.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property MessageWithChannelResponse $message - * @property array|null $pendingMessageMetadata */ class GetMessageResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?MessageWithChannelResponse $message = null, public ?array $pendingMessageMetadata = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetModerationRuleResponse.php b/src/GeneratedModels/GetModerationRuleResponse.php index ba796aec..3bab93c0 100644 --- a/src/GeneratedModels/GetModerationRuleResponse.php +++ b/src/GeneratedModels/GetModerationRuleResponse.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property ModerationRuleV2Response|null $rule */ class GetModerationRuleResponse extends BaseModel { diff --git a/src/GeneratedModels/GetOGResponse.php b/src/GeneratedModels/GetOGResponse.php index 6c8b0cf4..840494b0 100644 --- a/src/GeneratedModels/GetOGResponse.php +++ b/src/GeneratedModels/GetOGResponse.php @@ -3,63 +3,36 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property object $custom - * @property string|null $assetUrl - * @property string|null $authorIcon - * @property string|null $authorLink - * @property string|null $authorName - * @property string|null $color - * @property string|null $fallback - * @property string|null $footer - * @property string|null $footerIcon - * @property string|null $imageUrl - * @property string|null $ogScrapeUrl - * @property int|null $originalHeight - * @property int|null $originalWidth - * @property string|null $pretext - * @property string|null $text - * @property string|null $thumbUrl - * @property string|null $title - * @property string|null $titleLink - * @property string|null $type - * @property array|null $actions - * @property array|null $fields - * @property Images|null $giphy - */ class GetOGResponse extends BaseModel { public function __construct( - public ?string $duration = null, - public ?object $custom = null, - public ?string $assetUrl = null, // URL of detected video or audio - public ?string $authorIcon = null, - public ?string $authorLink = null, // og:site - public ?string $authorName = null, // og:site_name - public ?string $color = null, + public ?string $type = null, // Attachment type, could be empty, image, audio or video public ?string $fallback = null, - public ?string $footer = null, - public ?string $footerIcon = null, - public ?string $imageUrl = null, // URL of detected image - public ?string $ogScrapeUrl = null, // extracted url from the text - public ?int $originalHeight = null, - public ?int $originalWidth = null, + public ?string $color = null, public ?string $pretext = null, - public ?string $text = null, // og:description - public ?string $thumbUrl = null, // URL of detected thumb image + public ?string $authorName = null, // og:site_name + public ?string $authorLink = null, // og:site + public ?string $authorIcon = null, public ?string $title = null, // og:title public ?string $titleLink = null, // og:url - public ?string $type = null, // Attachment type, could be empty, image, audio or video + public ?string $text = null, // og:description + public ?string $imageUrl = null, // URL of detected image + public ?string $thumbUrl = null, // URL of detected thumb image + public ?string $footer = null, + public ?string $footerIcon = null, /** @var array|null */ #[ArrayOf(Action::class)] public ?array $actions = null, /** @var array|null */ #[ArrayOf(Field::class)] public ?array $fields = null, + public ?string $assetUrl = null, // URL of detected video or audio + public ?object $custom = null, public ?Images $giphy = null, + public ?string $ogScrapeUrl = null, // extracted url from the text + public ?int $originalWidth = null, + public ?int $originalHeight = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetOrCreateCallRequest.php b/src/GeneratedModels/GetOrCreateCallRequest.php index e7cc9732..c6d144ea 100644 --- a/src/GeneratedModels/GetOrCreateCallRequest.php +++ b/src/GeneratedModels/GetOrCreateCallRequest.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $membersLimit - * @property bool|null $notify - * @property bool|null $ring - * @property bool|null $video - * @property CallRequest|null $data - */ class GetOrCreateCallRequest extends BaseModel { public function __construct( - public ?int $membersLimit = null, - public ?bool $notify = null, // if provided it sends a notification event to the members for this call + public ?CallRequest $data = null, public ?bool $ring = null, // if provided it sends a ring event to the members for this call + public ?bool $notify = null, // if provided it sends a notification event to the members for this call public ?bool $video = null, - public ?CallRequest $data = null, + public ?int $membersLimit = null, ) { } diff --git a/src/GeneratedModels/GetOrCreateCallResponse.php b/src/GeneratedModels/GetOrCreateCallResponse.php index 82f24d39..5e9f8207 100644 --- a/src/GeneratedModels/GetOrCreateCallResponse.php +++ b/src/GeneratedModels/GetOrCreateCallResponse.php @@ -3,27 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $created - * @property string $duration - * @property array $members - * @property array $ownCapabilities - * @property CallResponse $call - */ class GetOrCreateCallResponse extends BaseModel { public function __construct( - public ?bool $created = null, - public ?string $duration = null, + public ?CallResponse $call = null, /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, /** @var array|null */ #[ArrayOf(OwnCapability::class)] public ?array $ownCapabilities = null, - public ?CallResponse $call = null, + public ?bool $created = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetOrCreateFeedGroupRequest.php b/src/GeneratedModels/GetOrCreateFeedGroupRequest.php index fe7f6cc8..386d5b3c 100644 --- a/src/GeneratedModels/GetOrCreateFeedGroupRequest.php +++ b/src/GeneratedModels/GetOrCreateFeedGroupRequest.php @@ -3,35 +3,22 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $defaultVisibility - * @property array|null $activityProcessors - * @property array|null $activitySelectors - * @property AggregationConfig|null $aggregation - * @property object|null $custom - * @property NotificationConfig|null $notification - * @property PushNotificationConfig|null $pushNotification - * @property RankingConfig|null $ranking - * @property StoriesConfig|null $stories - */ class GetOrCreateFeedGroupRequest extends BaseModel { public function __construct( + public ?NotificationConfig $notification = null, + public ?PushNotificationConfig $pushNotification = null, + public ?StoriesConfig $stories = null, + public ?object $custom = null, // Custom data for the feed group public ?string $defaultVisibility = null, // Default visibility for the feed group, can be 'public', 'visible', 'followers', 'members', or 'private'. Defaults to 'visible' if not provided. - /** @var array|null Configuration for activity processors */ + /** @var array|null */ #[ArrayOf(ActivityProcessorConfig::class)] public ?array $activityProcessors = null, // Configuration for activity processors - /** @var array|null Configuration for activity selectors */ + /** @var array|null */ #[ArrayOf(ActivitySelectorConfig::class)] public ?array $activitySelectors = null, // Configuration for activity selectors - public ?AggregationConfig $aggregation = null, - public ?object $custom = null, // Custom data for the feed group - public ?NotificationConfig $notification = null, - public ?PushNotificationConfig $pushNotification = null, public ?RankingConfig $ranking = null, - public ?StoriesConfig $stories = null, + public ?AggregationConfig $aggregation = null, ) { } diff --git a/src/GeneratedModels/GetOrCreateFeedGroupResponse.php b/src/GeneratedModels/GetOrCreateFeedGroupResponse.php index d885c925..d6c10b54 100644 --- a/src/GeneratedModels/GetOrCreateFeedGroupResponse.php +++ b/src/GeneratedModels/GetOrCreateFeedGroupResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property bool $wasCreated - * @property FeedGroupResponse $feedGroup - */ class GetOrCreateFeedGroupResponse extends BaseModel { public function __construct( - public ?string $duration = null, - public ?bool $wasCreated = null, // Indicates whether the feed group was created (true) or already existed (false) public ?FeedGroupResponse $feedGroup = null, + public ?bool $wasCreated = null, // Indicates whether the feed group was created (true) or already existed (false) + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetOrCreateFeedRequest.php b/src/GeneratedModels/GetOrCreateFeedRequest.php index 34f1ec20..e4a3cbde 100644 --- a/src/GeneratedModels/GetOrCreateFeedRequest.php +++ b/src/GeneratedModels/GetOrCreateFeedRequest.php @@ -5,42 +5,26 @@ namespace GetStream\GeneratedModels; /** * Client request - * - * @property string|null $idAround - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property string|null $userID - * @property string|null $view - * @property bool|null $watch - * @property FeedInput|null $data - * @property EnrichmentOptions|null $enrichmentOptions - * @property object|null $externalRanking - * @property object|null $filter - * @property PagerRequest|null $followersPagination - * @property PagerRequest|null $followingPagination - * @property array|null $interestWeights - * @property PagerRequest|null $memberPagination - * @property UserRequest|null $user */ class GetOrCreateFeedRequest extends BaseModel { public function __construct( - public ?string $idAround = null, - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, - public ?string $userID = null, - public ?string $view = null, - public ?bool $watch = null, public ?FeedInput $data = null, - public ?EnrichmentOptions $enrichmentOptions = null, + public ?bool $watch = null, + public ?string $view = null, public ?object $externalRanking = null, + public ?array $interestWeights = null, public ?object $filter = null, + public ?PagerRequest $memberPagination = null, public ?PagerRequest $followersPagination = null, public ?PagerRequest $followingPagination = null, - public ?array $interestWeights = null, - public ?PagerRequest $memberPagination = null, + public ?EnrichmentOptions $enrichmentOptions = null, + public ?FriendReactionsOptions $friendReactionsOptions = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, + public ?string $idAround = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/GetOrCreateFeedResponse.php b/src/GeneratedModels/GetOrCreateFeedResponse.php index 9f5681bc..7f5d2058 100644 --- a/src/GeneratedModels/GetOrCreateFeedResponse.php +++ b/src/GeneratedModels/GetOrCreateFeedResponse.php @@ -5,53 +5,37 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property bool $created - * @property string $duration - * @property array $activities - * @property array $aggregatedActivities - * @property array $followers - * @property array $following - * @property array $members - * @property array $pinnedActivities - * @property FeedResponse $feed - * @property string|null $next - * @property string|null $prev - * @property PagerResponse|null $followersPagination - * @property PagerResponse|null $followingPagination - * @property PagerResponse|null $memberPagination - * @property NotificationStatusResponse|null $notificationStatus */ class GetOrCreateFeedResponse extends BaseModel { public function __construct( - public ?bool $created = null, - public ?string $duration = null, // Duration of the request in milliseconds + public ?FeedResponse $feed = null, /** @var array|null */ #[ArrayOf(ActivityResponse::class)] public ?array $activities = null, /** @var array|null */ #[ArrayOf(AggregatedActivityResponse::class)] public ?array $aggregatedActivities = null, + /** @var array|null */ + #[ArrayOf(FeedMemberResponse::class)] + public ?array $members = null, /** @var array|null */ #[ArrayOf(FollowResponse::class)] public ?array $followers = null, /** @var array|null */ #[ArrayOf(FollowResponse::class)] public ?array $following = null, - /** @var array|null */ - #[ArrayOf(FeedMemberResponse::class)] - public ?array $members = null, /** @var array|null */ #[ArrayOf(ActivityPinResponse::class)] public ?array $pinnedActivities = null, - public ?FeedResponse $feed = null, - public ?string $next = null, - public ?string $prev = null, + public ?PagerResponse $memberPagination = null, public ?PagerResponse $followersPagination = null, public ?PagerResponse $followingPagination = null, - public ?PagerResponse $memberPagination = null, public ?NotificationStatusResponse $notificationStatus = null, + public ?bool $created = null, + public ?string $next = null, + public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetOrCreateFeedViewRequest.php b/src/GeneratedModels/GetOrCreateFeedViewRequest.php index eb395c25..8b967dca 100644 --- a/src/GeneratedModels/GetOrCreateFeedViewRequest.php +++ b/src/GeneratedModels/GetOrCreateFeedViewRequest.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $activitySelectors - * @property AggregationConfig|null $aggregation - * @property RankingConfig|null $ranking - */ class GetOrCreateFeedViewRequest extends BaseModel { public function __construct( - /** @var array|null Configuration for selecting activities */ + /** @var array|null */ #[ArrayOf(ActivitySelectorConfig::class)] public ?array $activitySelectors = null, // Configuration for selecting activities - public ?AggregationConfig $aggregation = null, public ?RankingConfig $ranking = null, + public ?AggregationConfig $aggregation = null, ) { } diff --git a/src/GeneratedModels/GetOrCreateFeedViewResponse.php b/src/GeneratedModels/GetOrCreateFeedViewResponse.php index 3bb386a9..974561b8 100644 --- a/src/GeneratedModels/GetOrCreateFeedViewResponse.php +++ b/src/GeneratedModels/GetOrCreateFeedViewResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property bool $wasCreated - * @property FeedViewResponse $feedView - */ class GetOrCreateFeedViewResponse extends BaseModel { public function __construct( - public ?string $duration = null, - public ?bool $wasCreated = null, // Indicates whether the feed view was newly created (true) or already existed (false) public ?FeedViewResponse $feedView = null, + public ?bool $wasCreated = null, // Indicates whether the feed view was newly created (true) or already existed (false) + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetPushTemplatesResponse.php b/src/GeneratedModels/GetPushTemplatesResponse.php index e31bd36a..a286ab03 100644 --- a/src/GeneratedModels/GetPushTemplatesResponse.php +++ b/src/GeneratedModels/GetPushTemplatesResponse.php @@ -5,16 +5,13 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $templates */ class GetPushTemplatesResponse extends BaseModel { public function __construct( public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null */ - #[ArrayOf(PushTemplate::class)] + /** @var array|null */ + #[ArrayOf(PushTemplateResponse::class)] public ?array $templates = null, ) { } diff --git a/src/GeneratedModels/GetRateLimitsResponse.php b/src/GeneratedModels/GetRateLimitsResponse.php index e7a43ea6..cb0014d3 100644 --- a/src/GeneratedModels/GetRateLimitsResponse.php +++ b/src/GeneratedModels/GetRateLimitsResponse.php @@ -3,23 +3,22 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array|null $android - * @property array|null $ios - * @property array|null $serverSide - * @property array|null $web - */ class GetRateLimitsResponse extends BaseModel { public function __construct( - public ?string $duration = null, + /** @var array|null */ + #[MapOf(LimitInfoResponse::class)] + public ?array $serverSide = null, // Map of endpoint rate limits for the server-side platform + /** @var array|null */ + #[MapOf(LimitInfoResponse::class)] public ?array $android = null, // Map of endpoint rate limits for the Android platform + /** @var array|null */ + #[MapOf(LimitInfoResponse::class)] public ?array $ios = null, // Map of endpoint rate limits for the iOS platform - public ?array $serverSide = null, // Map of endpoint rate limits for the server-side platform + /** @var array|null */ + #[MapOf(LimitInfoResponse::class)] public ?array $web = null, // Map of endpoint rate limits for the web platform + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetReactionsResponse.php b/src/GeneratedModels/GetReactionsResponse.php index d4598443..bbbaffa4 100644 --- a/src/GeneratedModels/GetReactionsResponse.php +++ b/src/GeneratedModels/GetReactionsResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $reactions - */ class GetReactionsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of reactions */ + /** @var array|null */ #[ArrayOf(ReactionResponse::class)] public ?array $reactions = null, // List of reactions + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetRepliesResponse.php b/src/GeneratedModels/GetRepliesResponse.php index dd9739ef..f1d7de8b 100644 --- a/src/GeneratedModels/GetRepliesResponse.php +++ b/src/GeneratedModels/GetRepliesResponse.php @@ -5,17 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $messages */ class GetRepliesResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(MessageResponse::class)] public ?array $messages = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetReviewQueueItemResponse.php b/src/GeneratedModels/GetReviewQueueItemResponse.php index e852f56d..5c642872 100644 --- a/src/GeneratedModels/GetReviewQueueItemResponse.php +++ b/src/GeneratedModels/GetReviewQueueItemResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ReviewQueueItemResponse|null $item - */ class GetReviewQueueItemResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?ReviewQueueItemResponse $item = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetSegmentResponse.php b/src/GeneratedModels/GetSegmentResponse.php index 58f4d2d2..283e2c93 100644 --- a/src/GeneratedModels/GetSegmentResponse.php +++ b/src/GeneratedModels/GetSegmentResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property SegmentResponse|null $segment - */ class GetSegmentResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?SegmentResponse $segment = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GetTaskResponse.php b/src/GeneratedModels/GetTaskResponse.php index 44501505..49efd848 100644 --- a/src/GeneratedModels/GetTaskResponse.php +++ b/src/GeneratedModels/GetTaskResponse.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $duration - * @property string $status - * @property string $taskID - * @property \DateTime $updatedAt - * @property ErrorResult|null $error - * @property object|null $result - */ class GetTaskResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $duration = null, - public ?string $status = null, // Current status of task public ?string $taskID = null, // ID of task + public ?string $status = null, // Current status of task + public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, - public ?ErrorResult $error = null, public ?object $result = null, // Result produced by task after completion + public ?ErrorResult $error = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GetThreadResponse.php b/src/GeneratedModels/GetThreadResponse.php index a9620173..5ad572e1 100644 --- a/src/GeneratedModels/GetThreadResponse.php +++ b/src/GeneratedModels/GetThreadResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ThreadStateResponse $thread - */ class GetThreadResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?ThreadStateResponse $thread = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/GoLiveRequest.php b/src/GeneratedModels/GoLiveRequest.php index 14c6e104..16a56e83 100644 --- a/src/GeneratedModels/GoLiveRequest.php +++ b/src/GeneratedModels/GoLiveRequest.php @@ -3,31 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $recordingStorageName - * @property bool|null $startClosedCaption - * @property bool|null $startCompositeRecording - * @property bool|null $startHLS - * @property bool|null $startIndividualRecording - * @property bool|null $startRawRecording - * @property bool|null $startRecording - * @property bool|null $startTranscription - * @property string|null $transcriptionStorageName - */ class GoLiveRequest extends BaseModel { public function __construct( - public ?string $recordingStorageName = null, - public ?bool $startClosedCaption = null, - public ?bool $startCompositeRecording = null, public ?bool $startHLS = null, + public ?bool $startRecording = null, + public ?bool $startCompositeRecording = null, public ?bool $startIndividualRecording = null, public ?bool $startRawRecording = null, - public ?bool $startRecording = null, - public ?bool $startTranscription = null, + public ?string $recordingStorageName = null, public ?string $transcriptionStorageName = null, + public ?bool $startTranscription = null, + public ?bool $startClosedCaption = null, ) { } diff --git a/src/GeneratedModels/GoLiveResponse.php b/src/GeneratedModels/GoLiveResponse.php index 609c5b45..f0fb7d70 100644 --- a/src/GeneratedModels/GoLiveResponse.php +++ b/src/GeneratedModels/GoLiveResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property CallResponse $call */ class GoLiveResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?CallResponse $call = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/GoogleVisionConfig.php b/src/GeneratedModels/GoogleVisionConfig.php index 6a862b6f..a740527d 100644 --- a/src/GeneratedModels/GoogleVisionConfig.php +++ b/src/GeneratedModels/GoogleVisionConfig.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enabled - */ class GoogleVisionConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/GroupedStatsResponse.php b/src/GeneratedModels/GroupedStatsResponse.php index a614dd01..b97d1072 100644 --- a/src/GeneratedModels/GroupedStatsResponse.php +++ b/src/GeneratedModels/GroupedStatsResponse.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $name - * @property int $unique - */ class GroupedStatsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/HLSSettings.php b/src/GeneratedModels/HLSSettings.php index 177ec779..c0ddda27 100644 --- a/src/GeneratedModels/HLSSettings.php +++ b/src/GeneratedModels/HLSSettings.php @@ -3,14 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $autoOn - * @property bool $enabled - * @property array $qualityTracks - * @property LayoutSettings|null $layout - */ class HLSSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/HLSSettingsRequest.php b/src/GeneratedModels/HLSSettingsRequest.php index efaf7847..abdd4727 100644 --- a/src/GeneratedModels/HLSSettingsRequest.php +++ b/src/GeneratedModels/HLSSettingsRequest.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $qualityTracks - * @property bool|null $autoOn - * @property bool|null $enabled - * @property LayoutSettingsRequest|null $layout - */ class HLSSettingsRequest extends BaseModel { public function __construct( - public ?array $qualityTracks = null, - public ?bool $autoOn = null, - public ?bool $enabled = null, + public ?bool $autoOn = null, // Whether HLS broadcasting should start automatically + public ?bool $enabled = null, // Whether HLS broadcasting is enabled + public ?array $qualityTracks = null, // Quality tracks for HLS. One of: 360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560 public ?LayoutSettingsRequest $layout = null, ) { } diff --git a/src/GeneratedModels/HLSSettingsResponse.php b/src/GeneratedModels/HLSSettingsResponse.php index 6afed3ef..31df2d4a 100644 --- a/src/GeneratedModels/HLSSettingsResponse.php +++ b/src/GeneratedModels/HLSSettingsResponse.php @@ -5,11 +5,6 @@ namespace GetStream\GeneratedModels; /** * HLSSettings is the payload for HLS settings - * - * @property bool $autoOn - * @property bool $enabled - * @property array $qualityTracks - * @property LayoutSettingsResponse $layout */ class HLSSettingsResponse extends BaseModel { diff --git a/src/GeneratedModels/HarmConfig.php b/src/GeneratedModels/HarmConfig.php index 60020909..c7d9b11c 100644 --- a/src/GeneratedModels/HarmConfig.php +++ b/src/GeneratedModels/HarmConfig.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $cooldownPeriod - * @property int|null $severity - * @property int|null $threshold - * @property array|null $actionSequences - * @property array|null $harmTypes - */ class HarmConfig extends BaseModel { public function __construct( - public ?int $cooldownPeriod = null, - public ?int $severity = null, - public ?int $threshold = null, /** @var array|null */ #[ArrayOf(ActionSequence::class)] public ?array $actionSequences = null, + public ?int $severity = null, public ?array $harmTypes = null, + public ?int $threshold = null, + public ?int $cooldownPeriod = null, ) { } diff --git a/src/GeneratedModels/HideChannelRequest.php b/src/GeneratedModels/HideChannelRequest.php index 0a3719a3..5304c2e0 100644 --- a/src/GeneratedModels/HideChannelRequest.php +++ b/src/GeneratedModels/HideChannelRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $clearHistory - * @property string|null $userID - * @property UserRequest|null $user - */ class HideChannelRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/HideChannelResponse.php b/src/GeneratedModels/HideChannelResponse.php index 5c2329a4..e187406a 100644 --- a/src/GeneratedModels/HideChannelResponse.php +++ b/src/GeneratedModels/HideChannelResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class HideChannelResponse extends BaseModel { diff --git a/src/GeneratedModels/HuaweiConfig.php b/src/GeneratedModels/HuaweiConfig.php index 45366f39..fbd6247e 100644 --- a/src/GeneratedModels/HuaweiConfig.php +++ b/src/GeneratedModels/HuaweiConfig.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $disabled - * @property string|null $id - * @property string|null $secret - */ class HuaweiConfig extends BaseModel { public function __construct( - public ?bool $disabled = null, public ?string $id = null, public ?string $secret = null, + public ?bool $disabled = null, ) { } diff --git a/src/GeneratedModels/HuaweiConfigFields.php b/src/GeneratedModels/HuaweiConfigFields.php index 7ba99ecb..4951d6f7 100644 --- a/src/GeneratedModels/HuaweiConfigFields.php +++ b/src/GeneratedModels/HuaweiConfigFields.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property string|null $id - * @property string|null $secret - */ class HuaweiConfigFields extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ImageContentParameters.php b/src/GeneratedModels/ImageContentParameters.php index 48fb027a..9b2e5878 100644 --- a/src/GeneratedModels/ImageContentParameters.php +++ b/src/GeneratedModels/ImageContentParameters.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $harmLabels - */ class ImageContentParameters extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ImageData.php b/src/GeneratedModels/ImageData.php index 9fecc8cd..d718bdbe 100644 --- a/src/GeneratedModels/ImageData.php +++ b/src/GeneratedModels/ImageData.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $frames - * @property string $height - * @property string $size - * @property string $url - * @property string $width - */ class ImageData extends BaseModel { public function __construct( - public ?string $frames = null, - public ?string $height = null, - public ?string $size = null, public ?string $url = null, public ?string $width = null, + public ?string $height = null, + public ?string $size = null, + public ?string $frames = null, ) { } diff --git a/src/GeneratedModels/ImageRuleParameters.php b/src/GeneratedModels/ImageRuleParameters.php index 616c115e..953257a5 100644 --- a/src/GeneratedModels/ImageRuleParameters.php +++ b/src/GeneratedModels/ImageRuleParameters.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $threshold - * @property string|null $timeWindow - * @property array|null $harmLabels - */ class ImageRuleParameters extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ImageSize.php b/src/GeneratedModels/ImageSize.php index cc7a0418..19c649a6 100644 --- a/src/GeneratedModels/ImageSize.php +++ b/src/GeneratedModels/ImageSize.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $crop - * @property int|null $height - * @property string|null $resize - * @property int|null $width - */ class ImageSize extends BaseModel { public function __construct( - public ?string $crop = null, // Crop mode + public ?string $crop = null, // Crop mode. One of: top, bottom, left, right, center + public ?string $resize = null, // Resize method. One of: clip, crop, scale, fill public ?int $height = null, // Target image height - public ?string $resize = null, // Resize method public ?int $width = null, // Target image width ) { } diff --git a/src/GeneratedModels/ImageUploadRequest.php b/src/GeneratedModels/ImageUploadRequest.php index a87f48ee..1b116c01 100644 --- a/src/GeneratedModels/ImageUploadRequest.php +++ b/src/GeneratedModels/ImageUploadRequest.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $file - * @property array|null $uploadSizes - * @property OnlyUserID|null $user - */ class ImageUploadRequest extends BaseModel { public function __construct( public ?string $file = null, - /** @var array|null field with JSON-encoded array of image size configurations */ + public ?OnlyUserID $user = null, + /** @var array|null */ #[ArrayOf(ImageSize::class)] public ?array $uploadSizes = null, // field with JSON-encoded array of image size configurations - public ?OnlyUserID $user = null, ) { } diff --git a/src/GeneratedModels/ImageUploadResponse.php b/src/GeneratedModels/ImageUploadResponse.php index 3e3ae08c..5d2886c9 100644 --- a/src/GeneratedModels/ImageUploadResponse.php +++ b/src/GeneratedModels/ImageUploadResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string|null $file - * @property string|null $thumbUrl - * @property array|null $uploadSizes - */ class ImageUploadResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?string $file = null, public ?string $thumbUrl = null, - /** @var array|null Array of image size configurations */ + public ?string $duration = null, // Duration of the request in milliseconds + /** @var array|null */ #[ArrayOf(ImageSize::class)] public ?array $uploadSizes = null, // Array of image size configurations ) { diff --git a/src/GeneratedModels/Images.php b/src/GeneratedModels/Images.php index 15b8a9c4..63e68ac4 100644 --- a/src/GeneratedModels/Images.php +++ b/src/GeneratedModels/Images.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property ImageData $fixedHeight - * @property ImageData $fixedHeightDownsampled - * @property ImageData $fixedHeightStill - * @property ImageData $fixedWidth - * @property ImageData $fixedWidthDownsampled - * @property ImageData $fixedWidthStill - * @property ImageData $original - */ class Images extends BaseModel { public function __construct( + public ?ImageData $original = null, public ?ImageData $fixedHeight = null, - public ?ImageData $fixedHeightDownsampled = null, public ?ImageData $fixedHeightStill = null, + public ?ImageData $fixedHeightDownsampled = null, public ?ImageData $fixedWidth = null, - public ?ImageData $fixedWidthDownsampled = null, public ?ImageData $fixedWidthStill = null, - public ?ImageData $original = null, + public ?ImageData $fixedWidthDownsampled = null, ) { } diff --git a/src/GeneratedModels/ImportTask.php b/src/GeneratedModels/ImportTask.php index 585a317d..e1819511 100644 --- a/src/GeneratedModels/ImportTask.php +++ b/src/GeneratedModels/ImportTask.php @@ -3,31 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $id - * @property string $mode - * @property string $path - * @property string $state - * @property \DateTime $updatedAt - * @property array $history - * @property int|null $size - */ class ImportTask extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, public ?string $id = null, - public ?string $mode = null, public ?string $path = null, + public ?string $mode = null, + public ?int $size = null, public ?string $state = null, - public ?\DateTime $updatedAt = null, /** @var array|null */ #[ArrayOf(ImportTaskHistory::class)] public ?array $history = null, - public ?int $size = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, ) { } diff --git a/src/GeneratedModels/ImportTaskHistory.php b/src/GeneratedModels/ImportTaskHistory.php index 81fbd7f5..cd02e316 100644 --- a/src/GeneratedModels/ImportTaskHistory.php +++ b/src/GeneratedModels/ImportTaskHistory.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $nextState - * @property string $prevState - */ class ImportTaskHistory extends BaseModel { public function __construct( public ?\DateTime $createdAt = null, - public ?string $nextState = null, public ?string $prevState = null, + public ?string $nextState = null, ) { } diff --git a/src/GeneratedModels/ImportV2TaskItem.php b/src/GeneratedModels/ImportV2TaskItem.php index 9f695a93..fd3ebb57 100644 --- a/src/GeneratedModels/ImportV2TaskItem.php +++ b/src/GeneratedModels/ImportV2TaskItem.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $appPk - * @property \DateTime $createdAt - * @property string $id - * @property string $product - * @property int $state - * @property \DateTime $updatedAt - * @property ImportV2TaskSettings $settings - */ class ImportV2TaskItem extends BaseModel { public function __construct( - public ?int $appPk = null, - public ?\DateTime $createdAt = null, public ?string $id = null, + public ?int $appPk = null, public ?string $product = null, public ?int $state = null, - public ?\DateTime $updatedAt = null, public ?ImportV2TaskSettings $settings = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, ) { } diff --git a/src/GeneratedModels/ImportV2TaskSettings.php b/src/GeneratedModels/ImportV2TaskSettings.php index 38982352..331da008 100644 --- a/src/GeneratedModels/ImportV2TaskSettings.php +++ b/src/GeneratedModels/ImportV2TaskSettings.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $mode - * @property string|null $path - * @property bool|null $skipReferencesCheck - * @property ImportV2TaskSettingsS3|null $s3 - */ class ImportV2TaskSettings extends BaseModel { public function __construct( + public ?ImportV2TaskSettingsS3 $s3 = null, public ?string $mode = null, public ?string $path = null, public ?bool $skipReferencesCheck = null, - public ?ImportV2TaskSettingsS3 $s3 = null, ) { } diff --git a/src/GeneratedModels/ImportV2TaskSettingsS3.php b/src/GeneratedModels/ImportV2TaskSettingsS3.php index ead97179..9cf05555 100644 --- a/src/GeneratedModels/ImportV2TaskSettingsS3.php +++ b/src/GeneratedModels/ImportV2TaskSettingsS3.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $bucket - * @property string|null $dir - * @property string|null $region - */ class ImportV2TaskSettingsS3 extends BaseModel { public function __construct( + public ?string $region = null, public ?string $bucket = null, public ?string $dir = null, - public ?string $region = null, ) { } diff --git a/src/GeneratedModels/IndividualRecordSettings.php b/src/GeneratedModels/IndividualRecordSettings.php index f58b5104..d999c6bd 100644 --- a/src/GeneratedModels/IndividualRecordSettings.php +++ b/src/GeneratedModels/IndividualRecordSettings.php @@ -3,15 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $mode - */ class IndividualRecordSettings extends BaseModel { public function __construct( public ?string $mode = null, + public ?array $outputTypes = null, ) { } diff --git a/src/GeneratedModels/IndividualRecordingResponse.php b/src/GeneratedModels/IndividualRecordingResponse.php index 630a3fbf..85a07783 100644 --- a/src/GeneratedModels/IndividualRecordingResponse.php +++ b/src/GeneratedModels/IndividualRecordingResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $status - */ class IndividualRecordingResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/IndividualRecordingSettingsRequest.php b/src/GeneratedModels/IndividualRecordingSettingsRequest.php index b14b6e37..a32623c4 100644 --- a/src/GeneratedModels/IndividualRecordingSettingsRequest.php +++ b/src/GeneratedModels/IndividualRecordingSettingsRequest.php @@ -3,15 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $mode - */ class IndividualRecordingSettingsRequest extends BaseModel { public function __construct( - public ?string $mode = null, + public ?string $mode = null, // Recording mode. One of: available, disabled, auto-on + public ?array $outputTypes = null, // Output types to include: audio_only, video_only, audio_video, screenshare_audio_only, screenshare_video_only, screenshare_audio_video ) { } diff --git a/src/GeneratedModels/IndividualRecordingSettingsResponse.php b/src/GeneratedModels/IndividualRecordingSettingsResponse.php index 33e1177f..84ff4b5b 100644 --- a/src/GeneratedModels/IndividualRecordingSettingsResponse.php +++ b/src/GeneratedModels/IndividualRecordingSettingsResponse.php @@ -3,15 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $mode - */ class IndividualRecordingSettingsResponse extends BaseModel { public function __construct( public ?string $mode = null, + public ?array $outputTypes = null, ) { } diff --git a/src/GeneratedModels/IngressAudioEncodingOptions.php b/src/GeneratedModels/IngressAudioEncodingOptions.php index 9432a44c..94abd8ae 100644 --- a/src/GeneratedModels/IngressAudioEncodingOptions.php +++ b/src/GeneratedModels/IngressAudioEncodingOptions.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $bitrate - * @property int $channels - * @property bool $enableDtx - */ class IngressAudioEncodingOptions extends BaseModel { public function __construct( - public ?int $bitrate = null, public ?int $channels = null, public ?bool $enableDtx = null, + public ?int $bitrate = null, ) { } diff --git a/src/GeneratedModels/IngressAudioEncodingOptionsRequest.php b/src/GeneratedModels/IngressAudioEncodingOptionsRequest.php index db313ede..553bb2ab 100644 --- a/src/GeneratedModels/IngressAudioEncodingOptionsRequest.php +++ b/src/GeneratedModels/IngressAudioEncodingOptionsRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $bitrate - * @property int $channels - * @property bool|null $enableDtx - */ class IngressAudioEncodingOptionsRequest extends BaseModel { public function __construct( - public ?int $bitrate = null, public ?int $channels = null, public ?bool $enableDtx = null, + public ?int $bitrate = null, ) { } diff --git a/src/GeneratedModels/IngressAudioEncodingResponse.php b/src/GeneratedModels/IngressAudioEncodingResponse.php index d5a3b46b..e3694841 100644 --- a/src/GeneratedModels/IngressAudioEncodingResponse.php +++ b/src/GeneratedModels/IngressAudioEncodingResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $bitrate - * @property int $channels - * @property bool $enableDtx - */ class IngressAudioEncodingResponse extends BaseModel { public function __construct( - public ?int $bitrate = null, public ?int $channels = null, public ?bool $enableDtx = null, + public ?int $bitrate = null, ) { } diff --git a/src/GeneratedModels/IngressErrorEvent.php b/src/GeneratedModels/IngressErrorEvent.php index 6d159e83..70b2a87b 100644 --- a/src/GeneratedModels/IngressErrorEvent.php +++ b/src/GeneratedModels/IngressErrorEvent.php @@ -5,24 +5,16 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a critical error occurs that breaks the streaming pipeline - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $error - * @property string $ingressStreamID - * @property string $userID - * @property string $type - * @property string|null $code */ class IngressErrorEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "ingress.error" in this case public ?\DateTime $createdAt = null, - public ?string $error = null, // Human-readable error message + public ?string $callCid = null, public ?string $ingressStreamID = null, // Unique identifier for the stream public ?string $userID = null, // User who was streaming - public ?string $type = null, // The type of event: "ingress.error" in this case + public ?string $error = null, // Human-readable error message public ?string $code = null, // Error code ) { } diff --git a/src/GeneratedModels/IngressSettings.php b/src/GeneratedModels/IngressSettings.php index 67b3d24e..3f28bff3 100644 --- a/src/GeneratedModels/IngressSettings.php +++ b/src/GeneratedModels/IngressSettings.php @@ -3,18 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property IngressAudioEncodingOptions|null $audioEncodingOptions - * @property array|null $videoEncodingOptions - */ class IngressSettings extends BaseModel { public function __construct( public ?bool $enabled = null, public ?IngressAudioEncodingOptions $audioEncodingOptions = null, + /** @var array|null */ + #[MapOf(IngressVideoEncodingOptions::class)] public ?array $videoEncodingOptions = null, ) { } diff --git a/src/GeneratedModels/IngressSettingsRequest.php b/src/GeneratedModels/IngressSettingsRequest.php index 7d3cb06c..44b89412 100644 --- a/src/GeneratedModels/IngressSettingsRequest.php +++ b/src/GeneratedModels/IngressSettingsRequest.php @@ -3,18 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enabled - * @property IngressAudioEncodingOptionsRequest|null $audioEncodingOptions - * @property array|null $videoEncodingOptions - */ class IngressSettingsRequest extends BaseModel { public function __construct( public ?bool $enabled = null, public ?IngressAudioEncodingOptionsRequest $audioEncodingOptions = null, + /** @var array|null */ + #[MapOf(IngressVideoEncodingOptionsRequest::class)] public ?array $videoEncodingOptions = null, ) { } diff --git a/src/GeneratedModels/IngressSettingsResponse.php b/src/GeneratedModels/IngressSettingsResponse.php index 03808bf8..e556e3eb 100644 --- a/src/GeneratedModels/IngressSettingsResponse.php +++ b/src/GeneratedModels/IngressSettingsResponse.php @@ -3,18 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property IngressAudioEncodingResponse|null $audioEncodingOptions - * @property array|null $videoEncodingOptions - */ class IngressSettingsResponse extends BaseModel { public function __construct( public ?bool $enabled = null, public ?IngressAudioEncodingResponse $audioEncodingOptions = null, + /** @var array|null */ + #[MapOf(IngressVideoEncodingResponse::class)] public ?array $videoEncodingOptions = null, ) { } diff --git a/src/GeneratedModels/IngressSource.php b/src/GeneratedModels/IngressSource.php index e45c69c2..f9521fc3 100644 --- a/src/GeneratedModels/IngressSource.php +++ b/src/GeneratedModels/IngressSource.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $fps - * @property int $height - * @property int $width - */ class IngressSource extends BaseModel { public function __construct( - public ?int $fps = null, - public ?int $height = null, public ?int $width = null, + public ?int $height = null, + public ?int $fps = null, ) { } diff --git a/src/GeneratedModels/IngressSourceRequest.php b/src/GeneratedModels/IngressSourceRequest.php index ad16028f..c6be05d9 100644 --- a/src/GeneratedModels/IngressSourceRequest.php +++ b/src/GeneratedModels/IngressSourceRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $fps - * @property int $height - * @property int $width - */ class IngressSourceRequest extends BaseModel { public function __construct( - public ?int $fps = null, public ?int $height = null, public ?int $width = null, + public ?int $fps = null, ) { } diff --git a/src/GeneratedModels/IngressSourceResponse.php b/src/GeneratedModels/IngressSourceResponse.php index 954d80eb..fd80c372 100644 --- a/src/GeneratedModels/IngressSourceResponse.php +++ b/src/GeneratedModels/IngressSourceResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $fps - * @property int $height - * @property int $width - */ class IngressSourceResponse extends BaseModel { public function __construct( - public ?int $fps = null, - public ?int $height = null, public ?int $width = null, + public ?int $height = null, + public ?int $fps = null, ) { } diff --git a/src/GeneratedModels/IngressStartedEvent.php b/src/GeneratedModels/IngressStartedEvent.php index 3895cc69..81823fc0 100644 --- a/src/GeneratedModels/IngressStartedEvent.php +++ b/src/GeneratedModels/IngressStartedEvent.php @@ -5,29 +5,19 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a user begins streaming into a call - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $ingressStreamID - * @property string $publisherType - * @property string $userID - * @property string $type - * @property string|null $clientIp - * @property string|null $clientName - * @property string|null $version */ class IngressStartedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "ingress.started" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?string $ingressStreamID = null, // Unique identifier for this stream - public ?string $publisherType = null, // Streaming protocol (e.g., 'rtmps', 'srt', 'rtmp', 'rtsp') public ?string $userID = null, // User who started the stream - public ?string $type = null, // The type of event: "ingress.started" in this case - public ?string $clientIp = null, // Client IP address + public ?string $publisherType = null, // Streaming protocol (e.g., 'rtmps', 'srt', 'rtmp', 'rtsp') public ?string $clientName = null, // Streaming client software name (e.g., 'OBS Studio') public ?string $version = null, // Client software version + public ?string $clientIp = null, // Client IP address ) { } diff --git a/src/GeneratedModels/IngressStoppedEvent.php b/src/GeneratedModels/IngressStoppedEvent.php index 933b7c25..e78b37b4 100644 --- a/src/GeneratedModels/IngressStoppedEvent.php +++ b/src/GeneratedModels/IngressStoppedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when streaming stops due to user action or call ended - * - * @property string $callCid - * @property \DateTime $createdAt - * @property string $ingressStreamID - * @property string $userID - * @property string $type */ class IngressStoppedEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "ingress.stopped" in this case public ?\DateTime $createdAt = null, + public ?string $callCid = null, public ?string $ingressStreamID = null, // Unique identifier for the stream public ?string $userID = null, // User who was streaming - public ?string $type = null, // The type of event: "ingress.stopped" in this case ) { } diff --git a/src/GeneratedModels/IngressVideoEncodingOptions.php b/src/GeneratedModels/IngressVideoEncodingOptions.php index b0e8c598..55c53c52 100644 --- a/src/GeneratedModels/IngressVideoEncodingOptions.php +++ b/src/GeneratedModels/IngressVideoEncodingOptions.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $layers - * @property IngressSource|null $source - */ class IngressVideoEncodingOptions extends BaseModel { public function __construct( + public ?IngressSource $source = null, /** @var array|null */ #[ArrayOf(IngressVideoLayer::class)] public ?array $layers = null, - public ?IngressSource $source = null, ) { } diff --git a/src/GeneratedModels/IngressVideoEncodingOptionsRequest.php b/src/GeneratedModels/IngressVideoEncodingOptionsRequest.php index 27c932bf..f2bd1c86 100644 --- a/src/GeneratedModels/IngressVideoEncodingOptionsRequest.php +++ b/src/GeneratedModels/IngressVideoEncodingOptionsRequest.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $layers - * @property IngressSourceRequest $source - */ class IngressVideoEncodingOptionsRequest extends BaseModel { public function __construct( + public ?IngressSourceRequest $source = null, /** @var array|null */ #[ArrayOf(IngressVideoLayerRequest::class)] public ?array $layers = null, - public ?IngressSourceRequest $source = null, ) { } diff --git a/src/GeneratedModels/IngressVideoEncodingResponse.php b/src/GeneratedModels/IngressVideoEncodingResponse.php index 29facdba..2c41ce17 100644 --- a/src/GeneratedModels/IngressVideoEncodingResponse.php +++ b/src/GeneratedModels/IngressVideoEncodingResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $layers - * @property IngressSourceResponse $source - */ class IngressVideoEncodingResponse extends BaseModel { public function __construct( + public ?IngressSourceResponse $source = null, /** @var array|null */ #[ArrayOf(IngressVideoLayerResponse::class)] public ?array $layers = null, - public ?IngressSourceResponse $source = null, ) { } diff --git a/src/GeneratedModels/IngressVideoLayer.php b/src/GeneratedModels/IngressVideoLayer.php index 9e714999..3f994d54 100644 --- a/src/GeneratedModels/IngressVideoLayer.php +++ b/src/GeneratedModels/IngressVideoLayer.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $bitrate - * @property string $codec - * @property int $frameRate - * @property int $maxDimension - * @property int $minDimension - */ class IngressVideoLayer extends BaseModel { public function __construct( - public ?int $bitrate = null, public ?string $codec = null, + public ?int $bitrate = null, public ?int $frameRate = null, - public ?int $maxDimension = null, public ?int $minDimension = null, + public ?int $maxDimension = null, ) { } diff --git a/src/GeneratedModels/IngressVideoLayerRequest.php b/src/GeneratedModels/IngressVideoLayerRequest.php index 224fe5aa..6f32f61e 100644 --- a/src/GeneratedModels/IngressVideoLayerRequest.php +++ b/src/GeneratedModels/IngressVideoLayerRequest.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $bitrate - * @property string $codec - * @property int $frameRateLimit - * @property int $maxDimension - * @property int $minDimension - */ class IngressVideoLayerRequest extends BaseModel { public function __construct( - public ?int $bitrate = null, public ?string $codec = null, - public ?int $frameRateLimit = null, - public ?int $maxDimension = null, + public ?int $bitrate = null, public ?int $minDimension = null, + public ?int $maxDimension = null, + public ?int $frameRateLimit = null, ) { } diff --git a/src/GeneratedModels/IngressVideoLayerResponse.php b/src/GeneratedModels/IngressVideoLayerResponse.php index eaa85a8e..6487ef3e 100644 --- a/src/GeneratedModels/IngressVideoLayerResponse.php +++ b/src/GeneratedModels/IngressVideoLayerResponse.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $bitrate - * @property string $codec - * @property int $frameRateLimit - * @property int $maxDimension - * @property int $minDimension - */ class IngressVideoLayerResponse extends BaseModel { public function __construct( - public ?int $bitrate = null, public ?string $codec = null, - public ?int $frameRateLimit = null, - public ?int $maxDimension = null, + public ?int $bitrate = null, public ?int $minDimension = null, + public ?int $maxDimension = null, + public ?int $frameRateLimit = null, ) { } diff --git a/src/GeneratedModels/JoinCallAPIMetrics.php b/src/GeneratedModels/JoinCallAPIMetrics.php index f9049ecc..48e40e48 100644 --- a/src/GeneratedModels/JoinCallAPIMetrics.php +++ b/src/GeneratedModels/JoinCallAPIMetrics.php @@ -3,18 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $failures - * @property int $total - * @property ActiveCallsLatencyStats|null $latency - */ class JoinCallAPIMetrics extends BaseModel { public function __construct( - public ?int $failures = null, public ?int $total = null, + public ?int $failures = null, public ?ActiveCallsLatencyStats $latency = null, ) { } diff --git a/src/GeneratedModels/KeyframeRuleParameters.php b/src/GeneratedModels/KeyframeRuleParameters.php new file mode 100644 index 00000000..2a969f9b --- /dev/null +++ b/src/GeneratedModels/KeyframeRuleParameters.php @@ -0,0 +1,17 @@ +|null $rules - * @property array|null $severityDescriptions - */ class LLMConfig extends BaseModel { public function __construct( - public ?string $appContext = null, public ?bool $async = null, public ?bool $enabled = null, /** @var array|null */ #[ArrayOf(LLMRule::class)] public ?array $rules = null, public ?array $severityDescriptions = null, + public ?string $appContext = null, ) { } diff --git a/src/GeneratedModels/LLMRule.php b/src/GeneratedModels/LLMRule.php index 411c657e..94c34045 100644 --- a/src/GeneratedModels/LLMRule.php +++ b/src/GeneratedModels/LLMRule.php @@ -3,19 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $description - * @property string $label - * @property string|null $action - * @property array|null $severityRules - */ class LLMRule extends BaseModel { public function __construct( - public ?string $description = null, public ?string $label = null, + public ?string $description = null, public ?string $action = null, /** @var array|null */ #[ArrayOf(BodyguardSeverityRule::class)] diff --git a/src/GeneratedModels/LabelResponse.php b/src/GeneratedModels/LabelResponse.php new file mode 100644 index 00000000..d1e0750f --- /dev/null +++ b/src/GeneratedModels/LabelResponse.php @@ -0,0 +1,17 @@ + $blocklists */ class ListBlockListResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(BlockListResponse::class)] public ?array $blocklists = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ListCallTypeResponse.php b/src/GeneratedModels/ListCallTypeResponse.php index cf82452c..39e15974 100644 --- a/src/GeneratedModels/ListCallTypeResponse.php +++ b/src/GeneratedModels/ListCallTypeResponse.php @@ -5,15 +5,14 @@ namespace GetStream\GeneratedModels; /** * Response for ListCallType - * - * @property string $duration - * @property array $callTypes */ class ListCallTypeResponse extends BaseModel { public function __construct( - public ?string $duration = null, + /** @var array|null */ + #[MapOf(CallTypeResponse::class)] public ?array $callTypes = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ListChannelTypesResponse.php b/src/GeneratedModels/ListChannelTypesResponse.php index 134b6d7a..ed154bf5 100644 --- a/src/GeneratedModels/ListChannelTypesResponse.php +++ b/src/GeneratedModels/ListChannelTypesResponse.php @@ -3,17 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $channelTypes - */ class ListChannelTypesResponse extends BaseModel { public function __construct( - public ?string $duration = null, + /** @var array|null */ + #[MapOf(ChannelTypeConfig::class)] public ?array $channelTypes = null, // Object with all channel types + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ListCommandsResponse.php b/src/GeneratedModels/ListCommandsResponse.php index 8dc7f5f2..65864b35 100644 --- a/src/GeneratedModels/ListCommandsResponse.php +++ b/src/GeneratedModels/ListCommandsResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $commands - */ class ListCommandsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of commands */ + /** @var array|null */ #[ArrayOf(Command::class)] public ?array $commands = null, // List of commands + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ListDevicesResponse.php b/src/GeneratedModels/ListDevicesResponse.php index f4881c5d..38232ec8 100644 --- a/src/GeneratedModels/ListDevicesResponse.php +++ b/src/GeneratedModels/ListDevicesResponse.php @@ -5,17 +5,14 @@ namespace GetStream\GeneratedModels; /** * List devices response - * - * @property string $duration - * @property array $devices */ class ListDevicesResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of devices */ + /** @var array|null */ #[ArrayOf(DeviceResponse::class)] public ?array $devices = null, // List of devices + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ListExternalStorageResponse.php b/src/GeneratedModels/ListExternalStorageResponse.php index 688d1592..174d9808 100644 --- a/src/GeneratedModels/ListExternalStorageResponse.php +++ b/src/GeneratedModels/ListExternalStorageResponse.php @@ -5,14 +5,13 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $externalStorages */ class ListExternalStorageResponse extends BaseModel { public function __construct( public ?string $duration = null, // Duration of the request in milliseconds + /** @var array|null */ + #[MapOf(ExternalStorageResponse::class)] public ?array $externalStorages = null, ) { } diff --git a/src/GeneratedModels/ListFeedGroupsResponse.php b/src/GeneratedModels/ListFeedGroupsResponse.php index f64a28f5..20950b21 100644 --- a/src/GeneratedModels/ListFeedGroupsResponse.php +++ b/src/GeneratedModels/ListFeedGroupsResponse.php @@ -5,15 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $groups */ class ListFeedGroupsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds + /** @var array|null */ + #[MapOf(FeedGroupResponse::class)] public ?array $groups = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ListFeedViewsResponse.php b/src/GeneratedModels/ListFeedViewsResponse.php index aab44a06..18fbd2f6 100644 --- a/src/GeneratedModels/ListFeedViewsResponse.php +++ b/src/GeneratedModels/ListFeedViewsResponse.php @@ -3,17 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $views - */ class ListFeedViewsResponse extends BaseModel { public function __construct( - public ?string $duration = null, + /** @var array|null */ + #[MapOf(FeedViewResponse::class)] public ?array $views = null, // Map of feed view ID to feed view + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ListFeedVisibilitiesResponse.php b/src/GeneratedModels/ListFeedVisibilitiesResponse.php index 16688d7b..63ec45f6 100644 --- a/src/GeneratedModels/ListFeedVisibilitiesResponse.php +++ b/src/GeneratedModels/ListFeedVisibilitiesResponse.php @@ -3,17 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $feedVisibilities - */ class ListFeedVisibilitiesResponse extends BaseModel { public function __construct( - public ?string $duration = null, + /** @var array|null */ + #[MapOf(FeedVisibilityResponse::class)] public ?array $feedVisibilities = null, // Map of feed visibility configurations by name + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ListImportV2TasksResponse.php b/src/GeneratedModels/ListImportV2TasksResponse.php index 0a48abeb..25cad033 100644 --- a/src/GeneratedModels/ListImportV2TasksResponse.php +++ b/src/GeneratedModels/ListImportV2TasksResponse.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $importTasks - * @property string|null $next - * @property string|null $prev */ class ListImportV2TasksResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(ImportV2TaskItem::class)] public ?array $importTasks = null, + public ?string $duration = null, // Duration of the request in milliseconds public ?string $next = null, public ?string $prev = null, ) { diff --git a/src/GeneratedModels/ListImportsResponse.php b/src/GeneratedModels/ListImportsResponse.php index 760a7d01..480c1187 100644 --- a/src/GeneratedModels/ListImportsResponse.php +++ b/src/GeneratedModels/ListImportsResponse.php @@ -5,17 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $importTasks */ class ListImportsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(ImportTask::class)] public ?array $importTasks = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ListPermissionsResponse.php b/src/GeneratedModels/ListPermissionsResponse.php index f7023cb5..d87857ab 100644 --- a/src/GeneratedModels/ListPermissionsResponse.php +++ b/src/GeneratedModels/ListPermissionsResponse.php @@ -5,17 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $permissions */ class ListPermissionsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(Permission::class)] public ?array $permissions = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ListPushProvidersResponse.php b/src/GeneratedModels/ListPushProvidersResponse.php index f0777782..05e18a41 100644 --- a/src/GeneratedModels/ListPushProvidersResponse.php +++ b/src/GeneratedModels/ListPushProvidersResponse.php @@ -5,17 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $pushProviders */ class ListPushProvidersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(PushProviderResponse::class)] public ?array $pushProviders = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ListRecordingsResponse.php b/src/GeneratedModels/ListRecordingsResponse.php index e45aab32..958a0a7b 100644 --- a/src/GeneratedModels/ListRecordingsResponse.php +++ b/src/GeneratedModels/ListRecordingsResponse.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * Response for listing recordings - * - * @property string $duration - * @property array $recordings */ class ListRecordingsResponse extends BaseModel { diff --git a/src/GeneratedModels/ListRolesResponse.php b/src/GeneratedModels/ListRolesResponse.php index 57376420..e297a755 100644 --- a/src/GeneratedModels/ListRolesResponse.php +++ b/src/GeneratedModels/ListRolesResponse.php @@ -5,17 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $roles */ class ListRolesResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(Role::class)] public ?array $roles = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ListSIPInboundRoutingRuleResponse.php b/src/GeneratedModels/ListSIPInboundRoutingRuleResponse.php index e964b55d..e262dff7 100644 --- a/src/GeneratedModels/ListSIPInboundRoutingRuleResponse.php +++ b/src/GeneratedModels/ListSIPInboundRoutingRuleResponse.php @@ -5,17 +5,14 @@ namespace GetStream\GeneratedModels; /** * Response containing the list of SIP Inbound Routing Rules - * - * @property string $duration - * @property array $sipInboundRoutingRules */ class ListSIPInboundRoutingRuleResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of SIP Inbound Routing Rules for the application */ + /** @var array|null */ #[ArrayOf(SIPInboundRoutingRuleResponse::class)] public ?array $sipInboundRoutingRules = null, // List of SIP Inbound Routing Rules for the application + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ListSIPTrunksResponse.php b/src/GeneratedModels/ListSIPTrunksResponse.php index 61009b40..3f849be0 100644 --- a/src/GeneratedModels/ListSIPTrunksResponse.php +++ b/src/GeneratedModels/ListSIPTrunksResponse.php @@ -5,17 +5,14 @@ namespace GetStream\GeneratedModels; /** * Response containing the list of SIP trunks - * - * @property string $duration - * @property array $sipTrunks */ class ListSIPTrunksResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of SIP trunks for the application */ + /** @var array|null */ #[ArrayOf(SIPTrunkResponse::class)] public ?array $sipTrunks = null, // List of SIP trunks for the application + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ListTranscriptionsResponse.php b/src/GeneratedModels/ListTranscriptionsResponse.php index c19445ab..d722cff0 100644 --- a/src/GeneratedModels/ListTranscriptionsResponse.php +++ b/src/GeneratedModels/ListTranscriptionsResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $transcriptions - */ class ListTranscriptionsResponse extends BaseModel { public function __construct( public ?string $duration = null, - /** @var array|null List of transcriptions for the call */ + /** @var array|null */ #[ArrayOf(CallTranscription::class)] public ?array $transcriptions = null, // List of transcriptions for the call ) { diff --git a/src/GeneratedModels/LocationResponse.php b/src/GeneratedModels/LocationResponse.php new file mode 100644 index 00000000..91351ff3 --- /dev/null +++ b/src/GeneratedModels/LocationResponse.php @@ -0,0 +1,20 @@ +|null $latestDeliveredMessages - */ class MarkDeliveredRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/MarkDeliveredResponse.php b/src/GeneratedModels/MarkDeliveredResponse.php index e4c495f5..cb330d4d 100644 --- a/src/GeneratedModels/MarkDeliveredResponse.php +++ b/src/GeneratedModels/MarkDeliveredResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class MarkDeliveredResponse extends BaseModel { diff --git a/src/GeneratedModels/MarkReadRequest.php b/src/GeneratedModels/MarkReadRequest.php index 37c1a60f..42138cb5 100644 --- a/src/GeneratedModels/MarkReadRequest.php +++ b/src/GeneratedModels/MarkReadRequest.php @@ -3,14 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $messageID - * @property string|null $threadID - * @property string|null $userID - * @property UserRequest|null $user - */ class MarkReadRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/MarkReadResponse.php b/src/GeneratedModels/MarkReadResponse.php index 060bb0be..5a6abb05 100644 --- a/src/GeneratedModels/MarkReadResponse.php +++ b/src/GeneratedModels/MarkReadResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property MessageReadEvent|null $event - */ class MarkReadResponse extends BaseModel { public function __construct( + public ?MarkReadResponseEvent $event = null, public ?string $duration = null, // Duration of the request in milliseconds - public ?MessageReadEvent $event = null, ) { } diff --git a/src/GeneratedModels/MarkReadResponseEvent.php b/src/GeneratedModels/MarkReadResponseEvent.php new file mode 100644 index 00000000..8696acc1 --- /dev/null +++ b/src/GeneratedModels/MarkReadResponseEvent.php @@ -0,0 +1,25 @@ + $members - */ class MembersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null List of found members */ + /** @var array|null */ #[ArrayOf(ChannelMemberResponse::class)] public ?array $members = null, // List of found members + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/MembershipLevelResponse.php b/src/GeneratedModels/MembershipLevelResponse.php index cafb2fff..d6ff643a 100644 --- a/src/GeneratedModels/MembershipLevelResponse.php +++ b/src/GeneratedModels/MembershipLevelResponse.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $id - * @property string $name - * @property int $priority - * @property \DateTime $updatedAt - * @property array $tags - * @property string|null $description - * @property object|null $custom - */ class MembershipLevelResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // When the membership level was created public ?string $id = null, // Unique identifier for the membership level public ?string $name = null, // Display name for the membership level + public ?string $description = null, // Description of the membership level public ?int $priority = null, // Priority level - public ?\DateTime $updatedAt = null, // When the membership level was last updated public ?array $tags = null, // Activity tags this membership level gives access to - public ?string $description = null, // Description of the membership level public ?object $custom = null, // Custom data for the membership level + public ?\DateTime $createdAt = null, // When the membership level was created + public ?\DateTime $updatedAt = null, // When the membership level was last updated ) { } diff --git a/src/GeneratedModels/MessageActionRequest.php b/src/GeneratedModels/MessageActionRequest.php index cc8bb58d..50c75936 100644 --- a/src/GeneratedModels/MessageActionRequest.php +++ b/src/GeneratedModels/MessageActionRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $formData - * @property string|null $userID - * @property UserRequest|null $user - */ class MessageActionRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/MessageActionResponse.php b/src/GeneratedModels/MessageActionResponse.php new file mode 100644 index 00000000..c25945e3 --- /dev/null +++ b/src/GeneratedModels/MessageActionResponse.php @@ -0,0 +1,19 @@ +|null $threadParticipants - * @property Message|null $message - * @property User|null $user + * Emitted when a message is deleted. */ class MessageDeletedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?bool $hardDelete = null, - public ?string $type = null, - public ?bool $deletedForMe = null, - public ?string $team = null, - /** @var array|null */ - #[ArrayOf(User::class)] - public ?array $threadParticipants = null, - public ?Message $message = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "message.deleted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel where the message was sent + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, // The number of messages in the channel + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel where the message was sent + public ?string $channelID = null, // The ID of the channel where the message was sent + public ?string $messageID = null, + public ?MessageResponse $message = null, + public ?UserResponseCommonFields $user = null, + public ?bool $hardDelete = null, // Whether the message was hard deleted + public ?bool $deletedForMe = null, // Whether the message was deleted only for the current user ) { } diff --git a/src/GeneratedModels/MessageFlagResponse.php b/src/GeneratedModels/MessageFlagResponse.php index a5f772be..09ca42d5 100644 --- a/src/GeneratedModels/MessageFlagResponse.php +++ b/src/GeneratedModels/MessageFlagResponse.php @@ -3,41 +3,23 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property bool $createdByAutomod - * @property \DateTime $updatedAt - * @property \DateTime|null $approvedAt - * @property string|null $reason - * @property \DateTime|null $rejectedAt - * @property \DateTime|null $reviewedAt - * @property object|null $custom - * @property FlagDetails|null $details - * @property Message|null $message - * @property FlagFeedback|null $moderationFeedback - * @property MessageModerationResult|null $moderationResult - * @property UserResponse|null $reviewedBy - * @property UserResponse|null $user - */ class MessageFlagResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, public ?bool $createdByAutomod = null, - public ?\DateTime $updatedAt = null, - public ?\DateTime $approvedAt = null, + public ?MessageModerationResult $moderationResult = null, + public ?FlagFeedbackResponse $moderationFeedback = null, + public ?UserResponse $user = null, + public ?MessageResponse $message = null, + public ?FlagDetailsResponse $details = null, public ?string $reason = null, - public ?\DateTime $rejectedAt = null, - public ?\DateTime $reviewedAt = null, public ?object $custom = null, - public ?FlagDetails $details = null, - public ?Message $message = null, - public ?FlagFeedback $moderationFeedback = null, - public ?MessageModerationResult $moderationResult = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, + public ?\DateTime $reviewedAt = null, public ?UserResponse $reviewedBy = null, - public ?UserResponse $user = null, + public ?\DateTime $approvedAt = null, + public ?\DateTime $rejectedAt = null, ) { } diff --git a/src/GeneratedModels/MessageFlaggedEvent.php b/src/GeneratedModels/MessageFlaggedEvent.php index ff632459..5eda1697 100644 --- a/src/GeneratedModels/MessageFlaggedEvent.php +++ b/src/GeneratedModels/MessageFlaggedEvent.php @@ -4,28 +4,29 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property array|null $threadParticipants - * @property Flag|null $flag - * @property Message|null $message - * @property User|null $user + * This event is sent when a message gets flagged. The event contains information about the message that was flagged. */ class MessageFlaggedEvent extends BaseModel { public function __construct( - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, - /** @var array|null */ - #[ArrayOf(User::class)] - public ?array $threadParticipants = null, - public ?Flag $flag = null, - public ?Message $message = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "message.flagged" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?string $cid = null, // The CID of the channel where the message was sent + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, // The number of messages in the channel + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel where the message was sent + public ?string $channelID = null, // The ID of the channel where the message was sent + public ?string $messageID = null, + public ?MessageResponse $message = null, + public ?UserResponseCommonFields $user = null, + public ?FlagResponse $flag = null, + public ?string $reason = null, // The reason for the flag + public ?int $totalFlags = null, // The total number of flags for the user + public ?MessageModerationResult $details = null, + public ?object $custom = null, // Custom data ) { } diff --git a/src/GeneratedModels/MessageHistoryEntryResponse.php b/src/GeneratedModels/MessageHistoryEntryResponse.php index f5ae37bd..a8ce4e6d 100644 --- a/src/GeneratedModels/MessageHistoryEntryResponse.php +++ b/src/GeneratedModels/MessageHistoryEntryResponse.php @@ -3,24 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $isDeleted - * @property string $messageID - * @property \DateTime $messageUpdatedAt - * @property string $messageUpdatedByID - * @property string $text - * @property array $attachments - * @property object $custom - */ class MessageHistoryEntryResponse extends BaseModel { public function __construct( - public ?bool $isDeleted = null, public ?string $messageID = null, - public ?\DateTime $messageUpdatedAt = null, public ?string $messageUpdatedByID = null, + public ?\DateTime $messageUpdatedAt = null, + public ?bool $isDeleted = null, public ?string $text = null, /** @var array|null */ #[ArrayOf(Attachment::class)] diff --git a/src/GeneratedModels/MessageModerationResult.php b/src/GeneratedModels/MessageModerationResult.php index 0446d555..9c29ba23 100644 --- a/src/GeneratedModels/MessageModerationResult.php +++ b/src/GeneratedModels/MessageModerationResult.php @@ -5,33 +5,21 @@ namespace GetStream\GeneratedModels; /** * Result of the message moderation - * - * @property string $action - * @property \DateTime $createdAt - * @property string $messageID - * @property \DateTime $updatedAt - * @property bool $userBadKarma - * @property int $userKarma - * @property string|null $blockedWord - * @property string|null $blocklistName - * @property string|null $moderatedBy - * @property ModerationResponse|null $aiModerationResponse - * @property Thresholds|null $moderationThresholds */ class MessageModerationResult extends BaseModel { public function __construct( - public ?string $action = null, // Action taken by automod - public ?\DateTime $createdAt = null, // Date/time of creation public ?string $messageID = null, // ID of the message - public ?\DateTime $updatedAt = null, // Date/time of the last update - public ?bool $userBadKarma = null, // Whether user has bad karma - public ?int $userKarma = null, // Karma of the user + public ?string $action = null, // Action taken by automod + public ?string $moderatedBy = null, // User who moderated the message public ?string $blockedWord = null, // Word that was blocked public ?string $blocklistName = null, // Name of the blocklist - public ?string $moderatedBy = null, // User who moderated the message - public ?ModerationResponse $aiModerationResponse = null, public ?Thresholds $moderationThresholds = null, + public ?ModerationResponse $aiModerationResponse = null, + public ?int $userKarma = null, // Karma of the user + public ?bool $userBadKarma = null, // Whether user has bad karma + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $updatedAt = null, // Date/time of the last update ) { } diff --git a/src/GeneratedModels/MessageNewEvent.php b/src/GeneratedModels/MessageNewEvent.php index 12a4aa3f..9702fbf9 100644 --- a/src/GeneratedModels/MessageNewEvent.php +++ b/src/GeneratedModels/MessageNewEvent.php @@ -4,34 +4,34 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property int $watcherCount - * @property string $type - * @property string|null $team - * @property array|null $threadParticipants - * @property Message|null $message - * @property User|null $user + * Emitted when a message was successfully sent or when a message became visible after command execution. */ class MessageNewEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?int $watcherCount = null, - public ?string $type = null, - public ?string $team = null, - /** @var array|null */ - #[ArrayOf(User::class)] - public ?array $threadParticipants = null, - public ?Message $message = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "message.new" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel where the message was sent + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, // The number of messages in the channel + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel where the message was sent + public ?string $channelID = null, // The ID of the channel where the message was sent + public ?string $messageID = null, + public ?MessageResponse $message = null, + public ?UserResponseCommonFields $user = null, + public ?int $watcherCount = null, // The number of watchers + /** @var array|null */ + #[ArrayOf(UserResponseCommonFields::class)] + public ?array $threadParticipants = null, // The participants of the thread + public ?string $parentAuthor = null, // The author of the parent message + public ?ChannelResponse $channel = null, + public ?int $unreadCount = null, // The number of unread messages + public ?int $totalUnreadCount = null, + public ?int $unreadChannels = null, ) { } diff --git a/src/GeneratedModels/MessageOptions.php b/src/GeneratedModels/MessageOptions.php index 51ababa3..22e91bfb 100644 --- a/src/GeneratedModels/MessageOptions.php +++ b/src/GeneratedModels/MessageOptions.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $includeThreadParticipants - */ class MessageOptions extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/MessagePaginationParams.php b/src/GeneratedModels/MessagePaginationParams.php index 8a4b51df..c7eec0fd 100644 --- a/src/GeneratedModels/MessagePaginationParams.php +++ b/src/GeneratedModels/MessagePaginationParams.php @@ -3,35 +3,20 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime|null $createdAtAfter - * @property \DateTime|null $createdAtAfterOrEqual - * @property \DateTime|null $createdAtAround - * @property \DateTime|null $createdAtBefore - * @property \DateTime|null $createdAtBeforeOrEqual - * @property string|null $idAround - * @property string|null $idGt - * @property string|null $idGte - * @property string|null $idLt - * @property string|null $idLte - * @property int|null $limit - */ class MessagePaginationParams extends BaseModel { public function __construct( - public ?\DateTime $createdAtAfter = null, // The timestamp to get messages with a created_at timestamp greater than + public ?int $limit = null, // The maximum number of messages to return (max limit + public ?string $idGte = null, // The ID of the message to get messages with a timestamp greater than or equal to + public ?string $idGt = null, // The ID of the message to get messages with a timestamp greater than + public ?string $idLte = null, // The ID of the message to get messages with a timestamp smaller than or equal to + public ?string $idLt = null, // The ID of the message to get messages with a timestamp smaller than public ?\DateTime $createdAtAfterOrEqual = null, // The timestamp to get messages with a created_at timestamp greater than or equal to - public ?\DateTime $createdAtAround = null, // The result will be a set of messages, that are both older and newer than the created_at timestamp provided, distributed evenly around the timestamp - public ?\DateTime $createdAtBefore = null, // The timestamp to get messages with a created_at timestamp smaller than + public ?\DateTime $createdAtAfter = null, // The timestamp to get messages with a created_at timestamp greater than public ?\DateTime $createdAtBeforeOrEqual = null, // The timestamp to get messages with a created_at timestamp smaller than or equal to + public ?\DateTime $createdAtBefore = null, // The timestamp to get messages with a created_at timestamp smaller than public ?string $idAround = null, // The result will be a set of messages, that are both older and newer than the message with the provided ID, and the message with the ID provided will be in the middle of the set - public ?string $idGt = null, // The ID of the message to get messages with a timestamp greater than - public ?string $idGte = null, // The ID of the message to get messages with a timestamp greater than or equal to - public ?string $idLt = null, // The ID of the message to get messages with a timestamp smaller than - public ?string $idLte = null, // The ID of the message to get messages with a timestamp smaller than or equal to - public ?int $limit = null, // The maximum number of messages to return (max limit + public ?\DateTime $createdAtAround = null, // The result will be a set of messages, that are both older and newer than the created_at timestamp provided, distributed evenly around the timestamp ) { } diff --git a/src/GeneratedModels/MessageReadEvent.php b/src/GeneratedModels/MessageReadEvent.php index 88d68d8f..0232d66b 100644 --- a/src/GeneratedModels/MessageReadEvent.php +++ b/src/GeneratedModels/MessageReadEvent.php @@ -4,34 +4,26 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property \DateTime|null $channelLastMessageAt - * @property string|null $lastReadMessageID - * @property string|null $team - * @property ChannelResponse|null $channel - * @property ThreadResponse|null $thread - * @property UserResponseCommonFields|null $user + * Emitted when a channel or thread is marked as read. */ class MessageReadEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?\DateTime $channelLastMessageAt = null, - public ?string $lastReadMessageID = null, - public ?string $team = null, + public ?string $type = null, // The type of event: "message.read" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel where the message was read + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, // The number of messages in the channel + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel where the message was read + public ?string $channelID = null, // The ID of the channel where the message was read + public ?UserResponseCommonFields $user = null, public ?ChannelResponse $channel = null, public ?ThreadResponse $thread = null, - public ?UserResponseCommonFields $user = null, + public ?string $lastReadMessageID = null, // The ID of the last read message ) { } diff --git a/src/GeneratedModels/MessageRequest.php b/src/GeneratedModels/MessageRequest.php index 8964b8bf..06a4fb46 100644 --- a/src/GeneratedModels/MessageRequest.php +++ b/src/GeneratedModels/MessageRequest.php @@ -4,54 +4,36 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string|null $html - * @property string|null $id - * @property string|null $mml - * @property string|null $parentID - * @property \DateTime|null $pinExpires - * @property bool|null $pinned - * @property \DateTime|null $pinnedAt - * @property string|null $pollID - * @property string|null $quotedMessageID - * @property bool|null $showInChannel - * @property bool|null $silent - * @property string|null $text - * @property string|null $type - * @property string|null $userID - * @property array|null $attachments - * @property array|null $mentionedUsers - * @property array|null $restrictedVisibility - * @property object|null $custom - * @property SharedLocation|null $sharedLocation - * @property UserRequest|null $user + * Message data for creating or updating a message */ class MessageRequest extends BaseModel { public function __construct( - public ?string $html = null, - public ?string $id = null, - public ?string $mml = null, - public ?string $parentID = null, - public ?\DateTime $pinExpires = null, - public ?bool $pinned = null, - public ?\DateTime $pinnedAt = null, - public ?string $pollID = null, - public ?string $quotedMessageID = null, - public ?bool $showInChannel = null, - public ?bool $silent = null, - public ?string $text = null, - public ?string $type = null, - public ?string $userID = null, + public ?string $id = null, // Message ID is unique string identifier of the message + public ?string $text = null, // Text of the message. Should be empty if `mml` is provided + public ?string $mml = null, // Should be empty if `text` is provided. Can only be set when using server-side API /** @var array|null */ #[ArrayOf(Attachment::class)] - public ?array $attachments = null, - public ?array $mentionedUsers = null, - public ?array $restrictedVisibility = null, + public ?array $attachments = null, // Array of message attachments + public ?string $parentID = null, // ID of parent message (thread) + public ?bool $showInChannel = null, // Whether thread reply should be shown in the channel as well public ?object $custom = null, - public ?SharedLocation $sharedLocation = null, + public ?array $mentionedUsers = null, // Array of user IDs to mention + public ?array $mentionedRoles = null, + public ?bool $mentionedChannel = null, + public ?bool $mentionedHere = null, + public ?string $quotedMessageID = null, + public ?string $html = null, // Contains HTML markup of the message. Can only be set when using server-side API + public ?string $type = null, // Contains type of the message. One of: regular, system + public ?bool $silent = null, // Whether message is silent or not + public ?bool $pinned = null, // Whether message is pinned or not + public ?\DateTime $pinnedAt = null, // Date when message got pinned + public ?\DateTime $pinExpires = null, // Date when pinned message expires + public ?array $restrictedVisibility = null, // A list of user ids that have restricted visibility to the message + public ?string $userID = null, public ?UserRequest $user = null, + public ?string $pollID = null, // Identifier of the poll to include in the message + public ?SharedLocation $sharedLocation = null, ) { } diff --git a/src/GeneratedModels/MessageResponse.php b/src/GeneratedModels/MessageResponse.php index 22ed36f7..6b088eb8 100644 --- a/src/GeneratedModels/MessageResponse.php +++ b/src/GeneratedModels/MessageResponse.php @@ -5,109 +5,69 @@ namespace GetStream\GeneratedModels; /** * Represents any chat message - * - * @property string $cid - * @property \DateTime $createdAt - * @property int $deletedReplyCount - * @property string $html - * @property string $id - * @property bool $pinned - * @property int $replyCount - * @property bool $shadowed - * @property bool $silent - * @property string $text - * @property string $type - * @property \DateTime $updatedAt - * @property array $attachments - * @property array $latestReactions - * @property array $mentionedUsers - * @property array $ownReactions - * @property array $restrictedVisibility - * @property object $custom - * @property array $reactionCounts - * @property array $reactionScores - * @property UserResponse $user - * @property string|null $command - * @property \DateTime|null $deletedAt - * @property bool|null $deletedForMe - * @property \DateTime|null $messageTextUpdatedAt - * @property string|null $mml - * @property string|null $parentID - * @property \DateTime|null $pinExpires - * @property \DateTime|null $pinnedAt - * @property string|null $pollID - * @property string|null $quotedMessageID - * @property bool|null $showInChannel - * @property array|null $threadParticipants - * @property DraftResponse|null $draft - * @property array|null $i18n - * @property array|null $imageLabels - * @property ChannelMemberResponse|null $member - * @property ModerationV2Response|null $moderation - * @property UserResponse|null $pinnedBy - * @property PollResponseData|null $poll - * @property MessageResponse|null $quotedMessage - * @property array|null $reactionGroups - * @property ReminderResponseData|null $reminder - * @property SharedLocationResponseData|null $sharedLocation */ class MessageResponse extends BaseModel { public function __construct( - public ?string $cid = null, // Channel unique identifier in : format - public ?\DateTime $createdAt = null, // Date/time of creation - public ?int $deletedReplyCount = null, - public ?string $html = null, // Contains HTML markup of the message. Can only be set when using server-side API public ?string $id = null, // Message ID is unique string identifier of the message - public ?bool $pinned = null, // Whether message is pinned or not - public ?int $replyCount = null, // Number of replies to this message - public ?bool $shadowed = null, // Whether the message was shadowed or not - public ?bool $silent = null, // Whether message is silent or not public ?string $text = null, // Text of the message. Should be empty if `mml` is provided - public ?string $type = null, // Contains type of the message - public ?\DateTime $updatedAt = null, // Date/time of the last update - /** @var array|null Array of message attachments */ + public ?string $mml = null, // Should be empty if `text` is provided. Can only be set when using server-side API + public ?string $command = null, // Contains provided slash command + public ?string $html = null, // Contains HTML markup of the message. Can only be set when using server-side API + public ?string $type = null, // Contains type of the message. One of: regular, ephemeral, error, reply, system, deleted + public ?UserResponse $user = null, + public ?ChannelMemberResponse $member = null, + /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, // Array of message attachments - /** @var array|null List of 10 latest reactions to this message */ + /** @var array|null */ #[ArrayOf(ReactionResponse::class)] public ?array $latestReactions = null, // List of 10 latest reactions to this message - /** @var array|null List of mentioned users */ - #[ArrayOf(UserResponse::class)] - public ?array $mentionedUsers = null, // List of mentioned users - /** @var array|null List of 10 latest reactions of authenticated user to this message */ + /** @var array|null */ #[ArrayOf(ReactionResponse::class)] public ?array $ownReactions = null, // List of 10 latest reactions of authenticated user to this message - public ?array $restrictedVisibility = null, // A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list - public ?object $custom = null, public ?array $reactionCounts = null, // An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int) public ?array $reactionScores = null, // An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int) - public ?UserResponse $user = null, - public ?string $command = null, // Contains provided slash command - public ?\DateTime $deletedAt = null, // Date/time of deletion - public ?bool $deletedForMe = null, - public ?\DateTime $messageTextUpdatedAt = null, - public ?string $mml = null, // Should be empty if `text` is provided. Can only be set when using server-side API + /** @var array|null */ + #[MapOf(ReactionGroupResponse::class)] + public ?array $reactionGroups = null, public ?string $parentID = null, // ID of parent message (thread) - public ?\DateTime $pinExpires = null, // Date when pinned message expires - public ?\DateTime $pinnedAt = null, // Date when message got pinned - public ?string $pollID = null, // Identifier of the poll to include in the message - public ?string $quotedMessageID = null, public ?bool $showInChannel = null, // Whether thread reply should be shown in the channel as well - /** @var array|null List of users who participate in thread */ + public ?int $replyCount = null, // Number of replies to this message + public ?int $deletedReplyCount = null, + public ?string $quotedMessageID = null, + public ?MessageResponse $quotedMessage = null, + /** @var array|null */ #[ArrayOf(UserResponse::class)] public ?array $threadParticipants = null, // List of users who participate in thread - public ?DraftResponse $draft = null, - public ?array $i18n = null, // Object with translations. Key `language` contains the original language key. Other keys contain translations + public ?string $cid = null, // Channel unique identifier in : format + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $updatedAt = null, // Date/time of the last update + public ?\DateTime $deletedAt = null, // Date/time of deletion + public ?object $custom = null, + public ?bool $shadowed = null, // Whether the message was shadowed or not public ?array $imageLabels = null, // Contains image moderation information - public ?ChannelMemberResponse $member = null, - public ?ModerationV2Response $moderation = null, + /** @var array|null */ + #[ArrayOf(UserResponse::class)] + public ?array $mentionedUsers = null, // List of mentioned users + public ?array $mentionedRoles = null, // List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles + public ?bool $mentionedChannel = null, // Whether the message mentioned the channel tag + public ?bool $mentionedHere = null, // Whether the message mentioned online users with @here tag + public ?array $i18n = null, // Object with translations. Key `language` contains the original language key. Other keys contain translations + public ?bool $silent = null, // Whether message is silent or not + public ?bool $pinned = null, // Whether message is pinned or not + public ?\DateTime $pinnedAt = null, // Date when message got pinned public ?UserResponse $pinnedBy = null, + public ?\DateTime $pinExpires = null, // Date when pinned message expires + public ?\DateTime $messageTextUpdatedAt = null, + public ?string $pollID = null, // Identifier of the poll to include in the message public ?PollResponseData $poll = null, - public ?MessageResponse $quotedMessage = null, - public ?array $reactionGroups = null, + public ?ModerationV2Response $moderation = null, + public ?array $restrictedVisibility = null, // A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list + public ?DraftResponse $draft = null, public ?ReminderResponseData $reminder = null, public ?SharedLocationResponseData $sharedLocation = null, + public ?bool $deletedForMe = null, ) { } diff --git a/src/GeneratedModels/MessageStatsResponse.php b/src/GeneratedModels/MessageStatsResponse.php index e6673ccb..454ef91c 100644 --- a/src/GeneratedModels/MessageStatsResponse.php +++ b/src/GeneratedModels/MessageStatsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $countOverTime - */ class MessageStatsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/MessageUnblockedEvent.php b/src/GeneratedModels/MessageUnblockedEvent.php index 8c3be8bc..6dfc24e5 100644 --- a/src/GeneratedModels/MessageUnblockedEvent.php +++ b/src/GeneratedModels/MessageUnblockedEvent.php @@ -4,26 +4,19 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property array|null $threadParticipants - * @property Message|null $message - * @property User|null $user + * Emitted when a message is unblocked. */ class MessageUnblockedEvent extends BaseModel { public function __construct( - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, - /** @var array|null */ - #[ArrayOf(User::class)] - public ?array $threadParticipants = null, - public ?Message $message = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "message.unblocked" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel where the message was unblocked + public ?string $messageID = null, + public ?MessageResponse $message = null, + public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/MessageUndeletedEvent.php b/src/GeneratedModels/MessageUndeletedEvent.php index cdb1c30f..9fbd442a 100644 --- a/src/GeneratedModels/MessageUndeletedEvent.php +++ b/src/GeneratedModels/MessageUndeletedEvent.php @@ -4,32 +4,24 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property string|null $team - * @property array|null $threadParticipants - * @property Message|null $message - * @property User|null $user + * Emitted when a message is undeleted. */ class MessageUndeletedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?string $team = null, - /** @var array|null */ - #[ArrayOf(User::class)] - public ?array $threadParticipants = null, - public ?Message $message = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "message.undeleted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel where the message was sent + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, // The number of messages in the channel + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel where the message was sent + public ?string $channelID = null, // The ID of the channel where the message was sent + public ?string $messageID = null, + public ?MessageResponse $message = null, ) { } diff --git a/src/GeneratedModels/MessageUpdate.php b/src/GeneratedModels/MessageUpdate.php index 9e157ed3..e1749b7a 100644 --- a/src/GeneratedModels/MessageUpdate.php +++ b/src/GeneratedModels/MessageUpdate.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $oldText - * @property MessageChangeSet|null $changeSet - */ class MessageUpdate extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/MessageUpdatedEvent.php b/src/GeneratedModels/MessageUpdatedEvent.php index fbb7edc7..c9a2a9de 100644 --- a/src/GeneratedModels/MessageUpdatedEvent.php +++ b/src/GeneratedModels/MessageUpdatedEvent.php @@ -4,32 +4,26 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property string|null $team - * @property array|null $threadParticipants - * @property Message|null $message - * @property User|null $user + * Emitted when a BaseEvent is updated with translation data or when a message is updated. */ class MessageUpdatedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?string $team = null, - /** @var array|null */ - #[ArrayOf(User::class)] - public ?array $threadParticipants = null, - public ?Message $message = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "message.updated" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel where the message was sent + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, // The number of messages in the channel + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel where the message was sent + public ?string $channelID = null, // The ID of the channel where the message was sent + public ?string $messageID = null, + public ?MessageResponse $message = null, + public ?UserResponseCommonFields $user = null, + public ?MessageUpdate $messageUpdate = null, ) { } diff --git a/src/GeneratedModels/MessageWithChannelResponse.php b/src/GeneratedModels/MessageWithChannelResponse.php index 4525248b..6dd27f7f 100644 --- a/src/GeneratedModels/MessageWithChannelResponse.php +++ b/src/GeneratedModels/MessageWithChannelResponse.php @@ -5,111 +5,70 @@ namespace GetStream\GeneratedModels; /** * Represents any chat message - * - * @property string $cid - * @property \DateTime $createdAt - * @property int $deletedReplyCount - * @property string $html - * @property string $id - * @property bool $pinned - * @property int $replyCount - * @property bool $shadowed - * @property bool $silent - * @property string $text - * @property string $type - * @property \DateTime $updatedAt - * @property array $attachments - * @property array $latestReactions - * @property array $mentionedUsers - * @property array $ownReactions - * @property array $restrictedVisibility - * @property ChannelResponse $channel - * @property object $custom - * @property array $reactionCounts - * @property array $reactionScores - * @property UserResponse $user - * @property string|null $command - * @property \DateTime|null $deletedAt - * @property bool|null $deletedForMe - * @property \DateTime|null $messageTextUpdatedAt - * @property string|null $mml - * @property string|null $parentID - * @property \DateTime|null $pinExpires - * @property \DateTime|null $pinnedAt - * @property string|null $pollID - * @property string|null $quotedMessageID - * @property bool|null $showInChannel - * @property array|null $threadParticipants - * @property DraftResponse|null $draft - * @property array|null $i18n - * @property array|null $imageLabels - * @property ChannelMemberResponse|null $member - * @property ModerationV2Response|null $moderation - * @property UserResponse|null $pinnedBy - * @property PollResponseData|null $poll - * @property MessageResponse|null $quotedMessage - * @property array|null $reactionGroups - * @property ReminderResponseData|null $reminder - * @property SharedLocationResponseData|null $sharedLocation */ class MessageWithChannelResponse extends BaseModel { public function __construct( - public ?string $cid = null, // Channel unique identifier in : format - public ?\DateTime $createdAt = null, // Date/time of creation - public ?int $deletedReplyCount = null, - public ?string $html = null, // Contains HTML markup of the message. Can only be set when using server-side API public ?string $id = null, // Message ID is unique string identifier of the message - public ?bool $pinned = null, // Whether message is pinned or not - public ?int $replyCount = null, // Number of replies to this message - public ?bool $shadowed = null, // Whether the message was shadowed or not - public ?bool $silent = null, // Whether message is silent or not public ?string $text = null, // Text of the message. Should be empty if `mml` is provided - public ?string $type = null, // Contains type of the message - public ?\DateTime $updatedAt = null, // Date/time of the last update - /** @var array|null Array of message attachments */ + public ?string $mml = null, // Should be empty if `text` is provided. Can only be set when using server-side API + public ?string $command = null, // Contains provided slash command + public ?string $html = null, // Contains HTML markup of the message. Can only be set when using server-side API + public ?string $type = null, // Contains type of the message. One of: regular, ephemeral, error, reply, system, deleted + public ?UserResponse $user = null, + public ?ChannelMemberResponse $member = null, + /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, // Array of message attachments - /** @var array|null List of 10 latest reactions to this message */ + /** @var array|null */ #[ArrayOf(ReactionResponse::class)] public ?array $latestReactions = null, // List of 10 latest reactions to this message - /** @var array|null List of mentioned users */ - #[ArrayOf(UserResponse::class)] - public ?array $mentionedUsers = null, // List of mentioned users - /** @var array|null List of 10 latest reactions of authenticated user to this message */ + /** @var array|null */ #[ArrayOf(ReactionResponse::class)] public ?array $ownReactions = null, // List of 10 latest reactions of authenticated user to this message - public ?array $restrictedVisibility = null, // A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list - public ?ChannelResponse $channel = null, - public ?object $custom = null, public ?array $reactionCounts = null, // An object containing number of reactions of each type. Key: reaction type (string), value: number of reactions (int) public ?array $reactionScores = null, // An object containing scores of reactions of each type. Key: reaction type (string), value: total score of reactions (int) - public ?UserResponse $user = null, - public ?string $command = null, // Contains provided slash command - public ?\DateTime $deletedAt = null, // Date/time of deletion - public ?bool $deletedForMe = null, - public ?\DateTime $messageTextUpdatedAt = null, - public ?string $mml = null, // Should be empty if `text` is provided. Can only be set when using server-side API + /** @var array|null */ + #[MapOf(ReactionGroupResponse::class)] + public ?array $reactionGroups = null, public ?string $parentID = null, // ID of parent message (thread) - public ?\DateTime $pinExpires = null, // Date when pinned message expires - public ?\DateTime $pinnedAt = null, // Date when message got pinned - public ?string $pollID = null, // Identifier of the poll to include in the message - public ?string $quotedMessageID = null, public ?bool $showInChannel = null, // Whether thread reply should be shown in the channel as well - /** @var array|null List of users who participate in thread */ + public ?int $replyCount = null, // Number of replies to this message + public ?int $deletedReplyCount = null, + public ?string $quotedMessageID = null, + public ?MessageResponse $quotedMessage = null, + /** @var array|null */ #[ArrayOf(UserResponse::class)] public ?array $threadParticipants = null, // List of users who participate in thread - public ?DraftResponse $draft = null, - public ?array $i18n = null, // Object with translations. Key `language` contains the original language key. Other keys contain translations + public ?string $cid = null, // Channel unique identifier in : format + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $updatedAt = null, // Date/time of the last update + public ?\DateTime $deletedAt = null, // Date/time of deletion + public ?object $custom = null, + public ?bool $shadowed = null, // Whether the message was shadowed or not public ?array $imageLabels = null, // Contains image moderation information - public ?ChannelMemberResponse $member = null, - public ?ModerationV2Response $moderation = null, + /** @var array|null */ + #[ArrayOf(UserResponse::class)] + public ?array $mentionedUsers = null, // List of mentioned users + public ?array $mentionedRoles = null, // List of roles mentioned in the message (e.g. admin, channel_moderator, custom roles). Members with matching roles will receive push notifications based on their push preferences. Max 10 roles + public ?bool $mentionedChannel = null, // Whether the message mentioned the channel tag + public ?bool $mentionedHere = null, // Whether the message mentioned online users with @here tag + public ?array $i18n = null, // Object with translations. Key `language` contains the original language key. Other keys contain translations + public ?bool $silent = null, // Whether message is silent or not + public ?bool $pinned = null, // Whether message is pinned or not + public ?\DateTime $pinnedAt = null, // Date when message got pinned public ?UserResponse $pinnedBy = null, + public ?\DateTime $pinExpires = null, // Date when pinned message expires + public ?\DateTime $messageTextUpdatedAt = null, + public ?string $pollID = null, // Identifier of the poll to include in the message public ?PollResponseData $poll = null, - public ?MessageResponse $quotedMessage = null, - public ?array $reactionGroups = null, + public ?ModerationV2Response $moderation = null, + public ?array $restrictedVisibility = null, // A list of user ids that have restricted visibility to the message, if the list is not empty, the message is only visible to the users in the list + public ?DraftResponse $draft = null, public ?ReminderResponseData $reminder = null, public ?SharedLocationResponseData $sharedLocation = null, + public ?bool $deletedForMe = null, + public ?ChannelResponse $channel = null, ) { } diff --git a/src/GeneratedModels/MetricDescriptor.php b/src/GeneratedModels/MetricDescriptor.php index 2fc6a3f7..56caccbf 100644 --- a/src/GeneratedModels/MetricDescriptor.php +++ b/src/GeneratedModels/MetricDescriptor.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $label - * @property string|null $description - * @property string|null $unit - */ class MetricDescriptor extends BaseModel { public function __construct( public ?string $label = null, - public ?string $description = null, public ?string $unit = null, + public ?string $description = null, ) { } diff --git a/src/GeneratedModels/MetricStats.php b/src/GeneratedModels/MetricStats.php new file mode 100644 index 00000000..293c120f --- /dev/null +++ b/src/GeneratedModels/MetricStats.php @@ -0,0 +1,21 @@ +|null */ + #[ArrayOf(DailyValue::class)] + public ?array $daily = null, // Per-day values (only present in daily mode) + public ?int $total = null, // Aggregated total value + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/MetricThreshold.php b/src/GeneratedModels/MetricThreshold.php index 7a0af16d..87c63432 100644 --- a/src/GeneratedModels/MetricThreshold.php +++ b/src/GeneratedModels/MetricThreshold.php @@ -3,15 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $level - * @property string $operator - * @property int $value - * @property string|null $valueUnit - * @property int|null $windowSeconds - */ class MetricThreshold extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/MetricTimeSeries.php b/src/GeneratedModels/MetricTimeSeries.php index be057990..a5084b23 100644 --- a/src/GeneratedModels/MetricTimeSeries.php +++ b/src/GeneratedModels/MetricTimeSeries.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $dataPoints - */ class MetricTimeSeries extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ModerationActionConfigResponse.php b/src/GeneratedModels/ModerationActionConfigResponse.php new file mode 100644 index 00000000..8a8dbd68 --- /dev/null +++ b/src/GeneratedModels/ModerationActionConfigResponse.php @@ -0,0 +1,23 @@ + $result - * @property string|null $entityCreatorID - * @property string|null $reason - * @property string|null $reviewQueueItemID - * @property array|null $labels - * @property object|null $custom - * @property ModerationPayload|null $moderationPayload - * @property ReviewQueueItemResponse|null $reviewQueueItem - * @property UserResponse|null $user - */ class ModerationFlagResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $entityID = null, - public ?string $entityType = null, public ?string $type = null, - public ?\DateTime $updatedAt = null, public ?string $userID = null, - public ?array $result = null, + public ?UserResponse $user = null, + public ?string $entityType = null, + public ?string $entityID = null, public ?string $entityCreatorID = null, + public ?ModerationPayloadResponse $moderationPayload = null, public ?string $reason = null, - public ?string $reviewQueueItemID = null, - public ?array $labels = null, public ?object $custom = null, - public ?ModerationPayload $moderationPayload = null, + public ?array $labels = null, + public ?array $result = null, + public ?string $reviewQueueItemID = null, public ?ReviewQueueItemResponse $reviewQueueItem = null, - public ?UserResponse $user = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, ) { } diff --git a/src/GeneratedModels/ModerationFlaggedEvent.php b/src/GeneratedModels/ModerationFlaggedEvent.php index 8b81a95f..d9e84a6b 100644 --- a/src/GeneratedModels/ModerationFlaggedEvent.php +++ b/src/GeneratedModels/ModerationFlaggedEvent.php @@ -4,22 +4,17 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property string $type - * @property string|null $item - * @property string|null $objectID - * @property User|null $user + * This event is sent when content is flagged for moderation */ class ModerationFlaggedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, public ?string $type = null, - public ?string $item = null, - public ?string $objectID = null, - public ?User $user = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $contentType = null, // The type of content that was flagged + public ?string $objectID = null, // The ID of the flagged content ) { } diff --git a/src/GeneratedModels/ModerationMarkReviewedEvent.php b/src/GeneratedModels/ModerationMarkReviewedEvent.php index 056b5a04..2bd9510e 100644 --- a/src/GeneratedModels/ModerationMarkReviewedEvent.php +++ b/src/GeneratedModels/ModerationMarkReviewedEvent.php @@ -5,23 +5,16 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a moderation item is marked as reviewed - * - * @property \DateTime $createdAt - * @property object $custom - * @property ReviewQueueItemResponse $item - * @property string $type - * @property \DateTime|null $receivedAt - * @property MessageResponse|null $message */ class ModerationMarkReviewedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?object $custom = null, public ?ReviewQueueItemResponse $item = null, + public ?MessageResponse $message = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, - public ?MessageResponse $message = null, + public ?object $custom = null, ) { } diff --git a/src/GeneratedModels/ModerationPayload.php b/src/GeneratedModels/ModerationPayload.php index 2602593d..cd99d9d7 100644 --- a/src/GeneratedModels/ModerationPayload.php +++ b/src/GeneratedModels/ModerationPayload.php @@ -3,19 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $images - * @property array|null $texts - * @property array|null $videos - * @property object|null $custom - */ class ModerationPayload extends BaseModel { public function __construct( - public ?array $images = null, public ?array $texts = null, + public ?array $images = null, public ?array $videos = null, public ?object $custom = null, ) { diff --git a/src/GeneratedModels/ModerationPayloadRequest.php b/src/GeneratedModels/ModerationPayloadRequest.php new file mode 100644 index 00000000..3fa8ecf8 --- /dev/null +++ b/src/GeneratedModels/ModerationPayloadRequest.php @@ -0,0 +1,21 @@ +|null $conditions - * @property array|null $groups - */ class ModerationRuleV2Response extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $description = null, - public ?bool $enabled = null, public ?string $id = null, public ?string $name = null, - public ?string $ruleType = null, - public ?string $team = null, - public ?\DateTime $updatedAt = null, + public ?string $description = null, public ?array $configKeys = null, - public ?RuleBuilderAction $action = null, - public ?string $cooldownPeriod = null, - public ?string $logic = null, + public ?string $team = null, + public ?string $ruleType = null, /** @var array|null */ #[ArrayOf(RuleBuilderCondition::class)] public ?array $conditions = null, + public ?string $logic = null, /** @var array|null */ #[ArrayOf(RuleBuilderConditionGroup::class)] public ?array $groups = null, + public ?RuleBuilderAction $action = null, + /** @var array|null */ + #[ArrayOf(CallRuleActionSequence::class)] + public ?array $actionSequences = null, + public ?string $cooldownPeriod = null, + public ?bool $enabled = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, ) { } diff --git a/src/GeneratedModels/ModerationRulesTriggeredEvent.php b/src/GeneratedModels/ModerationRulesTriggeredEvent.php new file mode 100644 index 00000000..58d0bcfc --- /dev/null +++ b/src/GeneratedModels/ModerationRulesTriggeredEvent.php @@ -0,0 +1,28 @@ +|null $channelMutes - * @property ChannelMute|null $channelMute - * @property OwnUser|null $ownUser - */ class MuteChannelResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null Object with mutes (if multiple channels were muted) */ + public ?ChannelMute $channelMute = null, + /** @var array|null */ #[ArrayOf(ChannelMute::class)] public ?array $channelMutes = null, // Object with mutes (if multiple channels were muted) - public ?ChannelMute $channelMute = null, - public ?OwnUser $ownUser = null, + public ?OwnUserResponse $ownUser = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/MuteRequest.php b/src/GeneratedModels/MuteRequest.php index e72410d8..055db543 100644 --- a/src/GeneratedModels/MuteRequest.php +++ b/src/GeneratedModels/MuteRequest.php @@ -3,14 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $targetIds - * @property int|null $timeout - * @property string|null $userID - * @property UserRequest|null $user - */ class MuteRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/MuteResponse.php b/src/GeneratedModels/MuteResponse.php index 2c01f2b1..ac47556e 100644 --- a/src/GeneratedModels/MuteResponse.php +++ b/src/GeneratedModels/MuteResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array|null $mutes - * @property array|null $nonExistingUsers - * @property OwnUser|null $ownUser - */ class MuteResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null Object with mutes (if multiple users were muted) */ - #[ArrayOf(UserMute::class)] + /** @var array|null */ + #[ArrayOf(UserMuteResponse::class)] public ?array $mutes = null, // Object with mutes (if multiple users were muted) + public ?OwnUserResponse $ownUser = null, public ?array $nonExistingUsers = null, // A list of users that can't be found. Common cause for this is deleted users - public ?OwnUser $ownUser = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/MuteUsersRequest.php b/src/GeneratedModels/MuteUsersRequest.php index 9e392377..e151fce1 100644 --- a/src/GeneratedModels/MuteUsersRequest.php +++ b/src/GeneratedModels/MuteUsersRequest.php @@ -3,28 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $audio - * @property bool|null $muteAllUsers - * @property string|null $mutedByID - * @property bool|null $screenshare - * @property bool|null $screenshareAudio - * @property bool|null $video - * @property array|null $userIds - * @property UserRequest|null $mutedBy - */ class MuteUsersRequest extends BaseModel { public function __construct( - public ?bool $audio = null, public ?bool $muteAllUsers = null, - public ?string $mutedByID = null, + public ?array $userIds = null, + public ?bool $audio = null, + public ?bool $video = null, public ?bool $screenshare = null, public ?bool $screenshareAudio = null, - public ?bool $video = null, - public ?array $userIds = null, + public ?string $mutedByID = null, public ?UserRequest $mutedBy = null, ) { } diff --git a/src/GeneratedModels/MuteUsersResponse.php b/src/GeneratedModels/MuteUsersResponse.php index 7f59b1de..add6a34b 100644 --- a/src/GeneratedModels/MuteUsersResponse.php +++ b/src/GeneratedModels/MuteUsersResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * MuteUsersResponse is the response payload for the mute users endpoint. - * - * @property string $duration */ class MuteUsersResponse extends BaseModel { diff --git a/src/GeneratedModels/NetworkMetricsReportResponse.php b/src/GeneratedModels/NetworkMetricsReportResponse.php index c5cb4f2b..b8300291 100644 --- a/src/GeneratedModels/NetworkMetricsReportResponse.php +++ b/src/GeneratedModels/NetworkMetricsReportResponse.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $averageConnectionTime - * @property int|null $averageJitter - * @property int|null $averageLatency - * @property int|null $averageTimeToReconnect - */ class NetworkMetricsReportResponse extends BaseModel { public function __construct( - public ?int $averageConnectionTime = null, - public ?int $averageJitter = null, public ?int $averageLatency = null, + public ?int $averageJitter = null, + public ?int $averageConnectionTime = null, public ?int $averageTimeToReconnect = null, ) { } diff --git a/src/GeneratedModels/NoiseCancellationSettings.php b/src/GeneratedModels/NoiseCancellationSettings.php index 14ebef50..06aa21d2 100644 --- a/src/GeneratedModels/NoiseCancellationSettings.php +++ b/src/GeneratedModels/NoiseCancellationSettings.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $mode - */ class NoiseCancellationSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/NotificationComment.php b/src/GeneratedModels/NotificationComment.php index 4a9d0eec..79808f48 100644 --- a/src/GeneratedModels/NotificationComment.php +++ b/src/GeneratedModels/NotificationComment.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $comment - * @property string $id - * @property string $userID - * @property array|null $attachments - */ class NotificationComment extends BaseModel { public function __construct( - public ?string $comment = null, public ?string $id = null, public ?string $userID = null, + public ?string $comment = null, /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, diff --git a/src/GeneratedModels/NotificationConfig.php b/src/GeneratedModels/NotificationConfig.php index 14e457fa..9edca99f 100644 --- a/src/GeneratedModels/NotificationConfig.php +++ b/src/GeneratedModels/NotificationConfig.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $deduplicationWindow - * @property bool|null $trackRead - * @property bool|null $trackSeen - */ class NotificationConfig extends BaseModel { public function __construct( - public ?string $deduplicationWindow = null, // Time window for deduplicating notification activities (reactions and follows). Empty or '0' = always deduplicate (default). Examples: '1h', '24h', '7d', '1w' - public ?bool $trackRead = null, // Whether to track read status public ?bool $trackSeen = null, // Whether to track seen status + public ?bool $trackRead = null, // Whether to track read status + public ?string $deduplicationWindow = null, // Time window for deduplicating notification activities (reactions and follows). Empty or '0' = always deduplicate (default). Examples: '1h', '24h', '7d', '1w' ) { } diff --git a/src/GeneratedModels/NotificationContext.php b/src/GeneratedModels/NotificationContext.php index 3ca96029..bc4f8af4 100644 --- a/src/GeneratedModels/NotificationContext.php +++ b/src/GeneratedModels/NotificationContext.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property NotificationTarget|null $target - * @property NotificationTrigger|null $trigger - */ class NotificationContext extends BaseModel { public function __construct( - public ?NotificationTarget $target = null, public ?NotificationTrigger $trigger = null, + public ?NotificationTarget $target = null, ) { } diff --git a/src/GeneratedModels/NotificationFeedUpdatedEvent.php b/src/GeneratedModels/NotificationFeedUpdatedEvent.php index 6d848140..1624b560 100644 --- a/src/GeneratedModels/NotificationFeedUpdatedEvent.php +++ b/src/GeneratedModels/NotificationFeedUpdatedEvent.php @@ -5,30 +5,20 @@ namespace GetStream\GeneratedModels; /** * Emitted when notification feed is updated. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property array|null $aggregatedActivities - * @property NotificationStatusResponse|null $notificationStatus - * @property UserResponseCommonFields|null $user */ class NotificationFeedUpdatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, // The ID of the feed - public ?object $custom = null, - public ?string $type = null, // The type of event: "feeds.notification_feed.updated" in this case - public ?string $feedVisibility = null, - public ?\DateTime $receivedAt = null, - /** @var array|null Aggregated activities for notification feeds */ + /** @var array|null */ #[ArrayOf(AggregatedActivityResponse::class)] public ?array $aggregatedActivities = null, // Aggregated activities for notification feeds public ?NotificationStatusResponse $notificationStatus = null, + public ?string $type = null, // The type of event: "feeds.notification_feed.updated" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $fid = null, // The ID of the feed + public ?string $feedVisibility = null, public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/NotificationMarkUnreadEvent.php b/src/GeneratedModels/NotificationMarkUnreadEvent.php index 603c90d9..5928a778 100644 --- a/src/GeneratedModels/NotificationMarkUnreadEvent.php +++ b/src/GeneratedModels/NotificationMarkUnreadEvent.php @@ -4,48 +4,34 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property int $channelMemberCount - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $firstUnreadMessageID - * @property \DateTime $lastReadAt - * @property int $totalUnreadCount - * @property int $unreadChannels - * @property int $unreadCount - * @property int $unreadMessages - * @property int $unreadThreads - * @property string $type - * @property string|null $lastReadMessageID - * @property string|null $team - * @property string|null $threadID - * @property ChannelResponse|null $channel - * @property User|null $user + * Emitted when a channel/thread is marked as unread. */ class NotificationMarkUnreadEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?int $channelMemberCount = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $firstUnreadMessageID = null, - public ?\DateTime $lastReadAt = null, - public ?int $totalUnreadCount = null, - public ?int $unreadChannels = null, - public ?int $unreadCount = null, - public ?int $unreadMessages = null, - public ?int $unreadThreads = null, - public ?string $type = null, - public ?string $lastReadMessageID = null, - public ?string $team = null, - public ?string $threadID = null, + public ?string $type = null, // The type of event: "notification.mark_unread" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel which was marked as unread + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel which was marked as unread + public ?string $channelID = null, // The ID of the channel which was marked as unread public ?ChannelResponse $channel = null, - public ?User $user = null, + public ?string $threadID = null, // The ID of the thread which was marked as unread + public ?UserResponseCommonFields $user = null, + public ?string $firstUnreadMessageID = null, // The ID of the first unread message + public ?\DateTime $lastReadAt = null, // The time when the channel/thread was marked as unread + public ?string $lastReadMessageID = null, // The ID of the last read message + public ?int $unreadMessages = null, // The number of unread messages in the channel/thread after first_unread_message_id + public ?int $unreadCount = null, // The total number of unread messages + public ?int $totalUnreadCount = null, // The total number of unread messages + public ?int $unreadChannels = null, // The number of channels with unread messages + public ?int $unreadThreads = null, // The number of unread threads + public ?int $unreadThreadMessages = null, // The total number of unread messages in the threads ) { } diff --git a/src/GeneratedModels/NotificationParentActivity.php b/src/GeneratedModels/NotificationParentActivity.php index 596527b5..477e70af 100644 --- a/src/GeneratedModels/NotificationParentActivity.php +++ b/src/GeneratedModels/NotificationParentActivity.php @@ -3,22 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property string|null $text - * @property string|null $type - * @property string|null $userID - * @property array|null $attachments - */ class NotificationParentActivity extends BaseModel { public function __construct( public ?string $id = null, - public ?string $text = null, - public ?string $type = null, public ?string $userID = null, + public ?string $type = null, + public ?string $text = null, /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, diff --git a/src/GeneratedModels/NotificationSettings.php b/src/GeneratedModels/NotificationSettings.php index e57852b4..e72d9cde 100644 --- a/src/GeneratedModels/NotificationSettings.php +++ b/src/GeneratedModels/NotificationSettings.php @@ -3,25 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property EventNotificationSettings $callLiveStarted - * @property EventNotificationSettings $callMissed - * @property EventNotificationSettings $callNotification - * @property EventNotificationSettings $callRing - * @property EventNotificationSettings $sessionStarted - */ class NotificationSettings extends BaseModel { public function __construct( public ?bool $enabled = null, public ?EventNotificationSettings $callLiveStarted = null, - public ?EventNotificationSettings $callMissed = null, + public ?EventNotificationSettings $sessionStarted = null, public ?EventNotificationSettings $callNotification = null, public ?EventNotificationSettings $callRing = null, - public ?EventNotificationSettings $sessionStarted = null, + public ?EventNotificationSettings $callMissed = null, ) { } diff --git a/src/GeneratedModels/NotificationSettingsRequest.php b/src/GeneratedModels/NotificationSettingsRequest.php new file mode 100644 index 00000000..51705fc5 --- /dev/null +++ b/src/GeneratedModels/NotificationSettingsRequest.php @@ -0,0 +1,20 @@ +|null $attachments - * @property NotificationComment|null $comment - * @property NotificationParentActivity|null $parentActivity - */ class NotificationTarget extends BaseModel { public function __construct( public ?string $id = null, // The ID of the target (activity ID or user ID) - public ?string $name = null, // The name of the target user (for user targets like follows) - public ?string $text = null, // The text content of the target activity (for activity targets) - public ?string $type = null, // The type of the target activity (for activity targets) public ?string $userID = null, // The ID of the user who created the target activity (for activity targets) - /** @var array|null Attachments on the target activity (for activity targets) */ + public ?string $type = null, // The type of the target activity (for activity targets) + public ?string $text = null, // The text content of the target activity (for activity targets) + /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, // Attachments on the target activity (for activity targets) + public ?string $name = null, // The name of the target user (for user targets like follows) public ?NotificationComment $comment = null, public ?NotificationParentActivity $parentActivity = null, ) { diff --git a/src/GeneratedModels/NotificationThreadMessageNewEvent.php b/src/GeneratedModels/NotificationThreadMessageNewEvent.php new file mode 100644 index 00000000..71139530 --- /dev/null +++ b/src/GeneratedModels/NotificationThreadMessageNewEvent.php @@ -0,0 +1,39 @@ +|null */ + #[ArrayOf(UserResponseCommonFields::class)] + public ?array $threadParticipants = null, // The participants of the thread + public ?string $team = null, // The team ID + public ?string $parentAuthor = null, + public ?int $unreadThreads = null, + public ?int $unreadThreadMessages = null, + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/NotificationTrigger.php b/src/GeneratedModels/NotificationTrigger.php index 93071352..31efc56c 100644 --- a/src/GeneratedModels/NotificationTrigger.php +++ b/src/GeneratedModels/NotificationTrigger.php @@ -3,18 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $text - * @property string $type - * @property NotificationComment|null $comment - */ class NotificationTrigger extends BaseModel { public function __construct( - public ?string $text = null, // Human-readable text describing the notification public ?string $type = null, // The type of notification (mention, reaction, comment, follow, etc.) + public ?string $text = null, // Human-readable text describing the notification public ?NotificationComment $comment = null, ) { } diff --git a/src/GeneratedModels/OCRRule.php b/src/GeneratedModels/OCRRule.php index 825e3804..1971f540 100644 --- a/src/GeneratedModels/OCRRule.php +++ b/src/GeneratedModels/OCRRule.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $action - * @property string $label - */ class OCRRule extends BaseModel { public function __construct( - public ?string $action = null, public ?string $label = null, + public ?string $action = null, ) { } diff --git a/src/GeneratedModels/OnlyUserID.php b/src/GeneratedModels/OnlyUserID.php index 7f3fdaa1..35122927 100644 --- a/src/GeneratedModels/OnlyUserID.php +++ b/src/GeneratedModels/OnlyUserID.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - */ class OnlyUserID extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/OverviewDashboardConfig.php b/src/GeneratedModels/OverviewDashboardConfig.php index b2498c2b..9cc29f8c 100644 --- a/src/GeneratedModels/OverviewDashboardConfig.php +++ b/src/GeneratedModels/OverviewDashboardConfig.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $defaultDateRangeDays - * @property array|null $visibleCharts - */ class OverviewDashboardConfig extends BaseModel { public function __construct( - public ?int $defaultDateRangeDays = null, public ?array $visibleCharts = null, + public ?int $defaultDateRangeDays = null, ) { } diff --git a/src/GeneratedModels/OwnBatchRequest.php b/src/GeneratedModels/OwnBatchRequest.php index 9e4b7f05..489dac1a 100644 --- a/src/GeneratedModels/OwnBatchRequest.php +++ b/src/GeneratedModels/OwnBatchRequest.php @@ -5,18 +5,13 @@ namespace GetStream\GeneratedModels; /** * Request to get own_follows, own_followings, own_capabilities, and/or own_membership for multiple feeds. If fields is not specified, all fields are returned. - * - * @property array $feeds - * @property string|null $userID - * @property array|null $fields - * @property UserRequest|null $user */ class OwnBatchRequest extends BaseModel { public function __construct( public ?array $feeds = null, // List of feed IDs to get own fields for - public ?string $userID = null, public ?array $fields = null, // Optional list of specific fields to return. If not specified, all fields (own_follows, own_followings, own_capabilities, own_membership) are returned + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/OwnBatchResponse.php b/src/GeneratedModels/OwnBatchResponse.php index 7bc5d82a..d97ffb93 100644 --- a/src/GeneratedModels/OwnBatchResponse.php +++ b/src/GeneratedModels/OwnBatchResponse.php @@ -3,17 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $data - */ class OwnBatchResponse extends BaseModel { public function __construct( - public ?string $duration = null, + /** @var array|null */ + #[MapOf(FeedOwnData::class)] public ?array $data = null, // Map of feed ID to own fields data + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/OwnUserResponse.php b/src/GeneratedModels/OwnUserResponse.php index fa4c6f04..6a9f69b5 100644 --- a/src/GeneratedModels/OwnUserResponse.php +++ b/src/GeneratedModels/OwnUserResponse.php @@ -3,79 +3,45 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $banned - * @property \DateTime $createdAt - * @property string $id - * @property bool $invisible - * @property string $language - * @property bool $online - * @property string $role - * @property int $totalUnreadCount - * @property int $unreadChannels - * @property int $unreadCount - * @property int $unreadThreads - * @property \DateTime $updatedAt - * @property array $channelMutes - * @property array $devices - * @property array $mutes - * @property array $teams - * @property object $custom - * @property int|null $avgResponseTime - * @property \DateTime|null $deactivatedAt - * @property \DateTime|null $deletedAt - * @property string|null $image - * @property \DateTime|null $lastActive - * @property string|null $name - * @property \DateTime|null $revokeTokensIssuedBefore - * @property array|null $blockedUserIds - * @property array|null $latestHiddenChannels - * @property PrivacySettingsResponse|null $privacySettings - * @property PushPreferencesResponse|null $pushPreferences - * @property array|null $teamsRole - * @property array|null $totalUnreadCountByTeam - */ class OwnUserResponse extends BaseModel { public function __construct( - public ?bool $banned = null, - public ?\DateTime $createdAt = null, public ?string $id = null, - public ?bool $invisible = null, + public ?string $name = null, + public ?string $image = null, + public ?object $custom = null, public ?string $language = null, - public ?bool $online = null, public ?string $role = null, - public ?int $totalUnreadCount = null, - public ?int $unreadChannels = null, - public ?int $unreadCount = null, - public ?int $unreadThreads = null, + public ?array $teams = null, + public ?array $teamsRole = null, + public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, - /** @var array|null */ - #[ArrayOf(ChannelMute::class)] - public ?array $channelMutes = null, + public ?\DateTime $deletedAt = null, + public ?bool $banned = null, + public ?bool $online = null, + public ?\DateTime $lastActive = null, + public ?\DateTime $revokeTokensIssuedBefore = null, + public ?\DateTime $deactivatedAt = null, + public ?int $avgResponseTime = null, + public ?PushPreferencesResponse $pushPreferences = null, + public ?PrivacySettingsResponse $privacySettings = null, /** @var array|null */ #[ArrayOf(DeviceResponse::class)] public ?array $devices = null, + public ?bool $invisible = null, /** @var array|null */ #[ArrayOf(UserMuteResponse::class)] public ?array $mutes = null, - public ?array $teams = null, - public ?object $custom = null, - public ?int $avgResponseTime = null, - public ?\DateTime $deactivatedAt = null, - public ?\DateTime $deletedAt = null, - public ?string $image = null, - public ?\DateTime $lastActive = null, - public ?string $name = null, - public ?\DateTime $revokeTokensIssuedBefore = null, - public ?array $blockedUserIds = null, - public ?array $latestHiddenChannels = null, - public ?PrivacySettingsResponse $privacySettings = null, - public ?PushPreferencesResponse $pushPreferences = null, - public ?array $teamsRole = null, + /** @var array|null */ + #[ArrayOf(ChannelMute::class)] + public ?array $channelMutes = null, + public ?int $unreadCount = null, + public ?int $totalUnreadCount = null, public ?array $totalUnreadCountByTeam = null, + public ?int $unreadChannels = null, + public ?int $unreadThreads = null, + public ?array $latestHiddenChannels = null, + public ?array $blockedUserIds = null, ) { } diff --git a/src/GeneratedModels/PagerRequest.php b/src/GeneratedModels/PagerRequest.php index e55fe8c5..1374a405 100644 --- a/src/GeneratedModels/PagerRequest.php +++ b/src/GeneratedModels/PagerRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - */ class PagerRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PagerResponse.php b/src/GeneratedModels/PagerResponse.php index 5d03647c..8ef5e770 100644 --- a/src/GeneratedModels/PagerResponse.php +++ b/src/GeneratedModels/PagerResponse.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $next - * @property string|null $prev - */ class PagerResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PaginationParams.php b/src/GeneratedModels/PaginationParams.php index d204dd1d..f76d4538 100644 --- a/src/GeneratedModels/PaginationParams.php +++ b/src/GeneratedModels/PaginationParams.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property int|null $offset - */ class PaginationParams extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ParsedPredefinedFilterResponse.php b/src/GeneratedModels/ParsedPredefinedFilterResponse.php index 36713957..5999a044 100644 --- a/src/GeneratedModels/ParsedPredefinedFilterResponse.php +++ b/src/GeneratedModels/ParsedPredefinedFilterResponse.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $name - * @property object $filter - * @property array|null $sort - */ class ParsedPredefinedFilterResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ParticipantCountByMinuteResponse.php b/src/GeneratedModels/ParticipantCountByMinuteResponse.php index 6cd94cc2..33af2095 100644 --- a/src/GeneratedModels/ParticipantCountByMinuteResponse.php +++ b/src/GeneratedModels/ParticipantCountByMinuteResponse.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $first - * @property int $last - * @property int $max - * @property int $min - * @property \DateTime $startTs - */ class ParticipantCountByMinuteResponse extends BaseModel { public function __construct( + public ?\DateTime $startTs = null, public ?int $first = null, public ?int $last = null, public ?int $max = null, public ?int $min = null, - public ?\DateTime $startTs = null, ) { } diff --git a/src/GeneratedModels/ParticipantCountOverTimeResponse.php b/src/GeneratedModels/ParticipantCountOverTimeResponse.php index 352423e2..b5dbcfe5 100644 --- a/src/GeneratedModels/ParticipantCountOverTimeResponse.php +++ b/src/GeneratedModels/ParticipantCountOverTimeResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $byMinute - */ class ParticipantCountOverTimeResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ParticipantReportResponse.php b/src/GeneratedModels/ParticipantReportResponse.php index dd8d5260..62944f23 100644 --- a/src/GeneratedModels/ParticipantReportResponse.php +++ b/src/GeneratedModels/ParticipantReportResponse.php @@ -3,29 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $sum - * @property int $unique - * @property int|null $maxConcurrent - * @property array|null $byBrowser - * @property array|null $byCountry - * @property array|null $byDevice - * @property array|null $byOperatingSystem - * @property ParticipantCountOverTimeResponse|null $countOverTime - * @property PublisherStatsResponse|null $publishers - * @property SubscriberStatsResponse|null $subscribers - */ class ParticipantReportResponse extends BaseModel { public function __construct( public ?int $sum = null, public ?int $unique = null, public ?int $maxConcurrent = null, - /** @var array|null */ - #[ArrayOf(GroupedStatsResponse::class)] - public ?array $byBrowser = null, + public ?ParticipantCountOverTimeResponse $countOverTime = null, /** @var array|null */ #[ArrayOf(GroupedStatsResponse::class)] public ?array $byCountry = null, @@ -35,7 +19,9 @@ public function __construct( /** @var array|null */ #[ArrayOf(GroupedStatsResponse::class)] public ?array $byOperatingSystem = null, - public ?ParticipantCountOverTimeResponse $countOverTime = null, + /** @var array|null */ + #[ArrayOf(GroupedStatsResponse::class)] + public ?array $byBrowser = null, public ?PublisherStatsResponse $publishers = null, public ?SubscriberStatsResponse $subscribers = null, ) { diff --git a/src/GeneratedModels/ParticipantSeriesPublisherStats.php b/src/GeneratedModels/ParticipantSeriesPublisherStats.php index 459c2972..dd3cfa8f 100644 --- a/src/GeneratedModels/ParticipantSeriesPublisherStats.php +++ b/src/GeneratedModels/ParticipantSeriesPublisherStats.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $globalMetricsOrder - * @property array|null $global - * @property array|null $globalMeta - * @property array|null $globalThresholds - * @property array|null $tracks - */ class ParticipantSeriesPublisherStats extends BaseModel { public function __construct( - public ?array $globalMetricsOrder = null, public ?array $global = null, + /** @var array|null */ + #[MapOf(MetricDescriptor::class)] public ?array $globalMeta = null, + public ?array $globalMetricsOrder = null, public ?array $globalThresholds = null, public ?array $tracks = null, ) { diff --git a/src/GeneratedModels/ParticipantSeriesSubscriberStats.php b/src/GeneratedModels/ParticipantSeriesSubscriberStats.php index 9d5c616c..e060a6aa 100644 --- a/src/GeneratedModels/ParticipantSeriesSubscriberStats.php +++ b/src/GeneratedModels/ParticipantSeriesSubscriberStats.php @@ -3,25 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $globalMetricsOrder - * @property array|null $subscriptions - * @property array|null $global - * @property array|null $globalMeta - * @property array|null $globalThresholds - */ class ParticipantSeriesSubscriberStats extends BaseModel { public function __construct( + public ?array $global = null, + /** @var array|null */ + #[MapOf(MetricDescriptor::class)] + public ?array $globalMeta = null, public ?array $globalMetricsOrder = null, + public ?array $globalThresholds = null, /** @var array|null */ #[ArrayOf(ParticipantSeriesSubscriptionTrackMetrics::class)] public ?array $subscriptions = null, - public ?array $global = null, - public ?array $globalMeta = null, - public ?array $globalThresholds = null, ) { } diff --git a/src/GeneratedModels/ParticipantSeriesSubscriptionTrackMetrics.php b/src/GeneratedModels/ParticipantSeriesSubscriptionTrackMetrics.php index 7723567a..b2231ff0 100644 --- a/src/GeneratedModels/ParticipantSeriesSubscriptionTrackMetrics.php +++ b/src/GeneratedModels/ParticipantSeriesSubscriptionTrackMetrics.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $publisherUserID - * @property string|null $publisherName - * @property string|null $publisherUserSessionID - * @property array|null $tracks - */ class ParticipantSeriesSubscriptionTrackMetrics extends BaseModel { public function __construct( public ?string $publisherUserID = null, - public ?string $publisherName = null, public ?string $publisherUserSessionID = null, + public ?string $publisherName = null, public ?array $tracks = null, ) { } diff --git a/src/GeneratedModels/ParticipantSeriesTimeframe.php b/src/GeneratedModels/ParticipantSeriesTimeframe.php index 96f63c94..9e23e3ca 100644 --- a/src/GeneratedModels/ParticipantSeriesTimeframe.php +++ b/src/GeneratedModels/ParticipantSeriesTimeframe.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $maxPoints - * @property \DateTime $since - * @property int $stepSeconds - * @property \DateTime $until - */ class ParticipantSeriesTimeframe extends BaseModel { public function __construct( - public ?int $maxPoints = null, public ?\DateTime $since = null, - public ?int $stepSeconds = null, public ?\DateTime $until = null, + public ?int $stepSeconds = null, + public ?int $maxPoints = null, ) { } diff --git a/src/GeneratedModels/ParticipantSeriesTrackMetrics.php b/src/GeneratedModels/ParticipantSeriesTrackMetrics.php index 5feb5306..79a756c1 100644 --- a/src/GeneratedModels/ParticipantSeriesTrackMetrics.php +++ b/src/GeneratedModels/ParticipantSeriesTrackMetrics.php @@ -3,30 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $trackID - * @property string|null $codec - * @property string|null $label - * @property string|null $rid - * @property string|null $trackType - * @property array|null $metricsOrder - * @property array|null $metrics - * @property array|null $metricsMeta - * @property array|null $thresholds - */ class ParticipantSeriesTrackMetrics extends BaseModel { public function __construct( public ?string $trackID = null, - public ?string $codec = null, public ?string $label = null, - public ?string $rid = null, public ?string $trackType = null, - public ?array $metricsOrder = null, + public ?string $codec = null, + public ?string $rid = null, public ?array $metrics = null, + /** @var array|null */ + #[MapOf(MetricDescriptor::class)] public ?array $metricsMeta = null, + public ?array $metricsOrder = null, public ?array $thresholds = null, ) { } diff --git a/src/GeneratedModels/ParticipantSeriesUserStats.php b/src/GeneratedModels/ParticipantSeriesUserStats.php index 53b55578..efa73ebf 100644 --- a/src/GeneratedModels/ParticipantSeriesUserStats.php +++ b/src/GeneratedModels/ParticipantSeriesUserStats.php @@ -3,20 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $metricsOrder - * @property array|null $metrics - * @property array|null $metricsMeta - * @property array|null $thresholds - */ class ParticipantSeriesUserStats extends BaseModel { public function __construct( - public ?array $metricsOrder = null, public ?array $metrics = null, + /** @var array|null */ + #[MapOf(MetricDescriptor::class)] public ?array $metricsMeta = null, + public ?array $metricsOrder = null, public ?array $thresholds = null, ) { } diff --git a/src/GeneratedModels/ParticipantSessionDetails.php b/src/GeneratedModels/ParticipantSessionDetails.php index f6596b55..f568ba9e 100644 --- a/src/GeneratedModels/ParticipantSessionDetails.php +++ b/src/GeneratedModels/ParticipantSessionDetails.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $publisherType - * @property string $userID - * @property string $userSessionID - * @property array $roles - * @property int|null $durationInSeconds - * @property \DateTime|null $joinedAt - * @property \DateTime|null $leftAt - */ class ParticipantSessionDetails extends BaseModel { public function __construct( - public ?string $publisherType = null, public ?string $userID = null, public ?string $userSessionID = null, - public ?array $roles = null, - public ?int $durationInSeconds = null, public ?\DateTime $joinedAt = null, public ?\DateTime $leftAt = null, + public ?string $publisherType = null, + public ?array $roles = null, + public ?int $durationInSeconds = null, ) { } diff --git a/src/GeneratedModels/PendingMessageEvent.php b/src/GeneratedModels/PendingMessageEvent.php index eca56794..5a8bac4c 100644 --- a/src/GeneratedModels/PendingMessageEvent.php +++ b/src/GeneratedModels/PendingMessageEvent.php @@ -5,29 +5,19 @@ namespace GetStream\GeneratedModels; /** * Pending message event for async moderation - * - * @property \DateTime $createdAt - * @property string $method - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property Channel|null $channel - * @property Message|null $message - * @property array|null $metadata - * @property User|null $user */ class PendingMessageEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $method = null, // The method used for the pending message - public ?object $custom = null, public ?string $type = null, // The type of event: "message.pending" in this case public ?\DateTime $receivedAt = null, - public ?Channel $channel = null, - public ?Message $message = null, - public ?array $metadata = null, - public ?User $user = null, + public ?object $custom = null, + public ?UserResponse $user = null, + public ?ChannelResponse $channel = null, + public ?MessageResponse $message = null, + public ?array $metadata = null, // Metadata attached to the pending message + public ?string $method = null, // The method used for the pending message + public ?\DateTime $createdAt = null, // Date/time of creation ) { } diff --git a/src/GeneratedModels/PendingMessageResponse.php b/src/GeneratedModels/PendingMessageResponse.php index 6f234695..58f6c638 100644 --- a/src/GeneratedModels/PendingMessageResponse.php +++ b/src/GeneratedModels/PendingMessageResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property ChannelResponse|null $channel - * @property MessageResponse|null $message - * @property array|null $metadata - * @property UserResponse|null $user - */ class PendingMessageResponse extends BaseModel { public function __construct( + public ?UserResponse $user = null, public ?ChannelResponse $channel = null, public ?MessageResponse $message = null, public ?array $metadata = null, - public ?UserResponse $user = null, ) { } diff --git a/src/GeneratedModels/PerSDKUsageReport.php b/src/GeneratedModels/PerSDKUsageReport.php index 5de34d44..2cd3f894 100644 --- a/src/GeneratedModels/PerSDKUsageReport.php +++ b/src/GeneratedModels/PerSDKUsageReport.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $total - * @property array $byVersion - */ class PerSDKUsageReport extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/Permission.php b/src/GeneratedModels/Permission.php index 47446d47..023729f0 100644 --- a/src/GeneratedModels/Permission.php +++ b/src/GeneratedModels/Permission.php @@ -3,33 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $action - * @property bool $custom - * @property string $description - * @property string $id - * @property string $level - * @property string $name - * @property bool $owner - * @property bool $sameTeam - * @property array $tags - * @property object|null $condition - */ class Permission extends BaseModel { public function __construct( - public ?string $action = null, // Action name this permission is for (e.g. SendMessage) - public ?bool $custom = null, // Whether this is a custom permission or built-in - public ?string $description = null, // Description of the permission public ?string $id = null, // Unique permission ID - public ?string $level = null, // Level at which permission could be applied (app or channel) public ?string $name = null, // Name of the permission + public ?string $description = null, // Description of the permission + public ?string $action = null, // Action name this permission is for (e.g. SendMessage) public ?bool $owner = null, // Whether this permission applies to resource owner or not public ?bool $sameTeam = null, // Whether this permission applies to teammates (multi-tenancy mode only) - public ?array $tags = null, // List of tags of the permission public ?object $condition = null, // MongoDB style condition which decides whether or not the permission is granted + public ?bool $custom = null, // Whether this is a custom permission or built-in + public ?string $level = null, // Level at which permission could be applied (app or channel). One of: app, channel + public ?array $tags = null, // List of tags of the permission ) { } diff --git a/src/GeneratedModels/PermissionRequestEvent.php b/src/GeneratedModels/PermissionRequestEvent.php index 44c74cc1..c6914b3a 100644 --- a/src/GeneratedModels/PermissionRequestEvent.php +++ b/src/GeneratedModels/PermissionRequestEvent.php @@ -6,21 +6,15 @@ /** * This event is sent when a user requests access to a feature on a call, * clients receiving this event should display a permission request to the user - * - * @property string $callCid - * @property \DateTime $createdAt - * @property array $permissions - * @property UserResponse $user - * @property string $type */ class PermissionRequestEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.permission_request" in this case public ?\DateTime $createdAt = null, - public ?array $permissions = null, // The list of permissions requested by the user + public ?string $callCid = null, public ?UserResponse $user = null, - public ?string $type = null, // The type of event: "call.permission_request" in this case + public ?array $permissions = null, // The list of permissions requested by the user ) { } diff --git a/src/GeneratedModels/PinActivityRequest.php b/src/GeneratedModels/PinActivityRequest.php index 3c5bc23e..a773270e 100644 --- a/src/GeneratedModels/PinActivityRequest.php +++ b/src/GeneratedModels/PinActivityRequest.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $userID - * @property UserRequest|null $user - */ class PinActivityRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PinActivityResponse.php b/src/GeneratedModels/PinActivityResponse.php index f33db4ef..113ca3d8 100644 --- a/src/GeneratedModels/PinActivityResponse.php +++ b/src/GeneratedModels/PinActivityResponse.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $duration - * @property string $feed - * @property string $userID - * @property ActivityResponse $activity - */ class PinActivityResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // When the activity was pinned - public ?string $duration = null, + public ?ActivityResponse $activity = null, public ?string $feed = null, // Fully qualified ID of the feed the activity was pinned to public ?string $userID = null, // ID of the user who pinned the activity - public ?ActivityResponse $activity = null, + public ?\DateTime $createdAt = null, // When the activity was pinned + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/PinRequest.php b/src/GeneratedModels/PinRequest.php index 4899e36e..4aa090fa 100644 --- a/src/GeneratedModels/PinRequest.php +++ b/src/GeneratedModels/PinRequest.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * PinRequest is the payload for pinning a message. - * - * @property string $sessionID - * @property string $userID */ class PinRequest extends BaseModel { public function __construct( - public ?string $sessionID = null, // the session ID of the user who pinned the message public ?string $userID = null, // the user ID of the user who pinned the message + public ?string $sessionID = null, // the session ID of the user who pinned the message ) { } diff --git a/src/GeneratedModels/PinResponse.php b/src/GeneratedModels/PinResponse.php index 686b2306..57dd73a4 100644 --- a/src/GeneratedModels/PinResponse.php +++ b/src/GeneratedModels/PinResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class PinResponse extends BaseModel { diff --git a/src/GeneratedModels/PlatformDataResponse.php b/src/GeneratedModels/PlatformDataResponse.php index 6a7a5f44..67c9c215 100644 --- a/src/GeneratedModels/PlatformDataResponse.php +++ b/src/GeneratedModels/PlatformDataResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property BrowserDataResponse $browser - * @property DeviceDataResponse $device - * @property ClientOSDataResponse $os - */ class PlatformDataResponse extends BaseModel { public function __construct( - public ?BrowserDataResponse $browser = null, - public ?DeviceDataResponse $device = null, public ?ClientOSDataResponse $os = null, + public ?DeviceDataResponse $device = null, + public ?BrowserDataResponse $browser = null, ) { } diff --git a/src/GeneratedModels/Policy.php b/src/GeneratedModels/Policy.php index 1041cf50..f3141d72 100644 --- a/src/GeneratedModels/Policy.php +++ b/src/GeneratedModels/Policy.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $action - * @property \DateTime $createdAt - * @property string $name - * @property bool $owner - * @property int $priority - * @property \DateTime $updatedAt - * @property array $resources - * @property array $roles - */ class Policy extends BaseModel { public function __construct( - public ?int $action = null, - public ?\DateTime $createdAt = null, public ?string $name = null, + public ?array $resources = null, + public ?array $roles = null, + public ?int $action = null, public ?bool $owner = null, public ?int $priority = null, + public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, - public ?array $resources = null, - public ?array $roles = null, ) { } diff --git a/src/GeneratedModels/PolicyRequest.php b/src/GeneratedModels/PolicyRequest.php index 186b181e..6cb8c912 100644 --- a/src/GeneratedModels/PolicyRequest.php +++ b/src/GeneratedModels/PolicyRequest.php @@ -5,23 +5,16 @@ namespace GetStream\GeneratedModels; /** * Policy request - * - * @property string $action - * @property string $name - * @property bool $owner - * @property int $priority - * @property array $resources - * @property array $roles */ class PolicyRequest extends BaseModel { public function __construct( public ?string $action = null, public ?string $name = null, // User-friendly policy name - public ?bool $owner = null, // Whether policy applies to resource owner or not - public ?int $priority = null, // Policy priority public ?array $resources = null, // List of resources to apply policy to public ?array $roles = null, // List of roles to apply policy to + public ?bool $owner = null, // Whether policy applies to resource owner or not + public ?int $priority = null, // Policy priority ) { } diff --git a/src/GeneratedModels/PollOptionInput.php b/src/GeneratedModels/PollOptionInput.php index 03d030d1..d4e20388 100644 --- a/src/GeneratedModels/PollOptionInput.php +++ b/src/GeneratedModels/PollOptionInput.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $text - * @property object|null $custom - */ class PollOptionInput extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PollOptionRequest.php b/src/GeneratedModels/PollOptionRequest.php index 6cca12f2..ac2e6acd 100644 --- a/src/GeneratedModels/PollOptionRequest.php +++ b/src/GeneratedModels/PollOptionRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property string|null $text - * @property object|null $custom - */ class PollOptionRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PollOptionResponse.php b/src/GeneratedModels/PollOptionResponse.php index 7678b804..39e43ece 100644 --- a/src/GeneratedModels/PollOptionResponse.php +++ b/src/GeneratedModels/PollOptionResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property PollOptionResponseData $pollOption - */ class PollOptionResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?PollOptionResponseData $pollOption = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/PollOptionResponseData.php b/src/GeneratedModels/PollOptionResponseData.php index 212aaa98..0b9f6530 100644 --- a/src/GeneratedModels/PollOptionResponseData.php +++ b/src/GeneratedModels/PollOptionResponseData.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property string $text - * @property object $custom - */ class PollOptionResponseData extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PollResponse.php b/src/GeneratedModels/PollResponse.php index ae0daaa9..92f494a3 100644 --- a/src/GeneratedModels/PollResponse.php +++ b/src/GeneratedModels/PollResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property PollResponseData $poll - */ class PollResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?PollResponseData $poll = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/PollResponseData.php b/src/GeneratedModels/PollResponseData.php index e623a266..03d453e2 100644 --- a/src/GeneratedModels/PollResponseData.php +++ b/src/GeneratedModels/PollResponseData.php @@ -3,61 +3,36 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $allowAnswers - * @property bool $allowUserSuggestedOptions - * @property int $answersCount - * @property \DateTime $createdAt - * @property string $createdByID - * @property string $description - * @property bool $enforceUniqueVote - * @property string $id - * @property string $name - * @property \DateTime $updatedAt - * @property int $voteCount - * @property string $votingVisibility - * @property array $latestAnswers - * @property array $options - * @property array $ownVotes - * @property object $custom - * @property array $latestVotesByOption - * @property array $voteCountsByOption - * @property bool|null $isClosed - * @property int|null $maxVotesAllowed - * @property UserResponse|null $createdBy - */ class PollResponseData extends BaseModel { public function __construct( - public ?bool $allowAnswers = null, - public ?bool $allowUserSuggestedOptions = null, - public ?int $answersCount = null, - public ?\DateTime $createdAt = null, - public ?string $createdByID = null, - public ?string $description = null, - public ?bool $enforceUniqueVote = null, public ?string $id = null, public ?string $name = null, - public ?\DateTime $updatedAt = null, - public ?int $voteCount = null, + public ?string $description = null, public ?string $votingVisibility = null, - /** @var array|null */ - #[ArrayOf(PollVoteResponseData::class)] - public ?array $latestAnswers = null, + public ?bool $enforceUniqueVote = null, + public ?int $maxVotesAllowed = null, + public ?bool $allowUserSuggestedOptions = null, + public ?bool $allowAnswers = null, + public ?bool $isClosed = null, + public ?int $voteCount = null, /** @var array|null */ #[ArrayOf(PollOptionResponseData::class)] public ?array $options = null, + public ?int $answersCount = null, + public ?array $voteCountsByOption = null, + public ?array $latestVotesByOption = null, + /** @var array|null */ + #[ArrayOf(PollVoteResponseData::class)] + public ?array $latestAnswers = null, /** @var array|null */ #[ArrayOf(PollVoteResponseData::class)] public ?array $ownVotes = null, - public ?object $custom = null, - public ?array $latestVotesByOption = null, - public ?array $voteCountsByOption = null, - public ?bool $isClosed = null, - public ?int $maxVotesAllowed = null, + public ?string $createdByID = null, public ?UserResponse $createdBy = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, + public ?object $custom = null, ) { } diff --git a/src/GeneratedModels/PollVoteResponse.php b/src/GeneratedModels/PollVoteResponse.php index 7e2b24f2..7cbf58fa 100644 --- a/src/GeneratedModels/PollVoteResponse.php +++ b/src/GeneratedModels/PollVoteResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property PollResponseData|null $poll - * @property PollVoteResponseData|null $vote - */ class PollVoteResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - public ?PollResponseData $poll = null, public ?PollVoteResponseData $vote = null, + public ?PollResponseData $poll = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/PollVoteResponseData.php b/src/GeneratedModels/PollVoteResponseData.php index 5c06f06d..9c425c32 100644 --- a/src/GeneratedModels/PollVoteResponseData.php +++ b/src/GeneratedModels/PollVoteResponseData.php @@ -3,31 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $id - * @property string $optionID - * @property string $pollID - * @property \DateTime $updatedAt - * @property string|null $answerText - * @property bool|null $isAnswer - * @property string|null $userID - * @property UserResponse|null $user - */ class PollVoteResponseData extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, + public ?string $pollID = null, public ?string $id = null, public ?string $optionID = null, - public ?string $pollID = null, - public ?\DateTime $updatedAt = null, - public ?string $answerText = null, public ?bool $isAnswer = null, + public ?string $answerText = null, public ?string $userID = null, public ?UserResponse $user = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, ) { } diff --git a/src/GeneratedModels/PollVotesResponse.php b/src/GeneratedModels/PollVotesResponse.php index 99852fc3..4e7642a3 100644 --- a/src/GeneratedModels/PollVotesResponse.php +++ b/src/GeneratedModels/PollVotesResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $votes - * @property string|null $next - * @property string|null $prev - */ class PollVotesResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null Poll votes */ + /** @var array|null */ #[ArrayOf(PollVoteResponseData::class)] public ?array $votes = null, // Poll votes public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/PrivacySettingsResponse.php b/src/GeneratedModels/PrivacySettingsResponse.php index 8c1edc25..4c6834c4 100644 --- a/src/GeneratedModels/PrivacySettingsResponse.php +++ b/src/GeneratedModels/PrivacySettingsResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property DeliveryReceiptsResponse|null $deliveryReceipts - * @property ReadReceiptsResponse|null $readReceipts - * @property TypingIndicatorsResponse|null $typingIndicators - */ class PrivacySettingsResponse extends BaseModel { public function __construct( - public ?DeliveryReceiptsResponse $deliveryReceipts = null, - public ?ReadReceiptsResponse $readReceipts = null, public ?TypingIndicatorsResponse $typingIndicators = null, + public ?ReadReceiptsResponse $readReceipts = null, + public ?DeliveryReceiptsResponse $deliveryReceipts = null, ) { } diff --git a/src/GeneratedModels/PublishedTrackFlags.php b/src/GeneratedModels/PublishedTrackFlags.php index 6b138b0d..34827aec 100644 --- a/src/GeneratedModels/PublishedTrackFlags.php +++ b/src/GeneratedModels/PublishedTrackFlags.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $audio - * @property bool $screenshare - * @property bool $screenshareAudio - * @property bool $video - */ class PublishedTrackFlags extends BaseModel { public function __construct( + public ?bool $video = null, public ?bool $audio = null, public ?bool $screenshare = null, public ?bool $screenshareAudio = null, - public ?bool $video = null, ) { } diff --git a/src/GeneratedModels/PublishedTrackMetrics.php b/src/GeneratedModels/PublishedTrackMetrics.php index a1b6f4d5..9596b8c1 100644 --- a/src/GeneratedModels/PublishedTrackMetrics.php +++ b/src/GeneratedModels/PublishedTrackMetrics.php @@ -3,29 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $codec - * @property string|null $trackID - * @property string|null $trackType - * @property array|null $warnings - * @property MetricTimeSeries|null $bitrate - * @property MetricTimeSeries|null $framerate - * @property ResolutionMetricsTimeSeries|null $resolution - */ class PublishedTrackMetrics extends BaseModel { public function __construct( - public ?string $codec = null, public ?string $trackID = null, public ?string $trackType = null, - /** @var array|null */ - #[ArrayOf(SessionWarningResponse::class)] - public ?array $warnings = null, + public ?string $codec = null, public ?MetricTimeSeries $bitrate = null, public ?MetricTimeSeries $framerate = null, public ?ResolutionMetricsTimeSeries $resolution = null, + /** @var array|null */ + #[ArrayOf(SessionWarningResponse::class)] + public ?array $warnings = null, ) { } diff --git a/src/GeneratedModels/PublisherAllMetrics.php b/src/GeneratedModels/PublisherAllMetrics.php index b2ef698c..bfb1cba1 100644 --- a/src/GeneratedModels/PublisherAllMetrics.php +++ b/src/GeneratedModels/PublisherAllMetrics.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property PublisherAudioMetrics|null $audio - * @property ActiveCallsLatencyStats|null $rttMs - * @property PublisherVideoMetrics|null $video - */ class PublisherAllMetrics extends BaseModel { public function __construct( public ?PublisherAudioMetrics $audio = null, - public ?ActiveCallsLatencyStats $rttMs = null, public ?PublisherVideoMetrics $video = null, + public ?ActiveCallsLatencyStats $rttMs = null, ) { } diff --git a/src/GeneratedModels/PublisherAudioMetrics.php b/src/GeneratedModels/PublisherAudioMetrics.php index f12f8c76..76c5add8 100644 --- a/src/GeneratedModels/PublisherAudioMetrics.php +++ b/src/GeneratedModels/PublisherAudioMetrics.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property ActiveCallsLatencyStats|null $jitterMs - */ class PublisherAudioMetrics extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PublisherStatsResponse.php b/src/GeneratedModels/PublisherStatsResponse.php index ddec2bdb..655f14a0 100644 --- a/src/GeneratedModels/PublisherStatsResponse.php +++ b/src/GeneratedModels/PublisherStatsResponse.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $total - * @property int $unique - * @property array|null $byTrack - */ class PublisherStatsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PublisherVideoMetrics.php b/src/GeneratedModels/PublisherVideoMetrics.php index a7df133d..60c3aab8 100644 --- a/src/GeneratedModels/PublisherVideoMetrics.php +++ b/src/GeneratedModels/PublisherVideoMetrics.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property ActiveCallsBitrateStats|null $bitrate - * @property ActiveCallsFPSStats|null $fps30 - * @property ActiveCallsLatencyStats|null $frameEncodingTimeMs - * @property ActiveCallsLatencyStats|null $jitterMs - * @property ActiveCallsResolutionStats|null $resolution - */ class PublisherVideoMetrics extends BaseModel { public function __construct( - public ?ActiveCallsBitrateStats $bitrate = null, + public ?ActiveCallsLatencyStats $jitterMs = null, public ?ActiveCallsFPSStats $fps30 = null, public ?ActiveCallsLatencyStats $frameEncodingTimeMs = null, - public ?ActiveCallsLatencyStats $jitterMs = null, public ?ActiveCallsResolutionStats $resolution = null, + public ?ActiveCallsBitrateStats $bitrate = null, ) { } diff --git a/src/GeneratedModels/PublishersMetrics.php b/src/GeneratedModels/PublishersMetrics.php index ba70930d..2f728d2b 100644 --- a/src/GeneratedModels/PublishersMetrics.php +++ b/src/GeneratedModels/PublishersMetrics.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property PublisherAllMetrics|null $all - */ class PublishersMetrics extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PushConfig.php b/src/GeneratedModels/PushConfig.php index 92014667..37aa4441 100644 --- a/src/GeneratedModels/PushConfig.php +++ b/src/GeneratedModels/PushConfig.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $version - * @property bool|null $offlineOnly - */ class PushConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PushNotificationConfig.php b/src/GeneratedModels/PushNotificationConfig.php index 5d99eb63..5c75d5d0 100644 --- a/src/GeneratedModels/PushNotificationConfig.php +++ b/src/GeneratedModels/PushNotificationConfig.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enablePush - * @property array|null $pushTypes - */ class PushNotificationConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PushNotificationFields.php b/src/GeneratedModels/PushNotificationFields.php index 03539478..1d07e027 100644 --- a/src/GeneratedModels/PushNotificationFields.php +++ b/src/GeneratedModels/PushNotificationFields.php @@ -3,22 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $offlineOnly - * @property string $version - * @property APNConfigFields $apn - * @property FirebaseConfigFields $firebase - * @property HuaweiConfigFields $huawei - * @property XiaomiConfigFields $xiaomi - * @property array|null $providers - */ class PushNotificationFields extends BaseModel { public function __construct( - public ?bool $offlineOnly = null, public ?string $version = null, + public ?bool $offlineOnly = null, public ?APNConfigFields $apn = null, public ?FirebaseConfigFields $firebase = null, public ?HuaweiConfigFields $huawei = null, diff --git a/src/GeneratedModels/PushNotificationSettingsResponse.php b/src/GeneratedModels/PushNotificationSettingsResponse.php index f7859e9a..93742b43 100644 --- a/src/GeneratedModels/PushNotificationSettingsResponse.php +++ b/src/GeneratedModels/PushNotificationSettingsResponse.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $disabled - * @property \DateTime|null $disabledUntil - */ class PushNotificationSettingsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/PushPreferenceInput.php b/src/GeneratedModels/PushPreferenceInput.php index 248c0fd1..ce1a666a 100644 --- a/src/GeneratedModels/PushPreferenceInput.php +++ b/src/GeneratedModels/PushPreferenceInput.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $callLevel - * @property string|null $channelCid - * @property string|null $chatLevel - * @property \DateTime|null $disabledUntil - * @property string|null $feedsLevel - * @property bool|null $removeDisable - * @property string|null $userID - * @property FeedsPreferences|null $feedsPreferences - */ class PushPreferenceInput extends BaseModel { public function __construct( - public ?string $callLevel = null, // Set the level of call push notifications for the user. One of all, none, default + public ?string $userID = null, // The user id for which to set the push preferences. Required when using server side auths, defaults to current user with client side auth. public ?string $channelCid = null, // Set the push preferences for a specific channel. If empty it sets the default for the user - public ?string $chatLevel = null, // Set the level of chat push notifications for the user. One of all, mentions, none, default + public ?string $chatLevel = null, // Set the level of chat push notifications for the user. Note: "mentions" is deprecated in favor of "direct_mentions". One of: all, mentions, direct_mentions, all_mentions, none, default + public ?string $callLevel = null, // Set the level of call push notifications for the user. One of: all, none, default + public ?string $feedsLevel = null, // Set the level of feeds push notifications for the user. One of: all, none, default + public ?FeedsPreferences $feedsPreferences = null, public ?\DateTime $disabledUntil = null, // Disable push notifications till a certain time - public ?string $feedsLevel = null, // Set the level of feeds push notifications for the user. One of all, none, default public ?bool $removeDisable = null, // Remove the disabled until time. (IE stop snoozing notifications) - public ?string $userID = null, // The user id for which to set the push preferences. Required when using server side auths, defaults to current user with client side auth. - public ?FeedsPreferences $feedsPreferences = null, ) { } diff --git a/src/GeneratedModels/PushPreferencesResponse.php b/src/GeneratedModels/PushPreferencesResponse.php index bb400bb4..57de792f 100644 --- a/src/GeneratedModels/PushPreferencesResponse.php +++ b/src/GeneratedModels/PushPreferencesResponse.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $callLevel - * @property string|null $chatLevel - * @property \DateTime|null $disabledUntil - * @property string|null $feedsLevel - * @property FeedsPreferencesResponse|null $feedsPreferences - */ class PushPreferencesResponse extends BaseModel { public function __construct( - public ?string $callLevel = null, public ?string $chatLevel = null, - public ?\DateTime $disabledUntil = null, + public ?string $callLevel = null, public ?string $feedsLevel = null, public ?FeedsPreferencesResponse $feedsPreferences = null, + public ?\DateTime $disabledUntil = null, ) { } diff --git a/src/GeneratedModels/PushProvider.php b/src/GeneratedModels/PushProvider.php index f0a890c2..d49bb459 100644 --- a/src/GeneratedModels/PushProvider.php +++ b/src/GeneratedModels/PushProvider.php @@ -3,71 +3,39 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $name - * @property string $type - * @property \DateTime $updatedAt - * @property string|null $apnAuthKey - * @property string|null $apnAuthType - * @property bool|null $apnDevelopment - * @property string|null $apnHost - * @property string|null $apnKeyID - * @property string|null $apnNotificationTemplate - * @property string|null $apnP12Cert - * @property string|null $apnTeamID - * @property string|null $apnTopic - * @property string|null $description - * @property \DateTime|null $disabledAt - * @property string|null $disabledReason - * @property string|null $firebaseApnTemplate - * @property string|null $firebaseCredentials - * @property string|null $firebaseDataTemplate - * @property string|null $firebaseHost - * @property string|null $firebaseNotificationTemplate - * @property string|null $firebaseServerKey - * @property string|null $huaweiAppID - * @property string|null $huaweiAppSecret - * @property string|null $huaweiHost - * @property string|null $xiaomiAppSecret - * @property string|null $xiaomiPackageName - * @property array|null $pushTemplates - */ class PushProvider extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, public ?string $name = null, public ?string $type = null, + public ?string $description = null, + public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, + public ?\DateTime $disabledAt = null, + public ?string $disabledReason = null, public ?string $apnAuthKey = null, - public ?string $apnAuthType = null, - public ?bool $apnDevelopment = null, - public ?string $apnHost = null, public ?string $apnKeyID = null, - public ?string $apnNotificationTemplate = null, public ?string $apnP12Cert = null, public ?string $apnTeamID = null, public ?string $apnTopic = null, - public ?string $description = null, - public ?\DateTime $disabledAt = null, - public ?string $disabledReason = null, - public ?string $firebaseApnTemplate = null, + public ?string $apnAuthType = null, + public ?bool $apnDevelopment = null, + public ?string $apnHost = null, + public ?string $apnNotificationTemplate = null, + public ?string $firebaseServerKey = null, public ?string $firebaseCredentials = null, public ?string $firebaseDataTemplate = null, - public ?string $firebaseHost = null, public ?string $firebaseNotificationTemplate = null, - public ?string $firebaseServerKey = null, + public ?string $firebaseApnTemplate = null, + public ?string $firebaseHost = null, public ?string $huaweiAppID = null, public ?string $huaweiAppSecret = null, - public ?string $huaweiHost = null, - public ?string $xiaomiAppSecret = null, public ?string $xiaomiPackageName = null, + public ?string $xiaomiAppSecret = null, /** @var array|null */ #[ArrayOf(PushTemplate::class)] public ?array $pushTemplates = null, + public ?string $huaweiHost = null, ) { } diff --git a/src/GeneratedModels/PushProviderRequest.php b/src/GeneratedModels/PushProviderRequest.php new file mode 100644 index 00000000..41f5b076 --- /dev/null +++ b/src/GeneratedModels/PushProviderRequest.php @@ -0,0 +1,38 @@ + $histogram - */ class QualityScoreReport extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/QualityScoreReportResponse.php b/src/GeneratedModels/QualityScoreReportResponse.php index 7cabfd31..a0f41272 100644 --- a/src/GeneratedModels/QualityScoreReportResponse.php +++ b/src/GeneratedModels/QualityScoreReportResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $daily - */ class QualityScoreReportResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/QueryActivitiesRequest.php b/src/GeneratedModels/QueryActivitiesRequest.php index cc38fe5e..d2775bef 100644 --- a/src/GeneratedModels/QueryActivitiesRequest.php +++ b/src/GeneratedModels/QueryActivitiesRequest.php @@ -3,30 +3,19 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $includePrivateActivities - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property string|null $userID - * @property array|null $sort - * @property object|null $filter - * @property UserRequest|null $user - */ class QueryActivitiesRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filters to apply to the query. Supports location-based queries with 'near' and 'within_bounds' operators. + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for the query public ?bool $includePrivateActivities = null, + public ?bool $includeExpiredActivities = null, // When true, include both expired and non-expired activities in the result. public ?int $limit = null, public ?string $next = null, public ?string $prev = null, public ?string $userID = null, - /** @var array|null Sorting parameters for the query */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sorting parameters for the query - public ?object $filter = null, // Filters to apply to the query. Supports location-based queries with 'near' and 'within_bounds' operators. public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryActivitiesResponse.php b/src/GeneratedModels/QueryActivitiesResponse.php index 0caca6d1..9455859e 100644 --- a/src/GeneratedModels/QueryActivitiesResponse.php +++ b/src/GeneratedModels/QueryActivitiesResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $activities - * @property string|null $next - * @property string|null $prev - */ class QueryActivitiesResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of activities matching the query */ + /** @var array|null */ #[ArrayOf(ActivityResponse::class)] public ?array $activities = null, // List of activities matching the query public ?string $next = null, // Cursor for next page public ?string $prev = null, // Cursor for previous page + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryActivityReactionsRequest.php b/src/GeneratedModels/QueryActivityReactionsRequest.php index d396dd36..0f69db0c 100644 --- a/src/GeneratedModels/QueryActivityReactionsRequest.php +++ b/src/GeneratedModels/QueryActivityReactionsRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QueryActivityReactionsRequest extends BaseModel { public function __construct( - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, + public ?object $filter = null, /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, - public ?object $filter = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, ) { } diff --git a/src/GeneratedModels/QueryActivityReactionsResponse.php b/src/GeneratedModels/QueryActivityReactionsResponse.php index e1c7fbc8..2a596044 100644 --- a/src/GeneratedModels/QueryActivityReactionsResponse.php +++ b/src/GeneratedModels/QueryActivityReactionsResponse.php @@ -5,21 +5,16 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $reactions - * @property string|null $next - * @property string|null $prev */ class QueryActivityReactionsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(FeedsReactionResponse::class)] public ?array $reactions = null, public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryAggregateCallStatsRequest.php b/src/GeneratedModels/QueryAggregateCallStatsRequest.php index b996f2c3..a698dde2 100644 --- a/src/GeneratedModels/QueryAggregateCallStatsRequest.php +++ b/src/GeneratedModels/QueryAggregateCallStatsRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $from - * @property string|null $to - * @property array|null $reportTypes - */ class QueryAggregateCallStatsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/QueryAggregateCallStatsResponse.php b/src/GeneratedModels/QueryAggregateCallStatsResponse.php index 92691ea7..77332a42 100644 --- a/src/GeneratedModels/QueryAggregateCallStatsResponse.php +++ b/src/GeneratedModels/QueryAggregateCallStatsResponse.php @@ -5,27 +5,18 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property CallDurationReportResponse|null $callDurationReport - * @property CallParticipantCountReportResponse|null $callParticipantCountReport - * @property CallsPerDayReportResponse|null $callsPerDayReport - * @property NetworkMetricsReportResponse|null $networkMetricsReport - * @property QualityScoreReportResponse|null $qualityScoreReport - * @property SDKUsageReportResponse|null $sdkUsageReport - * @property UserFeedbackReportResponse|null $userFeedbackReport */ class QueryAggregateCallStatsResponse extends BaseModel { public function __construct( public ?string $duration = null, // Duration of the request in milliseconds public ?CallDurationReportResponse $callDurationReport = null, - public ?CallParticipantCountReportResponse $callParticipantCountReport = null, public ?CallsPerDayReportResponse $callsPerDayReport = null, - public ?NetworkMetricsReportResponse $networkMetricsReport = null, + public ?CallParticipantCountReportResponse $callParticipantCountReport = null, public ?QualityScoreReportResponse $qualityScoreReport = null, public ?SDKUsageReportResponse $sdkUsageReport = null, public ?UserFeedbackReportResponse $userFeedbackReport = null, + public ?NetworkMetricsReportResponse $networkMetricsReport = null, ) { } diff --git a/src/GeneratedModels/QueryAppealsRequest.php b/src/GeneratedModels/QueryAppealsRequest.php index 5416e1ac..24099374 100644 --- a/src/GeneratedModels/QueryAppealsRequest.php +++ b/src/GeneratedModels/QueryAppealsRequest.php @@ -3,28 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property string|null $userID - * @property array|null $sort - * @property object|null $filter - * @property UserRequest|null $user - */ class QueryAppealsRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filter conditions for appeals + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for appeals public ?int $limit = null, public ?string $next = null, public ?string $prev = null, public ?string $userID = null, - /** @var array|null Sorting parameters for appeals */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sorting parameters for appeals - public ?object $filter = null, // Filter conditions for appeals public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryAppealsResponse.php b/src/GeneratedModels/QueryAppealsResponse.php index fdf26d14..c1f8bd2b 100644 --- a/src/GeneratedModels/QueryAppealsResponse.php +++ b/src/GeneratedModels/QueryAppealsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $items - * @property string|null $next - * @property string|null $prev - */ class QueryAppealsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of Appeal Items */ + /** @var array|null */ #[ArrayOf(AppealItemResponse::class)] public ?array $items = null, // List of Appeal Items public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryBannedUsersPayload.php b/src/GeneratedModels/QueryBannedUsersPayload.php index 8afb1eab..d5a8e9a7 100644 --- a/src/GeneratedModels/QueryBannedUsersPayload.php +++ b/src/GeneratedModels/QueryBannedUsersPayload.php @@ -3,28 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property object $filterConditions - * @property bool|null $excludeExpiredBans - * @property int|null $limit - * @property int|null $offset - * @property string|null $userID - * @property array|null $sort - * @property UserRequest|null $user - */ class QueryBannedUsersPayload extends BaseModel { public function __construct( public ?object $filterConditions = null, - public ?bool $excludeExpiredBans = null, // Whether to exclude expired bans or not + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Array of sort parameters public ?int $limit = null, // Number of records to return public ?int $offset = null, // Number of records to offset + public ?bool $excludeExpiredBans = null, // Whether to exclude expired bans or not public ?string $userID = null, - /** @var array|null Array of sort parameters */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Array of sort parameters public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryBannedUsersResponse.php b/src/GeneratedModels/QueryBannedUsersResponse.php index 0020894c..0b5f5915 100644 --- a/src/GeneratedModels/QueryBannedUsersResponse.php +++ b/src/GeneratedModels/QueryBannedUsersResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $bans - */ class QueryBannedUsersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null List of found bans */ + /** @var array|null */ #[ArrayOf(BanResponse::class)] public ?array $bans = null, // List of found bans + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryBookmarkFoldersRequest.php b/src/GeneratedModels/QueryBookmarkFoldersRequest.php index 4f95fd43..ee856a25 100644 --- a/src/GeneratedModels/QueryBookmarkFoldersRequest.php +++ b/src/GeneratedModels/QueryBookmarkFoldersRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QueryBookmarkFoldersRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filters to apply to the query + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for the query public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null Sorting parameters for the query */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sorting parameters for the query - public ?object $filter = null, // Filters to apply to the query ) { } diff --git a/src/GeneratedModels/QueryBookmarkFoldersResponse.php b/src/GeneratedModels/QueryBookmarkFoldersResponse.php index c10746be..342a4376 100644 --- a/src/GeneratedModels/QueryBookmarkFoldersResponse.php +++ b/src/GeneratedModels/QueryBookmarkFoldersResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $bookmarkFolders - * @property string|null $next - * @property string|null $prev - */ class QueryBookmarkFoldersResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of bookmark folders matching the query */ + /** @var array|null */ #[ArrayOf(BookmarkFolderResponse::class)] public ?array $bookmarkFolders = null, // List of bookmark folders matching the query public ?string $next = null, // Cursor for next page public ?string $prev = null, // Cursor for previous page + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryBookmarksRequest.php b/src/GeneratedModels/QueryBookmarksRequest.php index 1e65b101..f8325347 100644 --- a/src/GeneratedModels/QueryBookmarksRequest.php +++ b/src/GeneratedModels/QueryBookmarksRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QueryBookmarksRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filters to apply to the query + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for the query public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null Sorting parameters for the query */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sorting parameters for the query - public ?object $filter = null, // Filters to apply to the query ) { } diff --git a/src/GeneratedModels/QueryBookmarksResponse.php b/src/GeneratedModels/QueryBookmarksResponse.php index 88953bc5..132e176b 100644 --- a/src/GeneratedModels/QueryBookmarksResponse.php +++ b/src/GeneratedModels/QueryBookmarksResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $bookmarks - * @property string|null $next - * @property string|null $prev - */ class QueryBookmarksResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of bookmarks matching the query */ + /** @var array|null */ #[ArrayOf(BookmarkResponse::class)] public ?array $bookmarks = null, // List of bookmarks matching the query public ?string $next = null, // Cursor for next page public ?string $prev = null, // Cursor for previous page + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryCallMembersRequest.php b/src/GeneratedModels/QueryCallMembersRequest.php index 3c46c8cc..861397be 100644 --- a/src/GeneratedModels/QueryCallMembersRequest.php +++ b/src/GeneratedModels/QueryCallMembersRequest.php @@ -3,29 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property string $type - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filterConditions - */ class QueryCallMembersRequest extends BaseModel { public function __construct( - public ?string $id = null, public ?string $type = null, - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, + public ?string $id = null, + public ?object $filterConditions = null, /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, - public ?object $filterConditions = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, ) { } diff --git a/src/GeneratedModels/QueryCallMembersResponse.php b/src/GeneratedModels/QueryCallMembersResponse.php index dbca176a..f1ec46d4 100644 --- a/src/GeneratedModels/QueryCallMembersResponse.php +++ b/src/GeneratedModels/QueryCallMembersResponse.php @@ -5,21 +5,16 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $members - * @property string|null $next - * @property string|null $prev */ class QueryCallMembersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryCallParticipantSessionsResponse.php b/src/GeneratedModels/QueryCallParticipantSessionsResponse.php index f99026c0..d730a368 100644 --- a/src/GeneratedModels/QueryCallParticipantSessionsResponse.php +++ b/src/GeneratedModels/QueryCallParticipantSessionsResponse.php @@ -5,33 +5,22 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $callID - * @property string $callSessionID - * @property string $callType - * @property int $duration - * @property int $totalParticipantDuration - * @property int $totalParticipantSessions - * @property array $participantsSessions - * @property string|null $next - * @property string|null $prev - * @property CallSessionResponse|null $session */ class QueryCallParticipantSessionsResponse extends BaseModel { public function __construct( + public ?string $next = null, + public ?string $prev = null, + public ?string $callType = null, public ?string $callID = null, public ?string $callSessionID = null, - public ?string $callType = null, + public ?CallSessionResponse $session = null, public ?int $duration = null, // Duration of the request in milliseconds - public ?int $totalParticipantDuration = null, public ?int $totalParticipantSessions = null, + public ?int $totalParticipantDuration = null, /** @var array|null */ #[ArrayOf(ParticipantSessionDetails::class)] public ?array $participantsSessions = null, - public ?string $next = null, - public ?string $prev = null, - public ?CallSessionResponse $session = null, ) { } diff --git a/src/GeneratedModels/QueryCallParticipantsRequest.php b/src/GeneratedModels/QueryCallParticipantsRequest.php index 7bf203cc..6daa3627 100644 --- a/src/GeneratedModels/QueryCallParticipantsRequest.php +++ b/src/GeneratedModels/QueryCallParticipantsRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property object|null $filterConditions - */ class QueryCallParticipantsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/QueryCallParticipantsResponse.php b/src/GeneratedModels/QueryCallParticipantsResponse.php index dd219f5e..202eae61 100644 --- a/src/GeneratedModels/QueryCallParticipantsResponse.php +++ b/src/GeneratedModels/QueryCallParticipantsResponse.php @@ -3,31 +3,21 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property int $totalParticipants - * @property array $members - * @property array $ownCapabilities - * @property array $participants - * @property CallResponse $call - */ class QueryCallParticipantsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - public ?int $totalParticipants = null, + public ?CallResponse $call = null, /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, /** @var array|null */ #[ArrayOf(OwnCapability::class)] public ?array $ownCapabilities = null, - /** @var array|null List of call participants */ + /** @var array|null */ #[ArrayOf(CallParticipantResponse::class)] public ?array $participants = null, // List of call participants - public ?CallResponse $call = null, + public ?int $totalParticipants = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryCallSessionParticipantStatsResponse.php b/src/GeneratedModels/QueryCallSessionParticipantStatsResponse.php index 347ece3c..5e9baf88 100644 --- a/src/GeneratedModels/QueryCallSessionParticipantStatsResponse.php +++ b/src/GeneratedModels/QueryCallSessionParticipantStatsResponse.php @@ -5,34 +5,22 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $callID - * @property string $callSessionID - * @property string $callType - * @property string $duration - * @property array $participants - * @property CallStatsParticipantCounts $counts - * @property \DateTime|null $callEndedAt - * @property \DateTime|null $callStartedAt - * @property string|null $next - * @property string|null $prev - * @property string|null $tmpDataSource */ class QueryCallSessionParticipantStatsResponse extends BaseModel { public function __construct( + public ?string $duration = null, // Duration of the request in milliseconds + public ?string $next = null, + public ?string $prev = null, + public ?string $callType = null, public ?string $callID = null, public ?string $callSessionID = null, - public ?string $callType = null, - public ?string $duration = null, // Duration of the request in milliseconds + public ?\DateTime $callStartedAt = null, + public ?\DateTime $callEndedAt = null, + public ?CallStatsParticipantCounts $counts = null, /** @var array|null */ #[ArrayOf(CallStatsParticipant::class)] public ?array $participants = null, - public ?CallStatsParticipantCounts $counts = null, - public ?\DateTime $callEndedAt = null, - public ?\DateTime $callStartedAt = null, - public ?string $next = null, - public ?string $prev = null, public ?string $tmpDataSource = null, ) { } diff --git a/src/GeneratedModels/QueryCallSessionParticipantStatsTimelineResponse.php b/src/GeneratedModels/QueryCallSessionParticipantStatsTimelineResponse.php index a7d4a3d3..359c1991 100644 --- a/src/GeneratedModels/QueryCallSessionParticipantStatsTimelineResponse.php +++ b/src/GeneratedModels/QueryCallSessionParticipantStatsTimelineResponse.php @@ -5,22 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $callID - * @property string $callSessionID - * @property string $callType - * @property string $duration - * @property string $userID - * @property string $userSessionID - * @property array $events */ class QueryCallSessionParticipantStatsTimelineResponse extends BaseModel { public function __construct( + public ?string $duration = null, // Duration of the request in milliseconds + public ?string $callType = null, public ?string $callID = null, public ?string $callSessionID = null, - public ?string $callType = null, - public ?string $duration = null, // Duration of the request in milliseconds public ?string $userID = null, public ?string $userSessionID = null, /** @var array|null */ diff --git a/src/GeneratedModels/QueryCallStatsMapResponse.php b/src/GeneratedModels/QueryCallStatsMapResponse.php index b534a479..31c330dc 100644 --- a/src/GeneratedModels/QueryCallStatsMapResponse.php +++ b/src/GeneratedModels/QueryCallStatsMapResponse.php @@ -5,39 +5,24 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $callID - * @property string $callSessionID - * @property string $callType - * @property string $duration - * @property CallStatsParticipantCounts $counts - * @property \DateTime|null $callEndedAt - * @property \DateTime|null $callStartedAt - * @property string|null $dataSource - * @property \DateTime|null $endTime - * @property \DateTime|null $generatedAt - * @property \DateTime|null $startTime - * @property CallStatsMapPublishers|null $publishers - * @property CallStatsMapSFUs|null $sfus - * @property CallStatsMapSubscribers|null $subscribers */ class QueryCallStatsMapResponse extends BaseModel { public function __construct( + public ?string $duration = null, // Duration of the request in milliseconds + public ?string $callType = null, public ?string $callID = null, public ?string $callSessionID = null, - public ?string $callType = null, - public ?string $duration = null, // Duration of the request in milliseconds - public ?CallStatsParticipantCounts $counts = null, - public ?\DateTime $callEndedAt = null, public ?\DateTime $callStartedAt = null, - public ?string $dataSource = null, + public ?\DateTime $callEndedAt = null, + public ?\DateTime $startTime = null, public ?\DateTime $endTime = null, public ?\DateTime $generatedAt = null, - public ?\DateTime $startTime = null, + public ?string $dataSource = null, + public ?CallStatsParticipantCounts $counts = null, + public ?CallStatsMapSubscribers $subscribers = null, public ?CallStatsMapPublishers $publishers = null, public ?CallStatsMapSFUs $sfus = null, - public ?CallStatsMapSubscribers $subscribers = null, ) { } diff --git a/src/GeneratedModels/QueryCallStatsRequest.php b/src/GeneratedModels/QueryCallStatsRequest.php index 4ca08db6..23b1fda3 100644 --- a/src/GeneratedModels/QueryCallStatsRequest.php +++ b/src/GeneratedModels/QueryCallStatsRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filterConditions - */ class QueryCallStatsRequest extends BaseModel { public function __construct( - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, + public ?object $filterConditions = null, /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, - public ?object $filterConditions = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, ) { } diff --git a/src/GeneratedModels/QueryCallStatsResponse.php b/src/GeneratedModels/QueryCallStatsResponse.php index 8b784dec..ad2be5f9 100644 --- a/src/GeneratedModels/QueryCallStatsResponse.php +++ b/src/GeneratedModels/QueryCallStatsResponse.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $reports - * @property string|null $next - * @property string|null $prev */ class QueryCallStatsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(CallStatsReportSummaryResponse::class)] public ?array $reports = null, + public ?string $duration = null, // Duration of the request in milliseconds public ?string $next = null, public ?string $prev = null, ) { diff --git a/src/GeneratedModels/QueryCallsRequest.php b/src/GeneratedModels/QueryCallsRequest.php index d6d19b07..ed25b5fe 100644 --- a/src/GeneratedModels/QueryCallsRequest.php +++ b/src/GeneratedModels/QueryCallsRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filterConditions - */ class QueryCallsRequest extends BaseModel { public function __construct( + public ?object $filterConditions = null, + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Array of sort parameters public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null Array of sort parameters */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Array of sort parameters - public ?object $filterConditions = null, ) { } diff --git a/src/GeneratedModels/QueryCallsResponse.php b/src/GeneratedModels/QueryCallsResponse.php index c947b28e..decf3abd 100644 --- a/src/GeneratedModels/QueryCallsResponse.php +++ b/src/GeneratedModels/QueryCallsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $calls - * @property string|null $next - * @property string|null $prev - */ class QueryCallsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(CallStateResponseFields::class)] public ?array $calls = null, public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryCampaignsRequest.php b/src/GeneratedModels/QueryCampaignsRequest.php index 7fd8ba6a..5f753060 100644 --- a/src/GeneratedModels/QueryCampaignsRequest.php +++ b/src/GeneratedModels/QueryCampaignsRequest.php @@ -3,27 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property int|null $userLimit - * @property array|null $sort - * @property object|null $filter - */ class QueryCampaignsRequest extends BaseModel { public function __construct( - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, - public ?int $userLimit = null, + public ?object $filter = null, /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, - public ?object $filter = null, + public ?int $userLimit = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, ) { } diff --git a/src/GeneratedModels/QueryCampaignsResponse.php b/src/GeneratedModels/QueryCampaignsResponse.php index 745e9595..8ad36848 100644 --- a/src/GeneratedModels/QueryCampaignsResponse.php +++ b/src/GeneratedModels/QueryCampaignsResponse.php @@ -5,21 +5,16 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $campaigns - * @property string|null $next - * @property string|null $prev */ class QueryCampaignsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(CampaignResponse::class)] public ?array $campaigns = null, public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryChannelsRequest.php b/src/GeneratedModels/QueryChannelsRequest.php index a76b8944..73d3870b 100644 --- a/src/GeneratedModels/QueryChannelsRequest.php +++ b/src/GeneratedModels/QueryChannelsRequest.php @@ -3,38 +3,22 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property int|null $memberLimit - * @property int|null $messageLimit - * @property int|null $offset - * @property string|null $predefinedFilter - * @property bool|null $state - * @property string|null $userID - * @property array|null $sort - * @property object|null $filterConditions - * @property object|null $filterValues - * @property object|null $sortValues - * @property UserRequest|null $user - */ class QueryChannelsRequest extends BaseModel { public function __construct( - public ?int $limit = null, // Number of channels to limit - public ?int $memberLimit = null, // Number of members to limit + public ?object $filterConditions = null, + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // List of sort parameters + public ?bool $state = null, // Whether to update channel state or not public ?int $messageLimit = null, // Number of messages to limit + public ?int $memberLimit = null, // Number of members to limit + public ?int $limit = null, // Number of channels to limit public ?int $offset = null, // Channel pagination offset public ?string $predefinedFilter = null, // ID of a predefined filter to use instead of filter_conditions - public ?bool $state = null, // Whether to update channel state or not - public ?string $userID = null, - /** @var array|null List of sort parameters */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // List of sort parameters - public ?object $filterConditions = null, public ?object $filterValues = null, // Values to interpolate into the predefined filter template public ?object $sortValues = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryChannelsResponse.php b/src/GeneratedModels/QueryChannelsResponse.php index 9f23f4ba..b20a6240 100644 --- a/src/GeneratedModels/QueryChannelsResponse.php +++ b/src/GeneratedModels/QueryChannelsResponse.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $channels - * @property ParsedPredefinedFilterResponse|null $predefinedFilter - */ class QueryChannelsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null List of channels */ + /** @var array|null */ #[ArrayOf(ChannelStateResponseFields::class)] public ?array $channels = null, // List of channels public ?ParsedPredefinedFilterResponse $predefinedFilter = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryCommentReactionsRequest.php b/src/GeneratedModels/QueryCommentReactionsRequest.php index efcb2564..efeaf7a2 100644 --- a/src/GeneratedModels/QueryCommentReactionsRequest.php +++ b/src/GeneratedModels/QueryCommentReactionsRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QueryCommentReactionsRequest extends BaseModel { public function __construct( - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, + public ?object $filter = null, /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, - public ?object $filter = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, ) { } diff --git a/src/GeneratedModels/QueryCommentReactionsResponse.php b/src/GeneratedModels/QueryCommentReactionsResponse.php index c6dafcd6..3f673b22 100644 --- a/src/GeneratedModels/QueryCommentReactionsResponse.php +++ b/src/GeneratedModels/QueryCommentReactionsResponse.php @@ -5,21 +5,16 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $reactions - * @property string|null $next - * @property string|null $prev */ class QueryCommentReactionsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(FeedsReactionResponse::class)] public ?array $reactions = null, public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryCommentsRequest.php b/src/GeneratedModels/QueryCommentsRequest.php index aa9e0833..6dc3b6fd 100644 --- a/src/GeneratedModels/QueryCommentsRequest.php +++ b/src/GeneratedModels/QueryCommentsRequest.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property object $filter - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property string|null $sort - */ class QueryCommentsRequest extends BaseModel { public function __construct( public ?object $filter = null, // MongoDB-style filter for querying comments + public ?string $sort = null, // first (oldest), last (newest) or top. One of: first, last, top, best, controversial public ?int $limit = null, // Maximum number of comments to return public ?string $next = null, public ?string $prev = null, - public ?string $sort = null, // first (oldest), last (newest) or top ) { } diff --git a/src/GeneratedModels/QueryCommentsResponse.php b/src/GeneratedModels/QueryCommentsResponse.php index 021820ac..ee6a3dd8 100644 --- a/src/GeneratedModels/QueryCommentsResponse.php +++ b/src/GeneratedModels/QueryCommentsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $comments - * @property string|null $next - * @property string|null $prev - */ class QueryCommentsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of comments matching the query */ + /** @var array|null */ #[ArrayOf(CommentResponse::class)] public ?array $comments = null, // List of comments matching the query public ?string $next = null, // Cursor for next page public ?string $prev = null, // Cursor for previous page + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryDraftsRequest.php b/src/GeneratedModels/QueryDraftsRequest.php index 84a675d9..753cbeee 100644 --- a/src/GeneratedModels/QueryDraftsRequest.php +++ b/src/GeneratedModels/QueryDraftsRequest.php @@ -3,29 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property string|null $userID - * @property array|null $sort - * @property object|null $filter - * @property UserRequest|null $user - */ class QueryDraftsRequest extends BaseModel { public function __construct( - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, - public ?string $userID = null, - /** @var array|null Array of sort parameters */ + public ?object $filter = null, // Filter to apply to the query + /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, // Array of sort parameters - public ?object $filter = null, // Filter to apply to the query + public ?string $userID = null, public ?UserRequest $user = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, ) { } diff --git a/src/GeneratedModels/QueryDraftsResponse.php b/src/GeneratedModels/QueryDraftsResponse.php index b24a4340..34c04e56 100644 --- a/src/GeneratedModels/QueryDraftsResponse.php +++ b/src/GeneratedModels/QueryDraftsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $drafts - * @property string|null $next - * @property string|null $prev - */ class QueryDraftsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null Drafts */ + /** @var array|null */ #[ArrayOf(DraftResponse::class)] public ?array $drafts = null, // Drafts public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryFeedMembersRequest.php b/src/GeneratedModels/QueryFeedMembersRequest.php index b68d5abb..51483033 100644 --- a/src/GeneratedModels/QueryFeedMembersRequest.php +++ b/src/GeneratedModels/QueryFeedMembersRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QueryFeedMembersRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filter parameters for the query + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sort parameters for the query public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null Sort parameters for the query */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sort parameters for the query - public ?object $filter = null, // Filter parameters for the query ) { } diff --git a/src/GeneratedModels/QueryFeedMembersResponse.php b/src/GeneratedModels/QueryFeedMembersResponse.php index 9ba6d10a..cb162773 100644 --- a/src/GeneratedModels/QueryFeedMembersResponse.php +++ b/src/GeneratedModels/QueryFeedMembersResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $members - * @property string|null $next - * @property string|null $prev - */ class QueryFeedMembersResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of feed members */ + /** @var array|null */ #[ArrayOf(FeedMemberResponse::class)] public ?array $members = null, // List of feed members public ?string $next = null, // Cursor for next page public ?string $prev = null, // Cursor for previous page + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryFeedModerationTemplate.php b/src/GeneratedModels/QueryFeedModerationTemplate.php index 2f9a9c4b..8ffc0358 100644 --- a/src/GeneratedModels/QueryFeedModerationTemplate.php +++ b/src/GeneratedModels/QueryFeedModerationTemplate.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $name - * @property \DateTime $updatedAt - * @property FeedsModerationTemplateConfig|null $config - */ class QueryFeedModerationTemplate extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // When the template was created public ?string $name = null, // Name of the moderation template + public ?FeedsModerationTemplateConfigPayload $config = null, + public ?\DateTime $createdAt = null, // When the template was created public ?\DateTime $updatedAt = null, // When the template was last updated - public ?FeedsModerationTemplateConfig $config = null, ) { } diff --git a/src/GeneratedModels/QueryFeedModerationTemplatesResponse.php b/src/GeneratedModels/QueryFeedModerationTemplatesResponse.php index 3d9b14f8..d889bbdb 100644 --- a/src/GeneratedModels/QueryFeedModerationTemplatesResponse.php +++ b/src/GeneratedModels/QueryFeedModerationTemplatesResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $templates - */ class QueryFeedModerationTemplatesResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of moderation templates */ + /** @var array|null */ #[ArrayOf(QueryFeedModerationTemplate::class)] public ?array $templates = null, // List of moderation templates + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryFeedsRequest.php b/src/GeneratedModels/QueryFeedsRequest.php index 2595d24c..e204e93f 100644 --- a/src/GeneratedModels/QueryFeedsRequest.php +++ b/src/GeneratedModels/QueryFeedsRequest.php @@ -3,27 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property bool|null $watch - * @property array|null $sort - * @property object|null $filter - */ class QueryFeedsRequest extends BaseModel { public function __construct( - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, + public ?object $filter = null, // Filters to apply to the query public ?bool $watch = null, // Whether to subscribe to realtime updates - /** @var array|null Sorting parameters for the query */ + /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, // Sorting parameters for the query - public ?object $filter = null, // Filters to apply to the query + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, ) { } diff --git a/src/GeneratedModels/QueryFeedsResponse.php b/src/GeneratedModels/QueryFeedsResponse.php index ade3c27b..e157f92b 100644 --- a/src/GeneratedModels/QueryFeedsResponse.php +++ b/src/GeneratedModels/QueryFeedsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $feeds - * @property string|null $next - * @property string|null $prev - */ class QueryFeedsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of feeds matching the query */ + /** @var array|null */ #[ArrayOf(FeedResponse::class)] public ?array $feeds = null, // List of feeds matching the query public ?string $next = null, // Cursor for next page public ?string $prev = null, // Cursor for previous page + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryFeedsUsageStatsRequest.php b/src/GeneratedModels/QueryFeedsUsageStatsRequest.php index be9a298d..bd42bde4 100644 --- a/src/GeneratedModels/QueryFeedsUsageStatsRequest.php +++ b/src/GeneratedModels/QueryFeedsUsageStatsRequest.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $from - * @property string|null $to - */ class QueryFeedsUsageStatsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/QueryFeedsUsageStatsResponse.php b/src/GeneratedModels/QueryFeedsUsageStatsResponse.php index af9b1d49..c95ffdc0 100644 --- a/src/GeneratedModels/QueryFeedsUsageStatsResponse.php +++ b/src/GeneratedModels/QueryFeedsUsageStatsResponse.php @@ -3,22 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property DailyMetricStatsResponse $activities - * @property DailyMetricStatsResponse $apiRequests - * @property DailyMetricStatsResponse $follows - * @property DailyMetricStatsResponse $openaiRequests - */ class QueryFeedsUsageStatsResponse extends BaseModel { public function __construct( public ?string $duration = null, public ?DailyMetricStatsResponse $activities = null, - public ?DailyMetricStatsResponse $apiRequests = null, public ?DailyMetricStatsResponse $follows = null, + public ?DailyMetricStatsResponse $apiRequests = null, public ?DailyMetricStatsResponse $openaiRequests = null, ) { } diff --git a/src/GeneratedModels/QueryFollowsRequest.php b/src/GeneratedModels/QueryFollowsRequest.php index d433a4a2..ab728d3c 100644 --- a/src/GeneratedModels/QueryFollowsRequest.php +++ b/src/GeneratedModels/QueryFollowsRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QueryFollowsRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filters to apply to the query + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for the query public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null Sorting parameters for the query */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sorting parameters for the query - public ?object $filter = null, // Filters to apply to the query ) { } diff --git a/src/GeneratedModels/QueryFollowsResponse.php b/src/GeneratedModels/QueryFollowsResponse.php index 64eb381d..00cb58fb 100644 --- a/src/GeneratedModels/QueryFollowsResponse.php +++ b/src/GeneratedModels/QueryFollowsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $follows - * @property string|null $next - * @property string|null $prev - */ class QueryFollowsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of follow relationships matching the query */ + /** @var array|null */ #[ArrayOf(FollowResponse::class)] public ?array $follows = null, // List of follow relationships matching the query public ?string $next = null, // Cursor for next page public ?string $prev = null, // Cursor for previous page + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryFutureChannelBansPayload.php b/src/GeneratedModels/QueryFutureChannelBansPayload.php index 8bbc09d2..66b11e68 100644 --- a/src/GeneratedModels/QueryFutureChannelBansPayload.php +++ b/src/GeneratedModels/QueryFutureChannelBansPayload.php @@ -3,22 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $excludeExpiredBans - * @property int|null $limit - * @property int|null $offset - * @property string|null $targetUserID - * @property string|null $userID - * @property UserRequest|null $user - */ class QueryFutureChannelBansPayload extends BaseModel { public function __construct( - public ?bool $excludeExpiredBans = null, // Whether to exclude expired bans or not public ?int $limit = null, // Number of records to return public ?int $offset = null, // Number of records to offset + public ?bool $excludeExpiredBans = null, // Whether to exclude expired bans or not public ?string $targetUserID = null, // Filter by the target user ID. For server-side requests only. public ?string $userID = null, public ?UserRequest $user = null, diff --git a/src/GeneratedModels/QueryFutureChannelBansResponse.php b/src/GeneratedModels/QueryFutureChannelBansResponse.php index 79c5c445..16394745 100644 --- a/src/GeneratedModels/QueryFutureChannelBansResponse.php +++ b/src/GeneratedModels/QueryFutureChannelBansResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $bans - */ class QueryFutureChannelBansResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null List of found future channel bans */ + /** @var array|null */ #[ArrayOf(FutureChannelBanResponse::class)] public ?array $bans = null, // List of found future channel bans + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryMembersPayload.php b/src/GeneratedModels/QueryMembersPayload.php index 60409abe..33157c13 100644 --- a/src/GeneratedModels/QueryMembersPayload.php +++ b/src/GeneratedModels/QueryMembersPayload.php @@ -5,32 +5,22 @@ namespace GetStream\GeneratedModels; /** * Client request - * - * @property string $type - * @property object $filterConditions - * @property string|null $id - * @property int|null $limit - * @property int|null $offset - * @property string|null $userID - * @property array|null $members - * @property array|null $sort - * @property UserRequest|null $user */ class QueryMembersPayload extends BaseModel { public function __construct( public ?string $type = null, - public ?object $filterConditions = null, public ?string $id = null, - public ?int $limit = null, - public ?int $offset = null, - public ?string $userID = null, /** @var array|null */ #[ArrayOf(ChannelMemberRequest::class)] public ?array $members = null, + public ?object $filterConditions = null, /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, + public ?int $limit = null, + public ?int $offset = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryMembershipLevelsRequest.php b/src/GeneratedModels/QueryMembershipLevelsRequest.php index 4a32f3ee..2558b70c 100644 --- a/src/GeneratedModels/QueryMembershipLevelsRequest.php +++ b/src/GeneratedModels/QueryMembershipLevelsRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QueryMembershipLevelsRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filters to apply to the query + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for the query public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null Sorting parameters for the query */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sorting parameters for the query - public ?object $filter = null, // Filters to apply to the query ) { } diff --git a/src/GeneratedModels/QueryMembershipLevelsResponse.php b/src/GeneratedModels/QueryMembershipLevelsResponse.php index 8e9e665b..99aa4b2a 100644 --- a/src/GeneratedModels/QueryMembershipLevelsResponse.php +++ b/src/GeneratedModels/QueryMembershipLevelsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $membershipLevels - * @property string|null $next - * @property string|null $prev - */ class QueryMembershipLevelsResponse extends BaseModel { public function __construct( - public ?string $duration = null, /** @var array|null */ #[ArrayOf(MembershipLevelResponse::class)] public ?array $membershipLevels = null, public ?string $next = null, // Cursor for next page public ?string $prev = null, // Cursor for previous page + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryMessageFlagsPayload.php b/src/GeneratedModels/QueryMessageFlagsPayload.php index 6ae42134..df53d08e 100644 --- a/src/GeneratedModels/QueryMessageFlagsPayload.php +++ b/src/GeneratedModels/QueryMessageFlagsPayload.php @@ -3,28 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property int|null $offset - * @property bool|null $showDeletedMessages - * @property string|null $userID - * @property array|null $sort - * @property object|null $filterConditions - * @property UserRequest|null $user - */ class QueryMessageFlagsPayload extends BaseModel { public function __construct( + public ?object $filterConditions = null, + public ?bool $showDeletedMessages = null, // Whether to include deleted messages in the results public ?int $limit = null, public ?int $offset = null, - public ?bool $showDeletedMessages = null, // Whether to include deleted messages in the results - public ?string $userID = null, /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, - public ?object $filterConditions = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryMessageFlagsResponse.php b/src/GeneratedModels/QueryMessageFlagsResponse.php index 7639aab6..25047500 100644 --- a/src/GeneratedModels/QueryMessageFlagsResponse.php +++ b/src/GeneratedModels/QueryMessageFlagsResponse.php @@ -5,17 +5,14 @@ namespace GetStream\GeneratedModels; /** * Query message flags response - * - * @property string $duration - * @property array $flags */ class QueryMessageFlagsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null The flags that match the query */ + /** @var array|null */ #[ArrayOf(MessageFlagResponse::class)] public ?array $flags = null, // The flags that match the query + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryMessageHistoryRequest.php b/src/GeneratedModels/QueryMessageHistoryRequest.php index 41ba0bba..f23eb3c4 100644 --- a/src/GeneratedModels/QueryMessageHistoryRequest.php +++ b/src/GeneratedModels/QueryMessageHistoryRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property object $filter - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - */ class QueryMessageHistoryRequest extends BaseModel { public function __construct( public ?object $filter = null, // Filter to apply to the query + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Array of sort parameters public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null Array of sort parameters */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Array of sort parameters ) { } diff --git a/src/GeneratedModels/QueryMessageHistoryResponse.php b/src/GeneratedModels/QueryMessageHistoryResponse.php index b13bd3b4..6d431826 100644 --- a/src/GeneratedModels/QueryMessageHistoryResponse.php +++ b/src/GeneratedModels/QueryMessageHistoryResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $messageHistory - * @property string|null $next - * @property string|null $prev - */ class QueryMessageHistoryResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null Message history entries */ + /** @var array|null */ #[ArrayOf(MessageHistoryEntryResponse::class)] public ?array $messageHistory = null, // Message history entries public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryModerationConfigsRequest.php b/src/GeneratedModels/QueryModerationConfigsRequest.php index 0b5bed73..38904c38 100644 --- a/src/GeneratedModels/QueryModerationConfigsRequest.php +++ b/src/GeneratedModels/QueryModerationConfigsRequest.php @@ -3,28 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property string|null $userID - * @property array|null $sort - * @property object|null $filter - * @property UserRequest|null $user - */ class QueryModerationConfigsRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filter conditions for moderation configs + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for the results public ?int $limit = null, public ?string $next = null, public ?string $prev = null, public ?string $userID = null, - /** @var array|null Sorting parameters for the results */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sorting parameters for the results - public ?object $filter = null, // Filter conditions for moderation configs public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryModerationConfigsResponse.php b/src/GeneratedModels/QueryModerationConfigsResponse.php index feec9db0..587d5288 100644 --- a/src/GeneratedModels/QueryModerationConfigsResponse.php +++ b/src/GeneratedModels/QueryModerationConfigsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $configs - * @property string|null $next - * @property string|null $prev - */ class QueryModerationConfigsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of moderation configurations */ + /** @var array|null */ #[ArrayOf(ConfigResponse::class)] public ?array $configs = null, // List of moderation configurations public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryModerationFlagsRequest.php b/src/GeneratedModels/QueryModerationFlagsRequest.php index 0f30a4d5..9873f519 100644 --- a/src/GeneratedModels/QueryModerationFlagsRequest.php +++ b/src/GeneratedModels/QueryModerationFlagsRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QueryModerationFlagsRequest extends BaseModel { public function __construct( + public ?object $filter = null, + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null */ - #[ArrayOf(SortParam::class)] - public ?array $sort = null, - public ?object $filter = null, ) { } diff --git a/src/GeneratedModels/QueryModerationFlagsResponse.php b/src/GeneratedModels/QueryModerationFlagsResponse.php index a59a3839..50003670 100644 --- a/src/GeneratedModels/QueryModerationFlagsResponse.php +++ b/src/GeneratedModels/QueryModerationFlagsResponse.php @@ -5,21 +5,16 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $flags - * @property string|null $next - * @property string|null $prev */ class QueryModerationFlagsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(ModerationFlagResponse::class)] public ?array $flags = null, public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryModerationLogsRequest.php b/src/GeneratedModels/QueryModerationLogsRequest.php index 32d392af..e086dabe 100644 --- a/src/GeneratedModels/QueryModerationLogsRequest.php +++ b/src/GeneratedModels/QueryModerationLogsRequest.php @@ -3,28 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property string|null $userID - * @property array|null $sort - * @property object|null $filter - * @property UserRequest|null $user - */ class QueryModerationLogsRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filter conditions for moderation logs + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for the results public ?int $limit = null, public ?string $next = null, public ?string $prev = null, public ?string $userID = null, - /** @var array|null Sorting parameters for the results */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sorting parameters for the results - public ?object $filter = null, // Filter conditions for moderation logs public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryModerationLogsResponse.php b/src/GeneratedModels/QueryModerationLogsResponse.php index 2bc0d39f..aa46148d 100644 --- a/src/GeneratedModels/QueryModerationLogsResponse.php +++ b/src/GeneratedModels/QueryModerationLogsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $logs - * @property string|null $next - * @property string|null $prev - */ class QueryModerationLogsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of moderation action logs */ + /** @var array|null */ #[ArrayOf(ActionLogResponse::class)] public ?array $logs = null, // List of moderation action logs public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryModerationRulesRequest.php b/src/GeneratedModels/QueryModerationRulesRequest.php index b678f2fb..889cebcc 100644 --- a/src/GeneratedModels/QueryModerationRulesRequest.php +++ b/src/GeneratedModels/QueryModerationRulesRequest.php @@ -3,28 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property string|null $userID - * @property array|null $sort - * @property object|null $filter - * @property UserRequest|null $user - */ class QueryModerationRulesRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filter conditions for moderation rules + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for the results public ?int $limit = null, public ?string $next = null, public ?string $prev = null, public ?string $userID = null, - /** @var array|null Sorting parameters for the results */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sorting parameters for the results - public ?object $filter = null, // Filter conditions for moderation rules public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryModerationRulesResponse.php b/src/GeneratedModels/QueryModerationRulesResponse.php index 16ceb51b..3d69a9f0 100644 --- a/src/GeneratedModels/QueryModerationRulesResponse.php +++ b/src/GeneratedModels/QueryModerationRulesResponse.php @@ -3,25 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $rules - * @property array $defaultLlmLabels - * @property string|null $next - * @property string|null $prev - */ class QueryModerationRulesResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of moderation rules */ + /** @var array|null */ #[ArrayOf(ModerationRuleV2Response::class)] public ?array $rules = null, // List of moderation rules public ?array $defaultLlmLabels = null, // Default LLM label descriptions + public ?array $keyframeLabels = null, // Available harm labels for keyframe rules + public ?array $closedCaptionLabels = null, // Available harm labels for closed caption rules public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QueryPinnedActivitiesRequest.php b/src/GeneratedModels/QueryPinnedActivitiesRequest.php new file mode 100644 index 00000000..19ff8f43 --- /dev/null +++ b/src/GeneratedModels/QueryPinnedActivitiesRequest.php @@ -0,0 +1,21 @@ +|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for the query + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/QueryPinnedActivitiesResponse.php b/src/GeneratedModels/QueryPinnedActivitiesResponse.php new file mode 100644 index 00000000..bec85e96 --- /dev/null +++ b/src/GeneratedModels/QueryPinnedActivitiesResponse.php @@ -0,0 +1,20 @@ +|null */ + #[ArrayOf(ActivityPinResponse::class)] + public ?array $pinnedActivities = null, // List of pinned activities matching the query + public ?string $next = null, // Cursor for next page + public ?string $prev = null, // Cursor for previous page + public ?string $duration = null, + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/QueryPollVotesRequest.php b/src/GeneratedModels/QueryPollVotesRequest.php index 3eb63fa2..e6df93a6 100644 --- a/src/GeneratedModels/QueryPollVotesRequest.php +++ b/src/GeneratedModels/QueryPollVotesRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QueryPollVotesRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filter to apply to the query + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Array of sort parameters public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null Array of sort parameters */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Array of sort parameters - public ?object $filter = null, // Filter to apply to the query ) { } diff --git a/src/GeneratedModels/QueryPollsRequest.php b/src/GeneratedModels/QueryPollsRequest.php index ef2503e9..28f65eb4 100644 --- a/src/GeneratedModels/QueryPollsRequest.php +++ b/src/GeneratedModels/QueryPollsRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QueryPollsRequest extends BaseModel { public function __construct( + public ?object $filter = null, // Filter to apply to the query + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Array of sort parameters public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null Array of sort parameters */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Array of sort parameters - public ?object $filter = null, // Filter to apply to the query ) { } diff --git a/src/GeneratedModels/QueryPollsResponse.php b/src/GeneratedModels/QueryPollsResponse.php index 218fe12e..db1b0952 100644 --- a/src/GeneratedModels/QueryPollsResponse.php +++ b/src/GeneratedModels/QueryPollsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $polls - * @property string|null $next - * @property string|null $prev - */ class QueryPollsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null Polls data returned by the query */ + /** @var array|null */ #[ArrayOf(PollResponseData::class)] public ?array $polls = null, // Polls data returned by the query public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryReactionsRequest.php b/src/GeneratedModels/QueryReactionsRequest.php index ce87ab09..a340ab80 100644 --- a/src/GeneratedModels/QueryReactionsRequest.php +++ b/src/GeneratedModels/QueryReactionsRequest.php @@ -3,29 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property string|null $userID - * @property array|null $sort - * @property object|null $filter - * @property UserRequest|null $user - */ class QueryReactionsRequest extends BaseModel { public function __construct( - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, - public ?string $userID = null, + public ?object $filter = null, /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, - public ?object $filter = null, + public ?string $userID = null, public ?UserRequest $user = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, ) { } diff --git a/src/GeneratedModels/QueryReactionsResponse.php b/src/GeneratedModels/QueryReactionsResponse.php index 3d7cdf26..9cef97bf 100644 --- a/src/GeneratedModels/QueryReactionsResponse.php +++ b/src/GeneratedModels/QueryReactionsResponse.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $reactions - * @property string|null $next - * @property string|null $prev */ class QueryReactionsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(ReactionResponse::class)] public ?array $reactions = null, + public ?string $duration = null, // Duration of the request in milliseconds public ?string $next = null, public ?string $prev = null, ) { diff --git a/src/GeneratedModels/QueryRemindersRequest.php b/src/GeneratedModels/QueryRemindersRequest.php index a8ec468d..80246b61 100644 --- a/src/GeneratedModels/QueryRemindersRequest.php +++ b/src/GeneratedModels/QueryRemindersRequest.php @@ -3,29 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property string|null $userID - * @property array|null $sort - * @property object|null $filter - * @property UserRequest|null $user - */ class QueryRemindersRequest extends BaseModel { public function __construct( - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, - public ?string $userID = null, - /** @var array|null Array of sort parameters */ + public ?object $filter = null, // Filter to apply to the query + /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, // Array of sort parameters - public ?object $filter = null, // Filter to apply to the query + public ?string $userID = null, public ?UserRequest $user = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, ) { } diff --git a/src/GeneratedModels/QueryRemindersResponse.php b/src/GeneratedModels/QueryRemindersResponse.php index dcb84b4b..0cb50ed0 100644 --- a/src/GeneratedModels/QueryRemindersResponse.php +++ b/src/GeneratedModels/QueryRemindersResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $reminders - * @property string|null $next - * @property string|null $prev - */ class QueryRemindersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null MessageReminders data returned by the query */ + /** @var array|null */ #[ArrayOf(ReminderResponseData::class)] public ?array $reminders = null, // MessageReminders data returned by the query public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryReviewQueueRequest.php b/src/GeneratedModels/QueryReviewQueueRequest.php index 6a3bd716..06c01ee6 100644 --- a/src/GeneratedModels/QueryReviewQueueRequest.php +++ b/src/GeneratedModels/QueryReviewQueueRequest.php @@ -3,36 +3,21 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property int|null $lockCount - * @property int|null $lockDuration - * @property bool|null $lockItems - * @property string|null $next - * @property string|null $prev - * @property bool|null $statsOnly - * @property string|null $userID - * @property array|null $sort - * @property object|null $filter - * @property UserRequest|null $user - */ class QueryReviewQueueRequest extends BaseModel { public function __construct( - public ?int $limit = null, - public ?int $lockCount = null, // Number of items to lock (1-25) - public ?int $lockDuration = null, // Duration for which items should be locked + public ?object $filter = null, // Filter conditions for review queue items + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sorting parameters for the results public ?bool $lockItems = null, // Whether to lock items for review (true), unlock items (false), or just fetch (nil) + public ?int $lockDuration = null, // Duration for which items should be locked + public ?int $lockCount = null, // Number of items to lock (1-25) + public ?bool $statsOnly = null, // Whether to return only statistics + public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - public ?bool $statsOnly = null, // Whether to return only statistics public ?string $userID = null, - /** @var array|null Sorting parameters for the results */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sorting parameters for the results - public ?object $filter = null, // Filter conditions for review queue items public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryReviewQueueResponse.php b/src/GeneratedModels/QueryReviewQueueResponse.php index 0f6a5d6e..2339c82f 100644 --- a/src/GeneratedModels/QueryReviewQueueResponse.php +++ b/src/GeneratedModels/QueryReviewQueueResponse.php @@ -3,29 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $items - * @property array $actionConfig - * @property object $stats - * @property string|null $next - * @property string|null $prev - * @property FilterConfigResponse|null $filterConfig - */ class QueryReviewQueueResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of review queue items */ + /** @var array|null */ #[ArrayOf(ReviewQueueItemResponse::class)] public ?array $items = null, // List of review queue items public ?array $actionConfig = null, // Configuration for moderation actions + public ?FilterConfigResponse $filterConfig = null, public ?object $stats = null, // Statistics about the review queue public ?string $next = null, public ?string $prev = null, - public ?FilterConfigResponse $filterConfig = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/QuerySegmentTargetsRequest.php b/src/GeneratedModels/QuerySegmentTargetsRequest.php index 4dcea617..e3fdc87a 100644 --- a/src/GeneratedModels/QuerySegmentTargetsRequest.php +++ b/src/GeneratedModels/QuerySegmentTargetsRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filter - */ class QuerySegmentTargetsRequest extends BaseModel { public function __construct( public ?int $limit = null, // Limit public ?string $next = null, // Next public ?string $prev = null, // Prev + public ?object $filter = null, /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, - public ?object $filter = null, ) { } diff --git a/src/GeneratedModels/QuerySegmentTargetsResponse.php b/src/GeneratedModels/QuerySegmentTargetsResponse.php index 27d647f3..af72ef16 100644 --- a/src/GeneratedModels/QuerySegmentTargetsResponse.php +++ b/src/GeneratedModels/QuerySegmentTargetsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $targets - * @property string|null $next - * @property string|null $prev - */ class QuerySegmentTargetsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null Targets */ + /** @var array|null */ #[ArrayOf(SegmentTargetResponse::class)] public ?array $targets = null, // Targets public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QuerySegmentsRequest.php b/src/GeneratedModels/QuerySegmentsRequest.php index 64d2daf8..68aa95e3 100644 --- a/src/GeneratedModels/QuerySegmentsRequest.php +++ b/src/GeneratedModels/QuerySegmentsRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property object $filter - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - */ class QuerySegmentsRequest extends BaseModel { public function __construct( public ?object $filter = null, // Filter to apply to the query + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Array of sort parameters public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null Array of sort parameters */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Array of sort parameters ) { } diff --git a/src/GeneratedModels/QuerySegmentsResponse.php b/src/GeneratedModels/QuerySegmentsResponse.php index 5d2f55de..24130b77 100644 --- a/src/GeneratedModels/QuerySegmentsResponse.php +++ b/src/GeneratedModels/QuerySegmentsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $segments - * @property string|null $next - * @property string|null $prev - */ class QuerySegmentsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null Segments */ + /** @var array|null */ #[ArrayOf(SegmentResponse::class)] public ?array $segments = null, // Segments public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryTeamUsageStatsRequest.php b/src/GeneratedModels/QueryTeamUsageStatsRequest.php new file mode 100644 index 00000000..03a4a37c --- /dev/null +++ b/src/GeneratedModels/QueryTeamUsageStatsRequest.php @@ -0,0 +1,22 @@ +|null */ + #[ArrayOf(TeamUsageStats::class)] + public ?array $teams = null, // Array of team usage statistics + public ?string $next = null, // Cursor for pagination to fetch next page + public ?string $duration = null, // Duration of the request in milliseconds + ) { + } + + // BaseModel automatically handles jsonSerialize(), toArray(), and fromJson() using constructor types! + // Use #[JsonKey('user_id')] to override field names if needed. +} diff --git a/src/GeneratedModels/QueryThreadsRequest.php b/src/GeneratedModels/QueryThreadsRequest.php index 942fd55a..9ceb87be 100644 --- a/src/GeneratedModels/QueryThreadsRequest.php +++ b/src/GeneratedModels/QueryThreadsRequest.php @@ -3,34 +3,20 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property int|null $memberLimit - * @property string|null $next - * @property int|null $participantLimit - * @property string|null $prev - * @property int|null $replyLimit - * @property string|null $userID - * @property array|null $sort - * @property object|null $filter - * @property UserRequest|null $user - */ class QueryThreadsRequest extends BaseModel { public function __construct( - public ?int $limit = null, + public ?int $replyLimit = null, // Limit the number of replies returned per each thread + public ?int $participantLimit = null, // Limit the number of participants returned per each thread public ?int $memberLimit = null, + public ?object $filter = null, // Filter conditions to apply to threads + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, // Sort conditions to apply to threads + public ?int $limit = null, public ?string $next = null, - public ?int $participantLimit = null, // Limit the number of participants returned per each thread public ?string $prev = null, - public ?int $replyLimit = null, // Limit the number of replies returned per each thread public ?string $userID = null, - /** @var array|null Sort conditions to apply to threads */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, // Sort conditions to apply to threads - public ?object $filter = null, // Filter conditions to apply to threads public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryThreadsResponse.php b/src/GeneratedModels/QueryThreadsResponse.php index 36ab8dcf..9f1350c7 100644 --- a/src/GeneratedModels/QueryThreadsResponse.php +++ b/src/GeneratedModels/QueryThreadsResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $threads - * @property string|null $next - * @property string|null $prev - */ class QueryThreadsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null List of enriched thread states */ + /** @var array|null */ #[ArrayOf(ThreadStateResponse::class)] public ?array $threads = null, // List of enriched thread states public ?string $next = null, public ?string $prev = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/QueryUserFeedbackRequest.php b/src/GeneratedModels/QueryUserFeedbackRequest.php index 6eb5a044..af76b42a 100644 --- a/src/GeneratedModels/QueryUserFeedbackRequest.php +++ b/src/GeneratedModels/QueryUserFeedbackRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $sort - * @property object|null $filterConditions - */ class QueryUserFeedbackRequest extends BaseModel { public function __construct( - public ?int $limit = null, - public ?string $next = null, - public ?string $prev = null, + public ?object $filterConditions = null, /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, - public ?object $filterConditions = null, + public ?int $limit = null, + public ?string $next = null, + public ?string $prev = null, ) { } diff --git a/src/GeneratedModels/QueryUserFeedbackResponse.php b/src/GeneratedModels/QueryUserFeedbackResponse.php index 67a02e3e..df956fdb 100644 --- a/src/GeneratedModels/QueryUserFeedbackResponse.php +++ b/src/GeneratedModels/QueryUserFeedbackResponse.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $userFeedback - * @property string|null $next - * @property string|null $prev */ class QueryUserFeedbackResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(UserFeedbackResponse::class)] public ?array $userFeedback = null, + public ?string $duration = null, // Duration of the request in milliseconds public ?string $next = null, public ?string $prev = null, ) { diff --git a/src/GeneratedModels/QueryUsersPayload.php b/src/GeneratedModels/QueryUsersPayload.php index 0b324789..f9a11f0a 100644 --- a/src/GeneratedModels/QueryUsersPayload.php +++ b/src/GeneratedModels/QueryUsersPayload.php @@ -4,29 +4,20 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property object $filterConditions - * @property bool|null $includeDeactivatedUsers - * @property int|null $limit - * @property int|null $offset - * @property bool|null $presence - * @property string|null $userID - * @property array|null $sort - * @property UserRequest|null $user + * Client request */ class QueryUsersPayload extends BaseModel { public function __construct( public ?object $filterConditions = null, + /** @var array|null */ + #[ArrayOf(SortParamRequest::class)] + public ?array $sort = null, + public ?bool $presence = null, public ?bool $includeDeactivatedUsers = null, public ?int $limit = null, public ?int $offset = null, - public ?bool $presence = null, public ?string $userID = null, - /** @var array|null */ - #[ArrayOf(SortParamRequest::class)] - public ?array $sort = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/QueryUsersResponse.php b/src/GeneratedModels/QueryUsersResponse.php index 282015c3..ae220c22 100644 --- a/src/GeneratedModels/QueryUsersResponse.php +++ b/src/GeneratedModels/QueryUsersResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $users - */ class QueryUsersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null Array of users as result of filters applied. */ + /** @var array|null */ #[ArrayOf(FullUserResponse::class)] public ?array $users = null, // Array of users as result of filters applied. + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/RTMPBroadcastRequest.php b/src/GeneratedModels/RTMPBroadcastRequest.php index f486b2df..42792992 100644 --- a/src/GeneratedModels/RTMPBroadcastRequest.php +++ b/src/GeneratedModels/RTMPBroadcastRequest.php @@ -5,20 +5,14 @@ namespace GetStream\GeneratedModels; /** * RTMPBroadcastRequest is the payload for starting an RTMP broadcast. - * - * @property string $name - * @property string $streamUrl - * @property string|null $quality - * @property string|null $streamKey - * @property LayoutSettingsRequest|null $layout */ class RTMPBroadcastRequest extends BaseModel { public function __construct( public ?string $name = null, // Name identifier for RTMP broadcast, must be unique in call public ?string $streamUrl = null, // URL for the RTMP server to send the call to - public ?string $quality = null, // If provided, will override the call's RTMP settings quality public ?string $streamKey = null, // If provided, will be appended at the end of stream_url + public ?string $quality = null, // If provided, will override the call's RTMP settings quality. One of: 360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560 public ?LayoutSettingsRequest $layout = null, ) { } diff --git a/src/GeneratedModels/RTMPIngress.php b/src/GeneratedModels/RTMPIngress.php index 0bf23365..c5225124 100644 --- a/src/GeneratedModels/RTMPIngress.php +++ b/src/GeneratedModels/RTMPIngress.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * RTMP input settings - * - * @property string $address */ class RTMPIngress extends BaseModel { diff --git a/src/GeneratedModels/RTMPLocation.php b/src/GeneratedModels/RTMPLocation.php index dcd413b1..992a8f8b 100644 --- a/src/GeneratedModels/RTMPLocation.php +++ b/src/GeneratedModels/RTMPLocation.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $name - * @property string $streamKey - * @property string $streamUrl - */ class RTMPLocation extends BaseModel { public function __construct( public ?string $name = null, - public ?string $streamKey = null, public ?string $streamUrl = null, + public ?string $streamKey = null, ) { } diff --git a/src/GeneratedModels/RTMPSettings.php b/src/GeneratedModels/RTMPSettings.php index 3133788e..cf8de56f 100644 --- a/src/GeneratedModels/RTMPSettings.php +++ b/src/GeneratedModels/RTMPSettings.php @@ -3,14 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property string|null $qualityName - * @property LayoutSettings|null $layout - * @property RTMPLocation|null $location - */ class RTMPSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/RTMPSettingsRequest.php b/src/GeneratedModels/RTMPSettingsRequest.php index 2749222f..8ca2891b 100644 --- a/src/GeneratedModels/RTMPSettingsRequest.php +++ b/src/GeneratedModels/RTMPSettingsRequest.php @@ -3,18 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enabled - * @property string|null $quality - * @property LayoutSettingsRequest|null $layout - */ class RTMPSettingsRequest extends BaseModel { public function __construct( - public ?bool $enabled = null, - public ?string $quality = null, // Resolution to set for the RTMP stream + public ?bool $enabled = null, // Whether RTMP broadcasting is enabled + public ?string $quality = null, // Resolution to set for the RTMP stream. One of: 360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560 public ?LayoutSettingsRequest $layout = null, ) { } diff --git a/src/GeneratedModels/RTMPSettingsResponse.php b/src/GeneratedModels/RTMPSettingsResponse.php index ff4ae475..e18bc132 100644 --- a/src/GeneratedModels/RTMPSettingsResponse.php +++ b/src/GeneratedModels/RTMPSettingsResponse.php @@ -5,10 +5,6 @@ namespace GetStream\GeneratedModels; /** * RTMPSettingsResponse is the payload for RTMP settings - * - * @property bool $enabled - * @property string $quality - * @property LayoutSettingsResponse $layout */ class RTMPSettingsResponse extends BaseModel { diff --git a/src/GeneratedModels/RankingConfig.php b/src/GeneratedModels/RankingConfig.php index ff83b394..5ab8a6f2 100644 --- a/src/GeneratedModels/RankingConfig.php +++ b/src/GeneratedModels/RankingConfig.php @@ -3,20 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $type - * @property string|null $score - * @property object|null $defaults - * @property array|null $functions - */ class RankingConfig extends BaseModel { public function __construct( - public ?string $type = null, // Type of ranking algorithm. Required. Must be one of: expression, interest + public ?string $type = null, // Type of ranking algorithm. Required. One of: expression, interest public ?string $score = null, // Scoring formula. Required when type is 'expression' or 'interest' public ?object $defaults = null, // Default values for ranking + /** @var array|null */ + #[MapOf(DecayFunctionConfig::class)] public ?array $functions = null, // Decay functions configuration ) { } diff --git a/src/GeneratedModels/RawRecordSettings.php b/src/GeneratedModels/RawRecordSettings.php index 9deac190..8763b549 100644 --- a/src/GeneratedModels/RawRecordSettings.php +++ b/src/GeneratedModels/RawRecordSettings.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $mode - */ class RawRecordSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/RawRecordingResponse.php b/src/GeneratedModels/RawRecordingResponse.php index ab1f4e9e..ebe161c0 100644 --- a/src/GeneratedModels/RawRecordingResponse.php +++ b/src/GeneratedModels/RawRecordingResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $status - */ class RawRecordingResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/RawRecordingSettingsRequest.php b/src/GeneratedModels/RawRecordingSettingsRequest.php index 70295504..d9265572 100644 --- a/src/GeneratedModels/RawRecordingSettingsRequest.php +++ b/src/GeneratedModels/RawRecordingSettingsRequest.php @@ -3,15 +3,10 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $mode - */ class RawRecordingSettingsRequest extends BaseModel { public function __construct( - public ?string $mode = null, + public ?string $mode = null, // Recording mode. One of: available, disabled, auto-on ) { } diff --git a/src/GeneratedModels/RawRecordingSettingsResponse.php b/src/GeneratedModels/RawRecordingSettingsResponse.php index 8e3c3b72..5cf0ef7e 100644 --- a/src/GeneratedModels/RawRecordingSettingsResponse.php +++ b/src/GeneratedModels/RawRecordingSettingsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $mode - */ class RawRecordingSettingsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/Reaction.php b/src/GeneratedModels/Reaction.php index 6b8b2f0d..82753b6f 100644 --- a/src/GeneratedModels/Reaction.php +++ b/src/GeneratedModels/Reaction.php @@ -3,29 +3,26 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $messageID - * @property int $score - * @property string $type - * @property \DateTime $updatedAt - * @property object $custom - * @property string|null $userID - * @property User|null $user - */ class Reaction extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $messageID = null, - public ?int $score = null, - public ?string $type = null, - public ?\DateTime $updatedAt = null, - public ?object $custom = null, + public ?string $id = null, + public ?string $kind = null, + public ?string $activityID = null, public ?string $userID = null, + public ?object $data = null, + public ?array $targetFeeds = null, + public ?object $targetFeedsExtraData = null, + public ?string $parent = null, public ?User $user = null, + public ?array $latestChildren = null, + public ?array $ownChildren = null, + public ?object $childrenCounts = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, + public ?\DateTime $deletedAt = null, + public ?int $score = null, + public ?object $moderation = null, ) { } diff --git a/src/GeneratedModels/ReactionDeletedEvent.php b/src/GeneratedModels/ReactionDeletedEvent.php index da695b67..c2b62fb3 100644 --- a/src/GeneratedModels/ReactionDeletedEvent.php +++ b/src/GeneratedModels/ReactionDeletedEvent.php @@ -4,34 +4,30 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property string|null $team - * @property array|null $threadParticipants - * @property Message|null $message - * @property Reaction|null $reaction - * @property User|null $user + * Emitted when a reaction is deleted from a message. */ class ReactionDeletedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?string $team = null, - /** @var array|null */ - #[ArrayOf(User::class)] - public ?array $threadParticipants = null, - public ?Message $message = null, - public ?Reaction $reaction = null, - public ?User $user = null, + public ?ReactionResponse $reaction = null, + public ?string $messageID = null, + public ?MessageResponse $message = null, + /** @var array|null */ + #[ArrayOf(UserResponseCommonFields::class)] + public ?array $threadParticipants = null, // The participants of the thread + public ?UserResponseCommonFields $user = null, + public ?string $type = null, // The type of event: "reaction.deleted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel containing the message + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, // The number of messages in the channel + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel containing the message + public ?string $channelID = null, // The ID of the channel containing the message + public ?ChannelResponse $channel = null, ) { } diff --git a/src/GeneratedModels/ReactionGroupResponse.php b/src/GeneratedModels/ReactionGroupResponse.php index 0d7169f3..4e82620f 100644 --- a/src/GeneratedModels/ReactionGroupResponse.php +++ b/src/GeneratedModels/ReactionGroupResponse.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * ReactionGroupResponse contains all information about a reaction of the same type. - * - * @property int $count - * @property \DateTime $firstReactionAt - * @property \DateTime $lastReactionAt - * @property int $sumScores */ class ReactionGroupResponse extends BaseModel { public function __construct( public ?int $count = null, // Count is the number of reactions of this type. + public ?int $sumScores = null, // SumScores is the sum of all scores of reactions of this type. Medium allows you to clap articles more than once and shows the sum of all claps from all users. For example, you can send `clap` x5 using `score: 5`. public ?\DateTime $firstReactionAt = null, // FirstReactionAt is the time of the first reaction of this type. This is the same also if all reaction of this type are deleted, because if someone will react again with the same type, will be preserved the sorting. public ?\DateTime $lastReactionAt = null, // LastReactionAt is the time of the last reaction of this type. - public ?int $sumScores = null, // SumScores is the sum of all scores of reactions of this type. Medium allows you to clap articles more than once and shows the sum of all claps from all users. For example, you can send `clap` x5 using `score: 5`. ) { } diff --git a/src/GeneratedModels/ReactionNewEvent.php b/src/GeneratedModels/ReactionNewEvent.php index 1268d83a..42b04b99 100644 --- a/src/GeneratedModels/ReactionNewEvent.php +++ b/src/GeneratedModels/ReactionNewEvent.php @@ -4,34 +4,30 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property string|null $team - * @property array|null $threadParticipants - * @property Message|null $message - * @property Reaction|null $reaction - * @property User|null $user + * Emitted when a new reaction is added to a message. */ class ReactionNewEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?string $team = null, - /** @var array|null */ - #[ArrayOf(User::class)] - public ?array $threadParticipants = null, - public ?Message $message = null, - public ?Reaction $reaction = null, - public ?User $user = null, + public ?ReactionResponse $reaction = null, + public ?string $messageID = null, + public ?MessageResponse $message = null, + /** @var array|null */ + #[ArrayOf(UserResponseCommonFields::class)] + public ?array $threadParticipants = null, // The participants of the thread + public ?UserResponseCommonFields $user = null, + public ?string $type = null, // The type of event: "reaction.new" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel containing the message + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, // The number of messages in the channel + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel containing the message + public ?string $channelID = null, // The ID of the channel containing the message + public ?ChannelResponse $channel = null, ) { } diff --git a/src/GeneratedModels/ReactionRequest.php b/src/GeneratedModels/ReactionRequest.php index a1bab223..47714459 100644 --- a/src/GeneratedModels/ReactionRequest.php +++ b/src/GeneratedModels/ReactionRequest.php @@ -5,24 +5,16 @@ namespace GetStream\GeneratedModels; /** * Represents user reaction to a message - * - * @property string $type - * @property \DateTime|null $createdAt - * @property int|null $score - * @property \DateTime|null $updatedAt - * @property string|null $userID - * @property object|null $custom - * @property UserRequest|null $user */ class ReactionRequest extends BaseModel { public function __construct( public ?string $type = null, // The type of reaction (e.g. 'like', 'laugh', 'wow') - public ?\DateTime $createdAt = null, // Date/time of creation public ?int $score = null, // Reaction score. If not specified reaction has score of 1 + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $updatedAt = null, // Date/time of the last update - public ?string $userID = null, public ?object $custom = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/ReactionResponse.php b/src/GeneratedModels/ReactionResponse.php index 6650d0d0..cc9a5945 100644 --- a/src/GeneratedModels/ReactionResponse.php +++ b/src/GeneratedModels/ReactionResponse.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $messageID - * @property int $score - * @property string $type - * @property \DateTime $updatedAt - * @property string $userID - * @property object $custom - * @property UserResponse $user - */ class ReactionResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation public ?string $messageID = null, // Message ID - public ?int $score = null, // Score of the reaction + public ?string $userID = null, // User ID + public ?UserResponse $user = null, public ?string $type = null, // Type of reaction + public ?int $score = null, // Score of the reaction + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $updatedAt = null, // Date/time of the last update - public ?string $userID = null, // User ID public ?object $custom = null, // Custom data for this object - public ?UserResponse $user = null, ) { } diff --git a/src/GeneratedModels/ReactionUpdatedEvent.php b/src/GeneratedModels/ReactionUpdatedEvent.php index 21a9681d..c916bfe6 100644 --- a/src/GeneratedModels/ReactionUpdatedEvent.php +++ b/src/GeneratedModels/ReactionUpdatedEvent.php @@ -4,30 +4,27 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property Message $message - * @property Reaction $reaction - * @property string $type - * @property string|null $team - * @property User|null $user + * Emitted when a reaction is updated on a message. */ class ReactionUpdatedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?Message $message = null, - public ?Reaction $reaction = null, - public ?string $type = null, - public ?string $team = null, - public ?User $user = null, + public ?ReactionResponse $reaction = null, + public ?string $messageID = null, + public ?MessageResponse $message = null, + public ?UserResponseCommonFields $user = null, + public ?string $type = null, // The type of event: "reaction.updated" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel containing the message + public ?string $team = null, // The team ID + public ?int $channelMemberCount = null, // The number of members in the channel + public ?int $channelMessageCount = null, // The number of messages in the channel + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel containing the message + public ?string $channelID = null, // The ID of the channel containing the message + public ?ChannelResponse $channel = null, ) { } diff --git a/src/GeneratedModels/ReactivateUserRequest.php b/src/GeneratedModels/ReactivateUserRequest.php index 10d57299..0ab986e6 100644 --- a/src/GeneratedModels/ReactivateUserRequest.php +++ b/src/GeneratedModels/ReactivateUserRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $createdByID - * @property string|null $name - * @property bool|null $restoreMessages - */ class ReactivateUserRequest extends BaseModel { public function __construct( - public ?string $createdByID = null, // ID of the user who's reactivating the user - public ?string $name = null, // Set this field to put new name for the user public ?bool $restoreMessages = null, // Restore previously deleted messages + public ?string $name = null, // Set this field to put new name for the user + public ?string $createdByID = null, // ID of the user who's reactivating the user ) { } diff --git a/src/GeneratedModels/ReactivateUserResponse.php b/src/GeneratedModels/ReactivateUserResponse.php index b6d7a7c0..6309cbe3 100644 --- a/src/GeneratedModels/ReactivateUserResponse.php +++ b/src/GeneratedModels/ReactivateUserResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property UserResponse|null $user - */ class ReactivateUserResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?UserResponse $user = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ReactivateUsersRequest.php b/src/GeneratedModels/ReactivateUsersRequest.php index 151c9915..1f15e7cc 100644 --- a/src/GeneratedModels/ReactivateUsersRequest.php +++ b/src/GeneratedModels/ReactivateUsersRequest.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * Reactivate users in batches - * - * @property array $userIds - * @property string|null $createdByID - * @property bool|null $restoreChannels - * @property bool|null $restoreMessages */ class ReactivateUsersRequest extends BaseModel { public function __construct( public ?array $userIds = null, // User IDs to reactivate + public ?bool $restoreMessages = null, // Restore previously deleted messages public ?string $createdByID = null, // ID of the user who's reactivating the users public ?bool $restoreChannels = null, - public ?bool $restoreMessages = null, // Restore previously deleted messages ) { } diff --git a/src/GeneratedModels/ReactivateUsersResponse.php b/src/GeneratedModels/ReactivateUsersResponse.php index ca309942..e5c49235 100644 --- a/src/GeneratedModels/ReactivateUsersResponse.php +++ b/src/GeneratedModels/ReactivateUsersResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property string $taskID */ class ReactivateUsersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?string $taskID = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/ReadCollectionsResponse.php b/src/GeneratedModels/ReadCollectionsResponse.php index 5cf8e827..98c0277d 100644 --- a/src/GeneratedModels/ReadCollectionsResponse.php +++ b/src/GeneratedModels/ReadCollectionsResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $collections - */ class ReadCollectionsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of collections matching the query */ + /** @var array|null */ #[ArrayOf(CollectionResponse::class)] public ?array $collections = null, // List of collections matching the query + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ReadReceiptsResponse.php b/src/GeneratedModels/ReadReceiptsResponse.php index d2a03fd5..29eb5c23 100644 --- a/src/GeneratedModels/ReadReceiptsResponse.php +++ b/src/GeneratedModels/ReadReceiptsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enabled - */ class ReadReceiptsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ReadStateResponse.php b/src/GeneratedModels/ReadStateResponse.php index c349057f..122959d8 100644 --- a/src/GeneratedModels/ReadStateResponse.php +++ b/src/GeneratedModels/ReadStateResponse.php @@ -3,25 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $lastRead - * @property int $unreadMessages - * @property UserResponse $user - * @property \DateTime|null $lastDeliveredAt - * @property string|null $lastDeliveredMessageID - * @property string|null $lastReadMessageID - */ class ReadStateResponse extends BaseModel { public function __construct( + public ?UserResponse $user = null, public ?\DateTime $lastRead = null, public ?int $unreadMessages = null, - public ?UserResponse $user = null, + public ?string $lastReadMessageID = null, public ?\DateTime $lastDeliveredAt = null, public ?string $lastDeliveredMessageID = null, - public ?string $lastReadMessageID = null, ) { } diff --git a/src/GeneratedModels/RecordSettings.php b/src/GeneratedModels/RecordSettings.php index e8360823..a4e97c14 100644 --- a/src/GeneratedModels/RecordSettings.php +++ b/src/GeneratedModels/RecordSettings.php @@ -3,19 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $mode - * @property bool|null $audioOnly - * @property string|null $quality - * @property LayoutSettings|null $layout - */ class RecordSettings extends BaseModel { public function __construct( - public ?string $mode = null, public ?bool $audioOnly = null, + public ?string $mode = null, public ?string $quality = null, public ?LayoutSettings $layout = null, ) { diff --git a/src/GeneratedModels/RecordSettingsRequest.php b/src/GeneratedModels/RecordSettingsRequest.php index c2f34d0a..327b86b2 100644 --- a/src/GeneratedModels/RecordSettingsRequest.php +++ b/src/GeneratedModels/RecordSettingsRequest.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $mode - * @property bool|null $audioOnly - * @property string|null $quality - * @property LayoutSettingsRequest|null $layout - */ class RecordSettingsRequest extends BaseModel { public function __construct( - public ?string $mode = null, - public ?bool $audioOnly = null, - public ?string $quality = null, + public ?bool $audioOnly = null, // Whether to record audio only + public ?string $mode = null, // Recording mode. One of: available, disabled, auto-on + public ?string $quality = null, // Recording quality. One of: 360p, 480p, 720p, 1080p, 1440p, portrait-360x640, portrait-480x854, portrait-720x1280, portrait-1080x1920, portrait-1440x2560 public ?LayoutSettingsRequest $layout = null, ) { } diff --git a/src/GeneratedModels/RecordSettingsResponse.php b/src/GeneratedModels/RecordSettingsResponse.php index 9bcf97e0..9bfa3b7e 100644 --- a/src/GeneratedModels/RecordSettingsResponse.php +++ b/src/GeneratedModels/RecordSettingsResponse.php @@ -5,11 +5,6 @@ namespace GetStream\GeneratedModels; /** * RecordSettings is the payload for recording settings - * - * @property bool $audioOnly - * @property string $mode - * @property string $quality - * @property LayoutSettingsResponse $layout */ class RecordSettingsResponse extends BaseModel { diff --git a/src/GeneratedModels/RejectAppealRequestPayload.php b/src/GeneratedModels/RejectAppealRequestPayload.php new file mode 100644 index 00000000..d76a7fe3 --- /dev/null +++ b/src/GeneratedModels/RejectAppealRequestPayload.php @@ -0,0 +1,18 @@ +|null $flags - * @property ActionLogResponse|null $action - * @property ReviewQueueItemResponse|null $reviewQueueItem */ class ReviewQueueItemNewEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?object $custom = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, - /** @var array|null The flags associated with this review queue item */ + public ?object $custom = null, + public ?ReviewQueueItemResponse $reviewQueueItem = null, + /** @var array|null */ #[ArrayOf(ModerationFlagResponse::class)] public ?array $flags = null, // The flags associated with this review queue item public ?ActionLogResponse $action = null, - public ?ReviewQueueItemResponse $reviewQueueItem = null, ) { } diff --git a/src/GeneratedModels/ReviewQueueItemResponse.php b/src/GeneratedModels/ReviewQueueItemResponse.php index 8a0138b6..068aeb99 100644 --- a/src/GeneratedModels/ReviewQueueItemResponse.php +++ b/src/GeneratedModels/ReviewQueueItemResponse.php @@ -3,85 +3,48 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $aiTextSeverity - * @property \DateTime $createdAt - * @property string $entityID - * @property string $entityType - * @property int $flagsCount - * @property string $id - * @property string $latestModeratorAction - * @property string $recommendedAction - * @property string $reviewedBy - * @property int $severity - * @property string $status - * @property \DateTime $updatedAt - * @property array $actions - * @property array $bans - * @property array $flags - * @property array $languages - * @property \DateTime|null $completedAt - * @property string|null $configKey - * @property string|null $entityCreatorID - * @property \DateTime|null $reviewedAt - * @property array|null $teams - * @property EnrichedActivity|null $activity - * @property AppealItemResponse|null $appeal - * @property UserResponse|null $assignedTo - * @property CallResponse|null $call - * @property EntityCreatorResponse|null $entityCreator - * @property EnrichedActivity|null $feedsV2Activity - * @property Reaction|null $feedsV2Reaction - * @property ActivityResponse|null $feedsV3Activity - * @property CommentResponse|null $feedsV3Comment - * @property MessageResponse|null $message - * @property ModerationPayload|null $moderationPayload - * @property Reaction|null $reaction - */ class ReviewQueueItemResponse extends BaseModel { public function __construct( - public ?string $aiTextSeverity = null, // AI-determined text severity + public ?string $id = null, // Unique identifier of the review queue item public ?\DateTime $createdAt = null, // When the item was created - public ?string $entityID = null, // ID of the entity being reviewed + public ?\DateTime $updatedAt = null, // When the item was last updated public ?string $entityType = null, // Type of entity being reviewed - public ?int $flagsCount = null, - public ?string $id = null, // Unique identifier of the review queue item - public ?string $latestModeratorAction = null, + public ?string $entityID = null, // ID of the entity being reviewed + public ?ModerationPayloadResponse $moderationPayload = null, + public ?string $status = null, // Current status of the review public ?string $recommendedAction = null, // Suggested moderation action + public ?\DateTime $completedAt = null, // When the review was completed + public ?\DateTime $reviewedAt = null, // When the item was reviewed public ?string $reviewedBy = null, // ID of the moderator who reviewed the item + public ?array $languages = null, // Detected languages in the content public ?int $severity = null, // Severity level of the content - public ?string $status = null, // Current status of the review - public ?\DateTime $updatedAt = null, // When the item was last updated - /** @var array|null Moderation actions taken */ - #[ArrayOf(ActionLogResponse::class)] - public ?array $actions = null, // Moderation actions taken - /** @var array|null Associated ban records */ - #[ArrayOf(Ban::class)] + public ?string $aiTextSeverity = null, // AI-determined text severity + public ?string $latestModeratorAction = null, + public ?MessageResponse $message = null, + public ?EnrichedActivity $activity = null, + public ?Reaction $reaction = null, + public ?CallResponse $call = null, + public ?EntityCreatorResponse $entityCreator = null, + public ?string $entityCreatorID = null, // ID of who created the entity + public ?UserResponse $assignedTo = null, + /** @var array|null */ + #[ArrayOf(BanInfoResponse::class)] public ?array $bans = null, // Associated ban records - /** @var array|null Associated flag records */ + /** @var array|null */ #[ArrayOf(ModerationFlagResponse::class)] public ?array $flags = null, // Associated flag records - public ?array $languages = null, // Detected languages in the content - public ?\DateTime $completedAt = null, // When the review was completed - public ?string $configKey = null, - public ?string $entityCreatorID = null, // ID of who created the entity - public ?\DateTime $reviewedAt = null, // When the item was reviewed - public ?array $teams = null, // Teams associated with this item - public ?EnrichedActivity $activity = null, + /** @var array|null */ + #[ArrayOf(ActionLogResponse::class)] + public ?array $actions = null, // Moderation actions taken public ?AppealItemResponse $appeal = null, - public ?UserResponse $assignedTo = null, - public ?CallResponse $call = null, - public ?EntityCreatorResponse $entityCreator = null, public ?EnrichedActivity $feedsV2Activity = null, public ?Reaction $feedsV2Reaction = null, public ?ActivityResponse $feedsV3Activity = null, public ?CommentResponse $feedsV3Comment = null, - public ?MessageResponse $message = null, - public ?ModerationPayload $moderationPayload = null, - public ?Reaction $reaction = null, + public ?array $teams = null, // Teams associated with this item + public ?string $configKey = null, + public ?int $flagsCount = null, ) { } diff --git a/src/GeneratedModels/ReviewQueueItemUpdatedEvent.php b/src/GeneratedModels/ReviewQueueItemUpdatedEvent.php index 20a40baa..79b42a43 100644 --- a/src/GeneratedModels/ReviewQueueItemUpdatedEvent.php +++ b/src/GeneratedModels/ReviewQueueItemUpdatedEvent.php @@ -5,27 +5,19 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a moderation review queue item is updated - * - * @property \DateTime $createdAt - * @property object $custom - * @property string $type - * @property \DateTime|null $receivedAt - * @property array|null $flags - * @property ActionLogResponse|null $action - * @property ReviewQueueItemResponse|null $reviewQueueItem */ class ReviewQueueItemUpdatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?object $custom = null, public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $receivedAt = null, - /** @var array|null The flags associated with this review queue item */ + public ?object $custom = null, + public ?ReviewQueueItemResponse $reviewQueueItem = null, + /** @var array|null */ #[ArrayOf(ModerationFlagResponse::class)] public ?array $flags = null, // The flags associated with this review queue item public ?ActionLogResponse $action = null, - public ?ReviewQueueItemResponse $reviewQueueItem = null, ) { } diff --git a/src/GeneratedModels/RingCallRequest.php b/src/GeneratedModels/RingCallRequest.php index ed161449..e1ce3e5b 100644 --- a/src/GeneratedModels/RingCallRequest.php +++ b/src/GeneratedModels/RingCallRequest.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $video - * @property array|null $membersIds - */ class RingCallRequest extends BaseModel { public function __construct( - public ?bool $video = null, // Indicate if call should be video public ?array $membersIds = null, // Members that should receive the ring. If no ids are provided, all call members who are not already in the call will receive ring notifications. + public ?bool $video = null, // Indicate if call should be video ) { } diff --git a/src/GeneratedModels/RingCallResponse.php b/src/GeneratedModels/RingCallResponse.php index 76be6404..746f06d2 100644 --- a/src/GeneratedModels/RingCallResponse.php +++ b/src/GeneratedModels/RingCallResponse.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $membersIds - */ class RingCallResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/RingSettings.php b/src/GeneratedModels/RingSettings.php index 25f643aa..50f415e7 100644 --- a/src/GeneratedModels/RingSettings.php +++ b/src/GeneratedModels/RingSettings.php @@ -3,18 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $autoCancelTimeoutMs - * @property int $incomingCallTimeoutMs - * @property int $missedCallTimeoutMs - */ class RingSettings extends BaseModel { public function __construct( - public ?int $autoCancelTimeoutMs = null, public ?int $incomingCallTimeoutMs = null, + public ?int $autoCancelTimeoutMs = null, public ?int $missedCallTimeoutMs = null, ) { } diff --git a/src/GeneratedModels/RingSettingsRequest.php b/src/GeneratedModels/RingSettingsRequest.php index d4bf55d1..712fe643 100644 --- a/src/GeneratedModels/RingSettingsRequest.php +++ b/src/GeneratedModels/RingSettingsRequest.php @@ -3,18 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $autoCancelTimeoutMs - * @property int $incomingCallTimeoutMs - * @property int|null $missedCallTimeoutMs - */ class RingSettingsRequest extends BaseModel { public function __construct( - public ?int $autoCancelTimeoutMs = null, // When none of the callees accept a ring call in this time a rejection will be sent by the caller with reason 'timeout' by the SDKs public ?int $incomingCallTimeoutMs = null, // When a callee is online but doesn't answer a ring call in this time a rejection will be sent with reason 'timeout' by the SDKs + public ?int $autoCancelTimeoutMs = null, // When none of the callees accept a ring call in this time a rejection will be sent by the caller with reason 'timeout' by the SDKs public ?int $missedCallTimeoutMs = null, // When a callee doesn't accept or reject a ring call in this time a missed call event will be sent ) { } diff --git a/src/GeneratedModels/RingSettingsResponse.php b/src/GeneratedModels/RingSettingsResponse.php index 4c4965ff..9fb4b8d3 100644 --- a/src/GeneratedModels/RingSettingsResponse.php +++ b/src/GeneratedModels/RingSettingsResponse.php @@ -3,18 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $autoCancelTimeoutMs - * @property int $incomingCallTimeoutMs - * @property int $missedCallTimeoutMs - */ class RingSettingsResponse extends BaseModel { public function __construct( - public ?int $autoCancelTimeoutMs = null, public ?int $incomingCallTimeoutMs = null, + public ?int $autoCancelTimeoutMs = null, public ?int $missedCallTimeoutMs = null, ) { } diff --git a/src/GeneratedModels/Role.php b/src/GeneratedModels/Role.php index c8c3c83c..ae3b3434 100644 --- a/src/GeneratedModels/Role.php +++ b/src/GeneratedModels/Role.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property bool $custom - * @property string $name - * @property \DateTime $updatedAt - * @property array $scopes - */ class Role extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // Date/time of creation - public ?bool $custom = null, // Whether this is a custom role or built-in public ?string $name = null, // Unique role name - public ?\DateTime $updatedAt = null, // Date/time of the last update + public ?bool $custom = null, // Whether this is a custom role or built-in public ?array $scopes = null, // List of scopes where this role is currently present. `.app` means that role is present in app-level grants + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $updatedAt = null, // Date/time of the last update ) { } diff --git a/src/GeneratedModels/RuleBuilderAction.php b/src/GeneratedModels/RuleBuilderAction.php index a74aa5c0..26b43455 100644 --- a/src/GeneratedModels/RuleBuilderAction.php +++ b/src/GeneratedModels/RuleBuilderAction.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $type - * @property BanOptions|null $banOptions - * @property FlagUserOptions|null $flagUserOptions - */ class RuleBuilderAction extends BaseModel { public function __construct( public ?string $type = null, public ?BanOptions $banOptions = null, public ?FlagUserOptions $flagUserOptions = null, + public ?CallActionOptions $callOptions = null, ) { } diff --git a/src/GeneratedModels/RuleBuilderCondition.php b/src/GeneratedModels/RuleBuilderCondition.php index 8eca9ddb..51009674 100644 --- a/src/GeneratedModels/RuleBuilderCondition.php +++ b/src/GeneratedModels/RuleBuilderCondition.php @@ -3,45 +3,30 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $confidence - * @property string|null $type - * @property ContentCountRuleParameters|null $contentCountRuleParams - * @property FlagCountRuleParameters|null $contentFlagCountRuleParams - * @property ImageContentParameters|null $imageContentParams - * @property ImageRuleParameters|null $imageRuleParams - * @property TextContentParameters|null $textContentParams - * @property TextRuleParameters|null $textRuleParams - * @property UserCreatedWithinParameters|null $userCreatedWithinParams - * @property UserCustomPropertyParameters|null $userCustomPropertyParams - * @property FlagCountRuleParameters|null $userFlagCountRuleParams - * @property UserIdenticalContentCountParameters|null $userIdenticalContentCountParams - * @property UserRoleParameters|null $userRoleParams - * @property UserRuleParameters|null $userRuleParams - * @property VideoContentParameters|null $videoContentParams - * @property VideoRuleParameters|null $videoRuleParams - */ class RuleBuilderCondition extends BaseModel { public function __construct( - public ?int $confidence = null, public ?string $type = null, + public ?int $confidence = null, + public ?TextRuleParameters $textRuleParams = null, + public ?ImageRuleParameters $imageRuleParams = null, + public ?VideoRuleParameters $videoRuleParams = null, + public ?UserRuleParameters $userRuleParams = null, public ?ContentCountRuleParameters $contentCountRuleParams = null, + public ?FlagCountRuleParameters $userFlagCountRuleParams = null, public ?FlagCountRuleParameters $contentFlagCountRuleParams = null, - public ?ImageContentParameters $imageContentParams = null, - public ?ImageRuleParameters $imageRuleParams = null, + public ?UserIdenticalContentCountParameters $userIdenticalContentCountParams = null, public ?TextContentParameters $textContentParams = null, - public ?TextRuleParameters $textRuleParams = null, + public ?ImageContentParameters $imageContentParams = null, + public ?VideoContentParameters $videoContentParams = null, public ?UserCreatedWithinParameters $userCreatedWithinParams = null, public ?UserCustomPropertyParameters $userCustomPropertyParams = null, - public ?FlagCountRuleParameters $userFlagCountRuleParams = null, - public ?UserIdenticalContentCountParameters $userIdenticalContentCountParams = null, public ?UserRoleParameters $userRoleParams = null, - public ?UserRuleParameters $userRuleParams = null, - public ?VideoContentParameters $videoContentParams = null, - public ?VideoRuleParameters $videoRuleParams = null, + public ?KeyframeRuleParameters $keyframeRuleParams = null, + public ?ClosedCaptionRuleParameters $closedCaptionRuleParams = null, + public ?CallTypeRuleParameters $callTypeRuleParams = null, + public ?CallCustomPropertyParameters $callCustomPropertyParams = null, + public ?CallViolationCountParameters $callViolationCountParams = null, ) { } diff --git a/src/GeneratedModels/RuleBuilderConditionGroup.php b/src/GeneratedModels/RuleBuilderConditionGroup.php index f4f16a77..15335dae 100644 --- a/src/GeneratedModels/RuleBuilderConditionGroup.php +++ b/src/GeneratedModels/RuleBuilderConditionGroup.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $logic - * @property array|null $conditions - */ class RuleBuilderConditionGroup extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/RuleBuilderConfig.php b/src/GeneratedModels/RuleBuilderConfig.php index b8222741..c85bab32 100644 --- a/src/GeneratedModels/RuleBuilderConfig.php +++ b/src/GeneratedModels/RuleBuilderConfig.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $async - * @property array|null $rules - */ class RuleBuilderConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/RuleBuilderRule.php b/src/GeneratedModels/RuleBuilderRule.php index ad58d0ec..8aa518bb 100644 --- a/src/GeneratedModels/RuleBuilderRule.php +++ b/src/GeneratedModels/RuleBuilderRule.php @@ -3,31 +3,23 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $ruleType - * @property RuleBuilderAction $action - * @property string|null $cooldownPeriod - * @property string|null $id - * @property string|null $logic - * @property array|null $conditions - * @property array|null $groups - */ class RuleBuilderRule extends BaseModel { public function __construct( - public ?string $ruleType = null, - public ?RuleBuilderAction $action = null, - public ?string $cooldownPeriod = null, public ?string $id = null, - public ?string $logic = null, + public ?string $ruleType = null, /** @var array|null */ #[ArrayOf(RuleBuilderCondition::class)] public ?array $conditions = null, + public ?string $logic = null, /** @var array|null */ #[ArrayOf(RuleBuilderConditionGroup::class)] public ?array $groups = null, + public ?RuleBuilderAction $action = null, + /** @var array|null */ + #[ArrayOf(CallRuleActionSequence::class)] + public ?array $actionSequences = null, + public ?string $cooldownPeriod = null, ) { } diff --git a/src/GeneratedModels/S3Request.php b/src/GeneratedModels/S3Request.php index 9d4c4268..a378ea30 100644 --- a/src/GeneratedModels/S3Request.php +++ b/src/GeneratedModels/S3Request.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * Config for creating Amazon S3 storage. - * - * @property string $s3Region - * @property string|null $s3APIKey - * @property string|null $s3CustomEndpointUrl - * @property string|null $s3Secret */ class S3Request extends BaseModel { public function __construct( public ?string $s3Region = null, // The AWS region where the bucket is hosted public ?string $s3APIKey = null, // The AWS API key. To use Amazon S3 as your storage provider, you have two authentication options: IAM role or API key. If you do not specify the `s3_api_key` parameter, Stream will use IAM role authentication. In that case make sure to have the correct IAM role configured for your application. - public ?string $s3CustomEndpointUrl = null, // The custom endpoint for S3. If you want to use a custom endpoint, you must also provide the `s3_api_key` and `s3_secret` parameters. public ?string $s3Secret = null, // The AWS API Secret + public ?string $s3CustomEndpointUrl = null, // The custom endpoint for S3. If you want to use a custom endpoint, you must also provide the `s3_api_key` and `s3_secret` parameters. ) { } diff --git a/src/GeneratedModels/SDKUsageReport.php b/src/GeneratedModels/SDKUsageReport.php index e1c0cf1f..cebf818d 100644 --- a/src/GeneratedModels/SDKUsageReport.php +++ b/src/GeneratedModels/SDKUsageReport.php @@ -3,14 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $perSdkUsage - */ class SDKUsageReport extends BaseModel { public function __construct( + /** @var array|null */ + #[MapOf(PerSDKUsageReport::class)] public ?array $perSdkUsage = null, ) { } diff --git a/src/GeneratedModels/SDKUsageReportResponse.php b/src/GeneratedModels/SDKUsageReportResponse.php index eb256f64..96d7a2ec 100644 --- a/src/GeneratedModels/SDKUsageReportResponse.php +++ b/src/GeneratedModels/SDKUsageReportResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $daily - */ class SDKUsageReportResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/SFULocationResponse.php b/src/GeneratedModels/SFULocationResponse.php index 4985a2f8..3c53a34b 100644 --- a/src/GeneratedModels/SFULocationResponse.php +++ b/src/GeneratedModels/SFULocationResponse.php @@ -3,22 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $datacenter - * @property string $id - * @property Coordinates $coordinates - * @property Location $location - * @property int|null $count - */ class SFULocationResponse extends BaseModel { public function __construct( - public ?string $datacenter = null, public ?string $id = null, - public ?Coordinates $coordinates = null, - public ?Location $location = null, + public ?string $datacenter = null, + public ?LocationResponse $location = null, + public ?CoordinatesResponse $coordinates = null, public ?int $count = null, ) { } diff --git a/src/GeneratedModels/SIPCallConfigsRequest.php b/src/GeneratedModels/SIPCallConfigsRequest.php index 34c35ff2..b7c82808 100644 --- a/src/GeneratedModels/SIPCallConfigsRequest.php +++ b/src/GeneratedModels/SIPCallConfigsRequest.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Configuration for SIP call settings - * - * @property object|null $customData */ class SIPCallConfigsRequest extends BaseModel { diff --git a/src/GeneratedModels/SIPCallConfigsResponse.php b/src/GeneratedModels/SIPCallConfigsResponse.php index da51d655..72ba3f4d 100644 --- a/src/GeneratedModels/SIPCallConfigsResponse.php +++ b/src/GeneratedModels/SIPCallConfigsResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * SIP call configuration response - * - * @property object $customData */ class SIPCallConfigsResponse extends BaseModel { diff --git a/src/GeneratedModels/SIPCallerConfigsRequest.php b/src/GeneratedModels/SIPCallerConfigsRequest.php index 4a3dc16e..cbc5c3e5 100644 --- a/src/GeneratedModels/SIPCallerConfigsRequest.php +++ b/src/GeneratedModels/SIPCallerConfigsRequest.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * Configuration for SIP caller settings - * - * @property string $id - * @property object|null $customData */ class SIPCallerConfigsRequest extends BaseModel { diff --git a/src/GeneratedModels/SIPCallerConfigsResponse.php b/src/GeneratedModels/SIPCallerConfigsResponse.php index 64283dea..76a445b5 100644 --- a/src/GeneratedModels/SIPCallerConfigsResponse.php +++ b/src/GeneratedModels/SIPCallerConfigsResponse.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * SIP caller configuration response - * - * @property string $id - * @property object $customData */ class SIPCallerConfigsResponse extends BaseModel { diff --git a/src/GeneratedModels/SIPChallengeRequest.php b/src/GeneratedModels/SIPChallengeRequest.php new file mode 100644 index 00000000..fdc41e6e --- /dev/null +++ b/src/GeneratedModels/SIPChallengeRequest.php @@ -0,0 +1,33 @@ +|null $sort - * @property object|null $messageFilterConditions - * @property MessageOptions|null $messageOptions - */ class SearchPayload extends BaseModel { public function __construct( + public ?string $query = null, // Search phrase public ?object $filterConditions = null, // Channel filter conditions - public ?bool $forceDefaultSearch = null, - public ?bool $forceSqlV2Backend = null, + public ?object $messageFilterConditions = null, // Message filter conditions + public ?MessageOptions $messageOptions = null, public ?int $limit = null, // Number of messages to return - public ?string $next = null, // Pagination parameter. Cannot be used with non-zero offset. public ?int $offset = null, // Pagination offset. Cannot be used with sort or next. - public ?string $query = null, // Search phrase - /** @var array|null Sort parameters. Cannot be used with non-zero offset */ + /** @var array|null */ #[ArrayOf(SortParamRequest::class)] public ?array $sort = null, // Sort parameters. Cannot be used with non-zero offset - public ?object $messageFilterConditions = null, // Message filter conditions - public ?MessageOptions $messageOptions = null, + public ?string $next = null, // Pagination parameter. Cannot be used with non-zero offset. + public ?bool $forceDefaultSearch = null, + public ?bool $forceSqlV2Backend = null, ) { } diff --git a/src/GeneratedModels/SearchResponse.php b/src/GeneratedModels/SearchResponse.php index 612285b6..e08ad6cc 100644 --- a/src/GeneratedModels/SearchResponse.php +++ b/src/GeneratedModels/SearchResponse.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $results - * @property string|null $next - * @property string|null $previous - * @property SearchWarning|null $resultsWarning - */ class SearchResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null Search results */ + /** @var array|null */ #[ArrayOf(SearchResult::class)] public ?array $results = null, // Search results + public ?SearchWarning $resultsWarning = null, public ?string $next = null, // Value to pass to the next search query in order to paginate public ?string $previous = null, // Value that points to the previous page. Pass as the next value in a search query to paginate backwards - public ?SearchWarning $resultsWarning = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/SearchResult.php b/src/GeneratedModels/SearchResult.php index e9668b03..ed46e6e6 100644 --- a/src/GeneratedModels/SearchResult.php +++ b/src/GeneratedModels/SearchResult.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property SearchResultMessage|null $message - */ class SearchResult extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/SearchResultMessage.php b/src/GeneratedModels/SearchResultMessage.php index 0fc02893..be3b8b79 100644 --- a/src/GeneratedModels/SearchResultMessage.php +++ b/src/GeneratedModels/SearchResultMessage.php @@ -3,113 +3,69 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $cid - * @property \DateTime $createdAt - * @property int $deletedReplyCount - * @property string $html - * @property string $id - * @property bool $pinned - * @property int $replyCount - * @property bool $shadowed - * @property bool $silent - * @property string $text - * @property string $type - * @property \DateTime $updatedAt - * @property array $attachments - * @property array $latestReactions - * @property array $mentionedUsers - * @property array $ownReactions - * @property array $restrictedVisibility - * @property object $custom - * @property array $reactionCounts - * @property array $reactionScores - * @property UserResponse $user - * @property string|null $command - * @property \DateTime|null $deletedAt - * @property bool|null $deletedForMe - * @property \DateTime|null $messageTextUpdatedAt - * @property string|null $mml - * @property string|null $parentID - * @property \DateTime|null $pinExpires - * @property \DateTime|null $pinnedAt - * @property string|null $pollID - * @property string|null $quotedMessageID - * @property bool|null $showInChannel - * @property array|null $threadParticipants - * @property ChannelResponse|null $channel - * @property DraftResponse|null $draft - * @property array|null $i18n - * @property array|null $imageLabels - * @property ChannelMemberResponse|null $member - * @property ModerationV2Response|null $moderation - * @property UserResponse|null $pinnedBy - * @property PollResponseData|null $poll - * @property MessageResponse|null $quotedMessage - * @property array|null $reactionGroups - * @property ReminderResponseData|null $reminder - * @property SharedLocationResponseData|null $sharedLocation - */ class SearchResultMessage extends BaseModel { public function __construct( - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?int $deletedReplyCount = null, - public ?string $html = null, public ?string $id = null, - public ?bool $pinned = null, - public ?int $replyCount = null, - public ?bool $shadowed = null, - public ?bool $silent = null, public ?string $text = null, + public ?string $mml = null, + public ?string $command = null, + public ?string $html = null, public ?string $type = null, - public ?\DateTime $updatedAt = null, + public ?UserResponse $user = null, + public ?ChannelMemberResponse $member = null, /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, /** @var array|null */ #[ArrayOf(ReactionResponse::class)] public ?array $latestReactions = null, - /** @var array|null */ - #[ArrayOf(UserResponse::class)] - public ?array $mentionedUsers = null, /** @var array|null */ #[ArrayOf(ReactionResponse::class)] public ?array $ownReactions = null, - public ?array $restrictedVisibility = null, - public ?object $custom = null, public ?array $reactionCounts = null, public ?array $reactionScores = null, - public ?UserResponse $user = null, - public ?string $command = null, - public ?\DateTime $deletedAt = null, - public ?bool $deletedForMe = null, - public ?\DateTime $messageTextUpdatedAt = null, - public ?string $mml = null, + /** @var array|null */ + #[MapOf(ReactionGroupResponse::class)] + public ?array $reactionGroups = null, public ?string $parentID = null, - public ?\DateTime $pinExpires = null, - public ?\DateTime $pinnedAt = null, - public ?string $pollID = null, - public ?string $quotedMessageID = null, public ?bool $showInChannel = null, + public ?int $replyCount = null, + public ?int $deletedReplyCount = null, + public ?string $quotedMessageID = null, + public ?MessageResponse $quotedMessage = null, /** @var array|null */ #[ArrayOf(UserResponse::class)] public ?array $threadParticipants = null, - public ?ChannelResponse $channel = null, - public ?DraftResponse $draft = null, - public ?array $i18n = null, + public ?string $cid = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, + public ?\DateTime $deletedAt = null, + public ?object $custom = null, + public ?bool $shadowed = null, public ?array $imageLabels = null, - public ?ChannelMemberResponse $member = null, - public ?ModerationV2Response $moderation = null, + /** @var array|null */ + #[ArrayOf(UserResponse::class)] + public ?array $mentionedUsers = null, + public ?array $mentionedRoles = null, + public ?bool $mentionedChannel = null, + public ?bool $mentionedHere = null, + public ?array $i18n = null, + public ?bool $silent = null, + public ?bool $pinned = null, + public ?\DateTime $pinnedAt = null, public ?UserResponse $pinnedBy = null, + public ?\DateTime $pinExpires = null, + public ?\DateTime $messageTextUpdatedAt = null, + public ?string $pollID = null, public ?PollResponseData $poll = null, - public ?MessageResponse $quotedMessage = null, - public ?array $reactionGroups = null, + public ?ModerationV2Response $moderation = null, + public ?array $restrictedVisibility = null, + public ?DraftResponse $draft = null, public ?ReminderResponseData $reminder = null, public ?SharedLocationResponseData $sharedLocation = null, + public ?bool $deletedForMe = null, + public ?ChannelResponse $channel = null, ) { } diff --git a/src/GeneratedModels/SearchWarning.php b/src/GeneratedModels/SearchWarning.php index 9c49b93d..8933f53f 100644 --- a/src/GeneratedModels/SearchWarning.php +++ b/src/GeneratedModels/SearchWarning.php @@ -3,19 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $warningCode - * @property string $warningDescription - * @property int|null $channelSearchCount - * @property array|null $channelSearchCids - */ class SearchWarning extends BaseModel { public function __construct( - public ?int $warningCode = null, // Code corresponding to the warning public ?string $warningDescription = null, // Description of the warning + public ?int $warningCode = null, // Code corresponding to the warning public ?int $channelSearchCount = null, // Number of channels searched public ?array $channelSearchCids = null, // Channel CIDs for the searched channels ) { diff --git a/src/GeneratedModels/Segment.php b/src/GeneratedModels/Segment.php index ff8567ee..6ed127cc 100644 --- a/src/GeneratedModels/Segment.php +++ b/src/GeneratedModels/Segment.php @@ -3,37 +3,21 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $allSenderChannels - * @property bool $allUsers - * @property \DateTime $createdAt - * @property string $id - * @property string $name - * @property int $size - * @property string $type - * @property \DateTime $updatedAt - * @property \DateTime|null $deletedAt - * @property string|null $description - * @property string|null $taskID - * @property object|null $filter - */ class Segment extends BaseModel { public function __construct( - public ?bool $allSenderChannels = null, - public ?bool $allUsers = null, - public ?\DateTime $createdAt = null, public ?string $id = null, + public ?string $type = null, public ?string $name = null, + public ?string $description = null, + public ?object $filter = null, + public ?bool $allUsers = null, + public ?bool $allSenderChannels = null, + public ?string $taskID = null, public ?int $size = null, - public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, public ?\DateTime $deletedAt = null, - public ?string $description = null, - public ?string $taskID = null, - public ?object $filter = null, ) { } diff --git a/src/GeneratedModels/SegmentResponse.php b/src/GeneratedModels/SegmentResponse.php index ad9e1365..def223b7 100644 --- a/src/GeneratedModels/SegmentResponse.php +++ b/src/GeneratedModels/SegmentResponse.php @@ -3,35 +3,20 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $allSenderChannels - * @property bool $allUsers - * @property \DateTime $createdAt - * @property \DateTime $deletedAt - * @property string $description - * @property string $id - * @property string $name - * @property int $size - * @property string $type - * @property \DateTime $updatedAt - * @property object $filter - */ class SegmentResponse extends BaseModel { public function __construct( - public ?bool $allSenderChannels = null, - public ?bool $allUsers = null, - public ?\DateTime $createdAt = null, - public ?\DateTime $deletedAt = null, - public ?string $description = null, public ?string $id = null, + public ?string $type = null, public ?string $name = null, + public ?string $description = null, + public ?object $filter = null, + public ?bool $allUsers = null, + public ?bool $allSenderChannels = null, public ?int $size = null, - public ?string $type = null, + public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, - public ?object $filter = null, + public ?\DateTime $deletedAt = null, ) { } diff --git a/src/GeneratedModels/SegmentTargetResponse.php b/src/GeneratedModels/SegmentTargetResponse.php index b1c87f31..43e5f6ca 100644 --- a/src/GeneratedModels/SegmentTargetResponse.php +++ b/src/GeneratedModels/SegmentTargetResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $appPk - * @property \DateTime $createdAt - * @property string $segmentID - * @property string $targetID - */ class SegmentTargetResponse extends BaseModel { public function __construct( public ?int $appPk = null, - public ?\DateTime $createdAt = null, public ?string $segmentID = null, public ?string $targetID = null, + public ?\DateTime $createdAt = null, ) { } diff --git a/src/GeneratedModels/SendCallEventRequest.php b/src/GeneratedModels/SendCallEventRequest.php index 8b3e4d73..3a95c74b 100644 --- a/src/GeneratedModels/SendCallEventRequest.php +++ b/src/GeneratedModels/SendCallEventRequest.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * Send a call event to the other user - * - * @property string|null $userID - * @property object|null $custom - * @property UserRequest|null $user */ class SendCallEventRequest extends BaseModel { public function __construct( public ?string $userID = null, - public ?object $custom = null, public ?UserRequest $user = null, + public ?object $custom = null, ) { } diff --git a/src/GeneratedModels/SendCallEventResponse.php b/src/GeneratedModels/SendCallEventResponse.php index 9559e62b..72d0a5b8 100644 --- a/src/GeneratedModels/SendCallEventResponse.php +++ b/src/GeneratedModels/SendCallEventResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - */ class SendCallEventResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/SendClosedCaptionRequest.php b/src/GeneratedModels/SendClosedCaptionRequest.php index 5d737aeb..6f80a37d 100644 --- a/src/GeneratedModels/SendClosedCaptionRequest.php +++ b/src/GeneratedModels/SendClosedCaptionRequest.php @@ -3,31 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $speakerID - * @property string $text - * @property \DateTime|null $endTime - * @property string|null $language - * @property string|null $service - * @property \DateTime|null $startTime - * @property bool|null $translated - * @property string|null $userID - * @property UserRequest|null $user - */ class SendClosedCaptionRequest extends BaseModel { public function __construct( - public ?string $speakerID = null, + public ?string $userID = null, + public ?UserRequest $user = null, public ?string $text = null, + public ?string $speakerID = null, + public ?\DateTime $startTime = null, public ?\DateTime $endTime = null, - public ?string $language = null, public ?string $service = null, - public ?\DateTime $startTime = null, + public ?string $language = null, public ?bool $translated = null, - public ?string $userID = null, - public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/SendClosedCaptionResponse.php b/src/GeneratedModels/SendClosedCaptionResponse.php index cb604953..1df4bc30 100644 --- a/src/GeneratedModels/SendClosedCaptionResponse.php +++ b/src/GeneratedModels/SendClosedCaptionResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - */ class SendClosedCaptionResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/SendEventRequest.php b/src/GeneratedModels/SendEventRequest.php index 782856c2..a2c25154 100644 --- a/src/GeneratedModels/SendEventRequest.php +++ b/src/GeneratedModels/SendEventRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property EventRequest $event - */ class SendEventRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/SendMessageRequest.php b/src/GeneratedModels/SendMessageRequest.php index 2f115ff0..a049cd1a 100644 --- a/src/GeneratedModels/SendMessageRequest.php +++ b/src/GeneratedModels/SendMessageRequest.php @@ -3,27 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property MessageRequest $message - * @property bool|null $forceModeration - * @property bool|null $keepChannelHidden - * @property bool|null $pending - * @property bool|null $skipEnrichUrl - * @property bool|null $skipPush - * @property array|null $pendingMessageMetadata - */ class SendMessageRequest extends BaseModel { public function __construct( public ?MessageRequest $message = null, - public ?bool $forceModeration = null, - public ?bool $keepChannelHidden = null, - public ?bool $pending = null, - public ?bool $skipEnrichUrl = null, public ?bool $skipPush = null, + public ?bool $skipEnrichUrl = null, public ?array $pendingMessageMetadata = null, + public ?bool $pending = null, + public ?bool $forceModeration = null, + public ?bool $keepChannelHidden = null, ) { } diff --git a/src/GeneratedModels/SendMessageResponse.php b/src/GeneratedModels/SendMessageResponse.php index 70106e4f..1b5fa54f 100644 --- a/src/GeneratedModels/SendMessageResponse.php +++ b/src/GeneratedModels/SendMessageResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property MessageResponse $message - * @property array|null $pendingMessageMetadata - */ class SendMessageResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?MessageResponse $message = null, public ?array $pendingMessageMetadata = null, // Pending message metadata + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/SendReactionRequest.php b/src/GeneratedModels/SendReactionRequest.php index 40a137a5..316d4653 100644 --- a/src/GeneratedModels/SendReactionRequest.php +++ b/src/GeneratedModels/SendReactionRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property ReactionRequest $reaction - * @property bool|null $enforceUnique - * @property bool|null $skipPush - */ class SendReactionRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/SendReactionResponse.php b/src/GeneratedModels/SendReactionResponse.php index cb7fa585..4b87a3e7 100644 --- a/src/GeneratedModels/SendReactionResponse.php +++ b/src/GeneratedModels/SendReactionResponse.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property MessageResponse $message - * @property ReactionResponse $reaction */ class SendReactionResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?MessageResponse $message = null, public ?ReactionResponse $reaction = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/SendUserCustomEventRequest.php b/src/GeneratedModels/SendUserCustomEventRequest.php index d555da92..6b8a5751 100644 --- a/src/GeneratedModels/SendUserCustomEventRequest.php +++ b/src/GeneratedModels/SendUserCustomEventRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property UserCustomEventRequest $event - */ class SendUserCustomEventRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/SessionClient.php b/src/GeneratedModels/SessionClient.php index 31ce7c34..4ba62692 100644 --- a/src/GeneratedModels/SessionClient.php +++ b/src/GeneratedModels/SessionClient.php @@ -3,22 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $ip - * @property string|null $name - * @property string|null $networkType - * @property string|null $version - * @property CallStatsLocation|null $location - */ class SessionClient extends BaseModel { public function __construct( - public ?string $ip = null, public ?string $name = null, - public ?string $networkType = null, public ?string $version = null, + public ?string $ip = null, + public ?string $networkType = null, public ?CallStatsLocation $location = null, ) { } diff --git a/src/GeneratedModels/SessionSettings.php b/src/GeneratedModels/SessionSettings.php index 2e0f184c..7f6c0ea7 100644 --- a/src/GeneratedModels/SessionSettings.php +++ b/src/GeneratedModels/SessionSettings.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $inactivityTimeoutSeconds - */ class SessionSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/SessionSettingsRequest.php b/src/GeneratedModels/SessionSettingsRequest.php index e73f0ced..a461c109 100644 --- a/src/GeneratedModels/SessionSettingsRequest.php +++ b/src/GeneratedModels/SessionSettingsRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $inactivityTimeoutSeconds - */ class SessionSettingsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/SessionSettingsResponse.php b/src/GeneratedModels/SessionSettingsResponse.php index b60d3e01..2d62d943 100644 --- a/src/GeneratedModels/SessionSettingsResponse.php +++ b/src/GeneratedModels/SessionSettingsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $inactivityTimeoutSeconds - */ class SessionSettingsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/SessionWarningResponse.php b/src/GeneratedModels/SessionWarningResponse.php index f0ce277d..9ae5a395 100644 --- a/src/GeneratedModels/SessionWarningResponse.php +++ b/src/GeneratedModels/SessionWarningResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $code - * @property string $warning - * @property \DateTime|null $time - */ class SessionWarningResponse extends BaseModel { public function __construct( + public ?\DateTime $time = null, public ?string $code = null, public ?string $warning = null, - public ?\DateTime $time = null, ) { } diff --git a/src/GeneratedModels/ShadowBlockActionRequestPayload.php b/src/GeneratedModels/ShadowBlockActionRequestPayload.php new file mode 100644 index 00000000..cd8dc816 --- /dev/null +++ b/src/GeneratedModels/ShadowBlockActionRequestPayload.php @@ -0,0 +1,18 @@ + $activeLiveLocations - */ class SharedLocationsResponse extends BaseModel { public function __construct( - public ?string $duration = null, /** @var array|null */ #[ArrayOf(SharedLocationResponseData::class)] public ?array $activeLiveLocations = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/ShowChannelRequest.php b/src/GeneratedModels/ShowChannelRequest.php index 189d4cfe..4663e203 100644 --- a/src/GeneratedModels/ShowChannelRequest.php +++ b/src/GeneratedModels/ShowChannelRequest.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $userID - * @property UserRequest|null $user - */ class ShowChannelRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ShowChannelResponse.php b/src/GeneratedModels/ShowChannelResponse.php index 7150c6e0..c5b0ddbe 100644 --- a/src/GeneratedModels/ShowChannelResponse.php +++ b/src/GeneratedModels/ShowChannelResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class ShowChannelResponse extends BaseModel { diff --git a/src/GeneratedModels/SingleFollowResponse.php b/src/GeneratedModels/SingleFollowResponse.php index 054bf011..ea9b907f 100644 --- a/src/GeneratedModels/SingleFollowResponse.php +++ b/src/GeneratedModels/SingleFollowResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FollowResponse $follow - * @property bool|null $notificationCreated - */ class SingleFollowResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FollowResponse $follow = null, public ?bool $notificationCreated = null, // Whether a notification activity was successfully created + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/SipInboundCredentials.php b/src/GeneratedModels/SipInboundCredentials.php index e74b5385..2a2f17d5 100644 --- a/src/GeneratedModels/SipInboundCredentials.php +++ b/src/GeneratedModels/SipInboundCredentials.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * Credentials for SIP inbound call authentication - * - * @property string $callID - * @property string $callType - * @property string $token - * @property string $userID - * @property object $callCustomData - * @property object $userCustomData */ class SipInboundCredentials extends BaseModel { public function __construct( - public ?string $callID = null, // ID of the call public ?string $callType = null, // Type of the call - public ?string $token = null, // Authentication token for the call + public ?string $callID = null, // ID of the call public ?string $userID = null, // User ID for the call + public ?string $token = null, // Authentication token for the call + public ?string $apiKey = null, // API key for the application public ?object $callCustomData = null, // Custom data associated with the call public ?object $userCustomData = null, // Custom data associated with the user ) { diff --git a/src/GeneratedModels/SortParamRequest.php b/src/GeneratedModels/SortParamRequest.php index f03fe307..53a7b8c0 100644 --- a/src/GeneratedModels/SortParamRequest.php +++ b/src/GeneratedModels/SortParamRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $direction - * @property string|null $field - * @property string|null $type - */ class SortParamRequest extends BaseModel { public function __construct( - public ?int $direction = null, // Direction of sorting, 1 for Ascending, -1 for Descending, default is 1 public ?string $field = null, // Name of field to sort by - public ?string $type = null, // Type of field to sort by (default is string) + public ?string $type = null, // Type of field to sort by. Empty string or omitted means string type (default). One of: number, boolean + public ?int $direction = null, // Direction of sorting, 1 for Ascending, -1 for Descending, default is 1. One of: -1, 1 ) { } diff --git a/src/GeneratedModels/SpeechSegmentConfig.php b/src/GeneratedModels/SpeechSegmentConfig.php index f81c1f8f..8d62dd9d 100644 --- a/src/GeneratedModels/SpeechSegmentConfig.php +++ b/src/GeneratedModels/SpeechSegmentConfig.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $maxSpeechCaptionMs - * @property int|null $silenceDurationMs - */ class SpeechSegmentConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StartCampaignRequest.php b/src/GeneratedModels/StartCampaignRequest.php index e2cf78e3..50f848bf 100644 --- a/src/GeneratedModels/StartCampaignRequest.php +++ b/src/GeneratedModels/StartCampaignRequest.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime|null $scheduledFor - * @property \DateTime|null $stopAt - */ class StartCampaignRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StartCampaignResponse.php b/src/GeneratedModels/StartCampaignResponse.php index f0b86628..2e4ea950 100644 --- a/src/GeneratedModels/StartCampaignResponse.php +++ b/src/GeneratedModels/StartCampaignResponse.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property CampaignResponse|null $campaign - * @property PagerResponse|null $users */ class StartCampaignResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?CampaignResponse $campaign = null, public ?PagerResponse $users = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/StartClosedCaptionsRequest.php b/src/GeneratedModels/StartClosedCaptionsRequest.php index 149ed6f2..514c99b5 100644 --- a/src/GeneratedModels/StartClosedCaptionsRequest.php +++ b/src/GeneratedModels/StartClosedCaptionsRequest.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enableTranscription - * @property string|null $externalStorage - * @property string|null $language - * @property SpeechSegmentConfig|null $speechSegmentConfig - */ class StartClosedCaptionsRequest extends BaseModel { public function __construct( public ?bool $enableTranscription = null, // Enable transcriptions along with closed captions public ?string $externalStorage = null, // Which external storage to use for transcriptions (only applicable if enable_transcription is true) - public ?string $language = null, // The spoken language in the call, if not provided the language defined in the transcription settings will be used + public ?string $language = null, // The spoken language in the call, if not provided the language defined in the transcription settings will be used. One of: auto, ar, bg, ca, cs, da, de, el, en, es, et, fi, fr, he, hi, hr, hu, id, it, ja, ko, ms, nl, no, pl, pt, ro, ru, sk, sl, sv, ta, th, tl, tr, uk, zh public ?SpeechSegmentConfig $speechSegmentConfig = null, ) { } diff --git a/src/GeneratedModels/StartClosedCaptionsResponse.php b/src/GeneratedModels/StartClosedCaptionsResponse.php index d8fa4537..0e549ea4 100644 --- a/src/GeneratedModels/StartClosedCaptionsResponse.php +++ b/src/GeneratedModels/StartClosedCaptionsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - */ class StartClosedCaptionsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StartFrameRecordingRequest.php b/src/GeneratedModels/StartFrameRecordingRequest.php index 572c3778..1811755c 100644 --- a/src/GeneratedModels/StartFrameRecordingRequest.php +++ b/src/GeneratedModels/StartFrameRecordingRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $recordingExternalStorage - */ class StartFrameRecordingRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StartFrameRecordingResponse.php b/src/GeneratedModels/StartFrameRecordingResponse.php index eccb0a7d..f105c1f7 100644 --- a/src/GeneratedModels/StartFrameRecordingResponse.php +++ b/src/GeneratedModels/StartFrameRecordingResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * StartFrameRecordingResponse is the response payload for the start frame recording endpoint. - * - * @property string $duration */ class StartFrameRecordingResponse extends BaseModel { diff --git a/src/GeneratedModels/StartHLSBroadcastingResponse.php b/src/GeneratedModels/StartHLSBroadcastingResponse.php index 3a0b993b..9da95b68 100644 --- a/src/GeneratedModels/StartHLSBroadcastingResponse.php +++ b/src/GeneratedModels/StartHLSBroadcastingResponse.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * StartHLSBroadcastingResponse is the payload for starting an HLS broadcasting. - * - * @property string $duration - * @property string $playlistUrl */ class StartHLSBroadcastingResponse extends BaseModel { diff --git a/src/GeneratedModels/StartRTMPBroadcastsRequest.php b/src/GeneratedModels/StartRTMPBroadcastsRequest.php index 19fe6bcf..681ae8a4 100644 --- a/src/GeneratedModels/StartRTMPBroadcastsRequest.php +++ b/src/GeneratedModels/StartRTMPBroadcastsRequest.php @@ -5,13 +5,11 @@ namespace GetStream\GeneratedModels; /** * StartRTMPBroadcastsRequest is the payload for starting RTMP broadcasts. - * - * @property array $broadcasts */ class StartRTMPBroadcastsRequest extends BaseModel { public function __construct( - /** @var array|null List of broadcasts to start */ + /** @var array|null */ #[ArrayOf(RTMPBroadcastRequest::class)] public ?array $broadcasts = null, // List of broadcasts to start ) { diff --git a/src/GeneratedModels/StartRTMPBroadcastsResponse.php b/src/GeneratedModels/StartRTMPBroadcastsResponse.php index 9dcb83c4..85c51775 100644 --- a/src/GeneratedModels/StartRTMPBroadcastsResponse.php +++ b/src/GeneratedModels/StartRTMPBroadcastsResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * StartRTMPBroadcastsResponse is the payload for starting an RTMP broadcast. - * - * @property string $duration */ class StartRTMPBroadcastsResponse extends BaseModel { diff --git a/src/GeneratedModels/StartRecordingRequest.php b/src/GeneratedModels/StartRecordingRequest.php index 86d135e7..e772539d 100644 --- a/src/GeneratedModels/StartRecordingRequest.php +++ b/src/GeneratedModels/StartRecordingRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $recordingExternalStorage - */ class StartRecordingRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StartRecordingResponse.php b/src/GeneratedModels/StartRecordingResponse.php index 25386af0..1c81fe68 100644 --- a/src/GeneratedModels/StartRecordingResponse.php +++ b/src/GeneratedModels/StartRecordingResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * StartRecordingResponse is the response payload for the start recording endpoint. - * - * @property string $duration */ class StartRecordingResponse extends BaseModel { diff --git a/src/GeneratedModels/StartTranscriptionRequest.php b/src/GeneratedModels/StartTranscriptionRequest.php index 14c7c9b0..79ac0e58 100644 --- a/src/GeneratedModels/StartTranscriptionRequest.php +++ b/src/GeneratedModels/StartTranscriptionRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enableClosedCaptions - * @property string|null $language - * @property string|null $transcriptionExternalStorage - */ class StartTranscriptionRequest extends BaseModel { public function __construct( - public ?bool $enableClosedCaptions = null, // Enable closed captions along with transcriptions - public ?string $language = null, // The spoken language in the call, if not provided the language defined in the transcription settings will be used public ?string $transcriptionExternalStorage = null, // Store transcriptions in this external storage + public ?bool $enableClosedCaptions = null, // Enable closed captions along with transcriptions + public ?string $language = null, // The spoken language in the call, if not provided the language defined in the transcription settings will be used. One of: auto, ar, bg, ca, cs, da, de, el, en, es, et, fi, fr, he, hi, hr, hu, id, it, ja, ko, ms, nl, no, pl, pt, ro, ru, sk, sl, sv, ta, th, tl, tr, uk, zh ) { } diff --git a/src/GeneratedModels/StartTranscriptionResponse.php b/src/GeneratedModels/StartTranscriptionResponse.php index aa6f7d2e..f6dc652f 100644 --- a/src/GeneratedModels/StartTranscriptionResponse.php +++ b/src/GeneratedModels/StartTranscriptionResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - */ class StartTranscriptionResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StopAllRTMPBroadcastsRequest.php b/src/GeneratedModels/StopAllRTMPBroadcastsRequest.php index 9ba55210..d612c320 100644 --- a/src/GeneratedModels/StopAllRTMPBroadcastsRequest.php +++ b/src/GeneratedModels/StopAllRTMPBroadcastsRequest.php @@ -3,9 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - */ class StopAllRTMPBroadcastsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StopAllRTMPBroadcastsResponse.php b/src/GeneratedModels/StopAllRTMPBroadcastsResponse.php index 36dbd60c..56dca3b6 100644 --- a/src/GeneratedModels/StopAllRTMPBroadcastsResponse.php +++ b/src/GeneratedModels/StopAllRTMPBroadcastsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - */ class StopAllRTMPBroadcastsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StopCampaignRequest.php b/src/GeneratedModels/StopCampaignRequest.php index c61f7167..0fab14c6 100644 --- a/src/GeneratedModels/StopCampaignRequest.php +++ b/src/GeneratedModels/StopCampaignRequest.php @@ -3,9 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - */ class StopCampaignRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StopClosedCaptionsRequest.php b/src/GeneratedModels/StopClosedCaptionsRequest.php index 22bfe489..52b217e7 100644 --- a/src/GeneratedModels/StopClosedCaptionsRequest.php +++ b/src/GeneratedModels/StopClosedCaptionsRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $stopTranscription - */ class StopClosedCaptionsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StopClosedCaptionsResponse.php b/src/GeneratedModels/StopClosedCaptionsResponse.php index f538ba26..751c9ae8 100644 --- a/src/GeneratedModels/StopClosedCaptionsResponse.php +++ b/src/GeneratedModels/StopClosedCaptionsResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class StopClosedCaptionsResponse extends BaseModel { diff --git a/src/GeneratedModels/StopFrameRecordingRequest.php b/src/GeneratedModels/StopFrameRecordingRequest.php index 97c54aa7..991cf6da 100644 --- a/src/GeneratedModels/StopFrameRecordingRequest.php +++ b/src/GeneratedModels/StopFrameRecordingRequest.php @@ -3,9 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - */ class StopFrameRecordingRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StopFrameRecordingResponse.php b/src/GeneratedModels/StopFrameRecordingResponse.php index 9d2742ee..411771c1 100644 --- a/src/GeneratedModels/StopFrameRecordingResponse.php +++ b/src/GeneratedModels/StopFrameRecordingResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class StopFrameRecordingResponse extends BaseModel { diff --git a/src/GeneratedModels/StopHLSBroadcastingRequest.php b/src/GeneratedModels/StopHLSBroadcastingRequest.php index e4a2d407..a145152e 100644 --- a/src/GeneratedModels/StopHLSBroadcastingRequest.php +++ b/src/GeneratedModels/StopHLSBroadcastingRequest.php @@ -3,9 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - */ class StopHLSBroadcastingRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StopHLSBroadcastingResponse.php b/src/GeneratedModels/StopHLSBroadcastingResponse.php index 7c2f0e08..1597a4c6 100644 --- a/src/GeneratedModels/StopHLSBroadcastingResponse.php +++ b/src/GeneratedModels/StopHLSBroadcastingResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class StopHLSBroadcastingResponse extends BaseModel { diff --git a/src/GeneratedModels/StopLiveRequest.php b/src/GeneratedModels/StopLiveRequest.php index 0c203811..ee9fb6c1 100644 --- a/src/GeneratedModels/StopLiveRequest.php +++ b/src/GeneratedModels/StopLiveRequest.php @@ -3,29 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $continueClosedCaption - * @property bool|null $continueCompositeRecording - * @property bool|null $continueHLS - * @property bool|null $continueIndividualRecording - * @property bool|null $continueRTMPBroadcasts - * @property bool|null $continueRawRecording - * @property bool|null $continueRecording - * @property bool|null $continueTranscription - */ class StopLiveRequest extends BaseModel { public function __construct( - public ?bool $continueClosedCaption = null, - public ?bool $continueCompositeRecording = null, public ?bool $continueHLS = null, + public ?bool $continueRecording = null, + public ?bool $continueCompositeRecording = null, public ?bool $continueIndividualRecording = null, - public ?bool $continueRTMPBroadcasts = null, public ?bool $continueRawRecording = null, - public ?bool $continueRecording = null, public ?bool $continueTranscription = null, + public ?bool $continueClosedCaption = null, + public ?bool $continueRTMPBroadcasts = null, ) { } diff --git a/src/GeneratedModels/StopLiveResponse.php b/src/GeneratedModels/StopLiveResponse.php index 9ba3e595..c0221045 100644 --- a/src/GeneratedModels/StopLiveResponse.php +++ b/src/GeneratedModels/StopLiveResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property CallResponse $call - */ class StopLiveResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?CallResponse $call = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/StopRTMPBroadcastsResponse.php b/src/GeneratedModels/StopRTMPBroadcastsResponse.php index 7928e4d4..757d7b66 100644 --- a/src/GeneratedModels/StopRTMPBroadcastsResponse.php +++ b/src/GeneratedModels/StopRTMPBroadcastsResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class StopRTMPBroadcastsResponse extends BaseModel { diff --git a/src/GeneratedModels/StopRecordingRequest.php b/src/GeneratedModels/StopRecordingRequest.php index 0f5caa66..89f91782 100644 --- a/src/GeneratedModels/StopRecordingRequest.php +++ b/src/GeneratedModels/StopRecordingRequest.php @@ -3,9 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - */ class StopRecordingRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StopRecordingResponse.php b/src/GeneratedModels/StopRecordingResponse.php index abc678c6..5a91444c 100644 --- a/src/GeneratedModels/StopRecordingResponse.php +++ b/src/GeneratedModels/StopRecordingResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class StopRecordingResponse extends BaseModel { diff --git a/src/GeneratedModels/StopTranscriptionRequest.php b/src/GeneratedModels/StopTranscriptionRequest.php index cea7fc1b..3439106f 100644 --- a/src/GeneratedModels/StopTranscriptionRequest.php +++ b/src/GeneratedModels/StopTranscriptionRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $stopClosedCaptions - */ class StopTranscriptionRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StopTranscriptionResponse.php b/src/GeneratedModels/StopTranscriptionResponse.php index 067f4e31..053a47d4 100644 --- a/src/GeneratedModels/StopTranscriptionResponse.php +++ b/src/GeneratedModels/StopTranscriptionResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class StopTranscriptionResponse extends BaseModel { diff --git a/src/GeneratedModels/StoriesConfig.php b/src/GeneratedModels/StoriesConfig.php index fd1b705a..6ec4de46 100644 --- a/src/GeneratedModels/StoriesConfig.php +++ b/src/GeneratedModels/StoriesConfig.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $skipWatched - * @property bool|null $trackWatched - */ class StoriesConfig extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/StoriesFeedUpdatedEvent.php b/src/GeneratedModels/StoriesFeedUpdatedEvent.php index 9b2d94fe..561e8483 100644 --- a/src/GeneratedModels/StoriesFeedUpdatedEvent.php +++ b/src/GeneratedModels/StoriesFeedUpdatedEvent.php @@ -5,32 +5,22 @@ namespace GetStream\GeneratedModels; /** * Emitted when stories feed is updated. - * - * @property \DateTime $createdAt - * @property string $fid - * @property object $custom - * @property string $type - * @property string|null $feedVisibility - * @property \DateTime|null $receivedAt - * @property array|null $activities - * @property array|null $aggregatedActivities - * @property UserResponseCommonFields|null $user */ class StoriesFeedUpdatedEvent extends BaseModel { public function __construct( + /** @var array|null */ + #[ArrayOf(AggregatedActivityResponse::class)] + public ?array $aggregatedActivities = null, // Aggregated activities for stories feeds + /** @var array|null */ + #[ArrayOf(ActivityResponse::class)] + public ?array $activities = null, // Individual activities for stories feeds + public ?string $type = null, // The type of event: "feeds.stories_feed.updated" in this case public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $fid = null, // The ID of the feed + public ?\DateTime $receivedAt = null, public ?object $custom = null, - public ?string $type = null, // The type of event: "feeds.stories_feed.updated" in this case + public ?string $fid = null, // The ID of the feed public ?string $feedVisibility = null, - public ?\DateTime $receivedAt = null, - /** @var array|null Individual activities for stories feeds */ - #[ArrayOf(ActivityResponse::class)] - public ?array $activities = null, // Individual activities for stories feeds - /** @var array|null Aggregated activities for stories feeds */ - #[ArrayOf(AggregatedActivityResponse::class)] - public ?array $aggregatedActivities = null, // Aggregated activities for stories feeds public ?UserResponseCommonFields $user = null, ) { } diff --git a/src/GeneratedModels/SubmitActionRequest.php b/src/GeneratedModels/SubmitActionRequest.php index c77e85c8..1e6fa55e 100644 --- a/src/GeneratedModels/SubmitActionRequest.php +++ b/src/GeneratedModels/SubmitActionRequest.php @@ -3,50 +3,28 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $actionType - * @property string|null $appealID - * @property string|null $itemID - * @property string|null $userID - * @property BanActionRequest|null $ban - * @property BlockActionRequest|null $block - * @property CustomActionRequest|null $custom - * @property DeleteActivityRequest|null $deleteActivity - * @property DeleteCommentRequest|null $deleteComment - * @property DeleteMessageRequest|null $deleteMessage - * @property DeleteReactionRequest|null $deleteReaction - * @property DeleteUserRequest|null $deleteUser - * @property MarkReviewedRequest|null $markReviewed - * @property RejectAppealRequest|null $rejectAppeal - * @property RestoreActionRequest|null $restore - * @property ShadowBlockActionRequest|null $shadowBlock - * @property UnbanActionRequest|null $unban - * @property UnblockActionRequest|null $unblock - * @property UserRequest|null $user - */ class SubmitActionRequest extends BaseModel { public function __construct( - public ?string $actionType = null, // Type of moderation action to perform (mark_reviewed, delete_message, etc.) - public ?string $appealID = null, // UUID of the appeal to act on (required for reject_appeal, optional for other actions) public ?string $itemID = null, // UUID of the review queue item to act on + public ?string $actionType = null, // Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, ban, custom, unban, restore, delete_user, unblock, block, shadow_block, unmask, kick_user, end_call + public ?string $appealID = null, // UUID of the appeal to act on (required for reject_appeal, optional for other actions) + public ?DeleteMessageRequestPayload $deleteMessage = null, + public ?DeleteActivityRequestPayload $deleteActivity = null, + public ?DeleteCommentRequestPayload $deleteComment = null, + public ?DeleteReactionRequestPayload $deleteReaction = null, + public ?DeleteUserRequestPayload $deleteUser = null, + public ?MarkReviewedRequestPayload $markReviewed = null, + public ?BanActionRequestPayload $ban = null, + public ?CustomActionRequestPayload $custom = null, + public ?UnbanActionRequestPayload $unban = null, + public ?RestoreActionRequestPayload $restore = null, + public ?UnblockActionRequestPayload $unblock = null, + public ?BlockActionRequestPayload $block = null, + public ?ShadowBlockActionRequestPayload $shadowBlock = null, + public ?RejectAppealRequestPayload $rejectAppeal = null, + public ?FlagRequest $flag = null, public ?string $userID = null, - public ?BanActionRequest $ban = null, - public ?BlockActionRequest $block = null, - public ?CustomActionRequest $custom = null, - public ?DeleteActivityRequest $deleteActivity = null, - public ?DeleteCommentRequest $deleteComment = null, - public ?DeleteMessageRequest $deleteMessage = null, - public ?DeleteReactionRequest $deleteReaction = null, - public ?DeleteUserRequest $deleteUser = null, - public ?MarkReviewedRequest $markReviewed = null, - public ?RejectAppealRequest $rejectAppeal = null, - public ?RestoreActionRequest $restore = null, - public ?ShadowBlockActionRequest $shadowBlock = null, - public ?UnbanActionRequest $unban = null, - public ?UnblockActionRequest $unblock = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/SubmitActionResponse.php b/src/GeneratedModels/SubmitActionResponse.php index e5fb0820..22df9316 100644 --- a/src/GeneratedModels/SubmitActionResponse.php +++ b/src/GeneratedModels/SubmitActionResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property AppealItemResponse|null $appealItem - * @property ReviewQueueItemResponse|null $item - */ class SubmitActionResponse extends BaseModel { public function __construct( - public ?string $duration = null, - public ?AppealItemResponse $appealItem = null, public ?ReviewQueueItemResponse $item = null, + public ?AppealItemResponse $appealItem = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/SubscriberAllMetrics.php b/src/GeneratedModels/SubscriberAllMetrics.php index 73e09b7a..a8d57a25 100644 --- a/src/GeneratedModels/SubscriberAllMetrics.php +++ b/src/GeneratedModels/SubscriberAllMetrics.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property SubscriberAudioMetrics|null $audio - * @property ActiveCallsLatencyStats|null $rttMs - * @property SubscriberVideoMetrics|null $video - */ class SubscriberAllMetrics extends BaseModel { public function __construct( public ?SubscriberAudioMetrics $audio = null, - public ?ActiveCallsLatencyStats $rttMs = null, public ?SubscriberVideoMetrics $video = null, + public ?ActiveCallsLatencyStats $rttMs = null, ) { } diff --git a/src/GeneratedModels/SubscriberAudioMetrics.php b/src/GeneratedModels/SubscriberAudioMetrics.php index 1090ef44..cab5f26d 100644 --- a/src/GeneratedModels/SubscriberAudioMetrics.php +++ b/src/GeneratedModels/SubscriberAudioMetrics.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property ActiveCallsLatencyStats|null $concealmentPct - * @property ActiveCallsLatencyStats|null $jitterMs - * @property ActiveCallsLatencyStats|null $packetsLostPct - */ class SubscriberAudioMetrics extends BaseModel { public function __construct( - public ?ActiveCallsLatencyStats $concealmentPct = null, public ?ActiveCallsLatencyStats $jitterMs = null, public ?ActiveCallsLatencyStats $packetsLostPct = null, + public ?ActiveCallsLatencyStats $concealmentPct = null, ) { } diff --git a/src/GeneratedModels/SubscriberStatsResponse.php b/src/GeneratedModels/SubscriberStatsResponse.php index 5ebe8ad0..a2e7a437 100644 --- a/src/GeneratedModels/SubscriberStatsResponse.php +++ b/src/GeneratedModels/SubscriberStatsResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $total - * @property int $totalSubscribedDurationSeconds - * @property int $unique - */ class SubscriberStatsResponse extends BaseModel { public function __construct( public ?int $total = null, - public ?int $totalSubscribedDurationSeconds = null, public ?int $unique = null, + public ?int $totalSubscribedDurationSeconds = null, ) { } diff --git a/src/GeneratedModels/SubscriberVideoMetrics.php b/src/GeneratedModels/SubscriberVideoMetrics.php index adf3a687..dd1e0dc8 100644 --- a/src/GeneratedModels/SubscriberVideoMetrics.php +++ b/src/GeneratedModels/SubscriberVideoMetrics.php @@ -3,18 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property ActiveCallsFPSStats|null $fps30 - * @property ActiveCallsLatencyStats|null $jitterMs - * @property ActiveCallsLatencyStats|null $packetsLostPct - */ class SubscriberVideoMetrics extends BaseModel { public function __construct( - public ?ActiveCallsFPSStats $fps30 = null, public ?ActiveCallsLatencyStats $jitterMs = null, + public ?ActiveCallsFPSStats $fps30 = null, public ?ActiveCallsLatencyStats $packetsLostPct = null, ) { } diff --git a/src/GeneratedModels/SubscribersMetrics.php b/src/GeneratedModels/SubscribersMetrics.php index 0d0bc60d..17e7ee25 100644 --- a/src/GeneratedModels/SubscribersMetrics.php +++ b/src/GeneratedModels/SubscribersMetrics.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property SubscriberAllMetrics|null $all - */ class SubscribersMetrics extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/TargetResolution.php b/src/GeneratedModels/TargetResolution.php index 71cba9a0..1c0de995 100644 --- a/src/GeneratedModels/TargetResolution.php +++ b/src/GeneratedModels/TargetResolution.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $bitrate - * @property int $height - * @property int $width - */ class TargetResolution extends BaseModel { public function __construct( - public ?int $bitrate = null, - public ?int $height = null, public ?int $width = null, + public ?int $height = null, + public ?int $bitrate = null, ) { } diff --git a/src/GeneratedModels/TeamUsageStats.php b/src/GeneratedModels/TeamUsageStats.php new file mode 100644 index 00000000..4ab20d1e --- /dev/null +++ b/src/GeneratedModels/TeamUsageStats.php @@ -0,0 +1,34 @@ +|null $threadParticipants - * @property ChannelResponse|null $channel - * @property UserResponse|null $createdBy - * @property MessageResponse|null $parentMessage - */ class ThreadResponse extends BaseModel { public function __construct( - public ?int $activeParticipantCount = null, // Active Participant Count public ?string $channelCid = null, // Channel CID - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $createdByUserID = null, // Created By User ID + public ?ChannelResponse $channel = null, public ?string $parentMessageID = null, // Parent Message ID - public ?int $participantCount = null, // Participant Count - public ?string $title = null, // Title - public ?\DateTime $updatedAt = null, // Date/time of the last update - public ?object $custom = null, // Custom data for this object - public ?\DateTime $deletedAt = null, // Deleted At - public ?\DateTime $lastMessageAt = null, // Last Message At + public ?MessageResponse $parentMessage = null, + public ?string $createdByUserID = null, // Created By User ID + public ?UserResponse $createdBy = null, public ?int $replyCount = null, // Reply Count - /** @var array|null Thread Participants */ + public ?int $participantCount = null, // Participant Count + public ?int $activeParticipantCount = null, // Active Participant Count + /** @var array|null */ #[ArrayOf(ThreadParticipant::class)] public ?array $threadParticipants = null, // Thread Participants - public ?ChannelResponse $channel = null, - public ?UserResponse $createdBy = null, - public ?MessageResponse $parentMessage = null, + public ?\DateTime $lastMessageAt = null, // Last Message At + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $updatedAt = null, // Date/time of the last update + public ?\DateTime $deletedAt = null, // Deleted At + public ?string $title = null, // Title + public ?object $custom = null, // Custom data for this object ) { } diff --git a/src/GeneratedModels/ThreadStateResponse.php b/src/GeneratedModels/ThreadStateResponse.php index 76c35b2f..d67afb30 100644 --- a/src/GeneratedModels/ThreadStateResponse.php +++ b/src/GeneratedModels/ThreadStateResponse.php @@ -3,57 +3,34 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $activeParticipantCount - * @property string $channelCid - * @property \DateTime $createdAt - * @property string $createdByUserID - * @property string $parentMessageID - * @property int $participantCount - * @property string $title - * @property \DateTime $updatedAt - * @property array $latestReplies - * @property object $custom - * @property \DateTime|null $deletedAt - * @property \DateTime|null $lastMessageAt - * @property int|null $replyCount - * @property array|null $read - * @property array|null $threadParticipants - * @property ChannelResponse|null $channel - * @property UserResponse|null $createdBy - * @property DraftResponse|null $draft - * @property MessageResponse|null $parentMessage - */ class ThreadStateResponse extends BaseModel { public function __construct( - public ?int $activeParticipantCount = null, // Active Participant Count public ?string $channelCid = null, // Channel CID - public ?\DateTime $createdAt = null, // Date/time of creation - public ?string $createdByUserID = null, // Created By User ID + public ?ChannelResponse $channel = null, public ?string $parentMessageID = null, // Parent Message ID + public ?MessageResponse $parentMessage = null, + public ?string $createdByUserID = null, // Created By User ID + public ?UserResponse $createdBy = null, + public ?int $replyCount = null, // Reply Count public ?int $participantCount = null, // Participant Count - public ?string $title = null, // Title + public ?int $activeParticipantCount = null, // Active Participant Count + /** @var array|null */ + #[ArrayOf(ThreadParticipant::class)] + public ?array $threadParticipants = null, // Thread Participants + public ?\DateTime $lastMessageAt = null, // Last Message At + public ?\DateTime $createdAt = null, // Date/time of creation public ?\DateTime $updatedAt = null, // Date/time of the last update + public ?\DateTime $deletedAt = null, // Deleted At + public ?string $title = null, // Title + public ?object $custom = null, // Custom data for this object /** @var array|null */ #[ArrayOf(MessageResponse::class)] public ?array $latestReplies = null, - public ?object $custom = null, // Custom data for this object - public ?\DateTime $deletedAt = null, // Deleted At - public ?\DateTime $lastMessageAt = null, // Last Message At - public ?int $replyCount = null, // Reply Count /** @var array|null */ #[ArrayOf(ReadStateResponse::class)] public ?array $read = null, - /** @var array|null Thread Participants */ - #[ArrayOf(ThreadParticipant::class)] - public ?array $threadParticipants = null, // Thread Participants - public ?ChannelResponse $channel = null, - public ?UserResponse $createdBy = null, public ?DraftResponse $draft = null, - public ?MessageResponse $parentMessage = null, ) { } diff --git a/src/GeneratedModels/ThreadUpdatedEvent.php b/src/GeneratedModels/ThreadUpdatedEvent.php index 90bba08d..f420a856 100644 --- a/src/GeneratedModels/ThreadUpdatedEvent.php +++ b/src/GeneratedModels/ThreadUpdatedEvent.php @@ -3,27 +3,17 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property string $type - * @property ThreadResponse|null $thread - * @property User|null $user - */ class ThreadUpdatedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, public ?string $type = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, + public ?string $channelType = null, + public ?string $channelID = null, public ?ThreadResponse $thread = null, - public ?User $user = null, ) { } diff --git a/src/GeneratedModels/ThreadedCommentResponse.php b/src/GeneratedModels/ThreadedCommentResponse.php index 5fa94893..c6ac1e5f 100644 --- a/src/GeneratedModels/ThreadedCommentResponse.php +++ b/src/GeneratedModels/ThreadedCommentResponse.php @@ -5,75 +5,49 @@ namespace GetStream\GeneratedModels; /** * A comment with an optional, depth‑limited slice of nested replies. - * - * @property int $confidenceScore - * @property \DateTime $createdAt - * @property int $downvoteCount - * @property string $id - * @property string $objectID - * @property string $objectType - * @property int $reactionCount - * @property int $replyCount - * @property int $score - * @property string $status - * @property \DateTime $updatedAt - * @property int $upvoteCount - * @property array $mentionedUsers - * @property array $ownReactions - * @property UserResponse $user - * @property int|null $controversyScore - * @property \DateTime|null $deletedAt - * @property \DateTime|null $editedAt - * @property string|null $parentID - * @property string|null $text - * @property array|null $attachments - * @property array|null $latestReactions - * @property array|null $replies - * @property object|null $custom - * @property RepliesMeta|null $meta - * @property ModerationV2Response|null $moderation - * @property array|null $reactionGroups */ class ThreadedCommentResponse extends BaseModel { public function __construct( - public ?int $confidenceScore = null, - public ?\DateTime $createdAt = null, - public ?int $downvoteCount = null, public ?string $id = null, public ?string $objectID = null, public ?string $objectType = null, + public ?UserResponse $user = null, + public ?string $text = null, + public ?object $custom = null, + public ?string $parentID = null, public ?int $reactionCount = null, - public ?int $replyCount = null, - public ?int $score = null, - public ?string $status = null, - public ?\DateTime $updatedAt = null, - public ?int $upvoteCount = null, - /** @var array|null */ - #[ArrayOf(UserResponse::class)] - public ?array $mentionedUsers = null, /** @var array|null */ #[ArrayOf(FeedsReactionResponse::class)] - public ?array $ownReactions = null, - public ?UserResponse $user = null, - public ?int $controversyScore = null, - public ?\DateTime $deletedAt = null, - public ?\DateTime $editedAt = null, - public ?string $parentID = null, - public ?string $text = null, + public ?array $latestReactions = null, + /** @var array|null */ + #[MapOf(FeedsReactionGroupResponse::class)] + public ?array $reactionGroups = null, /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, + /** @var array|null */ + #[ArrayOf(UserResponse::class)] + public ?array $mentionedUsers = null, + public ?string $status = null, // Status of the comment. One of: active, deleted, removed, hidden + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, + public ?\DateTime $editedAt = null, + public ?\DateTime $deletedAt = null, + public ?ModerationV2Response $moderation = null, + public ?int $replyCount = null, + public ?int $upvoteCount = null, + public ?int $downvoteCount = null, + public ?int $score = null, + public ?int $confidenceScore = null, + public ?int $controversyScore = null, /** @var array|null */ #[ArrayOf(FeedsReactionResponse::class)] - public ?array $latestReactions = null, - /** @var array|null Slice of nested comments (may be empty). */ + public ?array $ownReactions = null, + public ?RepliesMeta $meta = null, + /** @var array|null */ #[ArrayOf(ThreadedCommentResponse::class)] public ?array $replies = null, // Slice of nested comments (may be empty). - public ?object $custom = null, - public ?RepliesMeta $meta = null, - public ?ModerationV2Response $moderation = null, - public ?array $reactionGroups = null, ) { } diff --git a/src/GeneratedModels/Thresholds.php b/src/GeneratedModels/Thresholds.php index e86ed787..faf68771 100644 --- a/src/GeneratedModels/Thresholds.php +++ b/src/GeneratedModels/Thresholds.php @@ -5,10 +5,6 @@ namespace GetStream\GeneratedModels; /** * Sets thresholds for AI moderation - * - * @property LabelThresholds|null $explicit - * @property LabelThresholds|null $spam - * @property LabelThresholds|null $toxic */ class Thresholds extends BaseModel { diff --git a/src/GeneratedModels/ThumbnailResponse.php b/src/GeneratedModels/ThumbnailResponse.php index 81b63a99..44fbb607 100644 --- a/src/GeneratedModels/ThumbnailResponse.php +++ b/src/GeneratedModels/ThumbnailResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $imageUrl - */ class ThumbnailResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ThumbnailsSettings.php b/src/GeneratedModels/ThumbnailsSettings.php index 0bc5a01f..7a98bb18 100644 --- a/src/GeneratedModels/ThumbnailsSettings.php +++ b/src/GeneratedModels/ThumbnailsSettings.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - */ class ThumbnailsSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ThumbnailsSettingsRequest.php b/src/GeneratedModels/ThumbnailsSettingsRequest.php index 3f12bbf2..8205c2a8 100644 --- a/src/GeneratedModels/ThumbnailsSettingsRequest.php +++ b/src/GeneratedModels/ThumbnailsSettingsRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enabled - */ class ThumbnailsSettingsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/ThumbnailsSettingsResponse.php b/src/GeneratedModels/ThumbnailsSettingsResponse.php index 3624699f..117ec892 100644 --- a/src/GeneratedModels/ThumbnailsSettingsResponse.php +++ b/src/GeneratedModels/ThumbnailsSettingsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - */ class ThumbnailsSettingsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/Time.php b/src/GeneratedModels/Time.php index a38f5d7b..5feabf9d 100644 --- a/src/GeneratedModels/Time.php +++ b/src/GeneratedModels/Time.php @@ -3,9 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - */ class Time extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/TrackStatsResponse.php b/src/GeneratedModels/TrackStatsResponse.php index 87e36c99..7bd8ea4e 100644 --- a/src/GeneratedModels/TrackStatsResponse.php +++ b/src/GeneratedModels/TrackStatsResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $durationSeconds - * @property string $trackType - */ class TrackStatsResponse extends BaseModel { public function __construct( - public ?int $durationSeconds = null, public ?string $trackType = null, + public ?int $durationSeconds = null, ) { } diff --git a/src/GeneratedModels/TranscriptionSettings.php b/src/GeneratedModels/TranscriptionSettings.php index 492e08e6..376519e7 100644 --- a/src/GeneratedModels/TranscriptionSettings.php +++ b/src/GeneratedModels/TranscriptionSettings.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $closedCaptionMode - * @property string $language - * @property string $mode - * @property SpeechSegmentConfig|null $speechSegmentConfig - * @property TranslationSettings|null $translation - */ class TranscriptionSettings extends BaseModel { public function __construct( - public ?string $closedCaptionMode = null, - public ?string $language = null, // The language used in this call as a two letter code public ?string $mode = null, - public ?SpeechSegmentConfig $speechSegmentConfig = null, + public ?string $closedCaptionMode = null, // One of: available, disabled, auto-on + public ?string $language = null, // The language used in this call as a two letter code public ?TranslationSettings $translation = null, + public ?SpeechSegmentConfig $speechSegmentConfig = null, ) { } diff --git a/src/GeneratedModels/TranscriptionSettingsRequest.php b/src/GeneratedModels/TranscriptionSettingsRequest.php index c675cb8e..88e2d9bd 100644 --- a/src/GeneratedModels/TranscriptionSettingsRequest.php +++ b/src/GeneratedModels/TranscriptionSettingsRequest.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $closedCaptionMode - * @property string|null $language - * @property string|null $mode - * @property SpeechSegmentConfig|null $speechSegmentConfig - * @property TranslationSettings|null $translation - */ class TranscriptionSettingsRequest extends BaseModel { public function __construct( + public ?string $mode = null, public ?string $closedCaptionMode = null, public ?string $language = null, - public ?string $mode = null, - public ?SpeechSegmentConfig $speechSegmentConfig = null, public ?TranslationSettings $translation = null, + public ?SpeechSegmentConfig $speechSegmentConfig = null, ) { } diff --git a/src/GeneratedModels/TranscriptionSettingsResponse.php b/src/GeneratedModels/TranscriptionSettingsResponse.php index ca27dcd0..c3ac999b 100644 --- a/src/GeneratedModels/TranscriptionSettingsResponse.php +++ b/src/GeneratedModels/TranscriptionSettingsResponse.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $closedCaptionMode - * @property string $language - * @property string $mode - * @property SpeechSegmentConfig|null $speechSegmentConfig - * @property TranslationSettings|null $translation - */ class TranscriptionSettingsResponse extends BaseModel { public function __construct( + public ?string $mode = null, public ?string $closedCaptionMode = null, public ?string $language = null, - public ?string $mode = null, - public ?SpeechSegmentConfig $speechSegmentConfig = null, public ?TranslationSettings $translation = null, + public ?SpeechSegmentConfig $speechSegmentConfig = null, ) { } diff --git a/src/GeneratedModels/TranslateMessageRequest.php b/src/GeneratedModels/TranslateMessageRequest.php index 7528fde3..4a208346 100644 --- a/src/GeneratedModels/TranslateMessageRequest.php +++ b/src/GeneratedModels/TranslateMessageRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $language - */ class TranslateMessageRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/TranslationSettings.php b/src/GeneratedModels/TranslationSettings.php index f4216476..d8c61cb3 100644 --- a/src/GeneratedModels/TranslationSettings.php +++ b/src/GeneratedModels/TranslationSettings.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property array $languages - */ class TranslationSettings extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/TruncateChannelRequest.php b/src/GeneratedModels/TruncateChannelRequest.php index 82b811c7..f2be506e 100644 --- a/src/GeneratedModels/TruncateChannelRequest.php +++ b/src/GeneratedModels/TruncateChannelRequest.php @@ -3,26 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $hardDelete - * @property bool|null $skipPush - * @property \DateTime|null $truncatedAt - * @property string|null $userID - * @property array|null $memberIds - * @property MessageRequest|null $message - * @property UserRequest|null $user - */ class TruncateChannelRequest extends BaseModel { public function __construct( public ?bool $hardDelete = null, // Permanently delete channel data (messages, reactions, etc.) + public ?MessageRequest $message = null, public ?bool $skipPush = null, // When `message` is set disables all push notifications for it public ?\DateTime $truncatedAt = null, // Truncate channel data up to `truncated_at`. The system message (if provided) creation time is always greater than `truncated_at` - public ?string $userID = null, public ?array $memberIds = null, // List of member IDs to hide message history for. If empty, truncates the channel for all members - public ?MessageRequest $message = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/TruncateChannelResponse.php b/src/GeneratedModels/TruncateChannelResponse.php index 1600e842..8047cef4 100644 --- a/src/GeneratedModels/TruncateChannelResponse.php +++ b/src/GeneratedModels/TruncateChannelResponse.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ChannelResponse|null $channel - * @property MessageResponse|null $message - */ class TruncateChannelResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/TypingIndicatorsResponse.php b/src/GeneratedModels/TypingIndicatorsResponse.php index 8fbfd04d..8af2c2b8 100644 --- a/src/GeneratedModels/TypingIndicatorsResponse.php +++ b/src/GeneratedModels/TypingIndicatorsResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $enabled - */ class TypingIndicatorsResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UnbanActionRequestPayload.php b/src/GeneratedModels/UnbanActionRequestPayload.php new file mode 100644 index 00000000..0d272c84 --- /dev/null +++ b/src/GeneratedModels/UnbanActionRequestPayload.php @@ -0,0 +1,19 @@ + $follows - * @property bool|null $deleteNotificationActivity - */ class UnfollowBatchRequest extends BaseModel { public function __construct( - /** @var array|null List of follow relationships to remove */ + /** @var array|null */ #[ArrayOf(FollowPair::class)] public ?array $follows = null, // List of follow relationships to remove public ?bool $deleteNotificationActivity = null, // Whether to delete the corresponding notification activity (default: false) diff --git a/src/GeneratedModels/UnfollowBatchResponse.php b/src/GeneratedModels/UnfollowBatchResponse.php index 295a51f0..f34adb9f 100644 --- a/src/GeneratedModels/UnfollowBatchResponse.php +++ b/src/GeneratedModels/UnfollowBatchResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $follows - */ class UnfollowBatchResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of follow relationships that were removed */ + /** @var array|null */ #[ArrayOf(FollowResponse::class)] public ?array $follows = null, // List of follow relationships that were removed + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UnfollowResponse.php b/src/GeneratedModels/UnfollowResponse.php index a8edc0af..1fff3a4f 100644 --- a/src/GeneratedModels/UnfollowResponse.php +++ b/src/GeneratedModels/UnfollowResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FollowResponse $follow - */ class UnfollowResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FollowResponse $follow = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UnmuteChannelRequest.php b/src/GeneratedModels/UnmuteChannelRequest.php index 0fda390b..6ef5e397 100644 --- a/src/GeneratedModels/UnmuteChannelRequest.php +++ b/src/GeneratedModels/UnmuteChannelRequest.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $expiration - * @property string|null $userID - * @property array|null $channelCids - * @property UserRequest|null $user - */ class UnmuteChannelRequest extends BaseModel { public function __construct( + public ?array $channelCids = null, // Channel CIDs to mute (if multiple channels) public ?int $expiration = null, // Duration of mute in milliseconds public ?string $userID = null, - public ?array $channelCids = null, // Channel CIDs to mute (if multiple channels) public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UnmuteRequest.php b/src/GeneratedModels/UnmuteRequest.php index 26bbcfa1..a69feff4 100644 --- a/src/GeneratedModels/UnmuteRequest.php +++ b/src/GeneratedModels/UnmuteRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $targetIds - * @property string|null $userID - * @property UserRequest|null $user - */ class UnmuteRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UnmuteResponse.php b/src/GeneratedModels/UnmuteResponse.php index b9b1f3cc..2dc6c938 100644 --- a/src/GeneratedModels/UnmuteResponse.php +++ b/src/GeneratedModels/UnmuteResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * Basic response information - * - * @property string $duration - * @property array|null $nonExistingUsers - */ class UnmuteResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - public ?array $nonExistingUsers = null, + public ?array $nonExistingUsers = null, // A list of users that can't be found. Common cause for this is deleted users + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UnpinActivityResponse.php b/src/GeneratedModels/UnpinActivityResponse.php index 0ecc879f..c3c0935f 100644 --- a/src/GeneratedModels/UnpinActivityResponse.php +++ b/src/GeneratedModels/UnpinActivityResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string $feed - * @property string $userID - * @property ActivityResponse $activity - */ class UnpinActivityResponse extends BaseModel { public function __construct( - public ?string $duration = null, + public ?ActivityResponse $activity = null, public ?string $feed = null, // Fully qualified ID of the feed the activity was unpinned from public ?string $userID = null, // ID of the user who unpinned the activity - public ?ActivityResponse $activity = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UnpinRequest.php b/src/GeneratedModels/UnpinRequest.php index ae0e8e78..5414eec9 100644 --- a/src/GeneratedModels/UnpinRequest.php +++ b/src/GeneratedModels/UnpinRequest.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * UnpinRequest is the payload for unpinning a message. - * - * @property string $sessionID - * @property string $userID */ class UnpinRequest extends BaseModel { public function __construct( - public ?string $sessionID = null, // the session ID of the user who pinned the message public ?string $userID = null, // the user ID of the user who pinned the message + public ?string $sessionID = null, // the session ID of the user who pinned the message ) { } diff --git a/src/GeneratedModels/UnpinResponse.php b/src/GeneratedModels/UnpinResponse.php index 1d32dbd5..dd2335ad 100644 --- a/src/GeneratedModels/UnpinResponse.php +++ b/src/GeneratedModels/UnpinResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * UnpinResponse is the payload for unpinning a message. - * - * @property string $duration */ class UnpinResponse extends BaseModel { diff --git a/src/GeneratedModels/UnreadCountsBatchRequest.php b/src/GeneratedModels/UnreadCountsBatchRequest.php index 776e7765..9a6ce65e 100644 --- a/src/GeneratedModels/UnreadCountsBatchRequest.php +++ b/src/GeneratedModels/UnreadCountsBatchRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $userIds - */ class UnreadCountsBatchRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UnreadCountsBatchResponse.php b/src/GeneratedModels/UnreadCountsBatchResponse.php index d1821147..c9e6f0aa 100644 --- a/src/GeneratedModels/UnreadCountsBatchResponse.php +++ b/src/GeneratedModels/UnreadCountsBatchResponse.php @@ -5,15 +5,14 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $countsByUser */ class UnreadCountsBatchResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds + /** @var array|null */ + #[MapOf(UnreadCountsResponse::class)] public ?array $countsByUser = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UnreadCountsChannel.php b/src/GeneratedModels/UnreadCountsChannel.php index 6fd28f54..88612548 100644 --- a/src/GeneratedModels/UnreadCountsChannel.php +++ b/src/GeneratedModels/UnreadCountsChannel.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $channelID - * @property \DateTime $lastRead - * @property int $unreadCount - */ class UnreadCountsChannel extends BaseModel { public function __construct( public ?string $channelID = null, - public ?\DateTime $lastRead = null, public ?int $unreadCount = null, + public ?\DateTime $lastRead = null, ) { } diff --git a/src/GeneratedModels/UnreadCountsChannelType.php b/src/GeneratedModels/UnreadCountsChannelType.php index 70f054c2..0effc748 100644 --- a/src/GeneratedModels/UnreadCountsChannelType.php +++ b/src/GeneratedModels/UnreadCountsChannelType.php @@ -3,18 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $channelCount - * @property string $channelType - * @property int $unreadCount - */ class UnreadCountsChannelType extends BaseModel { public function __construct( - public ?int $channelCount = null, public ?string $channelType = null, + public ?int $channelCount = null, public ?int $unreadCount = null, ) { } diff --git a/src/GeneratedModels/UnreadCountsResponse.php b/src/GeneratedModels/UnreadCountsResponse.php index 269323d2..e0ed244c 100644 --- a/src/GeneratedModels/UnreadCountsResponse.php +++ b/src/GeneratedModels/UnreadCountsResponse.php @@ -3,31 +3,21 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $totalUnreadCount - * @property int $totalUnreadThreadsCount - * @property array $channelType - * @property array $channels - * @property array $threads - * @property array|null $totalUnreadCountByTeam - */ class UnreadCountsResponse extends BaseModel { public function __construct( public ?int $totalUnreadCount = null, public ?int $totalUnreadThreadsCount = null, - /** @var array|null */ - #[ArrayOf(UnreadCountsChannelType::class)] - public ?array $channelType = null, + public ?array $totalUnreadCountByTeam = null, /** @var array|null */ #[ArrayOf(UnreadCountsChannel::class)] public ?array $channels = null, + /** @var array|null */ + #[ArrayOf(UnreadCountsChannelType::class)] + public ?array $channelType = null, /** @var array|null */ #[ArrayOf(UnreadCountsThread::class)] public ?array $threads = null, - public ?array $totalUnreadCountByTeam = null, ) { } diff --git a/src/GeneratedModels/UnreadCountsThread.php b/src/GeneratedModels/UnreadCountsThread.php index 4117c3f0..628e2904 100644 --- a/src/GeneratedModels/UnreadCountsThread.php +++ b/src/GeneratedModels/UnreadCountsThread.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $lastRead - * @property string $lastReadMessageID - * @property string $parentMessageID - * @property int $unreadCount - */ class UnreadCountsThread extends BaseModel { public function __construct( + public ?int $unreadCount = null, public ?\DateTime $lastRead = null, public ?string $lastReadMessageID = null, public ?string $parentMessageID = null, - public ?int $unreadCount = null, ) { } diff --git a/src/GeneratedModels/UpdateActivitiesPartialBatchRequest.php b/src/GeneratedModels/UpdateActivitiesPartialBatchRequest.php index feaa7f60..089e85bd 100644 --- a/src/GeneratedModels/UpdateActivitiesPartialBatchRequest.php +++ b/src/GeneratedModels/UpdateActivitiesPartialBatchRequest.php @@ -3,15 +3,10 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $changes - */ class UpdateActivitiesPartialBatchRequest extends BaseModel { public function __construct( - /** @var array|null List of activity changes to apply. Each change specifies an activity ID and the fields to set/unset */ + /** @var array|null */ #[ArrayOf(UpdateActivityPartialChangeRequest::class)] public ?array $changes = null, // List of activity changes to apply. Each change specifies an activity ID and the fields to set/unset ) { diff --git a/src/GeneratedModels/UpdateActivitiesPartialBatchResponse.php b/src/GeneratedModels/UpdateActivitiesPartialBatchResponse.php index abc3ff84..02c07bc0 100644 --- a/src/GeneratedModels/UpdateActivitiesPartialBatchResponse.php +++ b/src/GeneratedModels/UpdateActivitiesPartialBatchResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $activities - */ class UpdateActivitiesPartialBatchResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of successfully updated activities */ + /** @var array|null */ #[ArrayOf(ActivityResponse::class)] public ?array $activities = null, // List of successfully updated activities + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateActivityPartialChangeRequest.php b/src/GeneratedModels/UpdateActivityPartialChangeRequest.php index 5d579075..fd4cc34a 100644 --- a/src/GeneratedModels/UpdateActivityPartialChangeRequest.php +++ b/src/GeneratedModels/UpdateActivityPartialChangeRequest.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $activityID - * @property bool|null $handleMentionNotifications - * @property array|null $unset - * @property object|null $set - */ class UpdateActivityPartialChangeRequest extends BaseModel { public function __construct( public ?string $activityID = null, // ID of the activity to update - public ?bool $handleMentionNotifications = null, // When true and 'mentioned_user_ids' is updated, automatically creates or deletes mention notifications for added/removed users. Only applicable for client-side requests (ignored for server-side requests) - public ?array $unset = null, // List of field names to remove. Supported fields: 'custom', 'location', 'expires_at', 'filter_tags', 'interest_tags', 'attachments', 'poll_id', 'mentioned_user_ids'. Use dot-notation for nested custom fields (e.g., 'custom.field_name') public ?object $set = null, // Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility', 'visibility_tag', 'restrict_replies' (values: 'everyone', 'people_i_follow', 'nobody'), 'location', 'expires_at', 'filter_tags', 'interest_tags', 'poll_id', 'feeds', 'mentioned_user_ids'. For custom fields, use dot-notation (e.g., 'custom.field_name') + public ?array $unset = null, // List of field names to remove. Supported fields: 'custom', 'location', 'expires_at', 'filter_tags', 'interest_tags', 'attachments', 'poll_id', 'mentioned_user_ids'. Use dot-notation for nested custom fields (e.g., 'custom.field_name') + public ?bool $handleMentionNotifications = null, // When true and 'mentioned_user_ids' is updated, automatically creates or deletes mention notifications for added/removed users. Only applicable for client-side requests (ignored for server-side requests) + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) ) { } diff --git a/src/GeneratedModels/UpdateActivityPartialRequest.php b/src/GeneratedModels/UpdateActivityPartialRequest.php index bf56e524..fc71a45b 100644 --- a/src/GeneratedModels/UpdateActivityPartialRequest.php +++ b/src/GeneratedModels/UpdateActivityPartialRequest.php @@ -3,22 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $handleMentionNotifications - * @property string|null $userID - * @property array|null $unset - * @property object|null $set - * @property UserRequest|null $user - */ class UpdateActivityPartialRequest extends BaseModel { public function __construct( + public ?object $set = null, // Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility', 'visibility_tag', 'restrict_replies' (values: 'everyone', 'people_i_follow', 'nobody'), 'location', 'expires_at', 'filter_tags', 'interest_tags', 'poll_id', 'feeds', 'mentioned_user_ids', 'search_data'. For custom fields, use dot-notation (e.g., 'custom.field_name') + public ?array $unset = null, // List of field names to remove. Supported fields: 'custom', 'visibility_tag', 'location', 'expires_at', 'filter_tags', 'interest_tags', 'attachments', 'poll_id', 'mentioned_user_ids', 'search_data'. Use dot-notation for nested custom fields (e.g., 'custom.field_name') public ?bool $handleMentionNotifications = null, // If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) + public ?bool $runActivityProcessors = null, // If true, runs activity processors on the updated activity. Processors will only run if the activity text and/or attachments are changed. Defaults to false. public ?string $userID = null, - public ?array $unset = null, // List of field names to remove. Supported fields: 'custom', 'location', 'expires_at', 'filter_tags', 'interest_tags', 'attachments', 'poll_id', 'mentioned_user_ids'. Use dot-notation for nested custom fields (e.g., 'custom.field_name') - public ?object $set = null, // Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility', 'visibility_tag', 'restrict_replies' (values: 'everyone', 'people_i_follow', 'nobody'), 'location', 'expires_at', 'filter_tags', 'interest_tags', 'poll_id', 'feeds', 'mentioned_user_ids'. For custom fields, use dot-notation (e.g., 'custom.field_name') public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdateActivityPartialResponse.php b/src/GeneratedModels/UpdateActivityPartialResponse.php index 1cd693f6..fb9cd1e2 100644 --- a/src/GeneratedModels/UpdateActivityPartialResponse.php +++ b/src/GeneratedModels/UpdateActivityPartialResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ActivityResponse $activity - */ class UpdateActivityPartialResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?ActivityResponse $activity = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateActivityRequest.php b/src/GeneratedModels/UpdateActivityRequest.php index f955b80d..c5df0a9a 100644 --- a/src/GeneratedModels/UpdateActivityRequest.php +++ b/src/GeneratedModels/UpdateActivityRequest.php @@ -3,50 +3,31 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime|null $expiresAt - * @property bool|null $handleMentionNotifications - * @property string|null $pollID - * @property string|null $restrictReplies - * @property bool|null $skipEnrichUrl - * @property string|null $text - * @property string|null $userID - * @property string|null $visibility - * @property string|null $visibilityTag - * @property array|null $attachments - * @property array|null $collectionRefs - * @property array|null $feeds - * @property array|null $filterTags - * @property array|null $interestTags - * @property array|null $mentionedUserIds - * @property object|null $custom - * @property ActivityLocation|null $location - * @property UserRequest|null $user - */ class UpdateActivityRequest extends BaseModel { public function __construct( - public ?\DateTime $expiresAt = null, // Time when the activity will expire - public ?bool $handleMentionNotifications = null, // If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned - public ?string $pollID = null, // Poll ID - public ?string $restrictReplies = null, // Controls who can add comments/replies to this activity. Options: 'everyone' (default - anyone can reply), 'people_i_follow' (only people the activity creator follows can reply), 'nobody' (no one can reply) - public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for the activity public ?string $text = null, // The text content of the activity - public ?string $userID = null, - public ?string $visibility = null, // Visibility setting for the activity - public ?string $visibilityTag = null, // If visibility is 'tag', this is the tag name and is required - /** @var array|null List of attachments for the activity */ + /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, // List of attachments for the activity - public ?array $collectionRefs = null, // Collections that this activity references - public ?array $feeds = null, // List of feeds the activity is present in + public ?object $custom = null, // Custom data for the activity + public ?string $visibility = null, // Visibility setting for the activity + public ?string $visibilityTag = null, // If visibility is 'tag', this is the tag name and is required + public ?string $restrictReplies = null, // Controls who can add comments/replies to this activity. One of: everyone, people_i_follow, nobody + public ?ActivityLocation $location = null, + public ?\DateTime $expiresAt = null, // Time when the activity will expire public ?array $filterTags = null, // Tags used for filtering the activity public ?array $interestTags = null, // Tags indicating interest categories + public ?array $collectionRefs = null, // Collections that this activity references + public ?string $pollID = null, // Poll ID + public ?array $feeds = null, // List of feeds the activity is present in + public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for the activity public ?array $mentionedUserIds = null, // List of user IDs mentioned in the activity - public ?object $custom = null, // Custom data for the activity - public ?ActivityLocation $location = null, + public ?bool $handleMentionNotifications = null, // If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned + public ?bool $runActivityProcessors = null, // If true, runs activity processors on the updated activity. Processors will only run if the activity text and/or attachments are changed. Defaults to false. + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) + public ?object $searchData = null, // Additional data for search indexing + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdateActivityResponse.php b/src/GeneratedModels/UpdateActivityResponse.php index 79658b3a..d20d9e76 100644 --- a/src/GeneratedModels/UpdateActivityResponse.php +++ b/src/GeneratedModels/UpdateActivityResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ActivityResponse $activity - */ class UpdateActivityResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?ActivityResponse $activity = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateAppRequest.php b/src/GeneratedModels/UpdateAppRequest.php index 078733f5..e735d867 100644 --- a/src/GeneratedModels/UpdateAppRequest.php +++ b/src/GeneratedModels/UpdateAppRequest.php @@ -3,109 +3,59 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $asyncUrlEnrichEnabled - * @property bool|null $autoTranslationEnabled - * @property string|null $beforeMessageSendHookUrl - * @property int|null $cdnExpirationSeconds - * @property bool|null $channelHideMembersOnly - * @property string|null $customActionHandlerUrl - * @property bool|null $disableAuthChecks - * @property bool|null $disablePermissionsChecks - * @property string|null $enforceUniqueUsernames - * @property bool|null $feedsModerationEnabled - * @property string|null $feedsV2Region - * @property bool|null $guestUserCreationDisabled - * @property bool|null $imageModerationEnabled - * @property int|null $maxAggregatedActivitiesLength - * @property bool|null $migratePermissionsToV2 - * @property bool|null $moderationEnabled - * @property string|null $moderationWebhookUrl - * @property bool|null $multiTenantEnabled - * @property string|null $permissionVersion - * @property int|null $remindersInterval - * @property int|null $remindersMaxMembers - * @property \DateTime|null $revokeTokensIssuedBefore - * @property string|null $snsKey - * @property string|null $snsSecret - * @property string|null $snsTopicArn - * @property string|null $sqsKey - * @property string|null $sqsSecret - * @property string|null $sqsUrl - * @property bool|null $userResponseTimeEnabled - * @property string|null $webhookUrl - * @property array|null $allowedFlagReasons - * @property array|null $eventHooks - * @property array|null $imageModerationBlockLabels - * @property array|null $imageModerationLabels - * @property array|null $userSearchDisallowedRoles - * @property array|null $webhookEvents - * @property APNConfig|null $apnConfig - * @property AsyncModerationConfiguration|null $asyncModerationConfig - * @property DataDogInfo|null $datadogInfo - * @property FileUploadConfig|null $fileUploadConfig - * @property FirebaseConfig|null $firebaseConfig - * @property array|null $grants - * @property HuaweiConfig|null $huaweiConfig - * @property FileUploadConfig|null $imageUploadConfig - * @property ModerationDashboardPreferences|null $moderationDashboardPreferences - * @property PushConfig|null $pushConfig - * @property XiaomiConfig|null $xiaomiConfig - */ class UpdateAppRequest extends BaseModel { public function __construct( - public ?bool $asyncUrlEnrichEnabled = null, - public ?bool $autoTranslationEnabled = null, - public ?string $beforeMessageSendHookUrl = null, - public ?int $cdnExpirationSeconds = null, - public ?bool $channelHideMembersOnly = null, - public ?string $customActionHandlerUrl = null, public ?bool $disableAuthChecks = null, public ?bool $disablePermissionsChecks = null, - public ?string $enforceUniqueUsernames = null, - public ?bool $feedsModerationEnabled = null, - public ?string $feedsV2Region = null, - public ?bool $guestUserCreationDisabled = null, - public ?bool $imageModerationEnabled = null, - public ?int $maxAggregatedActivitiesLength = null, - public ?bool $migratePermissionsToV2 = null, + public ?APNConfig $apnConfig = null, + public ?FirebaseConfig $firebaseConfig = null, + public ?HuaweiConfig $huaweiConfig = null, + public ?XiaomiConfig $xiaomiConfig = null, + public ?PushConfig $pushConfig = null, + public ?string $webhookUrl = null, public ?bool $moderationEnabled = null, + public ?bool $moderationAnalyticsEnabled = null, public ?string $moderationWebhookUrl = null, - public ?bool $multiTenantEnabled = null, public ?string $permissionVersion = null, - public ?int $remindersInterval = null, - public ?int $remindersMaxMembers = null, - public ?\DateTime $revokeTokensIssuedBefore = null, - public ?string $snsKey = null, - public ?string $snsSecret = null, - public ?string $snsTopicArn = null, + public ?array $userSearchDisallowedRoles = null, + public ?bool $multiTenantEnabled = null, + public ?array $imageModerationLabels = null, + public ?array $imageModerationBlockLabels = null, + public ?bool $imageModerationEnabled = null, + public ?array $allowedFlagReasons = null, + public ?bool $autoTranslationEnabled = null, + public ?bool $asyncUrlEnrichEnabled = null, + public ?string $beforeMessageSendHookUrl = null, + public ?string $customActionHandlerUrl = null, + public ?string $enforceUniqueUsernames = null, + public ?string $sqsUrl = null, public ?string $sqsKey = null, public ?string $sqsSecret = null, - public ?string $sqsUrl = null, - public ?bool $userResponseTimeEnabled = null, - public ?string $webhookUrl = null, - public ?array $allowedFlagReasons = null, - /** @var array|null */ - #[ArrayOf(EventHook::class)] - public ?array $eventHooks = null, - public ?array $imageModerationBlockLabels = null, - public ?array $imageModerationLabels = null, - public ?array $userSearchDisallowedRoles = null, + public ?string $snsTopicArn = null, + public ?string $snsKey = null, + public ?string $snsSecret = null, + public ?FileUploadConfig $imageUploadConfig = null, + public ?FileUploadConfig $fileUploadConfig = null, + public ?\DateTime $revokeTokensIssuedBefore = null, public ?array $webhookEvents = null, - public ?APNConfig $apnConfig = null, + public ?bool $channelHideMembersOnly = null, + public ?array $grants = null, + public ?bool $migratePermissionsToV2 = null, + public ?int $remindersInterval = null, + public ?int $remindersMaxMembers = null, + public ?int $cdnExpirationSeconds = null, public ?AsyncModerationConfiguration $asyncModerationConfig = null, public ?DataDogInfo $datadogInfo = null, - public ?FileUploadConfig $fileUploadConfig = null, - public ?FirebaseConfig $firebaseConfig = null, - public ?array $grants = null, - public ?HuaweiConfig $huaweiConfig = null, - public ?FileUploadConfig $imageUploadConfig = null, + public ?string $feedsV2Region = null, + public ?bool $feedsModerationEnabled = null, + public ?bool $guestUserCreationDisabled = null, public ?ModerationDashboardPreferences $moderationDashboardPreferences = null, - public ?PushConfig $pushConfig = null, - public ?XiaomiConfig $xiaomiConfig = null, + /** @var array|null */ + #[ArrayOf(EventHook::class)] + public ?array $eventHooks = null, + public ?bool $userResponseTimeEnabled = null, + public ?int $maxAggregatedActivitiesLength = null, ) { } diff --git a/src/GeneratedModels/UpdateBlockListRequest.php b/src/GeneratedModels/UpdateBlockListRequest.php index d042d98c..f111abdc 100644 --- a/src/GeneratedModels/UpdateBlockListRequest.php +++ b/src/GeneratedModels/UpdateBlockListRequest.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $isLeetCheckEnabled - * @property bool|null $isPluralCheckEnabled - * @property string|null $team - * @property array|null $words - */ class UpdateBlockListRequest extends BaseModel { public function __construct( - public ?bool $isLeetCheckEnabled = null, - public ?bool $isPluralCheckEnabled = null, public ?string $team = null, public ?array $words = null, // List of words to block + public ?bool $isLeetCheckEnabled = null, + public ?bool $isPluralCheckEnabled = null, ) { } diff --git a/src/GeneratedModels/UpdateBlockListResponse.php b/src/GeneratedModels/UpdateBlockListResponse.php index 850a0485..89c9ce0e 100644 --- a/src/GeneratedModels/UpdateBlockListResponse.php +++ b/src/GeneratedModels/UpdateBlockListResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property BlockListResponse|null $blocklist */ class UpdateBlockListResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?BlockListResponse $blocklist = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdateBookmarkFolderRequest.php b/src/GeneratedModels/UpdateBookmarkFolderRequest.php index 10e22a05..c1e17543 100644 --- a/src/GeneratedModels/UpdateBookmarkFolderRequest.php +++ b/src/GeneratedModels/UpdateBookmarkFolderRequest.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $name - * @property string|null $userID - * @property object|null $custom - * @property UserRequest|null $user - */ class UpdateBookmarkFolderRequest extends BaseModel { public function __construct( public ?string $name = null, // Name of the folder - public ?string $userID = null, public ?object $custom = null, // Custom data for the folder + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdateBookmarkFolderResponse.php b/src/GeneratedModels/UpdateBookmarkFolderResponse.php index d889db08..e2153676 100644 --- a/src/GeneratedModels/UpdateBookmarkFolderResponse.php +++ b/src/GeneratedModels/UpdateBookmarkFolderResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property BookmarkFolderResponse $bookmarkFolder - */ class UpdateBookmarkFolderResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?BookmarkFolderResponse $bookmarkFolder = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateBookmarkRequest.php b/src/GeneratedModels/UpdateBookmarkRequest.php index 27c2cc75..59575a5b 100644 --- a/src/GeneratedModels/UpdateBookmarkRequest.php +++ b/src/GeneratedModels/UpdateBookmarkRequest.php @@ -3,24 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $folderID - * @property string|null $newFolderID - * @property string|null $userID - * @property object|null $custom - * @property AddFolderRequest|null $newFolder - * @property UserRequest|null $user - */ class UpdateBookmarkRequest extends BaseModel { public function __construct( public ?string $folderID = null, // ID of the folder to move the bookmark to public ?string $newFolderID = null, - public ?string $userID = null, - public ?object $custom = null, // Custom data for the bookmark public ?AddFolderRequest $newFolder = null, + public ?object $custom = null, // Custom data for the bookmark + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdateBookmarkResponse.php b/src/GeneratedModels/UpdateBookmarkResponse.php index 4f5573c1..29cd7e14 100644 --- a/src/GeneratedModels/UpdateBookmarkResponse.php +++ b/src/GeneratedModels/UpdateBookmarkResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property BookmarkResponse $bookmark - */ class UpdateBookmarkResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?BookmarkResponse $bookmark = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateCallMembersRequest.php b/src/GeneratedModels/UpdateCallMembersRequest.php index 4de81359..c7c3a4c2 100644 --- a/src/GeneratedModels/UpdateCallMembersRequest.php +++ b/src/GeneratedModels/UpdateCallMembersRequest.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Update call members - * - * @property array|null $removeMembers - * @property array|null $updateMembers */ class UpdateCallMembersRequest extends BaseModel { public function __construct( public ?array $removeMembers = null, // List of userID to remove - /** @var array|null List of members to update or insert */ + /** @var array|null */ #[ArrayOf(MemberRequest::class)] public ?array $updateMembers = null, // List of members to update or insert ) { diff --git a/src/GeneratedModels/UpdateCallMembersResponse.php b/src/GeneratedModels/UpdateCallMembersResponse.php index 8ecb39d0..9d13acf5 100644 --- a/src/GeneratedModels/UpdateCallMembersResponse.php +++ b/src/GeneratedModels/UpdateCallMembersResponse.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $members */ class UpdateCallMembersResponse extends BaseModel { diff --git a/src/GeneratedModels/UpdateCallRequest.php b/src/GeneratedModels/UpdateCallRequest.php index 2c1db1a3..35bbacf2 100644 --- a/src/GeneratedModels/UpdateCallRequest.php +++ b/src/GeneratedModels/UpdateCallRequest.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * Request for updating a call - * - * @property \DateTime|null $startsAt - * @property object|null $custom - * @property CallSettingsRequest|null $settingsOverride */ class UpdateCallRequest extends BaseModel { public function __construct( - public ?\DateTime $startsAt = null, // the time the call is scheduled to start public ?object $custom = null, // Custom data for this object public ?CallSettingsRequest $settingsOverride = null, + public ?\DateTime $startsAt = null, // the time the call is scheduled to start ) { } diff --git a/src/GeneratedModels/UpdateCallResponse.php b/src/GeneratedModels/UpdateCallResponse.php index a2db059e..e414c803 100644 --- a/src/GeneratedModels/UpdateCallResponse.php +++ b/src/GeneratedModels/UpdateCallResponse.php @@ -5,23 +5,18 @@ namespace GetStream\GeneratedModels; /** * Response for updating a call - * - * @property string $duration - * @property array $members - * @property array $ownCapabilities - * @property CallResponse $call */ class UpdateCallResponse extends BaseModel { public function __construct( - public ?string $duration = null, + public ?CallResponse $call = null, /** @var array|null */ #[ArrayOf(MemberResponse::class)] public ?array $members = null, /** @var array|null */ #[ArrayOf(OwnCapability::class)] public ?array $ownCapabilities = null, - public ?CallResponse $call = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateCallTypeRequest.php b/src/GeneratedModels/UpdateCallTypeRequest.php index 3df3ad87..ff154363 100644 --- a/src/GeneratedModels/UpdateCallTypeRequest.php +++ b/src/GeneratedModels/UpdateCallTypeRequest.php @@ -5,19 +5,14 @@ namespace GetStream\GeneratedModels; /** * UpdateCallTypeRequest is the payload for updating a call type. - * - * @property string|null $externalStorage - * @property array|null $grants - * @property NotificationSettings|null $notificationSettings - * @property CallSettingsRequest|null $settings */ class UpdateCallTypeRequest extends BaseModel { public function __construct( - public ?string $externalStorage = null, public ?array $grants = null, - public ?NotificationSettings $notificationSettings = null, + public ?NotificationSettingsRequest $notificationSettings = null, public ?CallSettingsRequest $settings = null, + public ?string $externalStorage = null, ) { } diff --git a/src/GeneratedModels/UpdateCallTypeResponse.php b/src/GeneratedModels/UpdateCallTypeResponse.php index 934ef0a5..cd4bc210 100644 --- a/src/GeneratedModels/UpdateCallTypeResponse.php +++ b/src/GeneratedModels/UpdateCallTypeResponse.php @@ -5,27 +5,18 @@ namespace GetStream\GeneratedModels; /** * UpdateCallTypeResponse is the payload for updating a call type. - * - * @property \DateTime $createdAt - * @property string $duration - * @property string $name - * @property \DateTime $updatedAt - * @property array $grants - * @property NotificationSettings $notificationSettings - * @property CallSettingsResponse $settings - * @property string|null $externalStorage */ class UpdateCallTypeResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // the time the call type was created - public ?string $duration = null, public ?string $name = null, // the name of the call type - public ?\DateTime $updatedAt = null, // the time the call type was last updated public ?array $grants = null, // the permissions granted to each role - public ?NotificationSettings $notificationSettings = null, public ?CallSettingsResponse $settings = null, + public ?NotificationSettingsResponse $notificationSettings = null, + public ?\DateTime $createdAt = null, // the time the call type was created + public ?\DateTime $updatedAt = null, // the time the call type was last updated public ?string $externalStorage = null, // the external storage for the call type + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateChannelPartialRequest.php b/src/GeneratedModels/UpdateChannelPartialRequest.php index 515d2a71..2aef32dd 100644 --- a/src/GeneratedModels/UpdateChannelPartialRequest.php +++ b/src/GeneratedModels/UpdateChannelPartialRequest.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $userID - * @property array|null $unset - * @property object|null $set - * @property UserRequest|null $user - */ class UpdateChannelPartialRequest extends BaseModel { public function __construct( - public ?string $userID = null, - public ?array $unset = null, public ?object $set = null, + public ?array $unset = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdateChannelPartialResponse.php b/src/GeneratedModels/UpdateChannelPartialResponse.php index 82146623..6e5b47e8 100644 --- a/src/GeneratedModels/UpdateChannelPartialResponse.php +++ b/src/GeneratedModels/UpdateChannelPartialResponse.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $members - * @property ChannelResponse|null $channel - */ class UpdateChannelPartialResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null List of updated members */ + public ?ChannelResponse $channel = null, + /** @var array|null */ #[ArrayOf(ChannelMemberResponse::class)] public ?array $members = null, // List of updated members - public ?ChannelResponse $channel = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdateChannelRequest.php b/src/GeneratedModels/UpdateChannelRequest.php index 5abeda08..6812c6a1 100644 --- a/src/GeneratedModels/UpdateChannelRequest.php +++ b/src/GeneratedModels/UpdateChannelRequest.php @@ -3,54 +3,32 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $acceptInvite - * @property int|null $cooldown - * @property bool|null $hideHistory - * @property \DateTime|null $hideHistoryBefore - * @property bool|null $rejectInvite - * @property bool|null $skipPush - * @property string|null $userID - * @property array|null $addFilterTags - * @property array|null $addMembers - * @property array|null $addModerators - * @property array|null $assignRoles - * @property array|null $demoteModerators - * @property array|null $invites - * @property array|null $removeFilterTags - * @property array|null $removeMembers - * @property ChannelInputRequest|null $data - * @property MessageRequest|null $message - * @property UserRequest|null $user - */ class UpdateChannelRequest extends BaseModel { public function __construct( - public ?bool $acceptInvite = null, // Set to `true` to accept the invite - public ?int $cooldown = null, // Sets cool down period for the channel in seconds - public ?bool $hideHistory = null, // Set to `true` to hide channel's history when adding new members - public ?\DateTime $hideHistoryBefore = null, // If set, hides channel's history before this time when adding new members. Takes precedence over `hide_history` when both are provided. Must be in RFC3339 format (e.g., "2024-01-01T10:00:00Z") and in the past. - public ?bool $rejectInvite = null, // Set to `true` to reject the invite - public ?bool $skipPush = null, // When `message` is set disables all push notifications for it - public ?string $userID = null, - public ?array $addFilterTags = null, // List of filter tags to add to the channel - /** @var array|null List of user IDs to add to the channel */ + /** @var array|null */ #[ArrayOf(ChannelMemberRequest::class)] public ?array $addMembers = null, // List of user IDs to add to the channel + public ?array $removeMembers = null, // List of user IDs to remove from the channel public ?array $addModerators = null, // List of user IDs to make channel moderators - /** @var array|null List of channel member role assignments. If any specified user is not part of the channel, the request will fail */ - #[ArrayOf(ChannelMemberRequest::class)] - public ?array $assignRoles = null, // List of channel member role assignments. If any specified user is not part of the channel, the request will fail public ?array $demoteModerators = null, // List of user IDs to take away moderators status from - /** @var array|null List of user IDs to invite to the channel */ + /** @var array|null */ #[ArrayOf(ChannelMemberRequest::class)] public ?array $invites = null, // List of user IDs to invite to the channel + /** @var array|null */ + #[ArrayOf(ChannelMemberRequest::class)] + public ?array $assignRoles = null, // List of channel member role assignments. If any specified user is not part of the channel, the request will fail + public ?int $cooldown = null, // Sets cool down period for the channel in seconds + public ?bool $acceptInvite = null, // Set to `true` to accept the invite + public ?bool $rejectInvite = null, // Set to `true` to reject the invite + public ?MessageRequest $message = null, + public ?bool $skipPush = null, // When `message` is set disables all push notifications for it + public ?bool $hideHistory = null, // Set to `true` to hide channel's history when adding new members + public ?\DateTime $hideHistoryBefore = null, // If set, hides channel's history before this time when adding new members. Takes precedence over `hide_history` when both are provided. Must be in RFC3339 format (e.g., "2024-01-01T10:00:00Z") and in the past. + public ?array $addFilterTags = null, // List of filter tags to add to the channel public ?array $removeFilterTags = null, // List of filter tags to remove from the channel - public ?array $removeMembers = null, // List of user IDs to remove from the channel public ?ChannelInputRequest $data = null, - public ?MessageRequest $message = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdateChannelResponse.php b/src/GeneratedModels/UpdateChannelResponse.php index a36aa433..28a7dfff 100644 --- a/src/GeneratedModels/UpdateChannelResponse.php +++ b/src/GeneratedModels/UpdateChannelResponse.php @@ -3,23 +3,15 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $members - * @property ChannelResponse|null $channel - * @property MessageResponse|null $message - */ class UpdateChannelResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - /** @var array|null List of channel members */ - #[ArrayOf(ChannelMemberResponse::class)] - public ?array $members = null, // List of channel members public ?ChannelResponse $channel = null, public ?MessageResponse $message = null, + /** @var array|null */ + #[ArrayOf(ChannelMemberResponse::class)] + public ?array $members = null, // List of channel members + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdateChannelTypeRequest.php b/src/GeneratedModels/UpdateChannelTypeRequest.php index ef9fdf89..bb8c72c5 100644 --- a/src/GeneratedModels/UpdateChannelTypeRequest.php +++ b/src/GeneratedModels/UpdateChannelTypeRequest.php @@ -3,83 +3,47 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $automod - * @property string $automodBehavior - * @property int $maxMessageLength - * @property string|null $blocklist - * @property string|null $blocklistBehavior - * @property bool|null $connectEvents - * @property bool|null $countMessages - * @property bool|null $customEvents - * @property bool|null $deliveryEvents - * @property bool|null $markMessagesPending - * @property bool|null $mutes - * @property int|null $partitionSize - * @property string|null $partitionTtl - * @property bool|null $polls - * @property bool|null $pushNotifications - * @property bool|null $quotes - * @property bool|null $reactions - * @property bool|null $readEvents - * @property bool|null $reminders - * @property bool|null $replies - * @property bool|null $search - * @property bool|null $sharedLocations - * @property bool|null $skipLastMsgUpdateForSystemMsgs - * @property bool|null $typingEvents - * @property bool|null $uploads - * @property bool|null $urlEnrichment - * @property bool|null $userMessageReminders - * @property array|null $allowedFlagReasons - * @property array|null $blocklists - * @property array|null $commands - * @property array|null $permissions - * @property Thresholds|null $automodThresholds - * @property array|null $grants - */ class UpdateChannelTypeRequest extends BaseModel { public function __construct( - public ?string $automod = null, - public ?string $automodBehavior = null, - public ?int $maxMessageLength = null, - public ?string $blocklist = null, - public ?string $blocklistBehavior = null, - public ?bool $connectEvents = null, - public ?bool $countMessages = null, - public ?bool $customEvents = null, - public ?bool $deliveryEvents = null, - public ?bool $markMessagesPending = null, - public ?bool $mutes = null, + /** @var array|null */ + #[ArrayOf(PolicyRequest::class)] + public ?array $permissions = null, + public ?array $grants = null, public ?int $partitionSize = null, public ?string $partitionTtl = null, - public ?bool $polls = null, - public ?bool $pushNotifications = null, - public ?bool $quotes = null, - public ?bool $reactions = null, + public ?bool $typingEvents = null, public ?bool $readEvents = null, - public ?bool $reminders = null, - public ?bool $replies = null, + public ?bool $connectEvents = null, + public ?bool $deliveryEvents = null, public ?bool $search = null, - public ?bool $sharedLocations = null, - public ?bool $skipLastMsgUpdateForSystemMsgs = null, - public ?bool $typingEvents = null, + public ?bool $reactions = null, + public ?bool $replies = null, + public ?bool $quotes = null, + public ?bool $mutes = null, public ?bool $uploads = null, public ?bool $urlEnrichment = null, + public ?bool $customEvents = null, + public ?bool $pushNotifications = null, + public ?bool $reminders = null, + public ?bool $markMessagesPending = null, + public ?bool $polls = null, public ?bool $userMessageReminders = null, - public ?array $allowedFlagReasons = null, + public ?bool $sharedLocations = null, + public ?bool $countMessages = null, + public ?int $maxMessageLength = null, + public ?string $automod = null, + public ?string $automodBehavior = null, + public ?string $blocklist = null, + public ?string $blocklistBehavior = null, /** @var array|null */ #[ArrayOf(BlockListOptions::class)] public ?array $blocklists = null, - public ?array $commands = null, // List of commands that channel supports - /** @var array|null */ - #[ArrayOf(PolicyRequest::class)] - public ?array $permissions = null, + public ?array $allowedFlagReasons = null, public ?Thresholds $automodThresholds = null, - public ?array $grants = null, + public ?bool $skipLastMsgUpdateForSystemMsgs = null, + public ?string $pushLevel = null, + public ?array $commands = null, // List of commands that channel supports ) { } diff --git a/src/GeneratedModels/UpdateChannelTypeResponse.php b/src/GeneratedModels/UpdateChannelTypeResponse.php index 63032556..1a4e94c0 100644 --- a/src/GeneratedModels/UpdateChannelTypeResponse.php +++ b/src/GeneratedModels/UpdateChannelTypeResponse.php @@ -3,91 +3,51 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $automod - * @property string $automodBehavior - * @property bool $connectEvents - * @property bool $countMessages - * @property \DateTime $createdAt - * @property bool $customEvents - * @property bool $deliveryEvents - * @property string $duration - * @property bool $markMessagesPending - * @property int $maxMessageLength - * @property bool $mutes - * @property string $name - * @property bool $polls - * @property bool $pushNotifications - * @property bool $quotes - * @property bool $reactions - * @property bool $readEvents - * @property bool $reminders - * @property bool $replies - * @property bool $search - * @property bool $sharedLocations - * @property bool $skipLastMsgUpdateForSystemMsgs - * @property bool $typingEvents - * @property \DateTime $updatedAt - * @property bool $uploads - * @property bool $urlEnrichment - * @property bool $userMessageReminders - * @property array $commands - * @property array $permissions - * @property array $grants - * @property string|null $blocklist - * @property string|null $blocklistBehavior - * @property int|null $partitionSize - * @property string|null $partitionTtl - * @property array|null $allowedFlagReasons - * @property array|null $blocklists - * @property Thresholds|null $automodThresholds - */ class UpdateChannelTypeResponse extends BaseModel { public function __construct( - public ?string $automod = null, - public ?string $automodBehavior = null, + /** @var array|null */ + #[ArrayOf(PolicyRequest::class)] + public ?array $permissions = null, + public ?array $grants = null, + public ?string $name = null, + public ?bool $typingEvents = null, + public ?bool $readEvents = null, public ?bool $connectEvents = null, - public ?bool $countMessages = null, - public ?\DateTime $createdAt = null, - public ?bool $customEvents = null, public ?bool $deliveryEvents = null, - public ?string $duration = null, - public ?bool $markMessagesPending = null, - public ?int $maxMessageLength = null, - public ?bool $mutes = null, - public ?string $name = null, - public ?bool $polls = null, - public ?bool $pushNotifications = null, - public ?bool $quotes = null, + public ?bool $search = null, public ?bool $reactions = null, - public ?bool $readEvents = null, - public ?bool $reminders = null, public ?bool $replies = null, - public ?bool $search = null, - public ?bool $sharedLocations = null, - public ?bool $skipLastMsgUpdateForSystemMsgs = null, - public ?bool $typingEvents = null, - public ?\DateTime $updatedAt = null, + public ?bool $quotes = null, + public ?bool $mutes = null, public ?bool $uploads = null, public ?bool $urlEnrichment = null, + public ?bool $customEvents = null, + public ?bool $pushNotifications = null, + public ?bool $reminders = null, + public ?bool $markMessagesPending = null, + public ?bool $polls = null, public ?bool $userMessageReminders = null, - public ?array $commands = null, - /** @var array|null */ - #[ArrayOf(PolicyRequest::class)] - public ?array $permissions = null, - public ?array $grants = null, + public ?bool $sharedLocations = null, + public ?bool $countMessages = null, + public ?int $maxMessageLength = null, + public ?string $automod = null, + public ?string $automodBehavior = null, public ?string $blocklist = null, public ?string $blocklistBehavior = null, - public ?int $partitionSize = null, - public ?string $partitionTtl = null, - public ?array $allowedFlagReasons = null, /** @var array|null */ #[ArrayOf(BlockListOptions::class)] public ?array $blocklists = null, + public ?array $allowedFlagReasons = null, public ?Thresholds $automodThresholds = null, + public ?int $partitionSize = null, + public ?string $partitionTtl = null, + public ?bool $skipLastMsgUpdateForSystemMsgs = null, + public ?string $pushLevel = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, + public ?array $commands = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateCollectionRequest.php b/src/GeneratedModels/UpdateCollectionRequest.php index 34399d33..f4283859 100644 --- a/src/GeneratedModels/UpdateCollectionRequest.php +++ b/src/GeneratedModels/UpdateCollectionRequest.php @@ -3,18 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property string $name - * @property object $custom - */ class UpdateCollectionRequest extends BaseModel { public function __construct( - public ?string $id = null, // Unique identifier for the collection within its name public ?string $name = null, // Name/type of the collection + public ?string $id = null, // Unique identifier for the collection within its name public ?object $custom = null, // Custom data for the collection (required, must contain at least one key) ) { } diff --git a/src/GeneratedModels/UpdateCollectionsRequest.php b/src/GeneratedModels/UpdateCollectionsRequest.php index bbb6f10a..78fc2e56 100644 --- a/src/GeneratedModels/UpdateCollectionsRequest.php +++ b/src/GeneratedModels/UpdateCollectionsRequest.php @@ -3,17 +3,10 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $collections - * @property string|null $userID - * @property UserRequest|null $user - */ class UpdateCollectionsRequest extends BaseModel { public function __construct( - /** @var array|null List of collections to update (only custom data is updatable) */ + /** @var array|null */ #[ArrayOf(UpdateCollectionRequest::class)] public ?array $collections = null, // List of collections to update (only custom data is updatable) public ?string $userID = null, diff --git a/src/GeneratedModels/UpdateCollectionsResponse.php b/src/GeneratedModels/UpdateCollectionsResponse.php index efe9e784..f9d0de02 100644 --- a/src/GeneratedModels/UpdateCollectionsResponse.php +++ b/src/GeneratedModels/UpdateCollectionsResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $collections - */ class UpdateCollectionsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of updated collections */ + /** @var array|null */ #[ArrayOf(CollectionResponse::class)] public ?array $collections = null, // List of updated collections + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateCommandRequest.php b/src/GeneratedModels/UpdateCommandRequest.php index 077d88a6..ac9581e8 100644 --- a/src/GeneratedModels/UpdateCommandRequest.php +++ b/src/GeneratedModels/UpdateCommandRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $description - * @property string|null $args - * @property string|null $set - */ class UpdateCommandRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UpdateCommandResponse.php b/src/GeneratedModels/UpdateCommandResponse.php index 3faad820..d7c535af 100644 --- a/src/GeneratedModels/UpdateCommandResponse.php +++ b/src/GeneratedModels/UpdateCommandResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property Command|null $command - */ class UpdateCommandResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?Command $command = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateCommentRequest.php b/src/GeneratedModels/UpdateCommentRequest.php index f4ed970c..cb3beae8 100644 --- a/src/GeneratedModels/UpdateCommentRequest.php +++ b/src/GeneratedModels/UpdateCommentRequest.php @@ -3,32 +3,20 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $comment - * @property bool|null $handleMentionNotifications - * @property bool|null $skipEnrichUrl - * @property bool|null $skipPush - * @property string|null $userID - * @property array|null $attachments - * @property array|null $mentionedUserIds - * @property object|null $custom - * @property UserRequest|null $user - */ class UpdateCommentRequest extends BaseModel { public function __construct( public ?string $comment = null, // Updated text content of the comment - public ?bool $handleMentionNotifications = null, // If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned - public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for this comment - public ?bool $skipPush = null, - public ?string $userID = null, - /** @var array|null Updated media attachments for the comment. Providing this field will replace all existing attachments. */ + /** @var array|null */ #[ArrayOf(Attachment::class)] public ?array $attachments = null, // Updated media attachments for the comment. Providing this field will replace all existing attachments. - public ?array $mentionedUserIds = null, // List of user IDs mentioned in the comment public ?object $custom = null, // Updated custom data for the comment + public ?array $mentionedUserIds = null, // List of user IDs mentioned in the comment + public ?bool $skipPush = null, + public ?bool $skipEnrichUrl = null, // Whether to skip URL enrichment for this comment + public ?bool $handleMentionNotifications = null, // If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdateCommentResponse.php b/src/GeneratedModels/UpdateCommentResponse.php index 564dc912..d974a1d9 100644 --- a/src/GeneratedModels/UpdateCommentResponse.php +++ b/src/GeneratedModels/UpdateCommentResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property CommentResponse $comment - */ class UpdateCommentResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?CommentResponse $comment = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateExternalStorageRequest.php b/src/GeneratedModels/UpdateExternalStorageRequest.php index 2d8c9819..8393d915 100644 --- a/src/GeneratedModels/UpdateExternalStorageRequest.php +++ b/src/GeneratedModels/UpdateExternalStorageRequest.php @@ -5,22 +5,15 @@ namespace GetStream\GeneratedModels; /** * External storage - * - * @property string $bucket - * @property string $storageType - * @property string|null $gcsCredentials - * @property string|null $path - * @property S3Request|null $awsS3 - * @property AzureRequest|null $azureBlob */ class UpdateExternalStorageRequest extends BaseModel { public function __construct( - public ?string $bucket = null, // The name of the bucket on the service provider public ?string $storageType = null, // The type of storage to use - public ?string $gcsCredentials = null, + public ?string $bucket = null, // The name of the bucket on the service provider public ?string $path = null, // The path prefix to use for storing files public ?S3Request $awsS3 = null, + public ?string $gcsCredentials = null, public ?AzureRequest $azureBlob = null, ) { } diff --git a/src/GeneratedModels/UpdateExternalStorageResponse.php b/src/GeneratedModels/UpdateExternalStorageResponse.php index 5013af0f..112c2cb2 100644 --- a/src/GeneratedModels/UpdateExternalStorageResponse.php +++ b/src/GeneratedModels/UpdateExternalStorageResponse.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $bucket - * @property string $duration - * @property string $name - * @property string $path - * @property string $type */ class UpdateExternalStorageResponse extends BaseModel { public function __construct( - public ?string $bucket = null, - public ?string $duration = null, // Duration of the request in milliseconds public ?string $name = null, - public ?string $path = null, public ?string $type = null, + public ?string $bucket = null, + public ?string $path = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdateFeedGroupRequest.php b/src/GeneratedModels/UpdateFeedGroupRequest.php index 53a9324a..7a3c3f2e 100644 --- a/src/GeneratedModels/UpdateFeedGroupRequest.php +++ b/src/GeneratedModels/UpdateFeedGroupRequest.php @@ -3,35 +3,22 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $defaultVisibility - * @property array|null $activityProcessors - * @property array|null $activitySelectors - * @property AggregationConfig|null $aggregation - * @property object|null $custom - * @property NotificationConfig|null $notification - * @property PushNotificationConfig|null $pushNotification - * @property RankingConfig|null $ranking - * @property StoriesConfig|null $stories - */ class UpdateFeedGroupRequest extends BaseModel { public function __construct( + public ?NotificationConfig $notification = null, + public ?PushNotificationConfig $pushNotification = null, + public ?StoriesConfig $stories = null, + public ?object $custom = null, // Custom data for the feed group public ?string $defaultVisibility = null, - /** @var array|null Configuration for activity processors */ + /** @var array|null */ #[ArrayOf(ActivityProcessorConfig::class)] public ?array $activityProcessors = null, // Configuration for activity processors - /** @var array|null Configuration for activity selectors */ + /** @var array|null */ #[ArrayOf(ActivitySelectorConfig::class)] public ?array $activitySelectors = null, // Configuration for activity selectors - public ?AggregationConfig $aggregation = null, - public ?object $custom = null, // Custom data for the feed group - public ?NotificationConfig $notification = null, - public ?PushNotificationConfig $pushNotification = null, public ?RankingConfig $ranking = null, - public ?StoriesConfig $stories = null, + public ?AggregationConfig $aggregation = null, ) { } diff --git a/src/GeneratedModels/UpdateFeedGroupResponse.php b/src/GeneratedModels/UpdateFeedGroupResponse.php index f2ac12cf..00d5e01b 100644 --- a/src/GeneratedModels/UpdateFeedGroupResponse.php +++ b/src/GeneratedModels/UpdateFeedGroupResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FeedGroupResponse $feedGroup - */ class UpdateFeedGroupResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FeedGroupResponse $feedGroup = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateFeedMembersRequest.php b/src/GeneratedModels/UpdateFeedMembersRequest.php index 5a8bfe7f..c716d84b 100644 --- a/src/GeneratedModels/UpdateFeedMembersRequest.php +++ b/src/GeneratedModels/UpdateFeedMembersRequest.php @@ -3,25 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $operation - * @property int|null $limit - * @property string|null $next - * @property string|null $prev - * @property array|null $members - */ class UpdateFeedMembersRequest extends BaseModel { public function __construct( - public ?string $operation = null, // Type of update operation to perform + public ?string $operation = null, // Type of update operation to perform. One of: upsert, remove, set + /** @var array|null */ + #[ArrayOf(FeedMemberRequest::class)] + public ?array $members = null, // List of members to upsert, remove, or set public ?int $limit = null, public ?string $next = null, public ?string $prev = null, - /** @var array|null List of members to upsert, remove, or set */ - #[ArrayOf(FeedMemberRequest::class)] - public ?array $members = null, // List of members to upsert, remove, or set ) { } diff --git a/src/GeneratedModels/UpdateFeedMembersResponse.php b/src/GeneratedModels/UpdateFeedMembersResponse.php index f30360b9..7503f49d 100644 --- a/src/GeneratedModels/UpdateFeedMembersResponse.php +++ b/src/GeneratedModels/UpdateFeedMembersResponse.php @@ -5,23 +5,18 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property array $added - * @property array $removedIds - * @property array $updated */ class UpdateFeedMembersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds /** @var array|null */ #[ArrayOf(FeedMemberResponse::class)] public ?array $added = null, - public ?array $removedIds = null, /** @var array|null */ #[ArrayOf(FeedMemberResponse::class)] public ?array $updated = null, + public ?array $removedIds = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdateFeedRequest.php b/src/GeneratedModels/UpdateFeedRequest.php index 330ab170..d8bebe28 100644 --- a/src/GeneratedModels/UpdateFeedRequest.php +++ b/src/GeneratedModels/UpdateFeedRequest.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $createdByID - * @property string|null $description - * @property string|null $name - * @property array|null $filterTags - * @property object|null $custom - */ class UpdateFeedRequest extends BaseModel { public function __construct( public ?string $createdByID = null, // ID of the new feed creator (owner) - public ?string $description = null, // Description of the feed public ?string $name = null, // Name of the feed - public ?array $filterTags = null, // Tags used for filtering feeds + public ?string $description = null, // Description of the feed public ?object $custom = null, // Custom data for the feed + public ?array $filterTags = null, // Tags used for filtering feeds ) { } diff --git a/src/GeneratedModels/UpdateFeedResponse.php b/src/GeneratedModels/UpdateFeedResponse.php index 7ef35e93..e8246328 100644 --- a/src/GeneratedModels/UpdateFeedResponse.php +++ b/src/GeneratedModels/UpdateFeedResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FeedResponse $feed - */ class UpdateFeedResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FeedResponse $feed = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateFeedViewRequest.php b/src/GeneratedModels/UpdateFeedViewRequest.php index ae921312..b0a4cbfc 100644 --- a/src/GeneratedModels/UpdateFeedViewRequest.php +++ b/src/GeneratedModels/UpdateFeedViewRequest.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $activitySelectors - * @property AggregationConfig|null $aggregation - * @property RankingConfig|null $ranking - */ class UpdateFeedViewRequest extends BaseModel { public function __construct( - /** @var array|null Updated configuration for selecting activities */ + /** @var array|null */ #[ArrayOf(ActivitySelectorConfig::class)] public ?array $activitySelectors = null, // Updated configuration for selecting activities - public ?AggregationConfig $aggregation = null, public ?RankingConfig $ranking = null, + public ?AggregationConfig $aggregation = null, ) { } diff --git a/src/GeneratedModels/UpdateFeedViewResponse.php b/src/GeneratedModels/UpdateFeedViewResponse.php index e26a55d5..ef63ebe4 100644 --- a/src/GeneratedModels/UpdateFeedViewResponse.php +++ b/src/GeneratedModels/UpdateFeedViewResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FeedViewResponse $feedView - */ class UpdateFeedViewResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FeedViewResponse $feedView = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateFeedVisibilityRequest.php b/src/GeneratedModels/UpdateFeedVisibilityRequest.php index da14636d..6eb128a2 100644 --- a/src/GeneratedModels/UpdateFeedVisibilityRequest.php +++ b/src/GeneratedModels/UpdateFeedVisibilityRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $grants - */ class UpdateFeedVisibilityRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UpdateFeedVisibilityResponse.php b/src/GeneratedModels/UpdateFeedVisibilityResponse.php index e936eb7a..1535d179 100644 --- a/src/GeneratedModels/UpdateFeedVisibilityResponse.php +++ b/src/GeneratedModels/UpdateFeedVisibilityResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FeedVisibilityResponse $feedVisibility - */ class UpdateFeedVisibilityResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FeedVisibilityResponse $feedVisibility = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateFollowRequest.php b/src/GeneratedModels/UpdateFollowRequest.php index fe6c30e2..5bccb21a 100644 --- a/src/GeneratedModels/UpdateFollowRequest.php +++ b/src/GeneratedModels/UpdateFollowRequest.php @@ -3,29 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $source - * @property string $target - * @property bool|null $createNotificationActivity - * @property string|null $followerRole - * @property string|null $pushPreference - * @property bool|null $skipPush - * @property string|null $status - * @property object|null $custom - */ class UpdateFollowRequest extends BaseModel { public function __construct( public ?string $source = null, // Fully qualified ID of the source feed public ?string $target = null, // Fully qualified ID of the target feed - public ?bool $createNotificationActivity = null, // Whether to create a notification activity for this follow - public ?string $followerRole = null, + public ?object $custom = null, // Custom data for the follow relationship public ?string $pushPreference = null, // Push preference for the follow relationship + public ?bool $createNotificationActivity = null, // Whether to create a notification activity for this follow + public ?bool $copyCustomToNotification = null, // Whether to copy custom data to the notification activity (only applies when create_notification_activity is true) public ?bool $skipPush = null, // Whether to skip push for this follow - public ?string $status = null, // Status of the follow relationship - public ?object $custom = null, // Custom data for the follow relationship + public ?string $status = null, // Status of the follow relationship. One of: accepted, pending, rejected + public ?string $followerRole = null, ) { } diff --git a/src/GeneratedModels/UpdateFollowResponse.php b/src/GeneratedModels/UpdateFollowResponse.php index bd5dbeb7..f0d138e2 100644 --- a/src/GeneratedModels/UpdateFollowResponse.php +++ b/src/GeneratedModels/UpdateFollowResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property FollowResponse $follow - */ class UpdateFollowResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?FollowResponse $follow = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateLiveLocationRequest.php b/src/GeneratedModels/UpdateLiveLocationRequest.php index 375f48ee..67642ca7 100644 --- a/src/GeneratedModels/UpdateLiveLocationRequest.php +++ b/src/GeneratedModels/UpdateLiveLocationRequest.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $messageID - * @property \DateTime|null $endAt - * @property int|null $latitude - * @property int|null $longitude - */ class UpdateLiveLocationRequest extends BaseModel { public function __construct( public ?string $messageID = null, // Live location ID - public ?\DateTime $endAt = null, // Time when the live location expires public ?int $latitude = null, // Latitude coordinate public ?int $longitude = null, // Longitude coordinate + public ?\DateTime $endAt = null, // Time when the live location expires ) { } diff --git a/src/GeneratedModels/UpdateMemberPartialRequest.php b/src/GeneratedModels/UpdateMemberPartialRequest.php index 3fcfeedc..dc4f9b9f 100644 --- a/src/GeneratedModels/UpdateMemberPartialRequest.php +++ b/src/GeneratedModels/UpdateMemberPartialRequest.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $unset - * @property object|null $set - */ class UpdateMemberPartialRequest extends BaseModel { public function __construct( - public ?array $unset = null, public ?object $set = null, + public ?array $unset = null, ) { } diff --git a/src/GeneratedModels/UpdateMemberPartialResponse.php b/src/GeneratedModels/UpdateMemberPartialResponse.php index 862fe94e..d99779a3 100644 --- a/src/GeneratedModels/UpdateMemberPartialResponse.php +++ b/src/GeneratedModels/UpdateMemberPartialResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ChannelMemberResponse|null $channelMember - */ class UpdateMemberPartialResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?ChannelMemberResponse $channelMember = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdateMembershipLevelRequest.php b/src/GeneratedModels/UpdateMembershipLevelRequest.php index 5895004b..99913974 100644 --- a/src/GeneratedModels/UpdateMembershipLevelRequest.php +++ b/src/GeneratedModels/UpdateMembershipLevelRequest.php @@ -5,18 +5,12 @@ namespace GetStream\GeneratedModels; /** * Partial update request for membership level fields. Only specified fields will be updated. - * - * @property string|null $description - * @property string|null $name - * @property int|null $priority - * @property array|null $tags - * @property object|null $custom */ class UpdateMembershipLevelRequest extends BaseModel { public function __construct( - public ?string $description = null, // Optional description of the membership level public ?string $name = null, // Display name for the membership level + public ?string $description = null, // Optional description of the membership level public ?int $priority = null, // Priority level (higher numbers = higher priority) public ?array $tags = null, // Activity tags this membership level gives access to public ?object $custom = null, // Custom data for the membership level diff --git a/src/GeneratedModels/UpdateMembershipLevelResponse.php b/src/GeneratedModels/UpdateMembershipLevelResponse.php index 0ccbac48..ab28b0d6 100644 --- a/src/GeneratedModels/UpdateMembershipLevelResponse.php +++ b/src/GeneratedModels/UpdateMembershipLevelResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property MembershipLevelResponse $membershipLevel - */ class UpdateMembershipLevelResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?MembershipLevelResponse $membershipLevel = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateMessagePartialRequest.php b/src/GeneratedModels/UpdateMessagePartialRequest.php index edefea96..a4cd6bfc 100644 --- a/src/GeneratedModels/UpdateMessagePartialRequest.php +++ b/src/GeneratedModels/UpdateMessagePartialRequest.php @@ -3,22 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $skipEnrichUrl - * @property string|null $userID - * @property array|null $unset - * @property object|null $set - * @property UserRequest|null $user - */ class UpdateMessagePartialRequest extends BaseModel { public function __construct( public ?bool $skipEnrichUrl = null, // Skip enriching the URL in the message - public ?string $userID = null, - public ?array $unset = null, // Array of field names to unset + public ?bool $skipPush = null, public ?object $set = null, // Sets new field values + public ?array $unset = null, // Array of field names to unset + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdateMessagePartialResponse.php b/src/GeneratedModels/UpdateMessagePartialResponse.php index eb9db94e..c508a216 100644 --- a/src/GeneratedModels/UpdateMessagePartialResponse.php +++ b/src/GeneratedModels/UpdateMessagePartialResponse.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property MessageResponse|null $message - * @property array|null $pendingMessageMetadata - */ class UpdateMessagePartialResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?MessageResponse $message = null, public ?array $pendingMessageMetadata = null, // Pending message metadata + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdateMessageRequest.php b/src/GeneratedModels/UpdateMessageRequest.php index b8016095..14e1e58c 100644 --- a/src/GeneratedModels/UpdateMessageRequest.php +++ b/src/GeneratedModels/UpdateMessageRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property MessageRequest $message - * @property bool|null $skipEnrichUrl - * @property bool|null $skipPush - */ class UpdateMessageRequest extends BaseModel { public function __construct( public ?MessageRequest $message = null, - public ?bool $skipEnrichUrl = null, // Skip enrich URL public ?bool $skipPush = null, + public ?bool $skipEnrichUrl = null, // Skip enrich URL ) { } diff --git a/src/GeneratedModels/UpdateMessageResponse.php b/src/GeneratedModels/UpdateMessageResponse.php index a32f5d79..047bc751 100644 --- a/src/GeneratedModels/UpdateMessageResponse.php +++ b/src/GeneratedModels/UpdateMessageResponse.php @@ -5,17 +5,13 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property MessageResponse $message - * @property array|null $pendingMessageMetadata */ class UpdateMessageResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?MessageResponse $message = null, public ?array $pendingMessageMetadata = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdatePollOptionRequest.php b/src/GeneratedModels/UpdatePollOptionRequest.php index d09f6f5e..afee9dbb 100644 --- a/src/GeneratedModels/UpdatePollOptionRequest.php +++ b/src/GeneratedModels/UpdatePollOptionRequest.php @@ -3,22 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property string $text - * @property string|null $userID - * @property object|null $custom - * @property UserRequest|null $user - */ class UpdatePollOptionRequest extends BaseModel { public function __construct( public ?string $id = null, // Option ID public ?string $text = null, // Option text - public ?string $userID = null, public ?object $custom = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdatePollPartialRequest.php b/src/GeneratedModels/UpdatePollPartialRequest.php index cfec2e3a..72f44024 100644 --- a/src/GeneratedModels/UpdatePollPartialRequest.php +++ b/src/GeneratedModels/UpdatePollPartialRequest.php @@ -3,20 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $userID - * @property array|null $unset - * @property object|null $set - * @property UserRequest|null $user - */ class UpdatePollPartialRequest extends BaseModel { public function __construct( - public ?string $userID = null, - public ?array $unset = null, // Array of field names to unset public ?object $set = null, // Sets new field values + public ?array $unset = null, // Array of field names to unset + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdatePollRequest.php b/src/GeneratedModels/UpdatePollRequest.php index 90d03086..fdc272cb 100644 --- a/src/GeneratedModels/UpdatePollRequest.php +++ b/src/GeneratedModels/UpdatePollRequest.php @@ -3,40 +3,23 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property string $name - * @property bool|null $allowAnswers - * @property bool|null $allowUserSuggestedOptions - * @property string|null $description - * @property bool|null $enforceUniqueVote - * @property bool|null $isClosed - * @property int|null $maxVotesAllowed - * @property string|null $userID - * @property string|null $votingVisibility - * @property array|null $options - * @property object|null $custom - * @property UserRequest|null $user - */ class UpdatePollRequest extends BaseModel { public function __construct( public ?string $id = null, // Poll ID public ?string $name = null, // Poll name - public ?bool $allowAnswers = null, // Allow answers - public ?bool $allowUserSuggestedOptions = null, // Allow user suggested options public ?string $description = null, // Poll description - public ?bool $enforceUniqueVote = null, // Enforce unique vote - public ?bool $isClosed = null, // Is closed - public ?int $maxVotesAllowed = null, // Max votes allowed - public ?string $userID = null, - public ?string $votingVisibility = null, // Voting visibility - /** @var array|null Poll options */ + /** @var array|null */ #[ArrayOf(PollOptionRequest::class)] public ?array $options = null, // Poll options + public ?bool $enforceUniqueVote = null, // Enforce unique vote + public ?string $votingVisibility = null, // Voting visibility + public ?int $maxVotesAllowed = null, // Max votes allowed + public ?bool $allowUserSuggestedOptions = null, // Allow user suggested options + public ?bool $allowAnswers = null, // Allow answers + public ?bool $isClosed = null, // Is closed public ?object $custom = null, + public ?string $userID = null, public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpdateReminderRequest.php b/src/GeneratedModels/UpdateReminderRequest.php index bb065a39..5d907624 100644 --- a/src/GeneratedModels/UpdateReminderRequest.php +++ b/src/GeneratedModels/UpdateReminderRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime|null $remindAt - * @property string|null $userID - * @property UserRequest|null $user - */ class UpdateReminderRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UpdateReminderResponse.php b/src/GeneratedModels/UpdateReminderResponse.php index 4d6aad42..27693a8f 100644 --- a/src/GeneratedModels/UpdateReminderResponse.php +++ b/src/GeneratedModels/UpdateReminderResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property ReminderResponseData $reminder */ class UpdateReminderResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?ReminderResponseData $reminder = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdateSIPInboundRoutingRuleRequest.php b/src/GeneratedModels/UpdateSIPInboundRoutingRuleRequest.php index 15b5f320..891efd18 100644 --- a/src/GeneratedModels/UpdateSIPInboundRoutingRuleRequest.php +++ b/src/GeneratedModels/UpdateSIPInboundRoutingRuleRequest.php @@ -5,29 +5,19 @@ namespace GetStream\GeneratedModels; /** * Request to update a SIP Inbound Routing Rule - * - * @property string $name - * @property array $calledNumbers - * @property array $trunkIds - * @property SIPCallerConfigsRequest $callerConfigs - * @property array|null $callerNumbers - * @property SIPCallConfigsRequest|null $callConfigs - * @property SIPDirectRoutingRuleCallConfigsRequest|null $directRoutingConfigs - * @property SIPPinProtectionConfigsRequest|null $pinProtectionConfigs - * @property SIPInboundRoutingRulePinConfigsRequest|null $pinRoutingConfigs */ class UpdateSIPInboundRoutingRuleRequest extends BaseModel { public function __construct( public ?string $name = null, // Name of the SIP Inbound Routing Rule - public ?array $calledNumbers = null, // List of called numbers public ?array $trunkIds = null, // List of SIP trunk IDs - public ?SIPCallerConfigsRequest $callerConfigs = null, + public ?array $calledNumbers = null, // List of called numbers public ?array $callerNumbers = null, // List of caller numbers (optional) - public ?SIPCallConfigsRequest $callConfigs = null, public ?SIPDirectRoutingRuleCallConfigsRequest $directRoutingConfigs = null, - public ?SIPPinProtectionConfigsRequest $pinProtectionConfigs = null, public ?SIPInboundRoutingRulePinConfigsRequest $pinRoutingConfigs = null, + public ?SIPCallerConfigsRequest $callerConfigs = null, + public ?SIPCallConfigsRequest $callConfigs = null, + public ?SIPPinProtectionConfigsRequest $pinProtectionConfigs = null, ) { } diff --git a/src/GeneratedModels/UpdateSIPInboundRoutingRuleResponse.php b/src/GeneratedModels/UpdateSIPInboundRoutingRuleResponse.php index 09d0fd7f..c6ff0a89 100644 --- a/src/GeneratedModels/UpdateSIPInboundRoutingRuleResponse.php +++ b/src/GeneratedModels/UpdateSIPInboundRoutingRuleResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Response containing the updated SIP Inbound Routing Rule - * - * @property string $duration - * @property SIPInboundRoutingRuleResponse|null $sipInboundRoutingRule */ class UpdateSIPInboundRoutingRuleResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?SIPInboundRoutingRuleResponse $sipInboundRoutingRule = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateSIPTrunkRequest.php b/src/GeneratedModels/UpdateSIPTrunkRequest.php index 581f40ec..152d6d26 100644 --- a/src/GeneratedModels/UpdateSIPTrunkRequest.php +++ b/src/GeneratedModels/UpdateSIPTrunkRequest.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * Request to update a SIP trunk - * - * @property string $name - * @property array $numbers */ class UpdateSIPTrunkRequest extends BaseModel { diff --git a/src/GeneratedModels/UpdateSIPTrunkResponse.php b/src/GeneratedModels/UpdateSIPTrunkResponse.php index e2c4daf1..eeafd113 100644 --- a/src/GeneratedModels/UpdateSIPTrunkResponse.php +++ b/src/GeneratedModels/UpdateSIPTrunkResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Response containing the updated SIP trunk - * - * @property string $duration - * @property SIPTrunkResponse|null $sipTrunk */ class UpdateSIPTrunkResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?SIPTrunkResponse $sipTrunk = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpdateThreadPartialRequest.php b/src/GeneratedModels/UpdateThreadPartialRequest.php index d52cb21d..fc87f58f 100644 --- a/src/GeneratedModels/UpdateThreadPartialRequest.php +++ b/src/GeneratedModels/UpdateThreadPartialRequest.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $userID - * @property array|null $unset - * @property object|null $set - * @property UserRequest|null $user - */ class UpdateThreadPartialRequest extends BaseModel { public function __construct( public ?string $userID = null, - public ?array $unset = null, // Array of field names to unset - public ?object $set = null, // Sets new field values public ?UserRequest $user = null, + public ?object $set = null, // Sets new field values + public ?array $unset = null, // Array of field names to unset ) { } diff --git a/src/GeneratedModels/UpdateThreadPartialResponse.php b/src/GeneratedModels/UpdateThreadPartialResponse.php index f752c135..64f4de5f 100644 --- a/src/GeneratedModels/UpdateThreadPartialResponse.php +++ b/src/GeneratedModels/UpdateThreadPartialResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ThreadResponse $thread - */ class UpdateThreadPartialResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?ThreadResponse $thread = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdateUserPartialRequest.php b/src/GeneratedModels/UpdateUserPartialRequest.php index cc8c286c..e4506d08 100644 --- a/src/GeneratedModels/UpdateUserPartialRequest.php +++ b/src/GeneratedModels/UpdateUserPartialRequest.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property array|null $unset - * @property object|null $set - */ class UpdateUserPartialRequest extends BaseModel { public function __construct( public ?string $id = null, // User ID to update - public ?array $unset = null, public ?object $set = null, + public ?array $unset = null, ) { } diff --git a/src/GeneratedModels/UpdateUserPermissionsRequest.php b/src/GeneratedModels/UpdateUserPermissionsRequest.php index 2ff3fd9d..eb656976 100644 --- a/src/GeneratedModels/UpdateUserPermissionsRequest.php +++ b/src/GeneratedModels/UpdateUserPermissionsRequest.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $userID - * @property array|null $grantPermissions - * @property array|null $revokePermissions - */ class UpdateUserPermissionsRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UpdateUserPermissionsResponse.php b/src/GeneratedModels/UpdateUserPermissionsResponse.php index 0b6fcff3..a35cf1dc 100644 --- a/src/GeneratedModels/UpdateUserPermissionsResponse.php +++ b/src/GeneratedModels/UpdateUserPermissionsResponse.php @@ -5,8 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration */ class UpdateUserPermissionsResponse extends BaseModel { diff --git a/src/GeneratedModels/UpdateUsersPartialRequest.php b/src/GeneratedModels/UpdateUsersPartialRequest.php index b6e44e01..fccff127 100644 --- a/src/GeneratedModels/UpdateUsersPartialRequest.php +++ b/src/GeneratedModels/UpdateUsersPartialRequest.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $users - */ class UpdateUsersPartialRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UpdateUsersRequest.php b/src/GeneratedModels/UpdateUsersRequest.php index 0b76d0d3..c335ff18 100644 --- a/src/GeneratedModels/UpdateUsersRequest.php +++ b/src/GeneratedModels/UpdateUsersRequest.php @@ -3,14 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $users - */ class UpdateUsersRequest extends BaseModel { public function __construct( + /** @var array|null */ + #[MapOf(UserRequest::class)] public ?array $users = null, // Object containing users ) { } diff --git a/src/GeneratedModels/UpdateUsersResponse.php b/src/GeneratedModels/UpdateUsersResponse.php index 4170c879..d87da79e 100644 --- a/src/GeneratedModels/UpdateUsersResponse.php +++ b/src/GeneratedModels/UpdateUsersResponse.php @@ -3,19 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string $membershipDeletionTaskID - * @property array $users - */ class UpdateUsersResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - public ?string $membershipDeletionTaskID = null, + /** @var array|null */ + #[MapOf(FullUserResponse::class)] public ?array $users = null, // Object containing users + public ?string $membershipDeletionTaskID = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpdatedCallPermissionsEvent.php b/src/GeneratedModels/UpdatedCallPermissionsEvent.php index 03323ec7..066118b8 100644 --- a/src/GeneratedModels/UpdatedCallPermissionsEvent.php +++ b/src/GeneratedModels/UpdatedCallPermissionsEvent.php @@ -5,23 +5,17 @@ namespace GetStream\GeneratedModels; /** * This event is sent to notify about permission changes for a user, clients receiving this event should update their UI accordingly - * - * @property string $callCid - * @property \DateTime $createdAt - * @property array $ownCapabilities - * @property UserResponse $user - * @property string $type */ class UpdatedCallPermissionsEvent extends BaseModel { public function __construct( - public ?string $callCid = null, + public ?string $type = null, // The type of event: "call.permissions_updated" in this case public ?\DateTime $createdAt = null, - /** @var array|null The capabilities of the current user */ + public ?string $callCid = null, + public ?UserResponse $user = null, + /** @var array|null */ #[ArrayOf(OwnCapability::class)] public ?array $ownCapabilities = null, // The capabilities of the current user - public ?UserResponse $user = null, - public ?string $type = null, // The type of event: "call.permissions_updated" in this case ) { } diff --git a/src/GeneratedModels/UploadChannelFileRequest.php b/src/GeneratedModels/UploadChannelFileRequest.php index 54655e55..9ff565bb 100644 --- a/src/GeneratedModels/UploadChannelFileRequest.php +++ b/src/GeneratedModels/UploadChannelFileRequest.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $file - * @property OnlyUserID|null $user - */ class UploadChannelFileRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UploadChannelFileResponse.php b/src/GeneratedModels/UploadChannelFileResponse.php index 551fe82d..0bf4caa0 100644 --- a/src/GeneratedModels/UploadChannelFileResponse.php +++ b/src/GeneratedModels/UploadChannelFileResponse.php @@ -3,21 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string|null $file - * @property string|null $moderationAction - * @property string|null $thumbUrl - */ class UploadChannelFileResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?string $file = null, // URL to the uploaded asset. Should be used to put to `asset_url` attachment field - public ?string $moderationAction = null, public ?string $thumbUrl = null, // URL of the file thumbnail for supported file formats. Should be put to `thumb_url` attachment field + public ?string $moderationAction = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UploadChannelRequest.php b/src/GeneratedModels/UploadChannelRequest.php index 45c97b30..3fbbeb37 100644 --- a/src/GeneratedModels/UploadChannelRequest.php +++ b/src/GeneratedModels/UploadChannelRequest.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $file - * @property array|null $uploadSizes - * @property OnlyUserID|null $user - */ class UploadChannelRequest extends BaseModel { public function __construct( public ?string $file = null, - /** @var array|null field with JSON-encoded array of image size configurations */ + public ?OnlyUserID $user = null, + /** @var array|null */ #[ArrayOf(ImageSize::class)] public ?array $uploadSizes = null, // field with JSON-encoded array of image size configurations - public ?OnlyUserID $user = null, ) { } diff --git a/src/GeneratedModels/UploadChannelResponse.php b/src/GeneratedModels/UploadChannelResponse.php index deb4735e..7fe9e5dd 100644 --- a/src/GeneratedModels/UploadChannelResponse.php +++ b/src/GeneratedModels/UploadChannelResponse.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property string|null $file - * @property string|null $moderationAction - * @property string|null $thumbUrl - * @property array|null $uploadSizes - */ class UploadChannelResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?string $file = null, - public ?string $moderationAction = null, public ?string $thumbUrl = null, - /** @var array|null Array of image size configurations */ + public ?string $moderationAction = null, + public ?string $duration = null, // Duration of the request in milliseconds + /** @var array|null */ #[ArrayOf(ImageSize::class)] public ?array $uploadSizes = null, // Array of image size configurations ) { diff --git a/src/GeneratedModels/UpsertActivitiesRequest.php b/src/GeneratedModels/UpsertActivitiesRequest.php index 800e13d5..89ab02f2 100644 --- a/src/GeneratedModels/UpsertActivitiesRequest.php +++ b/src/GeneratedModels/UpsertActivitiesRequest.php @@ -3,15 +3,10 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $activities - */ class UpsertActivitiesRequest extends BaseModel { public function __construct( - /** @var array|null List of activities to create or update */ + /** @var array|null */ #[ArrayOf(ActivityRequest::class)] public ?array $activities = null, // List of activities to create or update ) { diff --git a/src/GeneratedModels/UpsertActivitiesResponse.php b/src/GeneratedModels/UpsertActivitiesResponse.php index 50f521cc..62c77abd 100644 --- a/src/GeneratedModels/UpsertActivitiesResponse.php +++ b/src/GeneratedModels/UpsertActivitiesResponse.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $activities - * @property int|null $mentionNotificationsCreated - */ class UpsertActivitiesResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of created or updated activities */ + /** @var array|null */ #[ArrayOf(ActivityResponse::class)] public ?array $activities = null, // List of created or updated activities public ?int $mentionNotificationsCreated = null, // Total number of mention notification activities created for mentioned users across all activities + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpsertCollectionsRequest.php b/src/GeneratedModels/UpsertCollectionsRequest.php index cc708824..c15a8b4e 100644 --- a/src/GeneratedModels/UpsertCollectionsRequest.php +++ b/src/GeneratedModels/UpsertCollectionsRequest.php @@ -3,15 +3,10 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $collections - */ class UpsertCollectionsRequest extends BaseModel { public function __construct( - /** @var array|null List of collections to upsert (insert if new, update if existing) */ + /** @var array|null */ #[ArrayOf(CollectionRequest::class)] public ?array $collections = null, // List of collections to upsert (insert if new, update if existing) ) { diff --git a/src/GeneratedModels/UpsertCollectionsResponse.php b/src/GeneratedModels/UpsertCollectionsResponse.php index c48b1bae..85ce1fca 100644 --- a/src/GeneratedModels/UpsertCollectionsResponse.php +++ b/src/GeneratedModels/UpsertCollectionsResponse.php @@ -3,19 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $collections - */ class UpsertCollectionsResponse extends BaseModel { public function __construct( - public ?string $duration = null, - /** @var array|null List of upserted collections */ + /** @var array|null */ #[ArrayOf(CollectionResponse::class)] public ?array $collections = null, // List of upserted collections + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpsertConfigRequest.php b/src/GeneratedModels/UpsertConfigRequest.php index 78f7c586..a2d722b1 100644 --- a/src/GeneratedModels/UpsertConfigRequest.php +++ b/src/GeneratedModels/UpsertConfigRequest.php @@ -3,51 +3,28 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $key - * @property bool|null $async - * @property string|null $team - * @property string|null $userID - * @property AIImageConfig|null $aiImageConfig - * @property AITextConfig|null $aiTextConfig - * @property AIVideoConfig|null $aiVideoConfig - * @property AutomodPlatformCircumventionConfig|null $automodPlatformCircumventionConfig - * @property AutomodSemanticFiltersConfig|null $automodSemanticFiltersConfig - * @property AutomodToxicityConfig|null $automodToxicityConfig - * @property AIImageConfig|null $awsRekognitionConfig - * @property BlockListConfig|null $blockListConfig - * @property AITextConfig|null $bodyguardConfig - * @property GoogleVisionConfig|null $googleVisionConfig - * @property LLMConfig|null $llmConfig - * @property RuleBuilderConfig|null $ruleBuilderConfig - * @property UserRequest|null $user - * @property VelocityFilterConfig|null $velocityFilterConfig - * @property VideoCallRuleConfig|null $videoCallRuleConfig - */ class UpsertConfigRequest extends BaseModel { public function __construct( public ?string $key = null, // Unique identifier for the moderation configuration - public ?bool $async = null, // Whether moderation should be performed asynchronously public ?string $team = null, // Team associated with the configuration - public ?string $userID = null, - public ?AIImageConfig $aiImageConfig = null, - public ?AITextConfig $aiTextConfig = null, - public ?AIVideoConfig $aiVideoConfig = null, + public ?bool $async = null, // Whether moderation should be performed asynchronously + public ?AutomodToxicityConfig $automodToxicityConfig = null, public ?AutomodPlatformCircumventionConfig $automodPlatformCircumventionConfig = null, public ?AutomodSemanticFiltersConfig $automodSemanticFiltersConfig = null, - public ?AutomodToxicityConfig $automodToxicityConfig = null, - public ?AIImageConfig $awsRekognitionConfig = null, public ?BlockListConfig $blockListConfig = null, - public ?AITextConfig $bodyguardConfig = null, - public ?GoogleVisionConfig $googleVisionConfig = null, + public ?AITextConfig $aiTextConfig = null, public ?LLMConfig $llmConfig = null, - public ?RuleBuilderConfig $ruleBuilderConfig = null, - public ?UserRequest $user = null, + public ?GoogleVisionConfig $googleVisionConfig = null, + public ?AIImageConfig $aiImageConfig = null, + public ?AIVideoConfig $aiVideoConfig = null, public ?VelocityFilterConfig $velocityFilterConfig = null, + public ?RuleBuilderConfig $ruleBuilderConfig = null, + public ?AITextConfig $bodyguardConfig = null, + public ?AIImageConfig $awsRekognitionConfig = null, public ?VideoCallRuleConfig $videoCallRuleConfig = null, + public ?string $userID = null, + public ?UserRequest $user = null, ) { } diff --git a/src/GeneratedModels/UpsertConfigResponse.php b/src/GeneratedModels/UpsertConfigResponse.php index ab99ea73..af22d851 100644 --- a/src/GeneratedModels/UpsertConfigResponse.php +++ b/src/GeneratedModels/UpsertConfigResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property ConfigResponse|null $config - */ class UpsertConfigResponse extends BaseModel { public function __construct( - public ?string $duration = null, public ?ConfigResponse $config = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpsertModerationRuleRequest.php b/src/GeneratedModels/UpsertModerationRuleRequest.php index 78e28786..739868d9 100644 --- a/src/GeneratedModels/UpsertModerationRuleRequest.php +++ b/src/GeneratedModels/UpsertModerationRuleRequest.php @@ -3,39 +3,27 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $name - * @property string $ruleType - * @property RuleBuilderAction $action - * @property string|null $cooldownPeriod - * @property string|null $description - * @property bool|null $enabled - * @property string|null $logic - * @property string|null $team - * @property array|null $conditions - * @property array|null $configKeys - * @property array|null $groups - */ class UpsertModerationRuleRequest extends BaseModel { public function __construct( public ?string $name = null, - public ?string $ruleType = null, - public ?RuleBuilderAction $action = null, - public ?string $cooldownPeriod = null, public ?string $description = null, - public ?bool $enabled = null, - public ?string $logic = null, + public ?array $configKeys = null, public ?string $team = null, + public ?string $ruleType = null, /** @var array|null */ #[ArrayOf(RuleBuilderCondition::class)] public ?array $conditions = null, - public ?array $configKeys = null, + public ?string $logic = null, /** @var array|null */ #[ArrayOf(RuleBuilderConditionGroup::class)] public ?array $groups = null, + public ?RuleBuilderAction $action = null, + /** @var array|null */ + #[ArrayOf(CallRuleActionSequence::class)] + public ?array $actionSequences = null, + public ?string $cooldownPeriod = null, + public ?bool $enabled = null, ) { } diff --git a/src/GeneratedModels/UpsertModerationRuleResponse.php b/src/GeneratedModels/UpsertModerationRuleResponse.php index b6d687ca..9cd50f06 100644 --- a/src/GeneratedModels/UpsertModerationRuleResponse.php +++ b/src/GeneratedModels/UpsertModerationRuleResponse.php @@ -5,9 +5,6 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property ModerationRuleV2Response|null $rule */ class UpsertModerationRuleResponse extends BaseModel { diff --git a/src/GeneratedModels/UpsertModerationTemplateRequest.php b/src/GeneratedModels/UpsertModerationTemplateRequest.php index 8739a4e8..c733c881 100644 --- a/src/GeneratedModels/UpsertModerationTemplateRequest.php +++ b/src/GeneratedModels/UpsertModerationTemplateRequest.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $name - * @property FeedsModerationTemplateConfig $config - */ class UpsertModerationTemplateRequest extends BaseModel { public function __construct( public ?string $name = null, // Name of the moderation template - public ?FeedsModerationTemplateConfig $config = null, + public ?FeedsModerationTemplateConfigPayload $config = null, ) { } diff --git a/src/GeneratedModels/UpsertModerationTemplateResponse.php b/src/GeneratedModels/UpsertModerationTemplateResponse.php index 3ea8975b..442e22bc 100644 --- a/src/GeneratedModels/UpsertModerationTemplateResponse.php +++ b/src/GeneratedModels/UpsertModerationTemplateResponse.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property string $duration - * @property string $name - * @property \DateTime $updatedAt - * @property FeedsModerationTemplateConfig|null $config - */ class UpsertModerationTemplateResponse extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, // When the template was created - public ?string $duration = null, public ?string $name = null, // Name of the moderation template + public ?FeedsModerationTemplateConfigPayload $config = null, + public ?\DateTime $createdAt = null, // When the template was created public ?\DateTime $updatedAt = null, // When the template was last updated - public ?FeedsModerationTemplateConfig $config = null, + public ?string $duration = null, ) { } diff --git a/src/GeneratedModels/UpsertPushPreferencesRequest.php b/src/GeneratedModels/UpsertPushPreferencesRequest.php index 2d163459..9f792565 100644 --- a/src/GeneratedModels/UpsertPushPreferencesRequest.php +++ b/src/GeneratedModels/UpsertPushPreferencesRequest.php @@ -3,15 +3,10 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $preferences - */ class UpsertPushPreferencesRequest extends BaseModel { public function __construct( - /** @var array|null A list of push preferences for channels, calls, or the user. */ + /** @var array|null */ #[ArrayOf(PushPreferenceInput::class)] public ?array $preferences = null, // A list of push preferences for channels, calls, or the user. ) { diff --git a/src/GeneratedModels/UpsertPushPreferencesResponse.php b/src/GeneratedModels/UpsertPushPreferencesResponse.php index b67cf722..10c03490 100644 --- a/src/GeneratedModels/UpsertPushPreferencesResponse.php +++ b/src/GeneratedModels/UpsertPushPreferencesResponse.php @@ -3,19 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $duration - * @property array $userChannelPreferences - * @property array $userPreferences - */ class UpsertPushPreferencesResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds - public ?array $userChannelPreferences = null, // The channel specific push notification preferences, only returned for channels you've edited. + /** @var array|null */ + #[MapOf(PushPreferencesResponse::class)] public ?array $userPreferences = null, // The user preferences, always returned regardless if you edited it + public ?array $userChannelPreferences = null, // The channel specific push notification preferences, only returned for channels you've edited. + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpsertPushProviderRequest.php b/src/GeneratedModels/UpsertPushProviderRequest.php index b23b51d5..c2da1064 100644 --- a/src/GeneratedModels/UpsertPushProviderRequest.php +++ b/src/GeneratedModels/UpsertPushProviderRequest.php @@ -3,15 +3,10 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property PushProvider|null $pushProvider - */ class UpsertPushProviderRequest extends BaseModel { public function __construct( - public ?PushProvider $pushProvider = null, + public ?PushProviderRequest $pushProvider = null, ) { } diff --git a/src/GeneratedModels/UpsertPushProviderResponse.php b/src/GeneratedModels/UpsertPushProviderResponse.php index c3b409cb..05828889 100644 --- a/src/GeneratedModels/UpsertPushProviderResponse.php +++ b/src/GeneratedModels/UpsertPushProviderResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property PushProviderResponse $pushProvider */ class UpsertPushProviderResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?PushProviderResponse $pushProvider = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/UpsertPushTemplateRequest.php b/src/GeneratedModels/UpsertPushTemplateRequest.php index 02882e59..655c0d70 100644 --- a/src/GeneratedModels/UpsertPushTemplateRequest.php +++ b/src/GeneratedModels/UpsertPushTemplateRequest.php @@ -3,22 +3,13 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $eventType - * @property string $pushProviderType - * @property bool|null $enablePush - * @property string|null $pushProviderName - * @property string|null $template - */ class UpsertPushTemplateRequest extends BaseModel { public function __construct( - public ?string $eventType = null, // Event type (message.new, message.updated, reaction.new) - public ?string $pushProviderType = null, // Push provider type (firebase, apn, huawei, xiaomi) public ?bool $enablePush = null, // Whether to send push notification for this event + public ?string $eventType = null, // Event type. One of: message.new, message.updated, reaction.new, notification.reminder_due, feeds.activity.added, feeds.comment.added, feeds.activity.reaction.added, feeds.comment.reaction.added, feeds.follow.created, feeds.notification_feed.updated public ?string $pushProviderName = null, // Push provider name + public ?string $pushProviderType = null, // Push provider type. One of: firebase, apn, huawei, xiaomi public ?string $template = null, // Push template ) { } diff --git a/src/GeneratedModels/UpsertPushTemplateResponse.php b/src/GeneratedModels/UpsertPushTemplateResponse.php index 38c4e4f1..e4d07f1f 100644 --- a/src/GeneratedModels/UpsertPushTemplateResponse.php +++ b/src/GeneratedModels/UpsertPushTemplateResponse.php @@ -5,15 +5,12 @@ namespace GetStream\GeneratedModels; /** * Basic response information - * - * @property string $duration - * @property PushTemplate|null $template */ class UpsertPushTemplateResponse extends BaseModel { public function __construct( public ?string $duration = null, // Duration of the request in milliseconds - public ?PushTemplate $template = null, + public ?PushTemplateResponse $template = null, ) { } diff --git a/src/GeneratedModels/User.php b/src/GeneratedModels/User.php index fa8b61c0..66c5bb29 100644 --- a/src/GeneratedModels/User.php +++ b/src/GeneratedModels/User.php @@ -3,35 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $id - * @property \DateTime|null $banExpires - * @property bool|null $banned - * @property bool|null $invisible - * @property string|null $language - * @property \DateTime|null $revokeTokensIssuedBefore - * @property string|null $role - * @property array|null $teams - * @property object|null $custom - * @property PrivacySettings|null $privacySettings - * @property array|null $teamsRole - */ class User extends BaseModel { public function __construct( public ?string $id = null, - public ?\DateTime $banExpires = null, - public ?bool $banned = null, - public ?bool $invisible = null, - public ?string $language = null, - public ?\DateTime $revokeTokensIssuedBefore = null, - public ?string $role = null, - public ?array $teams = null, - public ?object $custom = null, - public ?PrivacySettings $privacySettings = null, - public ?array $teamsRole = null, + public ?object $data = null, ) { } diff --git a/src/GeneratedModels/UserBannedEvent.php b/src/GeneratedModels/UserBannedEvent.php index 19fffcff..d8a835cb 100644 --- a/src/GeneratedModels/UserBannedEvent.php +++ b/src/GeneratedModels/UserBannedEvent.php @@ -4,34 +4,28 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property bool $shadow - * @property User $createdBy - * @property string $type - * @property \DateTime|null $expiration - * @property string|null $reason - * @property string|null $team - * @property User|null $user + * This event is sent when a user gets banned. The event contains information about the user that was banned. */ class UserBannedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?bool $shadow = null, - public ?User $createdBy = null, - public ?string $type = null, - public ?\DateTime $expiration = null, - public ?string $reason = null, - public ?string $team = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "user.banned" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel where the target user was banned + public ?string $team = null, // The team of the channel where the target user was banned + public ?int $channelMemberCount = null, + public ?int $channelMessageCount = null, + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel where the target user was banned + public ?string $channelID = null, // The ID of the channel where the target user was banned + public ?UserResponseCommonFields $user = null, + public ?string $reason = null, // The reason for the ban + public ?UserResponseCommonFields $createdBy = null, + public ?\DateTime $expiration = null, // The expiration date of the ban + public ?bool $shadow = null, // Whether the user was shadow banned + public ?int $totalBans = null, ) { } diff --git a/src/GeneratedModels/UserCreatedWithinParameters.php b/src/GeneratedModels/UserCreatedWithinParameters.php index 6172e870..2e9bf070 100644 --- a/src/GeneratedModels/UserCreatedWithinParameters.php +++ b/src/GeneratedModels/UserCreatedWithinParameters.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $maxAge - */ class UserCreatedWithinParameters extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UserCustomEventRequest.php b/src/GeneratedModels/UserCustomEventRequest.php index 46a45143..44631324 100644 --- a/src/GeneratedModels/UserCustomEventRequest.php +++ b/src/GeneratedModels/UserCustomEventRequest.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $type - * @property object|null $custom - */ class UserCustomEventRequest extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UserCustomPropertyParameters.php b/src/GeneratedModels/UserCustomPropertyParameters.php index 6ae60d62..5f47460a 100644 --- a/src/GeneratedModels/UserCustomPropertyParameters.php +++ b/src/GeneratedModels/UserCustomPropertyParameters.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $operator - * @property string|null $propertyKey - */ class UserCustomPropertyParameters extends BaseModel { public function __construct( - public ?string $operator = null, public ?string $propertyKey = null, + public ?string $operator = null, ) { } diff --git a/src/GeneratedModels/UserDeactivatedEvent.php b/src/GeneratedModels/UserDeactivatedEvent.php index 41e1973a..e514f3f7 100644 --- a/src/GeneratedModels/UserDeactivatedEvent.php +++ b/src/GeneratedModels/UserDeactivatedEvent.php @@ -4,20 +4,17 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property User $createdBy - * @property string $type - * @property User|null $user + * This event is sent when a user gets deactivated. The event contains information about the user that was deactivated. */ class UserDeactivatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?User $createdBy = null, - public ?string $type = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "user.deactivated" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?UserResponseCommonFields $user = null, + public ?UserResponseCommonFields $createdBy = null, ) { } diff --git a/src/GeneratedModels/UserDeletedEvent.php b/src/GeneratedModels/UserDeletedEvent.php index 04bb0d60..bb6365a8 100644 --- a/src/GeneratedModels/UserDeletedEvent.php +++ b/src/GeneratedModels/UserDeletedEvent.php @@ -4,24 +4,22 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property bool $deleteConversationChannels - * @property bool $hardDelete - * @property bool $markMessagesDeleted - * @property string $type - * @property User|null $user + * This event is sent when a user gets deleted. The event contains information about the user that was deleted and the deletion options that were used. */ class UserDeletedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?bool $deleteConversationChannels = null, - public ?bool $hardDelete = null, - public ?bool $markMessagesDeleted = null, - public ?string $type = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "user.deleted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?UserResponseCommonFields $user = null, + public ?string $deleteMessages = null, // The type of deletion that was used for the user's messages. One of: hard, soft, pruning, (empty string) + public ?string $deleteConversation = null, // The type of deletion that was used for the user's conversations. One of: hard, soft, pruning, (empty string) + public ?string $deleteUser = null, // The type of deletion that was used for the user. One of: hard, soft, pruning, (empty string) + public ?bool $hardDelete = null, // Whether the user was hard deleted + public ?bool $markMessagesDeleted = null, // Whether the user's messages were marked as deleted + public ?bool $deleteConversationChannels = null, // Whether the user's conversation channels were deleted ) { } diff --git a/src/GeneratedModels/UserFeedbackReport.php b/src/GeneratedModels/UserFeedbackReport.php index 66fb91a9..5d6f02be 100644 --- a/src/GeneratedModels/UserFeedbackReport.php +++ b/src/GeneratedModels/UserFeedbackReport.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $unreportedCount - * @property array $countByRating - */ class UserFeedbackReport extends BaseModel { public function __construct( - public ?int $unreportedCount = null, public ?array $countByRating = null, + public ?int $unreportedCount = null, ) { } diff --git a/src/GeneratedModels/UserFeedbackReportResponse.php b/src/GeneratedModels/UserFeedbackReportResponse.php index 1e12fdf3..d967ed63 100644 --- a/src/GeneratedModels/UserFeedbackReportResponse.php +++ b/src/GeneratedModels/UserFeedbackReportResponse.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array $daily - */ class UserFeedbackReportResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UserFeedbackResponse.php b/src/GeneratedModels/UserFeedbackResponse.php index 6812e687..eaae9865 100644 --- a/src/GeneratedModels/UserFeedbackResponse.php +++ b/src/GeneratedModels/UserFeedbackResponse.php @@ -3,29 +3,16 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $cid - * @property int $rating - * @property string $reason - * @property string $sdk - * @property string $sdkVersion - * @property string $sessionID - * @property string $userID - * @property PlatformDataResponse $platform - * @property object|null $custom - */ class UserFeedbackResponse extends BaseModel { public function __construct( public ?string $cid = null, + public ?string $sessionID = null, + public ?string $userID = null, public ?int $rating = null, public ?string $reason = null, public ?string $sdk = null, public ?string $sdkVersion = null, - public ?string $sessionID = null, - public ?string $userID = null, public ?PlatformDataResponse $platform = null, public ?object $custom = null, ) { diff --git a/src/GeneratedModels/UserFlaggedEvent.php b/src/GeneratedModels/UserFlaggedEvent.php index d7edee86..84808edd 100644 --- a/src/GeneratedModels/UserFlaggedEvent.php +++ b/src/GeneratedModels/UserFlaggedEvent.php @@ -4,22 +4,19 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property string $type - * @property string|null $targetUser - * @property array|null $targetUsers - * @property User|null $user + * This event is sent when a user gets flagged. The event contains information about the user that was flagged. */ class UserFlaggedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?string $targetUser = null, - public ?array $targetUsers = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "user.flagged" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?UserResponseCommonFields $user = null, + public ?UserResponseCommonFields $targetUser = null, + public ?string $reason = null, // The reason for the flag + public ?int $totalFlags = null, // The total number of flags for the user + public ?object $custom = null, // Custom data ) { } diff --git a/src/GeneratedModels/UserIdenticalContentCountParameters.php b/src/GeneratedModels/UserIdenticalContentCountParameters.php index c64371b4..9620b20d 100644 --- a/src/GeneratedModels/UserIdenticalContentCountParameters.php +++ b/src/GeneratedModels/UserIdenticalContentCountParameters.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int|null $threshold - * @property string|null $timeWindow - */ class UserIdenticalContentCountParameters extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UserMessagesDeletedEvent.php b/src/GeneratedModels/UserMessagesDeletedEvent.php index ee90aa64..e0c6ad30 100644 --- a/src/GeneratedModels/UserMessagesDeletedEvent.php +++ b/src/GeneratedModels/UserMessagesDeletedEvent.php @@ -5,37 +5,23 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a user's message get deleted. The event contains information about the user whose messages got deleted. - * - * @property \DateTime $createdAt - * @property object $custom - * @property UserResponseCommonFields $user - * @property string $type - * @property string|null $channelID - * @property int|null $channelMemberCount - * @property int|null $channelMessageCount - * @property string|null $channelType - * @property string|null $cid - * @property bool|null $hardDelete - * @property \DateTime|null $receivedAt - * @property string|null $team - * @property object|null $channelCustom */ class UserMessagesDeletedEvent extends BaseModel { public function __construct( + public ?string $type = null, // The type of event: "user.messages.deleted" in this case public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, public ?object $custom = null, - public ?UserResponseCommonFields $user = null, - public ?string $type = null, // The type of event: "user.messages.deleted" in this case - public ?string $channelID = null, // The ID of the channel where the target user's messages were deleted + public ?string $cid = null, // The CID of the channel where the target user's messages were deleted + public ?string $team = null, // The team of the channel where the target user's messages were deleted public ?int $channelMemberCount = null, public ?int $channelMessageCount = null, + public ?object $channelCustom = null, public ?string $channelType = null, // The type of the channel where the target user's messages were deleted - public ?string $cid = null, // The CID of the channel where the target user's messages were deleted + public ?string $channelID = null, // The ID of the channel where the target user's messages were deleted + public ?UserResponseCommonFields $user = null, public ?bool $hardDelete = null, // Whether Messages were hard deleted - public ?\DateTime $receivedAt = null, - public ?string $team = null, // The team of the channel where the target user's messages were deleted - public ?object $channelCustom = null, ) { } diff --git a/src/GeneratedModels/UserMuteResponse.php b/src/GeneratedModels/UserMuteResponse.php index d395f48c..5275a080 100644 --- a/src/GeneratedModels/UserMuteResponse.php +++ b/src/GeneratedModels/UserMuteResponse.php @@ -3,23 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property \DateTime $createdAt - * @property \DateTime $updatedAt - * @property \DateTime|null $expires - * @property UserResponse|null $target - * @property UserResponse|null $user - */ class UserMuteResponse extends BaseModel { public function __construct( + public ?UserResponse $user = null, + public ?UserResponse $target = null, + public ?\DateTime $expires = null, public ?\DateTime $createdAt = null, public ?\DateTime $updatedAt = null, - public ?\DateTime $expires = null, - public ?UserResponse $target = null, - public ?UserResponse $user = null, ) { } diff --git a/src/GeneratedModels/UserMutedEvent.php b/src/GeneratedModels/UserMutedEvent.php index 0d1dbbdd..4fe9caec 100644 --- a/src/GeneratedModels/UserMutedEvent.php +++ b/src/GeneratedModels/UserMutedEvent.php @@ -4,22 +4,20 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property string $type - * @property string|null $targetUser - * @property array|null $targetUsers - * @property User|null $user + * This event is sent when a user gets muted. The event contains information about the user that was muted. */ class UserMutedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?string $targetUser = null, - public ?array $targetUsers = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "user.muted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?UserResponseCommonFields $user = null, + public ?UserResponseCommonFields $targetUser = null, + /** @var array|null */ + #[ArrayOf(UserResponseCommonFields::class)] + public ?array $targetUsers = null, // The target users that were muted ) { } diff --git a/src/GeneratedModels/UserRatingReportResponse.php b/src/GeneratedModels/UserRatingReportResponse.php index b3dcc497..ddccfb90 100644 --- a/src/GeneratedModels/UserRatingReportResponse.php +++ b/src/GeneratedModels/UserRatingReportResponse.php @@ -3,17 +3,11 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property int $average - * @property int $count - */ class UserRatingReportResponse extends BaseModel { public function __construct( - public ?int $average = null, public ?int $count = null, + public ?int $average = null, ) { } diff --git a/src/GeneratedModels/UserReactivatedEvent.php b/src/GeneratedModels/UserReactivatedEvent.php index d8035f3c..15111dd0 100644 --- a/src/GeneratedModels/UserReactivatedEvent.php +++ b/src/GeneratedModels/UserReactivatedEvent.php @@ -4,18 +4,17 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property string $type - * @property User|null $user + * This event is sent when a user gets reactivated. The event contains information about the user that was reactivated. */ class UserReactivatedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "user.reactivated" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?UserResponseCommonFields $user = null, + public ?UserResponseCommonFields $createdBy = null, ) { } diff --git a/src/GeneratedModels/UserRequest.php b/src/GeneratedModels/UserRequest.php index 55d932df..e5d7e8f1 100644 --- a/src/GeneratedModels/UserRequest.php +++ b/src/GeneratedModels/UserRequest.php @@ -5,31 +5,20 @@ namespace GetStream\GeneratedModels; /** * User request object - * - * @property string $id - * @property string|null $image - * @property bool|null $invisible - * @property string|null $language - * @property string|null $name - * @property string|null $role - * @property array|null $teams - * @property object|null $custom - * @property PrivacySettingsResponse|null $privacySettings - * @property array|null $teamsRole */ class UserRequest extends BaseModel { public function __construct( public ?string $id = null, // User ID - public ?string $image = null, // User's profile image URL - public ?bool $invisible = null, - public ?string $language = null, public ?string $name = null, // Optional name of user - public ?string $role = null, // User's global role - public ?array $teams = null, // List of teams the user belongs to + public ?string $image = null, // User's profile image URL public ?object $custom = null, // Custom user data + public ?string $language = null, + public ?bool $invisible = null, public ?PrivacySettingsResponse $privacySettings = null, + public ?string $role = null, // User's global role public ?array $teamsRole = null, // Map of team-specific roles for the user + public ?array $teams = null, // List of teams the user belongs to ) { } diff --git a/src/GeneratedModels/UserResponse.php b/src/GeneratedModels/UserResponse.php index 2a7fdab9..b0249822 100644 --- a/src/GeneratedModels/UserResponse.php +++ b/src/GeneratedModels/UserResponse.php @@ -5,61 +5,36 @@ namespace GetStream\GeneratedModels; /** * User response object - * - * @property bool $banned - * @property \DateTime $createdAt - * @property string $id - * @property bool $invisible - * @property string $language - * @property bool $online - * @property string $role - * @property bool $shadowBanned - * @property \DateTime $updatedAt - * @property array $blockedUserIds - * @property array $teams - * @property object $custom - * @property int|null $avgResponseTime - * @property \DateTime|null $banExpires - * @property \DateTime|null $deactivatedAt - * @property \DateTime|null $deletedAt - * @property string|null $image - * @property \DateTime|null $lastActive - * @property string|null $name - * @property \DateTime|null $revokeTokensIssuedBefore - * @property array|null $devices - * @property PrivacySettingsResponse|null $privacySettings - * @property PushNotificationSettingsResponse|null $pushNotifications - * @property array|null $teamsRole */ class UserResponse extends BaseModel { public function __construct( - public ?bool $banned = null, // Whether a user is banned or not - public ?\DateTime $createdAt = null, // Date/time of creation public ?string $id = null, // Unique user identifier - public ?bool $invisible = null, + public ?string $name = null, // Optional name of user + public ?string $image = null, + public ?object $custom = null, // Custom data for this object public ?string $language = null, // Preferred language of a user - public ?bool $online = null, // Whether a user online or not public ?string $role = null, // Determines the set of user permissions - public ?bool $shadowBanned = null, // Whether a user is shadow banned - public ?\DateTime $updatedAt = null, // Date/time of the last update - public ?array $blockedUserIds = null, public ?array $teams = null, // List of teams user is a part of - public ?object $custom = null, // Custom data for this object - public ?int $avgResponseTime = null, - public ?\DateTime $banExpires = null, // Date when ban expires - public ?\DateTime $deactivatedAt = null, // Date of deactivation + public ?array $teamsRole = null, + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $updatedAt = null, // Date/time of the last update public ?\DateTime $deletedAt = null, // Date/time of deletion - public ?string $image = null, + public ?bool $banned = null, // Whether a user is banned or not + public ?bool $online = null, // Whether a user online or not public ?\DateTime $lastActive = null, // Date of last activity - public ?string $name = null, // Optional name of user public ?\DateTime $revokeTokensIssuedBefore = null, // Revocation date for tokens - /** @var array|null List of devices user is using */ + public ?\DateTime $deactivatedAt = null, // Date of deactivation + public ?array $blockedUserIds = null, + public ?int $avgResponseTime = null, + public ?bool $shadowBanned = null, // Whether a user is shadow banned + public ?\DateTime $banExpires = null, // Date when ban expires + public ?PushNotificationSettingsResponse $pushNotifications = null, + public ?PrivacySettingsResponse $privacySettings = null, + /** @var array|null */ #[ArrayOf(DeviceResponse::class)] public ?array $devices = null, // List of devices user is using - public ?PrivacySettingsResponse $privacySettings = null, - public ?PushNotificationSettingsResponse $pushNotifications = null, - public ?array $teamsRole = null, + public ?bool $invisible = null, ) { } diff --git a/src/GeneratedModels/UserResponseCommonFields.php b/src/GeneratedModels/UserResponseCommonFields.php index 97cd6759..8c54317c 100644 --- a/src/GeneratedModels/UserResponseCommonFields.php +++ b/src/GeneratedModels/UserResponseCommonFields.php @@ -3,49 +3,27 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $banned - * @property \DateTime $createdAt - * @property string $id - * @property string $language - * @property bool $online - * @property string $role - * @property \DateTime $updatedAt - * @property array $blockedUserIds - * @property array $teams - * @property object $custom - * @property int|null $avgResponseTime - * @property \DateTime|null $deactivatedAt - * @property \DateTime|null $deletedAt - * @property string|null $image - * @property \DateTime|null $lastActive - * @property string|null $name - * @property \DateTime|null $revokeTokensIssuedBefore - * @property array|null $teamsRole - */ class UserResponseCommonFields extends BaseModel { public function __construct( - public ?bool $banned = null, - public ?\DateTime $createdAt = null, public ?string $id = null, + public ?string $name = null, + public ?string $image = null, + public ?object $custom = null, public ?string $language = null, - public ?bool $online = null, public ?string $role = null, - public ?\DateTime $updatedAt = null, - public ?array $blockedUserIds = null, public ?array $teams = null, - public ?object $custom = null, - public ?int $avgResponseTime = null, - public ?\DateTime $deactivatedAt = null, + public ?array $teamsRole = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, public ?\DateTime $deletedAt = null, - public ?string $image = null, + public ?bool $banned = null, + public ?bool $online = null, public ?\DateTime $lastActive = null, - public ?string $name = null, public ?\DateTime $revokeTokensIssuedBefore = null, - public ?array $teamsRole = null, + public ?\DateTime $deactivatedAt = null, + public ?array $blockedUserIds = null, + public ?int $avgResponseTime = null, ) { } diff --git a/src/GeneratedModels/UserResponsePrivacyFields.php b/src/GeneratedModels/UserResponsePrivacyFields.php index 6ddbb863..72fbc419 100644 --- a/src/GeneratedModels/UserResponsePrivacyFields.php +++ b/src/GeneratedModels/UserResponsePrivacyFields.php @@ -3,53 +3,29 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $banned - * @property \DateTime $createdAt - * @property string $id - * @property string $language - * @property bool $online - * @property string $role - * @property \DateTime $updatedAt - * @property array $blockedUserIds - * @property array $teams - * @property object $custom - * @property int|null $avgResponseTime - * @property \DateTime|null $deactivatedAt - * @property \DateTime|null $deletedAt - * @property string|null $image - * @property bool|null $invisible - * @property \DateTime|null $lastActive - * @property string|null $name - * @property \DateTime|null $revokeTokensIssuedBefore - * @property PrivacySettingsResponse|null $privacySettings - * @property array|null $teamsRole - */ class UserResponsePrivacyFields extends BaseModel { public function __construct( - public ?bool $banned = null, - public ?\DateTime $createdAt = null, public ?string $id = null, + public ?string $name = null, + public ?string $image = null, + public ?object $custom = null, public ?string $language = null, - public ?bool $online = null, public ?string $role = null, - public ?\DateTime $updatedAt = null, - public ?array $blockedUserIds = null, public ?array $teams = null, - public ?object $custom = null, - public ?int $avgResponseTime = null, - public ?\DateTime $deactivatedAt = null, + public ?array $teamsRole = null, + public ?\DateTime $createdAt = null, + public ?\DateTime $updatedAt = null, public ?\DateTime $deletedAt = null, - public ?string $image = null, - public ?bool $invisible = null, + public ?bool $banned = null, + public ?bool $online = null, public ?\DateTime $lastActive = null, - public ?string $name = null, public ?\DateTime $revokeTokensIssuedBefore = null, + public ?\DateTime $deactivatedAt = null, + public ?array $blockedUserIds = null, + public ?int $avgResponseTime = null, public ?PrivacySettingsResponse $privacySettings = null, - public ?array $teamsRole = null, + public ?bool $invisible = null, ) { } diff --git a/src/GeneratedModels/UserRoleParameters.php b/src/GeneratedModels/UserRoleParameters.php index 793970c3..a16f2be1 100644 --- a/src/GeneratedModels/UserRoleParameters.php +++ b/src/GeneratedModels/UserRoleParameters.php @@ -3,12 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $operator - * @property string|null $role - */ class UserRoleParameters extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UserRuleParameters.php b/src/GeneratedModels/UserRuleParameters.php index 38a28ff8..c36db0ed 100644 --- a/src/GeneratedModels/UserRuleParameters.php +++ b/src/GeneratedModels/UserRuleParameters.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string|null $maxAge - */ class UserRuleParameters extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/UserUnbannedEvent.php b/src/GeneratedModels/UserUnbannedEvent.php index 269d55d0..3c0aaedc 100644 --- a/src/GeneratedModels/UserUnbannedEvent.php +++ b/src/GeneratedModels/UserUnbannedEvent.php @@ -4,28 +4,25 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property string $channelID - * @property string $channelType - * @property string $cid - * @property \DateTime $createdAt - * @property bool $shadow - * @property string $type - * @property string|null $team - * @property User|null $user + * This event is sent when a user gets unbanned. The event contains information about the user that was unbanned. */ class UserUnbannedEvent extends BaseModel { public function __construct( - public ?string $channelID = null, - public ?string $channelType = null, - public ?string $cid = null, - public ?\DateTime $createdAt = null, - public ?bool $shadow = null, - public ?string $type = null, - public ?string $team = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "user.unbanned" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?string $cid = null, // The CID of the channel where the target user was unbanned + public ?string $team = null, // The team of the channel where the target user was unbanned + public ?int $channelMemberCount = null, + public ?int $channelMessageCount = null, + public ?object $channelCustom = null, + public ?string $channelType = null, // The type of the channel where the target user was unbanned + public ?string $channelID = null, // The ID of the channel where the target user was unbanned + public ?UserResponseCommonFields $user = null, + public ?UserResponseCommonFields $createdBy = null, + public ?bool $shadow = null, // Whether the target user was shadow unbanned ) { } diff --git a/src/GeneratedModels/UserUnmutedEvent.php b/src/GeneratedModels/UserUnmutedEvent.php index 82c81332..fa36dedc 100644 --- a/src/GeneratedModels/UserUnmutedEvent.php +++ b/src/GeneratedModels/UserUnmutedEvent.php @@ -4,22 +4,20 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property string $type - * @property string|null $targetUser - * @property array|null $targetUsers - * @property User|null $user + * This event is sent when a user gets unmuted. The event contains information about the user that was unmuted. */ class UserUnmutedEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?string $type = null, - public ?string $targetUser = null, - public ?array $targetUsers = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "user.unmuted" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?UserResponseCommonFields $user = null, + public ?UserResponseCommonFields $targetUser = null, + /** @var array|null */ + #[ArrayOf(UserResponseCommonFields::class)] + public ?array $targetUsers = null, // The target users that were unmuted ) { } diff --git a/src/GeneratedModels/UserUnreadReminderEvent.php b/src/GeneratedModels/UserUnreadReminderEvent.php index 90713682..8a3cd86e 100644 --- a/src/GeneratedModels/UserUnreadReminderEvent.php +++ b/src/GeneratedModels/UserUnreadReminderEvent.php @@ -4,20 +4,19 @@ namespace GetStream\GeneratedModels; /** - * - * - * @property \DateTime $createdAt - * @property array $channels - * @property string $type - * @property User|null $user + * Reminder events allow you to notify your users about unread messages. Reminders can be used to trigger an email, push notification or SMS to the user. */ class UserUnreadReminderEvent extends BaseModel { public function __construct( - public ?\DateTime $createdAt = null, - public ?array $channels = null, - public ?string $type = null, - public ?User $user = null, + public ?string $type = null, // The type of event: "user.unread_message_reminder" in this case + public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, + public ?object $custom = null, + public ?UserResponseCommonFields $user = null, + /** @var array|null */ + #[MapOf(ChannelMessagesResponse::class)] + public ?array $channels = null, // The channels with unread messages ) { } diff --git a/src/GeneratedModels/UserUpdatedEvent.php b/src/GeneratedModels/UserUpdatedEvent.php index 87fb0e2c..ddf40ca3 100644 --- a/src/GeneratedModels/UserUpdatedEvent.php +++ b/src/GeneratedModels/UserUpdatedEvent.php @@ -5,21 +5,15 @@ namespace GetStream\GeneratedModels; /** * This event is sent when a user gets updated. The event contains information about the updated user. - * - * @property \DateTime $createdAt - * @property object $custom - * @property UserResponsePrivacyFields $user - * @property string $type - * @property \DateTime|null $receivedAt */ class UserUpdatedEvent extends BaseModel { public function __construct( + public ?string $type = null, // The type of event: "user.updated" in this case public ?\DateTime $createdAt = null, // Date/time of creation + public ?\DateTime $receivedAt = null, public ?object $custom = null, public ?UserResponsePrivacyFields $user = null, - public ?string $type = null, // The type of event: "user.updated" in this case - public ?\DateTime $receivedAt = null, ) { } diff --git a/src/GeneratedModels/VelocityFilterConfig.php b/src/GeneratedModels/VelocityFilterConfig.php index 59d3fc76..c2074fd2 100644 --- a/src/GeneratedModels/VelocityFilterConfig.php +++ b/src/GeneratedModels/VelocityFilterConfig.php @@ -3,29 +3,18 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $advancedFilters - * @property bool|null $async - * @property bool|null $cascadingActions - * @property int|null $cidsPerUser - * @property bool|null $enabled - * @property bool|null $firstMessageOnly - * @property array|null $rules - */ class VelocityFilterConfig extends BaseModel { public function __construct( - public ?bool $advancedFilters = null, public ?bool $async = null, - public ?bool $cascadingActions = null, - public ?int $cidsPerUser = null, public ?bool $enabled = null, - public ?bool $firstMessageOnly = null, /** @var array|null */ #[ArrayOf(VelocityFilterConfigRule::class)] public ?array $rules = null, + public ?bool $cascadingActions = null, + public ?bool $firstMessageOnly = null, + public ?int $cidsPerUser = null, + public ?bool $advancedFilters = null, ) { } diff --git a/src/GeneratedModels/VelocityFilterConfigRule.php b/src/GeneratedModels/VelocityFilterConfigRule.php index f98a4ab5..efafcb3d 100644 --- a/src/GeneratedModels/VelocityFilterConfigRule.php +++ b/src/GeneratedModels/VelocityFilterConfigRule.php @@ -3,41 +3,23 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property string $action - * @property int|null $banDuration - * @property string|null $cascadingAction - * @property int|null $cascadingThreshold - * @property bool|null $checkMessageContext - * @property int|null $fastSpamThreshold - * @property int|null $fastSpamTtl - * @property bool|null $ipBan - * @property int|null $probationPeriod - * @property bool|null $shadowBan - * @property int|null $slowSpamBanDuration - * @property int|null $slowSpamThreshold - * @property int|null $slowSpamTtl - * @property bool|null $urlOnly - */ class VelocityFilterConfigRule extends BaseModel { public function __construct( public ?string $action = null, public ?int $banDuration = null, - public ?string $cascadingAction = null, + public ?bool $shadowBan = null, + public ?bool $ipBan = null, public ?int $cascadingThreshold = null, - public ?bool $checkMessageContext = null, + public ?string $cascadingAction = null, public ?int $fastSpamThreshold = null, - public ?int $fastSpamTtl = null, - public ?bool $ipBan = null, - public ?int $probationPeriod = null, - public ?bool $shadowBan = null, - public ?int $slowSpamBanDuration = null, public ?int $slowSpamThreshold = null, + public ?bool $checkMessageContext = null, + public ?int $fastSpamTtl = null, public ?int $slowSpamTtl = null, + public ?int $slowSpamBanDuration = null, public ?bool $urlOnly = null, + public ?int $probationPeriod = null, ) { } diff --git a/src/GeneratedModels/VideoCallRuleConfig.php b/src/GeneratedModels/VideoCallRuleConfig.php index 080c50f3..a6a36885 100644 --- a/src/GeneratedModels/VideoCallRuleConfig.php +++ b/src/GeneratedModels/VideoCallRuleConfig.php @@ -3,21 +3,14 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $flagAllLabels - * @property array|null $flaggedLabels - * @property array|null $rules - */ class VideoCallRuleConfig extends BaseModel { public function __construct( - public ?bool $flagAllLabels = null, - public ?array $flaggedLabels = null, /** @var array|null */ #[ArrayOf(HarmConfig::class)] public ?array $rules = null, + public ?bool $flagAllLabels = null, + public ?array $flaggedLabels = null, ) { } diff --git a/src/GeneratedModels/VideoContentParameters.php b/src/GeneratedModels/VideoContentParameters.php index 7c9a6b23..130d6389 100644 --- a/src/GeneratedModels/VideoContentParameters.php +++ b/src/GeneratedModels/VideoContentParameters.php @@ -3,11 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property array|null $harmLabels - */ class VideoContentParameters extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/VideoEndCallRequestPayload.php b/src/GeneratedModels/VideoEndCallRequestPayload.php new file mode 100644 index 00000000..47c150a8 --- /dev/null +++ b/src/GeneratedModels/VideoEndCallRequestPayload.php @@ -0,0 +1,17 @@ +|null $byMinute - */ class VideoReactionOverTimeResponse extends BaseModel { public function __construct( diff --git a/src/GeneratedModels/VideoReactionResponse.php b/src/GeneratedModels/VideoReactionResponse.php new file mode 100644 index 00000000..928b6154 --- /dev/null +++ b/src/GeneratedModels/VideoReactionResponse.php @@ -0,0 +1,18 @@ + $channelType - * @property array $channels - * @property array $threads - * @property array|null $totalUnreadCountByTeam */ class WrappedUnreadCountsResponse extends BaseModel { public function __construct( - public ?string $duration = null, // Duration of the request in milliseconds public ?int $totalUnreadCount = null, public ?int $totalUnreadThreadsCount = null, - /** @var array|null */ - #[ArrayOf(UnreadCountsChannelType::class)] - public ?array $channelType = null, + public ?array $totalUnreadCountByTeam = null, /** @var array|null */ #[ArrayOf(UnreadCountsChannel::class)] public ?array $channels = null, + /** @var array|null */ + #[ArrayOf(UnreadCountsChannelType::class)] + public ?array $channelType = null, /** @var array|null */ #[ArrayOf(UnreadCountsThread::class)] public ?array $threads = null, - public ?array $totalUnreadCountByTeam = null, + public ?string $duration = null, // Duration of the request in milliseconds ) { } diff --git a/src/GeneratedModels/XiaomiConfig.php b/src/GeneratedModels/XiaomiConfig.php index 310f854c..ac804133 100644 --- a/src/GeneratedModels/XiaomiConfig.php +++ b/src/GeneratedModels/XiaomiConfig.php @@ -3,19 +3,12 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool|null $disabled - * @property string|null $packageName - * @property string|null $secret - */ class XiaomiConfig extends BaseModel { public function __construct( - public ?bool $disabled = null, public ?string $packageName = null, public ?string $secret = null, + public ?bool $disabled = null, ) { } diff --git a/src/GeneratedModels/XiaomiConfigFields.php b/src/GeneratedModels/XiaomiConfigFields.php index 4bd97ffe..644e9b86 100644 --- a/src/GeneratedModels/XiaomiConfigFields.php +++ b/src/GeneratedModels/XiaomiConfigFields.php @@ -3,13 +3,6 @@ declare(strict_types=1); namespace GetStream\GeneratedModels; -/** - * - * - * @property bool $enabled - * @property string|null $packageName - * @property string|null $secret - */ class XiaomiConfigFields extends BaseModel { public function __construct( diff --git a/src/Http/GuzzleHttpClient.php b/src/Http/GuzzleHttpClient.php index eafcf1c7..94c06291 100644 --- a/src/Http/GuzzleHttpClient.php +++ b/src/Http/GuzzleHttpClient.php @@ -20,12 +20,16 @@ class GuzzleHttpClient implements HttpClientInterface { private GuzzleClient $client; + /** Maximum number of retries for rate-limited (429) responses. */ + private int $maxRetries; + /** * Create a new GuzzleHttpClient. * - * @param array $config Guzzle client configuration + * @param array $config Guzzle client configuration + * @param int $maxRetries Maximum retries for 429 rate-limit responses (default 3) */ - public function __construct(array $config = []) + public function __construct(array $config = [], int $maxRetries = 3) { $defaultConfig = [ 'timeout' => 30, @@ -34,6 +38,7 @@ public function __construct(array $config = []) ]; $this->client = new GuzzleClient(array_merge($defaultConfig, $config)); + $this->maxRetries = $maxRetries; } /** @@ -68,9 +73,22 @@ public function request(string $method, string $url, array $headers = [], mixed } } - $response = $this->client->request($method, $url, $options); + // Retry loop for rate-limited responses + for ($attempt = 0;; $attempt++) { + $response = $this->client->request($method, $url, $options); + + if ($response->getStatusCode() !== 429 || $attempt >= $this->maxRetries) { + return $this->createStreamResponse($response); + } - return $this->createStreamResponse($response); + // Parse Retry-After header or use exponential backoff with jitter + // Jitter desynchronizes parallel test processes to avoid stampedes + $retryAfter = $response->getHeaderLine('Retry-After'); + $sleepSeconds = $retryAfter !== '' ? (int) $retryAfter : ($attempt + 1); + $sleepSeconds = min($sleepSeconds, 10); + $jitter = random_int(0, max(1, (int) round($sleepSeconds * 0.3))); + sleep($sleepSeconds + $jitter); + } } catch (ClientException|ServerException $e) { $response = $e->getResponse(); $streamResponse = $this->createStreamResponse($response); @@ -123,11 +141,22 @@ private function createStreamResponse(ResponseInterface $response): StreamRespon $message = 'API request failed'; $errorDetails = []; + // Try parsed JSON data first if (is_array($data)) { $message = $data['message'] ?? $data['error'] ?? $message; $errorDetails = $data; + } elseif (!empty($rawBody)) { + // Fallback: try parsing raw body as JSON even if content-type wasn't application/json + $fallbackData = json_decode($rawBody, true); + if (json_last_error() === JSON_ERROR_NONE && is_array($fallbackData)) { + $message = $fallbackData['message'] ?? $fallbackData['error'] ?? $message; + $errorDetails = $fallbackData; + } } + // Include HTTP status code in error message for better diagnostics + $message = "Stream API error (HTTP {$statusCode}): {$message}"; + throw new StreamApiException($message, $statusCode, $rawBody, $errorDetails); } diff --git a/tests/Integration/ChatChannelIntegrationTest.php b/tests/Integration/ChatChannelIntegrationTest.php new file mode 100644 index 00000000..25a3ccd1 --- /dev/null +++ b/tests/Integration/ChatChannelIntegrationTest.php @@ -0,0 +1,1018 @@ +getSharedUserIDs(); + $this->creatorID = $shared[0]; + $this->memberID1 = $shared[1]; + $this->memberID2 = $shared[2]; + $this->memberID3 = $shared[3]; + } + + /** + * @test + */ + public function testCreateChannelWithID(): void + { + [$type, $channelID] = $this->createTestChannel($this->creatorID); + + $resp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) ['id' => $channelID], + )); + $this->assertResponseSuccess($resp, 'query channel by ID'); + + $data = $resp->getData(); + self::assertNotEmpty($data->channels); + self::assertEquals($channelID, $data->channels[0]->channel->id); + self::assertEquals('messaging', $data->channels[0]->channel->type); + } + + /** + * @test + */ + public function testCreateChannelWithMembers(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1, $this->memberID2], + ); + + $resp = $this->getOrCreateChannel($type, $channelID, new GeneratedModels\ChannelGetOrCreateRequest()); + $this->assertResponseSuccess($resp, 'get channel with members'); + + self::assertGreaterThanOrEqual(3, count($resp->getData()->members)); + } + + /** + * @test + */ + public function testCreateDistinctChannel(): void + { + $members = [ + new GeneratedModels\ChannelMemberRequest(userID: $this->creatorID), + new GeneratedModels\ChannelMemberRequest(userID: $this->memberID1), + ]; + + $resp1 = $this->getOrCreateDistinctChannel('messaging', new GeneratedModels\ChannelGetOrCreateRequest( + data: new GeneratedModels\ChannelInput( + createdByID: $this->creatorID, + members: $members, + ), + )); + $this->assertResponseSuccess($resp1, 'create distinct channel'); + self::assertNotNull($resp1->getData()->channel); + + // Calling again with same members should return same channel + $resp2 = $this->getOrCreateDistinctChannel('messaging', new GeneratedModels\ChannelGetOrCreateRequest( + data: new GeneratedModels\ChannelInput( + createdByID: $this->creatorID, + members: $members, + ), + )); + $this->assertResponseSuccess($resp2, 'create distinct channel (second call)'); + + self::assertEquals($resp1->getData()->channel->cid, $resp2->getData()->channel->cid); + + // Track for cleanup + $this->createdChannels[] = ['type' => 'messaging', 'id' => $resp1->getData()->channel->id]; + } + + /** + * @test + */ + public function testQueryChannels(): void + { + [$type, $channelID] = $this->createTestChannel($this->creatorID); + + $resp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) ['type' => 'messaging', 'id' => $channelID], + )); + $this->assertResponseSuccess($resp, 'query channels'); + + self::assertNotEmpty($resp->getData()->channels); + self::assertEquals($channelID, $resp->getData()->channels[0]->channel->id); + } + + /** + * @test + */ + public function testUpdateChannel(): void + { + [$type, $channelID] = $this->createTestChannel($this->creatorID); + + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + data: new GeneratedModels\ChannelInputRequest( + custom: (object) ['color' => 'blue'], + ), + message: new GeneratedModels\MessageRequest( + text: 'Channel updated!', + userID: $this->creatorID, + ), + )); + $this->assertResponseSuccess($resp, 'update channel'); + + self::assertNotNull($resp->getData()->channel); + self::assertEquals('blue', $resp->getData()->channel->custom->color ?? null); + } + + /** + * @test + */ + public function testPartialUpdateChannel(): void + { + [$type, $channelID] = $this->createTestChannel($this->creatorID); + + // Set fields + $resp = $this->updateChannelPartial($type, $channelID, new GeneratedModels\UpdateChannelPartialRequest( + set: (object) [ + 'color' => 'red', + 'description' => 'A test channel', + ], + )); + $this->assertResponseSuccess($resp, 'partial update channel (set)'); + self::assertNotNull($resp->getData()->channel); + self::assertEquals('red', $resp->getData()->channel->custom->color ?? null); + + // Unset fields + $resp = $this->updateChannelPartial($type, $channelID, new GeneratedModels\UpdateChannelPartialRequest( + unset: ['color'], + )); + $this->assertResponseSuccess($resp, 'partial update channel (unset)'); + self::assertNotNull($resp->getData()->channel); + $custom = $resp->getData()->channel->custom; + self::assertTrue( + $custom === null || !isset($custom->color), + 'color should be unset', + ); + } + + /** + * @test + */ + public function testDeleteChannel(): void + { + $channelID = 'test-del-' . $this->randomString(12); + $type = 'messaging'; + + $this->getOrCreateChannel($type, $channelID, new GeneratedModels\ChannelGetOrCreateRequest( + data: new GeneratedModels\ChannelInput(createdByID: $this->creatorID), + )); + + // Track for cleanup (hard delete) in case soft delete test fails + $this->createdChannels[] = ['type' => $type, 'id' => $channelID]; + + // Soft delete + $resp = $this->deleteChannel($type, $channelID); + $this->assertResponseSuccess($resp, 'soft delete channel'); + self::assertNotNull($resp->getData()->channel); + } + + /** + * @test + */ + public function testHardDeleteChannels(): void + { + [$type1, $channelID1] = $this->createTestChannel($this->creatorID); + [$type2, $channelID2] = $this->createTestChannel($this->creatorID); + + $cid1 = "messaging:{$channelID1}"; + $cid2 = "messaging:{$channelID2}"; + + // Remove from cleanup tracking since we're hard-deleting them here + $this->createdChannels = array_filter($this->createdChannels, function ($ch) use ($channelID1, $channelID2) { + return $ch['id'] !== $channelID1 && $ch['id'] !== $channelID2; + }); + + $resp = $this->deleteChannelsBatch(new GeneratedModels\DeleteChannelsRequest( + cids: [$cid1, $cid2], + hardDelete: true, + )); + $this->assertResponseSuccess($resp, 'hard delete channels'); + self::assertNotEmpty($resp->getData()->taskID); + + $taskResult = $this->waitForTask($resp->getData()->taskID); + self::assertEquals('completed', $taskResult->status); + } + + /** + * @test + */ + public function testAddRemoveMembers(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Add members + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + addMembers: [ + new GeneratedModels\ChannelMemberRequest(userID: $this->memberID2), + new GeneratedModels\ChannelMemberRequest(userID: $this->memberID3), + ], + )); + $this->assertResponseSuccess($resp, 'add members'); + + // Verify members added + $stateResp = $this->getOrCreateChannel($type, $channelID, new GeneratedModels\ChannelGetOrCreateRequest()); + $this->assertResponseSuccess($stateResp, 'get channel after add members'); + self::assertGreaterThanOrEqual(4, count($stateResp->getData()->members)); + + // Remove a member + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + removeMembers: [$this->memberID3], + )); + $this->assertResponseSuccess($resp, 'remove member'); + + // Verify member removed + $stateResp = $this->getOrCreateChannel($type, $channelID, new GeneratedModels\ChannelGetOrCreateRequest()); + $this->assertResponseSuccess($stateResp, 'get channel after remove member'); + $memberIDs = array_map(fn($m) => $m->userID, $stateResp->getData()->members ?? []); + self::assertNotContains($this->memberID3, $memberIDs, 'memberID3 should have been removed'); + } + + /** + * @test + */ + public function testQueryMembers(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1, $this->memberID2], + ); + + $resp = $this->queryMembers(new GeneratedModels\QueryMembersPayload( + type: 'messaging', + id: $channelID, + filterConditions: (object) [], + )); + $this->assertResponseSuccess($resp, 'query members'); + self::assertGreaterThanOrEqual(3, count($resp->getData()->members)); + } + + /** + * @test + */ + public function testInviteAcceptReject(): void + { + $channelID = 'test-inv-' . $this->randomString(12); + $type = 'messaging'; + + // Create channel with invites + $resp = $this->getOrCreateChannel($type, $channelID, new GeneratedModels\ChannelGetOrCreateRequest( + data: new GeneratedModels\ChannelInput( + createdByID: $this->creatorID, + members: [new GeneratedModels\ChannelMemberRequest(userID: $this->creatorID)], + invites: [ + new GeneratedModels\ChannelMemberRequest(userID: $this->memberID1), + new GeneratedModels\ChannelMemberRequest(userID: $this->memberID2), + ], + ), + )); + $this->assertResponseSuccess($resp, 'create channel with invites'); + $this->createdChannels[] = ['type' => $type, 'id' => $channelID]; + + // Accept invite + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + acceptInvite: true, + userID: $this->memberID1, + )); + $this->assertResponseSuccess($resp, 'accept invite'); + + // Reject invite + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + rejectInvite: true, + userID: $this->memberID2, + )); + $this->assertResponseSuccess($resp, 'reject invite'); + } + + /** + * @test + */ + public function testHideShowChannel(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Hide + $resp = $this->hideChannel($type, $channelID, new GeneratedModels\HideChannelRequest( + userID: $this->memberID1, + )); + $this->assertResponseSuccess($resp, 'hide channel'); + + // Show + $resp = $this->showChannel($type, $channelID, new GeneratedModels\ShowChannelRequest( + userID: $this->memberID1, + )); + $this->assertResponseSuccess($resp, 'show channel'); + } + + /** + * @test + */ + public function testTruncateChannel(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Send some messages + $this->sendTestMessage($type, $channelID, $this->creatorID, 'Message 1'); + $this->sendTestMessage($type, $channelID, $this->creatorID, 'Message 2'); + $this->sendTestMessage($type, $channelID, $this->creatorID, 'Message 3'); + + // Truncate + $resp = $this->truncateChannel($type, $channelID, new GeneratedModels\TruncateChannelRequest()); + $this->assertResponseSuccess($resp, 'truncate channel'); + + // Verify messages are gone + $stateResp = $this->getOrCreateChannel($type, $channelID, new GeneratedModels\ChannelGetOrCreateRequest()); + $this->assertResponseSuccess($stateResp, 'get channel after truncate'); + self::assertEmpty($stateResp->getData()->messages ?? [], 'Messages should be empty after truncation'); + } + + /** + * @test + */ + public function testFreezeUnfreezeChannel(): void + { + [$type, $channelID] = $this->createTestChannel($this->creatorID); + + // Freeze + $resp = $this->updateChannelPartial($type, $channelID, new GeneratedModels\UpdateChannelPartialRequest( + set: (object) ['frozen' => true], + )); + $this->assertResponseSuccess($resp, 'freeze channel'); + self::assertTrue($resp->getData()->channel->frozen); + + // Unfreeze + $resp = $this->updateChannelPartial($type, $channelID, new GeneratedModels\UpdateChannelPartialRequest( + set: (object) ['frozen' => false], + )); + $this->assertResponseSuccess($resp, 'unfreeze channel'); + self::assertFalse($resp->getData()->channel->frozen); + } + + /** + * @test + */ + public function testMarkReadUnread(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Send a message + $msgID = $this->sendTestMessage($type, $channelID, $this->creatorID, 'Message to mark read'); + + // Mark read + $resp = $this->markRead($type, $channelID, new GeneratedModels\MarkReadRequest( + userID: $this->memberID1, + )); + $this->assertResponseSuccess($resp, 'mark read'); + + // Mark unread from this message + $resp = $this->markUnread($type, $channelID, new GeneratedModels\MarkUnreadRequest( + userID: $this->memberID1, + messageID: $msgID, + )); + $this->assertResponseSuccess($resp, 'mark unread'); + } + + /** + * @test + */ + public function testMuteUnmuteChannel(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + $cid = "messaging:{$channelID}"; + + // Mute the channel for memberID1 + $muteResp = $this->muteChannel(new GeneratedModels\MuteChannelRequest( + channelCids: [$cid], + userID: $this->memberID1, + )); + $this->assertResponseSuccess($muteResp, 'mute channel'); + self::assertNotNull($muteResp->getData()->channelMute, 'Mute response should contain channelMute'); + self::assertNotNull($muteResp->getData()->channelMute->channel, 'ChannelMute should have channel'); + + // Verify via QueryChannels with muted=true + $qResp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) ['muted' => true, 'cid' => $cid], + userID: $this->memberID1, + )); + $this->assertResponseSuccess($qResp, 'query muted channels'); + self::assertCount(1, $qResp->getData()->channels, 'Should find exactly 1 muted channel'); + self::assertEquals($cid, $qResp->getData()->channels[0]->channel->cid); + + // Unmute + $resp = $this->unmuteChannel(new GeneratedModels\UnmuteChannelRequest( + channelCids: [$cid], + userID: $this->memberID1, + )); + $this->assertResponseSuccess($resp, 'unmute channel'); + + // Verify unmuted + $qResp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) ['muted' => false, 'cid' => $cid], + userID: $this->memberID1, + )); + $this->assertResponseSuccess($qResp, 'query unmuted channels'); + self::assertCount(1, $qResp->getData()->channels, 'Unmuted channel should appear in muted=false query'); + } + + /** + * @test + */ + public function testMemberPartialUpdate(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Set custom fields on member + $resp = $this->updateMemberPartial($type, $channelID, $this->memberID1, new GeneratedModels\UpdateMemberPartialRequest( + set: (object) [ + 'role_label' => 'moderator', + 'score' => 42, + ], + )); + $this->assertResponseSuccess($resp, 'member partial update (set)'); + self::assertNotNull($resp->getData()->channelMember); + self::assertEquals('moderator', $resp->getData()->channelMember->custom->role_label ?? null); + + // Unset a custom field + $resp = $this->updateMemberPartial($type, $channelID, $this->memberID1, new GeneratedModels\UpdateMemberPartialRequest( + unset: ['score'], + )); + $this->assertResponseSuccess($resp, 'member partial update (unset)'); + self::assertNotNull($resp->getData()->channelMember); + $custom = $resp->getData()->channelMember->custom; + self::assertTrue( + $custom === null || !isset($custom->score), + 'score should be unset', + ); + } + + /** + * @test + */ + public function testAssignRoles(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Assign channel_moderator role to memberID1 + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + assignRoles: [ + new GeneratedModels\ChannelMemberRequest( + userID: $this->memberID1, + channelRole: 'channel_moderator', + ), + ], + )); + $this->assertResponseSuccess($resp, 'assign roles'); + + // Verify via QueryMembers + $qResp = $this->queryMembers(new GeneratedModels\QueryMembersPayload( + type: 'messaging', + id: $channelID, + filterConditions: (object) ['id' => $this->memberID1], + )); + $this->assertResponseSuccess($qResp, 'query members after assign roles'); + self::assertNotEmpty($qResp->getData()->members); + self::assertEquals('channel_moderator', $qResp->getData()->members[0]->channelRole); + } + + /** + * @test + */ + public function testAddDemoteModerators(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Add moderator + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + addModerators: [$this->memberID1], + )); + $this->assertResponseSuccess($resp, 'add moderator'); + + // Verify role changed to moderator + $qResp = $this->queryMembers(new GeneratedModels\QueryMembersPayload( + type: 'messaging', + id: $channelID, + filterConditions: (object) ['id' => $this->memberID1], + )); + $this->assertResponseSuccess($qResp, 'query members after add moderator'); + self::assertNotEmpty($qResp->getData()->members); + self::assertEquals('channel_moderator', $qResp->getData()->members[0]->channelRole); + + // Demote moderator back to member + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + demoteModerators: [$this->memberID1], + )); + $this->assertResponseSuccess($resp, 'demote moderator'); + + // Verify role changed back to member + $qResp = $this->queryMembers(new GeneratedModels\QueryMembersPayload( + type: 'messaging', + id: $channelID, + filterConditions: (object) ['id' => $this->memberID1], + )); + $this->assertResponseSuccess($qResp, 'query members after demote moderator'); + self::assertNotEmpty($qResp->getData()->members); + self::assertEquals('channel_member', $qResp->getData()->members[0]->channelRole); + } + + /** + * @test + */ + public function testMarkUnreadWithThread(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Send parent message + $parentID = $this->sendTestMessage($type, $channelID, $this->creatorID, 'Parent for mark unread thread'); + + // Send reply to create a thread + $resp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'Reply in thread', + userID: $this->creatorID, + parentID: $parentID, + ), + )); + $this->assertResponseSuccess($resp, 'send thread reply'); + + // Mark unread from thread + $resp = $this->markUnread($type, $channelID, new GeneratedModels\MarkUnreadRequest( + userID: $this->memberID1, + threadID: $parentID, + )); + $this->assertResponseSuccess($resp, 'mark unread with thread'); + } + + /** + * @test + */ + public function testTruncateWithOptions(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Send messages + $this->sendTestMessage($type, $channelID, $this->creatorID, 'Truncate msg 1'); + $this->sendTestMessage($type, $channelID, $this->creatorID, 'Truncate msg 2'); + + // Truncate with message, skip push, and hard delete + $resp = $this->truncateChannel($type, $channelID, new GeneratedModels\TruncateChannelRequest( + message: new GeneratedModels\MessageRequest( + text: 'Channel was truncated', + userID: $this->creatorID, + ), + skipPush: true, + hardDelete: true, + )); + $this->assertResponseSuccess($resp, 'truncate with options'); + } + + /** + * @test + */ + public function testPinUnpinChannel(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Pin channel for memberID1 via UpdateMemberPartial + $resp = $this->updateMemberPartial($type, $channelID, $this->memberID1, new GeneratedModels\UpdateMemberPartialRequest( + set: (object) ['pinned' => true], + )); + $this->assertResponseSuccess($resp, 'pin channel'); + + // Verify via QueryChannels with pinned filter + $qResp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) [ + 'pinned' => true, + 'cid' => "messaging:{$channelID}", + ], + userID: $this->memberID1, + )); + $this->assertResponseSuccess($qResp, 'query pinned channels'); + self::assertCount(1, $qResp->getData()->channels, 'Should find 1 pinned channel'); + self::assertEquals("messaging:{$channelID}", $qResp->getData()->channels[0]->channel->cid); + + // Unpin + $resp = $this->updateMemberPartial($type, $channelID, $this->memberID1, new GeneratedModels\UpdateMemberPartialRequest( + set: (object) ['pinned' => false], + )); + $this->assertResponseSuccess($resp, 'unpin channel'); + + // Verify unpinned + $qResp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) [ + 'pinned' => false, + 'cid' => "messaging:{$channelID}", + ], + userID: $this->memberID1, + )); + $this->assertResponseSuccess($qResp, 'query unpinned channels'); + self::assertCount(1, $qResp->getData()->channels, 'Should find channel with pinned=false'); + } + + /** + * @test + */ + public function testArchiveUnarchiveChannel(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Archive channel for memberID1 via UpdateMemberPartial + $resp = $this->updateMemberPartial($type, $channelID, $this->memberID1, new GeneratedModels\UpdateMemberPartialRequest( + set: (object) ['archived' => true], + )); + $this->assertResponseSuccess($resp, 'archive channel'); + + // Verify via QueryChannels with archived filter + $qResp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) [ + 'archived' => true, + 'cid' => "messaging:{$channelID}", + ], + userID: $this->memberID1, + )); + $this->assertResponseSuccess($qResp, 'query archived channels'); + self::assertCount(1, $qResp->getData()->channels, 'Should find 1 archived channel'); + + // Unarchive + $resp = $this->updateMemberPartial($type, $channelID, $this->memberID1, new GeneratedModels\UpdateMemberPartialRequest( + set: (object) ['archived' => false], + )); + $this->assertResponseSuccess($resp, 'unarchive channel'); + + // Verify unarchived + $qResp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) [ + 'archived' => false, + 'cid' => "messaging:{$channelID}", + ], + userID: $this->memberID1, + )); + $this->assertResponseSuccess($qResp, 'query unarchived channels'); + self::assertCount(1, $qResp->getData()->channels, 'Should find channel with archived=false'); + } + + /** + * @test + */ + public function testAddMembersWithRoles(): void + { + [$type, $channelID] = $this->createTestChannel($this->creatorID); + + $newUserIDs = $this->createTestUsers(2); + $modUserID = $newUserIDs[0]; + $memberUserID = $newUserIDs[1]; + + // Add members with specific channel roles + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + addMembers: [ + new GeneratedModels\ChannelMemberRequest(userID: $modUserID, channelRole: 'channel_moderator'), + new GeneratedModels\ChannelMemberRequest(userID: $memberUserID, channelRole: 'channel_member'), + ], + )); + $this->assertResponseSuccess($resp, 'add members with roles'); + + // Query members to verify roles + $membersResp = $this->queryMembers(new GeneratedModels\QueryMembersPayload( + type: 'messaging', + id: $channelID, + filterConditions: (object) ['id' => (object) ['$in' => $newUserIDs]], + )); + $this->assertResponseSuccess($membersResp, 'query members with roles'); + + $roleMap = []; + foreach ($membersResp->getData()->members ?? [] as $m) { + if ($m->userID !== null) { + $roleMap[$m->userID] = $m->channelRole; + } + } + self::assertEquals('channel_moderator', $roleMap[$modUserID] ?? null, 'First user should be channel_moderator'); + self::assertEquals('channel_member', $roleMap[$memberUserID] ?? null, 'Second user should be channel_member'); + } + + /** + * @test + */ + public function testMessageCount(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Send a message + $this->sendTestMessage($type, $channelID, $this->creatorID, 'hello world'); + + // Query the channel to get message count + $qResp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) ['cid' => "messaging:{$channelID}"], + userID: $this->creatorID, + )); + $this->assertResponseSuccess($qResp, 'query channel for message count'); + self::assertCount(1, $qResp->getData()->channels); + + $channel = $qResp->getData()->channels[0]->channel; + if ($channel->messageCount !== null) { + self::assertGreaterThanOrEqual(1, $channel->messageCount, 'MessageCount should be >= 1'); + } + } + + /** + * @test + */ + public function testSendChannelEvent(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + $resp = $this->sendEvent($type, $channelID, new GeneratedModels\SendEventRequest( + event: new GeneratedModels\EventRequest( + type: 'typing.start', + userID: $this->creatorID, + ), + )); + $this->assertResponseSuccess($resp, 'send channel event'); + } + + /** + * @test + */ + public function testFilterTags(): void + { + [$type, $channelID] = $this->createTestChannel($this->creatorID); + + // Add filter tags + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + addFilterTags: ['sports', 'news'], + )); + $this->assertResponseSuccess($resp, 'add filter tags'); + + // Verify tags were added + $stateResp = $this->getOrCreateChannel($type, $channelID, new GeneratedModels\ChannelGetOrCreateRequest()); + $this->assertResponseSuccess($stateResp, 'get channel after adding filter tags'); + + // Remove filter tag + $resp = $this->updateChannel($type, $channelID, new GeneratedModels\UpdateChannelRequest( + removeFilterTags: ['sports'], + )); + $this->assertResponseSuccess($resp, 'remove filter tag'); + } + + /** + * @test + */ + public function testMessageCountDisabled(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Disable count_messages via config_overrides partial update + $resp = $this->updateChannelPartial($type, $channelID, new GeneratedModels\UpdateChannelPartialRequest( + set: (object) [ + 'config_overrides' => (object) [ + 'count_messages' => false, + ], + ], + )); + $this->assertResponseSuccess($resp, 'disable message count'); + + // Send a message + $this->sendTestMessage($type, $channelID, $this->creatorID, 'hello world disabled count'); + + // Query the channel — MessageCount should be nil when disabled + $qResp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) ['cid' => "messaging:{$channelID}"], + userID: $this->creatorID, + )); + $this->assertResponseSuccess($qResp, 'query channel with disabled message count'); + self::assertCount(1, $qResp->getData()->channels); + self::assertNull( + $qResp->getData()->channels[0]->channel->messageCount, + 'MessageCount should be null when count_messages is disabled', + ); + } + + /** + * @test + */ + public function testMarkUnreadWithTimestamp(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID, $this->memberID1], + ); + + // Send a message to get a valid timestamp + $sendResp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'test message for timestamp unread', + userID: $this->creatorID, + ), + )); + $this->assertResponseSuccess($sendResp, 'send message for timestamp'); + self::assertNotNull($sendResp->getData()->message->createdAt); + + $ts = $sendResp->getData()->message->createdAt; + + // Mark unread from timestamp + $resp = $this->markUnread($type, $channelID, new GeneratedModels\MarkUnreadRequest( + userID: $this->memberID1, + messageTimestamp: $ts, + )); + $this->assertResponseSuccess($resp, 'mark unread with timestamp'); + } + + /** + * @test + */ + public function testHideForCreator(): void + { + $channelID = 'test-hide-' . $this->randomString(12); + $type = 'messaging'; + + $resp = $this->getOrCreateChannel($type, $channelID, new GeneratedModels\ChannelGetOrCreateRequest( + hideForCreator: true, + data: new GeneratedModels\ChannelInput( + createdByID: $this->creatorID, + members: [ + new GeneratedModels\ChannelMemberRequest(userID: $this->creatorID), + new GeneratedModels\ChannelMemberRequest(userID: $this->memberID1), + ], + ), + )); + $this->assertResponseSuccess($resp, 'create channel with hide for creator'); + $this->createdChannels[] = ['type' => $type, 'id' => $channelID]; + + // Channel should be hidden for creator — querying should not find it + $qResp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) ['cid' => "messaging:{$channelID}"], + userID: $this->creatorID, + )); + $this->assertResponseSuccess($qResp, 'query hidden channel'); + self::assertEmpty($qResp->getData()->channels, 'Channel should be hidden for creator'); + } + + /** + * @test + */ + public function testUploadAndDeleteFile(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID], + ); + + // Create a temp file + $tmpFile = tempnam(sys_get_temp_dir(), 'chat-test-') . '.txt'; + file_put_contents($tmpFile, 'hello world test file content'); + + try { + // Upload file using the makeRequest multipart pattern + $uploadResp = StreamResponse::fromJson( + $this->client->makeRequest( + 'POST', + "/api/v2/chat/channels/{$type}/{$channelID}/file", + [], + new GeneratedModels\FileUploadRequest( + file: $tmpFile, + user: new GeneratedModels\OnlyUserID(id: $this->creatorID), + ), + ), + GeneratedModels\UploadChannelFileResponse::class, + ); + $this->assertResponseSuccess($uploadResp, 'upload file'); + self::assertNotEmpty($uploadResp->getData()->file); + $fileURL = $uploadResp->getData()->file; + self::assertStringContainsString('http', $fileURL); + + // Delete file + $deleteResp = StreamResponse::fromJson( + $this->client->makeRequest( + 'DELETE', + "/api/v2/chat/channels/{$type}/{$channelID}/file", + ['url' => $fileURL], + ), + GeneratedModels\Response::class, + ); + $this->assertResponseSuccess($deleteResp, 'delete file'); + } finally { + @unlink($tmpFile); + } + } + + /** + * @test + */ + public function testUploadAndDeleteImage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers( + $this->creatorID, + [$this->creatorID], + ); + + // Create a minimal valid PNG file (1x1 pixel) + $tmpFile = tempnam(sys_get_temp_dir(), 'chat-test-') . '.png'; + // Minimal valid PNG: 1x1 white pixel + $pngData = base64_decode( + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==' + ); + file_put_contents($tmpFile, $pngData); + + try { + // Upload image + $uploadResp = StreamResponse::fromJson( + $this->client->makeRequest( + 'POST', + "/api/v2/chat/channels/{$type}/{$channelID}/image", + [], + new GeneratedModels\ImageUploadRequest( + file: $tmpFile, + user: new GeneratedModels\OnlyUserID(id: $this->creatorID), + ), + ), + GeneratedModels\UploadChannelFileResponse::class, + ); + $this->assertResponseSuccess($uploadResp, 'upload image'); + self::assertNotEmpty($uploadResp->getData()->file); + $imageURL = $uploadResp->getData()->file; + self::assertStringContainsString('http', $imageURL); + + // Delete image + $deleteResp = StreamResponse::fromJson( + $this->client->makeRequest( + 'DELETE', + "/api/v2/chat/channels/{$type}/{$channelID}/image", + ['url' => $imageURL], + ), + GeneratedModels\Response::class, + ); + $this->assertResponseSuccess($deleteResp, 'delete image'); + } finally { + @unlink($tmpFile); + } + } +} diff --git a/tests/Integration/ChatMessageIntegrationTest.php b/tests/Integration/ChatMessageIntegrationTest.php new file mode 100644 index 00000000..26c6f104 --- /dev/null +++ b/tests/Integration/ChatMessageIntegrationTest.php @@ -0,0 +1,672 @@ +getSharedUserIDs(); + $this->userID = $shared[0]; + $this->userID2 = $shared[1]; + } + + // ========================================================================= + // Send / Get / Update / Delete + // ========================================================================= + + public function testSendAndGetMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + $msgText = 'Hello from integration test ' . $this->randomString(8); + $msgID = $this->sendTestMessage($type, $channelID, $this->userID, $msgText); + + // Get message by ID + $resp = $this->getMessage($msgID); + $this->assertResponseSuccess($resp, 'get message'); + + $data = $resp->getData(); + self::assertNotNull($data->message); + self::assertEquals($msgID, $data->message->id); + self::assertEquals($msgText, $data->message->text); + } + + public function testGetManyMessages(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + $id1 = $this->sendTestMessage($type, $channelID, $this->userID, 'Msg 1'); + $id2 = $this->sendTestMessage($type, $channelID, $this->userID, 'Msg 2'); + $id3 = $this->sendTestMessage($type, $channelID, $this->userID, 'Msg 3'); + + $resp = $this->getManyMessages($type, $channelID, [$id1, $id2, $id3]); + $this->assertResponseSuccess($resp, 'get many messages'); + + $data = $resp->getData(); + self::assertCount(3, $data->messages); + } + + public function testUpdateMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + $msgID = $this->sendTestMessage($type, $channelID, $this->userID, 'Original text'); + + $updatedText = 'Updated text ' . $this->randomString(8); + $resp = $this->updateMessage($msgID, new GeneratedModels\UpdateMessageRequest( + message: new GeneratedModels\MessageRequest( + text: $updatedText, + userID: $this->userID, + ), + )); + $this->assertResponseSuccess($resp, 'update message'); + self::assertEquals($updatedText, $resp->getData()->message->text); + } + + public function testPartialUpdateMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + $msgID = $this->sendTestMessage($type, $channelID, $this->userID, 'Partial update test'); + + // Set custom fields + $resp = $this->updateMessagePartial($msgID, new GeneratedModels\UpdateMessagePartialRequest( + set: (object) [ + 'priority' => 'high', + 'status' => 'reviewed', + ], + userID: $this->userID, + )); + $this->assertResponseSuccess($resp, 'partial update message (set)'); + self::assertNotNull($resp->getData()->message); + + // Unset custom field + $resp = $this->updateMessagePartial($msgID, new GeneratedModels\UpdateMessagePartialRequest( + unset: ['status'], + userID: $this->userID, + )); + $this->assertResponseSuccess($resp, 'partial update message (unset)'); + self::assertNotNull($resp->getData()->message); + } + + public function testDeleteMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + $msgID = $this->sendTestMessage($type, $channelID, $this->userID, 'Message to delete'); + + // Soft delete + $resp = $this->deleteMessageApi($msgID); + $this->assertResponseSuccess($resp, 'delete message'); + self::assertEquals('deleted', $resp->getData()->message->type); + } + + public function testHardDeleteMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + $msgID = $this->sendTestMessage($type, $channelID, $this->userID, 'Message to hard delete'); + + $resp = $this->deleteMessageApi($msgID, hard: true); + $this->assertResponseSuccess($resp, 'hard delete message'); + self::assertEquals('deleted', $resp->getData()->message->type); + } + + // ========================================================================= + // Pin / Unpin + // ========================================================================= + + public function testPinUnpinMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + // Send a pinned message + $sendResp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'Pinned message', + userID: $this->userID, + pinned: true, + ), + )); + $this->assertResponseSuccess($sendResp, 'send pinned message'); + $msgID = $sendResp->getData()->message->id; + self::assertTrue($sendResp->getData()->message->pinned); + + // Unpin via partial update + $resp = $this->updateMessagePartial($msgID, new GeneratedModels\UpdateMessagePartialRequest( + set: (object) ['pinned' => false], + userID: $this->userID, + )); + $this->assertResponseSuccess($resp, 'unpin message'); + self::assertFalse($resp->getData()->message->pinned); + } + + public function testPinExpiration(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID, $this->userID2]); + + // Send message by user2 + $msgID = $this->sendTestMessage($type, $channelID, $this->userID2, 'Message to pin with expiry'); + + // Pin with 3 second expiration + $expiry = (new \DateTime())->modify('+3 seconds'); + $resp = $this->updateMessagePartial($msgID, new GeneratedModels\UpdateMessagePartialRequest( + set: (object) [ + 'pinned' => true, + 'pin_expires' => $expiry->format(\DateTime::RFC3339), + ], + userID: $this->userID, + )); + $this->assertResponseSuccess($resp, 'pin message with expiry'); + self::assertTrue($resp->getData()->message->pinned); + + // Wait for pin to expire + sleep(4); + + // Verify pin expired + $getResp = $this->getMessage($msgID); + $this->assertResponseSuccess($getResp, 'get message after pin expiry'); + self::assertFalse($getResp->getData()->message->pinned, 'Pin should have expired'); + } + + // ========================================================================= + // Translate + // ========================================================================= + + public function testTranslateMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + $msgID = $this->sendTestMessage($type, $channelID, $this->userID, 'Hello, how are you?'); + + $resp = $this->translateMessage($msgID, new GeneratedModels\TranslateMessageRequest( + language: 'es', + )); + $this->assertResponseSuccess($resp, 'translate message'); + self::assertNotNull($resp->getData()->message); + self::assertNotNull($resp->getData()->message->i18n, 'i18n field should be set after translation'); + } + + // ========================================================================= + // Threads + // ========================================================================= + + public function testThreadReply(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID, $this->userID2]); + + // Send parent message + $parentID = $this->sendTestMessage($type, $channelID, $this->userID, 'Parent message for thread'); + + // Send reply + $replyResp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'Reply to parent', + userID: $this->userID2, + parentID: $parentID, + ), + )); + $this->assertResponseSuccess($replyResp, 'send thread reply'); + self::assertNotEmpty($replyResp->getData()->message->id); + + // Get replies + $repliesResp = $this->getReplies($parentID); + $this->assertResponseSuccess($repliesResp, 'get replies'); + self::assertGreaterThanOrEqual(1, count($repliesResp->getData()->messages)); + } + + // ========================================================================= + // Search + // ========================================================================= + + public function testSearchMessages(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + $searchTerm = 'uniquesearch' . $this->randomString(8); + $this->sendTestMessage($type, $channelID, $this->userID, "This message contains {$searchTerm} for testing"); + + // Wait for indexing + sleep(2); + + $resp = $this->searchMessages(new GeneratedModels\SearchPayload( + query: $searchTerm, + filterConditions: (object) ['cid' => "messaging:{$channelID}"], + )); + $this->assertResponseSuccess($resp, 'search messages'); + self::assertNotEmpty($resp->getData()->results, 'Search should return at least one result'); + } + + public function testSearchWithMessageFilters(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + $searchTerm = 'filterable' . $this->randomString(8); + $this->sendTestMessage($type, $channelID, $this->userID, "This has {$searchTerm} text"); + $this->sendTestMessage($type, $channelID, $this->userID, "This also has {$searchTerm} text"); + + // Wait for indexing + sleep(2); + + // Search using message_filter_conditions instead of query + $resp = $this->searchMessages(new GeneratedModels\SearchPayload( + filterConditions: (object) ['cid' => "messaging:{$channelID}"], + messageFilterConditions: (object) ['text' => (object) ['$q' => $searchTerm]], + )); + $this->assertResponseSuccess($resp, 'search with message filters'); + self::assertGreaterThanOrEqual(2, count($resp->getData()->results), 'Should find at least 2 messages with MessageFilterConditions'); + } + + public function testSearchQueryAndMessageFiltersError(): void + { + // Using both query and messageFilterConditions together should error + $this->expectException(\Exception::class); + $this->searchMessages(new GeneratedModels\SearchPayload( + query: 'test', + filterConditions: (object) ['members' => (object) ['$in' => [$this->userID]]], + messageFilterConditions: (object) ['text' => (object) ['$q' => 'test']], + )); + } + + + public function testSearchOffsetAndNextError(): void + { + // Using offset with next should error + $this->expectException(\Exception::class); + $this->searchMessages(new GeneratedModels\SearchPayload( + query: 'test', + filterConditions: (object) ['members' => (object) ['$in' => [$this->userID]]], + offset: 1, + next: $this->randomString(5), + )); + } + + // ========================================================================= + // Special Message Types + // ========================================================================= + + public function testSilentMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + $resp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'This is a silent message', + userID: $this->userID, + silent: true, + ), + )); + $this->assertResponseSuccess($resp, 'send silent message'); + self::assertTrue($resp->getData()->message->silent); + } + + public function testSystemMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + $resp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'User joined the channel', + userID: $this->userID, + type: 'system', + ), + )); + $this->assertResponseSuccess($resp, 'send system message'); + self::assertEquals('system', $resp->getData()->message->type); + } + + // ========================================================================= + // Pending Messages + // ========================================================================= + + public function testPendingMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + // Send a pending message (requires feature flag) + try { + $sendResp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'Pending message text', + userID: $this->userID, + ), + pending: true, + skipPush: true, + )); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'pending messages not enabled') || str_contains($e->getMessage(), 'feature flag')) { + $this->markTestSkipped('Pending messages feature not enabled for this app'); + } + throw $e; + } + $this->assertResponseSuccess($sendResp, 'send pending message'); + $msgID = $sendResp->getData()->message->id; + self::assertNotEmpty($msgID); + + // Commit the pending message + $commitResp = $this->commitMessage($msgID); + $this->assertResponseSuccess($commitResp, 'commit pending message'); + self::assertNotNull($commitResp->getData()->message); + self::assertEquals($msgID, $commitResp->getData()->message->id); + } + + public function testPendingFalse(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + // Send message with pending explicitly set to false + $sendResp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'Non-pending message', + userID: $this->userID, + ), + pending: false, + )); + $this->assertResponseSuccess($sendResp, 'send non-pending message'); + + // Get the message to verify it's immediately available + $getResp = $this->getMessage($sendResp->getData()->message->id); + $this->assertResponseSuccess($getResp, 'get non-pending message'); + self::assertEquals('Non-pending message', $getResp->getData()->message->text); + } + + // ========================================================================= + // Message History + // ========================================================================= + + public function testQueryMessageHistory(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID, $this->userID2]); + + // Send initial message with custom data + $sendResp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'initial text', + userID: $this->userID, + custom: (object) ['custom_field' => 'custom value'], + ), + )); + $this->assertResponseSuccess($sendResp, 'send initial message'); + $msgID = $sendResp->getData()->message->id; + + // Update by user1 + $this->updateMessage($msgID, new GeneratedModels\UpdateMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'updated text', + userID: $this->userID, + custom: (object) ['custom_field' => 'updated custom value'], + ), + )); + + // Update by user2 + $this->updateMessage($msgID, new GeneratedModels\UpdateMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'updated text 2', + userID: $this->userID2, + ), + )); + + // Query message history + try { + $histResp = $this->queryMessageHistory(new GeneratedModels\QueryMessageHistoryRequest( + filter: (object) ['message_id' => $msgID], + sort: [], + )); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'feature flag') || str_contains($e->getMessage(), 'not enabled')) { + $this->markTestSkipped('QueryMessageHistory feature not enabled for this app'); + } + throw $e; + } + $this->assertResponseSuccess($histResp, 'query message history'); + self::assertGreaterThanOrEqual(2, count($histResp->getData()->messageHistory), 'Should have at least 2 history entries'); + + // Verify history entries reference the correct message + foreach ($histResp->getData()->messageHistory as $entry) { + self::assertEquals($msgID, $entry->messageID); + } + + // Verify text values in history (descending order by default) + self::assertEquals('updated text', $histResp->getData()->messageHistory[0]->text); + self::assertEquals($this->userID, $histResp->getData()->messageHistory[0]->messageUpdatedByID); + self::assertEquals('initial text', $histResp->getData()->messageHistory[1]->text); + self::assertEquals($this->userID, $histResp->getData()->messageHistory[1]->messageUpdatedByID); + } + + public function testQueryMessageHistorySort(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID, $this->userID2]); + + $sendResp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'sort initial', + userID: $this->userID, + ), + )); + $this->assertResponseSuccess($sendResp, 'send initial message for sort test'); + $msgID = $sendResp->getData()->message->id; + + $this->updateMessage($msgID, new GeneratedModels\UpdateMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'sort updated 1', + userID: $this->userID, + ), + )); + + $this->updateMessage($msgID, new GeneratedModels\UpdateMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'sort updated 2', + userID: $this->userID, + ), + )); + + // Query with ascending sort by message_updated_at + try { + $histResp = $this->queryMessageHistory(new GeneratedModels\QueryMessageHistoryRequest( + filter: (object) ['message_id' => $msgID], + sort: [new GeneratedModels\SortParamRequest(field: 'message_updated_at', direction: 1)], + )); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'feature flag') || str_contains($e->getMessage(), 'not enabled')) { + $this->markTestSkipped('QueryMessageHistory feature not enabled for this app'); + } + throw $e; + } + $this->assertResponseSuccess($histResp, 'query message history with sort'); + self::assertGreaterThanOrEqual(2, count($histResp->getData()->messageHistory)); + + // Ascending: oldest first + self::assertEquals('sort initial', $histResp->getData()->messageHistory[0]->text); + self::assertEquals($this->userID, $histResp->getData()->messageHistory[0]->messageUpdatedByID); + } + + // ========================================================================= + // URL Enrichment + // ========================================================================= + + public function testSkipEnrichUrl(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + // Send a message with a URL but skip enrichment + $sendResp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'Check out https://getstream.io for more info', + userID: $this->userID, + ), + skipEnrichUrl: true, + )); + $this->assertResponseSuccess($sendResp, 'send message with skip enrich url'); + self::assertEmpty($sendResp->getData()->message->attachments, 'Attachments should be empty when skipEnrichUrl is true'); + + // Verify via GetMessage that attachments remain empty + sleep(3); + $getResp = $this->getMessage($sendResp->getData()->message->id); + $this->assertResponseSuccess($getResp, 'get message after enrichment window'); + self::assertEmpty($getResp->getData()->message->attachments, 'Attachments should remain empty after enrichment window'); + } + + // ========================================================================= + // Channel Hidden / Visibility + // ========================================================================= + + public function testKeepChannelHidden(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + + // Hide the channel first + $hideResp = $this->hideChannel($type, $channelID, new GeneratedModels\HideChannelRequest( + userID: $this->userID, + )); + $this->assertResponseSuccess($hideResp, 'hide channel'); + + // Send a message with keepChannelHidden=true + $sendResp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'Hidden message', + userID: $this->userID, + ), + keepChannelHidden: true, + )); + $this->assertResponseSuccess($sendResp, 'send with keep channel hidden'); + + // Query channels — the channel should still be hidden + $qResp = $this->queryChannels(new GeneratedModels\QueryChannelsRequest( + filterConditions: (object) ['cid' => "messaging:{$channelID}"], + userID: $this->userID, + )); + $this->assertResponseSuccess($qResp, 'query channels for hidden check'); + self::assertEmpty($qResp->getData()->channels, 'Channel should remain hidden after sending with keepChannelHidden'); + } + + // ========================================================================= + // Delete / Undelete Variants + // ========================================================================= + + public function testUndeleteMessage(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + $msgID = $this->sendTestMessage($type, $channelID, $this->userID, 'Message to undelete'); + + // Soft delete the message + $delResp = $this->deleteMessageApi($msgID); + $this->assertResponseSuccess($delResp, 'soft delete message'); + + // Verify it's deleted + $getResp = $this->getMessage($msgID); + $this->assertResponseSuccess($getResp, 'get deleted message'); + self::assertEquals('deleted', $getResp->getData()->message->type); + + // Undelete the message + try { + $undelResp = $this->undeleteMessage($msgID, new GeneratedModels\UndeleteMessageRequest( + undeletedBy: $this->userID, + )); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'undeleted_by') || str_contains($e->getMessage(), 'required field')) { + $this->markTestSkipped('UndeleteMessage requires field not yet in generated request struct'); + } + throw $e; + } + $this->assertResponseSuccess($undelResp, 'undelete message'); + self::assertNotNull($undelResp->getData()->message); + self::assertNotEquals('deleted', $undelResp->getData()->message->type); + self::assertEquals('Message to undelete', $undelResp->getData()->message->text); + } + + public function testRestrictedVisibility(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID, $this->userID2]); + + // Send a message with restricted visibility — only userID can see it + try { + $sendResp = $this->sendMessage($type, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'Secret message', + userID: $this->userID, + restrictedVisibility: [$this->userID], + ), + )); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'private messaging is not allowed') || str_contains($e->getMessage(), 'not enabled')) { + $this->markTestSkipped('RestrictedVisibility (private messaging) is not enabled for this app'); + } + throw $e; + } + $this->assertResponseSuccess($sendResp, 'send restricted visibility message'); + self::assertEquals([$this->userID], $sendResp->getData()->message->restrictedVisibility); + } + + public function testDeleteMessageForMe(): void + { + [$type, $channelID] = $this->createTestChannelWithMembers($this->userID, [$this->userID]); + $msgID = $this->sendTestMessage($type, $channelID, $this->userID, 'test message to delete for me'); + + // Delete the message only for the sender + $resp = $this->deleteMessageApi($msgID, deleteForMe: true, deletedBy: $this->userID); + $this->assertResponseSuccess($resp, 'delete message for me'); + } + + // ========================================================================= + // Channel Role in Member + // ========================================================================= + + public function testChannelRoleInMember(): void + { + $roleUserIDs = $this->createTestUsers(2); + $memberUserID = $roleUserIDs[0]; + $customRoleUserID = $roleUserIDs[1]; + + $channelID = 'test-ch-' . $this->randomString(12); + $channelType = 'messaging'; + + $createResp = $this->getOrCreateChannel($channelType, $channelID, new GeneratedModels\ChannelGetOrCreateRequest( + data: new GeneratedModels\ChannelInput( + createdByID: $memberUserID, + members: [ + new GeneratedModels\ChannelMemberRequest(userID: $memberUserID, channelRole: 'channel_member'), + new GeneratedModels\ChannelMemberRequest(userID: $customRoleUserID, channelRole: 'channel_moderator'), + ], + ), + )); + $this->assertResponseSuccess($createResp, 'create channel with roles'); + $this->createdChannels[] = ['type' => $channelType, 'id' => $channelID]; + + // Send message from channel_member + $respMember = $this->sendMessage($channelType, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'message from channel_member', + userID: $memberUserID, + ), + )); + $this->assertResponseSuccess($respMember, 'send from channel_member'); + self::assertNotNull($respMember->getData()->message->member, 'Member should be present in message response'); + self::assertEquals('channel_member', $respMember->getData()->message->member->channelRole); + + // Send message from channel_moderator + $respMod = $this->sendMessage($channelType, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'message from channel_moderator', + userID: $customRoleUserID, + ), + )); + $this->assertResponseSuccess($respMod, 'send from channel_moderator'); + self::assertNotNull($respMod->getData()->message->member, 'Member should be present in message response'); + self::assertEquals('channel_moderator', $respMod->getData()->message->member->channelRole); + } +} diff --git a/tests/Integration/ChatMiscIntegrationTest.php b/tests/Integration/ChatMiscIntegrationTest.php new file mode 100644 index 00000000..fbcab85a --- /dev/null +++ b/tests/Integration/ChatMiscIntegrationTest.php @@ -0,0 +1,586 @@ +getSharedUserIDs()[0]; + $deviceID = 'integration-test-device-' . $this->randomString(12); + + // Create device + try { + $resp = $this->client->createDevice(new GeneratedModels\CreateDeviceRequest( + id: $deviceID, + pushProvider: 'firebase', + userID: $userID, + )); + $this->assertResponseSuccess($resp, 'create device'); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'no push providers configured') || str_contains($e->getMessage(), 'push')) { + $this->markTestSkipped('Push providers not configured for this app'); + } + throw $e; + } + + // List devices + $listResp = $this->client->listDevices($userID); + $this->assertResponseSuccess($listResp, 'list devices'); + + $found = false; + foreach ($listResp->getData()->devices ?? [] as $device) { + if ($device->id === $deviceID) { + $found = true; + self::assertEquals('firebase', $device->pushProvider); + } + } + self::assertTrue($found, 'Created device should appear in list'); + + // Delete device + $delResp = $this->client->deleteDevice($deviceID, $userID); + $this->assertResponseSuccess($delResp, 'delete device'); + + // Verify deleted + $listResp2 = $this->client->listDevices($userID); + $this->assertResponseSuccess($listResp2, 'list devices after delete'); + + foreach ($listResp2->getData()->devices ?? [] as $device) { + self::assertNotEquals($deviceID, $device->id, 'Device should be deleted'); + } + } + + // ========================================================================= + // Blocklists + // ========================================================================= + + public function testCreateListDeleteBlocklist(): void + { + $blocklistName = 'test-blocklist-' . $this->randomString(8); + + try { + // Create blocklist + $createResp = $this->client->createBlockList(new GeneratedModels\CreateBlockListRequest( + name: $blocklistName, + words: ['badword1', 'badword2', 'badword3'], + )); + $this->assertResponseSuccess($createResp, 'create blocklist'); + + // Blocklists are eventually consistent + sleep(2); + + // List blocklists and verify found + $listResp = $this->client->listBlockLists(''); + $this->assertResponseSuccess($listResp, 'list blocklists'); + + $found = false; + foreach ($listResp->getData()->blocklists ?? [] as $bl) { + if ($bl->name === $blocklistName) { + $found = true; + } + } + self::assertTrue($found, 'Created blocklist should appear in list'); + + // Get blocklist + $getResp = $this->client->getBlockList($blocklistName, ''); + $this->assertResponseSuccess($getResp, 'get blocklist'); + self::assertEquals($blocklistName, $getResp->getData()->blocklist->name); + + // Delete blocklist + $delResp = $this->client->deleteBlockList($blocklistName, ''); + $this->assertResponseSuccess($delResp, 'delete blocklist'); + } catch (\Exception $e) { + // Clean up on failure + try { + $this->client->deleteBlockList($blocklistName, ''); + } catch (\Exception $ignore) { + } + throw $e; + } + } + + // ========================================================================= + // Commands + // ========================================================================= + + public function testCreateListDeleteCommand(): void + { + $cmdName = 'testcmd' . $this->randomString(6); + + try { + // Create command + $createResp = $this->createCommand(new GeneratedModels\CreateCommandRequest( + name: $cmdName, + description: 'A test command', + )); + $this->assertResponseSuccess($createResp, 'create command'); + self::assertNotNull($createResp->getData()->command); + self::assertEquals($cmdName, $createResp->getData()->command->name); + + // Get command + $getResp = $this->getCommand($cmdName); + $this->assertResponseSuccess($getResp, 'get command'); + self::assertEquals($cmdName, $getResp->getData()->name); + self::assertEquals('A test command', $getResp->getData()->description); + + // Commands are eventually consistent + sleep(2); + + // List commands and verify found + $listResp = $this->listCommands(); + $this->assertResponseSuccess($listResp, 'list commands'); + + $found = false; + foreach ($listResp->getData()->commands ?? [] as $cmd) { + if ($cmd->name === $cmdName) { + $found = true; + } + } + self::assertTrue($found, 'Created command should appear in list'); + + // Delete command + $delResp = $this->deleteCommandApi($cmdName); + $this->assertResponseSuccess($delResp, 'delete command'); + self::assertEquals($cmdName, $delResp->getData()->name); + } catch (\Exception $e) { + // Clean up on failure + try { + $this->deleteCommandApi($cmdName); + } catch (\Exception $ignore) { + } + throw $e; + } + } + + // ========================================================================= + // Channel Types + // ========================================================================= + + public function testCreateUpdateDeleteChannelType(): void + { + $typeName = 'testtype' . $this->randomString(6); + + try { + // Create channel type + $createResp = $this->createChannelType(new GeneratedModels\CreateChannelTypeRequest( + name: $typeName, + automod: 'disabled', + automodBehavior: 'flag', + maxMessageLength: 3000, + )); + $this->assertResponseSuccess($createResp, 'create channel type'); + self::assertEquals($typeName, $createResp->getData()->name); + self::assertEquals(3000, $createResp->getData()->maxMessageLength); + + // Channel types are eventually consistent - retry with delay + $getResp = $this->retryUntilSuccess(function () use ($typeName) { + $resp = $this->getChannelType($typeName); + $this->assertResponseSuccess($resp, 'get channel type'); + return $resp; + }, maxAttempts: 10, sleepMs: 2000); + self::assertEquals($typeName, $getResp->getData()->name); + + // Update channel type + $updateResp = $this->retryUntilSuccess(fn () => $this->updateChannelType($typeName, new GeneratedModels\UpdateChannelTypeRequest( + automod: 'disabled', + automodBehavior: 'flag', + maxMessageLength: 4000, + typingEvents: false, + )), maxAttempts: 5, sleepMs: 2000); + $this->assertResponseSuccess($updateResp, 'update channel type'); + + // Re-fetch to verify the update propagated. The update response itself reads + // from the Ristretto local cache, which is populated asynchronously (ring buffer) + // and may return the old value immediately after a write. The GET with + // SkipLocalCache() reads from Redis, which is updated synchronously — but if that + // Redis write fails silently the polling cycle (~30s) is the recovery path. + // Allow 60s to comfortably outlast both scenarios. + $this->retryUntilSuccess(function () use ($typeName) { + $resp = $this->getChannelType($typeName); + $this->assertResponseSuccess($resp, 'get updated channel type'); + self::assertEquals(4000, $resp->getData()->maxMessageLength); + self::assertFalse($resp->getData()->typingEvents); + }, maxAttempts: 20, sleepMs: 3000); + + // Delete channel type (with retry due to eventual consistency) + $deleteErr = null; + for ($i = 0; $i < 5; $i++) { + try { + $this->deleteChannelType($typeName); + $deleteErr = null; + break; + } catch (\Exception $e) { + $deleteErr = $e; + sleep(1); + } + } + if ($deleteErr !== null) { + self::fail("Failed to delete channel type after retries: {$deleteErr->getMessage()}"); + } + } catch (\Exception $e) { + // Clean up on failure + try { + $this->deleteChannelType($typeName); + } catch (\Exception $ignore) { + } + throw $e; + } + } + + public function testListChannelTypes(): void + { + $resp = $this->listChannelTypes(); + $this->assertResponseSuccess($resp, 'list channel types'); + + self::assertNotNull($resp->getData()->channelTypes); + // Default types (messaging, livestream, etc.) should exist + self::assertArrayHasKey('messaging', $resp->getData()->channelTypes); + } + + // ========================================================================= + // Permissions + // ========================================================================= + + public function testListPermissions(): void + { + $resp = $this->client->listPermissions(); + $this->assertResponseSuccess($resp, 'list permissions'); + + self::assertNotEmpty($resp->getData()->permissions, 'Should have at least one permission'); + } + + public function testCreatePermission(): void + { + // CreatePermission is hidden from the generated spec (Ignore: true in backend) + // per Go SDK reference. Skip this test. + $this->markTestSkipped('CreatePermission is not available in the generated SDK'); + } + + public function testGetPermission(): void + { + $resp = $this->client->getPermission('create-channel'); + $this->assertResponseSuccess($resp, 'get permission'); + + self::assertEquals('create-channel', $resp->getData()->permission->id); + self::assertNotEmpty($resp->getData()->permission->action); + } + + // ========================================================================= + // Query Banned Users + // ========================================================================= + + public function testQueryBannedUsers(): void + { + $shared = $this->getSharedUserIDs(); + $adminID = $shared[0]; + $targetID = $shared[1]; + + [$channelType, $channelID] = $this->createTestChannelWithMembers($adminID, [$adminID, $targetID]); + $cid = "{$channelType}:{$channelID}"; + + // Ban user in the channel + $banResp = $this->banUser(new GeneratedModels\BanRequest( + targetUserID: $targetID, + bannedByID: $adminID, + channelCid: $cid, + reason: 'test ban reason', + )); + $this->assertResponseSuccess($banResp, 'ban user'); + + // Query banned users + $qResp = $this->queryBannedUsers(new GeneratedModels\QueryBannedUsersPayload( + filterConditions: (object) ['channel_cid' => (object) ['$eq' => $cid]], + )); + $this->assertResponseSuccess($qResp, 'query banned users'); + self::assertNotEmpty($qResp->getData()->bans, 'Should find the banned user'); + + // Unban user + $unbanResp = $this->unbanUser($targetID, $cid); + $this->assertResponseSuccess($unbanResp, 'unban user'); + + // Verify ban is gone + $qResp2 = $this->queryBannedUsers(new GeneratedModels\QueryBannedUsersPayload( + filterConditions: (object) ['channel_cid' => (object) ['$eq' => $cid]], + )); + $this->assertResponseSuccess($qResp2, 'query banned users after unban'); + self::assertEmpty($qResp2->getData()->bans, 'Channel bans should be empty after unban'); + } + + // ========================================================================= + // Mute / Unmute User + // ========================================================================= + + public function testMuteUnmuteUser(): void + { + $shared = $this->getSharedUserIDs(); + $muterID = $shared[0]; + $targetID = $shared[1]; + + // Mute user + $muteResp = $this->muteUser(new GeneratedModels\MuteRequest( + targetIds: [$targetID], + userID: $muterID, + )); + $this->assertResponseSuccess($muteResp, 'mute user'); + self::assertNotEmpty($muteResp->getData()->mutes, 'Mute response should contain mutes'); + + $mute = $muteResp->getData()->mutes[0]; + self::assertNotNull($mute->user, 'Mute should have a User'); + self::assertNotNull($mute->target, 'Mute should have a Target'); + self::assertNull($mute->expires, 'Mute without timeout should have no Expires'); + + // Unmute user + $unmuteResp = $this->unmuteUser(new GeneratedModels\UnmuteRequest( + targetIds: [$targetID], + userID: $muterID, + )); + $this->assertResponseSuccess($unmuteResp, 'unmute user'); + } + + // ========================================================================= + // App Settings + // ========================================================================= + + public function testGetAppSettings(): void + { + $resp = $this->client->getApp(); + $this->assertResponseSuccess($resp, 'get app settings'); + self::assertNotNull($resp->getData()->app); + self::assertNotEmpty($resp->getData()->app->name); + } + + // ========================================================================= + // Export Channels + // ========================================================================= + + public function testExportChannels(): void + { + $userID = $this->getSharedUserIDs()[0]; + + [$channelType, $channelID] = $this->createTestChannelWithMembers($userID, [$userID]); + $this->sendTestMessage($channelType, $channelID, $userID, 'Message for export test'); + + $cid = "{$channelType}:{$channelID}"; + + $exportResp = $this->exportChannels(new GeneratedModels\ExportChannelsRequest( + channels: [new GeneratedModels\ChannelExport(cid: $cid)], + )); + $this->assertResponseSuccess($exportResp, 'export channels'); + self::assertNotEmpty($exportResp->getData()->taskID); + + // Wait for the export task to complete + $taskResult = $this->waitForTask($exportResp->getData()->taskID); + self::assertEquals('completed', $taskResult->status); + } + + // ========================================================================= + // Threads + // ========================================================================= + + public function testThreads(): void + { + $shared = $this->getSharedUserIDs(); + $userID = $shared[0]; + $userID2 = $shared[1]; + + [$channelType, $channelID] = $this->createTestChannelWithMembers($userID, [$userID, $userID2]); + $channelCID = "{$channelType}:{$channelID}"; + + // Create a thread: parent + replies + $parentID = $this->sendTestMessage($channelType, $channelID, $userID, 'Thread parent message'); + + // Send first reply in thread (from user2) + $replyResp = $this->sendMessage($channelType, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'First reply in thread', + userID: $userID2, + parentID: $parentID, + ), + )); + $this->assertResponseSuccess($replyResp, 'send thread reply 1'); + + // Send second reply (from user1) + $replyResp2 = $this->sendMessage($channelType, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'Second reply in thread', + userID: $userID, + parentID: $parentID, + ), + )); + $this->assertResponseSuccess($replyResp2, 'send thread reply 2'); + + // Query threads + $resp = $this->queryThreads(new GeneratedModels\QueryThreadsRequest( + userID: $userID, + filter: (object) ['channel_cid' => (object) ['$eq' => $channelCID]], + )); + $this->assertResponseSuccess($resp, 'query threads'); + self::assertNotEmpty($resp->getData()->threads, 'Should have at least one thread'); + + $found = false; + foreach ($resp->getData()->threads as $thread) { + if ($thread->parentMessageID === $parentID) { + $found = true; + self::assertEquals($userID2, $thread->createdByUserID); + } + } + self::assertTrue($found, "Thread should appear in query results for channel {$channelCID}"); + } + + // ========================================================================= + // Unread Counts + // ========================================================================= + + public function testGetUnreadCounts(): void + { + $shared = $this->getSharedUserIDs(); + $userID = $shared[0]; + $userID2 = $shared[1]; + + [$channelType, $channelID] = $this->createTestChannelWithMembers($userID, [$userID, $userID2]); + $this->sendTestMessage($channelType, $channelID, $userID, 'Message for unread counts test'); + + $resp = $this->getUnreadCounts($userID2); + $this->assertResponseSuccess($resp, 'get unread counts'); + self::assertGreaterThanOrEqual(0, $resp->getData()->totalUnreadCount); + } + + public function testGetUnreadCountsBatch(): void + { + $shared = $this->getSharedUserIDs(); + $userID = $shared[0]; + $userID2 = $shared[1]; + + [$channelType, $channelID] = $this->createTestChannelWithMembers($userID, [$userID, $userID2]); + $this->sendTestMessage($channelType, $channelID, $userID, 'Message for unread batch test'); + + $resp = $this->getUnreadCountsBatch(new GeneratedModels\UnreadCountsBatchRequest( + userIds: [$userID, $userID2], + )); + $this->assertResponseSuccess($resp, 'get unread counts batch'); + self::assertNotNull($resp->getData()->countsByUser); + self::assertArrayHasKey($userID, $resp->getData()->countsByUser); + self::assertArrayHasKey($userID2, $resp->getData()->countsByUser); + } + + // ========================================================================= + // Reminders + // ========================================================================= + + public function testReminders(): void + { + $userID = $this->getSharedUserIDs()[0]; + + [$channelType, $channelID] = $this->createTestChannelWithMembers($userID, [$userID]); + $msgID = $this->sendTestMessage($channelType, $channelID, $userID, 'Message for reminder test'); + + // Create a reminder + $remindAt = new \DateTime('+24 hours'); + try { + $createResp = $this->createReminder($msgID, new GeneratedModels\CreateReminderRequest( + remindAt: $remindAt, + userID: $userID, + )); + $this->assertResponseSuccess($createResp, 'create reminder'); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'not enabled') || str_contains($e->getMessage(), 'reminder')) { + $this->markTestSkipped('Reminders are not enabled for this app'); + } + throw $e; + } + + self::assertEquals($msgID, $createResp->getData()->messageID); + self::assertEquals($userID, $createResp->getData()->userID); + self::assertNotNull($createResp->getData()->remindAt, 'RemindAt should be set'); + + // Update reminder + $newRemindAt = new \DateTime('+48 hours'); + $updateResp = $this->updateReminder($msgID, new GeneratedModels\UpdateReminderRequest( + remindAt: $newRemindAt, + userID: $userID, + )); + $this->assertResponseSuccess($updateResp, 'update reminder'); + self::assertEquals($msgID, $updateResp->getData()->reminder->messageID); + + // Query reminders + $qResp = $this->queryReminders(new GeneratedModels\QueryRemindersRequest( + userID: $userID, + filter: (object) ['message_id' => $msgID], + sort: [], + )); + $this->assertResponseSuccess($qResp, 'query reminders'); + self::assertNotEmpty($qResp->getData()->reminders, 'Should find the reminder'); + self::assertEquals($msgID, $qResp->getData()->reminders[0]->messageID); + + // Delete reminder + $delResp = $this->deleteReminderApi($msgID, $userID); + $this->assertResponseSuccess($delResp, 'delete reminder'); + } + + // ========================================================================= + // Send User Custom Event + // ========================================================================= + + public function testSendUserCustomEvent(): void + { + $userID = $this->getSharedUserIDs()[0]; + + $resp = $this->sendUserCustomEvent($userID, new GeneratedModels\SendUserCustomEventRequest( + event: new GeneratedModels\UserCustomEventRequest( + type: 'friendship_request', + custom: (object) ['message' => "Let's be friends!"], + ), + )); + $this->assertResponseSuccess($resp, 'send user custom event'); + } + + // ========================================================================= + // Query Team Usage Stats + // ========================================================================= + + public function testQueryTeamUsageStats(): void + { + try { + $resp = $this->queryTeamUsageStats(new GeneratedModels\QueryTeamUsageStatsRequest()); + $this->assertResponseSuccess($resp, 'query team usage stats'); + self::assertNotNull($resp->getData()->teams); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'Token signature is invalid') || str_contains($e->getMessage(), 'not available')) { + $this->markTestSkipped('QueryTeamUsageStats not available on this app'); + } + throw $e; + } + } + + // ========================================================================= + // Channel Batch Update + // ========================================================================= + + public function testChannelBatchUpdate(): void + { + // ChannelBatchUpdate is behind Ignore+Beta in the backend spec, + // so the generated SDK doesn't include it yet. Per Go SDK reference. + $this->markTestSkipped('ChannelBatchUpdate is not yet available in the generated SDK'); + } +} diff --git a/tests/Integration/ChatModerationIntegrationTest.php b/tests/Integration/ChatModerationIntegrationTest.php new file mode 100644 index 00000000..d489532d --- /dev/null +++ b/tests/Integration/ChatModerationIntegrationTest.php @@ -0,0 +1,207 @@ +getSharedUserIDs(); + $userIDs = [$shared[0], $shared[1], $shared[2]]; + $adminID = $userIDs[0]; + $targetID = $userIDs[1]; + $targetID2 = $userIDs[2]; + + // --- App-level ban --- + + // Ban a user with reason and timeout + $banResp = $this->banUser(new GeneratedModels\BanRequest( + targetUserID: $targetID, + bannedByID: $adminID, + reason: 'test ban reason', + timeout: 60, // 60 minutes + )); + $this->assertResponseSuccess($banResp, 'ban user at app level'); + + // Query banned users + $qResp = $this->queryBannedUsers(new GeneratedModels\QueryBannedUsersPayload( + filterConditions: (object) ['user_id' => (object) ['$eq' => $targetID]], + )); + $this->assertResponseSuccess($qResp, 'query banned users'); + self::assertNotEmpty($qResp->getData()->bans, 'Should find the banned user'); + + $ban = $qResp->getData()->bans[0]; + self::assertEquals('test ban reason', $ban->reason); + // When timeout is set, expires should be populated + self::assertNotNull($ban->expires, 'Ban with timeout should have Expires set'); + + // Unban the user + $unbanResp = $this->unbanUser($targetID); + $this->assertResponseSuccess($unbanResp, 'unban user at app level'); + + // Verify ban is gone + $qResp2 = $this->queryBannedUsers(new GeneratedModels\QueryBannedUsersPayload( + filterConditions: (object) ['user_id' => (object) ['$eq' => $targetID]], + )); + $this->assertResponseSuccess($qResp2, 'query banned users after unban'); + self::assertEmpty($qResp2->getData()->bans, 'Bans should be empty after unban'); + + // --- Channel-level ban --- + + [$channelType, $channelID] = $this->createTestChannelWithMembers($adminID, [$adminID, $targetID2]); + $cid = "{$channelType}:{$channelID}"; + + // Ban user in the specific channel + $chBanResp = $this->banUser(new GeneratedModels\BanRequest( + targetUserID: $targetID2, + bannedByID: $adminID, + channelCid: $cid, + reason: 'channel-specific ban', + )); + $this->assertResponseSuccess($chBanResp, 'ban user in channel'); + + // Unban from channel + $chUnbanResp = $this->unbanUser($targetID2, $cid); + $this->assertResponseSuccess($chUnbanResp, 'unban user from channel'); + + // Verify channel ban is gone + $qResp3 = $this->queryBannedUsers(new GeneratedModels\QueryBannedUsersPayload( + filterConditions: (object) ['channel_cid' => (object) ['$eq' => $cid]], + )); + $this->assertResponseSuccess($qResp3, 'query banned users after channel unban'); + self::assertEmpty($qResp3->getData()->bans, 'Channel bans should be empty after unban'); + } + + // ========================================================================= + // Mute / Unmute + // ========================================================================= + + public function testMuteUnmuteUser(): void + { + $userIDs = $this->getSharedUserIDs(); + $muterID = $userIDs[0]; + $targetID = $userIDs[1]; + $targetID2 = $userIDs[2]; + $targetID3 = $userIDs[3]; + + // --- Mute without timeout --- + + $muteResp = $this->muteUser(new GeneratedModels\MuteRequest( + targetIds: [$targetID], + userID: $muterID, + )); + $this->assertResponseSuccess($muteResp, 'mute user'); + self::assertNotEmpty($muteResp->getData()->mutes, 'Mute response should contain mutes'); + + $mute = $muteResp->getData()->mutes[0]; + self::assertNotNull($mute->user, 'Mute should have a User'); + self::assertNotNull($mute->target, 'Mute should have a Target'); + self::assertNull($mute->expires, 'Mute without timeout should have no Expires'); + + // Unmute + $unmuteResp = $this->unmuteUser(new GeneratedModels\UnmuteRequest( + targetIds: [$targetID], + userID: $muterID, + )); + $this->assertResponseSuccess($unmuteResp, 'unmute user'); + + // --- Mute with timeout --- + + $muteResp2 = $this->muteUser(new GeneratedModels\MuteRequest( + targetIds: [$targetID2, $targetID3], + userID: $muterID, + timeout: 60, + )); + $this->assertResponseSuccess($muteResp2, 'mute users with timeout'); + self::assertGreaterThanOrEqual(2, count($muteResp2->getData()->mutes), 'Should have at least 2 mute entries'); + + // When timeout is set, Expires should be populated + foreach ($muteResp2->getData()->mutes as $m) { + self::assertNotNull($m->expires, 'Mute with timeout should have Expires'); + self::assertNotNull($m->user, 'Mute should have User'); + self::assertNotNull($m->target, 'Mute should have Target'); + } + + // Cleanup: unmute both + $this->unmuteUser(new GeneratedModels\UnmuteRequest( + targetIds: [$targetID2, $targetID3], + userID: $muterID, + )); + } + + // ========================================================================= + // Flag + // ========================================================================= + + public function testFlagMessageAndUser(): void + { + $shared = $this->getSharedUserIDs(); + $userID = $shared[0]; + $flaggerID = $shared[1]; + + [$channelType, $channelID] = $this->createTestChannelWithMembers($userID, [$userID, $flaggerID]); + $msgID = $this->sendTestMessage($channelType, $channelID, $userID, 'Message to be flagged'); + + // --- Flag the message --- + + $flagResp = $this->flagContent(new GeneratedModels\FlagRequest( + entityType: 'stream:chat:v1:message', + entityID: $msgID, + entityCreatorID: $userID, + reason: 'inappropriate content', + userID: $flaggerID, + )); + $this->assertResponseSuccess($flagResp, 'flag message'); + self::assertNotEmpty($flagResp->getData()->itemID, 'Flag should return an item ID'); + + // Verify QueryMessageFlags endpoint works (v2 flags may not populate v1 store, + // but the endpoint itself should return successfully) + $cid = "{$channelType}:{$channelID}"; + $qResp = $this->queryMessageFlags(new GeneratedModels\QueryMessageFlagsPayload( + filterConditions: (object) ['channel_cid' => $cid], + )); + $this->assertResponseSuccess($qResp, 'query message flags by channel'); + + // Also verify QueryMessageFlags with user_id filter + $qResp2 = $this->queryMessageFlags(new GeneratedModels\QueryMessageFlagsPayload( + filterConditions: (object) ['user_id' => $flaggerID], + )); + $this->assertResponseSuccess($qResp2, 'query message flags by user'); + + // --- Flag the user --- + + $flagUserResp = $this->flagContent(new GeneratedModels\FlagRequest( + entityType: 'user', + entityID: $userID, + entityCreatorID: $userID, + reason: 'spam', + userID: $flaggerID, + )); + $this->assertResponseSuccess($flagUserResp, 'flag user'); + self::assertNotEmpty($flagUserResp->getData()->itemID, 'Flag user should return an item ID'); + } +} diff --git a/tests/Integration/ChatPollsIntegrationTest.php b/tests/Integration/ChatPollsIntegrationTest.php new file mode 100644 index 00000000..4f600cbb --- /dev/null +++ b/tests/Integration/ChatPollsIntegrationTest.php @@ -0,0 +1,183 @@ +createdPollIDs as $pollID) { + try { + $this->deletePoll($pollID, $this->pollCleanupUserID); + } catch (\Exception $e) { + // Ignore cleanup errors + } + } + + parent::tearDown(); + } + + /** + * Test creating a poll with options, querying it by ID, and verifying the results. + */ + public function testCreateAndQueryPoll(): void + { + $userIDs = [$this->getSharedUserIDs()[0]]; + $this->pollCleanupUserID = $userIDs[0]; + + // Create a poll + try { + $createResp = $this->createPoll(new GeneratedModels\CreatePollRequest( + name: 'Favorite color?', + description: 'Pick your favorite color', + enforceUniqueVote: true, + userID: $userIDs[0], + options: [ + new GeneratedModels\PollOptionInput(text: 'Red'), + new GeneratedModels\PollOptionInput(text: 'Blue'), + new GeneratedModels\PollOptionInput(text: 'Green'), + ], + )); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'Polls are not enabled') || str_contains($e->getMessage(), 'polls') && str_contains($e->getMessage(), 'not enabled')) { + $this->markTestSkipped('Polls feature not enabled for this app'); + } + throw $e; + } + + $this->assertResponseSuccess($createResp, 'create poll'); + $poll = $createResp->getData()->poll; + $this->assertNotNull($poll); + $this->assertNotEmpty($poll->id); + $this->assertEquals('Favorite color?', $poll->name); + $this->assertEquals('Pick your favorite color', $poll->description); + $this->assertTrue($poll->enforceUniqueVote); + $this->assertNotNull($poll->options); + $this->assertCount(3, $poll->options); + + $pollID = $poll->id; + $this->createdPollIDs[] = $pollID; + + // Get the poll by ID + $getResp = $this->getPoll($pollID); + $this->assertResponseSuccess($getResp, 'get poll'); + $this->assertEquals($pollID, $getResp->getData()->poll->id); + $this->assertEquals('Favorite color?', $getResp->getData()->poll->name); + + // Query polls with filter by ID + $queryResp = $this->queryPolls(new GeneratedModels\QueryPollsRequest( + filter: (object) ['id' => $pollID], + ), $userIDs[0]); + $this->assertResponseSuccess($queryResp, 'query polls'); + $this->assertNotNull($queryResp->getData()->polls); + $this->assertGreaterThanOrEqual(1, count($queryResp->getData()->polls)); + + $found = false; + foreach ($queryResp->getData()->polls as $p) { + if ($p->id === $pollID) { + $found = true; + break; + } + } + $this->assertTrue($found, 'Poll should be found in query results'); + } + + /** + * Test creating a poll, attaching it to a message, and casting a vote. + */ + public function testCastPollVote(): void + { + $userIDs = $this->getSharedUserIDs(); + $this->pollCleanupUserID = $userIDs[0]; + + // Create a poll with enforce_unique_vote + try { + $createResp = $this->createPoll(new GeneratedModels\CreatePollRequest( + name: 'Vote test poll', + enforceUniqueVote: true, + userID: $userIDs[0], + options: [ + new GeneratedModels\PollOptionInput(text: 'Yes'), + new GeneratedModels\PollOptionInput(text: 'No'), + ], + )); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'Polls are not enabled') || str_contains($e->getMessage(), 'polls') && str_contains($e->getMessage(), 'not enabled')) { + $this->markTestSkipped('Polls feature not enabled for this app'); + } + throw $e; + } + + $this->assertResponseSuccess($createResp, 'create vote test poll'); + $poll = $createResp->getData()->poll; + $this->assertNotNull($poll); + $pollID = $poll->id; + $this->createdPollIDs[] = $pollID; + + $this->assertNotNull($poll->options); + $this->assertGreaterThanOrEqual(2, count($poll->options)); + $optionID = $poll->options[0]->id; + $this->assertNotEmpty($optionID); + + // Create a channel and send a message with the poll attached + [$type, $id] = $this->createTestChannelWithMembers($userIDs[0], $userIDs); + + try { + $msgResp = $this->sendMessage($type, $id, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: 'Please vote!', + userID: $userIDs[0], + pollID: $pollID, + ), + )); + } catch (\Exception $e) { + if (str_contains($e->getMessage(), 'polls not enabled') || str_contains($e->getMessage(), 'Polls are not enabled')) { + $this->markTestSkipped('Polls not enabled for this channel type'); + } + throw $e; + } + $this->assertResponseSuccess($msgResp, 'send message with poll'); + $msgID = $msgResp->getData()->message->id; + $this->assertNotEmpty($msgID); + + // Cast a vote from the second user + $voteResp = $this->castPollVote($msgID, $pollID, new GeneratedModels\CastPollVoteRequest( + userID: $userIDs[1], + vote: new GeneratedModels\VoteData( + optionID: $optionID, + ), + )); + $this->assertResponseSuccess($voteResp, 'cast poll vote'); + $this->assertNotNull($voteResp->getData()->vote); + $this->assertEquals($optionID, $voteResp->getData()->vote->optionID); + + // Verify the poll has votes by getting it again + $getResp = $this->getPoll($pollID); + $this->assertResponseSuccess($getResp, 'get poll after vote'); + $this->assertNotNull($getResp->getData()->poll); + $this->assertEquals(1, $getResp->getData()->poll->voteCount); + } +} diff --git a/tests/Integration/ChatReactionIntegrationTest.php b/tests/Integration/ChatReactionIntegrationTest.php new file mode 100644 index 00000000..8f5831c5 --- /dev/null +++ b/tests/Integration/ChatReactionIntegrationTest.php @@ -0,0 +1,137 @@ +getSharedUserIDs(); + [$type, $id] = $this->createTestChannelWithMembers($userIDs[0], $userIDs); + $msgID = $this->sendTestMessage($type, $id, $userIDs[0], 'Message with reactions'); + + // Send a "like" reaction from user 1 + $resp = $this->sendReaction($msgID, new GeneratedModels\SendReactionRequest( + reaction: new GeneratedModels\ReactionRequest( + type: 'like', + userID: $userIDs[0], + ), + )); + $this->assertResponseSuccess($resp, 'send like reaction'); + $this->assertNotNull($resp->getData()->reaction); + $this->assertEquals('like', $resp->getData()->reaction->type); + $this->assertEquals($userIDs[0], $resp->getData()->reaction->userID); + + // Send a "love" reaction from user 2 + $resp = $this->sendReaction($msgID, new GeneratedModels\SendReactionRequest( + reaction: new GeneratedModels\ReactionRequest( + type: 'love', + userID: $userIDs[1], + ), + )); + $this->assertResponseSuccess($resp, 'send love reaction'); + $this->assertEquals('love', $resp->getData()->reaction->type); + + // Get reactions and verify both are present + $getResp = $this->getReactions($msgID); + $this->assertResponseSuccess($getResp, 'get reactions'); + $this->assertNotNull($getResp->getData()->reactions); + $this->assertGreaterThanOrEqual(2, count($getResp->getData()->reactions)); + } + + /** + * Test deleting a reaction from a message. + */ + public function testDeleteReaction(): void + { + $userIDs = [$this->getSharedUserIDs()[0]]; + [$type, $id] = $this->createTestChannelWithMembers($userIDs[0], $userIDs); + $msgID = $this->sendTestMessage($type, $id, $userIDs[0], 'Message for reaction deletion'); + + // Send a reaction + $resp = $this->sendReaction($msgID, new GeneratedModels\SendReactionRequest( + reaction: new GeneratedModels\ReactionRequest( + type: 'like', + userID: $userIDs[0], + ), + )); + $this->assertResponseSuccess($resp, 'send reaction'); + + // Delete the reaction + $delResp = $this->deleteReaction($msgID, 'like', $userIDs[0]); + $this->assertResponseSuccess($delResp, 'delete reaction'); + + // Verify reaction is gone + $getResp = $this->getReactions($msgID); + $this->assertResponseSuccess($getResp, 'get reactions after delete'); + + $reactions = $getResp->getData()->reactions ?? []; + foreach ($reactions as $r) { + if ($r->userID === $userIDs[0]) { + $this->assertNotEquals('like', $r->type, 'Like reaction should have been deleted'); + } + } + } + + /** + * Test enforce_unique: sending a second reaction with enforce_unique replaces the first. + */ + public function testEnforceUniqueReaction(): void + { + $userIDs = [$this->getSharedUserIDs()[0]]; + [$type, $id] = $this->createTestChannelWithMembers($userIDs[0], $userIDs); + $msgID = $this->sendTestMessage($type, $id, $userIDs[0], 'Message for unique reaction test'); + + // Send "like" with enforce_unique + $resp = $this->sendReaction($msgID, new GeneratedModels\SendReactionRequest( + reaction: new GeneratedModels\ReactionRequest( + type: 'like', + userID: $userIDs[0], + ), + enforceUnique: true, + )); + $this->assertResponseSuccess($resp, 'send like reaction with enforce_unique'); + + // Send "love" with enforce_unique — should replace "like" + $resp = $this->sendReaction($msgID, new GeneratedModels\SendReactionRequest( + reaction: new GeneratedModels\ReactionRequest( + type: 'love', + userID: $userIDs[0], + ), + enforceUnique: true, + )); + $this->assertResponseSuccess($resp, 'send love reaction with enforce_unique'); + + // Verify user has only one reaction + $getResp = $this->getReactions($msgID); + $this->assertResponseSuccess($getResp, 'get reactions after enforce_unique'); + + $reactions = $getResp->getData()->reactions ?? []; + $userReactions = 0; + foreach ($reactions as $r) { + if ($r->userID === $userIDs[0]) { + $userReactions++; + } + } + $this->assertEquals(1, $userReactions, 'EnforceUnique should keep only one reaction per user'); + } +} diff --git a/tests/Integration/ChatTestCase.php b/tests/Integration/ChatTestCase.php new file mode 100644 index 00000000..fd0c4065 --- /dev/null +++ b/tests/Integration/ChatTestCase.php @@ -0,0 +1,1418 @@ + Class-level shared client keyed by class name */ + private static array $classClients = []; + + /** @var array Class-level shared user IDs keyed by class name */ + private static array $classUserIDs = []; + + /** + * Override to declare how many shared users this test class needs. + * Return 0 (default) to opt-out and create users per-test instead. + */ + protected static function sharedUserCount(): int + { + return 0; + } + + public static function setUpBeforeClass(): void + { + parent::setUpBeforeClass(); + + $count = static::sharedUserCount(); + if ($count <= 0) { + return; + } + + $client = ClientBuilder::fromEnv()->build(); + self::$classClients[static::class] = $client; + + $users = []; + $ids = []; + for ($i = 0; $i < $count; $i++) { + $id = 'test-user-' . uniqid(); + $ids[] = $id; + $users[$id] = new GeneratedModels\UserRequest( + id: $id, + name: 'Shared User ' . $i, + role: 'user', + ); + } + + $client->updateUsers(new GeneratedModels\UpdateUsersRequest(users: $users)); + self::$classUserIDs[static::class] = $ids; + } + + public static function tearDownAfterClass(): void + { + $class = static::class; + $ids = self::$classUserIDs[$class] ?? []; + $client = self::$classClients[$class] ?? null; + + if (!empty($ids) && $client !== null) { + try { + $client->deleteUsers(new GeneratedModels\DeleteUsersRequest( + userIds: $ids, + user: 'hard', + messages: 'hard', + conversations: 'hard', + )); + } catch (\Exception $e) { + // Ignore cleanup errors + } + } + + unset(self::$classClients[$class], self::$classUserIDs[$class]); + parent::tearDownAfterClass(); + } + + /** + * Get the class-level shared user IDs. + * + * @return string[] + */ + protected function getSharedUserIDs(): array + { + return self::$classUserIDs[static::class] ?? []; + } + + // ------------------------------------------------------------------ + // Per-test setup / teardown + // ------------------------------------------------------------------ + + protected function setUp(): void + { + // Reuse class-level client if available, otherwise create a new one + $this->client = self::$classClients[static::class] ?? ClientBuilder::fromEnv()->build(); + } + + protected function tearDown(): void + { + // Hard-delete channels first (they reference users) + foreach (array_reverse($this->createdChannels) as $ch) { + try { + $this->deleteChannel($ch['type'], $ch['id'], hardDelete: true); + } catch (\Exception $e) { + // Ignore cleanup errors + } + } + + // Hard-delete per-test users (not shared ones) + if (!empty($this->createdUserIDs)) { + $this->deleteUsersWithRetry($this->createdUserIDs); + } + + parent::tearDown(); + } + + // ========================================================================= + // Test Helpers + // ========================================================================= + + /** + * Create n test users with unique IDs. + * + * @return string[] Array of created user IDs + */ + protected function createTestUsers(int $n): array + { + $users = []; + $ids = []; + for ($i = 0; $i < $n; $i++) { + $id = 'test-user-' . uniqid(); + $ids[] = $id; + $users[$id] = new GeneratedModels\UserRequest( + id: $id, + name: 'Test User ' . substr($id, 0, 8), + role: 'user', + ); + } + + $response = $this->client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: $users, + )); + $this->assertResponseSuccess($response, 'create test users'); + + // Track for cleanup + array_push($this->createdUserIDs, ...$ids); + + return $ids; + } + + /** + * Create a messaging channel with a unique ID. + * + * @return array{0: string, 1: string} [channelType, channelID] + */ + protected function createTestChannel(string $creatorID): array + { + $channelType = 'messaging'; + $channelID = 'test-ch-' . uniqid(); + + $response = $this->getOrCreateChannel($channelType, $channelID, new GeneratedModels\ChannelGetOrCreateRequest( + data: new GeneratedModels\ChannelInput( + createdByID: $creatorID, + ), + )); + $this->assertResponseSuccess($response, 'create test channel'); + + // Track for cleanup + $this->createdChannels[] = ['type' => $channelType, 'id' => $channelID]; + + return [$channelType, $channelID]; + } + + /** + * Create a messaging channel with members. + * + * @param string[] $memberIDs + * @return array{0: string, 1: string} [channelType, channelID] + */ + protected function createTestChannelWithMembers(string $creatorID, array $memberIDs): array + { + $channelType = 'messaging'; + $channelID = 'test-ch-' . uniqid(); + + $members = array_map( + fn(string $id) => new GeneratedModels\ChannelMemberRequest(userID: $id), + $memberIDs, + ); + + $response = $this->getOrCreateChannel($channelType, $channelID, new GeneratedModels\ChannelGetOrCreateRequest( + data: new GeneratedModels\ChannelInput( + createdByID: $creatorID, + members: $members, + ), + )); + $this->assertResponseSuccess($response, 'create test channel with members'); + + // Track for cleanup + $this->createdChannels[] = ['type' => $channelType, 'id' => $channelID]; + + return [$channelType, $channelID]; + } + + /** + * Send a test message to a channel. + * + * @return string The message ID + */ + protected function sendTestMessage(string $channelType, string $channelID, string $userID, string $text): string + { + $response = $this->sendMessage($channelType, $channelID, new GeneratedModels\SendMessageRequest( + message: new GeneratedModels\MessageRequest( + text: $text, + userID: $userID, + ), + )); + $this->assertResponseSuccess($response, 'send test message'); + + $data = $response->getData(); + self::assertNotNull($data->message, 'Message should not be null in response'); + self::assertNotEmpty($data->message->id, 'Message ID should not be empty'); + + return $data->message->id; + } + + /** + * Retry a callable until it succeeds or max attempts exhausted. + * Useful for eventually consistent API operations. + * + * @template T + * @param callable(): T $fn + * @param int $maxAttempts + * @param int $sleepMs milliseconds to wait between attempts + * @return T + */ + protected function retryUntilSuccess(callable $fn, int $maxAttempts = 5, int $sleepMs = 500): mixed + { + $lastException = new \RuntimeException('retryUntilSuccess: no attempts made'); + for ($i = 0; $i < $maxAttempts; $i++) { + try { + return $fn(); + } catch (\Exception $e) { + $lastException = $e; + usleep($sleepMs * 1000); + } + } + throw $lastException; + } + + /** + * Delete users with retry logic for rate limiting. + * Follows the pattern from getstream-go's deleteUsersWithRetry. + * The HTTP client handles 429 retries automatically, so this only + * needs a few retries for persistent rate limiting. + * + * @param string[] $userIDs + */ + protected function deleteUsersWithRetry(array $userIDs): void + { + for ($i = 0; $i < 5; $i++) { + try { + $this->client->deleteUsers(new GeneratedModels\DeleteUsersRequest( + userIds: $userIDs, + user: 'hard', + messages: 'hard', + conversations: 'hard', + )); + return; + } catch (\Exception $e) { + if (strpos($e->getMessage(), 'Too many requests') === false) { + return; + } + sleep(min($i + 1, 3)); + } + } + } + + /** + * Poll an async task until completed or failed. + * Uses adaptive backoff: 100ms → 200ms → 400ms → 800ms → 1s (cap), up to 60 attempts (~60s max). + */ + protected function waitForTask(string $taskID): GeneratedModels\GetTaskResponse + { + $maxAttempts = 60; + for ($i = 0; $i < $maxAttempts; $i++) { + $response = $this->client->getTask($taskID); + $this->assertResponseSuccess($response, 'get task status'); + + $data = $response->getData(); + if ($data->status === 'completed' || $data->status === 'failed') { + return $data; + } + + // Adaptive backoff: 100ms, 200ms, 400ms, 800ms, then cap at 1s + $sleepMs = min(100 << min($i, 10), 1000); + usleep($sleepMs * 1000); + } + + self::fail("Task {$taskID} did not complete after {$maxAttempts} attempts"); + } + + /** + * Generate a random alphanumeric string. + */ + protected function randomString(int $length = 12): string + { + return substr(bin2hex(random_bytes((int) ceil($length / 2))), 0, $length); + } + + // ========================================================================= + // Channel API Wrappers (since PHP SDK lacks a ChatClient) + // These wrap $client->makeRequest() for channel-level operations. + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function getOrCreateChannel(string $type, string $id, GeneratedModels\ChannelGetOrCreateRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/channels/{$type}/{$id}/query", [], $request), + GeneratedModels\ChannelStateResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function sendMessage(string $type, string $id, GeneratedModels\SendMessageRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/channels/{$type}/{$id}/message", [], $request), + GeneratedModels\SendMessageResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function deleteChannel(string $type, string $id, bool $hardDelete = false): StreamResponse + { + $queryParams = []; + if ($hardDelete) { + $queryParams['hard_delete'] = 'true'; + } + + return StreamResponse::fromJson( + $this->client->makeRequest('DELETE', "/api/v2/chat/channels/{$type}/{$id}", $queryParams), + GeneratedModels\DeleteChannelResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function queryChannels(GeneratedModels\QueryChannelsRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/channels', [], $request), + GeneratedModels\QueryChannelsResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateChannel(string $type, string $id, GeneratedModels\UpdateChannelRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/channels/{$type}/{$id}", [], $request), + GeneratedModels\UpdateChannelResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateChannelPartial(string $type, string $id, GeneratedModels\UpdateChannelPartialRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('PATCH', "/api/v2/chat/channels/{$type}/{$id}", [], $request), + GeneratedModels\UpdateChannelPartialResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function deleteChannelsBatch(GeneratedModels\DeleteChannelsRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/channels/delete', [], $request), + GeneratedModels\DeleteChannelsResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function hideChannel(string $type, string $id, GeneratedModels\HideChannelRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/channels/{$type}/{$id}/hide", [], $request), + GeneratedModels\HideChannelResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function showChannel(string $type, string $id, GeneratedModels\ShowChannelRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/channels/{$type}/{$id}/show", [], $request), + GeneratedModels\ShowChannelResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function truncateChannel(string $type, string $id, GeneratedModels\TruncateChannelRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/channels/{$type}/{$id}/truncate", [], $request), + GeneratedModels\TruncateChannelResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function markRead(string $type, string $id, GeneratedModels\MarkReadRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/channels/{$type}/{$id}/read", [], $request), + GeneratedModels\MarkReadResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function markUnread(string $type, string $id, GeneratedModels\MarkUnreadRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/channels/{$type}/{$id}/unread", [], $request), + GeneratedModels\Response::class, + ); + } + + /** + * @return StreamResponse + */ + protected function muteChannel(GeneratedModels\MuteChannelRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/moderation/mute/channel', [], $request), + GeneratedModels\MuteChannelResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function unmuteChannel(GeneratedModels\UnmuteChannelRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/moderation/unmute/channel', [], $request), + GeneratedModels\UnmuteResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateMemberPartial(string $type, string $id, string $userID, GeneratedModels\UpdateMemberPartialRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('PATCH', "/api/v2/chat/channels/{$type}/{$id}/member", ['user_id' => $userID], $request), + GeneratedModels\UpdateMemberPartialResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function queryMembers(GeneratedModels\QueryMembersPayload $payload): StreamResponse + { + $queryParams = ['payload' => json_encode($payload->toArray())]; + return StreamResponse::fromJson( + $this->client->makeRequest('GET', '/api/v2/chat/members', $queryParams), + GeneratedModels\MembersResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function sendEvent(string $type, string $id, GeneratedModels\SendEventRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/channels/{$type}/{$id}/event", [], $request), + GeneratedModels\EventResponse::class, + ); + } + + /** + * Create a distinct channel (without explicit ID). + * + * @return StreamResponse + */ + protected function getOrCreateDistinctChannel(string $type, GeneratedModels\ChannelGetOrCreateRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/channels/{$type}/query", [], $request), + GeneratedModels\ChannelStateResponse::class, + ); + } + + // ========================================================================= + // Message API Wrappers + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function getMessage(string $messageID): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', "/api/v2/chat/messages/{$messageID}"), + GeneratedModels\GetMessageResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function getManyMessages(string $type, string $id, array $messageIDs): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', "/api/v2/chat/channels/{$type}/{$id}/messages", ['ids' => implode(',', $messageIDs)]), + GeneratedModels\GetManyMessagesResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateMessage(string $messageID, GeneratedModels\UpdateMessageRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/messages/{$messageID}", [], $request), + GeneratedModels\UpdateMessageResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateMessagePartial(string $messageID, GeneratedModels\UpdateMessagePartialRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('PUT', "/api/v2/chat/messages/{$messageID}", [], $request), + GeneratedModels\UpdateMessagePartialResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function deleteMessageApi(string $messageID, bool $hard = false, ?string $deletedBy = null, bool $deleteForMe = false): StreamResponse + { + $queryParams = []; + if ($hard) { + $queryParams['hard'] = 'true'; + } + if ($deletedBy !== null) { + $queryParams['deleted_by'] = $deletedBy; + } + if ($deleteForMe) { + $queryParams['delete_for_me'] = 'true'; + } + + return StreamResponse::fromJson( + $this->client->makeRequest('DELETE', "/api/v2/chat/messages/{$messageID}", $queryParams), + GeneratedModels\DeleteMessageResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function translateMessage(string $messageID, GeneratedModels\TranslateMessageRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/messages/{$messageID}/translate", [], $request), + GeneratedModels\MessageActionResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function getReplies(string $parentID, array $queryParams = []): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', "/api/v2/chat/messages/{$parentID}/replies", $queryParams), + GeneratedModels\GetRepliesResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function searchMessages(GeneratedModels\SearchPayload $payload): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', '/api/v2/chat/search', ['payload' => json_encode($payload->toArray())]), + GeneratedModels\SearchResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function commitMessage(string $messageID): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/messages/{$messageID}/commit", [], new GeneratedModels\CommitMessageRequest()), + GeneratedModels\MessageActionResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function undeleteMessage(string $messageID, GeneratedModels\UndeleteMessageRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/messages/{$messageID}/undelete", [], $request), + GeneratedModels\UndeleteMessageResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function queryMessageHistory(GeneratedModels\QueryMessageHistoryRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/messages/history', [], $request), + GeneratedModels\QueryMessageHistoryResponse::class, + ); + } + + // ========================================================================= + // Reaction API Wrappers + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function sendReaction(string $messageID, GeneratedModels\SendReactionRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/messages/{$messageID}/reaction", [], $request), + GeneratedModels\SendReactionResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function getReactions(string $messageID, int $limit = 0, int $offset = 0): StreamResponse + { + $queryParams = []; + if ($limit > 0) { + $queryParams['limit'] = (string) $limit; + } + if ($offset > 0) { + $queryParams['offset'] = (string) $offset; + } + + return StreamResponse::fromJson( + $this->client->makeRequest('GET', "/api/v2/chat/messages/{$messageID}/reactions", $queryParams), + GeneratedModels\GetReactionsResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function deleteReaction(string $messageID, string $reactionType, string $userID): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('DELETE', "/api/v2/chat/messages/{$messageID}/reaction/{$reactionType}", ['user_id' => $userID]), + GeneratedModels\DeleteReactionResponse::class, + ); + } + + // ========================================================================= + // Poll API Wrappers + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function createPoll(GeneratedModels\CreatePollRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/polls', [], $request), + GeneratedModels\PollResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function getPoll(string $pollID): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', "/api/v2/polls/{$pollID}"), + GeneratedModels\PollResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function queryPolls(GeneratedModels\QueryPollsRequest $request, ?string $userID = null): StreamResponse + { + $queryParams = []; + if ($userID !== null) { + $queryParams['user_id'] = $userID; + } + + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/polls/query', $queryParams, $request), + GeneratedModels\QueryPollsResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function deletePoll(string $pollID, ?string $userID = null): StreamResponse + { + $queryParams = []; + if ($userID !== null) { + $queryParams['user_id'] = $userID; + } + + return StreamResponse::fromJson( + $this->client->makeRequest('DELETE', "/api/v2/polls/{$pollID}", $queryParams), + GeneratedModels\Response::class, + ); + } + + /** + * @return StreamResponse + */ + protected function castPollVote(string $messageID, string $pollID, GeneratedModels\CastPollVoteRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/messages/{$messageID}/polls/{$pollID}/vote", [], $request), + GeneratedModels\PollVoteResponse::class, + ); + } + + // ========================================================================= + // Command API Wrappers + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function createCommand(GeneratedModels\CreateCommandRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/commands', [], $request), + GeneratedModels\CreateCommandResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function getCommand(string $name): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', "/api/v2/chat/commands/{$name}"), + GeneratedModels\GetCommandResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function listCommands(): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', '/api/v2/chat/commands'), + GeneratedModels\ListCommandsResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateCommand(string $name, GeneratedModels\UpdateCommandRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('PUT', "/api/v2/chat/commands/{$name}", [], $request), + GeneratedModels\UpdateCommandResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function deleteCommandApi(string $name): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('DELETE', "/api/v2/chat/commands/{$name}"), + GeneratedModels\DeleteCommandResponse::class, + ); + } + + // ========================================================================= + // Channel Type API Wrappers + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function createChannelType(GeneratedModels\CreateChannelTypeRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/channeltypes', [], $request), + GeneratedModels\CreateChannelTypeResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function getChannelType(string $name): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', "/api/v2/chat/channeltypes/{$name}"), + GeneratedModels\GetChannelTypeResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function listChannelTypes(): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', '/api/v2/chat/channeltypes'), + GeneratedModels\ListChannelTypesResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateChannelType(string $name, GeneratedModels\UpdateChannelTypeRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('PUT', "/api/v2/chat/channeltypes/{$name}", [], $request), + GeneratedModels\UpdateChannelTypeResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function deleteChannelType(string $name): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('DELETE', "/api/v2/chat/channeltypes/{$name}"), + GeneratedModels\Response::class, + ); + } + + // ========================================================================= + // Ban / Mute API Wrappers (Moderation) + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function banUser(GeneratedModels\BanRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/moderation/ban', [], $request), + GeneratedModels\BanResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function unbanUser(string $targetUserID, string $channelCid = ''): StreamResponse + { + $queryParams = ['target_user_id' => $targetUserID]; + if ($channelCid !== '') { + $queryParams['channel_cid'] = $channelCid; + } + + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/moderation/unban', $queryParams, new GeneratedModels\UnbanRequest()), + GeneratedModels\Response::class, + ); + } + + /** + * @return StreamResponse + */ + protected function queryBannedUsers(GeneratedModels\QueryBannedUsersPayload $payload): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', '/api/v2/chat/query_banned_users', ['payload' => json_encode($payload->toArray())]), + GeneratedModels\QueryBannedUsersResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function muteUser(GeneratedModels\MuteRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/moderation/mute', [], $request), + GeneratedModels\MuteResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function unmuteUser(GeneratedModels\UnmuteRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/moderation/unmute', [], $request), + GeneratedModels\UnmuteResponse::class, + ); + } + + // ========================================================================= + // Flag API Wrappers + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function flagContent(GeneratedModels\FlagRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/moderation/flag', [], $request), + GeneratedModels\FlagResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function queryMessageFlags(GeneratedModels\QueryMessageFlagsPayload $payload): StreamResponse + { + $queryParams = ['payload' => json_encode($payload->toArray())]; + return StreamResponse::fromJson( + $this->client->makeRequest('GET', '/api/v2/chat/moderation/flags/message', $queryParams), + GeneratedModels\QueryMessageFlagsResponse::class, + ); + } + + // ========================================================================= + // Export Channels API Wrapper + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function exportChannels(GeneratedModels\ExportChannelsRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/export_channels', [], $request), + GeneratedModels\ExportChannelsResponse::class, + ); + } + + // ========================================================================= + // Threads API Wrappers + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function queryThreads(GeneratedModels\QueryThreadsRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/threads', [], $request), + GeneratedModels\QueryThreadsResponse::class, + ); + } + + // ========================================================================= + // Unread Counts API Wrappers + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function getUnreadCounts(string $userID): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', '/api/v2/chat/unread', ['user_id' => $userID]), + GeneratedModels\WrappedUnreadCountsResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function getUnreadCountsBatch(GeneratedModels\UnreadCountsBatchRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/unread_batch', [], $request), + GeneratedModels\UnreadCountsBatchResponse::class, + ); + } + + // ========================================================================= + // Reminder API Wrappers + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function createReminder(string $messageID, GeneratedModels\CreateReminderRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/messages/{$messageID}/reminders", [], $request), + GeneratedModels\ReminderResponseData::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateReminder(string $messageID, GeneratedModels\UpdateReminderRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('PATCH', "/api/v2/chat/messages/{$messageID}/reminders", [], $request), + GeneratedModels\UpdateReminderResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function deleteReminderApi(string $messageID, string $userID): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('DELETE', "/api/v2/chat/messages/{$messageID}/reminders", ['user_id' => $userID]), + GeneratedModels\DeleteReminderResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function queryReminders(GeneratedModels\QueryRemindersRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/reminders/query', [], $request), + GeneratedModels\QueryRemindersResponse::class, + ); + } + + // ========================================================================= + // Custom Event API Wrapper + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function sendUserCustomEvent(string $userID, GeneratedModels\SendUserCustomEventRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/chat/users/{$userID}/event", [], $request), + GeneratedModels\Response::class, + ); + } + + // ========================================================================= + // Team Usage Stats API Wrapper + // ========================================================================= + + /** + * @return StreamResponse + */ + protected function queryTeamUsageStats(GeneratedModels\QueryTeamUsageStatsRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/chat/stats/team_usage', [], $request), + GeneratedModels\QueryTeamUsageStatsResponse::class, + ); + } + + // ========================================================================= + // Video API Wrappers + // ========================================================================= + + /** @var string[] Call type names created during the test, cleaned up in tearDown */ + protected array $createdCallTypes = []; + + /** @var array{type: string, id: string}[] Calls created during the test, cleaned up in tearDown */ + protected array $createdCalls = []; + + /** @var string[] External storage names created during the test, cleaned up in tearDown */ + protected array $createdExternalStorages = []; + + /** + * @return StreamResponse + */ + protected function createCallTypeVideo(GeneratedModels\CreateCallTypeRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/video/calltypes', [], $request), + GeneratedModels\CreateCallTypeResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function getCallTypeVideo(string $name): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', "/api/v2/video/calltypes/{$name}"), + GeneratedModels\GetCallTypeResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateCallTypeVideo(string $name, GeneratedModels\UpdateCallTypeRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('PUT', "/api/v2/video/calltypes/{$name}", [], $request), + GeneratedModels\UpdateCallTypeResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function deleteCallTypeVideo(string $name): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('DELETE', "/api/v2/video/calltypes/{$name}"), + GeneratedModels\Response::class, + ); + } + + /** + * @return StreamResponse + */ + protected function listCallTypesVideo(): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', '/api/v2/video/calltypes'), + GeneratedModels\ListCallTypeResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function getOrCreateCall(string $type, string $id, GeneratedModels\GetOrCreateCallRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/video/call/{$type}/{$id}", [], $request), + GeneratedModels\GetOrCreateCallResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function getCall(string $type, string $id): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('GET', "/api/v2/video/call/{$type}/{$id}"), + GeneratedModels\GetCallResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateCall(string $type, string $id, GeneratedModels\UpdateCallRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('PATCH', "/api/v2/video/call/{$type}/{$id}", [], $request), + GeneratedModels\UpdateCallResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function deleteCall(string $type, string $id, GeneratedModels\DeleteCallRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/video/call/{$type}/{$id}/delete", [], $request), + GeneratedModels\DeleteCallResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function blockUserInCall(string $type, string $id, GeneratedModels\BlockUserRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/video/call/{$type}/{$id}/block", [], $request), + GeneratedModels\BlockUserResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function unblockUserInCall(string $type, string $id, GeneratedModels\UnblockUserRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/video/call/{$type}/{$id}/unblock", [], $request), + GeneratedModels\UnblockUserResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function muteUsersInCall(string $type, string $id, GeneratedModels\MuteUsersRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/video/call/{$type}/{$id}/mute_users", [], $request), + GeneratedModels\MuteUsersResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function sendCallEvent(string $type, string $id, GeneratedModels\SendCallEventRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/video/call/{$type}/{$id}/event", [], $request), + GeneratedModels\SendCallEventResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateUserPermissionsInCall(string $type, string $id, GeneratedModels\UpdateUserPermissionsRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/video/call/{$type}/{$id}/user_permissions", [], $request), + GeneratedModels\UpdateUserPermissionsResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function updateCallMembers(string $type, string $id, GeneratedModels\UpdateCallMembersRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', "/api/v2/video/call/{$type}/{$id}/members", [], $request), + GeneratedModels\UpdateCallMembersResponse::class, + ); + } + + /** + * @return StreamResponse + */ + protected function queryCalls(GeneratedModels\QueryCallsRequest $request): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('POST', '/api/v2/video/calls', [], $request), + GeneratedModels\QueryCallsResponse::class, + ); + } + + /** + * Delete a recording from a call session (expects error for non-existent recordings). + * + * @return StreamResponse + */ + protected function deleteRecording(string $type, string $id, string $session, string $filename): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('DELETE', "/api/v2/video/call/{$type}/{$id}/{$session}/recordings/{$filename}"), + GeneratedModels\Response::class, + ); + } + + /** + * Delete a transcription from a call session (expects error for non-existent transcriptions). + * + * @return StreamResponse + */ + protected function deleteTranscription(string $type, string $id, string $session, string $filename): StreamResponse + { + return StreamResponse::fromJson( + $this->client->makeRequest('DELETE', "/api/v2/video/call/{$type}/{$id}/{$session}/transcriptions/{$filename}"), + GeneratedModels\Response::class, + ); + } + + /** + * Clean up video resources (call types, calls, external storages). + * Call from tearDown in video tests. + */ + protected function cleanupVideoResources(): void + { + // Delete calls first + foreach (array_reverse($this->createdCalls) as $call) { + try { + $this->deleteCall($call['type'], $call['id'], new GeneratedModels\DeleteCallRequest()); + } catch (\Exception $e) { + // Ignore cleanup errors + } + } + + // Delete call types (need small delay for eventual consistency) + foreach (array_reverse($this->createdCallTypes) as $name) { + try { + $this->deleteCallTypeVideo($name); + } catch (\Exception $e) { + // Ignore cleanup errors + } + } + + // Delete external storages + foreach (array_reverse($this->createdExternalStorages) as $name) { + try { + $this->client->deleteExternalStorage($name); + } catch (\Exception $e) { + // Ignore cleanup errors + } + } + } + + /** + * Create a call and track it for cleanup. + * + * @return GeneratedModels\GetOrCreateCallResponse + */ + protected function createTrackedCall(string $type, string $id, string $creatorID): GeneratedModels\GetOrCreateCallResponse + { + $response = $this->getOrCreateCall($type, $id, new GeneratedModels\GetOrCreateCallRequest( + data: new GeneratedModels\CallRequest( + createdByID: $creatorID, + ), + )); + $this->assertResponseSuccess($response, 'create call'); + $this->createdCalls[] = ['type' => $type, 'id' => $id]; + return $response->getData(); + } + + // ========================================================================= + // Assertion Helpers + // ========================================================================= + + protected function assertResponseSuccess(StreamResponse $response, string $operation): void + { + self::assertTrue( + $response->isSuccessful(), + "Failed to {$operation}. Status: {$response->getStatusCode()}, Body: {$response->getRawBody()}" + ); + } +} diff --git a/tests/Integration/ChatUserIntegrationTest.php b/tests/Integration/ChatUserIntegrationTest.php new file mode 100644 index 00000000..217402fd --- /dev/null +++ b/tests/Integration/ChatUserIntegrationTest.php @@ -0,0 +1,533 @@ +createTestUsers(2); + self::assertCount(2, $userIDs); + + $response = $this->client->queryUsers(new GeneratedModels\QueryUsersPayload( + filterConditions: (object) ['id' => (object) ['$in' => $userIDs]], + )); + $this->assertResponseSuccess($response, 'query users'); + + $data = $response->getData(); + self::assertNotNull($data->users, 'Users should not be null'); + self::assertCount(2, $data->users, 'Should find exactly 2 users'); + } + + /** + * @test + */ + public function testQueryUsers(): void + { + $userIDs = $this->createTestUsers(2); + + $response = $this->client->queryUsers(new GeneratedModels\QueryUsersPayload( + filterConditions: (object) ['id' => (object) ['$in' => $userIDs]], + )); + $this->assertResponseSuccess($response, 'query users'); + + $data = $response->getData(); + self::assertNotNull($data->users); + self::assertGreaterThanOrEqual(2, count($data->users)); + + $foundIDs = array_map(fn($u) => $u->id, $data->users); + foreach ($userIDs as $id) { + self::assertContains($id, $foundIDs, "User $id should be found in query results"); + } + } + + /** + * @test + */ + public function testQueryUsersWithOffsetLimit(): void + { + $userIDs = $this->createTestUsers(3); + + $response = $this->client->queryUsers(new GeneratedModels\QueryUsersPayload( + filterConditions: (object) ['id' => (object) ['$in' => $userIDs]], + offset: 1, + limit: 2, + )); + $this->assertResponseSuccess($response, 'query users with offset/limit'); + + $data = $response->getData(); + self::assertNotNull($data->users); + self::assertCount(2, $data->users, 'Should return exactly 2 users with offset=1, limit=2'); + } + + /** + * @test + */ + public function testPartialUpdateUser(): void + { + $userIDs = $this->createTestUsers(1); + $userID = $userIDs[0]; + + // Set custom fields + $response = $this->client->updateUsersPartial(new GeneratedModels\UpdateUsersPartialRequest( + users: [ + new GeneratedModels\UpdateUserPartialRequest( + id: $userID, + set: (object) ['country' => 'NL', 'role' => 'admin'], + ), + ], + )); + $this->assertResponseSuccess($response, 'partial update user (set)'); + + // Verify via query + $queryResp = $this->client->queryUsers(new GeneratedModels\QueryUsersPayload( + filterConditions: (object) ['id' => (object) ['$eq' => $userID]], + )); + $this->assertResponseSuccess($queryResp, 'query user after partial update'); + self::assertCount(1, $queryResp->getData()->users); + + // Unset country + $response = $this->client->updateUsersPartial(new GeneratedModels\UpdateUsersPartialRequest( + users: [ + new GeneratedModels\UpdateUserPartialRequest( + id: $userID, + unset: ['country'], + ), + ], + )); + $this->assertResponseSuccess($response, 'partial update user (unset)'); + } + + /** + * @test + */ + public function testBlockUnblockUser(): void + { + $userIDs = $this->createTestUsers(2); + $alice = $userIDs[0]; + $bob = $userIDs[1]; + + // Block bob from alice + $response = $this->client->blockUsers(new GeneratedModels\BlockUsersRequest( + blockedUserID: $bob, + userID: $alice, + )); + $this->assertResponseSuccess($response, 'block user'); + + // Verify bob is in alice's blocked list + $blockedResp = $this->client->getBlockedUsers($alice); + $this->assertResponseSuccess($blockedResp, 'get blocked users'); + $blocks = $blockedResp->getData()->blocks; + self::assertNotNull($blocks); + $blockedIDs = array_map(fn($b) => $b->blockedUserID, $blocks); + self::assertContains($bob, $blockedIDs, 'Bob should be in blocked list'); + + // Unblock bob + $response = $this->client->unblockUsers(new GeneratedModels\UnblockUsersRequest( + blockedUserID: $bob, + userID: $alice, + )); + $this->assertResponseSuccess($response, 'unblock user'); + + // Verify bob is no longer blocked + $blockedResp = $this->client->getBlockedUsers($alice); + $this->assertResponseSuccess($blockedResp, 'get blocked users after unblock'); + $blocks = $blockedResp->getData()->blocks ?? []; + $blockedIDs = array_map(fn($b) => $b->blockedUserID, $blocks); + self::assertNotContains($bob, $blockedIDs, 'Bob should not be in blocked list after unblock'); + } + + /** + * @test + */ + public function testDeactivateReactivateUser(): void + { + $userIDs = $this->createTestUsers(1); + $userID = $userIDs[0]; + + // Deactivate + $response = $this->client->deactivateUser($userID, new GeneratedModels\DeactivateUserRequest()); + $this->assertResponseSuccess($response, 'deactivate user'); + + // Reactivate + $response = $this->client->reactivateUser($userID, new GeneratedModels\ReactivateUserRequest()); + $this->assertResponseSuccess($response, 'reactivate user'); + + // Verify user is active by querying + $queryResp = $this->client->queryUsers(new GeneratedModels\QueryUsersPayload( + filterConditions: (object) ['id' => (object) ['$eq' => $userID]], + )); + $this->assertResponseSuccess($queryResp, 'query user after reactivation'); + self::assertNotEmpty($queryResp->getData()->users, 'User should be found after reactivation'); + } + + /** + * @test + */ + public function testDeleteUsers(): void + { + // Create users but don't track them for auto-cleanup (we're deleting them ourselves) + $users = []; + $ids = []; + for ($i = 0; $i < 2; $i++) { + $id = 'test-user-' . uniqid(); + $ids[] = $id; + $users[$id] = new GeneratedModels\UserRequest( + id: $id, + name: 'Delete Test User', + role: 'user', + ); + } + $this->client->updateUsers(new GeneratedModels\UpdateUsersRequest(users: $users)); + + // Delete users (async operation, may be rate-limited after previous tests) + $response = $this->retryUntilSuccess(function () use ($ids) { + $resp = $this->client->deleteUsers(new GeneratedModels\DeleteUsersRequest( + userIds: $ids, + user: 'hard', + messages: 'hard', + conversations: 'hard', + )); + $this->assertResponseSuccess($resp, 'delete users'); + return $resp; + }, maxAttempts: 5, sleepMs: 3000); + + $taskID = $response->getData()->taskID; + self::assertNotEmpty($taskID, 'Task ID should not be empty'); + + // Wait for task to complete + $taskResult = $this->waitForTask($taskID); + self::assertEquals('completed', $taskResult->status, 'Delete task should complete'); + } + + /** + * @test + */ + public function testExportUser(): void + { + $userIDs = $this->createTestUsers(1); + $userID = $userIDs[0]; + + $response = $this->client->exportUser($userID); + $this->assertResponseSuccess($response, 'export user'); + self::assertNotNull($response->getData(), 'Export response should not be null'); + } + + /** + * @test + */ + public function testCreateGuest(): void + { + $guestID = 'test-guest-' . uniqid(); + + try { + $response = $this->client->createGuest(new GeneratedModels\CreateGuestRequest( + user: new GeneratedModels\UserRequest( + id: $guestID, + name: 'Guest User', + ), + )); + } catch (\Exception $e) { + // Guest access may be disabled for this app + $this->markTestSkipped('Guest user creation not enabled: ' . $e->getMessage()); + } + + $this->assertResponseSuccess($response, 'create guest'); + $data = $response->getData(); + self::assertNotEmpty($data->accessToken, 'Access token should not be empty'); + + // Server may prefix the guest ID; track both for cleanup + $this->createdUserIDs[] = $guestID; + if ($data->user !== null && $data->user->id !== $guestID) { + $this->createdUserIDs[] = $data->user->id; + } + } + + /** + * @test + */ + public function testUpsertUsersWithRoleAndTeamsRole(): void + { + $userID = 'test-user-' . uniqid(); + $this->createdUserIDs[] = $userID; + + $response = $this->client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + $userID => new GeneratedModels\UserRequest( + id: $userID, + name: 'Teams User', + role: 'admin', + teams: ['blue'], + teamsRole: ['blue' => 'admin'], + ), + ], + )); + $this->assertResponseSuccess($response, 'upsert user with role and teams_role'); + + $data = $response->getData(); + self::assertNotNull($data->users); + self::assertArrayHasKey($userID, $data->users); + + $user = $data->users[$userID]; + self::assertEquals('admin', $user->role); + self::assertEquals(['blue'], $user->teams); + self::assertEquals(['blue' => 'admin'], $user->teamsRole); + } + + /** + * @test + */ + public function testPartialUpdateUserWithTeam(): void + { + $userIDs = $this->createTestUsers(1); + $userID = $userIDs[0]; + + $response = $this->client->updateUsersPartial(new GeneratedModels\UpdateUsersPartialRequest( + users: [ + new GeneratedModels\UpdateUserPartialRequest( + id: $userID, + set: (object) [ + 'teams' => ['blue'], + 'teams_role' => (object) ['blue' => 'admin'], + ], + ), + ], + )); + $this->assertResponseSuccess($response, 'partial update user with team'); + + $data = $response->getData(); + self::assertNotNull($data->users); + self::assertArrayHasKey($userID, $data->users); + + $user = $data->users[$userID]; + self::assertEquals(['blue'], $user->teams); + self::assertEquals(['blue' => 'admin'], $user->teamsRole); + } + + /** + * @test + */ + public function testUpdatePrivacySettings(): void + { + $userID = 'test-user-' . uniqid(); + $this->createdUserIDs[] = $userID; + + // Create user without privacy settings + $this->client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + $userID => new GeneratedModels\UserRequest( + id: $userID, + name: 'Privacy User', + role: 'user', + ), + ], + )); + + // Update 1: Set typing_indicators disabled + $response = $this->client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + $userID => new GeneratedModels\UserRequest( + id: $userID, + privacySettings: new GeneratedModels\PrivacySettingsResponse( + typingIndicators: new GeneratedModels\TypingIndicatorsResponse(enabled: false), + ), + ), + ], + )); + $this->assertResponseSuccess($response, 'update privacy settings (typing)'); + + $user = $response->getData()->users[$userID]; + self::assertNotNull($user->privacySettings); + self::assertNotNull($user->privacySettings->typingIndicators); + self::assertFalse($user->privacySettings->typingIndicators->enabled); + + // Update 2: Set typing enabled + read_receipts disabled + $response = $this->client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + $userID => new GeneratedModels\UserRequest( + id: $userID, + privacySettings: new GeneratedModels\PrivacySettingsResponse( + typingIndicators: new GeneratedModels\TypingIndicatorsResponse(enabled: true), + readReceipts: new GeneratedModels\ReadReceiptsResponse(enabled: false), + ), + ), + ], + )); + $this->assertResponseSuccess($response, 'update privacy settings (typing + read_receipts)'); + + $user = $response->getData()->users[$userID]; + self::assertNotNull($user->privacySettings); + self::assertTrue($user->privacySettings->typingIndicators->enabled); + self::assertFalse($user->privacySettings->readReceipts->enabled); + } + + /** + * @test + */ + public function testPartialUpdatePrivacySettings(): void + { + $userIDs = $this->createTestUsers(1); + $userID = $userIDs[0]; + + // Partial update 1: Set typing_indicators enabled + $response = $this->client->updateUsersPartial(new GeneratedModels\UpdateUsersPartialRequest( + users: [ + new GeneratedModels\UpdateUserPartialRequest( + id: $userID, + set: (object) [ + 'privacy_settings' => (object) [ + 'typing_indicators' => (object) ['enabled' => true], + ], + ], + ), + ], + )); + $this->assertResponseSuccess($response, 'partial update privacy (typing)'); + + $user = $response->getData()->users[$userID]; + self::assertNotNull($user->privacySettings); + self::assertTrue($user->privacySettings->typingIndicators->enabled); + + // Partial update 2: Set read_receipts disabled (typing should remain) + $response = $this->client->updateUsersPartial(new GeneratedModels\UpdateUsersPartialRequest( + users: [ + new GeneratedModels\UpdateUserPartialRequest( + id: $userID, + set: (object) [ + 'privacy_settings' => (object) [ + 'read_receipts' => (object) ['enabled' => false], + ], + ], + ), + ], + )); + $this->assertResponseSuccess($response, 'partial update privacy (read_receipts)'); + + $user = $response->getData()->users[$userID]; + self::assertNotNull($user->privacySettings); + self::assertTrue($user->privacySettings->typingIndicators->enabled, 'Typing indicators should still be enabled'); + self::assertFalse($user->privacySettings->readReceipts->enabled); + } + + /** + * @test + */ + public function testQueryUsersWithDeactivated(): void + { + $userIDs = $this->createTestUsers(3); + + // Deactivate the third user + $this->client->deactivateUser($userIDs[2], new GeneratedModels\DeactivateUserRequest()); + + // Query without include_deactivated — should find only 2 + $response = $this->client->queryUsers(new GeneratedModels\QueryUsersPayload( + filterConditions: (object) ['id' => (object) ['$in' => $userIDs]], + )); + $this->assertResponseSuccess($response, 'query users without deactivated'); + self::assertCount(2, $response->getData()->users, 'Should find 2 active users'); + + // Query with include_deactivated — should find all 3 + $response = $this->client->queryUsers(new GeneratedModels\QueryUsersPayload( + filterConditions: (object) ['id' => (object) ['$in' => $userIDs]], + includeDeactivatedUsers: true, + )); + $this->assertResponseSuccess($response, 'query users with deactivated'); + self::assertCount(3, $response->getData()->users, 'Should find all 3 users including deactivated'); + + // Reactivate for cleanup + $this->client->reactivateUser($userIDs[2], new GeneratedModels\ReactivateUserRequest()); + } + + /** + * @test + */ + public function testDeactivateUsersPlural(): void + { + $userIDs = $this->createTestUsers(2); + + // Batch deactivate (async) + $response = $this->client->deactivateUsers(new GeneratedModels\DeactivateUsersRequest( + userIds: $userIDs, + )); + $this->assertResponseSuccess($response, 'deactivate users (plural)'); + + $taskID = $response->getData()->taskID; + self::assertNotEmpty($taskID, 'Task ID should not be empty'); + + $taskResult = $this->waitForTask($taskID); + self::assertEquals('completed', $taskResult->status, 'Deactivate task should complete'); + + // Verify both are deactivated — query without flag should return 0 + $queryResp = $this->client->queryUsers(new GeneratedModels\QueryUsersPayload( + filterConditions: (object) ['id' => (object) ['$in' => $userIDs]], + )); + $this->assertResponseSuccess($queryResp, 'query deactivated users'); + self::assertCount(0, $queryResp->getData()->users ?? [], 'No active users should remain'); + + // Reactivate for cleanup + $this->client->reactivateUsers(new GeneratedModels\ReactivateUsersRequest( + userIds: $userIDs, + )); + // Wait for reactivation task + $reactivateTaskID = $this->client->reactivateUsers(new GeneratedModels\ReactivateUsersRequest( + userIds: $userIDs, + ))->getData()->taskID; + if (!empty($reactivateTaskID)) { + $this->waitForTask($reactivateTaskID); + } + } + + /** + * @test + */ + public function testUserCustomData(): void + { + $userID = 'test-user-' . uniqid(); + $this->createdUserIDs[] = $userID; + + $customData = (object) [ + 'favorite_color' => 'blue', + 'age' => 30, + 'tags' => ['vip', 'early_adopter'], + ]; + + // Create user with custom data + $response = $this->client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + $userID => new GeneratedModels\UserRequest( + id: $userID, + name: 'Custom Data User', + role: 'user', + custom: $customData, + ), + ], + )); + $this->assertResponseSuccess($response, 'create user with custom data'); + + $user = $response->getData()->users[$userID]; + self::assertNotNull($user->custom, 'Custom data should be set'); + + // Query back to verify persistence + $queryResp = $this->client->queryUsers(new GeneratedModels\QueryUsersPayload( + filterConditions: (object) ['id' => (object) ['$eq' => $userID]], + )); + $this->assertResponseSuccess($queryResp, 'query user with custom data'); + self::assertCount(1, $queryResp->getData()->users); + + $queriedUser = $queryResp->getData()->users[0]; + self::assertNotNull($queriedUser->custom, 'Custom data should persist after query'); + } +} diff --git a/tests/Integration/FeedActivityIntegrationTest.php b/tests/Integration/FeedActivityIntegrationTest.php new file mode 100644 index 00000000..2e94fad1 --- /dev/null +++ b/tests/Integration/FeedActivityIntegrationTest.php @@ -0,0 +1,358 @@ +build(); + $feedsClient = ClientBuilder::fromEnv()->buildFeedsClient(); + + self::$sharedClient = $client; + self::$sharedFeedsClient = $feedsClient; + self::$sharedUserId = 'test-user-' . uniqid(); + self::$sharedUserId2 = 'test-user-2-' . uniqid(); + + $client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + self::$sharedUserId => ['id' => self::$sharedUserId, 'name' => 'Test User 1', 'role' => 'user'], + self::$sharedUserId2 => ['id' => self::$sharedUserId2, 'name' => 'Test User 2', 'role' => 'user'], + ] + )); + + $feedsClient->feed('user', self::$sharedUserId)->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: self::$sharedUserId) + ); + $feedsClient->feed('user', self::$sharedUserId2)->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: self::$sharedUserId2) + ); + } + + protected function setUp(): void + { + $this->client = self::$sharedClient; + $this->feedsV3Client = self::$sharedFeedsClient; + $this->testUserId = self::$sharedUserId; + $this->testUserId2 = self::$sharedUserId2; + $this->testFeed = $this->feedsV3Client->feed('user', $this->testUserId); + $this->testFeed2 = $this->feedsV3Client->feed('user', $this->testUserId2); + } + + protected function tearDown(): void + { + foreach ($this->createdActivityIds as $activityId) { + try { + $this->feedsV3Client->deleteActivity($activityId, true, false); + } catch (\Exception $e) { + // best-effort + } + } + $this->createdActivityIds = []; + } + + // ================================================================= + // ACTIVITY OPERATIONS + // ================================================================= + + /** + * @test + */ + public function testCreateActivity(): void + { + // snippet-start: AddActivity + $activity = new GeneratedModels\AddActivityRequest( + type: 'post', + feeds: [$this->testFeed->getFeedIdentifier()], + text: 'This is a test activity from PHP SDK', + userID: $this->testUserId, + custom: (object) ['test_field' => 'test_value', 'timestamp' => time()] + ); + $response = $this->feedsV3Client->addActivity($activity); + // snippet-end: AddActivity + + $this->assertResponseSuccess($response, 'add activity'); + + $activityResponse = $response->getData(); + self::assertInstanceOf(GeneratedModels\AddActivityResponse::class, $activityResponse); + self::assertNotNull($activityResponse->activity); + self::assertNotNull($activityResponse->activity->id); + self::assertSame($activity->text, $activityResponse->activity->text); + + $this->createdActivityIds[] = $activityResponse->activity->id; + } + + /** + * @test + */ + public function testCreateActivityWithAttachments(): void + { + // snippet-start: AddActivityWithImageAttachment + $activity = new GeneratedModels\AddActivityRequest( + type: 'post', + feeds: [$this->testFeed->getFeedIdentifier()], + text: 'Look at this amazing view of NYC!', + userID: $this->testUserId, + attachments: [ + new GeneratedModels\Attachment( + imageUrl: 'https://example.com/nyc-skyline.jpg', + type: 'image', + title: 'NYC Skyline' + ), + ], + custom: (object) ['location' => 'New York City', 'camera' => 'iPhone 15 Pro'] + ); + $response = $this->feedsV3Client->addActivity($activity); + // snippet-end: AddActivityWithImageAttachment + + $this->assertResponseSuccess($response, 'add activity with image attachment'); + $this->createdActivityIds[] = $response->getData()->activity->id; + } + + /** + * @test + */ + public function testCreateVideoActivity(): void + { + // snippet-start: AddVideoActivity + $activity = new GeneratedModels\AddActivityRequest( + type: 'video', + feeds: [$this->testFeed->getFeedIdentifier()], + text: 'Check out this amazing video!', + userID: $this->testUserId, + attachments: [ + new GeneratedModels\Attachment( + assetUrl: 'https://example.com/amazing-video.mp4', + type: 'video', + title: 'Amazing Video', + custom: (object) ['duration' => 120] + ), + ], + custom: (object) ['video_quality' => '4K', 'duration_seconds' => 120] + ); + $response = $this->feedsV3Client->addActivity($activity); + // snippet-end: AddVideoActivity + + $this->assertResponseSuccess($response, 'add video activity'); + $this->createdActivityIds[] = $response->getData()->activity->id; + } + + /** + * @test + */ + public function testCreateStoryActivityWithExpiration(): void + { + // snippet-start: AddStoryActivityWithExpiration + $tomorrow = new \DateTime('+1 day'); + $activity = new GeneratedModels\AddActivityRequest( + type: 'story', + feeds: [$this->testFeed->getFeedIdentifier()], + text: 'My daily story - expires tomorrow!', + userID: $this->testUserId, + expiresAt: $tomorrow->format('c'), + attachments: [ + new GeneratedModels\Attachment(imageUrl: 'https://example.com/story-image.jpg', type: 'image'), + new GeneratedModels\Attachment( + assetUrl: 'https://example.com/story-video.mp4', + type: 'video', + custom: (object) ['duration' => 15] + ), + ], + custom: (object) ['story_type' => 'daily', 'auto_expire' => true] + ); + $response = $this->feedsV3Client->addActivity($activity); + // snippet-end: AddStoryActivityWithExpiration + + $this->assertResponseSuccess($response, 'add story activity with expiration'); + $this->createdActivityIds[] = $response->getData()->activity->id; + } + + /** + * @test + */ + public function testCreateActivityMultipleFeeds(): void + { + // snippet-start: AddActivityToMultipleFeeds + $activity = new GeneratedModels\AddActivityRequest( + type: 'post', + feeds: [ + $this->testFeed->getFeedIdentifier(), + $this->testFeed2->getFeedIdentifier(), + ], + text: 'This post appears in multiple feeds!', + userID: $this->testUserId, + custom: (object) ['cross_posted' => true, 'target_feeds' => 2] + ); + $response = $this->feedsV3Client->addActivity($activity); + // snippet-end: AddActivityToMultipleFeeds + + $this->assertResponseSuccess($response, 'add activity to multiple feeds'); + $this->createdActivityIds[] = $response->getData()->activity->id; + } + + /** + * @test + */ + public function testUploadImageAndFile(): void + { + $testImagePath = __DIR__ . '/testupload.png'; + + if (!file_exists($testImagePath)) { + self::markTestSkipped("Test image file not found: {$testImagePath}"); + } + + // snippet-start: UploadImage + $imageUploadRequest = new GeneratedModels\ImageUploadRequest( + file: $testImagePath, + user: new GeneratedModels\OnlyUserID(id: $this->testUserId), + uploadSizes: [['width' => 100, 'height' => 100, 'resize' => 'scale', 'crop' => 'center']] + ); + $imageResponse = $this->client->uploadImage($imageUploadRequest); + // snippet-end: UploadImage + + $this->assertResponseSuccess($imageResponse, 'upload image'); + self::assertNotEmpty($imageResponse->getData()->file); + + // Upload via base64 + $base64Image = base64_encode((string) file_get_contents($testImagePath)); + $imageResponse2 = $this->client->uploadImage(new GeneratedModels\ImageUploadRequest( + file: $base64Image, + user: new GeneratedModels\OnlyUserID(id: $this->testUserId), + uploadSizes: [['width' => 200, 'height' => 200, 'resize' => 'fill', 'crop' => 'center']] + )); + $this->assertResponseSuccess($imageResponse2, 'upload image with base64'); + + // snippet-start: UploadFile + $namedTempPath = sys_get_temp_dir() . '/stream_test_' . uniqid() . '.txt'; + file_put_contents($namedTempPath, 'test content from PHP SDK integration test'); + $fileResponse = $this->client->uploadFile(new GeneratedModels\FileUploadRequest( + file: $namedTempPath, + user: new GeneratedModels\OnlyUserID(id: $this->testUserId) + )); + // snippet-end: UploadFile + + $this->assertResponseSuccess($fileResponse, 'upload file'); + self::assertNotEmpty($fileResponse->getData()->file); + @unlink($namedTempPath); + } + + /** + * @test + */ + public function testQueryActivities(): void + { + // snippet-start: QueryActivities + $response = $this->feedsV3Client->queryActivities( + new GeneratedModels\QueryActivitiesRequest( + limit: 10, + filter: (object) ['activity_type' => 'post'] + ) + ); + // snippet-end: QueryActivities + + $this->assertResponseSuccess($response, 'query activities'); + self::assertInstanceOf(QueryActivitiesResponse::class, $response->getData()); + } + + /** + * @throws StreamException + * + * @test + */ + public function testGetSingleActivity(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity for retrieval test', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for retrieval test'); + + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + // snippet-start: GetActivity + $response = $this->feedsV3Client->getActivity($activityId); + // snippet-end: GetActivity + + $this->assertResponseSuccess($response, 'get activity'); + $data = $response->getData(); + self::assertInstanceOf(GetActivityResponse::class, $data); + self::assertSame($activityId, $data->activity->id); + } + + /** + * @test + */ + public function testUpdateActivity(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity for update test', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for update test'); + + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + // snippet-start: UpdateActivity + $response = $this->feedsV3Client->updateActivity( + $activityId, + new GeneratedModels\UpdateActivityRequest( + text: 'Updated activity text from PHP SDK', + userID: $this->testUserId, + custom: (object) ['updated' => true, 'update_time' => time()] + ) + ); + // snippet-end: UpdateActivity + + $this->assertResponseSuccess($response, 'update activity'); + } + + private function assertResponseSuccess(mixed $response, string $operation): void + { + if ($response instanceof StreamResponse) { + self::assertTrue( + $response->isSuccessful(), + "Failed to {$operation}. Status: " . $response->getStatusCode() . ', Body: ' . $response->getRawBody() + ); + } else { + self::assertNotNull($response, "Failed to {$operation}. Response is null."); + } + } +} diff --git a/tests/Integration/FeedAdvancedIntegrationTest.php b/tests/Integration/FeedAdvancedIntegrationTest.php new file mode 100644 index 00000000..4ff1ca1f --- /dev/null +++ b/tests/Integration/FeedAdvancedIntegrationTest.php @@ -0,0 +1,785 @@ +build(); + $feedsClient = ClientBuilder::fromEnv()->buildFeedsClient(); + + self::$sharedClient = $client; + self::$sharedFeedsClient = $feedsClient; + self::$sharedUserId = 'test-user-' . uniqid(); + self::$sharedUserId2 = 'test-user-2-' . uniqid(); + + $client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + self::$sharedUserId => ['id' => self::$sharedUserId, 'name' => 'Test User 1', 'role' => 'user'], + self::$sharedUserId2 => ['id' => self::$sharedUserId2, 'name' => 'Test User 2', 'role' => 'user'], + ] + )); + + $feedsClient->feed('user', self::$sharedUserId)->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: self::$sharedUserId) + ); + $feedsClient->feed('user', self::$sharedUserId2)->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: self::$sharedUserId2) + ); + } + + protected function setUp(): void + { + $this->client = self::$sharedClient; + $this->feedsV3Client = self::$sharedFeedsClient; + $this->testUserId = self::$sharedUserId; + $this->testUserId2 = self::$sharedUserId2; + $this->testFeed = $this->feedsV3Client->feed('user', $this->testUserId); + $this->testFeed2 = $this->feedsV3Client->feed('user', $this->testUserId2); + } + + protected function tearDown(): void + { + foreach ($this->createdCommentIds as $commentId) { + try { + $this->feedsV3Client->deleteComment($commentId, true, false); + } catch (\Exception $e) { + // best-effort + } + } + foreach ($this->createdActivityIds as $activityId) { + try { + $this->feedsV3Client->deleteActivity($activityId, true, false); + } catch (\Exception $e) { + // best-effort + } + } + $this->createdActivityIds = []; + $this->createdCommentIds = []; + } + + // ================================================================= + // PIN / UNPIN + // ================================================================= + + /** + * @throws StreamException + * + * @test + */ + public function testPinActivity(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + feeds: [$this->testFeed->getFeedIdentifier()], + text: 'Activity for pin test', + userID: $this->testUserId + )); + $this->assertResponseSuccess($createResponse, 'create activity for pin test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + // snippet-start: PinActivity + $response = $this->testFeed->pinActivity( + $activityId, + new GeneratedModels\PinActivityRequest(userID: $this->testUserId) + ); + // snippet-end: PinActivity + + $this->assertResponseSuccess($response, 'pin activity'); + } + + /** + * @test + */ + public function testUnpinActivity(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + feeds: [$this->testFeed->getFeedIdentifier()], + text: 'Activity for unpin test', + userID: $this->testUserId + )); + $this->assertResponseSuccess($createResponse, 'create activity for unpin test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + $this->testFeed->pinActivity($activityId, new GeneratedModels\PinActivityRequest(userID: $this->testUserId)); + + // snippet-start: UnpinActivity + $response = $this->testFeed->unpinActivity($activityId, $this->testUserId); + // snippet-end: UnpinActivity + + $this->assertResponseSuccess($response, 'unpin activity'); + } + + // ================================================================= + // DELETE OPERATIONS + // ================================================================= + + /** + * @test + */ + public function testDeleteBookmark(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity for delete bookmark test', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for delete bookmark test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + $bookmarkResponse = $this->feedsV3Client->addBookmark( + $activityId, + new GeneratedModels\AddBookmarkRequest( + newFolder: new GeneratedModels\AddFolderRequest(name: 'test-bookmarks1'), + userID: $this->testUserId + ) + ); + $this->assertResponseSuccess($bookmarkResponse, 'add bookmark for delete test'); + + // snippet-start: DeleteBookmark + $bookmarkData = $bookmarkResponse->getData(); + $folderId = $bookmarkData->bookmark->folder->id; + $response = $this->feedsV3Client->deleteBookmark($activityId, $folderId, $this->testUserId); + // snippet-end: DeleteBookmark + + $this->assertResponseSuccess($response, 'delete bookmark'); + } + + /** + * @test + */ + public function testDeleteReaction(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity for delete reaction test', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for delete reaction test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + $this->feedsV3Client->addActivityReaction( + $activityId, + new GeneratedModels\AddReactionRequest(type: 'like', userID: $this->testUserId) + ); + + // snippet-start: DeleteActivityReaction + $response = $this->feedsV3Client->deleteActivityReaction($activityId, 'like', false, $this->testUserId); + // snippet-end: DeleteActivityReaction + + $this->assertResponseSuccess($response, 'delete reaction'); + } + + /** + * @test + */ + public function testDeleteComment(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity for delete comment test', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for delete comment test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + $commentResponse = $this->feedsV3Client->addComment(new GeneratedModels\AddCommentRequest( + comment: 'Comment to be deleted', + objectID: $activityId, + objectType: 'activity', + userID: $this->testUserId + )); + $this->assertResponseSuccess($commentResponse, 'add comment for delete test'); + $commentId = $commentResponse->getData()->comment->id ?? 'comment-id'; + + // snippet-start: DeleteComment + $response = $this->feedsV3Client->deleteComment($commentId, false, false); + // snippet-end: DeleteComment + + $this->assertResponseSuccess($response, 'delete comment'); + } + + /** + * @test + */ + public function testUnfollowUser(): void + { + try { + try { + $this->feedsV3Client->follow(new GeneratedModels\FollowRequest( + source: self::USER_FEED_TYPE . $this->testUserId, + target: self::USER_FEED_TYPE . $this->testUserId2 + )); + } catch (StreamApiException $e) { + if (!str_contains($e->getMessage(), 'already exists')) { + throw $e; + } + } + + // snippet-start: Unfollow + $response = $this->feedsV3Client->unfollow( + self::USER_FEED_TYPE . $this->testUserId, + self::USER_FEED_TYPE . $this->testUserId2, + false + ); + // snippet-end: Unfollow + + self::assertInstanceOf(StreamResponse::class, $response); + $this->assertResponseSuccess($response, 'unfollow operation'); + } catch (StreamApiException $e) { + self::markTestSkipped('Unfollow operation not supported: ' . $e->getMessage()); + } + } + + /** + * @test + */ + public function testDeleteActivities(): void + { + $activitiesToDelete = []; + for ($i = 1; $i <= 2; $i++) { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: "Activity {$i} for delete test", + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, "create activity {$i} for delete test"); + $activityId = $createResponse->getData()->activity->id; + $activitiesToDelete[] = $activityId; + $this->createdActivityIds[] = $activityId; + } + + foreach ($activitiesToDelete as $activityId) { + // snippet-start: DeleteActivity + $response = $this->feedsV3Client->deleteActivity($activityId, false, false); + // snippet-end: DeleteActivity + + $this->assertResponseSuccess($response, 'delete activity'); + } + + $this->createdActivityIds = []; + } + + // ================================================================= + // POLLS + // ================================================================= + + /** + * @throws StreamException + * + * @test + */ + public function testCreatePoll(): void + { + // snippet-start: CreatePoll + $poll = new GeneratedModels\CreatePollRequest( + name: 'Poll', + description: self::POLL_QUESTION, + userID: $this->testUserId, + options: [new GeneratedModels\PollOptionInput('Red'), new GeneratedModels\PollOptionInput('Blue')] + ); + $pollResponse = $this->client->createPoll($poll); + $pollId = $pollResponse->getData()->poll->id; + + $pollActivity = new GeneratedModels\AddActivityRequest( + type: 'poll', + feeds: [$this->testFeed->getFeedIdentifier()], + pollID: $pollId, + text: self::POLL_QUESTION, + userID: $this->testUserId, + custom: (object) ['poll_name' => self::POLL_QUESTION, 'max_votes_allowed' => 1] + ); + $response = $this->feedsV3Client->addActivity($pollActivity); + // snippet-end: CreatePoll + + $this->assertResponseSuccess($response, 'create poll'); + $this->createdActivityIds[] = $response->getData()->activity->id; + } + + /** + * @throws StreamException + * + * @test + */ + public function testVotePoll(): void + { + $poll = new GeneratedModels\CreatePollRequest( + name: 'Favorite Color Poll', + description: 'What is your favorite color?', + userID: $this->testUserId, + options: [ + new GeneratedModels\PollOptionInput('red'), + new GeneratedModels\PollOptionInput('blue'), + new GeneratedModels\PollOptionInput('green'), + ] + ); + $pollResponse = $this->client->createPoll($poll); + $pollData = $pollResponse->getData(); + $pollId = $pollData->poll->id; + + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'poll', + feeds: [$this->testFeed->getFeedIdentifier()], + text: 'Vote for your favorite color', + userID: $this->testUserId, + pollID: $pollId, + custom: (object) ['poll_name' => 'What is your favorite color?'] + )); + $this->assertResponseSuccess($createResponse, 'create poll for voting'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + $pollOptions = $pollData->poll->options; + if (empty($pollOptions)) { + self::markTestSkipped('Poll options not available for voting test'); + } + + $optionId = $pollOptions[0]->id ?? null; + + // snippet-start: VotePoll + $voteResponse = $this->feedsV3Client->castPollVote( + $activityId, + $pollId, + new GeneratedModels\CastPollVoteRequest( + userID: $this->testUserId, + vote: new GeneratedModels\VoteData(optionID: $optionId) + ) + ); + // snippet-end: VotePoll + + $this->assertResponseSuccess($voteResponse, 'vote on poll'); + } + + // ================================================================= + // MODERATION + // ================================================================= + + /** + * @throws StreamException + * + * @test + */ + public function testModerateActivity(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'This content might need moderation', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for moderation'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + try { + // snippet-start: ModerateActivity + $moderationResponse = $this->feedsV3Client->activityFeedback( + $activityId, + new GeneratedModels\ActivityFeedbackRequest(hide: true, userID: $this->testUserId2) + ); + // snippet-end: ModerateActivity + + $this->assertResponseSuccess($moderationResponse, 'moderate activity'); + } catch (StreamApiException $e) { + self::markTestSkipped('Activity moderation not supported: ' . $e->getMessage()); + } + } + + // ================================================================= + // QUERY / PAGINATION + // ================================================================= + + /** + * @throws StreamException + * + * @test + */ + public function testQueryActivitiesWithFilters(): void + { + foreach (['post', 'photo', 'video', 'story'] as $type) { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: $type, + text: "Test {$type} activity for filtering", + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()], + custom: (object) ['category' => $type, 'priority' => rand(1, 5), 'tags' => [$type, 'test']] + )); + $this->assertResponseSuccess($createResponse, "create {$type} activity for filtering"); + $this->createdActivityIds[] = $createResponse->getData()->activity->id; + } + + try { + // snippet-start: QueryActivitiesWithTypeFilter + $response = $this->feedsV3Client->queryActivities(new GeneratedModels\QueryActivitiesRequest( + limit: 10, + filter: (object) ['activity_type' => 'post', 'user_id' => $this->testUserId], + sort: ['created_at' => -1] + )); + // snippet-end: QueryActivitiesWithTypeFilter + $this->assertResponseSuccess($response, 'query activities with type filter'); + } catch (StreamApiException $e) { + // Some filter combinations may not be supported + } + + try { + // snippet-start: QueryActivitiesWithCustomFilter + $customFilterResponse = $this->feedsV3Client->queryActivities(new GeneratedModels\QueryActivitiesRequest( + limit: 10, + filter: (object) ['custom.priority' => (object) ['$gte' => 3], 'user_id' => $this->testUserId] + )); + // snippet-end: QueryActivitiesWithCustomFilter + $this->assertResponseSuccess($customFilterResponse, 'query activities with custom filter'); + } catch (StreamApiException $e) { + // Some filter combinations may not be supported + } + } + + /** + * @throws StreamException + * + * @test + */ + public function testGetFeedActivitiesWithPagination(): void + { + for ($i = 1; $i <= 7; $i++) { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: "Pagination test activity {$i}", + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, "create pagination activity {$i}"); + $this->createdActivityIds[] = $createResponse->getData()->activity->id; + } + + // snippet-start: GetFeedActivitiesWithPagination + $firstPageResponse = $this->feedsV3Client->queryActivities(new GeneratedModels\QueryActivitiesRequest( + limit: 3, + filter: (object) ['user_id' => $this->testUserId] + )); + // snippet-end: GetFeedActivitiesWithPagination + + $this->assertResponseSuccess($firstPageResponse, 'get first page of feed activities'); + $firstPageData = $firstPageResponse->getData(); + self::assertInstanceOf(QueryActivitiesResponse::class, $firstPageData); + self::assertLessThanOrEqual(3, count($firstPageData->activities)); + + // snippet-start: GetFeedActivitiesSecondPage + $nextToken = $firstPageData->next ?? null; + if ($nextToken) { + $secondPageResponse = $this->feedsV3Client->queryActivities(new GeneratedModels\QueryActivitiesRequest( + limit: 3, + next: $nextToken, + filter: (object) ['user_id' => $this->testUserId] + )); + $this->assertResponseSuccess($secondPageResponse, 'get second page of feed activities'); + } + // snippet-end: GetFeedActivitiesSecondPage + } + + // ================================================================= + // ERROR HANDLING / AUTH + // ================================================================= + + /** + * @test + */ + public function testErrorHandlingScenarios(): void + { + try { + // snippet-start: HandleInvalidActivityId + $response = $this->feedsV3Client->getActivity('invalid-activity-id-12345'); + // snippet-end: HandleInvalidActivityId + if (!$response->isSuccessful()) { + self::assertTrue(true); + } + } catch (StreamApiException $e) { + // Expected + } + + try { + // snippet-start: HandleEmptyActivityText + $emptyActivity = new GeneratedModels\AddActivityRequest( + type: 'post', + text: '', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + ); + $response = $this->feedsV3Client->addActivity($emptyActivity); + // snippet-end: HandleEmptyActivityText + if (!$response->isSuccessful()) { + self::assertTrue(true); + } + } catch (StreamApiException $e) { + // Expected + } + + self::assertTrue(true); + } + + /** + * @test + */ + public function testAuthenticationScenarios(): void + { + // snippet-start: ValidUserAuthentication + $activity = new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity with proper authentication', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + ); + $response = $this->feedsV3Client->addActivity($activity); + // snippet-end: ValidUserAuthentication + + $this->assertResponseSuccess($response, 'activity with valid authentication'); + $activityId = $response->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + // snippet-start: UserPermissionUpdate + $updateResponse = $this->feedsV3Client->updateActivity( + $activityId, + new GeneratedModels\UpdateActivityRequest( + text: 'Updated with proper user permissions', + userID: $this->testUserId + ) + ); + // snippet-end: UserPermissionUpdate + + $this->assertResponseSuccess($updateResponse, 'update activity with proper permissions'); + } + + /** + * @test + */ + public function testRealWorldUsageDemo(): void + { + // snippet-start: RealWorldScenario + $postActivity = new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Just visited the most amazing coffee shop!', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()], + attachments: [ + new GeneratedModels\Attachment( + imageUrl: 'https://example.com/coffee-shop.jpg', + type: 'image', + title: 'Amazing Coffee Shop' + ), + ], + custom: (object) ['location' => 'Downtown Coffee Co.', 'rating' => 5] + ); + $postResponse = $this->feedsV3Client->addActivity($postActivity); + $this->assertResponseSuccess($postResponse, 'create real-world post'); + $postId = $postResponse->getData()->activity->id; + $this->createdActivityIds[] = $postId; + + foreach (['like', 'love', 'wow'] as $reactionType) { + $reactionResponse = $this->feedsV3Client->addActivityReaction( + $postId, + new GeneratedModels\AddReactionRequest(type: $reactionType, userID: $this->testUserId2) + ); + $this->assertResponseSuccess($reactionResponse, "add {$reactionType} reaction"); + } + + foreach (['That place looks amazing!', 'I love their espresso!', 'Adding to my list!'] as $commentText) { + $commentResponse = $this->feedsV3Client->addComment(new GeneratedModels\AddCommentRequest( + comment: $commentText, + objectID: $postId, + objectType: 'activity', + userID: $this->testUserId2 + )); + $this->assertResponseSuccess($commentResponse, 'add comment to post'); + } + + try { + $bookmarkResponse = $this->feedsV3Client->addBookmark( + $postId, + new GeneratedModels\AddBookmarkRequest( + userID: $this->testUserId2, + newFolder: new GeneratedModels\AddFolderRequest(name: 'favorite-places') + ) + ); + $this->assertResponseSuccess($bookmarkResponse, 'bookmark the post'); + } catch (StreamApiException $e) { + // Bookmark may not be supported + } + + $enrichedResponse = $this->feedsV3Client->getActivity($postId); + $this->assertResponseSuccess($enrichedResponse, 'get enriched activity'); + // snippet-end: RealWorldScenario + } + + // ================================================================= + // FEED GROUP / VIEW CRUD (skipped pending backend fixes) + // ================================================================= + + /** + * @test + */ + public function testFeedGroupCRUD(): void + { + self::markTestSkipped('CI issue FEEDS-799'); + + $feedGroupId = 'test-feed-group-' . substr(uniqid(), -8); + + // snippet-start: ListFeedGroups + $listResponse = $this->feedsV3Client->listFeedGroups(false); + // snippet-end: ListFeedGroups + $this->assertResponseSuccess($listResponse, 'list feed groups'); + + // snippet-start: CreateFeedGroup + $createResponse = $this->feedsV3Client->createFeedGroup( + new CreateFeedGroupRequest(id: $feedGroupId, defaultVisibility: 'public') + ); + // snippet-end: CreateFeedGroup + $this->assertResponseSuccess($createResponse, 'create feed group'); + self::assertSame($feedGroupId, $createResponse->getData()->feedGroup->id); + + // snippet-start: GetFeedGroup + $getResponse = $this->feedsV3Client->getFeedGroup('foryou', false); + // snippet-end: GetFeedGroup + $this->assertResponseSuccess($getResponse, 'get feed group'); + + // snippet-start: UpdateFeedGroup + $updateResponse = $this->feedsV3Client->updateFeedGroup( + 'foryou', + new GeneratedModels\UpdateFeedGroupRequest(aggregation: new GeneratedModels\AggregationConfig('default')) + ); + // snippet-end: UpdateFeedGroup + $this->assertResponseSuccess($updateResponse, 'update feed group'); + + // snippet-start: GetOrCreateFeedGroupExisting + $getOrCreateResponse = $this->feedsV3Client->getOrCreateFeedGroup( + 'foryou', + new GeneratedModels\GetOrCreateFeedGroupRequest(defaultVisibility: 'public') + ); + // snippet-end: GetOrCreateFeedGroupExisting + $this->assertResponseSuccess($getOrCreateResponse, 'get or create existing feed group'); + + $group = 'test-feed-group-' . substr(uniqid(), -8); + // snippet-start: CreateFeedGroupWithAggregation + $aggResponse = $this->feedsV3Client->createFeedGroup(new CreateFeedGroupRequest( + id: $group, + defaultVisibility: 'public', + activityProcessors: [['type' => 'dummy']], + aggregation: new GeneratedModels\AggregationConfig('{{ type }}-{{ time.strftime("%Y-%m-%d") }}') + )); + // snippet-end: CreateFeedGroupWithAggregation + $this->assertResponseSuccess($aggResponse, 'create feed group with aggregation'); + + $rankedGroup = 'test-feed-group-' . substr(uniqid(), -8); + // snippet-start: CreateFeedGroupWithRanking + $rankResponse = $this->feedsV3Client->createFeedGroup(new CreateFeedGroupRequest( + id: $rankedGroup, + defaultVisibility: 'public', + ranking: new GeneratedModels\RankingConfig(type: 'recency', score: 'decay_linear(time) * popularity') + )); + // snippet-end: CreateFeedGroupWithRanking + $this->assertResponseSuccess($rankResponse, 'create feed group with ranking'); + } + + /** + * @test + */ + public function testFeedViewCRUD(): void + { + self::markTestSkipped('Backend issue FEEDS-799'); + + $feedViewId = 'test-feed-view-' . substr(uniqid(), -8); + + // snippet-start: ListFeedViews + $listResponse = $this->feedsV3Client->listFeedViews(); + // snippet-end: ListFeedViews + $this->assertResponseSuccess($listResponse, 'list feed views'); + + // snippet-start: CreateFeedView + $createResponse = $this->feedsV3Client->createFeedView( + new GeneratedModels\CreateFeedViewRequest(id: $feedViewId) + ); + // snippet-end: CreateFeedView + $this->assertResponseSuccess($createResponse, 'create feed view'); + self::assertSame($feedViewId, $createResponse->getData()->feedView->id); + + // snippet-start: GetFeedView + $getResponse = $this->feedsV3Client->getFeedView('feedViewID'); + // snippet-end: GetFeedView + $this->assertResponseSuccess($getResponse, 'get feed view'); + + // snippet-start: UpdateFeedView + $updateResponse = $this->feedsV3Client->updateFeedView( + 'feedViewID', + new GeneratedModels\UpdateFeedViewRequest(aggregation: new GeneratedModels\AggregationConfig('default')) + ); + // snippet-end: UpdateFeedView + $this->assertResponseSuccess($updateResponse, 'update feed view'); + + // snippet-start: GetOrCreateFeedViewExisting + $getOrCreateResponse = $this->feedsV3Client->getOrCreateFeedView( + $feedViewId, + new GeneratedModels\GetOrCreateFeedViewRequest(aggregation: new GeneratedModels\AggregationConfig('default')) + ); + // snippet-end: GetOrCreateFeedViewExisting + $this->assertResponseSuccess($getOrCreateResponse, 'get or create existing feed view'); + } + + private function assertResponseSuccess(mixed $response, string $operation): void + { + if ($response instanceof StreamResponse) { + self::assertTrue( + $response->isSuccessful(), + "Failed to {$operation}. Status: " . $response->getStatusCode() . ', Body: ' . $response->getRawBody() + ); + } else { + self::assertNotNull($response, "Failed to {$operation}. Response is null."); + } + } +} diff --git a/tests/Integration/FeedBookmarkFollowIntegrationTest.php b/tests/Integration/FeedBookmarkFollowIntegrationTest.php new file mode 100644 index 00000000..c673a12a --- /dev/null +++ b/tests/Integration/FeedBookmarkFollowIntegrationTest.php @@ -0,0 +1,333 @@ +build(); + $feedsClient = ClientBuilder::fromEnv()->buildFeedsClient(); + + self::$sharedClient = $client; + self::$sharedFeedsClient = $feedsClient; + self::$sharedUserId = 'test-user-' . uniqid(); + self::$sharedUserId2 = 'test-user-2-' . uniqid(); + + $client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + self::$sharedUserId => ['id' => self::$sharedUserId, 'name' => 'Test User 1', 'role' => 'user'], + self::$sharedUserId2 => ['id' => self::$sharedUserId2, 'name' => 'Test User 2', 'role' => 'user'], + ] + )); + + $feedsClient->feed('user', self::$sharedUserId)->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: self::$sharedUserId) + ); + $feedsClient->feed('user', self::$sharedUserId2)->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: self::$sharedUserId2) + ); + } + + protected function setUp(): void + { + $this->client = self::$sharedClient; + $this->feedsV3Client = self::$sharedFeedsClient; + $this->testUserId = self::$sharedUserId; + $this->testUserId2 = self::$sharedUserId2; + $this->testFeed = $this->feedsV3Client->feed('user', $this->testUserId); + $this->testFeed2 = $this->feedsV3Client->feed('user', $this->testUserId2); + } + + protected function tearDown(): void + { + foreach ($this->createdActivityIds as $activityId) { + try { + $this->feedsV3Client->deleteActivity($activityId, true, false); + } catch (\Exception $e) { + // best-effort + } + } + $this->createdActivityIds = []; + } + + // ================================================================= + // BOOKMARK OPERATIONS + // ================================================================= + + /** + * @test + */ + public function testAddBookmark(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity for bookmark test', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for bookmark test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + try { + // snippet-start: AddBookmark + $response = $this->feedsV3Client->addBookmark( + $activityId, + new GeneratedModels\AddBookmarkRequest( + userID: $this->testUserId, + newFolder: new GeneratedModels\AddFolderRequest(name: 'test-bookmarks1') + ) + ); + // snippet-end: AddBookmark + + $this->assertResponseSuccess($response, 'add bookmark'); + } catch (StreamApiException $e) { + self::markTestSkipped('Add bookmark not supported: ' . $e->getMessage()); + } + } + + /** + * @test + */ + public function testQueryBookmarks(): void + { + // snippet-start: QueryBookmarks + $response = $this->feedsV3Client->queryBookmarks( + new GeneratedModels\QueryBookmarksRequest( + limit: 10, + filter: (object) ['user_id' => $this->testUserId] + ) + ); + // snippet-end: QueryBookmarks + + self::assertInstanceOf(StreamResponse::class, $response); + $this->assertResponseSuccess($response, 'query bookmarks'); + } + + /** + * @test + */ + public function testUpdateBookmark(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + feeds: [$this->testFeed->getFeedIdentifier()], + text: 'Activity for update bookmark test', + userID: $this->testUserId + )); + $this->assertResponseSuccess($createResponse, 'create activity for update bookmark test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + $bookmarkResponse = $this->feedsV3Client->addBookmark( + $activityId, + new GeneratedModels\AddBookmarkRequest( + newFolder: new GeneratedModels\AddFolderRequest(name: 'test-bookmarks1'), + userID: $this->testUserId + ) + ); + $this->assertResponseSuccess($bookmarkResponse, 'add bookmark for update test'); + + // snippet-start: UpdateBookmark + $bookmarkData = $bookmarkResponse->getData(); + $folderID = $bookmarkData->bookmark->folder->id; + $response = $this->feedsV3Client->updateBookmark( + $activityId, + new GeneratedModels\UpdateBookmarkRequest(folderID: $folderID, userID: $this->testUserId) + ); + // snippet-end: UpdateBookmark + + $this->assertResponseSuccess($response, 'update bookmark'); + } + + // ================================================================= + // FOLLOW OPERATIONS + // ================================================================= + + /** + * @test + */ + public function testFollowUser(): void + { + // Ensure clean state (shared users may already have a follow from a prior run) + try { + $this->feedsV3Client->unfollow( + self::USER_FEED_TYPE . $this->testUserId, + self::USER_FEED_TYPE . $this->testUserId2, + false + ); + } catch (StreamApiException $e) { + // Ignore - may not exist yet + } + + try { + // snippet-start: Follow + $response = $this->feedsV3Client->follow( + new GeneratedModels\FollowRequest( + source: self::USER_FEED_TYPE . $this->testUserId, + target: self::USER_FEED_TYPE . $this->testUserId2 + ) + ); + // snippet-end: Follow + + $this->assertResponseSuccess($response, 'follow user'); + } catch (StreamApiException $e) { + self::markTestSkipped('Follow operation not supported: ' . $e->getMessage()); + } + } + + /** + * @test + */ + public function testQueryFollows(): void + { + // snippet-start: QueryFollows + $response = $this->feedsV3Client->queryFollows( + new GeneratedModels\QueryFollowsRequest(limit: 10) + ); + // snippet-end: QueryFollows + + self::assertInstanceOf(StreamResponse::class, $response); + $this->assertResponseSuccess($response, 'query follows'); + } + + /** + * @throws StreamApiException + * + * @test + */ + public function testGetOrCreateFeedWithActivitiesAndFollow(): void + { + // snippet-start: GetOrCreateFeed + $feedResponse1 = $this->testFeed->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: $this->testUserId) + ); + // snippet-end: GetOrCreateFeed + + $this->assertResponseSuccess($feedResponse1, 'get or create feed'); + $feedData1 = $feedResponse1->getData(); + self::assertInstanceOf(GeneratedModels\GetOrCreateFeedResponse::class, $feedData1); + self::assertNotNull($feedData1->feed); + + $activityResponse1 = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + feeds: [$this->testFeed->getFeedIdentifier()], + text: 'Activity from getOrCreateFeed test', + userID: $this->testUserId + )); + $this->assertResponseSuccess($activityResponse1, 'add activity to feed 1'); + $this->createdActivityIds[] = $activityResponse1->getData()->activity->id; + + $feedResponse2 = $this->testFeed2->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: $this->testUserId2) + ); + $this->assertResponseSuccess($feedResponse2, 'get or create feed 2'); + + $activityResponse2 = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + feeds: [$this->testFeed2->getFeedIdentifier()], + text: 'Activity from user 2 in getOrCreateFeed test', + userID: $this->testUserId2 + )); + $this->assertResponseSuccess($activityResponse2, 'add activity to feed 2'); + $activityId2 = $activityResponse2->getData()->activity->id; + $this->createdActivityIds[] = $activityId2; + + try { + $followResponse = $this->feedsV3Client->follow(new GeneratedModels\FollowRequest( + source: self::USER_FEED_TYPE . $this->testUserId, + target: self::USER_FEED_TYPE . $this->testUserId2 + )); + $this->assertResponseSuccess($followResponse, 'follow user 2'); + } catch (StreamApiException $e) { + if (!str_contains($e->getMessage(), 'already exists')) { + throw $e; + } + } + + $verifyFeedResponse = $this->testFeed2->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: $this->testUserId2) + ); + $this->assertResponseSuccess($verifyFeedResponse, 'verify feed 2 exists'); + $verifyFeedData = $verifyFeedResponse->getData(); + self::assertSame($feedResponse2->getData()->feed->id, $verifyFeedData->feed->id); + } + + // ================================================================= + // BATCH OPERATIONS + // ================================================================= + + /** + * @test + */ + public function testUpsertActivities(): void + { + // snippet-start: UpsertActivities + $activities = [ + ['type' => 'post', 'text' => 'Batch activity 1', 'user_id' => $this->testUserId, 'feeds' => [$this->testFeed->getFeedIdentifier()]], + ['type' => 'post', 'text' => 'Batch activity 2', 'user_id' => $this->testUserId, 'feeds' => [$this->testFeed->getFeedIdentifier()]], + ]; + $response = $this->feedsV3Client->upsertActivities( + new GeneratedModels\UpsertActivitiesRequest(activities: $activities) + ); + // snippet-end: UpsertActivities + + self::assertInstanceOf(StreamResponse::class, $response); + $this->assertResponseSuccess($response, 'upsert activities'); + + $data = $response->getData(); + if (isset($data->activities)) { + foreach ($data->activities as $activity) { + if ($activity->id !== null) { + $this->createdActivityIds[] = $activity->id; + } + } + } + } + + private function assertResponseSuccess(mixed $response, string $operation): void + { + if ($response instanceof StreamResponse) { + self::assertTrue( + $response->isSuccessful(), + "Failed to {$operation}. Status: " . $response->getStatusCode() . ', Body: ' . $response->getRawBody() + ); + } else { + self::assertNotNull($response, "Failed to {$operation}. Response is null."); + } + } +} diff --git a/tests/Integration/FeedIntegrationTest.php b/tests/Integration/FeedIntegrationTest.php deleted file mode 100644 index 789d0711..00000000 --- a/tests/Integration/FeedIntegrationTest.php +++ /dev/null @@ -1,2228 +0,0 @@ -client = ClientBuilder::fromEnv()->build(); - $this->feedsV3Client = ClientBuilder::fromEnv()->buildFeedsClient(); - - $this->testUserId = 'test-user-' . uniqid(); - $this->testUserId2 = 'test-user-2-' . uniqid(); - $this->testFeed = $this->feedsV3Client->feed('user', $this->testUserId); - $this->testFeed2 = $this->feedsV3Client->feed('user', $this->testUserId2); - - // Setup environment for each test - $this->setupEnvironment(); - } - - protected function tearDown(): void - { - // Cleanup created resources in reverse order - $this->cleanupResources(); - } - - // ================================================================= - // 1. ENVIRONMENT SETUP TEST (demonstrates the setup process) - // ================================================================= - - /** - * @test - */ - public function test01SetupEnvironmentDemo(): void - { - echo "\n🔧 Demonstrating environment setup...\n"; - echo "✅ Users and feeds are automatically created in setUp()\n"; - echo " Test User 1: {$this->testUserId}\n"; - echo " Test User 2: {$this->testUserId2}\n"; - - self::assertTrue(true); // Just a demo test - } - - // ================================================================= - // 2. ACTIVITY OPERATIONS - // ================================================================= - - /** - * @throws StreamException - * - * @test - */ - public function test02CreateActivity(): void - { - echo "\n📝 Testing activity creation...\n"; - - // snippet-start: AddActivity - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - feeds: [$this->testFeed->getFeedIdentifier()], - text: 'This is a test activity from PHP SDK', - userID: $this->testUserId, - custom: (object) [ - 'test_field' => 'test_value', - 'timestamp' => time(), - ] - ); - $response = $this->feedsV3Client->addActivity($activity); - // snippet-end: AddActivity - - $this->assertResponseSuccess($response, 'add activity'); - - // Access the typed response data directly - $activityResponse = $response->getData(); - self::assertInstanceOf(GeneratedModels\AddActivityResponse::class, $activityResponse); - self::assertNotNull($activityResponse->activity); - self::assertNotNull($activityResponse->activity->id); - self::assertNotNull($activityResponse->activity->text); - - // compare text - self::assertSame($activity->text, $activityResponse->activity->text); - - $this->testActivityId = $activityResponse->activity->id; - $this->createdActivityIds[] = $this->testActivityId; - - echo "✅ Created activity with ID: {$this->testActivityId}\n"; - } - - /** - * @throws StreamException - * - * @test - */ - public function test02bCreateActivityWithAttachments(): void - { - echo "\n🖼️ Testing activity creation with image attachments...\n"; - - // snippet-start: AddActivityWithImageAttachment - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - feeds: [$this->testFeed->getFeedIdentifier()], - text: 'Look at this amazing view of NYC!', - userID: $this->testUserId, - attachments: [ - new GeneratedModels\Attachment( - imageUrl: 'https://example.com/nyc-skyline.jpg', - type: 'image', - title: 'NYC Skyline' - ), - ], - custom: (object) [ - 'location' => 'New York City', - 'camera' => 'iPhone 15 Pro', - ] - ); - $response = $this->feedsV3Client->addActivity($activity); - // snippet-end: AddActivityWithImageAttachment - - $this->assertResponseSuccess($response, 'add activity with image attachment'); - - $data = $response->getData(); - $activityId = $data->activity->id; - $this->createdActivityIds[] = $activityId; - - echo "✅ Created activity with image attachment: {$activityId}\n"; - } - - /** - * @throws StreamException - * - * @test - */ - public function test02cCreateVideoActivity(): void - { - echo "\n🎥 Testing video activity creation...\n"; - - // snippet-start: AddVideoActivity - $activity = new GeneratedModels\AddActivityRequest( - type: 'video', - feeds: [$this->testFeed->getFeedIdentifier()], - text: 'Check out this amazing video!', - userID: $this->testUserId, - attachments: [ - new GeneratedModels\Attachment( - assetUrl: 'https://example.com/amazing-video.mp4', - type: 'video', - title: 'Amazing Video', - custom: (object) ['duration' => 120] - ), - ], - custom: (object) [ - 'video_quality' => '4K', - 'duration_seconds' => 120, - ] - ); - $response = $this->feedsV3Client->addActivity($activity); - // snippet-end: AddVideoActivity - - $this->assertResponseSuccess($response, 'add video activity'); - - $data = $response->getData(); - $activityId = $data->activity->id; - $this->createdActivityIds[] = $activityId; - - echo "✅ Created video activity: {$activityId}\n"; - } - - /** - * @throws StreamException - * - * @test - */ - public function test02dCreateStoryActivityWithExpiration(): void - { - echo "\n📖 Testing story activity with expiration...\n"; - - // snippet-start: AddStoryActivityWithExpiration - $tomorrow = new \DateTime('+1 day'); - $activity = new GeneratedModels\AddActivityRequest( - type: 'story', - feeds: [$this->testFeed->getFeedIdentifier()], - text: 'My daily story - expires tomorrow!', - userID: $this->testUserId, - expiresAt: $tomorrow->format('c'), // ISO 8601 format - attachments: [ - new GeneratedModels\Attachment( - imageUrl: 'https://example.com/story-image.jpg', - type: 'image' - ), - new GeneratedModels\Attachment( - assetUrl: 'https://example.com/story-video.mp4', - type: 'video', - custom: (object) ['duration' => 15] - ), - ], - custom: (object) [ - 'story_type' => 'daily', - 'auto_expire' => true, - ] - ); - $response = $this->feedsV3Client->addActivity($activity); - // snippet-end: AddStoryActivityWithExpiration - - $this->assertResponseSuccess($response, 'add story activity with expiration'); - - $data = $response->getData(); - $activityId = $data->activity->id; - $this->createdActivityIds[] = $activityId; - - echo "✅ Created story activity with expiration: {$activityId}\n"; - } - - /** - * @throws StreamException - * - * @test - */ - public function test02eCreateActivityMultipleFeeds(): void - { - echo "\n📡 Testing activity creation to multiple feeds...\n"; - - // snippet-start: AddActivityToMultipleFeeds - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - feeds: [ - $this->testFeed->getFeedIdentifier(), - $this->testFeed2->getFeedIdentifier(), - ], - text: 'This post appears in multiple feeds!', - userID: $this->testUserId, - custom: (object) [ - 'cross_posted' => true, - 'target_feeds' => 2, - ] - ); - $response = $this->feedsV3Client->addActivity($activity); - // snippet-end: AddActivityToMultipleFeeds - - $this->assertResponseSuccess($response, 'add activity to multiple feeds'); - - $data = $response->getData(); - $activityId = $data->activity->id; - $this->createdActivityIds[] = $activityId; - - echo "✅ Created activity in multiple feeds: {$activityId}\n"; - } - - /** - * @throws StreamException - * - * @test - */ - public function test02fUploadImageAndFile(): void - { - echo "\n📤 Testing file and image uploads...\n"; - - // Use the test image file in the same directory - $testImagePath = __DIR__ . '/testupload.png'; - - if (!file_exists($testImagePath)) { - self::markTestSkipped("Test image file not found: {$testImagePath}"); - - return; - } - - // Test 1: Upload Image from file path - echo "\n🖼️ Testing image upload from file...\n"; - - // snippet-start: UploadImage - $imageUploadRequest = new GeneratedModels\ImageUploadRequest( - file: $testImagePath, - user: new GeneratedModels\OnlyUserID(id: $this->testUserId), - uploadSizes: [ - [ - 'width' => 100, - 'height' => 100, - 'resize' => 'scale', - 'crop' => 'center', - ], - ] - ); - $imageResponse = $this->client->uploadImage($imageUploadRequest); - // snippet-end: UploadImage - - $this->assertResponseSuccess($imageResponse, 'upload image'); - - $imageData = $imageResponse->getData(); - self::assertNotNull($imageData); - self::assertNotNull($imageData->file); - self::assertNotEmpty($imageData->file); - - $imageUrl = $imageData->file; - echo "✅ Image uploaded successfully: {$imageUrl}\n"; - - // Test 2: Upload Image with base64 (alternative method) - echo "\n🖼️ Testing image upload with base64...\n"; - - // Read image and encode as base64 - $imageContent = file_get_contents($testImagePath); - if ($imageContent === false) { - self::markTestSkipped("Could not read test image file: {$testImagePath}"); - - return; - } - - $base64Image = base64_encode($imageContent); - - $imageUploadRequest2 = new GeneratedModels\ImageUploadRequest( - file: $base64Image, - user: new GeneratedModels\OnlyUserID(id: $this->testUserId), - uploadSizes: [ - [ - 'width' => 200, - 'height' => 200, - 'resize' => 'fill', - 'crop' => 'center', - ], - ] - ); - $imageResponse2 = $this->client->uploadImage($imageUploadRequest2); - - $this->assertResponseSuccess($imageResponse2, 'upload image with base64'); - $imageData2 = $imageResponse2->getData(); - self::assertNotNull($imageData2->file); - echo "✅ Image uploaded with base64: {$imageData2->file}\n"; - - // Test 3: Upload File - echo "\n📄 Testing file upload...\n"; - - // Create a temporary text file - $tempFile = tmpfile(); - if ($tempFile === false) { - self::markTestSkipped('Could not create temporary file'); - - return; - } - - $tempFilePath = stream_get_meta_data($tempFile)['uri']; - $testContent = "This is a test file content from PHP SDK integration test\nCreated at: " . date('Y-m-d H:i:s'); - file_put_contents($tempFilePath, $testContent); - - // snippet-start: UploadFile - $fileUploadRequest = new GeneratedModels\FileUploadRequest( - file: $tempFilePath, - user: new GeneratedModels\OnlyUserID(id: $this->testUserId) - ); - $fileResponse = $this->client->uploadFile($fileUploadRequest); - // snippet-end: UploadFile - - $this->assertResponseSuccess($fileResponse, 'upload file'); - - $fileData = $fileResponse->getData(); - self::assertNotNull($fileData); - self::assertNotNull($fileData->file); - self::assertNotEmpty($fileData->file); - - $fileUrl = $fileData->file; - echo "✅ File uploaded successfully: {$fileUrl}\n"; - - // Cleanup temp file - fclose($tempFile); - - echo "✅ All file upload tests completed\n"; - } - - /** - * @test - */ - public function test03QueryActivities(): void - { - echo "\n🔍 Testing activity querying...\n"; - - // snippet-start: QueryActivities - $response = $this->feedsV3Client->queryActivities( - new GeneratedModels\QueryActivitiesRequest( - limit: 10, - filter: (object) ['activity_type' => 'post'] - ) - ); - // snippet-end: QueryActivities - - $this->assertResponseSuccess($response, 'query activities'); - - $data = $response->getData(); - self::assertInstanceOf(QueryActivitiesResponse::class, $data); - self::assertNotNull($data->activities); - echo "✅ Queried activities successfully\n"; - } - - /** - * @throws StreamException - * - * @test - */ - public function test04GetSingleActivity(): void - { - echo "\n📄 Testing single activity retrieval...\n"; - - // First create an activity to retrieve - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity for retrieval test', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for retrieval test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // snippet-start: GetActivity - $response = $this->feedsV3Client->getActivity($activityId); - // snippet-end: GetActivity - - $this->assertResponseSuccess($response, 'get activity'); - - $data = $response->getData(); - self::assertInstanceOf(GetActivityResponse::class, $data); - self::assertNotNull($data->activity); - self::assertSame($activityId, $data->activity->id); - echo "✅ Retrieved single activity\n"; - } - - /** - * @test - */ - public function test05UpdateActivity(): void - { - echo "\n✏️ Testing activity update...\n"; - - // First create an activity to update - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity for update test', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for update test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // snippet-start: UpdateActivity - $response = $this->feedsV3Client->updateActivity( - $activityId, - new GeneratedModels\UpdateActivityRequest( - text: 'Updated activity text from PHP SDK', - userID: $this->testUserId, // Required for server-side auth - custom: (object) [ - 'updated' => true, - 'update_time' => time(), - ] - ) - ); - // snippet-end: UpdateActivity - - $this->assertResponseSuccess($response, 'update activity'); - echo "✅ Updated activity\n"; - } - - // ================================================================= - // 3. REACTION OPERATIONS - // ================================================================= - - /** - * @test - */ - public function test06AddReaction(): void - { - echo "\n👍 Testing reaction addition...\n"; - - // First create an activity to react to - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity for reaction test', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for reaction test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // snippet-start: AddReaction - $response = $this->feedsV3Client->addActivityReaction( - $activityId, - new GeneratedModels\AddReactionRequest( - type: 'like', - userID: $this->testUserId - ) - ); - // snippet-end: AddReaction - - $this->assertResponseSuccess($response, 'add reaction'); - echo "✅ Added like reaction\n"; - } - - /** - * @test - */ - public function test07QueryReactions(): void - { - echo "\n🔍 Testing reaction querying...\n"; - - // Create an activity and add a reaction to it - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity for query reactions test', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for query reactions test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // Add a reaction first - $reactionResponse = $this->feedsV3Client->addActivityReaction( - $activityId, - new GeneratedModels\AddReactionRequest( - type: 'like', - userID: $this->testUserId - ) - ); - $this->assertResponseSuccess($reactionResponse, 'add reaction for query test'); - - // snippet-start: QueryActivityReactions - $response = $this->feedsV3Client->queryActivityReactions( - $activityId, - new GeneratedModels\QueryActivityReactionsRequest( - limit: 10, - filter: (object) ['reaction_type' => 'like'] - ) - ); - // snippet-end: QueryActivityReactions - - $this->assertResponseSuccess($response, 'query reactions'); - echo "✅ Queried reactions\n"; - } - - // ================================================================= - // 4. COMMENT OPERATIONS - // ================================================================= - - /** - * @throws StreamException - * - * @test - */ - public function test08AddComment(): void - { - echo "\n💬 Testing comment addition...\n"; - - // First create an activity to comment on - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - feeds: [$this->testFeed->getFeedIdentifier()], - text: 'Activity for comment test', - userID: $this->testUserId - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for comment test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // snippet-start: AddComment - $response = $this->feedsV3Client->addComment( - new GeneratedModels\AddCommentRequest( - comment: 'This is a test comment from PHP SDK', - objectID: $activityId, - objectType: 'activity', - userID: $this->testUserId - ) - ); - // snippet-end: AddComment - - $this->assertResponseSuccess($response, 'add comment'); - - $data = $response->getData(); - self::assertInstanceOf(AddCommentResponse::class, $data); - if ($data->comment && $data->comment->id) { - $this->testCommentId = $data->comment->id; - $this->createdCommentIds[] = $this->testCommentId; - echo "✅ Added comment with ID: {$this->testCommentId}\n"; - } else { - echo "✅ Added comment (no ID returned)\n"; - } - } - - /** - * @test - */ - public function test09QueryComments(): void - { - echo "\n🔍 Testing comment querying...\n"; - - // Create an activity and add a comment to it - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity for query comments test', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for query comments test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // Add a comment first - $commentResponse = $this->feedsV3Client->addComment( - new GeneratedModels\AddCommentRequest( - comment: 'Comment for query test', - objectID: $activityId, - objectType: 'activity', - userID: $this->testUserId - ) - ); - $this->assertResponseSuccess($commentResponse, 'add comment for query test'); - - // snippet-start: QueryComments - $response = $this->feedsV3Client->queryComments( - new GeneratedModels\QueryCommentsRequest( - filter: (object) ['object_id' => $activityId], - limit: 10 - ) - ); - // snippet-end: QueryComments - - $this->assertResponseSuccess($response, 'query comments'); - echo "✅ Queried comments\n"; - } - - /** - * @test - */ - public function test10UpdateComment(): void - { - echo "\n✏️ Testing comment update...\n"; - - // Create an activity and add a comment to update - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity for update comment test', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for update comment test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // Add a comment to update - $commentResponse = $this->feedsV3Client->addComment( - new GeneratedModels\AddCommentRequest( - comment: 'Comment to be updated', - objectID: $activityId, - objectType: 'activity', - userID: $this->testUserId - ) - ); - $this->assertResponseSuccess($commentResponse, 'add comment for update test'); - - $commentResponseData = $commentResponse->getData(); - $commentId = $commentResponseData->comment->id ?? null; - - // Add comment to cleanup list - $this->createdCommentIds[] = $commentId; - - // snippet-start: UpdateComment - try { - $response = $this->feedsV3Client->updateComment( - $commentId, - new GeneratedModels\UpdateCommentRequest( - comment: 'Updated comment text from PHP SDK' - ) - ); - // snippet-end: UpdateComment - - $this->assertResponseSuccess($response, 'update comment'); - echo "✅ Updated comment\n"; - } catch (StreamApiException $e) { - // Comment update may fail due to API limitations or timing issues - // Skip the test rather than failing, as this might be an API-side issue - $statusCode = $e->getStatusCode(); - self::markTestSkipped("Comment update failed with status {$statusCode}: {$e->getMessage()}"); - - return; - } catch (\Exception $e) { - // Catch any other exceptions and skip - self::markTestSkipped("Comment update failed: {$e->getMessage()}"); - - return; - } - } - - // ================================================================= - // 5. BOOKMARK OPERATIONS - // ================================================================= - - /** - * @test - */ - public function test11AddBookmark(): void - { - echo "\n🔖 Testing bookmark addition...\n"; - - // Create an activity to bookmark - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity for bookmark test', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for bookmark test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - try { - // snippet-start: AddBookmark - $response = $this->feedsV3Client->addBookmark( - $activityId, - new GeneratedModels\AddBookmarkRequest( - userID: $this->testUserId, - newFolder: new GeneratedModels\AddFolderRequest(name: 'test-bookmarks1') - ) - ); - // snippet-end: AddBookmark - - echo 'Bookmark response status: ' . $response->getStatusCode() . "\n"; - echo 'Bookmark response body: ' . $response->getRawBody() . "\n"; - $this->assertResponseSuccess($response, 'add bookmark'); - } catch (StreamApiException $e) { - echo 'Add bookmark failed: ' . $e->getMessage() . "\n"; - echo 'Status: ' . $e->getStatusCode() . "\n"; - echo 'Response: ' . $e->getResponseBody() . "\n"; - self::markTestSkipped('Add bookmark not supported: ' . $e->getMessage()); - } - echo "✅ Added bookmark\n"; - } - - /** - * @test - */ - public function test12QueryBookmarks(): void - { - echo "\n🔍 Testing bookmark querying...\n"; - - // snippet-start: QueryBookmarks - $response = $this->feedsV3Client->queryBookmarks( - new GeneratedModels\QueryBookmarksRequest( - limit: 10, - filter: (object) ['user_id' => $this->testUserId] - ) - ); - // snippet-end: QueryBookmarks - - self::assertInstanceOf(StreamResponse::class, $response); - $this->assertResponseSuccess($response, 'operation'); - echo "✅ Queried bookmarks\n"; - } - - /** - * @test - */ - public function test13UpdateBookmark(): void - { - echo "\n✏️ Testing bookmark update...\n"; - - // Create an activity and bookmark it first - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - feeds: [$this->testFeed->getFeedIdentifier()], - text: 'Activity for update bookmark test', - userID: $this->testUserId - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for update bookmark test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // Add a bookmark first - $bookmarkResponse = $this->feedsV3Client->addBookmark( - $activityId, - new GeneratedModels\AddBookmarkRequest( - newFolder: new GeneratedModels\AddFolderRequest(name: 'test-bookmarks1'), - userID: $this->testUserId - ) - ); - $this->assertResponseSuccess($bookmarkResponse, 'add bookmark for update test'); - - // snippet-start: UpdateBookmark - $bookmarkData = $bookmarkResponse->getData(); - $folderID = $bookmarkData->bookmark->folder->id; - $response = $this->feedsV3Client->updateBookmark( - $activityId, - new GeneratedModels\UpdateBookmarkRequest( - folderID: $folderID, - userID: $this->testUserId - ) - ); - // snippet-end: UpdateBookmark - - $this->assertResponseSuccess($response, 'update bookmark'); - echo "✅ Updated bookmark\n"; - } - - // ================================================================= - // 6. FOLLOW OPERATIONS - // ================================================================= - - /** - * @test - */ - public function test14FollowUser(): void - { - echo "\n👥 Testing follow operation...\n"; - - try { - // snippet-start: Follow - $response = $this->feedsV3Client->follow( - new GeneratedModels\FollowRequest( - source: self::USER_FEED_TYPE . $this->testUserId, - target: self::USER_FEED_TYPE . $this->testUserId2 - ) - ); - // snippet-end: Follow - - $this->assertResponseSuccess($response, 'follow user'); - } catch (StreamApiException $e) { - echo 'Follow failed: ' . $e->getMessage() . "\n"; - echo 'Status: ' . $e->getStatusCode() . "\n"; - echo 'Response: ' . $e->getResponseBody() . "\n"; - self::markTestSkipped('Follow operation not supported: ' . $e->getMessage()); - } - echo "✅ Followed user: {$this->testUserId2}\n"; - } - - /** - * @test - */ - public function test15QueryFollows(): void - { - echo "\n🔍 Testing follow querying...\n"; - - // snippet-start: QueryFollows - $response = $this->feedsV3Client->queryFollows( - new GeneratedModels\QueryFollowsRequest(limit: 10) - ); - // snippet-end: QueryFollows - - self::assertInstanceOf(StreamResponse::class, $response); - $this->assertResponseSuccess($response, 'operation'); - echo "✅ Queried follows\n"; - } - - /** - * @test - * - * @throws StreamApiException - */ - public function test15bGetOrCreateFeedWithActivitiesAndFollow(): void - { - echo "\n🔗 Testing getOrCreateFeed with activities and follow...\n"; - - // Step 1: Get or create a feed for user 1 - echo "\n1️⃣ Getting or creating feed for user 1...\n"; - // snippet-start: GetOrCreateFeed - $feedResponse1 = $this->testFeed->getOrCreateFeed( - new GeneratedModels\GetOrCreateFeedRequest(userID: $this->testUserId) - ); - // snippet-end: GetOrCreateFeed - - $this->assertResponseSuccess($feedResponse1, 'get or create feed'); - $feedData1 = $feedResponse1->getData(); - self::assertInstanceOf(GeneratedModels\GetOrCreateFeedResponse::class, $feedData1); - self::assertNotNull($feedData1->feed); - echo "✅ Feed 1 exists: {$feedData1->feed->id}\n"; - - // Step 2: Add activities to feed 1 - echo "\n2️⃣ Adding activities to feed 1...\n"; - $activity1 = new GeneratedModels\AddActivityRequest( - type: 'post', - feeds: [$this->testFeed->getFeedIdentifier()], - text: 'Activity from getOrCreateFeed test', - userID: $this->testUserId - ); - $activityResponse1 = $this->feedsV3Client->addActivity($activity1); - $this->assertResponseSuccess($activityResponse1, 'add activity to feed 1'); - $activityId1 = $activityResponse1->getData()->activity->id; - $this->createdActivityIds[] = $activityId1; - echo "✅ Added activity {$activityId1} to feed 1\n"; - - // Step 3: Get or create feed for user 2 - echo "\n3️⃣ Getting or creating feed for user 2...\n"; - $feedResponse2 = $this->testFeed2->getOrCreateFeed( - new GeneratedModels\GetOrCreateFeedRequest(userID: $this->testUserId2) - ); - $this->assertResponseSuccess($feedResponse2, 'get or create feed 2'); - $feedData2 = $feedResponse2->getData(); - self::assertNotNull($feedData2->feed); - echo "✅ Feed 2 exists: {$feedData2->feed->id}\n"; - - // Step 4: Add activities to feed 2 - echo "\n4️⃣ Adding activities to feed 2...\n"; - $activity2 = new GeneratedModels\AddActivityRequest( - type: 'post', - feeds: [$this->testFeed2->getFeedIdentifier()], - text: 'Activity from user 2 in getOrCreateFeed test', - userID: $this->testUserId2 - ); - $activityResponse2 = $this->feedsV3Client->addActivity($activity2); - $this->assertResponseSuccess($activityResponse2, 'add activity to feed 2'); - $activityId2 = $activityResponse2->getData()->activity->id; - $this->createdActivityIds[] = $activityId2; - echo "✅ Added activity {$activityId2} to feed 2\n"; - - // Step 5: Follow user 2 from user 1 - echo "\n5️⃣ Following user 2 from user 1...\n"; - - try { - $followResponse = $this->feedsV3Client->follow( - new GeneratedModels\FollowRequest( - source: self::USER_FEED_TYPE . $this->testUserId, - target: self::USER_FEED_TYPE . $this->testUserId2 - ) - ); - $this->assertResponseSuccess($followResponse, 'follow user 2'); - echo "✅ Followed user 2\n"; - } catch (StreamApiException $e) { - echo '⚠️ Follow failed: ' . $e->getMessage() . "\n"; - - throw $e; - } - - // Step 6: Verify feed 2 still exists and has activities - echo "\n6️⃣ Verifying feed 2 exists and has activities...\n"; - $verifyFeedResponse = $this->testFeed2->getOrCreateFeed( - new GeneratedModels\GetOrCreateFeedRequest(userID: $this->testUserId2) - ); - $this->assertResponseSuccess($verifyFeedResponse, 'verify feed 2 exists'); - $verifyFeedData = $verifyFeedResponse->getData(); - self::assertNotNull($verifyFeedData->feed); - self::assertSame($feedData2->feed->id, $verifyFeedData->feed->id, 'Feed ID should match'); - - // Check if activities exist in the feed - if ($verifyFeedData->activities !== null && count($verifyFeedData->activities) > 0) { - echo '✅ Feed 2 has ' . count($verifyFeedData->activities) . " activities\n"; - // Verify our activity is in the list - $foundActivity = false; - foreach ($verifyFeedData->activities as $activity) { - if ($activity->id === $activityId2) { - $foundActivity = true; - - break; - } - } - self::assertTrue($foundActivity, 'Added activity should be in feed activities'); - } else { - echo "ℹ️ Feed 2 exists but has no activities in response (this is normal)\n"; - } - - echo "✅ All checks passed: Feed exists, activities added, and follow relationship established\n"; - } - - // ================================================================= - // 7. BATCH OPERATIONS - // ================================================================= - - /** - * @test - */ - public function test16UpsertActivities(): void - { - echo "\n📝 Testing batch activity upsert...\n"; - - // snippet-start: UpsertActivities - - $activities = [ - [ - 'type' => 'post', - 'text' => 'Batch activity 1', - 'user_id' => $this->testUserId, - 'feeds' => [$this->testFeed->getFeedIdentifier()], - ], - [ - 'type' => 'post', - 'text' => 'Batch activity 2', - 'user_id' => $this->testUserId, - 'feeds' => [$this->testFeed->getFeedIdentifier()], - ], - ]; - - $response = $this->feedsV3Client->upsertActivities( - new GeneratedModels\UpsertActivitiesRequest(activities: $activities) - ); - // snippet-end: UpsertActivities - - self::assertInstanceOf(StreamResponse::class, $response); - $this->assertResponseSuccess($response, 'operation'); - - // Track created activities for cleanup - $data = $response->getData(); - if (isset($data->activities)) { - foreach ($data->activities as $activity) { - if ($activity->id !== null) { - $this->createdActivityIds[] = $activity->id; - } - } - } - - echo "✅ Upserted batch activities\n"; - } - - // ================================================================= - // 8. ADVANCED OPERATIONS - // ================================================================= - - /** - * @throws StreamException - * - * @test - */ - public function test17PinActivity(): void - { - echo "\n📌 Testing activity pinning...\n"; - - // Create an activity to pin - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - feeds: [$this->testFeed->getFeedIdentifier()], - text: 'Activity for pin test', - userID: $this->testUserId - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for pin test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // snippet-start: PinActivity - $response = $this->testFeed->pinActivity( - $activityId, - new GeneratedModels\PinActivityRequest(userID: $this->testUserId) - ); - // snippet-end: PinActivity - - $this->assertResponseSuccess($response, 'pin activity'); - echo "✅ Pinned activity\n"; - } - - /** - * @test - */ - public function test18UnpinActivity(): void - { - echo "\n📌 Testing activity unpinning...\n"; - - // Create an activity, pin it, then unpin it - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - feeds: [$this->testFeed->getFeedIdentifier()], - text: 'Activity for unpin test', - userID: $this->testUserId - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for unpin test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // Pin it first - $pinResponse = $this->testFeed->pinActivity( - $activityId, - new GeneratedModels\PinActivityRequest(userID: $this->testUserId) - ); - $this->assertResponseSuccess($pinResponse, 'pin activity for unpin test'); - - // snippet-start: UnpinActivity - $response = $this->testFeed->unpinActivity($activityId, $this->testUserId); - // snippet-end: UnpinActivity - - $this->assertResponseSuccess($response, 'unpin activity'); - echo "✅ Unpinned activity\n"; - } - - // ================================================================= - // 9. CLEANUP OPERATIONS (in reverse order) - // ================================================================= - - /** - * @test - */ - public function test19DeleteBookmark(): void - { - echo "\n🗑️ Testing bookmark deletion...\n"; - - // Create an activity and bookmark it first - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity for delete bookmark test', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for delete bookmark test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // Add a bookmark first - $bookmarkResponse = $this->feedsV3Client->addBookmark( - $activityId, - new GeneratedModels\AddBookmarkRequest( - newFolder: new GeneratedModels\AddFolderRequest(name: 'test-bookmarks1'), - userID: $this->testUserId - ) - ); - $this->assertResponseSuccess($bookmarkResponse, 'add bookmark for delete test'); - - // snippet-start: DeleteBookmark - $bookmarkData = $bookmarkResponse->getData(); - $folderId = $bookmarkData->bookmark->folder->id; - $response = $this->feedsV3Client->deleteBookmark($activityId, $folderId, $this->testUserId); - // snippet-end: DeleteBookmark - - $this->assertResponseSuccess($response, 'delete bookmark'); - echo "✅ Deleted bookmark\n"; - } - - /** - * @test - */ - public function test20DeleteReaction(): void - { - echo "\n🗑️ Testing reaction deletion...\n"; - - // Create an activity and add a reaction first - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity for delete reaction test', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for delete reaction test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // Add a reaction first - $reactionResponse = $this->feedsV3Client->addActivityReaction( - $activityId, - new GeneratedModels\AddReactionRequest( - type: 'like', - userID: $this->testUserId - ) - ); - $this->assertResponseSuccess($reactionResponse, 'add reaction for delete test'); - - // snippet-start: DeleteActivityReaction - $response = $this->feedsV3Client->deleteActivityReaction($activityId, 'like', false, $this->testUserId); - // snippet-end: DeleteActivityReaction - - $this->assertResponseSuccess($response, 'delete reaction'); - echo "✅ Deleted reaction\n"; - } - - /** - * @test - */ - public function test21DeleteComment(): void - { - echo "\n🗑️ Testing comment deletion...\n"; - - // Create an activity and add a comment first - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity for delete comment test', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for delete comment test'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // Add a comment first - $commentResponse = $this->feedsV3Client->addComment( - new GeneratedModels\AddCommentRequest( - comment: 'Comment to be deleted', - objectID: $activityId, - objectType: 'activity', - userID: $this->testUserId - ) - ); - $this->assertResponseSuccess($commentResponse, 'add comment for delete test'); - - $commentResponseData = $commentResponse->getData(); - $commentId = $commentResponseData->comment->id ?? 'comment-id'; // Fallback if ID not returned - - // snippet-start: DeleteComment - $response = $this->feedsV3Client->deleteComment($commentId, false, false); // soft delete, no notification deletion - // snippet-end: DeleteComment - - $this->assertResponseSuccess($response, 'delete comment'); - echo "✅ Deleted comment\n"; - } - - /** - * @test - */ - public function test22UnfollowUser(): void - { - echo "\n👥 Testing unfollow operation...\n"; - - try { - // First establish a follow relationship - $followResponse = $this->feedsV3Client->follow( - new GeneratedModels\FollowRequest( - source: self::USER_FEED_TYPE . $this->testUserId, - target: self::USER_FEED_TYPE . $this->testUserId2 - ) - ); - $this->assertResponseSuccess($followResponse, 'establish follow relationship for unfollow test'); - - // snippet-start: Unfollow - $response = $this->feedsV3Client->unfollow( - self::USER_FEED_TYPE . $this->testUserId, - self::USER_FEED_TYPE . $this->testUserId2, - false // deleteNotificationActivity - ); - // snippet-end: Unfollow - - self::assertInstanceOf(StreamResponse::class, $response); - $this->assertResponseSuccess($response, 'unfollow operation'); - echo "✅ Unfollowed user: {$this->testUserId2}\n"; - } catch (StreamApiException $e) { - echo 'Unfollow operation skipped: ' . $e->getMessage() . "\n"; - self::markTestSkipped('Unfollow operation not supported: ' . $e->getMessage()); - } - } - - /** - * @test - */ - public function test23DeleteActivities(): void - { - echo "\n🗑️ Testing activity deletion...\n"; - - // Create some activities to delete - $activitiesToDelete = []; - for ($i = 1; $i <= 2; $i++) { - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: "Activity {$i} for delete test", - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, "create activity {$i} for delete test"); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $activitiesToDelete[] = $activityId; - $this->createdActivityIds[] = $activityId; - } - - foreach ($activitiesToDelete as $activityId) { - // snippet-start: DeleteActivity - $response = $this->feedsV3Client->deleteActivity($activityId, false, false); // soft delete, no notification deletion - // snippet-end: DeleteActivity - - $this->assertResponseSuccess($response, 'delete activity'); - } - - echo '✅ Deleted ' . count($activitiesToDelete) . " activities\n"; - $this->createdActivityIds = []; - } - - // ================================================================= - // 10. ADDITIONAL COMPREHENSIVE TESTS - // ================================================================= - - /** - * @throws StreamException - * - * @test - */ - public function test24CreatePoll(): void - { - echo "\n🗳️ Testing poll creation...\n"; - - // snippet-start: CreatePoll - $poll = new GeneratedModels\CreatePollRequest( - name: 'Poll', - description: self::POLL_QUESTION, - userID: $this->testUserId, - options: [ - new GeneratedModels\PollOptionInput('Red'), - new GeneratedModels\PollOptionInput('Blue'), - ] - ); - $pollResponse = $this->client->createPoll($poll); - $pollData = $pollResponse->getData(); - $pollId = $pollData->poll->id; - - $pollActivity = new GeneratedModels\AddActivityRequest( - type: 'poll', - feeds: [$this->testFeed->getFeedIdentifier()], - pollID: $pollId, - text: self::POLL_QUESTION, - userID: $this->testUserId, - custom: (object) [ - 'poll_name' => self::POLL_QUESTION, - 'poll_description' => 'Choose your favorite programming language from the options below', - 'poll_options' => ['PHP', 'Python', 'JavaScript', 'Go'], - 'allow_user_suggested_options' => false, - 'max_votes_allowed' => 1, - ] - ); - $response = $this->feedsV3Client->addActivity($pollActivity); - // snippet-end: CreatePoll - - $this->assertResponseSuccess($response, 'create poll'); - - $data = $response->getData(); - $activityId = $data->activity->id; - $this->createdActivityIds[] = $activityId; - - echo "✅ Created poll activity: {$activityId}\n"; - } - - /** - * @throws StreamException - * - * @test - */ - public function test25VotePoll(): void - { - echo "\n✅ Testing poll voting...\n"; - - // Create a poll first using the proper API - $poll = new GeneratedModels\CreatePollRequest( - name: 'Favorite Color Poll', - description: 'What is your favorite color?', - userID: $this->testUserId, - options: [ - new GeneratedModels\PollOptionInput('red'), - new GeneratedModels\PollOptionInput('blue'), - new GeneratedModels\PollOptionInput('green'), - ] - ); - $pollResponse = $this->client->createPoll($poll); - $pollData = $pollResponse->getData(); - // $pollId = $pollData['id'] ?? 'poll-' . uniqid(); - $pollId = $pollData->poll->id; - - // Create activity with the poll - $pollActivity = new GeneratedModels\AddActivityRequest( - type: 'poll', - feeds: [$this->testFeed->getFeedIdentifier()], - text: 'Vote for your favorite color', - userID: $this->testUserId, - pollID: $pollId, - custom: (object) [ - 'poll_name' => 'What is your favorite color?', - 'poll_description' => 'Choose your favorite color from the options below', - 'poll_options' => ['Red', 'Blue', 'Green'], - 'allow_user_suggested_options' => false, - ] - ); - - $createResponse = $this->feedsV3Client->addActivity($pollActivity); - $this->assertResponseSuccess($createResponse, 'create poll for voting'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - // Get poll options from the poll response - $pollOptions = $pollData->poll->options; - - if (!empty($pollOptions)) { - // Use the first option ID from the poll creation response - $optionId = $pollOptions[0]->id ?? null; - - // snippet-start: VotePoll - $voteResponse = $this->feedsV3Client->castPollVote( - $activityId, - $pollId, - new GeneratedModels\CastPollVoteRequest( - userID: $this->testUserId, - vote: new GeneratedModels\VoteData( - optionID: $optionId - ) - ) - ); - // snippet-end: VotePoll - - $this->assertResponseSuccess($voteResponse, 'vote on poll'); - echo "✅ Voted on poll: {$activityId}\n"; - } else { - echo "⚠️ Poll options not found in poll response\n"; - self::markTestSkipped('Poll options not available for voting test'); - } - } - - /** - * @throws StreamException - * - * @test - */ - public function test26ModerateActivity(): void - { - echo "\n🛡️ Testing activity moderation...\n"; - - // Create an activity to moderate - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'This content might need moderation', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, 'create activity for moderation'); - - $createData = $createResponse->getData(); - $activityId = $createData->activity->id; - $this->createdActivityIds[] = $activityId; - - try { - // snippet-start: ModerateActivity - $moderationResponse = $this->feedsV3Client->activityFeedback( - $activityId, - new GeneratedModels\ActivityFeedbackRequest( - hide: true, - userID: $this->testUserId2 // Different user reporting - ) - ); - // snippet-end: ModerateActivity - - $this->assertResponseSuccess($moderationResponse, 'moderate activity'); - echo "✅ Flagged activity for moderation: {$activityId}\n"; - } catch (StreamApiException $e) { - echo 'Activity moderation skipped: ' . $e->getMessage() . "\n"; - self::markTestSkipped('Activity moderation not supported: ' . $e->getMessage()); - } - } - - /** - * @throws StreamException - * - * @test - */ - public function test27DeviceManagement(): void - { - // skip this test - self::markTestSkipped('fix me'); - echo "\n📱 Testing device management...\n"; - - $deviceToken = 'test-device-token-' . uniqid(); - - // snippet-start: AddDevice - $addDeviceResponse = $this->client->createDevice( - new GeneratedModels\CreateDeviceRequest( - id: $deviceToken, - pushProvider: 'firebase', - userID: $this->testUserId - ) - ); - // snippet-end: AddDevice - - $this->assertResponseSuccess($addDeviceResponse, 'add device'); - echo "✅ Added device: {$deviceToken}\n"; - - // snippet-start: RemoveDevice - $removeDeviceResponse = $this->client->deleteDevice( - $deviceToken, - $this->testUserId - ); - // snippet-end: RemoveDevice - - $this->assertResponseSuccess($removeDeviceResponse, 'remove device'); - echo "✅ Removed device: {$deviceToken}\n"; - } - - /** - * @throws StreamException - * - * @test - */ - public function test28QueryActivitiesWithFilters(): void - { - echo "\n🔍 Testing activity queries with advanced filters...\n"; - - // Create activities with different types and metadata - $activityTypes = ['post', 'photo', 'video', 'story']; - - foreach ($activityTypes as $type) { - $activity = new GeneratedModels\AddActivityRequest( - type: $type, - text: "Test {$type} activity for filtering", - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()], - custom: (object) [ - 'category' => $type, - 'priority' => rand(1, 5), - 'tags' => [$type, 'test', 'filter'], - ] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, "create {$type} activity for filtering"); - - $createData = $createResponse->getData(); - $this->createdActivityIds[] = $createData->activity->id; - } - - try { - // Query with type filter - // snippet-start: QueryActivitiesWithTypeFilter - $response = $this->feedsV3Client->queryActivities( - new GeneratedModels\QueryActivitiesRequest( - limit: 10, - filter: (object) [ - 'activity_type' => 'post', - 'user_id' => $this->testUserId, - ], - sort: ['created_at' => -1] // newest first - ) - ); - // snippet-end: QueryActivitiesWithTypeFilter - - $this->assertResponseSuccess($response, 'query activities with type filter'); - } catch (StreamApiException $e) { - echo 'Query activities with type filter skipped: ' . $e->getMessage() . "\n"; - } - - try { - // Query with custom field filter - // snippet-start: QueryActivitiesWithCustomFilter - $customFilterResponse = $this->feedsV3Client->queryActivities( - new GeneratedModels\QueryActivitiesRequest( - limit: 10, - filter: (object) [ - 'custom.priority' => (object) ['$gte' => 3], // priority >= 3 - 'user_id' => $this->testUserId, - ] - ) - ); - // snippet-end: QueryActivitiesWithCustomFilter - - $this->assertResponseSuccess($customFilterResponse, 'query activities with custom filter'); - } catch (StreamApiException $e) { - echo 'Query activities with custom filter skipped: ' . $e->getMessage() . "\n"; - } - - echo "✅ Queried activities with advanced filters\n"; - } - - /** - * @throws StreamException - * - * @test - */ - public function test29GetFeedActivitiesWithPagination(): void - { - echo "\n📄 Testing feed activities with pagination...\n"; - - // Create multiple activities for pagination test - for ($i = 1; $i <= 7; $i++) { - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: "Pagination test activity {$i}", - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - - $createResponse = $this->feedsV3Client->addActivity($activity); - $this->assertResponseSuccess($createResponse, "create pagination activity {$i}"); - - $createData = $createResponse->getData(); - $this->createdActivityIds[] = $createData->activity->id; - } - - // Get first page - // snippet-start: GetFeedActivitiesWithPagination - $firstPageResponse = $this->feedsV3Client->queryActivities( - new GeneratedModels\QueryActivitiesRequest( - limit: 3, - filter: (object) ['user_id' => $this->testUserId] - ) - ); - // snippet-end: GetFeedActivitiesWithPagination - - $this->assertResponseSuccess($firstPageResponse, 'get first page of feed activities'); - - $firstPageData = $firstPageResponse->getData(); - self::assertInstanceOf(QueryActivitiesResponse::class, $firstPageData); - self::assertNotNull($firstPageData->activities); - self::assertLessThanOrEqual(3, count($firstPageData->activities)); - - // Get second page using next token if available - // snippet-start: GetFeedActivitiesSecondPage - $nextToken = $firstPageData->next ?? null; - if ($nextToken) { - $secondPageResponse = $this->feedsV3Client->queryActivities( - new GeneratedModels\QueryActivitiesRequest( - limit: 3, - next: $nextToken, - filter: (object) ['user_id' => $this->testUserId] - ) - ); - $this->assertResponseSuccess($secondPageResponse, 'get second page of feed activities'); - } else { - echo "⚠️ No next page available\n"; - } - // snippet-end: GetFeedActivitiesSecondPage - - echo "✅ Retrieved feed activities with pagination\n"; - } - - /** - * Test comprehensive error handling scenarios. - * - * @test - */ - public function test30ErrorHandlingScenarios(): void - { - echo "\n⚠️ Testing error handling scenarios...\n"; - - // Test 1: Invalid activity ID - try { - // snippet-start: HandleInvalidActivityId - $response = $this->feedsV3Client->getActivity('invalid-activity-id-12345'); - // snippet-end: HandleInvalidActivityId - - if (!$response->isSuccessful()) { - echo "✅ Correctly handled invalid activity ID error\n"; - } - } catch (StreamApiException $e) { - echo '✅ Caught expected error for invalid activity ID: ' . $e->getStatusCode() . "\n"; - } - - // Test 2: Empty activity text - try { - // snippet-start: HandleEmptyActivityText - $emptyActivity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: '', // Empty text - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - $response = $this->feedsV3Client->addActivity($emptyActivity); - // snippet-end: HandleEmptyActivityText - - if (!$response->isSuccessful()) { - echo "✅ Correctly handled empty activity text\n"; - } - } catch (StreamApiException $e) { - echo '✅ Caught expected error for empty activity text: ' . $e->getStatusCode() . "\n"; - } - - // Test 3: Invalid user ID - try { - // snippet-start: HandleInvalidUserId - $invalidUserActivity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Test with invalid user', - userID: '', // Empty user ID - feeds: [$this->testFeed->getFeedIdentifier()] - ); - $response = $this->feedsV3Client->addActivity($invalidUserActivity); - // snippet-end: HandleInvalidUserId - - if (!$response->isSuccessful()) { - echo "✅ Correctly handled invalid user ID\n"; - } - } catch (StreamApiException $e) { - echo '✅ Caught expected error for invalid user ID: ' . $e->getStatusCode() . "\n"; - } - - self::assertTrue(true); // Test passes if we reach here - } - - /** - * Test authentication and authorization scenarios. - * - * @test - */ - public function test31AuthenticationScenarios(): void - { - echo "\n🔐 Testing authentication scenarios...\n"; - - // Test with valid user authentication - // snippet-start: ValidUserAuthentication - $activity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Activity with proper authentication', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()] - ); - $response = $this->feedsV3Client->addActivity($activity); - // snippet-end: ValidUserAuthentication - - $this->assertResponseSuccess($response, 'activity with valid authentication'); - - $data = $response->getData(); - $activityId = $data->activity->id; - $this->createdActivityIds[] = $activityId; - - echo "✅ Successfully authenticated and created activity: {$activityId}\n"; - - // Test user permissions for updating activity - // snippet-start: UserPermissionUpdate - $updateResponse = $this->feedsV3Client->updateActivity( - $activityId, - new GeneratedModels\UpdateActivityRequest( - text: 'Updated with proper user permissions', - userID: $this->testUserId // Same user can update - ) - ); - // snippet-end: UserPermissionUpdate - - $this->assertResponseSuccess($updateResponse, 'update activity with proper permissions'); - echo "✅ Successfully updated activity with proper user permissions\n"; - } - - /** - * Comprehensive test demonstrating real-world usage patterns. - * - * @test - */ - public function test32RealWorldUsageDemo(): void - { - echo "\n🌍 Testing real-world usage patterns...\n"; - - // Scenario: User posts content, gets reactions and comments - // snippet-start: RealWorldScenario - - // 1. User creates a post with image - $postActivity = new GeneratedModels\AddActivityRequest( - type: 'post', - text: 'Just visited the most amazing coffee shop! ☕️', - userID: $this->testUserId, - feeds: [$this->testFeed->getFeedIdentifier()], - attachments: [ - new GeneratedModels\Attachment( - imageUrl: 'https://example.com/coffee-shop.jpg', - type: 'image', - title: 'Amazing Coffee Shop' - ), - ], - custom: (object) [ - 'location' => 'Downtown Coffee Co.', - 'rating' => 5, - 'tags' => ['coffee', 'food', 'downtown'], - ] - ); - $postResponse = $this->feedsV3Client->addActivity($postActivity); - $this->assertResponseSuccess($postResponse, 'create real-world post'); - - $postData = $postResponse->getData(); - $postId = $postData->activity->id; - $this->createdActivityIds[] = $postId; - - // 2. Other users react to the post - $reactionTypes = ['like', 'love', 'wow']; - foreach ($reactionTypes as $reactionType) { - $reactionResponse = $this->feedsV3Client->addActivityReaction( - $postId, - new GeneratedModels\AddReactionRequest( - type: $reactionType, - userID: $this->testUserId2 - ) - ); - $this->assertResponseSuccess($reactionResponse, "add {$reactionType} reaction"); - } - - // 3. Users comment on the post - $comments = [ - 'That place looks amazing! What did you order?', - 'I love their espresso! Great choice 😍', - 'Adding this to my must-visit list!', - ]; - - foreach ($comments as $commentText) { - $commentResponse = $this->feedsV3Client->addComment( - new GeneratedModels\AddCommentRequest( - comment: $commentText, - objectID: $postId, - objectType: 'activity', - userID: $this->testUserId2 - ) - ); - $this->assertResponseSuccess($commentResponse, 'add comment to post'); - } - - // 4. User bookmarks the post - try { - $bookmarkResponse = $this->feedsV3Client->addBookmark( - $postId, - new GeneratedModels\AddBookmarkRequest( - userID: $this->testUserId2, - newFolder: new GeneratedModels\AddFolderRequest(name: 'favorite-places') - ) - ); - $this->assertResponseSuccess($bookmarkResponse, 'bookmark the post'); - } catch (StreamApiException $e) { - echo 'Bookmark operation skipped: ' . $e->getMessage() . "\n"; - } - - // 5. Query the activity with all its interactions - $enrichedResponse = $this->feedsV3Client->getActivity($postId); - $this->assertResponseSuccess($enrichedResponse, 'get enriched activity'); - - // snippet-end: RealWorldScenario - - echo "✅ Completed real-world usage scenario demonstration\n"; - } - - /** - * Test 33: Feed Group CRUD Operations. - * - * @test - */ - public function test33FeedGroupCRUD(): void - { - self::markTestSkipped('CI issue FEEDS-799'); - - echo "\n📁 Testing Feed Group CRUD operations...\n"; - - $feedGroupId = 'test-feed-group-' . substr(uniqid(), -8); - - // Test 1: List Feed Groups - echo "\n📋 Testing list feed groups...\n"; - // snippet-start: ListFeedGroups - $listResponse = $this->feedsV3Client->listFeedGroups(false); - // snippet-end: ListFeedGroups - - $this->assertResponseSuccess($listResponse, 'list feed groups'); - echo '✅ Listed ' . count($listResponse->getData()->groups ?? []) . " existing feed groups\n"; - - // Test 2: Create Feed Group - echo "\n➕ Testing create feed group...\n"; - - // snippet-start: CreateFeedGroup - try { - $createResponse = $this->feedsV3Client->createFeedGroup( - new CreateFeedGroupRequest( - id: $feedGroupId, - defaultVisibility: 'public' - ) - ); - } catch (StreamApiException $e) { - echo "API Error Details:\n"; - echo 'Status Code: ' . $e->getStatusCode() . "\n"; - echo 'Message: ' . $e->getMessage() . "\n"; - echo 'Response Body: ' . $e->getResponseBody() . "\n"; - echo 'Error Details: ' . json_encode($e->getErrorDetails(), JSON_PRETTY_PRINT) . "\n"; - // throw $e; - } - // snippet-end: CreateFeedGroup - - $this->assertResponseSuccess($createResponse, 'create feed group'); - self::assertSame($feedGroupId, $createResponse->getData()->feedGroup->id); - echo "✅ Created feed group: {$feedGroupId}\n"; - - // Test 3: Get Feed Group - echo "\n🔍 Testing get feed group...\n"; - // snippet-start: GetFeedGroup - $getResponse = $this->feedsV3Client->getFeedGroup('foryou', false); - // snippet-end: GetFeedGroup - - $this->assertResponseSuccess($getResponse, 'get feed group'); - self::assertSame('foryou', $getResponse->getData()->feedGroup->id); - echo "✅ Retrieved feed group: {$feedGroupId}\n"; - - // Test 4: Update Feed Group - echo "\n✏️ Testing update feed group...\n"; - // snippet-start: UpdateFeedGroup - $updateResponse = $this->feedsV3Client->updateFeedGroup('foryou', new GeneratedModels\UpdateFeedGroupRequest( - aggregation: new GeneratedModels\AggregationConfig('default') - )); - // snippet-end: UpdateFeedGroup - - $this->assertResponseSuccess($updateResponse, 'update feed group'); - echo "✅ Updated feed group: {$feedGroupId}\n"; - - // Test 5: Get or Create Feed Group (should get existing) - echo "\n🔄 Testing get or create feed group (existing)...\n"; - // snippet-start: GetOrCreateFeedGroupExisting - $getOrCreateResponse = $this->feedsV3Client->getOrCreateFeedGroup('foryou', new GeneratedModels\GetOrCreateFeedGroupRequest( - defaultVisibility: 'public', - )); - // snippet-end: GetOrCreateFeedGroupExisting - - $this->assertResponseSuccess($getOrCreateResponse, 'get or create existing feed group'); - self::assertFalse($getOrCreateResponse->getData()->wasCreated, 'Should not create new feed group'); - echo "✅ Got existing feed group: {$feedGroupId}\n"; - - // Test 6: Delete Feed Group - echo "\n🗑️ Testing delete feed group...\n"; - // snippet-start: DeleteFeedGroup - // $this->feedsV3Client->deleteFeedGroup('groupID-123', false); - // snippet-end: DeleteFeedGroup - - echo "✅ Completed Feed Group CRUD operations\n"; - - // Additional Feed Group Creation Examples - $group = 'test-feed-group-' . substr(uniqid(), -8); - - echo "\n📊 Testing create feed group with aggregation...\n"; - // snippet-start: CreateFeedGroupWithAggregation - $aggResponse = $this->feedsV3Client->createFeedGroup( - new CreateFeedGroupRequest( - id: $group, - defaultVisibility: 'public', - activityProcessors: [ - ['type' => 'dummy'], - ], - aggregation: new GeneratedModels\AggregationConfig('{{ type }}-{{ time.strftime("%Y-%m-%d") }}') - ) - ); - // snippet-end: CreateFeedGroupWithAggregation - $this->assertResponseSuccess($aggResponse, 'create feed group with aggregation'); - echo "✅ Created feed group with aggregation\n"; - - echo "\n🏆 Testing create feed group with ranking...\n"; - - $ranked_group = 'test-feed-group-' . substr(uniqid(), -8); - - // snippet-start: CreateFeedGroupWithRanking - $rankResponse = $this->feedsV3Client->createFeedGroup( - new CreateFeedGroupRequest( - id: $ranked_group, - defaultVisibility: 'public', - ranking: new GeneratedModels\RankingConfig( - type: 'recency', - score: 'decay_linear(time) * popularity' - ) - ) - ); - // snippet-end: CreateFeedGroupWithRanking - $this->assertResponseSuccess($rankResponse, 'create feed group with ranking'); - echo "✅ Created feed group with ranking\n"; - } - - /** - * Test 34: Feed View CRUD Operations. - * - * @test - */ - public function test34FeedViewCRUD(): void - { - self::markTestSkipped('Backend issue FEEDS-799'); - - echo "\n👁️ Testing Feed View CRUD operations...\n"; - - $feedViewId = 'test-feed-view-' . substr(uniqid(), -8); - - // Test 1: List Feed Views - echo "\n📋 Testing list feed views...\n"; - // snippet-start: ListFeedViews - $listResponse = $this->feedsV3Client->listFeedViews(); - // snippet-end: ListFeedViews - - $this->assertResponseSuccess($listResponse, 'list feed views'); - echo '✅ Listed ' . count($listResponse->getData()->views ?? []) . " existing feed views\n"; - - // Test 2: Create Feed View - echo "\n➕ Testing create feed view...\n"; - // snippet-start: CreateFeedView - $createResponse = $this->feedsV3Client->createFeedView(new GeneratedModels\CreateFeedViewRequest( - id: $feedViewId, - )); - // snippet-end: CreateFeedView - - $this->assertResponseSuccess($createResponse, 'create feed view'); - self::assertSame($feedViewId, $createResponse->getData()->feedView->id); - echo "✅ Created feed view: {$feedViewId}\n"; - - // Test 3: Get Feed View - echo "\n🔍 Testing get feed view...\n"; - // snippet-start: GetFeedView - $getResponse = $this->feedsV3Client->getFeedView('feedViewID'); - // snippet-end: GetFeedView - - $this->assertResponseSuccess($getResponse, 'get feed view'); - self::assertSame('feedViewID', $getResponse->getData()->feedView->id); - echo "✅ Retrieved feed view: {$feedViewId}\n"; - - // Test 4: Update Feed View - echo "\n✏️ Testing update feed view...\n"; - // snippet-start: UpdateFeedView - $updateResponse = $this->feedsV3Client->updateFeedView( - 'feedViewID', - new GeneratedModels\UpdateFeedViewRequest( - aggregation: new GeneratedModels\AggregationConfig('default') - ) - ); - // snippet-end: UpdateFeedView - - $this->assertResponseSuccess($updateResponse, 'update feed view'); - echo "✅ Updated feed view: {$feedViewId}\n"; - - // Test 5: Get or Create Feed View (should get existing) - echo "\n🔄 Testing get or create feed view (existing)...\n"; - // snippet-start: GetOrCreateFeedViewExisting - $getOrCreateResponse = $this->feedsV3Client->getOrCreateFeedView( - $feedViewId, - new GeneratedModels\GetOrCreateFeedViewRequest( - aggregation: new GeneratedModels\AggregationConfig('default') - ) - ); - // snippet-end: GetOrCreateFeedViewExisting - - $this->assertResponseSuccess($getOrCreateResponse, 'get or create existing feed view'); - echo "✅ Got existing feed view: {$feedViewId}\n"; - - // Test 6: Delete Feed View - echo "\n🗑️ Testing delete feed view...\n"; - // snippet-start: DeleteFeedView - // $this->feedsV3Client->deleteFeedView('viewID-123'); - // snippet-end: DeleteFeedView - - echo "✅ Completed Feed View CRUD operations\n"; - } - - // ================================================================= - // ENVIRONMENT SETUP (called in setUp for each test) - // ================================================================= - - private function setupEnvironment(): void - { - try { - // Create test users - // snippet-start: CreateUsers - $response = $this->client->updateUsers(new GeneratedModels\UpdateUsersRequest( - users: [ - $this->testUserId => [ - 'id' => $this->testUserId, - 'name' => 'Test User 1', - 'role' => 'user', - ], - $this->testUserId2 => [ - 'id' => $this->testUserId2, - 'name' => 'Test User 2', - 'role' => 'user', - ], - ] - )); - // snippet-end: CreateUsers - - if (!$response->isSuccessful()) { - throw new StreamException('Failed to create users: ' . $response->getRawBody()); - } - - // Create feeds - // snippet-start: GetOrCreateFeed - - $feedResponse1 = $this->testFeed->getOrCreateFeed( - new GeneratedModels\GetOrCreateFeedRequest(userID: $this->testUserId) - ); - $feedResponse2 = $this->testFeed2->getOrCreateFeed( - new GeneratedModels\GetOrCreateFeedRequest(userID: $this->testUserId2) - ); - // snippet-end: GetOrCreateFeed - - if (!$feedResponse1->isSuccessful()) { - throw new StreamException('Failed to create feed 1: ' . $feedResponse1->getRawBody()); - } - if (!$feedResponse2->isSuccessful()) { - throw new StreamException('Failed to create feed 2: ' . $feedResponse2->getRawBody()); - } - } catch (StreamApiException $e) { - echo '⚠️ Setup failed: ' . $e->getMessage() . "\n"; - echo 'ResponseBody: ' . $e->getResponseBody() . "\n"; - echo 'ErrorDetail: ' . $e->getErrorDetails() . "\n"; - - throw $e; - } catch (\Exception $e) { - echo '⚠️ Setup failed: ' . $e->getMessage() . "\n"; - // Continue with tests even if setup partially fails - } - } - - // ================================================================= - // HELPER METHODS - // ================================================================= - - private function cleanupResources(): void - { - echo "\n🧹 Cleaning up test resources...\n"; - - // Delete any remaining activities - if (!empty($this->createdActivityIds)) { - foreach ($this->createdActivityIds as $activityId) { - try { - $this->feedsV3Client->deleteActivity($activityId, true, false); // hard delete, no notification deletion - } catch (StreamApiException $e) { - // Ignore cleanup errors - echo "Warning: Failed to cleanup activity {$activityId}: " . $e->getMessage() . "\n"; - } - } - } - - // Delete any remaining comments - if (!empty($this->createdCommentIds)) { - foreach ($this->createdCommentIds as $commentId) { - try { - $this->feedsV3Client->deleteComment($commentId, true, false); // hard delete, no notification deletion - } catch (StreamApiException $e) { - // Ignore cleanup errors - echo "Warning: Failed to cleanup comment {$commentId}: " . $e->getMessage() . "\n"; - } - } - } - - echo "✅ Cleanup completed\n"; - } - - private function assertResponseSuccess($response, string $operation): void - { - // Handle both StreamResponse and generated model responses - if ($response instanceof StreamResponse) { - self::assertInstanceOf(StreamResponse::class, $response); - if (!$response->isSuccessful()) { - self::fail("Failed to {$operation}. Status: " . $response->getStatusCode() . ', Body: ' . $response->getRawBody()); - } - } else { - // For generated model responses, just assert they exist - self::assertNotNull($response, "Failed to {$operation}. Response is null."); - } - } -} diff --git a/tests/Integration/FeedReactionCommentIntegrationTest.php b/tests/Integration/FeedReactionCommentIntegrationTest.php new file mode 100644 index 00000000..8372c12e --- /dev/null +++ b/tests/Integration/FeedReactionCommentIntegrationTest.php @@ -0,0 +1,284 @@ +build(); + $feedsClient = ClientBuilder::fromEnv()->buildFeedsClient(); + + self::$sharedClient = $client; + self::$sharedFeedsClient = $feedsClient; + self::$sharedUserId = 'test-user-' . uniqid(); + self::$sharedUserId2 = 'test-user-2-' . uniqid(); + + $client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + self::$sharedUserId => ['id' => self::$sharedUserId, 'name' => 'Test User 1', 'role' => 'user'], + self::$sharedUserId2 => ['id' => self::$sharedUserId2, 'name' => 'Test User 2', 'role' => 'user'], + ] + )); + + $feedsClient->feed('user', self::$sharedUserId)->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: self::$sharedUserId) + ); + $feedsClient->feed('user', self::$sharedUserId2)->getOrCreateFeed( + new GeneratedModels\GetOrCreateFeedRequest(userID: self::$sharedUserId2) + ); + } + + protected function setUp(): void + { + $this->client = self::$sharedClient; + $this->feedsV3Client = self::$sharedFeedsClient; + $this->testUserId = self::$sharedUserId; + $this->testUserId2 = self::$sharedUserId2; + $this->testFeed = $this->feedsV3Client->feed('user', $this->testUserId); + $this->testFeed2 = $this->feedsV3Client->feed('user', $this->testUserId2); + } + + protected function tearDown(): void + { + foreach ($this->createdCommentIds as $commentId) { + try { + $this->feedsV3Client->deleteComment($commentId, true, false); + } catch (\Exception $e) { + // best-effort + } + } + foreach ($this->createdActivityIds as $activityId) { + try { + $this->feedsV3Client->deleteActivity($activityId, true, false); + } catch (\Exception $e) { + // best-effort + } + } + $this->createdActivityIds = []; + $this->createdCommentIds = []; + } + + // ================================================================= + // REACTION OPERATIONS + // ================================================================= + + /** + * @test + */ + public function testAddReaction(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity for reaction test', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for reaction test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + // snippet-start: AddReaction + $response = $this->feedsV3Client->addActivityReaction( + $activityId, + new GeneratedModels\AddReactionRequest(type: 'like', userID: $this->testUserId) + ); + // snippet-end: AddReaction + + $this->assertResponseSuccess($response, 'add reaction'); + } + + /** + * @test + */ + public function testQueryReactions(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity for query reactions test', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for query reactions test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + $this->feedsV3Client->addActivityReaction( + $activityId, + new GeneratedModels\AddReactionRequest(type: 'like', userID: $this->testUserId) + ); + + // snippet-start: QueryActivityReactions + $response = $this->feedsV3Client->queryActivityReactions( + $activityId, + new GeneratedModels\QueryActivityReactionsRequest( + limit: 10, + filter: (object) ['reaction_type' => 'like'] + ) + ); + // snippet-end: QueryActivityReactions + + $this->assertResponseSuccess($response, 'query reactions'); + } + + // ================================================================= + // COMMENT OPERATIONS + // ================================================================= + + /** + * @throws StreamException + * + * @test + */ + public function testAddComment(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + feeds: [$this->testFeed->getFeedIdentifier()], + text: 'Activity for comment test', + userID: $this->testUserId + )); + $this->assertResponseSuccess($createResponse, 'create activity for comment test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + // snippet-start: AddComment + $response = $this->feedsV3Client->addComment( + new GeneratedModels\AddCommentRequest( + comment: 'This is a test comment from PHP SDK', + objectID: $activityId, + objectType: 'activity', + userID: $this->testUserId + ) + ); + // snippet-end: AddComment + + $this->assertResponseSuccess($response, 'add comment'); + $data = $response->getData(); + self::assertInstanceOf(AddCommentResponse::class, $data); + if ($data->comment && $data->comment->id) { + $this->createdCommentIds[] = $data->comment->id; + } + } + + /** + * @test + */ + public function testQueryComments(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity for query comments test', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for query comments test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + $commentResponse = $this->feedsV3Client->addComment(new GeneratedModels\AddCommentRequest( + comment: 'Comment for query test', + objectID: $activityId, + objectType: 'activity', + userID: $this->testUserId + )); + $this->assertResponseSuccess($commentResponse, 'add comment for query test'); + + // snippet-start: QueryComments + $response = $this->feedsV3Client->queryComments( + new GeneratedModels\QueryCommentsRequest( + filter: (object) ['object_id' => $activityId], + limit: 10 + ) + ); + // snippet-end: QueryComments + + $this->assertResponseSuccess($response, 'query comments'); + } + + /** + * @test + */ + public function testUpdateComment(): void + { + $createResponse = $this->feedsV3Client->addActivity(new GeneratedModels\AddActivityRequest( + type: 'post', + text: 'Activity for update comment test', + userID: $this->testUserId, + feeds: [$this->testFeed->getFeedIdentifier()] + )); + $this->assertResponseSuccess($createResponse, 'create activity for update comment test'); + $activityId = $createResponse->getData()->activity->id; + $this->createdActivityIds[] = $activityId; + + $commentResponse = $this->feedsV3Client->addComment(new GeneratedModels\AddCommentRequest( + comment: 'Comment to be updated', + objectID: $activityId, + objectType: 'activity', + userID: $this->testUserId + )); + $this->assertResponseSuccess($commentResponse, 'add comment for update test'); + $commentId = $commentResponse->getData()->comment->id ?? null; + $this->createdCommentIds[] = $commentId; + + // snippet-start: UpdateComment + try { + $response = $this->feedsV3Client->updateComment( + $commentId, + new GeneratedModels\UpdateCommentRequest(comment: 'Updated comment text from PHP SDK') + ); + // snippet-end: UpdateComment + + $this->assertResponseSuccess($response, 'update comment'); + } catch (StreamApiException $e) { + self::markTestSkipped("Comment update failed with status {$e->getStatusCode()}: {$e->getMessage()}"); + } catch (\Exception $e) { + self::markTestSkipped("Comment update failed: {$e->getMessage()}"); + } + } + + private function assertResponseSuccess(mixed $response, string $operation): void + { + if ($response instanceof StreamResponse) { + self::assertTrue( + $response->isSuccessful(), + "Failed to {$operation}. Status: " . $response->getStatusCode() . ', Body: ' . $response->getRawBody() + ); + } else { + self::assertNotNull($response, "Failed to {$operation}. Response is null."); + } + } +} diff --git a/tests/Integration/LiveIntegrationTest.php b/tests/Integration/LiveIntegrationTest.php index 9d2ec9d9..3b9128b8 100644 --- a/tests/Integration/LiveIntegrationTest.php +++ b/tests/Integration/LiveIntegrationTest.php @@ -6,12 +6,14 @@ use GetStream\ClientBuilder; use GetStream\Exceptions\StreamApiException; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; /** * Live integration tests - these make real API calls * Run with: ./vendor/bin/phpunit tests/Integration/LiveIntegrationTest.php --testdox. */ +#[Group('integration')] class LiveIntegrationTest extends TestCase { private $client; diff --git a/tests/Integration/ModerationIntegrationTest.php b/tests/Integration/ModerationIntegrationTest.php index b6b1bb3a..81856bd3 100644 --- a/tests/Integration/ModerationIntegrationTest.php +++ b/tests/Integration/ModerationIntegrationTest.php @@ -11,6 +11,7 @@ use GetStream\GeneratedModels; use GetStream\ModerationClient; use GetStream\StreamResponse; +use PHPUnit\Framework\Attributes\Group; use PHPUnit\Framework\TestCase; /** @@ -28,6 +29,7 @@ * 8. Rules and Templates * 9. Cleanup */ +#[Group('integration')] class ModerationIntegrationTest extends TestCase { private ModerationClient $moderationClient; @@ -50,23 +52,69 @@ class ModerationIntegrationTest extends TestCase private array $mutedUserIds = []; private array $createdConfigs = []; + // ------------------------------------------------------------------ + // Class-level shared users (created once per test class) + // ------------------------------------------------------------------ + private static ?Client $sharedClient = null; + private static ?ModerationClient $sharedModerationClient = null; + private static string $sharedUserId = ''; + private static string $sharedUserId2 = ''; + private static string $sharedModeratorUserId = ''; + private static string $sharedReporterUserId = ''; + + public static function setUpBeforeClass(): void + { + $client = ClientBuilder::fromEnv()->build(); + $moderationClient = ClientBuilder::fromEnv()->buildModerationClient(); + + self::$sharedClient = $client; + self::$sharedModerationClient = $moderationClient; + self::$sharedUserId = 'test-user-' . uniqid(); + self::$sharedUserId2 = 'test-user-2-' . uniqid(); + self::$sharedModeratorUserId = 'moderator-' . uniqid(); + self::$sharedReporterUserId = 'reporter-' . uniqid(); + + // Create shared users once + $client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + self::$sharedUserId => [ + 'id' => self::$sharedUserId, + 'name' => 'Test User 1', + 'role' => 'user', + ], + self::$sharedUserId2 => [ + 'id' => self::$sharedUserId2, + 'name' => 'Test User 2', + 'role' => 'user', + ], + self::$sharedModeratorUserId => [ + 'id' => self::$sharedModeratorUserId, + 'name' => 'Moderator User', + 'role' => 'admin', + ], + self::$sharedReporterUserId => [ + 'id' => self::$sharedReporterUserId, + 'name' => 'Reporter User', + 'role' => 'user', + ], + ] + )); + } + /** * @throws StreamException */ protected function setUp(): void { - $this->client = ClientBuilder::fromEnv()->build(); - $this->moderationClient = ClientBuilder::fromEnv()->buildModerationClient(); + $this->client = self::$sharedClient; + $this->moderationClient = self::$sharedModerationClient; - $this->testUserId = 'test-user-' . uniqid(); - $this->testUserId2 = 'test-user-2-' . uniqid(); - $this->moderatorUserId = 'moderator-' . uniqid(); - $this->reporterUserId = 'reporter-' . uniqid(); + $this->testUserId = self::$sharedUserId; + $this->testUserId2 = self::$sharedUserId2; + $this->moderatorUserId = self::$sharedModeratorUserId; + $this->reporterUserId = self::$sharedReporterUserId; $this->testChannelId = 'test-channel-' . uniqid(); $this->testChannelCid = 'messaging:' . $this->testChannelId; - - // Setup environment for each test - $this->setupEnvironment(); } protected function tearDown(): void @@ -330,59 +378,9 @@ public function test15QueryTemplates(): void // ENVIRONMENT SETUP (called in setUp for each test) // ================================================================= - private function setupEnvironment(): void - { - try { - // Create test users - // snippet-start: CreateModerationUsers - $response = $this->client->updateUsers(new GeneratedModels\UpdateUsersRequest( - users: [ - $this->testUserId => [ - 'id' => $this->testUserId, - 'name' => 'Test User 1', - 'role' => 'user', - ], - $this->testUserId2 => [ - 'id' => $this->testUserId2, - 'name' => 'Test User 2', - 'role' => 'user', - ], - $this->moderatorUserId => [ - 'id' => $this->moderatorUserId, - 'name' => 'Moderator User', - 'role' => 'admin', - ], - $this->reporterUserId => [ - 'id' => $this->reporterUserId, - 'name' => 'Reporter User', - 'role' => 'user', - ], - ] - )); - // snippet-end: CreateModerationUsers - - if (!$response->isSuccessful()) { - throw new StreamException('Failed to create users: ' . $response->getRawBody()); - } - - $this->createdUserIds = [$this->testUserId, $this->testUserId2, $this->moderatorUserId, $this->reporterUserId]; - - echo "✅ Created test users for moderation tests\n"; - echo " Target User: {$this->testUserId}\n"; - echo " Target User 2: {$this->testUserId2}\n"; - echo " Moderator: {$this->moderatorUserId}\n"; - echo " Reporter: {$this->reporterUserId}\n"; - } catch (StreamApiException $e) { - echo '⚠️ Setup failed: ' . $e->getMessage() . "\n"; - echo 'ResponseBody: ' . $e->getResponseBody() . "\n"; - echo 'ErrorDetail: ' . $e->getErrorDetails() . "\n"; - - throw $e; - } catch (\Exception $e) { - echo '⚠️ Setup failed: ' . $e->getMessage() . "\n"; - // Continue with tests even if setup partially fails - } - } + // snippet-start: CreateModerationUsers + // Users are created once in setUpBeforeClass() for all tests in this class. + // snippet-end: CreateModerationUsers // ================================================================= // HELPER METHODS diff --git a/tests/Integration/VideoIntegrationTest.php b/tests/Integration/VideoIntegrationTest.php new file mode 100644 index 00000000..32ae3c0f --- /dev/null +++ b/tests/Integration/VideoIntegrationTest.php @@ -0,0 +1,690 @@ +cleanupVideoResources(); + parent::tearDown(); + } + + /** + * Helper: create a unique call type and track for cleanup. + */ + private function createTrackedCallType(string $name): GeneratedModels\CreateCallTypeResponse + { + // Clean up excess call types first (same pattern as Go SDK) + try { + $listResp = $this->listCallTypesVideo(); + if ($listResp->isSuccessful() && $listResp->getData()->callTypes !== null && count($listResp->getData()->callTypes) > 10) { + $builtIn = ['default', 'livestream', 'audio_room', 'development']; + foreach ($listResp->getData()->callTypes as $ctName => $ct) { + if (!in_array($ctName, $builtIn, true)) { + try { + $this->deleteCallTypeVideo($ctName); + } catch (\Exception $e) { + // Ignore + } + } + } + } + } catch (\Exception $e) { + // Ignore list errors + } + + $response = $this->createCallTypeVideo(new GeneratedModels\CreateCallTypeRequest( + name: $name, + grants: [ + 'admin' => ['send-audio', 'send-video', 'mute-users'], + 'user' => ['send-audio', 'send-video'], + ], + settings: new GeneratedModels\CallSettingsRequest( + audio: new GeneratedModels\AudioSettingsRequest( + defaultDevice: 'speaker', + micDefaultOn: true, + ), + screensharing: new GeneratedModels\ScreensharingSettingsRequest( + accessRequestEnabled: false, + enabled: true, + ), + ), + notificationSettings: new GeneratedModels\NotificationSettingsRequest( + enabled: true, + callNotification: new GeneratedModels\EventNotificationSettingsRequest( + enabled: true, + apns: new GeneratedModels\APNSPayload( + title: '{{ user.display_name }} invites you to a call', + body: '', + ), + ), + sessionStarted: new GeneratedModels\EventNotificationSettingsRequest( + enabled: false, + apns: new GeneratedModels\APNSPayload( + title: '{{ user.display_name }} invites you to a call', + body: '', + ), + ), + callLiveStarted: new GeneratedModels\EventNotificationSettingsRequest( + enabled: false, + apns: new GeneratedModels\APNSPayload( + title: '{{ user.display_name }} invites you to a call', + body: '', + ), + ), + callRing: new GeneratedModels\EventNotificationSettingsRequest( + enabled: false, + apns: new GeneratedModels\APNSPayload( + title: '{{ user.display_name }} invites you to a call', + body: '', + ), + ), + ), + )); + $this->assertResponseSuccess($response, 'create call type'); + $this->createdCallTypes[] = $name; + return $response->getData(); + } + + // ========================================================================= + // Tests + // ========================================================================= + + /** + * CRUDCallTypeOperations: Create call type with settings, update, read, delete. + */ + public function testCRUDCallTypeOperations(): void + { + $callTypeName = 'calltype-' . $this->randomString(10); + $data = $this->createTrackedCallType($callTypeName); + + // Verify creation + $this->assertEquals($callTypeName, $data->name); + $this->assertTrue($data->settings->audio->micDefaultOn); + $this->assertEquals('speaker', $data->settings->audio->defaultDevice); + $this->assertFalse($data->settings->screensharing->accessRequestEnabled); + $this->assertTrue($data->settings->screensharing->enabled); + $this->assertTrue($data->notificationSettings->enabled); + $this->assertTrue($data->notificationSettings->callNotification->enabled); + $this->assertFalse($data->notificationSettings->sessionStarted->enabled); + + // Update call type settings (retry until eventual consistency settles) + $updateResp = $this->retryUntilSuccess(fn () => $this->updateCallTypeVideo($callTypeName, new GeneratedModels\UpdateCallTypeRequest( + settings: new GeneratedModels\CallSettingsRequest( + audio: new GeneratedModels\AudioSettingsRequest( + defaultDevice: 'earpiece', + micDefaultOn: false, + ), + recording: new GeneratedModels\RecordSettingsRequest( + mode: 'disabled', + ), + backstage: new GeneratedModels\BackstageSettingsRequest( + enabled: true, + ), + ), + grants: [ + 'host' => ['join-backstage'], + ], + )), maxAttempts: 10, sleepMs: 1000); + $this->assertResponseSuccess($updateResp, 'update call type'); + $updated = $updateResp->getData(); + $this->assertFalse($updated->settings->audio->micDefaultOn); + $this->assertEquals('earpiece', $updated->settings->audio->defaultDevice); + $this->assertEquals('disabled', $updated->settings->recording->mode); + $this->assertTrue($updated->settings->backstage->enabled); + + // Read call type + $getResp = $this->getCallTypeVideo($callTypeName); + $this->assertResponseSuccess($getResp, 'get call type'); + $this->assertEquals($callTypeName, $getResp->getData()->name); + + // Delete call type (handled by cleanup, but verify it works) + $delResp = $this->deleteCallTypeVideo($callTypeName); + $this->assertResponseSuccess($delResp, 'delete call type'); + + // Remove from tracked list since we already deleted it + $this->createdCallTypes = array_filter($this->createdCallTypes, fn($n) => $n !== $callTypeName); + } + + /** + * CreateCallWithMembers: Create call, add members. + */ + public function testCreateCallWithMembers(): void + { + $userIDs = $this->createTestUsers(2); + $callID = 'test-call-' . $this->randomString(10); + + $response = $this->getOrCreateCall('default', $callID, new GeneratedModels\GetOrCreateCallRequest( + data: new GeneratedModels\CallRequest( + createdByID: $userIDs[0], + members: [ + new GeneratedModels\MemberRequest(userID: $userIDs[0]), + new GeneratedModels\MemberRequest(userID: $userIDs[1]), + ], + ), + )); + $this->assertResponseSuccess($response, 'create call with members'); + $this->createdCalls[] = ['type' => 'default', 'id' => $callID]; + + $data = $response->getData(); + $this->assertNotNull($data->call); + $this->assertNotNull($data->members); + $this->assertCount(2, $data->members); + } + + /** + * BlockUnblockUserFromCalls: Block user from call, verify; unblock. + */ + public function testBlockUnblockUserFromCalls(): void + { + $userIDs = $this->createTestUsers(2); + $callID = 'test-call-' . $this->randomString(10); + + // Create call + $this->createTrackedCall('default', $callID, $userIDs[0]); + + // Block user + $blockResp = $this->blockUserInCall('default', $callID, new GeneratedModels\BlockUserRequest( + userID: $userIDs[1], + )); + $this->assertResponseSuccess($blockResp, 'block user'); + + // Verify blocked (eventually consistent) + sleep(2); + $getResp = $this->getCall('default', $callID); + $this->assertResponseSuccess($getResp, 'get call after block'); + $blockedIds = $getResp->getData()->call->blockedUserIds ?? []; + $this->assertContains($userIDs[1], $blockedIds, 'User should be in blocked list. Got: ' . json_encode($blockedIds)); + + // Unblock user + $unblockResp = $this->unblockUserInCall('default', $callID, new GeneratedModels\UnblockUserRequest( + userID: $userIDs[1], + )); + $this->assertResponseSuccess($unblockResp, 'unblock user'); + + // Verify unblocked + $getResp2 = $this->getCall('default', $callID); + $this->assertResponseSuccess($getResp2, 'get call after unblock'); + $blocked = $getResp2->getData()->call->blockedUserIds ?? []; + $this->assertNotContains($userIDs[1], $blocked); + } + + /** + * SendCustomEvent: Send custom event in a call. + */ + public function testSendCustomEvent(): void + { + $userIDs = $this->createTestUsers(1); + $callID = 'test-call-' . $this->randomString(10); + + $this->createTrackedCall('default', $callID, $userIDs[0]); + + $resp = $this->sendCallEvent('default', $callID, new GeneratedModels\SendCallEventRequest( + userID: $userIDs[0], + custom: (object) ['bananas' => 'good'], + )); + $this->assertResponseSuccess($resp, 'send custom event'); + } + + /** + * MuteAll: Mute all users in a call. + */ + public function testMuteAll(): void + { + $userIDs = $this->createTestUsers(1); + $callID = 'test-call-' . $this->randomString(10); + + $this->createTrackedCall('default', $callID, $userIDs[0]); + + $resp = $this->muteUsersInCall('default', $callID, new GeneratedModels\MuteUsersRequest( + mutedByID: $userIDs[0], + muteAllUsers: true, + audio: true, + )); + $this->assertResponseSuccess($resp, 'mute all'); + } + + /** + * MuteSomeUsers: Mute specific users (audio, video, screenshare). + */ + public function testMuteSomeUsers(): void + { + $userIDs = $this->createTestUsers(3); + $callID = 'test-call-' . $this->randomString(10); + + $this->createTrackedCall('default', $callID, $userIDs[0]); + + $resp = $this->muteUsersInCall('default', $callID, new GeneratedModels\MuteUsersRequest( + mutedByID: $userIDs[0], + userIds: [$userIDs[1], $userIDs[2]], + audio: true, + video: true, + screenshare: true, + screenshareAudio: true, + )); + $this->assertResponseSuccess($resp, 'mute some users'); + } + + /** + * UpdateUserPermissions: Revoke/grant permissions in a call. + */ + public function testUpdateUserPermissions(): void + { + $userIDs = $this->createTestUsers(2); + $callID = 'test-call-' . $this->randomString(10); + + $this->createTrackedCall('default', $callID, $userIDs[0]); + + // Revoke + $revokeResp = $this->updateUserPermissionsInCall('default', $callID, new GeneratedModels\UpdateUserPermissionsRequest( + userID: $userIDs[1], + revokePermissions: ['send-audio'], + )); + $this->assertResponseSuccess($revokeResp, 'revoke permissions'); + + // Grant + $grantResp = $this->updateUserPermissionsInCall('default', $callID, new GeneratedModels\UpdateUserPermissionsRequest( + userID: $userIDs[1], + grantPermissions: ['send-audio'], + )); + $this->assertResponseSuccess($grantResp, 'grant permissions'); + } + + /** + * DeactivateUser: Deactivate/reactivate users, batch deactivate. + */ + public function testDeactivateUser(): void + { + $userIDs = $this->createTestUsers(2); + + // Deactivate single user + $deactResp = $this->client->deactivateUser($userIDs[0], new GeneratedModels\DeactivateUserRequest()); + $this->assertResponseSuccess($deactResp, 'deactivate user'); + + // Reactivate + $reactResp = $this->client->reactivateUser($userIDs[0], new GeneratedModels\ReactivateUserRequest()); + $this->assertResponseSuccess($reactResp, 'reactivate user'); + + // Batch deactivate (async) + $batchResp = $this->client->deactivateUsers(new GeneratedModels\DeactivateUsersRequest( + userIds: $userIDs, + )); + $this->assertResponseSuccess($batchResp, 'batch deactivate users'); + $taskID = $batchResp->getData()->taskID; + $this->assertNotEmpty($taskID); + + $taskResult = $this->waitForTask($taskID); + $this->assertEquals('completed', $taskResult->status); + } + + /** + * CreateCallWithSessionTimer: Create call with max_duration_seconds, update. + */ + public function testCreateCallWithSessionTimer(): void + { + $userIDs = $this->createTestUsers(1); + $callID = 'test-call-' . $this->randomString(10); + + // Create call with session timer + $response = $this->getOrCreateCall('default', $callID, new GeneratedModels\GetOrCreateCallRequest( + data: new GeneratedModels\CallRequest( + createdByID: $userIDs[0], + settingsOverride: new GeneratedModels\CallSettingsRequest( + limits: new GeneratedModels\LimitsSettingsRequest( + maxDurationSeconds: 3600, + ), + ), + ), + )); + $this->assertResponseSuccess($response, 'create call with session timer'); + $this->createdCalls[] = ['type' => 'default', 'id' => $callID]; + $this->assertEquals(3600, $response->getData()->call->settings->limits->maxDurationSeconds); + + // Update to 7200 + $updateResp = $this->updateCall('default', $callID, new GeneratedModels\UpdateCallRequest( + settingsOverride: new GeneratedModels\CallSettingsRequest( + limits: new GeneratedModels\LimitsSettingsRequest( + maxDurationSeconds: 7200, + ), + ), + )); + $this->assertResponseSuccess($updateResp, 'update session timer'); + $this->assertEquals(7200, $updateResp->getData()->call->settings->limits->maxDurationSeconds); + + // Reset to 0 + $resetResp = $this->updateCall('default', $callID, new GeneratedModels\UpdateCallRequest( + settingsOverride: new GeneratedModels\CallSettingsRequest( + limits: new GeneratedModels\LimitsSettingsRequest( + maxDurationSeconds: 0, + ), + ), + )); + $this->assertResponseSuccess($resetResp, 'reset session timer'); + $this->assertEquals(0, $resetResp->getData()->call->settings->limits->maxDurationSeconds); + } + + /** + * UserBlocking: Block/unblock user, verify blocked list. + */ + public function testUserBlocking(): void + { + $userIDs = $this->createTestUsers(2); + + // Block user + $blockResp = $this->client->blockUsers(new GeneratedModels\BlockUsersRequest( + blockedUserID: $userIDs[1], + userID: $userIDs[0], + )); + $this->assertResponseSuccess($blockResp, 'block user'); + + // Verify blocked + $getResp = $this->client->getBlockedUsers($userIDs[0]); + $this->assertResponseSuccess($getResp, 'get blocked users'); + $blocks = $getResp->getData()->blocks; + $this->assertCount(1, $blocks); + $this->assertEquals($userIDs[0], $blocks[0]->userID); + $this->assertEquals($userIDs[1], $blocks[0]->blockedUserID); + + // Unblock + $unblockResp = $this->client->unblockUsers(new GeneratedModels\UnblockUsersRequest( + blockedUserID: $userIDs[1], + userID: $userIDs[0], + )); + $this->assertResponseSuccess($unblockResp, 'unblock user'); + + // Verify empty + $getResp2 = $this->client->getBlockedUsers($userIDs[0]); + $this->assertResponseSuccess($getResp2, 'get blocked users after unblock'); + $this->assertEmpty($getResp2->getData()->blocks); + } + + /** + * CreateCallWithBackstageAndJoinAhead: Create call with backstage + join_ahead_time. + */ + public function testCreateCallWithBackstageAndJoinAhead(): void + { + $userIDs = $this->createTestUsers(1); + $callID = 'test-call-' . $this->randomString(10); + $startsAt = (new \DateTime())->modify('+30 minutes'); + + // Create with backstage + join ahead + $response = $this->getOrCreateCall('default', $callID, new GeneratedModels\GetOrCreateCallRequest( + data: new GeneratedModels\CallRequest( + createdByID: $userIDs[0], + startsAt: $startsAt, + settingsOverride: new GeneratedModels\CallSettingsRequest( + backstage: new GeneratedModels\BackstageSettingsRequest( + enabled: true, + joinAheadTimeSeconds: 300, + ), + ), + ), + )); + $this->assertResponseSuccess($response, 'create call with backstage'); + $this->createdCalls[] = ['type' => 'default', 'id' => $callID]; + $this->assertEquals(300, $response->getData()->call->joinAheadTimeSeconds); + + // Update join ahead to 600 + $updateResp = $this->updateCall('default', $callID, new GeneratedModels\UpdateCallRequest( + settingsOverride: new GeneratedModels\CallSettingsRequest( + backstage: new GeneratedModels\BackstageSettingsRequest( + joinAheadTimeSeconds: 600, + ), + ), + )); + $this->assertResponseSuccess($updateResp, 'update join ahead time'); + $this->assertEquals(600, $updateResp->getData()->call->joinAheadTimeSeconds); + + // Reset to 0 + $resetResp = $this->updateCall('default', $callID, new GeneratedModels\UpdateCallRequest( + settingsOverride: new GeneratedModels\CallSettingsRequest( + backstage: new GeneratedModels\BackstageSettingsRequest( + joinAheadTimeSeconds: 0, + ), + ), + )); + $this->assertResponseSuccess($resetResp, 'reset join ahead time'); + $this->assertEquals(0, $resetResp->getData()->call->joinAheadTimeSeconds); + } + + /** + * DeleteCall (soft): Soft delete call, verify not found. + */ + public function testDeleteCallSoft(): void + { + $userIDs = $this->createTestUsers(1); + $callID = 'test-call-' . $this->randomString(10); + + $this->createTrackedCall('default', $callID, $userIDs[0]); + + // Soft delete + $delResp = $this->deleteCall('default', $callID, new GeneratedModels\DeleteCallRequest()); + $this->assertResponseSuccess($delResp, 'soft delete call'); + $this->assertNotNull($delResp->getData()->call); + $this->assertNull($delResp->getData()->taskID); + + // Verify not found + try { + $this->getCall('default', $callID); + $this->fail('Expected error when getting soft-deleted call'); + } catch (\Exception $e) { + $this->assertStringContainsString("Can't find call with id", $e->getMessage()); + } + + // Remove from tracked list since already deleted + $this->createdCalls = array_filter($this->createdCalls, fn($c) => $c['id'] !== $callID); + } + + /** + * HardDeleteCall: Hard delete with task polling. + */ + public function testHardDeleteCall(): void + { + $userIDs = $this->createTestUsers(1); + $callID = 'test-call-' . $this->randomString(10); + + $this->createTrackedCall('default', $callID, $userIDs[0]); + + // Hard delete + $delResp = $this->deleteCall('default', $callID, new GeneratedModels\DeleteCallRequest( + hard: true, + )); + $this->assertResponseSuccess($delResp, 'hard delete call'); + $taskID = $delResp->getData()->taskID; + $this->assertNotNull($taskID); + + // Wait for task completion + $taskResult = $this->waitForTask($taskID); + $this->assertEquals('completed', $taskResult->status); + + // Verify not found + try { + $this->getCall('default', $callID); + $this->fail('Expected error when getting hard-deleted call'); + } catch (\Exception $e) { + $this->assertStringContainsString("Can't find call with id", $e->getMessage()); + } + + // Remove from tracked list since already deleted + $this->createdCalls = array_filter($this->createdCalls, fn($c) => $c['id'] !== $callID); + } + + /** + * Teams: Create user with teams, create call with team, query. + */ + public function testTeams(): void + { + $userID = 'test-user-' . uniqid(); + $callID = 'test-call-' . $this->randomString(10); + + // Create user with teams + $this->client->updateUsers(new GeneratedModels\UpdateUsersRequest( + users: [ + $userID => new GeneratedModels\UserRequest( + id: $userID, + teams: ['red', 'blue'], + ), + ], + )); + $this->createdUserIDs[] = $userID; + + // Create call with team + $response = $this->getOrCreateCall('default', $callID, new GeneratedModels\GetOrCreateCallRequest( + data: new GeneratedModels\CallRequest( + createdByID: $userID, + team: 'blue', + ), + )); + $this->assertResponseSuccess($response, 'create call with team'); + $this->createdCalls[] = ['type' => 'default', 'id' => $callID]; + $this->assertEquals('blue', $response->getData()->call->team); + + // Query users with team filter + $usersResp = $this->client->queryUsers(new GeneratedModels\QueryUsersPayload( + filterConditions: (object) [ + 'id' => $userID, + 'teams' => (object) ['$in' => ['red', 'blue']], + ], + )); + $this->assertResponseSuccess($usersResp, 'query users with teams'); + $this->assertGreaterThan(0, count($usersResp->getData()->users)); + $foundIDs = array_map(fn($u) => $u->id, $usersResp->getData()->users); + $this->assertContains($userID, $foundIDs); + + // Query calls with team filter + $callsResp = $this->queryCalls(new GeneratedModels\QueryCallsRequest( + filterConditions: (object) [ + 'id' => $callID, + 'team' => (object) ['$eq' => 'blue'], + ], + )); + $this->assertResponseSuccess($callsResp, 'query calls with team'); + $this->assertGreaterThan(0, count($callsResp->getData()->calls)); + } + + /** + * ExternalStorageOperations: Create/list/delete external storage. + */ + public function testExternalStorageOperations(): void + { + $uniqueName = 'test-storage-' . $this->randomString(10); + + // Create external storage + $createResp = $this->client->createExternalStorage(new GeneratedModels\CreateExternalStorageRequest( + bucket: 'test-bucket', + name: $uniqueName, + storageType: 's3', + path: 'test-directory/', + awsS3: new GeneratedModels\S3Request( + s3Region: 'us-east-1', + s3APIKey: 'test-access-key', + s3Secret: 'test-secret', + ), + )); + $this->assertResponseSuccess($createResp, 'create external storage'); + $this->createdExternalStorages[] = $uniqueName; + + // External storages are eventually consistent + sleep(2); + + // List external storages and verify our new one is in the list + $listResp = $this->client->listExternalStorage(); + $this->assertResponseSuccess($listResp, 'list external storage'); + $storages = $listResp->getData()->externalStorages; + $this->assertNotEmpty($storages); + + $found = false; + foreach ($storages as $storage) { + if ($storage->name === $uniqueName) { + $found = true; + break; + } + } + $this->assertTrue($found, 'Created external storage should be in the list'); + + // Delete with retry for eventual consistency + $this->retryUntilSuccess(function () use ($uniqueName) { + $delResp = $this->client->deleteExternalStorage($uniqueName); + $this->assertResponseSuccess($delResp, 'delete external storage'); + }, maxAttempts: 5, sleepMs: 2000); + + // Remove from tracked list + $this->createdExternalStorages = array_filter($this->createdExternalStorages, fn($n) => $n !== $uniqueName); + } + + /** + * EnableCallRecordingAndBackstageMode: Update call settings for recording and backstage. + */ + public function testEnableCallRecordingAndBackstageMode(): void + { + $userIDs = $this->createTestUsers(1); + $callID = 'test-call-' . $this->randomString(10); + + $this->createTrackedCall('default', $callID, $userIDs[0]); + + // Enable recording + $recResp = $this->updateCall('default', $callID, new GeneratedModels\UpdateCallRequest( + settingsOverride: new GeneratedModels\CallSettingsRequest( + recording: new GeneratedModels\RecordSettingsRequest( + mode: 'available', + audioOnly: true, + ), + ), + )); + $this->assertResponseSuccess($recResp, 'enable recording'); + $this->assertEquals('available', $recResp->getData()->call->settings->recording->mode); + + // Enable backstage + $bsResp = $this->updateCall('default', $callID, new GeneratedModels\UpdateCallRequest( + settingsOverride: new GeneratedModels\CallSettingsRequest( + backstage: new GeneratedModels\BackstageSettingsRequest( + enabled: true, + ), + ), + )); + $this->assertResponseSuccess($bsResp, 'enable backstage'); + $this->assertTrue($bsResp->getData()->call->settings->backstage->enabled); + } + + /** + * DeleteRecordingsAndTranscriptions: Attempt to delete non-existent recording/transcription (error case). + */ + public function testDeleteRecordingsAndTranscriptions(): void + { + $userIDs = $this->createTestUsers(1); + $callID = 'test-call-' . $this->randomString(10); + + $this->createTrackedCall('default', $callID, $userIDs[0]); + + // Delete non-existent recording should fail + try { + $this->deleteRecording('default', $callID, 'non-existent-session', 'non-existent-filename'); + $this->fail('Expected error when deleting non-existent recording'); + } catch (\Exception $e) { + // Expected - API returns error for non-existent recording + $this->assertNotEmpty($e->getMessage()); + } + + // Delete non-existent transcription should fail + try { + $this->deleteTranscription('default', $callID, 'non-existent-session', 'non-existent-filename'); + $this->fail('Expected error when deleting non-existent transcription'); + } catch (\Exception $e) { + // Expected - API returns error for non-existent transcription + $this->assertNotEmpty($e->getMessage()); + } + } +} diff --git a/tests/WebhookTest.php b/tests/WebhookTest.php new file mode 100644 index 00000000..8e08f223 --- /dev/null +++ b/tests/WebhookTest.php @@ -0,0 +1,271 @@ +computeSignature($this->body, $this->secret); + $this->assertTrue(Webhook::verifySignature($this->body, $signature, $this->secret)); + } + + public function testVerifySignatureWrongSignature(): void + { + $this->assertFalse(Webhook::verifySignature($this->body, 'invalidsignature', $this->secret)); + } + + public function testVerifySignatureTamperedBody(): void + { + $signature = $this->computeSignature($this->body, $this->secret); + $this->assertFalse(Webhook::verifySignature('{"type":"tampered"}', $signature, $this->secret)); + } + + public function testVerifySignatureWrongSecret(): void + { + $signature = $this->computeSignature($this->body, $this->secret); + $this->assertFalse(Webhook::verifySignature($this->body, $signature, 'wrong-secret')); + } + + public function testVerifySignatureEmptySignature(): void + { + $this->assertFalse(Webhook::verifySignature($this->body, '', $this->secret)); + } + + public function testGetEventTypeValid(): void + { + $this->assertEquals('message.new', Webhook::getEventType('{"type":"message.new"}')); + } + + public function testGetEventTypeFromArray(): void + { + $this->assertEquals('message.new', Webhook::getEventType(['type' => 'message.new'])); + } + + public function testGetEventTypeMissingField(): void + { + $this->assertNull(Webhook::getEventType('{"foo":"bar"}')); + } + + public function testGetEventTypeInvalidJson(): void + { + $this->expectException(\InvalidArgumentException::class); + Webhook::getEventType('not json'); + } + + public function testGetEventTypeEmptyObject(): void + { + $this->assertNull(Webhook::getEventType('{}')); + } + + /** + * @dataProvider webhookEventProvider + */ + public function testParseWebhookEvent(string $eventType, string $expectedClassName): void + { + $payload = '{"type":"' . $eventType . '"}'; + $event = Webhook::parseWebhookEvent($payload); + $this->assertNotNull($event); + $parts = explode('\\', get_class($event)); + $this->assertEquals($expectedClassName, end($parts)); + } + + public static function webhookEventProvider(): array + { + return [ + '*' => ['*', 'CustomEvent'], + 'appeal.accepted' => ['appeal.accepted', 'AppealAcceptedEvent'], + 'appeal.created' => ['appeal.created', 'AppealCreatedEvent'], + 'appeal.rejected' => ['appeal.rejected', 'AppealRejectedEvent'], + 'call.accepted' => ['call.accepted', 'CallAcceptedEvent'], + 'call.blocked_user' => ['call.blocked_user', 'BlockedUserEvent'], + 'call.closed_caption' => ['call.closed_caption', 'ClosedCaptionEvent'], + 'call.closed_captions_failed' => ['call.closed_captions_failed', 'CallClosedCaptionsFailedEvent'], + 'call.closed_captions_started' => ['call.closed_captions_started', 'CallClosedCaptionsStartedEvent'], + 'call.closed_captions_stopped' => ['call.closed_captions_stopped', 'CallClosedCaptionsStoppedEvent'], + 'call.created' => ['call.created', 'CallCreatedEvent'], + 'call.deleted' => ['call.deleted', 'CallDeletedEvent'], + 'call.dtmf' => ['call.dtmf', 'CallDTMFEvent'], + 'call.ended' => ['call.ended', 'CallEndedEvent'], + 'call.frame_recording_failed' => ['call.frame_recording_failed', 'CallFrameRecordingFailedEvent'], + 'call.frame_recording_ready' => ['call.frame_recording_ready', 'CallFrameRecordingFrameReadyEvent'], + 'call.frame_recording_started' => ['call.frame_recording_started', 'CallFrameRecordingStartedEvent'], + 'call.frame_recording_stopped' => ['call.frame_recording_stopped', 'CallFrameRecordingStoppedEvent'], + 'call.hls_broadcasting_failed' => ['call.hls_broadcasting_failed', 'CallHLSBroadcastingFailedEvent'], + 'call.hls_broadcasting_started' => ['call.hls_broadcasting_started', 'CallHLSBroadcastingStartedEvent'], + 'call.hls_broadcasting_stopped' => ['call.hls_broadcasting_stopped', 'CallHLSBroadcastingStoppedEvent'], + 'call.kicked_user' => ['call.kicked_user', 'KickedUserEvent'], + 'call.live_started' => ['call.live_started', 'CallLiveStartedEvent'], + 'call.member_added' => ['call.member_added', 'CallMemberAddedEvent'], + 'call.member_removed' => ['call.member_removed', 'CallMemberRemovedEvent'], + 'call.member_updated' => ['call.member_updated', 'CallMemberUpdatedEvent'], + 'call.member_updated_permission' => ['call.member_updated_permission', 'CallMemberUpdatedPermissionEvent'], + 'call.missed' => ['call.missed', 'CallMissedEvent'], + 'call.moderation_blur' => ['call.moderation_blur', 'CallModerationBlurEvent'], + 'call.moderation_warning' => ['call.moderation_warning', 'CallModerationWarningEvent'], + 'call.notification' => ['call.notification', 'CallNotificationEvent'], + 'call.permission_request' => ['call.permission_request', 'PermissionRequestEvent'], + 'call.permissions_updated' => ['call.permissions_updated', 'UpdatedCallPermissionsEvent'], + 'call.reaction_new' => ['call.reaction_new', 'CallReactionEvent'], + 'call.recording_failed' => ['call.recording_failed', 'CallRecordingFailedEvent'], + 'call.recording_ready' => ['call.recording_ready', 'CallRecordingReadyEvent'], + 'call.recording_started' => ['call.recording_started', 'CallRecordingStartedEvent'], + 'call.recording_stopped' => ['call.recording_stopped', 'CallRecordingStoppedEvent'], + 'call.rejected' => ['call.rejected', 'CallRejectedEvent'], + 'call.ring' => ['call.ring', 'CallRingEvent'], + 'call.rtmp_broadcast_failed' => ['call.rtmp_broadcast_failed', 'CallRtmpBroadcastFailedEvent'], + 'call.rtmp_broadcast_started' => ['call.rtmp_broadcast_started', 'CallRtmpBroadcastStartedEvent'], + 'call.rtmp_broadcast_stopped' => ['call.rtmp_broadcast_stopped', 'CallRtmpBroadcastStoppedEvent'], + 'call.session_ended' => ['call.session_ended', 'CallSessionEndedEvent'], + 'call.session_participant_count_updated' => ['call.session_participant_count_updated', 'CallSessionParticipantCountsUpdatedEvent'], + 'call.session_participant_joined' => ['call.session_participant_joined', 'CallSessionParticipantJoinedEvent'], + 'call.session_participant_left' => ['call.session_participant_left', 'CallSessionParticipantLeftEvent'], + 'call.session_started' => ['call.session_started', 'CallSessionStartedEvent'], + 'call.stats_report_ready' => ['call.stats_report_ready', 'CallStatsReportReadyEvent'], + 'call.transcription_failed' => ['call.transcription_failed', 'CallTranscriptionFailedEvent'], + 'call.transcription_ready' => ['call.transcription_ready', 'CallTranscriptionReadyEvent'], + 'call.transcription_started' => ['call.transcription_started', 'CallTranscriptionStartedEvent'], + 'call.transcription_stopped' => ['call.transcription_stopped', 'CallTranscriptionStoppedEvent'], + 'call.unblocked_user' => ['call.unblocked_user', 'UnblockedUserEvent'], + 'call.updated' => ['call.updated', 'CallUpdatedEvent'], + 'call.user_feedback_submitted' => ['call.user_feedback_submitted', 'CallUserFeedbackSubmittedEvent'], + 'call.user_muted' => ['call.user_muted', 'CallUserMutedEvent'], + 'campaign.completed' => ['campaign.completed', 'CampaignCompletedEvent'], + 'campaign.started' => ['campaign.started', 'CampaignStartedEvent'], + 'channel.created' => ['channel.created', 'ChannelCreatedEvent'], + 'channel.deleted' => ['channel.deleted', 'ChannelDeletedEvent'], + 'channel.frozen' => ['channel.frozen', 'ChannelFrozenEvent'], + 'channel.hidden' => ['channel.hidden', 'ChannelHiddenEvent'], + 'channel.max_streak_changed' => ['channel.max_streak_changed', 'MaxStreakChangedEvent'], + 'channel.muted' => ['channel.muted', 'ChannelMutedEvent'], + 'channel.truncated' => ['channel.truncated', 'ChannelTruncatedEvent'], + 'channel.unfrozen' => ['channel.unfrozen', 'ChannelUnFrozenEvent'], + 'channel.unmuted' => ['channel.unmuted', 'ChannelUnmutedEvent'], + 'channel.updated' => ['channel.updated', 'ChannelUpdatedEvent'], + 'channel.visible' => ['channel.visible', 'ChannelVisibleEvent'], + 'channel_batch_update.completed' => ['channel_batch_update.completed', 'ChannelBatchCompletedEvent'], + 'channel_batch_update.started' => ['channel_batch_update.started', 'ChannelBatchStartedEvent'], + 'custom' => ['custom', 'CustomVideoEvent'], + 'export.bulk_image_moderation.error' => ['export.bulk_image_moderation.error', 'AsyncExportErrorEvent'], + 'export.bulk_image_moderation.success' => ['export.bulk_image_moderation.success', 'AsyncBulkImageModerationEvent'], + 'export.channels.error' => ['export.channels.error', 'AsyncExportErrorEvent'], + 'export.channels.success' => ['export.channels.success', 'AsyncExportChannelsEvent'], + 'export.moderation_logs.error' => ['export.moderation_logs.error', 'AsyncExportErrorEvent'], + 'export.moderation_logs.success' => ['export.moderation_logs.success', 'AsyncExportModerationLogsEvent'], + 'export.users.error' => ['export.users.error', 'AsyncExportErrorEvent'], + 'export.users.success' => ['export.users.success', 'AsyncExportUsersEvent'], + 'feeds.activity.added' => ['feeds.activity.added', 'ActivityAddedEvent'], + 'feeds.activity.deleted' => ['feeds.activity.deleted', 'ActivityDeletedEvent'], + 'feeds.activity.feedback' => ['feeds.activity.feedback', 'ActivityFeedbackEvent'], + 'feeds.activity.marked' => ['feeds.activity.marked', 'ActivityMarkEvent'], + 'feeds.activity.pinned' => ['feeds.activity.pinned', 'ActivityPinnedEvent'], + 'feeds.activity.reaction.added' => ['feeds.activity.reaction.added', 'ActivityReactionAddedEvent'], + 'feeds.activity.reaction.deleted' => ['feeds.activity.reaction.deleted', 'ActivityReactionDeletedEvent'], + 'feeds.activity.reaction.updated' => ['feeds.activity.reaction.updated', 'ActivityReactionUpdatedEvent'], + 'feeds.activity.removed_from_feed' => ['feeds.activity.removed_from_feed', 'ActivityRemovedFromFeedEvent'], + 'feeds.activity.restored' => ['feeds.activity.restored', 'ActivityRestoredEvent'], + 'feeds.activity.unpinned' => ['feeds.activity.unpinned', 'ActivityUnpinnedEvent'], + 'feeds.activity.updated' => ['feeds.activity.updated', 'ActivityUpdatedEvent'], + 'feeds.bookmark.added' => ['feeds.bookmark.added', 'BookmarkAddedEvent'], + 'feeds.bookmark.deleted' => ['feeds.bookmark.deleted', 'BookmarkDeletedEvent'], + 'feeds.bookmark.updated' => ['feeds.bookmark.updated', 'BookmarkUpdatedEvent'], + 'feeds.bookmark_folder.deleted' => ['feeds.bookmark_folder.deleted', 'BookmarkFolderDeletedEvent'], + 'feeds.bookmark_folder.updated' => ['feeds.bookmark_folder.updated', 'BookmarkFolderUpdatedEvent'], + 'feeds.comment.added' => ['feeds.comment.added', 'CommentAddedEvent'], + 'feeds.comment.deleted' => ['feeds.comment.deleted', 'CommentDeletedEvent'], + 'feeds.comment.reaction.added' => ['feeds.comment.reaction.added', 'CommentReactionAddedEvent'], + 'feeds.comment.reaction.deleted' => ['feeds.comment.reaction.deleted', 'CommentReactionDeletedEvent'], + 'feeds.comment.reaction.updated' => ['feeds.comment.reaction.updated', 'CommentReactionUpdatedEvent'], + 'feeds.comment.updated' => ['feeds.comment.updated', 'CommentUpdatedEvent'], + 'feeds.feed.created' => ['feeds.feed.created', 'FeedCreatedEvent'], + 'feeds.feed.deleted' => ['feeds.feed.deleted', 'FeedDeletedEvent'], + 'feeds.feed.updated' => ['feeds.feed.updated', 'FeedUpdatedEvent'], + 'feeds.feed_group.changed' => ['feeds.feed_group.changed', 'FeedGroupChangedEvent'], + 'feeds.feed_group.deleted' => ['feeds.feed_group.deleted', 'FeedGroupDeletedEvent'], + 'feeds.feed_member.added' => ['feeds.feed_member.added', 'FeedMemberAddedEvent'], + 'feeds.feed_member.removed' => ['feeds.feed_member.removed', 'FeedMemberRemovedEvent'], + 'feeds.feed_member.updated' => ['feeds.feed_member.updated', 'FeedMemberUpdatedEvent'], + 'feeds.follow.created' => ['feeds.follow.created', 'FollowCreatedEvent'], + 'feeds.follow.deleted' => ['feeds.follow.deleted', 'FollowDeletedEvent'], + 'feeds.follow.updated' => ['feeds.follow.updated', 'FollowUpdatedEvent'], + 'feeds.notification_feed.updated' => ['feeds.notification_feed.updated', 'NotificationFeedUpdatedEvent'], + 'feeds.stories_feed.updated' => ['feeds.stories_feed.updated', 'StoriesFeedUpdatedEvent'], + 'flag.updated' => ['flag.updated', 'FlagUpdatedEvent'], + 'ingress.error' => ['ingress.error', 'IngressErrorEvent'], + 'ingress.started' => ['ingress.started', 'IngressStartedEvent'], + 'ingress.stopped' => ['ingress.stopped', 'IngressStoppedEvent'], + 'member.added' => ['member.added', 'MemberAddedEvent'], + 'member.removed' => ['member.removed', 'MemberRemovedEvent'], + 'member.updated' => ['member.updated', 'MemberUpdatedEvent'], + 'message.deleted' => ['message.deleted', 'MessageDeletedEvent'], + 'message.flagged' => ['message.flagged', 'MessageFlaggedEvent'], + 'message.new' => ['message.new', 'MessageNewEvent'], + 'message.pending' => ['message.pending', 'PendingMessageEvent'], + 'message.read' => ['message.read', 'MessageReadEvent'], + 'message.unblocked' => ['message.unblocked', 'MessageUnblockedEvent'], + 'message.undeleted' => ['message.undeleted', 'MessageUndeletedEvent'], + 'message.updated' => ['message.updated', 'MessageUpdatedEvent'], + 'moderation.custom_action' => ['moderation.custom_action', 'ModerationCustomActionEvent'], + 'moderation.flagged' => ['moderation.flagged', 'ModerationFlaggedEvent'], + 'moderation.mark_reviewed' => ['moderation.mark_reviewed', 'ModerationMarkReviewedEvent'], + 'moderation_check.completed' => ['moderation_check.completed', 'ModerationCheckCompletedEvent'], + 'moderation_rule.triggered' => ['moderation_rule.triggered', 'ModerationRulesTriggeredEvent'], + 'notification.mark_unread' => ['notification.mark_unread', 'NotificationMarkUnreadEvent'], + 'notification.reminder_due' => ['notification.reminder_due', 'ReminderNotificationEvent'], + 'notification.thread_message_new' => ['notification.thread_message_new', 'NotificationThreadMessageNewEvent'], + 'reaction.deleted' => ['reaction.deleted', 'ReactionDeletedEvent'], + 'reaction.new' => ['reaction.new', 'ReactionNewEvent'], + 'reaction.updated' => ['reaction.updated', 'ReactionUpdatedEvent'], + 'reminder.created' => ['reminder.created', 'ReminderCreatedEvent'], + 'reminder.deleted' => ['reminder.deleted', 'ReminderDeletedEvent'], + 'reminder.updated' => ['reminder.updated', 'ReminderUpdatedEvent'], + 'review_queue_item.new' => ['review_queue_item.new', 'ReviewQueueItemNewEvent'], + 'review_queue_item.updated' => ['review_queue_item.updated', 'ReviewQueueItemUpdatedEvent'], + 'thread.updated' => ['thread.updated', 'ThreadUpdatedEvent'], + 'user.banned' => ['user.banned', 'UserBannedEvent'], + 'user.deactivated' => ['user.deactivated', 'UserDeactivatedEvent'], + 'user.deleted' => ['user.deleted', 'UserDeletedEvent'], + 'user.flagged' => ['user.flagged', 'UserFlaggedEvent'], + 'user.messages.deleted' => ['user.messages.deleted', 'UserMessagesDeletedEvent'], + 'user.muted' => ['user.muted', 'UserMutedEvent'], + 'user.reactivated' => ['user.reactivated', 'UserReactivatedEvent'], + 'user.unbanned' => ['user.unbanned', 'UserUnbannedEvent'], + 'user.unmuted' => ['user.unmuted', 'UserUnmutedEvent'], + 'user.unread_message_reminder' => ['user.unread_message_reminder', 'UserUnreadReminderEvent'], + 'user.updated' => ['user.updated', 'UserUpdatedEvent'], + ]; + } + + public function testParseWebhookEventUnknownType(): void + { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Unknown webhook event type'); + Webhook::parseWebhookEvent('{"type":"unknown.event"}'); + } + + public function testParseWebhookEventMissingType(): void + { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage("missing 'type' field"); + Webhook::parseWebhookEvent('{"foo":"bar"}'); + } + + public function testParseWebhookEventInvalidJson(): void + { + $this->expectException(\InvalidArgumentException::class); + $this->expectExceptionMessage('Invalid JSON'); + Webhook::parseWebhookEvent('not json'); + } +}