@hmcts/ccpay-web-component 5.0.7-beta22 → 5.0.7-beta23

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 (39) hide show
  1. package/bundles/hmcts-ccpay-web-component.umd.js +204 -6
  2. package/bundles/hmcts-ccpay-web-component.umd.js.map +1 -1
  3. package/bundles/hmcts-ccpay-web-component.umd.min.js +1 -1
  4. package/bundles/hmcts-ccpay-web-component.umd.min.js.map +1 -1
  5. package/esm2015/hmcts-ccpay-web-component.js +3 -2
  6. package/esm2015/lib/components/add-remission/add-remission.component.js +16 -2
  7. package/esm2015/lib/components/notification-preview/notification-preview.component.js +102 -0
  8. package/esm2015/lib/components/payment-view/payment-view.component.js +16 -2
  9. package/esm2015/lib/components/refund-status/refund-status.component.js +16 -2
  10. package/esm2015/lib/components/service-request/service-request.component.js +16 -2
  11. package/esm2015/lib/interfaces/INotificationPreview.js +25 -0
  12. package/esm2015/lib/interfaces/NotificationPreviewRequest.js +71 -0
  13. package/esm2015/lib/payment-lib.module.js +4 -2
  14. package/esm2015/lib/services/notification/notification.service.js +8 -1
  15. package/esm5/hmcts-ccpay-web-component.js +3 -2
  16. package/esm5/lib/components/add-remission/add-remission.component.js +22 -2
  17. package/esm5/lib/components/notification-preview/notification-preview.component.js +104 -0
  18. package/esm5/lib/components/payment-view/payment-view.component.js +22 -2
  19. package/esm5/lib/components/refund-status/refund-status.component.js +22 -2
  20. package/esm5/lib/components/service-request/service-request.component.js +22 -2
  21. package/esm5/lib/interfaces/INotificationPreview.js +25 -0
  22. package/esm5/lib/interfaces/NotificationPreviewRequest.js +65 -0
  23. package/esm5/lib/payment-lib.module.js +4 -2
  24. package/esm5/lib/services/notification/notification.service.js +12 -1
  25. package/fesm2015/hmcts-ccpay-web-component.js +181 -6
  26. package/fesm2015/hmcts-ccpay-web-component.js.map +1 -1
  27. package/fesm5/hmcts-ccpay-web-component.js +203 -6
  28. package/fesm5/hmcts-ccpay-web-component.js.map +1 -1
  29. package/hmcts-ccpay-web-component.d.ts +2 -1
  30. package/hmcts-ccpay-web-component.metadata.json +1 -1
  31. package/lib/components/add-remission/add-remission.component.d.ts +3 -0
  32. package/lib/components/notification-preview/notification-preview.component.d.ts +27 -0
  33. package/lib/components/payment-view/payment-view.component.d.ts +3 -0
  34. package/lib/components/refund-status/refund-status.component.d.ts +3 -0
  35. package/lib/components/service-request/service-request.component.d.ts +3 -0
  36. package/lib/interfaces/INotificationPreview.d.ts +27 -0
  37. package/lib/interfaces/NotificationPreviewRequest.d.ts +24 -0
  38. package/lib/services/notification/notification.service.d.ts +2 -0
  39. package/package.json +1 -1
