aves-sdk 3.1.0 → 4.0.1

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/CHANGELOG.md CHANGED
@@ -5,7 +5,58 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [3.1.0] - 2026-08-06
8
+ ## [4.0.1] - 2026-08-06
9
+
10
+ ### Added
11
+
12
+ - Copy `CHANGELOG.md` into `dist/` on build (`tsdown` `copy`) and include `dist/CHANGELOG.md` in published `files`.
13
+
14
+ ## [4.0.0] - 2026-08-06
15
+
16
+ ### Added
17
+
18
+ - `OpBodyKey` object enum (`MasterRecordDetail`) for RQ payload nest keys; typed on `AVES_OPS` / envelope.
19
+ - `AvesOp` object enum (+ `AvesOpSchema`) for `invokeOp` keys; domains use `AvesOp.create` instead of string literals.
20
+
21
+ ### Changed
22
+
23
+ - **Breaking:** Domain method names no longer repeat the namespace / AVES verb soup. `AVES_OPS` keys follow the same short names (with `searchBookings` / `searchPackages` where `search` would collide).
24
+
25
+ | Namespace | 3.x | 4.x |
26
+ | --------- | --- | --- |
27
+ | `master` | `upsertRecord` | `upsert` |
28
+ | `booking` | `createBooking` | `create` |
29
+ | `booking` | `modBookingServices` | `updateServices` |
30
+ | `booking` | `modBookingHeader` | `updateHeader` |
31
+ | `booking` | `cancelBooking` | `cancel` |
32
+ | `booking` | `setBookingStatus` | `setStatus` |
33
+ | `booking` | `setBookingServiceStatus` | `setServiceStatus` |
34
+ | `booking` | `insertFilePaymentList` | `addPayments` |
35
+ | `booking` | `searchBookingFiles` | `search` |
36
+ | `packages` | `searchPackages` | `search` |
37
+ | `packages` | `searchTopServices` | `searchServices` |
38
+ | `packages` | `getPackageDetail` | `get` |
39
+ | `packages` | `commitPackage` | `commit` |
40
+
41
+ `master.search` is unchanged. Endpoint URLs and XML roots are unchanged.
42
+
43
+ ### Migration (1.x / 3.x → 4.x)
44
+
45
+ Jump straight to 4.x for September apps: apply the 3.x facade + `master.search` flat-array notes, then rename methods per the table above (no compatibility aliases).
46
+
47
+ ```ts
48
+ // 3.x
49
+ await client.booking.createBooking(params);
50
+ await client.packages.searchPackages(params);
51
+ await client.master.upsertRecord(record);
52
+
53
+ // 4.x
54
+ await client.booking.create(params);
55
+ await client.packages.search(params);
56
+ await client.master.upsert(record);
57
+ ```
58
+
59
+ ## [3.1.1] - 2026-08-06
9
60
 
10
61
  ### Added
11
62
 
@@ -13,6 +64,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
64
  - Schema-owned dual keys via `facadeObject` / `coalesceAliases` (same pattern as `coalesceCustomerRecordCode`).
14
65
  - Simplified public type aliases including `BookingInput`, `Booking`, `MasterRecord`, `PackageInput`, and `Package`.
15
66
  - `AVES_OPS` registry + `invokeOp(op, params)` with external `OpParams` / `OpResult` typings.
67
+ - Full facade alias property map in README (outbound `publicKeyAliases` + inbound scoped maps).
68
+ - 2.x → 3.x migration notes for `master.search` (flat array success payload).
16
69
 
17
70
  ### Changed
18
71
 
@@ -32,6 +85,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
32
85
 
33
86
  - **Breaking:** `master.search` success payload is now `MasterRecordDetailResponse[]` — always a flat array (`[]`, one element, or many). No `rsStatus` wrapper on success (non-OK AVES status remains `result.error`). Replaces the prior `{ rsStatus, masterRecordList }` shape.
34
87
 
