Skip to content

Commit

Permalink
🎉 Source Mailchimp: updated Mailchimp schemas (#7975)
Browse files Browse the repository at this point in the history
* create mailchimp schemas

* remove star import

* refactoring

* resolve merge conflicts

* update mailchimp cdk version

* revert changes from JsonToAvroSchemaConverter

* revert changes from JsonToAvroSchemaConverter

* bump Source Mailchimp

Co-authored-by: vmaltsev <vitalii.maltsev@globallogic.com>
  • Loading branch information
VitaliiMaltsev and vmaltsev committed Dec 13, 2021
1 parent 62c3c4e commit faa4d9a
Show file tree
Hide file tree
Showing 51 changed files with 1,615 additions and 8 deletions.
Expand Up @@ -2,7 +2,7 @@
"sourceDefinitionId": "b03a9f3e-22a5-11eb-adc1-0242ac120002",
"name": "Mailchimp",
"dockerRepository": "airbyte/source-mailchimp",
"dockerImageTag": "0.2.8",
"dockerImageTag": "0.2.9",
"documentationUrl": "https://docs.airbyte.io/integrations/sources/mailchimp",
"icon": "mailchimp.svg"
}
Expand Up @@ -365,7 +365,7 @@
- name: Mailchimp
sourceDefinitionId: b03a9f3e-22a5-11eb-adc1-0242ac120002
dockerRepository: airbyte/source-mailchimp
dockerImageTag: 0.2.8
dockerImageTag: 0.2.9
documentationUrl: https://docs.airbyte.io/integrations/sources/mailchimp
icon: mailchimp.svg
sourceType: api
Expand Down
Expand Up @@ -12,5 +12,5 @@ RUN pip install .
ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.2.8
LABEL io.airbyte.version=0.2.9
LABEL io.airbyte.name=airbyte/source-mailchimp
4 changes: 2 additions & 2 deletions airbyte-integrations/connectors/source-mailchimp/setup.py
Expand Up @@ -12,10 +12,10 @@
author_email="contact@airbyte.io",
packages=find_packages(),
install_requires=[
"airbyte-cdk~=0.1",
"airbyte-cdk~=0.1.35",
"mailchimp3==3.0.14",
"pytest~=6.1",
],
package_data={"": ["*.json", "schemas/*.json"]},
package_data={"": ["*.json", "schemas/*.json", "schemas/shared/*.json"]},
extras_require={"tests": ["pytest~=6.1"]},
)
Expand Up @@ -22,7 +22,7 @@
"readOnly": true
},
"type": {
"$ref": "https://us1.api.mailchimp.com/schema/3.0/Definitions/CampaignType.json"
"$ref": "campaignType.json"
},
"create_time": {
"type": "string",
Expand All @@ -43,7 +43,7 @@
"readOnly": true
},
"status": {
"$ref": "https://us1.api.mailchimp.com/schema/3.0/Definitions/CampaignStatus.json"
"$ref": "campaignStatus.json"
},
"emails_sent": {
"type": "integer",
Expand Down Expand Up @@ -110,7 +110,7 @@
"readOnly": true
},
"segment_opts": {
"$ref": "https://us1.api.mailchimp.com/schema/3.0/Definitions/SegmentationOptions.json"
"$ref": "segmentationOptions.json"
}
}
},
Expand Down
@@ -0,0 +1,32 @@
{
"type": "object",
"title": "Address Merge Field Segment",
"description": "Segment by an address-type merge field.",
"required": ["field", "op"],
"properties": {
"condition_type": {
"type": "string",
"x-value": "AddressMerge",
"enum": ["AddressMerge"]
},
"field": {
"type": "string",
"title": "Segment Field",
"description": "An address-type merge field to segment.",
"example": "MMERGE3"
},
"op": {
"type": "string",
"enum": ["contains", "notcontain", "blank", "blank_not"],
"title": "Segment Operator",
"description": "Whether the member's address merge field contains/does not contain a value or is/is not blank.",
"example": "contains"
},
"value": {
"type": "string",
"title": "Segment Value",
"description": "The value to segment a text merge field with.",
"example": "Atlanta"
}
}
}
@@ -0,0 +1,38 @@
{
"type": "object",
"title": "Address/Zip Merge Field Segment",
"description": "Segment by an address-type merge field within a given distance.",
"required": ["field", "op", "value", "extra"],
"properties": {
"condition_type": {
"type": "string",
"x-value": "ZipMerge",
"enum": ["ZipMerge"]
},
"field": {
"type": "string",
"title": "Segment Field",
"description": "An address or zip-type merge field to segment.",
"example": "MMERGE2"
},
"op": {
"type": "string",
"enum": ["geoin"],
"title": "Segment Operator",
"description": "Whether the member's address merge field is within a given distance from a city or zip.",
"example": "geoin"
},
"value": {
"type": "string",
"title": "Segment Value",
"description": "The distance from the city/zip.",
"example": "25"
},
"extra": {
"type": "string",
"title": "Segment Extra",
"description": "The city or the zip being used to segment against.",
"example": "30318"
}
}
}
@@ -0,0 +1,32 @@
{
"type": "object",
"title": "Aim Segment",
"description": "Segment by interaction with a specific campaign.",
"properties": {
"condition_type": {
"type": "string",
"x-value": "Aim",
"enum": ["Aim"]
},
"field": {
"type": "string",
"enum": ["aim"],
"title": "Segment Field",
"description": "Segment by interaction with a specific campaign.",
"example": "aim"
},
"op": {
"type": "string",
"enum": ["open", "click", "sent", "noopen", "noclick", "nosent"],
"title": "Segment Operator",
"description": "The status of the member with regard to their campaign interaction. One of the following: opened, clicked, was sent, didn't open, didn't click, or was not sent.",
"example": "open"
},
"value": {
"type": "string",
"title": "Segment Data",
"description": "Either the web id value for a specific campaign or 'any' to account for subscribers who have/have not interacted with any campaigns.",
"example": "any"
}
}
}
@@ -0,0 +1,33 @@
{
"type": "object",
"title": "Automation Segment",
"description": "Segment by interaction with an Automation workflow.",
"required": ["field", "op", "value"],
"properties": {
"condition_type": {
"type": "string",
"x-value": "Automation",
"enum": ["Automation"]
},
"field": {
"type": "string",
"enum": ["automation"],
"title": "Segment Field",
"description": "Segment by interaction with an Automation workflow.",
"example": "automation"
},
"op": {
"type": "string",
"enum": ["started", "completed", "not_started", "not_completed"],
"title": "Segment Operator",
"description": "The status of the member with regard to the automation workflow. One of the following: has started the workflow, has completed the workflow, has not started the workflow, or has not completed the workflow.",
"example": "started"
},
"value": {
"type": "string",
"title": "Segment Data",
"description": "The web id for the automation workflow to segment against.",
"example": "2135217"
}
}
}
@@ -0,0 +1,32 @@
{
"type": "object",
"title": "Birthday Merge Field Segment",
"description": "Segment by a contact's birthday.",
"required": ["field", "op"],
"properties": {
"condition_type": {
"type": "string",
"x-value": "BirthdayMerge",
"enum": ["BirthdayMerge"]
},
"field": {
"type": "string",
"title": "Segment Field",
"description": "A date merge field to segment.",
"example": "MMERGE4"
},
"op": {
"type": "string",
"enum": ["is", "not", "blank", "blank_not"],
"title": "Segment Operator",
"description": "Whether the member's birthday merge information is/is not a certain date or is/is not blank.",
"example": "is"
},
"value": {
"type": "string",
"title": "Segment Value",
"description": "A date to segment against (mm/dd).",
"example": "01/30"
}
}
}
@@ -0,0 +1,33 @@
{
"type": "object",
"title": "Poll Activity Segment",
"description": "Segment by poll activity.",
"required": ["field", "op", "value"],
"properties": {
"condition_type": {
"type": "string",
"x-value": "CampaignPoll",
"enum": ["CampaignPoll"]
},
"field": {
"type": "string",
"enum": ["poll"],
"title": "Segment Field",
"description": "Segment by poll activity.",
"example": "poll"
},
"op": {
"type": "string",
"enum": ["member", "notmember"],
"title": "Segment Operator",
"description": "Members have/have not interacted with a specific poll in a Mailchimp email.",
"example": "member"
},
"value": {
"type": "number",
"title": "Segment Operator",
"description": "The id for the poll.",
"example": 409
}
}
}
@@ -0,0 +1,16 @@
{
"type": "string",
"title": "Campaign Status",
"description": "The current status of the campaign.",
"enum": [
"save",
"paused",
"schedule",
"sending",
"sent",
"canceled",
"canceling",
"archived"
],
"readOnly": true
}
@@ -0,0 +1,6 @@
{
"type": "string",
"title": "Campaign Type",
"description": "There are four types of [campaigns](https://mailchimp.com/help/getting-started-with-campaigns/) you can create in Mailchimp. A/B Split campaigns have been deprecated and variate campaigns should be used instead.",
"enum": ["regular", "plaintext", "absplit", "rss", "variate"]
}
@@ -0,0 +1,33 @@
{
"type": "object",
"title": "Conversation Segment",
"description": "Segment by interaction with a campaign via Conversations.",
"required": ["field", "op", "value"],
"properties": {
"condition_type": {
"type": "string",
"x-value": "Conversation",
"enum": ["Conversation"]
},
"field": {
"type": "string",
"enum": ["conversation"],
"title": "Segment Field",
"description": "Segment by interaction with a campaign via Conversations.",
"example": "conversation"
},
"op": {
"type": "string",
"enum": ["member", "notmember"],
"title": "Segment Operator",
"description": "The status of a member's interaction with a conversation. One of the following: has replied or has not replied.",
"example": "member"
},
"value": {
"type": "string",
"title": "Segment Data",
"description": "The web id value for a specific campaign or 'any' to account for subscribers who have/have not interacted with any campaigns.",
"example": "any"
}
}
}
@@ -0,0 +1,38 @@
{
"type": "object",
"title": "Location-Based Segment",
"description": "Segment by a specific country or US state.",
"required": ["field", "op", "value"],
"properties": {
"condition_type": {
"type": "string",
"x-value": "IPGeoCountryState",
"enum": ["IPGeoCountryState"]
},
"field": {
"type": "string",
"enum": ["ipgeo"],
"title": "Segment Field",
"description": "Segmenting subscribers who are within a specific location.",
"example": "ipgeo"
},
"op": {
"type": "string",
"enum": [
"ipgeocountry",
"ipgeonotcountry",
"ipgeostate",
"ipgeonotstate"
],
"title": "Segment Operator",
"description": "Segment members who are within a specific country or US state.",
"example": "ipgeocountry"
},
"value": {
"type": "string",
"title": "Segment Data",
"description": "The two-letter country code or US state abbreviation.",
"example": "US"
}
}
}

0 comments on commit faa4d9a

Please sign in to comment.