Add facilities, contracts, orders, value lists, audit log, and desktop app modules

Extends omsorgCore with full CRUD for Facility/Contract/Order plus
configurable value lists and an audit trail, and wires the omsorgapp
frontend up to the new facilities, settings, and audit-log modules;
includes a sidebar active-nav-item highlight.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Felix Kemmler
2026-08-08 23:29:16 +02:00
co-authored by Claude Sonnet 5
parent ee74ed65f5
commit e9e96a57dc
528 changed files with 96814 additions and 456 deletions
@@ -0,0 +1,15 @@
# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore
composer.phar
/vendor/
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
# php-cs-fixer cache
.php_cs.cache
.php-cs-fixer.cache
# PHPUnit cache
.phpunit.result.cache
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
@@ -0,0 +1,215 @@
.gitignore
.openapi-generator-ignore
.php-cs-fixer.dist.php
.travis.yml
README.md
composer.json
docs/Api/AdminEmailApi.md
docs/Api/AdminSessionsApi.md
docs/Api/AuditLogApi.md
docs/Api/AuthApi.md
docs/Api/ContractsApi.md
docs/Api/EmployeesApi.md
docs/Api/FacilitiesApi.md
docs/Api/FacilityContactsApi.md
docs/Api/HealthApi.md
docs/Api/OrdersApi.md
docs/Api/RolesApi.md
docs/Api/UsersApi.md
docs/Api/ValueListsApi.md
docs/Model/AddUserPermissionOverrideRequest.md
docs/Model/AuditLogEntryResponse.md
docs/Model/AuditLogEntryResponsePagedResponse.md
docs/Model/ChangePasswordRequest.md
docs/Model/ContractResponse.md
docs/Model/ContractResponsePagedResponse.md
docs/Model/CreateContractRequest.md
docs/Model/CreateEmployeeRequest.md
docs/Model/CreateFacilityContactRequest.md
docs/Model/CreateFacilityRequest.md
docs/Model/CreateOrderRequest.md
docs/Model/CreateRoleRequest.md
docs/Model/CreateUserRequest.md
docs/Model/CreateValueListItemRequest.md
docs/Model/EmployeeResponse.md
docs/Model/EmployeeResponsePagedResponse.md
docs/Model/FacilityContactResponse.md
docs/Model/FacilityResponse.md
docs/Model/FacilityResponsePagedResponse.md
docs/Model/ForgotPasswordRequestRequest.md
docs/Model/ForgotPasswordRequestResponse.md
docs/Model/ForgotPasswordResetRequest.md
docs/Model/ForgotPasswordVerifyRequest.md
docs/Model/ForgotPasswordVerifyResponse.md
docs/Model/LoginRequest.md
docs/Model/LoginResponse.md
docs/Model/LogoutRequest.md
docs/Model/MeResponse.md
docs/Model/OrderResponse.md
docs/Model/OrderResponsePagedResponse.md
docs/Model/PasswordPolicyResponse.md
docs/Model/PasswordResetTemplateResponse.md
docs/Model/PermissionDto.md
docs/Model/RefreshRequest.md
docs/Model/ResetUserPasswordRequest.md
docs/Model/RolePermissionsResponse.md
docs/Model/RoleResponse.md
docs/Model/SendTestEmailRequest.md
docs/Model/SessionResponse.md
docs/Model/UpdateContractRequest.md
docs/Model/UpdateEmployeeRequest.md
docs/Model/UpdateFacilityContactRequest.md
docs/Model/UpdateFacilityRequest.md
docs/Model/UpdateOrderRequest.md
docs/Model/UpdateRolePermissionsRequest.md
docs/Model/UpdateUserRequest.md
docs/Model/UpdateValueListItemRequest.md
docs/Model/UserPermissionOverrideResponse.md
docs/Model/UserResponse.md
docs/Model/ValueListItemResponse.md
docs/Model/ValueListResponse.md
docs/Model/ValueListTransitionRequest.md
docs/Model/ValueListTransitionResponse.md
docs/Model/ValueListUsageResponse.md
git_push.sh
lib/Api/AdminEmailApi.php
lib/Api/AdminSessionsApi.php
lib/Api/AuditLogApi.php
lib/Api/AuthApi.php
lib/Api/ContractsApi.php
lib/Api/EmployeesApi.php
lib/Api/FacilitiesApi.php
lib/Api/FacilityContactsApi.php
lib/Api/HealthApi.php
lib/Api/OrdersApi.php
lib/Api/RolesApi.php
lib/Api/UsersApi.php
lib/Api/ValueListsApi.php
lib/ApiException.php
lib/Configuration.php
lib/FormDataProcessor.php
lib/HeaderSelector.php
lib/Model/AddUserPermissionOverrideRequest.php
lib/Model/AuditLogEntryResponse.php
lib/Model/AuditLogEntryResponsePagedResponse.php
lib/Model/ChangePasswordRequest.php
lib/Model/ContractResponse.php
lib/Model/ContractResponsePagedResponse.php
lib/Model/CreateContractRequest.php
lib/Model/CreateEmployeeRequest.php
lib/Model/CreateFacilityContactRequest.php
lib/Model/CreateFacilityRequest.php
lib/Model/CreateOrderRequest.php
lib/Model/CreateRoleRequest.php
lib/Model/CreateUserRequest.php
lib/Model/CreateValueListItemRequest.php
lib/Model/EmployeeResponse.php
lib/Model/EmployeeResponsePagedResponse.php
lib/Model/FacilityContactResponse.php
lib/Model/FacilityResponse.php
lib/Model/FacilityResponsePagedResponse.php
lib/Model/ForgotPasswordRequestRequest.php
lib/Model/ForgotPasswordRequestResponse.php
lib/Model/ForgotPasswordResetRequest.php
lib/Model/ForgotPasswordVerifyRequest.php
lib/Model/ForgotPasswordVerifyResponse.php
lib/Model/LoginRequest.php
lib/Model/LoginResponse.php
lib/Model/LogoutRequest.php
lib/Model/MeResponse.php
lib/Model/ModelInterface.php
lib/Model/OrderResponse.php
lib/Model/OrderResponsePagedResponse.php
lib/Model/PasswordPolicyResponse.php
lib/Model/PasswordResetTemplateResponse.php
lib/Model/PermissionDto.php
lib/Model/RefreshRequest.php
lib/Model/ResetUserPasswordRequest.php
lib/Model/RolePermissionsResponse.php
lib/Model/RoleResponse.php
lib/Model/SendTestEmailRequest.php
lib/Model/SessionResponse.php
lib/Model/UpdateContractRequest.php
lib/Model/UpdateEmployeeRequest.php
lib/Model/UpdateFacilityContactRequest.php
lib/Model/UpdateFacilityRequest.php
lib/Model/UpdateOrderRequest.php
lib/Model/UpdateRolePermissionsRequest.php
lib/Model/UpdateUserRequest.php
lib/Model/UpdateValueListItemRequest.php
lib/Model/UserPermissionOverrideResponse.php
lib/Model/UserResponse.php
lib/Model/ValueListItemResponse.php
lib/Model/ValueListResponse.php
lib/Model/ValueListTransitionRequest.php
lib/Model/ValueListTransitionResponse.php
lib/Model/ValueListUsageResponse.php
lib/ObjectSerializer.php
phpunit.xml.dist
test/Api/AdminEmailApiTest.php
test/Api/AdminSessionsApiTest.php
test/Api/AuditLogApiTest.php
test/Api/AuthApiTest.php
test/Api/ContractsApiTest.php
test/Api/EmployeesApiTest.php
test/Api/FacilitiesApiTest.php
test/Api/FacilityContactsApiTest.php
test/Api/HealthApiTest.php
test/Api/OrdersApiTest.php
test/Api/RolesApiTest.php
test/Api/UsersApiTest.php
test/Api/ValueListsApiTest.php
test/Model/AddUserPermissionOverrideRequestTest.php
test/Model/AuditLogEntryResponsePagedResponseTest.php
test/Model/AuditLogEntryResponseTest.php
test/Model/ChangePasswordRequestTest.php
test/Model/ContractResponsePagedResponseTest.php
test/Model/ContractResponseTest.php
test/Model/CreateContractRequestTest.php
test/Model/CreateEmployeeRequestTest.php
test/Model/CreateFacilityContactRequestTest.php
test/Model/CreateFacilityRequestTest.php
test/Model/CreateOrderRequestTest.php
test/Model/CreateRoleRequestTest.php
test/Model/CreateUserRequestTest.php
test/Model/CreateValueListItemRequestTest.php
test/Model/EmployeeResponsePagedResponseTest.php
test/Model/EmployeeResponseTest.php
test/Model/FacilityContactResponseTest.php
test/Model/FacilityResponsePagedResponseTest.php
test/Model/FacilityResponseTest.php
test/Model/ForgotPasswordRequestRequestTest.php
test/Model/ForgotPasswordRequestResponseTest.php
test/Model/ForgotPasswordResetRequestTest.php
test/Model/ForgotPasswordVerifyRequestTest.php
test/Model/ForgotPasswordVerifyResponseTest.php
test/Model/LoginRequestTest.php
test/Model/LoginResponseTest.php
test/Model/LogoutRequestTest.php
test/Model/MeResponseTest.php
test/Model/OrderResponsePagedResponseTest.php
test/Model/OrderResponseTest.php
test/Model/PasswordPolicyResponseTest.php
test/Model/PasswordResetTemplateResponseTest.php
test/Model/PermissionDtoTest.php
test/Model/RefreshRequestTest.php
test/Model/ResetUserPasswordRequestTest.php
test/Model/RolePermissionsResponseTest.php
test/Model/RoleResponseTest.php
test/Model/SendTestEmailRequestTest.php
test/Model/SessionResponseTest.php
test/Model/UpdateContractRequestTest.php
test/Model/UpdateEmployeeRequestTest.php
test/Model/UpdateFacilityContactRequestTest.php
test/Model/UpdateFacilityRequestTest.php
test/Model/UpdateOrderRequestTest.php
test/Model/UpdateRolePermissionsRequestTest.php
test/Model/UpdateUserRequestTest.php
test/Model/UpdateValueListItemRequestTest.php
test/Model/UserPermissionOverrideResponseTest.php
test/Model/UserResponseTest.php
test/Model/ValueListItemResponseTest.php
test/Model/ValueListResponseTest.php
test/Model/ValueListTransitionRequestTest.php
test/Model/ValueListTransitionResponseTest.php
test/Model/ValueListUsageResponseTest.php
@@ -0,0 +1 @@
7.14.0
@@ -0,0 +1,29 @@
<?php
/**
* @generated
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/HEAD/doc/config.rst
*/
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('vendor')
->exclude('test')
->exclude('tests')
;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'phpdoc_order' => true,
'array_syntax' => [ 'syntax' => 'short' ],
'strict_comparison' => true,
'strict_param' => true,
'no_trailing_whitespace' => false,
'no_trailing_whitespace_in_comment' => false,
'braces' => false,
'single_blank_line_at_eof' => false,
'blank_line_after_namespace' => false,
'no_leading_import_slash' => false,
])
->setFinder($finder)
;
@@ -0,0 +1,8 @@
language: php
# Bionic environment has preinstalled PHP from 7.1 to 7.4
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
php:
- 7.4
before_install: "composer install"
script: "vendor/bin/phpunit"
@@ -0,0 +1,63 @@
# Anleitung — omsorgcore-client-php
Generierter PHP-Client für die `omsorgCore`-API, erzeugt mit [openapi-generator-cli](https://github.com/OpenAPITools/openapi-generator) aus der Swagger/OpenAPI-JSON des Backends. **Ersetzt (noch) nicht** den handgeschriebenen Wrapper `lib/omsorgCoreClient.php` (reiner cURL-Wrapper, eigenes Rückgabeformat `['ok', 'status', 'data']`) — der bleibt unverändert im Einsatz. Dieser Client ist eine zusätzliche, eigenständige Bibliothek.
`README.md` in diesem Ordner wird bei jeder Generierung automatisch neu geschrieben (Standard-Output von openapi-generator, dokumentiert die generierten API-Klassen) — diese Datei hier nicht, sie bleibt stabil.
## Voraussetzungen
- Node.js + npx (für `openapi-generator-cli`, keine separate Node-Installation im restlichen `omsorgWeb` nötig — nur für die Generierung selbst)
- Java (wird von `openapi-generator-cli` intern benötigt, `java` muss im `PATH` sein)
- **Composer** (für den generierten PHP-Client — im Gegensatz zum Rest von `omsorgWeb`, das bewusst framework-/Composer-frei ist. Installation z. B. `sudo apt install composer` oder offizielles Installer-Skript von [getcomposer.org](https://getcomposer.org/download/))
- `omsorgCore` muss lokal im **Development-Modus** laufen, da Swagger nur dort aktiv ist
## API lokal starten (für die Generierung)
```bash
cd omsorgCore
ASPNETCORE_ENVIRONMENT=Development dotnet run --project src/OmsorgCore.Api
# → Swagger-JSON unter http://localhost:5245/swagger/v1/swagger.json
```
## Client neu generieren
```bash
cd omsorgWeb/mitarbeiter-app/api-client-php
./generate.sh
```
Nimmt die Backend-URL aus `OMSORG_CORE_URL` (Default `http://localhost:5245`, dieselbe Konvention wie `OMSORG_CORE_URL` in `omsorgapp` bzw. die Basis-URL in `lib/omsorgCoreClient.php`). Überschreibt `lib/`, `docs/`, `test/`, `README.md`, `composer.json`, `.gitignore` mit dem aktuellen generierten Stand — danach `git diff` prüfen, bevor committet wird.
## Abhängigkeiten installieren
```bash
composer install
```
Installiert u. a. `guzzlehttp/guzzle` (HTTP-Client, vom generierten Code genutzt) nach `vendor/`. `vendor/` ist `.gitignore`'t — nur der generierte Quellcode unter `lib/` wird eingecheckt.
## Verwendung (Beispiel)
```php
<?php
require_once __DIR__ . '/api-client-php/vendor/autoload.php';
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()
->setHost(getenv('OMSORG_CORE_URL') ?: 'http://localhost:5245');
$authApi = new OmsorgCoreClient\Api\AuthApi(new GuzzleHttp\Client(), $config);
$loginRequest = new OmsorgCoreClient\Model\LoginRequest([
'username' => 'admin',
'password' => 'abersicher',
]);
$loginResponse = $authApi->apiAuthLoginPost($loginRequest);
echo $loginResponse->getAccessToken();
```
Jeder Controller aus `omsorgCore` hat eine eigene `Api`-Klasse unter `OmsorgCoreClient\Api\` (`AuthApi`, `EmployeesApi`, `FacilitiesApi`, `ContractsApi`, `OrdersApi`, `RolesApi`, `UsersApi`, `ValueListsApi`, `AuditLogApi`, `AdminSessionsApi`, `AdminEmailApi`, `HealthApi`) — siehe `docs/Api/` für die vollständige Methodenliste je Klasse. (Namespace ist `OmsorgCoreClient`, nicht `OmsorgCore\Client` — das `\\`-Escaping im `invokerPackage`-Parameter von `generate.sh` wurde vom Generator beim ersten Lauf nicht wie erwartet aufgelöst, siehe `composer.json`s `psr-4`-Mapping.)
## Wichtig: nach Backend-Änderungen
Sobald sich Controller/DTOs in `omsorgCore` ändern (neue Endpunkte, neue Felder in Requests/Responses), sollte dieser Client neu generiert und der Diff mitcommittet werden — sonst driftet er unbemerkt vom tatsächlichen Backend-Vertrag ab.
@@ -0,0 +1,215 @@
# omsorgcore-client-php
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
## Installation & Usage
### Requirements
PHP 8.1 and later.
### Composer
To install the bindings via [Composer](https://getcomposer.org/), add the following to `composer.json`:
```json
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
```
Then run `composer install`
### Manual Installation
Download the files and include `autoload.php`:
```php
<?php
require_once('/path/to/omsorgcore-client-php/vendor/autoload.php');
```
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AdminEmailApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->apiAdminEmailPasswordResetTemplateGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminEmailApi->apiAdminEmailPasswordResetTemplateGet: ', $e->getMessage(), PHP_EOL;
}
```
## API Endpoints
All URIs are relative to *http://localhost*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AdminEmailApi* | [**apiAdminEmailPasswordResetTemplateGet**](docs/Api/AdminEmailApi.md#apiadminemailpasswordresettemplateget) | **GET** /api/admin/email/password-reset-template |
*AdminEmailApi* | [**apiAdminEmailTestSendPost**](docs/Api/AdminEmailApi.md#apiadminemailtestsendpost) | **POST** /api/admin/email/test-send |
*AdminSessionsApi* | [**apiAdminSessionsGet**](docs/Api/AdminSessionsApi.md#apiadminsessionsget) | **GET** /api/admin/sessions |
*AdminSessionsApi* | [**apiAdminSessionsIdRevokePost**](docs/Api/AdminSessionsApi.md#apiadminsessionsidrevokepost) | **POST** /api/admin/sessions/{id}/revoke |
*AdminSessionsApi* | [**apiAdminSessionsRevokeAllPost**](docs/Api/AdminSessionsApi.md#apiadminsessionsrevokeallpost) | **POST** /api/admin/sessions/revoke-all |
*AuditLogApi* | [**apiAuditLogGet**](docs/Api/AuditLogApi.md#apiauditlogget) | **GET** /api/audit-log |
*AuthApi* | [**apiAuthChangePasswordPost**](docs/Api/AuthApi.md#apiauthchangepasswordpost) | **POST** /api/auth/change-password |
*AuthApi* | [**apiAuthForgotPasswordRequestPost**](docs/Api/AuthApi.md#apiauthforgotpasswordrequestpost) | **POST** /api/auth/forgot-password/request |
*AuthApi* | [**apiAuthForgotPasswordResetPost**](docs/Api/AuthApi.md#apiauthforgotpasswordresetpost) | **POST** /api/auth/forgot-password/reset |
*AuthApi* | [**apiAuthForgotPasswordVerifyPost**](docs/Api/AuthApi.md#apiauthforgotpasswordverifypost) | **POST** /api/auth/forgot-password/verify |
*AuthApi* | [**apiAuthLoginPost**](docs/Api/AuthApi.md#apiauthloginpost) | **POST** /api/auth/login |
*AuthApi* | [**apiAuthLogoutPost**](docs/Api/AuthApi.md#apiauthlogoutpost) | **POST** /api/auth/logout |
*AuthApi* | [**apiAuthMeGet**](docs/Api/AuthApi.md#apiauthmeget) | **GET** /api/auth/me |
*AuthApi* | [**apiAuthPasswordPolicyGet**](docs/Api/AuthApi.md#apiauthpasswordpolicyget) | **GET** /api/auth/password-policy |
*AuthApi* | [**apiAuthRefreshPost**](docs/Api/AuthApi.md#apiauthrefreshpost) | **POST** /api/auth/refresh |
*ContractsApi* | [**apiContractsGet**](docs/Api/ContractsApi.md#apicontractsget) | **GET** /api/contracts |
*ContractsApi* | [**apiContractsIdGet**](docs/Api/ContractsApi.md#apicontractsidget) | **GET** /api/contracts/{id} |
*ContractsApi* | [**apiContractsIdPut**](docs/Api/ContractsApi.md#apicontractsidput) | **PUT** /api/contracts/{id} |
*ContractsApi* | [**apiContractsPost**](docs/Api/ContractsApi.md#apicontractspost) | **POST** /api/contracts |
*EmployeesApi* | [**apiEmployeesGet**](docs/Api/EmployeesApi.md#apiemployeesget) | **GET** /api/employees |
*EmployeesApi* | [**apiEmployeesIdGet**](docs/Api/EmployeesApi.md#apiemployeesidget) | **GET** /api/employees/{id} |
*EmployeesApi* | [**apiEmployeesIdPut**](docs/Api/EmployeesApi.md#apiemployeesidput) | **PUT** /api/employees/{id} |
*EmployeesApi* | [**apiEmployeesPost**](docs/Api/EmployeesApi.md#apiemployeespost) | **POST** /api/employees |
*FacilitiesApi* | [**apiFacilitiesGet**](docs/Api/FacilitiesApi.md#apifacilitiesget) | **GET** /api/facilities |
*FacilitiesApi* | [**apiFacilitiesIdGet**](docs/Api/FacilitiesApi.md#apifacilitiesidget) | **GET** /api/facilities/{id} |
*FacilitiesApi* | [**apiFacilitiesIdPut**](docs/Api/FacilitiesApi.md#apifacilitiesidput) | **PUT** /api/facilities/{id} |
*FacilitiesApi* | [**apiFacilitiesPost**](docs/Api/FacilitiesApi.md#apifacilitiespost) | **POST** /api/facilities |
*FacilityContactsApi* | [**apiFacilitiesFacilityIdContactsGet**](docs/Api/FacilityContactsApi.md#apifacilitiesfacilityidcontactsget) | **GET** /api/facilities/{facilityId}/contacts |
*FacilityContactsApi* | [**apiFacilitiesFacilityIdContactsIdPut**](docs/Api/FacilityContactsApi.md#apifacilitiesfacilityidcontactsidput) | **PUT** /api/facilities/{facilityId}/contacts/{id} |
*FacilityContactsApi* | [**apiFacilitiesFacilityIdContactsPost**](docs/Api/FacilityContactsApi.md#apifacilitiesfacilityidcontactspost) | **POST** /api/facilities/{facilityId}/contacts |
*HealthApi* | [**apiHealthGet**](docs/Api/HealthApi.md#apihealthget) | **GET** /api/health |
*OrdersApi* | [**apiOrdersGet**](docs/Api/OrdersApi.md#apiordersget) | **GET** /api/orders |
*OrdersApi* | [**apiOrdersIdGet**](docs/Api/OrdersApi.md#apiordersidget) | **GET** /api/orders/{id} |
*OrdersApi* | [**apiOrdersIdPut**](docs/Api/OrdersApi.md#apiordersidput) | **PUT** /api/orders/{id} |
*OrdersApi* | [**apiOrdersPost**](docs/Api/OrdersApi.md#apiorderspost) | **POST** /api/orders |
*RolesApi* | [**apiRolesGet**](docs/Api/RolesApi.md#apirolesget) | **GET** /api/roles |
*RolesApi* | [**apiRolesIdGet**](docs/Api/RolesApi.md#apirolesidget) | **GET** /api/roles/{id} |
*RolesApi* | [**apiRolesIdPermissionsPut**](docs/Api/RolesApi.md#apirolesidpermissionsput) | **PUT** /api/roles/{id}/permissions |
*RolesApi* | [**apiRolesPost**](docs/Api/RolesApi.md#apirolespost) | **POST** /api/roles |
*UsersApi* | [**apiUsersGet**](docs/Api/UsersApi.md#apiusersget) | **GET** /api/users |
*UsersApi* | [**apiUsersIdPermissionOverridesGet**](docs/Api/UsersApi.md#apiusersidpermissionoverridesget) | **GET** /api/users/{id}/permission-overrides |
*UsersApi* | [**apiUsersIdPermissionOverridesOverrideIdDelete**](docs/Api/UsersApi.md#apiusersidpermissionoverridesoverrideiddelete) | **DELETE** /api/users/{id}/permission-overrides/{overrideId} |
*UsersApi* | [**apiUsersIdPermissionOverridesPost**](docs/Api/UsersApi.md#apiusersidpermissionoverridespost) | **POST** /api/users/{id}/permission-overrides |
*UsersApi* | [**apiUsersIdPut**](docs/Api/UsersApi.md#apiusersidput) | **PUT** /api/users/{id} |
*UsersApi* | [**apiUsersIdResetPasswordPost**](docs/Api/UsersApi.md#apiusersidresetpasswordpost) | **POST** /api/users/{id}/reset-password |
*UsersApi* | [**apiUsersPost**](docs/Api/UsersApi.md#apiuserspost) | **POST** /api/users |
*ValueListsApi* | [**apiValueListsGet**](docs/Api/ValueListsApi.md#apivaluelistsget) | **GET** /api/value-lists |
*ValueListsApi* | [**apiValueListsKeyItemsGet**](docs/Api/ValueListsApi.md#apivaluelistskeyitemsget) | **GET** /api/value-lists/{key}/items |
*ValueListsApi* | [**apiValueListsKeyItemsIdDelete**](docs/Api/ValueListsApi.md#apivaluelistskeyitemsiddelete) | **DELETE** /api/value-lists/{key}/items/{id} |
*ValueListsApi* | [**apiValueListsKeyItemsIdPut**](docs/Api/ValueListsApi.md#apivaluelistskeyitemsidput) | **PUT** /api/value-lists/{key}/items/{id} |
*ValueListsApi* | [**apiValueListsKeyItemsIdUsagesGet**](docs/Api/ValueListsApi.md#apivaluelistskeyitemsidusagesget) | **GET** /api/value-lists/{key}/items/{id}/usages |
*ValueListsApi* | [**apiValueListsKeyItemsPost**](docs/Api/ValueListsApi.md#apivaluelistskeyitemspost) | **POST** /api/value-lists/{key}/items |
*ValueListsApi* | [**apiValueListsKeyTransitionsGet**](docs/Api/ValueListsApi.md#apivaluelistskeytransitionsget) | **GET** /api/value-lists/{key}/transitions |
*ValueListsApi* | [**apiValueListsKeyTransitionsPut**](docs/Api/ValueListsApi.md#apivaluelistskeytransitionsput) | **PUT** /api/value-lists/{key}/transitions |
## Models
- [AddUserPermissionOverrideRequest](docs/Model/AddUserPermissionOverrideRequest.md)
- [AuditLogEntryResponse](docs/Model/AuditLogEntryResponse.md)
- [AuditLogEntryResponsePagedResponse](docs/Model/AuditLogEntryResponsePagedResponse.md)
- [ChangePasswordRequest](docs/Model/ChangePasswordRequest.md)
- [ContractResponse](docs/Model/ContractResponse.md)
- [ContractResponsePagedResponse](docs/Model/ContractResponsePagedResponse.md)
- [CreateContractRequest](docs/Model/CreateContractRequest.md)
- [CreateEmployeeRequest](docs/Model/CreateEmployeeRequest.md)
- [CreateFacilityContactRequest](docs/Model/CreateFacilityContactRequest.md)
- [CreateFacilityRequest](docs/Model/CreateFacilityRequest.md)
- [CreateOrderRequest](docs/Model/CreateOrderRequest.md)
- [CreateRoleRequest](docs/Model/CreateRoleRequest.md)
- [CreateUserRequest](docs/Model/CreateUserRequest.md)
- [CreateValueListItemRequest](docs/Model/CreateValueListItemRequest.md)
- [EmployeeResponse](docs/Model/EmployeeResponse.md)
- [EmployeeResponsePagedResponse](docs/Model/EmployeeResponsePagedResponse.md)
- [FacilityContactResponse](docs/Model/FacilityContactResponse.md)
- [FacilityResponse](docs/Model/FacilityResponse.md)
- [FacilityResponsePagedResponse](docs/Model/FacilityResponsePagedResponse.md)
- [ForgotPasswordRequestRequest](docs/Model/ForgotPasswordRequestRequest.md)
- [ForgotPasswordRequestResponse](docs/Model/ForgotPasswordRequestResponse.md)
- [ForgotPasswordResetRequest](docs/Model/ForgotPasswordResetRequest.md)
- [ForgotPasswordVerifyRequest](docs/Model/ForgotPasswordVerifyRequest.md)
- [ForgotPasswordVerifyResponse](docs/Model/ForgotPasswordVerifyResponse.md)
- [LoginRequest](docs/Model/LoginRequest.md)
- [LoginResponse](docs/Model/LoginResponse.md)
- [LogoutRequest](docs/Model/LogoutRequest.md)
- [MeResponse](docs/Model/MeResponse.md)
- [OrderResponse](docs/Model/OrderResponse.md)
- [OrderResponsePagedResponse](docs/Model/OrderResponsePagedResponse.md)
- [PasswordPolicyResponse](docs/Model/PasswordPolicyResponse.md)
- [PasswordResetTemplateResponse](docs/Model/PasswordResetTemplateResponse.md)
- [PermissionDto](docs/Model/PermissionDto.md)
- [RefreshRequest](docs/Model/RefreshRequest.md)
- [ResetUserPasswordRequest](docs/Model/ResetUserPasswordRequest.md)
- [RolePermissionsResponse](docs/Model/RolePermissionsResponse.md)
- [RoleResponse](docs/Model/RoleResponse.md)
- [SendTestEmailRequest](docs/Model/SendTestEmailRequest.md)
- [SessionResponse](docs/Model/SessionResponse.md)
- [UpdateContractRequest](docs/Model/UpdateContractRequest.md)
- [UpdateEmployeeRequest](docs/Model/UpdateEmployeeRequest.md)
- [UpdateFacilityContactRequest](docs/Model/UpdateFacilityContactRequest.md)
- [UpdateFacilityRequest](docs/Model/UpdateFacilityRequest.md)
- [UpdateOrderRequest](docs/Model/UpdateOrderRequest.md)
- [UpdateRolePermissionsRequest](docs/Model/UpdateRolePermissionsRequest.md)
- [UpdateUserRequest](docs/Model/UpdateUserRequest.md)
- [UpdateValueListItemRequest](docs/Model/UpdateValueListItemRequest.md)
- [UserPermissionOverrideResponse](docs/Model/UserPermissionOverrideResponse.md)
- [UserResponse](docs/Model/UserResponse.md)
- [ValueListItemResponse](docs/Model/ValueListItemResponse.md)
- [ValueListResponse](docs/Model/ValueListResponse.md)
- [ValueListTransitionRequest](docs/Model/ValueListTransitionRequest.md)
- [ValueListTransitionResponse](docs/Model/ValueListTransitionResponse.md)
- [ValueListUsageResponse](docs/Model/ValueListUsageResponse.md)
## Authorization
Authentication schemes defined for the API:
### Bearer
- **Type**: Bearer authentication (JWT)
## Tests
To run the tests, use:
```bash
composer install
vendor/bin/phpunit
```
## Author
## About this package
This PHP package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: `1.0`
- Generator version: `7.14.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`
@@ -0,0 +1,38 @@
{
"description": "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)",
"keywords": [
"openapitools",
"openapi-generator",
"openapi",
"php",
"sdk",
"rest",
"api"
],
"homepage": "https://openapi-generator.tech",
"license": "unlicense",
"authors": [
{
"name": "OpenAPI",
"homepage": "https://openapi-generator.tech"
}
],
"require": {
"php": "^8.1",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^7.3",
"guzzlehttp/psr7": "^1.7 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0 || ^9.0",
"friendsofphp/php-cs-fixer": "^3.5"
},
"autoload": {
"psr-4": { "OmsorgCoreClient\\" : "lib/" }
},
"autoload-dev": {
"psr-4": { "OmsorgCoreClient\\Test\\" : "test/" }
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,121 @@
# OmsorgCoreClient\AdminEmailApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiAdminEmailPasswordResetTemplateGet()**](AdminEmailApi.md#apiAdminEmailPasswordResetTemplateGet) | **GET** /api/admin/email/password-reset-template | |
| [**apiAdminEmailTestSendPost()**](AdminEmailApi.md#apiAdminEmailTestSendPost) | **POST** /api/admin/email/test-send | |
## `apiAdminEmailPasswordResetTemplateGet()`
```php
apiAdminEmailPasswordResetTemplateGet(): \OmsorgCoreClient\Model\PasswordResetTemplateResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AdminEmailApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->apiAdminEmailPasswordResetTemplateGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminEmailApi->apiAdminEmailPasswordResetTemplateGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\OmsorgCoreClient\Model\PasswordResetTemplateResponse**](../Model/PasswordResetTemplateResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAdminEmailTestSendPost()`
```php
apiAdminEmailTestSendPost($send_test_email_request)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AdminEmailApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$send_test_email_request = new \OmsorgCoreClient\Model\SendTestEmailRequest(); // \OmsorgCoreClient\Model\SendTestEmailRequest
try {
$apiInstance->apiAdminEmailTestSendPost($send_test_email_request);
} catch (Exception $e) {
echo 'Exception when calling AdminEmailApi->apiAdminEmailTestSendPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **send_test_email_request** | [**\OmsorgCoreClient\Model\SendTestEmailRequest**](../Model/SendTestEmailRequest.md)| | [optional] |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,176 @@
# OmsorgCoreClient\AdminSessionsApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiAdminSessionsGet()**](AdminSessionsApi.md#apiAdminSessionsGet) | **GET** /api/admin/sessions | |
| [**apiAdminSessionsIdRevokePost()**](AdminSessionsApi.md#apiAdminSessionsIdRevokePost) | **POST** /api/admin/sessions/{id}/revoke | |
| [**apiAdminSessionsRevokeAllPost()**](AdminSessionsApi.md#apiAdminSessionsRevokeAllPost) | **POST** /api/admin/sessions/revoke-all | |
## `apiAdminSessionsGet()`
```php
apiAdminSessionsGet(): \OmsorgCoreClient\Model\SessionResponse[]
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AdminSessionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->apiAdminSessionsGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AdminSessionsApi->apiAdminSessionsGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\OmsorgCoreClient\Model\SessionResponse[]**](../Model/SessionResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAdminSessionsIdRevokePost()`
```php
apiAdminSessionsIdRevokePost($id)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AdminSessionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
try {
$apiInstance->apiAdminSessionsIdRevokePost($id);
} catch (Exception $e) {
echo 'Exception when calling AdminSessionsApi->apiAdminSessionsIdRevokePost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAdminSessionsRevokeAllPost()`
```php
apiAdminSessionsRevokeAllPost()
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AdminSessionsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->apiAdminSessionsRevokeAllPost();
} catch (Exception $e) {
echo 'Exception when calling AdminSessionsApi->apiAdminSessionsRevokeAllPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,78 @@
# OmsorgCoreClient\AuditLogApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiAuditLogGet()**](AuditLogApi.md#apiAuditLogGet) | **GET** /api/audit-log | |
## `apiAuditLogGet()`
```php
apiAuditLogGet($entity_type, $entity_id, $actor_user_id, $from_utc, $to_utc, $page, $page_size): \OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AuditLogApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$entity_type = 'entity_type_example'; // string
$entity_id = 'entity_id_example'; // string
$actor_user_id = 'actor_user_id_example'; // string
$from_utc = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$to_utc = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$page = 1; // int
$page_size = 50; // int
try {
$result = $apiInstance->apiAuditLogGet($entity_type, $entity_id, $actor_user_id, $from_utc, $to_utc, $page, $page_size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuditLogApi->apiAuditLogGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **entity_type** | **string**| | [optional] |
| **entity_id** | **string**| | [optional] |
| **actor_user_id** | **string**| | [optional] |
| **from_utc** | **\DateTime**| | [optional] |
| **to_utc** | **\DateTime**| | [optional] |
| **page** | **int**| | [optional] [default to 1] |
| **page_size** | **int**| | [optional] [default to 50] |
### Return type
[**\OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse**](../Model/AuditLogEntryResponsePagedResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,529 @@
# OmsorgCoreClient\AuthApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiAuthChangePasswordPost()**](AuthApi.md#apiAuthChangePasswordPost) | **POST** /api/auth/change-password | |
| [**apiAuthForgotPasswordRequestPost()**](AuthApi.md#apiAuthForgotPasswordRequestPost) | **POST** /api/auth/forgot-password/request | |
| [**apiAuthForgotPasswordResetPost()**](AuthApi.md#apiAuthForgotPasswordResetPost) | **POST** /api/auth/forgot-password/reset | |
| [**apiAuthForgotPasswordVerifyPost()**](AuthApi.md#apiAuthForgotPasswordVerifyPost) | **POST** /api/auth/forgot-password/verify | |
| [**apiAuthLoginPost()**](AuthApi.md#apiAuthLoginPost) | **POST** /api/auth/login | |
| [**apiAuthLogoutPost()**](AuthApi.md#apiAuthLogoutPost) | **POST** /api/auth/logout | |
| [**apiAuthMeGet()**](AuthApi.md#apiAuthMeGet) | **GET** /api/auth/me | |
| [**apiAuthPasswordPolicyGet()**](AuthApi.md#apiAuthPasswordPolicyGet) | **GET** /api/auth/password-policy | |
| [**apiAuthRefreshPost()**](AuthApi.md#apiAuthRefreshPost) | **POST** /api/auth/refresh | |
## `apiAuthChangePasswordPost()`
```php
apiAuthChangePasswordPost($change_password_request)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$change_password_request = new \OmsorgCoreClient\Model\ChangePasswordRequest(); // \OmsorgCoreClient\Model\ChangePasswordRequest
try {
$apiInstance->apiAuthChangePasswordPost($change_password_request);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->apiAuthChangePasswordPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **change_password_request** | [**\OmsorgCoreClient\Model\ChangePasswordRequest**](../Model/ChangePasswordRequest.md)| | [optional] |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAuthForgotPasswordRequestPost()`
```php
apiAuthForgotPasswordRequestPost($forgot_password_request_request): \OmsorgCoreClient\Model\ForgotPasswordRequestResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$forgot_password_request_request = new \OmsorgCoreClient\Model\ForgotPasswordRequestRequest(); // \OmsorgCoreClient\Model\ForgotPasswordRequestRequest
try {
$result = $apiInstance->apiAuthForgotPasswordRequestPost($forgot_password_request_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->apiAuthForgotPasswordRequestPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **forgot_password_request_request** | [**\OmsorgCoreClient\Model\ForgotPasswordRequestRequest**](../Model/ForgotPasswordRequestRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\ForgotPasswordRequestResponse**](../Model/ForgotPasswordRequestResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAuthForgotPasswordResetPost()`
```php
apiAuthForgotPasswordResetPost($forgot_password_reset_request)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$forgot_password_reset_request = new \OmsorgCoreClient\Model\ForgotPasswordResetRequest(); // \OmsorgCoreClient\Model\ForgotPasswordResetRequest
try {
$apiInstance->apiAuthForgotPasswordResetPost($forgot_password_reset_request);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->apiAuthForgotPasswordResetPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **forgot_password_reset_request** | [**\OmsorgCoreClient\Model\ForgotPasswordResetRequest**](../Model/ForgotPasswordResetRequest.md)| | [optional] |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAuthForgotPasswordVerifyPost()`
```php
apiAuthForgotPasswordVerifyPost($forgot_password_verify_request): \OmsorgCoreClient\Model\ForgotPasswordVerifyResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$forgot_password_verify_request = new \OmsorgCoreClient\Model\ForgotPasswordVerifyRequest(); // \OmsorgCoreClient\Model\ForgotPasswordVerifyRequest
try {
$result = $apiInstance->apiAuthForgotPasswordVerifyPost($forgot_password_verify_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->apiAuthForgotPasswordVerifyPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **forgot_password_verify_request** | [**\OmsorgCoreClient\Model\ForgotPasswordVerifyRequest**](../Model/ForgotPasswordVerifyRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\ForgotPasswordVerifyResponse**](../Model/ForgotPasswordVerifyResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAuthLoginPost()`
```php
apiAuthLoginPost($login_request): \OmsorgCoreClient\Model\LoginResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$login_request = new \OmsorgCoreClient\Model\LoginRequest(); // \OmsorgCoreClient\Model\LoginRequest
try {
$result = $apiInstance->apiAuthLoginPost($login_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->apiAuthLoginPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **login_request** | [**\OmsorgCoreClient\Model\LoginRequest**](../Model/LoginRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\LoginResponse**](../Model/LoginResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAuthLogoutPost()`
```php
apiAuthLogoutPost($logout_request)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$logout_request = new \OmsorgCoreClient\Model\LogoutRequest(); // \OmsorgCoreClient\Model\LogoutRequest
try {
$apiInstance->apiAuthLogoutPost($logout_request);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->apiAuthLogoutPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **logout_request** | [**\OmsorgCoreClient\Model\LogoutRequest**](../Model/LogoutRequest.md)| | [optional] |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAuthMeGet()`
```php
apiAuthMeGet(): \OmsorgCoreClient\Model\MeResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->apiAuthMeGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->apiAuthMeGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\OmsorgCoreClient\Model\MeResponse**](../Model/MeResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAuthPasswordPolicyGet()`
```php
apiAuthPasswordPolicyGet(): \OmsorgCoreClient\Model\PasswordPolicyResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->apiAuthPasswordPolicyGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->apiAuthPasswordPolicyGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\OmsorgCoreClient\Model\PasswordPolicyResponse**](../Model/PasswordPolicyResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiAuthRefreshPost()`
```php
apiAuthRefreshPost($refresh_request): \OmsorgCoreClient\Model\LoginResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\AuthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$refresh_request = new \OmsorgCoreClient\Model\RefreshRequest(); // \OmsorgCoreClient\Model\RefreshRequest
try {
$result = $apiInstance->apiAuthRefreshPost($refresh_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthApi->apiAuthRefreshPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **refresh_request** | [**\OmsorgCoreClient\Model\RefreshRequest**](../Model/RefreshRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\LoginResponse**](../Model/LoginResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,255 @@
# OmsorgCoreClient\ContractsApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiContractsGet()**](ContractsApi.md#apiContractsGet) | **GET** /api/contracts | |
| [**apiContractsIdGet()**](ContractsApi.md#apiContractsIdGet) | **GET** /api/contracts/{id} | |
| [**apiContractsIdPut()**](ContractsApi.md#apiContractsIdPut) | **PUT** /api/contracts/{id} | |
| [**apiContractsPost()**](ContractsApi.md#apiContractsPost) | **POST** /api/contracts | |
## `apiContractsGet()`
```php
apiContractsGet($search, $status, $employee_id, $facility_id, $page, $page_size): \OmsorgCoreClient\Model\ContractResponsePagedResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ContractsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$search = 'search_example'; // string
$status = 'status_example'; // string
$employee_id = 'employee_id_example'; // string
$facility_id = 'facility_id_example'; // string
$page = 1; // int
$page_size = 20; // int
try {
$result = $apiInstance->apiContractsGet($search, $status, $employee_id, $facility_id, $page, $page_size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContractsApi->apiContractsGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **search** | **string**| | [optional] |
| **status** | **string**| | [optional] |
| **employee_id** | **string**| | [optional] |
| **facility_id** | **string**| | [optional] |
| **page** | **int**| | [optional] [default to 1] |
| **page_size** | **int**| | [optional] [default to 20] |
### Return type
[**\OmsorgCoreClient\Model\ContractResponsePagedResponse**](../Model/ContractResponsePagedResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiContractsIdGet()`
```php
apiContractsIdGet($id): \OmsorgCoreClient\Model\ContractResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ContractsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
try {
$result = $apiInstance->apiContractsIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContractsApi->apiContractsIdGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\ContractResponse**](../Model/ContractResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiContractsIdPut()`
```php
apiContractsIdPut($id, $update_contract_request): \OmsorgCoreClient\Model\ContractResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ContractsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
$update_contract_request = new \OmsorgCoreClient\Model\UpdateContractRequest(); // \OmsorgCoreClient\Model\UpdateContractRequest
try {
$result = $apiInstance->apiContractsIdPut($id, $update_contract_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContractsApi->apiContractsIdPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **update_contract_request** | [**\OmsorgCoreClient\Model\UpdateContractRequest**](../Model/UpdateContractRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\ContractResponse**](../Model/ContractResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiContractsPost()`
```php
apiContractsPost($create_contract_request): \OmsorgCoreClient\Model\ContractResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ContractsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_contract_request = new \OmsorgCoreClient\Model\CreateContractRequest(); // \OmsorgCoreClient\Model\CreateContractRequest
try {
$result = $apiInstance->apiContractsPost($create_contract_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ContractsApi->apiContractsPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **create_contract_request** | [**\OmsorgCoreClient\Model\CreateContractRequest**](../Model/CreateContractRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\ContractResponse**](../Model/ContractResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,253 @@
# OmsorgCoreClient\EmployeesApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiEmployeesGet()**](EmployeesApi.md#apiEmployeesGet) | **GET** /api/employees | |
| [**apiEmployeesIdGet()**](EmployeesApi.md#apiEmployeesIdGet) | **GET** /api/employees/{id} | |
| [**apiEmployeesIdPut()**](EmployeesApi.md#apiEmployeesIdPut) | **PUT** /api/employees/{id} | |
| [**apiEmployeesPost()**](EmployeesApi.md#apiEmployeesPost) | **POST** /api/employees | |
## `apiEmployeesGet()`
```php
apiEmployeesGet($search, $status, $employment_type, $page, $page_size): \OmsorgCoreClient\Model\EmployeeResponsePagedResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\EmployeesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$search = 'search_example'; // string
$status = 'status_example'; // string
$employment_type = 'employment_type_example'; // string
$page = 1; // int
$page_size = 20; // int
try {
$result = $apiInstance->apiEmployeesGet($search, $status, $employment_type, $page, $page_size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmployeesApi->apiEmployeesGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **search** | **string**| | [optional] |
| **status** | **string**| | [optional] |
| **employment_type** | **string**| | [optional] |
| **page** | **int**| | [optional] [default to 1] |
| **page_size** | **int**| | [optional] [default to 20] |
### Return type
[**\OmsorgCoreClient\Model\EmployeeResponsePagedResponse**](../Model/EmployeeResponsePagedResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiEmployeesIdGet()`
```php
apiEmployeesIdGet($id): \OmsorgCoreClient\Model\EmployeeResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\EmployeesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
try {
$result = $apiInstance->apiEmployeesIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmployeesApi->apiEmployeesIdGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\EmployeeResponse**](../Model/EmployeeResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiEmployeesIdPut()`
```php
apiEmployeesIdPut($id, $update_employee_request): \OmsorgCoreClient\Model\EmployeeResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\EmployeesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
$update_employee_request = new \OmsorgCoreClient\Model\UpdateEmployeeRequest(); // \OmsorgCoreClient\Model\UpdateEmployeeRequest
try {
$result = $apiInstance->apiEmployeesIdPut($id, $update_employee_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmployeesApi->apiEmployeesIdPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **update_employee_request** | [**\OmsorgCoreClient\Model\UpdateEmployeeRequest**](../Model/UpdateEmployeeRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\EmployeeResponse**](../Model/EmployeeResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiEmployeesPost()`
```php
apiEmployeesPost($create_employee_request): \OmsorgCoreClient\Model\EmployeeResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\EmployeesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_employee_request = new \OmsorgCoreClient\Model\CreateEmployeeRequest(); // \OmsorgCoreClient\Model\CreateEmployeeRequest
try {
$result = $apiInstance->apiEmployeesPost($create_employee_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EmployeesApi->apiEmployeesPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **create_employee_request** | [**\OmsorgCoreClient\Model\CreateEmployeeRequest**](../Model/CreateEmployeeRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\EmployeeResponse**](../Model/EmployeeResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,251 @@
# OmsorgCoreClient\FacilitiesApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiFacilitiesGet()**](FacilitiesApi.md#apiFacilitiesGet) | **GET** /api/facilities | |
| [**apiFacilitiesIdGet()**](FacilitiesApi.md#apiFacilitiesIdGet) | **GET** /api/facilities/{id} | |
| [**apiFacilitiesIdPut()**](FacilitiesApi.md#apiFacilitiesIdPut) | **PUT** /api/facilities/{id} | |
| [**apiFacilitiesPost()**](FacilitiesApi.md#apiFacilitiesPost) | **POST** /api/facilities | |
## `apiFacilitiesGet()`
```php
apiFacilitiesGet($search, $crm_status, $page, $page_size): \OmsorgCoreClient\Model\FacilityResponsePagedResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\FacilitiesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$search = 'search_example'; // string
$crm_status = 'crm_status_example'; // string
$page = 1; // int
$page_size = 20; // int
try {
$result = $apiInstance->apiFacilitiesGet($search, $crm_status, $page, $page_size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FacilitiesApi->apiFacilitiesGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **search** | **string**| | [optional] |
| **crm_status** | **string**| | [optional] |
| **page** | **int**| | [optional] [default to 1] |
| **page_size** | **int**| | [optional] [default to 20] |
### Return type
[**\OmsorgCoreClient\Model\FacilityResponsePagedResponse**](../Model/FacilityResponsePagedResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiFacilitiesIdGet()`
```php
apiFacilitiesIdGet($id): \OmsorgCoreClient\Model\FacilityResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\FacilitiesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
try {
$result = $apiInstance->apiFacilitiesIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FacilitiesApi->apiFacilitiesIdGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\FacilityResponse**](../Model/FacilityResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiFacilitiesIdPut()`
```php
apiFacilitiesIdPut($id, $update_facility_request): \OmsorgCoreClient\Model\FacilityResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\FacilitiesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
$update_facility_request = new \OmsorgCoreClient\Model\UpdateFacilityRequest(); // \OmsorgCoreClient\Model\UpdateFacilityRequest
try {
$result = $apiInstance->apiFacilitiesIdPut($id, $update_facility_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FacilitiesApi->apiFacilitiesIdPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **update_facility_request** | [**\OmsorgCoreClient\Model\UpdateFacilityRequest**](../Model/UpdateFacilityRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\FacilityResponse**](../Model/FacilityResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiFacilitiesPost()`
```php
apiFacilitiesPost($create_facility_request): \OmsorgCoreClient\Model\FacilityResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\FacilitiesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_facility_request = new \OmsorgCoreClient\Model\CreateFacilityRequest(); // \OmsorgCoreClient\Model\CreateFacilityRequest
try {
$result = $apiInstance->apiFacilitiesPost($create_facility_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FacilitiesApi->apiFacilitiesPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **create_facility_request** | [**\OmsorgCoreClient\Model\CreateFacilityRequest**](../Model/CreateFacilityRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\FacilityResponse**](../Model/FacilityResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,190 @@
# OmsorgCoreClient\FacilityContactsApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiFacilitiesFacilityIdContactsGet()**](FacilityContactsApi.md#apiFacilitiesFacilityIdContactsGet) | **GET** /api/facilities/{facilityId}/contacts | |
| [**apiFacilitiesFacilityIdContactsIdPut()**](FacilityContactsApi.md#apiFacilitiesFacilityIdContactsIdPut) | **PUT** /api/facilities/{facilityId}/contacts/{id} | |
| [**apiFacilitiesFacilityIdContactsPost()**](FacilityContactsApi.md#apiFacilitiesFacilityIdContactsPost) | **POST** /api/facilities/{facilityId}/contacts | |
## `apiFacilitiesFacilityIdContactsGet()`
```php
apiFacilitiesFacilityIdContactsGet($facility_id): \OmsorgCoreClient\Model\FacilityContactResponse[]
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\FacilityContactsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$facility_id = 'facility_id_example'; // string
try {
$result = $apiInstance->apiFacilitiesFacilityIdContactsGet($facility_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FacilityContactsApi->apiFacilitiesFacilityIdContactsGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **facility_id** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\FacilityContactResponse[]**](../Model/FacilityContactResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiFacilitiesFacilityIdContactsIdPut()`
```php
apiFacilitiesFacilityIdContactsIdPut($facility_id, $id, $update_facility_contact_request): \OmsorgCoreClient\Model\FacilityContactResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\FacilityContactsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$facility_id = 'facility_id_example'; // string
$id = 'id_example'; // string
$update_facility_contact_request = new \OmsorgCoreClient\Model\UpdateFacilityContactRequest(); // \OmsorgCoreClient\Model\UpdateFacilityContactRequest
try {
$result = $apiInstance->apiFacilitiesFacilityIdContactsIdPut($facility_id, $id, $update_facility_contact_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FacilityContactsApi->apiFacilitiesFacilityIdContactsIdPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **facility_id** | **string**| | |
| **id** | **string**| | |
| **update_facility_contact_request** | [**\OmsorgCoreClient\Model\UpdateFacilityContactRequest**](../Model/UpdateFacilityContactRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\FacilityContactResponse**](../Model/FacilityContactResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiFacilitiesFacilityIdContactsPost()`
```php
apiFacilitiesFacilityIdContactsPost($facility_id, $create_facility_contact_request): \OmsorgCoreClient\Model\FacilityContactResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\FacilityContactsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$facility_id = 'facility_id_example'; // string
$create_facility_contact_request = new \OmsorgCoreClient\Model\CreateFacilityContactRequest(); // \OmsorgCoreClient\Model\CreateFacilityContactRequest
try {
$result = $apiInstance->apiFacilitiesFacilityIdContactsPost($facility_id, $create_facility_contact_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FacilityContactsApi->apiFacilitiesFacilityIdContactsPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **facility_id** | **string**| | |
| **create_facility_contact_request** | [**\OmsorgCoreClient\Model\CreateFacilityContactRequest**](../Model/CreateFacilityContactRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\FacilityContactResponse**](../Model/FacilityContactResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,62 @@
# OmsorgCoreClient\HealthApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiHealthGet()**](HealthApi.md#apiHealthGet) | **GET** /api/health | |
## `apiHealthGet()`
```php
apiHealthGet()
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\HealthApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$apiInstance->apiHealthGet();
} catch (Exception $e) {
echo 'Exception when calling HealthApi->apiHealthGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,253 @@
# OmsorgCoreClient\OrdersApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiOrdersGet()**](OrdersApi.md#apiOrdersGet) | **GET** /api/orders | |
| [**apiOrdersIdGet()**](OrdersApi.md#apiOrdersIdGet) | **GET** /api/orders/{id} | |
| [**apiOrdersIdPut()**](OrdersApi.md#apiOrdersIdPut) | **PUT** /api/orders/{id} | |
| [**apiOrdersPost()**](OrdersApi.md#apiOrdersPost) | **POST** /api/orders | |
## `apiOrdersGet()`
```php
apiOrdersGet($search, $status_id, $facility_id, $page, $page_size): \OmsorgCoreClient\Model\OrderResponsePagedResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\OrdersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$search = 'search_example'; // string
$status_id = 'status_id_example'; // string
$facility_id = 'facility_id_example'; // string
$page = 1; // int
$page_size = 20; // int
try {
$result = $apiInstance->apiOrdersGet($search, $status_id, $facility_id, $page, $page_size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrdersApi->apiOrdersGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **search** | **string**| | [optional] |
| **status_id** | **string**| | [optional] |
| **facility_id** | **string**| | [optional] |
| **page** | **int**| | [optional] [default to 1] |
| **page_size** | **int**| | [optional] [default to 20] |
### Return type
[**\OmsorgCoreClient\Model\OrderResponsePagedResponse**](../Model/OrderResponsePagedResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiOrdersIdGet()`
```php
apiOrdersIdGet($id): \OmsorgCoreClient\Model\OrderResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\OrdersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
try {
$result = $apiInstance->apiOrdersIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrdersApi->apiOrdersIdGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\OrderResponse**](../Model/OrderResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiOrdersIdPut()`
```php
apiOrdersIdPut($id, $update_order_request): \OmsorgCoreClient\Model\OrderResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\OrdersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
$update_order_request = new \OmsorgCoreClient\Model\UpdateOrderRequest(); // \OmsorgCoreClient\Model\UpdateOrderRequest
try {
$result = $apiInstance->apiOrdersIdPut($id, $update_order_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrdersApi->apiOrdersIdPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **update_order_request** | [**\OmsorgCoreClient\Model\UpdateOrderRequest**](../Model/UpdateOrderRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\OrderResponse**](../Model/OrderResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiOrdersPost()`
```php
apiOrdersPost($create_order_request): \OmsorgCoreClient\Model\OrderResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\OrdersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_order_request = new \OmsorgCoreClient\Model\CreateOrderRequest(); // \OmsorgCoreClient\Model\CreateOrderRequest
try {
$result = $apiInstance->apiOrdersPost($create_order_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling OrdersApi->apiOrdersPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **create_order_request** | [**\OmsorgCoreClient\Model\CreateOrderRequest**](../Model/CreateOrderRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\OrderResponse**](../Model/OrderResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,241 @@
# OmsorgCoreClient\RolesApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiRolesGet()**](RolesApi.md#apiRolesGet) | **GET** /api/roles | |
| [**apiRolesIdGet()**](RolesApi.md#apiRolesIdGet) | **GET** /api/roles/{id} | |
| [**apiRolesIdPermissionsPut()**](RolesApi.md#apiRolesIdPermissionsPut) | **PUT** /api/roles/{id}/permissions | |
| [**apiRolesPost()**](RolesApi.md#apiRolesPost) | **POST** /api/roles | |
## `apiRolesGet()`
```php
apiRolesGet(): \OmsorgCoreClient\Model\RoleResponse[]
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\RolesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->apiRolesGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->apiRolesGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\OmsorgCoreClient\Model\RoleResponse[]**](../Model/RoleResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiRolesIdGet()`
```php
apiRolesIdGet($id): \OmsorgCoreClient\Model\RolePermissionsResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\RolesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
try {
$result = $apiInstance->apiRolesIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->apiRolesIdGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\RolePermissionsResponse**](../Model/RolePermissionsResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiRolesIdPermissionsPut()`
```php
apiRolesIdPermissionsPut($id, $update_role_permissions_request)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\RolesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
$update_role_permissions_request = new \OmsorgCoreClient\Model\UpdateRolePermissionsRequest(); // \OmsorgCoreClient\Model\UpdateRolePermissionsRequest
try {
$apiInstance->apiRolesIdPermissionsPut($id, $update_role_permissions_request);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->apiRolesIdPermissionsPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **update_role_permissions_request** | [**\OmsorgCoreClient\Model\UpdateRolePermissionsRequest**](../Model/UpdateRolePermissionsRequest.md)| | [optional] |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiRolesPost()`
```php
apiRolesPost($create_role_request): \OmsorgCoreClient\Model\RoleResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\RolesApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_role_request = new \OmsorgCoreClient\Model\CreateRoleRequest(); // \OmsorgCoreClient\Model\CreateRoleRequest
try {
$result = $apiInstance->apiRolesPost($create_role_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling RolesApi->apiRolesPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **create_role_request** | [**\OmsorgCoreClient\Model\CreateRoleRequest**](../Model/CreateRoleRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\RoleResponse**](../Model/RoleResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,422 @@
# OmsorgCoreClient\UsersApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiUsersGet()**](UsersApi.md#apiUsersGet) | **GET** /api/users | |
| [**apiUsersIdPermissionOverridesGet()**](UsersApi.md#apiUsersIdPermissionOverridesGet) | **GET** /api/users/{id}/permission-overrides | |
| [**apiUsersIdPermissionOverridesOverrideIdDelete()**](UsersApi.md#apiUsersIdPermissionOverridesOverrideIdDelete) | **DELETE** /api/users/{id}/permission-overrides/{overrideId} | |
| [**apiUsersIdPermissionOverridesPost()**](UsersApi.md#apiUsersIdPermissionOverridesPost) | **POST** /api/users/{id}/permission-overrides | |
| [**apiUsersIdPut()**](UsersApi.md#apiUsersIdPut) | **PUT** /api/users/{id} | |
| [**apiUsersIdResetPasswordPost()**](UsersApi.md#apiUsersIdResetPasswordPost) | **POST** /api/users/{id}/reset-password | |
| [**apiUsersPost()**](UsersApi.md#apiUsersPost) | **POST** /api/users | |
## `apiUsersGet()`
```php
apiUsersGet(): \OmsorgCoreClient\Model\UserResponse[]
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\UsersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->apiUsersGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->apiUsersGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\OmsorgCoreClient\Model\UserResponse[]**](../Model/UserResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiUsersIdPermissionOverridesGet()`
```php
apiUsersIdPermissionOverridesGet($id): \OmsorgCoreClient\Model\UserPermissionOverrideResponse[]
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\UsersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
try {
$result = $apiInstance->apiUsersIdPermissionOverridesGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->apiUsersIdPermissionOverridesGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\UserPermissionOverrideResponse[]**](../Model/UserPermissionOverrideResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiUsersIdPermissionOverridesOverrideIdDelete()`
```php
apiUsersIdPermissionOverridesOverrideIdDelete($id, $override_id)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\UsersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
$override_id = 'override_id_example'; // string
try {
$apiInstance->apiUsersIdPermissionOverridesOverrideIdDelete($id, $override_id);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->apiUsersIdPermissionOverridesOverrideIdDelete: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **override_id** | **string**| | |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiUsersIdPermissionOverridesPost()`
```php
apiUsersIdPermissionOverridesPost($id, $add_user_permission_override_request): \OmsorgCoreClient\Model\UserPermissionOverrideResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\UsersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
$add_user_permission_override_request = new \OmsorgCoreClient\Model\AddUserPermissionOverrideRequest(); // \OmsorgCoreClient\Model\AddUserPermissionOverrideRequest
try {
$result = $apiInstance->apiUsersIdPermissionOverridesPost($id, $add_user_permission_override_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->apiUsersIdPermissionOverridesPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **add_user_permission_override_request** | [**\OmsorgCoreClient\Model\AddUserPermissionOverrideRequest**](../Model/AddUserPermissionOverrideRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\UserPermissionOverrideResponse**](../Model/UserPermissionOverrideResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiUsersIdPut()`
```php
apiUsersIdPut($id, $update_user_request)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\UsersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
$update_user_request = new \OmsorgCoreClient\Model\UpdateUserRequest(); // \OmsorgCoreClient\Model\UpdateUserRequest
try {
$apiInstance->apiUsersIdPut($id, $update_user_request);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->apiUsersIdPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **update_user_request** | [**\OmsorgCoreClient\Model\UpdateUserRequest**](../Model/UpdateUserRequest.md)| | [optional] |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiUsersIdResetPasswordPost()`
```php
apiUsersIdResetPasswordPost($id, $reset_user_password_request)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\UsersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$id = 'id_example'; // string
$reset_user_password_request = new \OmsorgCoreClient\Model\ResetUserPasswordRequest(); // \OmsorgCoreClient\Model\ResetUserPasswordRequest
try {
$apiInstance->apiUsersIdResetPasswordPost($id, $reset_user_password_request);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->apiUsersIdResetPasswordPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **reset_user_password_request** | [**\OmsorgCoreClient\Model\ResetUserPasswordRequest**](../Model/ResetUserPasswordRequest.md)| | [optional] |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiUsersPost()`
```php
apiUsersPost($create_user_request): \OmsorgCoreClient\Model\UserResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\UsersApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$create_user_request = new \OmsorgCoreClient\Model\CreateUserRequest(); // \OmsorgCoreClient\Model\CreateUserRequest
try {
$result = $apiInstance->apiUsersPost($create_user_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling UsersApi->apiUsersPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **create_user_request** | [**\OmsorgCoreClient\Model\CreateUserRequest**](../Model/CreateUserRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\UserResponse**](../Model/UserResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,486 @@
# OmsorgCoreClient\ValueListsApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiValueListsGet()**](ValueListsApi.md#apiValueListsGet) | **GET** /api/value-lists | |
| [**apiValueListsKeyItemsGet()**](ValueListsApi.md#apiValueListsKeyItemsGet) | **GET** /api/value-lists/{key}/items | |
| [**apiValueListsKeyItemsIdDelete()**](ValueListsApi.md#apiValueListsKeyItemsIdDelete) | **DELETE** /api/value-lists/{key}/items/{id} | |
| [**apiValueListsKeyItemsIdPut()**](ValueListsApi.md#apiValueListsKeyItemsIdPut) | **PUT** /api/value-lists/{key}/items/{id} | |
| [**apiValueListsKeyItemsIdUsagesGet()**](ValueListsApi.md#apiValueListsKeyItemsIdUsagesGet) | **GET** /api/value-lists/{key}/items/{id}/usages | |
| [**apiValueListsKeyItemsPost()**](ValueListsApi.md#apiValueListsKeyItemsPost) | **POST** /api/value-lists/{key}/items | |
| [**apiValueListsKeyTransitionsGet()**](ValueListsApi.md#apiValueListsKeyTransitionsGet) | **GET** /api/value-lists/{key}/transitions | |
| [**apiValueListsKeyTransitionsPut()**](ValueListsApi.md#apiValueListsKeyTransitionsPut) | **PUT** /api/value-lists/{key}/transitions | |
## `apiValueListsGet()`
```php
apiValueListsGet(): \OmsorgCoreClient\Model\ValueListResponse[]
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ValueListsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
try {
$result = $apiInstance->apiValueListsGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ValueListsApi->apiValueListsGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\OmsorgCoreClient\Model\ValueListResponse[]**](../Model/ValueListResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiValueListsKeyItemsGet()`
```php
apiValueListsKeyItemsGet($key): \OmsorgCoreClient\Model\ValueListItemResponse[]
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ValueListsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$key = 'key_example'; // string
try {
$result = $apiInstance->apiValueListsKeyItemsGet($key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ValueListsApi->apiValueListsKeyItemsGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **key** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\ValueListItemResponse[]**](../Model/ValueListItemResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiValueListsKeyItemsIdDelete()`
```php
apiValueListsKeyItemsIdDelete($key, $id)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ValueListsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$key = 'key_example'; // string
$id = 'id_example'; // string
try {
$apiInstance->apiValueListsKeyItemsIdDelete($key, $id);
} catch (Exception $e) {
echo 'Exception when calling ValueListsApi->apiValueListsKeyItemsIdDelete: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **key** | **string**| | |
| **id** | **string**| | |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiValueListsKeyItemsIdPut()`
```php
apiValueListsKeyItemsIdPut($key, $id, $update_value_list_item_request): \OmsorgCoreClient\Model\ValueListItemResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ValueListsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$key = 'key_example'; // string
$id = 'id_example'; // string
$update_value_list_item_request = new \OmsorgCoreClient\Model\UpdateValueListItemRequest(); // \OmsorgCoreClient\Model\UpdateValueListItemRequest
try {
$result = $apiInstance->apiValueListsKeyItemsIdPut($key, $id, $update_value_list_item_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ValueListsApi->apiValueListsKeyItemsIdPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **key** | **string**| | |
| **id** | **string**| | |
| **update_value_list_item_request** | [**\OmsorgCoreClient\Model\UpdateValueListItemRequest**](../Model/UpdateValueListItemRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\ValueListItemResponse**](../Model/ValueListItemResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiValueListsKeyItemsIdUsagesGet()`
```php
apiValueListsKeyItemsIdUsagesGet($key, $id): \OmsorgCoreClient\Model\ValueListUsageResponse[]
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ValueListsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$key = 'key_example'; // string
$id = 'id_example'; // string
try {
$result = $apiInstance->apiValueListsKeyItemsIdUsagesGet($key, $id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ValueListsApi->apiValueListsKeyItemsIdUsagesGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **key** | **string**| | |
| **id** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\ValueListUsageResponse[]**](../Model/ValueListUsageResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiValueListsKeyItemsPost()`
```php
apiValueListsKeyItemsPost($key, $create_value_list_item_request): \OmsorgCoreClient\Model\ValueListItemResponse
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ValueListsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$key = 'key_example'; // string
$create_value_list_item_request = new \OmsorgCoreClient\Model\CreateValueListItemRequest(); // \OmsorgCoreClient\Model\CreateValueListItemRequest
try {
$result = $apiInstance->apiValueListsKeyItemsPost($key, $create_value_list_item_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ValueListsApi->apiValueListsKeyItemsPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **key** | **string**| | |
| **create_value_list_item_request** | [**\OmsorgCoreClient\Model\CreateValueListItemRequest**](../Model/CreateValueListItemRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\ValueListItemResponse**](../Model/ValueListItemResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiValueListsKeyTransitionsGet()`
```php
apiValueListsKeyTransitionsGet($key): \OmsorgCoreClient\Model\ValueListTransitionResponse[]
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ValueListsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$key = 'key_example'; // string
try {
$result = $apiInstance->apiValueListsKeyTransitionsGet($key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ValueListsApi->apiValueListsKeyTransitionsGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **key** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\ValueListTransitionResponse[]**](../Model/ValueListTransitionResponse.md)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `text/plain`, `application/json`, `text/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiValueListsKeyTransitionsPut()`
```php
apiValueListsKeyTransitionsPut($key, $value_list_transition_request)
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer (JWT) authorization: Bearer
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new OmsorgCoreClient\Api\ValueListsApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$key = 'key_example'; // string
$value_list_transition_request = array(new \OmsorgCoreClient\Model\ValueListTransitionRequest()); // \OmsorgCoreClient\Model\ValueListTransitionRequest[]
try {
$apiInstance->apiValueListsKeyTransitionsPut($key, $value_list_transition_request);
} catch (Exception $e) {
echo 'Exception when calling ValueListsApi->apiValueListsKeyTransitionsPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **key** | **string**| | |
| **value_list_transition_request** | [**\OmsorgCoreClient\Model\ValueListTransitionRequest[]**](../Model/ValueListTransitionRequest.md)| | [optional] |
### Return type
void (empty response body)
### Authorization
[Bearer](../../README.md#Bearer)
### HTTP request headers
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
@@ -0,0 +1,11 @@
# # AddUserPermissionOverrideRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**module** | **string** | | [optional]
**action** | **string** | | [optional]
**effect** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,18 @@
# # AuditLogEntryResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**occurred_at_utc** | **\DateTime** | | [optional]
**actor_user_id** | **string** | | [optional]
**actor_username** | **string** | | [optional]
**ip_address** | **string** | | [optional]
**category** | **string** | | [optional]
**action** | **string** | | [optional]
**entity_type** | **string** | | [optional]
**entity_id** | **string** | | [optional]
**details** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,12 @@
# # AuditLogEntryResponsePagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**\OmsorgCoreClient\Model\AuditLogEntryResponse[]**](AuditLogEntryResponse.md) | | [optional]
**total_count** | **int** | | [optional]
**page** | **int** | | [optional]
**page_size** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,10 @@
# # ChangePasswordRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**current_password** | **string** | | [optional]
**new_password** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,21 @@
# # ContractResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**contract_type** | **string** | | [optional]
**employee_id** | **string** | | [optional]
**facility_id** | **string** | | [optional]
**start_date** | **\DateTime** | | [optional]
**end_date** | **\DateTime** | | [optional]
**status** | **string** | | [optional]
**weekly_hours** | **float** | | [optional]
**hourly_wage** | **float** | | [optional]
**allowances_description** | **string** | | [optional]
**overtime_rules** | **string** | | [optional]
**vacation_days_per_year** | **int** | | [optional]
**probation_period_months** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,12 @@
# # ContractResponsePagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**\OmsorgCoreClient\Model\ContractResponse[]**](ContractResponse.md) | | [optional]
**total_count** | **int** | | [optional]
**page** | **int** | | [optional]
**page_size** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,19 @@
# # CreateContractRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**contract_type** | **string** | | [optional]
**employee_id** | **string** | | [optional]
**facility_id** | **string** | | [optional]
**start_date** | **\DateTime** | | [optional]
**end_date** | **\DateTime** | | [optional]
**weekly_hours** | **float** | | [optional]
**hourly_wage** | **float** | | [optional]
**allowances_description** | **string** | | [optional]
**overtime_rules** | **string** | | [optional]
**vacation_days_per_year** | **int** | | [optional]
**probation_period_months** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,24 @@
# # CreateEmployeeRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**first_name** | **string** | | [optional]
**last_name** | **string** | | [optional]
**date_of_birth** | **\DateTime** | | [optional]
**street** | **string** | | [optional]
**postal_code** | **string** | | [optional]
**city** | **string** | | [optional]
**country** | **string** | | [optional]
**phone_number** | **string** | | [optional]
**email** | **string** | | [optional]
**entry_date** | **\DateTime** | | [optional]
**exit_date** | **\DateTime** | | [optional]
**emergency_contact_name** | **string** | | [optional]
**emergency_contact_phone** | **string** | | [optional]
**emergency_contact_relation** | **string** | | [optional]
**employment_type** | **string** | | [optional]
**qualification** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,14 @@
# # CreateFacilityContactRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [optional]
**role** | **string** | | [optional]
**department** | **string** | | [optional]
**phone_number** | **string** | | [optional]
**email** | **string** | | [optional]
**notes** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,18 @@
# # CreateFacilityRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [optional]
**facility_type** | **string** | | [optional]
**street** | **string** | | [optional]
**postal_code** | **string** | | [optional]
**city** | **string** | | [optional]
**country** | **string** | | [optional]
**billing_street** | **string** | | [optional]
**billing_postal_code** | **string** | | [optional]
**billing_city** | **string** | | [optional]
**billing_country** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,17 @@
# # CreateOrderRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**facility_id** | **string** | | [optional]
**facility_contact_id** | **string** | | [optional]
**start_date** | **\DateTime** | | [optional]
**end_date** | **\DateTime** | | [optional]
**required_qualification** | **string** | | [optional]
**shift_type** | **string** | | [optional]
**required_headcount** | **int** | | [optional]
**conditions** | **string** | | [optional]
**priority** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,9 @@
# # CreateRoleRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,14 @@
# # CreateUserRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**employee_id** | **string** | | [optional]
**username** | **string** | | [optional]
**role_id** | **string** | | [optional]
**mode** | **string** | | [optional]
**initial_password** | **string** | | [optional]
**pin_validity_days** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,13 @@
# # CreateValueListItemRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **string** | | [optional]
**sort_order** | **int** | | [optional]
**is_default** | **bool** | | [optional]
**is_initial** | **bool** | | [optional]
**is_terminal** | **bool** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,27 @@
# # EmployeeResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**first_name** | **string** | | [optional]
**last_name** | **string** | | [optional]
**status** | **string** | | [optional]
**date_of_birth** | **\DateTime** | | [optional]
**street** | **string** | | [optional]
**postal_code** | **string** | | [optional]
**city** | **string** | | [optional]
**country** | **string** | | [optional]
**phone_number** | **string** | | [optional]
**email** | **string** | | [optional]
**entry_date** | **\DateTime** | | [optional]
**exit_date** | **\DateTime** | | [optional]
**emergency_contact_name** | **string** | | [optional]
**emergency_contact_phone** | **string** | | [optional]
**emergency_contact_relation** | **string** | | [optional]
**employment_type** | **string** | | [optional]
**qualification** | **string** | | [optional]
**avatar_file_name** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,12 @@
# # EmployeeResponsePagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**\OmsorgCoreClient\Model\EmployeeResponse[]**](EmployeeResponse.md) | | [optional]
**total_count** | **int** | | [optional]
**page** | **int** | | [optional]
**page_size** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,16 @@
# # FacilityContactResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**facility_id** | **string** | | [optional]
**name** | **string** | | [optional]
**role** | **string** | | [optional]
**department** | **string** | | [optional]
**phone_number** | **string** | | [optional]
**email** | **string** | | [optional]
**notes** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,20 @@
# # FacilityResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**name** | **string** | | [optional]
**crm_status** | **string** | | [optional]
**facility_type** | **string** | | [optional]
**street** | **string** | | [optional]
**postal_code** | **string** | | [optional]
**city** | **string** | | [optional]
**country** | **string** | | [optional]
**billing_street** | **string** | | [optional]
**billing_postal_code** | **string** | | [optional]
**billing_city** | **string** | | [optional]
**billing_country** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,12 @@
# # FacilityResponsePagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**\OmsorgCoreClient\Model\FacilityResponse[]**](FacilityResponse.md) | | [optional]
**total_count** | **int** | | [optional]
**page** | **int** | | [optional]
**page_size** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,9 @@
# # ForgotPasswordRequestRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,9 @@
# # ForgotPasswordRequestResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**status** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,10 @@
# # ForgotPasswordResetRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**reset_token** | **string** | | [optional]
**new_password** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,10 @@
# # ForgotPasswordVerifyRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **string** | | [optional]
**pin** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,9 @@
# # ForgotPasswordVerifyResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**reset_token** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,10 @@
# # LoginRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**username** | **string** | | [optional]
**password** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,12 @@
# # LoginResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**access_token** | **string** | | [optional]
**refresh_token** | **string** | | [optional]
**expires_at** | **\DateTime** | | [optional]
**must_change_password** | **bool** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,9 @@
# # LogoutRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**refresh_token** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,18 @@
# # MeResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**user_id** | **string** | | [optional]
**username** | **string** | | [optional]
**role** | **string** | | [optional]
**permissions** | [**\OmsorgCoreClient\Model\PermissionDto[]**](PermissionDto.md) | | [optional]
**employee_id** | **string** | | [optional]
**first_name** | **string** | | [optional]
**last_name** | **string** | | [optional]
**email** | **string** | | [optional]
**phone_number** | **string** | | [optional]
**avatar_file_name** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,20 @@
# # OrderResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**facility_id** | **string** | | [optional]
**facility_contact_id** | **string** | | [optional]
**start_date** | **\DateTime** | | [optional]
**end_date** | **\DateTime** | | [optional]
**required_qualification** | **string** | | [optional]
**shift_type** | **string** | | [optional]
**required_headcount** | **int** | | [optional]
**conditions** | **string** | | [optional]
**priority** | **string** | | [optional]
**status_id** | **string** | | [optional]
**status_name** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,12 @@
# # OrderResponsePagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**\OmsorgCoreClient\Model\OrderResponse[]**](OrderResponse.md) | | [optional]
**total_count** | **int** | | [optional]
**page** | **int** | | [optional]
**page_size** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,9 @@
# # PasswordPolicyResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**min_length** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,10 @@
# # PasswordResetTemplateResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**subject** | **string** | | [optional]
**body_template** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,10 @@
# # PermissionDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**module** | **string** | | [optional]
**action** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,9 @@
# # RefreshRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**refresh_token** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,11 @@
# # ResetUserPasswordRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**mode** | **string** | | [optional]
**initial_password** | **string** | | [optional]
**pin_validity_days** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,11 @@
# # RolePermissionsResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**name** | **string** | | [optional]
**permissions** | [**\OmsorgCoreClient\Model\PermissionDto[]**](PermissionDto.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,10 @@
# # RoleResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**name** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,11 @@
# # SendTestEmailRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**to_address** | **string** | | [optional]
**subject** | **string** | | [optional]
**body** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,12 @@
# # SessionResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**username** | **string** | | [optional]
**created_at** | **\DateTime** | | [optional]
**expires_at** | **\DateTime** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,20 @@
# # UpdateContractRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**contract_type** | **string** | | [optional]
**employee_id** | **string** | | [optional]
**facility_id** | **string** | | [optional]
**start_date** | **\DateTime** | | [optional]
**end_date** | **\DateTime** | | [optional]
**status** | **string** | | [optional]
**weekly_hours** | **float** | | [optional]
**hourly_wage** | **float** | | [optional]
**allowances_description** | **string** | | [optional]
**overtime_rules** | **string** | | [optional]
**vacation_days_per_year** | **int** | | [optional]
**probation_period_months** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,26 @@
# # UpdateEmployeeRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**first_name** | **string** | | [optional]
**last_name** | **string** | | [optional]
**status** | **string** | | [optional]
**date_of_birth** | **\DateTime** | | [optional]
**street** | **string** | | [optional]
**postal_code** | **string** | | [optional]
**city** | **string** | | [optional]
**country** | **string** | | [optional]
**phone_number** | **string** | | [optional]
**email** | **string** | | [optional]
**entry_date** | **\DateTime** | | [optional]
**exit_date** | **\DateTime** | | [optional]
**emergency_contact_name** | **string** | | [optional]
**emergency_contact_phone** | **string** | | [optional]
**emergency_contact_relation** | **string** | | [optional]
**employment_type** | **string** | | [optional]
**qualification** | **string** | | [optional]
**avatar_file_name** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,14 @@
# # UpdateFacilityContactRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [optional]
**role** | **string** | | [optional]
**department** | **string** | | [optional]
**phone_number** | **string** | | [optional]
**email** | **string** | | [optional]
**notes** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,19 @@
# # UpdateFacilityRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [optional]
**crm_status** | **string** | | [optional]
**facility_type** | **string** | | [optional]
**street** | **string** | | [optional]
**postal_code** | **string** | | [optional]
**city** | **string** | | [optional]
**country** | **string** | | [optional]
**billing_street** | **string** | | [optional]
**billing_postal_code** | **string** | | [optional]
**billing_city** | **string** | | [optional]
**billing_country** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,18 @@
# # UpdateOrderRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**facility_id** | **string** | | [optional]
**facility_contact_id** | **string** | | [optional]
**start_date** | **\DateTime** | | [optional]
**end_date** | **\DateTime** | | [optional]
**required_qualification** | **string** | | [optional]
**shift_type** | **string** | | [optional]
**required_headcount** | **int** | | [optional]
**conditions** | **string** | | [optional]
**priority** | **string** | | [optional]
**status_id** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,9 @@
# # UpdateRolePermissionsRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**permissions** | [**\OmsorgCoreClient\Model\PermissionDto[]**](PermissionDto.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,10 @@
# # UpdateUserRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**role_id** | **string** | | [optional]
**is_active** | **bool** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,13 @@
# # UpdateValueListItemRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **string** | | [optional]
**sort_order** | **int** | | [optional]
**is_default** | **bool** | | [optional]
**is_initial** | **bool** | | [optional]
**is_terminal** | **bool** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,12 @@
# # UserPermissionOverrideResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**module** | **string** | | [optional]
**action** | **string** | | [optional]
**effect** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,14 @@
# # UserResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**username** | **string** | | [optional]
**employee_id** | **string** | | [optional]
**role_name** | **string** | | [optional]
**is_active** | **bool** | | [optional]
**must_change_password** | **bool** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,14 @@
# # ValueListItemResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**value** | **string** | | [optional]
**sort_order** | **int** | | [optional]
**is_default** | **bool** | | [optional]
**is_initial** | **bool** | | [optional]
**is_terminal** | **bool** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,11 @@
# # ValueListResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**key** | **string** | | [optional]
**display_name** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,10 @@
# # ValueListTransitionRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**from_item_id** | **string** | | [optional]
**to_item_id** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,11 @@
# # ValueListTransitionResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**from_item_id** | **string** | | [optional]
**to_item_id** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,11 @@
# # ValueListUsageResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**entity_type** | **string** | | [optional]
**entity_id** | **string** | | [optional]
**display_label** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -euo pipefail
# Generiert den PHP-Client aus der Swagger/OpenAPI-JSON von omsorgCore.
# Voraussetzung: omsorgCore läuft lokal im Development-Modus (siehe README.md).
cd "$(dirname "${BASH_SOURCE[0]}")"
BASE_URL="${OMSORG_CORE_URL:-http://localhost:5245}"
npx --yes @openapitools/openapi-generator-cli@2.13.4 generate \
-g php \
-i "${BASE_URL}/swagger/v1/swagger.json" \
-o . \
--additional-properties=invokerPackage=OmsorgCore\\Client,packageName=omsorgcore-client-php
@@ -0,0 +1,57 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'
@@ -0,0 +1,645 @@
<?php
/**
* AdminEmailApi
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Api;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\MultipartStream;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use OmsorgCoreClient\ApiException;
use OmsorgCoreClient\Configuration;
use OmsorgCoreClient\FormDataProcessor;
use OmsorgCoreClient\HeaderSelector;
use OmsorgCoreClient\ObjectSerializer;
/**
* AdminEmailApi Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AdminEmailApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @var int Host index
*/
protected $hostIndex;
/** @var string[] $contentTypes **/
public const contentTypes = [
'apiAdminEmailPasswordResetTemplateGet' => [
'application/json',
],
'apiAdminEmailTestSendPost' => [
'application/json',
'text/json',
'application/*+json',
],
];
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
$this->config = $config ?: Configuration::getDefaultConfiguration();
$this->headerSelector = $selector ?: new HeaderSelector();
$this->hostIndex = $hostIndex;
}
/**
* Set the host index
*
* @param int $hostIndex Host index (required)
*/
public function setHostIndex($hostIndex): void
{
$this->hostIndex = $hostIndex;
}
/**
* Get the host index
*
* @return int Host index
*/
public function getHostIndex()
{
return $this->hostIndex;
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation apiAdminEmailPasswordResetTemplateGet
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminEmailPasswordResetTemplateGet'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return \OmsorgCoreClient\Model\PasswordResetTemplateResponse
*/
public function apiAdminEmailPasswordResetTemplateGet(string $contentType = self::contentTypes['apiAdminEmailPasswordResetTemplateGet'][0])
{
list($response) = $this->apiAdminEmailPasswordResetTemplateGetWithHttpInfo($contentType);
return $response;
}
/**
* Operation apiAdminEmailPasswordResetTemplateGetWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminEmailPasswordResetTemplateGet'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of \OmsorgCoreClient\Model\PasswordResetTemplateResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiAdminEmailPasswordResetTemplateGetWithHttpInfo(string $contentType = self::contentTypes['apiAdminEmailPasswordResetTemplateGet'][0])
{
$request = $this->apiAdminEmailPasswordResetTemplateGetRequest($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();
switch($statusCode) {
case 200:
return $this->handleResponseWithDataType(
'\OmsorgCoreClient\Model\PasswordResetTemplateResponse',
$request,
$response,
);
}
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()
);
}
return $this->handleResponseWithDataType(
'\OmsorgCoreClient\Model\PasswordResetTemplateResponse',
$request,
$response,
);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\OmsorgCoreClient\Model\PasswordResetTemplateResponse',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
throw $e;
}
throw $e;
}
}
/**
* Operation apiAdminEmailPasswordResetTemplateGetAsync
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminEmailPasswordResetTemplateGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAdminEmailPasswordResetTemplateGetAsync(string $contentType = self::contentTypes['apiAdminEmailPasswordResetTemplateGet'][0])
{
return $this->apiAdminEmailPasswordResetTemplateGetAsyncWithHttpInfo($contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiAdminEmailPasswordResetTemplateGetAsyncWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminEmailPasswordResetTemplateGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAdminEmailPasswordResetTemplateGetAsyncWithHttpInfo(string $contentType = self::contentTypes['apiAdminEmailPasswordResetTemplateGet'][0])
{
$returnType = '\OmsorgCoreClient\Model\PasswordResetTemplateResponse';
$request = $this->apiAdminEmailPasswordResetTemplateGetRequest($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 'apiAdminEmailPasswordResetTemplateGet'
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminEmailPasswordResetTemplateGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiAdminEmailPasswordResetTemplateGetRequest(string $contentType = self::contentTypes['apiAdminEmailPasswordResetTemplateGet'][0])
{
$resourcePath = '/api/admin/email/password-reset-template';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$headers = $this->headerSelector->selectHeaders(
['text/plain', 'application/json', 'text/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 apiAdminEmailTestSendPost
*
* @param \OmsorgCoreClient\Model\SendTestEmailRequest|null $send_test_email_request send_test_email_request (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminEmailTestSendPost'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function apiAdminEmailTestSendPost($send_test_email_request = null, string $contentType = self::contentTypes['apiAdminEmailTestSendPost'][0])
{
$this->apiAdminEmailTestSendPostWithHttpInfo($send_test_email_request, $contentType);
}
/**
* Operation apiAdminEmailTestSendPostWithHttpInfo
*
* @param \OmsorgCoreClient\Model\SendTestEmailRequest|null $send_test_email_request (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminEmailTestSendPost'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function apiAdminEmailTestSendPostWithHttpInfo($send_test_email_request = null, string $contentType = self::contentTypes['apiAdminEmailTestSendPost'][0])
{
$request = $this->apiAdminEmailTestSendPostRequest($send_test_email_request, $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();
return [null, $statusCode, $response->getHeaders()];
} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}
/**
* Operation apiAdminEmailTestSendPostAsync
*
* @param \OmsorgCoreClient\Model\SendTestEmailRequest|null $send_test_email_request (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminEmailTestSendPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAdminEmailTestSendPostAsync($send_test_email_request = null, string $contentType = self::contentTypes['apiAdminEmailTestSendPost'][0])
{
return $this->apiAdminEmailTestSendPostAsyncWithHttpInfo($send_test_email_request, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiAdminEmailTestSendPostAsyncWithHttpInfo
*
* @param \OmsorgCoreClient\Model\SendTestEmailRequest|null $send_test_email_request (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminEmailTestSendPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAdminEmailTestSendPostAsyncWithHttpInfo($send_test_email_request = null, string $contentType = self::contentTypes['apiAdminEmailTestSendPost'][0])
{
$returnType = '';
$request = $this->apiAdminEmailTestSendPostRequest($send_test_email_request, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $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 'apiAdminEmailTestSendPost'
*
* @param \OmsorgCoreClient\Model\SendTestEmailRequest|null $send_test_email_request (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminEmailTestSendPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiAdminEmailTestSendPostRequest($send_test_email_request = null, string $contentType = self::contentTypes['apiAdminEmailTestSendPost'][0])
{
$resourcePath = '/api/admin/email/test-send';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$headers = $this->headerSelector->selectHeaders(
[],
$contentType,
$multipart
);
// for model (json/xml)
if (isset($send_test_email_request)) {
if (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the body
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($send_test_email_request));
} else {
$httpBody = $send_test_email_request;
}
} elseif (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(
'POST',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Create http client option
*
* @throws \RuntimeException on file opening failure
* @return array of http client options
*/
protected function createHttpClientOption()
{
$options = [];
if ($this->config->getDebug()) {
$options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');
if (!$options[RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
private function handleResponseWithDataType(
string $dataType,
RequestInterface $request,
ResponseInterface $response
): array {
if ($dataType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($dataType !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$response->getStatusCode(),
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, $dataType, []),
$response->getStatusCode(),
$response->getHeaders()
];
}
private function responseWithinRangeCode(
string $rangeCode,
int $statusCode
): bool {
$left = (int) ($rangeCode[0].'00');
$right = (int) ($rangeCode[0].'99');
return $statusCode >= $left && $statusCode <= $right;
}
}
@@ -0,0 +1,847 @@
<?php
/**
* AdminSessionsApi
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Api;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\MultipartStream;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use OmsorgCoreClient\ApiException;
use OmsorgCoreClient\Configuration;
use OmsorgCoreClient\FormDataProcessor;
use OmsorgCoreClient\HeaderSelector;
use OmsorgCoreClient\ObjectSerializer;
/**
* AdminSessionsApi Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AdminSessionsApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @var int Host index
*/
protected $hostIndex;
/** @var string[] $contentTypes **/
public const contentTypes = [
'apiAdminSessionsGet' => [
'application/json',
],
'apiAdminSessionsIdRevokePost' => [
'application/json',
],
'apiAdminSessionsRevokeAllPost' => [
'application/json',
],
];
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
$this->config = $config ?: Configuration::getDefaultConfiguration();
$this->headerSelector = $selector ?: new HeaderSelector();
$this->hostIndex = $hostIndex;
}
/**
* Set the host index
*
* @param int $hostIndex Host index (required)
*/
public function setHostIndex($hostIndex): void
{
$this->hostIndex = $hostIndex;
}
/**
* Get the host index
*
* @return int Host index
*/
public function getHostIndex()
{
return $this->hostIndex;
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation apiAdminSessionsGet
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsGet'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return \OmsorgCoreClient\Model\SessionResponse[]
*/
public function apiAdminSessionsGet(string $contentType = self::contentTypes['apiAdminSessionsGet'][0])
{
list($response) = $this->apiAdminSessionsGetWithHttpInfo($contentType);
return $response;
}
/**
* Operation apiAdminSessionsGetWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsGet'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of \OmsorgCoreClient\Model\SessionResponse[], HTTP status code, HTTP response headers (array of strings)
*/
public function apiAdminSessionsGetWithHttpInfo(string $contentType = self::contentTypes['apiAdminSessionsGet'][0])
{
$request = $this->apiAdminSessionsGetRequest($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();
switch($statusCode) {
case 200:
return $this->handleResponseWithDataType(
'\OmsorgCoreClient\Model\SessionResponse[]',
$request,
$response,
);
}
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()
);
}
return $this->handleResponseWithDataType(
'\OmsorgCoreClient\Model\SessionResponse[]',
$request,
$response,
);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\OmsorgCoreClient\Model\SessionResponse[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
throw $e;
}
throw $e;
}
}
/**
* Operation apiAdminSessionsGetAsync
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAdminSessionsGetAsync(string $contentType = self::contentTypes['apiAdminSessionsGet'][0])
{
return $this->apiAdminSessionsGetAsyncWithHttpInfo($contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiAdminSessionsGetAsyncWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAdminSessionsGetAsyncWithHttpInfo(string $contentType = self::contentTypes['apiAdminSessionsGet'][0])
{
$returnType = '\OmsorgCoreClient\Model\SessionResponse[]';
$request = $this->apiAdminSessionsGetRequest($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 'apiAdminSessionsGet'
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiAdminSessionsGetRequest(string $contentType = self::contentTypes['apiAdminSessionsGet'][0])
{
$resourcePath = '/api/admin/sessions';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$headers = $this->headerSelector->selectHeaders(
['text/plain', 'application/json', 'text/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 apiAdminSessionsIdRevokePost
*
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsIdRevokePost'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function apiAdminSessionsIdRevokePost($id, string $contentType = self::contentTypes['apiAdminSessionsIdRevokePost'][0])
{
$this->apiAdminSessionsIdRevokePostWithHttpInfo($id, $contentType);
}
/**
* Operation apiAdminSessionsIdRevokePostWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsIdRevokePost'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function apiAdminSessionsIdRevokePostWithHttpInfo($id, string $contentType = self::contentTypes['apiAdminSessionsIdRevokePost'][0])
{
$request = $this->apiAdminSessionsIdRevokePostRequest($id, $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();
return [null, $statusCode, $response->getHeaders()];
} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}
/**
* Operation apiAdminSessionsIdRevokePostAsync
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsIdRevokePost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAdminSessionsIdRevokePostAsync($id, string $contentType = self::contentTypes['apiAdminSessionsIdRevokePost'][0])
{
return $this->apiAdminSessionsIdRevokePostAsyncWithHttpInfo($id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiAdminSessionsIdRevokePostAsyncWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsIdRevokePost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAdminSessionsIdRevokePostAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiAdminSessionsIdRevokePost'][0])
{
$returnType = '';
$request = $this->apiAdminSessionsIdRevokePostRequest($id, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $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 'apiAdminSessionsIdRevokePost'
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsIdRevokePost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiAdminSessionsIdRevokePostRequest($id, string $contentType = self::contentTypes['apiAdminSessionsIdRevokePost'][0])
{
// verify the required parameter 'id' is set
if ($id === null || (is_array($id) && count($id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $id when calling apiAdminSessionsIdRevokePost'
);
}
$resourcePath = '/api/admin/sessions/{id}/revoke';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($id !== null) {
$resourcePath = str_replace(
'{' . 'id' . '}',
ObjectSerializer::toPathValue($id),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(
[],
$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(
'POST',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiAdminSessionsRevokeAllPost
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsRevokeAllPost'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function apiAdminSessionsRevokeAllPost(string $contentType = self::contentTypes['apiAdminSessionsRevokeAllPost'][0])
{
$this->apiAdminSessionsRevokeAllPostWithHttpInfo($contentType);
}
/**
* Operation apiAdminSessionsRevokeAllPostWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsRevokeAllPost'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function apiAdminSessionsRevokeAllPostWithHttpInfo(string $contentType = self::contentTypes['apiAdminSessionsRevokeAllPost'][0])
{
$request = $this->apiAdminSessionsRevokeAllPostRequest($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();
return [null, $statusCode, $response->getHeaders()];
} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}
/**
* Operation apiAdminSessionsRevokeAllPostAsync
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsRevokeAllPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAdminSessionsRevokeAllPostAsync(string $contentType = self::contentTypes['apiAdminSessionsRevokeAllPost'][0])
{
return $this->apiAdminSessionsRevokeAllPostAsyncWithHttpInfo($contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiAdminSessionsRevokeAllPostAsyncWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsRevokeAllPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAdminSessionsRevokeAllPostAsyncWithHttpInfo(string $contentType = self::contentTypes['apiAdminSessionsRevokeAllPost'][0])
{
$returnType = '';
$request = $this->apiAdminSessionsRevokeAllPostRequest($contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $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 'apiAdminSessionsRevokeAllPost'
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAdminSessionsRevokeAllPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiAdminSessionsRevokeAllPostRequest(string $contentType = self::contentTypes['apiAdminSessionsRevokeAllPost'][0])
{
$resourcePath = '/api/admin/sessions/revoke-all';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$headers = $this->headerSelector->selectHeaders(
[],
$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(
'POST',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Create http client option
*
* @throws \RuntimeException on file opening failure
* @return array of http client options
*/
protected function createHttpClientOption()
{
$options = [];
if ($this->config->getDebug()) {
$options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');
if (!$options[RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
private function handleResponseWithDataType(
string $dataType,
RequestInterface $request,
ResponseInterface $response
): array {
if ($dataType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($dataType !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$response->getStatusCode(),
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, $dataType, []),
$response->getStatusCode(),
$response->getHeaders()
];
}
private function responseWithinRangeCode(
string $rangeCode,
int $statusCode
): bool {
$left = (int) ($rangeCode[0].'00');
$right = (int) ($rangeCode[0].'99');
return $statusCode >= $left && $statusCode <= $right;
}
}
@@ -0,0 +1,538 @@
<?php
/**
* AuditLogApi
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Api;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\MultipartStream;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use OmsorgCoreClient\ApiException;
use OmsorgCoreClient\Configuration;
use OmsorgCoreClient\FormDataProcessor;
use OmsorgCoreClient\HeaderSelector;
use OmsorgCoreClient\ObjectSerializer;
/**
* AuditLogApi Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AuditLogApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @var int Host index
*/
protected $hostIndex;
/** @var string[] $contentTypes **/
public const contentTypes = [
'apiAuditLogGet' => [
'application/json',
],
];
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
$this->config = $config ?: Configuration::getDefaultConfiguration();
$this->headerSelector = $selector ?: new HeaderSelector();
$this->hostIndex = $hostIndex;
}
/**
* Set the host index
*
* @param int $hostIndex Host index (required)
*/
public function setHostIndex($hostIndex): void
{
$this->hostIndex = $hostIndex;
}
/**
* Get the host index
*
* @return int Host index
*/
public function getHostIndex()
{
return $this->hostIndex;
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation apiAuditLogGet
*
* @param string|null $entity_type entity_type (optional)
* @param string|null $entity_id entity_id (optional)
* @param string|null $actor_user_id actor_user_id (optional)
* @param \DateTime|null $from_utc from_utc (optional)
* @param \DateTime|null $to_utc to_utc (optional)
* @param int|null $page page (optional, default to 1)
* @param int|null $page_size page_size (optional, default to 50)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAuditLogGet'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return \OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse
*/
public function apiAuditLogGet($entity_type = null, $entity_id = null, $actor_user_id = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
list($response) = $this->apiAuditLogGetWithHttpInfo($entity_type, $entity_id, $actor_user_id, $from_utc, $to_utc, $page, $page_size, $contentType);
return $response;
}
/**
* Operation apiAuditLogGetWithHttpInfo
*
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 50)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAuditLogGet'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of \OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiAuditLogGetWithHttpInfo($entity_type = null, $entity_id = null, $actor_user_id = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
$request = $this->apiAuditLogGetRequest($entity_type, $entity_id, $actor_user_id, $from_utc, $to_utc, $page, $page_size, $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();
switch($statusCode) {
case 200:
return $this->handleResponseWithDataType(
'\OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse',
$request,
$response,
);
}
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()
);
}
return $this->handleResponseWithDataType(
'\OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse',
$request,
$response,
);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
throw $e;
}
throw $e;
}
}
/**
* Operation apiAuditLogGetAsync
*
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 50)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAuditLogGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAuditLogGetAsync($entity_type = null, $entity_id = null, $actor_user_id = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
return $this->apiAuditLogGetAsyncWithHttpInfo($entity_type, $entity_id, $actor_user_id, $from_utc, $to_utc, $page, $page_size, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiAuditLogGetAsyncWithHttpInfo
*
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 50)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAuditLogGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiAuditLogGetAsyncWithHttpInfo($entity_type = null, $entity_id = null, $actor_user_id = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
$returnType = '\OmsorgCoreClient\Model\AuditLogEntryResponsePagedResponse';
$request = $this->apiAuditLogGetRequest($entity_type, $entity_id, $actor_user_id, $from_utc, $to_utc, $page, $page_size, $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 'apiAuditLogGet'
*
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 50)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiAuditLogGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiAuditLogGetRequest($entity_type = null, $entity_id = null, $actor_user_id = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
$resourcePath = '/api/audit-log';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$entity_type,
'entityType', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$entity_id,
'entityId', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$actor_user_id,
'actorUserId', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$from_utc,
'fromUtc', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$to_utc,
'toUtc', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// 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(
$page_size,
'pageSize', // param base name
'integer', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
$headers = $this->headerSelector->selectHeaders(
['text/plain', 'application/json', 'text/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
);
}
/**
* Create http client option
*
* @throws \RuntimeException on file opening failure
* @return array of http client options
*/
protected function createHttpClientOption()
{
$options = [];
if ($this->config->getDebug()) {
$options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');
if (!$options[RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
private function handleResponseWithDataType(
string $dataType,
RequestInterface $request,
ResponseInterface $response
): array {
if ($dataType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($dataType !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$response->getStatusCode(),
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, $dataType, []),
$response->getStatusCode(),
$response->getHeaders()
];
}
private function responseWithinRangeCode(
string $rangeCode,
int $statusCode
): bool {
$left = (int) ($rangeCode[0].'00');
$right = (int) ($rangeCode[0].'99');
return $statusCode >= $left && $statusCode <= $right;
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,383 @@
<?php
/**
* HealthApi
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Api;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\MultipartStream;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use OmsorgCoreClient\ApiException;
use OmsorgCoreClient\Configuration;
use OmsorgCoreClient\FormDataProcessor;
use OmsorgCoreClient\HeaderSelector;
use OmsorgCoreClient\ObjectSerializer;
/**
* HealthApi Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class HealthApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @var int Host index
*/
protected $hostIndex;
/** @var string[] $contentTypes **/
public const contentTypes = [
'apiHealthGet' => [
'application/json',
],
];
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
$this->config = $config ?: Configuration::getDefaultConfiguration();
$this->headerSelector = $selector ?: new HeaderSelector();
$this->hostIndex = $hostIndex;
}
/**
* Set the host index
*
* @param int $hostIndex Host index (required)
*/
public function setHostIndex($hostIndex): void
{
$this->hostIndex = $hostIndex;
}
/**
* Get the host index
*
* @return int Host index
*/
public function getHostIndex()
{
return $this->hostIndex;
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation apiHealthGet
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiHealthGet'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function apiHealthGet(string $contentType = self::contentTypes['apiHealthGet'][0])
{
$this->apiHealthGetWithHttpInfo($contentType);
}
/**
* Operation apiHealthGetWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiHealthGet'] to see the possible values for this operation
*
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function apiHealthGetWithHttpInfo(string $contentType = self::contentTypes['apiHealthGet'][0])
{
$request = $this->apiHealthGetRequest($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();
return [null, $statusCode, $response->getHeaders()];
} catch (ApiException $e) {
switch ($e->getCode()) {
}
throw $e;
}
}
/**
* Operation apiHealthGetAsync
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiHealthGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiHealthGetAsync(string $contentType = self::contentTypes['apiHealthGet'][0])
{
return $this->apiHealthGetAsyncWithHttpInfo($contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiHealthGetAsyncWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiHealthGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiHealthGetAsyncWithHttpInfo(string $contentType = self::contentTypes['apiHealthGet'][0])
{
$returnType = '';
$request = $this->apiHealthGetRequest($contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
->then(
function ($response) use ($returnType) {
return [null, $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 'apiHealthGet'
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiHealthGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiHealthGetRequest(string $contentType = self::contentTypes['apiHealthGet'][0])
{
$resourcePath = '/api/health';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$headers = $this->headerSelector->selectHeaders(
[],
$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
);
}
/**
* Create http client option
*
* @throws \RuntimeException on file opening failure
* @return array of http client options
*/
protected function createHttpClientOption()
{
$options = [];
if ($this->config->getDebug()) {
$options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');
if (!$options[RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
private function handleResponseWithDataType(
string $dataType,
RequestInterface $request,
ResponseInterface $response
): array {
if ($dataType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($dataType !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$response->getStatusCode(),
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, $dataType, []),
$response->getStatusCode(),
$response->getHeaders()
];
}
private function responseWithinRangeCode(
string $rangeCode,
int $statusCode
): bool {
$left = (int) ($rangeCode[0].'00');
$right = (int) ($rangeCode[0].'99');
return $statusCode >= $left && $statusCode <= $right;
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,119 @@
<?php
/**
* ApiException
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient;
use \Exception;
/**
* ApiException Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ApiException extends Exception
{
/**
* The HTTP body of the server response either as Json or string.
*
* @var \stdClass|string|null
*/
protected $responseBody;
/**
* The HTTP header of the server response.
*
* @var string[][]|null
*/
protected $responseHeaders;
/**
* The deserialized response object
*
* @var \stdClass|string|null
*/
protected $responseObject;
/**
* Constructor
*
* @param string $message Error message
* @param int $code HTTP status code
* @param string[][]|null $responseHeaders HTTP response header
* @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string
*/
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
{
parent::__construct($message, $code);
$this->responseHeaders = $responseHeaders;
$this->responseBody = $responseBody;
}
/**
* Gets the HTTP response header
*
* @return string[][]|null HTTP response header
*/
public function getResponseHeaders()
{
return $this->responseHeaders;
}
/**
* Gets the HTTP body of the server response either as Json or string
*
* @return \stdClass|string|null HTTP body of the server response either as \stdClass or string
*/
public function getResponseBody()
{
return $this->responseBody;
}
/**
* Sets the deserialized response object (during deserialization)
*
* @param mixed $obj Deserialized response object
*
* @return void
*/
public function setResponseObject($obj)
{
$this->responseObject = $obj;
}
/**
* Gets the deserialized response object (during deserialization)
*
* @return mixed the deserialized response object
*/
public function getResponseObject()
{
return $this->responseObject;
}
}
@@ -0,0 +1,531 @@
<?php
/**
* Configuration
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient;
/**
* Configuration Class Doc Comment
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Configuration
{
public const BOOLEAN_FORMAT_INT = 'int';
public const BOOLEAN_FORMAT_STRING = 'string';
/**
* @var Configuration
*/
private static $defaultConfiguration;
/**
* Associate array to store API key(s)
*
* @var string[]
*/
protected $apiKeys = [];
/**
* Associate array to store API prefix (e.g. Bearer)
*
* @var string[]
*/
protected $apiKeyPrefixes = [];
/**
* Access token for OAuth/Bearer authentication
*
* @var string
*/
protected $accessToken = '';
/**
* Boolean format for query string
*
* @var string
*/
protected $booleanFormatForQueryString = self::BOOLEAN_FORMAT_INT;
/**
* Username for HTTP basic authentication
*
* @var string
*/
protected $username = '';
/**
* Password for HTTP basic authentication
*
* @var string
*/
protected $password = '';
/**
* The host
*
* @var string
*/
protected $host = 'http://localhost';
/**
* User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default
*
* @var string
*/
protected $userAgent = 'OpenAPI-Generator/1.0.0/PHP';
/**
* Debug switch (default set to false)
*
* @var bool
*/
protected $debug = false;
/**
* Debug file location (log to STDOUT by default)
*
* @var string
*/
protected $debugFile = 'php://output';
/**
* Debug file location (log to STDOUT by default)
*
* @var string
*/
protected $tempFolderPath;
/**
* Constructor
*/
public function __construct()
{
$this->tempFolderPath = sys_get_temp_dir();
}
/**
* Sets API key
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
* @param string $key API key or token
*
* @return $this
*/
public function setApiKey($apiKeyIdentifier, $key)
{
$this->apiKeys[$apiKeyIdentifier] = $key;
return $this;
}
/**
* Gets API key
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
*
* @return null|string API key or token
*/
public function getApiKey($apiKeyIdentifier)
{
return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null;
}
/**
* Sets the prefix for API key (e.g. Bearer)
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
* @param string $prefix API key prefix, e.g. Bearer
*
* @return $this
*/
public function setApiKeyPrefix($apiKeyIdentifier, $prefix)
{
$this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;
return $this;
}
/**
* Gets API key prefix
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
*
* @return null|string
*/
public function getApiKeyPrefix($apiKeyIdentifier)
{
return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null;
}
/**
* Sets the access token for OAuth
*
* @param string $accessToken Token for OAuth
*
* @return $this
*/
public function setAccessToken($accessToken)
{
$this->accessToken = $accessToken;
return $this;
}
/**
* Gets the access token for OAuth
*
* @return string Access token for OAuth
*/
public function getAccessToken()
{
return $this->accessToken;
}
/**
* Sets boolean format for query string.
*
* @param string $booleanFormat Boolean format for query string
*
* @return $this
*/
public function setBooleanFormatForQueryString(string $booleanFormat)
{
$this->booleanFormatForQueryString = $booleanFormat;
return $this;
}
/**
* Gets boolean format for query string.
*
* @return string Boolean format for query string
*/
public function getBooleanFormatForQueryString(): string
{
return $this->booleanFormatForQueryString;
}
/**
* Sets the username for HTTP basic authentication
*
* @param string $username Username for HTTP basic authentication
*
* @return $this
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Gets the username for HTTP basic authentication
*
* @return string Username for HTTP basic authentication
*/
public function getUsername()
{
return $this->username;
}
/**
* Sets the password for HTTP basic authentication
*
* @param string $password Password for HTTP basic authentication
*
* @return $this
*/
public function setPassword($password)
{
$this->password = $password;
return $this;
}
/**
* Gets the password for HTTP basic authentication
*
* @return string Password for HTTP basic authentication
*/
public function getPassword()
{
return $this->password;
}
/**
* Sets the host
*
* @param string $host Host
*
* @return $this
*/
public function setHost($host)
{
$this->host = $host;
return $this;
}
/**
* Gets the host
*
* @return string Host
*/
public function getHost()
{
return $this->host;
}
/**
* Sets the user agent of the api client
*
* @param string $userAgent the user agent of the api client
*
* @throws \InvalidArgumentException
* @return $this
*/
public function setUserAgent($userAgent)
{
if (!is_string($userAgent)) {
throw new \InvalidArgumentException('User-agent must be a string.');
}
$this->userAgent = $userAgent;
return $this;
}
/**
* Gets the user agent of the api client
*
* @return string user agent
*/
public function getUserAgent()
{
return $this->userAgent;
}
/**
* Sets debug flag
*
* @param bool $debug Debug flag
*
* @return $this
*/
public function setDebug($debug)
{
$this->debug = $debug;
return $this;
}
/**
* Gets the debug flag
*
* @return bool
*/
public function getDebug()
{
return $this->debug;
}
/**
* Sets the debug file
*
* @param string $debugFile Debug file
*
* @return $this
*/
public function setDebugFile($debugFile)
{
$this->debugFile = $debugFile;
return $this;
}
/**
* Gets the debug file
*
* @return string
*/
public function getDebugFile()
{
return $this->debugFile;
}
/**
* Sets the temp folder path
*
* @param string $tempFolderPath Temp folder path
*
* @return $this
*/
public function setTempFolderPath($tempFolderPath)
{
$this->tempFolderPath = $tempFolderPath;
return $this;
}
/**
* Gets the temp folder path
*
* @return string Temp folder path
*/
public function getTempFolderPath()
{
return $this->tempFolderPath;
}
/**
* Gets the default configuration instance
*
* @return Configuration
*/
public static function getDefaultConfiguration()
{
if (self::$defaultConfiguration === null) {
self::$defaultConfiguration = new Configuration();
}
return self::$defaultConfiguration;
}
/**
* Sets the default configuration instance
*
* @param Configuration $config An instance of the Configuration Object
*
* @return void
*/
public static function setDefaultConfiguration(Configuration $config)
{
self::$defaultConfiguration = $config;
}
/**
* Gets the essential information for debugging
*
* @return string The report for debugging
*/
public static function toDebugReport()
{
$report = 'PHP SDK (OmsorgCoreClient) Debug Report:' . PHP_EOL;
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: 1.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
return $report;
}
/**
* Get API key (with prefix if set)
*
* @param string $apiKeyIdentifier name of apikey
*
* @return null|string API key with the prefix
*/
public function getApiKeyWithPrefix($apiKeyIdentifier)
{
$prefix = $this->getApiKeyPrefix($apiKeyIdentifier);
$apiKey = $this->getApiKey($apiKeyIdentifier);
if ($apiKey === null) {
return null;
}
if ($prefix === null) {
$keyWithPrefix = $apiKey;
} else {
$keyWithPrefix = $prefix . ' ' . $apiKey;
}
return $keyWithPrefix;
}
/**
* Returns an array of host settings
*
* @return array an array of host settings
*/
public function getHostSettings()
{
return [
[
"url" => "",
"description" => "No description provided",
]
];
}
/**
* Returns URL based on host settings, index and variables
*
* @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients
* @param int $hostIndex index of the host settings
* @param array|null $variables hash of variable and the corresponding value (optional)
* @return string URL based on host settings
*/
public static function getHostString(array $hostSettings, $hostIndex, ?array $variables = null)
{
if (null === $variables) {
$variables = [];
}
// check array index out of bound
if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) {
throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostSettings));
}
$host = $hostSettings[$hostIndex];
$url = $host["url"];
// go through variable and assign a value
foreach ($host["variables"] ?? [] as $name => $variable) {
if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user
if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum
$url = str_replace("{".$name."}", $variables[$name], $url);
} else {
throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"]).".");
}
} else {
// use default value
$url = str_replace("{".$name."}", $variable["default_value"], $url);
}
}
return $url;
}
/**
* Returns URL based on the index and variables
*
* @param int $index index of the host settings
* @param array|null $variables hash of variable and the corresponding value (optional)
* @return string URL based on host settings
*/
public function getHostFromSettings($index, $variables = null)
{
return self::getHostString($this->getHostSettings(), $index, $variables);
}
}
@@ -0,0 +1,242 @@
<?php
/**
* FormDataProcessor
* PHP version 7.4
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient;
use ArrayAccess;
use DateTime;
use GuzzleHttp\Psr7\Utils;
use Psr\Http\Message\StreamInterface;
use SplFileObject;
use OmsorgCoreClient\Model\ModelInterface;
/**
* FormDataProcessor Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class FormDataProcessor
{
/**
* Tags whether payload passed to ::prepare() contains one or more
* SplFileObject or stream values.
*/
public bool $has_file = false;
/**
* Take value and turn it into an array suitable for inclusion in
* the http body (form parameter). If it's a string, pass through unchanged
* If it's a datetime object, format it in ISO8601
*
* @param array<string|bool|array|DateTime|ArrayAccess|SplFileObject> $values the value of the form parameter
*
* @return array [key => value] of formdata
*/
public function prepare(array $values): array
{
$this->has_file = false;
$result = [];
foreach ($values as $k => $v) {
if ($v === null) {
continue;
}
$result[$k] = $this->makeFormSafe($v);
}
return $result;
}
/**
* Flattens a multi-level array of data and generates a single-level array
* compatible with formdata - a single-level array where the keys use bracket
* notation to signify nested data.
*
* credit: https://github.com/FranBar1966/FlatPHP
*/
public static function flatten(array $source, string $start = ''): array
{
$opt = [
'prefix' => '[',
'suffix' => ']',
'suffix-end' => true,
'prefix-list' => '[',
'suffix-list' => ']',
'suffix-list-end' => true,
];
if ($start === '') {
$currentPrefix = '';
$currentSuffix = '';
$currentSuffixEnd = false;
} elseif (array_is_list($source)) {
$currentPrefix = $opt['prefix-list'];
$currentSuffix = $opt['suffix-list'];
$currentSuffixEnd = $opt['suffix-list-end'];
} else {
$currentPrefix = $opt['prefix'];
$currentSuffix = $opt['suffix'];
$currentSuffixEnd = $opt['suffix-end'];
}
$currentName = $start;
$result = [];
foreach ($source as $key => $val) {
$currentName .= $currentPrefix.$key;
if (is_array($val) && !empty($val)) {
$currentName .= $currentSuffix;
$result += self::flatten($val, $currentName);
} else {
if ($currentSuffixEnd) {
$currentName .= $currentSuffix;
}
$result[$currentName] = ObjectSerializer::toString($val);
}
$currentName = $start;
}
return $result;
}
/**
* formdata must be limited to scalars or arrays of scalar values,
* or a resource for a file upload. Here we iterate through all available
* data and identify how to handle each scenario
*/
protected function makeFormSafe($value)
{
if ($value instanceof SplFileObject) {
return $this->processFiles([$value])[0];
}
if (is_resource($value)) {
$this->has_file = true;
return $value;
}
if ($value instanceof ModelInterface) {
return $this->processModel($value);
}
if (is_array($value) || (is_object($value) && !$value instanceof \DateTimeInterface)) {
$data = [];
foreach ($value as $k => $v) {
$data[$k] = $this->makeFormSafe($v);
}
return $data;
}
return ObjectSerializer::toString($value);
}
/**
* We are able to handle nested ModelInterface. We do not simply call
* json_decode(json_encode()) because any given model may have binary data
* or other data that cannot be serialized to a JSON string
*/
protected function processModel(ModelInterface $model): array
{
$result = [];
foreach ($model::openAPITypes() as $name => $type) {
$value = $model->offsetGet($name);
if ($value === null) {
continue;
}
if (strpos($type, '\SplFileObject') !== false) {
$file = is_array($value) ? $value : [$value];
$result[$name] = $this->processFiles($file);
continue;
}
if ($value instanceof ModelInterface) {
$result[$name] = $this->processModel($value);
continue;
}
if (is_array($value) || is_object($value)) {
$result[$name] = $this->makeFormSafe($value);
continue;
}
$result[$name] = ObjectSerializer::toString($value);
}
return $result;
}
/**
* Handle file data
*/
protected function processFiles(array $files): array
{
$this->has_file = true;
$result = [];
foreach ($files as $i => $file) {
if (is_array($file)) {
$result[$i] = $this->processFiles($file);
continue;
}
if ($file instanceof StreamInterface) {
$result[$i] = $file;
continue;
}
if ($file instanceof SplFileObject) {
$result[$i] = $this->tryFopen($file);
}
}
return $result;
}
private function tryFopen(SplFileObject $file)
{
return Utils::tryFopen($file->getRealPath(), 'rb');
}
}
@@ -0,0 +1,273 @@
<?php
/**
* HeaderSelector
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient;
/**
* HeaderSelector Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class HeaderSelector
{
/**
* @param string[] $accept
* @param string $contentType
* @param bool $isMultipart
* @return string[]
*/
public function selectHeaders(array $accept, string $contentType, bool $isMultipart): array
{
$headers = [];
$accept = $this->selectAcceptHeader($accept);
if ($accept !== null) {
$headers['Accept'] = $accept;
}
if (!$isMultipart) {
if($contentType === '') {
$contentType = 'application/json';
}
$headers['Content-Type'] = $contentType;
}
return $headers;
}
/**
* Return the header 'Accept' based on an array of Accept provided.
*
* @param string[] $accept Array of header
*
* @return null|string Accept (e.g. application/json)
*/
private function selectAcceptHeader(array $accept): ?string
{
# filter out empty entries
$accept = array_filter($accept);
if (count($accept) === 0) {
return null;
}
# If there's only one Accept header, just use it
if (count($accept) === 1) {
return reset($accept);
}
# If none of the available Accept headers is of type "json", then just use all them
$headersWithJson = $this->selectJsonMimeList($accept);
if (count($headersWithJson) === 0) {
return implode(',', $accept);
}
# If we got here, then we need add quality values (weight), as described in IETF RFC 9110, Items 12.4.2/12.5.1,
# to give the highest priority to json-like headers - recalculating the existing ones, if needed
return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson);
}
/**
* Detects whether a string contains a valid JSON mime type
*
* @param string $searchString
* @return bool
*/
public function isJsonMime(string $searchString): bool
{
return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1;
}
/**
* Select all items from a list containing a JSON mime type
*
* @param array $mimeList
* @return array
*/
private function selectJsonMimeList(array $mimeList): array {
$jsonMimeList = [];
foreach ($mimeList as $mime) {
if($this->isJsonMime($mime)) {
$jsonMimeList[] = $mime;
}
}
return $jsonMimeList;
}
/**
* Create an Accept header string from the given "Accept" headers array, recalculating all weights
*
* @param string[] $accept Array of Accept Headers
* @param string[] $headersWithJson Array of Accept Headers of type "json"
*
* @return string "Accept" Header (e.g. "application/json, text/html; q=0.9")
*/
private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headersWithJson): string
{
$processedHeaders = [
'withApplicationJson' => [],
'withJson' => [],
'withoutJson' => [],
];
foreach ($accept as $header) {
$headerData = $this->getHeaderAndWeight($header);
if (stripos($headerData['header'], 'application/json') === 0) {
$processedHeaders['withApplicationJson'][] = $headerData;
} elseif (in_array($header, $headersWithJson, true)) {
$processedHeaders['withJson'][] = $headerData;
} else {
$processedHeaders['withoutJson'][] = $headerData;
}
}
$acceptHeaders = [];
$currentWeight = 1000;
$hasMoreThan28Headers = count($accept) > 28;
foreach($processedHeaders as $headers) {
if (count($headers) > 0) {
$acceptHeaders[] = $this->adjustWeight($headers, $currentWeight, $hasMoreThan28Headers);
}
}
$acceptHeaders = array_merge(...$acceptHeaders);
return implode(',', $acceptHeaders);
}
/**
* Given an Accept header, returns an associative array splitting the header and its weight
*
* @param string $header "Accept" Header
*
* @return array with the header and its weight
*/
private function getHeaderAndWeight(string $header): array
{
# matches headers with weight, splitting the header and the weight in $outputArray
if (preg_match('/(.*);\s*q=(1(?:\.0+)?|0\.\d+)$/', $header, $outputArray) === 1) {
$headerData = [
'header' => $outputArray[1],
'weight' => (int)($outputArray[2] * 1000),
];
} else {
$headerData = [
'header' => trim($header),
'weight' => 1000,
];
}
return $headerData;
}
/**
* @param array[] $headers
* @param float $currentWeight
* @param bool $hasMoreThan28Headers
* @return string[] array of adjusted "Accept" headers
*/
private function adjustWeight(array $headers, float &$currentWeight, bool $hasMoreThan28Headers): array
{
usort($headers, function (array $a, array $b) {
return $b['weight'] - $a['weight'];
});
$acceptHeaders = [];
foreach ($headers as $index => $header) {
if($index > 0 && $headers[$index - 1]['weight'] > $header['weight'])
{
$currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers);
}
$weight = $currentWeight;
$acceptHeaders[] = $this->buildAcceptHeader($header['header'], $weight);
}
$currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers);
return $acceptHeaders;
}
/**
* @param string $header
* @param int $weight
* @return string
*/
private function buildAcceptHeader(string $header, int $weight): string
{
if($weight === 1000) {
return $header;
}
return trim($header, '; ') . ';q=' . rtrim(sprintf('%0.3f', $weight / 1000), '0');
}
/**
* Calculate the next weight, based on the current one.
*
* If there are less than 28 "Accept" headers, the weights will be decreased by 1 on its highest significant digit, using the
* following formula:
*
* next weight = current weight - 10 ^ (floor(log(current weight - 1)))
*
* ( current weight minus ( 10 raised to the power of ( floor of (log to the base 10 of ( current weight minus 1 ) ) ) ) )
*
* Starting from 1000, this generates the following series:
*
* 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
*
* The resulting quality codes are closer to the average "normal" usage of them (like "q=0.9", "q=0.8" and so on), but it only works
* if there is a maximum of 28 "Accept" headers. If we have more than that (which is extremely unlikely), then we fall back to a 1-by-1
* decrement rule, which will result in quality codes like "q=0.999", "q=0.998" etc.
*
* @param int $currentWeight varying from 1 to 1000 (will be divided by 1000 to build the quality value)
* @param bool $hasMoreThan28Headers
* @return int
*/
public function getNextWeight(int $currentWeight, bool $hasMoreThan28Headers): int
{
if ($currentWeight <= 1) {
return 1;
}
if ($hasMoreThan28Headers) {
return $currentWeight - 1;
}
return $currentWeight - 10 ** floor( log10($currentWeight - 1) );
}
}
@@ -0,0 +1,498 @@
<?php
/**
* AddUserPermissionOverrideRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* AddUserPermissionOverrideRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class AddUserPermissionOverrideRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'AddUserPermissionOverrideRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'module' => 'string',
'action' => 'string',
'effect' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'module' => null,
'action' => null,
'effect' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'module' => true,
'action' => true,
'effect' => 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 = [
'module' => 'module',
'action' => 'action',
'effect' => 'effect'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'module' => 'setModule',
'action' => 'setAction',
'effect' => 'setEffect'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'module' => 'getModule',
'action' => 'getAction',
'effect' => 'getEffect'
];
/**
* 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[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('module', $data ?? [], null);
$this->setIfExists('action', $data ?? [], null);
$this->setIfExists('effect', $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 = [];
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 module
*
* @return string|null
*/
public function getModule()
{
return $this->container['module'];
}
/**
* Sets module
*
* @param string|null $module module
*
* @return self
*/
public function setModule($module)
{
if (is_null($module)) {
array_push($this->openAPINullablesSetToNull, 'module');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('module', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['module'] = $module;
return $this;
}
/**
* Gets action
*
* @return string|null
*/
public function getAction()
{
return $this->container['action'];
}
/**
* Sets action
*
* @param string|null $action action
*
* @return self
*/
public function setAction($action)
{
if (is_null($action)) {
array_push($this->openAPINullablesSetToNull, 'action');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('action', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['action'] = $action;
return $this;
}
/**
* Gets effect
*
* @return string|null
*/
public function getEffect()
{
return $this->container['effect'];
}
/**
* Sets effect
*
* @param string|null $effect effect
*
* @return self
*/
public function setEffect($effect)
{
if (is_null($effect)) {
array_push($this->openAPINullablesSetToNull, 'effect');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('effect', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['effect'] = $effect;
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));
}
}
@@ -0,0 +1,771 @@
<?php
/**
* AuditLogEntryResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* AuditLogEntryResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class AuditLogEntryResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'AuditLogEntryResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'occurred_at_utc' => '\DateTime',
'actor_user_id' => 'string',
'actor_username' => 'string',
'ip_address' => 'string',
'category' => 'string',
'action' => 'string',
'entity_type' => 'string',
'entity_id' => 'string',
'details' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'id' => 'uuid',
'occurred_at_utc' => 'date-time',
'actor_user_id' => 'uuid',
'actor_username' => null,
'ip_address' => null,
'category' => null,
'action' => null,
'entity_type' => null,
'entity_id' => 'uuid',
'details' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'occurred_at_utc' => false,
'actor_user_id' => true,
'actor_username' => true,
'ip_address' => true,
'category' => true,
'action' => true,
'entity_type' => true,
'entity_id' => true,
'details' => 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 = [
'id' => 'id',
'occurred_at_utc' => 'occurredAtUtc',
'actor_user_id' => 'actorUserId',
'actor_username' => 'actorUsername',
'ip_address' => 'ipAddress',
'category' => 'category',
'action' => 'action',
'entity_type' => 'entityType',
'entity_id' => 'entityId',
'details' => 'details'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'occurred_at_utc' => 'setOccurredAtUtc',
'actor_user_id' => 'setActorUserId',
'actor_username' => 'setActorUsername',
'ip_address' => 'setIpAddress',
'category' => 'setCategory',
'action' => 'setAction',
'entity_type' => 'setEntityType',
'entity_id' => 'setEntityId',
'details' => 'setDetails'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'occurred_at_utc' => 'getOccurredAtUtc',
'actor_user_id' => 'getActorUserId',
'actor_username' => 'getActorUsername',
'ip_address' => 'getIpAddress',
'category' => 'getCategory',
'action' => 'getAction',
'entity_type' => 'getEntityType',
'entity_id' => 'getEntityId',
'details' => 'getDetails'
];
/**
* 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[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('id', $data ?? [], null);
$this->setIfExists('occurred_at_utc', $data ?? [], null);
$this->setIfExists('actor_user_id', $data ?? [], null);
$this->setIfExists('actor_username', $data ?? [], null);
$this->setIfExists('ip_address', $data ?? [], null);
$this->setIfExists('category', $data ?? [], null);
$this->setIfExists('action', $data ?? [], null);
$this->setIfExists('entity_type', $data ?? [], null);
$this->setIfExists('entity_id', $data ?? [], null);
$this->setIfExists('details', $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 = [];
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 id
*
* @return string|null
*/
public function getId()
{
return $this->container['id'];
}
/**
* Sets id
*
* @param string|null $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 occurred_at_utc
*
* @return \DateTime|null
*/
public function getOccurredAtUtc()
{
return $this->container['occurred_at_utc'];
}
/**
* Sets occurred_at_utc
*
* @param \DateTime|null $occurred_at_utc occurred_at_utc
*
* @return self
*/
public function setOccurredAtUtc($occurred_at_utc)
{
if (is_null($occurred_at_utc)) {
throw new \InvalidArgumentException('non-nullable occurred_at_utc cannot be null');
}
$this->container['occurred_at_utc'] = $occurred_at_utc;
return $this;
}
/**
* Gets actor_user_id
*
* @return string|null
*/
public function getActorUserId()
{
return $this->container['actor_user_id'];
}
/**
* Sets actor_user_id
*
* @param string|null $actor_user_id actor_user_id
*
* @return self
*/
public function setActorUserId($actor_user_id)
{
if (is_null($actor_user_id)) {
array_push($this->openAPINullablesSetToNull, 'actor_user_id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('actor_user_id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['actor_user_id'] = $actor_user_id;
return $this;
}
/**
* Gets actor_username
*
* @return string|null
*/
public function getActorUsername()
{
return $this->container['actor_username'];
}
/**
* Sets actor_username
*
* @param string|null $actor_username actor_username
*
* @return self
*/
public function setActorUsername($actor_username)
{
if (is_null($actor_username)) {
array_push($this->openAPINullablesSetToNull, 'actor_username');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('actor_username', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['actor_username'] = $actor_username;
return $this;
}
/**
* Gets ip_address
*
* @return string|null
*/
public function getIpAddress()
{
return $this->container['ip_address'];
}
/**
* Sets ip_address
*
* @param string|null $ip_address ip_address
*
* @return self
*/
public function setIpAddress($ip_address)
{
if (is_null($ip_address)) {
array_push($this->openAPINullablesSetToNull, 'ip_address');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('ip_address', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['ip_address'] = $ip_address;
return $this;
}
/**
* Gets category
*
* @return string|null
*/
public function getCategory()
{
return $this->container['category'];
}
/**
* Sets category
*
* @param string|null $category category
*
* @return self
*/
public function setCategory($category)
{
if (is_null($category)) {
array_push($this->openAPINullablesSetToNull, 'category');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('category', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['category'] = $category;
return $this;
}
/**
* Gets action
*
* @return string|null
*/
public function getAction()
{
return $this->container['action'];
}
/**
* Sets action
*
* @param string|null $action action
*
* @return self
*/
public function setAction($action)
{
if (is_null($action)) {
array_push($this->openAPINullablesSetToNull, 'action');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('action', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['action'] = $action;
return $this;
}
/**
* Gets entity_type
*
* @return string|null
*/
public function getEntityType()
{
return $this->container['entity_type'];
}
/**
* Sets entity_type
*
* @param string|null $entity_type entity_type
*
* @return self
*/
public function setEntityType($entity_type)
{
if (is_null($entity_type)) {
array_push($this->openAPINullablesSetToNull, 'entity_type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('entity_type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['entity_type'] = $entity_type;
return $this;
}
/**
* Gets entity_id
*
* @return string|null
*/
public function getEntityId()
{
return $this->container['entity_id'];
}
/**
* Sets entity_id
*
* @param string|null $entity_id entity_id
*
* @return self
*/
public function setEntityId($entity_id)
{
if (is_null($entity_id)) {
array_push($this->openAPINullablesSetToNull, 'entity_id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('entity_id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['entity_id'] = $entity_id;
return $this;
}
/**
* Gets details
*
* @return string|null
*/
public function getDetails()
{
return $this->container['details'];
}
/**
* Sets details
*
* @param string|null $details details
*
* @return self
*/
public function setDetails($details)
{
if (is_null($details)) {
array_push($this->openAPINullablesSetToNull, 'details');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('details', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['details'] = $details;
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));
}
}
@@ -0,0 +1,518 @@
<?php
/**
* AuditLogEntryResponsePagedResponse
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* AuditLogEntryResponsePagedResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class AuditLogEntryResponsePagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'AuditLogEntryResponsePagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'items' => '\OmsorgCoreClient\Model\AuditLogEntryResponse[]',
'total_count' => 'int',
'page' => 'int',
'page_size' => 'int'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'items' => null,
'total_count' => 'int32',
'page' => 'int32',
'page_size' => 'int32'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'items' => true,
'total_count' => false,
'page' => false,
'page_size' => 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 = [
'items' => 'items',
'total_count' => 'totalCount',
'page' => 'page',
'page_size' => 'pageSize'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'items' => 'setItems',
'total_count' => 'setTotalCount',
'page' => 'setPage',
'page_size' => 'setPageSize'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'items' => 'getItems',
'total_count' => 'getTotalCount',
'page' => 'getPage',
'page_size' => 'getPageSize'
];
/**
* 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[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('items', $data ?? [], null);
$this->setIfExists('total_count', $data ?? [], null);
$this->setIfExists('page', $data ?? [], null);
$this->setIfExists('page_size', $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 = [];
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 items
*
* @return \OmsorgCoreClient\Model\AuditLogEntryResponse[]|null
*/
public function getItems()
{
return $this->container['items'];
}
/**
* Sets items
*
* @param \OmsorgCoreClient\Model\AuditLogEntryResponse[]|null $items items
*
* @return self
*/
public function setItems($items)
{
if (is_null($items)) {
array_push($this->openAPINullablesSetToNull, 'items');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('items', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['items'] = $items;
return $this;
}
/**
* Gets total_count
*
* @return int|null
*/
public function getTotalCount()
{
return $this->container['total_count'];
}
/**
* Sets total_count
*
* @param int|null $total_count total_count
*
* @return self
*/
public function setTotalCount($total_count)
{
if (is_null($total_count)) {
throw new \InvalidArgumentException('non-nullable total_count cannot be null');
}
$this->container['total_count'] = $total_count;
return $this;
}
/**
* Gets page
*
* @return int|null
*/
public function getPage()
{
return $this->container['page'];
}
/**
* Sets page
*
* @param int|null $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 page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
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));
}
}
@@ -0,0 +1,457 @@
<?php
/**
* ChangePasswordRequest
*
* PHP version 8.1
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* OmsorgCore.Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
* Generated by: https://openapi-generator.tech
* Generator version: 7.14.0
*/
/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
namespace OmsorgCoreClient\Model;
use \ArrayAccess;
use \OmsorgCoreClient\ObjectSerializer;
/**
* ChangePasswordRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class ChangePasswordRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'ChangePasswordRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'current_password' => 'string',
'new_password' => 'string'
];
/**
* Array of property to format mappings. Used for (de)serialization
*
* @var string[]
* @phpstan-var array<string, string|null>
* @psalm-var array<string, string|null>
*/
protected static $openAPIFormats = [
'current_password' => null,
'new_password' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'current_password' => true,
'new_password' => 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 = [
'current_password' => 'currentPassword',
'new_password' => 'newPassword'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'current_password' => 'setCurrentPassword',
'new_password' => 'setNewPassword'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'current_password' => 'getCurrentPassword',
'new_password' => 'getNewPassword'
];
/**
* 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[]|null $data Associated array of property values
* initializing the model
*/
public function __construct(?array $data = null)
{
$this->setIfExists('current_password', $data ?? [], null);
$this->setIfExists('new_password', $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 = [];
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 current_password
*
* @return string|null
*/
public function getCurrentPassword()
{
return $this->container['current_password'];
}
/**
* Sets current_password
*
* @param string|null $current_password current_password
*
* @return self
*/
public function setCurrentPassword($current_password)
{
if (is_null($current_password)) {
array_push($this->openAPINullablesSetToNull, 'current_password');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('current_password', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['current_password'] = $current_password;
return $this;
}
/**
* Gets new_password
*
* @return string|null
*/
public function getNewPassword()
{
return $this->container['new_password'];
}
/**
* Sets new_password
*
* @param string|null $new_password new_password
*
* @return self
*/
public function setNewPassword($new_password)
{
if (is_null($new_password)) {
array_push($this->openAPINullablesSetToNull, 'new_password');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('new_password', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['new_password'] = $new_password;
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));
}
}

Some files were not shown because too many files have changed in this diff Show More