88
+ ### Migration (2.x → 3.x)
89
+
90
+ Only `master.search` success shape changed. Other domain methods and error/`Result` contracts are unchanged from 2.x.
91
+
92
+ | Change | Symptom on upgrade | Fix |
93
+ | ------ | ------------------ | --- |
94
+ | `master.search` success is a flat array | `result.data.masterRecordList` / `result.data.rsStatus` are `undefined`; types fail | Use `result.data` as `MasterRecordDetailResponse[]` (e.g. `const [record] = result.data` or `result.data.map(...)`) |
95
+ | Looking for `rsStatus` on success | Always missing when `result.success` | Keep using `result.error` for non-OK AVES / HTTP failures (`error.kind`, `error.status`, `error.code`) |
96
+ | Empty search | May have expected a missing list or wrapper | Success with no hits is `result.data === []` |
97
+
98
+ **Before (2.x):**
99
+
100
+ ```ts
101
+ const result = await client.master.search({
102
+ searchType: "CODE",
103
+ recordCode: "508558",
104
+ });
105
+ if (result.success) {
106
+ const records = result.data.masterRecordList ?? [];
107
+ console.log(result.data.rsStatus.status, records[0]?.recordCode);
108
+ }
109
+ ```
110
+
111
+ **After (3.x):**
112
+
113
+ ```ts
114
+ const result = await client.master.search({
115
+ searchType: "CODE",
116
+ recordCode: "508558",
117
+ });
118
+ if (result.success) {
119
+ const [record] = result.data; // MasterRecordDetailResponse[]
120
+ console.log(record?.recordCode);
121
+ } else {
122
+ console.error(result.error.kind, result.error.status, result.error.message);
123
+ }
124
+ ```
125
+
126
+ 3.1.x on top of 3.0 is additive (facade aliases / internal transport). No further breaking migration from 3.0 → 3.1.1.
127
+
35
128
  ## [2.0.1] - 2026-08-05
36
129
 
37
130
  ### Changed
