-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
5901 refactor email and calendar auto contact creation to create them…
- Loading branch information
1 parent
d1bb0fb
commit 4f9527c
Showing
10 changed files
with
83 additions
and
51 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
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
1 change: 1 addition & 0 deletions
1
...t/auto-companies-and-contacts-creation/constants/contacts-creation-batch-size.constant.ts
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export const CONTACTS_CREATION_BATCH_SIZE = 100; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,3 @@ export type Contact = { | |
handle: string; | ||
displayName: string; | ||
}; | ||
|
||
export type Contacts = Contact[]; |
6 changes: 3 additions & 3 deletions
6
...o-companies-and-contacts-creation/utils/__tests__/get-unique-contacts-and-handles.spec.ts
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,17 +1,17 @@ | ||
import { Contacts } from 'src/modules/connected-account/auto-companies-and-contacts-creation/types/contact.type'; | ||
import { Contact } from 'src/modules/connected-account/auto-companies-and-contacts-creation/types/contact.type'; | ||
import { getUniqueContactsAndHandles } from 'src/modules/connected-account/auto-companies-and-contacts-creation/utils/get-unique-contacts-and-handles.util'; | ||
|
||
describe('getUniqueContactsAndHandles', () => { | ||
it('should return empty arrays when contacts is empty', () => { | ||
const contacts: Contacts = []; | ||
const contacts: Contact[] = []; | ||
const result = getUniqueContactsAndHandles(contacts); | ||
|
||
expect(result.uniqueContacts).toEqual([]); | ||
expect(result.uniqueHandles).toEqual([]); | ||
}); | ||
|
||
it('should return unique contacts and handles', () => { | ||
const contacts: Contacts = [ | ||
const contacts: Contact[] = [ | ||
{ handle: '[email protected]', displayName: 'John Doe' }, | ||
{ handle: '[email protected]', displayName: 'John Doe' }, | ||
{ handle: '[email protected]', displayName: 'Jane Smith' }, | ||
|
6 changes: 3 additions & 3 deletions
6
...mpanies-and-contacts-creation/utils/filter-out-contacts-from-company-or-workspace.util.ts
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
6 changes: 3 additions & 3 deletions
6
...ccount/auto-companies-and-contacts-creation/utils/get-unique-contacts-and-handles.util.ts
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