@ferryrsvp/liknoss-client 1.0.3 → 1.1.9

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 CHANGED
@@ -35,5 +35,12 @@ This package is configured for public npm publishing.
35
35
  - `npm run build`
36
36
  - `npm publish`
37
37
 
38
- For GitHub Actions publishing, provide an `NPM_TOKEN` repository secret.
38
+ When changes are merged to `main`, GitHub Actions will:
39
39
 
40
+ - deploy the built package assets to Cloudflare R2
41
+ - publish the package to npm when the `package.json` version is not already published
42
+
43
+ Required repository secrets:
44
+
45
+ - `CLOUDFLARE_API_TOKEN` for the R2 deploy workflow
46
+ - `NPM_AUTH_TOKEN` for the npm publish workflow
@@ -0,0 +1,198 @@
1
+ import { createAccommodationService as e } from "./services/accommodation.mjs";
2
+ import { createBookingService as t } from "./services/booking.mjs";
3
+ import { createCatalogService as n } from "./services/catalog.mjs";
4
+ import { createInsuranceService as r } from "./services/insurance.mjs";
5
+ import { createTripService as i } from "./services/trips.mjs";
6
+ import { createValidationService as a } from "./services/validation.mjs";
7
+ //#region src/core/errors.ts
8
+ var o = class extends Error {
9
+ constructor(e, t = {}) {
10
+ super(e), this.name = new.target.name, this.code = t.code, this.cause = t.cause;
11
+ }
12
+ }, s = class extends o {}, c = class extends o {
13
+ constructor(e, t) {
14
+ super(e, { cause: t.cause }), this.endpoint = t.endpoint, this.method = t.method;
15
+ }
16
+ }, l = class extends o {
17
+ constructor(e, t) {
18
+ super(e), this.endpoint = t.endpoint, this.method = t.method, this.responseBody = t.responseBody, this.status = t.status, this.statusText = t.statusText;
19
+ }
20
+ }, u = class extends o {
21
+ constructor(e, t) {
22
+ super(e, { cause: t.cause }), this.endpoint = t.endpoint, this.method = t.method, this.rawBody = t.rawBody, this.status = t.status;
23
+ }
24
+ }, d = class extends o {
25
+ constructor(e, t) {
26
+ super(e, { code: t.meta.code }), this.issues = t.issues, this.meta = t.meta, this.payload = t.payload;
27
+ }
28
+ };
29
+ //#endregion
30
+ //#region src/core/normalize.ts
31
+ function f(e) {
32
+ return typeof e == "object" && !!e;
33
+ }
34
+ function p(e) {
35
+ if (typeof e != "string") return;
36
+ let t = e.trim();
37
+ return t.length > 0 ? t : void 0;
38
+ }
39
+ function m(e) {
40
+ return f(e);
41
+ }
42
+ function h(e) {
43
+ return m(e) && e.severeError === !0;
44
+ }
45
+ function g(e) {
46
+ if (!m(e)) return [];
47
+ let t = [];
48
+ if (e.perCompanyErrorDetails) for (let [n, r] of Object.entries(e.perCompanyErrorDetails)) for (let e of r) t.push({
49
+ code: e.code ?? void 0,
50
+ company: n,
51
+ description: e.description ?? "Liknoss reported an issue.",
52
+ severity: e.severity ?? void 0,
53
+ source: "perCompanyErrorDetails"
54
+ });
55
+ if (e.bookingStatusesPerCompany) for (let n of e.bookingStatusesPerCompany) !n.status || n.status === "SUCCESS" || t.push({
56
+ code: n.status,
57
+ company: n.company?.abbreviation ?? n.company?.description ?? void 0,
58
+ description: `Booking status reported ${n.status}.`,
59
+ source: "bookingStatus"
60
+ });
61
+ return t;
62
+ }
63
+ function _(e, t) {
64
+ return m(e) ? {
65
+ abbreviation: e.abbreviation,
66
+ code: e.code,
67
+ endpoint: t.endpoint,
68
+ message: e.message,
69
+ method: t.method,
70
+ requestId: p(e.requestId),
71
+ responseCode: p(e.responseCode),
72
+ responseDescription: p(e.responseDesciption),
73
+ status: t.status
74
+ } : {
75
+ endpoint: t.endpoint,
76
+ method: t.method,
77
+ status: t.status
78
+ };
79
+ }
80
+ //#endregion
81
+ //#region src/core/request.ts
82
+ var v = "https://devsrv.liknoss.com/cws";
83
+ function y(e) {
84
+ return e.endsWith("/") ? e.slice(0, -1) : e;
85
+ }
86
+ function b(e, t) {
87
+ return t ? e.replace(/\{([^}]+)\}/g, (n, r) => {
88
+ let i = t[r];
89
+ if (i == null) throw new s(`Missing path parameter "${r}" for "${e}".`);
90
+ return encodeURIComponent(String(i));
91
+ }) : e;
92
+ }
93
+ function x(e, t) {
94
+ if (t) {
95
+ for (let [n, r] of Object.entries(t)) if (r != null) {
96
+ if (Array.isArray(r)) {
97
+ for (let t of r) t != null && e.searchParams.append(n, String(t));
98
+ continue;
99
+ }
100
+ e.searchParams.append(n, String(r));
101
+ }
102
+ }
103
+ }
104
+ function S(e) {
105
+ let t = new Headers(e.defaultHeaders);
106
+ return e.headers && new Headers(e.headers).forEach((e, n) => {
107
+ t.set(n, e);
108
+ }), t.set("Accept", "application/json"), e.body !== void 0 && t.set("Content-Type", "application/json"), e.apiKey && t.set("api_key", e.apiKey), t;
109
+ }
110
+ function C(e = {}) {
111
+ let t = e.fetch ?? globalThis.fetch;
112
+ if (typeof t != "function") throw new s("Liknoss client requires a fetch implementation.");
113
+ let n = y(e.baseUrl ?? v);
114
+ return { async request(r) {
115
+ let i = b(r.path, r.pathParams), a = new URL(`${n}${i}`);
116
+ x(a, r.query);
117
+ let o = r.method.toUpperCase(), s = S({
118
+ apiKey: e.apiKey,
119
+ body: r.body,
120
+ defaultHeaders: e.defaultHeaders,
121
+ headers: r.headers
122
+ }), f;
123
+ try {
124
+ f = await t(a, {
125
+ body: r.body === void 0 ? void 0 : JSON.stringify(r.body),
126
+ headers: s,
127
+ method: o,
128
+ signal: r.signal
129
+ });
130
+ } catch (e) {
131
+ throw new c("Liknoss request failed.", {
132
+ cause: e,
133
+ endpoint: i,
134
+ method: o
135
+ });
136
+ }
137
+ let p = await f.text();
138
+ if (!f.ok) throw new l("Liknoss returned a non-success status.", {
139
+ endpoint: i,
140
+ method: o,
141
+ responseBody: p,
142
+ status: f.status,
143
+ statusText: f.statusText
144
+ });
145
+ if (!p) return {
146
+ data: void 0,
147
+ meta: _(void 0, {
148
+ endpoint: i,
149
+ method: o,
150
+ status: f.status
151
+ }),
152
+ warnings: []
153
+ };
154
+ let m;
155
+ try {
156
+ m = JSON.parse(p);
157
+ } catch (e) {
158
+ throw new u("Liknoss response could not be parsed as JSON.", {
159
+ cause: e,
160
+ endpoint: i,
161
+ method: o,
162
+ rawBody: p,
163
+ status: f.status
164
+ });
165
+ }
166
+ let v = g(m), y = _(m, {
167
+ endpoint: i,
168
+ method: o,
169
+ status: f.status
170
+ });
171
+ if (h(m)) throw new d(y.message ?? "Liknoss reported a severe API error.", {
172
+ issues: v,
173
+ meta: y,
174
+ payload: m
175
+ });
176
+ return {
177
+ data: m,
178
+ meta: y,
179
+ warnings: v
180
+ };
181
+ } };
182
+ }
183
+ //#endregion
184
+ //#region src/client.ts
185
+ function w(o = {}) {
186
+ let s = C(o);
187
+ return {
188
+ accommodation: e(s),
189
+ booking: t(s),
190
+ catalog: n(s),
191
+ insurance: r(s),
192
+ transport: s,
193
+ trips: i(s),
194
+ validation: a(s)
195
+ };
196
+ }
197
+ //#endregion
198
+ export { l as a, o as i, d as n, c as o, s as r, u as s, w as t };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./client-n0IowNVM.js";
2
+ export { e as createLiknossClient };
@@ -1,285 +1,9 @@
1
- //#region src/core/errors.ts
2
- var e = class extends Error {
3
- constructor(e, t = {}) {
4
- super(e), this.name = new.target.name, this.code = t.code, this.cause = t.cause;
5
- }
6
- }, t = class extends e {}, n = class extends e {
7
- constructor(e, t) {
8
- super(e, { cause: t.cause }), this.endpoint = t.endpoint, this.method = t.method;
9
- }
10
- }, r = class extends e {
11
- constructor(e, t) {
12
- super(e), this.endpoint = t.endpoint, this.method = t.method, this.responseBody = t.responseBody, this.status = t.status, this.statusText = t.statusText;
13
- }
14
- }, i = class extends e {
15
- constructor(e, t) {
16
- super(e, { cause: t.cause }), this.endpoint = t.endpoint, this.method = t.method, this.rawBody = t.rawBody, this.status = t.status;
17
- }
18
- }, a = class extends e {
19
- constructor(e, t) {
20
- super(e, { code: t.meta.code }), this.issues = t.issues, this.meta = t.meta, this.payload = t.payload;
21
- }
22
- };
23
- //#endregion
24
- //#region src/core/normalize.ts
25
- function o(e) {
26
- return typeof e == "object" && !!e;
27
- }
28
- function s(e) {
29
- if (typeof e != "string") return;
30
- let t = e.trim();
31
- return t.length > 0 ? t : void 0;
32
- }
33
- function c(e) {
34
- return o(e);
35
- }
36
- function ee(e) {
37
- return c(e) && e.severeError === !0;
38
- }
39
- function l(e) {
40
- if (!c(e)) return [];
41
- let t = [];
42
- if (e.perCompanyErrorDetails) for (let [n, r] of Object.entries(e.perCompanyErrorDetails)) for (let e of r) t.push({
43
- code: e.code ?? void 0,
44
- company: n,
45
- description: e.description ?? "Liknoss reported an issue.",
46
- severity: e.severity ?? void 0,
47
- source: "perCompanyErrorDetails"
48
- });
49
- if (e.bookingStatusesPerCompany) for (let n of e.bookingStatusesPerCompany) !n.status || n.status === "SUCCESS" || t.push({
50
- code: n.status,
51
- company: n.company?.abbreviation ?? n.company?.description ?? void 0,
52
- description: `Booking status reported ${n.status}.`,
53
- source: "bookingStatus"
54
- });
55
- return t;
56
- }
57
- function u(e, t) {
58
- return c(e) ? {
59
- abbreviation: e.abbreviation,
60
- code: e.code,
61
- endpoint: t.endpoint,
62
- message: e.message,
63
- method: t.method,
64
- requestId: s(e.requestId),
65
- responseCode: s(e.responseCode),
66
- responseDescription: s(e.responseDesciption),
67
- status: t.status
68
- } : {
69
- endpoint: t.endpoint,
70
- method: t.method,
71
- status: t.status
72
- };
73
- }
74
- //#endregion
75
- //#region src/core/request.ts
76
- var d = "https://devsrv.liknoss.com/cws";
77
- function f(e) {
78
- return e.endsWith("/") ? e.slice(0, -1) : e;
79
- }
80
- function p(e, n) {
81
- return n ? e.replace(/\{([^}]+)\}/g, (r, i) => {
82
- let a = n[i];
83
- if (a == null) throw new t(`Missing path parameter "${i}" for "${e}".`);
84
- return encodeURIComponent(String(a));
85
- }) : e;
86
- }
87
- function m(e, t) {
88
- if (t) {
89
- for (let [n, r] of Object.entries(t)) if (r != null) {
90
- if (Array.isArray(r)) {
91
- for (let t of r) t != null && e.searchParams.append(n, String(t));
92
- continue;
93
- }
94
- e.searchParams.append(n, String(r));
95
- }
96
- }
97
- }
98
- function h(e) {
99
- let t = new Headers(e.defaultHeaders);
100
- return e.headers && new Headers(e.headers).forEach((e, n) => {
101
- t.set(n, e);
102
- }), t.set("Accept", "application/json"), e.body !== void 0 && t.set("Content-Type", "application/json"), e.apiKey && t.set("api_key", e.apiKey), t;
103
- }
104
- function g(e = {}) {
105
- let o = e.fetch ?? globalThis.fetch;
106
- if (typeof o != "function") throw new t("Liknoss client requires a fetch implementation.");
107
- let s = f(e.baseUrl ?? d);
108
- return { async request(t) {
109
- let c = p(t.path, t.pathParams), d = new URL(`${s}${c}`);
110
- m(d, t.query);
111
- let f = t.method.toUpperCase(), g = h({
112
- apiKey: e.apiKey,
113
- body: t.body,
114
- defaultHeaders: e.defaultHeaders,
115
- headers: t.headers
116
- }), _;
117
- try {
118
- _ = await o(d, {
119
- body: t.body === void 0 ? void 0 : JSON.stringify(t.body),
120
- headers: g,
121
- method: f,
122
- signal: t.signal
123
- });
124
- } catch (e) {
125
- throw new n("Liknoss request failed.", {
126
- cause: e,
127
- endpoint: c,
128
- method: f
129
- });
130
- }
131
- let v = await _.text();
132
- if (!_.ok) throw new r("Liknoss returned a non-success status.", {
133
- endpoint: c,
134
- method: f,
135
- responseBody: v,
136
- status: _.status,
137
- statusText: _.statusText
138
- });
139
- if (!v) return {
140
- data: void 0,
141
- meta: u(void 0, {
142
- endpoint: c,
143
- method: f,
144
- status: _.status
145
- }),
146
- warnings: []
147
- };
148
- let y;
149
- try {
150
- y = JSON.parse(v);
151
- } catch (e) {
152
- throw new i("Liknoss response could not be parsed as JSON.", {
153
- cause: e,
154
- endpoint: c,
155
- method: f,
156
- rawBody: v,
157
- status: _.status
158
- });
159
- }
160
- let b = l(y), x = u(y, {
161
- endpoint: c,
162
- method: f,
163
- status: _.status
164
- });
165
- if (ee(y)) throw new a(x.message ?? "Liknoss reported a severe API error.", {
166
- issues: b,
167
- meta: x,
168
- payload: y
169
- });
170
- return {
171
- data: y,
172
- meta: x,
173
- warnings: b
174
- };
175
- } };
176
- }
177
- //#endregion
178
- //#region src/core/methods.ts
179
- function _(e, t) {
180
- return (n) => e.request({
181
- ...n ?? {},
182
- method: "GET",
183
- path: t
184
- });
185
- }
186
- function v(e, t) {
187
- return (n) => e.request({
188
- ...n,
189
- method: "POST",
190
- path: t
191
- });
192
- }
193
- //#endregion
194
- //#region src/services/accommodation.ts
195
- var y = "/web-services/v200/b2c/accommodation-plan", b = "/web-services/v200/b2c/lock-accommodation-space", x = "/web-services/v200/b2c/unlock-accommodation-space";
196
- function S(e) {
197
- return {
198
- getAccommodationPlan: v(e, y),
199
- lockAccommodationSpace: v(e, b),
200
- unlockAccommodationSpace: v(e, x)
201
- };
202
- }
203
- //#endregion
204
- //#region src/services/booking.ts
205
- var te = "/web-services/v200/b2c/booking", C = "/web-services/v200/b2c/booking-identifier", w = "/web-services/v200/b2c/cancellation/{crs_reservation_id}", T = "/web-services/v200/b2c/cancel-multi-booking/{crs_reservation_id}", E = "/web-services/v200/b2c/confirm-payment", D = "/web-services/v200/b2c/generate-voucher/{crs_reservation_id}", O = "/web-services/v200/b2c/multi-booking", k = "/web-services/v200/b2c/multi-pricing", A = "/web-services/v200/b2c/pricing", j = "/web-services/v200/b2c/retrieve-booking-leader/{crs_reservation_id}";
206
- function M(e) {
207
- return {
208
- cancelBooking: _(e, w),
209
- cancelMultiBooking: _(e, T),
210
- confirmPayment: v(e, E),
211
- createBooking: v(e, te),
212
- createBookingIdentifier: v(e, C),
213
- createMultiBooking: v(e, O),
214
- generateVoucher: _(e, D),
215
- getBookingLeader: _(e, j),
216
- getMultiPricing: v(e, k),
217
- getPricing: v(e, A)
218
- };
219
- }
220
- //#endregion
221
- //#region src/services/catalog.ts
222
- var N = "/web-services/v200/b2c/analytic-routes", P = "/web-services/v200/b2c/companies", F = "/web-services/v200/b2c/financial-data/{company_abbreviation}", I = "/web-services/v200/b2c/company-redirection", L = "/web-services/v200/b2c/countries", R = "/web-services/v200/b2c/locations", ne = "/web-services/v200/b2c/locations-with-filter", z = "/web-services/v200/b2c/resident-static-data", B = "/web-services/v200/b2c/routes", V = "/web-services/v200/b2c/routes-with-filter", H = "/web-services/v200/b2c/session";
223
- function U(e) {
224
- return {
225
- filterLocations: _(e, ne),
226
- filterRoutes: _(e, V),
227
- getCompanyFinancialData: _(e, F),
228
- getCompanyRedirection: _(e, I),
229
- getResidentStaticData: _(e, z),
230
- getSession: _(e, H),
231
- listAnalyticRoutes: _(e, N),
232
- listCompanies: _(e, P),
233
- listCountries: _(e, L),
234
- listLocations: _(e, R),
235
- listRoutes: _(e, B)
236
- };
237
- }
238
- //#endregion
239
- //#region src/services/insurance.ts
240
- var W = "/web-services/v200/b2c/insurance-offer", G = "/web-services/v200/b2c/insurance-retrieve";
241
- function K(e) {
242
- return {
243
- getInsuranceOffer: v(e, W),
244
- retrieveInsurance: v(e, G)
245
- };
246
- }
247
- //#endregion
248
- //#region src/services/trips.ts
249
- var q = "/web-services/v200/b2c/availability", J = "/web-services/v200/b2c/route-frequency", Y = "/web-services/v200/b2c/simple-trips", X = "/web-services/v200/b2c/trips", Z = "/web-services/v200/b2c/trips-per-day", re = "/web-services/v200/b2c/trips-with-conjunction", ie = "/web-services/v200/b2c/list-of-trips";
250
- function Q(e) {
251
- return {
252
- getAvailability: v(e, q),
253
- getRouteFrequencies: v(e, J),
254
- listTrips: v(e, ie),
255
- searchSimpleTrips: v(e, Y),
256
- searchTrips: v(e, X),
257
- searchTripsPerDay: v(e, Z),
258
- searchTripsWithConjunction: v(e, re)
259
- };
260
- }
261
- //#endregion
262
- //#region src/services/validation.ts
263
- var ae = "/web-services/v200/b2c/validate-loyalty-data", oe = "/web-services/v200/b2c/validate-resident-data";
264
- function $(e) {
265
- return {
266
- validateLoyaltyData: v(e, ae),
267
- validateResidentData: v(e, oe)
268
- };
269
- }
270
- //#endregion
271
- //#region src/client.ts
272
- function se(e = {}) {
273
- let t = g(e);
274
- return {
275
- accommodation: S(t),
276
- booking: M(t),
277
- catalog: U(t),
278
- insurance: K(t),
279
- transport: t,
280
- trips: Q(t),
281
- validation: $(t)
282
- };
283
- }
284
- //#endregion
285
- export { a as LiknossApiError, t as LiknossConfigurationError, e as LiknossError, r as LiknossHttpError, n as LiknossNetworkError, i as LiknossResponseParseError, S as createAccommodationService, M as createBookingService, U as createCatalogService, K as createInsuranceService, se as createLiknossClient, Q as createTripService, $ as createValidationService };
1
+ import { a as e, i as t, n, o as r, r as i, s as a, t as o } from "./client-n0IowNVM.js";
2
+ import { createAccommodationService as s } from "./services/accommodation.mjs";
3
+ import { createBookingService as c } from "./services/booking.mjs";
4
+ import { createCatalogService as l } from "./services/catalog.mjs";
5
+ import { createInsuranceService as u } from "./services/insurance.mjs";
6
+ import { createTripService as d } from "./services/trips.mjs";
7
+ import { createValidationService as f } from "./services/validation.mjs";
8
+ import "./services/index.mjs";
9
+ export { n as LiknossApiError, i as LiknossConfigurationError, t as LiknossError, e as LiknossHttpError, r as LiknossNetworkError, a as LiknossResponseParseError, s as createAccommodationService, c as createBookingService, l as createCatalogService, u as createInsuranceService, o as createLiknossClient, d as createTripService, f as createValidationService };
@@ -0,0 +1,17 @@
1
+ //#region src/core/methods.ts
2
+ function e(e, t) {
3
+ return (n) => e.request({
4
+ ...n ?? {},
5
+ method: "GET",
6
+ path: t
7
+ });
8
+ }
9
+ function t(e, t) {
10
+ return (n) => e.request({
11
+ ...n,
12
+ method: "POST",
13
+ path: t
14
+ });
15
+ }
16
+ //#endregion
17
+ export { t as n, e as t };
@@ -0,0 +1,12 @@
1
+ import { n as e } from "../methods-q01LXyEB.js";
2
+ //#region src/services/accommodation.ts
3
+ var t = "/web-services/v200/b2c/accommodation-plan", n = "/web-services/v200/b2c/lock-accommodation-space", r = "/web-services/v200/b2c/unlock-accommodation-space";
4
+ function i(i) {
5
+ return {
6
+ getAccommodationPlan: e(i, t),
7
+ lockAccommodationSpace: e(i, n),
8
+ unlockAccommodationSpace: e(i, r)
9
+ };
10
+ }
11
+ //#endregion
12
+ export { i as createAccommodationService };
@@ -0,0 +1,19 @@
1
+ import { n as e, t } from "../methods-q01LXyEB.js";
2
+ //#region src/services/booking.ts
3
+ var n = "/web-services/v200/b2c/booking", r = "/web-services/v200/b2c/booking-identifier", i = "/web-services/v200/b2c/cancellation/{crs_reservation_id}", a = "/web-services/v200/b2c/cancel-multi-booking/{crs_reservation_id}", o = "/web-services/v200/b2c/confirm-payment", s = "/web-services/v200/b2c/generate-voucher/{crs_reservation_id}", c = "/web-services/v200/b2c/multi-booking", l = "/web-services/v200/b2c/multi-pricing", u = "/web-services/v200/b2c/pricing", d = "/web-services/v200/b2c/retrieve-booking-leader/{crs_reservation_id}";
4
+ function f(f) {
5
+ return {
6
+ cancelBooking: t(f, i),
7
+ cancelMultiBooking: t(f, a),
8
+ confirmPayment: e(f, o),
9
+ createBooking: e(f, n),
10
+ createBookingIdentifier: e(f, r),
11
+ createMultiBooking: e(f, c),
12
+ generateVoucher: t(f, s),
13
+ getBookingLeader: t(f, d),
14
+ getMultiPricing: e(f, l),
15
+ getPricing: e(f, u)
16
+ };
17
+ }
18
+ //#endregion
19
+ export { f as createBookingService };
@@ -0,0 +1,20 @@
1
+ import { t as e } from "../methods-q01LXyEB.js";
2
+ //#region src/services/catalog.ts
3
+ var t = "/web-services/v200/b2c/analytic-routes", n = "/web-services/v200/b2c/companies", r = "/web-services/v200/b2c/financial-data/{company_abbreviation}", i = "/web-services/v200/b2c/company-redirection", a = "/web-services/v200/b2c/countries", o = "/web-services/v200/b2c/locations", s = "/web-services/v200/b2c/locations-with-filter", c = "/web-services/v200/b2c/resident-static-data", l = "/web-services/v200/b2c/routes", u = "/web-services/v200/b2c/routes-with-filter", d = "/web-services/v200/b2c/session";
4
+ function f(f) {
5
+ return {
6
+ filterLocations: e(f, s),
7
+ filterRoutes: e(f, u),
8
+ getCompanyFinancialData: e(f, r),
9
+ getCompanyRedirection: e(f, i),
10
+ getResidentStaticData: e(f, c),
11
+ getSession: e(f, d),
12
+ listAnalyticRoutes: e(f, t),
13
+ listCompanies: e(f, n),
14
+ listCountries: e(f, a),
15
+ listLocations: e(f, o),
16
+ listRoutes: e(f, l)
17
+ };
18
+ }
19
+ //#endregion
20
+ export { f as createCatalogService };
@@ -0,0 +1,7 @@
1
+ import { createAccommodationService as e } from "./accommodation.mjs";
2
+ import { createBookingService as t } from "./booking.mjs";
3
+ import { createCatalogService as n } from "./catalog.mjs";
4
+ import { createInsuranceService as r } from "./insurance.mjs";
5
+ import { createTripService as i } from "./trips.mjs";
6
+ import { createValidationService as a } from "./validation.mjs";
7
+ export { e as createAccommodationService, t as createBookingService, n as createCatalogService, r as createInsuranceService, i as createTripService, a as createValidationService };
@@ -0,0 +1,11 @@
1
+ import { n as e } from "../methods-q01LXyEB.js";
2
+ //#region src/services/insurance.ts
3
+ var t = "/web-services/v200/b2c/insurance-offer", n = "/web-services/v200/b2c/insurance-retrieve";
4
+ function r(r) {
5
+ return {
6
+ getInsuranceOffer: e(r, t),
7
+ retrieveInsurance: e(r, n)
8
+ };
9
+ }
10
+ //#endregion
11
+ export { r as createInsuranceService };
@@ -0,0 +1,16 @@
1
+ import { n as e } from "../methods-q01LXyEB.js";
2
+ //#region src/services/trips.ts
3
+ var t = "/web-services/v200/b2c/availability", n = "/web-services/v200/b2c/route-frequency", r = "/web-services/v200/b2c/simple-trips", i = "/web-services/v200/b2c/trips", a = "/web-services/v200/b2c/trips-per-day", o = "/web-services/v200/b2c/trips-with-conjunction", s = "/web-services/v200/b2c/list-of-trips";
4
+ function c(c) {
5
+ return {
6
+ getAvailability: e(c, t),
7
+ getRouteFrequencies: e(c, n),
8
+ listTrips: e(c, s),
9
+ searchSimpleTrips: e(c, r),
10
+ searchTrips: e(c, i),
11
+ searchTripsPerDay: e(c, a),
12
+ searchTripsWithConjunction: e(c, o)
13
+ };
14
+ }
15
+ //#endregion
16
+ export { c as createTripService };
@@ -0,0 +1,11 @@
1
+ import { n as e } from "../methods-q01LXyEB.js";
2
+ //#region src/services/validation.ts
3
+ var t = "/web-services/v200/b2c/validate-loyalty-data", n = "/web-services/v200/b2c/validate-resident-data";
4
+ function r(r) {
5
+ return {
6
+ validateLoyaltyData: e(r, t),
7
+ validateResidentData: e(r, n)
8
+ };
9
+ }
10
+ //#endregion
11
+ export { r as createValidationService };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ferryrsvp/liknoss-client",
3
- "version": "1.0.3",
3
+ "version": "1.1.9",
4
4
  "description": "Typed Liknoss B2C client for Ferry RSVP services and workers.",
