aves-sdk 1.5.0 → 1.6.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.
@@ -1,6 +1,6 @@
1
- # Guida implementazione — Booking ops AVES SDK 1.5.0
1
+ # Guida implementazione — Booking ops AVES SDK 1.6.0
2
2
 
3
- Guida pratica per le operazioni di booking (aves-sdk@1.5.0), derivate dallo spike API AVES XML 1.8.0.
3
+ Guida pratica per le operazioni di booking (aves-sdk@1.6.0), derivate dallo spike API AVES XML 1.8.0.
4
4
 
5
5
  **Escluso:** creazione/ricerca del Programma come entità master (gap Datagest — non coperto dai PDF).
6
6
  **Incluso:** uso del Programma su pratica, update/delete costi, riassegnazione package, annullamento pratica.
@@ -10,13 +10,13 @@ Guida pratica per le operazioni di booking (aves-sdk@1.5.0), derivate dallo spik
10
10
  ## Setup client
11
11
 
12
12
  ```ts
13
- import { AvesClient } from "aves-sdk";
13
+ import { AvesClient } from 'aves-sdk';
14
14
 
15
15
  const client = new AvesClient({
16
- baseURL: "https://<aves-host>",
17
- hostID: "000000", // 6 digit
18
- xtoken: "TOKEN000000",
19
- languageCode: "01", // opzionale
16
+ baseURL: 'https://<aves-host>',
17
+ hostID: '000000', // 6 digit
18
+ xtoken: 'TOKEN000000',
19
+ languageCode: '01', // opzionale
20
20
  timeoutMs: 30_000,
21
21
  });
22
22
  ```
@@ -36,16 +36,16 @@ const data = result.data; // tipizzato
36
36
 
37
37
  ## Mappa task → metodo SDK
38
38
 
39
- | Task spike | Metodo | Endpoint |
40
- |---|---|---|
41
- | Update voci di costo | `modBookingServices` | `/interop/booking/v2/rest/ModBookingFileServices` |
42
- | Delete voci / overwrite | `modBookingServices` (+ opz. `setBookingServiceStatus`) | stesso / `SetBookingFileServiceStatus` |
43
- | Assegna / riassegna Programma | `modBookingServices` (`selectedPackageDetail`) | stesso |
44
- | Annulla pratica (soft) | `setBookingStatus` | `/interop/booking/v2/rest/SetBookingFileStatus` |
45
- | Annulla pratica (delete) | `cancelBooking` | `/interop/booking/v2/rest/CancelBookingFile` |
46
- | Nullify singola riga | `setBookingServiceStatus` | `/interop/booking/v2/rest/SetBookingFileServiceStatus` |
47
- | Incassi sul booking | `insertFilePaymentList` | `/interop/booking/v2/rest/InsertFilePaymentList` |
48
- | Header (pax/note/billing) | `modBookingHeader` | `/interop/booking/v2/rest/ModBookingFileHeader` |
39
+ | Task spike | Metodo | Endpoint |
40
+ | ----------------------------- | ------------------------------------------------------- | ------------------------------------------------------ |
41
+ | Update voci di costo | `modBookingServices` | `/interop/booking/v2/rest/ModBookingFileServices` |
42
+ | Delete voci / overwrite | `modBookingServices` (+ opz. `setBookingServiceStatus`) | stesso / `SetBookingFileServiceStatus` |
43
+ | Assegna / riassegna Programma | `modBookingServices` (`selectedPackageDetail`) | stesso |
44
+ | Annulla pratica (soft) | `setBookingStatus` | `/interop/booking/v2/rest/SetBookingFileStatus` |
45
+ | Annulla pratica (delete) | `cancelBooking` | `/interop/booking/v2/rest/CancelBookingFile` |
46
+ | Nullify singola riga | `setBookingServiceStatus` | `/interop/booking/v2/rest/SetBookingFileServiceStatus` |
47
+ | Incassi sul booking | `insertFilePaymentList` | `/interop/booking/v2/rest/InsertFilePaymentList` |
48
+ | Header (pax/note/billing) | `modBookingHeader` | `/interop/booking/v2/rest/ModBookingFileHeader` |
49
49
 
50
50
  > **Programma** = Package AVES (`pCode` / `PackageCode`). Non esiste API SDK per create/search package.
51
51
 
@@ -57,41 +57,39 @@ Aggiorna una riga già presente: passa `bookedServiceRef` (RPH) e incrementa `av
57
57
 
58
58
  ```ts
59
59
  const result = await client.modBookingServices({
60
- customerRecordCode: "138311",
61
- bookingFileCode: "14/036654",
62
- selectedServiceList: {
63
- selectedServiceDetail: [
60
+ customerRecordCode: '138311',
61
+ bookingFileCode: '14/036654',
62
+ selectedServiceList: [
64
63
  {
65
- sCode: "HT00110840",
66
- ssCode: "DL",
67
- avesServiceType: "TOP",
68
- toServiceType: "RESIDENCE",
69
- subServiceDesc: "DOPPIA DE LUXE",
70
- startDate: "2015-01-22T00:00:00",
71
- endDate: "2015-01-25T00:00:00",
72
- qty: "1",
73
- pax: "2",
74
- paxAssociated: [{ pax: "001" }, { pax: "002" }],
75
- avesSession: "2", // incrementare ad ogni modifica della stessa riga
76
- bookedServiceRef: "001", // RPH servizio già in pratica
64
+ sCode: 'HT00110840',
65
+ ssCode: 'DL',
66
+ avesServiceType: 'TOP',
67
+ toServiceType: 'RESIDENCE',
68
+ subServiceDesc: 'DOPPIA DE LUXE',
69
+ startDate: '2015-01-22T00:00:00',
70
+ endDate: '2015-01-25T00:00:00',
71
+ qty: '1',
72
+ pax: '2',
73
+ paxAssociated: [{ pax: '001' }, { pax: '002' }],
74
+ avesSession: '2', // incrementare ad ogni modifica della stessa riga
75
+ bookedServiceRef: '001', // RPH servizio già in pratica
77
76
  serviceFare: {
78
- currencyCode: "EUR",
79
- cost: "180.00",
80
- costTax: "0.00",
81
- costType: "FORFAIT",
82
- price: "220.00",
83
- priceTax: "0.00",
84
- priceType: "FORFAIT",
77
+ currencyCode: 'EUR',
78
+ cost: '180.00',
79
+ costTax: '0.00',
80
+ costType: 'FORFAIT',
81
+ price: '220.00',
82
+ priceTax: '0.00',
83
+ priceType: 'FORFAIT',
85
84
  },
86
85
  avesServiceInfo: {
87
- packageCode: "2014MDE0000010",
88
- packageReference: "05",
89
- priceListCode: "G",
90
- costListCode: "G",
86
+ packageCode: '2014MDE0000010',
87
+ packageReference: '05',
88
+ priceListCode: 'G',
89
+ costListCode: 'G',
91
90
  },
92
91
  },
93
92
  ],
94
- },
95
93
  });
96
94
 
97
95
  if (result.success) {
@@ -102,7 +100,7 @@ if (result.success) {
102
100
 
103
101
  ### Note
104
102
 
105
- - `selectedServiceList.selectedServiceDetail` è un **array** (shape Mod ≠ Create).
103
+ - `selectedServiceList` / `passengerList` / altre `*List` sono **array flat di Detail**; lo SDK wrappa verso AVES (Create ≠ Mod sul wire).
106
104
  - `ModBookingFileHeader` **non** aggiorna costi.
107
105
 
108
106
  ---
@@ -113,61 +111,57 @@ Pattern: `DELETE`/`NULLIFY` delle righe esistenti → re-insert del nuovo set ne
113
111
 
114
112
  ```ts
115
113
  const result = await client.modBookingServices({
116
- customerRecordCode: "138311",
117
- bookingFileCode: "14/036654",
118
- cancellableBookedServiceList: {
119
- cancellableBookedServiceDetail: [
114
+ customerRecordCode: '138311',
115
+ bookingFileCode: '14/036654',
116
+ cancellableBookedServiceList: [
120
117
  {
121
- cancelOperationType: "DELETE", // o "NULLIFY"
122
- serviceRefType: "RPH",
123
- serviceRefValue: "001",
118
+ cancelOperationType: 'DELETE', // o "NULLIFY"
119
+ serviceRefType: 'RPH',
120
+ serviceRefValue: '001',
124
121
  },
125
122
  {
126
- cancelOperationType: "DELETE",
127
- serviceRefType: "RPH",
128
- serviceRefValue: "002",
123
+ cancelOperationType: 'DELETE',
124
+ serviceRefType: 'RPH',
125
+ serviceRefValue: '002',
129
126
  },
130
127
  ],
131
- },
132
128
  // nuovo set (obbligatorio: almeno 1 servizio nello schema SDK)
133
- selectedServiceList: {
134
- selectedServiceDetail: [
129
+ selectedServiceList: [
135
130
  {
136
- sCode: "VLGENFLEX",
137
- avesServiceType: "OTHER",
138
- toServiceType: "OTHER",
139
- startDate: "2015-01-22T00:00:00",
140
- endDate: "2015-01-25T00:00:00",
141
- qty: "2",
142
- pax: "2",
131
+ sCode: 'VLGENFLEX',
132
+ avesServiceType: 'OTHER',
133
+ toServiceType: 'OTHER',
134
+ startDate: '2015-01-22T00:00:00',
135
+ endDate: '2015-01-25T00:00:00',
136
+ qty: '2',
137
+ pax: '2',
143
138
  paxAssociated: [],
144
- avesSession: "1",
139
+ avesSession: '1',
145
140
  serviceFare: {
146
- currencyCode: "EUR",
147
- cost: "50.00",
148
- price: "80.00",
141
+ currencyCode: 'EUR',
142
+ cost: '50.00',
143
+ price: '80.00',
149
144
  },
150
145
  },
151
146
  {
152
- sCode: "HT00110840",
153
- ssCode: "DIN",
154
- avesServiceType: "TOP",
155
- toServiceType: "RESIDENCE",
156
- subServiceDesc: "CENA ADULTO",
157
- startDate: "2015-01-22T00:00:00",
158
- endDate: "2015-01-25T00:00:00",
159
- qty: "2",
160
- pax: "2",
161
- paxAssociated: [{ pax: "001" }, { pax: "002" }],
162
- avesSession: "1",
147
+ sCode: 'HT00110840',
148
+ ssCode: 'DIN',
149
+ avesServiceType: 'TOP',
150
+ toServiceType: 'RESIDENCE',
151
+ subServiceDesc: 'CENA ADULTO',
152
+ startDate: '2015-01-22T00:00:00',
153
+ endDate: '2015-01-25T00:00:00',
154
+ qty: '2',
155
+ pax: '2',
156
+ paxAssociated: [{ pax: '001' }, { pax: '002' }],
157
+ avesSession: '1',
163
158
  serviceFare: {
164
- currencyCode: "EUR",
165
- cost: "40.00",
166
- price: "60.00",
159
+ currencyCode: 'EUR',
160
+ cost: '40.00',
161
+ price: '60.00',
167
162
  },
168
163
  },
169
164
  ],
170
- },
171
165
  });
172
166
  ```
173
167
 
@@ -175,18 +169,18 @@ const result = await client.modBookingServices({
175
169
 
176
170
  ```ts
177
171
  const result = await client.setBookingServiceStatus({
178
- customerRecordCode: "000001",
179
- bookingFileCode: "18/000252",
180
- bookingServiceRef: "002",
181
- bookingFileServiceStatus: "NULLIFIED",
182
- bookingFileServiceStatusDate: "2018-11-29T12:50:00+01:00",
172
+ customerRecordCode: '000001',
173
+ bookingFileCode: '18/000252',
174
+ bookingServiceRef: '002',
175
+ bookingFileServiceStatus: 'NULLIFIED',
176
+ bookingFileServiceStatusDate: '2018-11-29T12:50:00+01:00',
183
177
  });
184
178
  ```
185
179
 
186
- | `cancelOperationType` | Uso tipico |
187
- |---|---|
188
- | `DELETE` | rimozione (wipe + re-insert) |
189
- | `NULLIFY` | annullamento contabile/operativo della riga |
180
+ | `cancelOperationType` | Uso tipico |
181
+ | --------------------- | ------------------------------------------- |
182
+ | `DELETE` | rimozione (wipe + re-insert) |
183
+ | `NULLIFY` | annullamento contabile/operativo della riga |
190
184
 
191
185
  ---
192
186
 
@@ -197,40 +191,38 @@ Collegare i servizi al package con `avesServiceInfo.packageCode` + `packageRefer
197
191
 
198
192
  ```ts
199
193
  const result = await client.modBookingServices({
200
- customerRecordCode: "138311",
201
- bookingFileCode: "14/036654",
194
+ customerRecordCode: '138311',
195
+ bookingFileCode: '14/036654',
202
196
  selectedPackageDetail: {
203
- pCode: "2014MDE0000010",
204
- startDate: "2015-01-22T00:00:00",
205
- endDate: "2015-01-25T00:00:00",
197
+ pCode: '2014MDE0000010',
198
+ startDate: '2015-01-22T00:00:00',
199
+ endDate: '2015-01-25T00:00:00',
206
200
  getServicesFromPackage: false, // true = auto-carica solo ADV/GRP
207
201
  },
208
- selectedServiceList: {
209
- selectedServiceDetail: [
202
+ selectedServiceList: [
210
203
  {
211
- sCode: "HT00110840",
212
- ssCode: "DL",
213
- avesServiceType: "TOP",
214
- toServiceType: "RESIDENCE",
215
- startDate: "2015-01-22T00:00:00",
216
- endDate: "2015-01-25T00:00:00",
217
- qty: "1",
218
- pax: "2",
219
- paxAssociated: [{ pax: "001" }, { pax: "002" }],
220
- avesSession: "1",
221
- bookedServiceRef: "001", // se aggiorni riga esistente
204
+ sCode: 'HT00110840',
205
+ ssCode: 'DL',
206
+ avesServiceType: 'TOP',
207
+ toServiceType: 'RESIDENCE',
208
+ startDate: '2015-01-22T00:00:00',
209
+ endDate: '2015-01-25T00:00:00',
210
+ qty: '1',
211
+ pax: '2',
212
+ paxAssociated: [{ pax: '001' }, { pax: '002' }],
213
+ avesSession: '1',
214
+ bookedServiceRef: '001', // se aggiorni riga esistente
222
215
  avesServiceInfo: {
223
- packageCode: "2014MDE0000010",
224
- packageReference: "01",
216
+ packageCode: '2014MDE0000010',
217
+ packageReference: '01',
225
218
  },
226
219
  serviceFare: {
227
- currencyCode: "EUR",
228
- cost: "100.00",
229
- price: "120.00",
220
+ currencyCode: 'EUR',
221
+ cost: '100.00',
222
+ price: '120.00',
230
223
  },
231
224
  },
232
225
  ],
233
- },
234
226
  });
235
227
 
236
228
  if (result.success) {
@@ -243,54 +235,48 @@ if (result.success) {
243
235
 
244
236
  ```ts
245
237
  await client.createBooking({
246
- customerDetail: { recordCode: "138311" },
247
- bookingFileStatus: { value: "QUOTATION" },
248
- startDate: "2015-01-22T00:00:00",
249
- endDate: "2015-01-25T00:00:00",
250
- selectedPackageList: {
251
- selectedPackageDetail: [
238
+ customerDetail: { recordCode: '138311' },
239
+ bookingFileStatus: { value: 'QUOTATION' },
240
+ startDate: '2015-01-22T00:00:00',
241
+ endDate: '2015-01-25T00:00:00',
242
+ selectedPackageList: [
252
243
  {
253
- pCode: "2014MDE0000010",
254
- startDate: "2015-01-22T00:00:00",
255
- endDate: "2015-01-25T00:00:00",
244
+ pCode: '2014MDE0000010',
245
+ startDate: '2015-01-22T00:00:00',
246
+ endDate: '2015-01-25T00:00:00',
256
247
  },
257
248
  ],
258
- },
259
249
  selectedServiceList: [
260
250
  {
261
- selectedServiceDetail: {
262
- sCode: "HT00110840",
263
- ssCode: "DL",
264
- avesServiceType: "TOP",
265
- toServiceType: "RESIDENCE",
266
- startDate: "2015-01-22T00:00:00",
267
- endDate: "2015-01-25T00:00:00",
268
- qty: "1",
269
- pax: "2",
251
+ sCode: 'HT00110840',
252
+ ssCode: 'DL',
253
+ avesServiceType: 'TOP',
254
+ toServiceType: 'RESIDENCE',
255
+ startDate: '2015-01-22T00:00:00',
256
+ endDate: '2015-01-25T00:00:00',
257
+ qty: '1',
258
+ pax: '2',
270
259
  paxAssociated: [],
271
- avesSession: "1",
260
+ avesSession: '1',
272
261
  avesServiceInfo: {
273
- packageCode: "2014MDE0000010",
274
- packageReference: "01",
262
+ packageCode: '2014MDE0000010',
263
+ packageReference: '01',
275
264
  },
276
- },
277
- },
265
+ }
278
266
  ],
279
267
  passengerList: [
280
268
  {
281
- passengerDetail: {
282
- rph: "001",
283
- roomRph: "001",
284
- name: "ADULTI 001",
285
- categoryCode: "AD", // obbligatorio in create
286
- sex: "M",
287
- },
288
- },
269
+ rph: '001',
270
+ roomRph: '001',
271
+ name: 'ADULTI 001',
272
+ categoryCode: 'AD', // obbligatorio in create
273
+ sex: 'M',
274
+ }
289
275
  ],
290
276
  });
291
277
  ```
292
278
 
293
- > Shape lista servizi: **Create** = array di wrapper `{ selectedServiceDetail: one }`; **Mod** = `{ selectedServiceDetail: one[] }`.
279
+ > Input SDK unificato: `selectedServiceList: Detail[]`. Sul wire Create usa array di wrapper, Mod usa oggetto con array.
294
280
 
295
281
  ---
296
282
 
@@ -301,9 +287,9 @@ await client.createBooking({
301
287
  ```ts
302
288
  // CANCELED
303
289
  const canceled = await client.setBookingStatus({
304
- customerRecordCode: "000170",
305
- bookingFileCode: "14/000081",
306
- fileStatus: { value: "CANCELED" },
290
+ customerRecordCode: '000170',
291
+ bookingFileCode: '14/000081',
292
+ fileStatus: { value: 'CANCELED' },
307
293
  backOfficeRequest: true,
308
294
  bookingFileDocument: {
309
295
  printDoc: false,
@@ -313,22 +299,22 @@ const canceled = await client.setBookingStatus({
313
299
 
314
300
  // NULLIFIED con penali
315
301
  const nullified = await client.setBookingStatus({
316
- customerRecordCode: "000170",
317
- bookingFileCode: "14/000081",
318
- fileStatus: { value: "NULLIFIED" },
302
+ customerRecordCode: '000170',
303
+ bookingFileCode: '14/000081',
304
+ fileStatus: { value: 'NULLIFIED' },
319
305
  backOfficeRequest: true,
320
306
  penalty: {
321
307
  apply: true, // false = penali automatiche di sistema
322
- specificCode: "ZPENAL", // Top service code penali (se apply=true)
308
+ specificCode: 'ZPENAL', // Top service code penali (se apply=true)
323
309
  },
324
310
  simulateCancelAndGetPenaltyAmount: false,
325
311
  });
326
312
 
327
313
  // Solo simulazione penali
328
314
  const simulation = await client.setBookingStatus({
329
- customerRecordCode: "000170",
330
- bookingFileCode: "14/000081",
331
- fileStatus: { value: "NULLIFIED" },
315
+ customerRecordCode: '000170',
316
+ bookingFileCode: '14/000081',
317
+ fileStatus: { value: 'NULLIFIED' },
332
318
  simulateCancelAndGetPenaltyAmount: true,
333
319
  });
334
320
  if (simulation.success) {
@@ -343,8 +329,8 @@ Stati `fileStatus.value` ammessi:
343
329
 
344
330
  ```ts
345
331
  const result = await client.cancelBooking({
346
- bookingFileCode: "14/000081",
347
- customerRecordCode: "000170",
332
+ bookingFileCode: '14/000081',
333
+ customerRecordCode: '000170',
348
334
  });
349
335
 
350
336
  if (result.success) {
@@ -352,10 +338,10 @@ if (result.success) {
352
338
  }
353
339
  ```
354
340
 
355
- | Metodo | Effetto |
356
- |---|---|
357
- | `setBookingStatus` → `CANCELED` / `NULLIFIED` | pratica resta, cambia stato |
358
- | `cancelBooking` | delete della pratica in AVES |
341
+ | Metodo | Effetto |
342
+ | --------------------------------------------- | ---------------------------- |
343
+ | `setBookingStatus` → `CANCELED` / `NULLIFIED` | pratica resta, cambia stato |
344
+ | `cancelBooking` | delete della pratica in AVES |
359
345
 
360
346
  ---
361
347
 
@@ -363,29 +349,27 @@ if (result.success) {
363
349
 
364
350
  ```ts
365
351
  const result = await client.modBookingHeader({
366
- bookingFileCode: "14/000043",
367
- bookingFileStartDate: "2014-04-28",
368
- customerRecordCode: "103737",
369
- bookingNote: "Nota libera max 999 caratteri",
370
- passengerList: {
371
- passengerDetail: [
352
+ bookingFileCode: '14/000043',
353
+ bookingFileStartDate: '2014-04-28',
354
+ customerRecordCode: '103737',
355
+ bookingNote: 'Nota libera max 999 caratteri',
356
+ passengerList: [
372
357
  {
373
- rph: "001",
374
- name: "ADULTI 001",
375
- sex: "M",
376
- birthDate: "1964-09-26T00:00:00",
358
+ rph: '001',
359
+ name: 'ADULTI 001',
360
+ sex: 'M',
361
+ birthDate: '1964-09-26T00:00:00',
377
362
  // categoryCode opzionale in Mod
378
363
  },
379
364
  {
380
- rph: "002",
381
- name: "ADULTI 002",
382
- sex: "F",
383
- birthDate: "1964-09-26T00:00:00",
365
+ rph: '002',
366
+ name: 'ADULTI 002',
367
+ sex: 'F',
368
+ birthDate: '1964-09-26T00:00:00',
384
369
  },
385
370
  ],
386
- },
387
371
  bookingFinancialInfo: {
388
- customer_PaymentType: "BANK",
372
+ customer_PaymentType: 'BANK',
389
373
  },
390
374
  });
391
375
  ```
@@ -396,62 +380,58 @@ const result = await client.modBookingHeader({
396
380
 
397
381
  Flusso consigliato dopo lo spike:
398
382
 
399
- 1. Opzionale: `DELETE` voci obsolete
400
- 2. `selectedPackageDetail` con il Programma Lead
401
- 3. Nuovo `selectedServiceList` con costi e `packageCode` sui servizi
383
+ 1. Opzionale: `DELETE` voci obsolete
384
+ 2. `selectedPackageDetail` con il Programma Lead
385
+ 3. Nuovo `selectedServiceList` con costi e `packageCode` sui servizi
402
386
 
403
387
  ```ts
404
388
  const result = await client.modBookingServices({
405
- customerRecordCode: "138311",
406
- bookingFileCode: "14/036654",
389
+ customerRecordCode: '138311',
390
+ bookingFileCode: '14/036654',
407
391
  selectedPackageDetail: {
408
- pCode: "2014MDE0000010",
409
- startDate: "2015-01-22T00:00:00",
410
- endDate: "2015-01-25T00:00:00",
392
+ pCode: '2014MDE0000010',
393
+ startDate: '2015-01-22T00:00:00',
394
+ endDate: '2015-01-25T00:00:00',
411
395
  },
412
- cancellableBookedServiceList: {
413
- cancellableBookedServiceDetail: [
396
+ cancellableBookedServiceList: [
414
397
  {
415
- cancelOperationType: "DELETE",
416
- serviceRefType: "RPH",
417
- serviceRefValue: "001",
398
+ cancelOperationType: 'DELETE',
399
+ serviceRefType: 'RPH',
400
+ serviceRefValue: '001',
418
401
  },
419
402
  {
420
- cancelOperationType: "DELETE",
421
- serviceRefType: "RPH",
422
- serviceRefValue: "002",
403
+ cancelOperationType: 'DELETE',
404
+ serviceRefType: 'RPH',
405
+ serviceRefValue: '002',
423
406
  },
424
407
  ],
425
- },
426
- selectedServiceList: {
427
- selectedServiceDetail: [
408
+ selectedServiceList: [
428
409
  {
429
- sCode: "HT00110840",
430
- ssCode: "DL",
431
- avesServiceType: "TOP",
432
- toServiceType: "RESIDENCE",
433
- startDate: "2015-01-22T00:00:00",
434
- endDate: "2015-01-25T00:00:00",
435
- qty: "1",
436
- pax: "2",
437
- paxAssociated: [{ pax: "001" }, { pax: "002" }],
438
- avesSession: "1",
410
+ sCode: 'HT00110840',
411
+ ssCode: 'DL',
412
+ avesServiceType: 'TOP',
413
+ toServiceType: 'RESIDENCE',
414
+ startDate: '2015-01-22T00:00:00',
415
+ endDate: '2015-01-25T00:00:00',
416
+ qty: '1',
417
+ pax: '2',
418
+ paxAssociated: [{ pax: '001' }, { pax: '002' }],
419
+ avesSession: '1',
439
420
  avesServiceInfo: {
440
- packageCode: "2014MDE0000010",
441
- packageReference: "01",
442
- costListCode: "G",
443
- priceListCode: "G",
421
+ packageCode: '2014MDE0000010',
422
+ packageReference: '01',
423
+ costListCode: 'G',
424
+ priceListCode: 'G',
444
425
  },
445
426
  serviceFare: {
446
- currencyCode: "EUR",
447
- cost: "180.00",
448
- price: "220.00",
449
- costType: "FORFAIT",
450
- priceType: "FORFAIT",
427
+ currencyCode: 'EUR',
428
+ cost: '180.00',
429
+ price: '220.00',
430
+ costType: 'FORFAIT',
431
+ priceType: 'FORFAIT',
451
432
  },
452
433
  },
453
434
  ],
454
- },
455
435
  });
456
436
  ```
457
437
 
@@ -463,30 +443,29 @@ Registra uno o più pagamenti sul booking file appena creato (flusso Lead confer
463
443
 
464
444
  ```ts
465
445
  const payments = await client.insertFilePaymentList({
466
- bookingFileCode: "18/000172", // da createBooking → bookingFileDetail.bookingFileCode
467
- paymentUser: "MLDN",
446
+ bookingFileCode: '18/000172', // da createBooking → bookingFileDetail.bookingFileCode
447
+ paymentUser: 'MLDN',
468
448
  enableMultiplePayments: true,
469
- operationType: "AbsoluteAmountsInsertion",
470
- filePaymentList: {
471
- filePaymentDetail: [
449
+ operationType: 'AbsoluteAmountsInsertion',
450
+ filePaymentList: [
472
451
  {
473
- paymentDate: "2018-09-08",
474
- paymentNote: "INCASSO LEAD",
475
- amount: "100.00",
476
- paymentType: "B", // C cash | B bank | R credit card | …
452
+ paymentDate: '2018-09-08',
453
+ paymentNote: 'INCASSO LEAD',
454
+ amount: '100.00',
455
+ paymentType: 'B', // C cash | B bank | R credit card | …
477
456
  },
478
457
  {
479
- paymentDate: "2018-10-08",
480
- paymentNote: "INCASSO LEAD",
481
- amount: "800.25",
482
- paymentType: "C",
458
+ paymentDate: '2018-10-08',
459
+ paymentNote: 'INCASSO LEAD',
460
+ amount: '800.25',
461
+ paymentType: 'C',
483
462
  },
484
463
  ],
485
- },
486
464
  });
487
465
  ```
488
466
 
489
467
  `operationType`:
468
+
490
469
  - `AbsoluteAmountsInsertion` — inserisce gli importi da incassare (anche multipli)
491
470
  - `FinalAmountToAchieve` / `FinalAmountToAchieveWithoutControls` — totale già incassato; AVES calcola la differenza
492
471
 
@@ -505,15 +484,13 @@ await saveAvesCodeOnLead(leadId, bookingFileCode);
505
484
  const paid = await client.insertFilePaymentList({
506
485
  bookingFileCode,
507
486
  enableMultiplePayments: true,
508
- operationType: "AbsoluteAmountsInsertion",
509
- filePaymentList: {
510
- filePaymentDetail: leadPayments.map((p) => ({
511
- paymentDate: p.date,
512
- paymentNote: p.note,
513
- amount: p.amount,
514
- paymentType: p.type,
515
- })),
516
- },
487
+ operationType: 'AbsoluteAmountsInsertion',
488
+ filePaymentList: leadPayments.map((p) => ({
489
+ paymentDate: p.date,
490
+ paymentNote: p.note,
491
+ amount: p.amount,
492
+ paymentType: p.type,
493
+ })),
517
494
  });
518
495
 
519
496
  if (!paid.success) {
@@ -524,7 +501,7 @@ if (!paid.success) {
524
501
 
525
502
  ---
526
503
 
527
- ## Tipi esportati (1.5.0)
504
+ ## Tipi esportati (1.6.0)
528
505
 
529
506
  ```ts
530
507
  import type {
@@ -538,14 +515,14 @@ import type {
538
515
  BookingStatusOnlyRS,
539
516
  BookingFileRQ,
540
517
  BookingFileRS,
541
- } from "aves-sdk";
518
+ } from 'aves-sdk';
542
519
  ```
543
520
 
544
521
  ---
545
522
 
546
523
  ## Caveat operativi (da verificare live)
547
524
 
548
- 1. `DELETE` vs `NULLIFY` — vincoli di stato pratica / documenti / pagamenti.
549
- 2. `selectedPackageDetail` su pratica già con package — replace vs add.
550
- 3. Differenza operativa `cancelBooking` vs status `CANCELED`/`NULLIFIED`.
525
+ 1. `DELETE` vs `NULLIFY` — vincoli di stato pratica / documenti / pagamenti.
526
+ 2. `selectedPackageDetail` su pratica già con package — replace vs add.
527
+ 3. Differenza operativa `cancelBooking` vs status `CANCELED`/`NULLIFIED`.
551
528
  4. Create/search Programma — **non disponibile** in questo SDK; serve doc Catalog/Package Datagest.