-
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: change ReportSegments to use union string
- Loading branch information
1 parent
a752f6c
commit 53fe361
Showing
4 changed files
with
11 additions
and
8 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
11 changes: 7 additions & 4 deletions
11
...perations/reports/report-segments-enum.ts → src/operations/reports/report-segments.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,13 +1,16 @@ | ||
export enum ReportSegmentsEnum { | ||
import * as t from 'io-ts' | ||
|
||
export const ReportSegments = t.union([ | ||
/** | ||
* The optional dimension on which to segment a keyword report. | ||
* This is also referred to as the search terms report. | ||
*/ | ||
QUERY = 'query', | ||
t.literal('query'), | ||
|
||
/** | ||
* The optional dimension on which to segment a campaigns report. | ||
* Placement refers to the location on a page where your ad appears. | ||
*/ | ||
PLACEMENT = 'placement', | ||
} | ||
t.literal('placement'), | ||
]) | ||
export type ReportSegments = t.TypeOf<typeof ReportSegments> |
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