@abyss-project/main 1.0.67 → 1.0.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/api/index.d.ts +2 -0
  2. package/dist/api/index.js +2 -0
  3. package/dist/api/short-link.admin.api.d.ts +7 -0
  4. package/dist/api/short-link.admin.api.js +22 -0
  5. package/dist/api/short-link.api.d.ts +4 -7
  6. package/dist/api/short-link.api.js +8 -18
  7. package/dist/api/short-link.public.api.d.ts +8 -0
  8. package/dist/api/short-link.public.api.js +32 -0
  9. package/dist/constants/index.d.ts +1 -0
  10. package/dist/constants/index.js +1 -0
  11. package/dist/constants/short-link.constants.d.ts +8 -0
  12. package/dist/constants/short-link.constants.js +11 -0
  13. package/dist/server-sent-events/index.d.ts +2 -1
  14. package/dist/server-sent-events/index.js +1 -0
  15. package/dist/types/enum/index.d.ts +1 -0
  16. package/dist/types/enum/index.js +1 -0
  17. package/dist/types/enum/user-agent.enum.d.ts +22 -0
  18. package/dist/types/enum/user-agent.enum.js +28 -0
  19. package/dist/types/interface/api/index.d.ts +2 -0
  20. package/dist/types/interface/api/index.js +2 -0
  21. package/dist/types/interface/api/requests/application.admin.request.d.ts +6 -7
  22. package/dist/types/interface/api/requests/application.request.d.ts +6 -7
  23. package/dist/types/interface/api/requests/gift-code.admin.request.d.ts +4 -5
  24. package/dist/types/interface/api/requests/project-access.admin.request.d.ts +10 -11
  25. package/dist/types/interface/api/requests/project-access.request.d.ts +11 -12
  26. package/dist/types/interface/api/requests/project.admin.request.d.ts +5 -6
  27. package/dist/types/interface/api/requests/project.request.d.ts +10 -11
  28. package/dist/types/interface/api/requests/short-link.admin.request.d.ts +4 -1
  29. package/dist/types/interface/api/requests/short-link.public.request.d.ts +33 -0
  30. package/dist/types/interface/api/requests/short-link.public.request.js +2 -0
  31. package/dist/types/interface/api/requests/short-link.request.d.ts +7 -26
  32. package/dist/types/interface/api/requests/user-credit-purchase.admin.request.d.ts +5 -6
  33. package/dist/types/interface/api/requests/user-credit-purchase.request.d.ts +1 -2
  34. package/dist/types/interface/api/requests/user-notification.admin.request.d.ts +3 -4
  35. package/dist/types/interface/api/requests/user-notification.request.d.ts +2 -3
  36. package/dist/types/interface/api/requests/user-ticket.admin.request.d.ts +8 -9
  37. package/dist/types/interface/api/requests/user-ticket.request.d.ts +6 -7
  38. package/dist/types/interface/api/requests/user-transaction.admin.request.d.ts +3 -4
  39. package/dist/types/interface/api/requests/user.admin.request.d.ts +7 -8
  40. package/dist/types/interface/api/requests/user.request.d.ts +2 -3
  41. package/dist/types/interface/api/responses/short-link.admin.response.d.ts +2 -0
  42. package/dist/types/interface/api/responses/short-link.public.response.d.ts +20 -0
  43. package/dist/types/interface/api/responses/short-link.public.response.js +2 -0
  44. package/dist/types/interface/api/responses/short-link.response.d.ts +4 -15
  45. package/dist/types/interface/models/short-link-click.model.d.ts +13 -1
  46. package/dist/types/interface/models/short-link.model.d.ts +16 -0
  47. package/dist/utils/index.d.ts +3 -0
  48. package/dist/utils/index.js +3 -0
  49. package/dist/utils/string.utils.d.ts +6 -0
  50. package/dist/utils/string.utils.js +45 -0
  51. package/dist/utils/tracking.utils.d.ts +11 -0
  52. package/dist/utils/tracking.utils.js +60 -0
  53. package/package.json +1 -1
@@ -1,16 +1,15 @@
1
- import * as core from 'express-serve-static-core';
2
1
  import { QueryPaginate } from '../type-message/base-paginate';
3
2
  import { ProjectStatus, SubscriptionLevel, UserTransactionType } from '../../../enum';
