Skip to content

Commit

Permalink
chore: update oh.yaml from api + generated
Browse files Browse the repository at this point in the history
  • Loading branch information
gasp committed Sep 13, 2024
1 parent 6774647 commit 7689839
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 33 deletions.
70 changes: 70 additions & 0 deletions src/generated/apis/UsersApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ import {
UserSettingDTO,
} from '../models';

export interface AssignPermissionRequest {
groupCode: string;
id: number;
}

export interface DeleteGroupRequest {
groupCode: string;
}
Expand All @@ -41,6 +46,10 @@ export interface GetUserByNameRequest {
username: string;
}

export interface GetUserGroup1Request {
groupCode: string;
}

export interface GetUserSettingByIdRequest {
id: number;
}
Expand All @@ -66,6 +75,11 @@ export interface RetrievePermissionsByUsernameRequest {
username: string;
}

export interface RevokePermissionRequest {
groupCode: string;
id: number;
}

export interface UpdateUserRequest {
userDTO: UserDTO;
password?: boolean;
Expand All @@ -85,6 +99,25 @@ export interface UpdateUserSettingsRequest {
*/
export class UsersApi extends BaseAPI {

/**
*/
assignPermission({ groupCode, id }: AssignPermissionRequest): Observable<boolean>
assignPermission({ groupCode, id }: AssignPermissionRequest, opts?: OperationOpts): Observable<RawAjaxResponse<boolean>>
assignPermission({ groupCode, id }: AssignPermissionRequest, opts?: OperationOpts): Observable<boolean | RawAjaxResponse<boolean>> {
throwIfNullOrUndefined(groupCode, 'groupCode', 'assignPermission');
throwIfNullOrUndefined(id, 'id', 'assignPermission');

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

return this.request<boolean>({
url: '/users/groups/{group_code}/permissions/{id}'.replace('{group_code}', encodeURI(groupCode)).replace('{id}', encodeURI(id)),
method: 'POST',
headers,
}, opts?.responseOpts);
};

/**
*/
deleteGroup({ groupCode }: DeleteGroupRequest): Observable<boolean>
Expand Down Expand Up @@ -195,6 +228,24 @@ export class UsersApi extends BaseAPI {
}, opts?.responseOpts);
};

/**
*/
getUserGroup1({ groupCode }: GetUserGroup1Request): Observable<UserGroupDTO>
getUserGroup1({ groupCode }: GetUserGroup1Request, opts?: OperationOpts): Observable<RawAjaxResponse<UserGroupDTO>>
getUserGroup1({ groupCode }: GetUserGroup1Request, opts?: OperationOpts): Observable<UserGroupDTO | RawAjaxResponse<UserGroupDTO>> {
throwIfNullOrUndefined(groupCode, 'groupCode', 'getUserGroup1');

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

return this.request<UserGroupDTO>({
url: '/users/groups/{group_code}'.replace('{group_code}', encodeURI(groupCode)),
method: 'GET',
headers,
}, opts?.responseOpts);
};

/**
*/
getUserSettingById({ id }: GetUserSettingByIdRequest): Observable<UserSettingDTO>
Expand Down Expand Up @@ -358,6 +409,25 @@ export class UsersApi extends BaseAPI {
}, opts?.responseOpts);
};

/**
*/
revokePermission({ groupCode, id }: RevokePermissionRequest): Observable<boolean>
revokePermission({ groupCode, id }: RevokePermissionRequest, opts?: OperationOpts): Observable<RawAjaxResponse<boolean>>
revokePermission({ groupCode, id }: RevokePermissionRequest, opts?: OperationOpts): Observable<boolean | RawAjaxResponse<boolean>> {
throwIfNullOrUndefined(groupCode, 'groupCode', 'revokePermission');
throwIfNullOrUndefined(id, 'id', 'revokePermission');

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

return this.request<boolean>({
url: '/users/groups/{group_code}/permissions/{id}'.replace('{group_code}', encodeURI(groupCode)).replace('{id}', encodeURI(id)),
method: 'DELETE',
headers,
}, opts?.responseOpts);
};