5
5
  "main": "build/liknoss-client/index.mjs",
6
6
  "module": "build/liknoss-client/index.mjs",
@@ -20,27 +20,24 @@
20
20
  "import": "./build/liknoss-client/client.mjs",
21
21
  "types": "./build/liknoss-client/client.d.ts"
22
22
  },
23
+ "./services": {
24
+ "import": "./build/liknoss-client/services/index.mjs",
25
+ "types": "./build/liknoss-client/services/index.d.ts"
26
+ },
23
27
  "./services/*": {
24
28
  "import": "./build/liknoss-client/services/*.mjs",
25
29
  "types": "./build/liknoss-client/services/*.d.ts"
26
30
  }
27
31
  },
28
32
  "scripts": {
29
- "copy_html": "cp ./node_modules/@ferryrsvp/web-tools/build/templates/static/index.html ./index.html",
30
- "copy_ssl": "cp -r ./node_modules/@ferryrsvp/web-tools/build/templates/ssl ./",
31
- "copy_github_workflows": "cp -r ./node_modules/@ferryrsvp/web-tools/build/templates/github_workflows/.github ./",
32
- "copy_ts_configs": "cp -r ./node_modules/@ferryrsvp/web-tools/build/templates/ts_configs/* ./",
33
- "copy_local_dev": "cp -r ./node_modules/@ferryrsvp/web-tools/build/templates/local-dev ./",
34
- "setup": "npm run copy_html && npm run copy_local_dev && npm run copy_ssl && npm run copy_github_workflows && npm run copy_ts_configs",
35
- "generate:spec": "curl -L https://devsrv.liknoss.com/cws/b2c/swagger.json -o openapi/swagger.json && npx swagger2openapi openapi/swagger.json -o openapi/openapi.json",
36
33
  "generate:types": "npx openapi-typescript openapi/openapi.json -o src/generated/openapi.ts",
37
34
  "build:types": "tsc -p tsconfig.build.json",
38
35
  "dev": "vite",
39
36
  "build": "npm run generate:types && vite build && npm run build:types",
40
37
  "prepublishOnly": "npm run build",
41
- "watch": "vite build --watch",
42
38
  "clean": "rm -rf node_modules package-lock.json index.html tsconfig.dev.json ssl .github local-dev build",
43
- "deploy": "npx r2-deploy ferry-assets"
39
+ "deploy": "npx r2-deploy ferry-assets",
40
+ "npm:publish": "npm publish --access public"
44
41
  },
45
42
  "publishConfig": {
46
43
  "access": "public",
@@ -64,7 +61,6 @@
64
61
  "typescript": "^5.8.3",
65
62
  "vite": "latest",
66
63
  "vite-plugin-checker": "^0.9.3",
67
- "vite-plugin-externalize-dependencies": "latest",
68
64
  "vite-plugin-html": "^3.2.2",
69
65
  "vite-plugin-js-importmap-script": "^1.0.0",
70
66
  "wrangler": "^4.10.0"