@activepieces/piece-clickfunnels 0.1.4 → 0.1.6

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 (56) hide show
  1. package/package.json +7 -22
  2. package/src/index.js +13 -64
  3. package/README.md +0 -7
  4. package/src/index.d.ts +0 -4
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/apply-tag-to-contact.d.ts +0 -21
  7. package/src/lib/actions/apply-tag-to-contact.js +0 -32
  8. package/src/lib/actions/apply-tag-to-contact.js.map +0 -1
  9. package/src/lib/actions/create-opportunity.d.ts +0 -35
  10. package/src/lib/actions/create-opportunity.js +0 -51
  11. package/src/lib/actions/create-opportunity.js.map +0 -1
  12. package/src/lib/actions/enroll-a-contact-into-a-course.d.ts +0 -21
  13. package/src/lib/actions/enroll-a-contact-into-a-course.js +0 -32
  14. package/src/lib/actions/enroll-a-contact-into-a-course.js.map +0 -1
  15. package/src/lib/actions/remove-tag-from-contact.d.ts +0 -21
  16. package/src/lib/actions/remove-tag-from-contact.js +0 -29
  17. package/src/lib/actions/remove-tag-from-contact.js.map +0 -1
  18. package/src/lib/actions/search-contacts.d.ts +0 -14
  19. package/src/lib/actions/search-contacts.js +0 -30
  20. package/src/lib/actions/search-contacts.js.map +0 -1
  21. package/src/lib/actions/update-or-create-contact.d.ts +0 -22
  22. package/src/lib/actions/update-or-create-contact.js +0 -58
  23. package/src/lib/actions/update-or-create-contact.js.map +0 -1
  24. package/src/lib/common/constants.d.ts +0 -18
  25. package/src/lib/common/constants.js +0 -50
  26. package/src/lib/common/constants.js.map +0 -1
  27. package/src/lib/common/props.d.ts +0 -43
  28. package/src/lib/common/props.js +0 -420
  29. package/src/lib/common/props.js.map +0 -1
  30. package/src/lib/common/requests.d.ts +0 -21
  31. package/src/lib/common/requests.js +0 -179
  32. package/src/lib/common/requests.js.map +0 -1
  33. package/src/lib/triggers/contact-completed-course.d.ts +0 -50
  34. package/src/lib/triggers/contact-completed-course.js +0 -62
  35. package/src/lib/triggers/contact-completed-course.js.map +0 -1
  36. package/src/lib/triggers/contact-identified.d.ts +0 -50
  37. package/src/lib/triggers/contact-identified.js +0 -62
  38. package/src/lib/triggers/contact-identified.js.map +0 -1
  39. package/src/lib/triggers/contact-submitted-form.d.ts +0 -50
  40. package/src/lib/triggers/contact-submitted-form.js +0 -62
  41. package/src/lib/triggers/contact-submitted-form.js.map +0 -1
  42. package/src/lib/triggers/contact-suspended-from-course.d.ts +0 -50
  43. package/src/lib/triggers/contact-suspended-from-course.js +0 -62
  44. package/src/lib/triggers/contact-suspended-from-course.js.map +0 -1
  45. package/src/lib/triggers/course-enrollment-created-for-contact.d.ts +0 -50
  46. package/src/lib/triggers/course-enrollment-created-for-contact.js +0 -62
  47. package/src/lib/triggers/course-enrollment-created-for-contact.js.map +0 -1
  48. package/src/lib/triggers/one-time-order-paid.d.ts +0 -50
  49. package/src/lib/triggers/one-time-order-paid.js +0 -62
  50. package/src/lib/triggers/one-time-order-paid.js.map +0 -1
  51. package/src/lib/triggers/scheduled-appointment-event-created.d.ts +0 -50
  52. package/src/lib/triggers/scheduled-appointment-event-created.js +0 -62
  53. package/src/lib/triggers/scheduled-appointment-event-created.js.map +0 -1
  54. package/src/lib/triggers/subscription-invoice-paid.d.ts +0 -50
  55. package/src/lib/triggers/subscription-invoice-paid.js +0 -62
  56. package/src/lib/triggers/subscription-invoice-paid.js.map +0 -1
