Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export * from './src/base/event/taskManagerItem';
export * from './src/base/event/addons';
export * from './src/base/integrations/integrationToken';
export * from './src/base/project/ProjectTaskManager';
export * from './src/base/utm';
export * from './src/base/workspace/GitHubIntegration';
export * from './src/base/user/GitHubAuthorization';
export * from './src/dbScheme/businessOperation';
Expand Down
1 change: 1 addition & 0 deletions build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ __exportStar(require("./src/base/event/taskManagerItem"), exports);
__exportStar(require("./src/base/event/addons"), exports);
__exportStar(require("./src/base/integrations/integrationToken"), exports);
__exportStar(require("./src/base/project/ProjectTaskManager"), exports);
__exportStar(require("./src/base/utm"), exports);
__exportStar(require("./src/base/workspace/GitHubIntegration"), exports);
__exportStar(require("./src/base/user/GitHubAuthorization"), exports);
__exportStar(require("./src/dbScheme/businessOperation"), exports);
Expand Down
25 changes: 25 additions & 0 deletions build/src/base/utm.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* UTM parameters captured for analytics.
*/
export interface Utm {
/**
* UTM source - identifies which site sent the traffic.
*/
source?: string;
/**
* UTM medium - identifies what type of link was used.
*/
medium?: string;
/**
* UTM campaign - identifies a specific product promotion or strategic campaign.
*/
campaign?: string;
/**
* UTM content - identifies what specifically was clicked to bring the user to the site.
*/
content?: string;
/**
* UTM term - identifies search terms.
*/
term?: string;
}
2 changes: 2 additions & 0 deletions build/src/base/utm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
24 changes: 2 additions & 22 deletions build/src/dbScheme/promoCodeUsage.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ObjectId } from 'bson';
import type { PromoCodeBenefitType } from './promoCode.ts';
import type { Utm } from '../base/utm.ts';
/**
* Promo code usage representation in DataBase
*/
Expand Down Expand Up @@ -43,28 +44,7 @@ export interface PromoCodeUsageDBScheme {
/**
* UTM parameters captured when promo code was applied. Used for analytics purposes
*/
utm?: {
/**
* UTM source - identifies which site sent the traffic
*/
source?: string;
/**
* UTM medium - identifies what type of link was used
*/
medium?: string;
/**
* UTM campaign - identifies a specific product promotion or strategic campaign
*/
campaign?: string;
/**
* UTM content - identifies what specifically was clicked to bring the user to the site
*/
content?: string;
/**
* UTM term - identifies search terms
*/
term?: string;
};
utm?: Utm;
/**
* Date when promo code was successfully applied
* @example 2026-06-10T12:30:00.000Z
Expand Down
24 changes: 2 additions & 22 deletions build/src/dbScheme/user.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { BankCard } from './bankCard.ts';
import type { MembershipDBScheme } from './membership.ts';
import type { UserProjectsLastVisitDBScheme } from './userProjectsLastVisit.ts';
import type { GitHubAuthorization } from '../base/user/GitHubAuthorization.ts';
import type { Utm } from '../base/utm.ts';
/**
* Interface representing how user is stored in DB
*/
Expand Down Expand Up @@ -57,28 +58,7 @@ export interface UserDBScheme {
/**
* UTM parameters from signup - Data form where user went to sign up. Used for analytics purposes
*/
utm?: {
/**
* UTM source - identifies which site sent the traffic
*/
source?: string;
/**
* UTM medium - identifies what type of link was used
*/
medium?: string;
/**
* UTM campaign - identifies a specific product promotion or strategic campaign
*/
campaign?: string;
/**
* UTM content - identifies what specifically was clicked to bring the user to the site
*/
content?: string;
/**
* UTM term - identifies search terms
*/
term?: string;
};
utm?: Utm;
/**
* GitHub OAuth authorizations.
* Used for user-to-server operations (e.g. Copilot assignment).
Expand Down
1 change: 1 addition & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export * from './src/base/event/addons';

export * from './src/base/integrations/integrationToken';
export * from './src/base/project/ProjectTaskManager';
export * from './src/base/utm';
export * from './src/base/workspace/GitHubIntegration';
export * from './src/base/user/GitHubAuthorization';

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hawk.so/types",
"version": "0.6.2",
"version": "0.6.3",
"description": "TypeScript definitions for Hawk",
"types": "build/index.d.ts",
"main": "build/index.js",
Expand Down
29 changes: 29 additions & 0 deletions src/base/utm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
* UTM parameters captured for analytics.
*/
export interface Utm {
/**
* UTM source - identifies which site sent the traffic.
*/
source?: string;

/**
* UTM medium - identifies what type of link was used.
*/
medium?: string;

/**
* UTM campaign - identifies a specific product promotion or strategic campaign.
*/
campaign?: string;

/**
* UTM content - identifies what specifically was clicked to bring the user to the site.
*/
content?: string;

/**
* UTM term - identifies search terms.
*/
term?: string;
}
28 changes: 2 additions & 26 deletions src/dbScheme/promoCodeUsage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ObjectId } from 'bson';
import type { PromoCodeBenefitType } from './promoCode.ts';
import type { Utm } from '../base/utm.ts';

/**
* Promo code usage representation in DataBase
Expand Down Expand Up @@ -53,32 +54,7 @@ export interface PromoCodeUsageDBScheme {
/**
* UTM parameters captured when promo code was applied. Used for analytics purposes
*/
utm?: {
/**
* UTM source - identifies which site sent the traffic
*/
source?: string;

/**
* UTM medium - identifies what type of link was used
*/
medium?: string;

/**
* UTM campaign - identifies a specific product promotion or strategic campaign
*/
campaign?: string;

/**
* UTM content - identifies what specifically was clicked to bring the user to the site
*/
content?: string;

/**
* UTM term - identifies search terms
*/
term?: string;
};
utm?: Utm;

/**
* Date when promo code was successfully applied
Expand Down
28 changes: 2 additions & 26 deletions src/dbScheme/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { BankCard } from './bankCard.ts';
import type { MembershipDBScheme } from './membership.ts';
import type { UserProjectsLastVisitDBScheme } from './userProjectsLastVisit.ts';
import type { GitHubAuthorization } from '../base/user/GitHubAuthorization.ts';
import type { Utm } from '../base/utm.ts';

/**
* Interface representing how user is stored in DB
Expand Down Expand Up @@ -69,32 +70,7 @@ export interface UserDBScheme {
/**
* UTM parameters from signup - Data form where user went to sign up. Used for analytics purposes
*/
utm?: {
/**
* UTM source - identifies which site sent the traffic
*/
source?: string;

/**
* UTM medium - identifies what type of link was used
*/
medium?: string;

/**
* UTM campaign - identifies a specific product promotion or strategic campaign
*/
campaign?: string;

/**
* UTM content - identifies what specifically was clicked to bring the user to the site
*/
content?: string;

/**
* UTM term - identifies search terms
*/
term?: string;
};
utm?: Utm;

/**
* GitHub OAuth authorizations.
Expand Down
Loading