@activepieces/piece-promotekit 0.1.4

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 (83) hide show
  1. package/package.json +17 -0
  2. package/src/i18n/fr.json +76 -0
  3. package/src/i18n/translation.json +76 -0
  4. package/src/index.d.ts +3 -0
  5. package/src/index.d.ts.map +1 -0
  6. package/src/index.js +90 -0
  7. package/src/index.js.map +1 -0
  8. package/src/lib/actions/create-affiliate.d.ts +7 -0
  9. package/src/lib/actions/create-affiliate.d.ts.map +1 -0
  10. package/src/lib/actions/create-affiliate.js +51 -0
  11. package/src/lib/actions/create-affiliate.js.map +1 -0
  12. package/src/lib/actions/create-referral.d.ts +5 -0
  13. package/src/lib/actions/create-referral.d.ts.map +1 -0
  14. package/src/lib/actions/create-referral.js +37 -0
  15. package/src/lib/actions/create-referral.js.map +1 -0
  16. package/src/lib/actions/find-affiliate.d.ts +4 -0
  17. package/src/lib/actions/find-affiliate.d.ts.map +1 -0
  18. package/src/lib/actions/find-affiliate.js +32 -0
  19. package/src/lib/actions/find-affiliate.js.map +1 -0
  20. package/src/lib/actions/find-campaign.d.ts +4 -0
  21. package/src/lib/actions/find-campaign.d.ts.map +1 -0
  22. package/src/lib/actions/find-campaign.js +39 -0
  23. package/src/lib/actions/find-campaign.js.map +1 -0
  24. package/src/lib/actions/find-commission.d.ts +4 -0
  25. package/src/lib/actions/find-commission.d.ts.map +1 -0
  26. package/src/lib/actions/find-commission.js +32 -0
  27. package/src/lib/actions/find-commission.js.map +1 -0
  28. package/src/lib/actions/find-payout.d.ts +4 -0
  29. package/src/lib/actions/find-payout.d.ts.map +1 -0
  30. package/src/lib/actions/find-payout.js +32 -0
  31. package/src/lib/actions/find-payout.js.map +1 -0
  32. package/src/lib/actions/find-referral.d.ts +4 -0
  33. package/src/lib/actions/find-referral.d.ts.map +1 -0
  34. package/src/lib/actions/find-referral.js +32 -0
  35. package/src/lib/actions/find-referral.js.map +1 -0
  36. package/src/lib/actions/list-affiliates.d.ts +5 -0
  37. package/src/lib/actions/list-affiliates.d.ts.map +1 -0
  38. package/src/lib/actions/list-affiliates.js +44 -0
  39. package/src/lib/actions/list-affiliates.js.map +1 -0
  40. package/src/lib/actions/list-campaigns.d.ts +2 -0
  41. package/src/lib/actions/list-campaigns.d.ts.map +1 -0
  42. package/src/lib/actions/list-campaigns.js +35 -0
  43. package/src/lib/actions/list-campaigns.js.map +1 -0
  44. package/src/lib/actions/list-commissions.d.ts +5 -0
  45. package/src/lib/actions/list-commissions.d.ts.map +1 -0
  46. package/src/lib/actions/list-commissions.js +44 -0
  47. package/src/lib/actions/list-commissions.js.map +1 -0
  48. package/src/lib/actions/list-payouts.d.ts +5 -0
  49. package/src/lib/actions/list-payouts.d.ts.map +1 -0
  50. package/src/lib/actions/list-payouts.js +44 -0
  51. package/src/lib/actions/list-payouts.js.map +1 -0
  52. package/src/lib/actions/list-referrals.d.ts +5 -0
  53. package/src/lib/actions/list-referrals.d.ts.map +1 -0
  54. package/src/lib/actions/list-referrals.js +44 -0
  55. package/src/lib/actions/list-referrals.js.map +1 -0
  56. package/src/lib/actions/update-affiliate.d.ts +9 -0
  57. package/src/lib/actions/update-affiliate.d.ts.map +1 -0
  58. package/src/lib/actions/update-affiliate.js +67 -0
  59. package/src/lib/actions/update-affiliate.js.map +1 -0
  60. package/src/lib/common/index.d.ts +27 -0
  61. package/src/lib/common/index.d.ts.map +1 -0
  62. package/src/lib/common/index.js +190 -0
  63. package/src/lib/common/index.js.map +1 -0
  64. package/src/lib/triggers/affiliate-approved.d.ts +11 -0
  65. package/src/lib/triggers/affiliate-approved.d.ts.map +1 -0
  66. package/src/lib/triggers/affiliate-approved.js +75 -0
  67. package/src/lib/triggers/affiliate-approved.js.map +1 -0
  68. package/src/lib/triggers/new-affiliate.d.ts +11 -0
  69. package/src/lib/triggers/new-affiliate.d.ts.map +1 -0
  70. package/src/lib/triggers/new-affiliate.js +75 -0
  71. package/src/lib/triggers/new-affiliate.js.map +1 -0
  72. package/src/lib/triggers/new-commission.d.ts +11 -0
  73. package/src/lib/triggers/new-commission.d.ts.map +1 -0
  74. package/src/lib/triggers/new-commission.js +73 -0
  75. package/src/lib/triggers/new-commission.js.map +1 -0
  76. package/src/lib/triggers/new-referral.d.ts +11 -0
  77. package/src/lib/triggers/new-referral.d.ts.map +1 -0
  78. package/src/lib/triggers/new-referral.js +69 -0
  79. package/src/lib/triggers/new-referral.js.map +1 -0
  80. package/src/lib/triggers/referral-converted.d.ts +11 -0
  81. package/src/lib/triggers/referral-converted.d.ts.map +1 -0
  82. package/src/lib/triggers/referral-converted.js +69 -0
  83. package/src/lib/triggers/referral-converted.js.map +1 -0
