Skip to content

Commit ac331df

Browse files
authored
🤖 Merge PR DefinitelyTyped#74133 fix(google-apps-script): advanced service variables optional but properties and methods required by @jpoehnelt
1 parent 4a7c9cd commit ac331df

32 files changed

+740
-357
lines changed

‎types/google-apps-script/apis/adsense_v1_4.d.ts‎

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ declare namespace GoogleAppsScript {
5656
list(accountId: string, optionalArgs: object): Adsense.Schema.AdClients;
5757
}
5858
interface AdunitsCollection {
59-
Customchannels?: Adsense.Collection.Accounts.Adunits.CustomchannelsCollection | undefined;
59+
Customchannels: Adsense.Collection.Accounts.Adunits.CustomchannelsCollection;
6060
// Gets the specified ad unit in the specified ad client for the specified account.
6161
get(accountId: string, adClientId: string, adUnitId: string): Adsense.Schema.AdUnit;
6262
// Get ad code for the specified ad unit.
@@ -75,7 +75,7 @@ declare namespace GoogleAppsScript {
7575
remove(accountId: string, alertId: string): void;
7676
}
7777
interface CustomchannelsCollection {
78-
Adunits?: Adsense.Collection.Accounts.Customchannels.AdunitsCollection | undefined;
78+
Adunits: Adsense.Collection.Accounts.Customchannels.AdunitsCollection;
7979
// Get the specified custom channel from the specified ad client for the specified account.
8080
get(accountId: string, adClientId: string, customChannelId: string): Adsense.Schema.CustomChannel;
8181
// List all custom channels in the specified ad client for the specified account.
@@ -88,7 +88,7 @@ declare namespace GoogleAppsScript {
8888
list(accountId: string): Adsense.Schema.Payments;
8989
}
9090
interface ReportsCollection {
91-
Saved?: Adsense.Collection.Accounts.Reports.SavedCollection | undefined;
91+
Saved: Adsense.Collection.Accounts.Reports.SavedCollection;
9292
// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
9393
generate(
9494
accountId: string,
@@ -160,14 +160,14 @@ declare namespace GoogleAppsScript {
160160
}
161161
}
162162
interface AccountsCollection {
163-
Adclients?: Adsense.Collection.Accounts.AdclientsCollection | undefined;
164-
Adunits?: Adsense.Collection.Accounts.AdunitsCollection | undefined;
165-
Alerts?: Adsense.Collection.Accounts.AlertsCollection | undefined;
166-
Customchannels?: Adsense.Collection.Accounts.CustomchannelsCollection | undefined;
167-
Payments?: Adsense.Collection.Accounts.PaymentsCollection | undefined;
168-
Reports?: Adsense.Collection.Accounts.ReportsCollection | undefined;
169-
Savedadstyles?: Adsense.Collection.Accounts.SavedadstylesCollection | undefined;
170-
Urlchannels?: Adsense.Collection.Accounts.UrlchannelsCollection | undefined;
163+
Adclients: Adsense.Collection.Accounts.AdclientsCollection;
164+
Adunits: Adsense.Collection.Accounts.AdunitsCollection;
165+
Alerts: Adsense.Collection.Accounts.AlertsCollection;
166+
Customchannels: Adsense.Collection.Accounts.CustomchannelsCollection;
167+
Payments: Adsense.Collection.Accounts.PaymentsCollection;
168+
Reports: Adsense.Collection.Accounts.ReportsCollection;
169+
Savedadstyles: Adsense.Collection.Accounts.SavedadstylesCollection;
170+
Urlchannels: Adsense.Collection.Accounts.UrlchannelsCollection;
171171
// Get information about the selected AdSense account.
172172
get(accountId: string): Adsense.Schema.Account;
173173
// Get information about the selected AdSense account.
@@ -184,7 +184,7 @@ declare namespace GoogleAppsScript {
184184
list(optionalArgs: object): Adsense.Schema.AdClients;
185185
}
186186
interface AdunitsCollection {
187-
Customchannels?: Adsense.Collection.Adunits.CustomchannelsCollection | undefined;
187+
Customchannels: Adsense.Collection.Adunits.CustomchannelsCollection;
188188
// Gets the specified ad unit in the specified ad client.
189189
get(adClientId: string, adUnitId: string): Adsense.Schema.AdUnit;
190190
// Get ad code for the specified ad unit.
@@ -203,7 +203,7 @@ declare namespace GoogleAppsScript {
203203
remove(alertId: string): void;
204204
}
205205
interface CustomchannelsCollection {
206-
Adunits?: Adsense.Collection.Customchannels.AdunitsCollection | undefined;
206+
Adunits: Adsense.Collection.Customchannels.AdunitsCollection;
207207
// Get the specified custom channel from the specified ad client.
208208
get(adClientId: string, customChannelId: string): Adsense.Schema.CustomChannel;
209209
// List all custom channels in the specified ad client for this AdSense account.
@@ -212,15 +212,15 @@ declare namespace GoogleAppsScript {
212212
list(adClientId: string, optionalArgs: object): Adsense.Schema.CustomChannels;
213213
}
214214
interface MetadataCollection {
215-
Dimensions?: Adsense.Collection.Metadata.DimensionsCollection | undefined;
216-
Metrics?: Adsense.Collection.Metadata.MetricsCollection | undefined;
215+
Dimensions: Adsense.Collection.Metadata.DimensionsCollection;
216+
Metrics: Adsense.Collection.Metadata.MetricsCollection;
217217
}
218218
interface PaymentsCollection {
219219
// List the payments for this AdSense account.
220220
list(): Adsense.Schema.Payments;
221221
}
222222
interface ReportsCollection {
223-
Saved?: Adsense.Collection.Reports.SavedCollection | undefined;
223+
Saved: Adsense.Collection.Reports.SavedCollection;
224224
// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
225225
generate(startDate: string, endDate: string): Adsense.Schema.AdsenseReportsGenerateResponse;
226226
// Generate an AdSense report based on the report request sent in the query parameters. Returns the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.
@@ -445,17 +445,20 @@ declare namespace GoogleAppsScript {
445445
}
446446
}
447447
interface Adsense {
448-
Accounts?: Adsense.Collection.AccountsCollection | undefined;
449-
Adclients?: Adsense.Collection.AdclientsCollection | undefined;
450-
Adunits?: Adsense.Collection.AdunitsCollection | undefined;
451-
Alerts?: Adsense.Collection.AlertsCollection | undefined;
452-
Customchannels?: Adsense.Collection.CustomchannelsCollection | undefined;
453-
Metadata?: Adsense.Collection.MetadataCollection | undefined;
454-
Payments?: Adsense.Collection.PaymentsCollection | undefined;
455-
Reports?: Adsense.Collection.ReportsCollection | undefined;
456-
Savedadstyles?: Adsense.Collection.SavedadstylesCollection | undefined;
457-
Urlchannels?: Adsense.Collection.UrlchannelsCollection | undefined;
448+
Accounts: Adsense.Collection.AccountsCollection;
449+
Adclients: Adsense.Collection.AdclientsCollection;
450+
Adunits: Adsense.Collection.AdunitsCollection;
451+
Alerts: Adsense.Collection.AlertsCollection;
452+
Customchannels: Adsense.Collection.CustomchannelsCollection;
453+
Metadata: Adsense.Collection.MetadataCollection;
454+
Payments: Adsense.Collection.PaymentsCollection;
455+
Reports: Adsense.Collection.ReportsCollection;
456+
Savedadstyles: Adsense.Collection.SavedadstylesCollection;
457+
Urlchannels: Adsense.Collection.UrlchannelsCollection;
458458
}
459459
}
460460

461-
declare var Adsense: GoogleAppsScript.Adsense;
461+
/**
462+
* The `Adsense` advanced service must be enabled.
463+
*/
464+
declare var Adsense: GoogleAppsScript.Adsense | undefined;

‎types/google-apps-script/apis/analytics_v3.d.ts‎

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -592,34 +592,34 @@ declare namespace GoogleAppsScript {
592592
}
593593
}
594594
interface DataCollection {
595-
Ga?: Analytics.Collection.Data.GaCollection | undefined;
596-
Mcf?: Analytics.Collection.Data.McfCollection | undefined;
597-
Realtime?: Analytics.Collection.Data.RealtimeCollection | undefined;
595+
Ga: Analytics.Collection.Data.GaCollection;
596+
Mcf: Analytics.Collection.Data.McfCollection;
597+
Realtime: Analytics.Collection.Data.RealtimeCollection;
598598
}
599599
interface ManagementCollection {
600-
AccountSummaries?: Analytics.Collection.Management.AccountSummariesCollection | undefined;
601-
AccountUserLinks?: Analytics.Collection.Management.AccountUserLinksCollection | undefined;
602-
Accounts?: Analytics.Collection.Management.AccountsCollection | undefined;
603-
ClientId?: Analytics.Collection.Management.ClientIdCollection | undefined;
604-
CustomDataSources?: Analytics.Collection.Management.CustomDataSourcesCollection | undefined;
605-
CustomDimensions?: Analytics.Collection.Management.CustomDimensionsCollection | undefined;
606-
CustomMetrics?: Analytics.Collection.Management.CustomMetricsCollection | undefined;
607-
Experiments?: Analytics.Collection.Management.ExperimentsCollection | undefined;
608-
Filters?: Analytics.Collection.Management.FiltersCollection | undefined;
609-
Goals?: Analytics.Collection.Management.GoalsCollection | undefined;
610-
ProfileFilterLinks?: Analytics.Collection.Management.ProfileFilterLinksCollection | undefined;
611-
ProfileUserLinks?: Analytics.Collection.Management.ProfileUserLinksCollection | undefined;
612-
Profiles?: Analytics.Collection.Management.ProfilesCollection | undefined;
613-
RemarketingAudience?: Analytics.Collection.Management.RemarketingAudienceCollection | undefined;
614-
Segments?: Analytics.Collection.Management.SegmentsCollection | undefined;
615-
UnsampledReports?: Analytics.Collection.Management.UnsampledReportsCollection | undefined;
616-
Uploads?: Analytics.Collection.Management.UploadsCollection | undefined;
617-
WebPropertyAdWordsLinks?: Analytics.Collection.Management.WebPropertyAdWordsLinksCollection | undefined;
618-
Webproperties?: Analytics.Collection.Management.WebpropertiesCollection | undefined;
619-
WebpropertyUserLinks?: Analytics.Collection.Management.WebpropertyUserLinksCollection | undefined;
600+
AccountSummaries: Analytics.Collection.Management.AccountSummariesCollection;
601+
AccountUserLinks: Analytics.Collection.Management.AccountUserLinksCollection;
602+
Accounts: Analytics.Collection.Management.AccountsCollection;
603+
ClientId: Analytics.Collection.Management.ClientIdCollection;
604+
CustomDataSources: Analytics.Collection.Management.CustomDataSourcesCollection;
605+
CustomDimensions: Analytics.Collection.Management.CustomDimensionsCollection;
606+
CustomMetrics: Analytics.Collection.Management.CustomMetricsCollection;
607+
Experiments: Analytics.Collection.Management.ExperimentsCollection;
608+
Filters: Analytics.Collection.Management.FiltersCollection;
609+
Goals: Analytics.Collection.Management.GoalsCollection;
610+
ProfileFilterLinks: Analytics.Collection.Management.ProfileFilterLinksCollection;
611+
ProfileUserLinks: Analytics.Collection.Management.ProfileUserLinksCollection;
612+
Profiles: Analytics.Collection.Management.ProfilesCollection;
613+
RemarketingAudience: Analytics.Collection.Management.RemarketingAudienceCollection;
614+
Segments: Analytics.Collection.Management.SegmentsCollection;
615+
UnsampledReports: Analytics.Collection.Management.UnsampledReportsCollection;
616+
Uploads: Analytics.Collection.Management.UploadsCollection;
617+
WebPropertyAdWordsLinks: Analytics.Collection.Management.WebPropertyAdWordsLinksCollection;
618+
Webproperties: Analytics.Collection.Management.WebpropertiesCollection;
619+
WebpropertyUserLinks: Analytics.Collection.Management.WebpropertyUserLinksCollection;
620620
}
621621
interface MetadataCollection {
622-
Columns?: Analytics.Collection.Metadata.ColumnsCollection | undefined;
622+
Columns: Analytics.Collection.Metadata.ColumnsCollection;
623623
}
624624
interface ProvisioningCollection {
625625
// Creates an account ticket.
@@ -628,7 +628,7 @@ declare namespace GoogleAppsScript {
628628
createAccountTree(resource: Schema.AccountTreeRequest): Analytics.Schema.AccountTreeResponse;
629629
}
630630
interface UserDeletionCollection {
631-
UserDeletionRequest?: Analytics.Collection.UserDeletion.UserDeletionRequestCollection | undefined;
631+
UserDeletionRequest: Analytics.Collection.UserDeletion.UserDeletionRequestCollection;
632632
}
633633
}
634634
namespace Schema {
@@ -1524,11 +1524,11 @@ declare namespace GoogleAppsScript {
15241524
}
15251525
}
15261526
interface Analytics {
1527-
Data?: Analytics.Collection.DataCollection | undefined;
1528-
Management?: Analytics.Collection.ManagementCollection | undefined;
1529-
Metadata?: Analytics.Collection.MetadataCollection | undefined;
1530-
Provisioning?: Analytics.Collection.ProvisioningCollection | undefined;
1531-
UserDeletion?: Analytics.Collection.UserDeletionCollection | undefined;
1527+
Data: Analytics.Collection.DataCollection;
1528+
Management: Analytics.Collection.ManagementCollection;
1529+
Metadata: Analytics.Collection.MetadataCollection;
1530+
Provisioning: Analytics.Collection.ProvisioningCollection;
1531+
UserDeletion: Analytics.Collection.UserDeletionCollection;
15321532
// Create a new instance of Account
15331533
newAccount(): Analytics.Schema.Account;
15341534
// Create a new instance of AccountChildLink
@@ -1652,4 +1652,7 @@ declare namespace GoogleAppsScript {
16521652
}
16531653
}
16541654

1655-
declare var Analytics: GoogleAppsScript.Analytics;
1655+
/**
1656+
* The `Analytics` advanced service must be enabled.
1657+
*/
1658+
declare var Analytics: GoogleAppsScript.Analytics | undefined;

‎types/google-apps-script/apis/analyticsreporting_v4.d.ts‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -297,8 +297,8 @@ declare namespace GoogleAppsScript {
297297
}
298298
}
299299
interface AnalyticsReporting {
300-
Reports?: AnalyticsReporting.Collection.ReportsCollection | undefined;
301-
UserActivity?: AnalyticsReporting.Collection.UserActivityCollection | undefined;
300+
Reports: AnalyticsReporting.Collection.ReportsCollection;
301+
UserActivity: AnalyticsReporting.Collection.UserActivityCollection;
302302
// Create a new instance of Cohort
303303
newCohort(): AnalyticsReporting.Schema.Cohort;
304304
// Create a new instance of CohortGroup
@@ -354,4 +354,7 @@ declare namespace GoogleAppsScript {
354354
}
355355
}
356356

357-
declare var AnalyticsReporting: GoogleAppsScript.AnalyticsReporting;
357+
/**
358+
* The `AnalyticsReporting` advanced service must be enabled.
359+
*/
360+
declare var AnalyticsReporting: GoogleAppsScript.AnalyticsReporting | undefined;

‎types/google-apps-script/apis/appsactivity_v1.d.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,11 @@ declare namespace GoogleAppsScript {
7171
}
7272
}
7373
interface Appsactivity {
74-
Activities?: Appsactivity.Collection.ActivitiesCollection | undefined;
74+
Activities: Appsactivity.Collection.ActivitiesCollection;
7575
}
7676
}
7777

78-
declare var Appsactivity: GoogleAppsScript.Appsactivity;
78+
/**
79+
* The `Appsactivity` advanced service must be enabled.
80+
*/
81+
declare var Appsactivity: GoogleAppsScript.Appsactivity | undefined;

‎types/google-apps-script/apis/bigquery_v2.d.ts‎

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -698,11 +698,11 @@ declare namespace GoogleAppsScript {
698698
}
699699
}
700700
interface BigQuery {
701-
Datasets?: BigQuery.Collection.DatasetsCollection | undefined;
702-
Jobs?: BigQuery.Collection.JobsCollection | undefined;
703-
Projects?: BigQuery.Collection.ProjectsCollection | undefined;
704-
Tabledata?: BigQuery.Collection.TabledataCollection | undefined;
705-
Tables?: BigQuery.Collection.TablesCollection | undefined;
701+
Datasets: BigQuery.Collection.DatasetsCollection;
702+
Jobs: BigQuery.Collection.JobsCollection;
703+
Projects: BigQuery.Collection.ProjectsCollection;
704+
Tabledata: BigQuery.Collection.TabledataCollection;
705+
Tables: BigQuery.Collection.TablesCollection;
706706
// Create a new instance of BigQueryModelTraining
707707
newBigQueryModelTraining(): BigQuery.Schema.BigQueryModelTraining;
708708
// Create a new instance of BigtableColumn
@@ -818,4 +818,7 @@ declare namespace GoogleAppsScript {
818818
}
819819
}
820820

