@maxim_mazurok/gapi.client.identitytoolkit-v1 0.0.20220924
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/index.d.ts +3365 -0
- package/package.json +20 -0
- package/readme.md +186 -0
- package/tests.ts +894 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/tests.ts
ADDED
|
@@ -0,0 +1,894 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.identitytoolkit-v1 definition tests */
|
|
2
|
+
// IMPORTANT
|
|
3
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
|
+
|
|
6
|
+
// Revision: 20220924
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://identitytoolkit.googleapis.com/$discovery/rest?version=v1');
|
|
12
|
+
/** now we can use gapi.client.identitytoolkit */
|
|
13
|
+
|
|
14
|
+
/** don't forget to authenticate your client before sending any request to resources: */
|
|
15
|
+
/** declare client_id registered in Google Developers Console */
|
|
16
|
+
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
17
|
+
const scope = [
|
|
18
|
+
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
|
|
19
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
20
|
+
/** View and administer all your Firebase data and settings */
|
|
21
|
+
'https://www.googleapis.com/auth/firebase',
|
|
22
|
+
];
|
|
23
|
+
const immediate = false;
|
|
24
|
+
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
25
|
+
if (authResult && !authResult.error) {
|
|
26
|
+
/** handle successful authorization */
|
|
27
|
+
run();
|
|
28
|
+
} else {
|
|
29
|
+
/** handle authorization error */
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
async function run() {
|
|
34
|
+
/**
|
|
35
|
+
* If an email identifier is specified, checks and returns if any user account is registered with the email. If there is a registered account, fetches all providers associated with the
|
|
36
|
+
* account's email. If the provider ID of an Identity Provider (IdP) is specified, creates an authorization URI for the IdP. The user can be directed to this URI to sign in with the IdP.
|
|
37
|
+
* An [API key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to identify the Google Cloud project.
|
|
38
|
+
*/
|
|
39
|
+
await gapi.client.identitytoolkit.accounts.createAuthUri({
|
|
40
|
+
}, {
|
|
41
|
+
appId: "Test string",
|
|
42
|
+
authFlowType: "Test string",
|
|
43
|
+
context: "Test string",
|
|
44
|
+
continueUri: "Test string",
|
|
45
|
+
customParameter: {
|
|
46
|
+
A: "Test string"
|
|
47
|
+
},
|
|
48
|
+
hostedDomain: "Test string",
|
|
49
|
+
identifier: "Test string",
|
|
50
|
+
oauthConsumerKey: "Test string",
|
|
51
|
+
oauthScope: "Test string",
|
|
52
|
+
openidRealm: "Test string",
|
|
53
|
+
otaApp: "Test string",
|
|
54
|
+
providerId: "Test string",
|
|
55
|
+
sessionId: "Test string",
|
|
56
|
+
tenantId: "Test string",
|
|
57
|
+
});
|
|
58
|
+
/** Deletes a user's account. */
|
|
59
|
+
await gapi.client.identitytoolkit.accounts.delete({
|
|
60
|
+
}, {
|
|
61
|
+
delegatedProjectNumber: "Test string",
|
|
62
|
+
idToken: "Test string",
|
|
63
|
+
localId: "Test string",
|
|
64
|
+
targetProjectId: "Test string",
|
|
65
|
+
tenantId: "Test string",
|
|
66
|
+
});
|
|
67
|
+
/** Experimental */
|
|
68
|
+
await gapi.client.identitytoolkit.accounts.issueSamlResponse({
|
|
69
|
+
}, {
|
|
70
|
+
idToken: "Test string",
|
|
71
|
+
rpId: "Test string",
|
|
72
|
+
samlAppEntityId: "Test string",
|
|
73
|
+
});
|
|
74
|
+
/**
|
|
75
|
+
* Gets account information for all matched accounts. For an end user request, retrieves the account of the end user. For an admin request with Google OAuth 2.0 credential, retrieves one
|
|
76
|
+
* or multiple account(s) with matching criteria.
|
|
77
|
+
*/
|
|
78
|
+
await gapi.client.identitytoolkit.accounts.lookup({
|
|
79
|
+
}, {
|
|
80
|
+
delegatedProjectNumber: "Test string",
|
|
81
|
+
email: [
|
|
82
|
+
"Test string"
|
|
83
|
+
],
|
|
84
|
+
federatedUserId: [
|
|
85
|
+
{
|
|
86
|
+
providerId: "Test string",
|
|
87
|
+
rawId: "Test string",
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
idToken: "Test string",
|
|
91
|
+
initialEmail: [
|
|
92
|
+
"Test string"
|
|
93
|
+
],
|
|
94
|
+
localId: [
|
|
95
|
+
"Test string"
|
|
96
|
+
],
|
|
97
|
+
phoneNumber: [
|
|
98
|
+
"Test string"
|
|
99
|
+
],
|
|
100
|
+
targetProjectId: "Test string",
|
|
101
|
+
tenantId: "Test string",
|
|
102
|
+
});
|
|
103
|
+
/**
|
|
104
|
+
* Resets the password of an account either using an out-of-band code generated by sendOobCode or by specifying the email and password of the account to be modified. Can also check the
|
|
105
|
+
* purpose of an out-of-band code without consuming it.
|
|
106
|
+
*/
|
|
107
|
+
await gapi.client.identitytoolkit.accounts.resetPassword({
|
|
108
|
+
}, {
|
|
109
|
+
email: "Test string",
|
|
110
|
+
newPassword: "Test string",
|
|
111
|
+
oldPassword: "Test string",
|
|
112
|
+
oobCode: "Test string",
|
|
113
|
+
tenantId: "Test string",
|
|
114
|
+
});
|
|
115
|
+
/** Sends an out-of-band confirmation code for an account. Requests from a authenticated request can optionally return a link including the OOB code instead of sending it. */
|
|
116
|
+
await gapi.client.identitytoolkit.accounts.sendOobCode({
|
|
117
|
+
}, {
|
|
118
|
+
androidInstallApp: true,
|
|
119
|
+
androidMinimumVersion: "Test string",
|
|
120
|
+
androidPackageName: "Test string",
|
|
121
|
+
canHandleCodeInApp: true,
|
|
122
|
+
captchaResp: "Test string",
|
|
123
|
+
challenge: "Test string",
|
|
124
|
+
continueUrl: "Test string",
|
|
125
|
+
dynamicLinkDomain: "Test string",
|
|
126
|
+
email: "Test string",
|
|
127
|
+
idToken: "Test string",
|
|
128
|
+
iOSAppStoreId: "Test string",
|
|
129
|
+
iOSBundleId: "Test string",
|
|
130
|
+
newEmail: "Test string",
|
|
131
|
+
requestType: "Test string",
|
|
132
|
+
returnOobLink: true,
|
|
133
|
+
targetProjectId: "Test string",
|
|
134
|
+
tenantId: "Test string",
|
|
135
|
+
userIp: "Test string",
|
|
136
|
+
});
|
|
137
|
+
/**
|
|
138
|
+
* Sends a SMS verification code for phone number sign-in. An [API key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to identify the Google
|
|
139
|
+
* Cloud project.
|
|
140
|
+
*/
|
|
141
|
+
await gapi.client.identitytoolkit.accounts.sendVerificationCode({
|
|
142
|
+
}, {
|
|
143
|
+
autoRetrievalInfo: {
|
|
144
|
+
appSignatureHash: "Test string",
|
|
145
|
+
},
|
|
146
|
+
iosReceipt: "Test string",
|
|
147
|
+
iosSecret: "Test string",
|
|
148
|
+
phoneNumber: "Test string",
|
|
149
|
+
recaptchaToken: "Test string",
|
|
150
|
+
safetyNetToken: "Test string",
|
|
151
|
+
tenantId: "Test string",
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* Signs in or signs up a user by exchanging a custom Auth token. Upon a successful sign-in or sign-up, a new Identity Platform ID token and refresh token are issued for the user. An [API
|
|
155
|
+
* key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to identify the Google Cloud project.
|
|
156
|
+
*/
|
|
157
|
+
await gapi.client.identitytoolkit.accounts.signInWithCustomToken({
|
|
158
|
+
}, {
|
|
159
|
+
delegatedProjectNumber: "Test string",
|
|
160
|
+
instanceId: "Test string",
|
|
161
|
+
returnSecureToken: true,
|
|
162
|
+
tenantId: "Test string",
|
|
163
|
+
token: "Test string",
|
|
164
|
+
});
|
|
165
|
+
/**
|
|
166
|
+
* Signs in or signs up a user with a out-of-band code from an email link. If a user does not exist with the given email address, a user record will be created. If the sign-in succeeds, an
|
|
167
|
+
* Identity Platform ID and refresh token are issued for the authenticated user. An [API key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to
|
|
168
|
+
* identify the Google Cloud project.
|
|
169
|
+
*/
|
|
170
|
+
await gapi.client.identitytoolkit.accounts.signInWithEmailLink({
|
|
171
|
+
}, {
|
|
172
|
+
email: "Test string",
|
|
173
|
+
idToken: "Test string",
|
|
174
|
+
oobCode: "Test string",
|
|
175
|
+
tenantId: "Test string",
|
|
176
|
+
});
|
|
177
|
+
/**
|
|
178
|
+
* Signs in or signs up a user with iOS Game Center credentials. If the sign-in succeeds, a new Identity Platform ID token and refresh token are issued for the authenticated user. The
|
|
179
|
+
* bundle ID is required in the request header as `x-ios-bundle-identifier`. An [API key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to
|
|
180
|
+
* identify the Google Cloud project.
|
|
181
|
+
*/
|
|
182
|
+
await gapi.client.identitytoolkit.accounts.signInWithGameCenter({
|
|
183
|
+
}, {
|
|
184
|
+
displayName: "Test string",
|
|
185
|
+
idToken: "Test string",
|
|
186
|
+
playerId: "Test string",
|
|
187
|
+
publicKeyUrl: "Test string",
|
|
188
|
+
salt: "Test string",
|
|
189
|
+
signature: "Test string",
|
|
190
|
+
tenantId: "Test string",
|
|
191
|
+
timestamp: "Test string",
|
|
192
|
+
});
|
|
193
|
+
/**
|
|
194
|
+
* Signs in or signs up a user using credentials from an Identity Provider (IdP). This is done by manually providing an IdP credential, or by providing the authorization response obtained
|
|
195
|
+
* via the authorization request from CreateAuthUri. If the sign-in succeeds, a new Identity Platform ID token and refresh token are issued for the authenticated user. A new Identity
|
|
196
|
+
* Platform user account will be created if the user has not previously signed in to the IdP with the same account. In addition, when the "One account per email address" setting is
|
|
197
|
+
* enabled, there should not be an existing Identity Platform user account with the same email address for a new user account to be created. An [API
|
|
198
|
+
* key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to identify the Google Cloud project.
|
|
199
|
+
*/
|
|
200
|
+
await gapi.client.identitytoolkit.accounts.signInWithIdp({
|
|
201
|
+
}, {
|
|
202
|
+
autoCreate: true,
|
|
203
|
+
delegatedProjectNumber: "Test string",
|
|
204
|
+
idToken: "Test string",
|
|
205
|
+
pendingIdToken: "Test string",
|
|
206
|
+
pendingToken: "Test string",
|
|
207
|
+
postBody: "Test string",
|
|
208
|
+
requestUri: "Test string",
|
|
209
|
+
returnIdpCredential: true,
|
|
210
|
+
returnRefreshToken: true,
|
|
211
|
+
returnSecureToken: true,
|
|
212
|
+
sessionId: "Test string",
|
|
213
|
+
tenantId: "Test string",
|
|
214
|
+
});
|
|
215
|
+
/**
|
|
216
|
+
* Signs in a user with email and password. If the sign-in succeeds, a new Identity Platform ID token and refresh token are issued for the authenticated user. An [API
|
|
217
|
+
* key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to identify the Google Cloud project.
|
|
218
|
+
*/
|
|
219
|
+
await gapi.client.identitytoolkit.accounts.signInWithPassword({
|
|
220
|
+
}, {
|
|
221
|
+
captchaChallenge: "Test string",
|
|
222
|
+
captchaResponse: "Test string",
|
|
223
|
+
delegatedProjectNumber: "Test string",
|
|
224
|
+
email: "Test string",
|
|
225
|
+
idToken: "Test string",
|
|
226
|
+
instanceId: "Test string",
|
|
227
|
+
password: "Test string",
|
|
228
|
+
pendingIdToken: "Test string",
|
|
229
|
+
returnSecureToken: true,
|
|
230
|
+
tenantId: "Test string",
|
|
231
|
+
});
|
|
232
|
+
/**
|
|
233
|
+
* Completes a phone number authentication attempt. If a user already exists with the given phone number, an ID token is minted for that user. Otherwise, a new user is created and
|
|
234
|
+
* associated with the phone number. This method may also be used to link a phone number to an existing user. An [API key](https://cloud.google.com/docs/authentication/api-keys) is
|
|
235
|
+
* required in the request in order to identify the Google Cloud project.
|
|
236
|
+
*/
|
|
237
|
+
await gapi.client.identitytoolkit.accounts.signInWithPhoneNumber({
|
|
238
|
+
}, {
|
|
239
|
+
code: "Test string",
|
|
240
|
+
idToken: "Test string",
|
|
241
|
+
operation: "Test string",
|
|
242
|
+
phoneNumber: "Test string",
|
|
243
|
+
sessionInfo: "Test string",
|
|
244
|
+
temporaryProof: "Test string",
|
|
245
|
+
tenantId: "Test string",
|
|
246
|
+
verificationProof: "Test string",
|
|
247
|
+
});
|
|
248
|
+
/**
|
|
249
|
+
* Signs up a new email and password user or anonymous user, or upgrades an anonymous user to email and password. For an admin request with a Google OAuth 2.0 credential with the proper
|
|
250
|
+
* [permissions](https://cloud.google.com/identity-platform/docs/access-control), creates a new anonymous, email and password, or phone number user. An [API
|
|
251
|
+
* key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to identify the Google Cloud project.
|
|
252
|
+
*/
|
|
253
|
+
await gapi.client.identitytoolkit.accounts.signUp({
|
|
254
|
+
}, {
|
|
255
|
+
captchaChallenge: "Test string",
|
|
256
|
+
captchaResponse: "Test string",
|
|
257
|
+
disabled: true,
|
|
258
|
+
displayName: "Test string",
|
|
259
|
+
email: "Test string",
|
|
260
|
+
emailVerified: true,
|
|
261
|
+
idToken: "Test string",
|
|
262
|
+
instanceId: "Test string",
|
|
263
|
+
localId: "Test string",
|
|
264
|
+
mfaInfo: [
|
|
265
|
+
{
|
|
266
|
+
displayName: "Test string",
|
|
267
|
+
phoneInfo: "Test string",
|
|
268
|
+
}
|
|
269
|
+
],
|
|
270
|
+
password: "Test string",
|
|
271
|
+
phoneNumber: "Test string",
|
|
272
|
+
photoUrl: "Test string",
|
|
273
|
+
targetProjectId: "Test string",
|
|
274
|
+
tenantId: "Test string",
|
|
275
|
+
});
|
|
276
|
+
/** Updates account-related information for the specified user by setting specific fields or applying action codes. Requests from administrators and end users are supported. */
|
|
277
|
+
await gapi.client.identitytoolkit.accounts.update({
|
|
278
|
+
}, {
|
|
279
|
+
captchaChallenge: "Test string",
|
|
280
|
+
captchaResponse: "Test string",
|
|
281
|
+
createdAt: "Test string",
|
|
282
|
+
customAttributes: "Test string",
|
|
283
|
+
delegatedProjectNumber: "Test string",
|
|
284
|
+
deleteAttribute: [
|
|
285
|
+
"Test string"
|
|
286
|
+
],
|
|
287
|
+
deleteProvider: [
|
|
288
|
+
"Test string"
|
|
289
|
+
],
|
|
290
|
+
disableUser: true,
|
|
291
|
+
displayName: "Test string",
|
|
292
|
+
email: "Test string",
|
|
293
|
+
emailVerified: true,
|
|
294
|
+
idToken: "Test string",
|
|
295
|
+
instanceId: "Test string",
|
|
296
|
+
lastLoginAt: "Test string",
|
|
297
|
+
linkProviderUserInfo: {
|
|
298
|
+
displayName: "Test string",
|
|
299
|
+
email: "Test string",
|
|
300
|
+
federatedId: "Test string",
|
|
301
|
+
phoneNumber: "Test string",
|
|
302
|
+
photoUrl: "Test string",
|
|
303
|
+
providerId: "Test string",
|
|
304
|
+
rawId: "Test string",
|
|
305
|
+
screenName: "Test string",
|
|
306
|
+
},
|
|
307
|
+
localId: "Test string",
|
|
308
|
+
mfa: {
|
|
309
|
+
enrollments: [
|
|
310
|
+
{
|
|
311
|
+
displayName: "Test string",
|
|
312
|
+
enrolledAt: "Test string",
|
|
313
|
+
mfaEnrollmentId: "Test string",
|
|
314
|
+
phoneInfo: "Test string",
|
|
315
|
+
unobfuscatedPhoneInfo: "Test string",
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
},
|
|
319
|
+
oobCode: "Test string",
|
|
320
|
+
password: "Test string",
|
|
321
|
+
phoneNumber: "Test string",
|
|
322
|
+
photoUrl: "Test string",
|
|
323
|
+
provider: [
|
|
324
|
+
"Test string"
|
|
325
|
+
],
|
|
326
|
+
returnSecureToken: true,
|
|
327
|
+
targetProjectId: "Test string",
|
|
328
|
+
tenantId: "Test string",
|
|
329
|
+
upgradeToFederatedLogin: true,
|
|
330
|
+
validSince: "Test string",
|
|
331
|
+
});
|
|
332
|
+
/**
|
|
333
|
+
* Verifies an iOS client is a real iOS device. If the request is valid, a reciept will be sent in the response and a secret will be sent via Apple Push Notification Service. The client
|
|
334
|
+
* should send both of them back to certain Identity Platform APIs in a later call (for example, /accounts:sendVerificationCode), in order to verify the client. The bundle ID is required
|
|
335
|
+
* in the request header as `x-ios-bundle-identifier`. An [API key](https://cloud.google.com/docs/authentication/api-keys) is required in the request in order to identify the Google Cloud
|
|
336
|
+
* project.
|
|
337
|
+
*/
|
|
338
|
+
await gapi.client.identitytoolkit.accounts.verifyIosClient({
|
|
339
|
+
}, {
|
|
340
|
+
appToken: "Test string",
|
|
341
|
+
isSandbox: true,
|
|
342
|
+
});
|
|
343
|
+
/** Creates a session cookie for the given Identity Platform ID token. The session cookie is used by the client to preserve the user's login state. */
|
|
344
|
+
await gapi.client.identitytoolkit.projects.createSessionCookie({
|
|
345
|
+
targetProjectId: "Test string",
|
|
346
|
+
}, {
|
|
347
|
+
idToken: "Test string",
|
|
348
|
+
tenantId: "Test string",
|
|
349
|
+
validDuration: "Test string",
|
|
350
|
+
});
|
|
351
|
+
/** Looks up user accounts within a project or a tenant based on conditions in the request. */
|
|
352
|
+
await gapi.client.identitytoolkit.projects.queryAccounts({
|
|
353
|
+
targetProjectId: "Test string",
|
|
354
|
+
}, {
|
|
355
|
+
expression: [
|
|
356
|
+
{
|
|
357
|
+
email: "Test string",
|
|
358
|
+
phoneNumber: "Test string",
|
|
359
|
+
userId: "Test string",
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
limit: "Test string",
|
|
363
|
+
offset: "Test string",
|
|
364
|
+
order: "Test string",
|
|
365
|
+
returnUserInfo: true,
|
|
366
|
+
sortBy: "Test string",
|
|
367
|
+
tenantId: "Test string",
|
|
368
|
+
});
|
|
369
|
+
/**
|
|
370
|
+
* Uploads multiple accounts into the Google Cloud project. If there is a problem uploading one or more of the accounts, the rest will be uploaded, and a list of the errors will be
|
|
371
|
+
* returned. To use this method requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control).
|
|
372
|
+
*/
|
|
373
|
+
await gapi.client.identitytoolkit.projects.accounts.batchCreate({
|
|
374
|
+
targetProjectId: "Test string",
|
|
375
|
+
}, {
|
|
376
|
+
allowOverwrite: true,
|
|
377
|
+
argon2Parameters: {
|
|
378
|
+
associatedData: "Test string",
|
|
379
|
+
hashLengthBytes: 42,
|
|
380
|
+
hashType: "Test string",
|
|
381
|
+
iterations: 42,
|
|
382
|
+
memoryCostKib: 42,
|
|
383
|
+
parallelism: 42,
|
|
384
|
+
version: "Test string",
|
|
385
|
+
},
|
|
386
|
+
blockSize: 42,
|
|
387
|
+
cpuMemCost: 42,
|
|
388
|
+
delegatedProjectNumber: "Test string",
|
|
389
|
+
dkLen: 42,
|
|
390
|
+
hashAlgorithm: "Test string",
|
|
391
|
+
memoryCost: 42,
|
|
392
|
+
parallelization: 42,
|
|
393
|
+
passwordHashOrder: "Test string",
|
|
394
|
+
rounds: 42,
|
|
395
|
+
saltSeparator: "Test string",
|
|
396
|
+
sanityCheck: true,
|
|
397
|
+
signerKey: "Test string",
|
|
398
|
+
tenantId: "Test string",
|
|
399
|
+
users: [
|
|
400
|
+
{
|
|
401
|
+
createdAt: "Test string",
|
|
402
|
+
customAttributes: "Test string",
|
|
403
|
+
customAuth: true,
|
|
404
|
+
dateOfBirth: "Test string",
|
|
405
|
+
disabled: true,
|
|
406
|
+
displayName: "Test string",
|
|
407
|
+
email: "Test string",
|
|
408
|
+
emailLinkSignin: true,
|
|
409
|
+
emailVerified: true,
|
|
410
|
+
initialEmail: "Test string",
|
|
411
|
+
language: "Test string",
|
|
412
|
+
lastLoginAt: "Test string",
|
|
413
|
+
lastRefreshAt: "Test string",
|
|
414
|
+
localId: "Test string",
|
|
415
|
+
mfaInfo: [
|
|
416
|
+
{
|
|
417
|
+
displayName: "Test string",
|
|
418
|
+
enrolledAt: "Test string",
|
|
419
|
+
mfaEnrollmentId: "Test string",
|
|
420
|
+
phoneInfo: "Test string",
|
|
421
|
+
unobfuscatedPhoneInfo: "Test string",
|
|
422
|
+
}
|
|
423
|
+
],
|
|
424
|
+
passwordHash: "Test string",
|
|
425
|
+
passwordUpdatedAt: 42,
|
|
426
|
+
phoneNumber: "Test string",
|
|
427
|
+
photoUrl: "Test string",
|
|
428
|
+
providerUserInfo: [
|
|
429
|
+
{
|
|
430
|
+
displayName: "Test string",
|
|
431
|
+
email: "Test string",
|
|
432
|
+
federatedId: "Test string",
|
|
433
|
+
phoneNumber: "Test string",
|
|
434
|
+
photoUrl: "Test string",
|
|
435
|
+
providerId: "Test string",
|
|
436
|
+
rawId: "Test string",
|
|
437
|
+
screenName: "Test string",
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
rawPassword: "Test string",
|
|
441
|
+
salt: "Test string",
|
|
442
|
+
screenName: "Test string",
|
|
443
|
+
tenantId: "Test string",
|
|
444
|
+
timeZone: "Test string",
|
|
445
|
+
validSince: "Test string",
|
|
446
|
+
version: 42,
|
|
447
|
+
}
|
|
448
|
+
],
|
|
449
|
+
});
|
|
450
|
+
/**
|
|
451
|
+
* Batch deletes multiple accounts. For accounts that fail to be deleted, error info is contained in the response. The method ignores accounts that do not exist or are duplicated in the
|
|
452
|
+
* request. This method requires a Google OAuth 2.0 credential with proper permissions. (https://cloud.google.com/identity-platform/docs/access-control)
|
|
453
|
+
*/
|
|
454
|
+
await gapi.client.identitytoolkit.projects.accounts.batchDelete({
|
|
455
|
+
targetProjectId: "Test string",
|
|
456
|
+
}, {
|
|
457
|
+
force: true,
|
|
458
|
+
localIds: [
|
|
459
|
+
"Test string"
|
|
460
|
+
],
|
|
461
|
+
tenantId: "Test string",
|
|
462
|
+
});
|
|
463
|
+
/**
|
|
464
|
+
* Download account information for all accounts on the project in a paginated manner. To use this method requires a Google OAuth 2.0 credential with proper
|
|
465
|
+
* [permissions](https://cloud.google.com/identity-platform/docs/access-control).. Furthermore, additional permissions are needed to get password hash, password salt, and password version
|
|
466
|
+
* from accounts; otherwise these fields are redacted.
|
|
467
|
+
*/
|
|
468
|
+
await gapi.client.identitytoolkit.projects.accounts.batchGet({
|
|
469
|
+
delegatedProjectNumber: "Test string",
|
|
470
|
+
maxResults: 42,
|
|
471
|
+
nextPageToken: "Test string",
|
|
472
|
+
targetProjectId: "Test string",
|
|
473
|
+
tenantId: "Test string",
|
|
474
|
+
});
|
|
475
|
+
/** Deletes a user's account. */
|
|
476
|
+
await gapi.client.identitytoolkit.projects.accounts.delete({
|
|
477
|
+
targetProjectId: "Test string",
|
|
478
|
+
}, {
|
|
479
|
+
delegatedProjectNumber: "Test string",
|
|
480
|
+
idToken: "Test string",
|
|
481
|
+
localId: "Test string",
|
|
482
|
+
targetProjectId: "Test string",
|
|
483
|
+
tenantId: "Test string",
|
|
484
|
+
});
|
|
485
|
+
/**
|
|
486
|
+
* Gets account information for all matched accounts. For an end user request, retrieves the account of the end user. For an admin request with Google OAuth 2.0 credential, retrieves one
|
|
487
|
+
* or multiple account(s) with matching criteria.
|
|
488
|
+
*/
|
|
489
|
+
await gapi.client.identitytoolkit.projects.accounts.lookup({
|
|
490
|
+
targetProjectId: "Test string",
|
|
491
|
+
}, {
|
|
492
|
+
delegatedProjectNumber: "Test string",
|
|
493
|
+
email: [
|
|
494
|
+
"Test string"
|
|
495
|
+
],
|
|
496
|
+
federatedUserId: [
|
|
497
|
+
{
|
|
498
|
+
providerId: "Test string",
|
|
499
|
+
rawId: "Test string",
|
|
500
|
+
}
|
|
501
|
+
],
|
|
502
|
+
idToken: "Test string",
|
|
503
|
+
initialEmail: [
|
|
504
|
+
"Test string"
|
|
505
|
+
],
|
|
506
|
+
localId: [
|
|
507
|
+
"Test string"
|
|
508
|
+
],
|
|
509
|
+
phoneNumber: [
|
|
510
|
+
"Test string"
|
|
511
|
+
],
|
|
512
|
+
targetProjectId: "Test string",
|
|
513
|
+
tenantId: "Test string",
|
|
514
|
+
});
|
|
515
|
+
/** Looks up user accounts within a project or a tenant based on conditions in the request. */
|
|
516
|
+
await gapi.client.identitytoolkit.projects.accounts.query({
|
|
517
|
+
targetProjectId: "Test string",
|
|
518
|
+
}, {
|
|
519
|
+
expression: [
|
|
520
|
+
{
|
|
521
|
+
email: "Test string",
|
|
522
|
+
phoneNumber: "Test string",
|
|
523
|
+
userId: "Test string",
|
|
524
|
+
}
|
|
525
|
+
],
|
|
526
|
+
limit: "Test string",
|
|
527
|
+
offset: "Test string",
|
|
528
|
+
order: "Test string",
|
|
529
|
+
returnUserInfo: true,
|
|
530
|
+
sortBy: "Test string",
|
|
531
|
+
tenantId: "Test string",
|
|
532
|
+
});
|
|
533
|
+
/** Sends an out-of-band confirmation code for an account. Requests from a authenticated request can optionally return a link including the OOB code instead of sending it. */
|
|
534
|
+
await gapi.client.identitytoolkit.projects.accounts.sendOobCode({
|
|
535
|
+
targetProjectId: "Test string",
|
|
536
|
+
}, {
|
|
537
|
+
androidInstallApp: true,
|
|
538
|
+
androidMinimumVersion: "Test string",
|
|
539
|
+
androidPackageName: "Test string",
|
|
540
|
+
canHandleCodeInApp: true,
|
|
541
|
+
captchaResp: "Test string",
|
|
542
|
+
challenge: "Test string",
|
|
543
|
+
continueUrl: "Test string",
|
|
544
|
+
dynamicLinkDomain: "Test string",
|
|
545
|
+
email: "Test string",
|
|
546
|
+
idToken: "Test string",
|
|
547
|
+
iOSAppStoreId: "Test string",
|
|
548
|
+
iOSBundleId: "Test string",
|
|
549
|
+
newEmail: "Test string",
|
|
550
|
+
requestType: "Test string",
|
|
551
|
+
returnOobLink: true,
|
|
552
|
+
targetProjectId: "Test string",
|
|
553
|
+
tenantId: "Test string",
|
|
554
|
+
userIp: "Test string",
|
|
555
|
+
});
|
|
556
|
+
/** Updates account-related information for the specified user by setting specific fields or applying action codes. Requests from administrators and end users are supported. */
|
|
557
|
+
await gapi.client.identitytoolkit.projects.accounts.update({
|
|
558
|
+
targetProjectId: "Test string",
|
|
559
|
+
}, {
|
|
560
|
+
captchaChallenge: "Test string",
|
|
561
|
+
captchaResponse: "Test string",
|
|
562
|
+
createdAt: "Test string",
|
|
563
|
+
customAttributes: "Test string",
|
|
564
|
+
delegatedProjectNumber: "Test string",
|
|
565
|
+
deleteAttribute: [
|
|
566
|
+
"Test string"
|
|
567
|
+
],
|
|
568
|
+
deleteProvider: [
|
|
569
|
+
"Test string"
|
|
570
|
+
],
|
|
571
|
+
disableUser: true,
|
|
572
|
+
displayName: "Test string",
|
|
573
|
+
email: "Test string",
|
|
574
|
+
emailVerified: true,
|
|
575
|
+
idToken: "Test string",
|
|
576
|
+
instanceId: "Test string",
|
|
577
|
+
lastLoginAt: "Test string",
|
|
578
|
+
linkProviderUserInfo: {
|
|
579
|
+
displayName: "Test string",
|
|
580
|
+
email: "Test string",
|
|
581
|
+
federatedId: "Test string",
|
|
582
|
+
phoneNumber: "Test string",
|
|
583
|
+
photoUrl: "Test string",
|
|
584
|
+
providerId: "Test string",
|
|
585
|
+
rawId: "Test string",
|
|
586
|
+
screenName: "Test string",
|
|
587
|
+
},
|
|
588
|
+
localId: "Test string",
|
|
589
|
+
mfa: {
|
|
590
|
+
enrollments: [
|
|
591
|
+
{
|
|
592
|
+
displayName: "Test string",
|
|
593
|
+
enrolledAt: "Test string",
|
|
594
|
+
mfaEnrollmentId: "Test string",
|
|
595
|
+
phoneInfo: "Test string",
|
|
596
|
+
unobfuscatedPhoneInfo: "Test string",
|
|
597
|
+
}
|
|
598
|
+
],
|
|
599
|
+
},
|
|
600
|
+
oobCode: "Test string",
|
|
601
|
+
password: "Test string",
|
|
602
|
+
phoneNumber: "Test string",
|
|
603
|
+
photoUrl: "Test string",
|
|
604
|
+
provider: [
|
|
605
|
+
"Test string"
|
|
606
|
+
],
|
|
607
|
+
returnSecureToken: true,
|
|
608
|
+
targetProjectId: "Test string",
|
|
609
|
+
tenantId: "Test string",
|
|
610
|
+
upgradeToFederatedLogin: true,
|
|
611
|
+
validSince: "Test string",
|
|
612
|
+
});
|
|
613
|
+
/** Creates a session cookie for the given Identity Platform ID token. The session cookie is used by the client to preserve the user's login state. */
|
|
614
|
+
await gapi.client.identitytoolkit.projects.tenants.createSessionCookie({
|
|
615
|
+
targetProjectId: "Test string",
|
|
616
|
+
tenantId: "Test string",
|
|
617
|
+
}, {
|
|
618
|
+
idToken: "Test string",
|
|
619
|
+
tenantId: "Test string",
|
|
620
|
+
validDuration: "Test string",
|
|
621
|
+
});
|
|
622
|
+
/**
|
|
623
|
+
* Uploads multiple accounts into the Google Cloud project. If there is a problem uploading one or more of the accounts, the rest will be uploaded, and a list of the errors will be
|
|
624
|
+
* returned. To use this method requires a Google OAuth 2.0 credential with proper [permissions](https://cloud.google.com/identity-platform/docs/access-control).
|
|
625
|
+
*/
|
|
626
|
+
await gapi.client.identitytoolkit.projects.tenants.accounts.batchCreate({
|
|
627
|
+
targetProjectId: "Test string",
|
|
628
|
+
tenantId: "Test string",
|
|
629
|
+
}, {
|
|
630
|
+
allowOverwrite: true,
|
|
631
|
+
argon2Parameters: {
|
|
632
|
+
associatedData: "Test string",
|
|
633
|
+
hashLengthBytes: 42,
|
|
634
|
+
hashType: "Test string",
|
|
635
|
+
iterations: 42,
|
|
636
|
+
memoryCostKib: 42,
|
|
637
|
+
parallelism: 42,
|
|
638
|
+
version: "Test string",
|
|
639
|
+
},
|
|
640
|
+
blockSize: 42,
|
|
641
|
+
cpuMemCost: 42,
|
|
642
|
+
delegatedProjectNumber: "Test string",
|
|
643
|
+
dkLen: 42,
|
|
644
|
+
hashAlgorithm: "Test string",
|
|
645
|
+
memoryCost: 42,
|
|
646
|
+
parallelization: 42,
|
|
647
|
+
passwordHashOrder: "Test string",
|
|
648
|
+
rounds: 42,
|
|
649
|
+
saltSeparator: "Test string",
|
|
650
|
+
sanityCheck: true,
|
|
651
|
+
signerKey: "Test string",
|
|
652
|
+
tenantId: "Test string",
|
|
653
|
+
users: [
|
|
654
|
+
{
|
|
655
|
+
createdAt: "Test string",
|
|
656
|
+
customAttributes: "Test string",
|
|
657
|
+
customAuth: true,
|
|
658
|
+
dateOfBirth: "Test string",
|
|
659
|
+
disabled: true,
|
|
660
|
+
displayName: "Test string",
|
|
661
|
+
email: "Test string",
|
|
662
|
+
emailLinkSignin: true,
|
|
663
|
+
emailVerified: true,
|
|
664
|
+
initialEmail: "Test string",
|
|
665
|
+
language: "Test string",
|
|
666
|
+
lastLoginAt: "Test string",
|
|
667
|
+
lastRefreshAt: "Test string",
|
|
668
|
+
localId: "Test string",
|
|
669
|
+
mfaInfo: [
|
|
670
|
+
{
|
|
671
|
+
displayName: "Test string",
|
|
672
|
+
enrolledAt: "Test string",
|
|
673
|
+
mfaEnrollmentId: "Test string",
|
|
674
|
+
phoneInfo: "Test string",
|
|
675
|
+
unobfuscatedPhoneInfo: "Test string",
|
|
676
|
+
}
|
|
677
|
+
],
|
|
678
|
+
passwordHash: "Test string",
|
|
679
|
+
passwordUpdatedAt: 42,
|
|
680
|
+
phoneNumber: "Test string",
|
|
681
|
+
photoUrl: "Test string",
|
|
682
|
+
providerUserInfo: [
|
|
683
|
+
{
|
|
684
|
+
displayName: "Test string",
|
|
685
|
+
email: "Test string",
|
|
686
|
+
federatedId: "Test string",
|
|
687
|
+
phoneNumber: "Test string",
|
|
688
|
+
photoUrl: "Test string",
|
|
689
|
+
providerId: "Test string",
|
|
690
|
+
rawId: "Test string",
|
|
691
|
+
screenName: "Test string",
|
|
692
|
+
}
|
|
693
|
+
],
|
|
694
|
+
rawPassword: "Test string",
|
|
695
|
+
salt: "Test string",
|
|
696
|
+
screenName: "Test string",
|
|
697
|
+
tenantId: "Test string",
|
|
698
|
+
timeZone: "Test string",
|
|
699
|
+
validSince: "Test string",
|
|
700
|
+
version: 42,
|
|
701
|
+
}
|
|
702
|
+
],
|
|
703
|
+
});
|
|
704
|
+
/**
|
|
705
|
+
* Batch deletes multiple accounts. For accounts that fail to be deleted, error info is contained in the response. The method ignores accounts that do not exist or are duplicated in the
|
|
706
|
+
* request. This method requires a Google OAuth 2.0 credential with proper permissions. (https://cloud.google.com/identity-platform/docs/access-control)
|
|
707
|
+
*/
|
|
708
|
+
await gapi.client.identitytoolkit.projects.tenants.accounts.batchDelete({
|
|
709
|
+
targetProjectId: "Test string",
|
|
710
|
+
tenantId: "Test string",
|
|
711
|
+
}, {
|
|
712
|
+
force: true,
|
|
713
|
+
localIds: [
|
|
714
|
+
"Test string"
|
|
715
|
+
],
|
|
716
|
+
tenantId: "Test string",
|
|
717
|
+
});
|
|
718
|
+
/**
|
|
719
|
+
* Download account information for all accounts on the project in a paginated manner. To use this method requires a Google OAuth 2.0 credential with proper
|
|
720
|
+
* [permissions](https://cloud.google.com/identity-platform/docs/access-control).. Furthermore, additional permissions are needed to get password hash, password salt, and password version
|
|
721
|
+
* from accounts; otherwise these fields are redacted.
|
|
722
|
+
*/
|
|
723
|
+
await gapi.client.identitytoolkit.projects.tenants.accounts.batchGet({
|
|
724
|
+
delegatedProjectNumber: "Test string",
|
|
725
|
+
maxResults: 42,
|
|
726
|
+
nextPageToken: "Test string",
|
|
727
|
+
targetProjectId: "Test string",
|
|
728
|
+
tenantId: "Test string",
|
|
729
|
+
});
|
|
730
|
+
/** Deletes a user's account. */
|
|
731
|
+
await gapi.client.identitytoolkit.projects.tenants.accounts.delete({
|
|
732
|
+
targetProjectId: "Test string",
|
|
733
|
+
tenantId: "Test string",
|
|
734
|
+
}, {
|
|
735
|
+
delegatedProjectNumber: "Test string",
|
|
736
|
+
idToken: "Test string",
|
|
737
|
+
localId: "Test string",
|
|
738
|
+
targetProjectId: "Test string",
|
|
739
|
+
tenantId: "Test string",
|
|
740
|
+
});
|
|
741
|
+
/**
|
|
742
|
+
* Gets account information for all matched accounts. For an end user request, retrieves the account of the end user. For an admin request with Google OAuth 2.0 credential, retrieves one
|
|
743
|
+
* or multiple account(s) with matching criteria.
|
|
744
|
+
*/
|
|
745
|
+
await gapi.client.identitytoolkit.projects.tenants.accounts.lookup({
|
|
746
|
+
targetProjectId: "Test string",
|
|
747
|
+
tenantId: "Test string",
|
|
748
|
+
}, {
|
|
749
|
+
delegatedProjectNumber: "Test string",
|
|
750
|
+
email: [
|
|
751
|
+
"Test string"
|
|
752
|
+
],
|
|
753
|
+
federatedUserId: [
|
|
754
|
+
{
|
|
755
|
+
providerId: "Test string",
|
|
756
|
+
rawId: "Test string",
|
|
757
|
+
}
|
|
758
|
+
],
|
|
759
|
+
idToken: "Test string",
|
|
760
|
+
initialEmail: [
|
|
761
|
+
"Test string"
|
|
762
|
+
],
|
|
763
|
+
localId: [
|
|
764
|
+
"Test string"
|
|
765
|
+
],
|
|
766
|
+
phoneNumber: [
|
|
767
|
+
"Test string"
|
|
768
|
+
],
|
|
769
|
+
targetProjectId: "Test string",
|
|
770
|
+
tenantId: "Test string",
|
|
771
|
+
});
|
|
772
|
+
/** Looks up user accounts within a project or a tenant based on conditions in the request. */
|
|
773
|
+
await gapi.client.identitytoolkit.projects.tenants.accounts.query({
|
|
774
|
+
targetProjectId: "Test string",
|
|
775
|
+
tenantId: "Test string",
|
|
776
|
+
}, {
|
|
777
|
+
expression: [
|
|
778
|
+
{
|
|
779
|
+
email: "Test string",
|
|
780
|
+
phoneNumber: "Test string",
|
|
781
|
+
userId: "Test string",
|
|
782
|
+
}
|
|
783
|
+
],
|
|
784
|
+
limit: "Test string",
|
|
785
|
+
offset: "Test string",
|
|
786
|
+
order: "Test string",
|
|
787
|
+
returnUserInfo: true,
|
|
788
|
+
sortBy: "Test string",
|
|
789
|
+
tenantId: "Test string",
|
|
790
|
+
});
|
|
791
|
+
/** Sends an out-of-band confirmation code for an account. Requests from a authenticated request can optionally return a link including the OOB code instead of sending it. */
|
|
792
|
+
await gapi.client.identitytoolkit.projects.tenants.accounts.sendOobCode({
|
|
793
|
+
targetProjectId: "Test string",
|
|
794
|
+
tenantId: "Test string",
|
|
795
|
+
}, {
|
|
796
|
+
androidInstallApp: true,
|
|
797
|
+
androidMinimumVersion: "Test string",
|
|
798
|
+
androidPackageName: "Test string",
|
|
799
|
+
canHandleCodeInApp: true,
|
|
800
|
+
captchaResp: "Test string",
|
|
801
|
+
challenge: "Test string",
|
|
802
|
+
continueUrl: "Test string",
|
|
803
|
+
dynamicLinkDomain: "Test string",
|
|
804
|
+
email: "Test string",
|
|
805
|
+
idToken: "Test string",
|
|
806
|
+
iOSAppStoreId: "Test string",
|
|
807
|
+
iOSBundleId: "Test string",
|
|
808
|
+
newEmail: "Test string",
|
|
809
|
+
requestType: "Test string",
|
|
810
|
+
returnOobLink: true,
|
|
811
|
+
targetProjectId: "Test string",
|
|
812
|
+
tenantId: "Test string",
|
|
813
|
+
userIp: "Test string",
|
|
814
|
+
});
|
|
815
|
+
/** Updates account-related information for the specified user by setting specific fields or applying action codes. Requests from administrators and end users are supported. */
|
|
816
|
+
await gapi.client.identitytoolkit.projects.tenants.accounts.update({
|
|
817
|
+
targetProjectId: "Test string",
|
|
818
|
+
tenantId: "Test string",
|
|
819
|
+
}, {
|
|
820
|
+
captchaChallenge: "Test string",
|
|
821
|
+
captchaResponse: "Test string",
|
|
822
|
+
createdAt: "Test string",
|
|
823
|
+
customAttributes: "Test string",
|
|
824
|
+
delegatedProjectNumber: "Test string",
|
|
825
|
+
deleteAttribute: [
|
|
826
|
+
"Test string"
|
|
827
|
+
],
|
|
828
|
+
deleteProvider: [
|
|
829
|
+
"Test string"
|
|
830
|
+
],
|
|
831
|
+
disableUser: true,
|
|
832
|
+
displayName: "Test string",
|
|
833
|
+
email: "Test string",
|
|
834
|
+
emailVerified: true,
|
|
835
|
+
idToken: "Test string",
|
|
836
|
+
instanceId: "Test string",
|
|
837
|
+
lastLoginAt: "Test string",
|
|
838
|
+
linkProviderUserInfo: {
|
|
839
|
+
displayName: "Test string",
|
|
840
|
+
email: "Test string",
|
|
841
|
+
federatedId: "Test string",
|
|
842
|
+
phoneNumber: "Test string",
|
|
843
|
+
photoUrl: "Test string",
|
|
844
|
+
providerId: "Test string",
|
|
845
|
+
rawId: "Test string",
|
|
846
|
+
screenName: "Test string",
|
|
847
|
+
},
|
|
848
|
+
localId: "Test string",
|
|
849
|
+
mfa: {
|
|
850
|
+
enrollments: [
|
|
851
|
+
{
|
|
852
|
+
displayName: "Test string",
|
|
853
|
+
enrolledAt: "Test string",
|
|
854
|
+
mfaEnrollmentId: "Test string",
|
|
855
|
+
phoneInfo: "Test string",
|
|
856
|
+
unobfuscatedPhoneInfo: "Test string",
|
|
857
|
+
}
|
|
858
|
+
],
|
|
859
|
+
},
|
|
860
|
+
oobCode: "Test string",
|
|
861
|
+
password: "Test string",
|
|
862
|
+
phoneNumber: "Test string",
|
|
863
|
+
photoUrl: "Test string",
|
|
864
|
+
provider: [
|
|
865
|
+
"Test string"
|
|
866
|
+
],
|
|
867
|
+
returnSecureToken: true,
|
|
868
|
+
targetProjectId: "Test string",
|
|
869
|
+
tenantId: "Test string",
|
|
870
|
+
upgradeToFederatedLogin: true,
|
|
871
|
+
validSince: "Test string",
|
|
872
|
+
});
|
|
873
|
+
/** Gets a project's public Identity Toolkit configuration. (Legacy) This method also supports authenticated calls from a developer to retrieve non-public configuration. */
|
|
874
|
+
await gapi.client.identitytoolkit.v1.getProjects({
|
|
875
|
+
androidPackageName: "Test string",
|
|
876
|
+
clientId: "Test string",
|
|
877
|
+
delegatedProjectNumber: "Test string",
|
|
878
|
+
firebaseAppId: "Test string",
|
|
879
|
+
iosBundleId: "Test string",
|
|
880
|
+
projectNumber: "Test string",
|
|
881
|
+
returnDynamicLink: true,
|
|
882
|
+
sha1Cert: "Test string",
|
|
883
|
+
});
|
|
884
|
+
/** Retrieves public keys of the legacy Identity Toolkit token signer to enable third parties to verify the legacy ID token. For now the X509 pem cert is the only format supported. */
|
|
885
|
+
await gapi.client.identitytoolkit.v1.getPublicKeys({
|
|
886
|
+
});
|
|
887
|
+
/** Gets parameters needed for generating a reCAPTCHA challenge. */
|
|
888
|
+
await gapi.client.identitytoolkit.v1.getRecaptchaParams({
|
|
889
|
+
});
|
|
890
|
+
/** Retrieves the set of public keys of the session cookie JSON Web Token (JWT) signer that can be used to validate the session cookie created through createSessionCookie. */
|
|
891
|
+
await gapi.client.identitytoolkit.v1.getSessionCookiePublicKeys({
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
});
|