package/README.md CHANGED
@@ -45,19 +45,25 @@ if (result.success) {
45
45
  `AvesClient` is a facade over domain clients. Operations are namespaced by domain.
46
46
 
47
47
  ```typescript
48
- await client.booking.createBooking(params);
49
- await client.packages.searchPackages(params);
48
+ await client.booking.create(params);
49
+ await client.packages.search(params);
50
50
  await client.master.search({ searchType: 'CODE', recordCode: '508558' });
51
51
  ```
52
52
 
53
53
  Migration from 1.x: insert the appropriate domain namespace (for example,
54
- `client.search` → `client.master.search`). See the [2.0.0 migration notes](./CHANGELOG.md).
54
+ `client.search` → `client.master.search`). See the [2.0.0 migration notes](./CHANGELOG.md#200---2026-08-05).
55
+
56
+ Migration from 2.x: `master.search` success is a flat array — see the
57
+ [3.0.0 migration notes](./CHANGELOG.md#300---2026-08-06).
58
+
59
+ Migration from 3.x: domain method names were shortened — see the
60
+ [4.0.0 migration notes](./CHANGELOG.md#400---2026-08-06).
55
61
 
56
62
  | Namespace | Methods |
57
63
  | --------- | ------- |
58
- | `master` | `search`, `upsertRecord` |
59
- | `booking` | `createBooking`, `modBookingServices`, `modBookingHeader`, `cancelBooking`, `setBookingStatus`, `setBookingServiceStatus`, `insertFilePaymentList`, `searchBookingFiles` |
60
- | `packages` | `searchPackages`, `searchTopServices`, `getPackageDetail`, `commitPackage` |
64
+ | `master` | `search`, `upsert` |
65
+ | `booking` | `create`, `updateServices`, `updateHeader`, `cancel`, `setStatus`, `setServiceStatus`, `addPayments`, `search` |
66
+ | `packages` | `search`, `searchServices`, `get`, `commit` |
61
67
 
62
68
  ### Constructor
63
69
 
@@ -106,21 +112,203 @@ dual keys are owned by Valibot input schemas (`facadeObject` / `coalesceAliases`
106
112
  and coalesced to AVES camelCase before wire encoding. Outbound success payloads
107
113
  keep AVES names and add concise compatibility aliases. XML shapes are unchanged.
108
114
 
115
+ Source of truth in code:
116
+
117
+ - Outbound (AVES → facade): `publicKeyAliases` in `src/utils/facade-transform.ts`
118
+ - Inbound (facade → AVES): scoped maps in `src/utils/facade-aliases.ts`
119
+
120
+ Some facade names are reused (`services`, `status`, `passengerCount`, `financial`,
121
+ `payments`, `packages`, `identityDocument`). Resolution is **schema-scoped** on
122
+ input and **target-key presence** on Proxy output — not a single global rename.
123
+
124
+ ### Outbound map (AVES → facade)
125
+
126
+ Applied on success payloads via `withPublicAliases` (both names remain readable).
127
+
109
128
  | AVES-shaped name | Facade name |
110
129
  | ---------------- | ----------- |
130
+ | `rsStatus` | `response` |
111
131
  | `customerRecordCode` | `customerCode` |
112
- | `bookingFileCode` / `bookingFileRefCode` | `bookingCode` / `bookingReference` |
132
+ | `bookingFileCode` | `bookingCode` |
133
+ | `bookingFileRefCode` | `bookingReference` |
134
+ | `bookingFileStatus` | `status` |
135
+ | `fileStatus` | `status` |
136
+ | `bookingFileDescription` | `description` |
137
+ | `bookingFileStartDate` | `startDate` |
138
+ | `bookingFileReferenceName` | `referenceName` |
139
+ | `bookingFileServiceStatus` | `serviceStatus` |
140
+ | `bookingFileServiceStatusDate` | `serviceStatusDate` |
141
+ | `bookingServiceRef` | `serviceReference` |
142
+ | `newCustomerRecordCode` | `newCustomerCode` |
143
+ | `customerDetail` | `customer` |
144
+ | `bookingFileDocument` | `documents` |
145
+ | `bookingFinancialInfo` | `financial` |
146
+ | `financialDetail` | `financial` |
147
+ | `idDocumentDetail` | `identityDocument` |
148
+ | `idDocInfo` | `identityDocument` |
149
+ | `accountPolicies` | `policies` |
150
+ | `dynamicFields` | `customFields` |
151
+ | `supplierRefMasterRecords` | `supplierReference` |
113
152
  | `selectedPackageDetail` | `package` |
114
- | `*List` collections | plural collections, for example `services`, `passengers`, `payments` |
115
- | `pCode` / `sCode` / `ssCode` | `packageCode` / `serviceCode` / `subServiceCode` |
116
- | `rph` / `roomRph` | `passengerRef` / `roomRef` |
117
- | `qty` / `pax` / `avesSession` | `quantity` / `passengerCount` / `session` |
118
- | `rsStatus` | `response` |
153
+ | `selectedPackageList` | `packages` |
154
+ | `packageList` | `packages` |
155
+ | `selectedServiceList` | `services` |
156
+ | `bookedServiceList` | `services` |
157
+ | `serviceList` | `services` |
158
+ | `extraQuoteServiceList` | `extraServices` |
159
+ | `passengerList` | `passengers` |
160
+ | `noteList` | `notes` |
161
+ | `deadlineList` | `deadlines` |
162
+ | `financialDeadlineList` | `financialDeadlines` |
163
+ | `paymentList` | `payments` |
164
+ | `filePaymentList` | `payments` |
165
+ | `cancellableBookedServiceList` | `cancellableServices` |
166
+ | `subServiceList` | `subServices` |
167
+ | `featureList` | `features` |
168
+ | `pCode` | `packageCode` |
169
+ | `sCode` | `serviceCode` |
170
+ | `ssCode` | `subServiceCode` |
171
+ | `rph` | `passengerRef` |
172
+ | `roomRph` | `roomRef` |
173
+ | `avesSession` | `session` |
174
+ | `paxAssociated` | `passengerRefs` |
175
+ | `paxQty` | `passengerCount` |
176
+ | `pax` | `passengerCount` |
177
+ | `paxQtyCriteria` | `passengerCountRule` |
178
+ | `qty` | `quantity` |
179
+ | `eMail` | `email` |
180
+ | `sex` | `gender` |
181
+ | `nType` | `noteType` |
182
+ | `avesServiceType` | `serviceType` |
183
+ | `toServiceType` | `targetType` |
184
+ | `packageParams` | `packageOptions` |
185
+ | `topServiceParams` | `serviceOptions` |
186
+ | `servOrPackCode` | `serviceOrPackageCode` |
187
+ | `servOrPackDesc` | `serviceOrPackageDescription` |
188
+ | `getDocumentation` | `includeDocumentation` |
189
+ | `getServicesFromPackage` | `includeServices` |
190
+ | `mergeBoardAndAccomodation` | `mergeBoardAndAccommodation` |
191
+ | `discartNotAvailables` | `discardUnavailable` |
192
+ | `discartNotAvailablesMinSales` | `discardUnavailableMinSales` |
193
+ | `discartNotAvailablesDaysInOut` | `discardUnavailableDaysInOut` |
194
+ | `getAllDeptDate` | `allDepartureDates` |
195
+ | `getAllAccomodation` | `allAccommodation` |
196
+ | `compatibleAccomodation` | `compatibleAccommodation` |
197
+ | `alternativeAccomodation` | `alternativeAccommodation` |
198
+
199
+ ### Inbound map (facade → AVES)
200
+
201
+ Applied only on the schema that owns each fragment (`facadeObject` / `coalesceAliases`).
202
+
203
+ #### Shared refs
204
+
205
+ | Facade | AVES |
206
+ | ------ | ---- |
207
+ | `customerCode` | `customerRecordCode` |
208
+ | `bookingCode` | `bookingFileCode` |
209
+ | `bookingReference` | `bookingFileRefCode` |
210
+
211
+ #### Passenger / note / service line
212
+
213
+ | Facade | AVES |
214
+ | ------ | ---- |
215
+ | `passengerRef` | `rph` |
216
+ | `roomRef` | `roomRph` |
217
+ | `gender` | `sex` |
218
+ | `email` | `eMail` |
219
+ | `identityDocument` | `idDocInfo` |
220
+ | `noteType` | `nType` |
221
+ | `serviceCode` | `sCode` |
222
+ | `subServiceCode` | `ssCode` |
223
+ | `quantity` | `qty` |
224
+ | `passengerCount` | `pax` |
225
+ | `session` | `avesSession` |
226
+ | `passengerRefs` | `paxAssociated` |
227
+ | `serviceType` | `avesServiceType` |
228
+ | `targetType` | `toServiceType` |
229
+ | `notes` | `noteList` |
230
+ | `packageCode` | `pCode` |
231
+ | `includeServices` | `getServicesFromPackage` |
232
+
233
+ #### Booking root (`create`)
234
+
235
+ | Facade | AVES |
236
+ | ------ | ---- |
237
+ | `customer` | `customerDetail` |
238
+ | `status` | `bookingFileStatus` |
239
+ | `description` | `bookingFileDescription` |
240
+ | `referenceName` | `bookingFileReferenceName` |
241
+ | `financial` | `bookingFinancialInfo` |
242
+ | `package` | `selectedPackageDetail` |
243
+ | `packages` | `selectedPackageList` |
244
+ | `services` | `selectedServiceList` |
245
+ | `extraServices` | `extraQuoteServiceList` |
246
+ | `passengers` | `passengerList` |
247
+ | `payments` | `paymentList` |
248
+ | `documents` | `bookingFileDocument` |
249
+ | `deadlines` | `deadlineList` |
250
+ | `financialDeadlines` | `financialDeadlineList` |
251
+ | `notes` | `noteList` |
252
+
253
+ (+ shared refs above)
254
+
255
+ #### Mod services / mod header / status / payments / search booking
256
+
257
+ | Scope | Facade | AVES |
258
+ | ----- | ------ | ---- |
259
+ | Mod services | `package` / `packages` | `selectedPackageDetail` / `selectedPackageList` |
260
+ | Mod services | `services` / `passengers` / `deadlines` | `selectedServiceList` / `passengerList` / `deadlineList` |
261
+ | Mod services | `cancellableServices` | `cancellableBookedServiceList` |
262
+ | Mod header | `startDate` | `bookingFileStartDate` |
263
+ | Mod header | `newCustomerCode` | `newCustomerRecordCode` |
264
+ | Mod header | `referenceName` / `passengers` / `financial` / `financialDeadlines` | `bookingFileReferenceName` / `passengerList` / `bookingFinancialInfo` / `financialDeadlineList` |
265
+ | Set file status | `status` / `documents` | `fileStatus` / `bookingFileDocument` |
266
+ | Set service status | `serviceReference` / `serviceStatus` / `serviceStatusDate` | `bookingServiceRef` / `bookingFileServiceStatus` / `bookingFileServiceStatusDate` |
267
+ | Insert payments | `payments` | `filePaymentList` |
268
+ | Search booking files | `status` | `fileStatus` |
269
+
270
+ (+ shared refs where listed in each map)
271
+
272
+ #### Master record
273
+
274
+ | Facade | AVES |
275
+ | ------ | ---- |
276
+ | `financial` | `financialDetail` |
277
+ | `identityDocument` | `idDocumentDetail` |
278
+ | `policies` | `accountPolicies` |
279
+ | `customFields` | `dynamicFields` |
280
+ | `supplierReference` | `supplierRefMasterRecords` |
281
+
282
+ #### Package / top-service search + package params + get package detail
283
+
284
+ | Facade | AVES |
285
+ | ------ | ---- |
286
+ | `searchType` | `avesSearchType` |
287
+ | `passengers` | `passengerList` |
288
+ | `packageOptions` | `packageParams` |
289
+ | `serviceOptions` | `topServiceParams` |
290
+ | `serviceOrPackageCode` | `servOrPackCode` |
291
+ | `serviceOrPackageDescription` | `servOrPackDesc` |
292
+ | `passengerCount` | `paxQty` |
293
+ | `passengerCountRule` | `paxQtyCriteria` |
294
+ | `features` | `featureList` |
295
+ | `includeDocumentation` | `getDocumentation` |
296
+ | `mergeBoardAndAccommodation` | `mergeBoardAndAccomodation` |
297
+ | `discardUnavailable` | `discartNotAvailables` |
298
+ | `discardUnavailableMinSales` | `discartNotAvailablesMinSales` |
299
+ | `discardUnavailableDaysInOut` | `discartNotAvailablesDaysInOut` |
300
+ | `allDepartureDates` | `getAllDeptDate` |
301
+ | `allAccommodation` | `getAllAccomodation` |
302
+ | `compatibleAccommodation` | `compatibleAccomodation` |
303
+ | `alternativeAccommodation` | `alternativeAccomodation` |
304
+ | `services` (package detail RQ) | `selectedServiceList` |
305
+
306
+ (+ shared refs on search / package detail)
119
307
 
120
308
  New code can use the simplified vocabulary directly:
121
309
 
122
310
  ```typescript
123
- const created = await client.booking.createBooking({
311
+ const created = await client.booking.create({
124
312
  customerCode: '138311',
125
313
  status: 'CONFIRMED',
126
314
  startDate: '2026-08-06',
@@ -189,12 +377,12 @@ const byEmail = await client.master.search({
189
377
  });
190
378
  ```
191
379
 
192
- ### `client.master.upsertRecord(record)`
380
+ ### `client.master.upsert(record)`
193
381
 
194
382
  `insertCriteria`: `'S'` always insert · `'N'` skip if exists · `'T'` update all (default) · `'M'` secondary fields only.
195
383
 
196
384
  ```typescript
197
- const result = await client.master.upsertRecord({
385
+ const result = await client.master.upsert({
198
386
  name: 'Jane Smith',
199
387
  email: 'jane@example.com',
200
388
  languageCode: '02',
@@ -214,19 +402,19 @@ if (result.success) {
214
402
 
215
403
  | Method | Purpose |
216
404
  | ------ | ------- |
217
- | `createBooking` | Create booking file |
218
- | `modBookingServices` | Add/replace services, assign package, delete/nullify lines |
219
- | `modBookingHeader` | Header only (pax, notes, billing) — no costs |
220
- | `cancelBooking` | Delete booking file |
221
- | `setBookingStatus` | Change file status (`CANCELED` / `NULLIFIED` / …) |
222
- | `setBookingServiceStatus` | Nullify a single service line |
223
- | `insertFilePaymentList` | Register payments |
224
- | `searchBookingFiles` | Search practices (`FILE_CODE`, `PAX_NAME`, `PACKAGE_CODE`, `OTHER`) |
405
+ | `create` | Create booking file |
406
+ | `updateServices` | Add/replace services, assign package, delete/nullify lines |
407
+ | `updateHeader` | Header only (pax, notes, billing) — no costs |
408
+ | `cancel` | Delete booking file |
409
+ | `setStatus` | Change file status (`CANCELED` / `NULLIFIED` / …) |
410
+ | `setServiceStatus` | Nullify a single service line |
411
+ | `addPayments` | Register payments |
412
+ | `search` | Search practices (`FILE_CODE`, `PAX_NAME`, `PACKAGE_CODE`, `OTHER`) |
225
413
 
226
414
  ### Create
227
415
 
228
416
  ```typescript
229
- const created = await client.booking.createBooking({
417
+ const created = await client.booking.create({
230
418
  customerRecordCode: '138311', // or customerDetail: { recordCode: '138311' }
231
419
  bookingFileStatus: 'QUOTATION', // or { value: 'QUOTATION', expiredDate? }
232
420
  startDate: '2015-01-22T00:00:00',
@@ -265,7 +453,7 @@ if (created.success) {
265
453
  ### Modify services / package / overwrite lines
266
454
 
267
455
  ```typescript
268
- await client.booking.modBookingServices({
456
+ await client.booking.updateServices({
269
457
  customerRecordCode: '138311',
270
458
  bookingFileCode: '14/036654',
271
459
  selectedPackageDetail: {
@@ -304,7 +492,7 @@ Requires `bookingFileCode` **or** `bookingFileRefCode`.
304
492
  `paymentUser` is serialized as an XML **attribute** on `FilePaymentListRQ` (`PaymentUser="…"`), not as a child element.
305
493
 
306
494
  ```typescript
307
- await client.booking.insertFilePaymentList({
495
+ await client.booking.addPayments({
308
496
  bookingFileCode: '18/000172',
309
497
  paymentUser: 'MLDN',
310
498
  enableMultiplePayments: true,
@@ -323,32 +511,32 @@ await client.booking.insertFilePaymentList({
323
511
  ### Header, status, cancel, search practices
324
512
 
325
513
  ```typescript
326
- await client.booking.modBookingHeader({
514
+ await client.booking.updateHeader({
327
515
  bookingFileCode: '14/000043',
328
516
  bookingFileStartDate: '2014-04-28',
329
517
  customerRecordCode: '103737',
330
518
  passengerList: [{ rph: '001', name: 'ADULTI 001', sex: 'M' }],
331
519
  });
332
520
 
333
- await client.booking.setBookingStatus({
521
+ await client.booking.setStatus({
334
522
  customerRecordCode: '000170',
335
523
  bookingFileCode: '14/000081',
336
524
  fileStatus: 'CANCELED', // or { value: 'CANCELED' }
337
525
  });
338
526
 
339
- await client.booking.setBookingServiceStatus({
527
+ await client.booking.setServiceStatus({
340
528
  customerRecordCode: '000001',
341
529
  bookingFileCode: '18/000252',
342
530
  bookingServiceRef: '002',
343
531
  bookingFileServiceStatus: 'NULLIFIED',
344
532
  });
345
533
 
346
- await client.booking.cancelBooking({
534
+ await client.booking.cancel({
347
535
  bookingFileCode: '14/000081',
348
536
  customerRecordCode: '000170',
349
537
  });
350
538
 
351
- await client.booking.searchBookingFiles({
539
+ await client.booking.search({
352
540
  searchType: 'PACKAGE_CODE',
353
541
  customerRecordCode: '138311',
354
542
  packageCode: '2014MDE0000010',
@@ -363,15 +551,15 @@ There is **no** Create Package API in AVES XML 1.8.0. Search, detail, and commit
363
551
 
364
552
  | Method | Purpose |
365
553
  | ------ | ------- |
366
- | `searchPackages` | Search programs (defaults `avesSearchType: 'PACKAGE'`) |
367
- | `searchTopServices` | Search TOP services (defaults `avesSearchType: 'SERVICE'`) |
368
- | `getPackageDetail` | Package base info + service list |
369
- | `commitPackage` | Publish existing package (`packageCode` only) |
554
+ | `search` | Search programs (defaults `avesSearchType: 'PACKAGE'`) |
555
+ | `searchServices` | Search TOP services (defaults `avesSearchType: 'SERVICE'`) |
556
+ | `get` | Package base info + service list |
557
+ | `commit` | Publish existing package (`packageCode` only) |
370
558
 
371
559
  `paxQty` defaults to `passengerList.length`; `paxQtyCriteria` defaults to `GREATER_OR_EQUAL`. `languageCode` can be omitted when set on `AvesClient` options.
372
560
 
373
561
  ```typescript
374
- const packages = await client.packages.searchPackages({
562
+ const packages = await client.packages.search({
375
563
  customerRecordCode: '138311',
376
564
  languageCode: '01',
377
565
  currencyCode: 'EUR',
@@ -389,7 +577,7 @@ const packages = await client.packages.searchPackages({
389
577
  servOrPackCode: '2014MDE0000010',
390
578
  });
391
579
 
392
- const detail = await client.packages.getPackageDetail({
580
+ const detail = await client.packages.get({
393
581
  customerRecordCode: '001692',
394
582
  packageCode: '2015F042',
395
583
  startDate: '2015-05-02T00:00:00',
@@ -399,7 +587,7 @@ const detail = await client.packages.getPackageDetail({
399
587
  ],
400
588
  });
401
589
 
402
- await client.packages.commitPackage({ packageCode: '14/PACKAGE001' });
590
+ await client.packages.commit({ packageCode: '14/PACKAGE001' });
403
591
 
404
592
  if (packages.success) console.log(packages.data.packageList?.[0]?.pCode);
405
593
  if (detail.success) console.log(detail.data.pCode, detail.data.serviceList?.[0]);
@@ -483,8 +671,9 @@ Outbound path: validate → `createApiSchema` / `toWireBody` → `invokeOp` →
483
671
  ## Types
484
672
 
485
673
  Operations are available only through `client.master`, `client.booking`, and
486
- `client.packages`; flat aliases were removed in 2.0.0. See the
487
- [migration notes](./CHANGELOG.md) when upgrading.
674
+ `client.packages`; flat aliases were removed in 2.0.0. When upgrading from 2.x,
675
+ also update `master.search` consumers for the flat array success payload (3.0.0).
676
+ See the [CHANGELOG migration notes](./CHANGELOG.md).
488
677
 
489
678
  ```typescript
490
679
  import type {