Skip to content

Commit

Permalink
šŸ›Source Amazon Seller Partner: update schemas for vendor analytics stā€¦
Browse files Browse the repository at this point in the history
ā€¦reams (#34549)
  • Loading branch information
Anton Karpets committed Jan 29, 2024
1 parent 653acae commit 3e6d842
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 90 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: e55879a8-0ef8-4557-abcf-ab34c53ec460
dockerImageTag: 3.1.0
dockerImageTag: 3.2.0
dockerRepository: airbyte/source-amazon-seller-partner
documentationUrl: https://docs.airbyte.com/integrations/sources/amazon-seller-partner
githubIssueLabel: source-amazon-seller-partner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,27 @@
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"netPureProductMarginAggregate": {
"type": ["null", "array"],
"items": {
"type": ["object"]
},
"properties": {
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"netPureProductMargin": {
"type": ["null", "number"]
}
}
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"netPureProductMarginByAsin": {
"type": ["null", "array"],
"items": {
"type": ["object"]
},
"properties": {
"startDate": {
"type": ["null", "string"],
"format": "date"
},
"endDate": {
"type": ["null", "string"],
"format": "date"
},
"asin": {
"type": ["null", "string"]
},
"netPureProductMargin": {
"type": ["null", "number"]
}
}
"asin": {
"type": ["null", "string"]
},
"netPureProductMargin": {
"type": ["null", "number"]
},
"dataEndTime": {
"type": ["null", "string"],
"format": "date"
},
"queryEndDate": {
"type": ["null", "string"],
"format": "date"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,27 @@
"type": "object",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"reportSpecification": {
"type": ["null", "object"],
"properties": {
"reportType": {
"type": ["null", "string"]
},
"dataStartTime": {
"type": ["null", "string"],
"format": "date-time"
},
"dataEndTime": {
"type": ["null", "string"],
"format": "date-time"
},
"marketplaceIds": {
"type": ["null", "array"],
"items": {
"type": ["string"]
}
}
}
"startTime": {
"type": ["null", "string"],
"format": "date-time"
},
"endTime": {
"type": ["null", "string"],
"format": "date-time"
},
"asin": {
"type": ["null", "string"]
},
"reportData": {
"type": ["null", "array"],
"items": {
"type": ["object"]
},
"properties": {
"startTime": {
"type": ["null", "string"],
"format": "date-time"
},
"endTime": {
"type": ["null", "string"],
"format": "date-time"
},
"asin": {
"type": ["null", "string"]
},
"highlyAvailableInventory": {
"type": ["null", "integer"]
}
}
"highlyAvailableInventory": {
"type": ["null", "integer"]
},
"dataEndTime": {
"type": ["null", "string"],
"format": "date"
},
"queryEndDate": {
"type": ["null", "string"],
"format": "date"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"glanceViews": {
"type": ["null", "integer"]
},
"dataEndTime": {
"type": ["null", "string"],
"format": "date"
},
"queryEndDate": {
"type": ["null", "string"],
"format": "date"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,14 +412,6 @@ class MerchantListingsReports(MerchantReports):
primary_key = "listing-id"


class NetPureProductMarginReport(IncrementalReportsAmazonSPStream):
name = "GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT"


class RapidRetailAnalyticsInventoryReport(IncrementalReportsAmazonSPStream):
name = "GET_VENDOR_REAL_TIME_INVENTORY_REPORT"


class FlatFileOrdersReports(IncrementalReportsAmazonSPStream):
"""
Field definitions: https://sellercentral.amazon.com/gp/help/help.html?itemID=201648780
Expand Down Expand Up @@ -765,6 +757,17 @@ def stream_slices(
start_date = end_date_slice


class NetPureProductMarginReport(IncrementalAnalyticsStream):
name = "GET_VENDOR_NET_PURE_PRODUCT_MARGIN_REPORT"
result_key = "netPureProductMarginByAsin"


class RapidRetailAnalyticsInventoryReport(IncrementalAnalyticsStream):
name = "GET_VENDOR_REAL_TIME_INVENTORY_REPORT"
result_key = "reportData"
cursor_field = "endTime"


class BrandAnalyticsMarketBasketReports(IncrementalAnalyticsStream):
name = "GET_BRAND_ANALYTICS_MARKET_BASKET_REPORT"
result_key = "dataByAsin"
Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/amazon-seller-partner.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ Information about rate limits you may find [here](https://developer-docs.amazon.

| Version | Date | Pull Request | Subject |
|:---------|:-----------|:------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `3.2.0` | 2024-01-26 | [\#34549](https://github.com/airbytehq/airbyte/pull/34549) | Update schemas for vendor analytics streams |
| `3.1.0` | 2024-01-17 | [\#34283](https://github.com/airbytehq/airbyte/pull/34283) | Delete deprecated streams |
| `3.0.1` | 2023-12-22 | [\#33741](https://github.com/airbytehq/airbyte/pull/33741) | Improve report streams performance |
| `3.0.0` | 2023-12-12 | [\#32977](https://github.com/airbytehq/airbyte/pull/32977) | Make all streams incremental |
Expand Down

0 comments on commit 3e6d842

Please sign in to comment.