Migrate omsorgapp to browser SPA, add Docker/CI build setup
Docker-Images bauen und veröffentlichen / build (, omsorgCore/Dockerfile, omsorgcore) (push) Successful in 3s
Docker-Images bauen und veröffentlichen / build (, omsorgWeb/Dockerfile, omsorgweb) (push) Failing after 4s
Docker-Images bauen und veröffentlichen / build (VITE_OMSORG_CORE_URL=${{ vars.OMSORG_CORE_PUBLIC_URL }}, omsorgapp/Dockerfile, omsorgapp) (push) Successful in 3s

- omsorgapp: drop Electron, run as a plain Vite/React browser app; refresh
  token moves to an HttpOnly cookie (omsorgCore), CORS added for the new
  browser origin, document download/preview switched to Blob-based browser
  APIs.
- Add Dockerfiles for omsorgCore, omsorgapp, and omsorgWeb, a docker-compose.yml
  wiring Postgres/MySQL/all three apps together, and a Gitea Actions workflow
  that builds and pushes images to the repo's container registry on push to
  main and on version tags.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Felix Kemmler
2026-08-10 17:42:45 +02:00
co-authored by Claude Sonnet 5
parent e9e96a57dc
commit 598dfcd38a
461 changed files with 59753 additions and 2859 deletions
File diff suppressed because it is too large Load Diff
@@ -131,6 +131,7 @@ class AuditLogApi
* @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 \OmsorgCoreClient\Model\AuditEventCategory|null $category category (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)
@@ -141,9 +142,9 @@ class AuditLogApi
* @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])
public function apiAuditLogGet($entity_type = null, $entity_id = null, $actor_user_id = null, $category = 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);
list($response) = $this->apiAuditLogGetWithHttpInfo($entity_type, $entity_id, $actor_user_id, $category, $from_utc, $to_utc, $page, $page_size, $contentType);
return $response;
}
@@ -153,6 +154,7 @@ class AuditLogApi
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \OmsorgCoreClient\Model\AuditEventCategory|null $category (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
@@ -163,9 +165,9 @@ class AuditLogApi
* @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])
public function apiAuditLogGetWithHttpInfo($entity_type = null, $entity_id = null, $actor_user_id = null, $category = 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);
$request = $this->apiAuditLogGetRequest($entity_type, $entity_id, $actor_user_id, $category, $from_utc, $to_utc, $page, $page_size, $contentType);
try {
$options = $this->createHttpClientOption();
@@ -242,6 +244,7 @@ class AuditLogApi
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \OmsorgCoreClient\Model\AuditEventCategory|null $category (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
@@ -251,9 +254,9 @@ class AuditLogApi
* @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])
public function apiAuditLogGetAsync($entity_type = null, $entity_id = null, $actor_user_id = null, $category = 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)
return $this->apiAuditLogGetAsyncWithHttpInfo($entity_type, $entity_id, $actor_user_id, $category, $from_utc, $to_utc, $page, $page_size, $contentType)
->then(
function ($response) {
return $response[0];
@@ -267,6 +270,7 @@ class AuditLogApi
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \OmsorgCoreClient\Model\AuditEventCategory|null $category (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
@@ -276,10 +280,10 @@ class AuditLogApi
* @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])
public function apiAuditLogGetAsyncWithHttpInfo($entity_type = null, $entity_id = null, $actor_user_id = null, $category = 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);
$request = $this->apiAuditLogGetRequest($entity_type, $entity_id, $actor_user_id, $category, $from_utc, $to_utc, $page, $page_size, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -323,6 +327,7 @@ class AuditLogApi
* @param string|null $entity_type (optional)
* @param string|null $entity_id (optional)
* @param string|null $actor_user_id (optional)
* @param \OmsorgCoreClient\Model\AuditEventCategory|null $category (optional)
* @param \DateTime|null $from_utc (optional)
* @param \DateTime|null $to_utc (optional)
* @param int|null $page (optional, default to 1)
@@ -332,7 +337,7 @@ class AuditLogApi
* @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])
public function apiAuditLogGetRequest($entity_type = null, $entity_id = null, $actor_user_id = null, $category = null, $from_utc = null, $to_utc = null, $page = 1, $page_size = 50, string $contentType = self::contentTypes['apiAuditLogGet'][0])
{
@@ -343,6 +348,7 @@ class AuditLogApi
$resourcePath = '/api/audit-log';
$formParams = [];
$queryParams = [];
@@ -378,6 +384,15 @@ class AuditLogApi
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$category,
'category', // param base name
'AuditEventCategory', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$from_utc,
'fromUtc', // param base name
@@ -77,6 +77,9 @@ class ContractsApi
'apiContractsGet' => [
'application/json',
],
'apiContractsIdDelete' => [
'application/json',
],
'apiContractsIdGet' => [
'application/json',
],
@@ -472,6 +475,220 @@ class ContractsApi
);
}
/**
* Operation apiContractsIdDelete
*
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiContractsIdDelete'] 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 apiContractsIdDelete($id, string $contentType = self::contentTypes['apiContractsIdDelete'][0])
{
$this->apiContractsIdDeleteWithHttpInfo($id, $contentType);
}
/**
* Operation apiContractsIdDeleteWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiContractsIdDelete'] 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 apiContractsIdDeleteWithHttpInfo($id, string $contentType = self::contentTypes['apiContractsIdDelete'][0])
{
$request = $this->apiContractsIdDeleteRequest($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 apiContractsIdDeleteAsync
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiContractsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiContractsIdDeleteAsync($id, string $contentType = self::contentTypes['apiContractsIdDelete'][0])
{
return $this->apiContractsIdDeleteAsyncWithHttpInfo($id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiContractsIdDeleteAsyncWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiContractsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiContractsIdDeleteAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiContractsIdDelete'][0])
{
$returnType = '';
$request = $this->apiContractsIdDeleteRequest($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 'apiContractsIdDelete'
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiContractsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiContractsIdDeleteRequest($id, string $contentType = self::contentTypes['apiContractsIdDelete'][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 apiContractsIdDelete'
);
}
$resourcePath = '/api/contracts/{id}';
$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(
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiContractsIdGet
*
File diff suppressed because it is too large Load Diff
@@ -77,6 +77,9 @@ class EmployeesApi
'apiEmployeesGet' => [
'application/json',
],
'apiEmployeesIdDelete' => [
'application/json',
],
'apiEmployeesIdGet' => [
'application/json',
],
@@ -457,6 +460,220 @@ class EmployeesApi
);
}
/**
* Operation apiEmployeesIdDelete
*
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] 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 apiEmployeesIdDelete($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
{
$this->apiEmployeesIdDeleteWithHttpInfo($id, $contentType);
}
/**
* Operation apiEmployeesIdDeleteWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] 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 apiEmployeesIdDeleteWithHttpInfo($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
{
$request = $this->apiEmployeesIdDeleteRequest($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 apiEmployeesIdDeleteAsync
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiEmployeesIdDeleteAsync($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
{
return $this->apiEmployeesIdDeleteAsyncWithHttpInfo($id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiEmployeesIdDeleteAsyncWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiEmployeesIdDeleteAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
{
$returnType = '';
$request = $this->apiEmployeesIdDeleteRequest($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 'apiEmployeesIdDelete'
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiEmployeesIdDeleteRequest($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][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 apiEmployeesIdDelete'
);
}
$resourcePath = '/api/employees/{id}';
$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(
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiEmployeesIdGet
*
@@ -77,6 +77,9 @@ class FacilitiesApi
'apiFacilitiesGet' => [
'application/json',
],
'apiFacilitiesIdDelete' => [
'application/json',
],
'apiFacilitiesIdGet' => [
'application/json',
],
@@ -143,6 +146,7 @@ class FacilitiesApi
*
* @param string|null $search search (optional)
* @param string|null $crm_status crm_status (optional)
* @param bool|null $follow_up_due_only follow_up_due_only (optional, default to false)
* @param int|null $page page (optional, default to 1)
* @param int|null $page_size page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesGet'] to see the possible values for this operation
@@ -151,9 +155,9 @@ class FacilitiesApi
* @throws \InvalidArgumentException
* @return \OmsorgCoreClient\Model\FacilityResponsePagedResponse
*/
public function apiFacilitiesGet($search = null, $crm_status = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
public function apiFacilitiesGet($search = null, $crm_status = null, $follow_up_due_only = false, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
{
list($response) = $this->apiFacilitiesGetWithHttpInfo($search, $crm_status, $page, $page_size, $contentType);
list($response) = $this->apiFacilitiesGetWithHttpInfo($search, $crm_status, $follow_up_due_only, $page, $page_size, $contentType);
return $response;
}
@@ -162,6 +166,7 @@ class FacilitiesApi
*
* @param string|null $search (optional)
* @param string|null $crm_status (optional)
* @param bool|null $follow_up_due_only (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesGet'] to see the possible values for this operation
@@ -170,9 +175,9 @@ class FacilitiesApi
* @throws \InvalidArgumentException
* @return array of \OmsorgCoreClient\Model\FacilityResponsePagedResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiFacilitiesGetWithHttpInfo($search = null, $crm_status = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
public function apiFacilitiesGetWithHttpInfo($search = null, $crm_status = null, $follow_up_due_only = false, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
{
$request = $this->apiFacilitiesGetRequest($search, $crm_status, $page, $page_size, $contentType);
$request = $this->apiFacilitiesGetRequest($search, $crm_status, $follow_up_due_only, $page, $page_size, $contentType);
try {
$options = $this->createHttpClientOption();
@@ -248,6 +253,7 @@ class FacilitiesApi
*
* @param string|null $search (optional)
* @param string|null $crm_status (optional)
* @param bool|null $follow_up_due_only (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesGet'] to see the possible values for this operation
@@ -255,9 +261,9 @@ class FacilitiesApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesGetAsync($search = null, $crm_status = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
public function apiFacilitiesGetAsync($search = null, $crm_status = null, $follow_up_due_only = false, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
{
return $this->apiFacilitiesGetAsyncWithHttpInfo($search, $crm_status, $page, $page_size, $contentType)
return $this->apiFacilitiesGetAsyncWithHttpInfo($search, $crm_status, $follow_up_due_only, $page, $page_size, $contentType)
->then(
function ($response) {
return $response[0];
@@ -270,6 +276,7 @@ class FacilitiesApi
*
* @param string|null $search (optional)
* @param string|null $crm_status (optional)
* @param bool|null $follow_up_due_only (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesGet'] to see the possible values for this operation
@@ -277,10 +284,10 @@ class FacilitiesApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesGetAsyncWithHttpInfo($search = null, $crm_status = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
public function apiFacilitiesGetAsyncWithHttpInfo($search = null, $crm_status = null, $follow_up_due_only = false, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
{
$returnType = '\OmsorgCoreClient\Model\FacilityResponsePagedResponse';
$request = $this->apiFacilitiesGetRequest($search, $crm_status, $page, $page_size, $contentType);
$request = $this->apiFacilitiesGetRequest($search, $crm_status, $follow_up_due_only, $page, $page_size, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -323,6 +330,7 @@ class FacilitiesApi
*
* @param string|null $search (optional)
* @param string|null $crm_status (optional)
* @param bool|null $follow_up_due_only (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesGet'] to see the possible values for this operation
@@ -330,7 +338,7 @@ class FacilitiesApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiFacilitiesGetRequest($search = null, $crm_status = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
public function apiFacilitiesGetRequest($search = null, $crm_status = null, $follow_up_due_only = false, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiFacilitiesGet'][0])
{
@@ -338,6 +346,7 @@ class FacilitiesApi
$resourcePath = '/api/facilities';
$formParams = [];
$queryParams = [];
@@ -364,6 +373,15 @@ class FacilitiesApi
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$follow_up_due_only,
'followUpDueOnly', // param base name
'boolean', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$page,
'page', // param base name
@@ -442,6 +460,220 @@ class FacilitiesApi
);
}
/**
* Operation apiFacilitiesIdDelete
*
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesIdDelete'] 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 apiFacilitiesIdDelete($id, string $contentType = self::contentTypes['apiFacilitiesIdDelete'][0])
{
$this->apiFacilitiesIdDeleteWithHttpInfo($id, $contentType);
}
/**
* Operation apiFacilitiesIdDeleteWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesIdDelete'] 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 apiFacilitiesIdDeleteWithHttpInfo($id, string $contentType = self::contentTypes['apiFacilitiesIdDelete'][0])
{
$request = $this->apiFacilitiesIdDeleteRequest($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 apiFacilitiesIdDeleteAsync
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesIdDeleteAsync($id, string $contentType = self::contentTypes['apiFacilitiesIdDelete'][0])
{
return $this->apiFacilitiesIdDeleteAsyncWithHttpInfo($id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiFacilitiesIdDeleteAsyncWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesIdDeleteAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiFacilitiesIdDelete'][0])
{
$returnType = '';
$request = $this->apiFacilitiesIdDeleteRequest($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 'apiFacilitiesIdDelete'
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiFacilitiesIdDeleteRequest($id, string $contentType = self::contentTypes['apiFacilitiesIdDelete'][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 apiFacilitiesIdDelete'
);
}
$resourcePath = '/api/facilities/{id}';
$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(
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiFacilitiesIdGet
*
@@ -77,6 +77,9 @@ class FacilityContactsApi
'apiFacilitiesFacilityIdContactsGet' => [
'application/json',
],
'apiFacilitiesFacilityIdContactsIdDelete' => [
'application/json',
],
'apiFacilitiesFacilityIdContactsIdPut' => [
'application/json',
'text/json',
@@ -399,6 +402,240 @@ class FacilityContactsApi
);
}
/**
* Operation apiFacilitiesFacilityIdContactsIdDelete
*
* @param string $facility_id facility_id (required)
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'] 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 apiFacilitiesFacilityIdContactsIdDelete($facility_id, $id, string $contentType = self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'][0])
{
$this->apiFacilitiesFacilityIdContactsIdDeleteWithHttpInfo($facility_id, $id, $contentType);
}
/**
* Operation apiFacilitiesFacilityIdContactsIdDeleteWithHttpInfo
*
* @param string $facility_id (required)
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'] 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 apiFacilitiesFacilityIdContactsIdDeleteWithHttpInfo($facility_id, $id, string $contentType = self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'][0])
{
$request = $this->apiFacilitiesFacilityIdContactsIdDeleteRequest($facility_id, $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 apiFacilitiesFacilityIdContactsIdDeleteAsync
*
* @param string $facility_id (required)
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesFacilityIdContactsIdDeleteAsync($facility_id, $id, string $contentType = self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'][0])
{
return $this->apiFacilitiesFacilityIdContactsIdDeleteAsyncWithHttpInfo($facility_id, $id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiFacilitiesFacilityIdContactsIdDeleteAsyncWithHttpInfo
*
* @param string $facility_id (required)
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiFacilitiesFacilityIdContactsIdDeleteAsyncWithHttpInfo($facility_id, $id, string $contentType = self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'][0])
{
$returnType = '';
$request = $this->apiFacilitiesFacilityIdContactsIdDeleteRequest($facility_id, $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 'apiFacilitiesFacilityIdContactsIdDelete'
*
* @param string $facility_id (required)
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiFacilitiesFacilityIdContactsIdDeleteRequest($facility_id, $id, string $contentType = self::contentTypes['apiFacilitiesFacilityIdContactsIdDelete'][0])
{
// verify the required parameter 'facility_id' is set
if ($facility_id === null || (is_array($facility_id) && count($facility_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $facility_id when calling apiFacilitiesFacilityIdContactsIdDelete'
);
}
// 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 apiFacilitiesFacilityIdContactsIdDelete'
);
}
$resourcePath = '/api/facilities/{facilityId}/contacts/{id}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($facility_id !== null) {
$resourcePath = str_replace(
'{' . 'facilityId' . '}',
ObjectSerializer::toPathValue($facility_id),
$resourcePath
);
}
// 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(
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiFacilitiesFacilityIdContactsIdPut
*
@@ -77,6 +77,9 @@ class OrdersApi
'apiOrdersGet' => [
'application/json',
],
'apiOrdersIdDelete' => [
'application/json',
],
'apiOrdersIdGet' => [
'application/json',
],
@@ -144,6 +147,9 @@ class OrdersApi
* @param string|null $search search (optional)
* @param string|null $status_id status_id (optional)
* @param string|null $facility_id facility_id (optional)
* @param string|null $priority priority (optional)
* @param string|null $required_qualification required_qualification (optional)
* @param string|null $shift_type shift_type (optional)
* @param int|null $page page (optional, default to 1)
* @param int|null $page_size page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersGet'] to see the possible values for this operation
@@ -152,9 +158,9 @@ class OrdersApi
* @throws \InvalidArgumentException
* @return \OmsorgCoreClient\Model\OrderResponsePagedResponse
*/
public function apiOrdersGet($search = null, $status_id = null, $facility_id = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
public function apiOrdersGet($search = null, $status_id = null, $facility_id = null, $priority = null, $required_qualification = null, $shift_type = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
{
list($response) = $this->apiOrdersGetWithHttpInfo($search, $status_id, $facility_id, $page, $page_size, $contentType);
list($response) = $this->apiOrdersGetWithHttpInfo($search, $status_id, $facility_id, $priority, $required_qualification, $shift_type, $page, $page_size, $contentType);
return $response;
}
@@ -164,6 +170,9 @@ class OrdersApi
* @param string|null $search (optional)
* @param string|null $status_id (optional)
* @param string|null $facility_id (optional)
* @param string|null $priority (optional)
* @param string|null $required_qualification (optional)
* @param string|null $shift_type (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersGet'] to see the possible values for this operation
@@ -172,9 +181,9 @@ class OrdersApi
* @throws \InvalidArgumentException
* @return array of \OmsorgCoreClient\Model\OrderResponsePagedResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiOrdersGetWithHttpInfo($search = null, $status_id = null, $facility_id = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
public function apiOrdersGetWithHttpInfo($search = null, $status_id = null, $facility_id = null, $priority = null, $required_qualification = null, $shift_type = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
{
$request = $this->apiOrdersGetRequest($search, $status_id, $facility_id, $page, $page_size, $contentType);
$request = $this->apiOrdersGetRequest($search, $status_id, $facility_id, $priority, $required_qualification, $shift_type, $page, $page_size, $contentType);
try {
$options = $this->createHttpClientOption();
@@ -251,6 +260,9 @@ class OrdersApi
* @param string|null $search (optional)
* @param string|null $status_id (optional)
* @param string|null $facility_id (optional)
* @param string|null $priority (optional)
* @param string|null $required_qualification (optional)
* @param string|null $shift_type (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersGet'] to see the possible values for this operation
@@ -258,9 +270,9 @@ class OrdersApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiOrdersGetAsync($search = null, $status_id = null, $facility_id = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
public function apiOrdersGetAsync($search = null, $status_id = null, $facility_id = null, $priority = null, $required_qualification = null, $shift_type = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
{
return $this->apiOrdersGetAsyncWithHttpInfo($search, $status_id, $facility_id, $page, $page_size, $contentType)
return $this->apiOrdersGetAsyncWithHttpInfo($search, $status_id, $facility_id, $priority, $required_qualification, $shift_type, $page, $page_size, $contentType)
->then(
function ($response) {
return $response[0];
@@ -274,6 +286,9 @@ class OrdersApi
* @param string|null $search (optional)
* @param string|null $status_id (optional)
* @param string|null $facility_id (optional)
* @param string|null $priority (optional)
* @param string|null $required_qualification (optional)
* @param string|null $shift_type (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersGet'] to see the possible values for this operation
@@ -281,10 +296,10 @@ class OrdersApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiOrdersGetAsyncWithHttpInfo($search = null, $status_id = null, $facility_id = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
public function apiOrdersGetAsyncWithHttpInfo($search = null, $status_id = null, $facility_id = null, $priority = null, $required_qualification = null, $shift_type = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
{
$returnType = '\OmsorgCoreClient\Model\OrderResponsePagedResponse';
$request = $this->apiOrdersGetRequest($search, $status_id, $facility_id, $page, $page_size, $contentType);
$request = $this->apiOrdersGetRequest($search, $status_id, $facility_id, $priority, $required_qualification, $shift_type, $page, $page_size, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -328,6 +343,9 @@ class OrdersApi
* @param string|null $search (optional)
* @param string|null $status_id (optional)
* @param string|null $facility_id (optional)
* @param string|null $priority (optional)
* @param string|null $required_qualification (optional)
* @param string|null $shift_type (optional)
* @param int|null $page (optional, default to 1)
* @param int|null $page_size (optional, default to 20)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersGet'] to see the possible values for this operation
@@ -335,7 +353,7 @@ class OrdersApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiOrdersGetRequest($search = null, $status_id = null, $facility_id = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
public function apiOrdersGetRequest($search = null, $status_id = null, $facility_id = null, $priority = null, $required_qualification = null, $shift_type = null, $page = 1, $page_size = 20, string $contentType = self::contentTypes['apiOrdersGet'][0])
{
@@ -344,6 +362,9 @@ class OrdersApi
$resourcePath = '/api/orders';
$formParams = [];
$queryParams = [];
@@ -379,6 +400,33 @@ class OrdersApi
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$priority,
'priority', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$required_qualification,
'requiredQualification', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$shift_type,
'shiftType', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$page,
'page', // param base name
@@ -457,6 +505,220 @@ class OrdersApi
);
}
/**
* Operation apiOrdersIdDelete
*
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersIdDelete'] 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 apiOrdersIdDelete($id, string $contentType = self::contentTypes['apiOrdersIdDelete'][0])
{
$this->apiOrdersIdDeleteWithHttpInfo($id, $contentType);
}
/**
* Operation apiOrdersIdDeleteWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersIdDelete'] 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 apiOrdersIdDeleteWithHttpInfo($id, string $contentType = self::contentTypes['apiOrdersIdDelete'][0])
{
$request = $this->apiOrdersIdDeleteRequest($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 apiOrdersIdDeleteAsync
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiOrdersIdDeleteAsync($id, string $contentType = self::contentTypes['apiOrdersIdDelete'][0])
{
return $this->apiOrdersIdDeleteAsyncWithHttpInfo($id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiOrdersIdDeleteAsyncWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiOrdersIdDeleteAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiOrdersIdDelete'][0])
{
$returnType = '';
$request = $this->apiOrdersIdDeleteRequest($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 'apiOrdersIdDelete'
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiOrdersIdDelete'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiOrdersIdDeleteRequest($id, string $contentType = self::contentTypes['apiOrdersIdDelete'][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 apiOrdersIdDelete'
);
}
$resourcePath = '/api/orders/{id}';
$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(
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiOrdersIdGet
*
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff