|
1 | 1 | import { proxyActivities } from '@temporalio/workflow' |
2 | 2 |
|
3 | | -import * as memberActivities from '../activities/memberMergeSuggestions' |
4 | | -import { ITestMemberOpenSearchResultsArgs } from '../types' |
| 3 | +import * as organizationActivities from '../activities/organizationMergeSuggestions' |
| 4 | +import { ITestOrganizationOpenSearchResultsArgs } from '../types' |
5 | 5 |
|
6 | | -const memberActivitiesProxy = proxyActivities<typeof memberActivities>({ |
| 6 | +const organizationActivitiesProxy = proxyActivities<typeof organizationActivities>({ |
7 | 7 | startToCloseTimeout: '10 minute', |
8 | 8 | }) |
9 | 9 |
|
10 | | -export async function testMemberOpenSearchResults( |
11 | | - args: ITestMemberOpenSearchResultsArgs, |
| 10 | +export async function testOrganizationOpenSearchResults( |
| 11 | + args: ITestOrganizationOpenSearchResultsArgs, |
12 | 12 | ): Promise<void> { |
13 | | - console.log(`Testing OpenSearch results for member: ${args.memberId}`) |
| 13 | + console.log(`Testing OpenSearch results for organization: ${args.organizationId}`) |
14 | 14 |
|
15 | 15 | const DEFAULT_TENANT_ID = '875c38bd-2b1b-4e91-ad07-0cfbabb4c49f' |
16 | 16 |
|
17 | | - // First get the member details |
18 | | - const results = await memberActivitiesProxy.getMembers( |
| 17 | + // First get the organization details |
| 18 | + const results = await organizationActivitiesProxy.getOrganizations( |
19 | 19 | DEFAULT_TENANT_ID, |
20 | 20 | 1, |
21 | 21 | null, |
22 | 22 | null, |
23 | | - args.memberId, |
| 23 | + [args.organizationId], |
24 | 24 | ) |
25 | 25 |
|
26 | 26 | if (results.length === 0) { |
27 | | - console.log('Member not found!') |
| 27 | + console.log('Organization not found!') |
28 | 28 | return |
29 | 29 | } |
30 | 30 |
|
31 | | - const member = results[0] |
32 | | - console.log('Member details:') |
33 | | - console.log(JSON.stringify(member, null, 2)) |
| 31 | + const organization = results[0] |
| 32 | + console.log('Organization details:') |
| 33 | + console.log(JSON.stringify(organization, null, 2)) |
34 | 34 |
|
35 | 35 | // Get merge suggestions for this member |
36 | | - const suggestions = await memberActivitiesProxy.getMemberMergeSuggestions( |
| 36 | + const suggestions = await organizationActivitiesProxy.getOrganizationMergeSuggestions( |
37 | 37 | DEFAULT_TENANT_ID, |
38 | | - member, |
| 38 | + organization, |
39 | 39 | ) |
40 | 40 |
|
41 | 41 | if (suggestions.length === 0) { |
|
0 commit comments