821-
declare var BigQuery: GoogleAppsScript.BigQuery;
821+
/**
822+
* The `BigQuery` advanced service must be enabled.
823+
*/
824+
declare var BigQuery: GoogleAppsScript.BigQuery | undefined;

‎types/google-apps-script/apis/calendar_v3.d.ts‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -653,14 +653,14 @@ declare namespace GoogleAppsScript {
653653
}
654654
}
655655
interface Calendar {
656-
Acl?: Calendar.Collection.AclCollection | undefined;
657-
CalendarList?: Calendar.Collection.CalendarListCollection | undefined;
658-
Calendars?: Calendar.Collection.CalendarsCollection | undefined;
659-
Channels?: Calendar.Collection.ChannelsCollection | undefined;
660-
Colors?: Calendar.Collection.ColorsCollection | undefined;
661-
Events?: Calendar.Collection.EventsCollection | undefined;
662-
Freebusy?: Calendar.Collection.FreebusyCollection | undefined;
663-
Settings?: Calendar.Collection.SettingsCollection | undefined;
656+
Acl: Calendar.Collection.AclCollection;
657+
CalendarList: Calendar.Collection.CalendarListCollection;
658+
Calendars: Calendar.Collection.CalendarsCollection;
659+
Channels: Calendar.Collection.ChannelsCollection;
660+
Colors: Calendar.Collection.ColorsCollection;
661+
Events: Calendar.Collection.EventsCollection;
662+
Freebusy: Calendar.Collection.FreebusyCollection;
663+
Settings: Calendar.Collection.SettingsCollection;
664664
// Create a new instance of AclRule
665665
newAclRule(): Calendar.Schema.AclRule;
666666
// Create a new instance of AclRuleScope
@@ -728,4 +728,7 @@ declare namespace GoogleAppsScript {
728728
}
729729
}
730730

731-
declare var Calendar: GoogleAppsScript.Calendar;
731+
/**
732+
* The `Calendar` advanced service must be enabled.
733+
*/
734+
declare var Calendar: GoogleAppsScript.Calendar | undefined;

0 commit comments

Comments
 (0)