@activepieces/piece-promotekit 0.2.0 → 0.3.0

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.
@@ -0,0 +1,97 @@
1
+ {
2
+ "Affiliate marketing platform integrated with Stripe.": "Plataforma de Afiliados de Marketing integrada com Stripe.",
3
+ "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": "Para obter a sua chave de API:\n1. Inicie sessão no seu painel PromoteKit.\n2. Vá em **Configurações> Chaves API**.\n3. Clique em **Criar chave de API**.\n4. Copie a chave e cole-a aqui.\n",
4
+ "List Affiliates": "Listar Afiliados",
5
+ "Find Affiliate": "Encontrar afiliado",
6
+ "Create Affiliate": "Criar afiliado",
7
+ "Update Affiliate": "Atualizar afiliado",
8
+ "List Referrals": "Lista de referências",
9
+ "Find Referral": "Encontrar Referência",
10
+ "Create Referral": "Criar Referência",
11
+ "List Commissions": "Listar Comissões",
12
+ "Find Commission": "Encontrar Comissão",
13
+ "List Campaigns": "Listar Campanhas",
14
+ "Find Campaign": "Encontrar Campanha",
15
+ "List Payouts": "Listar Pagamentos",
16
+ "Find Payout": "Encontrar pagamento",
17
+ "Custom API Call": "Chamada de API personalizada",
18
+ "List all affiliates in your PromoteKit account.": "Lista todos os afiliados da sua conta PromoteKet.",
19
+ "Get details of a specific affiliate by ID.": "Obtenha detalhes de um afiliado específico por ID.",
20
+ "Create a new affiliate in PromoteKit.": "Criar um novo afiliado em PromoteKit.",
21
+ "Update an existing affiliate in PromoteKit.": "Atualizar um afiliado existente no PromoteKit.",
22
+ "List all referrals in your PromoteKit account.": "Lista todas as referências na sua conta PromoteKet.",
23
+ "Get details of a specific referral by ID.": "Obtenha detalhes de uma indicação específica por ID.",
24
+ "Create a new referral in PromoteKit.": "Criar uma nova referência em PromoteKit.",
25
+ "List all commissions in your PromoteKit account.": "Listar todas as comissões da sua conta PromoteKit.",
26
+ "Get details of a specific commission by ID.": "Obtenha detalhes de uma comissão específica por ID.",
27
+ "List all campaigns in your PromoteKit account.": "Lista todas as campanhas na sua conta PromoteKit.",
28
+ "Get details of a specific campaign by ID.": "Obtenha detalhes de uma campanha específica por ID.",
29
+ "List all payouts in your PromoteKit account.": "Listar todos os pagamentos na sua conta PromoteKit.",
30
+ "Get details of a specific payout by ID.": "Obtenha detalhes de um pagamento específico por ID.",
31
+ "Make a custom API call to a specific endpoint": "Faça uma chamada de API personalizada para um ponto de extremidade específico",
32
+ "Page": "Página",
33
+ "Limit": "Limitar",
34
+ "Affiliate ID": "ID de afiliado",
35
+ "Email": "e-mail",
36
+ "First Name": "Nome",
37
+ "Last Name": "Sobrenome",
38
+ "Campaign": "Campanha",
39
+ "Payout Email": "E-mail de Pagamento",
40
+ "Approved": "Aceito",
41
+ "Banned": "Banido",
42
+ "Referral ID": "ID de Referência",
43
+ "Affiliate": "Afiliado",
44
+ "Commission ID": "ID da comissão",
45
+ "Campaign ID": "ID da Campanha",
46
+ "Payout ID": "ID de Pagamento",
47
+ "Method": "Método",
48
+ "Headers": "Cabeçalhos",
49
+ "Query Parameters": "Parâmetros da consulta",
50
+ "Body Type": "Tipo de Corpo",
51
+ "Body": "Conteúdo",
52
+ "Response is Binary ?": "A resposta é binária ?",
53
+ "No Error on Failure": "Nenhum erro no Failure",
54
+ "Timeout (in seconds)": "Tempo limite (em segundos)",
55
+ "Follow redirects": "Seguir redirecionamentos",
56
+ "Page number to retrieve. Defaults to 1.": "Número de página a recuperar. O padrão é 1.",
57
+ "Number of affiliates per page (max 100). Defaults to 10.": "Número de afiliados por página (máx. 100). O padrão é 10.",
58
+ "The ID of the affiliate to retrieve.": "A ID do afiliado a recuperar.",
59
+ "The email address of the new affiliate.": "O endereço de e-mail do novo afiliado.",
60
+ "Select the campaign for this affiliate.": "Selecione a campanha para este afiliado.",
61
+ "The ID of the affiliate to update.": "A ID do afiliado para atualizar.",
62
+ "The email address where the affiliate receives payouts.": "O e-mail onde o afiliado recebe pagamentos.",
63
+ "Whether the affiliate is approved.": "Se o afiliado é aprovado.",
64
+ "Whether the affiliate is banned.": "Se o afiliado é banido.",
65
+ "Number of referrals per page (max 100). Defaults to 10.": "Número de referências por página (máx. 100). O padrão é 10.",
66
+ "The ID of the referral to retrieve.": "O ID da referência a recuperar.",
67
+ "The email address of the referred person.": "O endereço de e-mail da pessoa referida.",
68
+ "Select the affiliate.": "Selecione o afiliado.",
69
+ "Number of commissions per page (max 100). Defaults to 10.": "Número de comissões por página (máximo de 100). O padrão é 10.",
70
+ "The ID of the commission to retrieve.": "O ID da comissão a recuperar.",
71
+ "The ID of the campaign to retrieve.": "O ID da campanha para recuperar.",
72
+ "Number of payouts per page (max 100). Defaults to 10.": "Número de pagamentos por página (máximo de 100). O padrão é 10.",
73
+ "The ID of the payout to retrieve.": "O ID do pagamento para recuperar.",
74
+ "Authorization headers are injected automatically from your connection.": "Os cabeçalhos de autorização são inseridos automaticamente a partir da sua conexão.",
75
+ "Enable for files like PDFs, images, etc.": "Habilitar para arquivos como PDFs, imagens, etc.",
76
+ "GET": "OBTER",
77
+ "POST": "POSTAR",
78
+ "PATCH": "COMPRAR",
79
+ "PUT": "COLOCAR",
80
+ "DELETE": "EXCLUIR",
81
+ "HEAD": "CABEÇA",
82
+ "None": "Nenhuma",
83
+ "JSON": "JSON",
84
+ "Form Data": "Dados de Formulário",
85
+ "Raw": "RAW",
86
+ "New Event": "Novo evento",
87
+ "Triggers when a PromoteKit webhook event is received.": "Aciona quando um evento do PromoteKit é recebido.",
88
+ "Event Type": "Tipo de Evento",
89
+ "Markdown": "Markdown",
90
+ "The event type this trigger should respond to.": "O tipo de evento ao qual este gatilho deve responder.",
91
+ "### Setup Instructions\n\n1. Go to your PromoteKit dashboard\n2. Navigate to **Settings > Webhooks**\n3. Click **Add Endpoint**\n4. Paste the webhook URL shown below\n5. Enable the event type you selected above (and any others you need for separate flows)\n6. Save the endpoint": "### Instruções de configuração\n\n1. Vá para o seu PromoteKit dashboard\n2. Navegue para **Settings > Webhooks**\n3. Clique em **Add Endpoint**\n4. Cole a URL do webhook mostrada abaixo de\n5. Habilite o tipo de evento selecionado acima (e quaisquer outros que você precise para fluxos separados)\n6. Salve o ponto final",
92
+ "Affiliate Created": "Afiliado Criado",
93
+ "Affiliate Approved": "Afiliados aprovados",
94
+ "Referral Created": "Referência Criada",
95
+ "Referral Converted": "Referência convertida",
96
+ "Commission Created": "Comissão Criada"
97
+ }
@@ -1,76 +1,97 @@
1
1
  {
2
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.",
3
+ "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": "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",
5
4
  "List Affiliates": "List Affiliates",
6
- "List all affiliates in your PromoteKit account.": "List all affiliates in your PromoteKit account.",
7
5
  "Find Affiliate": "Find Affiliate",
8
- "Get details of a specific affiliate by ID.": "Get details of a specific affiliate by ID.",
9
6
  "Create Affiliate": "Create Affiliate",
10
- "Create a new affiliate in PromoteKit.": "Create a new affiliate in PromoteKit.",
11
7
  "Update Affiliate": "Update Affiliate",
12
- "Update an existing affiliate in PromoteKit.": "Update an existing affiliate in PromoteKit.",
13
8
  "List Referrals": "List Referrals",
14
- "List all referrals in your PromoteKit account.": "List all referrals in your PromoteKit account.",
15
9
  "Find Referral": "Find Referral",
16
- "Get details of a specific referral by ID.": "Get details of a specific referral by ID.",
17
10
  "Create Referral": "Create Referral",
18
- "Create a new referral in PromoteKit.": "Create a new referral in PromoteKit.",
19
11
  "List Commissions": "List Commissions",
20
- "List all commissions in your PromoteKit account.": "List all commissions in your PromoteKit account.",
21
12
  "Find Commission": "Find Commission",
22
- "Get details of a specific commission by ID.": "Get details of a specific commission by ID.",
23
13
  "List Campaigns": "List Campaigns",
24
- "List all campaigns in your PromoteKit account.": "List all campaigns in your PromoteKit account.",
25
14
  "Find Campaign": "Find Campaign",
26
- "Get details of a specific campaign by ID.": "Get details of a specific campaign by ID.",
27
15
  "List Payouts": "List Payouts",
28
- "List all payouts in your PromoteKit account.": "List all payouts in your PromoteKit account.",
29
16
  "Find Payout": "Find Payout",
30
- "Get details of a specific payout by ID.": "Get details of a specific payout by ID.",
31
17
  "Custom API Call": "Custom API Call",
18
+ "List all affiliates in your PromoteKit account.": "List all affiliates in your PromoteKit account.",
19
+ "Get details of a specific affiliate by ID.": "Get details of a specific affiliate by ID.",
20
+ "Create a new affiliate in PromoteKit.": "Create a new affiliate in PromoteKit.",
21
+ "Update an existing affiliate in PromoteKit.": "Update an existing affiliate in PromoteKit.",
22
+ "List all referrals in your PromoteKit account.": "List all referrals in your PromoteKit account.",
23
+ "Get details of a specific referral by ID.": "Get details of a specific referral by ID.",
24
+ "Create a new referral in PromoteKit.": "Create a new referral in PromoteKit.",
25
+ "List all commissions in your PromoteKit account.": "List all commissions in your PromoteKit account.",
26
+ "Get details of a specific commission by ID.": "Get details of a specific commission by ID.",
27
+ "List all campaigns in your PromoteKit account.": "List all campaigns in your PromoteKit account.",
28
+ "Get details of a specific campaign by ID.": "Get details of a specific campaign by ID.",
29
+ "List all payouts in your PromoteKit account.": "List all payouts in your PromoteKit account.",
30
+ "Get details of a specific payout by ID.": "Get details of a specific payout by ID.",
31
+ "Make a custom API call to a specific endpoint": "Make a custom API call to a specific endpoint",
32
32
  "Page": "Page",
33
- "Page number to retrieve. Defaults to 1.": "Page number to retrieve. Defaults to 1.",
34
33
  "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
34
  "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
35
  "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
36
  "First Name": "First Name",
46
37
  "Last Name": "Last Name",
47
38
  "Campaign": "Campaign",
48
- "Select the campaign for this affiliate.": "Select the campaign for this affiliate.",
49
39
  "Payout Email": "Payout Email",
50
- "The email address where the affiliate receives payouts.": "The email address where the affiliate receives payouts.",
51
40
  "Approved": "Approved",
52
- "Whether the affiliate is approved.": "Whether the affiliate is approved.",
53
41
  "Banned": "Banned",
54
- "Whether the affiliate is banned.": "Whether the affiliate is banned.",
55
- "Affiliate": "Affiliate",
56
- "Select the affiliate.": "Select the affiliate.",
57
42
  "Referral ID": "Referral ID",
58
- "The ID of the referral to retrieve.": "The ID of the referral to retrieve.",
43
+ "Affiliate": "Affiliate",
59
44
  "Commission ID": "Commission ID",
60
- "The ID of the commission to retrieve.": "The ID of the commission to retrieve.",
61
45
  "Campaign ID": "Campaign ID",
62
- "The ID of the campaign to retrieve.": "The ID of the campaign to retrieve.",
63
46
  "Payout ID": "Payout ID",
47
+ "Method": "Method",
48
+ "Headers": "Headers",
49
+ "Query Parameters": "Query Parameters",
50
+ "Body Type": "Body Type",
51
+ "Body": "Body",
52
+ "Response is Binary ?": "Response is Binary ?",
53
+ "No Error on Failure": "No Error on Failure",
54
+ "Timeout (in seconds)": "Timeout (in seconds)",
55
+ "Follow redirects": "Follow redirects",
56
+ "Page number to retrieve. Defaults to 1.": "Page number to retrieve. Defaults to 1.",
57
+ "Number of affiliates per page (max 100). Defaults to 10.": "Number of affiliates per page (max 100). Defaults to 10.",
58
+ "The ID of the affiliate to retrieve.": "The ID of the affiliate to retrieve.",
59
+ "The email address of the new affiliate.": "The email address of the new affiliate.",
60
+ "Select the campaign for this affiliate.": "Select the campaign for this affiliate.",
61
+ "The ID of the affiliate to update.": "The ID of the affiliate to update.",
62
+ "The email address where the affiliate receives payouts.": "The email address where the affiliate receives payouts.",
63
+ "Whether the affiliate is approved.": "Whether the affiliate is approved.",
64
+ "Whether the affiliate is banned.": "Whether the affiliate is banned.",
65
+ "Number of referrals per page (max 100). Defaults to 10.": "Number of referrals per page (max 100). Defaults to 10.",
66
+ "The ID of the referral to retrieve.": "The ID of the referral to retrieve.",
67
+ "The email address of the referred person.": "The email address of the referred person.",
68
+ "Select the affiliate.": "Select the affiliate.",
69
+ "Number of commissions per page (max 100). Defaults to 10.": "Number of commissions per page (max 100). Defaults to 10.",
70
+ "The ID of the commission to retrieve.": "The ID of the commission to retrieve.",
71
+ "The ID of the campaign to retrieve.": "The ID of the campaign to retrieve.",
72
+ "Number of payouts per page (max 100). Defaults to 10.": "Number of payouts per page (max 100). Defaults to 10.",
64
73
  "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.",
74
+ "Authorization headers are injected automatically from your connection.": "Authorization headers are injected automatically from your connection.",
75
+ "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
76
+ "GET": "GET",
77
+ "POST": "POST",
78
+ "PATCH": "PATCH",
79
+ "PUT": "PUT",
80
+ "DELETE": "DELETE",
81
+ "HEAD": "HEAD",
82
+ "None": "None",
83
+ "JSON": "JSON",
84
+ "Form Data": "Form Data",
85
+ "Raw": "Raw",
86
+ "New Event": "New Event",
87
+ "Triggers when a PromoteKit webhook event is received.": "Triggers when a PromoteKit webhook event is received.",
88
+ "Event Type": "Event Type",
89
+ "Markdown": "Markdown",
90
+ "The event type this trigger should respond to.": "The event type this trigger should respond to.",
91
+ "### Setup Instructions\n\n1. Go to your PromoteKit dashboard\n2. Navigate to **Settings > Webhooks**\n3. Click **Add Endpoint**\n4. Paste the webhook URL shown below\n5. Enable the event type you selected above (and any others you need for separate flows)\n6. Save the endpoint": "### Setup Instructions\n\n1. Go to your PromoteKit dashboard\n2. Navigate to **Settings > Webhooks**\n3. Click **Add Endpoint**\n4. Paste the webhook URL shown below\n5. Enable the event type you selected above (and any others you need for separate flows)\n6. Save the endpoint",
92
+ "Affiliate Created": "Affiliate Created",
67
93
  "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.",
94
+ "Referral Created": "Referral Created",
71
95
  "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
- }
96
+ "Commission Created": "Commission Created"
97
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "Affiliate marketing platform integrated with Stripe.": "Affiliate marketing platform integrated with Stripe.",
3
+ "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": "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",
4
+ "List Affiliates": "List Affiliates",
5
+ "Find Affiliate": "Find Affiliate",
6
+ "Create Affiliate": "Create Affiliate",
7
+ "Update Affiliate": "Update Affiliate",
8
+ "List Referrals": "List Referrals",
9
+ "Find Referral": "Find Referral",
10
+ "Create Referral": "Create Referral",
11
+ "List Commissions": "List Commissions",
12
+ "Find Commission": "Find Commission",
13
+ "List Campaigns": "List Campaigns",
14
+ "Find Campaign": "Find Campaign",
15
+ "List Payouts": "List Payouts",
16
+ "Find Payout": "Find Payout",
17
+ "Custom API Call": "自定义 API 呼叫",
18
+ "List all affiliates in your PromoteKit account.": "List all affiliates in your PromoteKit account.",
19
+ "Get details of a specific affiliate by ID.": "Get details of a specific affiliate by ID.",
20
+ "Create a new affiliate in PromoteKit.": "Create a new affiliate in PromoteKit.",
21
+ "Update an existing affiliate in PromoteKit.": "Update an existing affiliate in PromoteKit.",
22
+ "List all referrals in your PromoteKit account.": "List all referrals in your PromoteKit account.",
23
+ "Get details of a specific referral by ID.": "Get details of a specific referral by ID.",
24
+ "Create a new referral in PromoteKit.": "Create a new referral in PromoteKit.",
25
+ "List all commissions in your PromoteKit account.": "List all commissions in your PromoteKit account.",
26
+ "Get details of a specific commission by ID.": "Get details of a specific commission by ID.",
27
+ "List all campaigns in your PromoteKit account.": "List all campaigns in your PromoteKit account.",
28
+ "Get details of a specific campaign by ID.": "Get details of a specific campaign by ID.",
29
+ "List all payouts in your PromoteKit account.": "List all payouts in your PromoteKit account.",
30
+ "Get details of a specific payout by ID.": "Get details of a specific payout by ID.",
31
+ "Make a custom API call to a specific endpoint": "将一个自定义 API 调用到一个特定的终点",
32
+ "Page": "Page",
33
+ "Limit": "Limit",
34
+ "Affiliate ID": "Affiliate ID",
35
+ "Email": "电子邮件地址",
36
+ "First Name": "First Name",
37
+ "Last Name": "名字",
38
+ "Campaign": "Campaign",
39
+ "Payout Email": "Payout Email",
40
+ "Approved": "Approved",
41
+ "Banned": "Banned",
42
+ "Referral ID": "Referral ID",
43
+ "Affiliate": "Affiliate",
44
+ "Commission ID": "Commission ID",
45
+ "Campaign ID": "Campaign ID",
46
+ "Payout ID": "Payout ID",
47
+ "Method": "方法",
48
+ "Headers": "信头",
49
+ "Query Parameters": "查询参数",
50
+ "Body Type": "Body Type",
51
+ "Body": "正文内容",
52
+ "Response is Binary ?": "Response is Binary ?",
53
+ "No Error on Failure": "失败时没有错误",
54
+ "Timeout (in seconds)": "超时(秒)",
55
+ "Follow redirects": "Follow redirects",
56
+ "Page number to retrieve. Defaults to 1.": "Page number to retrieve. Defaults to 1.",
57
+ "Number of affiliates per page (max 100). Defaults to 10.": "Number of affiliates per page (max 100). Defaults to 10.",
58
+ "The ID of the affiliate to retrieve.": "The ID of the affiliate to retrieve.",
59
+ "The email address of the new affiliate.": "The email address of the new affiliate.",
60
+ "Select the campaign for this affiliate.": "Select the campaign for this affiliate.",
61
+ "The ID of the affiliate to update.": "The ID of the affiliate to update.",
62
+ "The email address where the affiliate receives payouts.": "The email address where the affiliate receives payouts.",
63
+ "Whether the affiliate is approved.": "Whether the affiliate is approved.",
64
+ "Whether the affiliate is banned.": "Whether the affiliate is banned.",
65
+ "Number of referrals per page (max 100). Defaults to 10.": "Number of referrals per page (max 100). Defaults to 10.",
66
+ "The ID of the referral to retrieve.": "The ID of the referral to retrieve.",
67
+ "The email address of the referred person.": "The email address of the referred person.",
68
+ "Select the affiliate.": "Select the affiliate.",
69
+ "Number of commissions per page (max 100). Defaults to 10.": "Number of commissions per page (max 100). Defaults to 10.",
70
+ "The ID of the commission to retrieve.": "The ID of the commission to retrieve.",
71
+ "The ID of the campaign to retrieve.": "The ID of the campaign to retrieve.",
72
+ "Number of payouts per page (max 100). Defaults to 10.": "Number of payouts per page (max 100). Defaults to 10.",
73
+ "The ID of the payout to retrieve.": "The ID of the payout to retrieve.",
74
+ "Authorization headers are injected automatically from your connection.": "授权头自动从您的连接中注入。",
75
+ "Enable for files like PDFs, images, etc.": "Enable for files like PDFs, images, etc.",
76
+ "GET": "获取",
77
+ "POST": "帖子",
78
+ "PATCH": "PATCH",
79
+ "PUT": "弹出",
80
+ "DELETE": "删除",
81
+ "HEAD": "黑色",
82
+ "None": "无",
83
+ "JSON": "JSON",
84
+ "Form Data": "表单数据",
85
+ "Raw": "原始文件",
86
+ "New Event": "New Event",
87
+ "Triggers when a PromoteKit webhook event is received.": "Triggers when a PromoteKit webhook event is received.",
88
+ "Event Type": "Event Type",
89
+ "Markdown": "Markdown",
90
+ "The event type this trigger should respond to.": "The event type this trigger should respond to.",
91
+ "### Setup Instructions\n\n1. Go to your PromoteKit dashboard\n2. Navigate to **Settings > Webhooks**\n3. Click **Add Endpoint**\n4. Paste the webhook URL shown below\n5. Enable the event type you selected above (and any others you need for separate flows)\n6. Save the endpoint": "### Setup Instructions\n\n1. Go to your PromoteKit dashboard\n2. Navigate to **Settings > Webhooks**\n3. Click **Add Endpoint**\n4. Paste the webhook URL shown below\n5. Enable the event type you selected above (and any others you need for separate flows)\n6. Save the endpoint",
92
+ "Affiliate Created": "Affiliate Created",
93
+ "Affiliate Approved": "Affiliate Approved",
94
+ "Referral Created": "Referral Created",
95
+ "Referral Converted": "Referral Converted",
96
+ "Commission Created": "Commission Created"
97
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,cAAc,mEAsBzB,CAAC;AAEH,eAAO,MAAM,UAAU,mHA+BrB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAwBA,eAAO,MAAM,cAAc,mEAsBzB,CAAC;AAEH,eAAO,MAAM,UAAU,mHA+BrB,CAAC"}
package/src/index.js CHANGED
@@ -18,7 +18,9 @@ const list_campaigns_1 = require("./lib/actions/list-campaigns");
18
18
  const find_campaign_1 = require("./lib/actions/find-campaign");
