@almatar/smart-booking-dashboard 0.0.2-alpha.2 → 0.0.2-alpha.4

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.
Files changed (58) hide show
  1. package/esm2022/lib/components/almatar-aside/aside.component.mjs +6 -7
  2. package/esm2022/lib/components/hotel-cancel/almatar-hotel-auto-cancellation.component.mjs +17 -12
  3. package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-refund-summary/almatar-hotel-auto-cancellation-refund-summary.component.mjs +9 -3
  4. package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-result-overlay/almatar-hotel-auto-cancellation-result-overlay.component.mjs +210 -0
  5. package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-select-rooms/almatar-hotel-auto-cancellation-select-rooms.component.mjs +3 -3
  6. package/esm2022/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-select-rooms/components/almatar-hotel-auto-cancellation-non-refundable-room/almatar-hotel-auto-cancellation-non-refundable-room.component.mjs +4 -4
  7. package/esm2022/lib/components/hotel-cancel/components/hotel-content/hotel-content.component.mjs +11 -4
  8. package/esm2022/lib/components/hotel-cancel/components/hotel-refund-method-selector/hotel-refund-method-selector.component.mjs +23 -21
  9. package/esm2022/lib/components/hotel-cancel/services/almatar-hotel-auto-cancellation-endpoints.service.mjs +42 -34
  10. package/esm2022/lib/components/reissue-dialog/reissue-dialog.component.mjs +135 -0
  11. package/esm2022/lib/components/reissue-dialog/reissue-upgrade.store.mjs +305 -0
  12. package/esm2022/lib/components/reissue-dialog/reissue.store.mjs +349 -0
  13. package/esm2022/lib/components/reissue-dialog/steps/reissue-date-step/reissue-date-step.component.mjs +45 -0
  14. package/esm2022/lib/components/reissue-dialog/steps/reissue-legs-step/reissue-legs-step.component.mjs +140 -0
  15. package/esm2022/lib/components/reissue-dialog/steps/reissue-notice/reissue-notice.component.mjs +16 -0
  16. package/esm2022/lib/components/reissue-dialog/steps/reissue-route-step/reissue-route-step.component.mjs +104 -0
  17. package/esm2022/lib/components/reissue-dialog/steps/reissue-service-step/reissue-service-step.component.mjs +44 -0
  18. package/esm2022/lib/components/reissue-dialog/steps/reissue-upgrade-confirm-step/reissue-upgrade-confirm-step.component.mjs +193 -0
  19. package/esm2022/lib/components/reissue-dialog/steps/reissue-upgrade-step/reissue-upgrade-step.component.mjs +88 -0
  20. package/esm2022/lib/components/workflow-actions/workflow-actions.component.mjs +5 -3
  21. package/esm2022/lib/config/dashboard.config.mjs +3 -1
  22. package/esm2022/lib/models/reissue.types.mjs +2 -0
  23. package/esm2022/lib/pages/smart-booking-dashboard/smart-booking-dashboard.component.mjs +9 -3
  24. package/esm2022/lib/services/reissue.service.mjs +142 -0
  25. package/esm2022/lib/services/toast.service.mjs +15 -7
  26. package/esm2022/lib/utils/reissue-format.mjs +64 -0
  27. package/esm2022/lib/utils/reissue-url.builder.mjs +314 -0
  28. package/esm2022/public-api.mjs +3 -1
  29. package/fesm2022/almatar-smart-booking-dashboard.mjs +2211 -102
  30. package/fesm2022/almatar-smart-booking-dashboard.mjs.map +1 -1
  31. package/lib/components/action-dialog/action-dialog.component.d.ts +1 -1
  32. package/lib/components/almatar-aside/aside.component.d.ts +1 -2
  33. package/lib/components/hotel-cancel/almatar-hotel-auto-cancellation.component.d.ts +3 -0
  34. package/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-refund-summary/almatar-hotel-auto-cancellation-refund-summary.component.d.ts +1 -0
  35. package/lib/components/hotel-cancel/components/almatar-hotel-auto-cancellation-result-overlay/almatar-hotel-auto-cancellation-result-overlay.component.d.ts +46 -0
  36. package/lib/components/hotel-cancel/components/hotel-content/hotel-content.component.d.ts +2 -1
  37. package/lib/components/hotel-cancel/services/almatar-hotel-auto-cancellation-endpoints.service.d.ts +6 -0
  38. package/lib/components/reissue-dialog/reissue-dialog.component.d.ts +34 -0
  39. package/lib/components/reissue-dialog/reissue-upgrade.store.d.ts +96 -0
  40. package/lib/components/reissue-dialog/reissue.store.d.ts +124 -0
  41. package/lib/components/reissue-dialog/steps/reissue-date-step/reissue-date-step.component.d.ts +11 -0
  42. package/lib/components/reissue-dialog/steps/reissue-legs-step/reissue-legs-step.component.d.ts +16 -0
  43. package/lib/components/reissue-dialog/steps/reissue-notice/reissue-notice.component.d.ts +8 -0
  44. package/lib/components/reissue-dialog/steps/reissue-route-step/reissue-route-step.component.d.ts +21 -0
  45. package/lib/components/reissue-dialog/steps/reissue-service-step/reissue-service-step.component.d.ts +17 -0
  46. package/lib/components/reissue-dialog/steps/reissue-upgrade-confirm-step/reissue-upgrade-confirm-step.component.d.ts +28 -0
  47. package/lib/components/reissue-dialog/steps/reissue-upgrade-step/reissue-upgrade-step.component.d.ts +13 -0
  48. package/lib/components/result-panel/result-panel.component.d.ts +1 -1
  49. package/lib/components/workflow-actions/workflow-actions.component.d.ts +3 -1
  50. package/lib/config/dashboard.config.d.ts +29 -0
  51. package/lib/models/reissue.types.d.ts +147 -0
  52. package/lib/pages/smart-booking-dashboard/smart-booking-dashboard.component.d.ts +4 -1
  53. package/lib/services/reissue.service.d.ts +45 -0
  54. package/lib/services/toast.service.d.ts +14 -1
  55. package/lib/utils/reissue-format.d.ts +28 -0
  56. package/lib/utils/reissue-url.builder.d.ts +24 -0
  57. package/package.json +9 -7
  58. package/public-api.d.ts +5 -1
