Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ducin committed Jan 9, 2025
1 parent 3a329e1 commit 191cfff
Show file tree
Hide file tree
Showing 22 changed files with 665 additions and 264 deletions.
1 change: 1 addition & 0 deletions .MAINTENANCE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NO
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.MAINTENANCE
docs
dist
.DS_Store
Expand Down
1 change: 0 additions & 1 deletion contract-types/BenefitsRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ export namespace Benefits {
* @response `200` `BenefitSubscription` Benefit subscription status updated successfully
* @response `400` `ErrorResponse` Invalid benefit subscription status update @see {@link BenefitSubscriptionInput}
* @response `404` `ErrorResponse` Benefit subscription not found
* @response `422` `ErrorResponse` Invalid operation for current subscription state
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand Down
2 changes: 2 additions & 0 deletions contract-types/DepartmentsRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export namespace Departments {
* @request POST:/departments
* @response `201` `Department` Department created successfully
* @response `400` `ErrorResponse` Invalid department input request body @see {@link DepartmentInput}
* @response `409` `ErrorResponse` Department with this name already exists
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand Down Expand Up @@ -118,6 +119,7 @@ export namespace Departments {
* @request DELETE:/departments/{departmentId}
* @response `204` `void` Department deleted successfully
* @response `404` `ErrorResponse` Department not found
* @response `409` `ErrorResponse` Cannot delete department that has employees
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand Down
5 changes: 5 additions & 0 deletions contract-types/EmployeesRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export namespace Employees {
* @request POST:/employees
* @response `201` `Employee` Employee created successfully
* @response `400` `ErrorResponse` Invalid employee input request body @see {@link EmployeeInput}
* @response `409` `ErrorResponse` Employee with this email already exists
* @response `422` `ErrorResponse` Invalid data state (e.g. department doesn't exist, office not found)
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand Down Expand Up @@ -118,6 +120,8 @@ export namespace Employees {
* @response `200` `Employee` Employee updated successfully
* @response `400` `ErrorResponse` Invalid employee input request body @see {@link EmployeeInput}
* @response `404` `ErrorResponse` Employee not found
* @response `409` `ErrorResponse` Email already taken by another employee
* @response `422` `ErrorResponse` Invalid data state (e.g. department doesn't exist, office not found)
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand All @@ -139,6 +143,7 @@ export namespace Employees {
* @request DELETE:/employees/{employeeId}
* @response `204` `void` Employee deleted successfully
* @response `404` `ErrorResponse` Employee not found
* @response `409` `ErrorResponse` Cannot delete employee that is assigned to active projects
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand Down
5 changes: 5 additions & 0 deletions contract-types/ExpensesRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export namespace Expenses {
* @request POST:/expenses
* @response `201` `Expense` Expense created successfully
* @response `400` `ErrorResponse` Invalid expense input request body @see {@link ExpenseInput}
* @response `409` `ErrorResponse` Expense with this ID already exists
* @response `422` `ErrorResponse` Invalid account numbers or scheduling date in the past
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand Down Expand Up @@ -97,6 +99,8 @@ export namespace Expenses {
* @response `200` `Expense` Expense updated successfully
* @response `400` `ErrorResponse` Invalid expense input request body @see {@link ExpenseInput}
* @response `404` `ErrorResponse` Expense not found
* @response `409` `ErrorResponse` Cannot modify expense that has been processed
* @response `422` `ErrorResponse` Invalid account numbers or scheduling date in the past
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand All @@ -118,6 +122,7 @@ export namespace Expenses {
* @request DELETE:/expenses/{expenseId}
* @response `204` `void` Expense deleted successfully
* @response `404` `void` Expense not found
* @response `409` `ErrorResponse` Cannot delete expense that has been processed
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand Down
4 changes: 2 additions & 2 deletions contract-types/LicenseRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ export namespace License {
/**
* @description Returns the license text for the API
* @tags System
* @name LicenseList
* @name GetLicense
* @summary Get license information
* @request GET:/license
* @response `200` `DateString` License text retrieved successfully
* @response `400` `ErrorResponse` Invalid Content-Type requested
* @response `403` `ErrorResponse` Access to license file forbidden
* @response `503` `ErrorResponse` License file not available
*/
export namespace LicenseList {
export namespace GetLicense {
export type RequestParams = {};
export type RequestQuery = {};
export type RequestBody = never;
Expand Down
56 changes: 47 additions & 9 deletions contract-types/OfficesRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,27 @@ export namespace Offices {
export namespace GetOffices {
export type RequestParams = {};
export type RequestQuery = {
countries?: any;
amenities?: any;
phrase?: any;
/**
* Full text search across country, city, address and estate owner fields
* @example "Amsterdam"
*/
phrase?: string;
/**
* Comma-separated list of country codes to filter by
* @example "PL,US"
*/
countries?: string;
/**
* Comma-separated list of amenity codes to filter by
* @example "FREE_PARKING,SHOWER"
*/
amenities?: string;
/**
* If more than one amenity is passed, return either offices with any of the amenities (`ANY`) or with all of them (`ALL`)
* @default "ANY"
* @example "ALL"
*/
amenitiesFiltering?: "ANY" | "ALL";
};
export type RequestBody = never;
export type RequestHeaders = {};
Expand All @@ -78,6 +96,8 @@ export namespace Offices {
* @request POST:/offices
* @response `201` `Office` Office created successfully
* @response `400` `ErrorResponse` Invalid office input request body @see {@link OfficeInput}
* @response `409` `ErrorResponse` Office with this code already exists
* @response `422` `ErrorResponse` Invalid office configuration (e.g. invalid country code, unknown amenity)
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand All @@ -102,9 +122,27 @@ export namespace Offices {
export namespace GetOfficesCount {
export type RequestParams = {};
export type RequestQuery = {
countries?: any;
amenities?: any;
phrase?: any;
/**
* Full text search across country, city, address and estate owner fields
* @example "Amsterdam"
*/
phrase?: string;
/**
* Comma-separated list of country codes to filter by
* @example "PL,US"
*/
countries?: string;
/**
* Comma-separated list of amenity codes to filter by
* @example "FREE_PARKING,SHOWER"
*/
amenities?: string;
/**
* If more than one amenity is passed, return either offices with any of the amenities (`ANY`) or with all of them (`ALL`)
* @default "ANY"
* @example "ALL"
*/
amenitiesFiltering?: "ANY" | "ALL";
};
export type RequestBody = never;
export type RequestHeaders = {};
Expand All @@ -124,7 +162,6 @@ export namespace Offices {
*/
export namespace GetOfficeByCode {
export type RequestParams = {
officeId: string;
officeCode: string;
};
export type RequestQuery = {};
Expand All @@ -142,12 +179,13 @@ export namespace Offices {
* @response `200` `Office` Office updated successfully
* @response `400` `ErrorResponse` Invalid office input request body @see {@link OfficeInput}
* @response `404` `ErrorResponse` Office not found
* @response `409` `ErrorResponse` Office code already taken by another office
* @response `422` `ErrorResponse` Invalid office configuration (e.g. invalid country code, unknown amenity)
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
export namespace UpdateOffice {
export type RequestParams = {
officeId: string;
officeCode: string;
};
export type RequestQuery = {};
Expand All @@ -164,12 +202,12 @@ export namespace Offices {
* @request DELETE:/offices/{officeCode}
* @response `204` `void` Office deleted successfully
* @response `404` `ErrorResponse` Office not found
* @response `409` `ErrorResponse` Cannot delete office that has assigned employees
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
export namespace DeleteOffice {
export type RequestParams = {
officeId: string;
officeCode: string;
};
export type RequestQuery = {};
Expand Down
82 changes: 69 additions & 13 deletions contract-types/ProjectsRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* ---------------------------------------------------------------
*/

import { Money, Project, ProjectInput } from "./data-contracts";
import { Money, Project, ProjectInput, ProjectStatus } from "./data-contracts";

export namespace Projects {
/**
Expand All @@ -19,18 +19,44 @@ export namespace Projects {
* @summary List all projects
* @request GET:/projects
* @response `200` `(Project)[]` Successful operation
* @response `400` `ErrorResponse` Invalid projects search criteria
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
export namespace GetProjects {
export type RequestParams = {};
export type RequestQuery = {
projectName?: any;
status?: any;
teamMembers?: any;
teamMembersFiltering?: any;
budgetFrom?: any;
budgetTo?: any;
/**
* Filter projects by name
* @example "Cloud migration"
*/
projectName?: string;
/**
* Filter projects by status
* @example "ACTIVE"
*/
status?: ProjectStatus;
/**
* Filter projects by team member IDs according to `teamMembersFiltering`
* @example "123,456,789"
*/
teamMembers?: string;
/**
* If more than one ID is passed, return either projects with any of the team members (`ANY`) or with all of them (`ALL`)
* @default "ANY"
* @example "ALL"
*/
teamMembersFiltering?: "ANY" | "ALL";
/**
* Minimum project budget amount
* @example "10000"
*/
budgetFrom?: string;
/**
* Maximum project budget amount
* @example "50000"
*/
budgetTo?: string;
};
export type RequestBody = never;
export type RequestHeaders = {};
Expand All @@ -45,6 +71,8 @@ export namespace Projects {
* @request POST:/projects
* @response `201` `Project` Project created successfully
* @response `400` `ErrorResponse` Invalid project input request body @see {@link ProjectInput}
* @response `409` `ErrorResponse` Project with this name already exists in given time period
* @response `422` `ErrorResponse` Invalid data state (e.g. manager not found, team members don't exist, invalid date range)
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand All @@ -69,12 +97,37 @@ export namespace Projects {
export namespace GetProjectsCount {
export type RequestParams = {};
export type RequestQuery = {
projectName?: any;
status?: any;
teamMembers?: any;
teamMembersFiltering?: any;
budgetFrom?: any;
budgetTo?: any;
/**
* Filter projects by name
* @example "Cloud migration"
*/
projectName?: string;
/**
* Filter projects by status
* @example "ACTIVE"
*/
status?: ProjectStatus;
/**
* Filter projects by team member IDs according to `teamMembersFiltering`
* @example "123,456,789"
*/
teamMembers?: string;
/**
* If more than one ID is passed, return either projects with any of the team members (`ANY`) or with all of them (`ALL`)
* @default "ANY"
* @example "ALL"
*/
teamMembersFiltering?: "ANY" | "ALL";
/**
* Minimum project budget amount
* @example "10000"
*/
budgetFrom?: string;
/**
* Maximum project budget amount
* @example "50000"
*/
budgetTo?: string;
};
export type RequestBody = never;
export type RequestHeaders = {};
Expand Down Expand Up @@ -111,6 +164,8 @@ export namespace Projects {
* @response `200` `Project` Project updated successfully
* @response `400` `ErrorResponse` Invalid project input request body @see {@link ProjectInput}
* @response `404` `ErrorResponse` Project not found
* @response `409` `ErrorResponse` Project name already taken by another project in given time period
* @response `422` `ErrorResponse` Invalid data state (e.g. manager not found, team members don't exist, invalid date range)
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand All @@ -132,6 +187,7 @@ export namespace Projects {
* @request DELETE:/projects/{projectId}
* @response `204` `void` Project deleted successfully
* @response `404` `ErrorResponse` Project not found
* @response `409` `ErrorResponse` Cannot delete project that is in ACTIVE status
* @response `500` `ErrorResponse`
* @response `503` `ErrorResponse`
*/
Expand Down
Loading

0 comments on commit 191cfff

Please sign in to comment.