Skip to content

Commit

Permalink
fix!: don't replace '.' with '_' in interface (#1757)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: options when instantiating clients now expect correct `vx.x` format rather than failing `vx_x` format (effects only TypeScript).
  • Loading branch information
bcoe committed Jul 11, 2019
1 parent c726608 commit 3a183c2
Show file tree
Hide file tree
Showing 21 changed files with 83 additions and 49 deletions.
2 changes: 1 addition & 1 deletion src/apis/adexchangebuyer/v1.2.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace adexchangebuyer_v1_2 {
export interface Options extends GlobalOptions {
version: 'v1_2';
version: 'v1.2';
}

interface StandardParameters {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/adexchangebuyer/v1.3.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace adexchangebuyer_v1_3 {
export interface Options extends GlobalOptions {
version: 'v1_3';
version: 'v1.3';
}

interface StandardParameters {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/adexchangebuyer/v1.4.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace adexchangebuyer_v1_4 {
export interface Options extends GlobalOptions {
version: 'v1_4';
version: 'v1.4';
}

interface StandardParameters {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/adsense/v1.4.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace adsense_v1_4 {
export interface Options extends GlobalOptions {
version: 'v1_4';
version: 'v1.4';
}

interface StandardParameters {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/adsensehost/v4.1.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace adsensehost_v4_1 {
export interface Options extends GlobalOptions {
version: 'v4_1';
version: 'v4.1';
}

interface StandardParameters {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/analytics/v2.4.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace analytics_v2_4 {
export interface Options extends GlobalOptions {
version: 'v2_4';
version: 'v2.4';
}

interface StandardParameters {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/analyticsreporting/v4.ts
Expand Up @@ -210,7 +210,7 @@ export namespace analyticsreporting_v4 {
*/
cohorts?: Schema$Cohort[];
/**
* Enable Life Time Value (LTV). LTV measures lifetime value for users acquired through different channels. Please see: [Cohort Analysis](https://support.google.com/analytics/answer/6074676) and [Lifetime Value](https://support.google.com/analytics/answer/6182550) If the value of lifetimeValue is false: - The metric values are similar to the values in the web interface cohort report. - The cohort definition date ranges must be aligned to the calendar week and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in the cohort definition should be a Sunday and the `endDate` should be the following Saturday, and for `ga:cohortNthMonth`, the `startDate` should be the 1st of the month and `endDate` should be the last day of the month. When the lifetimeValue is true: - The metric values will correspond to the values in the web interface LifeTime value report. - The Lifetime Value report shows you how user value (Revenue) and engagement (Appviews, Goal Completions, Sessions, and Session Duration) grow during the 90 days after a user is acquired. - The metrics are calculated as a cumulative average per user per the time increment. - The cohort definition date ranges need not be aligned to the calendar week and month boundaries. - The `viewId` must be an [app view ID](https://support.google.com/analytics/answer/2649553#WebVersusAppViews)
* Enable Life Time Value (LTV). LTV measures lifetime value for users acquired through different channels. Please see: [Cohort Analysis](https://support.google.com/analytics/answer/6074676) and [Lifetime Value](https://support.google.com/analytics/answer/6182550) If the value of lifetimeValue is false: - The metric values are similar to the values in the web interface cohort report. - The cohort definition date ranges must be aligned to the calendar week and month. i.e. while requesting `ga:cohortNthWeek` the `startDate` in the cohort definition should be a Sunday and the `endDate` should be the following Saturday, and for `ga:cohortNthMonth`, the `startDate` should be the 1st of the month and `endDate` should be the last day of the month. When the lifetimeValue is true: - The metric values will correspond to the values in the web interface LifeTime value report. - The Lifetime Value report shows you how user value (Revenue) and engagement (Appviews, Goal Completions, Sessions, and Session Duration) grow during the 90 days after a user is acquired. - The metrics are calculated as a cumulative average per user per the time increment. - The cohort definition date ranges need not be aligned to the calendar week and month boundaries. - The `viewId` must be an [app view ID](https://support.google.com/analytics/answer/2649553#WebVersusAppViews)
*/
lifetimeValue?: boolean;
}
Expand Down
2 changes: 1 addition & 1 deletion src/apis/androidpublisher/v1.1.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace androidpublisher_v1_1 {
export interface Options extends GlobalOptions {
version: 'v1_1';
version: 'v1.1';
}

interface StandardParameters {
Expand Down
36 changes: 18 additions & 18 deletions src/apis/bigquery/v2.ts
Expand Up @@ -337,15 +337,15 @@ export namespace bigquery_v2 {
* [Output-only, Beta] Training options used by this training run. These options are mutable for subsequent training runs. Default values are explicitly stored for options not specified in the input query of the first training run. For subsequent training runs, any option not explicitly specified in the input query will be copied from the previous training run.
*/
trainingOptions?: {
l1Reg?: number;
maxIteration?: string;
learnRate?: number;
minRelProgress?: number;
l2Reg?: number;
learnRateStrategy?: string;
warmStart?: boolean;
lineSearchInitLearnRate?: number;
earlyStop?: boolean;
l1Reg?: number;
maxIteration?: string;
learnRate?: number;
minRelProgress?: number;
};
}
/**
Expand Down Expand Up @@ -428,13 +428,13 @@ export namespace bigquery_v2 {
* [Optional] An array of objects that define dataset access for one or more entities. You can set this property when inserting or updating a dataset in order to control who is allowed to access the data. If unspecified at dataset creation time, BigQuery adds default dataset access for the following entities: access.specialGroup: projectReaders; access.role: READER; access.specialGroup: projectWriters; access.role: WRITER; access.specialGroup: projectOwners; access.role: OWNER; access.userByEmail: [dataset creator email]; access.role: OWNER;
*/
access?: Array<{
role?: string;
view?: Schema$TableReference;
groupByEmail?: string;
userByEmail?: string;
domain?: string;
iamMember?: string;
specialGroup?: string;
role?: string;
view?: Schema$TableReference;
groupByEmail?: string;
}>;
/**
* [Output-only] The time when this dataset was created, in milliseconds since the epoch.
Expand Down Expand Up @@ -1235,15 +1235,15 @@ export namespace bigquery_v2 {
* List of jobs that were requested.
*/
jobs?: Array<{
statistics?: Schema$JobStatistics;
id?: string;
configuration?: Schema$JobConfiguration;
user_email?: string;
kind?: string;
errorResult?: Schema$ErrorProto;
kind?: string;
jobReference?: Schema$JobReference;
status?: Schema$JobStatus;
state?: string;
statistics?: Schema$JobStatistics;
}>;
/**
* The resource type of the response.
Expand Down Expand Up @@ -1308,7 +1308,7 @@ export namespace bigquery_v2 {
/**
* [Output-only] Job resource usage breakdown by reservation.
*/
reservationUsage?: Array<{name?: string; slotMs?: string}>;
reservationUsage?: Array<{slotMs?: string; name?: string}>;
/**
* [Output-only] Name of the primary reservation assigned to this job. Note that this could be different than reservations reported in the reservation usage field if parent reservations were used to execute this job.
*/
Expand Down Expand Up @@ -1378,7 +1378,7 @@ export namespace bigquery_v2 {
/**
* [Output-only] Job resource usage breakdown by reservation.
*/
reservationUsage?: Array<{name?: string; slotMs?: string}>;
reservationUsage?: Array<{slotMs?: string; name?: string}>;
/**
* [Output-only] The schema of the results. Present only for successful dry run of non-legacy SQL queries.
*/
Expand Down Expand Up @@ -1564,7 +1564,7 @@ export namespace bigquery_v2 {
/**
* [Output-only, Beta] Model options used for the first training run. These options are immutable for subsequent training runs. Default values are used for any options not specified in the input query.
*/
modelOptions?: {labels?: string[]; lossType?: string; modelType?: string};
modelOptions?: {lossType?: string; modelType?: string; labels?: string[]};
/**
* [Output-only, Beta] Information about ml training runs, each training run comprises of multiple iterations and there may be multiple training runs for the model if warm start is used or if a user decides to continue a previously cancelled query.
*/
Expand Down Expand Up @@ -1617,11 +1617,11 @@ export namespace bigquery_v2 {
* Projects to which you have at least READ access.
*/
projects?: Array<{
id?: string;
projectReference?: Schema$ProjectReference;
friendlyName?: string;
numericId?: string;
kind?: string;
id?: string;
projectReference?: Schema$ProjectReference;
}>;
/**
* The total number of projects in the list.
Expand Down Expand Up @@ -1657,9 +1657,9 @@ export namespace bigquery_v2 {
* [Optional] The types of the fields of this struct, in order, if this is a struct.
*/
structTypes?: Array<{
type?: Schema$QueryParameterType;
name?: string;
description?: string;
type?: Schema$QueryParameterType;
}>;
/**
* [Required] The top level type of this field.
Expand Down Expand Up @@ -1806,7 +1806,7 @@ export namespace bigquery_v2 {
/**
* [TrustedTester] [Required] Defines the ranges for range partitioning.
*/
range?: {end?: string; interval?: string; start?: string};
range?: {interval?: string; start?: string; end?: string};
}
/**
* Evaluation metrics for regression models.
Expand Down Expand Up @@ -2168,11 +2168,11 @@ export namespace bigquery_v2 {
tables?: Array<{
clustering?: Schema$Clustering;
type?: string;
id?: string;
expirationTime?: string;
id?: string;
tableReference?: Schema$TableReference;
friendlyName?: string;
timePartitioning?: Schema$TimePartitioning;
friendlyName?: string;
kind?: string;
view?: {useLegacySql?: boolean};
creationTime?: string;
Expand Down
2 changes: 1 addition & 1 deletion src/apis/content/v2.1.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace content_v2_1 {
export interface Options extends GlobalOptions {
version: 'v2_1';
version: 'v2.1';
}

interface StandardParameters {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/dfareporting/v3.1.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace dfareporting_v3_1 {
export interface Options extends GlobalOptions {
version: 'v3_1';
version: 'v3.1';
}

interface StandardParameters {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/dfareporting/v3.2.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace dfareporting_v3_2 {
export interface Options extends GlobalOptions {
version: 'v3_2';
version: 'v3.2';
}

interface StandardParameters {
Expand Down
2 changes: 1 addition & 1 deletion src/apis/dfareporting/v3.3.ts
Expand Up @@ -38,7 +38,7 @@ import {GaxiosPromise} from 'gaxios';

export namespace dfareporting_v3_3 {
export interface Options extends GlobalOptions {
version: 'v3_3';
version: 'v3.3';
}

interface StandardParameters {
Expand Down
12 changes: 12 additions & 0 deletions src/apis/fcm/v1.ts
Expand Up @@ -191,6 +191,10 @@ export namespace fcm_v1 {
* The notification&#39;s icon. Sets the notification icon to myicon for drawable resource myicon. If you don&#39;t send this key in the request, FCM displays the launcher icon specified in your app manifest.
*/
icon?: string;
/**
* Contains the URL of an image that is going to be displayed in a notification. If present, it will override google.firebase.fcm.v1.Notification.image.
*/
image?: string;
/**
* The sound to play when the device receives the notification. Supports &quot;default&quot; or the filename of a sound resource bundled in the app. Sound files must reside in /res/raw/.
*/
Expand Down Expand Up @@ -237,6 +241,10 @@ export namespace fcm_v1 {
* Label associated with the message&#39;s analytics data.
*/
analyticsLabel?: string;
/**
* Contains the URL of an image that is going to be displayed in a notification. If present, it will override google.firebase.fcm.v1.Notification.image.
*/
image?: string;
}
/**
* Platform independent options for features provided by the FCM SDKs.
Expand Down Expand Up @@ -300,6 +308,10 @@ export namespace fcm_v1 {
* The notification&#39;s body text.
*/
body?: string;
/**
* Contains the URL of an image that is going to be downloaded on the device and displayed in a notification. JPEG, PNG, BMP have full support across platforms. Animated GIF and video only work on iOS. WebP and HEIF have varying levels of support across platforms and platform versions. Android has 1MB image size limit. Quota usage and implications/costs for hosting image on Firebase Storage: https://firebase.google.com/pricing
*/
image?: string;
/**
* The notification&#39;s title.
*/
Expand Down

0 comments on commit 3a183c2

Please sign in to comment.