Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Source Amazon Seller Partner: OAuth support #13119

Merged
merged 42 commits into from
May 30, 2022
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
727e222
Update docs
annalvova05 May 5, 2022
5b6a360
add oauth
annalvova05 May 18, 2022
6a46588
add spec.py
annalvova05 May 18, 2022
d966557
Merge remote-tracking branch 'origin/master' into alvova/11963-amazon…
annalvova05 May 18, 2022
d0cea31
test
annalvova05 May 18, 2022
e977ad3
fix
annalvova05 May 18, 2022
d79229a
fix
annalvova05 May 18, 2022
07a8f3b
add lwa_app_id
annalvova05 May 18, 2022
ebe1172
test
annalvova05 May 18, 2022
594da5f
test
annalvova05 May 19, 2022
171820f
fix
annalvova05 May 19, 2022
36580c2
add beta version
annalvova05 May 19, 2022
f2c0c37
fix
annalvova05 May 19, 2022
3790e8c
test
annalvova05 May 20, 2022
03dfe7c
test
annalvova05 May 20, 2022
91dece4
test
annalvova05 May 23, 2022
03593f9
Merge remote-tracking branch 'origin/master' into alvova/11963-amazon…
annalvova05 May 23, 2022
a5530ad
merge
annalvova05 May 23, 2022
97d82f8
fix
annalvova05 May 24, 2022
69b16f4
fix
annalvova05 May 24, 2022
8939185
fix
annalvova05 May 24, 2022
59b1dd5
test
annalvova05 May 24, 2022
b7a87d8
test
annalvova05 May 24, 2022
1cca7ff
test
annalvova05 May 24, 2022
4e50755
test
annalvova05 May 24, 2022
a71f106
sort AWSRegion
annalvova05 May 24, 2022
b06693e
up
annalvova05 May 24, 2022
ceb0ee7
add import
annalvova05 May 24, 2022
f43d2e8
up
annalvova05 May 24, 2022
325e290
up
annalvova05 May 24, 2022
be154f1
up
annalvova05 May 24, 2022
61a40ec
fix
annalvova05 May 24, 2022
38a37ac
fix tests
annalvova05 May 24, 2022
c80e478
bump version
annalvova05 May 24, 2022
95c4aaf
upd
annalvova05 May 24, 2022
93b4318
Merge remote-tracking branch 'origin/master' into alvova/11964-amazon…
annalvova05 May 24, 2022
9919453
Merge remote-tracking branch 'origin/master' into alvova/11964-amazon…
annalvova05 May 30, 2022
8495300
Merge remote-tracking branch 'origin/master' into alvova/11963-amazon…
annalvova05 May 30, 2022
257c77a
Merge branch 'alvova/11964-amazon-sp-docs' into alvova/11963-amazon-s…
annalvova05 May 30, 2022
6a48a74
auto-bump connector version
octavia-squidington-iii May 30, 2022
a530383
format
annalvova05 May 30, 2022
6eb06fa
Merge branch 'alvova/11963-amazon-sp-oauth' of github.com:airbytehq/a…
annalvova05 May 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
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.18
LABEL io.airbyte.version=0.2.19
LABEL io.airbyte.name=airbyte/source-amazon-seller-partner
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
connector_image: airbyte/source-amazon-seller-partner:dev
tests:
spec:
- spec_path: "source_amazon_seller_partner/spec.json"
- spec_path: "integration_tests/spec.json"
connection:
# - config_path: "secrets/config.json"
# status: "succeed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,153 +5,249 @@
"title": "Amazon Seller Partner Spec",
"type": "object",
"properties": {
"replication_start_date": {
"title": "Start Date",
"description": "UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated.",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
"examples": ["2017-01-25T00:00:00Z"],
"type": "string"
},
"period_in_days": {
"title": "Period In Days",
"description": "Will be used for stream slicing for initial full_refresh sync when no updated state is present for reports that support sliced incremental sync.",
"default": 30,
"examples": ["30", "365"],
"type": "integer"
},
"report_options": {
"title": "Report Options",
"description": "Additional information passed to reports. This varies by report type. Must be a valid json string.",
"examples": [
"{\"GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT\": {\"reportPeriod\": \"WEEK\"}}",
"{\"GET_SOME_REPORT\": {\"custom\": \"true\"}}"
],
"app_id": {
"title": "App Id *",
"description": "Your Amazon App ID",
"airbyte_secret": true,
"order": 0,
"type": "string"
},
"max_wait_seconds": {
"title": "Max wait time for reports (in seconds)",
"description": "Sometimes report can take up to 30 minutes to generate. This will set the limit for how long to wait for a successful report.",
"default": 500,
"examples": ["500", "1980"],
"type": "integer"
},
"refresh_token": {
"title": "Refresh Token",
"description": "The Refresh Token obtained via OAuth flow authorization.",
"airbyte_secret": true,
"auth_type": {
"title": "Auth Type",
"const": "oauth2.0",
"order": 1,
"type": "string"
},
"lwa_app_id": {
"title": "LwA App Id",
"description": "Your Login with Amazon App ID",
"airbyte_secret": true,
"title": "LWA Client Id",
"description": "Your Login with Amazon Client ID.",
"order": 2,
"type": "string"
},
"lwa_client_secret": {
"title": "LwA Client Secret",
"title": "LWA Client Secret",
"description": "Your Login with Amazon Client Secret.",
"airbyte_secret": true,
"order": 3,
"type": "string"
},
"refresh_token": {
"title": "Refresh Token",
"description": "The Refresh Token obtained via OAuth flow authorization.",
"airbyte_secret": true,
"order": 4,
"type": "string"
},
"aws_access_key": {
"title": "AWS Access Key",
"description": "Specifies the AWS access key used as part of the credentials to authenticate the user.",
"airbyte_secret": true,
"order": 5,
"type": "string"
},
"aws_secret_key": {
"title": "AWS Secret Access Key",
"description": "Specifies the AWS secret key used as part of the credentials to authenticate the user.",
"airbyte_secret": true,
"order": 6,
"type": "string"
},
"role_arn": {
"title": "Role ARN",
"description": "Specifies the Amazon Resource Name (ARN) of an IAM role that you want to use to perform operations requested using this profile. (Needs permission to 'Assume Role' STS).",
"airbyte_secret": true,
"order": 7,
"type": "string"
},
"replication_start_date": {
"title": "Start Date",
"description": "UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated.",
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$",
"examples": [
"2017-01-25T00:00:00Z"
],
"type": "string"
},
"period_in_days": {
"title": "Period In Days",
"description": "Will be used for stream slicing for initial full_refresh sync when no updated state is present for reports that support sliced incremental sync.",
"default": 30,
"examples": [
"30",
"365"
],
"type": "integer"
},
"report_options": {
"title": "Report Options",
"description": "Additional information passed to reports. This varies by report type. Must be a valid json string.",
"examples": [
"{\"GET_BRAND_ANALYTICS_SEARCH_TERMS_REPORT\": {\"reportPeriod\": \"WEEK\"}}",
"{\"GET_SOME_REPORT\": {\"custom\": \"true\"}}"
],
"type": "string"
},
"max_wait_seconds": {
"title": "Max wait time for reports (in seconds)",
"description": "Sometimes report can take up to 30 minutes to generate. This will set the limit for how long to wait for a successful report.",
"default": 500,
"examples": [
"500",
"1980"
],
"type": "integer"
},
"aws_environment": {
"title": "AWSEnvironment",
"description": "An enumeration.",
"enum": ["PRODUCTION", "SANDBOX"],
"enum": [
"PRODUCTION",
"SANDBOX"
],
"type": "string"
},
"region": {
"title": "AWSRegion",
"description": "An enumeration.",
"enum": [
"AE",
"AU",
"BR",
"CA",
"DE",
"PL",
"EG",
"ES",
"FR",
"GB",
"IN",
"IT",
"JP",
"MX",
"NL",
"PL",
"SA",
"SE",
"SG",
"TR",
"UK",
"AU",
"JP",
"SG",
"US",
"BR",
"CA",
"MX",
"GB"
"US"
],
"type": "string"
}
},
"required": [
"replication_start_date",
"refresh_token",
"lwa_app_id",
"lwa_client_secret",
"refresh_token",
"aws_access_key",
"aws_secret_key",
"role_arn",
"replication_start_date",
"aws_environment",
"region"
],
"additionalProperties": true,
"definitions": {
"AWSEnvironment": {
"title": "AWSEnvironment",
"description": "An enumeration.",
"enum": ["PRODUCTION", "SANDBOX"],
"enum": [
"PRODUCTION",
"SANDBOX"
],
"type": "string"
},
"AWSRegion": {
"title": "AWSRegion",
"description": "An enumeration.",
"enum": [
"AE",
"AU",
"BR",
"CA",
"DE",
"PL",
"EG",
"ES",
"FR",
"GB",
"IN",
"IT",
"JP",
"MX",
"NL",
"PL",
"SA",
"SE",
"SG",
"TR",
"UK",
"AU",
"JP",
"SG",
"US",
"BR",
"CA",
"MX",
"GB"
"US"
],
"type": "string"
}
}
},
"advanced_auth": {
"auth_flow_type": "oauth2.0",
"predicate_key": [
"auth_type"
],
"predicate_value": "oauth2.0",
"oauth_config_specification": {
"oauth_user_input_from_connector_config_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"app_id": {
"type": "string",
"path_in_connector_config": [
"app_id"
]
}
}
},
"complete_oauth_output_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"refresh_token": {
"type": "string",
"path_in_connector_config": [
"refresh_token"
]
}
}
},
"complete_oauth_server_input_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"lwa_app_id": {
"type": "string"
},
"lwa_client_secret": {
"type": "string"
}
}
},
"complete_oauth_server_output_specification": {
"type": "object",
"additionalProperties": false,
"properties": {
"lwa_app_id": {
"type": "string",
"path_in_connector_config": [
"lwa_app_id"
]
},
"lwa_client_secret": {
"type": "string",
"path_in_connector_config": [
"lwa_client_secret"
]
}
}
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
# SOFTWARE.


from .source import ConnectorConfig, SourceAmazonSellerPartner
from .source import SourceAmazonSellerPartner

__all__ = ["SourceAmazonSellerPartner", "ConnectorConfig"]
__all__ = ["SourceAmazonSellerPartner"]
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,26 @@ class AWSEnvironment(str, Enum):

class AWSRegion(str, Enum):
AE = "AE"
AU = "AU"
BR = "BR"
CA = "CA"
DE = "DE"
PL = "PL"
EG = "EG"
ES = "ES"
FR = "FR"
GB = "GB"
IN = "IN"
IT = "IT"
JP = "JP"
MX = "MX"
NL = "NL"
PL = "PL"
SA = "SA"
SE = "SE"
SG = "SG"
TR = "TR"
UK = "UK"
AU = "AU"
JP = "JP"
SG = "SG"
US = "US"
BR = "BR"
CA = "CA"
MX = "MX"
GB = "GB"


def get_aws_base_url(aws_env: AWSEnvironment) -> str:
Expand Down
Loading