diff --git a/frontend/pshared/lib/config/common.dart b/frontend/pshared/lib/config/common.dart index c6b47267..a19eed48 100644 --- a/frontend/pshared/lib/config/common.dart +++ b/frontend/pshared/lib/config/common.dart @@ -2,8 +2,10 @@ import 'package:flutter/material.dart'; class CommonConstants { - static String apiProto = 'https'; - static String apiHost = 'app.sendico.io'; + // static String apiProto = 'https'; + // static String apiHost = 'app.sendico.io'; + static String apiProto = 'http'; + static String apiHost = 'localhost:3000'; static String apiEndpoint = '/api/v1'; static String amplitudeSecret = 'c3d75b3e2520d708440acbb16b923e79'; static String amplitudeServerZone = 'EU'; diff --git a/frontend/pshared/lib/models/resources.dart b/frontend/pshared/lib/models/resources.dart index e0fcd182..ead33148 100644 --- a/frontend/pshared/lib/models/resources.dart +++ b/frontend/pshared/lib/models/resources.dart @@ -15,6 +15,10 @@ enum ResourceType { @JsonValue('automations') automations, + /// Tracks changes made to resources + @JsonValue('callbacks') + callbacks, + /// Tracks changes made to resources @JsonValue('changes') changes, diff --git a/interface/api/payments/by_quote.yaml b/interface/api/payments/by_quote.yaml index e779215e..9ee59cd6 100644 --- a/interface/api/payments/by_quote.yaml +++ b/interface/api/payments/by_quote.yaml @@ -1,7 +1,7 @@ post: tags: [Payments] summary: Initiate payment using quote reference - description: Executes one payment from an existing quote reference (`quoteRef` required, `intent` forbidden). + description: Executes one payment from an existing quote reference. operationId: paymentsInitiateByQuote security: - bearerAuth: [] @@ -12,14 +12,7 @@ post: content: application/json: schema: - allOf: - - $ref: ./request/payment.yaml#/components/schemas/InitiatePaymentRequest - - type: object - required: - - quoteRef - not: - required: - - intent + $ref: ./request/payment.yaml#/components/schemas/InitiatePaymentByQuoteRequest responses: '200': description: Payment initiated by quote diff --git a/interface/api/payments/documents_act.yaml b/interface/api/payments/documents_act.yaml new file mode 100644 index 00000000..41eefaf4 --- /dev/null +++ b/interface/api/payments/documents_act.yaml @@ -0,0 +1,55 @@ +get: + tags: [Payments] + summary: Download act document by payment reference + description: Returns the billing act document as binary content. + operationId: paymentsGetActDocument + security: + - bearerAuth: [] + parameters: + - $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef + - name: payment_ref + in: query + required: false + description: Payment reference for which to fetch the act document. + schema: + type: string + - name: paymentRef + in: query + required: false + description: Alias of `payment_ref`. + schema: + type: string + responses: + '200': + description: Act document file + content: + application/pdf: + schema: + type: string + format: binary + application/octet-stream: + schema: + type: string + format: binary + '400': + $ref: ../response/operation.yaml#/components/responses/BadRequest + '401': + $ref: ../response/operation.yaml#/components/responses/Unauthorized + '403': + $ref: ../response/operation.yaml#/components/responses/Forbidden + '404': + $ref: ../response/operation.yaml#/components/responses/NotFound + '412': + description: Precondition failed + content: + application/json: + schema: + $ref: ../response/response.yaml#/components/schemas/ErrorResponse + '500': + $ref: ../response/operation.yaml#/components/responses/InternalServerError + '503': + description: Upstream service unavailable + content: + application/json: + schema: + $ref: ../response/response.yaml#/components/schemas/ErrorResponse diff --git a/interface/api/payments/list.yaml b/interface/api/payments/list.yaml index 3a26d51d..e01a5c91 100644 --- a/interface/api/payments/list.yaml +++ b/interface/api/payments/list.yaml @@ -17,6 +17,12 @@ get: description: Filter by quotation reference used for execution. schema: type: string + - name: quote_ref + in: query + required: false + description: Alias of `quotation_ref`. + schema: + type: string - name: created_from in: query required: false @@ -24,6 +30,13 @@ get: schema: type: string format: date-time + - name: createdFrom + in: query + required: false + description: Alias of `created_from`. + schema: + type: string + format: date-time - name: created_to in: query required: false @@ -31,6 +44,13 @@ get: schema: type: string format: date-time + - name: createdTo + in: query + required: false + description: Alias of `created_to`. + schema: + type: string + format: date-time - $ref: ../parameters/state.yaml#/components/parameters/State - $ref: ../parameters/states.yaml#/components/parameters/States - $ref: ../parameters/filter_states.yaml#/components/parameters/FilterStates diff --git a/interface/api/payments/registry.yaml b/interface/api/payments/registry.yaml new file mode 100644 index 00000000..42d796d7 --- /dev/null +++ b/interface/api/payments/registry.yaml @@ -0,0 +1,30 @@ +get: + tags: [Payments] + summary: Get discovery registry snapshot for payments dependencies + description: Returns the latest discovery lookup payload used by payments integrations. + operationId: paymentsRegistryList + security: + - bearerAuth: [] + parameters: + - $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef + responses: + '200': + description: Discovery registry payload + content: + application/json: + schema: + allOf: + - $ref: ../response/response.yaml#/components/schemas/BaseResponse + - type: object + properties: + data: + type: object + additionalProperties: true + '400': + $ref: ../response/operation.yaml#/components/responses/BadRequest + '401': + $ref: ../response/operation.yaml#/components/responses/Unauthorized + '403': + $ref: ../response/operation.yaml#/components/responses/Forbidden + '500': + $ref: ../response/operation.yaml#/components/responses/InternalServerError diff --git a/interface/api/payments/registry_refresh.yaml b/interface/api/payments/registry_refresh.yaml new file mode 100644 index 00000000..4719af70 --- /dev/null +++ b/interface/api/payments/registry_refresh.yaml @@ -0,0 +1,32 @@ +get: + tags: [Payments] + summary: Get latest discovery refresh event for payments dependencies + description: Returns the latest refresh event consumed by the payments API. + operationId: paymentsRegistryRefreshGet + security: + - bearerAuth: [] + parameters: + - $ref: ../parameters/organizations_ref.yaml#/components/parameters/OrganizationsRef + responses: + '200': + description: Discovery refresh payload + content: + application/json: + schema: + allOf: + - $ref: ../response/response.yaml#/components/schemas/BaseResponse + - type: object + properties: + data: + type: + - object + - 'null' + additionalProperties: true + '400': + $ref: ../response/operation.yaml#/components/responses/BadRequest + '401': + $ref: ../response/operation.yaml#/components/responses/Unauthorized + '403': + $ref: ../response/operation.yaml#/components/responses/Forbidden + '500': + $ref: ../response/operation.yaml#/components/responses/InternalServerError diff --git a/interface/api/payments/request/payment.yaml b/interface/api/payments/request/payment.yaml index a93eb217..ac5df516 100644 --- a/interface/api/payments/request/payment.yaml +++ b/interface/api/payments/request/payment.yaml @@ -120,3 +120,16 @@ components: quoteRef: description: Reference to a previously generated multi-quote. type: string + + InitiatePaymentByQuoteRequest: + description: Request payload to initiate one payment from an existing quote reference. + allOf: + - $ref: ./payment.yaml#/components/schemas/PaymentBase + - type: object + additionalProperties: false + required: + - quoteRef + properties: + quoteRef: + description: Reference to a previously generated quote to execute. + type: string