1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Updates for openapi

This commit is contained in:
David Bomba 2023-03-12 22:44:53 +11:00
parent 0f1318e701
commit a94e36ed8b
3 changed files with 92 additions and 38 deletions

View File

@ -12054,7 +12054,7 @@ paths:
/api/v1/recurring_invoices:
get:
tags:
- recurring_invoices
- Recurring Invoices
summary: "List recurring invoices"
description: |
Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list.
@ -12125,7 +12125,7 @@ paths:
$ref: "#/components/responses/default"
post:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Create recurring invoice"
description: "Adds a Recurring Invoice to the system"
operationId: storeRecurringInvoice
@ -12159,7 +12159,7 @@ paths:
"/api/v1/recurring_invoices/{id}":
get:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Show recurring invoice"
description: "Displays an RecurringInvoice by id"
operationId: showRecurringInvoice
@ -12199,7 +12199,7 @@ paths:
$ref: "#/components/responses/default"
put:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Update recurring invoice"
description: "Handles the updating of an RecurringInvoice by id"
operationId: updateRecurringInvoice
@ -12239,7 +12239,7 @@ paths:
$ref: "#/components/responses/default"
delete:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Delete recurring invoice"
description: "Handles the deletion of an RecurringInvoice by id"
operationId: deleteRecurringInvoice
@ -12276,7 +12276,7 @@ paths:
"/api/v1/recurring_invoices/{id}/edit":
get:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Edit recurring invoice"
description: "Displays an RecurringInvoice by id"
operationId: editRecurringInvoice
@ -12318,7 +12318,7 @@ paths:
/api/v1/recurring_invoices/create:
get:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Blank recurring invoice"
description: "Returns a blank object with default values"
operationId: getRecurringInvoicesCreate
@ -12351,25 +12351,52 @@ paths:
/api/v1/recurring_invoices/bulk:
post:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Bulk recurring invoice actions"
description: ""
description: |
There are multiple actions that are available including:
operationId: bulkRecurringInvoices
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/index"
requestBody:
description: "Hashed IDs"
description: "Bulk action details"
required: true
content:
application/json:
schema:
type: object
properties:
action:
type: string
description: |
The action to be performed, options include:
- `start`
Starts (or restarts) the recurring invoice. **note** if the recurring invoice has been stopped for a long time, it will attempt to catch back up firing a new Invoice every hour per interval that has been missed.
If you do not wish to have the recurring invoice catch up, you should set the next_send_date to the correct date you wish the recurring invoice to commence from.
- `stop`
Stops the recurring invoice.
- `send_now`
Force sends the recurring invoice - this option is only available when the recurring invoice is in a draft state.
- `restore`
Restores the recurring invoice from an archived or deleted state.
- `archive`
Archives the recurring invoice. The recurring invoice will not fire in this state.
- `delete`
Deletes a recurring invoice.
required: true
ids:
required: true
type: array
items:
description: "Array of hashed IDs to be bulk 'actioned"
type: integer
example: "[0,1,2,3]"
description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']"
type: string
example:
action: start
ids: "['D2J234DFA','D2J234DFA','D2J234DFA']"
responses:
200:
description: "The RecurringInvoice response"
@ -12396,7 +12423,7 @@ paths:
get:
deprecated: true
tags:
- recurring_invoices
- Recurring Invoices
summary: "Custom recurring invoice action"
description: "Performs a custom action on an RecurringInvoice.\n\n The current range of actions are as follows\n - clone_to_RecurringInvoice\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email"
operationId: actionRecurringInvoice
@ -12445,7 +12472,7 @@ paths:
"/api/v1/recurring_invoice/{invitation_key}/download":
get:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Download recurring invoice PDF"
description: "Downloads a specific invoice"
operationId: downloadRecurringInvoice
@ -12482,7 +12509,7 @@ paths:
"/api/v1/recurring_invoices/{id}/upload":
put:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Add recurring invoice document"
description: "Handles the uploading of a document to a recurring_invoice"
operationId: uploadRecurringInvoice
@ -17296,7 +17323,7 @@ tags:
- name: invoices
description: |
Endpoint definitions for interacting with invoices.
- name: recurring_invoices
- name: Recurring Invoices
description: |
Endpoint definitions for interacting with recurring_invoices.
- name: payments

View File

