Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore:OH2-406 | Align API specs. Fix breaking changes introduced by O…
Browse files Browse the repository at this point in the history
SilverD3 committed Oct 4, 2024
1 parent 3567635 commit 94265f5
Showing 22 changed files with 1,083 additions and 1,067 deletions.
1,041 changes: 516 additions & 525 deletions api/oh.yaml

Large diffs are not rendered by default.

252 changes: 127 additions & 125 deletions src/generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,129 +1,131 @@
.gitignore
apis/AdmissionTypesApi.ts
apis/AdmissionsApi.ts
apis/AgeTypesApi.ts
apis/BillsApi.ts
apis/DeliveryResultTypeApi.ts
apis/DeliveryTypeApi.ts
apis/DischargeTypeApi.ts
apis/DiseaseTypesApi.ts
apis/DiseasesApi.ts
apis/ExamRowsApi.ts
apis/ExamTypesApi.ts
apis/ExaminationsApi.ts
apis/ExamsApi.ts
apis/HospitalsApi.ts
apis/LaboratoriesApi.ts
apis/LoginApi.ts
apis/MalnutritionsApi.ts
apis/MedicalStockMovementTypeApi.ts
apis/MedicalStockWardApi.ts
apis/MedicalTypesApi.ts
apis/MedicalsApi.ts
apis/OpdsApi.ts
apis/OperationsApi.ts
apis/OperationsTypesApi.ts
apis/OthersPriceApi.ts
apis/PatientConsensusApi.ts
apis/PatientVaccinesApi.ts
apis/PatientsApi.ts
apis/PermissionsApi.ts
apis/PregnantTreatmentTypesApi.ts
apis/PriceListsApi.ts
apis/ReportsApi.ts
apis/SMSApi.ts
apis/StockMovementsApi.ts
apis/SuppliersApi.ts
apis/TherapiesApi.ts
apis/UsersApi.ts
apis/VaccineTypeApi.ts
apis/VaccinesApi.ts
apis/VisitApi.ts
apis/WardsApi.ts
apis/index.ts
apis\AdmissionTypesApi.ts
apis\AdmissionsApi.ts
apis\AgeTypesApi.ts
apis\BillsApi.ts
apis\DeliveryResultTypeApi.ts
apis\DeliveryTypeApi.ts
apis\DischargeTypeApi.ts
apis\DiseaseTypesApi.ts
apis\DiseasesApi.ts
apis\ExamRowsApi.ts
apis\ExamTypesApi.ts
apis\ExaminationsApi.ts
apis\ExamsApi.ts
apis\HospitalsApi.ts
apis\LaboratoriesApi.ts
apis\LoginApi.ts
apis\MalnutritionsApi.ts
apis\MedicalStockMovementTypeApi.ts
apis\MedicalStockWardApi.ts
apis\MedicalTypesApi.ts
apis\MedicalsApi.ts
apis\OpdsApi.ts
apis\OperationsApi.ts
apis\OperationsTypesApi.ts
apis\OthersPriceApi.ts
apis\PatientConsensusApi.ts
apis\PatientVaccinesApi.ts
apis\PatientsApi.ts
apis\PermissionsApi.ts
apis\PregnantTreatmentTypesApi.ts
apis\PriceListsApi.ts
apis\ReportsApi.ts
apis\SMSApi.ts
apis\StockMovementsApi.ts
apis\SuppliersApi.ts
apis\TherapiesApi.ts
apis\UserGroupsApi.ts
apis\UserSettingsApi.ts
apis\UsersApi.ts
apis\VaccineTypeApi.ts
apis\VaccinesApi.ts
apis\VisitApi.ts
apis\WardsApi.ts
apis\index.ts
index.ts
models/AdmissionDTO.ts
models/AdmissionTypeDTO.ts
models/AdmittedPatientDTO.ts
models/AgeType.ts
models/AgeTypeDTO.ts
models/BillDTO.ts
models/BillItemsDTO.ts
models/BillPaymentsDTO.ts
models/DeliveryResultTypeDTO.ts
models/DeliveryTypeDTO.ts
models/DischargeTypeDTO.ts
models/DiseaseDTO.ts
models/DiseaseTypeDTO.ts
models/ExamDTO.ts
models/ExamRowDTO.ts
models/ExamTypeDTO.ts
models/FullBillDTO.ts
models/HospitalDTO.ts
models/LabWithRowsDTO.ts
models/LaboratoryDTO.ts
models/LitePermissionDTO.ts
models/LoginRequest.ts
models/LoginResponse.ts
models/LotDTO.ts
models/MalnutritionDTO.ts
models/MedicalDTO.ts
models/MedicalTypeDTO.ts
models/MedicalWardDTO.ts
models/MedicalWardIdDTO.ts
models/MovementDTO.ts
models/MovementTypeDTO.ts
models/MovementWardDTO.ts
models/OpdDTO.ts
models/OpdWithOperationRowDTO.ts
models/OperationDTO.ts
models/OperationRowDTO.ts
models/OperationTypeDTO.ts
models/PageAdmissionDTO.ts
models/PageInfoDTO.ts
models/PageLabWithRowsDTO.ts
models/PageOpdDTO.ts
models/PagePatientDTO.ts
models/PagePatientExaminationDTO.ts
models/Patient.ts
models/PatientConsensus.ts
models/PatientConsensusDTO.ts
models/PatientDTO.ts
models/PatientExaminationDTO.ts
models/PatientProfilePhoto.ts
models/PatientProfilePhotoPhotoAsImage.ts
models/PatientProfilePhotoPhotoAsImageGraphics.ts
models/PatientProfilePhotoPhotoAsImageGraphicsClip.ts
models/PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts
models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts
models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsLocation.ts
models/PatientProfilePhotoPhotoAsImageGraphicsClipBoundsSize.ts
models/PatientProfilePhotoPhotoAsImageGraphicsColor.ts
models/PatientProfilePhotoPhotoAsImageGraphicsColorColorSpace.ts
models/PatientProfilePhotoPhotoAsImageGraphicsFont.ts
models/PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts
models/PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext.ts
models/PatientProfilePhotoPhotoAsImageGraphicsFontTransform.ts
models/PatientVaccineDTO.ts
models/PermissionDTO.ts
models/PregnantTreatmentTypeDTO.ts
models/PriceDTO.ts
models/PriceList.ts
models/PriceListDTO.ts
models/PricesOthersDTO.ts
models/SmsDTO.ts
models/SupplierDTO.ts
models/TherapyDTO.ts
models/TherapyRow.ts
models/TherapyRowDTO.ts
models/UserDTO.ts
models/UserGroupDTO.ts
models/UserProfileDTO.ts
models/UserSettingDTO.ts
models/VaccineDTO.ts
models/VaccineTypeDTO.ts
models/VisitDTO.ts
models/WardDTO.ts
models/index.ts
models\AdmissionDTO.ts
models\AdmissionTypeDTO.ts
models\AdmittedPatientDTO.ts
models\AgeType.ts
models\AgeTypeDTO.ts
models\BillDTO.ts
models\BillItemsDTO.ts
models\BillPaymentsDTO.ts
models\DeliveryResultTypeDTO.ts
models\DeliveryTypeDTO.ts
models\DischargeTypeDTO.ts
models\DiseaseDTO.ts
models\DiseaseTypeDTO.ts
models\ExamDTO.ts
models\ExamRowDTO.ts
models\ExamTypeDTO.ts
models\FullBillDTO.ts
models\HospitalDTO.ts
models\LabWithRowsDTO.ts
models\LaboratoryDTO.ts
models\LoginRequest.ts
models\LoginResponse.ts
models\LotDTO.ts
models\MalnutritionDTO.ts
models\MedicalDTO.ts
models\MedicalTypeDTO.ts
models\MedicalWardDTO.ts
models\MedicalWardIdDTO.ts
models\MovementDTO.ts
models\MovementTypeDTO.ts
models\MovementWardDTO.ts
models\OpdDTO.ts
models\OpdWithOperationRowDTO.ts
models\OperationDTO.ts
models\OperationRowDTO.ts
models\OperationTypeDTO.ts
models\PageAdmissionDTO.ts
models\PageInfoDTO.ts
models\PageLabWithRowsDTO.ts
models\PageOpdDTO.ts
models\PagePatientDTO.ts
models\PagePatientExaminationDTO.ts
models\Patient.ts
models\PatientConsensus.ts
models\PatientConsensusDTO.ts
models\PatientDTO.ts
models\PatientExaminationDTO.ts
models\PatientProfilePhoto.ts
models\PatientProfilePhotoPhotoAsImage.ts
models\PatientProfilePhotoPhotoAsImageGraphics.ts
models\PatientProfilePhotoPhotoAsImageGraphicsClip.ts
models\PatientProfilePhotoPhotoAsImageGraphicsClipBounds.ts
models\PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D.ts
models\PatientProfilePhotoPhotoAsImageGraphicsClipBoundsLocation.ts
models\PatientProfilePhotoPhotoAsImageGraphicsClipBoundsSize.ts
models\PatientProfilePhotoPhotoAsImageGraphicsColor.ts
models\PatientProfilePhotoPhotoAsImageGraphicsColorColorSpace.ts
models\PatientProfilePhotoPhotoAsImageGraphicsFont.ts
models\PatientProfilePhotoPhotoAsImageGraphicsFontMetrics.ts
models\PatientProfilePhotoPhotoAsImageGraphicsFontMetricsFontRenderContext.ts
models\PatientProfilePhotoPhotoAsImageGraphicsFontTransform.ts
models\PatientVaccineDTO.ts
models\PermissionDTO.ts
models\PregnantTreatmentTypeDTO.ts
models\PriceDTO.ts
models\PriceList.ts
models\PriceListDTO.ts
models\PricesOthersDTO.ts
models\SmsDTO.ts
models\SupplierDTO.ts
models\TherapyDTO.ts
models\TherapyRow.ts
models\TherapyRowDTO.ts
models\TokenRefreshRequest.ts
models\UserDTO.ts
models\UserGroupDTO.ts
models\UserProfileDTO.ts
models\UserSettingDTO.ts
models\VaccineDTO.ts
models\VaccineTypeDTO.ts
models\VisitDTO.ts
models\WardDTO.ts
models\index.ts
runtime.ts
tsconfig.json
25 changes: 25 additions & 0 deletions src/generated/apis/LoginApi.ts
Original file line number Diff line number Diff line change
@@ -16,12 +16,17 @@ import { BaseAPI, HttpHeaders, throwIfNullOrUndefined, OperationOpts, RawAjaxRes
import {
LoginRequest,
LoginResponse,
TokenRefreshRequest,
} from '../models';

export interface AuthenticateUserRequest {
loginRequest: LoginRequest;
}

export interface RefreshTokenRequest {
tokenRefreshRequest: TokenRefreshRequest;
}

/**
* no description
*/
@@ -64,4 +69,24 @@ export class LoginApi extends BaseAPI {
}, opts?.responseOpts);
};

/**
*/
refreshToken({ tokenRefreshRequest }: RefreshTokenRequest): Observable<LoginResponse>
refreshToken({ tokenRefreshRequest }: RefreshTokenRequest, opts?: OperationOpts): Observable<RawAjaxResponse<LoginResponse>>
refreshToken({ tokenRefreshRequest }: RefreshTokenRequest, opts?: OperationOpts): Observable<LoginResponse | RawAjaxResponse<LoginResponse>> {
throwIfNullOrUndefined(tokenRefreshRequest, 'tokenRefreshRequest', 'refreshToken');

const headers: HttpHeaders = {
'Content-Type': 'application/json',
...(this.configuration.username != null && this.configuration.password != null ? { Authorization: `Basic ${btoa(this.configuration.username + ':' + this.configuration.password)}` } : undefined),
};

return this.request<LoginResponse>({
url: '/auth/refresh-token',
method: 'POST',
headers,
body: tokenRefreshRequest,
}, opts?.responseOpts);
};

}
Loading

0 comments on commit 94265f5

Please sign in to comment.