@activepieces/piece-getresponse 0.0.4 → 0.0.5

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 (41) hide show
  1. package/package.json +7 -12
  2. package/src/index.js +19 -42
  3. package/src/index.d.ts +0 -6
  4. package/src/index.d.ts.map +0 -1
  5. package/src/index.js.map +0 -1
  6. package/src/lib/actions/create-contact.d.ts +0 -12
  7. package/src/lib/actions/create-contact.d.ts.map +0 -1
  8. package/src/lib/actions/create-contact.js +0 -47
  9. package/src/lib/actions/create-contact.js.map +0 -1
  10. package/src/lib/actions/create-newsletter.d.ts +0 -24
  11. package/src/lib/actions/create-newsletter.d.ts.map +0 -1
  12. package/src/lib/actions/create-newsletter.js +0 -79
  13. package/src/lib/actions/create-newsletter.js.map +0 -1
  14. package/src/lib/actions/create-or-update-contact.d.ts +0 -12
  15. package/src/lib/actions/create-or-update-contact.d.ts.map +0 -1
  16. package/src/lib/actions/create-or-update-contact.js +0 -72
  17. package/src/lib/actions/create-or-update-contact.js.map +0 -1
  18. package/src/lib/actions/find-campaign-list.d.ts +0 -7
  19. package/src/lib/actions/find-campaign-list.d.ts.map +0 -1
  20. package/src/lib/actions/find-campaign-list.js +0 -39
  21. package/src/lib/actions/find-campaign-list.js.map +0 -1
  22. package/src/lib/actions/find-contact.d.ts +0 -11
  23. package/src/lib/actions/find-contact.d.ts.map +0 -1
  24. package/src/lib/actions/find-contact.js +0 -47
  25. package/src/lib/actions/find-contact.js.map +0 -1
  26. package/src/lib/common/auth.d.ts +0 -14
  27. package/src/lib/common/auth.d.ts.map +0 -1
  28. package/src/lib/common/auth.js +0 -47
  29. package/src/lib/common/auth.js.map +0 -1
  30. package/src/lib/common/client.d.ts +0 -125
  31. package/src/lib/common/client.d.ts.map +0 -1
  32. package/src/lib/common/client.js +0 -199
  33. package/src/lib/common/client.js.map +0 -1
  34. package/src/lib/common/props.d.ts +0 -13
  35. package/src/lib/common/props.d.ts.map +0 -1
  36. package/src/lib/common/props.js +0 -79
  37. package/src/lib/common/props.js.map +0 -1
  38. package/src/lib/common/utils.d.ts +0 -2
  39. package/src/lib/common/utils.d.ts.map +0 -1
  40. package/src/lib/common/utils.js +0 -10
  41. package/src/lib/common/utils.js.map +0 -1
