@anmiles/google-api-wrapper 16.0.3 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +4 -2
- package/dist/lib/api.d.ts +7 -277
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js +10 -282
- package/dist/lib/api.js.map +1 -1
- package/package.json +2 -3
- package/src/lib/__tests__/api.test.ts +17 -37
- package/src/lib/api.ts +12 -284
package/src/lib/api.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { google } from 'googleapis';
|
|
2
1
|
import type GoogleApis from 'googleapis';
|
|
3
2
|
import { log, warn } from '@anmiles/logger';
|
|
4
3
|
import sleep from '@anmiles/sleep';
|
|
@@ -23,21 +22,22 @@ type CommonResponse<TItem> = {
|
|
|
23
22
|
nextPageToken?: string | null | undefined
|
|
24
23
|
};
|
|
25
24
|
|
|
26
|
-
class API<
|
|
27
|
-
|
|
25
|
+
class API<TGoogleAPI> {
|
|
26
|
+
private auth: GoogleApis.Common.OAuth2Client | undefined;
|
|
27
|
+
private api: TGoogleAPI | undefined;
|
|
28
28
|
|
|
29
29
|
constructor(
|
|
30
|
-
private
|
|
30
|
+
private getter: (auth: GoogleApis.Common.OAuth2Client) => TGoogleAPI,
|
|
31
31
|
private profile: string,
|
|
32
32
|
private authOptions?: AuthOptions,
|
|
33
33
|
) { }
|
|
34
34
|
|
|
35
35
|
async init() {
|
|
36
|
-
|
|
37
|
-
this.api
|
|
36
|
+
this.auth = await getAuth(this.profile, this.authOptions);
|
|
37
|
+
this.api = this.getter(this.auth);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
async getItems<TItem>(selectAPI: (api:
|
|
40
|
+
async getItems<TItem>(selectAPI: (api: TGoogleAPI) => CommonAPI<TItem>, params: any, options?: CommonOptions): Promise<TItem[]> {
|
|
41
41
|
const items: TItem[] = [];
|
|
42
42
|
|
|
43
43
|
let pageToken: string | null | undefined = undefined;
|
|
@@ -50,7 +50,9 @@ class API<TKey extends keyof typeof allAPIs> {
|
|
|
50
50
|
throw 'API is not initialized. Call `init` before getting items.';
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
const selectedAPI = selectAPI(this.api);
|
|
54
|
+
|
|
55
|
+
response = await selectedAPI.list({ ...params, pageToken });
|
|
54
56
|
} catch (ex) {
|
|
55
57
|
const message = ex instanceof Error ? ex.message : ex as string;
|
|
56
58
|
|
|
@@ -78,7 +80,7 @@ class API<TKey extends keyof typeof allAPIs> {
|
|
|
78
80
|
}
|
|
79
81
|
}
|
|
80
82
|
|
|
81
|
-
async function getAPI<
|
|
83
|
+
async function getAPI<TGoogleAPI>(getter: (auth: GoogleApis.Common.OAuth2Client) => TGoogleAPI, profile: string, authOptions?: AuthOptions): Promise<API<TGoogleAPI>> {
|
|
82
84
|
if (!authOptions?.temporary) {
|
|
83
85
|
const writableScopes = authOptions?.scopes?.filter((scope) => !scope.endsWith('.readonly')) || [];
|
|
84
86
|
|
|
@@ -87,284 +89,10 @@ async function getAPI<TKey extends keyof typeof allAPIs>(apiName: TKey, profile:
|
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
91
|
|
|
90
|
-
const instance = new API<
|
|
92
|
+
const instance = new API<TGoogleAPI>(getter, profile, authOptions);
|
|
91
93
|
await instance.init();
|
|
92
94
|
return instance;
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
/* istanbul ignore next */
|
|
96
|
-
const allAPIs = {
|
|
97
|
-
abusiveexperiencereport : (auth: GoogleApis.Common.OAuth2Client) => google.abusiveexperiencereport({ version : 'v1', auth }),
|
|
98
|
-
acceleratedmobilepageurl : (auth: GoogleApis.Common.OAuth2Client) => google.acceleratedmobilepageurl({ version : 'v1', auth }),
|
|
99
|
-
accessapproval : (auth: GoogleApis.Common.OAuth2Client) => google.accessapproval({ version : 'v1', auth }),
|
|
100
|
-
accesscontextmanager : (auth: GoogleApis.Common.OAuth2Client) => google.accesscontextmanager({ version : 'v1', auth }),
|
|
101
|
-
acmedns : (auth: GoogleApis.Common.OAuth2Client) => google.acmedns({ version : 'v1', auth }),
|
|
102
|
-
adexchangebuyer : (auth: GoogleApis.Common.OAuth2Client) => google.adexchangebuyer({ version : 'v1.2', auth }),
|
|
103
|
-
adexchangebuyer2 : (auth: GoogleApis.Common.OAuth2Client) => google.adexchangebuyer2({ version : 'v2beta1', auth }),
|
|
104
|
-
adexperiencereport : (auth: GoogleApis.Common.OAuth2Client) => google.adexperiencereport({ version : 'v1', auth }),
|
|
105
|
-
admin : (auth: GoogleApis.Common.OAuth2Client) => google.admin({ version : 'datatransfer_v1', auth }),
|
|
106
|
-
admob : (auth: GoogleApis.Common.OAuth2Client) => google.admob({ version : 'v1', auth }),
|
|
107
|
-
adsense : (auth: GoogleApis.Common.OAuth2Client) => google.adsense({ version : 'v1.4', auth }),
|
|
108
|
-
adsensehost : (auth: GoogleApis.Common.OAuth2Client) => google.adsensehost({ version : 'v4.1', auth }),
|
|
109
|
-
advisorynotifications : (auth: GoogleApis.Common.OAuth2Client) => google.advisorynotifications({ version : 'v1', auth }),
|
|
110
|
-
alertcenter : (auth: GoogleApis.Common.OAuth2Client) => google.alertcenter({ version : 'v1beta1', auth }),
|
|
111
|
-
analytics : (auth: GoogleApis.Common.OAuth2Client) => google.analytics({ version : 'v3', auth }),
|
|
112
|
-
analyticsadmin : (auth: GoogleApis.Common.OAuth2Client) => google.analyticsadmin({ version : 'v1alpha', auth }),
|
|
113
|
-
analyticsdata : (auth: GoogleApis.Common.OAuth2Client) => google.analyticsdata({ version : 'v1alpha', auth }),
|
|
114
|
-
analyticshub : (auth: GoogleApis.Common.OAuth2Client) => google.analyticshub({ version : 'v1', auth }),
|
|
115
|
-
analyticsreporting : (auth: GoogleApis.Common.OAuth2Client) => google.analyticsreporting({ version : 'v4', auth }),
|
|
116
|
-
androiddeviceprovisioning : (auth: GoogleApis.Common.OAuth2Client) => google.androiddeviceprovisioning({ version : 'v1', auth }),
|
|
117
|
-
androidenterprise : (auth: GoogleApis.Common.OAuth2Client) => google.androidenterprise({ version : 'v1', auth }),
|
|
118
|
-
androidmanagement : (auth: GoogleApis.Common.OAuth2Client) => google.androidmanagement({ version : 'v1', auth }),
|
|
119
|
-
androidpublisher : (auth: GoogleApis.Common.OAuth2Client) => google.androidpublisher({ version : 'v1.1', auth }),
|
|
120
|
-
apigateway : (auth: GoogleApis.Common.OAuth2Client) => google.apigateway({ version : 'v1', auth }),
|
|
121
|
-
apigeeregistry : (auth: GoogleApis.Common.OAuth2Client) => google.apigeeregistry({ version : 'v1', auth }),
|
|
122
|
-
apikeys : (auth: GoogleApis.Common.OAuth2Client) => google.apikeys({ version : 'v2', auth }),
|
|
123
|
-
appengine : (auth: GoogleApis.Common.OAuth2Client) => google.appengine({ version : 'v1', auth }),
|
|
124
|
-
appsactivity : (auth: GoogleApis.Common.OAuth2Client) => google.appsactivity({ version : 'v1', auth }),
|
|
125
|
-
area120tables : (auth: GoogleApis.Common.OAuth2Client) => google.area120tables({ version : 'v1alpha1', auth }),
|
|
126
|
-
artifactregistry : (auth: GoogleApis.Common.OAuth2Client) => google.artifactregistry({ version : 'v1', auth }),
|
|
127
|
-
assuredworkloads : (auth: GoogleApis.Common.OAuth2Client) => google.assuredworkloads({ version : 'v1', auth }),
|
|
128
|
-
authorizedbuyersmarketplace : (auth: GoogleApis.Common.OAuth2Client) => google.authorizedbuyersmarketplace({ version : 'v1', auth }),
|
|
129
|
-
baremetalsolution : (auth: GoogleApis.Common.OAuth2Client) => google.baremetalsolution({ version : 'v1', auth }),
|
|
130
|
-
batch : (auth: GoogleApis.Common.OAuth2Client) => google.batch({ version : 'v1', auth }),
|
|
131
|
-
beyondcorp : (auth: GoogleApis.Common.OAuth2Client) => google.beyondcorp({ version : 'v1', auth }),
|
|
132
|
-
bigquery : (auth: GoogleApis.Common.OAuth2Client) => google.bigquery({ version : 'v2', auth }),
|
|
133
|
-
bigqueryconnection : (auth: GoogleApis.Common.OAuth2Client) => google.bigqueryconnection({ version : 'v1beta1', auth }),
|
|
134
|
-
bigquerydatatransfer : (auth: GoogleApis.Common.OAuth2Client) => google.bigquerydatatransfer({ version : 'v1', auth }),
|
|
135
|
-
bigqueryreservation : (auth: GoogleApis.Common.OAuth2Client) => google.bigqueryreservation({ version : 'v1', auth }),
|
|
136
|
-
bigtableadmin : (auth: GoogleApis.Common.OAuth2Client) => google.bigtableadmin({ version : 'v1', auth }),
|
|
137
|
-
billingbudgets : (auth: GoogleApis.Common.OAuth2Client) => google.billingbudgets({ version : 'v1', auth }),
|
|
138
|
-
binaryauthorization : (auth: GoogleApis.Common.OAuth2Client) => google.binaryauthorization({ version : 'v1', auth }),
|
|
139
|
-
blogger : (auth: GoogleApis.Common.OAuth2Client) => google.blogger({ version : 'v2', auth }),
|
|
140
|
-
books : (auth: GoogleApis.Common.OAuth2Client) => google.books({ version : 'v1', auth }),
|
|
141
|
-
businessprofileperformance : (auth: GoogleApis.Common.OAuth2Client) => google.businessprofileperformance({ version : 'v1', auth }),
|
|
142
|
-
calendar : (auth: GoogleApis.Common.OAuth2Client) => google.calendar({ version : 'v3', auth }),
|
|
143
|
-
certificatemanager : (auth: GoogleApis.Common.OAuth2Client) => google.certificatemanager({ version : 'v1', auth }),
|
|
144
|
-
chat : (auth: GoogleApis.Common.OAuth2Client) => google.chat({ version : 'v1', auth }),
|
|
145
|
-
chromemanagement : (auth: GoogleApis.Common.OAuth2Client) => google.chromemanagement({ version : 'v1', auth }),
|
|
146
|
-
chromepolicy : (auth: GoogleApis.Common.OAuth2Client) => google.chromepolicy({ version : 'v1', auth }),
|
|
147
|
-
chromeuxreport : (auth: GoogleApis.Common.OAuth2Client) => google.chromeuxreport({ version : 'v1', auth }),
|
|
148
|
-
civicinfo : (auth: GoogleApis.Common.OAuth2Client) => google.civicinfo({ version : 'v2', auth }),
|
|
149
|
-
classroom : (auth: GoogleApis.Common.OAuth2Client) => google.classroom({ version : 'v1', auth }),
|
|
150
|
-
cloudasset : (auth: GoogleApis.Common.OAuth2Client) => google.cloudasset({ version : 'v1', auth }),
|
|
151
|
-
cloudbilling : (auth: GoogleApis.Common.OAuth2Client) => google.cloudbilling({ version : 'v1', auth }),
|
|
152
|
-
cloudbuild : (auth: GoogleApis.Common.OAuth2Client) => google.cloudbuild({ version : 'v1', auth }),
|
|
153
|
-
cloudchannel : (auth: GoogleApis.Common.OAuth2Client) => google.cloudchannel({ version : 'v1', auth }),
|
|
154
|
-
clouddebugger : (auth: GoogleApis.Common.OAuth2Client) => google.clouddebugger({ version : 'v2', auth }),
|
|
155
|
-
clouddeploy : (auth: GoogleApis.Common.OAuth2Client) => google.clouddeploy({ version : 'v1', auth }),
|
|
156
|
-
clouderrorreporting : (auth: GoogleApis.Common.OAuth2Client) => google.clouderrorreporting({ version : 'v1beta1', auth }),
|
|
157
|
-
cloudfunctions : (auth: GoogleApis.Common.OAuth2Client) => google.cloudfunctions({ version : 'v1', auth }),
|
|
158
|
-
cloudidentity : (auth: GoogleApis.Common.OAuth2Client) => google.cloudidentity({ version : 'v1', auth }),
|
|
159
|
-
cloudiot : (auth: GoogleApis.Common.OAuth2Client) => google.cloudiot({ version : 'v1', auth }),
|
|
160
|
-
cloudkms : (auth: GoogleApis.Common.OAuth2Client) => google.cloudkms({ version : 'v1', auth }),
|
|
161
|
-
cloudprofiler : (auth: GoogleApis.Common.OAuth2Client) => google.cloudprofiler({ version : 'v2', auth }),
|
|
162
|
-
cloudresourcemanager : (auth: GoogleApis.Common.OAuth2Client) => google.cloudresourcemanager({ version : 'v1', auth }),
|
|
163
|
-
cloudscheduler : (auth: GoogleApis.Common.OAuth2Client) => google.cloudscheduler({ version : 'v1', auth }),
|
|
164
|
-
cloudsearch : (auth: GoogleApis.Common.OAuth2Client) => google.cloudsearch({ version : 'v1', auth }),
|
|
165
|
-
cloudshell : (auth: GoogleApis.Common.OAuth2Client) => google.cloudshell({ version : 'v1', auth }),
|
|
166
|
-
cloudsupport : (auth: GoogleApis.Common.OAuth2Client) => google.cloudsupport({ version : 'v2beta', auth }),
|
|
167
|
-
cloudtasks : (auth: GoogleApis.Common.OAuth2Client) => google.cloudtasks({ version : 'v2', auth }),
|
|
168
|
-
cloudtrace : (auth: GoogleApis.Common.OAuth2Client) => google.cloudtrace({ version : 'v1', auth }),
|
|
169
|
-
composer : (auth: GoogleApis.Common.OAuth2Client) => google.composer({ version : 'v1', auth }),
|
|
170
|
-
compute : (auth: GoogleApis.Common.OAuth2Client) => google.compute({ version : 'alpha', auth }),
|
|
171
|
-
connectors : (auth: GoogleApis.Common.OAuth2Client) => google.connectors({ version : 'v1', auth }),
|
|
172
|
-
contactcenteraiplatform : (auth: GoogleApis.Common.OAuth2Client) => google.contactcenteraiplatform({ version : 'v1alpha1', auth }),
|
|
173
|
-
contactcenterinsights : (auth: GoogleApis.Common.OAuth2Client) => google.contactcenterinsights({ version : 'v1', auth }),
|
|
174
|
-
container : (auth: GoogleApis.Common.OAuth2Client) => google.container({ version : 'v1', auth }),
|
|
175
|
-
containeranalysis : (auth: GoogleApis.Common.OAuth2Client) => google.containeranalysis({ version : 'v1', auth }),
|
|
176
|
-
content : (auth: GoogleApis.Common.OAuth2Client) => google.content({ version : 'v2.1', auth }),
|
|
177
|
-
contentwarehouse : (auth: GoogleApis.Common.OAuth2Client) => google.contentwarehouse({ version : 'v1', auth }),
|
|
178
|
-
customsearch : (auth: GoogleApis.Common.OAuth2Client) => google.customsearch({ version : 'v1', auth }),
|
|
179
|
-
datacatalog : (auth: GoogleApis.Common.OAuth2Client) => google.datacatalog({ version : 'v1', auth }),
|
|
180
|
-
dataflow : (auth: GoogleApis.Common.OAuth2Client) => google.dataflow({ version : 'v1b3', auth }),
|
|
181
|
-
dataform : (auth: GoogleApis.Common.OAuth2Client) => google.dataform({ version : 'v1beta1', auth }),
|
|
182
|
-
datafusion : (auth: GoogleApis.Common.OAuth2Client) => google.datafusion({ version : 'v1', auth }),
|
|
183
|
-
datalabeling : (auth: GoogleApis.Common.OAuth2Client) => google.datalabeling({ version : 'v1beta1', auth }),
|
|
184
|
-
datalineage : (auth: GoogleApis.Common.OAuth2Client) => google.datalineage({ version : 'v1', auth }),
|
|
185
|
-
datamigration : (auth: GoogleApis.Common.OAuth2Client) => google.datamigration({ version : 'v1', auth }),
|
|
186
|
-
datapipelines : (auth: GoogleApis.Common.OAuth2Client) => google.datapipelines({ version : 'v1', auth }),
|
|
187
|
-
dataplex : (auth: GoogleApis.Common.OAuth2Client) => google.dataplex({ version : 'v1', auth }),
|
|
188
|
-
dataproc : (auth: GoogleApis.Common.OAuth2Client) => google.dataproc({ version : 'v1', auth }),
|
|
189
|
-
datastore : (auth: GoogleApis.Common.OAuth2Client) => google.datastore({ version : 'v1', auth }),
|
|
190
|
-
datastream : (auth: GoogleApis.Common.OAuth2Client) => google.datastream({ version : 'v1', auth }),
|
|
191
|
-
deploymentmanager : (auth: GoogleApis.Common.OAuth2Client) => google.deploymentmanager({ version : 'alpha', auth }),
|
|
192
|
-
dfareporting : (auth: GoogleApis.Common.OAuth2Client) => google.dfareporting({ version : 'v3.3', auth }),
|
|
193
|
-
dialogflow : (auth: GoogleApis.Common.OAuth2Client) => google.dialogflow({ version : 'v2', auth }),
|
|
194
|
-
digitalassetlinks : (auth: GoogleApis.Common.OAuth2Client) => google.digitalassetlinks({ version : 'v1', auth }),
|
|
195
|
-
discovery : (auth: GoogleApis.Common.OAuth2Client) => google.discovery({ version : 'v1', auth }),
|
|
196
|
-
discoveryengine : (auth: GoogleApis.Common.OAuth2Client) => google.discoveryengine({ version : 'v1alpha', auth }),
|
|
197
|
-
displayvideo : (auth: GoogleApis.Common.OAuth2Client) => google.displayvideo({ version : 'v1', auth }),
|
|
198
|
-
dlp : (auth: GoogleApis.Common.OAuth2Client) => google.dlp({ version : 'v2', auth }),
|
|
199
|
-
dns : (auth: GoogleApis.Common.OAuth2Client) => google.dns({ version : 'v1', auth }),
|
|
200
|
-
docs : (auth: GoogleApis.Common.OAuth2Client) => google.docs({ version : 'v1', auth }),
|
|
201
|
-
documentai : (auth: GoogleApis.Common.OAuth2Client) => google.documentai({ version : 'v1', auth }),
|
|
202
|
-
domains : (auth: GoogleApis.Common.OAuth2Client) => google.domains({ version : 'v1', auth }),
|
|
203
|
-
domainsrdap : (auth: GoogleApis.Common.OAuth2Client) => google.domainsrdap({ version : 'v1', auth }),
|
|
204
|
-
doubleclickbidmanager : (auth: GoogleApis.Common.OAuth2Client) => google.doubleclickbidmanager({ version : 'v1.1', auth }),
|
|
205
|
-
doubleclicksearch : (auth: GoogleApis.Common.OAuth2Client) => google.doubleclicksearch({ version : 'v2', auth }),
|
|
206
|
-
drive : (auth: GoogleApis.Common.OAuth2Client) => google.drive({ version : 'v2', auth }),
|
|
207
|
-
driveactivity : (auth: GoogleApis.Common.OAuth2Client) => google.driveactivity({ version : 'v2', auth }),
|
|
208
|
-
drivelabels : (auth: GoogleApis.Common.OAuth2Client) => google.drivelabels({ version : 'v2', auth }),
|
|
209
|
-
essentialcontacts : (auth: GoogleApis.Common.OAuth2Client) => google.essentialcontacts({ version : 'v1', auth }),
|
|
210
|
-
eventarc : (auth: GoogleApis.Common.OAuth2Client) => google.eventarc({ version : 'v1', auth }),
|
|
211
|
-
factchecktools : (auth: GoogleApis.Common.OAuth2Client) => google.factchecktools({ version : 'v1alpha1', auth }),
|
|
212
|
-
fcm : (auth: GoogleApis.Common.OAuth2Client) => google.fcm({ version : 'v1', auth }),
|
|
213
|
-
fcmdata : (auth: GoogleApis.Common.OAuth2Client) => google.fcmdata({ version : 'v1beta1', auth }),
|
|
214
|
-
file : (auth: GoogleApis.Common.OAuth2Client) => google.file({ version : 'v1', auth }),
|
|
215
|
-
firebase : (auth: GoogleApis.Common.OAuth2Client) => google.firebase({ version : 'v1beta1', auth }),
|
|
216
|
-
firebaseappcheck : (auth: GoogleApis.Common.OAuth2Client) => google.firebaseappcheck({ version : 'v1', auth }),
|
|
217
|
-
firebaseappdistribution : (auth: GoogleApis.Common.OAuth2Client) => google.firebaseappdistribution({ version : 'v1', auth }),
|
|
218
|
-
firebasedatabase : (auth: GoogleApis.Common.OAuth2Client) => google.firebasedatabase({ version : 'v1beta', auth }),
|
|
219
|
-
firebasedynamiclinks : (auth: GoogleApis.Common.OAuth2Client) => google.firebasedynamiclinks({ version : 'v1', auth }),
|
|
220
|
-
firebasehosting : (auth: GoogleApis.Common.OAuth2Client) => google.firebasehosting({ version : 'v1', auth }),
|
|
221
|
-
firebaseml : (auth: GoogleApis.Common.OAuth2Client) => google.firebaseml({ version : 'v1', auth }),
|
|
222
|
-
firebaserules : (auth: GoogleApis.Common.OAuth2Client) => google.firebaserules({ version : 'v1', auth }),
|
|
223
|
-
firebasestorage : (auth: GoogleApis.Common.OAuth2Client) => google.firebasestorage({ version : 'v1beta', auth }),
|
|
224
|
-
firestore : (auth: GoogleApis.Common.OAuth2Client) => google.firestore({ version : 'v1', auth }),
|
|
225
|
-
fitness : (auth: GoogleApis.Common.OAuth2Client) => google.fitness({ version : 'v1', auth }),
|
|
226
|
-
forms : (auth: GoogleApis.Common.OAuth2Client) => google.forms({ version : 'v1', auth }),
|
|
227
|
-
games : (auth: GoogleApis.Common.OAuth2Client) => google.games({ version : 'v1', auth }),
|
|
228
|
-
gamesConfiguration : (auth: GoogleApis.Common.OAuth2Client) => google.gamesConfiguration({ version : 'v1configuration', auth }),
|
|
229
|
-
gameservices : (auth: GoogleApis.Common.OAuth2Client) => google.gameservices({ version : 'v1', auth }),
|
|
230
|
-
gamesManagement : (auth: GoogleApis.Common.OAuth2Client) => google.gamesManagement({ version : 'v1management', auth }),
|
|
231
|
-
genomics : (auth: GoogleApis.Common.OAuth2Client) => google.genomics({ version : 'v1', auth }),
|
|
232
|
-
gkebackup : (auth: GoogleApis.Common.OAuth2Client) => google.gkebackup({ version : 'v1', auth }),
|
|
233
|
-
gkehub : (auth: GoogleApis.Common.OAuth2Client) => google.gkehub({ version : 'v1', auth }),
|
|
234
|
-
gmail : (auth: GoogleApis.Common.OAuth2Client) => google.gmail({ version : 'v1', auth }),
|
|
235
|
-
gmailpostmastertools : (auth: GoogleApis.Common.OAuth2Client) => google.gmailpostmastertools({ version : 'v1', auth }),
|
|
236
|
-
groupsmigration : (auth: GoogleApis.Common.OAuth2Client) => google.groupsmigration({ version : 'v1', auth }),
|
|
237
|
-
groupssettings : (auth: GoogleApis.Common.OAuth2Client) => google.groupssettings({ version : 'v1', auth }),
|
|
238
|
-
healthcare : (auth: GoogleApis.Common.OAuth2Client) => google.healthcare({ version : 'v1', auth }),
|
|
239
|
-
homegraph : (auth: GoogleApis.Common.OAuth2Client) => google.homegraph({ version : 'v1', auth }),
|
|
240
|
-
iam : (auth: GoogleApis.Common.OAuth2Client) => google.iam({ version : 'v1', auth }),
|
|
241
|
-
iamcredentials : (auth: GoogleApis.Common.OAuth2Client) => google.iamcredentials({ version : 'v1', auth }),
|
|
242
|
-
iap : (auth: GoogleApis.Common.OAuth2Client) => google.iap({ version : 'v1', auth }),
|
|
243
|
-
ideahub : (auth: GoogleApis.Common.OAuth2Client) => google.ideahub({ version : 'v1alpha', auth }),
|
|
244
|
-
identitytoolkit : (auth: GoogleApis.Common.OAuth2Client) => google.identitytoolkit({ version : 'v2', auth }),
|
|
245
|
-
ids : (auth: GoogleApis.Common.OAuth2Client) => google.ids({ version : 'v1', auth }),
|
|
246
|
-
indexing : (auth: GoogleApis.Common.OAuth2Client) => google.indexing({ version : 'v3', auth }),
|
|
247
|
-
integrations : (auth: GoogleApis.Common.OAuth2Client) => google.integrations({ version : 'v1alpha', auth }),
|
|
248
|
-
jobs : (auth: GoogleApis.Common.OAuth2Client) => google.jobs({ version : 'v2', auth }),
|
|
249
|
-
kgsearch : (auth: GoogleApis.Common.OAuth2Client) => google.kgsearch({ version : 'v1', auth }),
|
|
250
|
-
kmsinventory : (auth: GoogleApis.Common.OAuth2Client) => google.kmsinventory({ version : 'v1', auth }),
|
|
251
|
-
language : (auth: GoogleApis.Common.OAuth2Client) => google.language({ version : 'v1', auth }),
|
|
252
|
-
libraryagent : (auth: GoogleApis.Common.OAuth2Client) => google.libraryagent({ version : 'v1', auth }),
|
|
253
|
-
licensing : (auth: GoogleApis.Common.OAuth2Client) => google.licensing({ version : 'v1', auth }),
|
|
254
|
-
lifesciences : (auth: GoogleApis.Common.OAuth2Client) => google.lifesciences({ version : 'v2beta', auth }),
|
|
255
|
-
localservices : (auth: GoogleApis.Common.OAuth2Client) => google.localservices({ version : 'v1', auth }),
|
|
256
|
-
logging : (auth: GoogleApis.Common.OAuth2Client) => google.logging({ version : 'v2', auth }),
|
|
257
|
-
managedidentities : (auth: GoogleApis.Common.OAuth2Client) => google.managedidentities({ version : 'v1', auth }),
|
|
258
|
-
manufacturers : (auth: GoogleApis.Common.OAuth2Client) => google.manufacturers({ version : 'v1', auth }),
|
|
259
|
-
memcache : (auth: GoogleApis.Common.OAuth2Client) => google.memcache({ version : 'v1', auth }),
|
|
260
|
-
metastore : (auth: GoogleApis.Common.OAuth2Client) => google.metastore({ version : 'v1', auth }),
|
|
261
|
-
migrationcenter : (auth: GoogleApis.Common.OAuth2Client) => google.migrationcenter({ version : 'v1alpha1', auth }),
|
|
262
|
-
ml : (auth: GoogleApis.Common.OAuth2Client) => google.ml({ version : 'v1', auth }),
|
|
263
|
-
monitoring : (auth: GoogleApis.Common.OAuth2Client) => google.monitoring({ version : 'v1', auth }),
|
|
264
|
-
mybusinessaccountmanagement : (auth: GoogleApis.Common.OAuth2Client) => google.mybusinessaccountmanagement({ version : 'v1', auth }),
|
|
265
|
-
mybusinessbusinesscalls : (auth: GoogleApis.Common.OAuth2Client) => google.mybusinessbusinesscalls({ version : 'v1', auth }),
|
|
266
|
-
mybusinessbusinessinformation : (auth: GoogleApis.Common.OAuth2Client) => google.mybusinessbusinessinformation({ version : 'v1', auth }),
|
|
267
|
-
mybusinesslodging : (auth: GoogleApis.Common.OAuth2Client) => google.mybusinesslodging({ version : 'v1', auth }),
|
|
268
|
-
mybusinessnotifications : (auth: GoogleApis.Common.OAuth2Client) => google.mybusinessnotifications({ version : 'v1', auth }),
|
|
269
|
-
mybusinessplaceactions : (auth: GoogleApis.Common.OAuth2Client) => google.mybusinessplaceactions({ version : 'v1', auth }),
|
|
270
|
-
mybusinessqanda : (auth: GoogleApis.Common.OAuth2Client) => google.mybusinessqanda({ version : 'v1', auth }),
|
|
271
|
-
mybusinessverifications : (auth: GoogleApis.Common.OAuth2Client) => google.mybusinessverifications({ version : 'v1', auth }),
|
|
272
|
-
networkconnectivity : (auth: GoogleApis.Common.OAuth2Client) => google.networkconnectivity({ version : 'v1', auth }),
|
|
273
|
-
networkmanagement : (auth: GoogleApis.Common.OAuth2Client) => google.networkmanagement({ version : 'v1', auth }),
|
|
274
|
-
networksecurity : (auth: GoogleApis.Common.OAuth2Client) => google.networksecurity({ version : 'v1', auth }),
|
|
275
|
-
networkservices : (auth: GoogleApis.Common.OAuth2Client) => google.networkservices({ version : 'v1', auth }),
|
|
276
|
-
notebooks : (auth: GoogleApis.Common.OAuth2Client) => google.notebooks({ version : 'v1', auth }),
|
|
277
|
-
oauth2 : (auth: GoogleApis.Common.OAuth2Client) => google.oauth2({ version : 'v2', auth }),
|
|
278
|
-
ondemandscanning : (auth: GoogleApis.Common.OAuth2Client) => google.ondemandscanning({ version : 'v1', auth }),
|
|
279
|
-
orgpolicy : (auth: GoogleApis.Common.OAuth2Client) => google.orgpolicy({ version : 'v2', auth }),
|
|
280
|
-
osconfig : (auth: GoogleApis.Common.OAuth2Client) => google.osconfig({ version : 'v1', auth }),
|
|
281
|
-
oslogin : (auth: GoogleApis.Common.OAuth2Client) => google.oslogin({ version : 'v1', auth }),
|
|
282
|
-
pagespeedonline : (auth: GoogleApis.Common.OAuth2Client) => google.pagespeedonline({ version : 'v5', auth }),
|
|
283
|
-
paymentsresellersubscription : (auth: GoogleApis.Common.OAuth2Client) => google.paymentsresellersubscription({ version : 'v1', auth }),
|
|
284
|
-
people : (auth: GoogleApis.Common.OAuth2Client) => google.people({ version : 'v1', auth }),
|
|
285
|
-
playablelocations : (auth: GoogleApis.Common.OAuth2Client) => google.playablelocations({ version : 'v3', auth }),
|
|
286
|
-
playcustomapp : (auth: GoogleApis.Common.OAuth2Client) => google.playcustomapp({ version : 'v1', auth }),
|
|
287
|
-
playdeveloperreporting : (auth: GoogleApis.Common.OAuth2Client) => google.playdeveloperreporting({ version : 'v1alpha1', auth }),
|
|
288
|
-
playintegrity : (auth: GoogleApis.Common.OAuth2Client) => google.playintegrity({ version : 'v1', auth }),
|
|
289
|
-
plus : (auth: GoogleApis.Common.OAuth2Client) => google.plus({ version : 'v1', auth }),
|
|
290
|
-
policyanalyzer : (auth: GoogleApis.Common.OAuth2Client) => google.policyanalyzer({ version : 'v1', auth }),
|
|
291
|
-
policysimulator : (auth: GoogleApis.Common.OAuth2Client) => google.policysimulator({ version : 'v1', auth }),
|
|
292
|
-
policytroubleshooter : (auth: GoogleApis.Common.OAuth2Client) => google.policytroubleshooter({ version : 'v1', auth }),
|
|
293
|
-
poly : (auth: GoogleApis.Common.OAuth2Client) => google.poly({ version : 'v1', auth }),
|
|
294
|
-
privateca : (auth: GoogleApis.Common.OAuth2Client) => google.privateca({ version : 'v1', auth }),
|
|
295
|
-
// eslint-disable-next-line camelcase
|
|
296
|
-
prod_tt_sasportal : (auth: GoogleApis.Common.OAuth2Client) => google.prod_tt_sasportal({ version : 'v1alpha1', auth }),
|
|
297
|
-
publicca : (auth: GoogleApis.Common.OAuth2Client) => google.publicca({ version : 'v1alpha1', auth }),
|
|
298
|
-
pubsub : (auth: GoogleApis.Common.OAuth2Client) => google.pubsub({ version : 'v1', auth }),
|
|
299
|
-
pubsublite : (auth: GoogleApis.Common.OAuth2Client) => google.pubsublite({ version : 'v1', auth }),
|
|
300
|
-
readerrevenuesubscriptionlinking : (auth: GoogleApis.Common.OAuth2Client) => google.readerrevenuesubscriptionlinking({ version : 'v1', auth }),
|
|
301
|
-
realtimebidding : (auth: GoogleApis.Common.OAuth2Client) => google.realtimebidding({ version : 'v1', auth }),
|
|
302
|
-
recaptchaenterprise : (auth: GoogleApis.Common.OAuth2Client) => google.recaptchaenterprise({ version : 'v1', auth }),
|
|
303
|
-
recommendationengine : (auth: GoogleApis.Common.OAuth2Client) => google.recommendationengine({ version : 'v1beta1', auth }),
|
|
304
|
-
recommender : (auth: GoogleApis.Common.OAuth2Client) => google.recommender({ version : 'v1', auth }),
|
|
305
|
-
redis : (auth: GoogleApis.Common.OAuth2Client) => google.redis({ version : 'v1', auth }),
|
|
306
|
-
remotebuildexecution : (auth: GoogleApis.Common.OAuth2Client) => google.remotebuildexecution({ version : 'v1', auth }),
|
|
307
|
-
reseller : (auth: GoogleApis.Common.OAuth2Client) => google.reseller({ version : 'v1', auth }),
|
|
308
|
-
resourcesettings : (auth: GoogleApis.Common.OAuth2Client) => google.resourcesettings({ version : 'v1', auth }),
|
|
309
|
-
retail : (auth: GoogleApis.Common.OAuth2Client) => google.retail({ version : 'v2', auth }),
|
|
310
|
-
run : (auth: GoogleApis.Common.OAuth2Client) => google.run({ version : 'v1', auth }),
|
|
311
|
-
runtimeconfig : (auth: GoogleApis.Common.OAuth2Client) => google.runtimeconfig({ version : 'v1', auth }),
|
|
312
|
-
safebrowsing : (auth: GoogleApis.Common.OAuth2Client) => google.safebrowsing({ version : 'v4', auth }),
|
|
313
|
-
sasportal : (auth: GoogleApis.Common.OAuth2Client) => google.sasportal({ version : 'v1alpha1', auth }),
|
|
314
|
-
script : (auth: GoogleApis.Common.OAuth2Client) => google.script({ version : 'v1', auth }),
|
|
315
|
-
searchads360 : (auth: GoogleApis.Common.OAuth2Client) => google.searchads360({ version : 'v0', auth }),
|
|
316
|
-
searchconsole : (auth: GoogleApis.Common.OAuth2Client) => google.searchconsole({ version : 'v1', auth }),
|
|
317
|
-
secretmanager : (auth: GoogleApis.Common.OAuth2Client) => google.secretmanager({ version : 'v1', auth }),
|
|
318
|
-
securitycenter : (auth: GoogleApis.Common.OAuth2Client) => google.securitycenter({ version : 'v1', auth }),
|
|
319
|
-
serviceconsumermanagement : (auth: GoogleApis.Common.OAuth2Client) => google.serviceconsumermanagement({ version : 'v1', auth }),
|
|
320
|
-
servicecontrol : (auth: GoogleApis.Common.OAuth2Client) => google.servicecontrol({ version : 'v1', auth }),
|
|
321
|
-
servicedirectory : (auth: GoogleApis.Common.OAuth2Client) => google.servicedirectory({ version : 'v1', auth }),
|
|
322
|
-
servicemanagement : (auth: GoogleApis.Common.OAuth2Client) => google.servicemanagement({ version : 'v1', auth }),
|
|
323
|
-
servicenetworking : (auth: GoogleApis.Common.OAuth2Client) => google.servicenetworking({ version : 'v1', auth }),
|
|
324
|
-
serviceusage : (auth: GoogleApis.Common.OAuth2Client) => google.serviceusage({ version : 'v1', auth }),
|
|
325
|
-
sheets : (auth: GoogleApis.Common.OAuth2Client) => google.sheets({ version : 'v4', auth }),
|
|
326
|
-
siteVerification : (auth: GoogleApis.Common.OAuth2Client) => google.siteVerification({ version : 'v1', auth }),
|
|
327
|
-
slides : (auth: GoogleApis.Common.OAuth2Client) => google.slides({ version : 'v1', auth }),
|
|
328
|
-
smartdevicemanagement : (auth: GoogleApis.Common.OAuth2Client) => google.smartdevicemanagement({ version : 'v1', auth }),
|
|
329
|
-
sourcerepo : (auth: GoogleApis.Common.OAuth2Client) => google.sourcerepo({ version : 'v1', auth }),
|
|
330
|
-
spanner : (auth: GoogleApis.Common.OAuth2Client) => google.spanner({ version : 'v1', auth }),
|
|
331
|
-
speech : (auth: GoogleApis.Common.OAuth2Client) => google.speech({ version : 'v1', auth }),
|
|
332
|
-
sql : (auth: GoogleApis.Common.OAuth2Client) => google.sql({ version : 'v1beta4', auth }),
|
|
333
|
-
sqladmin : (auth: GoogleApis.Common.OAuth2Client) => google.sqladmin({ version : 'v1', auth }),
|
|
334
|
-
storage : (auth: GoogleApis.Common.OAuth2Client) => google.storage({ version : 'v1', auth }),
|
|
335
|
-
storagetransfer : (auth: GoogleApis.Common.OAuth2Client) => google.storagetransfer({ version : 'v1', auth }),
|
|
336
|
-
streetviewpublish : (auth: GoogleApis.Common.OAuth2Client) => google.streetviewpublish({ version : 'v1', auth }),
|
|
337
|
-
sts : (auth: GoogleApis.Common.OAuth2Client) => google.sts({ version : 'v1', auth }),
|
|
338
|
-
tagmanager : (auth: GoogleApis.Common.OAuth2Client) => google.tagmanager({ version : 'v1', auth }),
|
|
339
|
-
tasks : (auth: GoogleApis.Common.OAuth2Client) => google.tasks({ version : 'v1', auth }),
|
|
340
|
-
testing : (auth: GoogleApis.Common.OAuth2Client) => google.testing({ version : 'v1', auth }),
|
|
341
|
-
texttospeech : (auth: GoogleApis.Common.OAuth2Client) => google.texttospeech({ version : 'v1', auth }),
|
|
342
|
-
toolresults : (auth: GoogleApis.Common.OAuth2Client) => google.toolresults({ version : 'v1beta3', auth }),
|
|
343
|
-
tpu : (auth: GoogleApis.Common.OAuth2Client) => google.tpu({ version : 'v1', auth }),
|
|
344
|
-
trafficdirector : (auth: GoogleApis.Common.OAuth2Client) => google.trafficdirector({ version : 'v2', auth }),
|
|
345
|
-
transcoder : (auth: GoogleApis.Common.OAuth2Client) => google.transcoder({ version : 'v1', auth }),
|
|
346
|
-
translate : (auth: GoogleApis.Common.OAuth2Client) => google.translate({ version : 'v2', auth }),
|
|
347
|
-
travelimpactmodel : (auth: GoogleApis.Common.OAuth2Client) => google.travelimpactmodel({ version : 'v1', auth }),
|
|
348
|
-
vault : (auth: GoogleApis.Common.OAuth2Client) => google.vault({ version : 'v1', auth }),
|
|
349
|
-
vectortile : (auth: GoogleApis.Common.OAuth2Client) => google.vectortile({ version : 'v1', auth }),
|
|
350
|
-
verifiedaccess : (auth: GoogleApis.Common.OAuth2Client) => google.verifiedaccess({ version : 'v1', auth }),
|
|
351
|
-
versionhistory : (auth: GoogleApis.Common.OAuth2Client) => google.versionhistory({ version : 'v1', auth }),
|
|
352
|
-
videointelligence : (auth: GoogleApis.Common.OAuth2Client) => google.videointelligence({ version : 'v1', auth }),
|
|
353
|
-
vision : (auth: GoogleApis.Common.OAuth2Client) => google.vision({ version : 'v1', auth }),
|
|
354
|
-
vmmigration : (auth: GoogleApis.Common.OAuth2Client) => google.vmmigration({ version : 'v1', auth }),
|
|
355
|
-
vpcaccess : (auth: GoogleApis.Common.OAuth2Client) => google.vpcaccess({ version : 'v1', auth }),
|
|
356
|
-
webfonts : (auth: GoogleApis.Common.OAuth2Client) => google.webfonts({ version : 'v1', auth }),
|
|
357
|
-
webmasters : (auth: GoogleApis.Common.OAuth2Client) => google.webmasters({ version : 'v3', auth }),
|
|
358
|
-
webrisk : (auth: GoogleApis.Common.OAuth2Client) => google.webrisk({ version : 'v1', auth }),
|
|
359
|
-
websecurityscanner : (auth: GoogleApis.Common.OAuth2Client) => google.websecurityscanner({ version : 'v1', auth }),
|
|
360
|
-
workflowexecutions : (auth: GoogleApis.Common.OAuth2Client) => google.workflowexecutions({ version : 'v1', auth }),
|
|
361
|
-
workflows : (auth: GoogleApis.Common.OAuth2Client) => google.workflows({ version : 'v1', auth }),
|
|
362
|
-
workloadmanager : (auth: GoogleApis.Common.OAuth2Client) => google.workloadmanager({ version : 'v1', auth }),
|
|
363
|
-
workstations : (auth: GoogleApis.Common.OAuth2Client) => google.workstations({ version : 'v1beta', auth }),
|
|
364
|
-
youtube : (auth: GoogleApis.Common.OAuth2Client) => google.youtube({ version : 'v3', auth }),
|
|
365
|
-
youtubeAnalytics : (auth: GoogleApis.Common.OAuth2Client) => google.youtubeAnalytics({ version : 'v1', auth }),
|
|
366
|
-
youtubereporting : (auth: GoogleApis.Common.OAuth2Client) => google.youtubereporting({ version : 'v1', auth }),
|
|
367
|
-
} as const;
|
|
368
|
-
|
|
369
97
|
export { getAPI };
|
|
370
98
|
export default { getAPI, API };
|