-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
e8d7377
commit 073a078
Showing
15 changed files
with
205 additions
and
307 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,19 @@ | ||
import { | ||
DigitalDomicileType, | ||
PhysicalCommunicationType, | ||
RecipientType, | ||
} from '@pagopa-pn/pn-commons'; | ||
|
||
import { | ||
NewNotification, | ||
NewNotificationDTO, | ||
NewNotificationDigitalAddressType, | ||
NewNotificationDocument, | ||
NewNotificationRecipient, | ||
NotificationFeePolicy, | ||
PaymentModel, | ||
} from '../models/NewNotification'; | ||
import { UserGroup } from '../models/user'; | ||
import { newNotificationMapper } from '../utility/notification.utility'; | ||
import { userResponse } from './Auth.mock'; | ||
import { BffNewNotificationRequest, NotificationDigitalAddressTypeEnum, NotificationDocument, NotificationRecipientV23 } from '../generated-client/notifications'; | ||
|
||
export const newNotificationGroups: Array<UserGroup> = [ | ||
{ | ||
|
@@ -43,7 +42,7 @@ const newNotificationRecipients: Array<NewNotificationRecipient> = [ | |
firstName: 'Mario', | ||
lastName: 'Rossi', | ||
recipientType: RecipientType.PF, | ||
type: DigitalDomicileType.PEC, | ||
type: NewNotificationDigitalAddressType.PEC, | ||
digitalDomicile: '[email protected]', | ||
address: 'via del corso', | ||
addressDetails: '', | ||
|
@@ -61,7 +60,7 @@ const newNotificationRecipients: Array<NewNotificationRecipient> = [ | |
firstName: 'Sara Gallo srl', | ||
lastName: '', | ||
recipientType: RecipientType.PG, | ||
type: DigitalDomicileType.PEC, | ||
type: NewNotificationDigitalAddressType.PEC, | ||
digitalDomicile: '', | ||
address: 'via delle cicale', | ||
addressDetails: '', | ||
|
@@ -74,6 +73,22 @@ const newNotificationRecipients: Array<NewNotificationRecipient> = [ | |
}, | ||
]; | ||
|
||
const newNotificationRecipientsForBff: Array<NotificationRecipientV23> = [ | ||
{ | ||
taxId: 'MRARSS90P08H501Q', | ||
denomination: 'Mario Rossi', | ||
recipientType: RecipientType.PF, | ||
digitalDomicile: {type: NotificationDigitalAddressTypeEnum.Pec,address: '[email protected]'}, | ||
physicalAddress: {address:'via del corso 49', zip: '00122', municipality: 'Roma', province: 'Roma', foreignState: 'Italia'}, | ||
}, | ||
{ | ||
taxId: '12345678901', | ||
denomination: 'Sara Gallo srl', | ||
recipientType: RecipientType.PG, | ||
physicalAddress: {address:'via delle cicale 21', zip: '00035', municipality: 'Anzio', province: 'Roma', foreignState: 'Italia'} | ||
}, | ||
] | ||
|
||
const newNotificationDocuments: Array<NewNotificationDocument> = [ | ||
{ | ||
id: 'mocked-id-0', | ||
|
@@ -115,6 +130,31 @@ const newNotificationDocuments: Array<NewNotificationDocument> = [ | |
}, | ||
]; | ||
|
||
const newNotificationDocumentsForBff: Array<NotificationDocument> = [ | ||
{ | ||
title: 'mocked-name-0', | ||
contentType: 'application/pdf', | ||
digests: { | ||
sha256: 'mocked-sha256-0', | ||
}, | ||
ref: { | ||
key: 'mocked-key-0', | ||
versionToken: 'mocked-versionToken-0', | ||
}, | ||
}, | ||
{ | ||
title: 'mocked-name-1', | ||
contentType: 'application/pdf', | ||
digests: { | ||
sha256: 'mocked-sha256-1', | ||
}, | ||
ref: { | ||
key: 'mocked-key-1', | ||
versionToken: 'mocked-versionToken-1', | ||
}, | ||
}, | ||
]; | ||
|
||
const newNotificationPagoPa: NewNotificationDocument = { | ||
id: 'mocked-pagopa-id', | ||
idx: 0, | ||
|
@@ -190,8 +230,21 @@ export const newNotificationEmpty: NewNotification = { | |
paymentMode: '' as PaymentModel, | ||
group: '', | ||
taxonomyCode: '', | ||
senderTaxId:'', | ||
notificationFeePolicy: '' as NotificationFeePolicy, | ||
senderDenomination: userResponse.organization.name, | ||
}; | ||
|
||
export const newNotificationDTO: NewNotificationDTO = newNotificationMapper(newNotification); | ||
export const newNotificationForBff: BffNewNotificationRequest = { | ||
abstract: '', | ||
paProtocolNumber: '12345678910', | ||
subject: 'Multone esagerato', | ||
recipients: newNotificationRecipientsForBff, | ||
documents: newNotificationDocumentsForBff, | ||
physicalCommunicationType: PhysicalCommunicationType.REGISTERED_LETTER_890, | ||
group: newNotificationGroups[2].id, | ||
taxonomyCode: '010801N', | ||
notificationFeePolicy: NotificationFeePolicy.FLAT_RATE, | ||
senderDenomination: userResponse.organization.name, | ||
senderTaxId: userResponse.organization.fiscal_code, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.