feat: add invoice-config-items management functionality
This commit is contained in:
@@ -1873,6 +1873,279 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/invoice-config-items": {
|
||||
"get": {
|
||||
"description": "Retrieve a list of all invoice config items",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"invoice-config-item"
|
||||
],
|
||||
"summary": "List all invoice config items",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/response.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/models.InvoiceConfigItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"description": "Create a new invoice config item with the provided details",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"invoice-config-item"
|
||||
],
|
||||
"summary": "Create a new invoice config item",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Invoice config item request body",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.CreateInvoiceConfigItemRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"201": {
|
||||
"description": "Created",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/response.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.CreateInvoiceConfigItemResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/invoice-config-items/{id}": {
|
||||
"get": {
|
||||
"description": "Retrieve a single invoice config item using its unique identifier",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"invoice-config-item"
|
||||
],
|
||||
"summary": "Get invoice config item by ID",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Invoice config item ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/response.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/models.InvoiceConfigItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"description": "Update an existing invoice config item by its ID. Only non-empty fields will be updated.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"invoice-config-item"
|
||||
],
|
||||
"summary": "Update invoice config item",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Invoice config item ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "Invoice config item request body",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/requests.UpdateInvoiceConfigItemRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/response.SuccessResponse"
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"$ref": "#/definitions/responses.UpdateInvoiceConfigItemResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"404": {
|
||||
"description": "Not Found",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"description": "Delete an invoice config item by its unique identifier",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"invoice-config-item"
|
||||
],
|
||||
"summary": "Delete invoice config item",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Invoice config item ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.SuccessResponse"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/response.ErrorResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/invoice-configs": {
|
||||
"get": {
|
||||
"description": "Retrieve a list of all invoice configs ordered by creation date",
|
||||
@@ -3211,6 +3484,38 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.InvoiceConfigItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allowAlternative": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"componentId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"invoiceConfigId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"priorityOrder": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requiredQuantity": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"models.Room": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3463,6 +3768,35 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"requests.CreateInvoiceConfigItemRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"componentId",
|
||||
"invoiceConfigId",
|
||||
"priorityOrder",
|
||||
"requiredQuantity"
|
||||
],
|
||||
"properties": {
|
||||
"allowAlternative": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"componentId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"invoiceConfigId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"priorityOrder": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requiredQuantity": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requests.CreateInvoiceConfigRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -3683,6 +4017,23 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"requests.UpdateInvoiceConfigItemRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allowAlternative": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"priorityOrder": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requiredQuantity": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"requests.UpdateInvoiceConfigRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -3828,6 +4179,14 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses.CreateInvoiceConfigItemResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses.CreateInvoiceConfigResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -4015,6 +4374,32 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses.UpdateInvoiceConfigItemResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"allowAlternative": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"componentId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"invoiceConfigId": {
|
||||
"type": "integer"
|
||||
},
|
||||
"note": {
|
||||
"type": "string"
|
||||
},
|
||||
"priorityOrder": {
|
||||
"type": "integer"
|
||||
},
|
||||
"requiredQuantity": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses.UpdateInvoiceConfigResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user