@@ -1,51 +0,0 @@
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.props, propsValue.workspaceId, {
45
- sales_opportunity: payload,
46
- });
47
- return response;
48
- });
49
- },
50
- });
51
- //# sourceMappingURL=create-opportunity.js.map
@@ -1 +0,0 @@
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,IAA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C,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,CAAC,KAAK,EACV,UAAU,CAAC,WAAqB,EAChC;gBACE,iBAAiB,EAAE,OAAO;aAC3B,CACF,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,21 +0,0 @@
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, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
- }>>;
9
- workspaceId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
10
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
- }>>;
13
- courseId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
14
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
15
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
16
- }>>;
17
- contactId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
18
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- }>>;
21
- }>;
@@ -1,32 +0,0 @@
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.props, propsValue.courseId, payload);
28
- return response;
29
- });
30
- },
31
- });
32
- //# sourceMappingURL=enroll-a-contact-into-a-course.js.map
@@ -1 +0,0 @@
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,CAAC,KAAK,EAAE,UAAU,CAAC,QAAkB,EAAE,OAAO,CAAC,CAAC;YAEzH,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,21 +0,0 @@
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, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
- }>>;
9
- workspaceId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
10
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
- }>>;
13
- contactId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
14
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
15
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
16
- }>>;
17
- tagId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
18
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- }>>;
21
- }>;
@@ -1,29 +0,0 @@
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.props, propsValue.tagId);
23
- return {
24
- message: "Tag removed"
25
- };
26
- });
27
- },
28
- });
29
- //# sourceMappingURL=remove-tag-from-contact.js.map
@@ -1 +0,0 @@
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,CAAC,KAAK,EAAE,UAAU,CAAC,KAAe,CAAC,CAAC;YACvF,OAAO;gBACL,OAAO,EAAE,aAAa;aACvB,CAAA;QACH,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,14 +0,0 @@
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, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
- }>>;
9
- workspaceId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
10
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
- }>>;
13
- searchTerm: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
- }>;
@@ -1,30 +0,0 @@
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.props, propsValue.workspaceId, propsValue.searchTerm);
26
- return response;
27
- });
28
- },
29
- });
30
- //# sourceMappingURL=search-contacts.js.map
@@ -1 +0,0 @@
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,CAAC,KAAK,EACV,UAAU,CAAC,WAAqB,EAChC,UAAU,CAAC,UAAoB,CAChC,CAAC;YAEF,OAAO,QAAQ,CAAC;QAClB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,22 +0,0 @@
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, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
- }>>;
9
- workspaceId: import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
10
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
- }>>;
13
- emailAddress: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
- firstName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
15
- lastName: import("@activepieces/pieces-framework").ShortTextProperty<false>;
16
- phoneNumber: import("@activepieces/pieces-framework").ShortTextProperty<false>;
17
- tagIds: import("@activepieces/pieces-framework").MultiSelectDropdownProperty<unknown, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
18
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
19
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
20
- }>>;
21
- customAttributes: import("@activepieces/pieces-framework").ObjectProperty<false>;
22
- }>;
@@ -1,58 +0,0 @@
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.props, propsValue.workspaceId, payload);
54
- return response;
55
- });
56
- },
57
- });
58
- //# sourceMappingURL=update-or-create-contact.js.map
@@ -1 +0,0 @@
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,CAAC,KAAK,EAAE,UAAU,CAAC,WAAqB,EAAE,OAAO,CAAC,CAAC;YAEnH,OAAO,QAAQ,CAAA;QACjB,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -1,18 +0,0 @@
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
- }>;
@@ -1,50 +0,0 @@
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
@@ -1 +0,0 @@
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,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unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
2
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
- }>>;
5
- export declare const coursesDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
6
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
7
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
8
- }>>;
9
- export declare const teamMembershipsDropdown: (refreshers: string[], required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<any, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
10
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
11
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
12
- }>> | import("@activepieces/pieces-framework").DropdownProperty<any, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
13
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
14
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
15
- }>>;
16
- export declare const workspacesDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
17
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
18
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
19
- }>>;
20
- export declare const pipelinesDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
21
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
22
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
23
- }>>;
24
- export declare const pipelineStagesDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
25
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
26
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
27
- }>>;
28
- export declare const contactsDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
29
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
30
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
31
- }>>;
32
- export declare const tagsDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
33
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
34
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
35
- }>>;
36
- export declare const multiTagsDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").MultiSelectDropdownProperty<unknown, false, import("@activepieces/pieces-framework").CustomAuthProperty<{
37
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
38
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
39
- }>>;
40
- export declare const appliedTagsDropdown: (refreshers: string[]) => import("@activepieces/pieces-framework").DropdownProperty<unknown, true, import("@activepieces/pieces-framework").CustomAuthProperty<{
41
- subdomain: import("@activepieces/pieces-framework").ShortTextProperty<true>;
42
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
43
- }>>;