package/package.json ADDED
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@activepieces/piece-promotekit",
3
+ "version": "0.1.4",
4
+ "type": "commonjs",
5
+ "main": "./src/index.js",
6
+ "types": "./src/index.d.ts",
7
+ "dependencies": {
8
+ "@activepieces/pieces-common": "0.12.0",
9
+ "@activepieces/pieces-framework": "0.26.0",
10
+ "@activepieces/shared": "0.50.0",
11
+ "tslib": "^2.3.0"
12
+ },
13
+ "scripts": {
14
+ "build": "tsc -p tsconfig.lib.json && cp package.json dist/",
15
+ "lint": "eslint 'src/**/*.ts'"
16
+ }
17
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "Affiliate marketing platform integrated with Stripe.": "Plateforme de marketing d'affiliation intégrée à Stripe.",
3
+ "API Key": "Clé API",
4
+ "To get your API key:\n1. Log in to your PromoteKit dashboard\n2. Go to **Settings > API Keys**\n3. Click **Create API Key**\n4. Copy the key and paste it here\n\n**Note:** API access may require a paid plan.": "Pour obtenir votre clé API :\n1. Connectez-vous à votre tableau de bord PromoteKit\n2. Allez dans **Paramètres > Clés API**\n3. Cliquez sur **Créer une clé API**\n4. Copiez la clé et collez-la ici\n\n**Note :** L'accès à l'API peut nécessiter un forfait payant.",
5
+ "List Affiliates": "Lister les affiliés",
6
+ "List all affiliates in your PromoteKit account.": "Lister tous les affiliés de votre compte PromoteKit.",
7
+ "Find Affiliate": "Trouver un affilié",
8
+ "Get details of a specific affiliate by ID.": "Obtenir les détails d'un affilié spécifique par son ID.",
9
+ "Create Affiliate": "Créer un affilié",
10
+ "Create a new affiliate in PromoteKit.": "Créer un nouvel affilié dans PromoteKit.",
11
+ "Update Affiliate": "Mettre à jour un affilié",
12
+ "Update an existing affiliate in PromoteKit.": "Mettre à jour un affilié existant dans PromoteKit.",
13
+ "List Referrals": "Lister les parrainages",
14
+ "List all referrals in your PromoteKit account.": "Lister tous les parrainages de votre compte PromoteKit.",
15
+ "Find Referral": "Trouver un parrainage",
16
+ "Get details of a specific referral by ID.": "Obtenir les détails d'un parrainage spécifique par son ID.",
17
+ "Create Referral": "Créer un parrainage",
18
+ "Create a new referral in PromoteKit.": "Créer un nouveau parrainage dans PromoteKit.",
19
+ "List Commissions": "Lister les commissions",
20
+ "List all commissions in your PromoteKit account.": "Lister toutes les commissions de votre compte PromoteKit.",
21
+ "Find Commission": "Trouver une commission",
22
+ "Get details of a specific commission by ID.": "Obtenir les détails d'une commission spécifique par son ID.",
23
+ "List Campaigns": "Lister les campagnes",
24
+ "List all campaigns in your PromoteKit account.": "Lister toutes les campagnes de votre compte PromoteKit.",
25
+ "Find Campaign": "Trouver une campagne",
26
+ "Get details of a specific campaign by ID.": "Obtenir les détails d'une campagne spécifique par son ID.",
27
+ "List Payouts": "Lister les paiements",
28
+ "List all payouts in your PromoteKit account.": "Lister tous les paiements de votre compte PromoteKit.",
29
+ "Find Payout": "Trouver un paiement",
30
+ "Get details of a specific payout by ID.": "Obtenir les détails d'un paiement spécifique par son ID.",
31
+ "Custom API Call": "Appel d'API personnalisé",
32
+ "Page": "Page",
33
+ "Page number to retrieve. Defaults to 1.": "Numéro de page à récupérer. Par défaut : 1.",
34
+ "Limit": "Limite",
35
+ "Number of affiliates per page (max 100). Defaults to 10.": "Nombre d'affiliés par page (max 100). Par défaut : 10.",
36
+ "Number of referrals per page (max 100). Defaults to 10.": "Nombre de parrainages par page (max 100). Par défaut : 10.",
37
+ "Number of commissions per page (max 100). Defaults to 10.": "Nombre de commissions par page (max 100). Par défaut : 10.",
38
+ "Number of payouts per page (max 100). Defaults to 10.": "Nombre de paiements par page (max 100). Par défaut : 10.",
39
+ "Affiliate ID": "ID de l'affilié",
40
+ "The ID of the affiliate to retrieve.": "L'ID de l'affilié à récupérer.",
41
+ "The ID of the affiliate to update.": "L'ID de l'affilié à mettre à jour.",
42
+ "Email": "E-mail",
43
+ "The email address of the new affiliate.": "L'adresse e-mail du nouvel affilié.",
44
+ "The email address of the referred person.": "L'adresse e-mail de la personne parrainée.",
45
+ "First Name": "Prénom",
46
+ "Last Name": "Nom",
47
+ "Campaign": "Campagne",
48
+ "Select the campaign for this affiliate.": "Sélectionnez la campagne pour cet affilié.",
49
+ "Payout Email": "E-mail de paiement",
50
+ "The email address where the affiliate receives payouts.": "L'adresse e-mail où l'affilié reçoit ses paiements.",
51
+ "Approved": "Approuvé",
52
+ "Whether the affiliate is approved.": "Indique si l'affilié est approuvé.",
53
+ "Banned": "Banni",
54
+ "Whether the affiliate is banned.": "Indique si l'affilié est banni.",
55
+ "Affiliate": "Affilié",
56
+ "Select the affiliate.": "Sélectionnez l'affilié.",
57
+ "Referral ID": "ID du parrainage",
58
+ "The ID of the referral to retrieve.": "L'ID du parrainage à récupérer.",
59
+ "Commission ID": "ID de la commission",
60
+ "The ID of the commission to retrieve.": "L'ID de la commission à récupérer.",
61
+ "Campaign ID": "ID de la campagne",
62
+ "The ID of the campaign to retrieve.": "L'ID de la campagne à récupérer.",
63
+ "Payout ID": "ID du paiement",
64
+ "The ID of the payout to retrieve.": "L'ID du paiement à récupérer.",
65
+ "New Affiliate": "Nouvel affilié",
66
+ "Triggers when a new affiliate is created in PromoteKit.": "Se déclenche lorsqu'un nouvel affilié est créé dans PromoteKit.",
67
+ "Affiliate Approved": "Affilié approuvé",
68
+ "Triggers when an affiliate is approved in PromoteKit.": "Se déclenche lorsqu'un affilié est approuvé dans PromoteKit.",
69
+ "New Referral": "Nouveau parrainage",
70
+ "Triggers when a new referral is tracked in PromoteKit.": "Se déclenche lorsqu'un nouveau parrainage est suivi dans PromoteKit.",
71
+ "Referral Converted": "Parrainage converti",
72
+ "Triggers when a referral receives its first commission (first paid conversion).": "Se déclenche lorsqu'un parrainage reçoit sa première commission (première conversion payante).",
73
+ "New Commission": "Nouvelle commission",
74
+ "Triggers when a new commission is generated in PromoteKit.": "Se déclenche lorsqu'une nouvelle commission est générée dans PromoteKit.",
75
+ "Please connect your account first": "Veuillez d'abord connecter votre compte"
76
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "Affiliate marketing platform integrated with Stripe.": "Affiliate marketing platform integrated with Stripe.",
3
+ "API Key": "API Key",
4
+ "To get your API key:\n1. Log in to your PromoteKit dashboard\n2. Go to **Settings > API Keys**\n3. Click **Create API Key**\n4. Copy the key and paste it here\n\n**Note:** API access may require a paid plan.": "To get your API key:\n1. Log in to your PromoteKit dashboard\n2. Go to **Settings > API Keys**\n3. Click **Create API Key**\n4. Copy the key and paste it here\n\n**Note:** API access may require a paid plan.",
5
+ "List Affiliates": "List Affiliates",
6
+ "List all affiliates in your PromoteKit account.": "List all affiliates in your PromoteKit account.",
7
+ "Find Affiliate": "Find Affiliate",
8
+ "Get details of a specific affiliate by ID.": "Get details of a specific affiliate by ID.",
9
+ "Create Affiliate": "Create Affiliate",
10
+ "Create a new affiliate in PromoteKit.": "Create a new affiliate in PromoteKit.",
11
+ "Update Affiliate": "Update Affiliate",
12
+ "Update an existing affiliate in PromoteKit.": "Update an existing affiliate in PromoteKit.",
13
+ "List Referrals": "List Referrals",
14
+ "List all referrals in your PromoteKit account.": "List all referrals in your PromoteKit account.",
15
+ "Find Referral": "Find Referral",
16
+ "Get details of a specific referral by ID.": "Get details of a specific referral by ID.",
17
+ "Create Referral": "Create Referral",
18
+ "Create a new referral in PromoteKit.": "Create a new referral in PromoteKit.",
19
+ "List Commissions": "List Commissions",
20
+ "List all commissions in your PromoteKit account.": "List all commissions in your PromoteKit account.",
21
+ "Find Commission": "Find Commission",
22
+ "Get details of a specific commission by ID.": "Get details of a specific commission by ID.",
23
+ "List Campaigns": "List Campaigns",
24
+ "List all campaigns in your PromoteKit account.": "List all campaigns in your PromoteKit account.",
25
+ "Find Campaign": "Find Campaign",
26
+ "Get details of a specific campaign by ID.": "Get details of a specific campaign by ID.",
27
+ "List Payouts": "List Payouts",
28
+ "List all payouts in your PromoteKit account.": "List all payouts in your PromoteKit account.",
29
+ "Find Payout": "Find Payout",
30
+ "Get details of a specific payout by ID.": "Get details of a specific payout by ID.",
31
+ "Custom API Call": "Custom API Call",
32
+ "Page": "Page",
33
+ "Page number to retrieve. Defaults to 1.": "Page number to retrieve. Defaults to 1.",
34
+ "Limit": "Limit",
35
+ "Number of affiliates per page (max 100). Defaults to 10.": "Number of affiliates per page (max 100). Defaults to 10.",
36
+ "Number of referrals per page (max 100). Defaults to 10.": "Number of referrals per page (max 100). Defaults to 10.",
37
+ "Number of commissions per page (max 100). Defaults to 10.": "Number of commissions per page (max 100). Defaults to 10.",
38
+ "Number of payouts per page (max 100). Defaults to 10.": "Number of payouts per page (max 100). Defaults to 10.",
39
+ "Affiliate ID": "Affiliate ID",
40
+ "The ID of the affiliate to retrieve.": "The ID of the affiliate to retrieve.",
41
+ "The ID of the affiliate to update.": "The ID of the affiliate to update.",
42
+ "Email": "Email",
43
+ "The email address of the new affiliate.": "The email address of the new affiliate.",
44
+ "The email address of the referred person.": "The email address of the referred person.",
45
+ "First Name": "First Name",
46
+ "Last Name": "Last Name",
47
+ "Campaign": "Campaign",
48
+ "Select the campaign for this affiliate.": "Select the campaign for this affiliate.",
49
+ "Payout Email": "Payout Email",
50
+ "The email address where the affiliate receives payouts.": "The email address where the affiliate receives payouts.",
51
+ "Approved": "Approved",
52
+ "Whether the affiliate is approved.": "Whether the affiliate is approved.",
53
+ "Banned": "Banned",
54
+ "Whether the affiliate is banned.": "Whether the affiliate is banned.",
55
+ "Affiliate": "Affiliate",
56
+ "Select the affiliate.": "Select the affiliate.",
57
+ "Referral ID": "Referral ID",
58
+ "The ID of the referral to retrieve.": "The ID of the referral to retrieve.",
59
+ "Commission ID": "Commission ID",
60
+ "The ID of the commission to retrieve.": "The ID of the commission to retrieve.",
61
+ "Campaign ID": "Campaign ID",
62
+ "The ID of the campaign to retrieve.": "The ID of the campaign to retrieve.",
63
+ "Payout ID": "Payout ID",
64
+ "The ID of the payout to retrieve.": "The ID of the payout to retrieve.",
65
+ "New Affiliate": "New Affiliate",
66
+ "Triggers when a new affiliate is created in PromoteKit.": "Triggers when a new affiliate is created in PromoteKit.",
67
+ "Affiliate Approved": "Affiliate Approved",
68
+ "Triggers when an affiliate is approved in PromoteKit.": "Triggers when an affiliate is approved in PromoteKit.",
69
+ "New Referral": "New Referral",
70
+ "Triggers when a new referral is tracked in PromoteKit.": "Triggers when a new referral is tracked in PromoteKit.",
71
+ "Referral Converted": "Referral Converted",
72
+ "Triggers when a referral receives its first commission (first paid conversion).": "Triggers when a referral receives its first commission (first paid conversion).",
73
+ "New Commission": "New Commission",
74
+ "Triggers when a new commission is generated in PromoteKit.": "Triggers when a new commission is generated in PromoteKit.",
75
+ "Please connect your account first": "Please connect your account first"
76
+ }
package/src/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export declare const promotekitAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
2
+ export declare const promotekit: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AA0BA,eAAO,MAAM,cAAc,mEAsBzB,CAAC;AAEH,eAAO,MAAM,UAAU,mHAqCrB,CAAC"}
package/src/index.js ADDED
@@ -0,0 +1,90 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.promotekit = exports.promotekitAuth = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const pieces_common_1 = require("@activepieces/pieces-common");
6
+ const pieces_framework_1 = require("@activepieces/pieces-framework");
7
+ const shared_1 = require("@activepieces/shared");
8
+ const list_affiliates_1 = require("./lib/actions/list-affiliates");
9
+ const find_affiliate_1 = require("./lib/actions/find-affiliate");
10
+ const create_affiliate_1 = require("./lib/actions/create-affiliate");
11
+ const update_affiliate_1 = require("./lib/actions/update-affiliate");
12
+ const list_referrals_1 = require("./lib/actions/list-referrals");
13
+ const find_referral_1 = require("./lib/actions/find-referral");
14
+ const create_referral_1 = require("./lib/actions/create-referral");
15
+ const list_commissions_1 = require("./lib/actions/list-commissions");
16
+ const find_commission_1 = require("./lib/actions/find-commission");
17
+ const list_campaigns_1 = require("./lib/actions/list-campaigns");
18
+ const find_campaign_1 = require("./lib/actions/find-campaign");
19
+ const list_payouts_1 = require("./lib/actions/list-payouts");
20
+ const find_payout_1 = require("./lib/actions/find-payout");
21
+ const new_affiliate_1 = require("./lib/triggers/new-affiliate");
22
+ const affiliate_approved_1 = require("./lib/triggers/affiliate-approved");
23
+ const new_referral_1 = require("./lib/triggers/new-referral");
24
+ const referral_converted_1 = require("./lib/triggers/referral-converted");
25
+ const new_commission_1 = require("./lib/triggers/new-commission");
26
+ exports.promotekitAuth = pieces_framework_1.PieceAuth.SecretText({
27
+ displayName: 'API Key',
28
+ description: `To get your API key:
29
+ 1. Log in to your PromoteKit dashboard
30
+ 2. Go to **Settings > API Keys**
31
+ 3. Click **Create API Key**
32
+ 4. Copy the key and paste it here
33
+ `,
34
+ required: true,
35
+ validate: (_a) => tslib_1.__awaiter(void 0, [_a], void 0, function* ({ auth }) {
36
+ try {
37
+ yield pieces_common_1.httpClient.sendRequest({
38
+ method: pieces_common_1.HttpMethod.GET,
39
+ url: 'https://www.promotekit.com/api/v1/affiliates',
40
+ headers: { Authorization: `Bearer ${auth}` },
41
+ queryParams: { limit: '1' },
42
+ });
43
+ return { valid: true };
44
+ }
45
+ catch (_b) {
46
+ return { valid: false, error: 'Invalid API Key' };
47
+ }
48
+ }),
49
+ });
50
+ exports.promotekit = (0, pieces_framework_1.createPiece)({
51
+ displayName: 'PromoteKit',
52
+ description: 'Affiliate marketing platform integrated with Stripe.',
53
+ minimumSupportedRelease: '0.36.1',
54
+ logoUrl: 'https://cdn.activepieces.com/pieces/promotekit.png',
55
+ categories: [shared_1.PieceCategory.MARKETING],
56
+ auth: exports.promotekitAuth,
57
+ authors: ['BasTech'],
58
+ actions: [
59
+ list_affiliates_1.listAffiliates,
60
+ find_affiliate_1.findAffiliate,
61
+ create_affiliate_1.createAffiliate,
62
+ update_affiliate_1.updateAffiliate,
63
+ list_referrals_1.listReferrals,
64
+ find_referral_1.findReferral,
65
+ create_referral_1.createReferral,
66
+ list_commissions_1.listCommissions,
67
+ find_commission_1.findCommission,
68
+ list_campaigns_1.listCampaigns,
69
+ find_campaign_1.findCampaign,
70
+ list_payouts_1.listPayouts,
71
+ find_payout_1.findPayout,
72
+ (0, pieces_common_1.createCustomApiCallAction)({
73
+ baseUrl: () => 'https://www.promotekit.com/api/v1',
74
+ auth: exports.promotekitAuth,
75
+ authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
76
+ return ({
77
+ Authorization: `Bearer ${auth}`,
78
+ });
79
+ }),
80
+ }),
81
+ ],
82
+ triggers: [
83
+ new_affiliate_1.newAffiliate,
84
+ affiliate_approved_1.affiliateApproved,
85
+ new_referral_1.newReferral,
86
+ referral_converted_1.referralConverted,
87
+ new_commission_1.newCommission,
88
+ ],
89
+ });
90
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,+DAIqC;AACrC,qEAAwE;AACxE,iDAAqD;AACrD,mEAA+D;AAC/D,iEAA6D;AAC7D,qEAAiE;AACjE,qEAAiE;AACjE,iEAA6D;AAC7D,+DAA2D;AAC3D,mEAA+D;AAC/D,qEAAiE;AACjE,mEAA+D;AAC/D,iEAA6D;AAC7D,+DAA2D;AAC3D,6DAAyD;AACzD,2DAAuD;AACvD,gEAA4D;AAC5D,0EAAsE;AACtE,8DAA0D;AAC1D,0EAAsE;AACtE,kEAA8D;AAEjD,QAAA,cAAc,GAAG,4BAAS,CAAC,UAAU,CAAC;IACjD,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE;;;;;CAKd;IACC,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAiB,EAAE,oDAAZ,EAAE,IAAI,EAAE;QACvB,IAAI,CAAC;YACH,MAAM,0BAAU,CAAC,WAAW,CAAC;gBAC3B,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,GAAG,EAAE,8CAA8C;gBACnD,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,IAAI,EAAE,EAAE;gBAC5C,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE;aAC5B,CAAC,CAAC;YACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;QACzB,CAAC;QAAC,WAAM,CAAC;YACP,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,CAAC;QACpD,CAAC;IACH,CAAC,CAAA;CACF,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,IAAA,8BAAW,EAAC;IACpC,WAAW,EAAE,YAAY;IACzB,WAAW,EAAE,sDAAsD;IACnE,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,oDAAoD;IAC7D,UAAU,EAAE,CAAC,sBAAa,CAAC,SAAS,CAAC;IACrC,IAAI,EAAE,sBAAc;IACpB,OAAO,EAAE,CAAC,SAAS,CAAC;IACpB,OAAO,EAAE;QACP,gCAAc;QACd,8BAAa;QACb,kCAAe;QACf,kCAAe;QACf,8BAAa;QACb,4BAAY;QACZ,gCAAc;QACd,kCAAe;QACf,gCAAc;QACd,8BAAa;QACb,4BAAY;QACZ,0BAAW;QACX,wBAAU;QACV,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,mCAAmC;YAClD,IAAI,EAAE,sBAAc;YACpB,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAAC,OAAA,CAAC;oBAC5B,aAAa,EAAE,UAAU,IAAI,EAAE;iBAChC,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE;QACR,4BAAY;QACZ,sCAAiB;QACjB,0BAAW;QACX,sCAAiB;QACjB,8BAAa;KACd;CACF,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const createAffiliate: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ email: 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
+ campaign_id: import("@activepieces/pieces-framework").DropdownProperty<string, false, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
6
+ }>;
7
+ //# sourceMappingURL=create-affiliate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-affiliate.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-affiliate.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,eAAe;;;;;EAuC1B,CAAC"}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAffiliate = 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.createAffiliate = (0, pieces_framework_1.createAction)({
10
+ auth: __1.promotekitAuth,
11
+ name: 'create_affiliate',
12
+ displayName: 'Create Affiliate',
13
+ description: 'Create a new affiliate in PromoteKit.',
14
+ props: {
15
+ email: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Email',
17
+ description: 'The email address of the new affiliate.',
18
+ required: true,
19
+ }),
20
+ first_name: pieces_framework_1.Property.ShortText({
21
+ displayName: 'First Name',
22
+ required: false,
23
+ }),
24
+ last_name: pieces_framework_1.Property.ShortText({
25
+ displayName: 'Last Name',
26
+ required: false,
27
+ }),
28
+ campaign_id: common_1.promotekitCommon.campaignDropdown,
29
+ },
30
+ run(context) {
31
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
32
+ const body = {
33
+ email: context.propsValue.email,
34
+ };
35
+ if (context.propsValue.first_name)
36
+ body['first_name'] = context.propsValue.first_name;
37
+ if (context.propsValue.last_name)
38
+ body['last_name'] = context.propsValue.last_name;
39
+ if (context.propsValue.campaign_id)
40
+ body['campaign_id'] = context.propsValue.campaign_id;
41
+ const response = yield (0, common_1.promotekitApiCall)({
42
+ token: context.auth,
43
+ method: pieces_common_1.HttpMethod.POST,
44
+ path: '/affiliates',
45
+ body,
46
+ });
47
+ return common_1.promotekitCommon.flattenAffiliate(response.body.data);
48
+ });
49
+ },
50
+ });
51
+ //# sourceMappingURL=create-affiliate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-affiliate.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-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,uCAAuC;IACpD,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,yCAAyC;YACtD,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,WAAW,EAAE,yBAAgB,CAAC,gBAAgB;KAC/C;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,IAAI,GAA4B;gBACpC,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;aAChC,CAAC;YACF,IAAI,OAAO,CAAC,UAAU,CAAC,UAAU;gBAAE,IAAI,CAAC,YAAY,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC;YACtF,IAAI,OAAO,CAAC,UAAU,CAAC,SAAS;gBAAE,IAAI,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC;YACnF,IAAI,OAAO,CAAC,UAAU,CAAC,WAAW;gBAAE,IAAI,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC;YAEzF,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAErC;gBACD,KAAK,EAAE,OAAO,CAAC,IAAyB;gBACxC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,aAAa;gBACnB,IAAI;aACL,CAAC,CAAC;YACH,OAAO,yBAAgB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/D,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const createReferral: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ email: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ affiliate_id: import("@activepieces/pieces-framework").DropdownProperty<string, true, import("@activepieces/pieces-framework").SecretTextProperty<true>>;
4
+ }>;
5
+ //# sourceMappingURL=create-referral.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-referral.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/create-referral.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;;EA2BzB,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createReferral = 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.createReferral = (0, pieces_framework_1.createAction)({
10
+ auth: __1.promotekitAuth,
11
+ name: 'create_referral',
12
+ displayName: 'Create Referral',
13
+ description: 'Create a new referral in PromoteKit.',
14
+ props: {
15
+ email: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Email',
17
+ description: 'The email address of the referred person.',
18
+ required: true,
19
+ }),
20
+ affiliate_id: common_1.promotekitCommon.affiliateDropdown,
21
+ },
22
+ run(context) {
23
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
24
+ const response = yield (0, common_1.promotekitApiCall)({
25
+ token: context.auth,
26
+ method: pieces_common_1.HttpMethod.POST,
27
+ path: '/referrals',
28
+ body: {
29
+ email: context.propsValue.email,
30
+ affiliate_id: context.propsValue.affiliate_id,
31
+ },
32
+ });
33
+ return common_1.promotekitCommon.flattenReferral(response.body.data);
34
+ });
35
+ },
36
+ });
37
+ //# sourceMappingURL=create-referral.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-referral.js","sourceRoot":"","sources":["../../../../src/lib/actions/create-referral.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,6BAAuC;AACvC,sCAAgE;AAEnD,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,kBAAc;IACpB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,sCAAsC;IACnD,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,SAAS,CAAC;YACxB,WAAW,EAAE,OAAO;YACpB,WAAW,EAAE,2CAA2C;YACxD,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,yBAAgB,CAAC,iBAAiB;KACjD;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAErC;gBACD,KAAK,EAAE,OAAO,CAAC,IAAyB;gBACxC,MAAM,EAAE,0BAAU,CAAC,IAAI;gBACvB,IAAI,EAAE,YAAY;gBAClB,IAAI,EAAE;oBACJ,KAAK,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK;oBAC/B,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC,YAAY;iBAC9C;aACF,CAAC,CAAC;YACH,OAAO,yBAAgB,CAAC,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9D,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const findAffiliate: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ affiliate_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ }>;
4
+ //# sourceMappingURL=find-affiliate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-affiliate.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-affiliate.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa;;EAsBxB,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findAffiliate = 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.findAffiliate = (0, pieces_framework_1.createAction)({
10
+ auth: __1.promotekitAuth,
11
+ name: 'find_affiliate',
12
+ displayName: 'Find Affiliate',
13
+ description: 'Get details of a specific affiliate by ID.',
14
+ props: {
15
+ affiliate_id: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Affiliate ID',
17
+ description: 'The ID of the affiliate to retrieve.',
18
+ required: true,
19
+ }),
20
+ },
21
+ run(context) {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
+ const response = yield (0, common_1.promotekitApiCall)({
24
+ token: context.auth,
25
+ method: pieces_common_1.HttpMethod.GET,
26
+ path: `/affiliates/${context.propsValue.affiliate_id}`,
27
+ });
28
+ return common_1.promotekitCommon.flattenAffiliate(response.body.data);
29
+ });
30
+ },
31
+ });
32
+ //# sourceMappingURL=find-affiliate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-affiliate.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-affiliate.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,6BAAuC;AACvC,sCAAgE;AAEnD,QAAA,aAAa,GAAG,IAAA,+BAAY,EAAC;IACxC,IAAI,EAAE,kBAAc;IACpB,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,gBAAgB;IAC7B,WAAW,EAAE,4CAA4C;IACzD,KAAK,EAAE;QACL,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAErC;gBACD,KAAK,EAAE,OAAO,CAAC,IAAyB;gBACxC,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,eAAe,OAAO,CAAC,UAAU,CAAC,YAAY,EAAE;aACvD,CAAC,CAAC;YACH,OAAO,yBAAgB,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/D,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const findCampaign: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ campaign_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ }>;
4
+ //# sourceMappingURL=find-campaign.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-campaign.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-campaign.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;EA4BvB,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findCampaign = 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.findCampaign = (0, pieces_framework_1.createAction)({
10
+ auth: __1.promotekitAuth,
11
+ name: 'find_campaign',
12
+ displayName: 'Find Campaign',
13
+ description: 'Get details of a specific campaign by ID.',
14
+ props: {
15
+ campaign_id: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Campaign ID',
17
+ description: 'The ID of the campaign to retrieve.',
18
+ required: true,
19
+ }),
20
+ },
21
+ run(context) {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
+ var _a, _b;
24
+ const response = yield (0, common_1.promotekitApiCall)({
25
+ token: context.auth,
26
+ method: pieces_common_1.HttpMethod.GET,
27
+ path: `/campaigns/${context.propsValue.campaign_id}`,
28
+ });
29
+ const campaign = response.body.data;
30
+ return {
31
+ id: campaign['id'],
32
+ name: campaign['name'],
33
+ commission_type: (_a = campaign['commission_type']) !== null && _a !== void 0 ? _a : null,
34
+ commission_amount: (_b = campaign['commission_amount']) !== null && _b !== void 0 ? _b : null,
35
+ };
36
+ });
37
+ },
38
+ });
39
+ //# sourceMappingURL=find-campaign.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-campaign.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-campaign.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,6BAAuC;AACvC,sCAA8C;AAEjC,QAAA,YAAY,GAAG,IAAA,+BAAY,EAAC;IACvC,IAAI,EAAE,kBAAc;IACpB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,eAAe;IAC5B,WAAW,EAAE,2CAA2C;IACxD,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAErC;gBACD,KAAK,EAAE,OAAO,CAAC,IAAyB;gBACxC,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,cAAc,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE;aACrD,CAAC,CAAC;YACH,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;YACpC,OAAO;gBACL,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC;gBAClB,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC;gBACtB,eAAe,EAAE,MAAA,QAAQ,CAAC,iBAAiB,CAAC,mCAAI,IAAI;gBACpD,iBAAiB,EAAE,MAAA,QAAQ,CAAC,mBAAmB,CAAC,mCAAI,IAAI;aACzD,CAAC;QACJ,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const findCommission: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ commission_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ }>;
4
+ //# sourceMappingURL=find-commission.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-commission.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-commission.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc;;EAsBzB,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findCommission = 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.findCommission = (0, pieces_framework_1.createAction)({
10
+ auth: __1.promotekitAuth,
11
+ name: 'find_commission',
12
+ displayName: 'Find Commission',
13
+ description: 'Get details of a specific commission by ID.',
14
+ props: {
15
+ commission_id: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Commission ID',
17
+ description: 'The ID of the commission to retrieve.',
18
+ required: true,
19
+ }),
20
+ },
21
+ run(context) {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
+ const response = yield (0, common_1.promotekitApiCall)({
24
+ token: context.auth,
25
+ method: pieces_common_1.HttpMethod.GET,
26
+ path: `/commissions/${context.propsValue.commission_id}`,
27
+ });
28
+ return common_1.promotekitCommon.flattenCommission(response.body.data);
29
+ });
30
+ },
31
+ });
32
+ //# sourceMappingURL=find-commission.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-commission.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-commission.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,6BAAuC;AACvC,sCAAgE;AAEnD,QAAA,cAAc,GAAG,IAAA,+BAAY,EAAC;IACzC,IAAI,EAAE,kBAAc;IACpB,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,iBAAiB;IAC9B,WAAW,EAAE,6CAA6C;IAC1D,KAAK,EAAE;QACL,aAAa,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAChC,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAErC;gBACD,KAAK,EAAE,OAAO,CAAC,IAAyB;gBACxC,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,gBAAgB,OAAO,CAAC,UAAU,CAAC,aAAa,EAAE;aACzD,CAAC,CAAC;YACH,OAAO,yBAAgB,CAAC,iBAAiB,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChE,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const findPayout: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ payout_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ }>;
4
+ //# sourceMappingURL=find-payout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-payout.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-payout.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,UAAU;;EAsBrB,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findPayout = 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.findPayout = (0, pieces_framework_1.createAction)({
10
+ auth: __1.promotekitAuth,
11
+ name: 'find_payout',
12
+ displayName: 'Find Payout',
13
+ description: 'Get details of a specific payout by ID.',
14
+ props: {
15
+ payout_id: pieces_framework_1.Property.ShortText({
16
+ displayName: 'Payout ID',
17
+ description: 'The ID of the payout to retrieve.',
18
+ required: true,
19
+ }),
20
+ },
21
+ run(context) {
22
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
23
+ const response = yield (0, common_1.promotekitApiCall)({
24
+ token: context.auth,
25
+ method: pieces_common_1.HttpMethod.GET,
26
+ path: `/payouts/${context.propsValue.payout_id}`,
27
+ });
28
+ return common_1.promotekitCommon.flattenPayout(response.body.data);
29
+ });
30
+ },
31
+ });
32
+ //# sourceMappingURL=find-payout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-payout.js","sourceRoot":"","sources":["../../../../src/lib/actions/find-payout.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAyD;AACzD,6BAAuC;AACvC,sCAAgE;AAEnD,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,kBAAc;IACpB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,yCAAyC;IACtD,KAAK,EAAE;QACL,SAAS,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC5B,WAAW,EAAE,WAAW;YACxB,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,IAAI;SACf,CAAC;KACH;IACK,GAAG,CAAC,OAAO;;YACf,MAAM,QAAQ,GAAG,MAAM,IAAA,0BAAiB,EAErC;gBACD,KAAK,EAAE,OAAO,CAAC,IAAyB;gBACxC,MAAM,EAAE,0BAAU,CAAC,GAAG;gBACtB,IAAI,EAAE,YAAY,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE;aACjD,CAAC,CAAC;YACH,OAAO,yBAAgB,CAAC,aAAa,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5D,CAAC;KAAA;CACF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const findReferral: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").SecretTextProperty<true>, {
2
+ referral_id: import("@activepieces/pieces-framework").ShortTextProperty<true>;
3
+ }>;
4
+ //# sourceMappingURL=find-referral.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-referral.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/find-referral.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY;;EAsBvB,CAAC"}