develop #38
268
src/openapi/claims/claims-forms.yaml
Normal file
268
src/openapi/claims/claims-forms.yaml
Normal file
@ -0,0 +1,268 @@
|
|||||||
|
openapi: 3.0.1
|
||||||
|
info:
|
||||||
|
title: ClaimsAPI
|
||||||
|
version: '1.0'
|
||||||
|
servers:
|
||||||
|
- url: https://services.acc.api.htm.nl/chipkaart/1.0
|
||||||
|
- url: http://services.acc.api.htm.nl/chipkaart/1.0
|
||||||
|
security:
|
||||||
|
- default: []
|
||||||
|
tags:
|
||||||
|
- name: Claims
|
||||||
|
paths:
|
||||||
|
/claims:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Claims
|
||||||
|
summary: Create a claim
|
||||||
|
description: >
|
||||||
|
Create a claim by sending a JSON as specified in the schema. By
|
||||||
|
specifying the chipcardnumber under 'chipkaart',
|
||||||
|
|
||||||
|
a claim for OV chipcard will be send to the OVC API. If no
|
||||||
|
chipcardnumber is specified under 'chipkaart', a claim for EMV is send
|
||||||
|
to mendix.
|
||||||
|
parameters: []
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/claimsEntity'
|
||||||
|
examples:
|
||||||
|
OVCK:
|
||||||
|
value:
|
||||||
|
aankomsthalte: '1'
|
||||||
|
instapdatum: '2024-03-06T15:20:44.549Z'
|
||||||
|
instaptijd: '2024-03-06T15:20:44.549Z'
|
||||||
|
ingecheckt: true
|
||||||
|
uitgecheckt: true
|
||||||
|
chipkaart: '1234123412341234'
|
||||||
|
afgeschrevenbedrag: 0
|
||||||
|
vertrekhalte: string
|
||||||
|
korting: true
|
||||||
|
iban: '1234123412341234'
|
||||||
|
naam: string
|
||||||
|
emailadres: user@example.com
|
||||||
|
uitstaptijd: '2024-03-06T15:20:44.549Z'
|
||||||
|
verwachtbedrag: 0
|
||||||
|
toelichting: string
|
||||||
|
lijn: '1'
|
||||||
|
vervoertype: '1'
|
||||||
|
serviceRefId: '1'
|
||||||
|
Totaalbedrag: 0
|
||||||
|
EMV:
|
||||||
|
value:
|
||||||
|
aankomsthalte: '1'
|
||||||
|
instapdatum: '2024-03-06T15:20:44.549Z'
|
||||||
|
instaptijd: '2024-03-06T15:20:44.549Z'
|
||||||
|
ingecheckt: true
|
||||||
|
uitgecheckt: true
|
||||||
|
afgeschrevenbedrag: 0
|
||||||
|
vertrekhalte: string
|
||||||
|
korting: true
|
||||||
|
iban: '1234123412341234'
|
||||||
|
naam: string
|
||||||
|
emailadres: user@example.com
|
||||||
|
uitstaptijd: '2024-03-06T15:20:44.549Z'
|
||||||
|
verwachtbedrag: 0
|
||||||
|
toelichting: string
|
||||||
|
lijn: '1'
|
||||||
|
vervoertype: '1'
|
||||||
|
serviceRefId: '1'
|
||||||
|
Totaalbedrag: 0
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: ok
|
||||||
|
'401':
|
||||||
|
description: Unauthorized
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/401Response'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/500Response'
|
||||||
|
security:
|
||||||
|
- default: []
|
||||||
|
x-auth-type: Application & Application User
|
||||||
|
x-throttling-tier: Unlimited
|
||||||
|
/refunds:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- Claims
|
||||||
|
summary: Create a refund request
|
||||||
|
description: Create a refund request by sending a JSON as specified in the schema. Either a serviceReferenceId or ovPasNumber should be present in order to fulfill the refund request.
|
||||||
|
parameters: []
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/refundsEntity'
|
||||||
|
examples:
|
||||||
|
EMV:
|
||||||
|
value:
|
||||||
|
emailAddress: 'j.beek@htm.nl'
|
||||||
|
orderNumber: 'ORD1000046'
|
||||||
|
serviceReferenceId: 'NLOVA5BCD124H3Z21X'
|
||||||
|
amount: 2305
|
||||||
|
iban: 'NL98INGB0003856625'
|
||||||
|
orderDate: '2025-01-13'
|
||||||
|
productName: 'HTM 20% korting'
|
||||||
|
OVpas:
|
||||||
|
value:
|
||||||
|
emailAddress: 'j.beek@htm.nl'
|
||||||
|
orderNumber: 'ORD1000046'
|
||||||
|
ovpasNumber: '63AW974'
|
||||||
|
iban: 'NL98INGB0003856625'
|
||||||
|
orderDate: '2025-01-13'
|
||||||
|
productName: 'HTM 20% korting'
|
||||||
|
responses:
|
||||||
|
'201':
|
||||||
|
description: Created
|
||||||
|
'401':
|
||||||
|
description: Unauthorized
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/401Response'
|
||||||
|
'500':
|
||||||
|
description: Internal Server Error
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/500Response'
|
||||||
|
security:
|
||||||
|
- default: []
|
||||||
|
x-auth-type: Application & Application User
|
||||||
|
x-throttling-tier: Unlimited
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
claimsEntity:
|
||||||
|
required:
|
||||||
|
- Totaalbedrag
|
||||||
|
- aankomsthalte
|
||||||
|
- afgeschrevenbedrag
|
||||||
|
- emailadres
|
||||||
|
- instapdatum
|
||||||
|
- instaptijd
|
||||||
|
- korting
|
||||||
|
- lijn
|
||||||
|
- serviceRefId
|
||||||
|
- toelichting
|
||||||
|
- uitgecheckt
|
||||||
|
- vertrekhalte
|
||||||
|
- vervoertype
|
||||||
|
- verwachtbedrag
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
aankomsthalte:
|
||||||
|
type: string
|
||||||
|
instapdatum:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
instaptijd:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
ingecheckt:
|
||||||
|
type: boolean
|
||||||
|
uitgecheckt:
|
||||||
|
type: boolean
|
||||||
|
chipkaart:
|
||||||
|
type: string
|
||||||
|
afgeschrevenbedrag:
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
vertrekhalte:
|
||||||
|
type: string
|
||||||
|
korting:
|
||||||
|
type: boolean
|
||||||
|
iban:
|
||||||
|
type: string
|
||||||
|
description: String of length between 15 en 32 characters
|
||||||
|
example: '1234123412341234'
|
||||||
|
naam:
|
||||||
|
type: string
|
||||||
|
emailadres:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
uitstaptijd:
|
||||||
|
type: string
|
||||||
|
format: date-time
|
||||||
|
verwachtbedrag:
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
toelichting:
|
||||||
|
type: string
|
||||||
|
lijn:
|
||||||
|
type: string
|
||||||
|
vervoertype:
|
||||||
|
type: string
|
||||||
|
serviceRefId:
|
||||||
|
type: string
|
||||||
|
Totaalbedrag:
|
||||||
|
type: number
|
||||||
|
format: float
|
||||||
|
refundsEntity:
|
||||||
|
required:
|
||||||
|
- emailAddress
|
||||||
|
- iban
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
emailAddress:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
example: j.beek@htm.nl
|
||||||
|
orderNumber:
|
||||||
|
type: string
|
||||||
|
example: ORD1000046
|
||||||
|
serviceReferenceId:
|
||||||
|
type: string
|
||||||
|
example: NLOVA5BCD124H3Z21X
|
||||||
|
amount:
|
||||||
|
type: integer
|
||||||
|
example: 12305
|
||||||
|
ovpasNumber:
|
||||||
|
type: string
|
||||||
|
example: 63AW974
|
||||||
|
iban:
|
||||||
|
type: string
|
||||||
|
example: NL00RABO000001337
|
||||||
|
orderDate:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
example: 2025-01-13
|
||||||
|
productName:
|
||||||
|
type: string
|
||||||
|
example: HTM 20% korting
|
||||||
|
401Response:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
example: '900901'
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
message:
|
||||||
|
type: string
|
||||||
|
example: Invalid Credentials
|
||||||
|
description:
|
||||||
|
type: string
|
||||||
|
example: >-
|
||||||
|
Invalid Credentials. Make sure you have provided the correct
|
||||||
|
security credentials
|
||||||
|
500Response:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
error:
|
||||||
|
type: string
|
||||||
|
example: error while connecting to backend
|
||||||
|
securitySchemes:
|
||||||
|
default:
|
||||||
|
type: oauth2
|
||||||
|
flows:
|
||||||
|
implicit:
|
||||||
|
authorizationUrl: https://services.acc.api.htm.nl/authorize
|
||||||
|
scopes: {}
|
||||||
649
src/openapi/customers/SE-customers.yaml
Normal file
649
src/openapi/customers/SE-customers.yaml
Normal file
@ -0,0 +1,649 @@
|
|||||||
|
openapi: 3.0.1
|
||||||
|
info:
|
||||||
|
title: Service Engine APIs for Customers
|
||||||
|
description: >-
|
||||||
|
Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database.
|
||||||
|
To be used by touchpoints to get information about HTM customers.
|
||||||
|
version: 'x.x'
|
||||||
|
servers:
|
||||||
|
- url: https://api.integratielaag.nl/abt/serviceengine/customers/x.x
|
||||||
|
tags:
|
||||||
|
- name: ServiceEngine Customers
|
||||||
|
description: >-
|
||||||
|
Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database.
|
||||||
|
To be used by touchpoints to get information about HTM customers.
|
||||||
|
paths:
|
||||||
|
/customers:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- ServiceEngine Customers
|
||||||
|
summary: Get a single customer profile based on search parameters
|
||||||
|
description: Get a single customer profile based on search parameters. Only returns a profile if a single result matches the parameters; when multiple results are found, additional seach parameters are required to disambiguate.
|
||||||
|
parameters:
|
||||||
|
- name: customerProfileId
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
- name: customerNumber
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 1000001
|
||||||
|
- name: customerStatusId
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
- name: debtorNumber
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 100001
|
||||||
|
- name: debtorStatusId
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
- name: birthname
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: John
|
||||||
|
- name: surname
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: Doe
|
||||||
|
- name: emailAddress
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
example: john.doe@mymailprovider.com
|
||||||
|
- name: dateOfBirth
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
example: "2000-01-01"
|
||||||
|
- name: addressStreet
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: Sesamestreet
|
||||||
|
- name: addressHouseNumber
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
- name: addressHouseNumberSuffix
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: A
|
||||||
|
- name: addressPostalCode
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: 1234 AB
|
||||||
|
- name: addressCity
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: The Hague
|
||||||
|
- name: addressCountry
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: The Netherlands
|
||||||
|
- name: phoneNumber
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: "0123456789"
|
||||||
|
- name: ovChipcardNumber
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 0123456789
|
||||||
|
- name: ovChipcardAlias
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: My ovchipcard
|
||||||
|
- name: ovPayTokenNumber
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 0123456789
|
||||||
|
- name: ovPayTokenAlias
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: My Ov Pay Token
|
||||||
|
- name: ovPayTokenXTat
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: 180d04e0-a721-447e-a1d9-b416937b43bc
|
||||||
|
- name: ovPayTokenXBot
|
||||||
|
in: query
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
example: e1307c73-676a-4d07-967b-6141276f7c7c
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/CustomersResponse'
|
||||||
|
'404':
|
||||||
|
description: No customer found
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"type": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers",
|
||||||
|
"apiErrorCode": "400.1",
|
||||||
|
"title": "Niet gevonden",
|
||||||
|
"detail": "Klant niet gevonden",
|
||||||
|
"instance": "555d00b5-bc3f-4591-949b-479e76d49ea7",
|
||||||
|
"errors": [
|
||||||
|
{
|
||||||
|
"subApiErrorCode": "0017"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
'409':
|
||||||
|
description: Multiple customers found
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
example:
|
||||||
|
{
|
||||||
|
"type": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers",
|
||||||
|
"apiErrorCode": "409.1",
|
||||||
|
"title": "Meer dan 1 klantprofiel gevonden",
|
||||||
|
"detail": "Meer dan 1 klantprofiel gevonden. Verfijn je zoekcriteria.",
|
||||||
|
"instance": "555d00b5-bc3f-4591-949b-479e76d49ea7"
|
||||||
|
}
|
||||||
|
/customers/tokens:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- ServiceEngine Customers
|
||||||
|
summary: Get a list of all OvPayTokens for a certain customer
|
||||||
|
description: Get a list of all OvPayTokens for a certain customer.
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/OvPayTokensResponse'
|
||||||
|
/customers/tokens/{ovPayTokenId}/productinstances:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- ServiceEngine Customers
|
||||||
|
summary: Get a list of all HTM products instantiated on the given OvPayToken
|
||||||
|
description: |-
|
||||||
|
Get a list of all HTM products instantiated on the given OvPayToken.
|
||||||
|
Only HTM products are returned; GBO does not allow HTM to get information on non-HTM product-instances.
|
||||||
|
Where relevant, operations to be performed are returned as HATEOAS links per product-instance.
|
||||||
|
parameters:
|
||||||
|
- name: ovPayTokenId
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
style: simple
|
||||||
|
description: Id of the OvPayToken to get product-instances for.
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/OvPayTokenProductInstancesResponse'
|
||||||
|
examples:
|
||||||
|
getEmptyProductInstances:
|
||||||
|
summary: No product-instances found on token
|
||||||
|
value:
|
||||||
|
productInstances: []
|
||||||
|
getSingleProductInstance:
|
||||||
|
summary: One non-renewable product-instance
|
||||||
|
value:
|
||||||
|
{
|
||||||
|
"productInstances": [
|
||||||
|
{
|
||||||
|
"productId": 1,
|
||||||
|
"name": "HTM 90% Korting",
|
||||||
|
"status": "Active",
|
||||||
|
"isRenewable": true,
|
||||||
|
"productCategory": {
|
||||||
|
"productCategoryId": 1,
|
||||||
|
"name": "Kortingsabonnement"
|
||||||
|
},
|
||||||
|
"fromInclusive": "2024-11-25T13:25:00+01:00",
|
||||||
|
"untilInclusive": "2024-12-25T03:59:59+01:00",
|
||||||
|
"orderId": "501B17EF-36C4-4039-B92C-6517969B464E",
|
||||||
|
"orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E",
|
||||||
|
"contractId": "56B17EF-C436-9043-B76C-481797WEB464F",
|
||||||
|
"_links": {
|
||||||
|
"self": {
|
||||||
|
"href": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances/1",
|
||||||
|
"method": "GET"
|
||||||
|
},
|
||||||
|
"get_order": {
|
||||||
|
"href": "https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E",
|
||||||
|
"method": "GET"
|
||||||
|
},
|
||||||
|
"get_contract": {
|
||||||
|
"href": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F",
|
||||||
|
"method": "GET"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
components:
|
||||||
|
schemas:
|
||||||
|
CustomersResponse:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
customerProfileId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
customerNumber:
|
||||||
|
type: integer
|
||||||
|
example: 1000001
|
||||||
|
customerStatus:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
customerStatusId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: Active
|
||||||
|
debtorNumber:
|
||||||
|
type: string
|
||||||
|
example: DB100001
|
||||||
|
debtorStatus:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
debtorStatusId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: Active
|
||||||
|
person:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
prefix:
|
||||||
|
type: string
|
||||||
|
example: Mr
|
||||||
|
birthname:
|
||||||
|
type: string
|
||||||
|
example: John
|
||||||
|
surname:
|
||||||
|
type: string
|
||||||
|
example: Doe
|
||||||
|
suffix:
|
||||||
|
type: string
|
||||||
|
example: Jr.
|
||||||
|
dateOfBirth:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
example: '2023-02-01'
|
||||||
|
emailAddress:
|
||||||
|
type: string
|
||||||
|
format: email
|
||||||
|
example: 4j2dD@example.com
|
||||||
|
addresses:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
addressId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
isPreferred:
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
|
addressType:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
addressTypeId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: Home
|
||||||
|
street:
|
||||||
|
type: string
|
||||||
|
example: Appelstraat
|
||||||
|
houseNumber:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
houseNumberSuffix:
|
||||||
|
type: string
|
||||||
|
example: BS
|
||||||
|
postalCode:
|
||||||
|
type: string
|
||||||
|
example: 1234AB
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
example: Den Haag
|
||||||
|
country:
|
||||||
|
type: string
|
||||||
|
example: Nederland
|
||||||
|
_links:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
self:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/addresses/1
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
delete_address:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/addresses/1
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: DELETE
|
||||||
|
phones:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
phoneId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
isPreferred:
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
|
phoneType:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
phoneTypeId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: Home
|
||||||
|
number:
|
||||||
|
type: string
|
||||||
|
example: "0123456789"
|
||||||
|
countryCode:
|
||||||
|
type: string
|
||||||
|
example: "0031"
|
||||||
|
_links:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
self:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/phones/1
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
delete_phone:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/phones/1
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: DELETE
|
||||||
|
_links:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
self:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
create_customer_status:
|
||||||
|
type: object
|
||||||
|
description: ONLY ALLOWED FOR SMP - Create a new customer status
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/statuses
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: POST
|
||||||
|
partial_edit:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: PATCH
|
||||||
|
get_tokens:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
create_token:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: POST
|
||||||
|
OvPayTokensResponse:
|
||||||
|
type: object
|
||||||
|
required:
|
||||||
|
- ovPayTokens
|
||||||
|
properties:
|
||||||
|
ovPayTokens:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
ovPayTokenId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
tokenType:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
tokenTypeId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: EMV
|
||||||
|
alias:
|
||||||
|
type: string
|
||||||
|
example: MyToken
|
||||||
|
tokenStatus:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
tokenStatusId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: Active
|
||||||
|
expirationDate:
|
||||||
|
type: string
|
||||||
|
format: date
|
||||||
|
example: '2023-02-01'
|
||||||
|
replacedByTokenId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
_links:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
self:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
partial_edit:
|
||||||
|
type: object
|
||||||
|
description: External touchpoints are only allowed to change alias - SMP can also change tokenStatus
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: PATCH
|
||||||
|
replace_token:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/replace
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: POST
|
||||||
|
delete_token:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: DELETE
|
||||||
|
get_productinstances:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
get_trips:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/trips
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
OvPayTokenProductInstancesResponse:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
productInstances:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
productId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: HTM 90% Korting
|
||||||
|
status:
|
||||||
|
type: string
|
||||||
|
enum: [ "Active", "Ended", "Refunded" ]
|
||||||
|
example: Active
|
||||||
|
isRenewable:
|
||||||
|
type: boolean
|
||||||
|
example: true
|
||||||
|
productCategory:
|
||||||
|
type: object
|
||||||
|
description: The category of the originating HTM product definition
|
||||||
|
properties:
|
||||||
|
productCategoryId:
|
||||||
|
type: integer
|
||||||
|
example: 1
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
example: Kortingsabonnement
|
||||||
|
fromInclusive:
|
||||||
|
type: string
|
||||||
|
format: date-time-offset
|
||||||
|
example: "2024-11-25T13:25:00+01:00"
|
||||||
|
untilInclusive:
|
||||||
|
type: string
|
||||||
|
format: date-time-offset
|
||||||
|
description: >-
|
||||||
|
If not present, this product-instance represents a subscription/contract without a real end date. If present, it can be either the natural end date or the refund timestamp.
|
||||||
|
example: "2024-12-25T03:59:59+01:00"
|
||||||
|
orderId:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: 501B17EF-36C4-4039-B92C-6517969B464E
|
||||||
|
orderLineId:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: 38B17EF-36C4-4039-B92C-4817969B464E
|
||||||
|
contractId:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
|
example: 56B17EF-C436-9043-B76C-481797WEB464F
|
||||||
|
description: Only present for subscriptions/contracts
|
||||||
|
_links:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
self:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
get_order:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
description: Always present for any HTM product-instance
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
get_contract:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
href:
|
||||||
|
type: string
|
||||||
|
description: Only present for subscriptions/contracts
|
||||||
|
example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F
|
||||||
|
method:
|
||||||
|
type: string
|
||||||
|
example: GET
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
52
src/plugins/gitea-add-swagger-button.user.js
Normal file
52
src/plugins/gitea-add-swagger-button.user.js
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
// ==UserScript==
|
||||||
|
// @name gitea-add-swagger-button
|
||||||
|
// @namespace https://integratielaag.nl/
|
||||||
|
// @version 0.1.1
|
||||||
|
// @description Creates a button in Gitea to view Swagger
|
||||||
|
// @author bboterm
|
||||||
|
// @match https://git.integratielaag.nl/*.yaml
|
||||||
|
// @match https://git.integratielaag.nl/*.json
|
||||||
|
// @icon https://www.google.com/s2/favicons?sz=64&domain=gitea.com
|
||||||
|
// @grant none
|
||||||
|
// @updateURL https://git.integratielaag.nl/HTM/ovpay/raw/branch/develop/src/plugins/gitea-add-swagger-button.user.js
|
||||||
|
// @downloadURL https://git.integratielaag.nl/HTM/ovpay/raw/branch/develop/src/plugins/gitea-add-swagger-button.user.js
|
||||||
|
// ==/UserScript==
|
||||||
|
// @history 0.1.0 Initial release
|
||||||
|
// @history 0.1.1 Added support for YAML and JSON files
|
||||||
|
|
||||||
|
(function() {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
// Set the base URL for the Swagger instance
|
||||||
|
const swaggerBaseURL = 'https://swagger.integratielaag.nl/?url=';
|
||||||
|
// Get the base URL from the current webpage
|
||||||
|
const gitBaseURL = window.location.origin;
|
||||||
|
|
||||||
|
// Replace 'parent-class-name' with the class name of the parent div
|
||||||
|
const parentClassName = 'file-actions';
|
||||||
|
// Replace 'child-class-name' with the class name of the child div
|
||||||
|
const childClassName = 'buttons';
|
||||||
|
|
||||||
|
const parentDiv = document.querySelector('div.file-actions');
|
||||||
|
if (parentDiv) {
|
||||||
|
const childDiv = parentDiv.querySelector('div.buttons');
|
||||||
|
if (childDiv) {
|
||||||
|
const firstATag = childDiv.querySelector('a');
|
||||||
|
if (firstATag) {
|
||||||
|
// Get the URL of the raw file
|
||||||
|
const hrefValue = firstATag.getAttribute('href');
|
||||||
|
// Create a string literal for the new Swagger button
|
||||||
|
const swaggerButton = `<a class="ui mini basic button" target="_blank" href="${swaggerBaseURL}${gitBaseURL}/${hrefValue}">Swagger</a>`;
|
||||||
|
// Add the Swagger button to the HTML
|
||||||
|
childDiv.innerHTML = swaggerButton + childDiv.innerHTML;
|
||||||
|
} else {
|
||||||
|
console.log('No <a> tag found inside the child div.');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log(`Child div with class '${childClassName}' not found.`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
console.log(`Parent div with class '${parentClassName}' not found.`);
|
||||||
|
}
|
||||||
|
})();
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user