@activepieces/piece-clickfunnels 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 +33 -0
- package/src/index.d.ts +4 -0
- package/src/index.js +63 -0
- package/src/index.js.map +1 -0
- package/src/lib/actions/apply-tag-to-contact.d.ts +9 -0
- package/src/lib/actions/apply-tag-to-contact.js +32 -0
- package/src/lib/actions/apply-tag-to-contact.js.map +1 -0
- package/src/lib/actions/create-opportunity.d.ts +14 -0
- package/src/lib/actions/create-opportunity.js +51 -0
- package/src/lib/actions/create-opportunity.js.map +1 -0
- package/src/lib/actions/enroll-a-contact-into-a-course.d.ts +9 -0
- package/src/lib/actions/enroll-a-contact-into-a-course.js +32 -0
- package/src/lib/actions/enroll-a-contact-into-a-course.js.map +1 -0
- package/src/lib/actions/remove-tag-from-contact.d.ts +9 -0
- package/src/lib/actions/remove-tag-from-contact.js +29 -0
- package/src/lib/actions/remove-tag-from-contact.js.map +1 -0
- package/src/lib/actions/search-contacts.d.ts +8 -0
- package/src/lib/actions/search-contacts.js +30 -0
- package/src/lib/actions/search-contacts.js.map +1 -0
- package/src/lib/actions/update-or-create-contact.d.ts +13 -0
- package/src/lib/actions/update-or-create-contact.js +58 -0
- package/src/lib/actions/update-or-create-contact.js.map +1 -0
- package/src/lib/common/constants.d.ts +18 -0
- package/src/lib/common/constants.js +50 -0
- package/src/lib/common/constants.js.map +1 -0
- package/src/lib/common/props.d.ts +10 -0
- package/src/lib/common/props.js +409 -0
- package/src/lib/common/props.js.map +1 -0
- package/src/lib/common/requests.d.ts +21 -0
- package/src/lib/common/requests.js +179 -0
- package/src/lib/common/requests.js.map +1 -0
- package/src/lib/triggers/contact-completed-course.d.ts +20 -0
- package/src/lib/triggers/contact-completed-course.js +62 -0
- package/src/lib/triggers/contact-completed-course.js.map +1 -0
- package/src/lib/triggers/contact-identified.d.ts +20 -0
- package/src/lib/triggers/contact-identified.js +62 -0
- package/src/lib/triggers/contact-identified.js.map +1 -0
- package/src/lib/triggers/contact-submitted-form.d.ts +20 -0
- package/src/lib/triggers/contact-submitted-form.js +62 -0
- package/src/lib/triggers/contact-submitted-form.js.map +1 -0
- package/src/lib/triggers/contact-suspended-from-course.d.ts +20 -0
- package/src/lib/triggers/contact-suspended-from-course.js +62 -0
- package/src/lib/triggers/contact-suspended-from-course.js.map +1 -0
- package/src/lib/triggers/course-enrollment-created-for-contact.d.ts +20 -0
- package/src/lib/triggers/course-enrollment-created-for-contact.js +62 -0
- package/src/lib/triggers/course-enrollment-created-for-contact.js.map +1 -0
- package/src/lib/triggers/one-time-order-paid.d.ts +20 -0
- package/src/lib/triggers/one-time-order-paid.js +62 -0
- package/src/lib/triggers/one-time-order-paid.js.map +1 -0
- package/src/lib/triggers/scheduled-appointment-event-created.d.ts +20 -0
- package/src/lib/triggers/scheduled-appointment-event-created.js +62 -0
- package/src/lib/triggers/scheduled-appointment-event-created.js.map +1 -0
- package/src/lib/triggers/subscription-invoice-paid.d.ts +20 -0
- package/src/lib/triggers/subscription-invoice-paid.js +62 -0
- package/src/lib/triggers/subscription-invoice-paid.js.map +1 -0
package/README.md
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@activepieces/piece-clickfunnels",
|
|
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.8.3",
|
|
10
|
+
"axios-retry": "4.4.1",
|
|
11
|
+
"deepmerge-ts": "7.1.0",
|
|
12
|
+
"fast-glob": "3.3.3",
|
|
13
|
+
"mime-types": "2.1.35",
|
|
14
|
+
"nanoid": "3.3.8",
|
|
15
|
+
"semver": "7.6.0",
|
|
16
|
+
"tslib": "^2.3.0",
|
|
17
|
+
"zod": "3.25.76",
|
|
18
|
+
"@activepieces/pieces-common": "0.7.0",
|
|
19
|
+
"@activepieces/pieces-framework": "0.18.4",
|
|
20
|
+
"@activepieces/shared": "0.19.1"
|
|
21
|
+
},
|
|
22
|
+
"overrides": {
|
|
23
|
+
"@tryfabric/martian": {
|
|
24
|
+
"@notionhq/client": "$@notionhq/client"
|
|
25
|
+
},
|
|
26
|
+
"vite": {
|
|
27
|
+
"rollup": "npm:@rollup/wasm-node"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"resolutions": {
|
|
31
|
+
"rollup": "npm:@rollup/wasm-node"
|
|
32
|
+
}
|
|
33
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const clickfunnels: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>>;
|
package/src/index.js
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.clickfunnels = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const scheduled_appointment_event_created_1 = require("./lib/triggers/scheduled-appointment-event-created");
|
|
7
|
+
const constants_1 = require("./lib/common/constants");
|
|
8
|
+
const course_enrollment_created_for_contact_1 = require("./lib/triggers/course-enrollment-created-for-contact");
|
|
9
|
+
const contact_submitted_form_1 = require("./lib/triggers/contact-submitted-form");
|
|
10
|
+
const one_time_order_paid_1 = require("./lib/triggers/one-time-order-paid");
|
|
11
|
+
const subscription_invoice_paid_1 = require("./lib/triggers/subscription-invoice-paid");
|
|
12
|
+
const contact_completed_course_1 = require("./lib/triggers/contact-completed-course");
|
|
13
|
+
const contact_identified_1 = require("./lib/triggers/contact-identified");
|
|
14
|
+
const contact_suspended_from_course_1 = require("./lib/triggers/contact-suspended-from-course");
|
|
15
|
+
const create_opportunity_1 = require("./lib/actions/create-opportunity");
|
|
16
|
+
const apply_tag_to_contact_1 = require("./lib/actions/apply-tag-to-contact");
|
|
17
|
+
const remove_tag_from_contact_1 = require("./lib/actions/remove-tag-from-contact");
|
|
18
|
+
const enroll_a_contact_into_a_course_1 = require("./lib/actions/enroll-a-contact-into-a-course");
|
|
19
|
+
const update_or_create_contact_1 = require("./lib/actions/update-or-create-contact");
|
|
20
|
+
const search_contacts_1 = require("./lib/actions/search-contacts");
|
|
21
|
+
const shared_1 = require("@activepieces/shared");
|
|
22
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
23
|
+
exports.clickfunnels = (0, pieces_framework_1.createPiece)({
|
|
24
|
+
displayName: 'ClickFunnels',
|
|
25
|
+
auth: constants_1.clickfunnelsAuth,
|
|
26
|
+
minimumSupportedRelease: '0.36.1',
|
|
27
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/clickfunnels.png',
|
|
28
|
+
categories: [shared_1.PieceCategory.COMMUNICATION, shared_1.PieceCategory.MARKETING],
|
|
29
|
+
authors: ['gs03dev'],
|
|
30
|
+
actions: [
|
|
31
|
+
create_opportunity_1.createOpportunity,
|
|
32
|
+
apply_tag_to_contact_1.applyTagToContact,
|
|
33
|
+
remove_tag_from_contact_1.removeTagFromContact,
|
|
34
|
+
enroll_a_contact_into_a_course_1.enrollAContactIntoACourse,
|
|
35
|
+
update_or_create_contact_1.updateOrCreateContact,
|
|
36
|
+
enroll_a_contact_into_a_course_1.enrollAContactIntoACourse,
|
|
37
|
+
search_contacts_1.searchContacts,
|
|
38
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
39
|
+
auth: constants_1.clickfunnelsAuth,
|
|
40
|
+
baseUrl: (auth) => {
|
|
41
|
+
const authValue = auth;
|
|
42
|
+
return (0, constants_1.CLICKFUNNELS_BASE_URL)(authValue.subdomain);
|
|
43
|
+
},
|
|
44
|
+
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
45
|
+
const authValue = auth;
|
|
46
|
+
return {
|
|
47
|
+
Authorization: `Bearer ${authValue.apiKey}`,
|
|
48
|
+
};
|
|
49
|
+
}),
|
|
50
|
+
}),
|
|
51
|
+
],
|
|
52
|
+
triggers: [
|
|
53
|
+
scheduled_appointment_event_created_1.scheduledAppointmentEventCreated,
|
|
54
|
+
course_enrollment_created_for_contact_1.courseEnrollmentCreatedForContact,
|
|
55
|
+
contact_submitted_form_1.contactSubmittedForm,
|
|
56
|
+
one_time_order_paid_1.oneTimeOrderPaid,
|
|
57
|
+
subscription_invoice_paid_1.subscriptionInvoicePaid,
|
|
58
|
+
contact_completed_course_1.contactCompletedCourse,
|
|
59
|
+
contact_identified_1.contactIdentified,
|
|
60
|
+
contact_suspended_from_course_1.contactSuspendedFromCourse,
|
|
61
|
+
],
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/clickfunnels/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,4GAAsG;AACtG,sDAIgC;AAChC,gHAAyG;AACzG,kFAA6E;AAC7E,4EAAsE;AACtE,wFAAmF;AACnF,sFAAiF;AACjF,0EAAsE;AACtE,gGAA0F;AAC1F,yEAAqE;AACrE,6EAAuE;AACvE,mFAA6E;AAC7E,iGAAyF;AACzF,qFAA+E;AAC/E,mEAA+D;AAC/D,iDAAqD;AACrD,+DAAwE;AAE3D,QAAA,YAAY,GAAG,IAAA,8BAAW,EAAC;IACtC,WAAW,EAAE,cAAc;IAC3B,IAAI,EAAE,4BAAgB;IACtB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,sDAAsD;IAC/D,UAAU,EAAE,CAAC,sBAAa,CAAC,aAAa,EAAE,sBAAa,CAAC,SAAS,CAAC;IAClE,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,OAAO,EAAE;QACP,sCAAiB;QACjB,wCAAiB;QACjB,8CAAoB;QACpB,0DAAyB;QACzB,gDAAqB;QACrB,0DAAyB;QACzB,gCAAc;QACd,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,4BAAgB;YACtB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;gBAChB,MAAM,SAAS,GAAG,IAAgC,CAAC;gBACnD,OAAO,IAAA,iCAAqB,EAAC,SAAS,CAAC,SAAS,CAAC,CAAC;YACpD,CAAC;YACD,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,MAAM,SAAS,GAAG,IAAgC,CAAC;gBACnD,OAAO;oBACL,aAAa,EAAE,UAAU,SAAS,CAAC,MAAM,EAAE;iBAC5C,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE;QACR,sEAAgC;QAChC,yEAAiC;QACjC,6CAAoB;QACpB,sCAAgB;QAChB,mDAAuB;QACvB,iDAAsB;QACtB,sCAAiB;QACjB,0DAA0B;KAC3B;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const applyTagToContact: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
teamId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
6
|
+
workspaceId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
7
|
+
contactId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
8
|
+
tagId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyTagToContact = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const constants_1 = require("../common/constants");
|
|
7
|
+
const props_1 = require("../common/props");
|
|
8
|
+
const requests_1 = require("../common/requests");
|
|
9
|
+
exports.applyTagToContact = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: constants_1.clickfunnelsAuth,
|
|
11
|
+
name: 'applyTagToContact',
|
|
12
|
+
displayName: 'Apply Tag to Contact',
|
|
13
|
+
description: 'Apply a tag to a contact if it doesn’t already exist.',
|
|
14
|
+
props: {
|
|
15
|
+
teamId: (0, props_1.teamsDropdown)(['auth']),
|
|
16
|
+
workspaceId: (0, props_1.workspacesDropdown)(['auth', 'teamId']),
|
|
17
|
+
contactId: (0, props_1.contactsDropdown)(['auth', 'workspaceId']),
|
|
18
|
+
tagId: (0, props_1.tagsDropdown)(['auth', 'workspaceId']),
|
|
19
|
+
},
|
|
20
|
+
run(_a) {
|
|
21
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
22
|
+
const payload = {
|
|
23
|
+
contacts_applied_tag: {
|
|
24
|
+
tag_id: propsValue.tagId
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const response = yield requests_1.clickfunnelsApiService.createAppliedTag(auth, propsValue.contactId, payload);
|
|
28
|
+
return response;
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=apply-tag-to-contact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply-tag-to-contact.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/clickfunnels/src/lib/actions/apply-tag-to-contact.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,mDAAuD;AACvD,2CAKyB;AACzB,iDAA4D;AAE/C,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,4BAAgB;IACtB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,uDAAuD;IACpE,KAAK,EAAE;QACL,MAAM,EAAE,IAAA,qBAAa,EAAC,CAAC,MAAM,CAAC,CAAC;QAC/B,WAAW,EAAE,IAAA,0BAAkB,EAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACnD,SAAS,EAAE,IAAA,wBAAgB,EAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACpD,KAAK,EAAE,IAAA,oBAAY,EAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;KAC7C;IACK,GAAG;qEAAC,EAAC,IAAI,EAAE,UAAU,EAAC;YAC1B,MAAM,OAAO,GAAG;gBACd,oBAAoB,EAAE;oBACpB,MAAM,EAAE,UAAU,CAAC,KAAK;iBACzB;aACF,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,iCAAsB,CAAC,gBAAgB,CAC5D,IAAI,EACJ,UAAU,CAAC,SAAmB,EAC9B,OAAO,CACR,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const createOpportunity: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
name: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
6
|
+
teamId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
7
|
+
workspaceId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
8
|
+
pipelineId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
9
|
+
pipelineStageId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
10
|
+
contactId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
11
|
+
assigneeId: import("@activepieces/pieces-framework").DropdownProperty<any, false> | import("@activepieces/pieces-framework").DropdownProperty<any, true>;
|
|
12
|
+
value: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
13
|
+
closedAt: import("@activepieces/pieces-framework").DateTimeProperty<false>;
|
|
14
|
+
}>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createOpportunity = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const constants_1 = require("../common/constants");
|
|
7
|
+
const props_1 = require("../common/props");
|
|
8
|
+
const requests_1 = require("../common/requests");
|
|
9
|
+
exports.createOpportunity = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: constants_1.clickfunnelsAuth,
|
|
11
|
+
name: 'createOpportunity',
|
|
12
|
+
displayName: 'Create Opportunity',
|
|
13
|
+
description: 'Create a new opportunity for a contact.',
|
|
14
|
+
props: {
|
|
15
|
+
name: pieces_framework_1.Property.ShortText({
|
|
16
|
+
displayName: 'Opportunity Name',
|
|
17
|
+
description: 'The name or title of the opportunity.',
|
|
18
|
+
required: true,
|
|
19
|
+
}),
|
|
20
|
+
teamId: (0, props_1.teamsDropdown)(['auth']),
|
|
21
|
+
workspaceId: (0, props_1.workspacesDropdown)(['auth', 'teamId']),
|
|
22
|
+
pipelineId: (0, props_1.pipelinesDropdown)(['auth', 'workspaceId']),
|
|
23
|
+
pipelineStageId: (0, props_1.pipelineStagesDropdown)(['auth', 'pipelineId']),
|
|
24
|
+
contactId: (0, props_1.contactsDropdown)(['auth', 'workspaceId']),
|
|
25
|
+
assigneeId: (0, props_1.teamMembershipsDropdown)(['auth', 'teamId'], false),
|
|
26
|
+
value: pieces_framework_1.Property.Number({
|
|
27
|
+
displayName: 'Value',
|
|
28
|
+
description: 'The potential value of this opportunity in the default currency of the workspace',
|
|
29
|
+
required: false,
|
|
30
|
+
}),
|
|
31
|
+
closedAt: pieces_framework_1.Property.DateTime({
|
|
32
|
+
displayName: 'Close Date',
|
|
33
|
+
description: 'The expected close date for the opportunity.',
|
|
34
|
+
required: false,
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
run(_a) {
|
|
38
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
39
|
+
const payload = Object.assign(Object.assign(Object.assign({ name: propsValue.name, pipelines_stage_id: propsValue.pipelineStageId, primary_contact_id: propsValue.contactId }, (propsValue.value && {
|
|
40
|
+
value: propsValue.value,
|
|
41
|
+
})), (propsValue.closedAt && {
|
|
42
|
+
closed_at: new Date(propsValue.closedAt).toISOString(),
|
|
43
|
+
})), { assignee_id: propsValue.assigneeId });
|
|
44
|
+
const response = yield requests_1.clickfunnelsApiService.createOpportunity(auth, propsValue.workspaceId, {
|
|
45
|
+
sales_opportunity: payload,
|
|
46
|
+
});
|
|
47
|
+
return response;
|
|
48
|
+
});
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=create-opportunity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-opportunity.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/clickfunnels/src/lib/actions/create-opportunity.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,mDAAuD;AACvD,2CAOyB;AACzB,iDAA4D;AAE/C,QAAA,iBAAiB,GAAG,IAAA,+BAAY,EAAC;IAC5C,IAAI,EAAE,4BAAgB;IACtB,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,oBAAoB;IACjC,WAAW,EACT,yCAAyC;IAC3C,KAAK,EAAE;QACL,IAAI,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACvB,WAAW,EAAE,kBAAkB;YAC/B,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,IAAA,qBAAa,EAAC,CAAC,MAAM,CAAC,CAAC;QAC/B,WAAW,EAAE,IAAA,0BAAkB,EAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACnD,UAAU,EAAE,IAAA,yBAAiB,EAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACtD,eAAe,EAAE,IAAA,8BAAsB,EAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAC/D,SAAS,EAAE,IAAA,wBAAgB,EAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACpD,UAAU,EAAE,IAAA,+BAAuB,EAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,KAAK,CAAC;QAC9D,KAAK,EAAE,2BAAQ,CAAC,MAAM,CAAC;YACrB,WAAW,EAAE,OAAO;YACpB,WAAW,EACT,kFAAkF;YACpF,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC1B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,OAAO,+CACX,IAAI,EAAE,UAAU,CAAC,IAAI,EACrB,kBAAkB,EAAE,UAAU,CAAC,eAAe,EAC9C,kBAAkB,EAAE,UAAU,CAAC,SAAS,IACrC,CAAC,UAAU,CAAC,KAAK,IAAI;gBACtB,KAAK,EAAE,UAAU,CAAC,KAAK;aACxB,CAAC,GACC,CAAC,UAAU,CAAC,QAAQ,IAAI;gBACzB,SAAS,EAAE,IAAI,IAAI,CAAC,UAAU,CAAC,QAAkB,CAAC,CAAC,WAAW,EAAE;aACjE,CAAC,KACF,WAAW,EAAE,UAAU,CAAC,UAAU,GACnC,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,iCAAsB,CAAC,iBAAiB,CAC7D,IAAI,EACJ,UAAU,CAAC,WAAqB,EAChC;gBACE,iBAAiB,EAAE,OAAO;aAC3B,CACF,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const enrollAContactIntoACourse: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
teamId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
6
|
+
workspaceId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
7
|
+
courseId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
8
|
+
contactId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enrollAContactIntoACourse = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const props_1 = require("../common/props");
|
|
7
|
+
const requests_1 = require("../common/requests");
|
|
8
|
+
const constants_1 = require("../common/constants");
|
|
9
|
+
exports.enrollAContactIntoACourse = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: constants_1.clickfunnelsAuth,
|
|
11
|
+
name: 'enrollAContactIntoACourse',
|
|
12
|
+
displayName: 'Enroll a Contact Into a Course',
|
|
13
|
+
description: 'Create an enrollment for a contact in a course.',
|
|
14
|
+
props: {
|
|
15
|
+
teamId: (0, props_1.teamsDropdown)(['auth']),
|
|
16
|
+
workspaceId: (0, props_1.workspacesDropdown)(['auth', 'teamId']),
|
|
17
|
+
courseId: (0, props_1.coursesDropdown)(['auth', 'workspaceId']),
|
|
18
|
+
contactId: (0, props_1.contactsDropdown)(['auth', 'workspaceId']),
|
|
19
|
+
},
|
|
20
|
+
run(_a) {
|
|
21
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
22
|
+
const payload = {
|
|
23
|
+
courses_enrollment: {
|
|
24
|
+
contact_id: propsValue.contactId
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
const response = yield requests_1.clickfunnelsApiService.createCourseEnrollment(auth, propsValue.courseId, payload);
|
|
28
|
+
return response;
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=enroll-a-contact-into-a-course.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enroll-a-contact-into-a-course.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/clickfunnels/src/lib/actions/enroll-a-contact-into-a-course.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,2CAAuG;AACvG,iDAA4D;AAC5D,mDAAuD;AAE1C,QAAA,yBAAyB,GAAG,IAAA,+BAAY,EAAC;IACpD,IAAI,EAAE,4BAAgB;IACtB,IAAI,EAAE,2BAA2B;IACjC,WAAW,EAAE,gCAAgC;IAC7C,WAAW,EAAE,iDAAiD;IAC9D,KAAK,EAAE;QACL,MAAM,EAAE,IAAA,qBAAa,EAAC,CAAC,MAAM,CAAC,CAAC;QAC/B,WAAW,EAAE,IAAA,0BAAkB,EAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACnD,QAAQ,EAAE,IAAA,uBAAe,EAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAClD,SAAS,EAAE,IAAA,wBAAgB,EAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;KACrD;IACK,GAAG;qEAAC,EAAC,IAAI,EAAE,UAAU,EAAC;YAC1B,MAAM,OAAO,GAAG;gBACd,kBAAkB,EAAE;oBAClB,UAAU,EAAE,UAAU,CAAC,SAAS;iBACjC;aACF,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,iCAAsB,CAAC,sBAAsB,CAAC,IAAI,EAAE,UAAU,CAAC,QAAkB,EAAE,OAAO,CAAC,CAAC;YAEnH,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const removeTagFromContact: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
teamId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
6
|
+
workspaceId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
7
|
+
contactId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
8
|
+
tagId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.removeTagFromContact = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const props_1 = require("../common/props");
|
|
7
|
+
const constants_1 = require("../common/constants");
|
|
8
|
+
const requests_1 = require("../common/requests");
|
|
9
|
+
exports.removeTagFromContact = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: constants_1.clickfunnelsAuth,
|
|
11
|
+
name: 'removeTagFromContact',
|
|
12
|
+
displayName: 'Remove Tag From Contact',
|
|
13
|
+
description: 'Remove a specific tag from a contact.',
|
|
14
|
+
props: {
|
|
15
|
+
teamId: (0, props_1.teamsDropdown)(['auth']),
|
|
16
|
+
workspaceId: (0, props_1.workspacesDropdown)(['auth', 'teamId']),
|
|
17
|
+
contactId: (0, props_1.contactsDropdown)(['auth', 'workspaceId']),
|
|
18
|
+
tagId: (0, props_1.appliedTagsDropdown)(['auth', 'contactId']),
|
|
19
|
+
},
|
|
20
|
+
run(_a) {
|
|
21
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
22
|
+
yield requests_1.clickfunnelsApiService.removeAppliedTags(auth, propsValue.tagId);
|
|
23
|
+
return {
|
|
24
|
+
message: "Tag removed"
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=remove-tag-from-contact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-tag-from-contact.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/clickfunnels/src/lib/actions/remove-tag-from-contact.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,2CAKyB;AACzB,mDAAuD;AACvD,iDAA4D;AAE/C,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,4BAAgB;IACtB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,yBAAyB;IACtC,WAAW,EAAE,uCAAuC;IACpD,KAAK,EAAE;QACL,MAAM,EAAE,IAAA,qBAAa,EAAC,CAAC,MAAM,CAAC,CAAC;QAC/B,WAAW,EAAE,IAAA,0BAAkB,EAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACnD,SAAS,EAAE,IAAA,wBAAgB,EAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QACpD,KAAK,EAAE,IAAA,2BAAmB,EAAC,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;KAClD;IACK,GAAG;qEAAC,EAAC,IAAI,EAAE,UAAU,EAAC;YAC1B,MAAM,iCAAsB,CAAC,iBAAiB,CAAC,IAAI,EAAE,UAAU,CAAC,KAAe,CAAC,CAAC;YAEjF,OAAO;gBACL,OAAO,EAAE,aAAa;aACvB,CAAA;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const searchContacts: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
teamId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
6
|
+
workspaceId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
7
|
+
searchTerm: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.searchContacts = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const constants_1 = require("../common/constants");
|
|
7
|
+
const props_1 = require("../common/props");
|
|
8
|
+
const requests_1 = require("../common/requests");
|
|
9
|
+
exports.searchContacts = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: constants_1.clickfunnelsAuth,
|
|
11
|
+
name: 'searchContacts',
|
|
12
|
+
displayName: 'Search Contacts',
|
|
13
|
+
description: 'Look up contacts by ID or email',
|
|
14
|
+
props: {
|
|
15
|
+
teamId: (0, props_1.teamsDropdown)(['auth']),
|
|
16
|
+
workspaceId: (0, props_1.workspacesDropdown)(['auth', 'teamId']),
|
|
17
|
+
searchTerm: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'Search Query',
|
|
19
|
+
description: 'Filter contacts by either email or id',
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
},
|
|
23
|
+
run(_a) {
|
|
24
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
25
|
+
const response = yield requests_1.clickfunnelsApiService.fetchContactByEmailSearch(auth, propsValue.workspaceId, propsValue.searchTerm);
|
|
26
|
+
return response;
|
|
27
|
+
});
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
//# sourceMappingURL=search-contacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-contacts.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/clickfunnels/src/lib/actions/search-contacts.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,mDAAuD;AACvD,2CAAoE;AACpE,iDAA4D;AAE/C,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,4BAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,iCAAiC;IAC9C,KAAK,EAAE;QACL,MAAM,EAAE,IAAA,qBAAa,EAAC,CAAC,MAAM,CAAC,CAAC;QAC/B,WAAW,EAAE,IAAA,0BAAkB,EAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACnD,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG;qEAAC,EAAE,IAAI,EAAE,UAAU,EAAE;YAC5B,MAAM,QAAQ,GAAG,MAAM,iCAAsB,CAAC,yBAAyB,CACrE,IAAI,EACJ,UAAU,CAAC,WAAqB,EAChC,UAAU,CAAC,UAAoB,CAChC,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const updateOrCreateContact: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
|
+
subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
4
|
+
}>, {
|
|
5
|
+
teamId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
6
|
+
workspaceId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
7
|
+
emailAddress: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
8
|
+
firstName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
9
|
+
lastName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
10
|
+
phoneNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
11
|
+
tagIds: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<unknown, false>;
|
|
12
|
+
customAttributes: import("@activepieces/pieces-framework").ObjectProperty<false>;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateOrCreateContact = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const constants_1 = require("../common/constants");
|
|
7
|
+
const props_1 = require("../common/props");
|
|
8
|
+
const requests_1 = require("../common/requests");
|
|
9
|
+
exports.updateOrCreateContact = (0, pieces_framework_1.createAction)({
|
|
10
|
+
auth: constants_1.clickfunnelsAuth,
|
|
11
|
+
name: 'updateOrCreateContact',
|
|
12
|
+
displayName: 'Update or Create Contact',
|
|
13
|
+
description: 'Searches for a contact by email and updates it, or creates a new one if not found.',
|
|
14
|
+
props: {
|
|
15
|
+
teamId: (0, props_1.teamsDropdown)(['auth']),
|
|
16
|
+
workspaceId: (0, props_1.workspacesDropdown)(['auth', 'teamId']),
|
|
17
|
+
emailAddress: pieces_framework_1.Property.ShortText({
|
|
18
|
+
displayName: 'Email',
|
|
19
|
+
description: "The contact's email address. This is used to find and (update/create) the contact.",
|
|
20
|
+
required: true,
|
|
21
|
+
}),
|
|
22
|
+
firstName: pieces_framework_1.Property.ShortText({
|
|
23
|
+
displayName: 'First Name',
|
|
24
|
+
required: false,
|
|
25
|
+
}),
|
|
26
|
+
lastName: pieces_framework_1.Property.ShortText({
|
|
27
|
+
displayName: 'Last Name',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
phoneNumber: pieces_framework_1.Property.ShortText({
|
|
31
|
+
displayName: 'Phone Number',
|
|
32
|
+
required: false,
|
|
33
|
+
}),
|
|
34
|
+
tagIds: (0, props_1.multiTagsDropdown)(['auth', 'workspaceId']),
|
|
35
|
+
customAttributes: pieces_framework_1.Property.Object({
|
|
36
|
+
displayName: 'Custom Attributes',
|
|
37
|
+
description: 'A key-value object for custom contact data. Keys that are default properties on the Contact resource or variations of it will result in an error. E.g., first_name, First Name, etc. are not valid inputs.',
|
|
38
|
+
required: false,
|
|
39
|
+
}),
|
|
40
|
+
},
|
|
41
|
+
run(_a) {
|
|
42
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* ({ auth, propsValue }) {
|
|
43
|
+
const payload = {
|
|
44
|
+
contact: {
|
|
45
|
+
email_address: propsValue.emailAddress,
|
|
46
|
+
first_name: propsValue.firstName,
|
|
47
|
+
last_name: propsValue.lastName,
|
|
48
|
+
phone_number: propsValue.phoneNumber,
|
|
49
|
+
tag_ids: propsValue.tagIds,
|
|
50
|
+
custom_attributes: propsValue.customAttributes
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
const response = yield requests_1.clickfunnelsApiService.upsertContact(auth, propsValue.workspaceId, payload);
|
|
54
|
+
return response;
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=update-or-create-contact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-or-create-contact.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/clickfunnels/src/lib/actions/update-or-create-contact.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,mDAAuD;AACvD,2CAAuF;AACvF,iDAA4D;AAE/C,QAAA,qBAAqB,GAAG,IAAA,+BAAY,EAAC;IAChD,IAAI,EAAE,4BAAgB;IACtB,IAAI,EAAE,uBAAuB;IAC7B,WAAW,EAAE,0BAA0B;IACvC,WAAW,EACT,oFAAoF;IACtF,KAAK,EAAE;QACL,MAAM,EAAE,IAAA,qBAAa,EAAC,CAAC,MAAM,CAAC,CAAC;QAC/B,WAAW,EAAE,IAAA,0BAAkB,EAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACnD,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,OAAO;YACpB,WAAW,EACT,oFAAoF;YACtF,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,MAAM,EAAE,IAAA,yBAAiB,EAAC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAClD,gBAAgB,EAAE,2BAAQ,CAAC,MAAM,CAAC;YAChC,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,4MAA4M;YACzN,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACK,GAAG;qEAAC,EAAC,IAAI,EAAE,UAAU,EAAC;YAC1B,MAAM,OAAO,GAAG;gBACd,OAAO,EAAE;oBACP,aAAa,EAAE,UAAU,CAAC,YAAY;oBACtC,UAAU,EAAE,UAAU,CAAC,SAAS;oBAChC,SAAS,EAAE,UAAU,CAAC,QAAQ;oBAC9B,YAAY,EAAE,UAAU,CAAC,WAAW;oBACpC,OAAO,EAAE,UAAU,CAAC,MAAM;oBAC1B,iBAAiB,EAAE,UAAU,CAAC,gBAAgB;iBAC/C;aACF,CAAC;YAEF,MAAM,QAAQ,GAAG,MAAM,iCAAsB,CAAC,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,WAAqB,EAAE,OAAO,CAAC,CAAC;YAE7G,OAAO,QAAQ,CAAA;QACjB,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const CLICKFUNNELS_BASE_URL: (subdomain: string) => string;
|
|
2
|
+
export declare const API_ENDPOINTS: {
|
|
3
|
+
ME: string;
|
|
4
|
+
TEAMS: string;
|
|
5
|
+
WORKSPACES: string;
|
|
6
|
+
PIPELINES: string;
|
|
7
|
+
CONTACTS: string;
|
|
8
|
+
COURSES: string;
|
|
9
|
+
TAGS: string;
|
|
10
|
+
};
|
|
11
|
+
export type CLICKFUNNELS_APIKEY_AUTH = {
|
|
12
|
+
subdomain: string;
|
|
13
|
+
apiKey: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const clickfunnelsAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
16
|
+
subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
17
|
+
apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.clickfunnelsAuth = exports.API_ENDPOINTS = exports.CLICKFUNNELS_BASE_URL = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
+
const requests_1 = require("./requests");
|
|
7
|
+
const CLICKFUNNELS_BASE_URL = (subdomain) => `https://${subdomain}.myclickfunnels.com/api/v2`;
|
|
8
|
+
exports.CLICKFUNNELS_BASE_URL = CLICKFUNNELS_BASE_URL;
|
|
9
|
+
exports.API_ENDPOINTS = {
|
|
10
|
+
ME: '/me',
|
|
11
|
+
TEAMS: '/teams',
|
|
12
|
+
WORKSPACES: '/workspaces',
|
|
13
|
+
PIPELINES: '/sales/pipelines',
|
|
14
|
+
CONTACTS: '/contacts',
|
|
15
|
+
COURSES: '/courses',
|
|
16
|
+
TAGS: '/tags',
|
|
17
|
+
};
|
|
18
|
+
exports.clickfunnelsAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
19
|
+
description: 'Enter your ClickFunnels subdomain and API key.',
|
|
20
|
+
required: true,
|
|
21
|
+
props: {
|
|
22
|
+
subdomain: pieces_framework_1.Property.ShortText({
|
|
23
|
+
displayName: 'Subdomain',
|
|
24
|
+
description: 'Your ClickFunnels subdomain (e.g., if your URL is https://mycompany.myclickfunnels.com, enter "mycompany").',
|
|
25
|
+
required: true,
|
|
26
|
+
}),
|
|
27
|
+
apiKey: pieces_framework_1.PieceAuth.SecretText({
|
|
28
|
+
displayName: 'API Key',
|
|
29
|
+
description: 'Your ClickFunnels API key. You can find this in your ClickFunnels account settings.',
|
|
30
|
+
required: true,
|
|
31
|
+
}),
|
|
32
|
+
},
|
|
33
|
+
validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
34
|
+
try {
|
|
35
|
+
yield requests_1.clickfunnelsApiService.fetchCurrentlyLoggedInUser(auth).catch((err) => {
|
|
36
|
+
throw new Error("something went wrong. Please check your username and API key and try again.");
|
|
37
|
+
});
|
|
38
|
+
return {
|
|
39
|
+
valid: true,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
return {
|
|
44
|
+
valid: false,
|
|
45
|
+
error: `Connection failed: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/clickfunnels/src/lib/common/constants.ts"],"names":[],"mappings":";;;;AAAA,qEAAqE;AACrE,yCAAoD;AAE7C,MAAM,qBAAqB,GAAG,CAAC,SAAiB,EAAE,EAAE,CAAC,WAAW,SAAS,4BAA4B,CAAC;AAAhG,QAAA,qBAAqB,yBAA2E;AAEhG,QAAA,aAAa,GAAG;IAC3B,EAAE,EAAE,KAAK;IACT,KAAK,EAAE,QAAQ;IACf,UAAU,EAAE,aAAa;IACzB,SAAS,EAAE,kBAAkB;IAC7B,QAAQ,EAAE,WAAW;IACrB,OAAO,EAAE,UAAU;IACnB,IAAI,EAAE,OAAO;CACd,CAAC;AAOW,QAAA,gBAAgB,GAAG,4BAAS,CAAC,UAAU,CAAC;IACnD,WAAW,EAAE,gDAAgD;IAC7D,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,WAAW,EACT,6GAA6G;YAC/G,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,MAAM,EAAE,4BAAS,CAAC,UAAU,CAAC;YAC3B,WAAW,EAAE,SAAS;YACtB,WAAW,EACT,qFAAqF;YACvF,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACD,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,iCAAsB,CAAC,0BAA0B,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBAC1E,MAAM,IAAI,KAAK,CAAC,6EAA6E,CAAC,CAAA;YAChG,CAAC,CAAC,CAAA;YAEF,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,KAAK,EAAE,KAAK;gBACZ,KAAK,EAAE,sBACL,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAC3C,EAAE;aACH,CAAC;QACJ,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const teamsDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
2
|
+
export declare const coursesDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
3
|
+
export declare const teamMembershipsDropdown: (refreshers: string[], required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<any, false> | import("@activepieces/pieces-framework").DropdownProperty<any, true>;
|
|
4
|
+
export declare const workspacesDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
5
|
+
export declare const pipelinesDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
6
|
+
export declare const pipelineStagesDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
7
|
+
export declare const contactsDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
8
|
+
export declare const tagsDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|
|
9
|
+
export declare const multiTagsDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").MultiSelectDropdownProperty<unknown, false>;
|
|
10
|
+
export declare const appliedTagsDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true>;
|