@ -14,7 +14,7 @@ tags:
- name: invoices
description: |
Endpoint definitions for interacting with invoices.
- name: recurring_invoices
- name: Recurring Invoices
description: |
Endpoint definitions for interacting with recurring_invoices.
- name: payments

View File

@ -1,7 +1,7 @@
/api/v1/recurring_invoices:
get:
tags:
- recurring_invoices
- Recurring Invoices
summary: "List recurring invoices"
description: |
Lists invoices with the option to chain multiple query parameters allowing fine grained filtering of the list.
@ -72,7 +72,7 @@
$ref: "#/components/responses/default"
post:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Create recurring invoice"
description: "Adds a Recurring Invoice to the system"
operationId: storeRecurringInvoice
@ -106,7 +106,7 @@
"/api/v1/recurring_invoices/{id}":
get:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Show recurring invoice"
description: "Displays an RecurringInvoice by id"
operationId: showRecurringInvoice
@ -146,7 +146,7 @@
$ref: "#/components/responses/default"
put:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Update recurring invoice"
description: "Handles the updating of an RecurringInvoice by id"
operationId: updateRecurringInvoice
@ -186,7 +186,7 @@
$ref: "#/components/responses/default"
delete:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Delete recurring invoice"
description: "Handles the deletion of an RecurringInvoice by id"
operationId: deleteRecurringInvoice
@ -223,7 +223,7 @@
"/api/v1/recurring_invoices/{id}/edit":
get:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Edit recurring invoice"
description: "Displays an RecurringInvoice by id"
operationId: editRecurringInvoice
@ -265,7 +265,7 @@
/api/v1/recurring_invoices/create:
get:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Blank recurring invoice"
description: "Returns a blank object with default values"
operationId: getRecurringInvoicesCreate
@ -298,25 +298,52 @@
/api/v1/recurring_invoices/bulk:
post:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Bulk recurring invoice actions"
description: ""
description: |
There are multiple actions that are available including:
operationId: bulkRecurringInvoices
parameters:
- $ref: "#/components/parameters/X-API-TOKEN"
- $ref: "#/components/parameters/X-Requested-With"
- $ref: "#/components/parameters/index"
requestBody:
description: "Hashed IDs"
description: "Bulk action details"
required: true
content:
application/json:
schema:
type: object
properties:
action:
type: string
description: |
The action to be performed, options include:
- `start`
Starts (or restarts) the recurring invoice. **note** if the recurring invoice has been stopped for a long time, it will attempt to catch back up firing a new Invoice every hour per interval that has been missed.
If you do not wish to have the recurring invoice catch up, you should set the next_send_date to the correct date you wish the recurring invoice to commence from.
- `stop`
Stops the recurring invoice.
- `send_now`
Force sends the recurring invoice - this option is only available when the recurring invoice is in a draft state.
- `restore`
Restores the recurring invoice from an archived or deleted state.
- `archive`
Archives the recurring invoice. The recurring invoice will not fire in this state.
- `delete`
Deletes a recurring invoice.
required: true
ids:
required: true
type: array
items:
description: "Array of hashed IDs to be bulk 'actioned"
type: integer
example: "[0,1,2,3]"
description: "Array of hashed IDs to be bulk 'actioned - ['D2J234DFA','D2J234DFA','D2J234DFA']"
type: string
example:
action: start
ids: "['D2J234DFA','D2J234DFA','D2J234DFA']"
responses:
200:
description: "The RecurringInvoice response"
@ -343,7 +370,7 @@
get:
deprecated: true
tags:
- recurring_invoices
- Recurring Invoices
summary: "Custom recurring invoice action"
description: "Performs a custom action on an RecurringInvoice.\n\n The current range of actions are as follows\n - clone_to_RecurringInvoice\n - clone_to_quote\n - history\n - delivery_note\n - mark_paid\n - download\n - archive\n - delete\n - email"
operationId: actionRecurringInvoice
@ -392,7 +419,7 @@
"/api/v1/recurring_invoice/{invitation_key}/download":
get:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Download recurring invoice PDF"
description: "Downloads a specific invoice"
operationId: downloadRecurringInvoice
@ -429,7 +456,7 @@
"/api/v1/recurring_invoices/{id}/upload":
put:
tags:
- recurring_invoices
- Recurring Invoices
summary: "Add recurring invoice document"
description: "Handles the uploading of a document to a recurring_invoice"
operationId: uploadRecurringInvoice