19
19
  const list_payouts_1 = require("./lib/actions/list-payouts");
20
20
  const find_payout_1 = require("./lib/actions/find-payout");
21
- const new_event_1 = require("./lib/triggers/new-event");
21
+ const new_affiliate_event_1 = require("./lib/triggers/new-affiliate-event");
22
+ const new_referral_event_1 = require("./lib/triggers/new-referral-event");
23
+ const new_commission_event_1 = require("./lib/triggers/new-commission-event");
22
24
  exports.promotekitAuth = pieces_framework_1.PieceAuth.SecretText({
23
25
  displayName: 'API Key',
24
26
  description: `To get your API key:
@@ -75,6 +77,6 @@ exports.promotekit = (0, pieces_framework_1.createPiece)({
75
77
  }),
76
78
  }),
77
79
  ],
78
- triggers: [new_event_1.newEvent],
80
+ triggers: [new_affiliate_event_1.newAffiliateEvent, new_referral_event_1.newReferralEvent, new_commission_event_1.newCommissionEvent],
79
81
  });
80
82
  //# sourceMappingURL=index.js.map
package/src/index.js.map CHANGED
@@ -1 +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,wDAAoD;AAEvC,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,CAA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C5B,aAAa,EAAE,UAAU,IAAI,EAAE;iBAChC,CAAC,CAAA;cAAA;SACH,CAAC;KACH;IACD,QAAQ,EAAE,CAAC,uCAAiB,EAAE,qCAAgB,EAAE,yCAAkB,CAAC;CACpE,CAAC,CAAC"}
@@ -0,0 +1,15 @@
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
@@ -0,0 +1 @@
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;;;;;;;;;;;;EA6E5B,CAAC"}
@@ -0,0 +1,91 @@
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
+ props: {
19
+ eventTypes: pieces_framework_1.Property.StaticMultiSelectDropdown({
20
+ displayName: 'Affiliate Event Types',
21
+ description: 'Select the affiliate event types to listen for. Leave empty to receive all affiliate events.',
22
+ required: false,
23
+ options: { options: AFFILIATE_EVENT_OPTIONS },
24
+ }),
25
+ instructions: pieces_framework_1.Property.MarkDown({
26
+ value: `### Setup Instructions
27
+
28
+ 1. Go to your PromoteKit dashboard.
29
+ 2. Navigate to **Settings > Webhooks**.
30
+ 3. Click **Add Endpoint**.
31
+ 4. Paste the webhook URL shown below :
32
+ \`\`\`text
33
+ {{webhookUrl}}
34
+ \`\`\`
35
+ 5. Enable the affiliate event types you selected above.
36
+ 6. Save the endpoint.
37
+
38
+ **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.`,
39
+ }),
40
+ },
41
+ sampleData: {
42
+ type: 'affiliate.created',
43
+ id: 'aff_sample',
44
+ email: 'affiliate@example.com',
45
+ first_name: 'John',
46
+ last_name: 'Doe',
47
+ approved: false,
48
+ banned: false,
49
+ created_at: '2024-01-01T00:00:00Z',
50
+ },
51
+ type: pieces_framework_1.TriggerStrategy.WEBHOOK,
52
+ onEnable() {
53
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
54
+ // Webhook is configured manually in PromoteKit dashboard
55
+ });
56
+ },
57
+ onDisable() {
58
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
59
+ // Webhook is configured manually in PromoteKit dashboard
60
+ });
61
+ },
62
+ run(context) {
63
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
64
+ var _a;
65
+ const payload = context.payload.body;
66
+ const selected = (_a = context.propsValue.eventTypes) !== null && _a !== void 0 ? _a : [];
67
+ const isAffiliate = payload.type === 'affiliate.created' ||
68
+ payload.type === 'affiliate.approved';
69
+ if (!isAffiliate)
70
+ return [];
71
+ if (selected.length > 0 && !selected.includes(payload.type))
72
+ return [];
73
+ return [Object.assign({ type: payload.type }, common_1.promotekitCommon.flattenAffiliate(payload.data))];
74
+ });
75
+ },
76
+ test(context) {
77
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
78
+ var _a, _b;
79
+ const response = yield (0, common_1.promotekitApiCall)({
80
+ token: context.auth.secret_text,
81
+ method: pieces_common_1.HttpMethod.GET,
82
+ path: '/affiliates',
83
+ queryParams: { limit: '5' },
84
+ });
85
+ const selected = (_a = context.propsValue.eventTypes) !== null && _a !== void 0 ? _a : [];
86
+ const eventType = (_b = selected[0]) !== null && _b !== void 0 ? _b : 'affiliate.created';
87
+ return response.body.data.map((item) => (Object.assign({ type: eventType }, common_1.promotekitCommon.flattenAffiliate(item))));
88
+ });
89
+ },
90
+ });
91
+ //# sourceMappingURL=new-affiliate-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"new-affiliate-event.js","sourceRoot":"","sources":["../../../../src/lib/triggers/new-affiliate-event.ts"],"names":[],"mappings":";;;;AAAA,qEAA0F;AAC1F,6BAAuC;AACvC,sCAAgE;AAChE,+DAAyD;AAEzD,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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,15 +1,11 @@
1
1
  import { TriggerStrategy } from '@activepieces/pieces-framework';
