ad2app-lib 1.0.0

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 (140) hide show
  1. package/README.md +37 -0
  2. package/dist/api/apiDriver.d.ts +16 -0
  3. package/dist/api/apiDriver.js +40 -0
  4. package/dist/api/apiUtils.d.ts +0 -0
  5. package/dist/api/apiUtils.js +31 -0
  6. package/dist/api/index.d.ts +2 -0
  7. package/dist/api/index.js +18 -0
  8. package/dist/api/utils.d.ts +7 -0
  9. package/dist/api/utils.js +34 -0
  10. package/dist/types/I_Agency.d.ts +9 -0
  11. package/dist/types/I_Agency.js +12 -0
  12. package/dist/types/I_Campaign.d.ts +76 -0
  13. package/dist/types/I_Campaign.js +176 -0
  14. package/dist/types/I_CampaignCollaborationMethod.d.ts +11 -0
  15. package/dist/types/I_CampaignCollaborationMethod.js +30 -0
  16. package/dist/types/I_CampaignDeadline.d.ts +29 -0
  17. package/dist/types/I_CampaignDeadline.js +80 -0
  18. package/dist/types/I_CampaignGoal.d.ts +11 -0
  19. package/dist/types/I_CampaignGoal.js +30 -0
  20. package/dist/types/I_Influencer.d.ts +37 -0
  21. package/dist/types/I_Influencer.js +87 -0
  22. package/dist/types/I_InfluencersCategories.d.ts +26 -0
  23. package/dist/types/I_InfluencersCategories.js +72 -0
  24. package/dist/types/I_InfluencersLists.d.ts +68 -0
  25. package/dist/types/I_InfluencersLists.js +95 -0
  26. package/dist/types/I_InfluencersProperties.d.ts +40 -0
  27. package/dist/types/I_InfluencersProperties.js +95 -0
  28. package/dist/types/I_Item.d.ts +11 -0
  29. package/dist/types/I_Item.js +17 -0
  30. package/dist/types/I_List.d.ts +8 -0
  31. package/dist/types/I_List.js +11 -0
  32. package/dist/types/I_Offer.d.ts +63 -0
  33. package/dist/types/I_Offer.js +79 -0
  34. package/dist/types/I_PaginatedList.d.ts +10 -0
  35. package/dist/types/I_PaginatedList.js +13 -0
  36. package/dist/types/I_Pagination.d.ts +7 -0
  37. package/dist/types/I_Pagination.js +12 -0
  38. package/dist/types/I_Queue.d.ts +25 -0
  39. package/dist/types/I_Queue.js +54 -0
  40. package/dist/types/I_Report.d.ts +11 -0
  41. package/dist/types/I_Report.js +14 -0
  42. package/dist/types/I_ResponseMessage.d.ts +6 -0
  43. package/dist/types/I_ResponseMessage.js +10 -0
  44. package/dist/types/I_SM_Platform.d.ts +4 -0
  45. package/dist/types/I_SM_Platform.js +8 -0
  46. package/dist/types/I_ScrapperLog.d.ts +15 -0
  47. package/dist/types/I_ScrapperLog.js +9 -0
  48. package/dist/types/I_Scrappers.d.ts +35 -0
  49. package/dist/types/I_Scrappers.js +11 -0
  50. package/dist/types/I_ScrappingAccount.d.ts +10 -0
  51. package/dist/types/I_ScrappingAccount.js +6 -0
  52. package/dist/types/I_ScrappingMachine.d.ts +29 -0
  53. package/dist/types/I_ScrappingMachine.js +46 -0
  54. package/dist/types/I_ScrappingMachineProcess.d.ts +22 -0
  55. package/dist/types/I_ScrappingMachineProcess.js +46 -0
  56. package/dist/types/I_ScrappingServiceMessages.d.ts +31 -0
  57. package/dist/types/I_ScrappingServiceMessages.js +2 -0
  58. package/dist/types/I_TIkTokRaports.d.ts +8 -0
  59. package/dist/types/I_TIkTokRaports.js +38 -0
  60. package/dist/types/I_Tag.d.ts +10 -0
  61. package/dist/types/I_Tag.js +12 -0
  62. package/dist/types/I_TikTokPost.d.ts +45 -0
  63. package/dist/types/I_TikTokPost.js +47 -0
  64. package/dist/types/I_TikTokReport.d.ts +11 -0
  65. package/dist/types/I_TikTokReport.js +14 -0
  66. package/dist/types/I_TikTokUser.d.ts +53 -0
  67. package/dist/types/I_TikTokUser.js +97 -0
  68. package/dist/types/I_User.d.ts +35 -0
  69. package/dist/types/I_User.js +76 -0
  70. package/dist/types/I_UserTikTokStatistic.d.ts +13 -0
  71. package/dist/types/I_UserTikTokStatistic.js +16 -0
  72. package/dist/types/T_FetchStatus.d.ts +1 -0
  73. package/dist/types/T_FetchStatus.js +2 -0
  74. package/dist/types/global.d.ts +9 -0
  75. package/dist/types/global.js +2 -0
  76. package/dist/types/index.d.ts +31 -0
  77. package/dist/types/index.js +47 -0
  78. package/dist/utils/array.d.ts +3 -0
  79. package/dist/utils/array.js +12 -0
  80. package/dist/utils/cookies.d.ts +0 -0
  81. package/dist/utils/cookies.js +13 -0
  82. package/dist/utils/date.d.ts +5 -0
  83. package/dist/utils/date.js +19 -0
  84. package/dist/utils/index.d.ts +6 -0
  85. package/dist/utils/index.js +22 -0
  86. package/dist/utils/promise.d.ts +1 -0
  87. package/dist/utils/promise.js +6 -0
  88. package/dist/utils/string.d.ts +1 -0
  89. package/dist/utils/string.js +5 -0
  90. package/dist/utils/types.d.ts +5 -0
  91. package/dist/utils/types.js +2 -0
  92. package/dist/utils/variable.d.ts +2 -0
  93. package/dist/utils/variable.js +11 -0
  94. package/index.ts +5 -0
  95. package/package.json +41 -0
  96. package/src/api/apiDriver.ts +65 -0
  97. package/src/api/index.ts +2 -0
  98. package/src/api/utils.ts +38 -0
  99. package/src/types/I_Agency.ts +16 -0
  100. package/src/types/I_Campaign.ts +171 -0
  101. package/src/types/I_CampaignCollaborationMethod.ts +20 -0
  102. package/src/types/I_CampaignDeadline.ts +65 -0
  103. package/src/types/I_CampaignGoal.ts +20 -0
  104. package/src/types/I_Influencer.ts +93 -0
  105. package/src/types/I_InfluencersCategories.ts +52 -0
  106. package/src/types/I_InfluencersLists.ts +104 -0
  107. package/src/types/I_InfluencersProperties.ts +83 -0
  108. package/src/types/I_Item.ts +19 -0
  109. package/src/types/I_List.ts +14 -0
  110. package/src/types/I_Offer.ts +105 -0
  111. package/src/types/I_PaginatedList.ts +17 -0
  112. package/src/types/I_Pagination.ts +13 -0
  113. package/src/types/I_Queue.ts +40 -0
  114. package/src/types/I_ResponseMessage.ts +11 -0
  115. package/src/types/I_SM_Platform.ts +4 -0
  116. package/src/types/I_ScrapperLog.ts +17 -0
  117. package/src/types/I_Scrappers.ts +34 -0
  118. package/src/types/I_ScrappingAccount.ts +11 -0
  119. package/src/types/I_ScrappingMachine.ts +47 -0
  120. package/src/types/I_ScrappingMachineProcess.ts +36 -0
  121. package/src/types/I_ScrappingServiceMessages.ts +38 -0
  122. package/src/types/I_TIkTokRaports.ts +20 -0
  123. package/src/types/I_Tag.ts +12 -0
  124. package/src/types/I_TikTokPost.ts +64 -0
  125. package/src/types/I_TikTokReport.ts +20 -0
  126. package/src/types/I_TikTokUser.ts +108 -0
  127. package/src/types/I_User.ts +57 -0
  128. package/src/types/I_UserTikTokStatistic.ts +25 -0
  129. package/src/types/T_FetchStatus.ts +1 -0
  130. package/src/types/global.ts +10 -0
  131. package/src/types/index.ts +31 -0
  132. package/src/utils/array.ts +15 -0
  133. package/src/utils/cookies.ts +16 -0
  134. package/src/utils/date.ts +14 -0
  135. package/src/utils/index.ts +6 -0
  136. package/src/utils/promise.ts +3 -0
  137. package/src/utils/string.ts +1 -0
  138. package/src/utils/types.ts +9 -0
  139. package/src/utils/variable.ts +7 -0
  140. package/tsconfig.json +14 -0
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.I_ConfirmOfferDTO = exports.I_AcceptOfferDTO = exports.I_RejectOfferDTO = exports.I_CreateDraftOfferDTO = exports.I_SendOfferDTO = exports.I_GetOffersDTO = exports.I_OfferStatus = exports.I_Offer = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class I_Offer {
15
+ constructor(data) {
16
+ this.agency = data?.agency ?? null;
17
+ this.influencer = data?.influencer ?? null;
18
+ this.id = data?.id ?? null;
19
+ this.price = data?.price ?? null;
20
+ this.status = data?.status ?? null;
21
+ this.action = data?.action ?? null;
22
+ }
23
+ }
24
+ exports.I_Offer = I_Offer;
25
+ var I_OfferStatus;
26
+ (function (I_OfferStatus) {
27
+ I_OfferStatus["DRAFT"] = "draft";
28
+ I_OfferStatus["SENT"] = "sent";
29
+ I_OfferStatus["DELETED"] = "deleted";
30
+ I_OfferStatus["ACCEPTED"] = "accepted";
31
+ I_OfferStatus["REJECTED"] = "rejected";
32
+ I_OfferStatus["INFLUENCER_NEGOTIATED"] = "influencerNegotiated";
33
+ I_OfferStatus["AGENCY_NEGOTIATED"] = "agencyNegotiated";
34
+ I_OfferStatus["CONFIRMED"] = "confirmed";
35
+ I_OfferStatus["ALTERNATIVE_SUGGESTED"] = "alternativeSuggested";
36
+ })(I_OfferStatus || (exports.I_OfferStatus = I_OfferStatus = {}));
37
+ class I_GetOffersDTO {
38
+ }
39
+ exports.I_GetOffersDTO = I_GetOffersDTO;
40
+ __decorate([
41
+ (0, class_validator_1.IsOptional)(),
42
+ __metadata("design:type", String)
43
+ ], I_GetOffersDTO.prototype, "campaignId", void 0);
44
+ __decorate([
45
+ (0, class_validator_1.IsOptional)(),
46
+ __metadata("design:type", String)
47
+ ], I_GetOffersDTO.prototype, "influencerId", void 0);
48
+ class I_SendOfferDTO {
49
+ constructor(data) {
50
+ this.price = data?.price ?? null;
51
+ this.offerId = data?.offerId ?? null;
52
+ }
53
+ }
54
+ exports.I_SendOfferDTO = I_SendOfferDTO;
55
+ class I_CreateDraftOfferDTO {
56
+ constructor(data) {
57
+ this.influencerId = data.influencerId;
58
+ this.campaignId = data.campaignId;
59
+ }
60
+ }
61
+ exports.I_CreateDraftOfferDTO = I_CreateDraftOfferDTO;
62
+ class I_RejectOfferDTO {
63
+ constructor(data) {
64
+ this.offerId = data?.offerId ?? null;
65
+ }
66
+ }
67
+ exports.I_RejectOfferDTO = I_RejectOfferDTO;
68
+ class I_AcceptOfferDTO {
69
+ constructor(data) {
70
+ this.offerId = data?.offerId ?? null;
71
+ }
72
+ }
73
+ exports.I_AcceptOfferDTO = I_AcceptOfferDTO;
74
+ class I_ConfirmOfferDTO {
75
+ constructor(data) {
76
+ this.offerId = data?.offerId ?? null;
77
+ }
78
+ }
79
+ exports.I_ConfirmOfferDTO = I_ConfirmOfferDTO;
@@ -0,0 +1,10 @@
1
+ import { I_Pagination } from './I_Pagination';
2
+ import { I_ResponseMessage } from './I_ResponseMessage';
3
+ import { T_FetchStatus } from './T_FetchStatus';
4
+ export declare class I_PaginatedList<T> implements I_ResponseMessage {
5
+ items: T[];
6
+ pagination: I_Pagination;
7
+ status: T_FetchStatus;
8
+ message?: string;
9
+ constructor(data?: Partial<I_PaginatedList<T>>);
10
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.I_PaginatedList = void 0;
4
+ const I_Pagination_1 = require("./I_Pagination");
5
+ class I_PaginatedList {
6
+ constructor(data) {
7
+ this.items = data?.items || [];
8
+ this.pagination = data?.pagination || { ...new I_Pagination_1.I_Pagination() };
9
+ this.status = data?.status || 'succeeded';
10
+ this.message = data?.message || '';
11
+ }
12
+ }
13
+ exports.I_PaginatedList = I_PaginatedList;
@@ -0,0 +1,7 @@
1
+ export declare class I_Pagination {
2
+ perPage: number;
3
+ page: number;
4
+ skip: number;
5
+ total: number;
6
+ constructor(data?: Partial<I_Pagination>);
7
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.I_Pagination = void 0;
4
+ class I_Pagination {
5
+ constructor(data) {
6
+ this.perPage = Number(data?.perPage) || 10;
7
+ this.page = Number(data?.page) || 1;
8
+ this.skip = this.page * this.perPage - this.perPage;
9
+ this.total = data?.total || 0;
10
+ }
11
+ }
12
+ exports.I_Pagination = I_Pagination;
@@ -0,0 +1,25 @@
1
+ export declare enum QueueItemTypes {
2
+ TIKTOK_POST = 0,
3
+ TIKTOK_USER = 1
4
+ }
5
+ export declare class I_QueueItem {
6
+ id: string;
7
+ influencer_handle: string;
8
+ priority: number;
9
+ state: number;
10
+ type: QueueItemTypes;
11
+ from: Date;
12
+ to: Date;
13
+ }
14
+ export declare class I_UpdateQueueItemPriorityDTO {
15
+ id: string;
16
+ priority: number;
17
+ }
18
+ export declare class I_QueueItemCreateDTO {
19
+ tikTokUserHandle: string;
20
+ priority: number;
21
+ }
22
+ export declare class I_CreateTikTokHashtagQueueItemDTO {
23
+ hashtagId: string;
24
+ priority: number;
25
+ }
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.I_CreateTikTokHashtagQueueItemDTO = exports.I_QueueItemCreateDTO = exports.I_UpdateQueueItemPriorityDTO = exports.I_QueueItem = exports.QueueItemTypes = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ var QueueItemTypes;
15
+ (function (QueueItemTypes) {
16
+ QueueItemTypes[QueueItemTypes["TIKTOK_POST"] = 0] = "TIKTOK_POST";
17
+ QueueItemTypes[QueueItemTypes["TIKTOK_USER"] = 1] = "TIKTOK_USER";
18
+ })(QueueItemTypes || (exports.QueueItemTypes = QueueItemTypes = {}));
19
+ class I_QueueItem {
20
+ }
21
+ exports.I_QueueItem = I_QueueItem;
22
+ class I_UpdateQueueItemPriorityDTO {
23
+ }
24
+ exports.I_UpdateQueueItemPriorityDTO = I_UpdateQueueItemPriorityDTO;
25
+ __decorate([
26
+ (0, class_validator_1.IsNotEmpty)(),
27
+ __metadata("design:type", String)
28
+ ], I_UpdateQueueItemPriorityDTO.prototype, "id", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsNotEmpty)(),
31
+ __metadata("design:type", Number)
32
+ ], I_UpdateQueueItemPriorityDTO.prototype, "priority", void 0);
33
+ class I_QueueItemCreateDTO {
34
+ }
35
+ exports.I_QueueItemCreateDTO = I_QueueItemCreateDTO;
36
+ __decorate([
37
+ (0, class_validator_1.IsNotEmpty)(),
38
+ __metadata("design:type", String)
39
+ ], I_QueueItemCreateDTO.prototype, "tikTokUserHandle", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsNotEmpty)(),
42
+ __metadata("design:type", Number)
43
+ ], I_QueueItemCreateDTO.prototype, "priority", void 0);
44
+ class I_CreateTikTokHashtagQueueItemDTO {
45
+ }
46
+ exports.I_CreateTikTokHashtagQueueItemDTO = I_CreateTikTokHashtagQueueItemDTO;
47
+ __decorate([
48
+ (0, class_validator_1.IsNotEmpty)(),
49
+ __metadata("design:type", String)
50
+ ], I_CreateTikTokHashtagQueueItemDTO.prototype, "hashtagId", void 0);
51
+ __decorate([
52
+ (0, class_validator_1.IsNotEmpty)(),
53
+ __metadata("design:type", Number)
54
+ ], I_CreateTikTokHashtagQueueItemDTO.prototype, "priority", void 0);
@@ -0,0 +1,11 @@
1
+ import { I_Influencer } from "./I_Influencer";
2
+ import { I_TikTokPost } from "./I_TikTokPost";
3
+ export declare class I_Report {
4
+ influencerId: number;
5
+ data: I_TikTokPost[];
6
+ ad_mean_views: number;
7
+ mean_views: number;
8
+ updatedAt: Date;
9
+ influencer: I_Influencer;
10
+ constructor(data?: I_Report);
11
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.I_Report = void 0;
4
+ class I_Report {
5
+ constructor(data) {
6
+ this.influencerId = data?.influencerId ?? null;
7
+ this.data = data?.data ?? [];
8
+ this.ad_mean_views = data?.ad_mean_views ?? null;
9
+ this.mean_views = data?.mean_views ?? null;
10
+ this.updatedAt = data?.updatedAt ?? null;
11
+ this.influencer = data?.influencer ?? null;
12
+ }
13
+ }
14
+ exports.I_Report = I_Report;
@@ -0,0 +1,6 @@
1
+ import { T_FetchStatus } from './T_FetchStatus';
2
+ export declare class I_ResponseMessage {
3
+ status: T_FetchStatus;
4
+ message?: string;
5
+ constructor(data?: Partial<I_ResponseMessage>);
6
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.I_ResponseMessage = void 0;
4
+ class I_ResponseMessage {
5
+ constructor(data) {
6
+ this.status = data?.status || 'initial';
7
+ this.message = data?.message || '';
8
+ }
9
+ }
10
+ exports.I_ResponseMessage = I_ResponseMessage;
@@ -0,0 +1,4 @@
1
+ export declare enum SMPlatform {
2
+ TIKTOK = "tiktok",
3
+ INSTAGRAM = "instagram"
4
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SMPlatform = void 0;
4
+ var SMPlatform;
5
+ (function (SMPlatform) {
6
+ SMPlatform["TIKTOK"] = "tiktok";
7
+ SMPlatform["INSTAGRAM"] = "instagram";
8
+ })(SMPlatform || (exports.SMPlatform = SMPlatform = {}));
@@ -0,0 +1,15 @@
1
+ import { SMPlatform } from "./I_SM_Platform";
2
+ export declare class I_ScrapperLog {
3
+ handle: string;
4
+ platform: SMPlatform;
5
+ postsScrappedQuantity: number;
6
+ postsPlannedToScrapQuantity: number;
7
+ existingPostsFoundQuantity: number;
8
+ from: Date;
9
+ to: Date;
10
+ canScrapFurther: boolean;
11
+ createdAt: Date;
12
+ }
13
+ export declare class I_FindScrapperLogsDTO {
14
+ handle: string;
15
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.I_FindScrapperLogsDTO = exports.I_ScrapperLog = void 0;
4
+ class I_ScrapperLog {
5
+ }
6
+ exports.I_ScrapperLog = I_ScrapperLog;
7
+ class I_FindScrapperLogsDTO {
8
+ }
9
+ exports.I_FindScrapperLogsDTO = I_FindScrapperLogsDTO;
@@ -0,0 +1,35 @@
1
+ import { Timespan } from "./global";
2
+ import { I_ScrappingAccount } from "./I_ScrappingAccount";
3
+ import { I_ScrappingMachine } from "./I_ScrappingMachine";
4
+ export declare enum ScrapType {
5
+ TT_USERS = 0,
6
+ TT_POSTS = 1,
7
+ CONFIGURE = 2,
8
+ TT_USERS_LOCAL = 3,
9
+ TT_POSTS_BY_HASHTAG = 4
10
+ }
11
+ export type TikTokPostsScrapperArgs = [
12
+ influencer: {
13
+ handle: string;
14
+ },
15
+ job: {
16
+ queueItemId: string;
17
+ scrappingMachine: I_ScrappingMachine;
18
+ },
19
+ {
20
+ timespan: Timespan;
21
+ scrappingAccounts: I_ScrappingAccount[];
22
+ }
23
+ ];
24
+ export type TikTokHashtagScrapperArgs = [
25
+ hashtag: {
26
+ hashtag: string;
27
+ },
28
+ job: {
29
+ queueItemId: string;
30
+ scrappingMachine: I_ScrappingMachine;
31
+ },
32
+ {
33
+ scrappingAccounts: I_ScrappingAccount[];
34
+ }
35
+ ];
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScrapType = void 0;
4
+ var ScrapType;
5
+ (function (ScrapType) {
6
+ ScrapType[ScrapType["TT_USERS"] = 0] = "TT_USERS";
7
+ ScrapType[ScrapType["TT_POSTS"] = 1] = "TT_POSTS";
8
+ ScrapType[ScrapType["CONFIGURE"] = 2] = "CONFIGURE";
9
+ ScrapType[ScrapType["TT_USERS_LOCAL"] = 3] = "TT_USERS_LOCAL";
10
+ ScrapType[ScrapType["TT_POSTS_BY_HASHTAG"] = 4] = "TT_POSTS_BY_HASHTAG";
11
+ })(ScrapType || (exports.ScrapType = ScrapType = {}));
@@ -0,0 +1,10 @@
1
+ import { SMPlatform } from "./I_SM_Platform";
2
+ export declare class I_ScrappingAccount {
3
+ id: string;
4
+ login: string;
5
+ password: string;
6
+ banned: boolean;
7
+ platform: SMPlatform;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.I_ScrappingAccount = void 0;
4
+ class I_ScrappingAccount {
5
+ }
6
+ exports.I_ScrappingAccount = I_ScrappingAccount;
@@ -0,0 +1,29 @@
1
+ import { I_ScrappingMachineProcess } from "./I_ScrappingMachineProcess";
2
+ export declare enum ScrappingMachineState {
3
+ BUSY = "busy",
4
+ PAUSED = "paused",
5
+ IDLE = "idle"
6
+ }
7
+ export declare class I_ScrappingMachine {
8
+ id: string;
9
+ state: ScrappingMachineState;
10
+ tikTokUserLocal: number;
11
+ tikTokPosts: number;
12
+ tikTokUsersFromFollowers: number;
13
+ tikTokPostsByTags: number;
14
+ processes: I_ScrappingMachineProcess[];
15
+ activeJob: string;
16
+ createdAt: Date;
17
+ updatedAt: Date;
18
+ }
19
+ export declare class I_ChangeScrappingMachineConfigurationDTO {
20
+ constructor(data: Partial<I_ChangeScrappingMachineConfigurationDTO>);
21
+ scrappingMachine: I_ScrappingMachine;
22
+ tikTokUserLocal?: number;
23
+ tikTokPosts?: number;
24
+ tikTokUsersFromFollowers?: number;
25
+ tikTokPostsByTags?: number;
26
+ }
27
+ export declare class T_GetScrappingMachineDTO {
28
+ scrappingMachine: I_ScrappingMachine;
29
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.T_GetScrappingMachineDTO = exports.I_ChangeScrappingMachineConfigurationDTO = exports.I_ScrappingMachine = exports.ScrappingMachineState = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const utils_1 = require("../utils");
15
+ var ScrappingMachineState;
16
+ (function (ScrappingMachineState) {
17
+ ScrappingMachineState["BUSY"] = "busy";
18
+ ScrappingMachineState["PAUSED"] = "paused";
19
+ ScrappingMachineState["IDLE"] = "idle";
20
+ })(ScrappingMachineState || (exports.ScrappingMachineState = ScrappingMachineState = {}));
21
+ class I_ScrappingMachine {
22
+ }
23
+ exports.I_ScrappingMachine = I_ScrappingMachine;
24
+ class I_ChangeScrappingMachineConfigurationDTO {
25
+ constructor(data) {
26
+ if (!data)
27
+ return;
28
+ this.scrappingMachine = data.scrappingMachine;
29
+ this.tikTokUserLocal = (0, utils_1.getNumberOrUndefined)(data.tikTokUserLocal);
30
+ this.tikTokPosts = (0, utils_1.getNumberOrUndefined)(data.tikTokPosts);
31
+ this.tikTokUsersFromFollowers = (0, utils_1.getNumberOrUndefined)(data.tikTokUsersFromFollowers);
32
+ this.tikTokPostsByTags = (0, utils_1.getNumberOrUndefined)(data.tikTokPostsByTags);
33
+ }
34
+ }
35
+ exports.I_ChangeScrappingMachineConfigurationDTO = I_ChangeScrappingMachineConfigurationDTO;
36
+ __decorate([
37
+ (0, class_validator_1.IsNotEmpty)(),
38
+ __metadata("design:type", I_ScrappingMachine)
39
+ ], I_ChangeScrappingMachineConfigurationDTO.prototype, "scrappingMachine", void 0);
40
+ class T_GetScrappingMachineDTO {
41
+ }
42
+ exports.T_GetScrappingMachineDTO = T_GetScrappingMachineDTO;
43
+ __decorate([
44
+ (0, class_validator_1.IsNotEmpty)(),
45
+ __metadata("design:type", I_ScrappingMachine)
46
+ ], T_GetScrappingMachineDTO.prototype, "scrappingMachine", void 0);
@@ -0,0 +1,22 @@
1
+ import { ScrapType } from "./I_Scrappers";
2
+ import { I_ScrappingMachine } from "./I_ScrappingMachine";
3
+ export declare class I_ScrappingMachineProcess {
4
+ id: string;
5
+ jobId: string;
6
+ processType: ScrapType;
7
+ createdAt: Date;
8
+ updatedAt: Date;
9
+ }
10
+ export declare class I_CreateScrappingMachineProcessDTO {
11
+ jobId: string;
12
+ scrappingMachine: I_ScrappingMachine;
13
+ processType: number;
14
+ }
15
+ export declare class I_DeleteScrappingMachineProcessDTO {
16
+ jobId: string;
17
+ processType: number;
18
+ }
19
+ export declare class I_UpdateScrappingMachineProcessDTO {
20
+ jobId: string;
21
+ processType: number;
22
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.I_UpdateScrappingMachineProcessDTO = exports.I_DeleteScrappingMachineProcessDTO = exports.I_CreateScrappingMachineProcessDTO = exports.I_ScrappingMachineProcess = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const I_ScrappingMachine_1 = require("./I_ScrappingMachine");
15
+ class I_ScrappingMachineProcess {
16
+ }
17
+ exports.I_ScrappingMachineProcess = I_ScrappingMachineProcess;
18
+ class I_CreateScrappingMachineProcessDTO {
19
+ }
20
+ exports.I_CreateScrappingMachineProcessDTO = I_CreateScrappingMachineProcessDTO;
21
+ __decorate([
22
+ (0, class_validator_1.IsNotEmpty)(),
23
+ __metadata("design:type", I_ScrappingMachine_1.I_ScrappingMachine)
24
+ ], I_CreateScrappingMachineProcessDTO.prototype, "scrappingMachine", void 0);
25
+ class I_DeleteScrappingMachineProcessDTO {
26
+ }
27
+ exports.I_DeleteScrappingMachineProcessDTO = I_DeleteScrappingMachineProcessDTO;
28
+ __decorate([
29
+ (0, class_validator_1.IsNotEmpty)(),
30
+ __metadata("design:type", String)
31
+ ], I_DeleteScrappingMachineProcessDTO.prototype, "jobId", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsNotEmpty)(),
34
+ __metadata("design:type", Number)
35
+ ], I_DeleteScrappingMachineProcessDTO.prototype, "processType", void 0);
36
+ class I_UpdateScrappingMachineProcessDTO {
37
+ }
38
+ exports.I_UpdateScrappingMachineProcessDTO = I_UpdateScrappingMachineProcessDTO;
39
+ __decorate([
40
+ (0, class_validator_1.IsNotEmpty)(),
41
+ __metadata("design:type", String)
42
+ ], I_UpdateScrappingMachineProcessDTO.prototype, "jobId", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsNotEmpty)(),
45
+ __metadata("design:type", Number)
46
+ ], I_UpdateScrappingMachineProcessDTO.prototype, "processType", void 0);
@@ -0,0 +1,31 @@
1
+ import { I_TikTokPost } from "./I_TikTokPost";
2
+ import { I_TikTokUser } from "./I_TikTokUser";
3
+ export type T_OnStartMessageInput = {
4
+ queueItemId: string;
5
+ };
6
+ export type T_OnTikTokScrappingFinishMessageInput = {
7
+ queueItemId: string;
8
+ handle: string;
9
+ postsScrappedQuantity: number;
10
+ postsPlannedToScrapQuantity: number;
11
+ existingPostsFoundQuantity: number;
12
+ firstPost: I_TikTokPost;
13
+ lastPost: I_TikTokPost;
14
+ noMorePosts: boolean;
15
+ };
16
+ export type T_OnTikTokPostsScrappingStartMessageInput = {
17
+ queueItemId: string;
18
+ };
19
+ export type T_ProcessScrappedTikTokUserMessageInput = {
20
+ tikTokUser: I_TikTokUser;
21
+ };
22
+ export type T_ProcessScrappedTikTokPostMessageInput = {
23
+ tikTokUser: I_TikTokUser;
24
+ tikTokPost: I_TikTokPost;
25
+ };
26
+ export type T_ProcessScrappedTikTokPostCommentsMessageInput = {
27
+ tikTokPost: I_TikTokPost;
28
+ };
29
+ export type T_OnTikTokPostsByHashtagScrappingFinishMessageInput = {
30
+ queueItemId: string;
31
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export declare class I_GetPDFTikTokRaportDTO {
2
+ html: string;
3
+ }
4
+ export declare class I_TikTokRaportGetCustomReportDataDTO {
5
+ category: string;
6
+ propertyKey?: string;
7
+ propertyValue?: string;
8
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.I_TikTokRaportGetCustomReportDataDTO = exports.I_GetPDFTikTokRaportDTO = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class I_GetPDFTikTokRaportDTO {
15
+ }
16
+ exports.I_GetPDFTikTokRaportDTO = I_GetPDFTikTokRaportDTO;
17
+ __decorate([
18
+ (0, class_validator_1.IsString)(),
19
+ __metadata("design:type", String)
20
+ ], I_GetPDFTikTokRaportDTO.prototype, "html", void 0);
21
+ class I_TikTokRaportGetCustomReportDataDTO {
22
+ }
23
+ exports.I_TikTokRaportGetCustomReportDataDTO = I_TikTokRaportGetCustomReportDataDTO;
24
+ __decorate([
25
+ (0, class_validator_1.IsNotEmpty)(),
26
+ (0, class_validator_1.IsString)(),
27
+ __metadata("design:type", String)
28
+ ], I_TikTokRaportGetCustomReportDataDTO.prototype, "category", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsOptional)(),
31
+ (0, class_validator_1.IsString)(),
32
+ __metadata("design:type", String)
33
+ ], I_TikTokRaportGetCustomReportDataDTO.prototype, "propertyKey", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsOptional)(),
36
+ (0, class_validator_1.IsString)(),
37
+ __metadata("design:type", String)
38
+ ], I_TikTokRaportGetCustomReportDataDTO.prototype, "propertyValue", void 0);
@@ -0,0 +1,10 @@
1
+ export declare class I_Tag {
2
+ id: string;
3
+ tag: string;
4
+ }
5
+ export declare class I_TagSearchDTO {
6
+ tag: string;
7
+ }
8
+ export declare class I_GetTagDTO {
9
+ tagId: number;
10
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.I_GetTagDTO = exports.I_TagSearchDTO = exports.I_Tag = void 0;
4
+ class I_Tag {
5
+ }
6
+ exports.I_Tag = I_Tag;
7
+ class I_TagSearchDTO {
8
+ }
9
+ exports.I_TagSearchDTO = I_TagSearchDTO;
10
+ class I_GetTagDTO {
11
+ }
12
+ exports.I_GetTagDTO = I_GetTagDTO;