Skip to content

Commit 4e3cbe0

Browse files
committed
feat: tnc connector implementation
1 parent fd9b1c8 commit 4e3cbe0

4 files changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
INSERT INTO "activityTypes" ("activityType", platform, "isCodeContribution", "isCollaboration", description, "label") VALUES
2+
('enrolled-certification', 'tnc', false, false, 'Successful payment purchase of certification enrollment', 'Enrolled in certification'),
3+
('enrolled-training', 'tnc', false, false, 'Successful payment purchase of training enrollment', 'Enrolled in training'),
4+
('issued-certification', 'tnc', false, false, 'User is granted a certification', 'Issued certification'),
5+
('attempted-course', 'tnc', false, false, 'Certification course is completed', 'Attempted course'),
6+
('attempted-exam', 'tnc', false, false, 'Certification exam is completed', 'Attempted exam');

services/libs/integrations/src/integrations/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,6 @@ export * from './groupsio/memberAttributes'
5050

5151
export * from './cvent/types'
5252

53+
export * from './tnc/types'
54+
5355
export * from './activityDisplayService'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { IActivityScoringGrid } from '@crowd/types'
2+
3+
export enum TncActivityType {
4+
ENROLLED_CERTIFICATION = 'enrolled-certification',
5+
ENROLLED_TRAINING = 'enrolled-training',
6+
ISSUED_CERTIFICATION = 'issued-certification',
7+
ATTEMPTED_COURSE = 'attempted-course',
8+
ATTEMPTED_EXAM = 'attempted-exam',
9+
}
10+
11+
export const TNC_GRID: Record<TncActivityType, IActivityScoringGrid> = {
12+
[TncActivityType.ENROLLED_CERTIFICATION]: { score: 1 },
13+
[TncActivityType.ENROLLED_TRAINING]: { score: 1 },
14+
[TncActivityType.ISSUED_CERTIFICATION]: { score: 1 },
15+
[TncActivityType.ATTEMPTED_COURSE]: { score: 1 },
16+
[TncActivityType.ATTEMPTED_EXAM]: { score: 1 },
17+
}

services/libs/types/src/enums/organizations.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export enum OrganizationSource {
1313
GITHUB = 'github',
1414
UI = 'ui',
1515
CVENT = 'cvent',
16+
TNC = 'tnc',
1617
}
1718

1819
export enum OrganizationMergeSuggestionType {
@@ -40,6 +41,7 @@ export enum OrganizationAttributeSource {
4041
ENRICHMENT_LFX_INTERNAL_API = 'enrichment-lfx-internal-api',
4142
ENRICHMENT_PEOPLEDATALABS = 'enrichment-peopledatalabs',
4243
CVENT = 'cvent',
44+
TNC = 'tnc',
4345
// legacy - keeping this for backward compatibility
4446
ENRICHMENT = 'enrichment',
4547
GITHUB = 'github',

0 commit comments

Comments
 (0)