@wrcb/cb-common 1.0.815 → 1.0.817
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.
- package/build/events/social-media-automator/index.d.ts +8 -0
- package/build/events/social-media-automator/index.js +24 -0
- package/build/events/social-media-automator/smaPostFailedEvent.d.ts +13 -0
- package/build/events/social-media-automator/smaPostFailedEvent.js +2 -0
- package/build/events/social-media-automator/smaPostFailedPublisher.d.ts +6 -0
- package/build/events/social-media-automator/smaPostFailedPublisher.js +12 -0
- package/build/events/social-media-automator/smaPostPublishedEvent.d.ts +16 -0
- package/build/events/social-media-automator/smaPostPublishedEvent.js +2 -0
- package/build/events/social-media-automator/smaPostPublishedPublisher.d.ts +6 -0
- package/build/events/social-media-automator/smaPostPublishedPublisher.js +12 -0
- package/build/events/social-media-automator/smaTopicApprovedEvent.d.ts +19 -0
- package/build/events/social-media-automator/smaTopicApprovedEvent.js +2 -0
- package/build/events/social-media-automator/smaTopicApprovedPublisher.d.ts +6 -0
- package/build/events/social-media-automator/smaTopicApprovedPublisher.js +12 -0
- package/build/events/social-media-automator/smaVideoReadyEvent.d.ts +15 -0
- package/build/events/social-media-automator/smaVideoReadyEvent.js +2 -0
- package/build/events/social-media-automator/smaVideoReadyPublisher.d.ts +6 -0
- package/build/events/social-media-automator/smaVideoReadyPublisher.js +12 -0
- package/build/events/subjects.d.ts +5 -1
- package/build/events/subjects.js +5 -0
- package/build/index.d.ts +4 -0
- package/build/index.js +5 -0
- package/build/services/TenantDataService.js +44 -0
- package/build/types/socialMediaAutomator.d.ts +5 -0
- package/build/types/socialMediaAutomator.js +2 -0
- package/build/types/tenant.d.ts +2 -1
- package/build/types/tenant.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './smaTopicApprovedEvent';
|
|
2
|
+
export * from './smaVideoReadyEvent';
|
|
3
|
+
export * from './smaPostPublishedEvent';
|
|
4
|
+
export * from './smaPostFailedEvent';
|
|
5
|
+
export * from './smaTopicApprovedPublisher';
|
|
6
|
+
export * from './smaVideoReadyPublisher';
|
|
7
|
+
export * from './smaPostPublishedPublisher';
|
|
8
|
+
export * from './smaPostFailedPublisher';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./smaTopicApprovedEvent"), exports);
|
|
18
|
+
__exportStar(require("./smaVideoReadyEvent"), exports);
|
|
19
|
+
__exportStar(require("./smaPostPublishedEvent"), exports);
|
|
20
|
+
__exportStar(require("./smaPostFailedEvent"), exports);
|
|
21
|
+
__exportStar(require("./smaTopicApprovedPublisher"), exports);
|
|
22
|
+
__exportStar(require("./smaVideoReadyPublisher"), exports);
|
|
23
|
+
__exportStar(require("./smaPostPublishedPublisher"), exports);
|
|
24
|
+
__exportStar(require("./smaPostFailedPublisher"), exports);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
import { SMAContentType } from '../../types/socialMediaAutomator';
|
|
3
|
+
export interface SMAPostFailedEvent {
|
|
4
|
+
subject: Subjects.SMAPostFailed;
|
|
5
|
+
data: {
|
|
6
|
+
topicId: string;
|
|
7
|
+
accountId: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
contentType: SMAContentType;
|
|
10
|
+
/** Descrição do erro que causou a falha */
|
|
11
|
+
reason: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { SMAPostFailedEvent } from './smaPostFailedEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class SMAPostFailedPublisher extends Publisher<SMAPostFailedEvent> {
|
|
5
|
+
subject: Subjects.SMAPostFailed;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMAPostFailedPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class SMAPostFailedPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.SMAPostFailed;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.SMAPostFailedPublisher = SMAPostFailedPublisher;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
import { SMAContentType } from '../../types/socialMediaAutomator';
|
|
3
|
+
export interface SMAPostPublishedEvent {
|
|
4
|
+
subject: Subjects.SMAPostPublished;
|
|
5
|
+
data: {
|
|
6
|
+
topicId: string;
|
|
7
|
+
accountId: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
/** ID do post no Instagram */
|
|
10
|
+
instagramPostId: string;
|
|
11
|
+
/** URL pública do post */
|
|
12
|
+
postUrl: string;
|
|
13
|
+
contentType: SMAContentType;
|
|
14
|
+
publishedAt: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { SMAPostPublishedEvent } from './smaPostPublishedEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class SMAPostPublishedPublisher extends Publisher<SMAPostPublishedEvent> {
|
|
5
|
+
subject: Subjects.SMAPostPublished;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMAPostPublishedPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class SMAPostPublishedPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.SMAPostPublished;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.SMAPostPublishedPublisher = SMAPostPublishedPublisher;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
import { SMAContentType } from '../../types/socialMediaAutomator';
|
|
3
|
+
export interface SMATopicApprovedEvent {
|
|
4
|
+
subject: Subjects.SMATopicApproved;
|
|
5
|
+
data: {
|
|
6
|
+
/** ID do tópico no sistema */
|
|
7
|
+
topicId: string;
|
|
8
|
+
/** ID da conta Instagram no sistema */
|
|
9
|
+
accountId: string;
|
|
10
|
+
/** ID do dono da conta (usuário do sistema) */
|
|
11
|
+
userId: string;
|
|
12
|
+
/** Título/tema do tópico aprovado */
|
|
13
|
+
topic: string;
|
|
14
|
+
/** Tipo de conteúdo a ser gerado */
|
|
15
|
+
contentType: SMAContentType;
|
|
16
|
+
/** Data/hora de publicação agendada (ISO 8601), se já definida */
|
|
17
|
+
scheduledFor?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { SMATopicApprovedEvent } from './smaTopicApprovedEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class SMATopicApprovedPublisher extends Publisher<SMATopicApprovedEvent> {
|
|
5
|
+
subject: Subjects.SMATopicApproved;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMATopicApprovedPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class SMATopicApprovedPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.SMATopicApproved;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.SMATopicApprovedPublisher = SMATopicApprovedPublisher;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Subjects } from '../subjects';
|
|
2
|
+
import { SMAContentType } from '../../types/socialMediaAutomator';
|
|
3
|
+
export interface SMAVideoReadyEvent {
|
|
4
|
+
subject: Subjects.SMAVideoReady;
|
|
5
|
+
data: {
|
|
6
|
+
topicId: string;
|
|
7
|
+
accountId: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
/** URL permanente do vídeo gerado (Wasabi) */
|
|
10
|
+
videoUrl: string;
|
|
11
|
+
/** Duração do vídeo em segundos */
|
|
12
|
+
durationSeconds: number;
|
|
13
|
+
contentType: SMAContentType;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Publisher } from '../basePublisher';
|
|
2
|
+
import { SMAVideoReadyEvent } from './smaVideoReadyEvent';
|
|
3
|
+
import { Subjects } from '../subjects';
|
|
4
|
+
export declare class SMAVideoReadyPublisher extends Publisher<SMAVideoReadyEvent> {
|
|
5
|
+
subject: Subjects.SMAVideoReady;
|
|
6
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SMAVideoReadyPublisher = void 0;
|
|
4
|
+
const basePublisher_1 = require("../basePublisher");
|
|
5
|
+
const subjects_1 = require("../subjects");
|
|
6
|
+
class SMAVideoReadyPublisher extends basePublisher_1.Publisher {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.subject = subjects_1.Subjects.SMAVideoReady;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.SMAVideoReadyPublisher = SMAVideoReadyPublisher;
|
|
@@ -56,5 +56,9 @@ export declare enum Subjects {
|
|
|
56
56
|
CreativeVideoReady = "CreativeVideoReady",
|
|
57
57
|
RealStateVideoCreated = "RealStateVideoCreated",
|
|
58
58
|
YDTopicApproved = "youtube-dark:topic:approved",
|
|
59
|
-
YDScriptApproved = "youtube-dark:script:approved"
|
|
59
|
+
YDScriptApproved = "youtube-dark:script:approved",
|
|
60
|
+
SMATopicApproved = "sma:topic:approved",
|
|
61
|
+
SMAVideoReady = "sma:video:ready",
|
|
62
|
+
SMAPostPublished = "sma:post:published",
|
|
63
|
+
SMAPostFailed = "sma:post:failed"
|
|
60
64
|
}
|
package/build/events/subjects.js
CHANGED
|
@@ -67,4 +67,9 @@ var Subjects;
|
|
|
67
67
|
// youtube-dark
|
|
68
68
|
Subjects["YDTopicApproved"] = "youtube-dark:topic:approved";
|
|
69
69
|
Subjects["YDScriptApproved"] = "youtube-dark:script:approved";
|
|
70
|
+
// social-media-automator
|
|
71
|
+
Subjects["SMATopicApproved"] = "sma:topic:approved";
|
|
72
|
+
Subjects["SMAVideoReady"] = "sma:video:ready";
|
|
73
|
+
Subjects["SMAPostPublished"] = "sma:post:published";
|
|
74
|
+
Subjects["SMAPostFailed"] = "sma:post:failed";
|
|
70
75
|
})(Subjects || (exports.Subjects = Subjects = {}));
|
package/build/index.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export * from './types/addressType';
|
|
|
38
38
|
export * from './types/imageProcessingStatus';
|
|
39
39
|
export * from './types/whatsapp';
|
|
40
40
|
export * from './types/leadAutomator';
|
|
41
|
+
export * from './types/socialMediaAutomator';
|
|
41
42
|
export * from './types/calNutri';
|
|
42
43
|
export * from './types/politicaBetCategory';
|
|
43
44
|
export * from './types/predictionStatus';
|
|
@@ -47,7 +48,10 @@ export * from './types/betOutcome';
|
|
|
47
48
|
export * from './types/betStatus';
|
|
48
49
|
export * from './types/predictionType';
|
|
49
50
|
export * from './events/subjects';
|
|
51
|
+
export * from './events/baseListener';
|
|
52
|
+
export * from './events/basePublisher';
|
|
50
53
|
export * from './events/youtube-dark';
|
|
54
|
+
export * from './events/social-media-automator';
|
|
51
55
|
export * from './services/TenantDataService';
|
|
52
56
|
export * from './services/CurrencyService';
|
|
53
57
|
export * from './helpers/calculateBonus';
|
package/build/index.js
CHANGED
|
@@ -55,6 +55,8 @@ __exportStar(require("./types/imageProcessingStatus"), exports);
|
|
|
55
55
|
__exportStar(require("./types/whatsapp"), exports);
|
|
56
56
|
// leadautomator
|
|
57
57
|
__exportStar(require("./types/leadAutomator"), exports);
|
|
58
|
+
// social-media-automator
|
|
59
|
+
__exportStar(require("./types/socialMediaAutomator"), exports);
|
|
58
60
|
// cal-nutri
|
|
59
61
|
__exportStar(require("./types/calNutri"), exports);
|
|
60
62
|
// politicabet
|
|
@@ -66,7 +68,10 @@ __exportStar(require("./types/betOutcome"), exports);
|
|
|
66
68
|
__exportStar(require("./types/betStatus"), exports);
|
|
67
69
|
__exportStar(require("./types/predictionType"), exports);
|
|
68
70
|
__exportStar(require("./events/subjects"), exports);
|
|
71
|
+
__exportStar(require("./events/baseListener"), exports);
|
|
72
|
+
__exportStar(require("./events/basePublisher"), exports);
|
|
69
73
|
__exportStar(require("./events/youtube-dark"), exports);
|
|
74
|
+
__exportStar(require("./events/social-media-automator"), exports);
|
|
70
75
|
__exportStar(require("./services/TenantDataService"), exports);
|
|
71
76
|
__exportStar(require("./services/CurrencyService"), exports);
|
|
72
77
|
__exportStar(require("./helpers/calculateBonus"), exports);
|
|
@@ -914,5 +914,49 @@ TenantDataService.tenantDataMap = {
|
|
|
914
914
|
}
|
|
915
915
|
},
|
|
916
916
|
RATING_CRITERIA: undefined
|
|
917
|
+
},
|
|
918
|
+
[tenant_1.Tenant.SocialMediaAutomator]: {
|
|
919
|
+
TENANT: tenant_1.Tenant.SocialMediaAutomator,
|
|
920
|
+
BACKEND_API_VERSION: '1',
|
|
921
|
+
SITE_NAME: 'SocialMediaAutomator',
|
|
922
|
+
SITE_URL: 'https://wrsolucoesdigitais.com.br',
|
|
923
|
+
SITE_WHATSAPP_SUPPORT: '37988083717',
|
|
924
|
+
SITE_WHATSAPP_BOT: '',
|
|
925
|
+
WHATSAPP_BOT_NUMBER_ID: '',
|
|
926
|
+
WHATSAPP_TOKEN: '',
|
|
927
|
+
WHATSAPP_API_URL: '',
|
|
928
|
+
WHATSAPP_API_VERSION: '',
|
|
929
|
+
IOS_APP_DOWNLOAD_LINK: '',
|
|
930
|
+
ANDROID_APP_DOWNLOAD_LINK: '',
|
|
931
|
+
SITE_DESCRIPTION: 'Automação de conteúdo para redes sociais com IA',
|
|
932
|
+
KEYWORDS: ['instagram', 'automação', 'ia', 'reels', 'conteúdo'],
|
|
933
|
+
SOCIAL_X: '',
|
|
934
|
+
SOCIAL_YOUTUBE: '',
|
|
935
|
+
SOCIAL_INSTAGRAM: '',
|
|
936
|
+
SOCIAL_FACEBOOK: '',
|
|
937
|
+
USER_CATEGORIES_CONFIG: {},
|
|
938
|
+
COUPONS_TYPE_ALLOWED_TO_BE_CREATED_BY_SELLER: [],
|
|
939
|
+
COUPONS_TYPE_ALLOWED_TO_BE_CREATED_BY_ADMIN: [],
|
|
940
|
+
EMAIL_HOST: 'smtp.gmail.com',
|
|
941
|
+
EMAIL_PORT: '587',
|
|
942
|
+
EMAIL_USER: 'wrsolucoesdig@gmail.com',
|
|
943
|
+
EMAIL_PASS: 'lwegguaqrzauawsg',
|
|
944
|
+
AUTH_FACEBOOK_APP_ID: '',
|
|
945
|
+
AUTH_GOOGLE_ID: '',
|
|
946
|
+
AUTH_GOOGLE_SECRET: '',
|
|
947
|
+
GOOGLE_ANALYTICS_MEASUREMENT_ID: '',
|
|
948
|
+
GOOGLE_VERIFICATION: '',
|
|
949
|
+
MEDIA_CONFIG: {
|
|
950
|
+
maxPhotoSizeMB: 10,
|
|
951
|
+
maxVideoSizeMB: 500,
|
|
952
|
+
allowedImageFormats: ['jpg', 'jpeg', 'png', 'webp'],
|
|
953
|
+
allowedVideoFormats: ['mp4', 'webm', 'mov'],
|
|
954
|
+
imageQualities: {
|
|
955
|
+
thumbnail: { width: 150, height: 150, quality: 80 },
|
|
956
|
+
medium: { width: 800, height: 800, quality: 85 },
|
|
957
|
+
large: { width: 1200, height: 1200, quality: 90 }
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
RATING_CRITERIA: undefined
|
|
917
961
|
}
|
|
918
962
|
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type SMAContentType = 'reel' | 'post' | 'carousel';
|
|
2
|
+
export type SMATopicStatus = 'suggested' | 'approved' | 'generating' | 'ready' | 'published' | 'rejected' | 'failed';
|
|
3
|
+
export type SMAPostStatus = 'scheduled' | 'publishing' | 'published' | 'failed';
|
|
4
|
+
export type SMAAccountStatus = 'pending' | 'active' | 'suspended';
|
|
5
|
+
export type SMANiche = string;
|
package/build/types/tenant.d.ts
CHANGED
package/build/types/tenant.js
CHANGED