Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Commit

Permalink
Adding support for default values for connector params (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
galvana authored Jun 20, 2022
1 parent 9424cd6 commit 44745f1
Show file tree
Hide file tree
Showing 20 changed files with 897 additions and 771 deletions.
20 changes: 12 additions & 8 deletions data/saas/config/hubspot_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ saas_config:

connector_params:
- name: domain
default_value: api.hubapi.com
- name: hapikey

client_config:
Expand All @@ -27,16 +28,16 @@ saas_config:
read:
path: /crm/v3/objects/contacts/search
method: POST
body:
'{
body: |
{
"filterGroups": [{
"filters": [{
"value": "<email>",
"propertyName": "email",
"operator": "EQ"
}]
}]
}'
}
query_params:
- name: limit
value: 100
Expand All @@ -55,7 +56,10 @@ saas_config:
update:
path: /crm/v3/objects/contacts/<contactId>
method: PATCH
body: '{<masked_object_fields>}'
body: |
{
<masked_object_fields>
}
param_values:
- name: contactId
references:
Expand Down Expand Up @@ -95,13 +99,13 @@ saas_config:
update:
path: /communication-preferences/v3/unsubscribe
method: POST
body:
'{
body: |
{
"emailAddress": "<email>",
"subscriptionId": "<subscriptionId>",
"legalBasis": "LEGITIMATE_INTEREST_CLIENT",
"legalBasisExplanation": "At users request, we opted them out"
}'
}
data_path: subscriptionStatuses
param_values:
- name: email
Expand All @@ -115,4 +119,4 @@ saas_config:
- strategy: filter
configuration:
field: status
value: SUBSCRIBED
value: SUBSCRIBED
133 changes: 68 additions & 65 deletions data/saas/config/mailchimp_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,70 +21,73 @@ saas_config:
test_request:
method: GET
path: /3.0/lists

endpoints:
- name: messages
requests:
read:
method: GET
path: /3.0/conversations/<conversation_id>/messages
param_values:
- name: conversation_id
references:
- dataset: mailchimp_connector_example
field: conversations.id
direction: from
data_path: conversation_messages
postprocessors:
- strategy: filter
- name: messages
requests:
read:
method: GET
path: /3.0/conversations/<conversation_id>/messages
param_values:
- name: conversation_id
references:
- dataset: mailchimp_connector_example
field: conversations.id
direction: from
data_path: conversation_messages
postprocessors:
- strategy: filter
configuration:
field: from_email
value:
identity: email
- name: conversations
requests:
read:
method: GET
path: /3.0/conversations
query_params:
- name: count
value: 1000
- name: offset
value: 0
param_values:
- name: placeholder
identity: email
data_path: conversations
pagination:
strategy: offset
configuration:
field: from_email
value:
identity: email
- name: conversations
requests:
read:
method: GET
path: /3.0/conversations
query_params:
- name: count
value: 1000
- name: offset
value: 0
param_values:
- name: placeholder
identity: email
data_path: conversations
pagination:
strategy: offset
configuration:
incremental_param: offset
increment_by: 1000
limit: 10000
- name: member
requests:
read:
method: GET
path: /3.0/search-members
query_params:
- name: query
value: <email>
param_values:
- name: email
identity: email
data_path: exact_matches.members
update:
method: PUT
path: /3.0/lists/<list_id>/members/<subscriber_hash>
param_values:
- name: list_id
references:
- dataset: mailchimp_connector_example
field: member.list_id
direction: from
- name: subscriber_hash
references:
- dataset: mailchimp_connector_example
field: member.id
direction: from
body: '{<masked_object_fields>}'
incremental_param: offset
increment_by: 1000
limit: 10000
- name: member
requests:
read:
method: GET
path: /3.0/search-members
query_params:
- name: query
value: <email>
param_values:
- name: email
identity: email
data_path: exact_matches.members
update:
method: PUT
path: /3.0/lists/<list_id>/members/<subscriber_hash>
param_values:
- name: list_id
references:
- dataset: mailchimp_connector_example
field: member.list_id
direction: from
- name: subscriber_hash
references:
- dataset: mailchimp_connector_example
field: member.id
direction: from
body: |
{
<masked_object_fields>
}
1 change: 1 addition & 0 deletions data/saas/config/outreach_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ saas_config:

connector_params:
- name: domain
default_value: platform.segmentapis.com
- name: requester_email
description: The email of the Outreach user to associate with each automated compliance request (data_protection_request)
- name: client_id
Expand Down
Loading

0 comments on commit 44745f1

Please sign in to comment.