/**
*/
updateUser({ userDTO, password }: UpdateUserRequest): Observable<boolean>
Expand Down
8 changes: 4 additions & 4 deletions src/generated/models/AdmissionDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ export interface AdmissionDTO {
*/
deleted: string;
/**
* @type {number}
* @type {string}
* @memberof AdmissionDTO
*/
yprog?: number;
fhu?: string;
/**
* @type {string}
* @type {number}
* @memberof AdmissionDTO
*/
fhu?: string;
yprog?: number;
}
4 changes: 2 additions & 2 deletions src/generated/models/Patient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ export interface Patient {
* @type {string}
* @memberof Patient
*/
searchString?: string;
informations?: string;
/**
* @type {string}
* @memberof Patient
*/
informations?: string;
searchString?: string;
}
2 changes: 1 addition & 1 deletion src/generated/models/PatientDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export interface PatientDTO {
lock?: number;
/**
* BlobPhoto
* @type {Array<string>}
* @type {string}
* @memberof PatientDTO
*/
blobPhoto?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,17 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D {
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D
*/
width?: number;
/**
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D
*/
height?: number;
y?: number;
/**
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D
*/
y?: number;
x?: number;
/**
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D
*/
x?: number;
width?: number;
/**
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D
Expand All @@ -61,6 +56,11 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D {
* @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D
*/
centerY?: number;
/**
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D
*/
height?: number;
/**
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsClipBoundsBounds2D
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFontMetrics {
* @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics
*/
font?: PatientProfilePhotoPhotoAsImageGraphicsFont;
/**
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics
*/
height?: number;
/**
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics
Expand Down Expand Up @@ -61,6 +56,11 @@ export interface PatientProfilePhotoPhotoAsImageGraphicsFontMetrics {
* @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics
*/
maxAdvance?: number;
/**
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics
*/
height?: number;
/**
* @type {number}
* @memberof PatientProfilePhotoPhotoAsImageGraphicsFontMetrics
Expand Down
1 change: 1 addition & 0 deletions src/generated/models/PermissionDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

/**
* List of group\'s permissions
* @export
* @interface PermissionDTO
*/
Expand Down
6 changes: 0 additions & 6 deletions src/generated/models/SupplierDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,4 @@ export interface SupplierDTO {
* @memberof SupplierDTO
*/
supNote?: string;
/**
* Flag record deleted, values are \'Y\' OR \'N\'
* @type {string}
* @memberof SupplierDTO
*/
supDeleted: string;
}
10 changes: 5 additions & 5 deletions src/generated/models/TherapyRow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,18 @@ export interface TherapyRow {
*/
smsInt: number;
/**
* @type {boolean}
* @type {number}
* @memberof TherapyRow
*/
sms?: boolean;
medical?: number;
/**
* @type {boolean}
* @memberof TherapyRow
*/
notify?: boolean;
sms?: boolean;
/**
* @type {number}
* @type {boolean}
* @memberof TherapyRow
*/
medical?: number;
notify?: boolean;
}
10 changes: 10 additions & 0 deletions src/generated/models/UserGroupDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
* Do not edit the class manually.
*/

import {
PermissionDTO,
} from './';

/**
* The user\'s group
* @export
Expand All @@ -29,4 +33,10 @@ export interface UserGroupDTO {
* @memberof UserGroupDTO
*/
desc?: string;
/**
* List of group\'s permissions
* @type {Array<PermissionDTO>}
* @memberof UserGroupDTO
*/
permissions?: Array<PermissionDTO>;
}
4 changes: 2 additions & 2 deletions src/generated/models/WardDTO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ export interface WardDTO {
* @type {boolean}
* @memberof WardDTO
*/
female?: boolean;
male?: boolean;
/**
* @type {boolean}
* @memberof WardDTO
*/
male?: boolean;
female?: boolean;
/**
* @type {boolean}
* @memberof WardDTO
Expand Down

0 comments on commit 7689839

Please sign in to comment.