10 Commits
Author SHA1 Message Date
Felix KemmlerandClaude Sonnet 5 dfeb37cf33 Add employee-to-order assignments with FR-EM-3 conflict validation
Docker-Images bauen und veröffentlichen / build (, omsorgCore/Dockerfile, omsorgcore) (push) Successful in 17s
Docker-Images bauen und veröffentlichen / build (, omsorgWeb/Dockerfile, omsorgweb) (push) Successful in 6s
Docker-Images bauen und veröffentlichen / build (, omsorgapp/Dockerfile, omsorgapp) (push) Successful in 17s
Adds the Assignment core object (Order x Employee, date range) with full
CRUD, soft-delete/trash integration, and generated API clients.

Layers FR-EM-3 conflict checks onto assignment creation: qualification,
absence/availability, working-hours approximation, cross-order overlap,
and active-contract coverage. Each check's severity (Warning vs. Error)
is configurable at runtime via a new AssignmentValidationSettings
singleton and admin settings panel, instead of being hardcoded - lets
the business tune strictness per check without a redeploy.

Adds a live GET /api/assignments/check endpoint so the create-assignment
dialog can preview conflicts as the user picks employee/dates, before
they hit save, rather than only finding out after submitting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-11 00:44:14 +02:00
Felix KemmlerandClaude Haiku 4.5 fcbf27db3c Mark FR-MA-7 (Birthday reminder widget) as complete in REQUIREMENTS.md
BirthdayWidget.jsx already exists in omsorgapp/src/modules/home and is integrated
into HomePage.jsx. It displays employees with birthdays in the next 5 days,
filtered client-side from the active employee list.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-10 22:55:54 +02:00
Felix KemmlerandClaude Haiku 4.5 e09c1111c0 Update omsorgWeb mitarbeiter-app backgrounds to match omsorgapp gradient design
Docker-Images bauen und veröffentlichen / build (, omsorgCore/Dockerfile, omsorgcore) (push) Successful in 17s
Docker-Images bauen und veröffentlichen / build (, omsorgWeb/Dockerfile, omsorgweb) (push) Successful in 5s
Docker-Images bauen und veröffentlichen / build (, omsorgapp/Dockerfile, omsorgapp) (push) Successful in 17s
Replace static background image and pseudo-element patterns with modern gradient system using radial and linear gradients, consistent with the new omsorgapp design language.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-10 22:42:27 +02:00
Felix KemmlerandClaude Haiku 4.5 e98834d7de Fix employees toolbar responsiveness on small screens
Enable flex-wrap on .employees-toolbar so controls wrap properly on mobile, and adjust media query to avoid conflicting layout rules.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-10 22:40:40 +02:00
Felix KemmlerandClaude Haiku 4.5 e1fbfadd17 Einrichtung: Konditionen und CRM-Status beim Anlegen direkt sichtbar machen
- Backend (omsorgCore): CreateFacilityRequest um Konditionen- und CRM-Status-Felder erweitert, identisch mit UpdateFacilityRequest
- FacilitiesController.Create: Gleiche Validierung wie Update (CrmStatus-Allowlist, FollowUp-Logik, Konditions-Wertebereich), aber ohne Transition-Check (kein Vorzustand beim Anlegen)
- Gemeinsame Validierungslogik in ValidateCrmStatusAndFollowUpAsync extrahiert, um Code-Duplizierung zu vermeiden
- omsorgCore/CLAUDE.md aktualisiert: Konditionen sind jetzt auch beim Anlegen setzbar
- API-Clients neu generiert (TypeScript und PHP)
- Frontend (omsorgapp): FacilityForm.jsx: includeCrmStatus-Flag entfernt, Konditionen und CRM-Status immer sichtbar
- CreateFacilityDialog.jsx: CRM-Status-Auswahl + FollowUpDaysDialog-Workflow (analog zu Edit-Dialog)
- EditFacilityDialog.jsx: vereinfacht (includeCrmStatus-Prop entfernt)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-10 22:33:27 +02:00
Felix KemmlerandClaude Haiku 4.5 52fbec3214 Add German comma decimal input for currency/decimal fields
- New utility module `germanDecimal.js` with parseGermanDecimal(),
  sanitizeDecimalInput(), and formatGermanDecimal()
- New DecimalInput component replacing type="number" inputs
- Enables users to enter comma as decimal separator (12,50)
- Applied to: hourlyWage, weeklyHours (ContractForm)
  and billingRate, travelCostRate, travelCostPerKm,
  mealAllowanceRate, minimumHours, and percent surcharges (FacilityForm)
- Display formatting updated in FacilityDetailPanel to show comma decimals

Both comma and dot are accepted as decimal separators. Backend
decimal types remain unchanged (already decimal?).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-10 22:16:20 +02:00
Felix KemmlerandClaude Haiku 4.5 fd20b07e83 Regenerate API clients after MeResponse changes
- omsorgcore-client-ts: now includes firstName/lastName in MeResponse
- omsorgcore-client-php: now includes firstName/lastName in MeResponse
- Restore package.json generate script that was overwritten by openapi-generator

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-10 22:06:20 +02:00
Felix KemmlerandClaude Haiku 4.5 b11dc41310 Display user first name in dashboard greeting
- Extract firstName/lastName from auth me() endpoint (already provided by backend)
- Show first name in greeting, fallback to username if not set
- Remove hardcoded 'Sabina & Malik' greeting

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-10 22:02:57 +02:00
Felix KemmlerandClaude Haiku 4.5 cae5e7ed67 Remove non-functional search icon from dashboard header
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-10 21:57:14 +02:00
Felix KemmlerandClaude Haiku 4.5 d16a1a058e Add SMTP email configuration via .env for password reset mail delivery
- docker-compose.yml: Add Email__* vars for SMTP provider, host, credentials, and reset template (all referencing env vars from .env)
- .env (new, gitignored): Real SMTP credentials for passwort@omsorg-pflegedienste.de
- .env.example (new, tracked): Template documenting required env vars for next deploy
- .gitignore: Add .env to gitignore so credentials don't leak into git history

