@activepieces/piece-promotekit 0.3.2 → 0.3.3
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/package.json +7 -12
- package/src/index.js +48 -78
- package/src/index.d.ts +0 -3
- package/src/index.d.ts.map +0 -1
- package/src/index.js.map +0 -1
- package/src/lib/actions/create-affiliate.d.ts +0 -7
- package/src/lib/actions/create-affiliate.d.ts.map +0 -1
- package/src/lib/actions/create-affiliate.js +0 -56
- package/src/lib/actions/create-affiliate.js.map +0 -1
- package/src/lib/actions/create-referral.d.ts +0 -5
- package/src/lib/actions/create-referral.d.ts.map +0 -1
- package/src/lib/actions/create-referral.js +0 -42
- package/src/lib/actions/create-referral.js.map +0 -1
- package/src/lib/actions/find-affiliate.d.ts +0 -4
- package/src/lib/actions/find-affiliate.d.ts.map +0 -1
- package/src/lib/actions/find-affiliate.js +0 -37
- package/src/lib/actions/find-affiliate.js.map +0 -1
- package/src/lib/actions/find-campaign.d.ts +0 -4
- package/src/lib/actions/find-campaign.d.ts.map +0 -1
- package/src/lib/actions/find-campaign.js +0 -44
- package/src/lib/actions/find-campaign.js.map +0 -1
- package/src/lib/actions/find-commission.d.ts +0 -4
- package/src/lib/actions/find-commission.d.ts.map +0 -1
- package/src/lib/actions/find-commission.js +0 -37
- package/src/lib/actions/find-commission.js.map +0 -1
- package/src/lib/actions/find-payout.d.ts +0 -4
- package/src/lib/actions/find-payout.d.ts.map +0 -1
- package/src/lib/actions/find-payout.js +0 -37
- package/src/lib/actions/find-payout.js.map +0 -1
- package/src/lib/actions/find-referral.d.ts +0 -4
- package/src/lib/actions/find-referral.d.ts.map +0 -1
- package/src/lib/actions/find-referral.js +0 -37
- package/src/lib/actions/find-referral.js.map +0 -1
- package/src/lib/actions/list-affiliates.d.ts +0 -5
- package/src/lib/actions/list-affiliates.d.ts.map +0 -1
- package/src/lib/actions/list-affiliates.js +0 -49
- package/src/lib/actions/list-affiliates.js.map +0 -1
- package/src/lib/actions/list-campaigns.d.ts +0 -2
- package/src/lib/actions/list-campaigns.d.ts.map +0 -1
- package/src/lib/actions/list-campaigns.js +0 -40
- package/src/lib/actions/list-campaigns.js.map +0 -1
- package/src/lib/actions/list-commissions.d.ts +0 -5
- package/src/lib/actions/list-commissions.d.ts.map +0 -1
- package/src/lib/actions/list-commissions.js +0 -49
- package/src/lib/actions/list-commissions.js.map +0 -1
- package/src/lib/actions/list-payouts.d.ts +0 -5
- package/src/lib/actions/list-payouts.d.ts.map +0 -1
- package/src/lib/actions/list-payouts.js +0 -49
- package/src/lib/actions/list-payouts.js.map +0 -1
- package/src/lib/actions/list-referrals.d.ts +0 -5
- package/src/lib/actions/list-referrals.d.ts.map +0 -1
- package/src/lib/actions/list-referrals.js +0 -49
- package/src/lib/actions/list-referrals.js.map +0 -1
- package/src/lib/actions/update-affiliate.d.ts +0 -9
- package/src/lib/actions/update-affiliate.d.ts.map +0 -1
- package/src/lib/actions/update-affiliate.js +0 -72
- package/src/lib/actions/update-affiliate.js.map +0 -1
- package/src/lib/common/index.d.ts +0 -27
- package/src/lib/common/index.d.ts.map +0 -1
- package/src/lib/common/index.js +0 -190
- package/src/lib/common/index.js.map +0 -1
- package/src/lib/triggers/new-affiliate-event.d.ts +0 -15
- package/src/lib/triggers/new-affiliate-event.d.ts.map +0 -1
- package/src/lib/triggers/new-affiliate-event.js +0 -94
- package/src/lib/triggers/new-affiliate-event.js.map +0 -1
- package/src/lib/triggers/new-commission-event.d.ts +0 -11
- package/src/lib/triggers/new-commission-event.d.ts.map +0 -1
- package/src/lib/triggers/new-commission-event.js +0 -74
- package/src/lib/triggers/new-commission-event.js.map +0 -1
- package/src/lib/triggers/new-referral-event.d.ts +0 -15
- package/src/lib/triggers/new-referral-event.d.ts.map +0 -1
- package/src/lib/triggers/new-referral-event.js +0 -93
- package/src/lib/triggers/new-referral-event.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-referrals.js","sourceRoot":"","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-1,9 +0,0 @@
|
|
|
1
|
-
export declare const updateAffiliate: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
2
|
-
affiliate_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
first_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
|
-
last_name: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
5
|
-
payout_email: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
6
|
-
approved: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
7
|
-
banned: import("@activepieces/pieces-framework").CheckboxProperty<false>;
|
|
8
|
-
}>;
|
|
9
|
-
//# sourceMappingURL=update-affiliate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-affiliate.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/update-affiliate.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;;;;;;;EA0D1B,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateAffiliate = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const __1 = require("../..");
|
|
8
|
-
const common_1 = require("../common");
|
|
9
|
-
exports.updateAffiliate = (0, pieces_framework_1.createAction)({
|
|
10
|
-
auth: __1.promotekitAuth,
|
|
11
|
-
name: 'update_affiliate',
|
|
12
|
-
displayName: 'Update Affiliate',
|
|
13
|
-
description: 'Update an existing affiliate in PromoteKit.',
|
|
14
|
-
audience: 'both',
|
|
15
|
-
aiMetadata: {
|
|
16
|
-
description: 'Update an existing affiliate identified by affiliate ID, changing only the fields you supply (name, payout email, approved, banned); omitted fields are left untouched. Use to approve, ban, or edit an affiliate. Idempotent: re-sending the same field values leaves the affiliate in the same state.',
|
|
17
|
-
idempotent: true,
|
|
18
|
-
},
|
|
19
|
-
props: {
|
|
20
|
-
affiliate_id: pieces_framework_1.Property.ShortText({
|
|
21
|
-
displayName: 'Affiliate ID',
|
|
22
|
-
description: 'The ID of the affiliate to update.',
|
|
23
|
-
required: true,
|
|
24
|
-
}),
|
|
25
|
-
first_name: pieces_framework_1.Property.ShortText({
|
|
26
|
-
displayName: 'First Name',
|
|
27
|
-
required: false,
|
|
28
|
-
}),
|
|
29
|
-
last_name: pieces_framework_1.Property.ShortText({
|
|
30
|
-
displayName: 'Last Name',
|
|
31
|
-
required: false,
|
|
32
|
-
}),
|
|
33
|
-
payout_email: pieces_framework_1.Property.ShortText({
|
|
34
|
-
displayName: 'Payout Email',
|
|
35
|
-
description: 'The email address where the affiliate receives payouts.',
|
|
36
|
-
required: false,
|
|
37
|
-
}),
|
|
38
|
-
approved: pieces_framework_1.Property.Checkbox({
|
|
39
|
-
displayName: 'Approved',
|
|
40
|
-
description: 'Whether the affiliate is approved.',
|
|
41
|
-
required: false,
|
|
42
|
-
}),
|
|
43
|
-
banned: pieces_framework_1.Property.Checkbox({
|
|
44
|
-
displayName: 'Banned',
|
|
45
|
-
description: 'Whether the affiliate is banned.',
|
|
46
|
-
required: false,
|
|
47
|
-
}),
|
|
48
|
-
},
|
|
49
|
-
run(context) {
|
|
50
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
const body = {};
|
|
52
|
-
if (context.propsValue.first_name !== undefined)
|
|
53
|
-
body['first_name'] = context.propsValue.first_name;
|
|
54
|
-
if (context.propsValue.last_name !== undefined)
|
|
55
|
-
body['last_name'] = context.propsValue.last_name;
|
|
56
|
-
if (context.propsValue.payout_email !== undefined)
|
|
57
|
-
body['payout_email'] = context.propsValue.payout_email;
|
|
58
|
-
if (context.propsValue.approved !== undefined)
|
|
59
|
-
body['approved'] = context.propsValue.approved;
|
|
60
|
-
if (context.propsValue.banned !== undefined)
|
|
61
|
-
body['banned'] = context.propsValue.banned;
|
|
62
|
-
const response = yield (0, common_1.promotekitApiCall)({
|
|
63
|
-
token: context.auth.secret_text,
|
|
64
|
-
method: pieces_common_1.HttpMethod.PUT,
|
|
65
|
-
path: `/affiliates/${context.propsValue.affiliate_id}`,
|
|
66
|
-
body,
|
|
67
|
-
});
|
|
68
|
-
return common_1.promotekitCommon.flattenAffiliate(response.body.data);
|
|
69
|
-
});
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=update-affiliate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-affiliate.js","sourceRoot":"","sources":["../../../../src/lib/actions/update-affiliate.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,6BAAuC;AACvC,sCAAgE;AAEnD,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,kBAAc;IACpB,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,6CAA6C;IAC1D,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE;QACV,WAAW,EAAE,ySAAyS;QACtT,UAAU,EAAE,IAAI;KACjB;IACD,KAAK,EAAE;QACL,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,oCAAoC;YACjD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,UAAU,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC7B,WAAW,EAAE,YAAY;YACzB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,QAAQ,EAAE,KAAK;SAChB,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EA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tD,IAAI;aACL,CAAC,CAAC;YACH,OAAO,yBAAgB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/D,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { HttpMethod, HttpMessageBody, HttpResponse } from '@activepieces/pieces-common';
|
|
2
|
-
export declare function promotekitApiCall<T extends HttpMessageBody>({ token, method, path, body, queryParams, }: {
|
|
3
|
-
token: string;
|
|
4
|
-
method: HttpMethod;
|
|
5
|
-
path: string;
|
|
6
|
-
body?: unknown;
|
|
7
|
-
queryParams?: Record<string, string>;
|
|
8
|
-
}): Promise<HttpResponse<T>>;
|
|
9
|
-
export declare function promotekitPaginatedApiCall<T>({ token, path, queryParams, }: {
|
|
10
|
-
token: string;
|
|
11
|
-
path: string;
|
|
12
|
-
queryParams?: Record<string, string>;
|
|
13
|
-
}): Promise<T[]>;
|
|
14
|
-
declare function flattenAffiliate(affiliate: Record<string, unknown>): Record<string, unknown>;
|
|
15
|
-
declare function flattenReferral(referral: Record<string, unknown>): Record<string, unknown>;
|
|
16
|
-
declare function flattenCommission(commission: Record<string, unknown>): Record<string, unknown>;
|
|
17
|
-
declare function flattenPayout(payout: Record<string, unknown>): Record<string, unknown>;
|
|
18
|
-
export declare const promotekitCommon: {
|
|
19
|
-
flattenAffiliate: typeof flattenAffiliate;
|
|
20
|
-
flattenReferral: typeof flattenReferral;
|
|
21
|
-
flattenCommission: typeof flattenCommission;
|
|
22
|
-
flattenPayout: typeof flattenPayout;
|
|
23
|
-
campaignDropdown: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
24
|
-
affiliateDropdown: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
25
|
-
};
|
|
26
|
-
export {};
|
|
27
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@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,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAe/E;AAED,eAAO,MAAM,gBAAgB;;;;;;;CAsE5B,CAAC"}
|
package/src/lib/common/index.js
DELETED
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.promotekitCommon = void 0;
|
|
4
|
-
exports.promotekitApiCall = promotekitApiCall;
|
|
5
|
-
exports.promotekitPaginatedApiCall = promotekitPaginatedApiCall;
|
|
6
|
-
const tslib_1 = require("tslib");
|
|
7
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
9
|
-
const __1 = require("../..");
|
|
10
|
-
const BASE_URL = 'https://www.promotekit.com/api/v1';
|
|
11
|
-
function promotekitApiCall(_a) {
|
|
12
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ token, method, path, body, queryParams, }) {
|
|
13
|
-
return yield pieces_common_1.httpClient.sendRequest({
|
|
14
|
-
method,
|
|
15
|
-
url: `${BASE_URL}${path}`,
|
|
16
|
-
authentication: {
|
|
17
|
-
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
18
|
-
token,
|
|
19
|
-
},
|
|
20
|
-
queryParams,
|
|
21
|
-
body,
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
const MAX_PAGES = 100;
|
|
26
|
-
function promotekitPaginatedApiCall(_a) {
|
|
27
|
-
return tslib_1.__awaiter(this, arguments, void 0, function* ({ token, path, queryParams, }) {
|
|
28
|
-
const results = [];
|
|
29
|
-
let page = 1;
|
|
30
|
-
let hasMore = true;
|
|
31
|
-
while (hasMore && page <= MAX_PAGES) {
|
|
32
|
-
const response = yield promotekitApiCall({
|
|
33
|
-
token,
|
|
34
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
35
|
-
path,
|
|
36
|
-
queryParams: Object.assign(Object.assign({}, queryParams), { page: String(page), limit: '100' }),
|
|
37
|
-
});
|
|
38
|
-
results.push(...response.body.data);
|
|
39
|
-
hasMore = response.body.has_more;
|
|
40
|
-
page++;
|
|
41
|
-
}
|
|
42
|
-
return results;
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
function flattenAffiliate(affiliate) {
|
|
46
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
47
|
-
const campaign = affiliate['campaign'];
|
|
48
|
-
const links = affiliate['links'];
|
|
49
|
-
const promoCodes = affiliate['promo_codes'];
|
|
50
|
-
return {
|
|
51
|
-
id: affiliate['id'],
|
|
52
|
-
email: affiliate['email'],
|
|
53
|
-
first_name: affiliate['first_name'],
|
|
54
|
-
last_name: affiliate['last_name'],
|
|
55
|
-
payout_email: (_a = affiliate['payout_email']) !== null && _a !== void 0 ? _a : null,
|
|
56
|
-
clicks: (_b = affiliate['clicks']) !== null && _b !== void 0 ? _b : 0,
|
|
57
|
-
approved: (_c = affiliate['approved']) !== null && _c !== void 0 ? _c : false,
|
|
58
|
-
banned: (_d = affiliate['banned']) !== null && _d !== void 0 ? _d : false,
|
|
59
|
-
links: links
|
|
60
|
-
? links.map((l) => `${l['url']} (${l['code']})`).join(', ')
|
|
61
|
-
: null,
|
|
62
|
-
promo_codes: promoCodes
|
|
63
|
-
? promoCodes.map((p) => p['code']).join(', ')
|
|
64
|
-
: null,
|
|
65
|
-
campaign_id: (_e = campaign === null || campaign === void 0 ? void 0 : campaign['id']) !== null && _e !== void 0 ? _e : null,
|
|
66
|
-
campaign_name: (_f = campaign === null || campaign === void 0 ? void 0 : campaign['name']) !== null && _f !== void 0 ? _f : null,
|
|
67
|
-
campaign_commission_type: (_g = campaign === null || campaign === void 0 ? void 0 : campaign['commission_type']) !== null && _g !== void 0 ? _g : null,
|
|
68
|
-
campaign_commission_amount: (_h = campaign === null || campaign === void 0 ? void 0 : campaign['commission_amount']) !== null && _h !== void 0 ? _h : null,
|
|
69
|
-
created_at: affiliate['created_at'],
|
|
70
|
-
updated_at: affiliate['updated_at'],
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
function flattenReferral(referral) {
|
|
74
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
75
|
-
const affiliate = referral['affiliate'];
|
|
76
|
-
return {
|
|
77
|
-
id: referral['id'],
|
|
78
|
-
email: referral['email'],
|
|
79
|
-
subscription_status: (_a = referral['subscription_status']) !== null && _a !== void 0 ? _a : null,
|
|
80
|
-
signup_date: (_b = referral['signup_date']) !== null && _b !== void 0 ? _b : null,
|
|
81
|
-
stripe_customer_id: (_c = referral['stripe_customer_id']) !== null && _c !== void 0 ? _c : null,
|
|
82
|
-
affiliate_id: (_d = affiliate === null || affiliate === void 0 ? void 0 : affiliate['id']) !== null && _d !== void 0 ? _d : null,
|
|
83
|
-
affiliate_email: (_e = affiliate === null || affiliate === void 0 ? void 0 : affiliate['email']) !== null && _e !== void 0 ? _e : null,
|
|
84
|
-
affiliate_first_name: (_f = affiliate === null || affiliate === void 0 ? void 0 : affiliate['first_name']) !== null && _f !== void 0 ? _f : null,
|
|
85
|
-
affiliate_last_name: (_g = affiliate === null || affiliate === void 0 ? void 0 : affiliate['last_name']) !== null && _g !== void 0 ? _g : null,
|
|
86
|
-
created_at: referral['created_at'],
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function flattenCommission(commission) {
|
|
90
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
91
|
-
const affiliate = commission['affiliate'];
|
|
92
|
-
const referral = commission['referral'];
|
|
93
|
-
const payout = commission['payout'];
|
|
94
|
-
return {
|
|
95
|
-
id: commission['id'],
|
|
96
|
-
revenue_amount: (_a = commission['revenue_amount']) !== null && _a !== void 0 ? _a : null,
|
|
97
|
-
currency: (_b = commission['currency']) !== null && _b !== void 0 ? _b : null,
|
|
98
|
-
commission_amount: (_c = commission['commission_amount']) !== null && _c !== void 0 ? _c : null,
|
|
99
|
-
payout_status: (_d = commission['payout_status']) !== null && _d !== void 0 ? _d : null,
|
|
100
|
-
referral_date: (_e = commission['referral_date']) !== null && _e !== void 0 ? _e : null,
|
|
101
|
-
stripe_payment_id: (_f = commission['stripe_payment_id']) !== null && _f !== void 0 ? _f : null,
|
|
102
|
-
affiliate_id: (_g = affiliate === null || affiliate === void 0 ? void 0 : affiliate['id']) !== null && _g !== void 0 ? _g : null,
|
|
103
|
-
affiliate_email: (_h = affiliate === null || affiliate === void 0 ? void 0 : affiliate['email']) !== null && _h !== void 0 ? _h : null,
|
|
104
|
-
referral_id: (_j = referral === null || referral === void 0 ? void 0 : referral['id']) !== null && _j !== void 0 ? _j : null,
|
|
105
|
-
referral_email: (_k = referral === null || referral === void 0 ? void 0 : referral['email']) !== null && _k !== void 0 ? _k : null,
|
|
106
|
-
payout_id: (_l = payout === null || payout === void 0 ? void 0 : payout['id']) !== null && _l !== void 0 ? _l : null,
|
|
107
|
-
created_at: commission['created_at'],
|
|
108
|
-
updated_at: commission['updated_at'],
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
function flattenPayout(payout) {
|
|
112
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
113
|
-
const affiliate = payout['affiliate'];
|
|
114
|
-
return {
|
|
115
|
-
id: payout['id'],
|
|
116
|
-
amount: (_a = payout['amount']) !== null && _a !== void 0 ? _a : null,
|
|
117
|
-
currency: (_b = payout['currency']) !== null && _b !== void 0 ? _b : null,
|
|
118
|
-
status: (_c = payout['status']) !== null && _c !== void 0 ? _c : null,
|
|
119
|
-
affiliate_id: (_d = affiliate === null || affiliate === void 0 ? void 0 : affiliate['id']) !== null && _d !== void 0 ? _d : null,
|
|
120
|
-
affiliate_email: (_e = affiliate === null || affiliate === void 0 ? void 0 : affiliate['email']) !== null && _e !== void 0 ? _e : null,
|
|
121
|
-
affiliate_first_name: (_f = affiliate === null || affiliate === void 0 ? void 0 : affiliate['first_name']) !== null && _f !== void 0 ? _f : null,
|
|
122
|
-
affiliate_last_name: (_g = affiliate === null || affiliate === void 0 ? void 0 : affiliate['last_name']) !== null && _g !== void 0 ? _g : null,
|
|
123
|
-
created_at: payout['created_at'],
|
|
124
|
-
updated_at: (_h = payout['updated_at']) !== null && _h !== void 0 ? _h : null,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
exports.promotekitCommon = {
|
|
128
|
-
flattenAffiliate,
|
|
129
|
-
flattenReferral,
|
|
130
|
-
flattenCommission,
|
|
131
|
-
flattenPayout,
|
|
132
|
-
campaignDropdown: pieces_framework_1.Property.Dropdown({
|
|
133
|
-
auth: __1.promotekitAuth,
|
|
134
|
-
displayName: 'Campaign',
|
|
135
|
-
description: 'Select the campaign for this affiliate.',
|
|
136
|
-
refreshers: [],
|
|
137
|
-
required: false,
|
|
138
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
139
|
-
if (!auth) {
|
|
140
|
-
return {
|
|
141
|
-
disabled: true,
|
|
142
|
-
options: [],
|
|
143
|
-
placeholder: 'Please connect your account first',
|
|
144
|
-
};
|
|
145
|
-
}
|
|
146
|
-
const campaigns = yield promotekitPaginatedApiCall({
|
|
147
|
-
token: auth.secret_text,
|
|
148
|
-
path: '/campaigns',
|
|
149
|
-
});
|
|
150
|
-
return {
|
|
151
|
-
disabled: false,
|
|
152
|
-
options: campaigns.map((c) => ({
|
|
153
|
-
label: c.name,
|
|
154
|
-
value: c.id,
|
|
155
|
-
})),
|
|
156
|
-
};
|
|
157
|
-
}),
|
|
158
|
-
}),
|
|
159
|
-
affiliateDropdown: pieces_framework_1.Property.Dropdown({
|
|
160
|
-
auth: __1.promotekitAuth,
|
|
161
|
-
displayName: 'Affiliate',
|
|
162
|
-
description: 'Select the affiliate.',
|
|
163
|
-
refreshers: [],
|
|
164
|
-
required: true,
|
|
165
|
-
options: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
|
|
166
|
-
if (!auth) {
|
|
167
|
-
return {
|
|
168
|
-
disabled: true,
|
|
169
|
-
options: [],
|
|
170
|
-
placeholder: 'Please connect your account first',
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
const affiliates = yield promotekitPaginatedApiCall({
|
|
174
|
-
token: auth.secret_text,
|
|
175
|
-
path: '/affiliates',
|
|
176
|
-
});
|
|
177
|
-
return {
|
|
178
|
-
disabled: false,
|
|
179
|
-
options: affiliates.map((a) => {
|
|
180
|
-
var _a, _b;
|
|
181
|
-
return ({
|
|
182
|
-
label: `${(_a = a.first_name) !== null && _a !== void 0 ? _a : ''} ${(_b = a.last_name) !== null && _b !== void 0 ? _b : ''} (${a.email})`.trim(),
|
|
183
|
-
value: a.id,
|
|
184
|
-
});
|
|
185
|
-
}),
|
|
186
|
-
};
|
|
187
|
-
}),
|
|
188
|
-
}),
|
|
189
|
-
};
|
|
190
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/common/index.ts"],"names":[],"mappings":";;;AAYA,8CAuBC;AAID,gEAiCC;;AAxED,+DAMqC;AACrC,qEAA0D;AAC1D,6BAAuC;AAEvC,MAAM,QAAQ,GAAG,mCAAmC,CAAC;AAErD,SAAsB,iBAAiB;iEAA4B,EACjE,KAAK,EACL,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,WAAW,GAOZ;QACC,OAAO,MAAM,0BAAU,CAAC,WAAW,CAAI;YACrC,MAAM;YACN,GAAG,EAAE,GAAG,QAAQ,GAAG,IAAI,EAAE;YACzB,cAAc,EAAE;gBACd,IAAI,EAAE,kCAAkB,CAAC,YAAY;gBACrC,KAAK;aACN;YACD,WAAW;YACX,IAAI;SACL,CAAC,CAAC;IACL,CAAC;CAAA;AAED,MAAM,SAAS,GAAG,GAAG,CAAC;AAEtB,SAAsB,0BAA0B;iEAAI,EAClD,KAAK,EACL,IAAI,EACJ,WAAW,GAKZ;QACC,MAAM,OAAO,GAAQ,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E,IAAI,CAAC,WAAqB;gBACjC,IAAI,EAAE,aAAa;aACpB,CAAC,CAAC;YACH,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;;oBAAC,OAAA,CAAC;wBAC9B,KAAK,EAAE,GAAG,MAAA,CAAC,CAAC,UAAU,mCAAI,EAAE,IAAI,MAAA,CAAC,CAAC,SAAS,mCAAI,EAAE,KAAK,CAAC,CAAC,KACtD,GAAG,CAAC,IAAI,EAAE;wBACZ,KAAK,EAAE,CAAC,CAAC,EAAE;qBACZ,CAAC,CAAA;iBAAA,CAAC;aACJ,CAAC;QACJ,CAAC,CAAA;KACF,CAAC;CACH,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newAffiliateEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
3
|
-
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
4
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
5
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
6
|
-
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
7
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
8
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
9
|
-
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
10
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
11
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
12
|
-
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
13
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=new-affiliate-event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-affiliate-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-affiliate-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAY,MAAM,gCAAgC,CAAC;AAU1F,eAAO,MAAM,iBAAiB;;;;;;;;;;;;EAgF5B,CAAC"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newAffiliateEvent = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const __1 = require("../..");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
-
const AFFILIATE_EVENT_OPTIONS = [
|
|
10
|
-
{ label: 'Affiliate Created', value: 'affiliate.created' },
|
|
11
|
-
{ label: 'Affiliate Approved', value: 'affiliate.approved' },
|
|
12
|
-
];
|
|
13
|
-
exports.newAffiliateEvent = (0, pieces_framework_1.createTrigger)({
|
|
14
|
-
auth: __1.promotekitAuth,
|
|
15
|
-
name: 'new_affiliate_event',
|
|
16
|
-
displayName: 'New Affiliate Event',
|
|
17
|
-
description: 'Triggers when a PromoteKit affiliate event is received.',
|
|
18
|
-
aiMetadata: {
|
|
19
|
-
description: 'Fires on a PromoteKit affiliate webhook event — when an affiliate is created or approved. Optionally filter to specific event types; leave the selection empty to fire on any affiliate event. Requires the webhook endpoint to be configured in the PromoteKit dashboard.',
|
|
20
|
-
},
|
|
21
|
-
props: {
|
|
22
|
-
eventTypes: pieces_framework_1.Property.StaticMultiSelectDropdown({
|
|
23
|
-
displayName: 'Affiliate Event Types',
|
|
24
|
-
description: 'Select the affiliate event types to listen for. Leave empty to receive all affiliate events.',
|
|
25
|
-
required: false,
|
|
26
|
-
options: { options: AFFILIATE_EVENT_OPTIONS },
|
|
27
|
-
}),
|
|
28
|
-
instructions: pieces_framework_1.Property.MarkDown({
|
|
29
|
-
value: `### Setup Instructions
|
|
30
|
-
|
|
31
|
-
1. Go to your PromoteKit dashboard.
|
|
32
|
-
2. Navigate to **Settings > Webhooks**.
|
|
33
|
-
3. Click **Add Endpoint**.
|
|
34
|
-
4. Paste the webhook URL shown below :
|
|
35
|
-
\`\`\`text
|
|
36
|
-
{{webhookUrl}}
|
|
37
|
-
\`\`\`
|
|
38
|
-
5. Enable the affiliate event types you selected above.
|
|
39
|
-
6. Save the endpoint.
|
|
40
|
-
|
|
41
|
-
**Need different flows for different events?** Create a separate flow with its own webhook URL, and add a new endpoint in PromoteKit for that flow with only the matching event enabled.`,
|
|
42
|
-
}),
|
|
43
|
-
},
|
|
44
|
-
sampleData: {
|
|
45
|
-
type: 'affiliate.created',
|
|
46
|
-
id: 'aff_sample',
|
|
47
|
-
email: 'affiliate@example.com',
|
|
48
|
-
first_name: 'John',
|
|
49
|
-
last_name: 'Doe',
|
|
50
|
-
approved: false,
|
|
51
|
-
banned: false,
|
|
52
|
-
created_at: '2024-01-01T00:00:00Z',
|
|
53
|
-
},
|
|
54
|
-
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
55
|
-
onEnable() {
|
|
56
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
// Webhook is configured manually in PromoteKit dashboard
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
onDisable() {
|
|
61
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
// Webhook is configured manually in PromoteKit dashboard
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
run(context) {
|
|
66
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
var _a;
|
|
68
|
-
const payload = context.payload.body;
|
|
69
|
-
const selected = (_a = context.propsValue.eventTypes) !== null && _a !== void 0 ? _a : [];
|
|
70
|
-
const isAffiliate = payload.type === 'affiliate.created' ||
|
|
71
|
-
payload.type === 'affiliate.approved';
|
|
72
|
-
if (!isAffiliate)
|
|
73
|
-
return [];
|
|
74
|
-
if (selected.length > 0 && !selected.includes(payload.type))
|
|
75
|
-
return [];
|
|
76
|
-
return [Object.assign({ type: payload.type }, common_1.promotekitCommon.flattenAffiliate(payload.data))];
|
|
77
|
-
});
|
|
78
|
-
},
|
|
79
|
-
test(context) {
|
|
80
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
81
|
-
var _a, _b;
|
|
82
|
-
const response = yield (0, common_1.promotekitApiCall)({
|
|
83
|
-
token: context.auth.secret_text,
|
|
84
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
85
|
-
path: '/affiliates',
|
|
86
|
-
queryParams: { limit: '5' },
|
|
87
|
-
});
|
|
88
|
-
const selected = (_a = context.propsValue.eventTypes) !== null && _a !== void 0 ? _a : [];
|
|
89
|
-
const eventType = (_b = selected[0]) !== null && _b !== void 0 ? _b : 'affiliate.created';
|
|
90
|
-
return response.body.data.map((item) => (Object.assign({ type: eventType }, common_1.promotekitCommon.flattenAffiliate(item))));
|
|
91
|
-
});
|
|
92
|
-
},
|
|
93
|
-
});
|
|
94
|
-
//# sourceMappingURL=new-affiliate-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-affiliate-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-affiliate-event.ts"],"names":[],"mappings":";;;;AAAA,qEAA0F;AAC1F,6BAAu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;YAC/D,MAAM,WAAW,GACf,OAAO,CAAC,IAAI,KAAK,mBAAmB;gBACpC,OAAO,CAAC,IAAI,KAAK,oBAAoB,CAAC;YACxC,IAAI,CAAC,WAAW;gBAAE,OAAO,EAAE,CAAC;YAC5B,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC;gBAAE,OAAO,EAAE,CAAC;YACvE,OAAO,iBAAG,IAAI,EAAE,OAAO,CAAC,IAAI,IAAK,yBAAgB,CAAC,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAG,CAAC;QACtF,CAAC;KAAA;IAEK,IAAI,CAAC,OAAO;;;YAChB,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAAsC;gBAC5E,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;aAC5B,CAAC,CAAC;YACH,MAAM,QAAQ,GAAa,MAAA,OAAO,CAAC,UAAU,CAAC,UAAU,mCAAI,EAAE,CAAC;YAC/D,MAAM,SAAS,GAAG,MAAA,QAAQ,CAAC,CAAC,CAAC,mCAAI,mBAAmB,CAAC;YACrD,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBACtC,IAAI,EAAE,SAAS,IACZ,yBAAgB,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAC1C,CAAC,CAAC;QACN,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newCommissionEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
3
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
4
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
5
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
6
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
7
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
8
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
9
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
10
|
-
}>;
|
|
11
|
-
//# sourceMappingURL=new-commission-event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-commission-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-commission-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAY,MAAM,gCAAgC,CAAC;AAK1F,eAAO,MAAM,kBAAkB;;;;;;;;EAiE7B,CAAC"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.newCommissionEvent = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
|
-
const __1 = require("../..");
|
|
7
|
-
const common_1 = require("../common");
|
|
8
|
-
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
9
|
-
exports.newCommissionEvent = (0, pieces_framework_1.createTrigger)({
|
|
10
|
-
auth: __1.promotekitAuth,
|
|
11
|
-
name: 'new_commission_event',
|
|
12
|
-
displayName: 'New Commission Event',
|
|
13
|
-
description: 'Triggers when a PromoteKit commission webhook event is received.',
|
|
14
|
-
aiMetadata: {
|
|
15
|
-
description: 'Fires when a PromoteKit commission is created (a commission.created webhook event), representing a new commission earned by an affiliate. Requires the webhook endpoint to be configured in the PromoteKit dashboard.',
|
|
16
|
-
},
|
|
17
|
-
props: {
|
|
18
|
-
instructions: pieces_framework_1.Property.MarkDown({
|
|
19
|
-
value: `### Setup Instructions
|
|
20
|
-
|
|
21
|
-
1. Go to your PromoteKit dashboard.
|
|
22
|
-
2. Navigate to **Settings > Webhooks**.
|
|
23
|
-
3. Click **Add Endpoint**.
|
|
24
|
-
4. Paste the webhook URL shown below :
|
|
25
|
-
\`\`\`text
|
|
26
|
-
{{webhookUrl}}
|
|
27
|
-
\`\`\`
|
|
28
|
-
5. Enable the **Commission Created** event.
|
|
29
|
-
6. Save the endpoint.`,
|
|
30
|
-
}),
|
|
31
|
-
},
|
|
32
|
-
sampleData: {
|
|
33
|
-
type: 'commission.created',
|
|
34
|
-
id: 'com_sample',
|
|
35
|
-
revenue_amount: 100,
|
|
36
|
-
currency: 'usd',
|
|
37
|
-
commission_amount: 20,
|
|
38
|
-
payout_status: 'pending',
|
|
39
|
-
affiliate_id: 'aff_sample',
|
|
40
|
-
affiliate_email: 'affiliate@example.com',
|
|
41
|
-
created_at: '2024-01-01T00:00:00Z',
|
|
42
|
-
},
|
|
43
|
-
type: pieces_framework_1.TriggerStrategy.WEBHOOK,
|
|
44
|
-
onEnable() {
|
|
45
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
// Webhook is configured manually in PromoteKit dashboard
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
onDisable() {
|
|
50
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
51
|
-
// Webhook is configured manually in PromoteKit dashboard
|
|
52
|
-
});
|
|
53
|
-
},
|
|
54
|
-
run(context) {
|
|
55
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
56
|
-
const payload = context.payload.body;
|
|
57
|
-
if (payload.type !== 'commission.created')
|
|
58
|
-
return [];
|
|
59
|
-
return [Object.assign({ type: payload.type }, common_1.promotekitCommon.flattenCommission(payload.data))];
|
|
60
|
-
});
|
|
61
|
-
},
|
|
62
|
-
test(context) {
|
|
63
|
-
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
64
|
-
const response = yield (0, common_1.promotekitApiCall)({
|
|
65
|
-
token: context.auth.secret_text,
|
|
66
|
-
method: pieces_common_1.HttpMethod.GET,
|
|
67
|
-
path: '/commissions',
|
|
68
|
-
queryParams: { limit: '5' },
|
|
69
|
-
});
|
|
70
|
-
return response.body.data.map((item) => (Object.assign({ type: 'commission.created' }, common_1.promotekitCommon.flattenCommission(item))));
|
|
71
|
-
});
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
//# sourceMappingURL=new-commission-event.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-commission-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-commission-event.ts"],"names":[],"mappings":";;;;AAAA,qEAA0F;AAC1F,6BAAuC;AACvC,sCAAgE;AAChE,+DAAyD;AAE5C,QAAA,kBAAkB,GAAG,IAAA,gCAAa,EAAC;IAC9C,IAAI,EAAE,kBAAc;IACpB,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,sBAAsB;IACnC,WAAW,EAAE,kEAAkE;IAC/E,UAAU,EAAE;QACV,WAAW,EAAE,uNAAuN;KACrO;IACD,KAAK,EAAE;QACL,YAAY,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YAC9B,KAAK,EAAE;;;;;;;;;;sBAUS;SACjB,CAAC;KACH;IACD,UAAU,EAAE;QACV,IAAI,EAAE,oBAAoB;QAC1B,EAAE,EAAE,YAAY;QAChB,cAAc,EAAE,GAAG;QACnB,QAAQ,EAAE,KAAK;QACf,iBAAiB,EAAE,EAAE;QACrB,aAAa,EAAE,SAAS;QACxB,YAAY,EAAE,YAAY;QAC1B,eAAe,EAAE,uBAAuB;QACxC,UAAU,EAAE,sBAAsB;KACnC;IACD,IAAI,EAAE,kCAAe,CAAC,OAAO;IAEvB,QAAQ;;YACZ,yDAAyD;QAC3D,CAAC;KAAA;IAEK,SAAS;;YACb,yDAAyD;QAC3D,CAAC;KAAA;IAEK,GAAG,CAAC,OAAO;;YACf,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,IAG/B,CAAC;YACF,IAAI,OAAO,CAAC,IAAI,KAAK,oBAAoB;gBAAE,OAAO,EAAE,CAAC;YACrD,OAAO,iBAAG,IAAI,EAAE,OAAO,CAAC,IAAI,IAAK,yBAAgB,CAAC,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,EAAG,CAAC;QACvF,CAAC;KAAA;IAEK,IAAI,CAAC,OAAO;;YAChB,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAAsC;gBAC5E,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,WAAW;gBAC/B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,cAAc;gBACpB,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;aAC5B,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,iBACtC,IAAI,EAAE,oBAAoB,IACvB,yBAAgB,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAC3C,CAAC,CAAC;QACN,CAAC;KAAA;CACF,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TriggerStrategy } from '@activepieces/pieces-framework';
|
|
2
|
-
export declare const newReferralEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
3
|
-
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
4
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
5
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
6
|
-
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
7
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
8
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
9
|
-
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
10
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
11
|
-
}> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
|
|
12
|
-
eventTypes: import("@activepieces/pieces-framework").StaticMultiSelectDropdownProperty<string, false>;
|
|
13
|
-
instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
|
|
14
|
-
}>;
|
|
15
|
-
//# sourceMappingURL=new-referral-event.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"new-referral-event.d.ts","sourceRoot":"","sources":["../../../../src/lib/triggers/new-referral-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,eAAe,EAAY,MAAM,gCAAgC,CAAC;AAU1F,eAAO,MAAM,gBAAgB;;;;;;;;;;;;EA+E3B,CAAC"}
|