-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds AmazonMarketplaceAdvertisingRegion object
Adds AmazonMarketplaceAdvertisingRegion object suppot. BREAKING CHANGE: Adds AmazonMarketplaceAdvertisingRegion object suppot.
- Loading branch information
Showing
15 changed files
with
163 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
export interface AmazonMarketplaceAdvertisingRegion { | ||
/** | ||
* Region code. | ||
*/ | ||
code: string | ||
|
||
/** | ||
* Region name. | ||
*/ | ||
name: string | ||
|
||
/** | ||
* Authorization URI. | ||
*/ | ||
authorizationUri: string | ||
|
||
/** | ||
* Access Token URI | ||
*/ | ||
accessTokenUri: string | ||
|
||
/** | ||
* Access endpoint URI. | ||
*/ | ||
endpoint: string | ||
} | ||
|
||
export class AmazonMarketplaceAdvertisingRegion implements AmazonMarketplaceAdvertisingRegion { | ||
constructor(data: AmazonMarketplaceAdvertisingRegion) { | ||
Object.assign(this, data) | ||
Object.freeze(this) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { AmazonMarketplaceAdvertisingRegion } from '../amazon-marketplace-advertising-region' | ||
|
||
export const EU = new AmazonMarketplaceAdvertisingRegion({ | ||
accessTokenUri: 'https://api.amazon.co.uk/auth/o2/token', | ||
authorizationUri: 'https://eu.account.amazon.com/ap/oa', | ||
code: 'EU', | ||
endpoint: 'https://advertising-api-eu.amazon.com', | ||
name: 'Europe', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { AmazonMarketplaceAdvertisingRegion } from '../amazon-marketplace-advertising-region' | ||
|
||
export const FE = new AmazonMarketplaceAdvertisingRegion({ | ||
accessTokenUri: 'https://api.amazon.co.jp/auth/o2/token', | ||
authorizationUri: 'https://apac.account.amazon.com/ap/oa', | ||
code: 'FE', | ||
endpoint: 'https://advertising-api-fe.amazon.com', | ||
name: 'Far East', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { AmazonMarketplaceAdvertisingRegion } from '../amazon-marketplace-advertising-region' | ||
|
||
export const NA = new AmazonMarketplaceAdvertisingRegion({ | ||
accessTokenUri: 'https://api.amazon.com/auth/o2/token', | ||
authorizationUri: 'https://www.amazon.com/ap/oa', | ||
code: 'NA', | ||
endpoint: 'https://advertising-api.amazon.com', | ||
name: 'North America', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { EU } from './EU' | ||
import { FE } from './FE' | ||
import { NA } from './NA' | ||
|
||
export const marketplaceAdvertisingRegions = { | ||
EU, | ||
FE, | ||
NA, | ||
} as const |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.