@ogcio/building-blocks-sdk 0.2.69 → 0.2.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitleaksignore +7 -1
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/client/clients/audit/index.d.ts +132 -0
- package/dist/client/clients/audit/index.d.ts.map +1 -0
- package/dist/client/clients/audit/index.js +14 -0
- package/dist/client/clients/audit/index.js.map +1 -0
- package/dist/client/clients/audit/schema.d.ts +246 -0
- package/dist/client/clients/audit/schema.d.ts.map +1 -0
- package/dist/client/clients/audit/schema.js +2 -0
- package/dist/client/clients/audit/schema.js.map +1 -0
- package/dist/client/clients/payments/index.d.ts +96 -0
- package/dist/client/clients/payments/index.d.ts.map +1 -1
- package/dist/client/clients/payments/index.js +11 -0
- package/dist/client/clients/payments/index.js.map +1 -1
- package/dist/client/clients/payments/schema.d.ts +260 -45
- package/dist/client/clients/payments/schema.d.ts.map +1 -1
- package/dist/clients-configurations/clients-configuration.json +10 -2
- package/dist/types/index.d.ts +9 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +2 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client/clients/audit/index.ts +25 -0
- package/src/client/clients/audit/open-api-definition.json +433 -0
- package/src/client/clients/audit/schema.ts +245 -0
- package/src/client/clients/payments/index.ts +17 -0
- package/src/client/clients/payments/open-api-definition.json +432 -1
- package/src/client/clients/payments/schema.ts +260 -45
- package/src/clients-configurations/clients-configuration.json +10 -2
- package/src/types/index.ts +10 -2
|
@@ -326,6 +326,23 @@ export class Payments extends BaseClient<paths> {
|
|
|
326
326
|
);
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
+
async createWorldpayPaymentRequest(
|
|
330
|
+
data: paths["/api/v1/worldpay/paymentRequest"]["post"]["requestBody"]["content"]["application/json"],
|
|
331
|
+
) {
|
|
332
|
+
return this.client
|
|
333
|
+
.POST("/api/v1/worldpay/paymentRequest", {
|
|
334
|
+
body: data,
|
|
335
|
+
})
|
|
336
|
+
.then(
|
|
337
|
+
(response) => formatResponse(response, this.serviceName, this.logger),
|
|
338
|
+
(reason) => formatError(reason, this.serviceName, this.logger),
|
|
339
|
+
)
|
|
340
|
+
.catch((reason) => {
|
|
341
|
+
console.error(">>> Error creating Worldpay payment request", reason);
|
|
342
|
+
return formatError(reason, this.serviceName, this.logger);
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
|
|
329
346
|
async createRefund(
|
|
330
347
|
transactionId: paths["/api/v1/transactions/{transactionId}/refund"]["post"]["parameters"]["path"]["transactionId"],
|
|
331
348
|
data: paths["/api/v1/transactions/{transactionId}/refund"]["post"]["requestBody"]["content"]["application/json"],
|
|
@@ -3848,7 +3848,7 @@
|
|
|
3848
3848
|
"tags": [
|
|
3849
3849
|
"Payment Requests"
|
|
3850
3850
|
],
|
|
3851
|
-
"description": "Retrieve public information about a specific payment request. This endpoint provides citizen-facing information without sensitive details.",
|
|
3851
|
+
"description": "Retrieve public information about a specific payment request. This endpoint provides citizen-facing information without sensitive details accessible without authentication.",
|
|
3852
3852
|
"parameters": [
|
|
3853
3853
|
{
|
|
3854
3854
|
"schema": {
|
|
@@ -12667,6 +12667,433 @@
|
|
|
12667
12667
|
}
|
|
12668
12668
|
}
|
|
12669
12669
|
},
|
|
12670
|
+
"/api/v1/worldpay/paymentRequest": {
|
|
12671
|
+
"post": {
|
|
12672
|
+
"operationId": "createWorldpayPaymentRequest",
|
|
12673
|
+
"summary": "Get Worldpay Payment Object",
|
|
12674
|
+
"tags": [
|
|
12675
|
+
"Worldpay"
|
|
12676
|
+
],
|
|
12677
|
+
"description": "Generate a Worldpay payment object for processing payments through the Worldpay payment provider.",
|
|
12678
|
+
"requestBody": {
|
|
12679
|
+
"content": {
|
|
12680
|
+
"application/json": {
|
|
12681
|
+
"schema": {
|
|
12682
|
+
"type": "object",
|
|
12683
|
+
"properties": {
|
|
12684
|
+
"intentId": {
|
|
12685
|
+
"type": "string"
|
|
12686
|
+
},
|
|
12687
|
+
"amount": {
|
|
12688
|
+
"type": "string"
|
|
12689
|
+
},
|
|
12690
|
+
"providerId": {
|
|
12691
|
+
"type": "string"
|
|
12692
|
+
},
|
|
12693
|
+
"paymentRequestId": {
|
|
12694
|
+
"type": "string"
|
|
12695
|
+
},
|
|
12696
|
+
"token": {
|
|
12697
|
+
"type": "string"
|
|
12698
|
+
}
|
|
12699
|
+
},
|
|
12700
|
+
"required": [
|
|
12701
|
+
"intentId",
|
|
12702
|
+
"amount",
|
|
12703
|
+
"providerId",
|
|
12704
|
+
"paymentRequestId"
|
|
12705
|
+
]
|
|
12706
|
+
},
|
|
12707
|
+
"examples": {
|
|
12708
|
+
"example1": {
|
|
12709
|
+
"value": {
|
|
12710
|
+
"intentId": "pi_worldpay_1234567890",
|
|
12711
|
+
"amount": "25.00",
|
|
12712
|
+
"providerId": "prov_realex_001",
|
|
12713
|
+
"paymentRequestId": "pr_1234567890abcdef",
|
|
12714
|
+
"token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleGFtcGxlIjoiZXhhbXBsZV90b2tlbl9kYXRhIn0uZXhhbXBsZV9zaWduYXR1cmU"
|
|
12715
|
+
}
|
|
12716
|
+
},
|
|
12717
|
+
"example2": {
|
|
12718
|
+
"value": {
|
|
12719
|
+
"intentId": "pi_worldpay_0987654321",
|
|
12720
|
+
"amount": "80.00",
|
|
12721
|
+
"providerId": "prov_realex_001",
|
|
12722
|
+
"paymentRequestId": "pr_0987654321fedcba"
|
|
12723
|
+
}
|
|
12724
|
+
}
|
|
12725
|
+
}
|
|
12726
|
+
}
|
|
12727
|
+
},
|
|
12728
|
+
"required": true
|
|
12729
|
+
},
|
|
12730
|
+
"responses": {
|
|
12731
|
+
"200": {
|
|
12732
|
+
"description": "Default Response",
|
|
12733
|
+
"content": {
|
|
12734
|
+
"application/json": {
|
|
12735
|
+
"schema": {
|
|
12736
|
+
"type": "object",
|
|
12737
|
+
"properties": {
|
|
12738
|
+
"data": {
|
|
12739
|
+
"type": "object",
|
|
12740
|
+
"properties": {
|
|
12741
|
+
"reference": {
|
|
12742
|
+
"type": "string"
|
|
12743
|
+
}
|
|
12744
|
+
},
|
|
12745
|
+
"required": [
|
|
12746
|
+
"reference"
|
|
12747
|
+
],
|
|
12748
|
+
"example": {
|
|
12749
|
+
"reference": "https://hpp.worldpay.com/pay"
|
|
12750
|
+
}
|
|
12751
|
+
},
|
|
12752
|
+
"metadata": {
|
|
12753
|
+
"type": "object",
|
|
12754
|
+
"properties": {
|
|
12755
|
+
"links": {
|
|
12756
|
+
"description": "Object containing the links to the related endpoints",
|
|
12757
|
+
"type": "object",
|
|
12758
|
+
"properties": {
|
|
12759
|
+
"self": {
|
|
12760
|
+
"type": "object",
|
|
12761
|
+
"properties": {
|
|
12762
|
+
"href": {
|
|
12763
|
+
"description": "URL pointing to the request itself",
|
|
12764
|
+
"type": "string"
|
|
12765
|
+
}
|
|
12766
|
+
}
|
|
12767
|
+
},
|
|
12768
|
+
"next": {
|
|
12769
|
+
"type": "object",
|
|
12770
|
+
"properties": {
|
|
12771
|
+
"href": {
|
|
12772
|
+
"description": "URL pointing to the next page of results in a paginated response. If there are no more results, this field may be omitted",
|
|
12773
|
+
"type": "string"
|
|
12774
|
+
}
|
|
12775
|
+
}
|
|
12776
|
+
},
|
|
12777
|
+
"prev": {
|
|
12778
|
+
"type": "object",
|
|
12779
|
+
"properties": {
|
|
12780
|
+
"href": {
|
|
12781
|
+
"description": "URL pointing to the previous page of results in a paginated response. If there are no more results, this field may be omitted",
|
|
12782
|
+
"type": "string"
|
|
12783
|
+
}
|
|
12784
|
+
}
|
|
12785
|
+
},
|
|
12786
|
+
"first": {
|
|
12787
|
+
"type": "object",
|
|
12788
|
+
"properties": {
|
|
12789
|
+
"href": {
|
|
12790
|
+
"description": "URL pointing to the first page of results in a paginated response",
|
|
12791
|
+
"type": "string"
|
|
12792
|
+
}
|
|
12793
|
+
}
|
|
12794
|
+
},
|
|
12795
|
+
"last": {
|
|
12796
|
+
"type": "object",
|
|
12797
|
+
"properties": {
|
|
12798
|
+
"href": {
|
|
12799
|
+
"description": "URL pointing to the first page of results in a paginated response",
|
|
12800
|
+
"type": "string"
|
|
12801
|
+
}
|
|
12802
|
+
}
|
|
12803
|
+
},
|
|
12804
|
+
"pages": {
|
|
12805
|
+
"description": "It may contain a list of other useful URLs, e.g. one entry for page:'page 1', 'page 2'",
|
|
12806
|
+
"type": "object",
|
|
12807
|
+
"additionalProperties": {
|
|
12808
|
+
"type": "object",
|
|
12809
|
+
"properties": {
|
|
12810
|
+
"href": {
|
|
12811
|
+
"type": "string"
|
|
12812
|
+
}
|
|
12813
|
+
}
|
|
12814
|
+
}
|
|
12815
|
+
}
|
|
12816
|
+
},
|
|
12817
|
+
"required": [
|
|
12818
|
+
"self",
|
|
12819
|
+
"first",
|
|
12820
|
+
"last",
|
|
12821
|
+
"pages"
|
|
12822
|
+
]
|
|
12823
|
+
},
|
|
12824
|
+
"totalCount": {
|
|
12825
|
+
"description": "Number representing the total number of available items",
|
|
12826
|
+
"type": "number"
|
|
12827
|
+
}
|
|
12828
|
+
}
|
|
12829
|
+
}
|
|
12830
|
+
},
|
|
12831
|
+
"required": [
|
|
12832
|
+
"data"
|
|
12833
|
+
]
|
|
12834
|
+
}
|
|
12835
|
+
}
|
|
12836
|
+
}
|
|
12837
|
+
},
|
|
12838
|
+
"404": {
|
|
12839
|
+
"description": "Default Response",
|
|
12840
|
+
"content": {
|
|
12841
|
+
"application/json": {
|
|
12842
|
+
"schema": {
|
|
12843
|
+
"type": "object",
|
|
12844
|
+
"properties": {
|
|
12845
|
+
"code": {
|
|
12846
|
+
"type": "string"
|
|
12847
|
+
},
|
|
12848
|
+
"detail": {
|
|
12849
|
+
"type": "string"
|
|
12850
|
+
},
|
|
12851
|
+
"requestId": {
|
|
12852
|
+
"type": "string"
|
|
12853
|
+
},
|
|
12854
|
+
"name": {
|
|
12855
|
+
"type": "string"
|
|
12856
|
+
},
|
|
12857
|
+
"validation": {},
|
|
12858
|
+
"validationContext": {
|
|
12859
|
+
"type": "string"
|
|
12860
|
+
}
|
|
12861
|
+
},
|
|
12862
|
+
"required": [
|
|
12863
|
+
"code",
|
|
12864
|
+
"detail",
|
|
12865
|
+
"requestId",
|
|
12866
|
+
"name"
|
|
12867
|
+
]
|
|
12868
|
+
},
|
|
12869
|
+
"examples": {
|
|
12870
|
+
"example1": {
|
|
12871
|
+
"value": {
|
|
12872
|
+
"code": "400",
|
|
12873
|
+
"detail": "Bad Request - Invalid input data",
|
|
12874
|
+
"requestId": "req_1234567890abcdef",
|
|
12875
|
+
"name": "BadRequestError"
|
|
12876
|
+
}
|
|
12877
|
+
},
|
|
12878
|
+
"example2": {
|
|
12879
|
+
"value": {
|
|
12880
|
+
"code": "401",
|
|
12881
|
+
"detail": "Unauthorized - Missing or invalid JWT token",
|
|
12882
|
+
"requestId": "req_0987654321fedcba",
|
|
12883
|
+
"name": "UnauthorizedError"
|
|
12884
|
+
}
|
|
12885
|
+
},
|
|
12886
|
+
"example3": {
|
|
12887
|
+
"value": {
|
|
12888
|
+
"code": "404",
|
|
12889
|
+
"detail": "Not Found - Resource not found",
|
|
12890
|
+
"requestId": "req_fedcba0987654321",
|
|
12891
|
+
"name": "NotFoundError"
|
|
12892
|
+
}
|
|
12893
|
+
},
|
|
12894
|
+
"example4": {
|
|
12895
|
+
"value": {
|
|
12896
|
+
"code": "422",
|
|
12897
|
+
"detail": "Unprocessable Entity - Validation failed",
|
|
12898
|
+
"requestId": "req_abcdef1234567890",
|
|
12899
|
+
"name": "ValidationError",
|
|
12900
|
+
"validation": {
|
|
12901
|
+
"field": "title.en",
|
|
12902
|
+
"message": "Title in English is required"
|
|
12903
|
+
},
|
|
12904
|
+
"validationContext": "body"
|
|
12905
|
+
}
|
|
12906
|
+
},
|
|
12907
|
+
"example5": {
|
|
12908
|
+
"value": {
|
|
12909
|
+
"code": "500",
|
|
12910
|
+
"detail": "Internal Server Error - An unexpected error occurred",
|
|
12911
|
+
"requestId": "req_1234567890fedcba",
|
|
12912
|
+
"name": "InternalServerError"
|
|
12913
|
+
}
|
|
12914
|
+
}
|
|
12915
|
+
}
|
|
12916
|
+
}
|
|
12917
|
+
}
|
|
12918
|
+
},
|
|
12919
|
+
"422": {
|
|
12920
|
+
"description": "Default Response",
|
|
12921
|
+
"content": {
|
|
12922
|
+
"application/json": {
|
|
12923
|
+
"schema": {
|
|
12924
|
+
"type": "object",
|
|
12925
|
+
"properties": {
|
|
12926
|
+
"code": {
|
|
12927
|
+
"type": "string"
|
|
12928
|
+
},
|
|
12929
|
+
"detail": {
|
|
12930
|
+
"type": "string"
|
|
12931
|
+
},
|
|
12932
|
+
"requestId": {
|
|
12933
|
+
"type": "string"
|
|
12934
|
+
},
|
|
12935
|
+
"name": {
|
|
12936
|
+
"type": "string"
|
|
12937
|
+
},
|
|
12938
|
+
"validation": {},
|
|
12939
|
+
"validationContext": {
|
|
12940
|
+
"type": "string"
|
|
12941
|
+
}
|
|
12942
|
+
},
|
|
12943
|
+
"required": [
|
|
12944
|
+
"code",
|
|
12945
|
+
"detail",
|
|
12946
|
+
"requestId",
|
|
12947
|
+
"name"
|
|
12948
|
+
]
|
|
12949
|
+
},
|
|
12950
|
+
"examples": {
|
|
12951
|
+
"example1": {
|
|
12952
|
+
"value": {
|
|
12953
|
+
"code": "400",
|
|
12954
|
+
"detail": "Bad Request - Invalid input data",
|
|
12955
|
+
"requestId": "req_1234567890abcdef",
|
|
12956
|
+
"name": "BadRequestError"
|
|
12957
|
+
}
|
|
12958
|
+
},
|
|
12959
|
+
"example2": {
|
|
12960
|
+
"value": {
|
|
12961
|
+
"code": "401",
|
|
12962
|
+
"detail": "Unauthorized - Missing or invalid JWT token",
|
|
12963
|
+
"requestId": "req_0987654321fedcba",
|
|
12964
|
+
"name": "UnauthorizedError"
|
|
12965
|
+
}
|
|
12966
|
+
},
|
|
12967
|
+
"example3": {
|
|
12968
|
+
"value": {
|
|
12969
|
+
"code": "404",
|
|
12970
|
+
"detail": "Not Found - Resource not found",
|
|
12971
|
+
"requestId": "req_fedcba0987654321",
|
|
12972
|
+
"name": "NotFoundError"
|
|
12973
|
+
}
|
|
12974
|
+
},
|
|
12975
|
+
"example4": {
|
|
12976
|
+
"value": {
|
|
12977
|
+
"code": "422",
|
|
12978
|
+
"detail": "Unprocessable Entity - Validation failed",
|
|
12979
|
+
"requestId": "req_abcdef1234567890",
|
|
12980
|
+
"name": "ValidationError",
|
|
12981
|
+
"validation": {
|
|
12982
|
+
"field": "title.en",
|
|
12983
|
+
"message": "Title in English is required"
|
|
12984
|
+
},
|
|
12985
|
+
"validationContext": "body"
|
|
12986
|
+
}
|
|
12987
|
+
},
|
|
12988
|
+
"example5": {
|
|
12989
|
+
"value": {
|
|
12990
|
+
"code": "500",
|
|
12991
|
+
"detail": "Internal Server Error - An unexpected error occurred",
|
|
12992
|
+
"requestId": "req_1234567890fedcba",
|
|
12993
|
+
"name": "InternalServerError"
|
|
12994
|
+
}
|
|
12995
|
+
}
|
|
12996
|
+
}
|
|
12997
|
+
}
|
|
12998
|
+
}
|
|
12999
|
+
}
|
|
13000
|
+
}
|
|
13001
|
+
}
|
|
13002
|
+
},
|
|
13003
|
+
"/api/v1/worldpay/webhook": {
|
|
13004
|
+
"post": {
|
|
13005
|
+
"operationId": "handleWorldpayWebhook",
|
|
13006
|
+
"summary": "Worldpay Webhook Handler",
|
|
13007
|
+
"tags": [
|
|
13008
|
+
"Worldpay"
|
|
13009
|
+
],
|
|
13010
|
+
"description": "Handle webhook events from Worldpay payment provider. This endpoint processes payment status updates, failed payments, and other Worldpay events to keep transaction status in sync.",
|
|
13011
|
+
"security": [],
|
|
13012
|
+
"responses": {
|
|
13013
|
+
"404": {
|
|
13014
|
+
"description": "Default Response",
|
|
13015
|
+
"content": {
|
|
13016
|
+
"application/json": {
|
|
13017
|
+
"schema": {
|
|
13018
|
+
"type": "object",
|
|
13019
|
+
"properties": {
|
|
13020
|
+
"code": {
|
|
13021
|
+
"type": "string"
|
|
13022
|
+
},
|
|
13023
|
+
"detail": {
|
|
13024
|
+
"type": "string"
|
|
13025
|
+
},
|
|
13026
|
+
"requestId": {
|
|
13027
|
+
"type": "string"
|
|
13028
|
+
},
|
|
13029
|
+
"name": {
|
|
13030
|
+
"type": "string"
|
|
13031
|
+
},
|
|
13032
|
+
"validation": {},
|
|
13033
|
+
"validationContext": {
|
|
13034
|
+
"type": "string"
|
|
13035
|
+
}
|
|
13036
|
+
},
|
|
13037
|
+
"required": [
|
|
13038
|
+
"code",
|
|
13039
|
+
"detail",
|
|
13040
|
+
"requestId",
|
|
13041
|
+
"name"
|
|
13042
|
+
]
|
|
13043
|
+
},
|
|
13044
|
+
"examples": {
|
|
13045
|
+
"example1": {
|
|
13046
|
+
"value": {
|
|
13047
|
+
"code": "400",
|
|
13048
|
+
"detail": "Bad Request - Invalid input data",
|
|
13049
|
+
"requestId": "req_1234567890abcdef",
|
|
13050
|
+
"name": "BadRequestError"
|
|
13051
|
+
}
|
|
13052
|
+
},
|
|
13053
|
+
"example2": {
|
|
13054
|
+
"value": {
|
|
13055
|
+
"code": "401",
|
|
13056
|
+
"detail": "Unauthorized - Missing or invalid JWT token",
|
|
13057
|
+
"requestId": "req_0987654321fedcba",
|
|
13058
|
+
"name": "UnauthorizedError"
|
|
13059
|
+
}
|
|
13060
|
+
},
|
|
13061
|
+
"example3": {
|
|
13062
|
+
"value": {
|
|
13063
|
+
"code": "404",
|
|
13064
|
+
"detail": "Not Found - Resource not found",
|
|
13065
|
+
"requestId": "req_fedcba0987654321",
|
|
13066
|
+
"name": "NotFoundError"
|
|
13067
|
+
}
|
|
13068
|
+
},
|
|
13069
|
+
"example4": {
|
|
13070
|
+
"value": {
|
|
13071
|
+
"code": "422",
|
|
13072
|
+
"detail": "Unprocessable Entity - Validation failed",
|
|
13073
|
+
"requestId": "req_abcdef1234567890",
|
|
13074
|
+
"name": "ValidationError",
|
|
13075
|
+
"validation": {
|
|
13076
|
+
"field": "title.en",
|
|
13077
|
+
"message": "Title in English is required"
|
|
13078
|
+
},
|
|
13079
|
+
"validationContext": "body"
|
|
13080
|
+
}
|
|
13081
|
+
},
|
|
13082
|
+
"example5": {
|
|
13083
|
+
"value": {
|
|
13084
|
+
"code": "500",
|
|
13085
|
+
"detail": "Internal Server Error - An unexpected error occurred",
|
|
13086
|
+
"requestId": "req_1234567890fedcba",
|
|
13087
|
+
"name": "InternalServerError"
|
|
13088
|
+
}
|
|
13089
|
+
}
|
|
13090
|
+
}
|
|
13091
|
+
}
|
|
13092
|
+
}
|
|
13093
|
+
}
|
|
13094
|
+
}
|
|
13095
|
+
}
|
|
13096
|
+
},
|
|
12670
13097
|
"/api/v1/jwt/verify": {
|
|
12671
13098
|
"post": {
|
|
12672
13099
|
"operationId": "verifyJWTToken",
|
|
@@ -12864,6 +13291,10 @@
|
|
|
12864
13291
|
"name": "Realex",
|
|
12865
13292
|
"description": "Realex payment provider integration endpoints"
|
|
12866
13293
|
},
|
|
13294
|
+
{
|
|
13295
|
+
"name": "Worldpay",
|
|
13296
|
+
"description": "Worldpay payment provider integration endpoints"
|
|
13297
|
+
},
|
|
12867
13298
|
{
|
|
12868
13299
|
"name": "Citizen",
|
|
12869
13300
|
"description": "Citizen-facing payment and transaction endpoints"
|