@@ -122,6 +122,7 @@ export declare class AddRemissionComponent implements OnInit {
122
122
  isStatusAllocated: boolean;
123
123
  isFromCheckAnsPage: boolean;
124
124
  refundAmtForFeeVolumes: number;
125
+ notificationPreview: boolean;
125
126
  component: {
126
127
  account_number: string;
127
128
  amount: number;
@@ -181,4 +182,6 @@ export declare class AddRemissionComponent implements OnInit {
181
182
  resetOrderData(): void;
182
183
  changeRefundAmount(): void;
183
184
  getFormattedCurrency(currency: number): string | number;
185
+ showNotificationPreview(): void;
186
+ hideNotificationPreview(): void;
184
187
  }
@@ -0,0 +1,27 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { IPayment } from '../../interfaces/IPayment';
3
+ import { INotificationPreview } from '../../interfaces/INotificationPreview';
4
+ import { IRefundContactDetails } from '../../interfaces/IRefundContactDetails';
5
+ import { NotificationPreviewRequest } from '../../interfaces/NotificationPreviewRequest';
6
+ import { NotificationService } from '../../services/notification/notification.service';
7
+ import { ErrorHandlerService } from '../../services/shared/error-handler.service';
8
+ export declare class NotificationPreviewComponent implements OnInit {
9
+ private errorHandlerService;
10
+ private notificationService;
11
+ payment: IPayment;
12
+ contactDetails: IRefundContactDetails;
13
+ refundReason: string;
14
+ refundAmount: number;
15
+ paymentReference: string;
16
+ refundReference: string;
17
+ notification: INotificationPreview;
18
+ notificationPreviewRequest: NotificationPreviewRequest;
19
+ today: number;
20
+ errorMessage: {
21
+ title: string;
22
+ body: string;
23
+ showError: any;
24
+ };
25
+ constructor(errorHandlerService: ErrorHandlerService, notificationService: NotificationService);
26
+ ngOnInit(): void;
27
+ }
@@ -64,6 +64,7 @@ export declare class PaymentViewComponent implements OnInit {
64
64
  isConfirmationBtnDisabled: boolean;
65
65
  refundReference: string;
66
66
  refundAmount: string;
67
+ notificationPreview: boolean;
67
68
  constructor(paymentViewService: PaymentViewService, paymentLibComponent: PaymentLibComponent, cd: ChangeDetectorRef, OrderslistService: OrderslistService);
68
69
  ngAfterContentChecked(): void;
69
70
  ngOnInit(): void;
@@ -91,4 +92,6 @@ export declare class PaymentViewComponent implements OnInit {
91
92
  resetOrderData(): void;
92
93
  goToPaymentFailuePage(payment: any): void;
93
94
  goBackToPaymentView(event: any): void;
95
+ showNotificationPreview(): void;
96
+ hideNotificationPreview(): void;
94
97
  }
@@ -66,6 +66,7 @@ export declare class RefundStatusComponent implements OnInit {
66
66
  changeRefundReason: string;
67
67
  fees: IFee[];
68
68
  refundFees: IRefundFee[];
69
+ notificationPreview: boolean;
69
70
  allowedRolesToAccessRefund: string[];
70
71
  constructor(formBuilder: FormBuilder, refundService: RefundsService, notificationService: NotificationService, paymentLibComponent: PaymentLibComponent, OrderslistService: OrderslistService, paymentViewService: PaymentViewService);
71
72
  ngOnInit(): void;
@@ -94,4 +95,6 @@ export declare class RefundStatusComponent implements OnInit {
94
95
  putResend(notification: IRefundsNotifications): void;
95
96
  gotoCasetransationPageCancelBtnClicked(Event: Event): void;
96
97
  goToRefundProcessComponent(refundReference: string, refundList: IRefundList): void;
98
+ showNotificationPreview(): void;
99
+ hideNotificationPreview(): void;
97
100
  }
@@ -97,6 +97,7 @@ export declare class ServiceRequestComponent implements OnInit {
97
97
  remissionFeeAmt: number;
98
98
  isContinueBtnDisabled: boolean;
99
99
  isFullyRefund: boolean;
100
+ notificationPreview: boolean;
100
101
  constructor(paymentLibComponent: PaymentLibComponent, paymentViewService: PaymentViewService, OrderslistService: OrderslistService, cd: ChangeDetectorRef, router: Router);
101
102
  ngOnInit(): void;
102
103
  goToServiceRequestPage(): void;
@@ -120,4 +121,6 @@ export declare class ServiceRequestComponent implements OnInit {
120
121
  gotoAddressPage(note?: IRefundContactDetails): void;
121
122
  processRefund(): void;
122
123
  getOverPaymentValue(): number;
124
+ showNotificationPreview(): void;
125
+ hideNotificationPreview(): void;
123
126
  }
@@ -0,0 +1,27 @@
1
+ export interface INotificationPreview {
2
+ template_id: string;
3
+ template_type: string;
4
+ from: {
5
+ from_email_address: string;
6
+ from_mail_address: {
7
+ address_line: string;
8
+ city: string;
9
+ county: string;
10
+ country: string;
11
+ postal_code: String;
12
+ };
13
+ };
14
+ recipient_contact: {
15
+ recipient_email_address: string;
16
+ recipient_mail_address: {
17
+ address_line: string;
18
+ city: string;
19
+ county: string;
20
+ country: string;
21
+ postal_code: String;
22
+ };
23
+ };
24
+ subject: string;
25
+ body: string;
26
+ html: string;
27
+ }
@@ -0,0 +1,24 @@
1
+ import { IPayment } from './IPayment';
2
+ import { IRefundContactDetails } from './IRefundContactDetails';
3
+ export declare class NotificationPreviewRequest {
4
+ notification_type?: string;
5
+ payment_channel?: string;
6
+ payment_method?: string;
7
+ payment_reference?: string;
8
+ personalisation?: {
9
+ ccd_case_number?: string;
10
+ refund_amount?: number;
11
+ refund_reason?: string;
12
+ refund_reference?: string;
13
+ };
14
+ recipient_email_address?: string;
15
+ recipient_postal_address?: {
16
+ address_line?: string;
17
+ city?: string;
18
+ county?: string;
19
+ country?: string;
20
+ postal_code?: String;
21
+ };
22
+ service_name?: string;
23
+ constructor(payment: IPayment, contactDetails: IRefundContactDetails, refund_reason: string, refund_amount: number, refund_reference: string, payment_reference: string);
24
+ }
@@ -4,6 +4,7 @@ import { WebComponentHttpClient } from '../shared/httpclient/webcomponent.http.c
4
4
  import { PaymentLibService } from '../../payment-lib.service';
5
5
  import { Observable } from 'rxjs/Observable';
6
6
  import { IRefundsNotifications } from '../../interfaces/IRefundsNotifications';
7
+ import { NotificationPreviewRequest } from '../../interfaces/NotificationPreviewRequest';
7
8
  export declare class NotificationService {
8
9
  private http;
9
10
  private https;
@@ -12,4 +13,5 @@ export declare class NotificationService {
12
13
  constructor(http: HttpClient, https: WebComponentHttpClient, errorHandlerService: ErrorHandlerService, paymentLibService: PaymentLibService);
13
14
  getRefundNotification(reference: string): Observable<IRefundsNotifications>;
14
15
  getAddressByPostcode(postcode: string): Observable<any>;
16
+ getNotificationPreview(body: NotificationPreviewRequest): Observable<any>;
15
17
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmcts/ccpay-web-component",
3
- "version": "5.0.7-beta22",
3
+ "version": "5.0.7-beta23",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },