@velaro/cli 1.4.221 → 1.4.222
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/lib/commands/booking.js +11 -0
- package/package.json +1 -1
package/lib/commands/booking.js
CHANGED
|
@@ -358,6 +358,17 @@ export const bookingCommand = {
|
|
|
358
358
|
console.log(JSON.stringify(booking, null, 2));
|
|
359
359
|
}),
|
|
360
360
|
})
|
|
361
|
+
.command({
|
|
362
|
+
command: 'reschedule <id> <new-slot-id>',
|
|
363
|
+
describe: 'Move a booking to another open slot (staff-initiated)',
|
|
364
|
+
builder: y2 => y2
|
|
365
|
+
.positional('id', { type: 'number', describe: 'Booking id' })
|
|
366
|
+
.positional('new-slot-id', { type: 'number', describe: 'Target booking slot id' }),
|
|
367
|
+
handler: runCommand(async argv => {
|
|
368
|
+
const result = await messagingPost(`/Bookings/${argv.id}/reschedule`, { newSlotId: argv.newSlotId });
|
|
369
|
+
console.log(`\n✓ Rescheduled booking id:${result.bookingId} to slot ${result.slotId} (status: ${result.status})\n`);
|
|
370
|
+
}),
|
|
371
|
+
})
|
|
361
372
|
.command({
|
|
362
373
|
command: 'cancel <id>',
|
|
363
374
|
describe: 'Cancel a booking (staff-initiated)',
|
package/package.json
CHANGED