Skip to content

Commit

Permalink
Merge pull request #493 from XeroAPI/project-tasks
Browse files Browse the repository at this point in the history
Project tasks
  • Loading branch information
RettBehrens authored May 23, 2022
2 parents 38be900 + c5152d4 commit 36ba3f9
Show file tree
Hide file tree
Showing 11 changed files with 137 additions and 123 deletions.
2 changes: 1 addition & 1 deletion xero-app-store.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.0
info:
version: "2.22.4"
version: "2.23.0"
title: Xero AppStore API
description: These endpoints are for Xero Partners to interact with the App Store Billing platform
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
Expand Down
2 changes: 1 addition & 1 deletion xero-finance.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.0
info:
version: "2.22.4"
version: "2.23.0"
title: Xero Finance API
description: The Finance API is a collection of endpoints which customers can use in the course of a loan application, which may assist lenders to gain the confidence they need to provide capital.
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
Expand Down
2 changes: 1 addition & 1 deletion xero-identity.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.0
info:
version: "2.22.4"
version: "2.23.0"
title: Xero OAuth 2 Identity Service API
description: These endpoints are related to managing authentication tokens and identity for Xero API
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
Expand Down
2 changes: 1 addition & 1 deletion xero-payroll-au.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.0
info:
version: '2.22.4'
version: '2.23.0'
title: 'Xero Payroll AU API'
description: 'This is the Xero Payroll API for orgs in Australia region.'
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
Expand Down
2 changes: 1 addition & 1 deletion xero-payroll-nz.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.0
info:
version: '2.22.4'
version: '2.23.0'
title: 'Xero Payroll NZ'
description: 'This is the Xero Payroll API for orgs in the NZ region.'
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
Expand Down
2 changes: 1 addition & 1 deletion xero-payroll-uk.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.0
info:
version: '2.22.4'
version: '2.23.0'
title: 'Xero Payroll UK'
description: 'This is the Xero Payroll API for orgs in the UK region.'
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
Expand Down
240 changes: 127 additions & 113 deletions xero-projects.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.0
info:
version: "2.22.4"
version: "2.23.0"
title: Xero Projects API
description: This is the Xero Projects API
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
Expand Down Expand Up @@ -551,40 +551,42 @@ paths:
}
]
}'
# post:
# security:
# - OAuth2: [projects]
# tags:
# - Project
# summary: Allows you to create a task
# operationId: createTask
# description: Allows you to create a specific task
# parameters:
# - name: projectId
# in: path
# required: true
# description: You can create a task on a specified projectId
# schema:
# type: string
# format: uuid
# requestBody:
# required: true
# description: The task object you are creating
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/TaskCreateOrUpdate'
# example:
# '{
# "status": "INPROGRESS"
# }'
# responses:
# '200':
# description: OK/success, returns a list of tasks created
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/Tasks'
'400':
$ref: '#/components/responses/400Error'
post:
security:
- OAuth2: [projects]
tags:
- Project
summary: Allows you to create a task
operationId: createTask
description: Allows you to create a specific task
parameters:
- name: projectId
x-snake: project_id
in: path
required: true
description: You can create a task on a specified projectId
schema:
type: string
format: uuid
requestBody:
required: true
description: The task object you are creating
content:
application/json:
schema:
$ref: '#/components/schemas/TaskCreateOrUpdate'
example:
'{
"status": "INPROGRESS"
}'
responses:
'201':
description: OK/Success - return response 201 no content
x-isEmpty: true
'400':
$ref: '#/components/responses/400Error'
/Projects/{projectId}/Tasks/{taskId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
Expand Down Expand Up @@ -649,71 +651,78 @@ paths:
"value": 0
}
}'
# put:
# security:
# - OAuth2: [projects]
# tags:
# - Project
# summary: Allows you to update a task
# operationId: updateTask
# description: Allows you to update a specific task
# parameters:
# - name: projectId
# in: path
# required: true
# description: You can specify an individual project by appending the projectId to the endpoint
# schema:
# type: string
# format: uuid
# - name: taskId
# in: path
# required: true
# description: You can specify an individual task by appending the id to the endpoint
# schema:
# type: string
# format: uuid
# requestBody:
# required: true
# description: The task object you are updating
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/TaskCreateOrUpdate'
# example: ''
# responses:
# '200':
# description: OK/success, returns a list of tasks updated
# content:
# application/json:
# schema:
# $ref: '#/components/schemas/Tasks'
# delete:
# security:
# - OAuth2: [projects]
# tags:
# - Project
# summary: Allows you to delete a task
# operationId: deleteTask
# description: Allows you to delete a specific task
# parameters:
# - name: projectId
# in: path
# required: true
# description: You can specify an individual project by appending the projectId to the endpoint
# schema:
# type: string
# format: uuid
# - name: taskId
# in: path
# required: true
# description: You can specify an individual task by appending the id to the endpoint
# schema:
# type: string
# format: uuid
# responses:
# '204':
# description: Success - return response 204 no content
# x-isEmpty: true
'400':
$ref: '#/components/responses/400Error'
put:
security:
- OAuth2: [projects]
tags:
- Project
summary: Allows you to update a task
operationId: updateTask
description: Allows you to update a specific task
parameters:
- name: projectId
x-snake: project_id
in: path
required: true
description: You can specify an individual project by appending the projectId to the endpoint
schema:
type: string
format: uuid
- name: taskId
x-snake: task_id
in: path
required: true
description: You can specify an individual task by appending the id to the endpoint
schema:
type: string
format: uuid
requestBody:
required: true
description: The task object you are updating
content:
application/json:
schema:
$ref: '#/components/schemas/TaskCreateOrUpdate'
example: ''
responses:
'204':
description: OK/Success - return response 204 no content
x-isEmpty: true
'400':
$ref: '#/components/responses/400Error'
delete:
security:
- OAuth2: [projects]
tags:
- Project
summary: Allows you to delete a task
operationId: deleteTask
description: Allows you to delete a specific task
parameters:
- name: projectId
x-snake: project_id
in: path
required: true
description: You can specify an individual project by appending the projectId to the endpoint
schema:
type: string
format: uuid
- name: taskId
x-snake: task_id
in: path
required: true
description: You can specify an individual task by appending the id to the endpoint
schema:
type: string
format: uuid
responses:
'204':
description: Success - return response 204 no content
x-isEmpty: true
'400':
$ref: '#/components/responses/400Error'
/Projects/{projectId}/Time:
parameters:
- $ref: '#/components/parameters/requiredHeader'
Expand Down Expand Up @@ -841,6 +850,8 @@ paths:
}
]
}'
'400':
$ref: '#/components/responses/400Error'
post:
security:
- OAuth2: [projects]
Expand Down Expand Up @@ -890,6 +901,8 @@ paths:
"description": "My description",
"status": "ACTIVE"
}'
'400':
$ref: '#/components/responses/400Error'
/Projects/{projectId}/Time/{timeEntryId}:
parameters:
- $ref: '#/components/parameters/requiredHeader'
Expand Down Expand Up @@ -936,6 +949,8 @@ paths:
"description": "My description",
"status": "ACTIVE"
}'
'400':
$ref: '#/components/responses/400Error'
put:
security:
- OAuth2: [projects]
Expand Down Expand Up @@ -979,6 +994,8 @@ paths:
'204':
description: Success - return response 204 no content
x-isEmpty: true
'400':
$ref: '#/components/responses/400Error'
delete:
security:
- OAuth2: [projects]
Expand Down Expand Up @@ -1008,6 +1025,8 @@ paths:
'204':
description: Success - return response 204 no content
x-isEmpty: true
'400':
$ref: '#/components/responses/400Error'
components:
securitySchemes:
OAuth2:
Expand Down Expand Up @@ -1434,36 +1453,30 @@ components:
$ref: '#/components/schemas/ChargeType'
type: string
estimateMinutes:
type: number
format: double
type: integer
description: An estimated time to perform the task
projectId:
type: string
format: uuid
example: '00000000-0000-0000-000-000000000000'
description: Identifier of the project task belongs to.
totalMinutes:
type: number
format: double
type: integer
description: Total minutes which have been logged against the task. Logged by assigning a time entry to a task
totalAmount:
$ref: '#/components/schemas/Amount'
type: number
minutesInvoiced:
type: number
format: double
type: integer
description: Minutes on this task which have been invoiced.
minutesToBeInvoiced:
type: number
format: double
type: integer
description: Minutes on this task which have not been invoiced.
fixedMinutes:
type: number
format: double
type: integer
description: Minutes logged against this task if its charge type is `FIXED`.
nonChargeableMinutes:
type: number
format: double
type: integer
description: Minutes logged against this task if its charge type is `NON_CHARGEABLE`.
amountToBeInvoiced:
$ref: '#/components/schemas/Amount'
Expand Down Expand Up @@ -1496,12 +1509,13 @@ components:
maximum: 100
rate:
$ref: '#/components/schemas/Amount'
type: number
chargeType:
$ref: '#/components/schemas/ChargeType'
type: string
estimateMinutes:
type: integer
description: "Estimated time to perform the task. EstimateMinutes has to be greater than 0 if provided."
description: An estimated time to perform the task
required:
- name
- rate
Expand Down
2 changes: 1 addition & 1 deletion xero_accounting.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: Xero Accounting API
version: "2.22.4"
version: "2.23.0"
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
contact:
name: "Xero Platform Team"
Expand Down
2 changes: 1 addition & 1 deletion xero_assets.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
openapi: 3.0.0
info:
version: "2.22.4"
version: "2.23.0"
title: Xero Assets API
description: The Assets API exposes fixed asset related functions of the Xero Accounting application and can be used for a variety of purposes such as creating assets, retrieving asset valuations etc.
termsOfService: "https://developer.xero.com/xero-developer-platform-terms-conditions/"
Expand Down
Loading

0 comments on commit 36ba3f9

Please sign in to comment.