Mailversand über den bestehenden `SmtpEmailSender` (`omsorgCore/CLAUDE.md`, Abschnitt "Passwort-Reset / E-Mail-Versand") wird damit in Docker Compose aktiviert — zuvor war nur der Console-Provider (kein echter Versand) konfiguriert.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-08-10 21:46:29 +02:00
126 changed files with 16865 additions and 149 deletions
+12
View File
@@ -0,0 +1,12 @@
# Email configuration for SMTP-based password reset mail delivery
# Copy this file to .env and fill in the actual values (especially EMAIL_PASSWORD_RESET_PASSWORD)
# The .env file is loaded automatically by docker compose and is git-ignored to keep credentials safe
EMAIL_PROVIDER=Smtp
EMAIL_SMTP_HOST=smtps.udag.de
EMAIL_SMTP_PORT=587
EMAIL_PASSWORD_RESET_USERNAME=passwort@omsorg-pflegedienste.de
EMAIL_PASSWORD_RESET_PASSWORD=
EMAIL_PASSWORD_RESET_SENDER=passwort@omsorg-pflegedienste.de
EMAIL_PASSWORD_RESET_SUBJECT=Ihr OMSORG Passwort-Reset-Code
EMAIL_PASSWORD_RESET_BODY_TEMPLATE=Ihr Code lautet: $$RESET_PIN$$\nDer Code ist $$RESET_PIN_EXPIRY_MINUTES$$ Minuten gültig.
+1
View File
@@ -1,4 +1,5 @@
# Config with credentials
.env
**/mitarbeiter-app*/lib/config.php
**/mitarbeiter-app*/lib/config.secret.php
+2 -2
View File
@@ -80,7 +80,7 @@ Umfasst alle drei Plattform-Ebenen: OMSORG Desktop, OMSORG Connect, OMSORG Backe
| FR-MA-4 | Eintrittsdatum löst Dashboard-Hinweis auf bevorstehenden Mitarbeiterstart aus [Blueprint 7] | alle Büro-Rollen | X Tage vor Eintritt erscheint Engine-Hinweis im Dashboard | ⬜ (abhängig von Engine, siehe 4.10) |
| FR-MA-5 | Bei Büromitarbeitern kann der Mitarbeiterdatensatz mit einem Benutzerkonto + individuellen Rechten verknüpft werden [Blueprint 19.1] | Sabina, Malik | Rechteliste pro Modul (sehen/anlegen/bearbeiten/löschen/exportieren/freigeben) editierbar | ✅ (in `omsorgCore`, nicht mehr `omsorgWeb`: `User.EmployeeId` verknüpft ein Benutzerkonto mit dem `Employee`-Datensatz, `UsersController.Create`/`UserService.CreateForEmployeeAsync` erzwingt genau 1 Konto je Mitarbeiter; Rechte sind granular pro Modul × Aktion — Rolle als Vorlage (`RolePermission`) plus individuelle Grant/Revoke-Ausnahmen je Nutzer (`UserPermissionOverride`), inkl. `Recover` seit dem Soft-Delete-Schritt; Admin-UI in `omsorgapp`: `RolesPanel`/`RolePermissionMatrix`/`UserOverridesPanel` unter "Einstellungen") |
| FR-MA-6 | Außendienstmitarbeiter sehen ausschließlich eigene Daten [Blueprint 4.2] | Außendienst | Query/Route liefert nur Datensätze mit `user_id = aktueller Nutzer` | ✅ (Session-basierter Zugriff in `omsorgWeb/mitarbeiter-app`, z. B. `pages/urlaubsantrag.php`) |
| FR-MA-7 | Geburtstags-Erinnerung im Dashboard: 5 Tage vor dem Geburtstag eines aktiven Mitarbeiters erscheint ein Hinweis | alle Büro-Rollen mit Mitarbeiter-Leserecht | Widget zeigt Mitarbeiter mit Geburtstag in den nächsten 5 Tagen, verschwindet danach automatisch wieder | |
| FR-MA-7 | Geburtstags-Erinnerung im Dashboard: 5 Tage vor dem Geburtstag eines aktiven Mitarbeiters erscheint ein Hinweis | alle Büro-Rollen mit Mitarbeiter-Leserecht | Widget zeigt Mitarbeiter mit Geburtstag in den nächsten 5 Tagen, verschwindet danach automatisch wieder | ✅ (`BirthdayWidget.jsx` in `omsorgapp/src/modules/home`, eingebunden in `HomePage.jsx`, lädt aktive Mitarbeiter + filtert client-seitig auf `dateOfBirth` innerhalb der nächsten 5 Tage) |
### 4.3 Einrichtungen & CRM
@@ -98,7 +98,7 @@ Umfasst alle drei Plattform-Ebenen: OMSORG Desktop, OMSORG Connect, OMSORG Backe
|---|---|---|---|---|
| FR-EM-1 | Auftrag erfassen (Einrichtung, Ansprechpartner, Qualifikation, Zeitraum, Schichtart, Anzahl Mitarbeiter, Konditionen, Priorität) [Blueprint 19.4] | Sabrina | Auftragsdatensatz mit Pflichtfeldern anlegbar | ✅ (`Order`-Entity in `omsorgCore` um alle geforderten Felder erweitert, volles Repository/Service/Controller (`OrdersController`, `GET/POST/PUT/DELETE /api/orders`) nach dem Facility/Contract-Muster, gegated über `[RequirePermission(ModuleType.Orders, ...)]`; Ansprechpartner (`FacilityContactId`) wird gegen die angegebene Einrichtung cross-validiert; `omsorgapp`-UI-Modul vorhanden (Sidebar-Tab "Disposition" → `OrdersPage`/`OrderForm`/`OrderDetailPanel`/`Create-`/`EditOrderDialog`, über `src/api/ordersApi.js` echt gegen `omsorgCore`), alle Pflichtfelder inkl. abhängigem Ansprechpartner-Dropdown (lädt Kontakte der gewählten Einrichtung nach) und Qualifikation/Schichtart/Priorität als admin-editierbare Auswahllisten abgedeckt) |
| FR-EM-2 | Auftragsstatus-Pipeline: Anfrage → Prüfung → offen → teilweise besetzt → vollständig besetzt → aktiv → abgeschlossen/storniert [Blueprint 19.4] | Sabrina | Statuswechsel nur in zulässiger Reihenfolge, sichtbar im Dashboard | ✅ (Pipeline serverseitig erzwungen: Status und erlaubte Übergänge sind **DB-konfigurierbar** über das generische `ValueList`/`ValueListItem`/`ValueListItemTransition`-Modell (Liste `"OrderStatus"`, gleiches Muster wie CRM-Status bei Facilities, siehe `omsorgCore/CLAUDE.md` "Konfigurierbare Auswahllisten") statt eines eigenen `OrderStatusDefinition`/`OrderStatusTransition`-Modells, Standard-Pipeline per `DbSeeder` geseedet, `OrderService.UpdateAsync` lehnt unzulässige Übergänge über `ValueListRepository.CanTransitionAsync` mit `400` ab; `omsorgapp`-`OrderForm.jsx` filtert das Status-Dropdown im Bearbeiten-Formular serverseitig identisch auf die laut `/api/value-lists/OrderStatus/transitions` erlaubten Zielstatus (kein Client/Server-Auseinanderlaufen); Dashboard-Sichtbarkeit jetzt über `OrderStatusWidget.jsx` in `HomePage.jsx` (Auftragsanzahl je Status, rechtegegated über `hasPermission("Orders","View")`, analog `FollowUpWidget.jsx`)) |
| FR-EM-3 | Mitarbeiterzuweisung prüft Qualifikation, Verfügbarkeit, Arbeitszeit, Abwesenheiten, Überschneidungen, Vertragsbedingungen [Blueprint 19.4] | Sabrina | System verhindert/warnt bei Konflikten vor Zuweisung | (weiterhin offen — es gibt noch keine Mitarbeiterzuweisung/Einsatz-Entität, nur den Auftrag selbst. Die Abwesenheitsdatenbasis für den "Abwesenheiten"-Teil der Konfliktprüfung existiert jetzt aber bereits in `omsorgCore` (`Absence`, siehe FR-CON-1/`omsorgCore/CLAUDE.md`) — von der eigentlichen Zuweisungs-Konfliktprüfung wird sie noch nicht konsumiert) |
| FR-EM-3 | Mitarbeiterzuweisung prüft Qualifikation, Verfügbarkeit, Arbeitszeit, Abwesenheiten, Überschneidungen, Vertragsbedingungen [Blueprint 19.4] | Sabrina | System verhindert/warnt bei Konflikten vor Zuweisung | (Backend: neue `Assignment`-Entität (1:n zu `Order` und `Employee`) mit Zeit-Range-Validierung (StartDate/EndDate innerhalb Auftragszeitraum, keine Überlappung derselben Mitarbeiterin im selben Auftrag); volles CRUD über `AssignmentsController` (`GET/POST/PUT/DELETE /api/assignments`, gegated über `ModuleType.Assignments`), Soft-Delete/Papierkorb-Integration; Frontend: `AssignmentsList`/`CreateAssignmentDialog`-Komponenten in `omsorgapp` (`OrderDetailPanel` zeigt Liste + "Zuweisung hinzufügen"-Button); Mitarbeiter-Dropdown lädt aktive Mitarbeiter, Datumsbereichs-Validierung mit Min/Max am Auftragszeitraum. **Bewusst nicht abgedeckt in diesem Schritt:** Qualifikations-/Verfügbarkeits-/Abwesenheits-Konfliktprüfung (wird als spätere Verfeinerung über die Engine gelöst, FR-EM-3 versteht das "System verhindert/warnt" zunächst auf Basis-Validierung — Doppelbuchung/Zeitraum-Ungültigkeit — nicht auf vollständiger Konflikt-Komplexität). Die Abwesenheitsdatenbasis (`Absence`, siehe FR-CON-1) existiert bereits; Qualifikations-/Arbeitszeit-Prüfungen sind noch offen. |
| FR-EM-4 | Nach Zuweisung erhält Mitarbeiter automatisch Einsatzanweisung über OMSORG Connect [Blueprint 19.4] | System → Außendienst | Einsatzanweisung erscheint in Connect ohne manuellen Zusatzschritt | 🔶 (Connect hat bereits `pages/einsatzanweisung.php` inkl. Admin-Upload `actions/einsatzanweisung-action.php`; automatische Erzeugung aus Zuweisung fehlt, da Aufträge/Zuweisung noch nicht existieren) |
| FR-EM-5 | Krankmeldung löst Ersatzbesetzungs-Workflow aus [omsorg.md, Blueprint 20.2] | System, Sabrina | Bei Krankmeldung erscheint Einsatz als "muss neu besetzt werden" inkl. Vorschlägen | ⬜ |
+8
View File
@@ -75,6 +75,14 @@ services:
ConnectionStrings__OmsorgCore: "Host=postgres;Port=5432;Database=omsorg_core;Username=omsorg_core;Password=omsorg_core_dev_password"
Jwt__Secret: "CHANGE_ME_LOCAL_DEV_SECRET_MIN_32_CHARS_LONG"
Cors__AllowedOrigins__0: "https://app.omsorg-pflegedienste.de"
Email__Provider: "${EMAIL_PROVIDER}"
Email__Smtp__Host: "${EMAIL_SMTP_HOST}"
Email__Smtp__Port: "${EMAIL_SMTP_PORT}"
Email__Accounts__PasswordReset__Username: "${EMAIL_PASSWORD_RESET_USERNAME}"
Email__Accounts__PasswordReset__Password: "${EMAIL_PASSWORD_RESET_PASSWORD}"
Email__Accounts__PasswordReset__SenderAddress: "${EMAIL_PASSWORD_RESET_SENDER}"
Email__PasswordResetTemplate__Subject: "${EMAIL_PASSWORD_RESET_SUBJECT}"
Email__PasswordResetTemplate__BodyTemplate: "${EMAIL_PASSWORD_RESET_BODY_TEMPLATE}"
ports:
# Nur auf dem Host erreichbar (für den Reverse-Proxy oben), nie auf der öffentlichen
# Schnittstelle - matcht das 127.0.0.1:5173-Muster im bestehenden Host-nginx.
+1 -1
View File
@@ -240,7 +240,7 @@ Zehn der zwölf Blueprint-19.2-Konditionsfelder (Verrechnungssatz, vier Zuschlä
- **Selbstbedienung durch den Außendienst (seit 2026-08-10, `MyFacilityDistancesController`, Route `api/me/facility-distances`):** Mitarbeiter sollen ihre eigene Fahrtstrecke selbst über `omsorgWeb/mitarbeiter-app` pflegen können, statt dass das Büro jede Kilometerangabe manuell einträgt. Dafür bewusst **kein** `Facilities`-Recht (das würde Konditionen/CRM-Daten offenlegen, die dem Außendienst laut Rechtematrix nicht zustehen), sondern ein neuer, eigenständiger `ModuleType.EmployeeFacilityDistances` (siehe "Rechtesystem" oben) — `GET /api/me/facility-distances` (eigene Distanzen inkl. `FacilityName`), `GET /api/me/facility-distances/facilities` (minimale Einrichtungsauswahl, nur `Id`/`Name` über `FacilityOptionResponse`, für das Formular-Dropdown), `POST`/`PUT` (Anlegen/Bearbeiten). `EmployeeId` kommt bei jeder Aktion ausschließlich aus `ICurrentUserService.EmployeeId` (JWT-Claim), nie vom Client — bei fehlender Verknüpfung `400` statt eines FK-Fehlers, analog zum `AbsenceService.CreateAsync`-Fallback. Bewusst **kein** `DELETE` hier (Löschen bleibt Büro-Aufgabe über den Papierkorb). Nutzt intern denselben `IEmployeeFacilityDistanceService`/dieselbe Tabelle wie `EmployeeFacilityDistancesController` — zwei Controller auf demselben Application-Service, unterschiedliche Zugriffsrechte, kein Datenmodell-Unterschied.
- **Zugleich behobener Bestandsfehler:** `FacilityService.UpdateAsync` kopierte die elf Konditionsfelder bislang gar nicht auf die getrackte Entität — der Controller validierte sie korrekt, aber `PUT /api/facilities/{id}` verwarf sie stillschweigend (kein Fehler, kein Log, das Feld blieb einfach `null`/unverändert). Betraf `BillingRate`/alle vier Zuschläge/`TravelCostRate`/`MinimumHours`/`BillingInterval`/`PaymentTermDays`/`IndividualAgreements` seit deren Einführung (damals inkl. `BreakPolicy`, seit 2026-08-10 entfernt, siehe oben). Jetzt behoben, Regressionstest: `FacilityServiceTests.UpdateAsync_PersistsKonditionenFields`.
- `BillingInterval` wird wie `FacilityType`/`ContractType` gegen die admin-editierbare `ValueList` `"BillingInterval"` (Wöchentlich/Monatlich/Quartalsweise) validiert — siehe "Konfigurierbare Auswahllisten".
- Alle zwölf Felder sind nur über `PUT /api/facilities/{id}` (`UpdateFacilityRequest`) setzbar, nicht beim Anlegen (`CreateFacilityRequest`) analog zu `CrmStatus`, der ebenfalls erst nach dem Anlegen über "Bearbeiten" gepflegt wird.
- Alle zwölf Felder sind **auch beim Anlegen** über `CreateFacilityRequest` setzbar (zusätzlich zu `UpdateFacilityRequest`). `CreateFacilityRequest` enthält die gleichen Konditionsfelder wie `UpdateFacilityRequest``CrmStatus` ist Pflicht beim Anlegen. Die Validierung für diese Felder (Wertebereich, Allowlists, FollowUp-Logik) läuft in beiden Cases, nur die `CanTransitionAsync`-Prüfung ("erlauber Statuswechsel") entfällt beim Anlegen, da es dort keinen Vorzustand gibt — jeder aktive CRM-Status ist beim Anlegen wählbar.
**Ausnahme "Qualifikationsabhängige Preise":** eine variable Liste (ein Satz je Qualifikationsstufe) lässt sich nicht als feste Spaltengruppe abbilden — dafür die neue Entität `FacilityQualificationRate` (1:n zu `Facility`, `Qualification` gegen die ValueList `"Qualification"` validiert — dieselbe Liste wie `Employee.Qualification`/`Order.RequiredQualification`, siehe "Wo welches Feld referenziert wird" oben) als 1:n-Unterressource unter `GET/POST/PUT/DELETE /api/facilities/{facilityId}/qualification-rates[/...]` (`FacilityQualificationRatesController`) — exakt nach dem Muster von `FacilityContact`, kein eigener `ModuleType`, gegated über dieselben `Facilities`-Rechte. Löschen ist Soft-Delete, über `TrashController` (`api/trash/facility-qualification-rates/...`) wiederherstellbar.
@@ -0,0 +1,3 @@
namespace OmsorgCore.Api.Contracts;
public record AssignmentConflictResponse(string Type, string Severity, string Message);
@@ -0,0 +1,12 @@
namespace OmsorgCore.Api.Contracts;
public record AssignmentResponse(
Guid Id,
Guid OrderId,
Guid EmployeeId,
string EmployeeFirstName,
string EmployeeLastName,
DateOnly StartDate,
DateOnly EndDate,
string? Note,
IReadOnlyList<AssignmentConflictResponse> Conflicts);
@@ -0,0 +1,8 @@
namespace OmsorgCore.Api.Contracts;
public record AssignmentValidationSettingsResponse(
string QualificationMode,
string AbsenceMode,
string WorkingHoursMode,
string OverlapMode,
string ContractMode);
@@ -0,0 +1,8 @@
namespace OmsorgCore.Api.Contracts;
public record CreateAssignmentRequest(
Guid OrderId,
Guid EmployeeId,
DateOnly StartDate,
DateOnly EndDate,
string? Note = null);
@@ -2,6 +2,7 @@ namespace OmsorgCore.Api.Contracts;
public record CreateFacilityRequest(
string Name,
string CrmStatus,
string? FacilityType,
string? Website,
string? Street,
@@ -11,4 +12,18 @@ public record CreateFacilityRequest(
string? BillingStreet,
string? BillingPostalCode,
string? BillingCity,
string? BillingCountry);
string? BillingCountry,
int? FollowUpDays,
decimal? BillingRate,
decimal? NightSurchargePercent,
decimal? SaturdaySurchargePercent,
decimal? SundaySurchargePercent,
decimal? HolidaySurchargePercent,
decimal? TravelCostRate,
string TravelCostMode,
decimal? TravelCostPerKm,
decimal? MealAllowanceRate,
decimal? MinimumHours,
string? BillingInterval,
int? PaymentTermDays,
string? IndividualAgreements);
@@ -0,0 +1,7 @@
namespace OmsorgCore.Api.Contracts;
public record TrashAssignmentResponse(
Guid Id,
string EmployeeFirstName,
string EmployeeLastName,
DateTime? DeletedAt);
@@ -0,0 +1,3 @@
namespace OmsorgCore.Api.Contracts;
public record UpdateAssignmentRequest(string? Note = null);
@@ -0,0 +1,8 @@
namespace OmsorgCore.Api.Contracts;
public record UpdateAssignmentValidationSettingsRequest(
string QualificationMode,
string AbsenceMode,
string WorkingHoursMode,
string OverlapMode,
string ContractMode);
@@ -0,0 +1,66 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using OmsorgCore.Api.Contracts;
using OmsorgCore.Api.Security;
using OmsorgCore.Application.Services;
using OmsorgCore.Domain.Enums;
namespace OmsorgCore.Api.Controllers;
/// <summary>
/// Admin-Konfiguration der FR-EM-3-Konfliktprüfungen bei der Mitarbeiterzuweisung: pro Prüfung
/// (Qualifikation/Abwesenheit/Arbeitszeit/Überschneidung/Vertrag) einzeln als Warning oder Error
/// einstellbar, siehe AssignmentService.CreateAsync.
/// </summary>
[ApiController]
[Authorize]
[Route("api/settings/assignment-validation")]
public class AssignmentValidationSettingsController : ControllerBase
{
private readonly IAssignmentValidationSettingsService _service;
public AssignmentValidationSettingsController(IAssignmentValidationSettingsService service)
{
_service = service;
}
[HttpGet]
[RequirePermission(ModuleType.Configuration, PermissionAction.Edit)]
public async Task<ActionResult<AssignmentValidationSettingsResponse>> Get(CancellationToken cancellationToken)
{
var settings = await _service.GetAsync(cancellationToken);
return Ok(new AssignmentValidationSettingsResponse(
settings.QualificationMode.ToString(),
settings.AbsenceMode.ToString(),
settings.WorkingHoursMode.ToString(),
settings.OverlapMode.ToString(),
settings.ContractMode.ToString()));
}
[HttpPut]
[RequirePermission(ModuleType.Configuration, PermissionAction.Edit)]
public async Task<ActionResult<AssignmentValidationSettingsResponse>> Update(
UpdateAssignmentValidationSettingsRequest request,
CancellationToken cancellationToken)
{
if (!TryParseSeverity(request.QualificationMode, out var qualificationMode) ||
!TryParseSeverity(request.AbsenceMode, out var absenceMode) ||
!TryParseSeverity(request.WorkingHoursMode, out var workingHoursMode) ||
!TryParseSeverity(request.OverlapMode, out var overlapMode) ||
!TryParseSeverity(request.ContractMode, out var contractMode))
{
return BadRequest(new { error = "invalid_severity", message = "Mode must be \"Warning\" or \"Error\"" });
}
var settings = await _service.UpdateAsync(qualificationMode, absenceMode, workingHoursMode, overlapMode, contractMode, cancellationToken);
return Ok(new AssignmentValidationSettingsResponse(
settings.QualificationMode.ToString(),
settings.AbsenceMode.ToString(),
settings.WorkingHoursMode.ToString(),
settings.OverlapMode.ToString(),
settings.ContractMode.ToString()));
}
private static bool TryParseSeverity(string value, out ValidationSeverity severity)
=> Enum.TryParse(value, ignoreCase: true, out severity);
}
@@ -0,0 +1,134 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using OmsorgCore.Api.Contracts;
using OmsorgCore.Api.Security;
using OmsorgCore.Application.Services;
using OmsorgCore.Domain.Entities;
using OmsorgCore.Domain.Enums;
namespace OmsorgCore.Api.Controllers;
[ApiController]
[Authorize]
[Route("api/assignments")]
public class AssignmentsController : ControllerBase
{
private readonly IAssignmentService _assignmentService;
public AssignmentsController(IAssignmentService assignmentService)
{
_assignmentService = assignmentService;
}
[HttpGet]
[RequirePermission(ModuleType.Assignments, PermissionAction.View)]
public async Task<ActionResult<PagedResponse<AssignmentResponse>>> GetAll(
[FromQuery] Guid? orderId = null,
[FromQuery] Guid? employeeId = null,
[FromQuery] DateOnly? fromDate = null,
[FromQuery] DateOnly? toDate = null,
[FromQuery] int page = 1,
[FromQuery] int pageSize = 20,
CancellationToken cancellationToken = default)
{
page = Math.Max(page, 1);
pageSize = Math.Clamp(pageSize, 1, 100);
var (items, totalCount) = await _assignmentService.GetPagedAsync(
orderId, employeeId, fromDate, toDate, page, pageSize, cancellationToken);
var responses = items.Select(a => ToResponse(a)).ToList();
return Ok(new PagedResponse<AssignmentResponse>(responses, totalCount, page, pageSize));
}
/// <summary>
/// Läuft dieselben FR-EM-3-Konfliktprüfungen wie <see cref="Create"/>, ohne etwas anzulegen -
/// für die Live-Vorschau im Zuweisungs-Dialog, sobald Mitarbeiter/Zeitraum ausgewählt sind.
/// </summary>
[HttpGet("check")]
[RequirePermission(ModuleType.Assignments, PermissionAction.Create)]
public async Task<ActionResult<IReadOnlyList<AssignmentConflictResponse>>> Check(
[FromQuery] Guid orderId,
[FromQuery] Guid employeeId,
[FromQuery] DateOnly startDate,
[FromQuery] DateOnly endDate,
[FromQuery] Guid? excludeAssignmentId,
CancellationToken cancellationToken)
{
var conflicts = await _assignmentService.CheckConflictsAsync(
orderId, employeeId, startDate, endDate, excludeAssignmentId, cancellationToken);
return Ok(conflicts.Select(ToConflictResponse).ToList());
}
[HttpGet("{id:guid}")]
[RequirePermission(ModuleType.Assignments, PermissionAction.View)]
public async Task<ActionResult<AssignmentResponse>> GetById(Guid id, CancellationToken cancellationToken)
{
var assignment = await _assignmentService.GetByIdAsync(id, cancellationToken);
return assignment is null ? NotFound() : Ok(ToResponse(assignment));
}
[HttpPost]
[RequirePermission(ModuleType.Assignments, PermissionAction.Create)]
public async Task<ActionResult<AssignmentResponse>> Create(
CreateAssignmentRequest request,
CancellationToken cancellationToken)
{
var result = await _assignmentService.CreateAsync(
request.OrderId,
request.EmployeeId,
request.StartDate,
request.EndDate,
request.Note,
cancellationToken);
if (!result.Success)
{
return result.Reason switch
{
CreateAssignmentFailureReason.OrderNotFound => NotFound(new { error = "order_not_found" }),
CreateAssignmentFailureReason.EmployeeNotFound => NotFound(new { error = "employee_not_found" }),
CreateAssignmentFailureReason.InvalidDateRange => BadRequest(new { error = "invalid_date_range", message = "End date must be >= start date" }),
CreateAssignmentFailureReason.DateOutsideOrderRange => BadRequest(new { error = "date_outside_order_range", message = "Assignment dates must be within the order's date range" }),
CreateAssignmentFailureReason.OverlappingAssignment => Conflict(new { error = "overlapping_assignment", message = "Employee already has an assignment in this time range for this order" }),
CreateAssignmentFailureReason.ValidationConflict => Conflict(new { error = "validation_conflict", conflicts = result.Conflicts.Select(ToConflictResponse) }),
_ => BadRequest(new { error = "unknown_error" })
};
}
return CreatedAtAction(nameof(GetById), new { id = result.Assignment!.Id }, ToResponse(result.Assignment, result.Conflicts));
}
[HttpPut("{id:guid}")]
[RequirePermission(ModuleType.Assignments, PermissionAction.Edit)]
public async Task<ActionResult<AssignmentResponse>> Update(
Guid id,
UpdateAssignmentRequest request,
CancellationToken cancellationToken)
{
var assignment = await _assignmentService.UpdateAsync(id, request.Note, cancellationToken);
return assignment is null ? NotFound() : Ok(ToResponse(assignment));
}
[HttpDelete("{id:guid}")]
[RequirePermission(ModuleType.Assignments, PermissionAction.Delete)]
public async Task<IActionResult> Delete(Guid id, CancellationToken cancellationToken)
{
var deleted = await _assignmentService.DeleteAsync(id, cancellationToken);
return deleted ? NoContent() : NotFound();
}
private static AssignmentResponse ToResponse(Assignment assignment, IReadOnlyList<AssignmentConflict>? conflicts = null)
=> new(
assignment.Id,
assignment.OrderId,
assignment.EmployeeId,
assignment.Employee.FirstName,
assignment.Employee.LastName,
assignment.StartDate,
assignment.EndDate,
assignment.Note,
(conflicts ?? Array.Empty<AssignmentConflict>()).Select(ToConflictResponse).ToList());
private static AssignmentConflictResponse ToConflictResponse(AssignmentConflict conflict)
=> new(conflict.Type.ToString(), conflict.Severity.ToString(), conflict.Message);
}
@@ -15,6 +15,8 @@ namespace OmsorgCore.Api.Controllers;
[Route("api/facilities")]
public class FacilitiesController : ControllerBase
{
private record CrmStatusValidationResult(string? ErrorMessage, DateTime? FollowUpDueDate);
private const string CrmStatusListKey = "CrmStatus";
private const string FacilityTypeListKey = "FacilityType";
private const string FollowUpPeriodsListKey = "FollowUpPeriods";
@@ -66,6 +68,11 @@ public class FacilitiesController : ControllerBase
return BadRequest("Name ist erforderlich und darf maximal 300 Zeichen lang sein.");
}
if (string.IsNullOrWhiteSpace(request.CrmStatus) || request.CrmStatus.Length > 50)
{
return BadRequest("CrmStatus ist erforderlich und darf maximal 50 Zeichen lang sein.");
}
if (request.FacilityType is { Length: > 100 })
{
return BadRequest("FacilityType darf maximal 100 Zeichen lang sein.");
@@ -97,9 +104,67 @@ public class FacilitiesController : ControllerBase
return BadRequest(billingAddressError);
}
var crmStatusValidationError = await ValidateCrmStatusAndFollowUpAsync(
request.CrmStatus,
request.FollowUpDays,
existingCrmStatus: null,
cancellationToken);
if (crmStatusValidationError.ErrorMessage is not null)
{
return BadRequest(crmStatusValidationError.ErrorMessage);
}
if (request.IndividualAgreements is { Length: > 2000 })
{
return BadRequest("IndividualAgreements darf maximal 2000 Zeichen lang sein.");
}
if (request.BillingInterval is not null)
{
var allowedBillingIntervals = await _valueListRepository.GetActiveValuesAsync(BillingIntervalListKey, cancellationToken);
if (!allowedBillingIntervals.Contains(request.BillingInterval))
{
return BadRequest($"BillingInterval muss einer der folgenden Werte sein: {string.Join(", ", allowedBillingIntervals)}.");
}
}
if (request.BillingRate is < 0
|| request.TravelCostRate is < 0
|| request.TravelCostPerKm is < 0
|| request.MealAllowanceRate is < 0
|| request.MinimumHours is < 0
|| request.NightSurchargePercent is < 0
|| request.SaturdaySurchargePercent is < 0
|| request.SundaySurchargePercent is < 0
|| request.HolidaySurchargePercent is < 0
|| request.PaymentTermDays is < 0)
{
return BadRequest("Konditionswerte dürfen nicht negativ sein.");
}
if (!TravelCostModes.Contains(request.TravelCostMode))
{
return BadRequest($"TravelCostMode muss einer der folgenden Werte sein: {string.Join(", ", TravelCostModes)}.");
}
var facility = new Facility
{
Name = request.Name,
CrmStatus = request.CrmStatus,
FollowUpDueDate = crmStatusValidationError.FollowUpDueDate,
BillingRate = request.BillingRate,
NightSurchargePercent = request.NightSurchargePercent,
SaturdaySurchargePercent = request.SaturdaySurchargePercent,
SundaySurchargePercent = request.SundaySurchargePercent,
HolidaySurchargePercent = request.HolidaySurchargePercent,
TravelCostRate = request.TravelCostRate,
TravelCostMode = request.TravelCostMode,
TravelCostPerKm = request.TravelCostPerKm,
MealAllowanceRate = request.MealAllowanceRate,
MinimumHours = request.MinimumHours,
BillingInterval = request.BillingInterval,
PaymentTermDays = request.PaymentTermDays,
IndividualAgreements = request.IndividualAgreements,
FacilityType = request.FacilityType,
Website = request.Website,
Street = request.Street,
@@ -138,37 +203,20 @@ public class FacilitiesController : ControllerBase
return BadRequest("CrmStatus ist erforderlich und darf maximal 50 Zeichen lang sein.");
}
var crmStatusItems = await _valueListRepository.GetItemsAsync(CrmStatusListKey, cancellationToken);
var selectedCrmStatusItem = crmStatusItems.FirstOrDefault(i => i.Value == request.CrmStatus);
if (selectedCrmStatusItem is null)
var crmStatusValidationError = await ValidateCrmStatusAndFollowUpAsync(
request.CrmStatus,
request.FollowUpDays,
existingCrmStatus: existing.CrmStatus,
cancellationToken);
if (crmStatusValidationError.ErrorMessage is not null)
{
return BadRequest($"CrmStatus muss einer der folgenden Werte sein: {string.Join(", ", crmStatusItems.Select(i => i.Value))}.");
return BadRequest(crmStatusValidationError.ErrorMessage);
}
var currentCrmStatusItem = crmStatusItems.FirstOrDefault(i => i.Value == existing.CrmStatus);
if (currentCrmStatusItem is not null
&& !await _valueListRepository.CanTransitionAsync(currentCrmStatusItem.Id, selectedCrmStatusItem.Id, cancellationToken))
var followUpDueDate = crmStatusValidationError.FollowUpDueDate;
if (followUpDueDate is null && existing.CrmStatus == request.CrmStatus)
{
return BadRequest("Der Statuswechsel ist nicht zulässig.");
}
DateTime? followUpDueDate = null;
if (selectedCrmStatusItem.TriggersFollowUp)
{
if (existing.CrmStatus == request.CrmStatus)
{
followUpDueDate = existing.FollowUpDueDate;
}
else
{
var allowedFollowUpPeriods = await _valueListRepository.GetActiveValuesAsync(FollowUpPeriodsListKey, cancellationToken);
if (request.FollowUpDays is null || !allowedFollowUpPeriods.Contains(request.FollowUpDays.Value.ToString()))
{
return BadRequest($"FollowUpDays ist bei CrmStatus \"{request.CrmStatus}\" erforderlich und muss einer der folgenden Werte sein: {string.Join(", ", allowedFollowUpPeriods)}.");
}
followUpDueDate = DateTime.UtcNow.AddDays(request.FollowUpDays.Value);
}
followUpDueDate = existing.FollowUpDueDate;
}
if (request.FacilityType is { Length: > 100 })
@@ -277,6 +325,51 @@ public class FacilitiesController : ControllerBase
return deleted ? NoContent() : NotFound();
}
private async Task<CrmStatusValidationResult> ValidateCrmStatusAndFollowUpAsync(
string crmStatus,
int? followUpDays,
string? existingCrmStatus,
CancellationToken cancellationToken)
{
var crmStatusItems = await _valueListRepository.GetItemsAsync(CrmStatusListKey, cancellationToken);
var selectedCrmStatusItem = crmStatusItems.FirstOrDefault(i => i.Value == crmStatus);
if (selectedCrmStatusItem is null)
{
return new($"CrmStatus muss einer der folgenden Werte sein: {string.Join(", ", crmStatusItems.Select(i => i.Value))}.", null);
}
if (existingCrmStatus is not null)
{
var currentCrmStatusItem = crmStatusItems.FirstOrDefault(i => i.Value == existingCrmStatus);
if (currentCrmStatusItem is not null
&& !await _valueListRepository.CanTransitionAsync(currentCrmStatusItem.Id, selectedCrmStatusItem.Id, cancellationToken))
{
return new("Der Statuswechsel ist nicht zulässig.", null);
}
}
DateTime? followUpDueDate = null;
if (selectedCrmStatusItem.TriggersFollowUp)
{
if (existingCrmStatus is not null && existingCrmStatus == crmStatus)
{
followUpDueDate = null;
}
else
{
var allowedFollowUpPeriods = await _valueListRepository.GetActiveValuesAsync(FollowUpPeriodsListKey, cancellationToken);
if (followUpDays is null || !allowedFollowUpPeriods.Contains(followUpDays.Value.ToString()))
{
return new($"FollowUpDays ist bei CrmStatus \"{crmStatus}\" erforderlich und muss einer der folgenden Werte sein: {string.Join(", ", allowedFollowUpPeriods)}.", null);
}
followUpDueDate = DateTime.UtcNow.AddDays(followUpDays.Value);
}
}
return new(null, followUpDueDate);
}
private static string? ValidateAddressFields(string? street, string? postalCode, string? city, string? country, string prefix)
{
if (street is { Length: > 200 })
@@ -29,6 +29,7 @@ public class TrashController : ControllerBase
private readonly IEmployeeFacilityDistanceService _employeeFacilityDistanceService;
private readonly IAbsenceService _absenceService;
private readonly ITimeEntryService _timeEntryService;
private readonly IAssignmentService _assignmentService;
public TrashController(
IEmployeeService employeeService,
@@ -39,7 +40,8 @@ public class TrashController : ControllerBase
IFacilityQualificationRateService facilityQualificationRateService,
IEmployeeFacilityDistanceService employeeFacilityDistanceService,
IAbsenceService absenceService,
ITimeEntryService timeEntryService)
ITimeEntryService timeEntryService,
IAssignmentService assignmentService)
{
_employeeService = employeeService;
_facilityService = facilityService;
@@ -50,6 +52,7 @@ public class TrashController : ControllerBase
_employeeFacilityDistanceService = employeeFacilityDistanceService;
_absenceService = absenceService;
_timeEntryService = timeEntryService;
_assignmentService = assignmentService;
}
[HttpGet("employees")]
@@ -195,4 +198,20 @@ public class TrashController : ControllerBase
var restored = await _timeEntryService.RestoreAsync(id, cancellationToken);
return restored ? NoContent() : NotFound();
}
[HttpGet("assignments")]
[RequirePermission(ModuleType.Assignments, PermissionAction.Recover)]
public async Task<ActionResult<IReadOnlyList<TrashAssignmentResponse>>> GetDeletedAssignments([FromQuery] string? search, CancellationToken cancellationToken)
{
var assignments = await _assignmentService.GetDeletedAsync(search, cancellationToken);
return Ok(assignments.Select(a => new TrashAssignmentResponse(a.Id, a.Employee.FirstName, a.Employee.LastName, a.DeletedAt)).ToList());
}
[HttpPost("assignments/{id:guid}/restore")]
[RequirePermission(ModuleType.Assignments, PermissionAction.Recover)]
public async Task<IActionResult> RestoreAssignment(Guid id, CancellationToken cancellationToken)
{
var restored = await _assignmentService.RestoreAsync(id, cancellationToken);
return restored ? NoContent() : NotFound();
}
}
@@ -13,6 +13,18 @@ public interface IAbsenceRepository
int pageSize,
CancellationToken cancellationToken = default,
Guid? restrictToEmployeeId = null);
/// <summary>
/// Prüft, ob eine nicht gelöschte Abwesenheit der Mitarbeiterin mit einem Status aus
/// <paramref name="blockingStatusValues"/> (siehe ValueListItem.BlocksAssignment) den Zeitraum
/// [startDate, endDate] überlappt - Basis der Abwesenheitsprüfung in FR-EM-3.
/// </summary>
Task<bool> HasOverlappingAbsenceAsync(
Guid employeeId,
DateOnly startDate,
DateOnly endDate,
IReadOnlyCollection<string> blockingStatusValues,
CancellationToken cancellationToken = default);
Task AddAsync(Absence absence, CancellationToken cancellationToken = default);
Task UpdateAsync(Absence absence, CancellationToken cancellationToken = default);
Task<bool> SoftDeleteAsync(Guid id, CancellationToken cancellationToken = default);
@@ -0,0 +1,45 @@
namespace OmsorgCore.Application.Abstractions;
using OmsorgCore.Domain.Entities;
public interface IAssignmentRepository
{
Task<Assignment?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);
Task<IReadOnlyList<Assignment>> GetAllAsync(CancellationToken cancellationToken = default);
Task<(IReadOnlyList<Assignment> Items, int TotalCount)> GetPagedAsync(
Guid? orderId = null,
Guid? employeeId = null,
DateOnly? fromDate = null,
DateOnly? toDate = null,
int page = 1,
int pageSize = 20,
CancellationToken cancellationToken = default);
Task<bool> HasOverlapAsync(
Guid employeeId,
DateOnly startDate,
DateOnly endDate,
Guid? excludeAssignmentId = null,
CancellationToken cancellationToken = default);
/// <summary>
/// Zählt die Tage, an denen die Mitarbeiterin innerhalb von [weekStart, weekEnd] bereits
/// eingeteilt ist (bestehende Zuweisungen, ohne excludeAssignmentId) - Basis für die
/// Arbeitszeit-Näherung in FR-EM-3 (8h/Tag gegen Contract.WeeklyHours).
/// </summary>
Task<int> GetAssignedDayCountInWeekAsync(
Guid employeeId,
DateOnly weekStart,
DateOnly weekEnd,
Guid? excludeAssignmentId = null,
CancellationToken cancellationToken = default);
Task<int> CountForOrderAsync(Guid orderId, CancellationToken cancellationToken = default);
Task AddAsync(Assignment assignment, CancellationToken cancellationToken = default);
Task UpdateAsync(Assignment assignment, CancellationToken cancellationToken = default);
Task<bool> SoftDeleteAsync(Guid id, CancellationToken cancellationToken = default);
Task<IReadOnlyList<Assignment>> GetDeletedAsync(string? search, CancellationToken cancellationToken = default);
Task<bool> RestoreAsync(Guid id, CancellationToken cancellationToken = default);
Task SaveChangesAsync(CancellationToken cancellationToken = default);
}
@@ -0,0 +1,11 @@
using OmsorgCore.Domain.Entities;
namespace OmsorgCore.Application.Abstractions;
public interface IAssignmentValidationSettingsRepository
{
/// <summary>Liefert die eine Settings-Zeile, legt sie mit den Entity-Defaults an, falls noch keine existiert.</summary>
Task<AssignmentValidationSettings> GetOrCreateAsync(CancellationToken cancellationToken = default);
Task UpdateAsync(AssignmentValidationSettings settings, CancellationToken cancellationToken = default);
Task SaveChangesAsync(CancellationToken cancellationToken = default);
}
@@ -14,6 +14,17 @@ public interface IContractRepository
int page,
int pageSize,
CancellationToken cancellationToken = default);
/// <summary>
/// Liefert den ersten aktiven Vertrag (Status != "Entwurf") der Mitarbeiterin, dessen Zeitraum
/// [startDate, endDate] vollständig abdeckt, oder null - Basis der Vertrags- und der
/// Arbeitszeit-Prüfung (WeeklyHours) in FR-EM-3.
/// </summary>
Task<Contract?> GetActiveForEmployeeCoveringRangeAsync(
Guid employeeId,
DateOnly startDate,
DateOnly endDate,
CancellationToken cancellationToken = default);
Task AddAsync(Contract contract, CancellationToken cancellationToken = default);
Task UpdateAsync(Contract contract, CancellationToken cancellationToken = default);
Task<bool> SoftDeleteAsync(Guid id, CancellationToken cancellationToken = default);
@@ -17,7 +17,9 @@ public static class DependencyInjection
services.AddScoped<IEmployeeFacilityDistanceService, EmployeeFacilityDistanceService>();
services.AddScoped<IContractService, ContractService>();
services.AddScoped<IOrderService, OrderService>();
services.AddScoped<IAssignmentService, AssignmentService>();
services.AddScoped<IAbsenceService, AbsenceService>();
services.AddScoped<IAssignmentValidationSettingsService, AssignmentValidationSettingsService>();
services.AddScoped<ITimeEntryService, TimeEntryService>();
services.AddScoped<IDocumentService, DocumentService>();
services.AddScoped<IValueListService, ValueListService>();
@@ -0,0 +1,7 @@
using OmsorgCore.Domain.Enums;
namespace OmsorgCore.Application.Services;
public enum AssignmentConflictType { Qualification, Absence, WorkingHours, Overlap, Contract }
public record AssignmentConflict(AssignmentConflictType Type, ValidationSeverity Severity, string Message);
@@ -0,0 +1,290 @@
namespace OmsorgCore.Application.Services;
using OmsorgCore.Application.Abstractions;
using OmsorgCore.Domain.Entities;
using OmsorgCore.Domain.Enums;
public class AssignmentService : IAssignmentService
{
private const int AssumedHoursPerDay = 8;
private readonly IAssignmentRepository _assignmentRepository;
private readonly IOrderRepository _orderRepository;
private readonly IEmployeeRepository _employeeRepository;
private readonly IAbsenceRepository _absenceRepository;
private readonly IContractRepository _contractRepository;
private readonly IValueListRepository _valueListRepository;
private readonly IAssignmentValidationSettingsRepository _validationSettingsRepository;
public AssignmentService(
IAssignmentRepository assignmentRepository,
IOrderRepository orderRepository,
IEmployeeRepository employeeRepository,
IAbsenceRepository absenceRepository,
IContractRepository contractRepository,
IValueListRepository valueListRepository,
IAssignmentValidationSettingsRepository validationSettingsRepository)
{
_assignmentRepository = assignmentRepository;
_orderRepository = orderRepository;
_employeeRepository = employeeRepository;
_absenceRepository = absenceRepository;
_contractRepository = contractRepository;
_valueListRepository = valueListRepository;
_validationSettingsRepository = validationSettingsRepository;
}
public async Task<(IReadOnlyList<Assignment> Items, int TotalCount)> GetPagedAsync(
Guid? orderId = null,
Guid? employeeId = null,
DateOnly? fromDate = null,
DateOnly? toDate = null,
int page = 1,
int pageSize = 20,
CancellationToken cancellationToken = default)
{
return await _assignmentRepository.GetPagedAsync(
orderId, employeeId, fromDate, toDate, page, pageSize, cancellationToken);
}
public async Task<Assignment?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default)
{
return await _assignmentRepository.GetByIdAsync(id, cancellationToken);
}
public async Task<CreateAssignmentResult> CreateAsync(
Guid orderId,
Guid employeeId,
DateOnly startDate,
DateOnly endDate,
string? note,
CancellationToken cancellationToken = default)
{
// Validate Order exists
var order = await _orderRepository.GetByIdAsync(orderId, cancellationToken);
if (order is null)
{
return new CreateAssignmentResult(false, CreateAssignmentFailureReason.OrderNotFound, null, Array.Empty<AssignmentConflict>());
}
// Validate Employee exists
var employee = await _employeeRepository.GetByIdAsync(employeeId, cancellationToken);
if (employee is null)
{
return new CreateAssignmentResult(false, CreateAssignmentFailureReason.EmployeeNotFound, null, Array.Empty<AssignmentConflict>());
}
// Validate date range
if (endDate < startDate)
{
return new CreateAssignmentResult(false, CreateAssignmentFailureReason.InvalidDateRange, null, Array.Empty<AssignmentConflict>());
}
// Validate dates are within Order's range
var orderEndDate = order.EndDate ?? DateOnly.MaxValue;
if (startDate < order.StartDate || endDate > orderEndDate)
{
return new CreateAssignmentResult(false, CreateAssignmentFailureReason.DateOutsideOrderRange, null, Array.Empty<AssignmentConflict>());
}
var conflicts = await CheckConflictsAsync(order, employee, startDate, endDate, excludeAssignmentId: null, cancellationToken);
if (conflicts.Any(c => c.Severity == ValidationSeverity.Error))
{
return new CreateAssignmentResult(false, CreateAssignmentFailureReason.ValidationConflict, null, conflicts);
}
// Create assignment
var assignment = new Assignment
{
OrderId = orderId,
EmployeeId = employeeId,
StartDate = startDate,
EndDate = endDate,
Note = note
};
await _assignmentRepository.AddAsync(assignment, cancellationToken);
await _assignmentRepository.SaveChangesAsync(cancellationToken);
// Reload to include the Employee navigation for the result
var reloaded = await _assignmentRepository.GetByIdAsync(assignment.Id, cancellationToken);
return new CreateAssignmentResult(true, CreateAssignmentFailureReason.None, reloaded, conflicts);
}
public async Task<IReadOnlyList<AssignmentConflict>> CheckConflictsAsync(
Guid orderId,
Guid employeeId,
DateOnly startDate,
DateOnly endDate,
Guid? excludeAssignmentId = null,
CancellationToken cancellationToken = default)
{
if (endDate < startDate)
{
return Array.Empty<AssignmentConflict>();
}
var order = await _orderRepository.GetByIdAsync(orderId, cancellationToken);
var employee = await _employeeRepository.GetByIdAsync(employeeId, cancellationToken);
if (order is null || employee is null)
{
return Array.Empty<AssignmentConflict>();
}
return await CheckConflictsAsync(order, employee, startDate, endDate, excludeAssignmentId, cancellationToken);
}
private async Task<IReadOnlyList<AssignmentConflict>> CheckConflictsAsync(
Order order,
Employee employee,
DateOnly startDate,
DateOnly endDate,
Guid? excludeAssignmentId,
CancellationToken cancellationToken)
{
var settings = await _validationSettingsRepository.GetOrCreateAsync(cancellationToken);
var conflicts = new List<AssignmentConflict>();
// Qualifikation: Employee.Qualification muss mindestens den Rang von Order.RequiredQualification haben
// (SortOrder der gemeinsamen ValueList "Qualification", siehe omsorgCore/CLAUDE.md "Konfigurierbare Auswahllisten").
if (!string.IsNullOrWhiteSpace(order.RequiredQualification))
{
var qualificationItems = await _valueListRepository.GetItemsAsync("Qualification", cancellationToken);
var requiredItem = qualificationItems.FirstOrDefault(i => i.Value == order.RequiredQualification);
var employeeItem = qualificationItems.FirstOrDefault(i => i.Value == employee.Qualification);
if (requiredItem is not null && (employeeItem is null || employeeItem.SortOrder < requiredItem.SortOrder))
{
conflicts.Add(new AssignmentConflict(
AssignmentConflictType.Qualification,
settings.QualificationMode,
$"Mitarbeiterin erfüllt die benötigte Qualifikation \"{order.RequiredQualification}\" nicht (aktuell: \"{employee.Qualification ?? "keine"}\")."));
}
}
// Abwesenheit (deckt "Verfügbarkeit" ab, siehe Plan): genehmigte Abwesenheit überlappt Zeitraum.
var blockingAbsenceStatuses = (await _valueListRepository.GetItemsAsync("AbsenceStatus", cancellationToken))
.Where(i => i.BlocksAssignment)
.Select(i => i.Value)
.ToList();
if (await _absenceRepository.HasOverlappingAbsenceAsync(employee.Id, startDate, endDate, blockingAbsenceStatuses, cancellationToken))
{
conflicts.Add(new AssignmentConflict(
AssignmentConflictType.Absence,
settings.AbsenceMode,
"Mitarbeiterin hat im Zuweisungszeitraum eine genehmigte Abwesenheit."));
}
// Überschneidung: jetzt auftragsübergreifend geprüft (nicht mehr nur derselbe Auftrag).
if (await _assignmentRepository.HasOverlapAsync(employee.Id, startDate, endDate, excludeAssignmentId, cancellationToken))
{
conflicts.Add(new AssignmentConflict(
AssignmentConflictType.Overlap,
settings.OverlapMode,
"Mitarbeiterin ist im Zuweisungszeitraum bereits einem anderen Auftrag zugewiesen."));
}
// Vertrag + Arbeitszeit: beide brauchen den aktiven Vertrag der Mitarbeiterin für den Zeitraum.
var activeContract = await _contractRepository.GetActiveForEmployeeCoveringRangeAsync(employee.Id, startDate, endDate, cancellationToken);
if (activeContract is null)
{
conflicts.Add(new AssignmentConflict(
AssignmentConflictType.Contract,
settings.ContractMode,
"Mitarbeiterin hat keinen aktiven Vertrag, der den Zuweisungszeitraum abdeckt."));
}
else if (activeContract.WeeklyHours.HasValue)
{
var weeklyHourCap = activeContract.WeeklyHours.Value;
var maxDaysPerWeek = (int)Math.Ceiling(weeklyHourCap / AssumedHoursPerDay);
var current = startDate;
while (current <= endDate)
{
var weekStart = GetIsoWeekStart(current);
var weekEnd = weekStart.AddDays(6);
var existingDays = await _assignmentRepository.GetAssignedDayCountInWeekAsync(
employee.Id, weekStart, weekEnd, excludeAssignmentId, cancellationToken);
var newDaysInWeek = CountOverlapDays(startDate, endDate, weekStart, weekEnd);
var totalDays = existingDays + newDaysInWeek;
if (totalDays > maxDaysPerWeek)
{
conflicts.Add(new AssignmentConflict(
AssignmentConflictType.WorkingHours,
settings.WorkingHoursMode,
$"Arbeitszeit-Näherung (8h/Tag) überschreitet in der Woche ab {weekStart:yyyy-MM-dd} die Vertrags-Wochenstunden ({weeklyHourCap}h): {totalDays} zugewiesene Tage statt max. {maxDaysPerWeek}."));
break;
}
current = weekEnd.AddDays(1);
}
}
return conflicts;
}
private static DateOnly GetIsoWeekStart(DateOnly date)
{
var daysSinceMonday = ((int)date.DayOfWeek + 6) % 7;
return date.AddDays(-daysSinceMonday);
}
private static int CountOverlapDays(DateOnly aStart, DateOnly aEnd, DateOnly bStart, DateOnly bEnd)
{
var rangeStart = aStart > bStart ? aStart : bStart;
var rangeEnd = aEnd < bEnd ? aEnd : bEnd;
return rangeEnd < rangeStart ? 0 : rangeEnd.DayNumber - rangeStart.DayNumber + 1;
}
public async Task<Assignment?> UpdateAsync(
Guid id,
string? note,
CancellationToken cancellationToken = default)
{
var assignment = await _assignmentRepository.GetByIdAsync(id, cancellationToken);
if (assignment is null)
{
return null;
}
assignment.Note = note;
await _assignmentRepository.UpdateAsync(assignment, cancellationToken);
await _assignmentRepository.SaveChangesAsync(cancellationToken);
return assignment;
}
public async Task<bool> DeleteAsync(Guid id, CancellationToken cancellationToken = default)
{
var deleted = await _assignmentRepository.SoftDeleteAsync(id, cancellationToken);
if (deleted)
{
await _assignmentRepository.SaveChangesAsync(cancellationToken);
}
return deleted;
}
public async Task<IReadOnlyList<Assignment>> GetDeletedAsync(string? search = null, CancellationToken cancellationToken = default)
{
return await _assignmentRepository.GetDeletedAsync(search, cancellationToken);
}
public async Task<bool> RestoreAsync(Guid id, CancellationToken cancellationToken = default)
{
var restored = await _assignmentRepository.RestoreAsync(id, cancellationToken);
if (restored)
{
await _assignmentRepository.SaveChangesAsync(cancellationToken);
}
return restored;
}
public Task SaveChangesAsync(CancellationToken cancellationToken = default)
=> _assignmentRepository.SaveChangesAsync(cancellationToken);
}
@@ -0,0 +1,39 @@
using OmsorgCore.Application.Abstractions;
using OmsorgCore.Domain.Entities;
using OmsorgCore.Domain.Enums;
namespace OmsorgCore.Application.Services;
public class AssignmentValidationSettingsService : IAssignmentValidationSettingsService
{
private readonly IAssignmentValidationSettingsRepository _repository;
public AssignmentValidationSettingsService(IAssignmentValidationSettingsRepository repository)
{
_repository = repository;
}
public Task<AssignmentValidationSettings> GetAsync(CancellationToken cancellationToken = default)
=> _repository.GetOrCreateAsync(cancellationToken);
public async Task<AssignmentValidationSettings> UpdateAsync(
ValidationSeverity qualificationMode,
ValidationSeverity absenceMode,
ValidationSeverity workingHoursMode,
ValidationSeverity overlapMode,
ValidationSeverity contractMode,
CancellationToken cancellationToken = default)
{
var settings = await _repository.GetOrCreateAsync(cancellationToken);
settings.QualificationMode = qualificationMode;
settings.AbsenceMode = absenceMode;
settings.WorkingHoursMode = workingHoursMode;
settings.OverlapMode = overlapMode;
settings.ContractMode = contractMode;
await _repository.UpdateAsync(settings, cancellationToken);
await _repository.SaveChangesAsync(cancellationToken);
return settings;
}
}
@@ -0,0 +1,11 @@
namespace OmsorgCore.Application.Services;
using OmsorgCore.Domain.Entities;
public enum CreateAssignmentFailureReason { None, OrderNotFound, EmployeeNotFound, InvalidDateRange, DateOutsideOrderRange, OverlappingAssignment, ValidationConflict }
public record CreateAssignmentResult(
bool Success,
CreateAssignmentFailureReason Reason,
Assignment? Assignment,
IReadOnlyList<AssignmentConflict> Conflicts);
@@ -0,0 +1,43 @@
namespace OmsorgCore.Application.Services;
using OmsorgCore.Domain.Entities;
public interface IAssignmentService
{
Task<(IReadOnlyList<Assignment> Items, int TotalCount)> GetPagedAsync(
Guid? orderId = null,
Guid? employeeId = null,
DateOnly? fromDate = null,
DateOnly? toDate = null,
int page = 1,
int pageSize = 20,
CancellationToken cancellationToken = default);
Task<Assignment?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default);
Task<CreateAssignmentResult> CreateAsync(Guid orderId, Guid employeeId, DateOnly startDate, DateOnly endDate, string? note, CancellationToken cancellationToken = default);
/// <summary>
/// Führt dieselben FR-EM-3-Konfliktprüfungen wie <see cref="CreateAsync"/> aus, ohne eine
/// Zuweisung anzulegen - für die Live-Vorschau im Anlegen-/Bearbeiten-Dialog. Liefert eine
/// leere Liste, wenn Auftrag/Mitarbeiter (noch) nicht existieren oder der Zeitraum ungültig ist
/// (diese Fälle werden im Formular bereits über Pflichtfelder/Min-Max abgefangen).
/// </summary>
Task<IReadOnlyList<AssignmentConflict>> CheckConflictsAsync(
Guid orderId,
Guid employeeId,
DateOnly startDate,
DateOnly endDate,
Guid? excludeAssignmentId = null,
CancellationToken cancellationToken = default);
Task<Assignment?> UpdateAsync(Guid id, string? note, CancellationToken cancellationToken = default);
Task<bool> DeleteAsync(Guid id, CancellationToken cancellationToken = default);
Task<IReadOnlyList<Assignment>> GetDeletedAsync(string? search = null, CancellationToken cancellationToken = default);
Task<bool> RestoreAsync(Guid id, CancellationToken cancellationToken = default);
Task SaveChangesAsync(CancellationToken cancellationToken = default);
}
@@ -0,0 +1,17 @@
using OmsorgCore.Domain.Entities;
using OmsorgCore.Domain.Enums;
namespace OmsorgCore.Application.Services;
public interface IAssignmentValidationSettingsService
{
Task<AssignmentValidationSettings> GetAsync(CancellationToken cancellationToken = default);
Task<AssignmentValidationSettings> UpdateAsync(
ValidationSeverity qualificationMode,
ValidationSeverity absenceMode,
ValidationSeverity workingHoursMode,
ValidationSeverity overlapMode,
ValidationSeverity contractMode,
CancellationToken cancellationToken = default);
}
@@ -0,0 +1,16 @@
namespace OmsorgCore.Domain.Entities;
using OmsorgCore.Domain.Common;
public class Assignment : AuditableEntity
{
public Guid OrderId { get; set; }
public Order Order { get; set; } = null!;
public Guid EmployeeId { get; set; }
public Employee Employee { get; set; } = null!;
public DateOnly StartDate { get; set; }
public DateOnly EndDate { get; set; }
public string? Note { get; set; }
}
@@ -0,0 +1,19 @@
using OmsorgCore.Domain.Common;
using OmsorgCore.Domain.Enums;
namespace OmsorgCore.Domain.Entities;
/// <summary>
/// Systemweite, zur Laufzeit änderbare Konfiguration der FR-EM-3-Konfliktprüfungen bei der
/// Mitarbeiterzuweisung (<see cref="Assignment"/>). Genau eine Zeile (Singleton) —
/// <see cref="Application.Abstractions.IAssignmentValidationSettingsRepository.GetOrCreateAsync"/>
/// legt sie bei Bedarf mit den hier hinterlegten Defaults an.
/// </summary>
public class AssignmentValidationSettings : Entity
{
public ValidationSeverity QualificationMode { get; set; } = ValidationSeverity.Error;
public ValidationSeverity AbsenceMode { get; set; } = ValidationSeverity.Error;
public ValidationSeverity WorkingHoursMode { get; set; } = ValidationSeverity.Warning;
public ValidationSeverity OverlapMode { get; set; } = ValidationSeverity.Error;
public ValidationSeverity ContractMode { get; set; } = ValidationSeverity.Error;
}
@@ -23,4 +23,11 @@ public class ValueListItem : Entity
public bool IsTerminal { get; set; }
public bool TriggersFollowUp { get; set; }
public bool IsEditableByOwner { get; set; }
/// <summary>
/// Nur für "AbsenceStatus" relevant: markiert den Status-Wert (aktuell "Genehmigt"), der eine
/// Mitarbeiterzuweisung im überlappenden Zeitraum blockiert/warnt (FR-EM-3, Abwesenheitsprüfung).
/// Bei allen anderen Listen bleibt es <c>false</c> — analog zu <see cref="IsInitial"/>/<see cref="IsTerminal"/>.
/// </summary>
public bool BlocksAssignment { get; set; }
}
@@ -19,5 +19,6 @@ public enum ModuleType
Users,
Configuration,
Absences,
EmployeeFacilityDistances
EmployeeFacilityDistances,
Assignments
}
@@ -0,0 +1,11 @@
namespace OmsorgCore.Domain.Enums;
/// <summary>
/// Steuert, ob eine Zuweisungs-Konfliktprüfung (FR-EM-3) die Zuweisung blockiert (<see cref="Error"/>)
/// oder nur als Hinweis mitgegeben wird, ohne sie zu verhindern (<see cref="Warning"/>).
/// </summary>
public enum ValidationSeverity
{
Warning,
Error
}
@@ -38,7 +38,9 @@ public static class DependencyInjection
services.AddScoped<IEmployeeFacilityDistanceRepository, EmployeeFacilityDistanceRepository>();
services.AddScoped<IContractRepository, ContractRepository>();
services.AddScoped<IOrderRepository, OrderRepository>();
services.AddScoped<IAssignmentRepository, AssignmentRepository>();
services.AddScoped<IAbsenceRepository, AbsenceRepository>();
services.AddScoped<IAssignmentValidationSettingsRepository, AssignmentValidationSettingsRepository>();
services.AddScoped<ITimeEntryRepository, TimeEntryRepository>();
services.AddScoped<IDocumentRepository, DocumentRepository>();
services.AddScoped<IDocumentStorage, FileSystemDocumentStorage>();
@@ -0,0 +1,18 @@
namespace OmsorgCore.Infrastructure.Persistence.Configurations;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using OmsorgCore.Domain.Entities;
public class AssignmentConfiguration : IEntityTypeConfiguration<Assignment>
{
public void Configure(EntityTypeBuilder<Assignment> builder)
{
builder.ToTable("assignments");
builder.HasKey(a => a.Id);
builder.HasOne(a => a.Order).WithMany().HasForeignKey(a => a.OrderId).OnDelete(DeleteBehavior.Restrict);
builder.HasOne(a => a.Employee).WithMany().HasForeignKey(a => a.EmployeeId).OnDelete(DeleteBehavior.Restrict);
builder.Property(a => a.Note).HasMaxLength(500);
builder.HasQueryFilter(a => !a.IsDeleted);
}
}
@@ -0,0 +1,14 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using OmsorgCore.Domain.Entities;
namespace OmsorgCore.Infrastructure.Persistence.Configurations;
public class AssignmentValidationSettingsConfiguration : IEntityTypeConfiguration<AssignmentValidationSettings>
{
public void Configure(EntityTypeBuilder<AssignmentValidationSettings> builder)
{
builder.ToTable("assignment_validation_settings");
builder.HasKey(s => s.Id);
}
}
@@ -88,6 +88,7 @@ public static class DbSeeder
(ModuleType.Facilities, AllActions, PermissionScope.All),
(ModuleType.Contracts, AllActions, PermissionScope.All),
(ModuleType.Orders, AllActions, PermissionScope.All),
(ModuleType.Assignments, AllActions, PermissionScope.All),
(ModuleType.TimeEntries, AllActions, PermissionScope.All),
(ModuleType.Invoices, new[] { PermissionAction.View, PermissionAction.Create, PermissionAction.Approve }, PermissionScope.All),
(ModuleType.Recruiting, new[] { PermissionAction.View, PermissionAction.Create, PermissionAction.Edit }, PermissionScope.All),
@@ -107,6 +108,7 @@ public static class DbSeeder
{
(ModuleType.Employees, new[] { PermissionAction.View }, PermissionScope.Own),
(ModuleType.Contracts, new[] { PermissionAction.View }, PermissionScope.Own),
(ModuleType.Assignments, new[] { PermissionAction.View }, PermissionScope.Own),
(ModuleType.Absences, new[] { PermissionAction.Create, PermissionAction.View, PermissionAction.Edit }, PermissionScope.Own),
(ModuleType.TimeEntries, new[] { PermissionAction.Create, PermissionAction.View, PermissionAction.Edit }, PermissionScope.Own),
(ModuleType.EmployeeFacilityDistances, new[] { PermissionAction.Create, PermissionAction.View, PermissionAction.Edit }, PermissionScope.Own)
@@ -204,6 +206,7 @@ public static class DbSeeder
await SeedSimpleListIfMissingAsync(db, "AbsenceStatus", "Antragsstatus",
new (string Value, bool IsDefault)[] { ("Eingereicht", true), ("Genehmigt", false), ("Abgelehnt", false) }, cancellationToken);
await SeedAbsenceStatusInitialFlagIfMissingAsync(db, cancellationToken);
await SeedAbsenceStatusBlocksAssignmentFlagIfMissingAsync(db, cancellationToken);
await SeedOrderStatusListIfMissingAsync(db, cancellationToken);
await SeedCrmStatusTransitionsIfMissingAsync(db, cancellationToken);
@@ -439,6 +442,29 @@ public static class DbSeeder
item.IsInitial = true;
await context.SaveChangesAsync(ct);
}
// "Genehmigt" ist der einzige AbsenceStatus-Wert, der eine Mitarbeiterzuweisung im
// überlappenden Zeitraum blockiert/warnt (FR-EM-3, AssignmentService.CreateAsync liest
// darüber statt den Anzeigetext hartzukodieren, siehe BlocksAssignment auf ValueListItem).
// Idempotent wie SeedAbsenceStatusInitialFlagIfMissingAsync - läuft nicht erneut, sobald
// irgendein Item der Liste bereits BlocksAssignment trägt.
async Task SeedAbsenceStatusBlocksAssignmentFlagIfMissingAsync(OmsorgCoreDbContext context, CancellationToken ct)
{
if (await context.ValueListItems.AnyAsync(i => i.ValueList.Key == "AbsenceStatus" && i.BlocksAssignment, ct))
{
return;
}
var item = await context.ValueListItems
.FirstOrDefaultAsync(i => i.ValueList.Key == "AbsenceStatus" && i.Value == "Genehmigt", ct);
if (item is null)
{
return;
}
item.BlocksAssignment = true;
await context.SaveChangesAsync(ct);
}
}
private static async Task SeedRoleIfMissingAsync(
@@ -0,0 +1,64 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace OmsorgCore.Infrastructure.Persistence.Migrations
{
/// <inheritdoc />
public partial class AddAssignmentEntity : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "assignments",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
OrderId = table.Column<Guid>(type: "uuid", nullable: false),
EmployeeId = table.Column<Guid>(type: "uuid", nullable: false),
StartDate = table.Column<DateOnly>(type: "date", nullable: false),
EndDate = table.Column<DateOnly>(type: "date", nullable: false),
Note = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: true),
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
UpdatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: true),
IsDeleted = table.Column<bool>(type: "boolean", nullable: false),
DeletedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_assignments", x => x.Id);
table.ForeignKey(
name: "FK_assignments_employees_EmployeeId",
column: x => x.EmployeeId,
principalTable: "employees",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_assignments_orders_OrderId",
column: x => x.OrderId,
principalTable: "orders",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_assignments_EmployeeId",
table: "assignments",
column: "EmployeeId");
migrationBuilder.CreateIndex(
name: "IX_assignments_OrderId",
table: "assignments",
column: "OrderId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "assignments");
}
}
}
@@ -0,0 +1,49 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace OmsorgCore.Infrastructure.Persistence.Migrations
{
/// <inheritdoc />
public partial class AddAssignmentValidationSettingsAndBlocksAssignmentFlag : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "BlocksAssignment",
table: "value_list_items",
type: "boolean",
nullable: false,
defaultValue: false);
migrationBuilder.CreateTable(
name: "assignment_validation_settings",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
QualificationMode = table.Column<int>(type: "integer", nullable: false),
AbsenceMode = table.Column<int>(type: "integer", nullable: false),
WorkingHoursMode = table.Column<int>(type: "integer", nullable: false),
OverlapMode = table.Column<int>(type: "integer", nullable: false),
ContractMode = table.Column<int>(type: "integer", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_assignment_validation_settings", x => x.Id);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "assignment_validation_settings");
migrationBuilder.DropColumn(
name: "BlocksAssignment",
table: "value_list_items");
}
}
}
@@ -82,6 +82,75 @@ namespace OmsorgCore.Infrastructure.Persistence.Migrations
b.ToTable("absences", (string)null);
});
modelBuilder.Entity("OmsorgCore.Domain.Entities.Assignment", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<DateTime?>("DeletedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("EmployeeId")
.HasColumnType("uuid");
b.Property<DateOnly>("EndDate")
.HasColumnType("date");
b.Property<bool>("IsDeleted")
.HasColumnType("boolean");
b.Property<string>("Note")
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<Guid>("OrderId")
.HasColumnType("uuid");
b.Property<DateOnly>("StartDate")
.HasColumnType("date");
b.Property<DateTime?>("UpdatedAt")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("EmployeeId");
b.HasIndex("OrderId");
b.ToTable("assignments", (string)null);
});
modelBuilder.Entity("OmsorgCore.Domain.Entities.AssignmentValidationSettings", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<int>("AbsenceMode")
.HasColumnType("integer");
b.Property<int>("ContractMode")
.HasColumnType("integer");
b.Property<int>("OverlapMode")
.HasColumnType("integer");
b.Property<int>("QualificationMode")
.HasColumnType("integer");
b.Property<int>("WorkingHoursMode")
.HasColumnType("integer");
b.HasKey("Id");
b.ToTable("assignment_validation_settings", (string)null);
});
modelBuilder.Entity("OmsorgCore.Domain.Entities.AuditLogEntry", b =>
{
b.Property<Guid>("Id")
@@ -1064,6 +1133,9 @@ namespace OmsorgCore.Infrastructure.Persistence.Migrations
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<bool>("BlocksAssignment")
.HasColumnType("boolean");
b.Property<bool>("IsDefault")
.HasColumnType("boolean");
@@ -1136,6 +1208,25 @@ namespace OmsorgCore.Infrastructure.Persistence.Migrations
b.Navigation("Employee");
});
modelBuilder.Entity("OmsorgCore.Domain.Entities.Assignment", b =>
{
b.HasOne("OmsorgCore.Domain.Entities.Employee", "Employee")
.WithMany()
.HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("OmsorgCore.Domain.Entities.Order", "Order")
.WithMany()
.HasForeignKey("OrderId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Employee");
b.Navigation("Order");
});
modelBuilder.Entity("OmsorgCore.Domain.Entities.Contract", b =>
{
b.HasOne("OmsorgCore.Domain.Entities.Employee", "Employee")
@@ -16,7 +16,9 @@ public class OmsorgCoreDbContext : DbContext
public DbSet<EmployeeFacilityDistance> EmployeeFacilityDistances => Set<EmployeeFacilityDistance>();
public DbSet<Contract> Contracts => Set<Contract>();
public DbSet<Order> Orders => Set<Order>();
public DbSet<Assignment> Assignments => Set<Assignment>();
public DbSet<Absence> Absences => Set<Absence>();
public DbSet<AssignmentValidationSettings> AssignmentValidationSettings => Set<AssignmentValidationSettings>();
public DbSet<ValueList> ValueLists => Set<ValueList>();
public DbSet<ValueListItem> ValueListItems => Set<ValueListItem>();
public DbSet<ValueListItemTransition> ValueListItemTransitions => Set<ValueListItemTransition>();
@@ -58,6 +58,25 @@ public class AbsenceRepository : IAbsenceRepository
return (items, totalCount);
}
public async Task<bool> HasOverlappingAbsenceAsync(
Guid employeeId,
DateOnly startDate,
DateOnly endDate,
IReadOnlyCollection<string> blockingStatusValues,
CancellationToken cancellationToken = default)
{
if (blockingStatusValues.Count == 0)
{
return false;
}
return await _db.Absences
.Where(a => a.EmployeeId == employeeId && !a.IsDeleted)
.Where(a => blockingStatusValues.Contains(a.Status))
.Where(a => a.StartDate <= endDate && a.EndDate >= startDate)
.AnyAsync(cancellationToken);
}
public async Task AddAsync(Absence absence, CancellationToken cancellationToken = default)
=> await _db.Absences.AddAsync(absence, cancellationToken);
@@ -0,0 +1,164 @@
using Microsoft.EntityFrameworkCore;
using OmsorgCore.Application.Abstractions;
using OmsorgCore.Domain.Entities;
using OmsorgCore.Infrastructure.Persistence;
namespace OmsorgCore.Infrastructure.Repositories;
public class AssignmentRepository : IAssignmentRepository
{
private readonly OmsorgCoreDbContext _db;
public AssignmentRepository(OmsorgCoreDbContext db)
{
_db = db;
}
public Task<Assignment?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default)
=> _db.Assignments.Include(a => a.Employee).FirstOrDefaultAsync(a => a.Id == id, cancellationToken);
public async Task<IReadOnlyList<Assignment>> GetAllAsync(CancellationToken cancellationToken = default)
=> await _db.Assignments.AsNoTracking().Include(a => a.Employee).ToListAsync(cancellationToken);
public async Task<(IReadOnlyList<Assignment> Items, int TotalCount)> GetPagedAsync(
Guid? orderId = null,
Guid? employeeId = null,
DateOnly? fromDate = null,
DateOnly? toDate = null,
int page = 1,
int pageSize = 20,
CancellationToken cancellationToken = default)
{
var query = _db.Assignments.AsNoTracking().Include(a => a.Employee).Where(a => !a.IsDeleted);
if (orderId.HasValue)
{
query = query.Where(a => a.OrderId == orderId.Value);
}
if (employeeId.HasValue)
{
query = query.Where(a => a.EmployeeId == employeeId.Value);
}
if (fromDate.HasValue && toDate.HasValue)
{
query = query.Where(a => a.StartDate <= toDate.Value && a.EndDate >= fromDate.Value);
}
var totalCount = await query.CountAsync(cancellationToken);
var items = await query
.OrderBy(a => a.StartDate)
.Skip((page - 1) * pageSize)
.Take(pageSize)
.ToListAsync(cancellationToken);
return (items, totalCount);
}
public async Task<bool> HasOverlapAsync(
Guid employeeId,
DateOnly startDate,
DateOnly endDate,
Guid? excludeAssignmentId = null,
CancellationToken cancellationToken = default)
{
var query = _db.Assignments
.Where(a => a.EmployeeId == employeeId && !a.IsDeleted)
.Where(a => a.StartDate <= endDate && a.EndDate >= startDate);
if (excludeAssignmentId.HasValue)
{
query = query.Where(a => a.Id != excludeAssignmentId.Value);
}
return await query.AnyAsync(cancellationToken);
}
public async Task<int> GetAssignedDayCountInWeekAsync(
Guid employeeId,
DateOnly weekStart,
DateOnly weekEnd,
Guid? excludeAssignmentId = null,
CancellationToken cancellationToken = default)
{
var query = _db.Assignments
.Where(a => a.EmployeeId == employeeId && !a.IsDeleted)
.Where(a => a.StartDate <= weekEnd && a.EndDate >= weekStart);
if (excludeAssignmentId.HasValue)
{
query = query.Where(a => a.Id != excludeAssignmentId.Value);
}
var overlapping = await query
.Select(a => new { a.StartDate, a.EndDate })
.ToListAsync(cancellationToken);
var days = 0;
foreach (var a in overlapping)
{
var rangeStart = a.StartDate > weekStart ? a.StartDate : weekStart;
var rangeEnd = a.EndDate < weekEnd ? a.EndDate : weekEnd;
days += rangeEnd.DayNumber - rangeStart.DayNumber + 1;
}
return days;
}
public async Task<int> CountForOrderAsync(Guid orderId, CancellationToken cancellationToken = default)
=> await _db.Assignments.CountAsync(a => a.OrderId == orderId && !a.IsDeleted, cancellationToken);
public async Task AddAsync(Assignment assignment, CancellationToken cancellationToken = default)
=> await _db.Assignments.AddAsync(assignment, cancellationToken);
public Task UpdateAsync(Assignment assignment, CancellationToken cancellationToken = default)
{
_db.Assignments.Update(assignment);
return Task.CompletedTask;
}
public async Task<bool> SoftDeleteAsync(Guid id, CancellationToken cancellationToken = default)
{
var assignment = await _db.Assignments.FirstOrDefaultAsync(a => a.Id == id, cancellationToken);
if (assignment is null)
{
return false;
}
assignment.IsDeleted = true;
assignment.DeletedAt = DateTime.UtcNow;
return true;
}
public async Task<IReadOnlyList<Assignment>> GetDeletedAsync(string? search, CancellationToken cancellationToken = default)
{
var query = _db.Assignments.IgnoreQueryFilters().AsNoTracking().Include(a => a.Employee).Where(a => a.IsDeleted);
if (!string.IsNullOrWhiteSpace(search))
{
query = query.Where(a =>
EF.Functions.ILike(a.Employee.FirstName, $"%{search}%") ||
EF.Functions.ILike(a.Employee.LastName, $"%{search}%"));
}
return await query.OrderByDescending(a => a.DeletedAt).ToListAsync(cancellationToken);
}
public async Task<bool> RestoreAsync(Guid id, CancellationToken cancellationToken = default)
{
var assignment = await _db.Assignments.IgnoreQueryFilters().FirstOrDefaultAsync(a => a.Id == id && a.IsDeleted, cancellationToken);
if (assignment is null)
{
return false;
}
assignment.IsDeleted = false;
assignment.DeletedAt = null;
return true;
}
public Task SaveChangesAsync(CancellationToken cancellationToken = default)
=> _db.SaveChangesAsync(cancellationToken);
}
@@ -0,0 +1,39 @@
using Microsoft.EntityFrameworkCore;
using OmsorgCore.Application.Abstractions;
using OmsorgCore.Domain.Entities;
using OmsorgCore.Infrastructure.Persistence;
namespace OmsorgCore.Infrastructure.Repositories;
public class AssignmentValidationSettingsRepository : IAssignmentValidationSettingsRepository
{
private readonly OmsorgCoreDbContext _db;
public AssignmentValidationSettingsRepository(OmsorgCoreDbContext db)
{
_db = db;
}
public async Task<AssignmentValidationSettings> GetOrCreateAsync(CancellationToken cancellationToken = default)
{
var settings = await _db.AssignmentValidationSettings.FirstOrDefaultAsync(cancellationToken);
if (settings is not null)
{
return settings;
}
settings = new AssignmentValidationSettings();
await _db.AssignmentValidationSettings.AddAsync(settings, cancellationToken);
await _db.SaveChangesAsync(cancellationToken);
return settings;
}
public Task UpdateAsync(AssignmentValidationSettings settings, CancellationToken cancellationToken = default)
{
_db.AssignmentValidationSettings.Update(settings);
return Task.CompletedTask;
}
public Task SaveChangesAsync(CancellationToken cancellationToken = default)
=> _db.SaveChangesAsync(cancellationToken);
}
@@ -63,6 +63,16 @@ public class ContractRepository : IContractRepository
return (items, totalCount);
}
public Task<Contract?> GetActiveForEmployeeCoveringRangeAsync(
Guid employeeId,
DateOnly startDate,
DateOnly endDate,
CancellationToken cancellationToken = default)
=> _db.Contracts
.Where(c => !c.IsDeleted && c.EmployeeId == employeeId && c.Status != "Entwurf")
.Where(c => c.StartDate <= startDate && (c.EndDate == null || c.EndDate >= endDate))
.FirstOrDefaultAsync(cancellationToken);
public async Task AddAsync(Contract contract, CancellationToken cancellationToken = default)
=> await _db.Contracts.AddAsync(contract, cancellationToken);
@@ -492,6 +492,15 @@ public class FakeContractRepository : IContractRepository
return Task.FromResult<(IReadOnlyList<Contract> Items, int TotalCount)>((items, totalCount));
}
public Task<Contract?> GetActiveForEmployeeCoveringRangeAsync(
Guid employeeId,
DateOnly startDate,
DateOnly endDate,
CancellationToken cancellationToken = default)
=> Task.FromResult(_contracts.FirstOrDefault(c =>
!c.IsDeleted && c.EmployeeId == employeeId && c.Status != "Entwurf" &&
c.StartDate <= startDate && (c.EndDate == null || c.EndDate >= endDate)));
public Task AddAsync(Contract contract, CancellationToken cancellationToken = default)
{
_contracts.Add(contract);
+20 -14
View File
@@ -31,21 +31,27 @@ html{scroll-behavior:smooth;background:#031522;overflow-x:hidden}
body{
margin:0;min-height:100vh;color:var(--text);
font-family:'Visby',Arial,Helvetica,sans-serif;line-height:1.45;
background:#031522 url('assets/omsorg-bg-full.png') center top/cover fixed no-repeat;
background:
radial-gradient(
circle at 15% 10%,
rgba(16, 215, 230, 0.22),
transparent 33%
),
radial-gradient(
circle at 85% 85%,
rgba(18, 88, 99, 0.32),
transparent 38%
),
linear-gradient(
135deg,
#031522 0%,
#032a36 38%,
#0a3a47 68%,
#031522 100%
);
background-attachment:fixed;
overflow-x:hidden;
}
body::before{
content:"";position:fixed;inset:0;z-index:-2;
background:linear-gradient(180deg,rgba(0,9,23,.08),rgba(0,9,23,.28) 58%,rgba(0,9,23,.52));
pointer-events:none;
}
body::after{
content:"";position:fixed;inset:0;z-index:-1;opacity:.35;
background-image:radial-gradient(circle,rgba(0,216,230,.75) 0 2px,transparent 3px);
background-size:24px 24px;
mask-image:radial-gradient(circle at 0% 34%,#000 0 0,transparent 18%),
radial-gradient(circle at 100% 88%,#000 0 0,transparent 17%);
pointer-events:none;
-webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
@@ -1,12 +1,7 @@
# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore
composer.phar
# vendor/ ist bewusst NICHT ausgeschlossen (Standard-Composer-.gitignore normalerweise schon) -
# dieser generierte Client wird ohne composer install deployt/containerisiert, siehe
# omsorgCore/CLAUDE.md "Generierte API-Clients". Nach jedem `generate.sh`-Lauf wird diese Datei
# vom Generator überschrieben, diese Zeile muss dann jedes Mal erneut entfernt werden (git diff
# prüfen, analog zum generate-Script in omsorgapp/api-client-ts/package.json).
/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
@@ -6,6 +6,8 @@ composer.json
docs/Api/AbsencesApi.md
docs/Api/AdminEmailApi.md
docs/Api/AdminSessionsApi.md
docs/Api/AssignmentValidationSettingsApi.md
docs/Api/AssignmentsApi.md
docs/Api/AuditLogApi.md
docs/Api/AuthApi.md
docs/Api/ContractsApi.md
@@ -27,6 +29,10 @@ docs/Model/AbsenceDecisionRequest.md
docs/Model/AbsenceResponse.md
docs/Model/AbsenceResponsePagedResponse.md
docs/Model/AddUserPermissionOverrideRequest.md
docs/Model/AssignmentConflictResponse.md
docs/Model/AssignmentResponse.md
docs/Model/AssignmentResponsePagedResponse.md
docs/Model/AssignmentValidationSettingsResponse.md
docs/Model/AuditEventCategory.md
docs/Model/AuditLogEntryResponse.md
docs/Model/AuditLogEntryResponsePagedResponse.md
@@ -34,6 +40,7 @@ docs/Model/ChangePasswordRequest.md
docs/Model/ContractResponse.md
docs/Model/ContractResponsePagedResponse.md
docs/Model/CreateAbsenceRequest.md
docs/Model/CreateAssignmentRequest.md
docs/Model/CreateContractRequest.md
docs/Model/CreateEmployeeFacilityDistanceRequest.md
docs/Model/CreateEmployeeRequest.md
@@ -84,6 +91,7 @@ docs/Model/TimeEntryDecisionRequest.md
docs/Model/TimeEntryResponse.md
docs/Model/TimeEntryResponsePagedResponse.md
docs/Model/TrashAbsenceResponse.md
docs/Model/TrashAssignmentResponse.md
docs/Model/TrashContractResponse.md
docs/Model/TrashEmployeeFacilityDistanceResponse.md
docs/Model/TrashEmployeeResponse.md
@@ -93,6 +101,8 @@ docs/Model/TrashFacilityResponse.md
docs/Model/TrashOrderResponse.md
docs/Model/TrashTimeEntryResponse.md
docs/Model/UpdateAbsenceRequest.md
docs/Model/UpdateAssignmentRequest.md
docs/Model/UpdateAssignmentValidationSettingsRequest.md
docs/Model/UpdateContractRequest.md
docs/Model/UpdateDocumentRequest.md
docs/Model/UpdateEmployeeFacilityDistanceRequest.md
@@ -117,6 +127,8 @@ git_push.sh
lib/Api/AbsencesApi.php
lib/Api/AdminEmailApi.php
lib/Api/AdminSessionsApi.php
lib/Api/AssignmentValidationSettingsApi.php
lib/Api/AssignmentsApi.php
lib/Api/AuditLogApi.php
lib/Api/AuthApi.php
lib/Api/ContractsApi.php
@@ -142,6 +154,10 @@ lib/Model/AbsenceDecisionRequest.php
lib/Model/AbsenceResponse.php
lib/Model/AbsenceResponsePagedResponse.php
lib/Model/AddUserPermissionOverrideRequest.php
lib/Model/AssignmentConflictResponse.php
lib/Model/AssignmentResponse.php
lib/Model/AssignmentResponsePagedResponse.php
lib/Model/AssignmentValidationSettingsResponse.php
lib/Model/AuditEventCategory.php
lib/Model/AuditLogEntryResponse.php
lib/Model/AuditLogEntryResponsePagedResponse.php
@@ -149,6 +165,7 @@ lib/Model/ChangePasswordRequest.php
lib/Model/ContractResponse.php
lib/Model/ContractResponsePagedResponse.php
lib/Model/CreateAbsenceRequest.php
lib/Model/CreateAssignmentRequest.php
lib/Model/CreateContractRequest.php
lib/Model/CreateEmployeeFacilityDistanceRequest.php
lib/Model/CreateEmployeeRequest.php
@@ -200,6 +217,7 @@ lib/Model/TimeEntryDecisionRequest.php
lib/Model/TimeEntryResponse.php
lib/Model/TimeEntryResponsePagedResponse.php
lib/Model/TrashAbsenceResponse.php
lib/Model/TrashAssignmentResponse.php
lib/Model/TrashContractResponse.php
lib/Model/TrashEmployeeFacilityDistanceResponse.php
lib/Model/TrashEmployeeResponse.php
@@ -209,6 +227,8 @@ lib/Model/TrashFacilityResponse.php
lib/Model/TrashOrderResponse.php
lib/Model/TrashTimeEntryResponse.php
lib/Model/UpdateAbsenceRequest.php
lib/Model/UpdateAssignmentRequest.php
lib/Model/UpdateAssignmentValidationSettingsRequest.php
lib/Model/UpdateContractRequest.php
lib/Model/UpdateDocumentRequest.php
lib/Model/UpdateEmployeeFacilityDistanceRequest.php
@@ -90,6 +90,14 @@ Class | Method | HTTP request | Description
*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 |
*AssignmentValidationSettingsApi* | [**apiSettingsAssignmentValidationGet**](docs/Api/AssignmentValidationSettingsApi.md#apisettingsassignmentvalidationget) | **GET** /api/settings/assignment-validation |
*AssignmentValidationSettingsApi* | [**apiSettingsAssignmentValidationPut**](docs/Api/AssignmentValidationSettingsApi.md#apisettingsassignmentvalidationput) | **PUT** /api/settings/assignment-validation |
*AssignmentsApi* | [**apiAssignmentsCheckGet**](docs/Api/AssignmentsApi.md#apiassignmentscheckget) | **GET** /api/assignments/check |
*AssignmentsApi* | [**apiAssignmentsGet**](docs/Api/AssignmentsApi.md#apiassignmentsget) | **GET** /api/assignments |
*AssignmentsApi* | [**apiAssignmentsIdDelete**](docs/Api/AssignmentsApi.md#apiassignmentsiddelete) | **DELETE** /api/assignments/{id} |
*AssignmentsApi* | [**apiAssignmentsIdGet**](docs/Api/AssignmentsApi.md#apiassignmentsidget) | **GET** /api/assignments/{id} |
*AssignmentsApi* | [**apiAssignmentsIdPut**](docs/Api/AssignmentsApi.md#apiassignmentsidput) | **PUT** /api/assignments/{id} |
*AssignmentsApi* | [**apiAssignmentsPost**](docs/Api/AssignmentsApi.md#apiassignmentspost) | **POST** /api/assignments |
*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 |
@@ -156,6 +164,8 @@ Class | Method | HTTP request | Description
*TimeEntriesApi* | [**apiTimeEntriesPost**](docs/Api/TimeEntriesApi.md#apitimeentriespost) | **POST** /api/time-entries |
*TrashApi* | [**apiTrashAbsencesGet**](docs/Api/TrashApi.md#apitrashabsencesget) | **GET** /api/trash/absences |
*TrashApi* | [**apiTrashAbsencesIdRestorePost**](docs/Api/TrashApi.md#apitrashabsencesidrestorepost) | **POST** /api/trash/absences/{id}/restore |
*TrashApi* | [**apiTrashAssignmentsGet**](docs/Api/TrashApi.md#apitrashassignmentsget) | **GET** /api/trash/assignments |
*TrashApi* | [**apiTrashAssignmentsIdRestorePost**](docs/Api/TrashApi.md#apitrashassignmentsidrestorepost) | **POST** /api/trash/assignments/{id}/restore |
*TrashApi* | [**apiTrashContractsGet**](docs/Api/TrashApi.md#apitrashcontractsget) | **GET** /api/trash/contracts |
*TrashApi* | [**apiTrashContractsIdRestorePost**](docs/Api/TrashApi.md#apitrashcontractsidrestorepost) | **POST** /api/trash/contracts/{id}/restore |
*TrashApi* | [**apiTrashEmployeeFacilityDistancesGet**](docs/Api/TrashApi.md#apitrashemployeefacilitydistancesget) | **GET** /api/trash/employee-facility-distances |
@@ -194,6 +204,10 @@ Class | Method | HTTP request | Description
- [AbsenceResponse](docs/Model/AbsenceResponse.md)
- [AbsenceResponsePagedResponse](docs/Model/AbsenceResponsePagedResponse.md)
- [AddUserPermissionOverrideRequest](docs/Model/AddUserPermissionOverrideRequest.md)
- [AssignmentConflictResponse](docs/Model/AssignmentConflictResponse.md)
- [AssignmentResponse](docs/Model/AssignmentResponse.md)
- [AssignmentResponsePagedResponse](docs/Model/AssignmentResponsePagedResponse.md)
- [AssignmentValidationSettingsResponse](docs/Model/AssignmentValidationSettingsResponse.md)
- [AuditEventCategory](docs/Model/AuditEventCategory.md)
- [AuditLogEntryResponse](docs/Model/AuditLogEntryResponse.md)
- [AuditLogEntryResponsePagedResponse](docs/Model/AuditLogEntryResponsePagedResponse.md)
@@ -201,6 +215,7 @@ Class | Method | HTTP request | Description
- [ContractResponse](docs/Model/ContractResponse.md)
- [ContractResponsePagedResponse](docs/Model/ContractResponsePagedResponse.md)
- [CreateAbsenceRequest](docs/Model/CreateAbsenceRequest.md)
- [CreateAssignmentRequest](docs/Model/CreateAssignmentRequest.md)
- [CreateContractRequest](docs/Model/CreateContractRequest.md)
- [CreateEmployeeFacilityDistanceRequest](docs/Model/CreateEmployeeFacilityDistanceRequest.md)
- [CreateEmployeeRequest](docs/Model/CreateEmployeeRequest.md)
@@ -251,6 +266,7 @@ Class | Method | HTTP request | Description
- [TimeEntryResponse](docs/Model/TimeEntryResponse.md)
- [TimeEntryResponsePagedResponse](docs/Model/TimeEntryResponsePagedResponse.md)
- [TrashAbsenceResponse](docs/Model/TrashAbsenceResponse.md)
- [TrashAssignmentResponse](docs/Model/TrashAssignmentResponse.md)
- [TrashContractResponse](docs/Model/TrashContractResponse.md)
- [TrashEmployeeFacilityDistanceResponse](docs/Model/TrashEmployeeFacilityDistanceResponse.md)
- [TrashEmployeeResponse](docs/Model/TrashEmployeeResponse.md)
@@ -260,6 +276,8 @@ Class | Method | HTTP request | Description
- [TrashOrderResponse](docs/Model/TrashOrderResponse.md)
- [TrashTimeEntryResponse](docs/Model/TrashTimeEntryResponse.md)
- [UpdateAbsenceRequest](docs/Model/UpdateAbsenceRequest.md)
- [UpdateAssignmentRequest](docs/Model/UpdateAssignmentRequest.md)
- [UpdateAssignmentValidationSettingsRequest](docs/Model/UpdateAssignmentValidationSettingsRequest.md)
- [UpdateContractRequest](docs/Model/UpdateContractRequest.md)
- [UpdateDocumentRequest](docs/Model/UpdateDocumentRequest.md)
- [UpdateEmployeeFacilityDistanceRequest](docs/Model/UpdateEmployeeFacilityDistanceRequest.md)
@@ -0,0 +1,122 @@
# OmsorgCoreClient\AssignmentValidationSettingsApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiSettingsAssignmentValidationGet()**](AssignmentValidationSettingsApi.md#apiSettingsAssignmentValidationGet) | **GET** /api/settings/assignment-validation | |
| [**apiSettingsAssignmentValidationPut()**](AssignmentValidationSettingsApi.md#apiSettingsAssignmentValidationPut) | **PUT** /api/settings/assignment-validation | |
## `apiSettingsAssignmentValidationGet()`
```php
apiSettingsAssignmentValidationGet(): \OmsorgCoreClient\Model\AssignmentValidationSettingsResponse
```
### 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\AssignmentValidationSettingsApi(
// 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->apiSettingsAssignmentValidationGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentValidationSettingsApi->apiSettingsAssignmentValidationGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\OmsorgCoreClient\Model\AssignmentValidationSettingsResponse**](../Model/AssignmentValidationSettingsResponse.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)
## `apiSettingsAssignmentValidationPut()`
```php
apiSettingsAssignmentValidationPut($update_assignment_validation_settings_request): \OmsorgCoreClient\Model\AssignmentValidationSettingsResponse
```
### 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\AssignmentValidationSettingsApi(
// 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
);
$update_assignment_validation_settings_request = new \OmsorgCoreClient\Model\UpdateAssignmentValidationSettingsRequest(); // \OmsorgCoreClient\Model\UpdateAssignmentValidationSettingsRequest
try {
$result = $apiInstance->apiSettingsAssignmentValidationPut($update_assignment_validation_settings_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentValidationSettingsApi->apiSettingsAssignmentValidationPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **update_assignment_validation_settings_request** | [**\OmsorgCoreClient\Model\UpdateAssignmentValidationSettingsRequest**](../Model/UpdateAssignmentValidationSettingsRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\AssignmentValidationSettingsResponse**](../Model/AssignmentValidationSettingsResponse.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,380 @@
# OmsorgCoreClient\AssignmentsApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiAssignmentsCheckGet()**](AssignmentsApi.md#apiAssignmentsCheckGet) | **GET** /api/assignments/check | |
| [**apiAssignmentsGet()**](AssignmentsApi.md#apiAssignmentsGet) | **GET** /api/assignments | |
| [**apiAssignmentsIdDelete()**](AssignmentsApi.md#apiAssignmentsIdDelete) | **DELETE** /api/assignments/{id} | |
| [**apiAssignmentsIdGet()**](AssignmentsApi.md#apiAssignmentsIdGet) | **GET** /api/assignments/{id} | |
| [**apiAssignmentsIdPut()**](AssignmentsApi.md#apiAssignmentsIdPut) | **PUT** /api/assignments/{id} | |
| [**apiAssignmentsPost()**](AssignmentsApi.md#apiAssignmentsPost) | **POST** /api/assignments | |
## `apiAssignmentsCheckGet()`
```php
apiAssignmentsCheckGet($order_id, $employee_id, $start_date, $end_date, $exclude_assignment_id): \OmsorgCoreClient\Model\AssignmentConflictResponse[]
```
### 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\AssignmentsApi(
// 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
);
$order_id = 'order_id_example'; // string
$employee_id = 'employee_id_example'; // string
$start_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$end_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$exclude_assignment_id = 'exclude_assignment_id_example'; // string
try {
$result = $apiInstance->apiAssignmentsCheckGet($order_id, $employee_id, $start_date, $end_date, $exclude_assignment_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsCheckGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **order_id** | **string**| | [optional] |
| **employee_id** | **string**| | [optional] |
| **start_date** | **\DateTime**| | [optional] |
| **end_date** | **\DateTime**| | [optional] |
| **exclude_assignment_id** | **string**| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\AssignmentConflictResponse[]**](../Model/AssignmentConflictResponse.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)
## `apiAssignmentsGet()`
```php
apiAssignmentsGet($order_id, $employee_id, $from_date, $to_date, $page, $page_size): \OmsorgCoreClient\Model\AssignmentResponsePagedResponse
```
### 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\AssignmentsApi(
// 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
);
$order_id = 'order_id_example'; // string
$employee_id = 'employee_id_example'; // string
$from_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$to_date = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime
$page = 1; // int
$page_size = 20; // int
try {
$result = $apiInstance->apiAssignmentsGet($order_id, $employee_id, $from_date, $to_date, $page, $page_size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **order_id** | **string**| | [optional] |
| **employee_id** | **string**| | [optional] |
| **from_date** | **\DateTime**| | [optional] |
| **to_date** | **\DateTime**| | [optional] |
| **page** | **int**| | [optional] [default to 1] |
| **page_size** | **int**| | [optional] [default to 20] |
### Return type
[**\OmsorgCoreClient\Model\AssignmentResponsePagedResponse**](../Model/AssignmentResponsePagedResponse.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)
## `apiAssignmentsIdDelete()`
```php
apiAssignmentsIdDelete($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\AssignmentsApi(
// 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->apiAssignmentsIdDelete($id);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsIdDelete: ', $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)
## `apiAssignmentsIdGet()`
```php
apiAssignmentsIdGet($id): \OmsorgCoreClient\Model\AssignmentResponse
```
### 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\AssignmentsApi(
// 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->apiAssignmentsIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsIdGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
### Return type
[**\OmsorgCoreClient\Model\AssignmentResponse**](../Model/AssignmentResponse.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)
## `apiAssignmentsIdPut()`
```php
apiAssignmentsIdPut($id, $update_assignment_request): \OmsorgCoreClient\Model\AssignmentResponse
```
### 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\AssignmentsApi(
// 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_assignment_request = new \OmsorgCoreClient\Model\UpdateAssignmentRequest(); // \OmsorgCoreClient\Model\UpdateAssignmentRequest
try {
$result = $apiInstance->apiAssignmentsIdPut($id, $update_assignment_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsIdPut: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **string**| | |
| **update_assignment_request** | [**\OmsorgCoreClient\Model\UpdateAssignmentRequest**](../Model/UpdateAssignmentRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\AssignmentResponse**](../Model/AssignmentResponse.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)
## `apiAssignmentsPost()`
```php
apiAssignmentsPost($create_assignment_request): \OmsorgCoreClient\Model\AssignmentResponse
```
### 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\AssignmentsApi(
// 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_assignment_request = new \OmsorgCoreClient\Model\CreateAssignmentRequest(); // \OmsorgCoreClient\Model\CreateAssignmentRequest
try {
$result = $apiInstance->apiAssignmentsPost($create_assignment_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AssignmentsApi->apiAssignmentsPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **create_assignment_request** | [**\OmsorgCoreClient\Model\CreateAssignmentRequest**](../Model/CreateAssignmentRequest.md)| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\AssignmentResponse**](../Model/AssignmentResponse.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)
@@ -6,6 +6,8 @@ All URIs are relative to http://localhost, except if the operation defines anoth
| ------------- | ------------- | ------------- |
| [**apiTrashAbsencesGet()**](TrashApi.md#apiTrashAbsencesGet) | **GET** /api/trash/absences | |
| [**apiTrashAbsencesIdRestorePost()**](TrashApi.md#apiTrashAbsencesIdRestorePost) | **POST** /api/trash/absences/{id}/restore | |
| [**apiTrashAssignmentsGet()**](TrashApi.md#apiTrashAssignmentsGet) | **GET** /api/trash/assignments | |
| [**apiTrashAssignmentsIdRestorePost()**](TrashApi.md#apiTrashAssignmentsIdRestorePost) | **POST** /api/trash/assignments/{id}/restore | |
| [**apiTrashContractsGet()**](TrashApi.md#apiTrashContractsGet) | **GET** /api/trash/contracts | |
| [**apiTrashContractsIdRestorePost()**](TrashApi.md#apiTrashContractsIdRestorePost) | **POST** /api/trash/contracts/{id}/restore | |
| [**apiTrashEmployeeFacilityDistancesGet()**](TrashApi.md#apiTrashEmployeeFacilityDistancesGet) | **GET** /api/trash/employee-facility-distances | |
@@ -139,6 +141,121 @@ void (empty response body)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiTrashAssignmentsGet()`
```php
apiTrashAssignmentsGet($search): \OmsorgCoreClient\Model\TrashAssignmentResponse[]
```
### 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\TrashApi(
// 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
try {
$result = $apiInstance->apiTrashAssignmentsGet($search);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling TrashApi->apiTrashAssignmentsGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **search** | **string**| | [optional] |
### Return type
[**\OmsorgCoreClient\Model\TrashAssignmentResponse[]**](../Model/TrashAssignmentResponse.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)
## `apiTrashAssignmentsIdRestorePost()`
```php
apiTrashAssignmentsIdRestorePost($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\TrashApi(
// 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->apiTrashAssignmentsIdRestorePost($id);
} catch (Exception $e) {
echo 'Exception when calling TrashApi->apiTrashAssignmentsIdRestorePost: ', $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)
## `apiTrashContractsGet()`
```php
@@ -0,0 +1,11 @@
# # AssignmentConflictResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **string** | | [optional]
**severity** | **string** | | [optional]
**message** | **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 @@
# # AssignmentResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**order_id** | **string** | | [optional]
**employee_id** | **string** | | [optional]
**employee_first_name** | **string** | | [optional]
**employee_last_name** | **string** | | [optional]
**start_date** | **\DateTime** | | [optional]
**end_date** | **\DateTime** | | [optional]
**note** | **string** | | [optional]
**conflicts** | [**\OmsorgCoreClient\Model\AssignmentConflictResponse[]**](AssignmentConflictResponse.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,12 @@
# # AssignmentResponsePagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**items** | [**\OmsorgCoreClient\Model\AssignmentResponse[]**](AssignmentResponse.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,13 @@
# # AssignmentValidationSettingsResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**qualification_mode** | **string** | | [optional]
**absence_mode** | **string** | | [optional]
**working_hours_mode** | **string** | | [optional]
**overlap_mode** | **string** | | [optional]
**contract_mode** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,13 @@
# # CreateAssignmentRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**order_id** | **string** | | [optional]
**employee_id** | **string** | | [optional]
**start_date** | **\DateTime** | | [optional]
**end_date** | **\DateTime** | | [optional]
**note** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **string** | | [optional]
**crm_status** | **string** | | [optional]
**facility_type** | **string** | | [optional]
**website** | **string** | | [optional]
**street** | **string** | | [optional]
@@ -15,5 +16,19 @@ Name | Type | Description | Notes
**billing_postal_code** | **string** | | [optional]
**billing_city** | **string** | | [optional]
**billing_country** | **string** | | [optional]
**follow_up_days** | **int** | | [optional]
**billing_rate** | **float** | | [optional]
**night_surcharge_percent** | **float** | | [optional]
**saturday_surcharge_percent** | **float** | | [optional]
**sunday_surcharge_percent** | **float** | | [optional]
**holiday_surcharge_percent** | **float** | | [optional]
**travel_cost_rate** | **float** | | [optional]
**travel_cost_mode** | **string** | | [optional]
**travel_cost_per_km** | **float** | | [optional]
**meal_allowance_rate** | **float** | | [optional]
**minimum_hours** | **float** | | [optional]
**billing_interval** | **string** | | [optional]
**payment_term_days** | **int** | | [optional]
**individual_agreements** | **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 @@
# # TrashAssignmentResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**employee_first_name** | **string** | | [optional]
**employee_last_name** | **string** | | [optional]
**deleted_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,9 @@
# # UpdateAssignmentRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**note** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,13 @@
# # UpdateAssignmentValidationSettingsRequest
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**qualification_mode** | **string** | | [optional]
**absence_mode** | **string** | | [optional]
**working_hours_mode** | **string** | | [optional]
**overlap_mode** | **string** | | [optional]
**contract_mode** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
@@ -0,0 +1,695 @@
<?php
/**
* AssignmentValidationSettingsApi
* 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;
/**
* AssignmentValidationSettingsApi Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AssignmentValidationSettingsApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @var int Host index
*/
protected $hostIndex;
/** @var string[] $contentTypes **/
public const contentTypes = [
'apiSettingsAssignmentValidationGet' => [
'application/json',
],
'apiSettingsAssignmentValidationPut' => [
'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 apiSettingsAssignmentValidationGet
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiSettingsAssignmentValidationGet'] 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\AssignmentValidationSettingsResponse
*/
public function apiSettingsAssignmentValidationGet(string $contentType = self::contentTypes['apiSettingsAssignmentValidationGet'][0])
{
list($response) = $this->apiSettingsAssignmentValidationGetWithHttpInfo($contentType);
return $response;
}
/**
* Operation apiSettingsAssignmentValidationGetWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiSettingsAssignmentValidationGet'] 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\AssignmentValidationSettingsResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiSettingsAssignmentValidationGetWithHttpInfo(string $contentType = self::contentTypes['apiSettingsAssignmentValidationGet'][0])
{
$request = $this->apiSettingsAssignmentValidationGetRequest($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\AssignmentValidationSettingsResponse',
$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\AssignmentValidationSettingsResponse',
$request,
$response,
);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\OmsorgCoreClient\Model\AssignmentValidationSettingsResponse',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
throw $e;
}
throw $e;
}
}
/**
* Operation apiSettingsAssignmentValidationGetAsync
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiSettingsAssignmentValidationGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiSettingsAssignmentValidationGetAsync(string $contentType = self::contentTypes['apiSettingsAssignmentValidationGet'][0])
{
return $this->apiSettingsAssignmentValidationGetAsyncWithHttpInfo($contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiSettingsAssignmentValidationGetAsyncWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiSettingsAssignmentValidationGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiSettingsAssignmentValidationGetAsyncWithHttpInfo(string $contentType = self::contentTypes['apiSettingsAssignmentValidationGet'][0])
{
$returnType = '\OmsorgCoreClient\Model\AssignmentValidationSettingsResponse';
$request = $this->apiSettingsAssignmentValidationGetRequest($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 'apiSettingsAssignmentValidationGet'
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiSettingsAssignmentValidationGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiSettingsAssignmentValidationGetRequest(string $contentType = self::contentTypes['apiSettingsAssignmentValidationGet'][0])
{
$resourcePath = '/api/settings/assignment-validation';
$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 apiSettingsAssignmentValidationPut
*
* @param \OmsorgCoreClient\Model\UpdateAssignmentValidationSettingsRequest|null $update_assignment_validation_settings_request update_assignment_validation_settings_request (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiSettingsAssignmentValidationPut'] 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\AssignmentValidationSettingsResponse
*/
public function apiSettingsAssignmentValidationPut($update_assignment_validation_settings_request = null, string $contentType = self::contentTypes['apiSettingsAssignmentValidationPut'][0])
{
list($response) = $this->apiSettingsAssignmentValidationPutWithHttpInfo($update_assignment_validation_settings_request, $contentType);
return $response;
}
/**
* Operation apiSettingsAssignmentValidationPutWithHttpInfo
*
* @param \OmsorgCoreClient\Model\UpdateAssignmentValidationSettingsRequest|null $update_assignment_validation_settings_request (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiSettingsAssignmentValidationPut'] 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\AssignmentValidationSettingsResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiSettingsAssignmentValidationPutWithHttpInfo($update_assignment_validation_settings_request = null, string $contentType = self::contentTypes['apiSettingsAssignmentValidationPut'][0])
{
$request = $this->apiSettingsAssignmentValidationPutRequest($update_assignment_validation_settings_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();
switch($statusCode) {
case 200:
return $this->handleResponseWithDataType(
'\OmsorgCoreClient\Model\AssignmentValidationSettingsResponse',
$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\AssignmentValidationSettingsResponse',
$request,
$response,
);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\OmsorgCoreClient\Model\AssignmentValidationSettingsResponse',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
throw $e;
}
throw $e;
}
}
/**
* Operation apiSettingsAssignmentValidationPutAsync
*
* @param \OmsorgCoreClient\Model\UpdateAssignmentValidationSettingsRequest|null $update_assignment_validation_settings_request (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiSettingsAssignmentValidationPut'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiSettingsAssignmentValidationPutAsync($update_assignment_validation_settings_request = null, string $contentType = self::contentTypes['apiSettingsAssignmentValidationPut'][0])
{
return $this->apiSettingsAssignmentValidationPutAsyncWithHttpInfo($update_assignment_validation_settings_request, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiSettingsAssignmentValidationPutAsyncWithHttpInfo
*
* @param \OmsorgCoreClient\Model\UpdateAssignmentValidationSettingsRequest|null $update_assignment_validation_settings_request (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiSettingsAssignmentValidationPut'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiSettingsAssignmentValidationPutAsyncWithHttpInfo($update_assignment_validation_settings_request = null, string $contentType = self::contentTypes['apiSettingsAssignmentValidationPut'][0])
{
$returnType = '\OmsorgCoreClient\Model\AssignmentValidationSettingsResponse';
$request = $this->apiSettingsAssignmentValidationPutRequest($update_assignment_validation_settings_request, $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 'apiSettingsAssignmentValidationPut'
*
* @param \OmsorgCoreClient\Model\UpdateAssignmentValidationSettingsRequest|null $update_assignment_validation_settings_request (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiSettingsAssignmentValidationPut'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiSettingsAssignmentValidationPutRequest($update_assignment_validation_settings_request = null, string $contentType = self::contentTypes['apiSettingsAssignmentValidationPut'][0])
{
$resourcePath = '/api/settings/assignment-validation';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$headers = $this->headerSelector->selectHeaders(
['text/plain', 'application/json', 'text/json', ],
$contentType,
$multipart
);
// for model (json/xml)
if (isset($update_assignment_validation_settings_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($update_assignment_validation_settings_request));
} else {
$httpBody = $update_assignment_validation_settings_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(
'PUT',
$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
@@ -80,6 +80,12 @@ class TrashApi
'apiTrashAbsencesIdRestorePost' => [
'application/json',
],
'apiTrashAssignmentsGet' => [
'application/json',
],
'apiTrashAssignmentsIdRestorePost' => [
'application/json',
],
'apiTrashContractsGet' => [
'application/json',
],
@@ -582,6 +588,479 @@ class TrashApi
// 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 apiTrashAssignmentsGet
*
* @param string|null $search search (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashAssignmentsGet'] 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\TrashAssignmentResponse[]
*/
public function apiTrashAssignmentsGet($search = null, string $contentType = self::contentTypes['apiTrashAssignmentsGet'][0])
{
list($response) = $this->apiTrashAssignmentsGetWithHttpInfo($search, $contentType);
return $response;
}
/**
* Operation apiTrashAssignmentsGetWithHttpInfo
*
* @param string|null $search (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashAssignmentsGet'] 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\TrashAssignmentResponse[], HTTP status code, HTTP response headers (array of strings)
*/
public function apiTrashAssignmentsGetWithHttpInfo($search = null, string $contentType = self::contentTypes['apiTrashAssignmentsGet'][0])
{
$request = $this->apiTrashAssignmentsGetRequest($search, $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\TrashAssignmentResponse[]',
$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\TrashAssignmentResponse[]',
$request,
$response,
);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\OmsorgCoreClient\Model\TrashAssignmentResponse[]',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
throw $e;
}
throw $e;
}
}
/**
* Operation apiTrashAssignmentsGetAsync
*
* @param string|null $search (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashAssignmentsGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiTrashAssignmentsGetAsync($search = null, string $contentType = self::contentTypes['apiTrashAssignmentsGet'][0])
{
return $this->apiTrashAssignmentsGetAsyncWithHttpInfo($search, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiTrashAssignmentsGetAsyncWithHttpInfo
*
* @param string|null $search (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashAssignmentsGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiTrashAssignmentsGetAsyncWithHttpInfo($search = null, string $contentType = self::contentTypes['apiTrashAssignmentsGet'][0])
{
$returnType = '\OmsorgCoreClient\Model\TrashAssignmentResponse[]';
$request = $this->apiTrashAssignmentsGetRequest($search, $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 'apiTrashAssignmentsGet'
*
* @param string|null $search (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashAssignmentsGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiTrashAssignmentsGetRequest($search = null, string $contentType = self::contentTypes['apiTrashAssignmentsGet'][0])
{
$resourcePath = '/api/trash/assignments';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$search,
'search', // param base name
'string', // 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
);
}
/**
* Operation apiTrashAssignmentsIdRestorePost
*
* @param string $id id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashAssignmentsIdRestorePost'] 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 apiTrashAssignmentsIdRestorePost($id, string $contentType = self::contentTypes['apiTrashAssignmentsIdRestorePost'][0])
{
$this->apiTrashAssignmentsIdRestorePostWithHttpInfo($id, $contentType);
}
/**
* Operation apiTrashAssignmentsIdRestorePostWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashAssignmentsIdRestorePost'] 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 apiTrashAssignmentsIdRestorePostWithHttpInfo($id, string $contentType = self::contentTypes['apiTrashAssignmentsIdRestorePost'][0])
{
$request = $this->apiTrashAssignmentsIdRestorePostRequest($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 apiTrashAssignmentsIdRestorePostAsync
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashAssignmentsIdRestorePost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiTrashAssignmentsIdRestorePostAsync($id, string $contentType = self::contentTypes['apiTrashAssignmentsIdRestorePost'][0])
{
return $this->apiTrashAssignmentsIdRestorePostAsyncWithHttpInfo($id, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiTrashAssignmentsIdRestorePostAsyncWithHttpInfo
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashAssignmentsIdRestorePost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiTrashAssignmentsIdRestorePostAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiTrashAssignmentsIdRestorePost'][0])
{
$returnType = '';
$request = $this->apiTrashAssignmentsIdRestorePostRequest($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 'apiTrashAssignmentsIdRestorePost'
*
* @param string $id (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashAssignmentsIdRestorePost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiTrashAssignmentsIdRestorePostRequest($id, string $contentType = self::contentTypes['apiTrashAssignmentsIdRestorePost'][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 apiTrashAssignmentsIdRestorePost'
);
}
$resourcePath = '/api/trash/assignments/{id}/restore';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($id !== null) {
$resourcePath = str_replace(
@@ -0,0 +1,498 @@
<?php
/**
* AssignmentConflictResponse
*
* 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;
/**
* AssignmentConflictResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class AssignmentConflictResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'AssignmentConflictResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'type' => 'string',
'severity' => 'string',
'message' => '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 = [
'type' => null,
'severity' => null,
'message' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'type' => true,
'severity' => true,
'message' => 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 = [
'type' => 'type',
'severity' => 'severity',
'message' => 'message'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'type' => 'setType',
'severity' => 'setSeverity',
'message' => 'setMessage'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'type' => 'getType',
'severity' => 'getSeverity',
'message' => 'getMessage'
];
/**
* 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('type', $data ?? [], null);
$this->setIfExists('severity', $data ?? [], null);
$this->setIfExists('message', $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 type
*
* @return string|null
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string|null $type type
*
* @return self
*/
public function setType($type)
{
if (is_null($type)) {
array_push($this->openAPINullablesSetToNull, 'type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets severity
*
* @return string|null
*/
public function getSeverity()
{
return $this->container['severity'];
}
/**
* Sets severity
*
* @param string|null $severity severity
*
* @return self
*/
public function setSeverity($severity)
{
if (is_null($severity)) {
array_push($this->openAPINullablesSetToNull, 'severity');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('severity', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['severity'] = $severity;
return $this;
}
/**
* Gets message
*
* @return string|null
*/
public function getMessage()
{
return $this->container['message'];
}
/**
* Sets message
*
* @param string|null $message message
*
* @return self
*/
public function setMessage($message)
{
if (is_null($message)) {
array_push($this->openAPINullablesSetToNull, 'message');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('message', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['message'] = $message;
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,709 @@
<?php
/**
* AssignmentResponse
*
* 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;
/**
* AssignmentResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class AssignmentResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'AssignmentResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'order_id' => 'string',
'employee_id' => 'string',
'employee_first_name' => 'string',
'employee_last_name' => 'string',
'start_date' => '\DateTime',
'end_date' => '\DateTime',
'note' => 'string',
'conflicts' => '\OmsorgCoreClient\Model\AssignmentConflictResponse[]'
];
/**
* 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',
'order_id' => 'uuid',
'employee_id' => 'uuid',
'employee_first_name' => null,
'employee_last_name' => null,
'start_date' => 'date',
'end_date' => 'date',
'note' => null,
'conflicts' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'order_id' => false,
'employee_id' => false,
'employee_first_name' => true,
'employee_last_name' => true,
'start_date' => false,
'end_date' => false,
'note' => true,
'conflicts' => 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',
'order_id' => 'orderId',
'employee_id' => 'employeeId',
'employee_first_name' => 'employeeFirstName',
'employee_last_name' => 'employeeLastName',
'start_date' => 'startDate',
'end_date' => 'endDate',
'note' => 'note',
'conflicts' => 'conflicts'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'order_id' => 'setOrderId',
'employee_id' => 'setEmployeeId',
'employee_first_name' => 'setEmployeeFirstName',
'employee_last_name' => 'setEmployeeLastName',
'start_date' => 'setStartDate',
'end_date' => 'setEndDate',
'note' => 'setNote',
'conflicts' => 'setConflicts'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'order_id' => 'getOrderId',
'employee_id' => 'getEmployeeId',
'employee_first_name' => 'getEmployeeFirstName',
'employee_last_name' => 'getEmployeeLastName',
'start_date' => 'getStartDate',
'end_date' => 'getEndDate',
'note' => 'getNote',
'conflicts' => 'getConflicts'
];
/**
* 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('order_id', $data ?? [], null);
$this->setIfExists('employee_id', $data ?? [], null);
$this->setIfExists('employee_first_name', $data ?? [], null);
$this->setIfExists('employee_last_name', $data ?? [], null);
$this->setIfExists('start_date', $data ?? [], null);
$this->setIfExists('end_date', $data ?? [], null);
$this->setIfExists('note', $data ?? [], null);
$this->setIfExists('conflicts', $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 order_id
*
* @return string|null
*/
public function getOrderId()
{
return $this->container['order_id'];
}
/**
* Sets order_id
*
* @param string|null $order_id order_id
*
* @return self
*/
public function setOrderId($order_id)
{
if (is_null($order_id)) {
throw new \InvalidArgumentException('non-nullable order_id cannot be null');
}
$this->container['order_id'] = $order_id;
return $this;
}
/**
* Gets employee_id
*
* @return string|null
*/
public function getEmployeeId()
{
return $this->container['employee_id'];
}
/**
* Sets employee_id
*
* @param string|null $employee_id employee_id
*
* @return self
*/
public function setEmployeeId($employee_id)
{
if (is_null($employee_id)) {
throw new \InvalidArgumentException('non-nullable employee_id cannot be null');
}
$this->container['employee_id'] = $employee_id;
return $this;
}
/**
* Gets employee_first_name
*
* @return string|null
*/
public function getEmployeeFirstName()
{
return $this->container['employee_first_name'];
}
/**
* Sets employee_first_name
*
* @param string|null $employee_first_name employee_first_name
*
* @return self
*/
public function setEmployeeFirstName($employee_first_name)
{
if (is_null($employee_first_name)) {
array_push($this->openAPINullablesSetToNull, 'employee_first_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('employee_first_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['employee_first_name'] = $employee_first_name;
return $this;
}
/**
* Gets employee_last_name
*
* @return string|null
*/
public function getEmployeeLastName()
{
return $this->container['employee_last_name'];
}
/**
* Sets employee_last_name
*
* @param string|null $employee_last_name employee_last_name
*
* @return self
*/
public function setEmployeeLastName($employee_last_name)
{
if (is_null($employee_last_name)) {
array_push($this->openAPINullablesSetToNull, 'employee_last_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('employee_last_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['employee_last_name'] = $employee_last_name;
return $this;
}
/**
* Gets start_date
*
* @return \DateTime|null
*/
public function getStartDate()
{
return $this->container['start_date'];
}
/**
* Sets start_date
*
* @param \DateTime|null $start_date start_date
*
* @return self
*/
public function setStartDate($start_date)
{
if (is_null($start_date)) {
throw new \InvalidArgumentException('non-nullable start_date cannot be null');
}
$this->container['start_date'] = $start_date;
return $this;
}
/**
* Gets end_date
*
* @return \DateTime|null
*/
public function getEndDate()
{
return $this->container['end_date'];
}
/**
* Sets end_date
*
* @param \DateTime|null $end_date end_date
*
* @return self
*/
public function setEndDate($end_date)
{
if (is_null($end_date)) {
throw new \InvalidArgumentException('non-nullable end_date cannot be null');
}
$this->container['end_date'] = $end_date;
return $this;
}
/**
* Gets note
*
* @return string|null
*/
public function getNote()
{
return $this->container['note'];
}
/**
* Sets note
*
* @param string|null $note note
*
* @return self
*/
public function setNote($note)
{
if (is_null($note)) {
array_push($this->openAPINullablesSetToNull, 'note');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('note', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['note'] = $note;
return $this;
}
/**
* Gets conflicts
*
* @return \OmsorgCoreClient\Model\AssignmentConflictResponse[]|null
*/
public function getConflicts()
{
return $this->container['conflicts'];
}
/**
* Sets conflicts
*
* @param \OmsorgCoreClient\Model\AssignmentConflictResponse[]|null $conflicts conflicts
*
* @return self
*/
public function setConflicts($conflicts)
{
if (is_null($conflicts)) {
array_push($this->openAPINullablesSetToNull, 'conflicts');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('conflicts', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['conflicts'] = $conflicts;
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
/**
* AssignmentResponsePagedResponse
*
* 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;
/**
* AssignmentResponsePagedResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class AssignmentResponsePagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'AssignmentResponsePagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'items' => '\OmsorgCoreClient\Model\AssignmentResponse[]',
'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\AssignmentResponse[]|null
*/
public function getItems()
{
return $this->container['items'];
}
/**
* Sets items
*
* @param \OmsorgCoreClient\Model\AssignmentResponse[]|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,580 @@
<?php
/**
* AssignmentValidationSettingsResponse
*
* 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;
/**
* AssignmentValidationSettingsResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class AssignmentValidationSettingsResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'AssignmentValidationSettingsResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'qualification_mode' => 'string',
'absence_mode' => 'string',
'working_hours_mode' => 'string',
'overlap_mode' => 'string',
'contract_mode' => '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 = [
'qualification_mode' => null,
'absence_mode' => null,
'working_hours_mode' => null,
'overlap_mode' => null,
'contract_mode' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'qualification_mode' => true,
'absence_mode' => true,
'working_hours_mode' => true,
'overlap_mode' => true,
'contract_mode' => 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 = [
'qualification_mode' => 'qualificationMode',
'absence_mode' => 'absenceMode',
'working_hours_mode' => 'workingHoursMode',
'overlap_mode' => 'overlapMode',
'contract_mode' => 'contractMode'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'qualification_mode' => 'setQualificationMode',
'absence_mode' => 'setAbsenceMode',
'working_hours_mode' => 'setWorkingHoursMode',
'overlap_mode' => 'setOverlapMode',
'contract_mode' => 'setContractMode'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'qualification_mode' => 'getQualificationMode',
'absence_mode' => 'getAbsenceMode',
'working_hours_mode' => 'getWorkingHoursMode',
'overlap_mode' => 'getOverlapMode',
'contract_mode' => 'getContractMode'
];
/**
* 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('qualification_mode', $data ?? [], null);
$this->setIfExists('absence_mode', $data ?? [], null);
$this->setIfExists('working_hours_mode', $data ?? [], null);
$this->setIfExists('overlap_mode', $data ?? [], null);
$this->setIfExists('contract_mode', $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 qualification_mode
*
* @return string|null
*/
public function getQualificationMode()
{
return $this->container['qualification_mode'];
}
/**
* Sets qualification_mode
*
* @param string|null $qualification_mode qualification_mode
*
* @return self
*/
public function setQualificationMode($qualification_mode)
{
if (is_null($qualification_mode)) {
array_push($this->openAPINullablesSetToNull, 'qualification_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('qualification_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['qualification_mode'] = $qualification_mode;
return $this;
}
/**
* Gets absence_mode
*
* @return string|null
*/
public function getAbsenceMode()
{
return $this->container['absence_mode'];
}
/**
* Sets absence_mode
*
* @param string|null $absence_mode absence_mode
*
* @return self
*/
public function setAbsenceMode($absence_mode)
{
if (is_null($absence_mode)) {
array_push($this->openAPINullablesSetToNull, 'absence_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('absence_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['absence_mode'] = $absence_mode;
return $this;
}
/**
* Gets working_hours_mode
*
* @return string|null
*/
public function getWorkingHoursMode()
{
return $this->container['working_hours_mode'];
}
/**
* Sets working_hours_mode
*
* @param string|null $working_hours_mode working_hours_mode
*
* @return self
*/
public function setWorkingHoursMode($working_hours_mode)
{
if (is_null($working_hours_mode)) {
array_push($this->openAPINullablesSetToNull, 'working_hours_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('working_hours_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['working_hours_mode'] = $working_hours_mode;
return $this;
}
/**
* Gets overlap_mode
*
* @return string|null
*/
public function getOverlapMode()
{
return $this->container['overlap_mode'];
}
/**
* Sets overlap_mode
*
* @param string|null $overlap_mode overlap_mode
*
* @return self
*/
public function setOverlapMode($overlap_mode)
{
if (is_null($overlap_mode)) {
array_push($this->openAPINullablesSetToNull, 'overlap_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('overlap_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['overlap_mode'] = $overlap_mode;
return $this;
}
/**
* Gets contract_mode
*
* @return string|null
*/
public function getContractMode()
{
return $this->container['contract_mode'];
}
/**
* Sets contract_mode
*
* @param string|null $contract_mode contract_mode
*
* @return self
*/
public function setContractMode($contract_mode)
{
if (is_null($contract_mode)) {
array_push($this->openAPINullablesSetToNull, 'contract_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('contract_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['contract_mode'] = $contract_mode;
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,552 @@
<?php
/**
* CreateAssignmentRequest
*
* 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;
/**
* CreateAssignmentRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class CreateAssignmentRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'CreateAssignmentRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'order_id' => 'string',
'employee_id' => 'string',
'start_date' => '\DateTime',
'end_date' => '\DateTime',
'note' => '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 = [
'order_id' => 'uuid',
'employee_id' => 'uuid',
'start_date' => 'date',
'end_date' => 'date',
'note' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'order_id' => false,
'employee_id' => false,
'start_date' => false,
'end_date' => false,
'note' => 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 = [
'order_id' => 'orderId',
'employee_id' => 'employeeId',
'start_date' => 'startDate',
'end_date' => 'endDate',
'note' => 'note'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'order_id' => 'setOrderId',
'employee_id' => 'setEmployeeId',
'start_date' => 'setStartDate',
'end_date' => 'setEndDate',
'note' => 'setNote'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'order_id' => 'getOrderId',
'employee_id' => 'getEmployeeId',
'start_date' => 'getStartDate',
'end_date' => 'getEndDate',
'note' => 'getNote'
];
/**
* 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('order_id', $data ?? [], null);
$this->setIfExists('employee_id', $data ?? [], null);
$this->setIfExists('start_date', $data ?? [], null);
$this->setIfExists('end_date', $data ?? [], null);
$this->setIfExists('note', $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 order_id
*
* @return string|null
*/
public function getOrderId()
{
return $this->container['order_id'];
}
/**
* Sets order_id
*
* @param string|null $order_id order_id
*
* @return self
*/
public function setOrderId($order_id)
{
if (is_null($order_id)) {
throw new \InvalidArgumentException('non-nullable order_id cannot be null');
}
$this->container['order_id'] = $order_id;
return $this;
}
/**
* Gets employee_id
*
* @return string|null
*/
public function getEmployeeId()
{
return $this->container['employee_id'];
}
/**
* Sets employee_id
*
* @param string|null $employee_id employee_id
*
* @return self
*/
public function setEmployeeId($employee_id)
{
if (is_null($employee_id)) {
throw new \InvalidArgumentException('non-nullable employee_id cannot be null');
}
$this->container['employee_id'] = $employee_id;
return $this;
}
/**
* Gets start_date
*
* @return \DateTime|null
*/
public function getStartDate()
{
return $this->container['start_date'];
}
/**
* Sets start_date
*
* @param \DateTime|null $start_date start_date
*
* @return self
*/
public function setStartDate($start_date)
{
if (is_null($start_date)) {
throw new \InvalidArgumentException('non-nullable start_date cannot be null');
}
$this->container['start_date'] = $start_date;
return $this;
}
/**
* Gets end_date
*
* @return \DateTime|null
*/
public function getEndDate()
{
return $this->container['end_date'];
}
/**
* Sets end_date
*
* @param \DateTime|null $end_date end_date
*
* @return self
*/
public function setEndDate($end_date)
{
if (is_null($end_date)) {
throw new \InvalidArgumentException('non-nullable end_date cannot be null');
}
$this->container['end_date'] = $end_date;
return $this;
}
/**
* Gets note
*
* @return string|null
*/
public function getNote()
{
return $this->container['note'];
}
/**
* Sets note
*
* @param string|null $note note
*
* @return self
*/
public function setNote($note)
{
if (is_null($note)) {
array_push($this->openAPINullablesSetToNull, 'note');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('note', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['note'] = $note;
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));
}
}
@@ -58,6 +58,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
*/
protected static $openAPITypes = [
'name' => 'string',
'crm_status' => 'string',
'facility_type' => 'string',
'website' => 'string',
'street' => 'string',
@@ -67,7 +68,21 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => 'string',
'billing_postal_code' => 'string',
'billing_city' => 'string',
'billing_country' => 'string'
'billing_country' => 'string',
'follow_up_days' => 'int',
'billing_rate' => 'float',
'night_surcharge_percent' => 'float',
'saturday_surcharge_percent' => 'float',
'sunday_surcharge_percent' => 'float',
'holiday_surcharge_percent' => 'float',
'travel_cost_rate' => 'float',
'travel_cost_mode' => 'string',
'travel_cost_per_km' => 'float',
'meal_allowance_rate' => 'float',
'minimum_hours' => 'float',
'billing_interval' => 'string',
'payment_term_days' => 'int',
'individual_agreements' => 'string'
];
/**
@@ -79,6 +94,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
*/
protected static $openAPIFormats = [
'name' => null,
'crm_status' => null,
'facility_type' => null,
'website' => null,
'street' => null,
@@ -88,7 +104,21 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => null,
'billing_postal_code' => null,
'billing_city' => null,
'billing_country' => null
'billing_country' => null,
'follow_up_days' => 'int32',
'billing_rate' => 'double',
'night_surcharge_percent' => 'double',
'saturday_surcharge_percent' => 'double',
'sunday_surcharge_percent' => 'double',
'holiday_surcharge_percent' => 'double',
'travel_cost_rate' => 'double',
'travel_cost_mode' => null,
'travel_cost_per_km' => 'double',
'meal_allowance_rate' => 'double',
'minimum_hours' => 'double',
'billing_interval' => null,
'payment_term_days' => 'int32',
'individual_agreements' => null
];
/**
@@ -98,6 +128,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
*/
protected static array $openAPINullables = [
'name' => true,
'crm_status' => true,
'facility_type' => true,
'website' => true,
'street' => true,
@@ -107,7 +138,21 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => true,
'billing_postal_code' => true,
'billing_city' => true,
'billing_country' => true
'billing_country' => true,
'follow_up_days' => true,
'billing_rate' => true,
'night_surcharge_percent' => true,
'saturday_surcharge_percent' => true,
'sunday_surcharge_percent' => true,
'holiday_surcharge_percent' => true,
'travel_cost_rate' => true,
'travel_cost_mode' => true,
'travel_cost_per_km' => true,
'meal_allowance_rate' => true,
'minimum_hours' => true,
'billing_interval' => true,
'payment_term_days' => true,
'individual_agreements' => true
];
/**
@@ -197,6 +242,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
*/
protected static $attributeMap = [
'name' => 'name',
'crm_status' => 'crmStatus',
'facility_type' => 'facilityType',
'website' => 'website',
'street' => 'street',
@@ -206,7 +252,21 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => 'billingStreet',
'billing_postal_code' => 'billingPostalCode',
'billing_city' => 'billingCity',
'billing_country' => 'billingCountry'
'billing_country' => 'billingCountry',
'follow_up_days' => 'followUpDays',
'billing_rate' => 'billingRate',
'night_surcharge_percent' => 'nightSurchargePercent',
'saturday_surcharge_percent' => 'saturdaySurchargePercent',
'sunday_surcharge_percent' => 'sundaySurchargePercent',
'holiday_surcharge_percent' => 'holidaySurchargePercent',
'travel_cost_rate' => 'travelCostRate',
'travel_cost_mode' => 'travelCostMode',
'travel_cost_per_km' => 'travelCostPerKm',
'meal_allowance_rate' => 'mealAllowanceRate',
'minimum_hours' => 'minimumHours',
'billing_interval' => 'billingInterval',
'payment_term_days' => 'paymentTermDays',
'individual_agreements' => 'individualAgreements'
];
/**
@@ -216,6 +276,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
*/
protected static $setters = [
'name' => 'setName',
'crm_status' => 'setCrmStatus',
'facility_type' => 'setFacilityType',
'website' => 'setWebsite',
'street' => 'setStreet',
@@ -225,7 +286,21 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => 'setBillingStreet',
'billing_postal_code' => 'setBillingPostalCode',
'billing_city' => 'setBillingCity',
'billing_country' => 'setBillingCountry'
'billing_country' => 'setBillingCountry',
'follow_up_days' => 'setFollowUpDays',
'billing_rate' => 'setBillingRate',
'night_surcharge_percent' => 'setNightSurchargePercent',
'saturday_surcharge_percent' => 'setSaturdaySurchargePercent',
'sunday_surcharge_percent' => 'setSundaySurchargePercent',
'holiday_surcharge_percent' => 'setHolidaySurchargePercent',
'travel_cost_rate' => 'setTravelCostRate',
'travel_cost_mode' => 'setTravelCostMode',
'travel_cost_per_km' => 'setTravelCostPerKm',
'meal_allowance_rate' => 'setMealAllowanceRate',
'minimum_hours' => 'setMinimumHours',
'billing_interval' => 'setBillingInterval',
'payment_term_days' => 'setPaymentTermDays',
'individual_agreements' => 'setIndividualAgreements'
];
/**
@@ -235,6 +310,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
*/
protected static $getters = [
'name' => 'getName',
'crm_status' => 'getCrmStatus',
'facility_type' => 'getFacilityType',
'website' => 'getWebsite',
'street' => 'getStreet',
@@ -244,7 +320,21 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
'billing_street' => 'getBillingStreet',
'billing_postal_code' => 'getBillingPostalCode',
'billing_city' => 'getBillingCity',
'billing_country' => 'getBillingCountry'
'billing_country' => 'getBillingCountry',
'follow_up_days' => 'getFollowUpDays',
'billing_rate' => 'getBillingRate',
'night_surcharge_percent' => 'getNightSurchargePercent',
'saturday_surcharge_percent' => 'getSaturdaySurchargePercent',
'sunday_surcharge_percent' => 'getSundaySurchargePercent',
'holiday_surcharge_percent' => 'getHolidaySurchargePercent',
'travel_cost_rate' => 'getTravelCostRate',
'travel_cost_mode' => 'getTravelCostMode',
'travel_cost_per_km' => 'getTravelCostPerKm',
'meal_allowance_rate' => 'getMealAllowanceRate',
'minimum_hours' => 'getMinimumHours',
'billing_interval' => 'getBillingInterval',
'payment_term_days' => 'getPaymentTermDays',
'individual_agreements' => 'getIndividualAgreements'
];
/**
@@ -305,6 +395,7 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
public function __construct(?array $data = null)
{
$this->setIfExists('name', $data ?? [], null);
$this->setIfExists('crm_status', $data ?? [], null);
$this->setIfExists('facility_type', $data ?? [], null);
$this->setIfExists('website', $data ?? [], null);
$this->setIfExists('street', $data ?? [], null);
@@ -315,6 +406,20 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
$this->setIfExists('billing_postal_code', $data ?? [], null);
$this->setIfExists('billing_city', $data ?? [], null);
$this->setIfExists('billing_country', $data ?? [], null);
$this->setIfExists('follow_up_days', $data ?? [], null);
$this->setIfExists('billing_rate', $data ?? [], null);
$this->setIfExists('night_surcharge_percent', $data ?? [], null);
$this->setIfExists('saturday_surcharge_percent', $data ?? [], null);
$this->setIfExists('sunday_surcharge_percent', $data ?? [], null);
$this->setIfExists('holiday_surcharge_percent', $data ?? [], null);
$this->setIfExists('travel_cost_rate', $data ?? [], null);
$this->setIfExists('travel_cost_mode', $data ?? [], null);
$this->setIfExists('travel_cost_per_km', $data ?? [], null);
$this->setIfExists('meal_allowance_rate', $data ?? [], null);
$this->setIfExists('minimum_hours', $data ?? [], null);
$this->setIfExists('billing_interval', $data ?? [], null);
$this->setIfExists('payment_term_days', $data ?? [], null);
$this->setIfExists('individual_agreements', $data ?? [], null);
}
/**
@@ -393,6 +498,40 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
return $this;
}
/**
* Gets crm_status
*
* @return string|null
*/
public function getCrmStatus()
{
return $this->container['crm_status'];
}
/**
* Sets crm_status
*
* @param string|null $crm_status crm_status
*
* @return self
*/
public function setCrmStatus($crm_status)
{
if (is_null($crm_status)) {
array_push($this->openAPINullablesSetToNull, 'crm_status');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('crm_status', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['crm_status'] = $crm_status;
return $this;
}
/**
* Gets facility_type
*
@@ -732,6 +871,482 @@ class CreateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
return $this;
}
/**
* Gets follow_up_days
*
* @return int|null
*/
public function getFollowUpDays()
{
return $this->container['follow_up_days'];
}
/**
* Sets follow_up_days
*
* @param int|null $follow_up_days follow_up_days
*
* @return self
*/
public function setFollowUpDays($follow_up_days)
{
if (is_null($follow_up_days)) {
array_push($this->openAPINullablesSetToNull, 'follow_up_days');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('follow_up_days', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['follow_up_days'] = $follow_up_days;
return $this;
}
/**
* Gets billing_rate
*
* @return float|null
*/
public function getBillingRate()
{
return $this->container['billing_rate'];
}
/**
* Sets billing_rate
*
* @param float|null $billing_rate billing_rate
*
* @return self
*/
public function setBillingRate($billing_rate)
{
if (is_null($billing_rate)) {
array_push($this->openAPINullablesSetToNull, 'billing_rate');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('billing_rate', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['billing_rate'] = $billing_rate;
return $this;
}
/**
* Gets night_surcharge_percent
*
* @return float|null
*/
public function getNightSurchargePercent()
{
return $this->container['night_surcharge_percent'];
}
/**
* Sets night_surcharge_percent
*
* @param float|null $night_surcharge_percent night_surcharge_percent
*
* @return self
*/
public function setNightSurchargePercent($night_surcharge_percent)
{
if (is_null($night_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'night_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('night_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['night_surcharge_percent'] = $night_surcharge_percent;
return $this;
}
/**
* Gets saturday_surcharge_percent
*
* @return float|null
*/
public function getSaturdaySurchargePercent()
{
return $this->container['saturday_surcharge_percent'];
}
/**
* Sets saturday_surcharge_percent
*
* @param float|null $saturday_surcharge_percent saturday_surcharge_percent
*
* @return self
*/
public function setSaturdaySurchargePercent($saturday_surcharge_percent)
{
if (is_null($saturday_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'saturday_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('saturday_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['saturday_surcharge_percent'] = $saturday_surcharge_percent;
return $this;
}
/**
* Gets sunday_surcharge_percent
*
* @return float|null
*/
public function getSundaySurchargePercent()
{
return $this->container['sunday_surcharge_percent'];
}
/**
* Sets sunday_surcharge_percent
*
* @param float|null $sunday_surcharge_percent sunday_surcharge_percent
*
* @return self
*/
public function setSundaySurchargePercent($sunday_surcharge_percent)
{
if (is_null($sunday_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'sunday_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('sunday_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['sunday_surcharge_percent'] = $sunday_surcharge_percent;
return $this;
}
/**
* Gets holiday_surcharge_percent
*
* @return float|null
*/
public function getHolidaySurchargePercent()
{
return $this->container['holiday_surcharge_percent'];
}
/**
* Sets holiday_surcharge_percent
*
* @param float|null $holiday_surcharge_percent holiday_surcharge_percent
*
* @return self
*/
public function setHolidaySurchargePercent($holiday_surcharge_percent)
{
if (is_null($holiday_surcharge_percent)) {
array_push($this->openAPINullablesSetToNull, 'holiday_surcharge_percent');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('holiday_surcharge_percent', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['holiday_surcharge_percent'] = $holiday_surcharge_percent;
return $this;
}
/**
* Gets travel_cost_rate
*
* @return float|null
*/
public function getTravelCostRate()
{
return $this->container['travel_cost_rate'];
}
/**
* Sets travel_cost_rate
*
* @param float|null $travel_cost_rate travel_cost_rate
*
* @return self
*/
public function setTravelCostRate($travel_cost_rate)
{
if (is_null($travel_cost_rate)) {
array_push($this->openAPINullablesSetToNull, 'travel_cost_rate');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('travel_cost_rate', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['travel_cost_rate'] = $travel_cost_rate;
return $this;
}
/**
* Gets travel_cost_mode
*
* @return string|null
*/
public function getTravelCostMode()
{
return $this->container['travel_cost_mode'];
}
/**
* Sets travel_cost_mode
*
* @param string|null $travel_cost_mode travel_cost_mode
*
* @return self
*/
public function setTravelCostMode($travel_cost_mode)
{
if (is_null($travel_cost_mode)) {
array_push($this->openAPINullablesSetToNull, 'travel_cost_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('travel_cost_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['travel_cost_mode'] = $travel_cost_mode;
return $this;
}
/**
* Gets travel_cost_per_km
*
* @return float|null
*/
public function getTravelCostPerKm()
{
return $this->container['travel_cost_per_km'];
}
/**
* Sets travel_cost_per_km
*
* @param float|null $travel_cost_per_km travel_cost_per_km
*
* @return self
*/
public function setTravelCostPerKm($travel_cost_per_km)
{
if (is_null($travel_cost_per_km)) {
array_push($this->openAPINullablesSetToNull, 'travel_cost_per_km');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('travel_cost_per_km', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['travel_cost_per_km'] = $travel_cost_per_km;
return $this;
}
/**
* Gets meal_allowance_rate
*
* @return float|null
*/
public function getMealAllowanceRate()
{
return $this->container['meal_allowance_rate'];
}
/**
* Sets meal_allowance_rate
*
* @param float|null $meal_allowance_rate meal_allowance_rate
*
* @return self
*/
public function setMealAllowanceRate($meal_allowance_rate)
{
if (is_null($meal_allowance_rate)) {
array_push($this->openAPINullablesSetToNull, 'meal_allowance_rate');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('meal_allowance_rate', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['meal_allowance_rate'] = $meal_allowance_rate;
return $this;
}
/**
* Gets minimum_hours
*
* @return float|null
*/
public function getMinimumHours()
{
return $this->container['minimum_hours'];
}
/**
* Sets minimum_hours
*
* @param float|null $minimum_hours minimum_hours
*
* @return self
*/
public function setMinimumHours($minimum_hours)
{
if (is_null($minimum_hours)) {
array_push($this->openAPINullablesSetToNull, 'minimum_hours');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('minimum_hours', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['minimum_hours'] = $minimum_hours;
return $this;
}
/**
* Gets billing_interval
*
* @return string|null
*/
public function getBillingInterval()
{
return $this->container['billing_interval'];
}
/**
* Sets billing_interval
*
* @param string|null $billing_interval billing_interval
*
* @return self
*/
public function setBillingInterval($billing_interval)
{
if (is_null($billing_interval)) {
array_push($this->openAPINullablesSetToNull, 'billing_interval');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('billing_interval', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['billing_interval'] = $billing_interval;
return $this;
}
/**
* Gets payment_term_days
*
* @return int|null
*/
public function getPaymentTermDays()
{
return $this->container['payment_term_days'];
}
/**
* Sets payment_term_days
*
* @param int|null $payment_term_days payment_term_days
*
* @return self
*/
public function setPaymentTermDays($payment_term_days)
{
if (is_null($payment_term_days)) {
array_push($this->openAPINullablesSetToNull, 'payment_term_days');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('payment_term_days', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['payment_term_days'] = $payment_term_days;
return $this;
}
/**
* Gets individual_agreements
*
* @return string|null
*/
public function getIndividualAgreements()
{
return $this->container['individual_agreements'];
}
/**
* Sets individual_agreements
*
* @param string|null $individual_agreements individual_agreements
*
* @return self
*/
public function setIndividualAgreements($individual_agreements)
{
if (is_null($individual_agreements)) {
array_push($this->openAPINullablesSetToNull, 'individual_agreements');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('individual_agreements', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['individual_agreements'] = $individual_agreements;
return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
@@ -72,6 +72,8 @@ class ModuleType
public const EMPLOYEE_FACILITY_DISTANCES = 'EmployeeFacilityDistances';
public const ASSIGNMENTS = 'Assignments';
/**
* Gets allowable values of the enum
* @return string[]
@@ -93,7 +95,8 @@ class ModuleType
self::USERS,
self::CONFIGURATION,
self::ABSENCES,
self::EMPLOYEE_FACILITY_DISTANCES
self::EMPLOYEE_FACILITY_DISTANCES,
self::ASSIGNMENTS
];
}
}
@@ -0,0 +1,532 @@
<?php
/**
* TrashAssignmentResponse
*
* 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;
/**
* TrashAssignmentResponse Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class TrashAssignmentResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'TrashAssignmentResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'employee_first_name' => 'string',
'employee_last_name' => 'string',
'deleted_at' => '\DateTime'
];
/**
* 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',
'employee_first_name' => null,
'employee_last_name' => null,
'deleted_at' => 'date-time'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => false,
'employee_first_name' => true,
'employee_last_name' => true,
'deleted_at' => 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',
'employee_first_name' => 'employeeFirstName',
'employee_last_name' => 'employeeLastName',
'deleted_at' => 'deletedAt'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'employee_first_name' => 'setEmployeeFirstName',
'employee_last_name' => 'setEmployeeLastName',
'deleted_at' => 'setDeletedAt'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'employee_first_name' => 'getEmployeeFirstName',
'employee_last_name' => 'getEmployeeLastName',
'deleted_at' => 'getDeletedAt'
];
/**
* 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('employee_first_name', $data ?? [], null);
$this->setIfExists('employee_last_name', $data ?? [], null);
$this->setIfExists('deleted_at', $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 employee_first_name
*
* @return string|null
*/
public function getEmployeeFirstName()
{
return $this->container['employee_first_name'];
}
/**
* Sets employee_first_name
*
* @param string|null $employee_first_name employee_first_name
*
* @return self
*/
public function setEmployeeFirstName($employee_first_name)
{
if (is_null($employee_first_name)) {
array_push($this->openAPINullablesSetToNull, 'employee_first_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('employee_first_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['employee_first_name'] = $employee_first_name;
return $this;
}
/**
* Gets employee_last_name
*
* @return string|null
*/
public function getEmployeeLastName()
{
return $this->container['employee_last_name'];
}
/**
* Sets employee_last_name
*
* @param string|null $employee_last_name employee_last_name
*
* @return self
*/
public function setEmployeeLastName($employee_last_name)
{
if (is_null($employee_last_name)) {
array_push($this->openAPINullablesSetToNull, 'employee_last_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('employee_last_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['employee_last_name'] = $employee_last_name;
return $this;
}
/**
* Gets deleted_at
*
* @return \DateTime|null
*/
public function getDeletedAt()
{
return $this->container['deleted_at'];
}
/**
* Sets deleted_at
*
* @param \DateTime|null $deleted_at deleted_at
*
* @return self
*/
public function setDeletedAt($deleted_at)
{
if (is_null($deleted_at)) {
array_push($this->openAPINullablesSetToNull, 'deleted_at');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('deleted_at', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['deleted_at'] = $deleted_at;
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,416 @@
<?php
/**
* UpdateAssignmentRequest
*
* 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;
/**
* UpdateAssignmentRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class UpdateAssignmentRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'UpdateAssignmentRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'note' => '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 = [
'note' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'note' => 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 = [
'note' => 'note'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'note' => 'setNote'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'note' => 'getNote'
];
/**
* 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('note', $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 note
*
* @return string|null
*/
public function getNote()
{
return $this->container['note'];
}
/**
* Sets note
*
* @param string|null $note note
*
* @return self
*/
public function setNote($note)
{
if (is_null($note)) {
array_push($this->openAPINullablesSetToNull, 'note');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('note', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['note'] = $note;
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,580 @@
<?php
/**
* UpdateAssignmentValidationSettingsRequest
*
* 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;
/**
* UpdateAssignmentValidationSettingsRequest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class UpdateAssignmentValidationSettingsRequest implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'UpdateAssignmentValidationSettingsRequest';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'qualification_mode' => 'string',
'absence_mode' => 'string',
'working_hours_mode' => 'string',
'overlap_mode' => 'string',
'contract_mode' => '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 = [
'qualification_mode' => null,
'absence_mode' => null,
'working_hours_mode' => null,
'overlap_mode' => null,
'contract_mode' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'qualification_mode' => true,
'absence_mode' => true,
'working_hours_mode' => true,
'overlap_mode' => true,
'contract_mode' => 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 = [
'qualification_mode' => 'qualificationMode',
'absence_mode' => 'absenceMode',
'working_hours_mode' => 'workingHoursMode',
'overlap_mode' => 'overlapMode',
'contract_mode' => 'contractMode'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'qualification_mode' => 'setQualificationMode',
'absence_mode' => 'setAbsenceMode',
'working_hours_mode' => 'setWorkingHoursMode',
'overlap_mode' => 'setOverlapMode',
'contract_mode' => 'setContractMode'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'qualification_mode' => 'getQualificationMode',
'absence_mode' => 'getAbsenceMode',
'working_hours_mode' => 'getWorkingHoursMode',
'overlap_mode' => 'getOverlapMode',
'contract_mode' => 'getContractMode'
];
/**
* 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('qualification_mode', $data ?? [], null);
$this->setIfExists('absence_mode', $data ?? [], null);
$this->setIfExists('working_hours_mode', $data ?? [], null);
$this->setIfExists('overlap_mode', $data ?? [], null);
$this->setIfExists('contract_mode', $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 qualification_mode
*
* @return string|null
*/
public function getQualificationMode()
{
return $this->container['qualification_mode'];
}
/**
* Sets qualification_mode
*
* @param string|null $qualification_mode qualification_mode
*
* @return self
*/
public function setQualificationMode($qualification_mode)
{
if (is_null($qualification_mode)) {
array_push($this->openAPINullablesSetToNull, 'qualification_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('qualification_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['qualification_mode'] = $qualification_mode;
return $this;
}
/**
* Gets absence_mode
*
* @return string|null
*/
public function getAbsenceMode()
{
return $this->container['absence_mode'];
}
/**
* Sets absence_mode
*
* @param string|null $absence_mode absence_mode
*
* @return self
*/
public function setAbsenceMode($absence_mode)
{
if (is_null($absence_mode)) {
array_push($this->openAPINullablesSetToNull, 'absence_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('absence_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['absence_mode'] = $absence_mode;
return $this;
}
/**
* Gets working_hours_mode
*
* @return string|null
*/
public function getWorkingHoursMode()
{
return $this->container['working_hours_mode'];
}
/**
* Sets working_hours_mode
*
* @param string|null $working_hours_mode working_hours_mode
*
* @return self
*/
public function setWorkingHoursMode($working_hours_mode)
{
if (is_null($working_hours_mode)) {
array_push($this->openAPINullablesSetToNull, 'working_hours_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('working_hours_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['working_hours_mode'] = $working_hours_mode;
return $this;
}
/**
* Gets overlap_mode
*
* @return string|null
*/
public function getOverlapMode()
{
return $this->container['overlap_mode'];
}
/**
* Sets overlap_mode
*
* @param string|null $overlap_mode overlap_mode
*
* @return self
*/
public function setOverlapMode($overlap_mode)
{
if (is_null($overlap_mode)) {
array_push($this->openAPINullablesSetToNull, 'overlap_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('overlap_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['overlap_mode'] = $overlap_mode;
return $this;
}
/**
* Gets contract_mode
*
* @return string|null
*/
public function getContractMode()
{
return $this->container['contract_mode'];
}
/**
* Sets contract_mode
*
* @param string|null $contract_mode contract_mode
*
* @return self
*/
public function setContractMode($contract_mode)
{
if (is_null($contract_mode)) {
array_push($this->openAPINullablesSetToNull, 'contract_mode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('contract_mode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['contract_mode'] = $contract_mode;
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,97 @@
<?php
/**
* AssignmentValidationSettingsApiTest
* 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
* Please update the test case below to test the endpoint.
*/
namespace OmsorgCoreClient\Test\Api;
use \OmsorgCoreClient\Configuration;
use \OmsorgCoreClient\ApiException;
use \OmsorgCoreClient\ObjectSerializer;
use PHPUnit\Framework\TestCase;
/**
* AssignmentValidationSettingsApiTest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AssignmentValidationSettingsApiTest extends TestCase
{
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test case for apiSettingsAssignmentValidationGet
*
* .
*
*/
public function testApiSettingsAssignmentValidationGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiSettingsAssignmentValidationPut
*
* .
*
*/
public function testApiSettingsAssignmentValidationPut()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
@@ -0,0 +1,133 @@
<?php
/**
* AssignmentsApiTest
* 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
* Please update the test case below to test the endpoint.
*/
namespace OmsorgCoreClient\Test\Api;
use \OmsorgCoreClient\Configuration;
use \OmsorgCoreClient\ApiException;
use \OmsorgCoreClient\ObjectSerializer;
use PHPUnit\Framework\TestCase;
/**
* AssignmentsApiTest Class Doc Comment
*
* @category Class
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AssignmentsApiTest extends TestCase
{
/**
* Setup before running any test cases
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test case for apiAssignmentsGet
*
* .
*
*/
public function testApiAssignmentsGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiAssignmentsIdDelete
*
* .
*
*/
public function testApiAssignmentsIdDelete()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiAssignmentsIdGet
*
* .
*
*/
public function testApiAssignmentsIdGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiAssignmentsIdPut
*
* .
*
*/
public function testApiAssignmentsIdPut()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiAssignmentsPost
*
* .
*
*/
public function testApiAssignmentsPost()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
@@ -0,0 +1,108 @@
<?php
/**
* AssignmentConflictResponseTest
*
* 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
* Please update the test case below to test the model.
*/
namespace OmsorgCoreClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* AssignmentConflictResponseTest Class Doc Comment
*
* @category Class
* @description AssignmentConflictResponse
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AssignmentConflictResponseTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "AssignmentConflictResponse"
*/
public function testAssignmentConflictResponse()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "type"
*/
public function testPropertyType()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "severity"
*/
public function testPropertySeverity()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "message"
*/
public function testPropertyMessage()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
@@ -0,0 +1,117 @@
<?php
/**
* AssignmentResponsePagedResponseTest
*
* 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
* Please update the test case below to test the model.
*/
namespace OmsorgCoreClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* AssignmentResponsePagedResponseTest Class Doc Comment
*
* @category Class
* @description AssignmentResponsePagedResponse
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AssignmentResponsePagedResponseTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "AssignmentResponsePagedResponse"
*/
public function testAssignmentResponsePagedResponse()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "items"
*/
public function testPropertyItems()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "total_count"
*/
public function testPropertyTotalCount()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "page"
*/
public function testPropertyPage()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "page_size"
*/
public function testPropertyPageSize()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
@@ -0,0 +1,153 @@
<?php
/**
* AssignmentResponseTest
*
* 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
* Please update the test case below to test the model.
*/
namespace OmsorgCoreClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* AssignmentResponseTest Class Doc Comment
*
* @category Class
* @description AssignmentResponse
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AssignmentResponseTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "AssignmentResponse"
*/
public function testAssignmentResponse()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "id"
*/
public function testPropertyId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "order_id"
*/
public function testPropertyOrderId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "employee_id"
*/
public function testPropertyEmployeeId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "employee_first_name"
*/
public function testPropertyEmployeeFirstName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "employee_last_name"
*/
public function testPropertyEmployeeLastName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "start_date"
*/
public function testPropertyStartDate()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "end_date"
*/
public function testPropertyEndDate()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "note"
*/
public function testPropertyNote()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
@@ -0,0 +1,126 @@
<?php
/**
* AssignmentValidationSettingsResponseTest
*
* 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
* Please update the test case below to test the model.
*/
namespace OmsorgCoreClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* AssignmentValidationSettingsResponseTest Class Doc Comment
*
* @category Class
* @description AssignmentValidationSettingsResponse
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class AssignmentValidationSettingsResponseTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "AssignmentValidationSettingsResponse"
*/
public function testAssignmentValidationSettingsResponse()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "qualification_mode"
*/
public function testPropertyQualificationMode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "absence_mode"
*/
public function testPropertyAbsenceMode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "working_hours_mode"
*/
public function testPropertyWorkingHoursMode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "overlap_mode"
*/
public function testPropertyOverlapMode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "contract_mode"
*/
public function testPropertyContractMode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
@@ -0,0 +1,126 @@
<?php
/**
* CreateAssignmentRequestTest
*
* 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
* Please update the test case below to test the model.
*/
namespace OmsorgCoreClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CreateAssignmentRequestTest Class Doc Comment
*
* @category Class
* @description CreateAssignmentRequest
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CreateAssignmentRequestTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "CreateAssignmentRequest"
*/
public function testCreateAssignmentRequest()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "order_id"
*/
public function testPropertyOrderId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "employee_id"
*/
public function testPropertyEmployeeId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "start_date"
*/
public function testPropertyStartDate()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "end_date"
*/
public function testPropertyEndDate()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "note"
*/
public function testPropertyNote()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
@@ -0,0 +1,117 @@
<?php
/**
* TrashAssignmentResponseTest
*
* 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
* Please update the test case below to test the model.
*/
namespace OmsorgCoreClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* TrashAssignmentResponseTest Class Doc Comment
*
* @category Class
* @description TrashAssignmentResponse
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class TrashAssignmentResponseTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "TrashAssignmentResponse"
*/
public function testTrashAssignmentResponse()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "id"
*/
public function testPropertyId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "employee_first_name"
*/
public function testPropertyEmployeeFirstName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "employee_last_name"
*/
public function testPropertyEmployeeLastName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "deleted_at"
*/
public function testPropertyDeletedAt()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
@@ -0,0 +1,90 @@
<?php
/**
* UpdateAssignmentRequestTest
*
* 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
* Please update the test case below to test the model.
*/
namespace OmsorgCoreClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* UpdateAssignmentRequestTest Class Doc Comment
*
* @category Class
* @description UpdateAssignmentRequest
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class UpdateAssignmentRequestTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "UpdateAssignmentRequest"
*/
public function testUpdateAssignmentRequest()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "note"
*/
public function testPropertyNote()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
@@ -0,0 +1,126 @@
<?php
/**
* UpdateAssignmentValidationSettingsRequestTest
*
* 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
* Please update the test case below to test the model.
*/
namespace OmsorgCoreClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* UpdateAssignmentValidationSettingsRequestTest Class Doc Comment
*
* @category Class
* @description UpdateAssignmentValidationSettingsRequest
* @package OmsorgCoreClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class UpdateAssignmentValidationSettingsRequestTest extends TestCase
{
/**
* Setup before running any test case
*/
public static function setUpBeforeClass(): void
{
}
/**
* Setup before running each test case
*/
public function setUp(): void
{
}
/**
* Clean up after running each test case
*/
public function tearDown(): void
{
}
/**
* Clean up after running all test cases
*/
public static function tearDownAfterClass(): void
{
}
/**
* Test "UpdateAssignmentValidationSettingsRequest"
*/
public function testUpdateAssignmentValidationSettingsRequest()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "qualification_mode"
*/
public function testPropertyQualificationMode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "absence_mode"
*/
public function testPropertyAbsenceMode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "working_hours_mode"
*/
public function testPropertyWorkingHoursMode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "overlap_mode"
*/
public function testPropertyOverlapMode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "contract_mode"
*/
public function testPropertyContractMode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}
+19 -1
View File
@@ -13,7 +13,25 @@ html{background:#031522}
body{
margin:0;min-height:100vh;color:var(--text);
font-family:Arial,Helvetica,sans-serif;line-height:1.45;
background:#031522;
background:
radial-gradient(
circle at 15% 10%,
rgba(16, 215, 230, 0.22),
transparent 33%
),
radial-gradient(
circle at 85% 85%,
rgba(18, 88, 99, 0.32),
transparent 38%
),
linear-gradient(
135deg,
#031522 0%,
#032a36 38%,
#0a3a47 68%,
#031522 100%
);
background-attachment:fixed;
}
a{color:inherit;text-decoration:none}
img{display:block;max-width:100%}
@@ -5,6 +5,8 @@ package.json
src/apis/AbsencesApi.ts
src/apis/AdminEmailApi.ts
src/apis/AdminSessionsApi.ts
src/apis/AssignmentValidationSettingsApi.ts
src/apis/AssignmentsApi.ts
src/apis/AuditLogApi.ts
src/apis/AuthApi.ts
src/apis/ContractsApi.ts
@@ -28,6 +30,10 @@ src/models/AbsenceDecisionRequest.ts
src/models/AbsenceResponse.ts
src/models/AbsenceResponsePagedResponse.ts
src/models/AddUserPermissionOverrideRequest.ts
src/models/AssignmentConflictResponse.ts
src/models/AssignmentResponse.ts
src/models/AssignmentResponsePagedResponse.ts
src/models/AssignmentValidationSettingsResponse.ts
src/models/AuditEventCategory.ts
src/models/AuditLogEntryResponse.ts
src/models/AuditLogEntryResponsePagedResponse.ts
@@ -35,6 +41,7 @@ src/models/ChangePasswordRequest.ts
src/models/ContractResponse.ts
src/models/ContractResponsePagedResponse.ts
src/models/CreateAbsenceRequest.ts
src/models/CreateAssignmentRequest.ts
src/models/CreateContractRequest.ts
src/models/CreateEmployeeFacilityDistanceRequest.ts
src/models/CreateEmployeeRequest.ts
@@ -85,6 +92,7 @@ src/models/TimeEntryDecisionRequest.ts
src/models/TimeEntryResponse.ts
src/models/TimeEntryResponsePagedResponse.ts
src/models/TrashAbsenceResponse.ts
src/models/TrashAssignmentResponse.ts
src/models/TrashContractResponse.ts
src/models/TrashEmployeeFacilityDistanceResponse.ts
src/models/TrashEmployeeResponse.ts
@@ -94,6 +102,8 @@ src/models/TrashFacilityResponse.ts
src/models/TrashOrderResponse.ts
src/models/TrashTimeEntryResponse.ts
src/models/UpdateAbsenceRequest.ts
src/models/UpdateAssignmentRequest.ts
src/models/UpdateAssignmentValidationSettingsRequest.ts
src/models/UpdateContractRequest.ts
src/models/UpdateDocumentRequest.ts
src/models/UpdateEmployeeFacilityDistanceRequest.ts
+2 -2
View File
@@ -12,9 +12,9 @@
"module": "./dist/esm/index.js",
"sideEffects": false,
"scripts": {
"generate": "bash generate.sh",
"build": "tsc && tsc -p tsconfig.esm.json",
"prepare": "npm run build",
"generate": "./generate.sh"
"prepare": "npm run build"
},
"devDependencies": {
"typescript": "^4.0 || ^5.0"
@@ -0,0 +1,110 @@
/* tslint:disable */
/* eslint-disable */
/**
* OmsorgCore.Api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import type {
AssignmentValidationSettingsResponse,
UpdateAssignmentValidationSettingsRequest,
} from '../models/index';
import {
AssignmentValidationSettingsResponseFromJSON,
AssignmentValidationSettingsResponseToJSON,
UpdateAssignmentValidationSettingsRequestFromJSON,
UpdateAssignmentValidationSettingsRequestToJSON,
} from '../models/index';
export interface ApiSettingsAssignmentValidationPutRequest {
updateAssignmentValidationSettingsRequest?: UpdateAssignmentValidationSettingsRequest;
}
/**
*
*/
export class AssignmentValidationSettingsApi extends runtime.BaseAPI {
/**
*/
async apiSettingsAssignmentValidationGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssignmentValidationSettingsResponse>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/settings/assignment-validation`;
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => AssignmentValidationSettingsResponseFromJSON(jsonValue));
}
/**
*/
async apiSettingsAssignmentValidationGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssignmentValidationSettingsResponse> {
const response = await this.apiSettingsAssignmentValidationGetRaw(initOverrides);
return await response.value();
}
/**
*/
async apiSettingsAssignmentValidationPutRaw(requestParameters: ApiSettingsAssignmentValidationPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssignmentValidationSettingsResponse>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/settings/assignment-validation`;
const response = await this.request({
path: urlPath,
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: UpdateAssignmentValidationSettingsRequestToJSON(requestParameters['updateAssignmentValidationSettingsRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => AssignmentValidationSettingsResponseFromJSON(jsonValue));
}
/**
*/
async apiSettingsAssignmentValidationPut(requestParameters: ApiSettingsAssignmentValidationPutRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssignmentValidationSettingsResponse> {
const response = await this.apiSettingsAssignmentValidationPutRaw(requestParameters, initOverrides);
return await response.value();
}
}
@@ -0,0 +1,359 @@
/* tslint:disable */
/* eslint-disable */
/**
* OmsorgCore.Api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import * as runtime from '../runtime';
import type {
AssignmentConflictResponse,
AssignmentResponse,
AssignmentResponsePagedResponse,
CreateAssignmentRequest,
UpdateAssignmentRequest,
} from '../models/index';
import {
AssignmentConflictResponseFromJSON,
AssignmentConflictResponseToJSON,
AssignmentResponseFromJSON,
AssignmentResponseToJSON,
AssignmentResponsePagedResponseFromJSON,
AssignmentResponsePagedResponseToJSON,
CreateAssignmentRequestFromJSON,
CreateAssignmentRequestToJSON,
UpdateAssignmentRequestFromJSON,
UpdateAssignmentRequestToJSON,
} from '../models/index';
export interface ApiAssignmentsCheckGetRequest {
orderId?: string;
employeeId?: string;
startDate?: Date;
endDate?: Date;
excludeAssignmentId?: string;
}
export interface ApiAssignmentsGetRequest {
orderId?: string;
employeeId?: string;
fromDate?: Date;
toDate?: Date;
page?: number;
pageSize?: number;
}
export interface ApiAssignmentsIdDeleteRequest {
id: string;
}
export interface ApiAssignmentsIdGetRequest {
id: string;
}
export interface ApiAssignmentsIdPutRequest {
id: string;
updateAssignmentRequest?: UpdateAssignmentRequest;
}
export interface ApiAssignmentsPostRequest {
createAssignmentRequest?: CreateAssignmentRequest;
}
/**
*
*/
export class AssignmentsApi extends runtime.BaseAPI {
/**
*/
async apiAssignmentsCheckGetRaw(requestParameters: ApiAssignmentsCheckGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AssignmentConflictResponse>>> {
const queryParameters: any = {};
if (requestParameters['orderId'] != null) {
queryParameters['orderId'] = requestParameters['orderId'];
}
if (requestParameters['employeeId'] != null) {
queryParameters['employeeId'] = requestParameters['employeeId'];
}
if (requestParameters['startDate'] != null) {
queryParameters['startDate'] = (requestParameters['startDate'] as any).toISOString().substring(0,10);
}
if (requestParameters['endDate'] != null) {
queryParameters['endDate'] = (requestParameters['endDate'] as any).toISOString().substring(0,10);
}
if (requestParameters['excludeAssignmentId'] != null) {
queryParameters['excludeAssignmentId'] = requestParameters['excludeAssignmentId'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/assignments/check`;
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(AssignmentConflictResponseFromJSON));
}
/**
*/
async apiAssignmentsCheckGet(requestParameters: ApiAssignmentsCheckGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AssignmentConflictResponse>> {
const response = await this.apiAssignmentsCheckGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
*/
async apiAssignmentsGetRaw(requestParameters: ApiAssignmentsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssignmentResponsePagedResponse>> {
const queryParameters: any = {};
if (requestParameters['orderId'] != null) {
queryParameters['orderId'] = requestParameters['orderId'];
}
if (requestParameters['employeeId'] != null) {
queryParameters['employeeId'] = requestParameters['employeeId'];
}
if (requestParameters['fromDate'] != null) {
queryParameters['fromDate'] = (requestParameters['fromDate'] as any).toISOString().substring(0,10);
}
if (requestParameters['toDate'] != null) {
queryParameters['toDate'] = (requestParameters['toDate'] as any).toISOString().substring(0,10);
}
if (requestParameters['page'] != null) {
queryParameters['page'] = requestParameters['page'];
}
if (requestParameters['pageSize'] != null) {
queryParameters['pageSize'] = requestParameters['pageSize'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/assignments`;
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => AssignmentResponsePagedResponseFromJSON(jsonValue));
}
/**
*/
async apiAssignmentsGet(requestParameters: ApiAssignmentsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssignmentResponsePagedResponse> {
const response = await this.apiAssignmentsGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
*/
async apiAssignmentsIdDeleteRaw(requestParameters: ApiAssignmentsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters['id'] == null) {
throw new runtime.RequiredError(
'id',
'Required parameter "id" was null or undefined when calling apiAssignmentsIdDelete().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/assignments/{id}`;
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
const response = await this.request({
path: urlPath,
method: 'DELETE',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
*/
async apiAssignmentsIdDelete(requestParameters: ApiAssignmentsIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.apiAssignmentsIdDeleteRaw(requestParameters, initOverrides);
}
/**
*/
async apiAssignmentsIdGetRaw(requestParameters: ApiAssignmentsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssignmentResponse>> {
if (requestParameters['id'] == null) {
throw new runtime.RequiredError(
'id',
'Required parameter "id" was null or undefined when calling apiAssignmentsIdGet().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/assignments/{id}`;
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => AssignmentResponseFromJSON(jsonValue));
}
/**
*/
async apiAssignmentsIdGet(requestParameters: ApiAssignmentsIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssignmentResponse> {
const response = await this.apiAssignmentsIdGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
*/
async apiAssignmentsIdPutRaw(requestParameters: ApiAssignmentsIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssignmentResponse>> {
if (requestParameters['id'] == null) {
throw new runtime.RequiredError(
'id',
'Required parameter "id" was null or undefined when calling apiAssignmentsIdPut().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/assignments/{id}`;
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
const response = await this.request({
path: urlPath,
method: 'PUT',
headers: headerParameters,
query: queryParameters,
body: UpdateAssignmentRequestToJSON(requestParameters['updateAssignmentRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => AssignmentResponseFromJSON(jsonValue));
}
/**
*/
async apiAssignmentsIdPut(requestParameters: ApiAssignmentsIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssignmentResponse> {
const response = await this.apiAssignmentsIdPutRaw(requestParameters, initOverrides);
return await response.value();
}
/**
*/
async apiAssignmentsPostRaw(requestParameters: ApiAssignmentsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssignmentResponse>> {
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
headerParameters['Content-Type'] = 'application/json';
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/assignments`;
const response = await this.request({
path: urlPath,
method: 'POST',
headers: headerParameters,
query: queryParameters,
body: CreateAssignmentRequestToJSON(requestParameters['createAssignmentRequest']),
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => AssignmentResponseFromJSON(jsonValue));
}
/**
*/
async apiAssignmentsPost(requestParameters: ApiAssignmentsPostRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssignmentResponse> {
const response = await this.apiAssignmentsPostRaw(requestParameters, initOverrides);
return await response.value();
}
}
@@ -16,6 +16,7 @@
import * as runtime from '../runtime';
import type {
TrashAbsenceResponse,
TrashAssignmentResponse,
TrashContractResponse,
TrashEmployeeFacilityDistanceResponse,
TrashEmployeeResponse,
@@ -28,6 +29,8 @@ import type {
import {
TrashAbsenceResponseFromJSON,
TrashAbsenceResponseToJSON,
TrashAssignmentResponseFromJSON,
TrashAssignmentResponseToJSON,
TrashContractResponseFromJSON,
TrashContractResponseToJSON,
TrashEmployeeFacilityDistanceResponseFromJSON,
@@ -54,6 +57,14 @@ export interface ApiTrashAbsencesIdRestorePostRequest {
id: string;
}
export interface ApiTrashAssignmentsGetRequest {
search?: string;
}
export interface ApiTrashAssignmentsIdRestorePostRequest {
id: string;
}
export interface ApiTrashContractsGetRequest {
search?: string;
}
@@ -204,6 +215,87 @@ export class TrashApi extends runtime.BaseAPI {
await this.apiTrashAbsencesIdRestorePostRaw(requestParameters, initOverrides);
}
/**
*/
async apiTrashAssignmentsGetRaw(requestParameters: ApiTrashAssignmentsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashAssignmentResponse>>> {
const queryParameters: any = {};
if (requestParameters['search'] != null) {
queryParameters['search'] = requestParameters['search'];
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/trash/assignments`;
const response = await this.request({
path: urlPath,
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(TrashAssignmentResponseFromJSON));
}
/**
*/
async apiTrashAssignmentsGet(requestParameters: ApiTrashAssignmentsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<TrashAssignmentResponse>> {
const response = await this.apiTrashAssignmentsGetRaw(requestParameters, initOverrides);
return await response.value();
}
/**
*/
async apiTrashAssignmentsIdRestorePostRaw(requestParameters: ApiTrashAssignmentsIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
if (requestParameters['id'] == null) {
throw new runtime.RequiredError(
'id',
'Required parameter "id" was null or undefined when calling apiTrashAssignmentsIdRestorePost().'
);
}
const queryParameters: any = {};
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.accessToken) {
const token = this.configuration.accessToken;
const tokenString = await token("Bearer", []);
if (tokenString) {
headerParameters["Authorization"] = `Bearer ${tokenString}`;
}
}
let urlPath = `/api/trash/assignments/{id}/restore`;
urlPath = urlPath.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id'])));
const response = await this.request({
path: urlPath,
method: 'POST',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.VoidApiResponse(response);
}
/**
*/
async apiTrashAssignmentsIdRestorePost(requestParameters: ApiTrashAssignmentsIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
await this.apiTrashAssignmentsIdRestorePostRaw(requestParameters, initOverrides);
}
/**
*/
async apiTrashContractsGetRaw(requestParameters: ApiTrashContractsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<TrashContractResponse>>> {
@@ -3,6 +3,8 @@
export * from './AbsencesApi';
export * from './AdminEmailApi';
export * from './AdminSessionsApi';
export * from './AssignmentValidationSettingsApi';
export * from './AssignmentsApi';
export * from './AuditLogApi';
export * from './AuthApi';
export * from './ContractsApi';
@@ -0,0 +1,81 @@
/* tslint:disable */
/* eslint-disable */
/**
* OmsorgCore.Api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface AssignmentConflictResponse
*/
export interface AssignmentConflictResponse {
/**
*
* @type {string}
* @memberof AssignmentConflictResponse
*/
type?: string | null;
/**
*
* @type {string}
* @memberof AssignmentConflictResponse
*/
severity?: string | null;
/**
*
* @type {string}
* @memberof AssignmentConflictResponse
*/
message?: string | null;
}
/**
* Check if a given object implements the AssignmentConflictResponse interface.
*/
export function instanceOfAssignmentConflictResponse(value: object): value is AssignmentConflictResponse {
return true;
}
export function AssignmentConflictResponseFromJSON(json: any): AssignmentConflictResponse {
return AssignmentConflictResponseFromJSONTyped(json, false);
}
export function AssignmentConflictResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssignmentConflictResponse {
if (json == null) {
return json;
}
return {
'type': json['type'] == null ? undefined : json['type'],
'severity': json['severity'] == null ? undefined : json['severity'],
'message': json['message'] == null ? undefined : json['message'],
};
}
export function AssignmentConflictResponseToJSON(json: any): AssignmentConflictResponse {
return AssignmentConflictResponseToJSONTyped(json, false);
}
export function AssignmentConflictResponseToJSONTyped(value?: AssignmentConflictResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'type': value['type'],
'severity': value['severity'],
'message': value['message'],
};
}
@@ -0,0 +1,137 @@
/* tslint:disable */
/* eslint-disable */
/**
* OmsorgCore.Api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { AssignmentConflictResponse } from './AssignmentConflictResponse';
import {
AssignmentConflictResponseFromJSON,
AssignmentConflictResponseFromJSONTyped,
AssignmentConflictResponseToJSON,
AssignmentConflictResponseToJSONTyped,
} from './AssignmentConflictResponse';
/**
*
* @export
* @interface AssignmentResponse
*/
export interface AssignmentResponse {
/**
*
* @type {string}
* @memberof AssignmentResponse
*/
id?: string;
/**
*
* @type {string}
* @memberof AssignmentResponse
*/
orderId?: string;
/**
*
* @type {string}
* @memberof AssignmentResponse
*/
employeeId?: string;
/**
*
* @type {string}
* @memberof AssignmentResponse
*/
employeeFirstName?: string | null;
/**
*
* @type {string}
* @memberof AssignmentResponse
*/
employeeLastName?: string | null;
/**
*
* @type {Date}
* @memberof AssignmentResponse
*/
startDate?: Date;
/**
*
* @type {Date}
* @memberof AssignmentResponse
*/
endDate?: Date;
/**
*
* @type {string}
* @memberof AssignmentResponse
*/
note?: string | null;
/**
*
* @type {Array<AssignmentConflictResponse>}
* @memberof AssignmentResponse
*/
conflicts?: Array<AssignmentConflictResponse> | null;
}
/**
* Check if a given object implements the AssignmentResponse interface.
*/
export function instanceOfAssignmentResponse(value: object): value is AssignmentResponse {
return true;
}
export function AssignmentResponseFromJSON(json: any): AssignmentResponse {
return AssignmentResponseFromJSONTyped(json, false);
}
export function AssignmentResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssignmentResponse {
if (json == null) {
return json;
}
return {
'id': json['id'] == null ? undefined : json['id'],
'orderId': json['orderId'] == null ? undefined : json['orderId'],
'employeeId': json['employeeId'] == null ? undefined : json['employeeId'],
'employeeFirstName': json['employeeFirstName'] == null ? undefined : json['employeeFirstName'],
'employeeLastName': json['employeeLastName'] == null ? undefined : json['employeeLastName'],
'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
'note': json['note'] == null ? undefined : json['note'],
'conflicts': json['conflicts'] == null ? undefined : ((json['conflicts'] as Array<any>).map(AssignmentConflictResponseFromJSON)),
};
}
export function AssignmentResponseToJSON(json: any): AssignmentResponse {
return AssignmentResponseToJSONTyped(json, false);
}
export function AssignmentResponseToJSONTyped(value?: AssignmentResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'id': value['id'],
'orderId': value['orderId'],
'employeeId': value['employeeId'],
'employeeFirstName': value['employeeFirstName'],
'employeeLastName': value['employeeLastName'],
'startDate': value['startDate'] == null ? undefined : ((value['startDate']).toISOString().substring(0,10)),
'endDate': value['endDate'] == null ? undefined : ((value['endDate']).toISOString().substring(0,10)),
'note': value['note'],
'conflicts': value['conflicts'] == null ? undefined : ((value['conflicts'] as Array<any>).map(AssignmentConflictResponseToJSON)),
};
}
@@ -0,0 +1,97 @@
/* tslint:disable */
/* eslint-disable */
/**
* OmsorgCore.Api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { AssignmentResponse } from './AssignmentResponse';
import {
AssignmentResponseFromJSON,
AssignmentResponseFromJSONTyped,
AssignmentResponseToJSON,
AssignmentResponseToJSONTyped,
} from './AssignmentResponse';
/**
*
* @export
* @interface AssignmentResponsePagedResponse
*/
export interface AssignmentResponsePagedResponse {
/**
*
* @type {Array<AssignmentResponse>}
* @memberof AssignmentResponsePagedResponse
*/
items?: Array<AssignmentResponse> | null;
/**
*
* @type {number}
* @memberof AssignmentResponsePagedResponse
*/
totalCount?: number;
/**
*
* @type {number}
* @memberof AssignmentResponsePagedResponse
*/
page?: number;
/**
*
* @type {number}
* @memberof AssignmentResponsePagedResponse
*/
pageSize?: number;
}
/**
* Check if a given object implements the AssignmentResponsePagedResponse interface.
*/
export function instanceOfAssignmentResponsePagedResponse(value: object): value is AssignmentResponsePagedResponse {
return true;
}
export function AssignmentResponsePagedResponseFromJSON(json: any): AssignmentResponsePagedResponse {
return AssignmentResponsePagedResponseFromJSONTyped(json, false);
}
export function AssignmentResponsePagedResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssignmentResponsePagedResponse {
if (json == null) {
return json;
}
return {
'items': json['items'] == null ? undefined : ((json['items'] as Array<any>).map(AssignmentResponseFromJSON)),
'totalCount': json['totalCount'] == null ? undefined : json['totalCount'],
'page': json['page'] == null ? undefined : json['page'],
'pageSize': json['pageSize'] == null ? undefined : json['pageSize'],
};
}
export function AssignmentResponsePagedResponseToJSON(json: any): AssignmentResponsePagedResponse {
return AssignmentResponsePagedResponseToJSONTyped(json, false);
}
export function AssignmentResponsePagedResponseToJSONTyped(value?: AssignmentResponsePagedResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'items': value['items'] == null ? undefined : ((value['items'] as Array<any>).map(AssignmentResponseToJSON)),
'totalCount': value['totalCount'],
'page': value['page'],
'pageSize': value['pageSize'],
};
}
@@ -0,0 +1,97 @@
/* tslint:disable */
/* eslint-disable */
/**
* OmsorgCore.Api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface AssignmentValidationSettingsResponse
*/
export interface AssignmentValidationSettingsResponse {
/**
*
* @type {string}
* @memberof AssignmentValidationSettingsResponse
*/
qualificationMode?: string | null;
/**
*
* @type {string}
* @memberof AssignmentValidationSettingsResponse
*/
absenceMode?: string | null;
/**
*
* @type {string}
* @memberof AssignmentValidationSettingsResponse
*/
workingHoursMode?: string | null;
/**
*
* @type {string}
* @memberof AssignmentValidationSettingsResponse
*/
overlapMode?: string | null;
/**
*
* @type {string}
* @memberof AssignmentValidationSettingsResponse
*/
contractMode?: string | null;
}
/**
* Check if a given object implements the AssignmentValidationSettingsResponse interface.
*/
export function instanceOfAssignmentValidationSettingsResponse(value: object): value is AssignmentValidationSettingsResponse {
return true;
}
export function AssignmentValidationSettingsResponseFromJSON(json: any): AssignmentValidationSettingsResponse {
return AssignmentValidationSettingsResponseFromJSONTyped(json, false);
}
export function AssignmentValidationSettingsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AssignmentValidationSettingsResponse {
if (json == null) {
return json;
}
return {
'qualificationMode': json['qualificationMode'] == null ? undefined : json['qualificationMode'],
'absenceMode': json['absenceMode'] == null ? undefined : json['absenceMode'],
'workingHoursMode': json['workingHoursMode'] == null ? undefined : json['workingHoursMode'],
'overlapMode': json['overlapMode'] == null ? undefined : json['overlapMode'],
'contractMode': json['contractMode'] == null ? undefined : json['contractMode'],
};
}
export function AssignmentValidationSettingsResponseToJSON(json: any): AssignmentValidationSettingsResponse {
return AssignmentValidationSettingsResponseToJSONTyped(json, false);
}
export function AssignmentValidationSettingsResponseToJSONTyped(value?: AssignmentValidationSettingsResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'qualificationMode': value['qualificationMode'],
'absenceMode': value['absenceMode'],
'workingHoursMode': value['workingHoursMode'],
'overlapMode': value['overlapMode'],
'contractMode': value['contractMode'],
};
}
@@ -0,0 +1,97 @@
/* tslint:disable */
/* eslint-disable */
/**
* OmsorgCore.Api
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 1.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
/**
*
* @export
* @interface CreateAssignmentRequest
*/
export interface CreateAssignmentRequest {
/**
*
* @type {string}
* @memberof CreateAssignmentRequest
*/
orderId?: string;
/**
*
* @type {string}
* @memberof CreateAssignmentRequest
*/
employeeId?: string;
/**
*
* @type {Date}
* @memberof CreateAssignmentRequest
*/
startDate?: Date;
/**
*
* @type {Date}
* @memberof CreateAssignmentRequest
*/
endDate?: Date;
/**
*
* @type {string}
* @memberof CreateAssignmentRequest
*/
note?: string | null;
}
/**
* Check if a given object implements the CreateAssignmentRequest interface.
*/
export function instanceOfCreateAssignmentRequest(value: object): value is CreateAssignmentRequest {
return true;
}
export function CreateAssignmentRequestFromJSON(json: any): CreateAssignmentRequest {
return CreateAssignmentRequestFromJSONTyped(json, false);
}
export function CreateAssignmentRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateAssignmentRequest {
if (json == null) {
return json;
}
return {
'orderId': json['orderId'] == null ? undefined : json['orderId'],
'employeeId': json['employeeId'] == null ? undefined : json['employeeId'],
'startDate': json['startDate'] == null ? undefined : (new Date(json['startDate'])),
'endDate': json['endDate'] == null ? undefined : (new Date(json['endDate'])),
'note': json['note'] == null ? undefined : json['note'],
};
}
export function CreateAssignmentRequestToJSON(json: any): CreateAssignmentRequest {
return CreateAssignmentRequestToJSONTyped(json, false);
}
export function CreateAssignmentRequestToJSONTyped(value?: CreateAssignmentRequest | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'orderId': value['orderId'],
'employeeId': value['employeeId'],
'startDate': value['startDate'] == null ? undefined : ((value['startDate']).toISOString().substring(0,10)),
'endDate': value['endDate'] == null ? undefined : ((value['endDate']).toISOString().substring(0,10)),
'note': value['note'],
};
}
@@ -25,6 +25,12 @@ export interface CreateFacilityRequest {
* @memberof CreateFacilityRequest
*/
name?: string | null;
/**
*
* @type {string}
* @memberof CreateFacilityRequest
*/
crmStatus?: string | null;
/**
*
* @type {string}
@@ -85,6 +91,90 @@ export interface CreateFacilityRequest {
* @memberof CreateFacilityRequest
*/
billingCountry?: string | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
followUpDays?: number | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
billingRate?: number | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
nightSurchargePercent?: number | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
saturdaySurchargePercent?: number | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
sundaySurchargePercent?: number | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
holidaySurchargePercent?: number | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
travelCostRate?: number | null;
/**
*
* @type {string}
* @memberof CreateFacilityRequest
*/
travelCostMode?: string | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
travelCostPerKm?: number | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
mealAllowanceRate?: number | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
minimumHours?: number | null;
/**
*
* @type {string}
* @memberof CreateFacilityRequest
*/
billingInterval?: string | null;
/**
*
* @type {number}
* @memberof CreateFacilityRequest
*/
paymentTermDays?: number | null;
/**
*
* @type {string}
* @memberof CreateFacilityRequest
*/
individualAgreements?: string | null;
}
/**
@@ -105,6 +195,7 @@ export function CreateFacilityRequestFromJSONTyped(json: any, ignoreDiscriminato
return {
'name': json['name'] == null ? undefined : json['name'],
'crmStatus': json['crmStatus'] == null ? undefined : json['crmStatus'],
'facilityType': json['facilityType'] == null ? undefined : json['facilityType'],
'website': json['website'] == null ? undefined : json['website'],
'street': json['street'] == null ? undefined : json['street'],
@@ -115,6 +206,20 @@ export function CreateFacilityRequestFromJSONTyped(json: any, ignoreDiscriminato
'billingPostalCode': json['billingPostalCode'] == null ? undefined : json['billingPostalCode'],
'billingCity': json['billingCity'] == null ? undefined : json['billingCity'],
'billingCountry': json['billingCountry'] == null ? undefined : json['billingCountry'],
'followUpDays': json['followUpDays'] == null ? undefined : json['followUpDays'],
'billingRate': json['billingRate'] == null ? undefined : json['billingRate'],
'nightSurchargePercent': json['nightSurchargePercent'] == null ? undefined : json['nightSurchargePercent'],
'saturdaySurchargePercent': json['saturdaySurchargePercent'] == null ? undefined : json['saturdaySurchargePercent'],
'sundaySurchargePercent': json['sundaySurchargePercent'] == null ? undefined : json['sundaySurchargePercent'],
'holidaySurchargePercent': json['holidaySurchargePercent'] == null ? undefined : json['holidaySurchargePercent'],
'travelCostRate': json['travelCostRate'] == null ? undefined : json['travelCostRate'],
'travelCostMode': json['travelCostMode'] == null ? undefined : json['travelCostMode'],
'travelCostPerKm': json['travelCostPerKm'] == null ? undefined : json['travelCostPerKm'],
'mealAllowanceRate': json['mealAllowanceRate'] == null ? undefined : json['mealAllowanceRate'],
'minimumHours': json['minimumHours'] == null ? undefined : json['minimumHours'],
'billingInterval': json['billingInterval'] == null ? undefined : json['billingInterval'],
'paymentTermDays': json['paymentTermDays'] == null ? undefined : json['paymentTermDays'],
'individualAgreements': json['individualAgreements'] == null ? undefined : json['individualAgreements'],
};
}
@@ -130,6 +235,7 @@ export function CreateFacilityRequestToJSONTyped(value?: CreateFacilityRequest |
return {
'name': value['name'],
'crmStatus': value['crmStatus'],
'facilityType': value['facilityType'],
'website': value['website'],
'street': value['street'],
@@ -140,6 +246,20 @@ export function CreateFacilityRequestToJSONTyped(value?: CreateFacilityRequest |
'billingPostalCode': value['billingPostalCode'],
'billingCity': value['billingCity'],
'billingCountry': value['billingCountry'],
'followUpDays': value['followUpDays'],
'billingRate': value['billingRate'],
'nightSurchargePercent': value['nightSurchargePercent'],
'saturdaySurchargePercent': value['saturdaySurchargePercent'],
'sundaySurchargePercent': value['sundaySurchargePercent'],
'holidaySurchargePercent': value['holidaySurchargePercent'],
'travelCostRate': value['travelCostRate'],
'travelCostMode': value['travelCostMode'],
'travelCostPerKm': value['travelCostPerKm'],
'mealAllowanceRate': value['mealAllowanceRate'],
'minimumHours': value['minimumHours'],
'billingInterval': value['billingInterval'],
'paymentTermDays': value['paymentTermDays'],
'individualAgreements': value['individualAgreements'],
};
}

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