-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sb ad group and keyword report metrics
- Loading branch information
1 parent
3b56f79
commit f3f2755
Showing
9 changed files
with
148 additions
and
260 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
38 changes: 38 additions & 0 deletions
38
src/operations/reports/metrics/sponsored-brands-ad-group-report-metrics.ts
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,38 @@ | ||
import * as t from 'io-ts' | ||
|
||
export const SponsoredBrandsAdGroupReportMetrics = t.union([ | ||
/** | ||
* Unique numerical ID of the campaign | ||
*/ | ||
t.literal('campaignId'), | ||
|
||
/** | ||
* Unique name of the campaign | ||
*/ | ||
t.literal('campaignName'), | ||
|
||
/** | ||
* Total budget allotted to the campaign | ||
*/ | ||
t.literal('campaignBudget'), | ||
|
||
t.literal('campaignBudgetType'), | ||
|
||
/** | ||
* Status of the campaign | ||
*/ | ||
t.literal('campaignStatus'), | ||
|
||
/** | ||
* Unique name of the ad group | ||
*/ | ||
t.literal('adGroupName'), | ||
|
||
/** | ||
* Unique numerical ID of the ad group | ||
*/ | ||
t.literal('adGroupId'), | ||
]) | ||
export type SponsoredBrandsAdGroupReportMetrics = t.TypeOf< | ||
typeof SponsoredBrandsAdGroupReportMetrics | ||
> |
58 changes: 58 additions & 0 deletions
58
src/operations/reports/metrics/sponsored-brands-keyword-report-metrics.ts
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,58 @@ | ||
import * as t from 'io-ts' | ||
|
||
export const SponsoredBrandsKeywordReportMetrics = t.union([ | ||
/** | ||
* Unique numerical ID of the campaign | ||
*/ | ||
t.literal('campaignId'), | ||
|
||
/** | ||
* Unique name of the campaign | ||
*/ | ||
t.literal('campaignName'), | ||
|
||
/** | ||
* Unique numerical ID of the ad group | ||
*/ | ||
t.literal('adGroupId'), | ||
|
||
/** | ||
* Unique name of the ad group | ||
*/ | ||
t.literal('adGroupName'), | ||
|
||
t.literal('campaignBudgetType'), | ||
|
||
/** | ||
* Status of the campaign | ||
*/ | ||
t.literal('campaignStatus'), | ||
|
||
/** | ||
* ID of the keyword used in bid | ||
*/ | ||
t.literal('keywordId'), | ||
|
||
/** | ||
* Keyword state. | ||
*/ | ||
t.literal('keywordStatus'), | ||
|
||
/** | ||
* User-set bid value for keyword. | ||
*/ | ||
t.literal('keywordBid'), | ||
|
||
/** | ||
* Text of the keyword or phrase used in bid | ||
*/ | ||
t.literal('keywordText'), | ||
|
||
/** | ||
* Type of matching for the keyword or phrase used in bid. Must be one of: broad, phrase, or exact | ||
*/ | ||
t.literal('matchType'), | ||
]) | ||
export type SponsoredBrandsKeywordReportMetrics = t.TypeOf< | ||
typeof SponsoredBrandsKeywordReportMetrics | ||
> |
4 changes: 2 additions & 2 deletions
4
src/operations/reports/sponsored-brands/sponsored-brands-ad-group-report-params.ts
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { BaseReportParams } from '../base-report-params' | ||
import { SponsoredBrandsReportTypeEnum } from '../report-types-enum' | ||
import { SponsoredProductsAdGroupReportMetrics } from '../metrics/sponsored-products-ad-group-report-metrics' | ||
import { SponsoredBrandsAdGroupReportMetrics } from '../metrics' | ||
|
||
export interface SponsoredBrandsAdGroupReportParams | ||
extends BaseReportParams<SponsoredBrandsReportTypeEnum, SponsoredProductsAdGroupReportMetrics> { | ||
extends BaseReportParams<SponsoredBrandsReportTypeEnum, SponsoredBrandsAdGroupReportMetrics> { | ||
recordType: SponsoredBrandsReportTypeEnum.AD_GROUPS | ||
} |
4 changes: 2 additions & 2 deletions
4
src/operations/reports/sponsored-brands/sponsored-brands-keyword-report-params.ts
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { BaseReportParams } from '../base-report-params' | ||
import { SponsoredBrandsReportTypeEnum } from '../report-types-enum' | ||
import { SponsoredProductsKeywordReportMetrics } from '../metrics/sponsored-products-keyword-report-metrics' | ||
import { SponsoredBrandsKeywordReportMetrics } from '../metrics' | ||
|
||
export interface SponsoredBrandsKeywordReportParams | ||
extends BaseReportParams<SponsoredBrandsReportTypeEnum, SponsoredProductsKeywordReportMetrics> { | ||
extends BaseReportParams<SponsoredBrandsReportTypeEnum, SponsoredBrandsKeywordReportMetrics> { | ||
recordType: SponsoredBrandsReportTypeEnum.KEYWORDS | ||
} |
126 changes: 0 additions & 126 deletions
126
...12826696/should-return-a-in-progress-status-with-adgroups-report_3288827722/recording.har
This file was deleted.
Oops, something went wrong.
126 changes: 0 additions & 126 deletions
126
...12826696/should-return-a-in-progress-status-with-keywords-report_4030230505/recording.har
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.