@activepieces/piece-influencers-club 0.0.1
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/README.md +7 -0
- package/package.json +26 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +34 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/enrich-creator-by-email.d.ts +5 -0
- package/src/lib/actions/enrich-creator-by-email.js +67 -0
- package/src/lib/actions/enrich-creator-by-email.js.map +1 -0
- package/src/lib/actions/enrich-creator-by-handle.d.ts +6 -0
- package/src/lib/actions/enrich-creator-by-handle.js +73 -0
- package/src/lib/actions/enrich-creator-by-handle.js.map +1 -0
- package/src/lib/actions/find-similar-creator.d.ts +10 -0
- package/src/lib/actions/find-similar-creator.js +110 -0
- package/src/lib/actions/find-similar-creator.js.map +1 -0
- package/src/lib/common/auth.d.ts +1 -0
- package/src/lib/common/auth.js +10 -0
- package/src/lib/common/auth.js.map +1 -0
- package/src/lib/common/client.d.ts +3 -0
- package/src/lib/common/client.js +27 -0
- package/src/lib/common/client.js.map +1 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@activepieces/piece-influencers-club",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "commonjs",
|
|
5
|
+
"main": "./src/index.js",
|
|
6
|
+
"types": "./src/index.d.ts",
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"@sinclair/typebox": "0.34.11",
|
|
9
|
+
"axios": "1.13.1",
|
|
10
|
+
"axios-retry": "4.4.1",
|
|
11
|
+
"deepmerge-ts": "7.1.0",
|
|
12
|
+
"form-data": "4.0.4",
|
|
13
|
+
"mime-types": "2.1.35",
|
|
14
|
+
"nanoid": "3.3.8",
|
|
15
|
+
"semver": "7.6.0",
|
|
16
|
+
"socket.io-client": "4.8.1",
|
|
17
|
+
"tslib": "^2.3.0",
|
|
18
|
+
"zod": "4.1.13",
|
|
19
|
+
"@activepieces/pieces-common": "0.11.0",
|
|
20
|
+
"@activepieces/pieces-framework": "0.23.0",
|
|
21
|
+
"@activepieces/shared": "0.30.4"
|
|
22
|
+
},
|
|
23
|
+
"resolutions": {
|
|
24
|
+
"rollup": "npm:@rollup/wasm-node"
|
|
25
|
+
}
|
|
26
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const influencersClub: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
package/src/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.influencersClub = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("./lib/common/auth");
|
|
7
|
+
const enrich_creator_by_email_1 = require("./lib/actions/enrich-creator-by-email");
|
|
8
|
+
const enrich_creator_by_handle_1 = require("./lib/actions/enrich-creator-by-handle");
|
|
9
|
+
const find_similar_creator_1 = require("./lib/actions/find-similar-creator");
|
|
10
|
+
const shared_1 = require("@activepieces/shared");
|
|
11
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
12
|
+
exports.influencersClub = (0, pieces_framework_1.createPiece)({
|
|
13
|
+
displayName: 'Influencers.club',
|
|
14
|
+
auth: auth_1.influencersClubAuth,
|
|
15
|
+
minimumSupportedRelease: '0.36.1',
|
|
16
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/influencers-club.png',
|
|
17
|
+
categories: [shared_1.PieceCategory.MARKETING],
|
|
18
|
+
authors: ['sanket-a11y'],
|
|
19
|
+
description: 'Connect to Influencers.club to enrich and find influencers for your marketing campaigns.',
|
|
20
|
+
actions: [
|
|
21
|
+
enrich_creator_by_email_1.enrichCreatorByEmail,
|
|
22
|
+
enrich_creator_by_handle_1.enrichCreatorByHandle,
|
|
23
|
+
find_similar_creator_1.findSimilarCreator,
|
|
24
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
25
|
+
auth: auth_1.influencersClubAuth,
|
|
26
|
+
baseUrl: () => `https://api-dashboard.influencers.club/public/v1`,
|
|
27
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
+
return { Authorization: `Bearer ${auth.secret_text}` };
|
|
29
|
+
}),
|
|
30
|
+
}),
|
|
31
|
+
],
|
|
32
|
+
triggers: [],
|
|
33
|
+
});
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/influencers-club/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAA6D;AAC7D,4CAAwD;AACxD,mFAA6E;AAC7E,qFAA+E;AAC/E,6EAAwE;AACxE,iDAAqD;AACrD,+DAAwE;AAE3D,QAAA,eAAe,GAAG,IAAA,8BAAW,EAAC;IACzC,WAAW,EAAE,kBAAkB;IAC/B,IAAI,EAAE,0BAAmB;IACzB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,0DAA0D;IACnE,UAAU,EAAE,CAAC,sBAAa,CAAC,SAAS,CAAC;IACrC,OAAO,EAAE,CAAC,aAAa,CAAC;IACxB,WAAW,EACT,0FAA0F;IAC5F,OAAO,EAAE;QACP,8CAAoB;QACpB,gDAAqB;QACrB,yCAAkB;QAClB,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,0BAAmB;YACzB,OAAO,EAAE,GAAG,EAAE,CAAC,kDAAkD;YACjE,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,OAAO,EAAE,aAAa,EAAE,UAAU,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACzD,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const enrichCreatorByEmail: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
exclude_platforms: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
4
|
+
min_followers: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
5
|
+
}>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enrichCreatorByEmail = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const client_1 = require("../common/client");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
exports.enrichCreatorByEmail = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.influencersClubAuth,
|
|
11
|
+
name: 'enrichCreatorByEmail',
|
|
12
|
+
displayName: 'Enrich Creator by Email',
|
|
13
|
+
description: 'Enrich creator data by email address with advanced mode including all social medias and full profile stats',
|
|
14
|
+
props: {
|
|
15
|
+
email: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Email',
|
|
17
|
+
description: 'The email address of the creator to enrich',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
exclude_platforms: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
21
|
+
displayName: 'Exclude Platforms',
|
|
22
|
+
description: 'Platforms to exclude from enrichment (optional)',
|
|
23
|
+
required: false,
|
|
24
|
+
options: {
|
|
25
|
+
disabled: false,
|
|
26
|
+
options: [
|
|
27
|
+
{ label: 'Instagram', value: 'instagram' },
|
|
28
|
+
{ label: 'TikTok', value: 'tiktok' },
|
|
29
|
+
{ label: 'YouTube', value: 'youtube' },
|
|
30
|
+
{ label: 'Twitter', value: 'twitter' },
|
|
31
|
+
{ label: 'Twitch', value: 'twitch' },
|
|
32
|
+
{ label: 'OnlyFans', value: 'onlyfans' },
|
|
33
|
+
{ label: 'LinkedIn', value: 'linkedin' },
|
|
34
|
+
{ label: 'Facebook', value: 'facebook' },
|
|
35
|
+
{ label: 'Snapchat', value: 'snapchat' },
|
|
36
|
+
{ label: 'Reddit', value: 'reddit' },
|
|
37
|
+
{ label: 'Pinterest', value: 'pinterest' },
|
|
38
|
+
{ label: 'Discord', value: 'discord' },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
41
|
+
}),
|
|
42
|
+
min_followers: pieces_framework_1.Property.Number({
|
|
43
|
+
displayName: 'Minimum Followers',
|
|
44
|
+
description: 'Minimum follower count filter (default: 1000)',
|
|
45
|
+
required: false,
|
|
46
|
+
defaultValue: 1000,
|
|
47
|
+
}),
|
|
48
|
+
},
|
|
49
|
+
run(context) {
|
|
50
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const body = {
|
|
52
|
+
email: context.propsValue.email,
|
|
53
|
+
};
|
|
54
|
+
if (context.propsValue.exclude_platforms &&
|
|
55
|
+
context.propsValue.exclude_platforms.length > 0) {
|
|
56
|
+
body.exclude_platforms = context.propsValue.exclude_platforms;
|
|
57
|
+
}
|
|
58
|
+
if (context.propsValue.min_followers !== undefined &&
|
|
59
|
+
context.propsValue.min_followers !== null) {
|
|
60
|
+
body.min_followers = context.propsValue.min_followers;
|
|
61
|
+
}
|
|
62
|
+
const response = yield (0, client_1.makeRequest)(context.auth.secret_text, pieces_common_1.HttpMethod.POST, '/creators/enrich/email/advanced', body);
|
|
63
|
+
return response;
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=enrich-creator-by-email.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrich-creator-by-email.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/influencers-club/src/lib/actions/enrich-creator-by-email.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAqD;AACrD,6CAA+C;AAC/C,+DAAyD;AAE5C,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,0BAAmB;IACzB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EACT,4GAA4G;IAC9G,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,4CAA4C;YACzD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,iBAAiB,EAAE,2BAAQ,CAAC,yBAAyB,CAAC;YACpD,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;oBAC1C,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;oBACpC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;oBACtC,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;oBACtC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;oBACpC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;oBACxC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;oBACxC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;oBACxC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;oBACxC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;oBACpC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE;oBAC1C,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;iBACvC;aACF;SACF,CAAC;QACF,aAAa,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAC7B,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,+CAA+C;YAC5D,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,IAAI;SACnB,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAI,GAAQ;gBAChB,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;aAChC,CAAC;YAEF,IACE,OAAO,CAAC,UAAU,CAAC,iBAAiB;gBACpC,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC,EAC/C,CAAC;gBACD,IAAI,CAAC,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC;YAChE,CAAC;YAED,IACE,OAAO,CAAC,UAAU,CAAC,aAAa,KAAK,SAAS;gBAC9C,OAAO,CAAC,UAAU,CAAC,aAAa,KAAK,IAAI,EACzC,CAAC;gBACD,IAAI,CAAC,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC;YACxD,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAI,CAAC,WAAW,EACxB,0BAAU,CAAC,IAAI,EACf,iCAAiC,EACjC,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const enrichCreatorByHandle: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
handle: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
platform: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
4
|
+
include_lookalikes: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
5
|
+
email_required: import("@activepieces/pieces-framework").StaticDropdownProperty<string, false>;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enrichCreatorByHandle = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const client_1 = require("../common/client");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
exports.enrichCreatorByHandle = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.influencersClubAuth,
|
|
11
|
+
name: 'enrichCreatorByHandle',
|
|
12
|
+
displayName: 'Enrich Creator Social Profile by Handle',
|
|
13
|
+
description: 'Enrich creator data by social media handle with full mode including all connected platforms and detailed stats',
|
|
14
|
+
props: {
|
|
15
|
+
handle: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Handle',
|
|
17
|
+
description: 'The social media handle of the creator',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
platform: pieces_framework_1.Property.StaticDropdown({
|
|
21
|
+
displayName: 'Platform',
|
|
22
|
+
description: 'The social media platform for the handle',
|
|
23
|
+
required: true,
|
|
24
|
+
options: {
|
|
25
|
+
disabled: false,
|
|
26
|
+
options: [
|
|
27
|
+
{ label: 'Instagram', value: 'instagram' },
|
|
28
|
+
{ label: 'TikTok', value: 'tiktok' },
|
|
29
|
+
{ label: 'YouTube', value: 'youtube' },
|
|
30
|
+
{ label: 'Twitter/X', value: 'twitter' },
|
|
31
|
+
{ label: 'Twitch', value: 'twitch' },
|
|
32
|
+
{ label: 'OnlyFans', value: 'onlyfans' },
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
}),
|
|
36
|
+
include_lookalikes: pieces_framework_1.Property.Checkbox({
|
|
37
|
+
displayName: 'Include Lookalikes',
|
|
38
|
+
description: 'Include similar creators for faster discovery (30-40% quicker). Default: true',
|
|
39
|
+
required: false,
|
|
40
|
+
defaultValue: true,
|
|
41
|
+
}),
|
|
42
|
+
email_required: pieces_framework_1.Property.StaticDropdown({
|
|
43
|
+
displayName: 'Email Requirement',
|
|
44
|
+
description: 'Controls how to handle email availability',
|
|
45
|
+
required: false,
|
|
46
|
+
options: {
|
|
47
|
+
disabled: false,
|
|
48
|
+
options: [
|
|
49
|
+
{ label: 'Preferred (return data even if no email found)', value: 'preferred' },
|
|
50
|
+
{ label: 'Must Have (only return if valid email exists)', value: 'must_have' },
|
|
51
|
+
],
|
|
52
|
+
},
|
|
53
|
+
defaultValue: 'preferred',
|
|
54
|
+
}),
|
|
55
|
+
},
|
|
56
|
+
run(context) {
|
|
57
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const body = {
|
|
59
|
+
handle: context.propsValue.handle,
|
|
60
|
+
platform: context.propsValue.platform,
|
|
61
|
+
};
|
|
62
|
+
if (context.propsValue.include_lookalikes !== undefined && context.propsValue.include_lookalikes !== null) {
|
|
63
|
+
body.include_lookalikes = context.propsValue.include_lookalikes;
|
|
64
|
+
}
|
|
65
|
+
if (context.propsValue.email_required !== undefined && context.propsValue.email_required !== null) {
|
|
66
|
+
body.email_required = context.propsValue.email_required;
|
|
67
|
+
}
|
|
68
|
+
const response = yield (0, client_1.makeRequest)(context.auth.secret_text, pieces_common_1.HttpMethod.POST, '/creators/enrich/handle/full', body);
|
|
69
|
+
return response;
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=enrich-creator-by-handle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enrich-creator-by-handle.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces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,WAAW,EAAE,2CAA2C;YACxD,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE;gBACP,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE;oBACP,EAAE,KAAK,EAAE,gDAAgD,EAAE,KAAK,EAAE,WAAW,EAAE;oBAC/E,EAAE,KAAK,EAAE,+CAA+C,EAAE,KAAK,EAAE,WAAW,EAAE;iBAC/E;aACF;YACD,YAAY,EAAE,WAAW;SAC1B,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAI,GAAQ;gBAChB,MAAM,EAAE,OAAO,CAAC,UAAU,CAAC,MAAM;gBACjC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ;aACtC,CAAC;YAEF,IAAI,OAAO,CAAC,UAAU,CAAC,kBAAkB,KAAK,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,kBAAkB,KAAK,IAAI,EAAE,CAAC;gBAC1G,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;YAClE,CAAC;YAED,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,KAAK,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,cAAc,KAAK,IAAI,EAAE,CAAC;gBAClG,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,cAAc,CAAC;YAC1D,CAAC;YAED,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAI,CAAC,WAAW,EACxB,0BAAU,CAAC,IAAI,EACf,8BAA8B,EAC9B,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const findSimilarCreator: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
+
platform: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
3
|
+
filter_key: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
|
|
4
|
+
filter_value: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
5
|
+
limit: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
6
|
+
number_of_followers: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
7
|
+
engagement_percent: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
8
|
+
is_verified: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
9
|
+
exclude_private_profile: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.findSimilarCreator = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const auth_1 = require("../common/auth");
|
|
7
|
+
const client_1 = require("../common/client");
|
|
8
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
+
exports.findSimilarCreator = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: auth_1.influencersClubAuth,
|
|
11
|
+
name: 'findSimilarCreator',
|
|
12
|
+
displayName: 'Find Similar Creator',
|
|
13
|
+
description: 'Find creators similar to a given creator handle or profile URL with optional filters',
|
|
14
|
+
props: {
|
|
15
|
+
platform: pieces_framework_1.Property.StaticDropdown({
|
|
16
|
+
displayName: 'Platform',
|
|
17
|
+
description: 'The social media platform',
|
|
18
|
+
required: true,
|
|
19
|
+
options: {
|
|
20
|
+
disabled: false,
|
|
21
|
+
options: [
|
|
22
|
+
{ label: 'Instagram', value: 'instagram' },
|
|
23
|
+
{ label: 'TikTok', value: 'tiktok' },
|
|
24
|
+
{ label: 'YouTube', value: 'youtube' },
|
|
25
|
+
{ label: 'Twitch', value: 'twitch' },
|
|
26
|
+
{ label: 'Twitter/X', value: 'twitter' },
|
|
27
|
+
{ label: 'OnlyFans', value: 'onlyfans' },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
}),
|
|
31
|
+
filter_key: pieces_framework_1.Property.StaticDropdown({
|
|
32
|
+
displayName: 'Filter Key',
|
|
33
|
+
description: 'The type of identifier for the creator',
|
|
34
|
+
required: true,
|
|
35
|
+
options: {
|
|
36
|
+
disabled: false,
|
|
37
|
+
options: [
|
|
38
|
+
{ label: 'URL', value: 'url' },
|
|
39
|
+
{ label: 'Username', value: 'username' },
|
|
40
|
+
{ label: 'ID', value: 'id' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
}),
|
|
44
|
+
filter_value: pieces_framework_1.Property.ShortText({
|
|
45
|
+
displayName: 'Filter Value',
|
|
46
|
+
description: 'Platform URL, profile handle, or user ID',
|
|
47
|
+
required: true,
|
|
48
|
+
}),
|
|
49
|
+
limit: pieces_framework_1.Property.Number({
|
|
50
|
+
displayName: 'Results Limit',
|
|
51
|
+
description: 'Maximum number of similar creators to return (min: 1, max: 50)',
|
|
52
|
+
required: false,
|
|
53
|
+
defaultValue: 10,
|
|
54
|
+
}),
|
|
55
|
+
number_of_followers: pieces_framework_1.Property.Object({
|
|
56
|
+
displayName: 'Follower Count Range',
|
|
57
|
+
description: 'Filter by follower count (min and max)',
|
|
58
|
+
required: false,
|
|
59
|
+
}),
|
|
60
|
+
engagement_percent: pieces_framework_1.Property.Object({
|
|
61
|
+
displayName: 'Engagement Percentage Range',
|
|
62
|
+
description: 'Filter by engagement rate (min and max)',
|
|
63
|
+
required: false,
|
|
64
|
+
}),
|
|
65
|
+
is_verified: pieces_framework_1.Property.Checkbox({
|
|
66
|
+
displayName: 'Verified Only',
|
|
67
|
+
description: 'Only return verified creators',
|
|
68
|
+
required: false,
|
|
69
|
+
}),
|
|
70
|
+
exclude_private_profile: pieces_framework_1.Property.Checkbox({
|
|
71
|
+
displayName: 'Exclude Private Profiles',
|
|
72
|
+
description: 'Exclude creators with private profiles',
|
|
73
|
+
required: false,
|
|
74
|
+
}),
|
|
75
|
+
},
|
|
76
|
+
run(context) {
|
|
77
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
const body = {
|
|
79
|
+
platform: context.propsValue.platform,
|
|
80
|
+
filter_key: context.propsValue.filter_key,
|
|
81
|
+
filter_value: context.propsValue.filter_value,
|
|
82
|
+
filters: {},
|
|
83
|
+
paging: {
|
|
84
|
+
limit: context.propsValue.limit || 10,
|
|
85
|
+
page: 1,
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
const filters = {};
|
|
89
|
+
if (context.propsValue.number_of_followers) {
|
|
90
|
+
filters.number_of_followers = context.propsValue.number_of_followers;
|
|
91
|
+
}
|
|
92
|
+
if (context.propsValue.engagement_percent) {
|
|
93
|
+
filters.engagement_percent = context.propsValue.engagement_percent;
|
|
94
|
+
}
|
|
95
|
+
if (context.propsValue.is_verified !== undefined &&
|
|
96
|
+
context.propsValue.is_verified !== null) {
|
|
97
|
+
filters.is_verified = context.propsValue.is_verified;
|
|
98
|
+
}
|
|
99
|
+
if (context.propsValue.exclude_private_profile !== undefined &&
|
|
100
|
+
context.propsValue.exclude_private_profile !== null) {
|
|
101
|
+
filters.exclude_private_profile =
|
|
102
|
+
context.propsValue.exclude_private_profile;
|
|
103
|
+
}
|
|
104
|
+
body.filters = filters;
|
|
105
|
+
const response = yield (0, client_1.makeRequest)(context.auth.secret_text, pieces_common_1.HttpMethod.POST, '/discovery/creators/similar/', body);
|
|
106
|
+
return response;
|
|
107
|
+
});
|
|
108
|
+
},
|
|
109
|
+
});
|
|
110
|
+
//# sourceMappingURL=find-similar-creator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-similar-creator.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/influencers-club/src/lib/actions/find-similar-creator.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yCAAqD;AACrD,6CAA+C;AAC/C,+DAAyD;A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CAAC,mBAAmB,CAAC;YACvE,CAAC;YAED,IAAI,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC;gBAC1C,OAAO,CAAC,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;YACrE,CAAC;YAED,IACE,OAAO,CAAC,UAAU,CAAC,WAAW,KAAK,SAAS;gBAC5C,OAAO,CAAC,UAAU,CAAC,WAAW,KAAK,IAAI,EACvC,CAAC;gBACD,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;YACvD,CAAC;YAED,IACE,OAAO,CAAC,UAAU,CAAC,uBAAuB,KAAK,SAAS;gBACxD,OAAO,CAAC,UAAU,CAAC,uBAAuB,KAAK,IAAI,EACnD,CAAC;gBACD,OAAO,CAAC,uBAAuB;oBAC7B,OAAO,CAAC,UAAU,CAAC,uBAAuB,CAAC;YAC/C,CAAC;YAED,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YAEvB,MAAM,QAAQ,GAAG,MAAM,IAAA,oBAAW,EAChC,OAAO,CAAC,IAAI,CAAC,WAAW,EACxB,0BAAU,CAAC,IAAI,EACf,8BAA8B,EAC9B,IAAI,CACL,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const influencersClubAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.influencersClubAuth = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
+
exports.influencersClubAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
6
|
+
displayName: "Influencers Club API Key",
|
|
7
|
+
description: "API Key for Influencers Club",
|
|
8
|
+
required: true,
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/influencers-club/src/lib/common/auth.ts"],"names":[],"mappings":";;;AAAA,qEAA2D;AAE9C,QAAA,mBAAmB,GAAG,4BAAS,CAAC,UAAU,CAAC;IACtD,WAAW,EAAE,0BAA0B;IACvC,WAAW,EAAE,8BAA8B;IAC3C,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BASE_URL = void 0;
|
|
4
|
+
exports.makeRequest = makeRequest;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
+
exports.BASE_URL = `https://api-dashboard.influencers.club/public/v1`;
|
|
8
|
+
function makeRequest(apikey, method, path, body) {
|
|
9
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
+
try {
|
|
11
|
+
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
12
|
+
method,
|
|
13
|
+
url: `${exports.BASE_URL}${path}`,
|
|
14
|
+
headers: {
|
|
15
|
+
Authorization: `Bearer ${apikey}`,
|
|
16
|
+
'Content-Type': 'application/json',
|
|
17
|
+
},
|
|
18
|
+
body,
|
|
19
|
+
});
|
|
20
|
+
return response.body;
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
throw new Error(`Unexpected error: ${error.message || String(error)}`);
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/influencers-club/src/lib/common/client.ts"],"names":[],"mappings":";;;AAIA,kCAoBC;;AAxBD,+DAAqE;AAExD,QAAA,QAAQ,GAAG,kDAAkD,CAAC;AAE3E,SAAsB,WAAW,CAC/B,MAAc,EACd,MAAkB,EAClB,IAAY,EACZ,IAAc;;QAEd,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC5C,MAAM;gBACN,GAAG,EAAE,GAAG,gBAAQ,GAAG,IAAI,EAAE;gBACzB,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,MAAM,EAAE;oBACjC,cAAc,EAAE,kBAAkB;iBACnC;gBACD,IAAI;aACL,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,MAAM,IAAI,KAAK,CAAC,qBAAqB,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;CAAA"}
|