@@ -1,13 +0,0 @@
1
- export declare const getresponseProps: {
2
- campaign: (required?: boolean) => import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
3
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
4
- }>)[]> | import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
5
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
6
- }>)[]>;
7
- fromField: (required?: boolean, displayName?: string) => import("@activepieces/pieces-framework").DropdownProperty<string, false, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
8
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
9
- }>)[]> | import("@activepieces/pieces-framework").DropdownProperty<string, true, (import("@activepieces/pieces-framework").OAuth2Property<import("@activepieces/pieces-framework").OAuth2Props> | import("@activepieces/pieces-framework").CustomAuthProperty<{
10
- apiKey: import("@activepieces/pieces-framework").SecretTextProperty<true>;
11
- }>)[]>;
12
- };
13
- //# sourceMappingURL=props.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/props.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,gBAAgB;;;;;;;;;;;CA2E5B,CAAC"}
@@ -1,79 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getresponseProps = void 0;
4
- const tslib_1 = require("tslib");
5
- const pieces_framework_1 = require("@activepieces/pieces-framework");
6
- const auth_1 = require("./auth");
7
- const client_1 = require("./client");
8
- exports.getresponseProps = {
9
- campaign: (required = true) => pieces_framework_1.Property.Dropdown({
10
- auth: auth_1.getresponseAuth,
11
- displayName: 'Campaign',
12
- description: 'Select the campaign list to use.',
13
- required,
14
- refreshers: [],
15
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
16
- if (!auth) {
17
- return {
18
- disabled: true,
19
- options: [],
20
- placeholder: 'Connect your account first',
21
- };
22
- }
23
- const campaigns = yield (0, client_1.listGetResponseCampaigns)({
24
- auth: auth,
25
- });
26
- if (campaigns.length === 0) {
27
- return {
28
- disabled: false,
29
- options: [],
30
- placeholder: 'No campaigns found. Create one in GetResponse first.',
31
- };
32
- }
33
- return {
34
- disabled: false,
35
- options: campaigns.map((campaign) => {
36
- var _a;
37
- return ({
38
- label: (_a = campaign.name) !== null && _a !== void 0 ? _a : campaign.campaignId,
39
- value: campaign.campaignId,
40
- });
41
- }),
42
- };
43
- }),
44
- }),
45
- fromField: (required = true, displayName = 'From Address') => pieces_framework_1.Property.Dropdown({
46
- auth: auth_1.getresponseAuth,
47
- displayName,
48
- description: 'Select the verified sender address to use.',
49
- required,
50
- refreshers: [],
51
- options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
52
- if (!auth) {
53
- return {
54
- disabled: true,
55
- options: [],
56
- placeholder: 'Connect your account first',
57
- };
58
- }
59
- const fromFields = yield (0, client_1.listGetResponseFromFields)(auth);
60
- if (fromFields.length === 0) {
61
- return {
62
- disabled: false,
63
- options: [],
64
- placeholder: 'No active sender addresses found in GetResponse.',
65
- };
66
- }
67
- return {
68
- disabled: false,
69
- options: fromFields.map((fromField) => ({
70
- label: fromField.name
71
- ? `${fromField.name} (${fromField.email})`
72
- : fromField.email,
73
- value: fromField.fromFieldId,
74
- })),
75
- };
76
- }),
77
- }),
78
- };
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G,cAAc,EAAE,EAAE,CAC3D,2BAAQ,CAAC,QAAQ,CAAC;QAChB,IAAI,EAAE,sBAAe;QACrB,WAAW;QACX,WAAW,EAAE,4CAA4C;QACzD,QAAQ;QACR,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;YACtB,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO;oBACL,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,4BAA4B;iBAC1C,CAAC;YACJ,CAAC;YAED,MAAM,UAAU,GAAG,MAAM,IAAA,kCAAyB,EAAC,IAA4B,CAAC,CAAC;YAEjF,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC5B,OAAO;oBACL,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,EAAE;oBACX,WAAW,EAAE,kDAAkD;iBAChE,CAAC;YACJ,CAAC;YAED,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;oBACtC,KAAK,EAAE,SAAS,CAAC,IAAI;wBACnB,CAAC,CAAC,GAAG,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,KAAK,GAAG;wBAC1C,CAAC,CAAC,SAAS,CAAC,KAAK;oBACnB,KAAK,EAAE,SAAS,CAAC,WAAW;iBAC7B,CAAC,CAAC;aACJ,CAAC;QACJ,CAAC,CAAA;KACF,CAAC;CACL,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare function requireString(value: string | undefined, fieldName: string): string;
2
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/lib/common/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,CAKlF"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.requireString = requireString;
4
- function requireString(value, fieldName) {
5
- if (!value) {
6
- throw new Error(`${fieldName} is required.`);
7
- }
8
- return value;
9
- }
10
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/lib/common/utils.ts"],"names":[],"mappings":";;AAAA,sCAKC;AALD,SAAgB,aAAa,CAAC,KAAyB,EAAE,SAAiB;IACxE,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,eAAe,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}