@gojinko/api-client 2.14.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/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 +10 -7
- package/dist/types/devplatform.d.ts.map +1 -1
- package/dist/types/devplatform.js +1 -1
- package/dist/types/generated.d.ts +365 -19
- package/dist/types/generated.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.yaml +276 -37
|
@@ -39,6 +39,266 @@ export interface paths {
|
|
|
39
39
|
patch?: never;
|
|
40
40
|
trace?: never;
|
|
41
41
|
};
|
|
42
|
+
"/v1/agent_payment/submit": {
|
|
43
|
+
parameters: {
|
|
44
|
+
query?: never;
|
|
45
|
+
header?: never;
|
|
46
|
+
path?: never;
|
|
47
|
+
cookie?: never;
|
|
48
|
+
};
|
|
49
|
+
get?: never;
|
|
50
|
+
put?: never;
|
|
51
|
+
/** Submit an agent payment — present trip_id + a Shared Payment Token to schedule + authorize the booking; returns a checkout_url fallback if customer action (3DS) is required */
|
|
52
|
+
post: {
|
|
53
|
+
parameters: {
|
|
54
|
+
query?: never;
|
|
55
|
+
header?: never;
|
|
56
|
+
path?: never;
|
|
57
|
+
cookie?: never;
|
|
58
|
+
};
|
|
59
|
+
requestBody?: {
|
|
60
|
+
content: {
|
|
61
|
+
"application/json": components["schemas"]["AgentPaymentSubmitRequest"];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
responses: {
|
|
65
|
+
/** @description Authorization result */
|
|
66
|
+
200: {
|
|
67
|
+
headers: {
|
|
68
|
+
[name: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
content: {
|
|
71
|
+
"application/json": components["schemas"]["AgentPaymentSubmitResponse"];
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
/** @description Bad request */
|
|
75
|
+
400: {
|
|
76
|
+
headers: {
|
|
77
|
+
[name: string]: unknown;
|
|
78
|
+
};
|
|
79
|
+
content: {
|
|
80
|
+
/**
|
|
81
|
+
* @example {
|
|
82
|
+
* "error": {
|
|
83
|
+
* "code": "BAD_REQUEST",
|
|
84
|
+
* "message": "Malformed JSON in request body.",
|
|
85
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
86
|
+
* }
|
|
87
|
+
* }
|
|
88
|
+
*/
|
|
89
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
/** @description Authentication required */
|
|
93
|
+
401: {
|
|
94
|
+
headers: {
|
|
95
|
+
[name: string]: unknown;
|
|
96
|
+
};
|
|
97
|
+
content: {
|
|
98
|
+
/**
|
|
99
|
+
* @example {
|
|
100
|
+
* "error": {
|
|
101
|
+
* "code": "AUTH_REQUIRED",
|
|
102
|
+
* "message": "Invalid or expired API key.",
|
|
103
|
+
* "doc_url": "https://docs.gojinko.com/api-reference/authentication"
|
|
104
|
+
* }
|
|
105
|
+
* }
|
|
106
|
+
*/
|
|
107
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
/** @description Validation error */
|
|
111
|
+
422: {
|
|
112
|
+
headers: {
|
|
113
|
+
[name: string]: unknown;
|
|
114
|
+
};
|
|
115
|
+
content: {
|
|
116
|
+
/**
|
|
117
|
+
* @example {
|
|
118
|
+
* "error": {
|
|
119
|
+
* "code": "BAD_REQUEST",
|
|
120
|
+
* "message": "origins: origins is required; trip_type: trip_type is required",
|
|
121
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
122
|
+
* }
|
|
123
|
+
* }
|
|
124
|
+
*/
|
|
125
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
/** @description Rate limit or quota exceeded */
|
|
129
|
+
429: {
|
|
130
|
+
headers: {
|
|
131
|
+
[name: string]: unknown;
|
|
132
|
+
};
|
|
133
|
+
content: {
|
|
134
|
+
/**
|
|
135
|
+
* @example {
|
|
136
|
+
* "error": {
|
|
137
|
+
* "code": "RATE_LIMITED",
|
|
138
|
+
* "message": "Rate limit or quota exceeded.",
|
|
139
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
140
|
+
* }
|
|
141
|
+
* }
|
|
142
|
+
*/
|
|
143
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
/** @description Upstream service error */
|
|
147
|
+
502: {
|
|
148
|
+
headers: {
|
|
149
|
+
[name: string]: unknown;
|
|
150
|
+
};
|
|
151
|
+
content: {
|
|
152
|
+
/**
|
|
153
|
+
* @example {
|
|
154
|
+
* "error": {
|
|
155
|
+
* "code": "UPSTREAM_ERROR",
|
|
156
|
+
* "message": "Upstream travel provider returned an error. Please retry.",
|
|
157
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
158
|
+
* }
|
|
159
|
+
* }
|
|
160
|
+
*/
|
|
161
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
delete?: never;
|
|
167
|
+
options?: never;
|
|
168
|
+
head?: never;
|
|
169
|
+
patch?: never;
|
|
170
|
+
trace?: never;
|
|
171
|
+
};
|
|
172
|
+
"/v1/checkout": {
|
|
173
|
+
parameters: {
|
|
174
|
+
query?: never;
|
|
175
|
+
header?: never;
|
|
176
|
+
path?: never;
|
|
177
|
+
cookie?: never;
|
|
178
|
+
};
|
|
179
|
+
get?: never;
|
|
180
|
+
put?: never;
|
|
181
|
+
/** Checkout a trip — returns a checkout URL the user opens to pay, plus the Shared Payment Token params an agent can use to pay programmatically */
|
|
182
|
+
post: {
|
|
183
|
+
parameters: {
|
|
184
|
+
query?: never;
|
|
185
|
+
header?: never;
|
|
186
|
+
path?: never;
|
|
187
|
+
cookie?: never;
|
|
188
|
+
};
|
|
189
|
+
requestBody?: {
|
|
190
|
+
content: {
|
|
191
|
+
"application/json": components["schemas"]["CheckoutRequest"];
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
responses: {
|
|
195
|
+
/** @description Checkout session */
|
|
196
|
+
200: {
|
|
197
|
+
headers: {
|
|
198
|
+
[name: string]: unknown;
|
|
199
|
+
};
|
|
200
|
+
content: {
|
|
201
|
+
"application/json": components["schemas"]["CheckoutResponse"];
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
/** @description Bad request */
|
|
205
|
+
400: {
|
|
206
|
+
headers: {
|
|
207
|
+
[name: string]: unknown;
|
|
208
|
+
};
|
|
209
|
+
content: {
|
|
210
|
+
/**
|
|
211
|
+
* @example {
|
|
212
|
+
* "error": {
|
|
213
|
+
* "code": "BAD_REQUEST",
|
|
214
|
+
* "message": "Malformed JSON in request body.",
|
|
215
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
216
|
+
* }
|
|
217
|
+
* }
|
|
218
|
+
*/
|
|
219
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
/** @description Authentication required */
|
|
223
|
+
401: {
|
|
224
|
+
headers: {
|
|
225
|
+
[name: string]: unknown;
|
|
226
|
+
};
|
|
227
|
+
content: {
|
|
228
|
+
/**
|
|
229
|
+
* @example {
|
|
230
|
+
* "error": {
|
|
231
|
+
* "code": "AUTH_REQUIRED",
|
|
232
|
+
* "message": "Invalid or expired API key.",
|
|
233
|
+
* "doc_url": "https://docs.gojinko.com/api-reference/authentication"
|
|
234
|
+
* }
|
|
235
|
+
* }
|
|
236
|
+
*/
|
|
237
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
/** @description Validation error */
|
|
241
|
+
422: {
|
|
242
|
+
headers: {
|
|
243
|
+
[name: string]: unknown;
|
|
244
|
+
};
|
|
245
|
+
content: {
|
|
246
|
+
/**
|
|
247
|
+
* @example {
|
|
248
|
+
* "error": {
|
|
249
|
+
* "code": "BAD_REQUEST",
|
|
250
|
+
* "message": "origins: origins is required; trip_type: trip_type is required",
|
|
251
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
252
|
+
* }
|
|
253
|
+
* }
|
|
254
|
+
*/
|
|
255
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
/** @description Rate limit or quota exceeded */
|
|
259
|
+
429: {
|
|
260
|
+
headers: {
|
|
261
|
+
[name: string]: unknown;
|
|
262
|
+
};
|
|
263
|
+
content: {
|
|
264
|
+
/**
|
|
265
|
+
* @example {
|
|
266
|
+
* "error": {
|
|
267
|
+
* "code": "RATE_LIMITED",
|
|
268
|
+
* "message": "Rate limit or quota exceeded.",
|
|
269
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
270
|
+
* }
|
|
271
|
+
* }
|
|
272
|
+
*/
|
|
273
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
/** @description Upstream service error */
|
|
277
|
+
502: {
|
|
278
|
+
headers: {
|
|
279
|
+
[name: string]: unknown;
|
|
280
|
+
};
|
|
281
|
+
content: {
|
|
282
|
+
/**
|
|
283
|
+
* @example {
|
|
284
|
+
* "error": {
|
|
285
|
+
* "code": "UPSTREAM_ERROR",
|
|
286
|
+
* "message": "Upstream travel provider returned an error. Please retry.",
|
|
287
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
288
|
+
* }
|
|
289
|
+
* }
|
|
290
|
+
*/
|
|
291
|
+
"application/json": components["schemas"]["ErrorResponse"];
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
};
|
|
296
|
+
delete?: never;
|
|
297
|
+
options?: never;
|
|
298
|
+
head?: never;
|
|
299
|
+
patch?: never;
|
|
300
|
+
trace?: never;
|
|
301
|
+
};
|
|
42
302
|
"/v1/find_destination": {
|
|
43
303
|
parameters: {
|
|
44
304
|
query?: never;
|
|
@@ -903,7 +1163,10 @@ export interface paths {
|
|
|
903
1163
|
};
|
|
904
1164
|
get?: never;
|
|
905
1165
|
put?: never;
|
|
906
|
-
/**
|
|
1166
|
+
/**
|
|
1167
|
+
* DEPRECATED — use /checkout. Alias retained for backward compatibility.
|
|
1168
|
+
* @deprecated
|
|
1169
|
+
*/
|
|
907
1170
|
post: {
|
|
908
1171
|
parameters: {
|
|
909
1172
|
query?: never;
|
|
@@ -913,7 +1176,7 @@ export interface paths {
|
|
|
913
1176
|
};
|
|
914
1177
|
requestBody?: {
|
|
915
1178
|
content: {
|
|
916
|
-
"application/json": components["schemas"]["
|
|
1179
|
+
"application/json": components["schemas"]["CheckoutRequest"];
|
|
917
1180
|
};
|
|
918
1181
|
};
|
|
919
1182
|
responses: {
|
|
@@ -923,7 +1186,7 @@ export interface paths {
|
|
|
923
1186
|
[name: string]: unknown;
|
|
924
1187
|
};
|
|
925
1188
|
content: {
|
|
926
|
-
"application/json": components["schemas"]["
|
|
1189
|
+
"application/json": components["schemas"]["CheckoutResponse"];
|
|
927
1190
|
};
|
|
928
1191
|
};
|
|
929
1192
|
/** @description Bad request */
|
|
@@ -932,6 +1195,15 @@ export interface paths {
|
|
|
932
1195
|
[name: string]: unknown;
|
|
933
1196
|
};
|
|
934
1197
|
content: {
|
|
1198
|
+
/**
|
|
1199
|
+
* @example {
|
|
1200
|
+
* "error": {
|
|
1201
|
+
* "code": "BAD_REQUEST",
|
|
1202
|
+
* "message": "Malformed JSON in request body.",
|
|
1203
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
1204
|
+
* }
|
|
1205
|
+
* }
|
|
1206
|
+
*/
|
|
935
1207
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
936
1208
|
};
|
|
937
1209
|
};
|
|
@@ -941,6 +1213,15 @@ export interface paths {
|
|
|
941
1213
|
[name: string]: unknown;
|
|
942
1214
|
};
|
|
943
1215
|
content: {
|
|
1216
|
+
/**
|
|
1217
|
+
* @example {
|
|
1218
|
+
* "error": {
|
|
1219
|
+
* "code": "AUTH_REQUIRED",
|
|
1220
|
+
* "message": "Invalid or expired API key.",
|
|
1221
|
+
* "doc_url": "https://docs.gojinko.com/api-reference/authentication"
|
|
1222
|
+
* }
|
|
1223
|
+
* }
|
|
1224
|
+
*/
|
|
944
1225
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
945
1226
|
};
|
|
946
1227
|
};
|
|
@@ -950,6 +1231,15 @@ export interface paths {
|
|
|
950
1231
|
[name: string]: unknown;
|
|
951
1232
|
};
|
|
952
1233
|
content: {
|
|
1234
|
+
/**
|
|
1235
|
+
* @example {
|
|
1236
|
+
* "error": {
|
|
1237
|
+
* "code": "BAD_REQUEST",
|
|
1238
|
+
* "message": "origins: origins is required; trip_type: trip_type is required",
|
|
1239
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
1240
|
+
* }
|
|
1241
|
+
* }
|
|
1242
|
+
*/
|
|
953
1243
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
954
1244
|
};
|
|
955
1245
|
};
|
|
@@ -959,6 +1249,15 @@ export interface paths {
|
|
|
959
1249
|
[name: string]: unknown;
|
|
960
1250
|
};
|
|
961
1251
|
content: {
|
|
1252
|
+
/**
|
|
1253
|
+
* @example {
|
|
1254
|
+
* "error": {
|
|
1255
|
+
* "code": "RATE_LIMITED",
|
|
1256
|
+
* "message": "Rate limit or quota exceeded.",
|
|
1257
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
1258
|
+
* }
|
|
1259
|
+
* }
|
|
1260
|
+
*/
|
|
962
1261
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
963
1262
|
};
|
|
964
1263
|
};
|
|
@@ -968,6 +1267,15 @@ export interface paths {
|
|
|
968
1267
|
[name: string]: unknown;
|
|
969
1268
|
};
|
|
970
1269
|
content: {
|
|
1270
|
+
/**
|
|
1271
|
+
* @example {
|
|
1272
|
+
* "error": {
|
|
1273
|
+
* "code": "UPSTREAM_ERROR",
|
|
1274
|
+
* "message": "Upstream travel provider returned an error. Please retry.",
|
|
1275
|
+
* "doc_url": "https://docs.gojinko.com/concepts/errors"
|
|
1276
|
+
* }
|
|
1277
|
+
* }
|
|
1278
|
+
*/
|
|
971
1279
|
"application/json": components["schemas"]["ErrorResponse"];
|
|
972
1280
|
};
|
|
973
1281
|
};
|
|
@@ -1919,6 +2227,35 @@ export interface paths {
|
|
|
1919
2227
|
export type webhooks = Record<string, never>;
|
|
1920
2228
|
export interface components {
|
|
1921
2229
|
schemas: {
|
|
2230
|
+
AgentPaymentSubmitRequest: {
|
|
2231
|
+
/** @example trip_1048576 */
|
|
2232
|
+
trip_id: string;
|
|
2233
|
+
/** @example spt_1Nq8L2eZvKYlo2C0 */
|
|
2234
|
+
shared_payment_token: string;
|
|
2235
|
+
};
|
|
2236
|
+
AgentPaymentSubmitResponse: {
|
|
2237
|
+
fulfillment_cart_id?: number;
|
|
2238
|
+
/** @example processing */
|
|
2239
|
+
status?: string;
|
|
2240
|
+
payment_verified?: boolean;
|
|
2241
|
+
message?: string;
|
|
2242
|
+
/** @description Hosted-checkout fallback, present only on a 3DS step-up / decline. */
|
|
2243
|
+
checkout_url?: string;
|
|
2244
|
+
recap_token?: string;
|
|
2245
|
+
};
|
|
2246
|
+
AgentSPTParams: {
|
|
2247
|
+
/**
|
|
2248
|
+
* @description Locked cart total in the smallest currency unit — scope the Shared Payment Token to at most this.
|
|
2249
|
+
* @example 259449
|
|
2250
|
+
*/
|
|
2251
|
+
max_amount: number;
|
|
2252
|
+
/** @example EUR */
|
|
2253
|
+
currency: string;
|
|
2254
|
+
/** @description Stripe Agentic Commerce network_business_profile id the SPT is granted against. Empty until the preview account is provisioned. */
|
|
2255
|
+
stripe_profile?: string;
|
|
2256
|
+
/** @example 2026-06-10T13:04:56Z */
|
|
2257
|
+
expires_at?: string;
|
|
2258
|
+
};
|
|
1922
2259
|
/** @description A purchasable ancillary (bag, seat, bundle, ...) offered on a trip item. */
|
|
1923
2260
|
AncillaryOffer: {
|
|
1924
2261
|
/** @description Stable id used to select this ancillary. */
|
|
@@ -1939,6 +2276,31 @@ export interface components {
|
|
|
1939
2276
|
per_pax?: boolean;
|
|
1940
2277
|
max_quantity?: number;
|
|
1941
2278
|
};
|
|
2279
|
+
CheckoutRequest: {
|
|
2280
|
+
/** @example trip_1048576 */
|
|
2281
|
+
trip_id: string;
|
|
2282
|
+
};
|
|
2283
|
+
CheckoutResponse: {
|
|
2284
|
+
/** @example cs_1048576 */
|
|
2285
|
+
session_id?: string;
|
|
2286
|
+
/** @example https://book.gojinko.com/checkout?sid=1048576 */
|
|
2287
|
+
checkout_url?: string;
|
|
2288
|
+
/** @example pending_payment */
|
|
2289
|
+
status?: string;
|
|
2290
|
+
/** @example 2026-06-01T13:04:56Z */
|
|
2291
|
+
expires_at?: string;
|
|
2292
|
+
total_amount?: {
|
|
2293
|
+
/** @example 318.4 */
|
|
2294
|
+
amount?: number;
|
|
2295
|
+
value?: number;
|
|
2296
|
+
/** @example USD */
|
|
2297
|
+
currency?: string;
|
|
2298
|
+
/** @example 2 */
|
|
2299
|
+
decimal_places?: number;
|
|
2300
|
+
};
|
|
2301
|
+
items?: unknown[];
|
|
2302
|
+
agent_spt_params?: components["schemas"]["AgentSPTParams"];
|
|
2303
|
+
};
|
|
1942
2304
|
HealthResponse: {
|
|
1943
2305
|
/** @enum {string} */
|
|
1944
2306
|
status: "ok";
|
|
@@ -2325,22 +2687,6 @@ export interface components {
|
|
|
2325
2687
|
};
|
|
2326
2688
|
}[];
|
|
2327
2689
|
};
|
|
2328
|
-
BookResponse: {
|
|
2329
|
-
session_id?: string;
|
|
2330
|
-
checkout_url?: string;
|
|
2331
|
-
status?: string;
|
|
2332
|
-
expires_at?: string;
|
|
2333
|
-
total_amount?: {
|
|
2334
|
-
amount?: number;
|
|
2335
|
-
value?: number;
|
|
2336
|
-
currency?: string;
|
|
2337
|
-
decimal_places?: number;
|
|
2338
|
-
};
|
|
2339
|
-
items?: unknown[];
|
|
2340
|
-
};
|
|
2341
|
-
BookRequest: {
|
|
2342
|
-
trip_id: string;
|
|
2343
|
-
};
|
|
2344
2690
|
HotelSearchResponse: {
|
|
2345
2691
|
hotels?: {
|
|
2346
2692
|
hotel_id?: string;
|