@gojinko/api-client 2.13.0 → 2.15.0
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/README.md +29 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/tools.d.ts +17 -4
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +5 -0
- package/dist/tools.js.map +1 -1
- package/dist/types/devplatform.d.ts +16 -7
- package/dist/types/devplatform.d.ts.map +1 -1
- package/dist/types/devplatform.js +1 -1
- package/dist/types/generated.d.ts +387 -29
- package/dist/types/generated.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.yaml +315 -56
package/public-api.yaml
CHANGED
|
@@ -14,6 +14,136 @@ components:
|
|
|
14
14
|
type: http
|
|
15
15
|
scheme: bearer
|
|
16
16
|
schemas:
|
|
17
|
+
AgentPaymentSubmitRequest:
|
|
18
|
+
type: object
|
|
19
|
+
properties:
|
|
20
|
+
trip_id:
|
|
21
|
+
type: string
|
|
22
|
+
example: trip_1048576
|
|
23
|
+
shared_payment_token:
|
|
24
|
+
type: string
|
|
25
|
+
example: spt_1Nq8L2eZvKYlo2C0
|
|
26
|
+
required:
|
|
27
|
+
- trip_id
|
|
28
|
+
- shared_payment_token
|
|
29
|
+
AgentPaymentSubmitResponse:
|
|
30
|
+
type: object
|
|
31
|
+
properties:
|
|
32
|
+
fulfillment_cart_id:
|
|
33
|
+
type: integer
|
|
34
|
+
status:
|
|
35
|
+
type: string
|
|
36
|
+
example: processing
|
|
37
|
+
payment_verified:
|
|
38
|
+
type: boolean
|
|
39
|
+
message:
|
|
40
|
+
type: string
|
|
41
|
+
checkout_url:
|
|
42
|
+
type: string
|
|
43
|
+
description: Hosted-checkout fallback, present only on a 3DS step-up / decline.
|
|
44
|
+
recap_token:
|
|
45
|
+
type: string
|
|
46
|
+
AgentSPTParams:
|
|
47
|
+
type: object
|
|
48
|
+
properties:
|
|
49
|
+
max_amount:
|
|
50
|
+
type: integer
|
|
51
|
+
description: Locked cart total in the smallest currency unit — scope the Shared
|
|
52
|
+
Payment Token to at most this.
|
|
53
|
+
example: 259449
|
|
54
|
+
currency:
|
|
55
|
+
type: string
|
|
56
|
+
example: EUR
|
|
57
|
+
stripe_profile:
|
|
58
|
+
type: string
|
|
59
|
+
description: Stripe Agentic Commerce network_business_profile id the SPT is
|
|
60
|
+
granted against. Empty until the preview account is provisioned.
|
|
61
|
+
expires_at:
|
|
62
|
+
type: string
|
|
63
|
+
example: 2026-06-10T13:04:56Z
|
|
64
|
+
required:
|
|
65
|
+
- max_amount
|
|
66
|
+
- currency
|
|
67
|
+
AncillaryOffer:
|
|
68
|
+
type: object
|
|
69
|
+
description: A purchasable ancillary (bag, seat, bundle, ...) offered on a trip item.
|
|
70
|
+
properties:
|
|
71
|
+
offer_id:
|
|
72
|
+
type: string
|
|
73
|
+
description: Stable id used to select this ancillary.
|
|
74
|
+
type:
|
|
75
|
+
type: string
|
|
76
|
+
description: Normalized category, e.g. "bag", "seat", "cabin_bag_upgrade", "assistance".
|
|
77
|
+
label:
|
|
78
|
+
type: string
|
|
79
|
+
description: Raw provider label (source of truth). May contain HTML entities and "&" joiners.
|
|
80
|
+
display_label:
|
|
81
|
+
type: string
|
|
82
|
+
description: >-
|
|
83
|
+
Human-readable label derived from `label` (HTML entities decoded,
|
|
84
|
+
provider "&" component-joiners normalized to ", "). Prefer this for
|
|
85
|
+
display; falls back to `label` when absent.
|
|
86
|
+
description:
|
|
87
|
+
type: string
|
|
88
|
+
price_per_unit:
|
|
89
|
+
type: object
|
|
90
|
+
properties:
|
|
91
|
+
amount:
|
|
92
|
+
type: number
|
|
93
|
+
currency:
|
|
94
|
+
type: string
|
|
95
|
+
decimal_places:
|
|
96
|
+
type: integer
|
|
97
|
+
per_pax:
|
|
98
|
+
type: boolean
|
|
99
|
+
description: When true the ancillary is priced/selected per passenger.
|
|
100
|
+
max_quantity:
|
|
101
|
+
type: integer
|
|
102
|
+
required:
|
|
103
|
+
- offer_id
|
|
104
|
+
CheckoutRequest:
|
|
105
|
+
type: object
|
|
106
|
+
properties:
|
|
107
|
+
trip_id:
|
|
108
|
+
type: string
|
|
109
|
+
example: trip_1048576
|
|
110
|
+
required:
|
|
111
|
+
- trip_id
|
|
112
|
+
CheckoutResponse:
|
|
113
|
+
type: object
|
|
114
|
+
properties:
|
|
115
|
+
session_id:
|
|
116
|
+
type: string
|
|
117
|
+
example: cs_1048576
|
|
118
|
+
checkout_url:
|
|
119
|
+
type: string
|
|
120
|
+
example: https://book.gojinko.com/checkout?sid=1048576
|
|
121
|
+
status:
|
|
122
|
+
type: string
|
|
123
|
+
example: pending_payment
|
|
124
|
+
expires_at:
|
|
125
|
+
type: string
|
|
126
|
+
example: 2026-06-01T13:04:56Z
|
|
127
|
+
total_amount:
|
|
128
|
+
type: object
|
|
129
|
+
properties:
|
|
130
|
+
amount:
|
|
131
|
+
type: number
|
|
132
|
+
example: 318.4
|
|
133
|
+
value:
|
|
134
|
+
type: number
|
|
135
|
+
currency:
|
|
136
|
+
type: string
|
|
137
|
+
example: USD
|
|
138
|
+
decimal_places:
|
|
139
|
+
type: integer
|
|
140
|
+
example: 2
|
|
141
|
+
items:
|
|
142
|
+
type: array
|
|
143
|
+
items:
|
|
144
|
+
nullable: true
|
|
145
|
+
agent_spt_params:
|
|
146
|
+
$ref: "#/components/schemas/AgentSPTParams"
|
|
17
147
|
HealthResponse:
|
|
18
148
|
type: object
|
|
19
149
|
properties:
|
|
@@ -605,7 +735,7 @@ components:
|
|
|
605
735
|
available_ancillaries:
|
|
606
736
|
type: array
|
|
607
737
|
items:
|
|
608
|
-
|
|
738
|
+
$ref: "#/components/schemas/AncillaryOffer"
|
|
609
739
|
selected_ancillaries:
|
|
610
740
|
type: array
|
|
611
741
|
items:
|
|
@@ -747,24 +877,7 @@ components:
|
|
|
747
877
|
available_ancillaries:
|
|
748
878
|
type: array
|
|
749
879
|
items:
|
|
750
|
-
|
|
751
|
-
properties:
|
|
752
|
-
offer_id:
|
|
753
|
-
type: string
|
|
754
|
-
type:
|
|
755
|
-
type: string
|
|
756
|
-
label:
|
|
757
|
-
type: string
|
|
758
|
-
description:
|
|
759
|
-
type: string
|
|
760
|
-
price_per_unit:
|
|
761
|
-
type: object
|
|
762
|
-
per_pax:
|
|
763
|
-
type: boolean
|
|
764
|
-
max_quantity:
|
|
765
|
-
type: integer
|
|
766
|
-
required:
|
|
767
|
-
- offer_id
|
|
880
|
+
$ref: "#/components/schemas/AncillaryOffer"
|
|
768
881
|
selected_ancillaries:
|
|
769
882
|
type: array
|
|
770
883
|
items:
|
|
@@ -891,39 +1004,6 @@ components:
|
|
|
891
1004
|
- trip_id
|
|
892
1005
|
- item_id
|
|
893
1006
|
- selections
|
|
894
|
-
BookResponse:
|
|
895
|
-
type: object
|
|
896
|
-
properties:
|
|
897
|
-
session_id:
|
|
898
|
-
type: string
|
|
899
|
-
checkout_url:
|
|
900
|
-
type: string
|
|
901
|
-
status:
|
|
902
|
-
type: string
|
|
903
|
-
expires_at:
|
|
904
|
-
type: string
|
|
905
|
-
total_amount:
|
|
906
|
-
type: object
|
|
907
|
-
properties:
|
|
908
|
-
amount:
|
|
909
|
-
type: number
|
|
910
|
-
value:
|
|
911
|
-
type: number
|
|
912
|
-
currency:
|
|
913
|
-
type: string
|
|
914
|
-
decimal_places:
|
|
915
|
-
type: integer
|
|
916
|
-
items:
|
|
917
|
-
type: array
|
|
918
|
-
items:
|
|
919
|
-
nullable: true
|
|
920
|
-
BookRequest:
|
|
921
|
-
type: object
|
|
922
|
-
properties:
|
|
923
|
-
trip_id:
|
|
924
|
-
type: string
|
|
925
|
-
required:
|
|
926
|
-
- trip_id
|
|
927
1007
|
HotelSearchResponse:
|
|
928
1008
|
type: object
|
|
929
1009
|
properties:
|
|
@@ -1504,6 +1584,159 @@ paths:
|
|
|
1504
1584
|
application/json:
|
|
1505
1585
|
schema:
|
|
1506
1586
|
$ref: "#/components/schemas/HealthResponse"
|
|
1587
|
+
/v1/agent_payment/submit:
|
|
1588
|
+
post:
|
|
1589
|
+
tags:
|
|
1590
|
+
- Pricing & booking
|
|
1591
|
+
summary: Submit an agent payment — present trip_id + a Shared Payment Token to
|
|
1592
|
+
schedule + authorize the booking; returns a checkout_url fallback if
|
|
1593
|
+
customer action (3DS) is required
|
|
1594
|
+
security:
|
|
1595
|
+
- ApiKeyAuth: []
|
|
1596
|
+
- BearerAuth: []
|
|
1597
|
+
requestBody:
|
|
1598
|
+
content:
|
|
1599
|
+
application/json:
|
|
1600
|
+
schema:
|
|
1601
|
+
$ref: "#/components/schemas/AgentPaymentSubmitRequest"
|
|
1602
|
+
responses:
|
|
1603
|
+
"200":
|
|
1604
|
+
description: Authorization result
|
|
1605
|
+
content:
|
|
1606
|
+
application/json:
|
|
1607
|
+
schema:
|
|
1608
|
+
$ref: "#/components/schemas/AgentPaymentSubmitResponse"
|
|
1609
|
+
"400":
|
|
1610
|
+
description: Bad request
|
|
1611
|
+
content:
|
|
1612
|
+
application/json:
|
|
1613
|
+
schema:
|
|
1614
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1615
|
+
example:
|
|
1616
|
+
error:
|
|
1617
|
+
code: BAD_REQUEST
|
|
1618
|
+
message: Malformed JSON in request body.
|
|
1619
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1620
|
+
"401":
|
|
1621
|
+
description: Authentication required
|
|
1622
|
+
content:
|
|
1623
|
+
application/json:
|
|
1624
|
+
schema:
|
|
1625
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1626
|
+
example:
|
|
1627
|
+
error:
|
|
1628
|
+
code: AUTH_REQUIRED
|
|
1629
|
+
message: Invalid or expired API key.
|
|
1630
|
+
doc_url: https://docs.gojinko.com/api-reference/authentication
|
|
1631
|
+
"422":
|
|
1632
|
+
description: Validation error
|
|
1633
|
+
content:
|
|
1634
|
+
application/json:
|
|
1635
|
+
schema:
|
|
1636
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1637
|
+
example:
|
|
1638
|
+
error:
|
|
1639
|
+
code: BAD_REQUEST
|
|
1640
|
+
message: "origins: origins is required; trip_type: trip_type is required"
|
|
1641
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1642
|
+
"429":
|
|
1643
|
+
description: Rate limit or quota exceeded
|
|
1644
|
+
content:
|
|
1645
|
+
application/json:
|
|
1646
|
+
schema:
|
|
1647
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1648
|
+
example:
|
|
1649
|
+
error:
|
|
1650
|
+
code: RATE_LIMITED
|
|
1651
|
+
message: Rate limit or quota exceeded.
|
|
1652
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1653
|
+
"502":
|
|
1654
|
+
description: Upstream service error
|
|
1655
|
+
content:
|
|
1656
|
+
application/json:
|
|
1657
|
+
schema:
|
|
1658
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1659
|
+
example:
|
|
1660
|
+
error:
|
|
1661
|
+
code: UPSTREAM_ERROR
|
|
1662
|
+
message: Upstream travel provider returned an error. Please retry.
|
|
1663
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1664
|
+
/v1/checkout:
|
|
1665
|
+
post:
|
|
1666
|
+
tags:
|
|
1667
|
+
- Pricing & booking
|
|
1668
|
+
summary: Checkout a trip — returns a checkout URL the user opens to pay, plus
|
|
1669
|
+
the Shared Payment Token params an agent can use to pay programmatically
|
|
1670
|
+
security:
|
|
1671
|
+
- ApiKeyAuth: []
|
|
1672
|
+
- BearerAuth: []
|
|
1673
|
+
requestBody:
|
|
1674
|
+
content:
|
|
1675
|
+
application/json:
|
|
1676
|
+
schema:
|
|
1677
|
+
$ref: "#/components/schemas/CheckoutRequest"
|
|
1678
|
+
responses:
|
|
1679
|
+
"200":
|
|
1680
|
+
description: Checkout session
|
|
1681
|
+
content:
|
|
1682
|
+
application/json:
|
|
1683
|
+
schema:
|
|
1684
|
+
$ref: "#/components/schemas/CheckoutResponse"
|
|
1685
|
+
"400":
|
|
1686
|
+
description: Bad request
|
|
1687
|
+
content:
|
|
1688
|
+
application/json:
|
|
1689
|
+
schema:
|
|
1690
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1691
|
+
example:
|
|
1692
|
+
error:
|
|
1693
|
+
code: BAD_REQUEST
|
|
1694
|
+
message: Malformed JSON in request body.
|
|
1695
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1696
|
+
"401":
|
|
1697
|
+
description: Authentication required
|
|
1698
|
+
content:
|
|
1699
|
+
application/json:
|
|
1700
|
+
schema:
|
|
1701
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1702
|
+
example:
|
|
1703
|
+
error:
|
|
1704
|
+
code: AUTH_REQUIRED
|
|
1705
|
+
message: Invalid or expired API key.
|
|
1706
|
+
doc_url: https://docs.gojinko.com/api-reference/authentication
|
|
1707
|
+
"422":
|
|
1708
|
+
description: Validation error
|
|
1709
|
+
content:
|
|
1710
|
+
application/json:
|
|
1711
|
+
schema:
|
|
1712
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1713
|
+
example:
|
|
1714
|
+
error:
|
|
1715
|
+
code: BAD_REQUEST
|
|
1716
|
+
message: "origins: origins is required; trip_type: trip_type is required"
|
|
1717
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1718
|
+
"429":
|
|
1719
|
+
description: Rate limit or quota exceeded
|
|
1720
|
+
content:
|
|
1721
|
+
application/json:
|
|
1722
|
+
schema:
|
|
1723
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1724
|
+
example:
|
|
1725
|
+
error:
|
|
1726
|
+
code: RATE_LIMITED
|
|
1727
|
+
message: Rate limit or quota exceeded.
|
|
1728
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1729
|
+
"502":
|
|
1730
|
+
description: Upstream service error
|
|
1731
|
+
content:
|
|
1732
|
+
application/json:
|
|
1733
|
+
schema:
|
|
1734
|
+
$ref: "#/components/schemas/ErrorResponse"
|
|
1735
|
+
example:
|
|
1736
|
+
error:
|
|
1737
|
+
code: UPSTREAM_ERROR
|
|
1738
|
+
message: Upstream travel provider returned an error. Please retry.
|
|
1739
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
1507
1740
|
/v1/find_destination:
|
|
1508
1741
|
post:
|
|
1509
1742
|
tags:
|
|
@@ -2024,8 +2257,9 @@ paths:
|
|
|
2024
2257
|
/v1/book:
|
|
2025
2258
|
post:
|
|
2026
2259
|
tags:
|
|
2027
|
-
-
|
|
2028
|
-
summary:
|
|
2260
|
+
- Pricing & booking
|
|
2261
|
+
summary: DEPRECATED — use /checkout. Alias retained for backward compatibility.
|
|
2262
|
+
deprecated: true
|
|
2029
2263
|
security:
|
|
2030
2264
|
- ApiKeyAuth: []
|
|
2031
2265
|
- BearerAuth: []
|
|
@@ -2033,44 +2267,69 @@ paths:
|
|
|
2033
2267
|
content:
|
|
2034
2268
|
application/json:
|
|
2035
2269
|
schema:
|
|
2036
|
-
$ref: "#/components/schemas/
|
|
2270
|
+
$ref: "#/components/schemas/CheckoutRequest"
|
|
2037
2271
|
responses:
|
|
2038
2272
|
"200":
|
|
2039
2273
|
description: Checkout session
|
|
2040
2274
|
content:
|
|
2041
2275
|
application/json:
|
|
2042
2276
|
schema:
|
|
2043
|
-
$ref: "#/components/schemas/
|
|
2277
|
+
$ref: "#/components/schemas/CheckoutResponse"
|
|
2044
2278
|
"400":
|
|
2045
2279
|
description: Bad request
|
|
2046
2280
|
content:
|
|
2047
2281
|
application/json:
|
|
2048
2282
|
schema:
|
|
2049
2283
|
$ref: "#/components/schemas/ErrorResponse"
|
|
2284
|
+
example:
|
|
2285
|
+
error:
|
|
2286
|
+
code: BAD_REQUEST
|
|
2287
|
+
message: Malformed JSON in request body.
|
|
2288
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
2050
2289
|
"401":
|
|
2051
2290
|
description: Authentication required
|
|
2052
2291
|
content:
|
|
2053
2292
|
application/json:
|
|
2054
2293
|
schema:
|
|
2055
2294
|
$ref: "#/components/schemas/ErrorResponse"
|
|
2295
|
+
example:
|
|
2296
|
+
error:
|
|
2297
|
+
code: AUTH_REQUIRED
|
|
2298
|
+
message: Invalid or expired API key.
|
|
2299
|
+
doc_url: https://docs.gojinko.com/api-reference/authentication
|
|
2056
2300
|
"422":
|
|
2057
2301
|
description: Validation error
|
|
2058
2302
|
content:
|
|
2059
2303
|
application/json:
|
|
2060
2304
|
schema:
|
|
2061
2305
|
$ref: "#/components/schemas/ErrorResponse"
|
|
2306
|
+
example:
|
|
2307
|
+
error:
|
|
2308
|
+
code: BAD_REQUEST
|
|
2309
|
+
message: "origins: origins is required; trip_type: trip_type is required"
|
|
2310
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
2062
2311
|
"429":
|
|
2063
2312
|
description: Rate limit or quota exceeded
|
|
2064
2313
|
content:
|
|
2065
2314
|
application/json:
|
|
2066
2315
|
schema:
|
|
2067
2316
|
$ref: "#/components/schemas/ErrorResponse"
|
|
2317
|
+
example:
|
|
2318
|
+
error:
|
|
2319
|
+
code: RATE_LIMITED
|
|
2320
|
+
message: Rate limit or quota exceeded.
|
|
2321
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
2068
2322
|
"502":
|
|
2069
2323
|
description: Upstream service error
|
|
2070
2324
|
content:
|
|
2071
2325
|
application/json:
|
|
2072
2326
|
schema:
|
|
2073
2327
|
$ref: "#/components/schemas/ErrorResponse"
|
|
2328
|
+
example:
|
|
2329
|
+
error:
|
|
2330
|
+
code: UPSTREAM_ERROR
|
|
2331
|
+
message: Upstream travel provider returned an error. Please retry.
|
|
2332
|
+
doc_url: https://docs.gojinko.com/concepts/errors
|
|
2074
2333
|
/v1/hotel_search:
|
|
2075
2334
|
post:
|
|
2076
2335
|
tags:
|