@@ -12,7 +12,7 @@ export declare class SbdActionDialogComponent {
12
12
  preloadedData: import("@angular/core").InputSignal<any>;
13
13
  closed: import("@angular/core").OutputEmitterRef<void>;
14
14
  selectedAction: import("@angular/core").WritableSignal<ActionConfig>;
15
- actionStatus: import("@angular/core").WritableSignal<"error" | "idle" | "loading" | "success">;
15
+ actionStatus: import("@angular/core").WritableSignal<"error" | "success" | "idle" | "loading">;
16
16
  actionData: import("@angular/core").WritableSignal<unknown>;
17
17
  elapsedMs: import("@angular/core").WritableSignal<number>;
18
18
  copying: import("@angular/core").WritableSignal<boolean>;
@@ -21,7 +21,6 @@ export declare class AsideComponent implements OnInit, OnDestroy {
21
21
  modal: boolean;
22
22
  closable: boolean;
23
23
  transitionOptions: string;
24
- closeIconTemplate: TemplateRef<any>;
25
24
  /**
26
25
  * When true, the dialog's own close (the X, Esc) does NOT hide the aside; it only emits
27
26
  * {@link closeRequested}, so the host can ask for confirmation and close the aside itself.
@@ -43,5 +42,5 @@ export declare class AsideComponent implements OnInit, OnDestroy {
43
42
  onDialogShow(): void;
44
43
  ngOnDestroy(): void;
45
44
  static ɵfac: i0.ɵɵFactoryDeclaration<AsideComponent, [null, null, { optional: true; }]>;
46
- static ɵcmp: i0.ɵɵComponentDeclaration<AsideComponent, "almatar-aside", never, { "asideTitle": { "alias": "asideTitle"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "whiteHeader": { "alias": "whiteHeader"; "required": false; }; "showAside": { "alias": "showAside"; "required": false; }; "width": { "alias": "width"; "required": false; }; "modal": { "alias": "modal"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "transitionOptions": { "alias": "transitionOptions"; "required": false; }; "closeIconTemplate": { "alias": "closeIconTemplate"; "required": false; }; "interceptClose": { "alias": "interceptClose"; "required": false; }; }, { "onClose": "onClose"; "closeRequested": "closeRequested"; }, never, ["*"], true, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<AsideComponent, "almatar-aside", never, { "asideTitle": { "alias": "asideTitle"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "whiteHeader": { "alias": "whiteHeader"; "required": false; }; "showAside": { "alias": "showAside"; "required": false; }; "width": { "alias": "width"; "required": false; }; "modal": { "alias": "modal"; "required": false; }; "closable": { "alias": "closable"; "required": false; }; "transitionOptions": { "alias": "transitionOptions"; "required": false; }; "interceptClose": { "alias": "interceptClose"; "required": false; }; }, { "onClose": "onClose"; "closeRequested": "closeRequested"; }, never, ["*"], true, never>;
47
46
  }
@@ -31,6 +31,8 @@ export declare class AlmatarHotelAutoCancellationComponent implements OnInit, On
31
31
  readonly isNusk: import("@angular/core").WritableSignal<boolean>;
32
32
  readonly showResultOverlay: import("@angular/core").WritableSignal<boolean>;
33
33
  readonly resultOverlayData: import("@angular/core").WritableSignal<ResultOverlayData>;
34
+ readonly showDetailedResultOverlay: import("@angular/core").WritableSignal<boolean>;
35
+ readonly cancellationApiResponse: import("@angular/core").WritableSignal<IAutoCancellationProcessResponse>;
34
36
  readonly rooms: import("@angular/core").WritableSignal<IAlmatarHotelAutoCancellationRoom[]>;
35
37
  readonly packages: import("@angular/core").WritableSignal<IAlmatarHotelAutoCancellationPackage[]>;
36
38
  readonly hotelInfo: import("@angular/core").WritableSignal<IAlmatarHotelAutoCancellationHotelInfo>;
@@ -92,6 +94,7 @@ export declare class AlmatarHotelAutoCancellationComponent implements OnInit, On
92
94
  closeAllModals(): void;
93
95
  onResultOverlayConfirm(): void;
94
96
  onResultOverlayCancel(): void;
97
+ onDetailedResultOverlayDone(): void;
95
98
  static ɵfac: i0.ɵɵFactoryDeclaration<AlmatarHotelAutoCancellationComponent, never>;
96
99
  static ɵcmp: i0.ɵɵComponentDeclaration<AlmatarHotelAutoCancellationComponent, "almatar-hotel-auto-cancellation", never, { "selectedHotelBooking": { "alias": "selectedHotelBooking"; "required": false; "isSignal": true; }; }, { "closed": "closed"; "cancellationSuccess": "cancellationSuccess"; "nonRefundableSubmitSuccess": "nonRefundableSubmitSuccess"; "chatWithAgent": "chatWithAgent"; }, never, never, true, never>;
97
100
  }
@@ -49,6 +49,7 @@ export declare class AlmatarHotelAutoCancellationRefundSummaryComponent implemen
49
49
  basis?: string;
50
50
  }[];
51
51
  readonly packages: import("@angular/core").Signal<IAlmatarHotelAutoCancellationRefundPackage[]>;
52
+ readonly allPackagesCancelled: import("@angular/core").Signal<boolean>;
52
53
  readonly currentRefundRoomsNumber: import("@angular/core").Signal<number>;
53
54
  readonly totalPaid: import("@angular/core").Signal<number>;
54
55
  readonly totalRefund: import("@angular/core").Signal<number>;
@@ -0,0 +1,46 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { RefundPreferredMethod } from '../../../shared/interfaces/i-flight-refund-details';
3
+ import { IAutoCancellationProcessResponse } from '../../services/almatar-hotel-auto-cancellation-endpoints.service';
4
+ import * as i0 from "@angular/core";
5
+ export interface LoyaltySubItem {
6
+ label: string;
7
+ value: number;
8
+ }
9
+ export interface RefundResultRow {
10
+ label: string;
11
+ value: number;
12
+ instant: boolean;
13
+ badgeKey: string;
14
+ isWallet?: boolean;
15
+ isMada?: boolean;
16
+ hasLoyaltyNote?: boolean;
17
+ isInstallment?: boolean;
18
+ loyaltySubItems?: LoyaltySubItem[];
19
+ }
20
+ export declare class AlmatarHotelAutoCancellationResultOverlayComponent implements OnInit {
21
+ private readonly translateService;
22
+ private readonly store;
23
+ private readonly sharedService;
24
+ private readonly destroyRef;
25
+ readonly baseCurrencyCode: import("@angular/core").WritableSignal<string>;
26
+ readonly currentCurrency: import("@angular/core").WritableSignal<any>;
27
+ readonly visible: import("@angular/core").InputSignal<boolean>;
28
+ readonly currencyObj: import("@angular/core").InputSignal<any>;
29
+ readonly refundMethod: import("@angular/core").InputSignal<RefundPreferredMethod>;
30
+ readonly apiResponse: import("@angular/core").InputSignal<IAutoCancellationProcessResponse>;
31
+ readonly done: import("@angular/core").OutputEmitterRef<void>;
32
+ ngOnInit(): void;
33
+ private initCurrency;
34
+ readonly isNilRefund: import("@angular/core").Signal<boolean>;
35
+ readonly displayCurrency: import("@angular/core").Signal<any>;
36
+ readonly refundRows: import("@angular/core").Signal<RefundResultRow[]>;
37
+ private buildRowsFromApiResponse;
38
+ private getLoyaltyPrograms;
39
+ private getLoyaltyProgramLabel;
40
+ private getPaymentMethodLabel;
41
+ isWalletRow(row: RefundResultRow): boolean;
42
+ fmtAmount(value: number | undefined): string;
43
+ onDone(): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlmatarHotelAutoCancellationResultOverlayComponent, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<AlmatarHotelAutoCancellationResultOverlayComponent, "almatar-hotel-auto-cancellation-result-overlay", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "currencyObj": { "alias": "currencyObj"; "required": false; "isSignal": true; }; "refundMethod": { "alias": "refundMethod"; "required": false; "isSignal": true; }; "apiResponse": { "alias": "apiResponse"; "required": false; "isSignal": true; }; }, { "done": "done"; }, never, never, true, never>;
46
+ }
@@ -2,13 +2,14 @@ import { IHotelBookingData } from '../../../../models/booking.types';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class SbdHotelContentComponent {
4
4
  bookingData: import("@angular/core").InputSignal<IHotelBookingData>;
5
- bookingStatus: import("@angular/core").InputSignal<"error" | "idle" | "loading" | "success">;
5
+ bookingStatus: import("@angular/core").InputSignal<"error" | "success" | "idle" | "loading">;
6
6
  bookingId: import("@angular/core").InputSignal<string>;
7
7
  dataVerified: import("@angular/core").InputSignal<boolean>;
8
8
  bookingNotes: import("@angular/core").InputSignal<any[]>;
9
9
  bookingHistory: import("@angular/core").InputSignal<any[]>;
10
10
  historyGroups: import("@angular/core").InputSignal<any[]>;
11
11
  activeContextTab: import("@angular/core").InputSignal<"notes" | "changes">;
12
+ allPackagesCancelled: import("@angular/core").Signal<boolean>;
12
13
  cancelBooking: import("@angular/core").OutputEmitterRef<void>;
13
14
  addNoteRequested: import("@angular/core").OutputEmitterRef<void>;
14
15
  contextTabChanged: import("@angular/core").OutputEmitterRef<"notes" | "changes">;
@@ -52,6 +52,7 @@ export interface IAutoCancellationProcessResponse {
52
52
  }
53
53
  export declare class AlmatarHotelAutoCancellationEndpointsService {
54
54
  private readonly api;
55
+ private readonly apiBase;
55
56
  private readonly route;
56
57
  private readonly hotelManageBookingService;
57
58
  private readonly _almatarBookingId;
@@ -63,6 +64,11 @@ export declare class AlmatarHotelAutoCancellationEndpointsService {
63
64
  readonly isNusukFlow: import("@angular/core").Signal<boolean>;
64
65
  constructor();
65
66
  private initializeBookingData;
67
+ /**
68
+ * Full URL of an endpoint from the enum. The enum paths start with `/api/`, which is the default `apiBase`; a host
69
+ * that serves the API somewhere else (Helix: its own API origin) sets `apiBase`, so that part is swapped for it.
70
+ */
71
+ resolveEndpoint(path: string): string;
66
72
  getRefundDetails(packageIds?: string[]): Observable<IRefundDetailsApiResponse>;
67
73
  mapApiResponseToRooms(data: IRefundDetailsData): IAlmatarHotelAutoCancellationRoom[];
68
74
  mapApiResponseToRefundSummary(data: IRefundDetailsData): IAlmatarHotelAutoCancellationRefundSummary;
@@ -0,0 +1,34 @@
1
+ import { ReissueServiceKey } from '../../models/reissue.types';
2
+ import { SbdReissueStore } from './reissue.store';
3
+ import { SbdReissueUpgradeStore } from './reissue-upgrade.store';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Reissue dialog shell: owns the p-dialog, the loading / error states and the footer, and swaps the step
7
+ * components. All state and rules live in `SbdReissueStore`; the steps only render and emit.
8
+ */
9
+ export declare class SbdReissueDialogComponent {
10
+ protected readonly store: SbdReissueStore;
11
+ protected readonly upgrade: SbdReissueUpgradeStore;
12
+ private readonly config;
13
+ private readonly injector;
14
+ visible: import("@angular/core").InputSignal<boolean>;
15
+ bookingId: import("@angular/core").InputSignal<string>;
16
+ bookingData: import("@angular/core").InputSignal<any>;
17
+ closed: import("@angular/core").OutputEmitterRef<void>;
18
+ /** Header title per screen, like the cancel dialog's "Select Leg to Cancel" / "Refund Method". */
19
+ protected readonly title: import("@angular/core").Signal<"Select Flight to Change" | "Choose New Date" | "Choose New Route" | "Select Flight to Upgrade" | "Choose New Class" | "Review Upgrade" | "Reissue Booking">;
20
+ /** Gray hint above the footer (cancel's "Select at least one flight to continue"), or why Search is disabled. */
21
+ protected readonly hint: import("@angular/core").Signal<string>;
22
+ constructor();
23
+ protected onServiceChosen(service: ReissueServiceKey): void;
24
+ /** Back from the options returns to "select leg" only when that step was shown (the upgrade store knows). */
25
+ protected onBack(): void;
26
+ /** The payment link expired: redo the whole reissue from the start (a new post-booking, the service list again). */
27
+ protected restartFlow(): void;
28
+ /** Redirects to the web search (new tab: the agent keeps the dashboard open next to the web flow). */
29
+ protected searchFlights(): Promise<void>;
30
+ /** The host's auth parameters for the web link; `{}` when it has none or it fails (the web then asks to log in). */
31
+ private redirectAuthParams;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueDialogComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<SbdReissueDialogComponent, "app-sbd-reissue-dialog", never, { "visible": { "alias": "visible"; "required": false; "isSignal": true; }; "bookingId": { "alias": "bookingId"; "required": false; "isSignal": true; }; "bookingData": { "alias": "bookingData"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, never, true, never>;
34
+ }
@@ -0,0 +1,96 @@
1
+ import { ReissuePaymentLink } from '../../models/reissue.types';
2
+ import { ReissueLegRow } from './reissue.store';
3
+ import * as i0 from "@angular/core";
4
+ /** View models for the Upgrade Class steps. */
5
+ export interface UpgradeOptionRow {
6
+ key: string;
7
+ name: string;
8
+ code: string;
9
+ extraLabel: string;
10
+ selected: boolean;
11
+ unavailable: boolean;
12
+ }
13
+ export interface UpgradeSectionRow {
14
+ id: string;
15
+ title: string;
16
+ current: string;
17
+ options: UpgradeOptionRow[];
18
+ }
19
+ export interface UpgradeSummaryRow {
20
+ title: string;
21
+ from: string;
22
+ to: string;
23
+ extraLabel: string;
24
+ }
25
+ /** What the primary button of the confirm step does. */
26
+ export type UpgradeAction = 'book' | 'link' | 'done';
27
+ /**
28
+ * Upgrade Class flow: pick the new class -> price it (choose-flight) -> confirm (book-now when nothing to pay,
29
+ * otherwise a backend-generated payment link). Reads the options the main store already loaded.
30
+ */
31
+ export declare class SbdReissueUpgradeStore {
32
+ private main;
33
+ private api;
34
+ private destroyRef;
35
+ readonly submitting: import("@angular/core").WritableSignal<boolean>;
36
+ readonly error: import("@angular/core").WritableSignal<string>;
37
+ readonly priceChanged: import("@angular/core").WritableSignal<boolean>;
38
+ /** `book-now` succeeded (nothing to pay): the reissue is being placed with the supplier. */
39
+ readonly booked: import("@angular/core").WritableSignal<boolean>;
40
+ readonly paymentLink: import("@angular/core").WritableSignal<ReissuePaymentLink>;
41
+ private selected;
42
+ private unavailableKeys;
43
+ /** Legs the agent chose to upgrade (the "select leg" step; a one-way preselects its only leg). */
44
+ private legIds;
45
+ /** Options fetched for a partial leg selection; `null` = the options loaded when the dialog opened (all legs) apply. */
46
+ private freshOptions;
47
+ private legsStepSkipped;
48
+ constructor();
49
+ readonly currency: import("@angular/core").Signal<string>;
50
+ /** The options to show: for a partial leg selection the fresh response, otherwise the one loaded with the dialog. */
51
+ private options;
52
+ /** A leg can be upgraded only if it is online AND has upgrade options (per leg for leg scope; booking scope applies to all). */
53
+ private legUpgradable;
54
+ readonly legRows: import("@angular/core").Signal<ReissueLegRow[]>;
55
+ readonly anyLegUpgradable: import("@angular/core").Signal<boolean>;
56
+ readonly canContinueFromLegs: import("@angular/core").Signal<boolean>;
57
+ /** Legs the options on screen were requested for (all of them, or just the selected ones after a partial fetch). */
58
+ private optionLegs;
59
+ private rawSections;
60
+ readonly sections: import("@angular/core").Signal<UpgradeSectionRow[]>;
61
+ private picks;
62
+ readonly canContinue: import("@angular/core").Signal<boolean>;
63
+ /**
64
+ * Amount to pay: the sum of the picked options' additional fare (same as the web's `getTotalToPay`).
65
+ * choose-flight's own `price` is deliberately not used — it is not known whether it is the difference or the full fare.
66
+ */
67
+ readonly total: import("@angular/core").Signal<number>;
68
+ readonly totalLabel: import("@angular/core").Signal<string>;
69
+ readonly summary: import("@angular/core").Signal<UpgradeSummaryRow[]>;
70
+ readonly action: import("@angular/core").Signal<UpgradeAction>;
71
+ /** Nothing can be changed any more once the upgrade is placed or a link was generated. */
72
+ readonly locked: import("@angular/core").Signal<boolean>;
73
+ /**
74
+ * Service picked: go to "select leg", unless there is nothing to choose (one-way with its only leg upgradable),
75
+ * which goes straight to the options like the web.
76
+ */
77
+ start(): void;
78
+ toggleLeg(legId: string): void;
79
+ /**
80
+ * Select leg -> options. All legs selected: reuse the options loaded with the dialog. A subset: fetch the options
81
+ * again for just those legs (the earlier response covers the whole booking, so it would price the wrong legs).
82
+ */
83
+ continueFromLegs(): void;
84
+ /** Back from the options: to "select leg" when that step was shown, otherwise to the service list. */
85
+ back(): void;
86
+ select(sectionId: string, key: string): void;
87
+ /** Options -> confirm: prices the pick(s) with choose-flight (same body the web sends). */
88
+ continue(): void;
89
+ /** Confirm step primary action: place the free upgrade, or generate the payment link. */
90
+ confirm(): void;
91
+ private reset;
92
+ /** Booking scope: one itinerary. Leg scope: each picked leg as onwardLeg / returnLeg (by the real leg direction). */
93
+ private chooseBody;
94
+ static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueUpgradeStore, never>;
95
+ static ɵprov: i0.ɵɵInjectableDeclaration<SbdReissueUpgradeStore>;
96
+ }
@@ -0,0 +1,124 @@
1
+ import { ReissueAirport, ReissueLeg, ReissueServiceKey, ReissueUpgradeOptionsResponse } from '../../models/reissue.types';
2
+ import * as i0 from "@angular/core";
3
+ /** `legs` + `edit` serve change date / route; `upgrade-legs` + `upgrade` + `confirm` serve Upgrade Class. */
4
+ export type ReissueStep = 'service' | 'legs' | 'edit' | 'upgrade-legs' | 'upgrade' | 'confirm';
5
+ export type AirportSide = 'origin' | 'destination';
6
+ export interface RouteEdit {
7
+ origin: ReissueAirport;
8
+ destination: ReissueAirport;
9
+ }
10
+ export type AirportOption = ReissueAirport & {
11
+ label: string;
12
+ };
13
+ /** View models: everything the templates need is computed here, so the templates call no methods. */
14
+ export interface ReissueLegRow {
15
+ leg: ReissueLeg;
16
+ direction: string;
17
+ from: string;
18
+ to: string;
19
+ dateLabel: string;
20
+ depTime: string;
21
+ arrTime: string;
22
+ stopsLabel: string;
23
+ airlineLine: string;
24
+ /** The leg already departed ("Used Flight"): never selectable. */
25
+ flown: boolean;
26
+ available: boolean;
27
+ /** Why a leg cannot be picked: it already flew, it is offline (no online reissue), or it has no upgrade options. */
28
+ reason: 'flown' | 'offline' | 'no-options' | null;
29
+ selected: boolean;
30
+ }
31
+ export declare function buildLegRow(leg: ReissueLeg, available: boolean, selected: boolean, unavailableReason?: 'offline' | 'no-options'): ReissueLegRow;
32
+ export interface ReissueDateRow {
33
+ leg: ReissueLeg;
34
+ title: string;
35
+ current: string;
36
+ value: string;
37
+ min: string;
38
+ max: string;
39
+ }
40
+ export interface ReissueRouteRow {
41
+ leg: ReissueLeg;
42
+ title: string;
43
+ current: string;
44
+ origin: ReissueAirport;
45
+ destination: ReissueAirport;
46
+ }
47
+ /**
48
+ * State + rules of the Reissue dialog (one instance per dialog, provided by the dialog component).
49
+ * The step components are presentational: they get view models from here through the dialog shell.
50
+ */
51
+ export declare class SbdReissueStore {
52
+ private api;
53
+ private config;
54
+ readonly today: string;
55
+ private booking;
56
+ readonly step: import("@angular/core").WritableSignal<ReissueStep>;
57
+ readonly loading: import("@angular/core").WritableSignal<boolean>;
58
+ readonly error: import("@angular/core").WritableSignal<string>;
59
+ readonly postBookingId: import("@angular/core").WritableSignal<string>;
60
+ readonly service: import("@angular/core").WritableSignal<ReissueServiceKey>;
61
+ /** Raw upgrade-class response; `null` when not loaded / not offered. Read by `SbdReissueUpgradeStore`. */
62
+ readonly upgradeOptions: import("@angular/core").WritableSignal<ReissueUpgradeOptionsResponse>;
63
+ readonly upgradeAvailable: import("@angular/core").Signal<boolean>;
64
+ private availableIds;
65
+ /** The availability call answered (so "no leg available" is a real answer, not "still loading"). */
66
+ private availabilityLoaded;
67
+ private selectedLegIds;
68
+ /** The "select flight" step was skipped (one-way): Back from the edit step returns to the service list. */
69
+ private legsStepSkipped;
70
+ private dateEdits;
71
+ private routeEdits;
72
+ private searchedAirports;
73
+ private load$;
74
+ private airportTerm$;
75
+ constructor();
76
+ readonly ctx: import("@angular/core").Signal<import("../../models/reissue.types").ReissueBookingContext>;
77
+ readonly legs: import("@angular/core").Signal<ReissueLeg[]>;
78
+ private selectedSet;
79
+ private selectedLegs;
80
+ readonly legRows: import("@angular/core").Signal<ReissueLegRow[]>;
81
+ /** The leg came back online from the availability check. */
82
+ isLegOnline(legId: string): boolean;
83
+ /** `false` = a round trip must be upgraded as a whole (availability's `allowCustomerToSelectSingleLeg`). */
84
+ readonly allowSingleLegSelection: import("@angular/core").WritableSignal<boolean>;
85
+ readonly anyAvailable: import("@angular/core").Signal<boolean>;
86
+ /**
87
+ * No leg can be reissued online (offline, or already flown): the dialog shows this message instead of the options,
88
+ * like the cancel dialog does for a booking it cannot auto-cancel. `null` while loading or when any leg is available.
89
+ */
90
+ readonly blocked: import("@angular/core").Signal<{
91
+ title: string;
92
+ text: string;
93
+ }>;
94
+ readonly canContinue: import("@angular/core").Signal<boolean>;
95
+ /** A leg's date after the change: the new one when the agent is changing it, the original otherwise. */
96
+ readonly dateRows: import("@angular/core").Signal<ReissueDateRow[]>;
97
+ readonly routeRows: import("@angular/core").Signal<ReissueRouteRow[]>;
98
+ readonly airportOptions: import("@angular/core").Signal<AirportOption[]>;
99
+ readonly validationError: import("@angular/core").Signal<string>;
100
+ /** (Re)starts the dialog for a booking: clears every choice, then loads post-booking + availability. */
101
+ open(data: unknown, id: string): void;
102
+ load(): void;
103
+ chooseService(service: ReissueServiceKey): void;
104
+ toggleLeg(legId: string): void;
105
+ /** Legs -> edit: seed each selected leg with its current date / airports. */
106
+ goToEdit(): void;
107
+ goTo(step: ReissueStep): void;
108
+ back(): void;
109
+ setDate(legId: string, date: string): void;
110
+ setAirport(legId: string, side: AirportSide, airport: ReissueAirport | null): void;
111
+ /** Swaps a leg's origin and destination (the arrow between the two pickers). */
112
+ swapAirports(legId: string): void;
113
+ searchAirports(term: string): void;
114
+ /** The web search URL for the current choices, or `null` when they are not valid yet. */
115
+ searchUrl(): string | null;
116
+ private loadFlow;
117
+ /**
118
+ * The upgrade-class options (same rule as the web for listing "Upgrade Class"): skipped for a one-way whose
119
+ * only leg is offline; a failing call just yields `null` (option hidden) instead of blocking the dialog.
120
+ */
121
+ private offersUpgrade;
122
+ static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueStore, never>;
123
+ static ɵprov: i0.ɵɵInjectableDeclaration<SbdReissueStore>;
124
+ }
@@ -0,0 +1,11 @@
1
+ import { ReissueDateRow } from '../../reissue.store';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SbdReissueDateStepComponent {
4
+ rows: import("@angular/core").InputSignal<ReissueDateRow[]>;
5
+ changed: import("@angular/core").OutputEmitterRef<{
6
+ legId: string;
7
+ date: string;
8
+ }>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueDateStepComponent, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<SbdReissueDateStepComponent, "app-sbd-reissue-date-step", never, { "rows": { "alias": "rows"; "required": true; "isSignal": true; }; }, { "changed": "changed"; }, never, never, true, never>;
11
+ }
@@ -0,0 +1,16 @@
1
+ import { ReissueLegRow } from '../../reissue.store';
2
+ import * as i0 from "@angular/core";
3
+ /** Leg cards in the cancel dialog's "Select Leg" design: checkbox overlay, outline badge, times row. */
4
+ export declare class SbdReissueLegsStepComponent {
5
+ rows: import("@angular/core").InputSignal<ReissueLegRow[]>;
6
+ anyAvailable: import("@angular/core").InputSignal<boolean>;
7
+ unavailableText: import("@angular/core").InputSignal<string>;
8
+ /** Extra info line, e.g. "these flights must be upgraded together". */
9
+ note: import("@angular/core").InputSignal<string>;
10
+ error: import("@angular/core").InputSignal<string>;
11
+ toggled: import("@angular/core").OutputEmitterRef<string>;
12
+ /** The note under a disabled leg. */
13
+ protected reasonText(reason: ReissueLegRow['reason']): string;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueLegsStepComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<SbdReissueLegsStepComponent, "app-sbd-reissue-legs-step", never, { "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "anyAvailable": { "alias": "anyAvailable"; "required": false; "isSignal": true; }; "unavailableText": { "alias": "unavailableText"; "required": false; "isSignal": true; }; "note": { "alias": "note"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, { "toggled": "toggled"; }, never, never, true, never>;
16
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ /** Icon + message box used for the info callout, loading / error states and the validation hint. */
3
+ export declare class SbdReissueNoticeComponent {
4
+ icon: import("@angular/core").InputSignal<string>;
5
+ tone: import("@angular/core").InputSignal<"error" | "success" | "info" | "warn" | "muted">;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueNoticeComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<SbdReissueNoticeComponent, "app-sbd-reissue-notice", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "tone": { "alias": "tone"; "required": false; "isSignal": true; }; }, {}, never, ["*", "[action]"], true, never>;
8
+ }
@@ -0,0 +1,21 @@
1
+ import { ReissueAirport } from '../../../../models/reissue.types';
2
+ import { AirportOption, AirportSide, ReissueRouteRow } from '../../reissue.store';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SbdReissueRouteStepComponent {
5
+ rows: import("@angular/core").InputSignal<ReissueRouteRow[]>;
6
+ options: import("@angular/core").InputSignal<AirportOption[]>;
7
+ airportChanged: import("@angular/core").OutputEmitterRef<{
8
+ legId: string;
9
+ side: AirportSide;
10
+ airport: ReissueAirport | null;
11
+ }>;
12
+ searched: import("@angular/core").OutputEmitterRef<string>;
13
+ swapped: import("@angular/core").OutputEmitterRef<string>;
14
+ readonly compare: (a: ReissueAirport, b: ReissueAirport) => boolean;
15
+ readonly sides: {
16
+ key: AirportSide;
17
+ label: string;
18
+ }[];
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueRouteStepComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<SbdReissueRouteStepComponent, "app-sbd-reissue-route-step", never, { "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; }, { "airportChanged": "airportChanged"; "searched": "searched"; "swapped": "swapped"; }, never, never, true, never>;
21
+ }
@@ -0,0 +1,17 @@
1
+ import { ReissueServiceKey } from '../../../../models/reissue.types';
2
+ import * as i0 from "@angular/core";
3
+ interface ServiceOption {
4
+ key: ReissueServiceKey;
5
+ icon: string;
6
+ title: string;
7
+ description: string;
8
+ }
9
+ export declare class SbdReissueServiceStepComponent {
10
+ upgradeAvailable: import("@angular/core").InputSignal<boolean>;
11
+ chosen: import("@angular/core").OutputEmitterRef<ReissueServiceKey>;
12
+ /** Upgrade Class is listed only when the upgrade-class API returned options. */
13
+ protected options: import("@angular/core").Signal<ServiceOption[]>;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueServiceStepComponent, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<SbdReissueServiceStepComponent, "app-sbd-reissue-service-step", never, { "upgradeAvailable": { "alias": "upgradeAvailable"; "required": false; "isSignal": true; }; }, { "chosen": "chosen"; }, never, never, true, never>;
16
+ }
17
+ export {};
@@ -0,0 +1,28 @@
1
+ import { ReissuePaymentLink } from '../../../../models/reissue.types';
2
+ import { UpgradeSummaryRow } from '../../reissue-upgrade.store';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SbdReissueUpgradeConfirmStepComponent {
5
+ rows: import("@angular/core").InputSignal<UpgradeSummaryRow[]>;
6
+ total: import("@angular/core").InputSignal<number>;
7
+ totalLabel: import("@angular/core").InputSignal<string>;
8
+ priceChanged: import("@angular/core").InputSignal<boolean>;
9
+ /** `book-now` was sent. */
10
+ booked: import("@angular/core").InputSignal<boolean>;
11
+ link: import("@angular/core").InputSignal<ReissuePaymentLink>;
12
+ error: import("@angular/core").InputSignal<string>;
13
+ /** The link expired and the agent chose to redo the upgrade from the beginning. */
14
+ restart: import("@angular/core").OutputEmitterRef<void>;
15
+ protected copied: import("@angular/core").WritableSignal<boolean>;
16
+ /** Ticks every second so the countdown (and the expired state) update on their own. */
17
+ private now;
18
+ private remainingMs;
19
+ protected expired: import("@angular/core").Signal<boolean>;
20
+ /** `mm:ss` until the link expires; empty when the backend sent no (valid) expiry. */
21
+ protected countdown: import("@angular/core").Signal<string>;
22
+ /** Last two minutes: highlight the countdown. */
23
+ protected soon: import("@angular/core").Signal<boolean>;
24
+ constructor();
25
+ protected copy(url: string): Promise<void>;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueUpgradeConfirmStepComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<SbdReissueUpgradeConfirmStepComponent, "app-sbd-reissue-upgrade-confirm-step", never, { "rows": { "alias": "rows"; "required": true; "isSignal": true; }; "total": { "alias": "total"; "required": false; "isSignal": true; }; "totalLabel": { "alias": "totalLabel"; "required": false; "isSignal": true; }; "priceChanged": { "alias": "priceChanged"; "required": false; "isSignal": true; }; "booked": { "alias": "booked"; "required": false; "isSignal": true; }; "link": { "alias": "link"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, { "restart": "restart"; }, never, never, true, never>;
28
+ }
@@ -0,0 +1,13 @@
1
+ import { UpgradeSectionRow } from '../../reissue-upgrade.store';
2
+ import * as i0 from "@angular/core";
3
+ /** New-class options as radio cards, in the look of the cancel dialog's refund-method options. */
4
+ export declare class SbdReissueUpgradeStepComponent {
5
+ sections: import("@angular/core").InputSignal<UpgradeSectionRow[]>;
6
+ error: import("@angular/core").InputSignal<string>;
7
+ picked: import("@angular/core").OutputEmitterRef<{
8
+ sectionId: string;
9
+ key: string;
10
+ }>;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SbdReissueUpgradeStepComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<SbdReissueUpgradeStepComponent, "app-sbd-reissue-upgrade-step", never, { "sections": { "alias": "sections"; "required": true; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; }, { "picked": "picked"; }, never, never, true, never>;
13
+ }
@@ -4,7 +4,7 @@ export declare class SbdResultPanelComponent {
4
4
  private toast;
5
5
  actionLabel: import("@angular/core").InputSignal<string>;
6
6
  elapsedMs: import("@angular/core").InputSignal<number>;
7
- status: import("@angular/core").InputSignal<"error" | "idle" | "loading" | "success">;
7
+ status: import("@angular/core").InputSignal<"error" | "success" | "idle" | "loading">;
8
8
  result: import("@angular/core").InputSignal<ResultContent>;
9
9
  feedbackGiven: import("@angular/core").OutputEmitterRef<"up" | "down">;
10
10
  get elapsedSeconds(): string;
@@ -1,7 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class SbdWorkflowActionsComponent {
3
3
  bookingId: import("@angular/core").InputSignal<string>;
4
+ showReissue: import("@angular/core").InputSignal<boolean>;
4
5
  cancelBooking: import("@angular/core").OutputEmitterRef<void>;
6
+ reissue: import("@angular/core").OutputEmitterRef<void>;
5
7
  static ɵfac: i0.ɵɵFactoryDeclaration<SbdWorkflowActionsComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<SbdWorkflowActionsComponent, "app-sbd-workflow-actions", never, { "bookingId": { "alias": "bookingId"; "required": true; "isSignal": true; }; }, { "cancelBooking": "cancelBooking"; }, never, never, true, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<SbdWorkflowActionsComponent, "app-sbd-workflow-actions", never, { "bookingId": { "alias": "bookingId"; "required": true; "isSignal": true; }; "showReissue": { "alias": "showReissue"; "required": false; "isSignal": true; }; }, { "cancelBooking": "cancelBooking"; "reissue": "reissue"; }, never, never, true, never>;
7
9
  }
@@ -1,4 +1,7 @@
1
1
  import { EnvironmentProviders, InjectionToken } from '@angular/core';
2
+ import type { Observable } from 'rxjs';
3
+ /** Query/hash parameters (name -> value) the host adds to the link that opens the consumer web, e.g. its auth token. */
4
+ export type SbdRedirectAuthParams = Record<string, string>;
2
5
  /**
3
6
  * Host-app configuration for the Smart Booking Dashboard.
4
7
  * Every field is optional; the defaults match the Almatar backoffice.
@@ -8,6 +11,32 @@ export interface SbdConfig {
8
11
  apiBase: string;
9
12
  /** Value of the `platform` header sent with FCR requests. Default: 'BO' */
10
13
  platform: string;
14
+ /**
15
+ * Base URL of the consumer web app the Reissue search redirects to, INCLUDING the language/country
16
+ * prefix the web requires, e.g. 'https://prelive-alpha.alm6ar.com/en/sa'. Without the prefix the web answers 404.
17
+ */
18
+ webBaseUrl: string;
19
+ /**
20
+ * Base of the customer payment page, WITHOUT the payment id, e.g. 'https://alpha3.alm6ar.com/en/payment'. The cart
21
+ * returns the link as a path only (`/<paymentId>`); this base is put in front of it to get the URL the agent sends.
22
+ * Not set (default) = a relative link is rejected instead of guessing a host.
23
+ */
24
+ paymentLinkBase?: string;
25
+ /**
26
+ * Auth parameters added to the web link that Change Date / Change Route open, so the web can call its APIs for the
27
+ * agent. The host decides the names and the values, for example Backoffice `{ 'bo-token': token }` and Helix
28
+ * `{ 'x-helix-token': token }`. It runs in an injection context (the host can `inject()` its auth service first) and
29
+ * may return the object, a Promise or an Observable. Not set = nothing is added. If it fails, the web still opens
30
+ * without the token.
31
+ */
32
+ redirectAuthParams?: () => SbdRedirectAuthParams | Promise<SbdRedirectAuthParams> | Observable<SbdRedirectAuthParams>;
33
+ /** Where `redirectAuthParams` go in the URL: the query string (default) or the `#fragment` (not sent to servers). */
34
+ redirectAuthIn?: 'query' | 'hash';
35
+ /**
36
+ * Show the Reissue button. Off by default so upgrading the package does not expose Reissue to agents before the host's
37
+ * backend serves the Reissue APIs; the host turns it on when they are ready.
38
+ */
39
+ reissueEnabled: boolean;
11
40
  }
12
41
  export declare const SBD_DEFAULT_CONFIG: SbdConfig;
13
42
  export declare const SBD_CONFIG: InjectionToken<SbdConfig>;