Refactoring

This commit is contained in:
gamonoid
2017-09-03 20:39:22 +02:00
parent af40881847
commit a7274d3cfd
5075 changed files with 238202 additions and 16291 deletions

61
data/raml/api.raml Normal file
View File

@@ -0,0 +1,61 @@
#%RAML 0.8
---
title: IceHrm
baseUri: http://icehrm-hosted.gamonoid.com/api
version: 1
documentation:
- title: Authentication
content: !include documentation/authentication.md
- title: Responses
content: !include documentation/responses.md
/employee:
displayName: Employee
/list:
get:
is: [ paginated ]
description: Get a list of employees
responses:
200:
body:
application/json:
schema: !include schemas/employees.json
example: !include examples/employees.json
/{id}:
get:
description: Get an employee by id
responses:
200:
body:
application/json:
schema: !include schemas/employee.json
example: !include examples/employee.json
404:
description: Employee does not exist
body:
application/json:
schema: !include schemas/error.json
uriParameters:
id:
description: Employee id
type: integer
/candidate:
displayName: Candidate
/{id}:
get:
description: Get an employee by id
responses:
200:
body:
application/json:
schema: !include schemas/candidate.json
example: !include examples/candidate.json
404:
description: Candidate does not exist
body:
application/json:
schema: !include schemas/error.json
uriParameters:
id:
description: Candidate id
type: integer

View File

@@ -0,0 +1,2 @@
Admin users of icehrm can find the access token under System->Settings.
IceHrm uses Bearer Authorization.

View File

@@ -0,0 +1,9 @@
| Code | Description |
|------|--------------------|
| 200 | Ok |
| 201 | Created |
| 400 | Bad request |
| 401 | Not authorized |
| 403 | Forbidden |
| 404 | Resource not found |
| 500 | Server error |

View File

@@ -0,0 +1,53 @@
{
"id": "1",
"first_name": "Jhon",
"last_name": "Doe",
"nationality": "4",
"birthday": null,
"gender": "Male",
"marital_status": null,
"address1": null,
"address2": null,
"city": "New York",
"country": "US",
"province": null,
"postal_code": null,
"email": "icehrm+jhon@web-stalk.com",
"home_phone": "+1 455565656",
"mobile_phone": null,
"cv_title": "Software Engineer",
"cv": "cv_rYwHphV7xD5dOe1444302569136",
"cvtext": null,
"industry": null,
"profileImage": null,
"head_line": "",
"objective": "",
"work_history": "",
"education": "",
"skills": "",
"referees": "",
"linkedInUrl": null,
"linkedInData": null,
"totalYearsOfExperience": null,
"totalMonthsOfExperience": null,
"generatedCVFile": null,
"created": "2015-10-08 16:59:20",
"updated": "2015-10-08 16:59:20",
"expectedSalary": "0",
"preferedPositions": null,
"preferedJobtype": null,
"preferedCountries": null,
"tags": null,
"notes": null,
"calls": null,
"age": null,
"hash": "663fd20d1859344585f678a0f87b23522b8f9fce8c67c5290a609ce342b81442",
"linkedInProfileLink": null,
"linkedInProfileId": null,
"facebookProfileLink": null,
"facebookProfileId": null,
"twitterProfileLink": null,
"twitterProfileId": null,
"googleProfileLink": null,
"googleProfileId": null
}

View File

@@ -0,0 +1,75 @@
{
"id": "2",
"employee_id": "EMP002",
"first_name": "Lala",
"middle_name": "Nadila ",
"last_name": "Lamees",
"nationality": "175",
"birthday": "1984-03-12",
"gender": "Female",
"marital_status": "Single",
"ssn_num": "",
"nic_num": "4594567WE3",
"other_id": "4595567WE3",
"driving_license": "349-066-YUO",
"driving_license_exp_date": "2012-03-01",
"employment_status": "1",
"job_title": "8",
"pay_grade": "2",
"work_station_id": "W001",
"address1": "Green War Rd, 00123",
"address2": "",
"city": "Istanbul",
"country": "TR",
"province": null,
"postal_code": "909066",
"home_phone": "+960112345",
"mobile_phone": "+960112345",
"work_phone": "+960112345",
"work_email": "icehrm+manager@web-stalk.com",
"private_email": "icehrm+manager@web-stalk.com",
"joined_date": "2011-03-07",
"confirmation_date": "2012-02-14",
"supervisor": "1",
"indirect_supervisors": "[3,4]",
"department": "2",
"custom1": null,
"custom2": null,
"custom3": null,
"custom4": null,
"custom5": null,
"custom6": null,
"custom7": null,
"custom8": null,
"custom9": null,
"custom10": null,
"termination_date": "0000-00-00",
"notes": null,
"status": "Active",
"ethnicity": null,
"immigration_status": null,
"approver1": "5",
"approver2": "6",
"approver3": null,
"nationality_Name_id": [],
"nationality_Name": "Tajik",
"ethnicity_Name_id": [],
"ethnicity_Name": null,
"immigration_status_Name_id": [],
"immigration_status_Name": null,
"employment_status_Name_id": [],
"employment_status_Name": "Full Time Contract",
"job_title_Name_id": [],
"job_title_Name": "Pre-Sales Executive",
"pay_grade_Name_id": [],
"pay_grade_Name": "Executive",
"country_Name_id": [],
"country_Name": "Turkey",
"province_Name_id": [],
"province_Name": null,
"department_Name_id": [],
"department_Name": "Head Office",
"supervisor_Name_id": [],
"supervisor_Name": "IceHrm Employee",
"image": "http:\/\/app.app.dev\/images\/user_female.png"
}

View File

@@ -0,0 +1,23 @@
[
{
"id": "1",
"employee_id": "EMP001",
"first_name": "IceHrm",
"middle_name": "Sample",
"last_name": "Employee"
},
{
"id": "2",
"employee_id": "EMP002",
"first_name": "Lala",
"middle_name": "Nadila ",
"last_name": "Lamees"
},
{
"id": "3",
"employee_id": "EMP003",
"first_name": "Sofia",
"middle_name": "",
"last_name": "O'Sullivan"
}
]

View File

@@ -0,0 +1,27 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"email": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"cv_title": {
"type": "string"
}
},
"required": [
"id",
"employee_id",
"first_name",
"last_name"
]
}

View File

@@ -0,0 +1,27 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"employee_id": {
"type": "string"
},
"first_name": {
"type": "string"
},
"middle_name": {
"type": "string"
},
"last_name": {
"type": "string"
}
},
"required": [
"id",
"employee_id",
"first_name",
"last_name"
]
}

View File

@@ -0,0 +1,30 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"employee_id": {
"type": "string"
},
"first_name": {
"type": "string"
},
"middle_name": {
"type": "string"
},
"last_name": {
"type": "string"
}
},
"required": [
"id",
"employee_id",
"first_name",
"last_name"
]
}
}

View File

@@ -0,0 +1,39 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
]
}
},
"description": {
"type": "string"
}
},
"required": [
"messages",
"description"
]
}
},
"required": [
"error"
]
}