2
- export declare const newEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
3
- eventType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
2
+ export declare const newCommissionEvent: import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
4
3
  instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
5
4
  }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.POLLING, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
6
- eventType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
7
5
  instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
8
6
  }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.MANUAL, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
9
- eventType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
10
7
  instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
11
8
  }> | import("@activepieces/pieces-framework").ITrigger<TriggerStrategy.APP_WEBHOOK, import("@activepieces/pieces-framework").SecretTextProperty<true>, {
12
- eventType: import("@activepieces/pieces-framework").StaticDropdownProperty<string, true>;
13
9
  instructions: import("@activepieces/pieces-framework/dist/src/lib/property/input/markdown-property").MarkDownProperty;
14
10
  }>;
15
- //# sourceMappingURL=new-event.d.ts.map
11
+ //# sourceMappingURL=new-commission-event.d.ts.map
@@ -0,0 +1 @@
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;;;;;;;;EA8D7B,CAAC"}
@@ -0,0 +1,71 @@
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
+ props: {
15
+ instructions: pieces_framework_1.Property.MarkDown({
16
+ value: `### Setup Instructions
17
+
18
+ 1. Go to your PromoteKit dashboard.
19
+ 2. Navigate to **Settings > Webhooks**.
20
+ 3. Click **Add Endpoint**.
21
+ 4. Paste the webhook URL shown below :
22
+ \`\`\`text
23
+ {{webhookUrl}}
24
+ \`\`\`
25
+ 5. Enable the **Commission Created** event.
26
+ 6. Save the endpoint.`,
27
+ }),
28
+ },
29
+ sampleData: {
30
+ type: 'commission.created',
31
+ id: 'com_sample',
32
+ revenue_amount: 100,
33
+ currency: 'usd',
34
+ commission_amount: 20,
35
+ payout_status: 'pending',
36
+ affiliate_id: 'aff_sample',
37
+ affiliate_email: 'affiliate@example.com',
38
+ created_at: '2024-01-01T00:00:00Z',
39
+ },
40
+ type: pieces_framework_1.TriggerStrategy.WEBHOOK,
41
+ onEnable() {
42
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
43
+ // Webhook is configured manually in PromoteKit dashboard
44
+ });
45
+ },
46
+ onDisable() {
47
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
48
+ // Webhook is configured manually in PromoteKit dashboard
49
+ });
50
+ },
51
+ run(context) {
52
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
53
+ const payload = context.payload.body;
54
+ if (payload.type !== 'commission.created')
55
+ return [];
56
+ return [Object.assign({ type: payload.type }, common_1.promotekitCommon.flattenCommission(payload.data))];
57
+ });
58
+ },
59
+ test(context) {
60
+ return tslib_1.__awaiter(this, void 0, void 0, function* () {
61
+ const response = yield (0, common_1.promotekitApiCall)({
62
+ token: context.auth.secret_text,
63
+ method: pieces_common_1.HttpMethod.GET,
64
+ path: '/commissions',
65
+ queryParams: { limit: '5' },
66
+ });
67
+ return response.body.data.map((item) => (Object.assign({ type: 'commission.created' }, common_1.promotekitCommon.flattenCommission(item))));
68
+ });
69
+ },
70
+ });
71
+ //# sourceMappingURL=new-commission-event.js.map
@@ -0,0 +1 @@
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,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"}
@@ -0,0 +1,15 @@
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
@@ -0,0 +1 @@
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;;;;;;;;;;;;EA4E3B,CAAC"}