diff --git a/docs/Model/UpdatePasskeysAuthMethod.md b/docs/Model/Link.md similarity index 73% rename from docs/Model/UpdatePasskeysAuthMethod.md rename to docs/Model/Link.md index a7ab563..4058d28 100644 --- a/docs/Model/UpdatePasskeysAuthMethod.md +++ b/docs/Model/Link.md @@ -1,9 +1,9 @@ -# # UpdatePasskeysAuthMethod +# # Link ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**enabled** | **bool** | | [optional] [default to true] +**href** | **string** | | [[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListPaginatedUsersItem.md b/docs/Model/ListPaginatedUsersItem.md new file mode 100644 index 0000000..115f7b5 --- /dev/null +++ b/docs/Model/ListPaginatedUsersItem.md @@ -0,0 +1,19 @@ +# # ListPaginatedUsersItem + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **\DateTime** | | +**email** | **string** | | +**email_verified** | **bool** | | +**id** | **string** | | +**last_login_at** | **\DateTime** | | +**login_count** | **int** | | +**phone** | **string** | | +**phone_verified** | **bool** | | +**status** | [**\OpenAPI\Client\Model\UserStatus**](UserStatus.md) | | +**updated_at** | **\DateTime** | | +**user_metadata** | **object** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/ListPaginatedUsersResponse.md b/docs/Model/ListPaginatedUsersResponse.md new file mode 100644 index 0000000..c206b7c --- /dev/null +++ b/docs/Model/ListPaginatedUsersResponse.md @@ -0,0 +1,14 @@ +# # ListPaginatedUsersResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_links** | [**\OpenAPI\Client\Model\PaginatedLinks**](PaginatedLinks.md) | | +**created_before** | **int** | time anchor (Unix timestamp) --> all users returned created before this timestamp | +**limit** | **int** | | +**page** | **int** | | +**total_users** | **int** | total number of users for a particular query | +**users** | [**\OpenAPI\Client\Model\ListPaginatedUsersItem[]**](ListPaginatedUsersItem.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Model403Error.md b/docs/Model/Model403Error.md new file mode 100644 index 0000000..076c397 --- /dev/null +++ b/docs/Model/Model403Error.md @@ -0,0 +1,10 @@ +# # Model403Error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **string** | | +**error** | **string** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/Nonce.md b/docs/Model/Nonce.md new file mode 100644 index 0000000..f4bb3f7 --- /dev/null +++ b/docs/Model/Nonce.md @@ -0,0 +1,9 @@ +# # Nonce + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**nonce** | **string** | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/PaginatedLinks.md b/docs/Model/PaginatedLinks.md new file mode 100644 index 0000000..6f71004 --- /dev/null +++ b/docs/Model/PaginatedLinks.md @@ -0,0 +1,13 @@ +# # PaginatedLinks + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**first** | [**\OpenAPI\Client\Model\Link**](Link.md) | | +**last** | [**\OpenAPI\Client\Model\Link**](Link.md) | | +**next** | [**\OpenAPI\Client\Model\Link**](Link.md) | | +**previous** | [**\OpenAPI\Client\Model\Link**](Link.md) | | +**self** | [**\OpenAPI\Client\Model\Link**](Link.md) | | + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateMagicLinkAuthMethod.md b/docs/Model/UpdateMagicLinkAuthMethod.md deleted file mode 100644 index 46e21c7..0000000 --- a/docs/Model/UpdateMagicLinkAuthMethod.md +++ /dev/null @@ -1,11 +0,0 @@ -# # UpdateMagicLinkAuthMethod - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **bool** | | [optional] -**ttl** | **int** | Maximum time (IN SECONDS) for the auth to expire. | [optional] [default to 300] -**ttl_display_unit** | [**\OpenAPI\Client\Model\TtlDisplayUnit**](TtlDisplayUnit.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UpdateOtpAuthMethod.md b/docs/Model/UpdateOtpAuthMethod.md deleted file mode 100644 index d74589d..0000000 --- a/docs/Model/UpdateOtpAuthMethod.md +++ /dev/null @@ -1,11 +0,0 @@ -# # UpdateOtpAuthMethod - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**enabled** | **bool** | | [optional] -**ttl** | **int** | Maximum time (IN SECONDS) for the auth to expire. | [optional] [default to 300] -**ttl_display_unit** | [**\OpenAPI\Client\Model\TtlDisplayUnit**](TtlDisplayUnit.md) | | [optional] - -[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UserEventStatus.md b/docs/Model/UserEventStatus.md new file mode 100644 index 0000000..25617e4 --- /dev/null +++ b/docs/Model/UserEventStatus.md @@ -0,0 +1,8 @@ +# # UserEventStatus + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md) diff --git a/docs/Model/UserRecentEvent.md b/docs/Model/UserRecentEvent.md index ef528c8..4bb0dcc 100644 --- a/docs/Model/UserRecentEvent.md +++ b/docs/Model/UserRecentEvent.md @@ -5,8 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created_at** | **\DateTime** | | +**completed_at** | **\DateTime** | | **id** | **string** | | **ip_addr** | **string** | | +**status** | [**\OpenAPI\Client\Model\UserEventStatus**](UserEventStatus.md) | | **type** | **string** | | **user_agent** | **string** | | diff --git a/generated/.openapi-generator/FILES b/generated/.openapi-generator/FILES index da9a6ab..0e6bba0 100644 --- a/generated/.openapi-generator/FILES +++ b/generated/.openapi-generator/FILES @@ -21,7 +21,10 @@ docs/Model/GithubUserSocialConnection.md docs/Model/GoogleUserSocialConnection.md docs/Model/LayoutConfig.md docs/Model/Layouts.md +docs/Model/Link.md docs/Model/ListDevicesResponse.md +docs/Model/ListPaginatedUsersItem.md +docs/Model/ListPaginatedUsersResponse.md docs/Model/MagicLink.md docs/Model/MagicLinkAuthMethod.md docs/Model/MagicLinkChannel.md @@ -29,16 +32,17 @@ docs/Model/MagicLinkResponse.md docs/Model/MagicLinkType.md docs/Model/Model400Error.md docs/Model/Model401Error.md +docs/Model/Model403Error.md docs/Model/Model404Error.md docs/Model/Model500Error.md +docs/Model/Nonce.md docs/Model/OtpAuthMethod.md +docs/Model/PaginatedLinks.md docs/Model/PasskeysAuthMethod.md docs/Model/Technologies.md docs/Model/TtlDisplayUnit.md -docs/Model/UpdateMagicLinkAuthMethod.md -docs/Model/UpdateOtpAuthMethod.md -docs/Model/UpdatePasskeysAuthMethod.md docs/Model/UpdateUserRequest.md +docs/Model/UserEventStatus.md docs/Model/UserInfo.md docs/Model/UserMetadataField.md docs/Model/UserMetadataFieldType.md @@ -70,7 +74,10 @@ lib/Model/GithubUserSocialConnection.php lib/Model/GoogleUserSocialConnection.php lib/Model/LayoutConfig.php lib/Model/Layouts.php +lib/Model/Link.php lib/Model/ListDevicesResponse.php +lib/Model/ListPaginatedUsersItem.php +lib/Model/ListPaginatedUsersResponse.php lib/Model/MagicLink.php lib/Model/MagicLinkAuthMethod.php lib/Model/MagicLinkChannel.php @@ -78,17 +85,18 @@ lib/Model/MagicLinkResponse.php lib/Model/MagicLinkType.php lib/Model/Model400Error.php lib/Model/Model401Error.php +lib/Model/Model403Error.php lib/Model/Model404Error.php lib/Model/Model500Error.php lib/Model/ModelInterface.php +lib/Model/Nonce.php lib/Model/OtpAuthMethod.php +lib/Model/PaginatedLinks.php lib/Model/PasskeysAuthMethod.php lib/Model/Technologies.php lib/Model/TtlDisplayUnit.php -lib/Model/UpdateMagicLinkAuthMethod.php -lib/Model/UpdateOtpAuthMethod.php -lib/Model/UpdatePasskeysAuthMethod.php lib/Model/UpdateUserRequest.php +lib/Model/UserEventStatus.php lib/Model/UserInfo.php lib/Model/UserMetadataField.php lib/Model/UserMetadataFieldType.php @@ -118,7 +126,10 @@ test/Model/GithubUserSocialConnectionTest.php test/Model/GoogleUserSocialConnectionTest.php test/Model/LayoutConfigTest.php test/Model/LayoutsTest.php +test/Model/LinkTest.php test/Model/ListDevicesResponseTest.php +test/Model/ListPaginatedUsersItemTest.php +test/Model/ListPaginatedUsersResponseTest.php test/Model/MagicLinkAuthMethodTest.php test/Model/MagicLinkChannelTest.php test/Model/MagicLinkResponseTest.php @@ -126,16 +137,17 @@ test/Model/MagicLinkTest.php test/Model/MagicLinkTypeTest.php test/Model/Model400ErrorTest.php test/Model/Model401ErrorTest.php +test/Model/Model403ErrorTest.php test/Model/Model404ErrorTest.php test/Model/Model500ErrorTest.php +test/Model/NonceTest.php test/Model/OtpAuthMethodTest.php +test/Model/PaginatedLinksTest.php test/Model/PasskeysAuthMethodTest.php test/Model/TechnologiesTest.php test/Model/TtlDisplayUnitTest.php -test/Model/UpdateMagicLinkAuthMethodTest.php -test/Model/UpdateOtpAuthMethodTest.php -test/Model/UpdatePasskeysAuthMethodTest.php test/Model/UpdateUserRequestTest.php +test/Model/UserEventStatusTest.php test/Model/UserInfoTest.php test/Model/UserMetadataFieldTest.php test/Model/UserMetadataFieldTypeTest.php diff --git a/generated/README.md b/generated/README.md index 7474d60..7e31921 100644 --- a/generated/README.md +++ b/generated/README.md @@ -87,6 +87,7 @@ Class | Method | HTTP request | Description *UsersApi* | [**deactivateUser**](docs/Api/UsersApi.md#deactivateuser) | **PATCH** /apps/{app_id}/users/{user_id}/deactivate | Deactivate User *UsersApi* | [**deleteUser**](docs/Api/UsersApi.md#deleteuser) | **DELETE** /apps/{app_id}/users/{user_id} | Delete User *UsersApi* | [**getUser**](docs/Api/UsersApi.md#getuser) | **GET** /apps/{app_id}/users/{user_id} | Get User +*UsersApi* | [**listPaginatedUsers**](docs/Api/UsersApi.md#listpaginatedusers) | **GET** /apps/{app_id}/users | List Users *UsersApi* | [**updateUser**](docs/Api/UsersApi.md#updateuser) | **PATCH** /apps/{app_id}/users/{user_id} | Update User ## Models @@ -103,7 +104,10 @@ Class | Method | HTTP request | Description - [GoogleUserSocialConnection](docs/Model/GoogleUserSocialConnection.md) - [LayoutConfig](docs/Model/LayoutConfig.md) - [Layouts](docs/Model/Layouts.md) +- [Link](docs/Model/Link.md) - [ListDevicesResponse](docs/Model/ListDevicesResponse.md) +- [ListPaginatedUsersItem](docs/Model/ListPaginatedUsersItem.md) +- [ListPaginatedUsersResponse](docs/Model/ListPaginatedUsersResponse.md) - [MagicLink](docs/Model/MagicLink.md) - [MagicLinkAuthMethod](docs/Model/MagicLinkAuthMethod.md) - [MagicLinkChannel](docs/Model/MagicLinkChannel.md) @@ -111,16 +115,17 @@ Class | Method | HTTP request | Description - [MagicLinkType](docs/Model/MagicLinkType.md) - [Model400Error](docs/Model/Model400Error.md) - [Model401Error](docs/Model/Model401Error.md) +- [Model403Error](docs/Model/Model403Error.md) - [Model404Error](docs/Model/Model404Error.md) - [Model500Error](docs/Model/Model500Error.md) +- [Nonce](docs/Model/Nonce.md) - [OtpAuthMethod](docs/Model/OtpAuthMethod.md) +- [PaginatedLinks](docs/Model/PaginatedLinks.md) - [PasskeysAuthMethod](docs/Model/PasskeysAuthMethod.md) - [Technologies](docs/Model/Technologies.md) - [TtlDisplayUnit](docs/Model/TtlDisplayUnit.md) -- [UpdateMagicLinkAuthMethod](docs/Model/UpdateMagicLinkAuthMethod.md) -- [UpdateOtpAuthMethod](docs/Model/UpdateOtpAuthMethod.md) -- [UpdatePasskeysAuthMethod](docs/Model/UpdatePasskeysAuthMethod.md) - [UpdateUserRequest](docs/Model/UpdateUserRequest.md) +- [UserEventStatus](docs/Model/UserEventStatus.md) - [UserInfo](docs/Model/UserInfo.md) - [UserMetadataField](docs/Model/UserMetadataField.md) - [UserMetadataFieldType](docs/Model/UserMetadataFieldType.md) diff --git a/generated/lib/Api/MagicLinksApi.php b/generated/lib/Api/MagicLinksApi.php index 6293d07..5b15195 100644 --- a/generated/lib/Api/MagicLinksApi.php +++ b/generated/lib/Api/MagicLinksApi.php @@ -134,7 +134,7 @@ public function getConfig() * * @throws \OpenAPI\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return \OpenAPI\Client\Model\MagicLinkResponse|\OpenAPI\Client\Model\Model400Error|\OpenAPI\Client\Model\Model401Error|\OpenAPI\Client\Model\Model404Error|\OpenAPI\Client\Model\Model500Error + * @return \OpenAPI\Client\Model\MagicLinkResponse|\OpenAPI\Client\Model\Model400Error|\OpenAPI\Client\Model\Model401Error|\OpenAPI\Client\Model\Model403Error|\OpenAPI\Client\Model\Model404Error|\OpenAPI\Client\Model\Model500Error */ public function createMagicLink($app_id, $create_magic_link_request, string $contentType = self::contentTypes['createMagicLink'][0]) { @@ -153,7 +153,7 @@ public function createMagicLink($app_id, $create_magic_link_request, string $con * * @throws \OpenAPI\Client\ApiException on non-2xx response * @throws \InvalidArgumentException - * @return array of \OpenAPI\Client\Model\MagicLinkResponse|\OpenAPI\Client\Model\Model400Error|\OpenAPI\Client\Model\Model401Error|\OpenAPI\Client\Model\Model404Error|\OpenAPI\Client\Model\Model500Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \OpenAPI\Client\Model\MagicLinkResponse|\OpenAPI\Client\Model\Model400Error|\OpenAPI\Client\Model\Model401Error|\OpenAPI\Client\Model\Model403Error|\OpenAPI\Client\Model\Model404Error|\OpenAPI\Client\Model\Model500Error, HTTP status code, HTTP response headers (array of strings) */ public function createMagicLinkWithHttpInfo($app_id, $create_magic_link_request, string $contentType = self::contentTypes['createMagicLink'][0]) { @@ -240,6 +240,21 @@ public function createMagicLinkWithHttpInfo($app_id, $create_magic_link_request, $response->getStatusCode(), $response->getHeaders() ]; + case 403: + if ('\OpenAPI\Client\Model\Model403Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Model403Error' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Model403Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; case 404: if ('\OpenAPI\Client\Model\Model404Error' === '\SplFileObject') { $content = $response->getBody(); //stream goes to serializer @@ -314,6 +329,14 @@ public function createMagicLinkWithHttpInfo($app_id, $create_magic_link_request, ); $e->setResponseObject($data); break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Model403Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), diff --git a/generated/lib/Api/TokensApi.php b/generated/lib/Api/TokensApi.php index 213ed95..19cbd63 100644 --- a/generated/lib/Api/TokensApi.php +++ b/generated/lib/Api/TokensApi.php @@ -205,6 +205,14 @@ public function revokeUserRefreshTokensWithHttpInfo($app_id, $user_id, string $c ); $e->setResponseObject($data); break; + case 403: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Model403Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; case 404: $data = ObjectSerializer::deserialize( $e->getResponseBody(), diff --git a/generated/lib/Api/UsersApi.php b/generated/lib/Api/UsersApi.php index cf0d670..8fdedeb 100644 --- a/generated/lib/Api/UsersApi.php +++ b/generated/lib/Api/UsersApi.php @@ -87,6 +87,9 @@ class UsersApi 'getUser' => [ 'application/json', ], + 'listPaginatedUsers' => [ + 'application/json', + ], 'updateUser' => [ 'application/json', ], @@ -1941,6 +1944,550 @@ public function getUserRequest($app_id, $user_id, string $contentType = self::co ); } + /** + * Operation listPaginatedUsers + * + * List Users + * + * @param string $app_id App ID (required) + * @param int $page page to fetch (min=1) (optional) + * @param int $limit number of users to fetch per page (max=500) (optional) + * @param int $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) + * @param string $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) + * @param string $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) + * @param string $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) + * @param int $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) + * @param string $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) + * @param string $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaginatedUsers'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return \OpenAPI\Client\Model\ListPaginatedUsersResponse|\OpenAPI\Client\Model\Model400Error|\OpenAPI\Client\Model\Model401Error|\OpenAPI\Client\Model\Model404Error|\OpenAPI\Client\Model\Model500Error + */ + public function listPaginatedUsers($app_id, $page = null, $limit = null, $created_before = null, $order_by = null, $identifier = null, $id = null, $login_count = null, $status = null, $created_at = null, $updated_at = null, $last_login_at = null, string $contentType = self::contentTypes['listPaginatedUsers'][0]) + { + list($response) = $this->listPaginatedUsersWithHttpInfo($app_id, $page, $limit, $created_before, $order_by, $identifier, $id, $login_count, $status, $created_at, $updated_at, $last_login_at, $contentType); + return $response; + } + + /** + * Operation listPaginatedUsersWithHttpInfo + * + * List Users + * + * @param string $app_id App ID (required) + * @param int $page page to fetch (min=1) (optional) + * @param int $limit number of users to fetch per page (max=500) (optional) + * @param int $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) + * @param string $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) + * @param string $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) + * @param string $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) + * @param int $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) + * @param string $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) + * @param string $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaginatedUsers'] to see the possible values for this operation + * + * @throws \OpenAPI\Client\ApiException on non-2xx response + * @throws \InvalidArgumentException + * @return array of \OpenAPI\Client\Model\ListPaginatedUsersResponse|\OpenAPI\Client\Model\Model400Error|\OpenAPI\Client\Model\Model401Error|\OpenAPI\Client\Model\Model404Error|\OpenAPI\Client\Model\Model500Error, HTTP status code, HTTP response headers (array of strings) + */ + public function listPaginatedUsersWithHttpInfo($app_id, $page = null, $limit = null, $created_before = null, $order_by = null, $identifier = null, $id = null, $login_count = null, $status = null, $created_at = null, $updated_at = null, $last_login_at = null, string $contentType = self::contentTypes['listPaginatedUsers'][0]) + { + $request = $this->listPaginatedUsersRequest($app_id, $page, $limit, $created_before, $order_by, $identifier, $id, $login_count, $status, $created_at, $updated_at, $last_login_at, $contentType); + + try { + $options = $this->createHttpClientOption(); + try { + $response = $this->client->send($request, $options); + } catch (RequestException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + $e->getResponse() ? $e->getResponse()->getHeaders() : null, + $e->getResponse() ? (string) $e->getResponse()->getBody() : null + ); + } catch (ConnectException $e) { + throw new ApiException( + "[{$e->getCode()}] {$e->getMessage()}", + (int) $e->getCode(), + null, + null + ); + } + + $statusCode = $response->getStatusCode(); + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + switch($statusCode) { + case 200: + if ('\OpenAPI\Client\Model\ListPaginatedUsersResponse' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\ListPaginatedUsersResponse' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\ListPaginatedUsersResponse', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 400: + if ('\OpenAPI\Client\Model\Model400Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Model400Error' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Model400Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 401: + if ('\OpenAPI\Client\Model\Model401Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Model401Error' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Model401Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 404: + if ('\OpenAPI\Client\Model\Model404Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Model404Error' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Model404Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + case 500: + if ('\OpenAPI\Client\Model\Model500Error' === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ('\OpenAPI\Client\Model\Model500Error' !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, '\OpenAPI\Client\Model\Model500Error', []), + $response->getStatusCode(), + $response->getHeaders() + ]; + } + + $returnType = '\OpenAPI\Client\Model\ListPaginatedUsersResponse'; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + + } catch (ApiException $e) { + switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\ListPaginatedUsersResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 400: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Model400Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 401: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Model401Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 404: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Model404Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + case 500: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\OpenAPI\Client\Model\Model500Error', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + break; + } + throw $e; + } + } + + /** + * Operation listPaginatedUsersAsync + * + * List Users + * + * @param string $app_id App ID (required) + * @param int $page page to fetch (min=1) (optional) + * @param int $limit number of users to fetch per page (max=500) (optional) + * @param int $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) + * @param string $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) + * @param string $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) + * @param string $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) + * @param int $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) + * @param string $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) + * @param string $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaginatedUsers'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listPaginatedUsersAsync($app_id, $page = null, $limit = null, $created_before = null, $order_by = null, $identifier = null, $id = null, $login_count = null, $status = null, $created_at = null, $updated_at = null, $last_login_at = null, string $contentType = self::contentTypes['listPaginatedUsers'][0]) + { + return $this->listPaginatedUsersAsyncWithHttpInfo($app_id, $page, $limit, $created_before, $order_by, $identifier, $id, $login_count, $status, $created_at, $updated_at, $last_login_at, $contentType) + ->then( + function ($response) { + return $response[0]; + } + ); + } + + /** + * Operation listPaginatedUsersAsyncWithHttpInfo + * + * List Users + * + * @param string $app_id App ID (required) + * @param int $page page to fetch (min=1) (optional) + * @param int $limit number of users to fetch per page (max=500) (optional) + * @param int $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) + * @param string $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) + * @param string $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) + * @param string $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) + * @param int $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) + * @param string $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) + * @param string $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaginatedUsers'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public function listPaginatedUsersAsyncWithHttpInfo($app_id, $page = null, $limit = null, $created_before = null, $order_by = null, $identifier = null, $id = null, $login_count = null, $status = null, $created_at = null, $updated_at = null, $last_login_at = null, string $contentType = self::contentTypes['listPaginatedUsers'][0]) + { + $returnType = '\OpenAPI\Client\Model\ListPaginatedUsersResponse'; + $request = $this->listPaginatedUsersRequest($app_id, $page, $limit, $created_before, $order_by, $identifier, $id, $login_count, $status, $created_at, $updated_at, $last_login_at, $contentType); + + return $this->client + ->sendAsync($request, $this->createHttpClientOption()) + ->then( + function ($response) use ($returnType) { + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; + }, + function ($exception) { + $response = $exception->getResponse(); + $statusCode = $response->getStatusCode(); + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + $exception->getRequest()->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + ); + } + + /** + * Create request for operation 'listPaginatedUsers' + * + * @param string $app_id App ID (required) + * @param int $page page to fetch (min=1) (optional) + * @param int $limit number of users to fetch per page (max=500) (optional) + * @param int $created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) (optional) + * @param string $order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` (optional) + * @param string $identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) (optional) + * @param string $id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) (optional) + * @param int $login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) (optional) + * @param string $status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) (optional) + * @param string $created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['listPaginatedUsers'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function listPaginatedUsersRequest($app_id, $page = null, $limit = null, $created_before = null, $order_by = null, $identifier = null, $id = null, $login_count = null, $status = null, $created_at = null, $updated_at = null, $last_login_at = null, string $contentType = self::contentTypes['listPaginatedUsers'][0]) + { + + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app_id when calling listPaginatedUsers' + ); + } + + + + + + + + + + + + + + $resourcePath = '/apps/{app_id}/users'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $page, + 'page', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_before, + 'created_before', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $order_by, + 'order_by', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $identifier, + 'identifier', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $id, + 'id', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $login_count, + 'login_count', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $status, + 'status', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_at, + 'created_at', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_at, + 'updated_at', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $last_login_at, + 'last_login_at', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + + + // path params + if ($app_id !== null) { + $resourcePath = str_replace( + '{' . 'app_id' . '}', + ObjectSerializer::toPathValue($app_id), + $resourcePath + ); + } + + + $headers = $this->headerSelector->selectHeaders( + ['application/json', ], + $contentType, + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { + if ($multipart) { + $multipartContents = []; + foreach ($formParams as $formParamName => $formParamValue) { + $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; + foreach ($formParamValueItems as $formParamValueItem) { + $multipartContents[] = [ + 'name' => $formParamName, + 'contents' => $formParamValueItem + ]; + } + } + // for HTTP post (form) + $httpBody = new MultipartStream($multipartContents); + + } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the form parameters + $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); + } else { + // for HTTP post (form) + $httpBody = ObjectSerializer::buildQuery($formParams); + } + } + + // this endpoint requires Bearer (JWT) authentication (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + } + + $defaultHeaders = []; + if ($this->config->getUserAgent()) { + $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); + } + + $headers = array_merge( + $defaultHeaders, + $headerParams, + $headers + ); + + $operationHost = $this->config->getHost(); + $query = ObjectSerializer::buildQuery($queryParams); + return new Request( + 'GET', + $operationHost . $resourcePath . ($query ? "?{$query}" : ''), + $headers, + $httpBody + ); + } + /** * Operation updateUser * diff --git a/generated/lib/Model/UpdatePasskeysAuthMethod.php b/generated/lib/Model/Link.php similarity index 90% rename from generated/lib/Model/UpdatePasskeysAuthMethod.php rename to generated/lib/Model/Link.php index 256b3f3..f763c64 100644 --- a/generated/lib/Model/UpdatePasskeysAuthMethod.php +++ b/generated/lib/Model/Link.php @@ -1,6 +1,6 @@ */ -class UpdatePasskeysAuthMethod implements ModelInterface, ArrayAccess, \JsonSerializable +class Link implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class UpdatePasskeysAuthMethod implements ModelInterface, ArrayAccess, \JsonSeri * * @var string */ - protected static $openAPIModelName = 'UpdatePasskeysAuthMethod'; + protected static $openAPIModelName = 'Link'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,7 +58,7 @@ class UpdatePasskeysAuthMethod implements ModelInterface, ArrayAccess, \JsonSeri * @var string[] */ protected static $openAPITypes = [ - 'enabled' => 'bool' + 'href' => 'string' ]; /** @@ -69,7 +69,7 @@ class UpdatePasskeysAuthMethod implements ModelInterface, ArrayAccess, \JsonSeri * @psalm-var array */ protected static $openAPIFormats = [ - 'enabled' => null + 'href' => null ]; /** @@ -78,7 +78,7 @@ class UpdatePasskeysAuthMethod implements ModelInterface, ArrayAccess, \JsonSeri * @var boolean[] */ protected static array $openAPINullables = [ - 'enabled' => false + 'href' => false ]; /** @@ -167,7 +167,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'enabled' => 'enabled' + 'href' => 'href' ]; /** @@ -176,7 +176,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'enabled' => 'setEnabled' + 'href' => 'setHref' ]; /** @@ -185,7 +185,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'enabled' => 'getEnabled' + 'href' => 'getHref' ]; /** @@ -245,7 +245,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('enabled', $data ?? [], true); + $this->setIfExists('href', $data ?? [], null); } /** @@ -275,6 +275,9 @@ public function listInvalidProperties() { $invalidProperties = []; + if ($this->container['href'] === null) { + $invalidProperties[] = "'href' can't be null"; + } return $invalidProperties; } @@ -291,28 +294,28 @@ public function valid() /** - * Gets enabled + * Gets href * - * @return bool|null + * @return string */ - public function getEnabled() + public function getHref() { - return $this->container['enabled']; + return $this->container['href']; } /** - * Sets enabled + * Sets href * - * @param bool|null $enabled enabled + * @param string $href href * * @return self */ - public function setEnabled($enabled) + public function setHref($href) { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); + if (is_null($href)) { + throw new \InvalidArgumentException('non-nullable href cannot be null'); } - $this->container['enabled'] = $enabled; + $this->container['href'] = $href; return $this; } diff --git a/generated/lib/Model/ListPaginatedUsersItem.php b/generated/lib/Model/ListPaginatedUsersItem.php new file mode 100644 index 0000000..bac3130 --- /dev/null +++ b/generated/lib/Model/ListPaginatedUsersItem.php @@ -0,0 +1,790 @@ + + */ +class ListPaginatedUsersItem implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ListPaginatedUsersItem'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'created_at' => '\DateTime', + 'email' => 'string', + 'email_verified' => 'bool', + 'id' => 'string', + 'last_login_at' => '\DateTime', + 'login_count' => 'int', + 'phone' => 'string', + 'phone_verified' => 'bool', + 'status' => '\OpenAPI\Client\Model\UserStatus', + 'updated_at' => '\DateTime', + 'user_metadata' => 'object' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'created_at' => 'date-time', + 'email' => null, + 'email_verified' => null, + 'id' => null, + 'last_login_at' => 'date-time', + 'login_count' => null, + 'phone' => null, + 'phone_verified' => null, + 'status' => null, + 'updated_at' => 'date-time', + 'user_metadata' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'created_at' => false, + 'email' => false, + 'email_verified' => false, + 'id' => false, + 'last_login_at' => false, + 'login_count' => false, + 'phone' => false, + 'phone_verified' => false, + 'status' => false, + 'updated_at' => false, + 'user_metadata' => true + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'created_at' => 'created_at', + 'email' => 'email', + 'email_verified' => 'email_verified', + 'id' => 'id', + 'last_login_at' => 'last_login_at', + 'login_count' => 'login_count', + 'phone' => 'phone', + 'phone_verified' => 'phone_verified', + 'status' => 'status', + 'updated_at' => 'updated_at', + 'user_metadata' => 'user_metadata' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'created_at' => 'setCreatedAt', + 'email' => 'setEmail', + 'email_verified' => 'setEmailVerified', + 'id' => 'setId', + 'last_login_at' => 'setLastLoginAt', + 'login_count' => 'setLoginCount', + 'phone' => 'setPhone', + 'phone_verified' => 'setPhoneVerified', + 'status' => 'setStatus', + 'updated_at' => 'setUpdatedAt', + 'user_metadata' => 'setUserMetadata' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'created_at' => 'getCreatedAt', + 'email' => 'getEmail', + 'email_verified' => 'getEmailVerified', + 'id' => 'getId', + 'last_login_at' => 'getLastLoginAt', + 'login_count' => 'getLoginCount', + 'phone' => 'getPhone', + 'phone_verified' => 'getPhoneVerified', + 'status' => 'getStatus', + 'updated_at' => 'getUpdatedAt', + 'user_metadata' => 'getUserMetadata' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('email', $data ?? [], null); + $this->setIfExists('email_verified', $data ?? [], null); + $this->setIfExists('id', $data ?? [], null); + $this->setIfExists('last_login_at', $data ?? [], null); + $this->setIfExists('login_count', $data ?? [], null); + $this->setIfExists('phone', $data ?? [], null); + $this->setIfExists('phone_verified', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); + $this->setIfExists('updated_at', $data ?? [], null); + $this->setIfExists('user_metadata', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['created_at'] === null) { + $invalidProperties[] = "'created_at' can't be null"; + } + if ($this->container['email'] === null) { + $invalidProperties[] = "'email' can't be null"; + } + if ($this->container['email_verified'] === null) { + $invalidProperties[] = "'email_verified' can't be null"; + } + if ($this->container['id'] === null) { + $invalidProperties[] = "'id' can't be null"; + } + if ($this->container['last_login_at'] === null) { + $invalidProperties[] = "'last_login_at' can't be null"; + } + if ($this->container['login_count'] === null) { + $invalidProperties[] = "'login_count' can't be null"; + } + if ($this->container['phone'] === null) { + $invalidProperties[] = "'phone' can't be null"; + } + if ($this->container['phone_verified'] === null) { + $invalidProperties[] = "'phone_verified' can't be null"; + } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } + if ($this->container['updated_at'] === null) { + $invalidProperties[] = "'updated_at' can't be null"; + } + if ($this->container['user_metadata'] === null) { + $invalidProperties[] = "'user_metadata' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets created_at + * + * @return \DateTime + */ + public function getCreatedAt() + { + return $this->container['created_at']; + } + + /** + * Sets created_at + * + * @param \DateTime $created_at created_at + * + * @return self + */ + public function setCreatedAt($created_at) + { + if (is_null($created_at)) { + throw new \InvalidArgumentException('non-nullable created_at cannot be null'); + } + $this->container['created_at'] = $created_at; + + return $this; + } + + /** + * Gets email + * + * @return string + */ + public function getEmail() + { + return $this->container['email']; + } + + /** + * Sets email + * + * @param string $email email + * + * @return self + */ + public function setEmail($email) + { + if (is_null($email)) { + throw new \InvalidArgumentException('non-nullable email cannot be null'); + } + $this->container['email'] = $email; + + return $this; + } + + /** + * Gets email_verified + * + * @return bool + */ + public function getEmailVerified() + { + return $this->container['email_verified']; + } + + /** + * Sets email_verified + * + * @param bool $email_verified email_verified + * + * @return self + */ + public function setEmailVerified($email_verified) + { + if (is_null($email_verified)) { + throw new \InvalidArgumentException('non-nullable email_verified cannot be null'); + } + $this->container['email_verified'] = $email_verified; + + return $this; + } + + /** + * Gets id + * + * @return string + */ + public function getId() + { + return $this->container['id']; + } + + /** + * Sets id + * + * @param string $id id + * + * @return self + */ + public function setId($id) + { + if (is_null($id)) { + throw new \InvalidArgumentException('non-nullable id cannot be null'); + } + $this->container['id'] = $id; + + return $this; + } + + /** + * Gets last_login_at + * + * @return \DateTime + */ + public function getLastLoginAt() + { + return $this->container['last_login_at']; + } + + /** + * Sets last_login_at + * + * @param \DateTime $last_login_at last_login_at + * + * @return self + */ + public function setLastLoginAt($last_login_at) + { + if (is_null($last_login_at)) { + throw new \InvalidArgumentException('non-nullable last_login_at cannot be null'); + } + $this->container['last_login_at'] = $last_login_at; + + return $this; + } + + /** + * Gets login_count + * + * @return int + */ + public function getLoginCount() + { + return $this->container['login_count']; + } + + /** + * Sets login_count + * + * @param int $login_count login_count + * + * @return self + */ + public function setLoginCount($login_count) + { + if (is_null($login_count)) { + throw new \InvalidArgumentException('non-nullable login_count cannot be null'); + } + $this->container['login_count'] = $login_count; + + return $this; + } + + /** + * Gets phone + * + * @return string + */ + public function getPhone() + { + return $this->container['phone']; + } + + /** + * Sets phone + * + * @param string $phone phone + * + * @return self + */ + public function setPhone($phone) + { + if (is_null($phone)) { + throw new \InvalidArgumentException('non-nullable phone cannot be null'); + } + $this->container['phone'] = $phone; + + return $this; + } + + /** + * Gets phone_verified + * + * @return bool + */ + public function getPhoneVerified() + { + return $this->container['phone_verified']; + } + + /** + * Sets phone_verified + * + * @param bool $phone_verified phone_verified + * + * @return self + */ + public function setPhoneVerified($phone_verified) + { + if (is_null($phone_verified)) { + throw new \InvalidArgumentException('non-nullable phone_verified cannot be null'); + } + $this->container['phone_verified'] = $phone_verified; + + return $this; + } + + /** + * Gets status + * + * @return \OpenAPI\Client\Model\UserStatus + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\UserStatus $status status + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + + /** + * Gets updated_at + * + * @return \DateTime + */ + public function getUpdatedAt() + { + return $this->container['updated_at']; + } + + /** + * Sets updated_at + * + * @param \DateTime $updated_at updated_at + * + * @return self + */ + public function setUpdatedAt($updated_at) + { + if (is_null($updated_at)) { + throw new \InvalidArgumentException('non-nullable updated_at cannot be null'); + } + $this->container['updated_at'] = $updated_at; + + return $this; + } + + /** + * Gets user_metadata + * + * @return object + */ + public function getUserMetadata() + { + return $this->container['user_metadata']; + } + + /** + * Sets user_metadata + * + * @param object $user_metadata user_metadata + * + * @return self + */ + public function setUserMetadata($user_metadata) + { + if (is_null($user_metadata)) { + array_push($this->openAPINullablesSetToNull, 'user_metadata'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('user_metadata', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['user_metadata'] = $user_metadata; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/generated/lib/Model/ListPaginatedUsersResponse.php b/generated/lib/Model/ListPaginatedUsersResponse.php new file mode 100644 index 0000000..2f554af --- /dev/null +++ b/generated/lib/Model/ListPaginatedUsersResponse.php @@ -0,0 +1,598 @@ + + */ +class ListPaginatedUsersResponse implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'ListPaginatedUsersResponse'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + '_links' => '\OpenAPI\Client\Model\PaginatedLinks', + 'created_before' => 'int', + 'limit' => 'int', + 'page' => 'int', + 'total_users' => 'int', + 'users' => '\OpenAPI\Client\Model\ListPaginatedUsersItem[]' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + '_links' => null, + 'created_before' => 'int64', + 'limit' => null, + 'page' => null, + 'total_users' => 'int64', + 'users' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + '_links' => false, + 'created_before' => false, + 'limit' => false, + 'page' => false, + 'total_users' => false, + 'users' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + '_links' => '_links', + 'created_before' => 'created_before', + 'limit' => 'limit', + 'page' => 'page', + 'total_users' => 'total_users', + 'users' => 'users' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + '_links' => 'setLinks', + 'created_before' => 'setCreatedBefore', + 'limit' => 'setLimit', + 'page' => 'setPage', + 'total_users' => 'setTotalUsers', + 'users' => 'setUsers' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + '_links' => 'getLinks', + 'created_before' => 'getCreatedBefore', + 'limit' => 'getLimit', + 'page' => 'getPage', + 'total_users' => 'getTotalUsers', + 'users' => 'getUsers' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('_links', $data ?? [], null); + $this->setIfExists('created_before', $data ?? [], null); + $this->setIfExists('limit', $data ?? [], null); + $this->setIfExists('page', $data ?? [], null); + $this->setIfExists('total_users', $data ?? [], null); + $this->setIfExists('users', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['_links'] === null) { + $invalidProperties[] = "'_links' can't be null"; + } + if ($this->container['created_before'] === null) { + $invalidProperties[] = "'created_before' can't be null"; + } + if ($this->container['limit'] === null) { + $invalidProperties[] = "'limit' can't be null"; + } + if ($this->container['page'] === null) { + $invalidProperties[] = "'page' can't be null"; + } + if ($this->container['total_users'] === null) { + $invalidProperties[] = "'total_users' can't be null"; + } + if ($this->container['users'] === null) { + $invalidProperties[] = "'users' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets _links + * + * @return \OpenAPI\Client\Model\PaginatedLinks + */ + public function getLinks() + { + return $this->container['_links']; + } + + /** + * Sets _links + * + * @param \OpenAPI\Client\Model\PaginatedLinks $_links _links + * + * @return self + */ + public function setLinks($_links) + { + if (is_null($_links)) { + throw new \InvalidArgumentException('non-nullable _links cannot be null'); + } + $this->container['_links'] = $_links; + + return $this; + } + + /** + * Gets created_before + * + * @return int + */ + public function getCreatedBefore() + { + return $this->container['created_before']; + } + + /** + * Sets created_before + * + * @param int $created_before time anchor (Unix timestamp) --> all users returned created before this timestamp + * + * @return self + */ + public function setCreatedBefore($created_before) + { + if (is_null($created_before)) { + throw new \InvalidArgumentException('non-nullable created_before cannot be null'); + } + $this->container['created_before'] = $created_before; + + return $this; + } + + /** + * Gets limit + * + * @return int + */ + public function getLimit() + { + return $this->container['limit']; + } + + /** + * Sets limit + * + * @param int $limit limit + * + * @return self + */ + public function setLimit($limit) + { + if (is_null($limit)) { + throw new \InvalidArgumentException('non-nullable limit cannot be null'); + } + $this->container['limit'] = $limit; + + return $this; + } + + /** + * Gets page + * + * @return int + */ + public function getPage() + { + return $this->container['page']; + } + + /** + * Sets page + * + * @param int $page page + * + * @return self + */ + public function setPage($page) + { + if (is_null($page)) { + throw new \InvalidArgumentException('non-nullable page cannot be null'); + } + $this->container['page'] = $page; + + return $this; + } + + /** + * Gets total_users + * + * @return int + */ + public function getTotalUsers() + { + return $this->container['total_users']; + } + + /** + * Sets total_users + * + * @param int $total_users total number of users for a particular query + * + * @return self + */ + public function setTotalUsers($total_users) + { + if (is_null($total_users)) { + throw new \InvalidArgumentException('non-nullable total_users cannot be null'); + } + $this->container['total_users'] = $total_users; + + return $this; + } + + /** + * Gets users + * + * @return \OpenAPI\Client\Model\ListPaginatedUsersItem[] + */ + public function getUsers() + { + return $this->container['users']; + } + + /** + * Sets users + * + * @param \OpenAPI\Client\Model\ListPaginatedUsersItem[] $users users + * + * @return self + */ + public function setUsers($users) + { + if (is_null($users)) { + throw new \InvalidArgumentException('non-nullable users cannot be null'); + } + $this->container['users'] = $users; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/generated/lib/Model/Model401Error.php b/generated/lib/Model/Model401Error.php index df8efad..2ef66f4 100644 --- a/generated/lib/Model/Model401Error.php +++ b/generated/lib/Model/Model401Error.php @@ -235,7 +235,8 @@ public function getModelName() return self::$openAPIModelName; } - public const CODE_INVALID_ACCESS_TOKEN = 'invalid_access_token'; + public const CODE_ACCESS_TOKEN = 'invalid_access_token'; + public const CODE_NONCE = 'invalid_nonce'; /** * Gets allowable values of the enum @@ -245,7 +246,8 @@ public function getModelName() public function getCodeAllowableValues() { return [ - self::CODE_INVALID_ACCESS_TOKEN, + self::CODE_ACCESS_TOKEN, + self::CODE_NONCE, ]; } diff --git a/generated/lib/Model/UpdateMagicLinkAuthMethod.php b/generated/lib/Model/Model403Error.php similarity index 72% rename from generated/lib/Model/UpdateMagicLinkAuthMethod.php rename to generated/lib/Model/Model403Error.php index 4d65a04..7d8a68f 100644 --- a/generated/lib/Model/UpdateMagicLinkAuthMethod.php +++ b/generated/lib/Model/Model403Error.php @@ -1,6 +1,6 @@ */ -class UpdateMagicLinkAuthMethod implements ModelInterface, ArrayAccess, \JsonSerializable +class Model403Error implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +50,7 @@ class UpdateMagicLinkAuthMethod implements ModelInterface, ArrayAccess, \JsonSer * * @var string */ - protected static $openAPIModelName = 'UpdateMagicLinkAuthMethod'; + protected static $openAPIModelName = '403Error'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,9 +58,8 @@ class UpdateMagicLinkAuthMethod implements ModelInterface, ArrayAccess, \JsonSer * @var string[] */ protected static $openAPITypes = [ - 'enabled' => 'bool', - 'ttl' => 'int', - 'ttl_display_unit' => '\OpenAPI\Client\Model\TtlDisplayUnit' + 'code' => 'string', + 'error' => 'string' ]; /** @@ -71,9 +70,8 @@ class UpdateMagicLinkAuthMethod implements ModelInterface, ArrayAccess, \JsonSer * @psalm-var array */ protected static $openAPIFormats = [ - 'enabled' => null, - 'ttl' => null, - 'ttl_display_unit' => null + 'code' => null, + 'error' => null ]; /** @@ -82,9 +80,8 @@ class UpdateMagicLinkAuthMethod implements ModelInterface, ArrayAccess, \JsonSer * @var boolean[] */ protected static array $openAPINullables = [ - 'enabled' => false, - 'ttl' => false, - 'ttl_display_unit' => false + 'code' => false, + 'error' => false ]; /** @@ -173,9 +170,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'enabled' => 'enabled', - 'ttl' => 'ttl', - 'ttl_display_unit' => 'ttl_display_unit' + 'code' => 'code', + 'error' => 'error' ]; /** @@ -184,9 +180,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'enabled' => 'setEnabled', - 'ttl' => 'setTtl', - 'ttl_display_unit' => 'setTtlDisplayUnit' + 'code' => 'setCode', + 'error' => 'setError' ]; /** @@ -195,9 +190,8 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'enabled' => 'getEnabled', - 'ttl' => 'getTtl', - 'ttl_display_unit' => 'getTtlDisplayUnit' + 'code' => 'getCode', + 'error' => 'getError' ]; /** @@ -241,6 +235,29 @@ public function getModelName() return self::$openAPIModelName; } + public const CODE_CANNOT_CREATE_ORGANIZATION_BILLING_PORTAL_SESSION = 'cannot_create_organization_billing_portal_session'; + public const CODE_CANNOT_CREATE_TRANSACTION = 'cannot_create_transaction'; + public const CODE_CANNOT_DELETE_ADMIN = 'cannot_delete_admin'; + public const CODE_CANNOT_DELETE_ORGANIZATION_MEMBER = 'cannot_delete_organization_member'; + public const CODE_CANNOT_SELF_UPDATE_ORGANIZATION_MEMBER = 'cannot_self_update_organization_member'; + public const CODE_OPERATION_NOT_ALLOWED = 'operation_not_allowed'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCodeAllowableValues() + { + return [ + self::CODE_CANNOT_CREATE_ORGANIZATION_BILLING_PORTAL_SESSION, + self::CODE_CANNOT_CREATE_TRANSACTION, + self::CODE_CANNOT_DELETE_ADMIN, + self::CODE_CANNOT_DELETE_ORGANIZATION_MEMBER, + self::CODE_CANNOT_SELF_UPDATE_ORGANIZATION_MEMBER, + self::CODE_OPERATION_NOT_ALLOWED, + ]; + } /** * Associative array for storing property values @@ -257,9 +274,8 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('ttl', $data ?? [], 300); - $this->setIfExists('ttl_display_unit', $data ?? [], null); + $this->setIfExists('code', $data ?? [], null); + $this->setIfExists('error', $data ?? [], null); } /** @@ -289,10 +305,21 @@ public function listInvalidProperties() { $invalidProperties = []; - if (!is_null($this->container['ttl']) && ($this->container['ttl'] < 60)) { - $invalidProperties[] = "invalid value for 'ttl', must be bigger than or equal to 60."; + if ($this->container['code'] === null) { + $invalidProperties[] = "'code' can't be null"; + } + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'code', must be one of '%s'", + $this->container['code'], + implode("', '", $allowedValues) + ); } + if ($this->container['error'] === null) { + $invalidProperties[] = "'error' can't be null"; + } return $invalidProperties; } @@ -309,89 +336,65 @@ public function valid() /** - * Gets enabled - * - * @return bool|null - */ - public function getEnabled() - { - return $this->container['enabled']; - } - - /** - * Sets enabled - * - * @param bool|null $enabled enabled + * Gets code * - * @return self - */ - public function setEnabled($enabled) - { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } - $this->container['enabled'] = $enabled; - - return $this; - } - - /** - * Gets ttl - * - * @return int|null + * @return string */ - public function getTtl() + public function getCode() { - return $this->container['ttl']; + return $this->container['code']; } /** - * Sets ttl + * Sets code * - * @param int|null $ttl Maximum time (IN SECONDS) for the auth to expire. + * @param string $code code * * @return self */ - public function setTtl($ttl) + public function setCode($code) { - if (is_null($ttl)) { - throw new \InvalidArgumentException('non-nullable ttl cannot be null'); + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); } - - if (($ttl < 60)) { - throw new \InvalidArgumentException('invalid value for $ttl when calling UpdateMagicLinkAuthMethod., must be bigger than or equal to 60.'); + $allowedValues = $this->getCodeAllowableValues(); + if (!in_array($code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'code', must be one of '%s'", + $code, + implode("', '", $allowedValues) + ) + ); } - - $this->container['ttl'] = $ttl; + $this->container['code'] = $code; return $this; } /** - * Gets ttl_display_unit + * Gets error * - * @return \OpenAPI\Client\Model\TtlDisplayUnit|null - * @deprecated + * @return string */ - public function getTtlDisplayUnit() + public function getError() { - return $this->container['ttl_display_unit']; + return $this->container['error']; } /** - * Sets ttl_display_unit + * Sets error * - * @param \OpenAPI\Client\Model\TtlDisplayUnit|null $ttl_display_unit ttl_display_unit + * @param string $error error * * @return self - * @deprecated */ - public function setTtlDisplayUnit($ttl_display_unit) + public function setError($error) { - if (is_null($ttl_display_unit)) { - throw new \InvalidArgumentException('non-nullable ttl_display_unit cannot be null'); + if (is_null($error)) { + throw new \InvalidArgumentException('non-nullable error cannot be null'); } - $this->container['ttl_display_unit'] = $ttl_display_unit; + $this->container['error'] = $error; return $this; } diff --git a/generated/lib/Model/UpdateOtpAuthMethod.php b/generated/lib/Model/Nonce.php similarity index 74% rename from generated/lib/Model/UpdateOtpAuthMethod.php rename to generated/lib/Model/Nonce.php index 00243f0..05a4848 100644 --- a/generated/lib/Model/UpdateOtpAuthMethod.php +++ b/generated/lib/Model/Nonce.php @@ -1,6 +1,6 @@ */ -class UpdateOtpAuthMethod implements ModelInterface, ArrayAccess, \JsonSerializable +class Nonce implements ModelInterface, ArrayAccess, \JsonSerializable { public const DISCRIMINATOR = null; @@ -50,7 +51,7 @@ class UpdateOtpAuthMethod implements ModelInterface, ArrayAccess, \JsonSerializa * * @var string */ - protected static $openAPIModelName = 'UpdateOtpAuthMethod'; + protected static $openAPIModelName = 'Nonce'; /** * Array of property to type mappings. Used for (de)serialization @@ -58,9 +59,7 @@ class UpdateOtpAuthMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @var string[] */ protected static $openAPITypes = [ - 'enabled' => 'bool', - 'ttl' => 'int', - 'ttl_display_unit' => '\OpenAPI\Client\Model\TtlDisplayUnit' + 'nonce' => 'string' ]; /** @@ -71,9 +70,7 @@ class UpdateOtpAuthMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @psalm-var array */ protected static $openAPIFormats = [ - 'enabled' => null, - 'ttl' => null, - 'ttl_display_unit' => null + 'nonce' => null ]; /** @@ -82,9 +79,7 @@ class UpdateOtpAuthMethod implements ModelInterface, ArrayAccess, \JsonSerializa * @var boolean[] */ protected static array $openAPINullables = [ - 'enabled' => false, - 'ttl' => false, - 'ttl_display_unit' => false + 'nonce' => false ]; /** @@ -173,9 +168,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ - 'enabled' => 'enabled', - 'ttl' => 'ttl', - 'ttl_display_unit' => 'ttl_display_unit' + 'nonce' => 'nonce' ]; /** @@ -184,9 +177,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ - 'enabled' => 'setEnabled', - 'ttl' => 'setTtl', - 'ttl_display_unit' => 'setTtlDisplayUnit' + 'nonce' => 'setNonce' ]; /** @@ -195,9 +186,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ - 'enabled' => 'getEnabled', - 'ttl' => 'getTtl', - 'ttl_display_unit' => 'getTtlDisplayUnit' + 'nonce' => 'getNonce' ]; /** @@ -257,9 +246,7 @@ public function getModelName() */ public function __construct(array $data = null) { - $this->setIfExists('enabled', $data ?? [], null); - $this->setIfExists('ttl', $data ?? [], 300); - $this->setIfExists('ttl_display_unit', $data ?? [], null); + $this->setIfExists('nonce', $data ?? [], null); } /** @@ -289,10 +276,9 @@ public function listInvalidProperties() { $invalidProperties = []; - if (!is_null($this->container['ttl']) && ($this->container['ttl'] < 60)) { - $invalidProperties[] = "invalid value for 'ttl', must be bigger than or equal to 60."; + if ($this->container['nonce'] === null) { + $invalidProperties[] = "'nonce' can't be null"; } - return $invalidProperties; } @@ -309,89 +295,28 @@ public function valid() /** - * Gets enabled - * - * @return bool|null - */ - public function getEnabled() - { - return $this->container['enabled']; - } - - /** - * Sets enabled - * - * @param bool|null $enabled enabled - * - * @return self - */ - public function setEnabled($enabled) - { - if (is_null($enabled)) { - throw new \InvalidArgumentException('non-nullable enabled cannot be null'); - } - $this->container['enabled'] = $enabled; - - return $this; - } - - /** - * Gets ttl + * Gets nonce * - * @return int|null - */ - public function getTtl() - { - return $this->container['ttl']; - } - - /** - * Sets ttl - * - * @param int|null $ttl Maximum time (IN SECONDS) for the auth to expire. - * - * @return self - */ - public function setTtl($ttl) - { - if (is_null($ttl)) { - throw new \InvalidArgumentException('non-nullable ttl cannot be null'); - } - - if (($ttl < 60)) { - throw new \InvalidArgumentException('invalid value for $ttl when calling UpdateOtpAuthMethod., must be bigger than or equal to 60.'); - } - - $this->container['ttl'] = $ttl; - - return $this; - } - - /** - * Gets ttl_display_unit - * - * @return \OpenAPI\Client\Model\TtlDisplayUnit|null - * @deprecated + * @return string */ - public function getTtlDisplayUnit() + public function getNonce() { - return $this->container['ttl_display_unit']; + return $this->container['nonce']; } /** - * Sets ttl_display_unit + * Sets nonce * - * @param \OpenAPI\Client\Model\TtlDisplayUnit|null $ttl_display_unit ttl_display_unit + * @param string $nonce nonce * * @return self - * @deprecated */ - public function setTtlDisplayUnit($ttl_display_unit) + public function setNonce($nonce) { - if (is_null($ttl_display_unit)) { - throw new \InvalidArgumentException('non-nullable ttl_display_unit cannot be null'); + if (is_null($nonce)) { + throw new \InvalidArgumentException('non-nullable nonce cannot be null'); } - $this->container['ttl_display_unit'] = $ttl_display_unit; + $this->container['nonce'] = $nonce; return $this; } diff --git a/generated/lib/Model/PaginatedLinks.php b/generated/lib/Model/PaginatedLinks.php new file mode 100644 index 0000000..369d0f9 --- /dev/null +++ b/generated/lib/Model/PaginatedLinks.php @@ -0,0 +1,561 @@ + + */ +class PaginatedLinks implements ModelInterface, ArrayAccess, \JsonSerializable +{ + public const DISCRIMINATOR = null; + + /** + * The original name of the model. + * + * @var string + */ + protected static $openAPIModelName = 'PaginatedLinks'; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @var string[] + */ + protected static $openAPITypes = [ + 'first' => '\OpenAPI\Client\Model\Link', + 'last' => '\OpenAPI\Client\Model\Link', + 'next' => '\OpenAPI\Client\Model\Link', + 'previous' => '\OpenAPI\Client\Model\Link', + 'self' => '\OpenAPI\Client\Model\Link' + ]; + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @var string[] + * @phpstan-var array + * @psalm-var array + */ + protected static $openAPIFormats = [ + 'first' => null, + 'last' => null, + 'next' => null, + 'previous' => null, + 'self' => null + ]; + + /** + * Array of nullable properties. Used for (de)serialization + * + * @var boolean[] + */ + protected static array $openAPINullables = [ + 'first' => false, + 'last' => false, + 'next' => false, + 'previous' => false, + 'self' => false + ]; + + /** + * If a nullable field gets set to null, insert it here + * + * @var boolean[] + */ + protected array $openAPINullablesSetToNull = []; + + /** + * Array of property to type mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPITypes() + { + return self::$openAPITypes; + } + + /** + * Array of property to format mappings. Used for (de)serialization + * + * @return array + */ + public static function openAPIFormats() + { + return self::$openAPIFormats; + } + + /** + * Array of nullable properties + * + * @return array + */ + protected static function openAPINullables(): array + { + return self::$openAPINullables; + } + + /** + * Array of nullable field names deliberately set to null + * + * @return boolean[] + */ + private function getOpenAPINullablesSetToNull(): array + { + return $this->openAPINullablesSetToNull; + } + + /** + * Setter - Array of nullable field names deliberately set to null + * + * @param boolean[] $openAPINullablesSetToNull + */ + private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void + { + $this->openAPINullablesSetToNull = $openAPINullablesSetToNull; + } + + /** + * Checks if a property is nullable + * + * @param string $property + * @return bool + */ + public static function isNullable(string $property): bool + { + return self::openAPINullables()[$property] ?? false; + } + + /** + * Checks if a nullable property is set to null. + * + * @param string $property + * @return bool + */ + public function isNullableSetToNull(string $property): bool + { + return in_array($property, $this->getOpenAPINullablesSetToNull(), true); + } + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @var string[] + */ + protected static $attributeMap = [ + 'first' => 'first', + 'last' => 'last', + 'next' => 'next', + 'previous' => 'previous', + 'self' => 'self' + ]; + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @var string[] + */ + protected static $setters = [ + 'first' => 'setFirst', + 'last' => 'setLast', + 'next' => 'setNext', + 'previous' => 'setPrevious', + 'self' => 'setSelf' + ]; + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @var string[] + */ + protected static $getters = [ + 'first' => 'getFirst', + 'last' => 'getLast', + 'next' => 'getNext', + 'previous' => 'getPrevious', + 'self' => 'getSelf' + ]; + + /** + * Array of attributes where the key is the local name, + * and the value is the original name + * + * @return array + */ + public static function attributeMap() + { + return self::$attributeMap; + } + + /** + * Array of attributes to setter functions (for deserialization of responses) + * + * @return array + */ + public static function setters() + { + return self::$setters; + } + + /** + * Array of attributes to getter functions (for serialization of requests) + * + * @return array + */ + public static function getters() + { + return self::$getters; + } + + /** + * The original name of the model. + * + * @return string + */ + public function getModelName() + { + return self::$openAPIModelName; + } + + + /** + * Associative array for storing property values + * + * @var mixed[] + */ + protected $container = []; + + /** + * Constructor + * + * @param mixed[] $data Associated array of property values + * initializing the model + */ + public function __construct(array $data = null) + { + $this->setIfExists('first', $data ?? [], null); + $this->setIfExists('last', $data ?? [], null); + $this->setIfExists('next', $data ?? [], null); + $this->setIfExists('previous', $data ?? [], null); + $this->setIfExists('self', $data ?? [], null); + } + + /** + * Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName + * is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the + * $this->openAPINullablesSetToNull array + * + * @param string $variableName + * @param array $fields + * @param mixed $defaultValue + */ + private function setIfExists(string $variableName, array $fields, $defaultValue): void + { + if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) { + $this->openAPINullablesSetToNull[] = $variableName; + } + + $this->container[$variableName] = $fields[$variableName] ?? $defaultValue; + } + + /** + * Show all the invalid properties with reasons. + * + * @return array invalid properties with reasons + */ + public function listInvalidProperties() + { + $invalidProperties = []; + + if ($this->container['first'] === null) { + $invalidProperties[] = "'first' can't be null"; + } + if ($this->container['last'] === null) { + $invalidProperties[] = "'last' can't be null"; + } + if ($this->container['next'] === null) { + $invalidProperties[] = "'next' can't be null"; + } + if ($this->container['previous'] === null) { + $invalidProperties[] = "'previous' can't be null"; + } + if ($this->container['self'] === null) { + $invalidProperties[] = "'self' can't be null"; + } + return $invalidProperties; + } + + /** + * Validate all the properties in the model + * return true if all passed + * + * @return bool True if all properties are valid + */ + public function valid() + { + return count($this->listInvalidProperties()) === 0; + } + + + /** + * Gets first + * + * @return \OpenAPI\Client\Model\Link + */ + public function getFirst() + { + return $this->container['first']; + } + + /** + * Sets first + * + * @param \OpenAPI\Client\Model\Link $first first + * + * @return self + */ + public function setFirst($first) + { + if (is_null($first)) { + throw new \InvalidArgumentException('non-nullable first cannot be null'); + } + $this->container['first'] = $first; + + return $this; + } + + /** + * Gets last + * + * @return \OpenAPI\Client\Model\Link + */ + public function getLast() + { + return $this->container['last']; + } + + /** + * Sets last + * + * @param \OpenAPI\Client\Model\Link $last last + * + * @return self + */ + public function setLast($last) + { + if (is_null($last)) { + throw new \InvalidArgumentException('non-nullable last cannot be null'); + } + $this->container['last'] = $last; + + return $this; + } + + /** + * Gets next + * + * @return \OpenAPI\Client\Model\Link + */ + public function getNext() + { + return $this->container['next']; + } + + /** + * Sets next + * + * @param \OpenAPI\Client\Model\Link $next next + * + * @return self + */ + public function setNext($next) + { + if (is_null($next)) { + throw new \InvalidArgumentException('non-nullable next cannot be null'); + } + $this->container['next'] = $next; + + return $this; + } + + /** + * Gets previous + * + * @return \OpenAPI\Client\Model\Link + */ + public function getPrevious() + { + return $this->container['previous']; + } + + /** + * Sets previous + * + * @param \OpenAPI\Client\Model\Link $previous previous + * + * @return self + */ + public function setPrevious($previous) + { + if (is_null($previous)) { + throw new \InvalidArgumentException('non-nullable previous cannot be null'); + } + $this->container['previous'] = $previous; + + return $this; + } + + /** + * Gets self + * + * @return \OpenAPI\Client\Model\Link + */ + public function getSelf() + { + return $this->container['self']; + } + + /** + * Sets self + * + * @param \OpenAPI\Client\Model\Link $self self + * + * @return self + */ + public function setSelf($self) + { + if (is_null($self)) { + throw new \InvalidArgumentException('non-nullable self cannot be null'); + } + $this->container['self'] = $self; + + return $this; + } + /** + * Returns true if offset exists. False otherwise. + * + * @param integer $offset Offset + * + * @return boolean + */ + public function offsetExists($offset): bool + { + return isset($this->container[$offset]); + } + + /** + * Gets offset. + * + * @param integer $offset Offset + * + * @return mixed|null + */ + #[\ReturnTypeWillChange] + public function offsetGet($offset) + { + return $this->container[$offset] ?? null; + } + + /** + * Sets value based on offset. + * + * @param int|null $offset Offset + * @param mixed $value Value to be set + * + * @return void + */ + public function offsetSet($offset, $value): void + { + if (is_null($offset)) { + $this->container[] = $value; + } else { + $this->container[$offset] = $value; + } + } + + /** + * Unsets offset. + * + * @param integer $offset Offset + * + * @return void + */ + public function offsetUnset($offset): void + { + unset($this->container[$offset]); + } + + /** + * Serializes the object to a value that can be serialized natively by json_encode(). + * @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed Returns data which can be serialized by json_encode(), which is a value + * of any type other than a resource. + */ + #[\ReturnTypeWillChange] + public function jsonSerialize() + { + return ObjectSerializer::sanitizeForSerialization($this); + } + + /** + * Gets the string presentation of the object + * + * @return string + */ + public function __toString() + { + return json_encode( + ObjectSerializer::sanitizeForSerialization($this), + JSON_PRETTY_PRINT + ); + } + + /** + * Gets a header-safe presentation of the object + * + * @return string + */ + public function toHeaderValue() + { + return json_encode(ObjectSerializer::sanitizeForSerialization($this)); + } +} + + diff --git a/generated/lib/Model/UserEventStatus.php b/generated/lib/Model/UserEventStatus.php new file mode 100644 index 0000000..8819192 --- /dev/null +++ b/generated/lib/Model/UserEventStatus.php @@ -0,0 +1,63 @@ + '\DateTime', + 'completed_at' => '\DateTime', 'id' => 'string', 'ip_addr' => 'string', + 'status' => '\OpenAPI\Client\Model\UserEventStatus', 'type' => 'string', 'user_agent' => 'string' ]; @@ -74,8 +76,10 @@ class UserRecentEvent implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static $openAPIFormats = [ 'created_at' => 'date-time', + 'completed_at' => 'date-time', 'id' => null, 'ip_addr' => null, + 'status' => null, 'type' => null, 'user_agent' => null ]; @@ -87,8 +91,10 @@ class UserRecentEvent implements ModelInterface, ArrayAccess, \JsonSerializable */ protected static array $openAPINullables = [ 'created_at' => false, + 'completed_at' => true, 'id' => false, 'ip_addr' => false, + 'status' => false, 'type' => false, 'user_agent' => false ]; @@ -180,8 +186,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $attributeMap = [ 'created_at' => 'created_at', + 'completed_at' => 'completed_at', 'id' => 'id', 'ip_addr' => 'ip_addr', + 'status' => 'status', 'type' => 'type', 'user_agent' => 'user_agent' ]; @@ -193,8 +201,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $setters = [ 'created_at' => 'setCreatedAt', + 'completed_at' => 'setCompletedAt', 'id' => 'setId', 'ip_addr' => 'setIpAddr', + 'status' => 'setStatus', 'type' => 'setType', 'user_agent' => 'setUserAgent' ]; @@ -206,8 +216,10 @@ public function isNullableSetToNull(string $property): bool */ protected static $getters = [ 'created_at' => 'getCreatedAt', + 'completed_at' => 'getCompletedAt', 'id' => 'getId', 'ip_addr' => 'getIpAddr', + 'status' => 'getStatus', 'type' => 'getType', 'user_agent' => 'getUserAgent' ]; @@ -270,8 +282,10 @@ public function getModelName() public function __construct(array $data = null) { $this->setIfExists('created_at', $data ?? [], null); + $this->setIfExists('completed_at', $data ?? [], null); $this->setIfExists('id', $data ?? [], null); $this->setIfExists('ip_addr', $data ?? [], null); + $this->setIfExists('status', $data ?? [], null); $this->setIfExists('type', $data ?? [], null); $this->setIfExists('user_agent', $data ?? [], null); } @@ -306,12 +320,18 @@ public function listInvalidProperties() if ($this->container['created_at'] === null) { $invalidProperties[] = "'created_at' can't be null"; } + if ($this->container['completed_at'] === null) { + $invalidProperties[] = "'completed_at' can't be null"; + } if ($this->container['id'] === null) { $invalidProperties[] = "'id' can't be null"; } if ($this->container['ip_addr'] === null) { $invalidProperties[] = "'ip_addr' can't be null"; } + if ($this->container['status'] === null) { + $invalidProperties[] = "'status' can't be null"; + } if ($this->container['type'] === null) { $invalidProperties[] = "'type' can't be null"; } @@ -360,6 +380,40 @@ public function setCreatedAt($created_at) return $this; } + /** + * Gets completed_at + * + * @return \DateTime + */ + public function getCompletedAt() + { + return $this->container['completed_at']; + } + + /** + * Sets completed_at + * + * @param \DateTime $completed_at completed_at + * + * @return self + */ + public function setCompletedAt($completed_at) + { + if (is_null($completed_at)) { + array_push($this->openAPINullablesSetToNull, 'completed_at'); + } else { + $nullablesSetToNull = $this->getOpenAPINullablesSetToNull(); + $index = array_search('completed_at', $nullablesSetToNull); + if ($index !== FALSE) { + unset($nullablesSetToNull[$index]); + $this->setOpenAPINullablesSetToNull($nullablesSetToNull); + } + } + $this->container['completed_at'] = $completed_at; + + return $this; + } + /** * Gets id * @@ -414,6 +468,33 @@ public function setIpAddr($ip_addr) return $this; } + /** + * Gets status + * + * @return \OpenAPI\Client\Model\UserEventStatus + */ + public function getStatus() + { + return $this->container['status']; + } + + /** + * Sets status + * + * @param \OpenAPI\Client\Model\UserEventStatus $status status + * + * @return self + */ + public function setStatus($status) + { + if (is_null($status)) { + throw new \InvalidArgumentException('non-nullable status cannot be null'); + } + $this->container['status'] = $status; + + return $this; + } + /** * Gets type * diff --git a/generated/test/Api/UsersApiTest.php b/generated/test/Api/UsersApiTest.php index 2cb86bd..2494c45 100644 --- a/generated/test/Api/UsersApiTest.php +++ b/generated/test/Api/UsersApiTest.php @@ -132,6 +132,18 @@ public function testGetUser() $this->markTestIncomplete('Not implemented'); } + /** + * Test case for listPaginatedUsers + * + * List Users. + * + */ + public function testListPaginatedUsers() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test case for updateUser * diff --git a/generated/test/Model/UpdatePasskeysAuthMethodTest.php b/generated/test/Model/LinkTest.php similarity index 81% rename from generated/test/Model/UpdatePasskeysAuthMethodTest.php rename to generated/test/Model/LinkTest.php index 8e56018..c231b96 100644 --- a/generated/test/Model/UpdatePasskeysAuthMethodTest.php +++ b/generated/test/Model/LinkTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); } /** - * Test attribute "enabled" + * Test attribute "href" */ - public function testPropertyEnabled() + public function testPropertyHref() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/generated/test/Model/ListPaginatedUsersItemTest.php b/generated/test/Model/ListPaginatedUsersItemTest.php new file mode 100644 index 0000000..b2188a3 --- /dev/null +++ b/generated/test/Model/ListPaginatedUsersItemTest.php @@ -0,0 +1,181 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "created_at" + */ + public function testPropertyCreatedAt() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "email" + */ + public function testPropertyEmail() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "email_verified" + */ + public function testPropertyEmailVerified() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "id" + */ + public function testPropertyId() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "last_login_at" + */ + public function testPropertyLastLoginAt() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "login_count" + */ + public function testPropertyLoginCount() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "phone" + */ + public function testPropertyPhone() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "phone_verified" + */ + public function testPropertyPhoneVerified() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "status" + */ + public function testPropertyStatus() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "updated_at" + */ + public function testPropertyUpdatedAt() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "user_metadata" + */ + public function testPropertyUserMetadata() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/generated/test/Model/ListPaginatedUsersResponseTest.php b/generated/test/Model/ListPaginatedUsersResponseTest.php new file mode 100644 index 0000000..596a7a8 --- /dev/null +++ b/generated/test/Model/ListPaginatedUsersResponseTest.php @@ -0,0 +1,136 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "_links" + */ + public function testPropertyLinks() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "created_before" + */ + public function testPropertyCreatedBefore() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "limit" + */ + public function testPropertyLimit() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "page" + */ + public function testPropertyPage() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "total_users" + */ + public function testPropertyTotalUsers() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "users" + */ + public function testPropertyUsers() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/generated/test/Model/UpdateOtpAuthMethodTest.php b/generated/test/Model/Model403ErrorTest.php similarity index 74% rename from generated/test/Model/UpdateOtpAuthMethodTest.php rename to generated/test/Model/Model403ErrorTest.php index 79e5579..63ab0c4 100644 --- a/generated/test/Model/UpdateOtpAuthMethodTest.php +++ b/generated/test/Model/Model403ErrorTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); } /** - * Test attribute "enabled" + * Test attribute "code" */ - public function testPropertyEnabled() + public function testPropertyCode() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "ttl" + * Test attribute "error" */ - public function testPropertyTtl() - { - // TODO: implement - $this->markTestIncomplete('Not implemented'); - } - - /** - * Test attribute "ttl_display_unit" - */ - public function testPropertyTtlDisplayUnit() + public function testPropertyError() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/generated/test/Model/NonceTest.php b/generated/test/Model/NonceTest.php new file mode 100644 index 0000000..52fc07c --- /dev/null +++ b/generated/test/Model/NonceTest.php @@ -0,0 +1,91 @@ +markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "nonce" + */ + public function testPropertyNonce() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } +} diff --git a/generated/test/Model/UpdateMagicLinkAuthMethodTest.php b/generated/test/Model/PaginatedLinksTest.php similarity index 69% rename from generated/test/Model/UpdateMagicLinkAuthMethodTest.php rename to generated/test/Model/PaginatedLinksTest.php index 809c7ab..4c47ac3 100644 --- a/generated/test/Model/UpdateMagicLinkAuthMethodTest.php +++ b/generated/test/Model/PaginatedLinksTest.php @@ -1,6 +1,6 @@ markTestIncomplete('Not implemented'); } /** - * Test attribute "enabled" + * Test attribute "first" */ - public function testPropertyEnabled() + public function testPropertyFirst() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "ttl" + * Test attribute "last" */ - public function testPropertyTtl() + public function testPropertyLast() { // TODO: implement $this->markTestIncomplete('Not implemented'); } /** - * Test attribute "ttl_display_unit" + * Test attribute "next" */ - public function testPropertyTtlDisplayUnit() + public function testPropertyNext() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "previous" + */ + public function testPropertyPrevious() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + + /** + * Test attribute "self" + */ + public function testPropertySelf() { // TODO: implement $this->markTestIncomplete('Not implemented'); diff --git a/generated/test/Model/UserEventStatusTest.php b/generated/test/Model/UserEventStatusTest.php new file mode 100644 index 0000000..ca175da --- /dev/null +++ b/generated/test/Model/UserEventStatusTest.php @@ -0,0 +1,82 @@ +markTestIncomplete('Not implemented'); + } +} diff --git a/generated/test/Model/UserRecentEventTest.php b/generated/test/Model/UserRecentEventTest.php index 3e6b61b..7bcd720 100644 --- a/generated/test/Model/UserRecentEventTest.php +++ b/generated/test/Model/UserRecentEventTest.php @@ -89,6 +89,15 @@ public function testPropertyCreatedAt() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "completed_at" + */ + public function testPropertyCompletedAt() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "id" */ @@ -107,6 +116,15 @@ public function testPropertyIpAddr() $this->markTestIncomplete('Not implemented'); } + /** + * Test attribute "status" + */ + public function testPropertyStatus() + { + // TODO: implement + $this->markTestIncomplete('Not implemented'); + } + /** * Test attribute "type" */