diff --git a/openapi.yaml b/openapi.yaml index 6128b892..1f4a960c 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -5996,10 +5996,10 @@ paths: post: tags: - Invoices - summary: Queue transfer of collected invoice to e-conomic + summary: Export collected invoice to e-conomic description: | - Queues collected invoice transfer to e-conomic. - Processing runs asynchronously and can be tracked through queue status endpoints. + Exports collected invoice to e-conomic. + Uses async queue when available, otherwise falls back to synchronous processing. operationId: queueCollectedInvoiceEconomicTransfer requestBody: required: true @@ -6016,6 +6016,12 @@ paths: type: boolean default: false responses: + '200': + description: Collected invoice export processed synchronously (fallback) + content: + application/json: + schema: + $ref: '#/components/schemas/EconomicTransferSynchronousFallbackResponse' '202': description: Collected invoice transfer queued content: @@ -6028,6 +6034,45 @@ paths: '404': { $ref: '#/components/responses/NotFound' } '500': { $ref: '#/components/responses/InternalServerError' } + /collected-invoices/stripe/book: + post: + tags: + - Invoices + summary: Export Stripe collected invoice to e-conomic + description: | + Exports a Stripe-backed collected invoice to e-conomic. + Uses async queue when available, otherwise falls back to synchronous processing. + operationId: queueStripeCollectedInvoiceEconomicTransfer + requestBody: + required: true + content: + application/json: + schema: + type: object + required: [id] + properties: + id: + type: integer + minimum: 1 + responses: + '200': + description: Stripe collected invoice export processed synchronously (fallback) + content: + application/json: + schema: + $ref: '#/components/schemas/EconomicTransferSynchronousFallbackResponse' + '202': + description: Stripe collected invoice transfer queued + content: + application/json: + schema: + $ref: '#/components/schemas/EconomicTransferQueueEnqueueResponse' + '400': { $ref: '#/components/responses/BadRequest' } + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '404': { $ref: '#/components/responses/NotFound' } + '500': { $ref: '#/components/responses/InternalServerError' } + /collected-invoices/economic/queue: get: tags: @@ -6039,9 +6084,14 @@ paths: in: query required: false description: Comma-separated queue statuses to filter by. + style: form + explode: false schema: - type: string - example: "QUEUED,FAILED" + type: array + items: + $ref: '#/components/schemas/EconomicTransferQueueStatus' + uniqueItems: true + example: [QUEUED, FAILED] - name: limit in: query required: false @@ -6067,6 +6117,7 @@ paths: '400': { $ref: '#/components/responses/BadRequest' } '401': { $ref: '#/components/responses/Unauthorized' } '403': { $ref: '#/components/responses/Forbidden' } + '503': { $ref: '#/components/responses/ServiceUnavailable' } '500': { $ref: '#/components/responses/InternalServerError' } /collected-invoices/economic/queue/status: @@ -6093,6 +6144,7 @@ paths: '401': { $ref: '#/components/responses/Unauthorized' } '403': { $ref: '#/components/responses/Forbidden' } '404': { $ref: '#/components/responses/NotFound' } + '503': { $ref: '#/components/responses/ServiceUnavailable' } '500': { $ref: '#/components/responses/InternalServerError' } /collected-invoices/economic/queue/retry: @@ -6120,9 +6172,42 @@ paths: schema: $ref: '#/components/schemas/EconomicTransferQueueRetryResponse' '400': { $ref: '#/components/responses/BadRequest' } + '409': { $ref: '#/components/responses/Conflict' } '401': { $ref: '#/components/responses/Unauthorized' } '403': { $ref: '#/components/responses/Forbidden' } '404': { $ref: '#/components/responses/NotFound' } + '503': { $ref: '#/components/responses/ServiceUnavailable' } + '500': { $ref: '#/components/responses/InternalServerError' } + + /collected-invoices/economic/queue/run: + post: + tags: + - Invoices + summary: Run one collected-invoice queue batch immediately + operationId: runCollectedInvoiceEconomicQueueBatch + requestBody: + required: false + content: + application/json: + schema: + type: object + properties: + limit: + type: integer + minimum: 1 + maximum: 10 + default: 10 + responses: + '200': + description: Queue batch processed + content: + application/json: + schema: + $ref: '#/components/schemas/EconomicTransferQueueRunResponse' + '400': { $ref: '#/components/responses/BadRequest' } + '401': { $ref: '#/components/responses/Unauthorized' } + '403': { $ref: '#/components/responses/Forbidden' } + '503': { $ref: '#/components/responses/ServiceUnavailable' } '500': { $ref: '#/components/responses/InternalServerError' } /collected-invoices/economic/compare: @@ -7805,8 +7890,8 @@ paths: post: tags: - Modules - summary: Queue draft invoice export to e-conomic - description: Queue a draft invoice export job for asynchronous processing. + summary: Export draft invoice to e-conomic + description: Exports draft invoice using queue processing when available, with synchronous fallback when queue dependencies are unavailable. operationId: queueDraftInvoiceExportToEconomic requestBody: required: true @@ -7820,6 +7905,12 @@ paths: type: integer minimum: 1 responses: + '200': + description: Draft invoice export processed synchronously (fallback) + content: + application/json: + schema: + $ref: '#/components/schemas/EconomicTransferSynchronousFallbackResponse' '202': description: Draft invoice export queued content: @@ -7856,6 +7947,7 @@ paths: '401': { $ref: '#/components/responses/Unauthorized' } '403': { $ref: '#/components/responses/Forbidden' } '404': { $ref: '#/components/responses/NotFound' } + '503': { $ref: '#/components/responses/ServiceUnavailable' } '500': { $ref: '#/components/responses/InternalServerError' } /economic/invoice/draft/export/retry: @@ -7886,14 +7978,15 @@ paths: '401': { $ref: '#/components/responses/Unauthorized' } '403': { $ref: '#/components/responses/Forbidden' } '404': { $ref: '#/components/responses/NotFound' } + '503': { $ref: '#/components/responses/ServiceUnavailable' } '500': { $ref: '#/components/responses/InternalServerError' } /economic/invoice/export: post: tags: - Modules - summary: Queue invoice export to e-conomic - description: Queue booked invoice export job for asynchronous processing. + summary: Export invoice to e-conomic + description: Exports booked invoice using queue processing when available, with synchronous fallback when queue dependencies are unavailable. operationId: queueInvoiceExportToEconomic requestBody: required: true @@ -7907,6 +8000,12 @@ paths: type: integer minimum: 1 responses: + '200': + description: Invoice export processed synchronously (fallback) + content: + application/json: + schema: + $ref: '#/components/schemas/EconomicTransferSynchronousFallbackResponse' '202': description: Invoice export queued content: @@ -7943,6 +8042,7 @@ paths: '401': { $ref: '#/components/responses/Unauthorized' } '403': { $ref: '#/components/responses/Forbidden' } '404': { $ref: '#/components/responses/NotFound' } + '503': { $ref: '#/components/responses/ServiceUnavailable' } '500': { $ref: '#/components/responses/InternalServerError' } /economic/invoice/export/retry: @@ -7973,6 +8073,7 @@ paths: '401': { $ref: '#/components/responses/Unauthorized' } '403': { $ref: '#/components/responses/Forbidden' } '404': { $ref: '#/components/responses/NotFound' } + '503': { $ref: '#/components/responses/ServiceUnavailable' } '500': { $ref: '#/components/responses/InternalServerError' } # Module - Stripe Endpoints @@ -11056,6 +11157,12 @@ components: application/json: schema: $ref: '#/components/schemas/Error' + Conflict: + description: Conflict - Request could not be completed due to current resource state + content: + application/json: + schema: + $ref: '#/components/schemas/Error' Unauthorized: description: Unauthorized - Invalid or missing authentication token content: @@ -11074,6 +11181,12 @@ components: application/json: schema: $ref: '#/components/schemas/Error' + ServiceUnavailable: + description: Service unavailable - Required async queue dependencies are unavailable + content: + application/json: + schema: + $ref: '#/components/schemas/Error' InternalServerError: description: Internal server error content: @@ -12598,6 +12711,10 @@ components: type: object nullable: true additionalProperties: true + details_summary: + type: object + nullable: true + additionalProperties: true created_by: type: integer nullable: true @@ -12639,10 +12756,14 @@ components: properties: message: type: string + job_id: + type: integer + minimum: 1 job: $ref: '#/components/schemas/EconomicTransferQueueJob' required: - message + - job_id - job meta: oneOf: @@ -12662,6 +12783,44 @@ components: - meta - includes + EconomicTransferSynchronousFallbackResponse: + type: object + properties: + success: + type: boolean + data: + type: object + properties: + message: + type: string + mode: + type: string + enum: [synchronous_fallback] + result: + type: object + additionalProperties: true + required: + - message + - mode + - result + meta: + oneOf: + - type: array + items: {} + - type: object + additionalProperties: true + includes: + oneOf: + - type: array + items: {} + - type: object + additionalProperties: true + required: + - success + - data + - meta + - includes + EconomicTransferQueueStatusResponse: type: object properties: @@ -12720,6 +12879,64 @@ components: - meta - includes + EconomicTransferQueueRunResponse: + type: object + properties: + success: + type: boolean + data: + type: object + properties: + message: + type: string + processed: + type: integer + minimum: 0 + completed: + type: integer + minimum: 0 + failed: + type: integer + minimum: 0 + jobs: + type: array + items: + type: integer + minimum: 1 + limit: + type: integer + minimum: 1 + maximum: 10 + transfer_type: + type: string + enum: + - COLLECTED_INVOICE_EXPORT + required: + - message + - processed + - completed + - failed + - jobs + - limit + - transfer_type + meta: + oneOf: + - type: array + items: {} + - type: object + additionalProperties: true + includes: + oneOf: + - type: array + items: {} + - type: object + additionalProperties: true + required: + - success + - data + - meta + - includes + EconomicTransferQueueListResponse: type: object properties: @@ -12735,9 +12952,24 @@ components: count: type: integer minimum: 0 + total: + type: integer + minimum: 0 + limit: + type: integer + minimum: 1 + offset: + type: integer + minimum: 0 + has_more: + type: boolean required: - items - count + - total + - limit + - offset + - has_more meta: oneOf: - type: array diff --git a/src/components/displays/buttons/ActionSettingsWheelButton.vue b/src/components/displays/buttons/ActionSettingsWheelButton.vue index 4d55842c..280e6b33 100644 --- a/src/components/displays/buttons/ActionSettingsWheelButton.vue +++ b/src/components/displays/buttons/ActionSettingsWheelButton.vue @@ -1,5 +1,5 @@ \ No newline at end of file + diff --git a/src/components/displays/department/pos/PosDepartmentMVP.vue b/src/components/displays/department/pos/PosDepartmentMVP.vue index 66a310e9..9ead404e 100644 --- a/src/components/displays/department/pos/PosDepartmentMVP.vue +++ b/src/components/displays/department/pos/PosDepartmentMVP.vue @@ -8,6 +8,7 @@ import PosDepartmentStep4 from "@/components/displays/department/pos/steps/PosDe import ViewportResponsiveWrapper from "@/components/viewport/conditions/elements/ViewportResponsiveWrapper.vue"; import PosDepartmentStepMobile1 from "@/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile1.vue"; import PosDepartmentStepMobile2 from "@/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile2.vue"; +import PosDepartmentStepMobile3 from "@/components/displays/department/pos/steps/mobile/PosDepartmentStepMobile3.vue"; import { pos } from "@/components/displays/department/pos/steps/mobile/objects/PosDepartmentStepMobileFlow.vue"; import VerifiedCustomer from "@/components/viewport/elements/icons/VerifiedCustomer.vue"; import UnknownCustomer from "@/components/viewport/elements/icons/UnknownCustomer.vue"; @@ -65,6 +66,7 @@ applyPosRouteSearch(window.location.search, { + diff --git a/src/components/displays/department/pos/displays/PayWithStripeButton.vue b/src/components/displays/department/pos/displays/PayWithStripeButton.vue index 4fcb6502..bc921554 100644 --- a/src/components/displays/department/pos/displays/PayWithStripeButton.vue +++ b/src/components/displays/department/pos/displays/PayWithStripeButton.vue @@ -1,7 +1,12 @@