4
- export interface IGetProjectParams extends core.ParamsDictionary {
3
+ export interface IGetProjectParams {
5
4
  projectId: string;
6
5
  }
7
- export interface IGetMetricsProjectParams extends core.ParamsDictionary {
6
+ export interface IGetMetricsProjectParams {
8
7
  projectId: string;
9
8
  }
10
9
  export type IPaginateProjectQuery = {
11
10
  name?: string;
12
11
  } & QueryPaginate;
13
- export interface IPaginateTransactionProjectParams extends core.ParamsDictionary {
12
+ export interface IPaginateTransactionProjectParams {
14
13
  projectId: string;
15
14
  }
16
15
  export type IPaginateTransactionProjectQuery = {
@@ -20,14 +19,14 @@ export type ICreateProjectBody = {
20
19
  name: string;
21
20
  description?: string | null;
22
21
  };
23
- export interface IDeleteProjectParams extends core.ParamsDictionary {
22
+ export interface IDeleteProjectParams {
24
23
  projectId: string;
25
24
  }
26
25
  export interface IDeleteProjectQuery {
27
26
  deleteSpotlightProject?: boolean;
28
27
  deleteForm?: boolean;
29
28
  }
30
- export interface IUpdateProjectParams extends core.ParamsDictionary {
29
+ export interface IUpdateProjectParams {
31
30
  projectId: string;
32
31
  }
33
32
  export type IUpdateProjectBody = {
@@ -35,26 +34,26 @@ export type IUpdateProjectBody = {
35
34
  description?: string | null;
36
35
  status?: ProjectStatus;
37
36
  };
38
- export interface ILeaveProjectParams extends core.ParamsDictionary {
37
+ export interface ILeaveProjectParams {
39
38
  projectId: string;
40
39
  }
41
- export interface ICreateSubscriptionProjectParams extends core.ParamsDictionary {
40
+ export interface ICreateSubscriptionProjectParams {
42
41
  projectId: string;
43
42
  }
44
43
  export interface ICreateSubscriptionProjectBody {
45
44
  level: SubscriptionLevel;
46
45
  isAutoRenewEnabled: boolean;
47
46
  }
48
- export interface IUpdateSubscriptionProjectParams extends core.ParamsDictionary {
47
+ export interface IUpdateSubscriptionProjectParams {
49
48
  projectId: string;
50
49
  }
51
50
  export interface IUpdateSubscriptionProjectBody {
52
51
  isAutoRenewEnabled?: boolean;
53
52
  }
54
- export interface IRenewSubscriptionProjectParams extends core.ParamsDictionary {
53
+ export interface IRenewSubscriptionProjectParams {
55
54
  projectId: string;
56
55
  }
57
- export interface ISetOwnershipProjectParams extends core.ParamsDictionary {
56
+ export interface ISetOwnershipProjectParams {
58
57
  projectId: string;
59
58
  }
60
59
  export interface ISetOwnershipProjectBody {
@@ -22,5 +22,8 @@ export type IUpdateShortLinkAdminBody = {
22
22
  isActive?: boolean;
23
23
  expiresAt?: Date | null;
24
24
  maxClicks?: number | null;
25
- password?: string | null;
26
25
  };
26
+ export type IGetClicksShortLinkAdminParams = {
27
+ shortLinkId: string;
28
+ };
29
+ export type IGetClicksShortLinkAdminQuery = QueryPaginate;
@@ -0,0 +1,33 @@
1
+ import { QueryPaginate } from '../type-message/base-paginate';
2
+ export type ICreateAnonymousShortLinkPublicBody = {
3
+ originalUrl: string;
4
+ title?: string;
5
+ description?: string;
6
+ };
7
+ export type IRedirectShortLinkPublicParams = {
8
+ slug: string;
9
+ };
10
+ export type IRedirectShortLinkPublicQuery = {
11
+ ref?: string;
12
+ lang?: string;
13
+ utmSource?: string;
14
+ utmMedium?: string;
15
+ utmCampaign?: string;
16
+ utmTerm?: string;
17
+ utmContent?: string;
18
+ };
19
+ export type IGetStatsShortLinkPublicParams = {
20
+ shortLinkId: string;
21
+ };
22
+ export type IGetStatsShortLinkPublicQuery = {
23
+ startDate?: Date;
24
+ endDate?: Date;
25
+ groupBy?: 'day' | 'week' | 'month';
26
+ };
27
+ export type IGetClicksShortLinkPublicParams = {
28
+ shortLinkId: string;
29
+ };
30
+ export type IGetClicksShortLinkPublicQuery = QueryPaginate;
31
+ export type IRenewShortLinkPublicParams = {
32
+ shortLinkId: string;
33
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,37 +2,19 @@ import { QueryPaginate } from '../type-message/base-paginate';
2
2
  export type IGetShortLinkParams = {
3
3
  shortLinkId: string;
4
4
  };
5
- export type IGetShortLinkBySlugParams = {
6
- slug: string;
7
- };
8
- export type IValidateShortLinkPasswordBody = {
9
- password: string;
10
- };
11
5
  export type IPaginateShortLinkQuery = {
12
- title?: string;
13
- userId?: string;
14
- projectId?: string;
15
- isActive?: boolean;
16
- } & QueryPaginate;
17
- export type IPaginateUserShortLinkQuery = {
18
6
  title?: string;
19
7
  isActive?: boolean;
20
8
  } & QueryPaginate;
21
9
  export type IPaginateProjectShortLinkParams = {
22
10
  projectId: string;
23
11
  };
24
- export type IPaginateProjectShortLinkQuery = {
25
- title?: string;
26
- isActive?: boolean;
27
- } & QueryPaginate;
28
12
  export type ICreateShortLinkBody = {
29
13
  originalUrl: string;
30
- slug?: string;
31
14
  title?: string;
32
15
  description?: string;
33
16
  expiresAt?: Date;
34
17
  maxClicks?: number;
35
- password?: string;
36
18
  };
37
19
  export type ICreateForProjectShortLinkParams = {
38
20
  projectId: string;
@@ -42,25 +24,24 @@ export type IUpdateShortLinkParams = {
42
24
  };
43
25
  export type IUpdateShortLinkBody = {
44
26
  originalUrl?: string;
45
- slug?: string;
46
27
  title?: string;
47
28
  description?: string;
48
29
  isActive?: boolean;
49
30
  expiresAt?: Date | null;
50
31
  maxClicks?: number | null;
51
- password?: string | null;
52
32
  };
53
33
  export type IDeleteShortLinkParams = {
54
34
  shortLinkId: string;
55
35
  };
56
- export type IGetShortLinkStatsParams = {
36
+ export type IGetStatsShortLinkParams = {
57
37
  shortLinkId: string;
58
38
  };
59
- export type IGetShortLinkStatsQuery = {
60
- startDate?: string;
61
- endDate?: string;
39
+ export type IGetStatsShortLinkQuery = {
40
+ startDate?: Date;
41
+ endDate?: Date;
62
42
  groupBy?: 'day' | 'week' | 'month';
63
43
  };
64
- export type IRedirectShortLinkParams = {
65
- slug: string;
44
+ export type IGetClicksShortLinkParams = {
45
+ shortLinkId: string;
66
46
  };
47
+ export type IGetClicksShortLinkQuery = QueryPaginate;
@@ -1,4 +1,3 @@
1
- import * as core from 'express-serve-static-core';
2
1
  import { QueryPaginate } from '..';
3
2
  import { UserCreditPurchaseCurrency, UserCreditPurchasePaymentMethod, UserCreditPurchasePlatform } from '../../../enum';
4
3
  export type IPaginateUserCreditPurchaseAdminQuery = {
@@ -8,10 +7,10 @@ export type IPaginateUserCreditPurchaseAdminQuery = {
8
7
  userId?: string[];
9
8
  adminId?: string[];
10
9
  } & QueryPaginate;
11
- export interface IGetUserCreditPurchaseAdminParams extends core.ParamsDictionary {
10
+ export interface IGetUserCreditPurchaseAdminParams {
12
11
  userCreditPurchaseId: string;
13
12
  }
14
- export interface ICreateUserCreditPurchaseAdminParams extends core.ParamsDictionary {
13
+ export interface ICreateUserCreditPurchaseAdminParams {
15
14
  userId: string;
16
15
  }
17
16
  export interface ICreateUserCreditPurchaseAdminBody {
@@ -23,7 +22,7 @@ export interface ICreateUserCreditPurchaseAdminBody {
23
22
  creditAmount: number;
24
23
  externalId?: string | null;
25
24
  }
26
- export interface IUpdateUserCreditPurchaseAdminParams extends core.ParamsDictionary {
25
+ export interface IUpdateUserCreditPurchaseAdminParams {
27
26
  userCreditPurchaseId: string;
28
27
  }
29
28
  export interface IUpdateUserCreditPurchaseAdminBody {
@@ -35,9 +34,9 @@ export interface IUpdateUserCreditPurchaseAdminBody {
35
34
  creditAmount?: number;
36
35
  externalId?: string | null;
37
36
  }
38
- export interface IDeleteUserCreditPurchaseAdminParams extends core.ParamsDictionary {
37
+ export interface IDeleteUserCreditPurchaseAdminParams {
39
38
  userCreditPurchaseId: string;
40
39
  }
41
- export interface IRefundUserCreditPurchaseAdminParams extends core.ParamsDictionary {
40
+ export interface IRefundUserCreditPurchaseAdminParams {
42
41
  userCreditPurchaseId: string;
43
42
  }
@@ -1,10 +1,9 @@
1
- import * as core from 'express-serve-static-core';
2
1
  import { QueryPaginate } from '..';
3
2
  import { UserCreditPurchaseCurrency, UserCreditPurchasePlatform } from '../../../enum';
4
3
  export type IPaginateUserCreditPurchaseQuery = {
5
4
  method?: UserCreditPurchasePlatform[];
6
5
  currency?: UserCreditPurchaseCurrency[];
7
6
  } & QueryPaginate;
8
- export interface IGetUserCreditPurchaseParams extends core.ParamsDictionary {
7
+ export interface IGetUserCreditPurchaseParams {
9
8
  creditPurchaseId: string;
10
9
  }
@@ -1,8 +1,7 @@
1
- import * as core from 'express-serve-static-core';
2
1
  import { AbyssService, UserNotificationType } from '../../../enum';
3
2
  import { NotificationDTO } from '../../../utils';
4
3
  import { QueryPaginate } from '../type-message/base-paginate';
5
- export interface IGetUserNotificationAdminParams extends core.ParamsDictionary {
4
+ export interface IGetUserNotificationAdminParams {
6
5
  userNotificationId: string;
7
6
  }
8
7
  export type IPaginateUserNotificationAdminQuery = {
@@ -16,10 +15,10 @@ export type ICreateUserNotificationAdminBody = ({
16
15
  userId: string;
17
16
  type: UserNotificationType;
18
17
  } & NotificationDTO)[];
19
- export interface IDeleteUserNotificationAdminParams extends core.ParamsDictionary {
18
+ export interface IDeleteUserNotificationAdminParams {
20
19
  userNotificationId: string;
21
20
  }
22
- export interface IUpdateUserNotificationAdminParams extends core.ParamsDictionary {
21
+ export interface IUpdateUserNotificationAdminParams {
23
22
  userNotificationId: string;
24
23
  }
25
24
  export type IUpdateUserNotificationAdminBody = Partial<NotificationDTO> & {
@@ -1,7 +1,6 @@
1
- import * as core from 'express-serve-static-core';
2
1
  import { AbyssService, UserNotificationType } from '../../../enum';
3
2
  import { QueryPaginate } from '../type-message/base-paginate';
4
- export interface IGetUserNotificationParams extends core.ParamsDictionary {
3
+ export interface IGetUserNotificationParams {
5
4
  userNotificationId: string;
6
5
  }
7
6
  export type IPaginateUserNotificationQuery = {
@@ -9,6 +8,6 @@ export type IPaginateUserNotificationQuery = {
9
8
  service?: AbyssService[];
10
9
  shouldGetOnlyNew?: boolean;
11
10
  } & QueryPaginate;
12
- export interface IOpenUserNotificationParams extends core.ParamsDictionary {
11
+ export interface IOpenUserNotificationParams {
13
12
  userNotificationId: string;
14
13
  }
@@ -1,7 +1,6 @@
1
- import * as core from 'express-serve-static-core';
2
1
  import { QueryPaginate } from '..';
3
2
  import { AbyssService, UserTicketCategory } from '../../../enum';
4
- export interface IGetUserTicketAdminParams extends core.ParamsDictionary {
3
+ export interface IGetUserTicketAdminParams {
5
4
  userTicketId: string;
6
5
  }
7
6
  export type IPaginateUserTicketAdminQuery = {
@@ -10,7 +9,7 @@ export type IPaginateUserTicketAdminQuery = {
10
9
  category?: UserTicketCategory[];
11
10
  userId?: string[];
12
11
  } & QueryPaginate;
13
- export interface IUpdateUserTicketAdminParams extends core.ParamsDictionary {
12
+ export interface IUpdateUserTicketAdminParams {
14
13
  userTicketId: string;
15
14
  }
16
15
  export interface IUpdateUserTicketAdminBody {
@@ -24,35 +23,35 @@ export interface ICreateUserTicketAdminBody {
24
23
  service: AbyssService;
25
24
  userId: string;
26
25
  }
27
- export interface ICloseUserTicketAdminParams extends core.ParamsDictionary {
26
+ export interface ICloseUserTicketAdminParams {
28
27
  userTicketId: string;
29
28
  }
30
- export interface IPaginateMessageUserTicketAdminParams extends core.ParamsDictionary {
29
+ export interface IPaginateMessageUserTicketAdminParams {
31
30
  userTicketId: string;
32
31
  }
33
32
  export type IPaginateMessageUserTicketAdminQuery = {
34
33
  userTicketId?: string[];
35
34
  userId?: string[];
36
35
  } & QueryPaginate;
37
- export interface IUpdateMessageUserTicketAdminParams extends core.ParamsDictionary {
36
+ export interface IUpdateMessageUserTicketAdminParams {
38
37
  userTicketId: string;
39
38
  userTicketMessageId: string;
40
39
  }
41
40
  export interface IUpdateMessageUserTicketAdminBody {
42
41
  content?: string;
43
42
  }
44
- export interface ICreateMessageUserTicketAdminParams extends core.ParamsDictionary {
43
+ export interface ICreateMessageUserTicketAdminParams {
45
44
  userTicketId: string;
46
45
  }
47
46
  export interface ICreateMessageUserTicketAdminBody {
48
47
  content: string;
49
48
  }
50
- export interface IRemoveAttachmentMessageUserTicketAdminParams extends core.ParamsDictionary {
49
+ export interface IRemoveAttachmentMessageUserTicketAdminParams {
51
50
  userTicketId: string;
52
51
  userTicketMessageId: string;
53
52
  userTicketMessageAttachmentId: string;
54
53
  }
55
- export interface IAddAttachmentMessageUserTicketAdminParams extends core.ParamsDictionary {
54
+ export interface IAddAttachmentMessageUserTicketAdminParams {
56
55
  userTicketId: string;
57
56
  userTicketMessageId: string;
58
57
  }
@@ -1,7 +1,6 @@
1
- import * as core from 'express-serve-static-core';
2
1
  import { QueryPaginate } from '..';
3
2
  import { AbyssService, UserTicketCategory } from '../../../enum';
4
- export interface IGetUserTicketParams extends core.ParamsDictionary {
3
+ export interface IGetUserTicketParams {
5
4
  userTicketId: string;
6
5
  }
7
6
  export type IPaginateUserTicketQuery = {
@@ -9,7 +8,7 @@ export type IPaginateUserTicketQuery = {
9
8
  service?: AbyssService[];
10
9
  category?: UserTicketCategory[];
11
10
  } & QueryPaginate;
12
- export interface IUpdateUserTicketParams extends core.ParamsDictionary {
11
+ export interface IUpdateUserTicketParams {
13
12
  userTicketId: string;
14
13
  }
15
14
  export interface IUpdateUserTicketBody {
@@ -23,25 +22,25 @@ export interface ICreateUserTicketBody {
23
22
  export type IPaginateMessageUserTicketQuery = {
24
23
  userTicketId?: string[];
25
24
  } & QueryPaginate;
26
- export interface IUpdateMessageUserTicketParams extends core.ParamsDictionary {
25
+ export interface IUpdateMessageUserTicketParams {
27
26
  userTicketId: string;
28
27
  userTicketMessageId: string;
29
28
  }
30
29
  export interface IUpdateMessageUserTicketBody {
31
30
  content?: string;
32
31
  }
33
- export interface ICreateMessageUserTicketParams extends core.ParamsDictionary {
32
+ export interface ICreateMessageUserTicketParams {
34
33
  userTicketId: string;
35
34
  }
36
35
  export interface ICreateMessageUserTicketBody {
37
36
  content: string;
38
37
  }
39
- export interface IRemoveAttachmentMessageUserTicketParams extends core.ParamsDictionary {
38
+ export interface IRemoveAttachmentMessageUserTicketParams {
40
39
  userTicketId: string;
41
40
  userTicketMessageId: string;
42
41
  userTicketMessageAttachmentId: string;
43
42
  }
44
- export interface IAddAttachmentMessageUserTicketParams extends core.ParamsDictionary {
43
+ export interface IAddAttachmentMessageUserTicketParams {
45
44
  userTicketId: string;
46
45
  userTicketMessageId: string;
47
46
  }
@@ -1,4 +1,3 @@
1
- import * as core from 'express-serve-static-core';
2
1
  import { UserTransactionType } from '../../../enum';
3
2
  import { QueryPaginate } from '../type-message/base-paginate';
4
3
  export type IPaginateUserTransactionAdminQuery = {
@@ -9,7 +8,7 @@ export type IPaginateUserTransactionAdminQuery = {
9
8
  projectId?: string[];
10
9
  userTransactionId?: string[];
11
10
  } & QueryPaginate;
12
- export interface ICreateUserTransactionAdminParams extends core.ParamsDictionary {
11
+ export interface ICreateUserTransactionAdminParams {
13
12
  userId: string;
14
13
  }
15
14
  export interface ICreateUserTransactionAdminBody {
@@ -19,10 +18,10 @@ export interface ICreateUserTransactionAdminBody {
19
18
  projectId?: string;
20
19
  shouldFailOnNegative?: boolean;
21
20
  }
22
- export interface IDeleteUserTransactionAdminParams extends core.ParamsDictionary {
21
+ export interface IDeleteUserTransactionAdminParams {
23
22
  userTransactionId: string;
24
23
  }
25
- export interface IUpdateUserTransactionAdminParams extends core.ParamsDictionary {
24
+ export interface IUpdateUserTransactionAdminParams {
26
25
  userTransactionId: string;
27
26
  }
28
27
  export interface IUpdateUserTransactionAdminBody {
@@ -1,7 +1,6 @@
1
- import * as core from 'express-serve-static-core';
2
1
  import { QueryPaginate } from '..';
3
2
  import { AbyssService, UserLanguage } from '../../..';
4
- export interface IGetUserAdminParams extends core.ParamsDictionary {
3
+ export interface IGetUserAdminParams {
5
4
  userId: string;
6
5
  }
7
6
  export type IPaginateUserAdminQuery = {
@@ -11,7 +10,7 @@ export type IPaginateUserAdminQuery = {
11
10
  id?: string[];
12
11
  hasJoinedNewsletter?: boolean;
13
12
  } & QueryPaginate;
14
- export interface IUpdateUserAdminParams extends core.ParamsDictionary {
13
+ export interface IUpdateUserAdminParams {
15
14
  userId: string;
16
15
  }
17
16
  export interface IUpdateUserAdminBody {
@@ -24,25 +23,25 @@ export interface IUpdateUserAdminBody {
24
23
  alias?: string;
25
24
  emailVerifiedAt?: Date | null;
26
25
  }
27
- export interface IActivateServiceUserAdminParams extends core.ParamsDictionary {
26
+ export interface IActivateServiceUserAdminParams {
28
27
  userId: string;
29
28
  }
30
29
  export interface IActivateServiceUserAdminQuery {
31
30
  service: Omit<AbyssService, AbyssService.ABYSS | AbyssService.ABYSS_MONITOR | AbyssService.ABYSS_STORAGE>;
32
31
  }
33
- export interface IUpdateSettingsUserAdminParams extends core.ParamsDictionary {
32
+ export interface IUpdateSettingsUserAdminParams {
34
33
  userId: string;
35
34
  }
36
35
  export interface IUpdateSettingsUserAdminBody {
37
36
  language?: UserLanguage;
38
37
  }
39
- export interface IConnectAsAdminUserAdminParams extends core.ParamsDictionary {
38
+ export interface IConnectAsAdminUserAdminParams {
40
39
  userId: string;
41
40
  }
42
- export interface IJoinNewsletterUserAdminParams extends core.ParamsDictionary {
41
+ export interface IJoinNewsletterUserAdminParams {
43
42
  userId: string;
44
43
  }
45
- export interface ILeaveNewsletterUserAdminParams extends core.ParamsDictionary {
44
+ export interface ILeaveNewsletterUserAdminParams {
46
45
  userId: string;
47
46
  }
48
47
  export interface IUnsubscribeNewsletterUserAdminBody {
@@ -2,7 +2,6 @@ import { SubscriptionLevel, UserCreditPurchaseCurrency, UserLanguage } from '../
2
2
  import { TokenHistoryMetadataUserInvitation } from '../../models/token-history.model';
3
3
  import { UserOnboardingStatus } from '../../models/user.model';
4
4
  import { QueryPaginate } from '../type-message/base-paginate';
5
- import * as core from 'express-serve-static-core';
6
5
  export interface ISponsorUserQuery {
7
6
  email: string;
8
7
  }
@@ -41,7 +40,7 @@ export interface IImportProfilePictureFromCollectionUserBody {
41
40
  source: string;
42
41
  elementId: string;
43
42
  }
44
- export interface ICloudSaveUserParams extends core.ParamsDictionary {
43
+ export interface ICloudSaveUserParams {
45
44
  cloudId: string;
46
45
  }
47
46
  export type ICloudSaveUserBody = {
@@ -62,7 +61,7 @@ export type ICloudSaveUserBody = {
62
61
  applicationFileId: string;
63
62
  };
64
63
  });
65
- export interface ICloudImportUserParams extends core.ParamsDictionary {
64
+ export interface ICloudImportUserParams {
66
65
  cloudId: string;
67
66
  }
68
67
  export type ICloudImportUserBody = {
@@ -1,5 +1,6 @@
1
1
  import { BasePaginate, IResponse } from '..';
2
2
  import { IShortLink } from '../../models/short-link.model';
3
+ import { IShortLinkClick } from '../../models/short-link-click.model';
3
4
  export type IPaginateShortLinkAdminResponse = IResponse<BasePaginate<IShortLink>>;
4
5
  export interface IGetShortLinkAdminData {
5
6
  shortLink: IShortLink;
@@ -12,3 +13,4 @@ export interface IUpdateShortLinkAdminData {
12
13
  shortLink: IShortLink;
13
14
  }
14
15
  export type IUpdateShortLinkAdminResponse = IResponse<IUpdateShortLinkAdminData>;
16
+ export type IGetClicksShortLinkAdminResponse = IResponse<BasePaginate<IShortLinkClick>>;
@@ -0,0 +1,20 @@
1
+ import { BasePaginate, IResponse } from '..';
2
+ import { IShortLink, IShortLinkWithStats } from '../../models/short-link.model';
3
+ import { IShortLinkClick } from '../../models/short-link-click.model';
4
+ export interface ICreateShortLinkPublicData {
5
+ shortLink: IShortLink;
6
+ }
7
+ export type ICreateShortLinkPublicResponse = IResponse<ICreateShortLinkPublicData>;
8
+ export interface IRedirectShortLinkPublicData {
9
+ url: string;
10
+ }
11
+ export type IRedirectShortLinkPublicResponse = IResponse<IRedirectShortLinkPublicData>;
12
+ export interface IGetStatsShortLinkPublicData {
13
+ shortLink: IShortLinkWithStats;
14
+ }
15
+ export type IGetStatsShortLinkPublicResponse = IResponse<IGetStatsShortLinkPublicData>;
16
+ export interface IRenewShortLinkPublicData {
17
+ shortLink: IShortLink;
18
+ }
19
+ export type IRenewShortLinkPublicResponse = IResponse<IRenewShortLinkPublicData>;
20
+ export type IGetClicksShortLinkPublicResponse = IResponse<BasePaginate<IShortLinkClick>>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,18 +1,10 @@
1
1
  import { BasePaginate, IResponse } from '..';
2
2
  import { IShortLink, IShortLinkWithStats } from '../../models/short-link.model';
3
+ import { IShortLinkClick } from '../../models/short-link-click.model';
3
4
  export interface IGetShortLinkData {
4
5
  shortLink: IShortLink;
5
6
  }
6
7
  export type IGetShortLinkResponse = IResponse<IGetShortLinkData>;
7
- export interface IGetShortLinkBySlugData {
8
- shortLink: IShortLink;
9
- requiresPassword: boolean;
10
- }
11
- export type IGetShortLinkBySlugResponse = IResponse<IGetShortLinkBySlugData>;
12
- export interface IValidateShortLinkPasswordData {
13
- valid: boolean;
14
- }
15
- export type IValidateShortLinkPasswordResponse = IResponse<IValidateShortLinkPasswordData>;
16
8
  export type IPaginateShortLinkResponse = IResponse<BasePaginate<IShortLink>>;
17
9
  export interface ICreateShortLinkData {
18
10
  shortLink: IShortLink;
@@ -25,11 +17,8 @@ export type IUpdateShortLinkResponse = IResponse<IUpdateShortLinkData>;
25
17
  export interface IDeleteShortLinkData {
26
18
  }
27
19
  export type IDeleteShortLinkResponse = IResponse<IDeleteShortLinkData>;
28
- export interface IGetShortLinkStatsData {
20
+ export interface IGetStatsShortLinkData {
29
21
  shortLink: IShortLinkWithStats;
30
22
  }
31
- export type IGetShortLinkStatsResponse = IResponse<IGetShortLinkStatsData>;
32
- export interface IRedirectShortLinkData {
33
- url: string;
34
- }
35
- export type IRedirectShortLinkResponse = IResponse<IRedirectShortLinkData>;
23
+ export type IGetStatsShortLinkResponse = IResponse<IGetStatsShortLinkData>;
24
+ export type IGetClicksShortLinkResponse = IResponse<BasePaginate<IShortLinkClick>>;
@@ -6,11 +6,23 @@ export interface IShortLinkClick {
6
6
  ipHash: string;
7
7
  userAgent: string | null;
8
8
  referer: string | null;
9
- country: string | null;
9
+ refererDomain: string | null;
10
+ countryCodeIso: string | null;
11
+ countryCode: string | null;
12
+ countryName: string | null;
13
+ continentCode: string | null;
10
14
  city: string | null;
11
15
  device: string | null;
12
16
  browser: string | null;
13
17
  os: string | null;
18
+ language: string | null;
19
+ utmSource: string | null;
20
+ utmMedium: string | null;
21
+ utmCampaign: string | null;
22
+ utmTerm: string | null;
23
+ utmContent: string | null;
24
+ isBotLikely: boolean;
25
+ isReturningVisitor: boolean;
14
26
  clickedAt: Date;
15
27
  createdAt?: Date;
16
28
  updatedAt?: Date;
@@ -33,6 +33,7 @@ export interface IShortLinkWithStats extends IShortLink {
33
33
  clicksByCountry: {
34
34
  country: string;
35
35
  clicks: number;
36
+ countryName: string;
36
37
  }[];
37
38
  clicksByDevice: {
38
39
  device: string;
@@ -46,5 +47,20 @@ export interface IShortLinkWithStats extends IShortLink {
46
47
  referer: string;
47
48
  clicks: number;
48
49
  }[];
50
+ clicksByUtmSource: {
51
+ utmSource: string;
52
+ clicks: number;
53
+ }[];
54
+ clicksByLanguage: {
55
+ language: string;
56
+ clicks: number;
57
+ }[];
58
+ clicksByRefererDomain: {
59
+ refererDomain: string;
60
+ clicks: number;
61
+ }[];
62
+ clicksLast24h: number;
63
+ returningVisitorsCount: number;
64
+ botClicksCount: number;
49
65
  };
50
66
  }
@@ -14,3 +14,6 @@ export * from './file.utils';
14
14
  export * from './compression.utils';
15
15
  export * from './shape.utils';
16
16
  export * from './icons.utils';
17
+ export * from './string.utils';
18
+ export * from './tracking.utils';
19
+ export * from './duration.utils';
@@ -30,3 +30,6 @@ __exportStar(require("./file.utils"), exports);
30
30
  __exportStar(require("./compression.utils"), exports);
31
31
  __exportStar(require("./shape.utils"), exports);
32
32
  __exportStar(require("./icons.utils"), exports);
33
+ __exportStar(require("./string.utils"), exports);
34
+ __exportStar(require("./tracking.utils"), exports);
35
+ __exportStar(require("./duration.utils"), exports);
@@ -0,0 +1,6 @@
1
+ import { UserAgentDevice, UserAgentBrowser, UserAgentOS } from '../types';
2
+ export declare function parseUserAgent(userAgent: string | undefined): {
3
+ device: UserAgentDevice;
4
+ browser: UserAgentBrowser;
5
+ os: UserAgentOS;
6
+ };