mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [gapi.client.people] Update Google People API Fixes #43219 * [gapi.client.people] Revert tslint.json changes
1664 lines
67 KiB
TypeScript
1664 lines
67 KiB
TypeScript
/* This is stub file for gapi.client.people definition tests */
|
|
/* IMPORTANT.
|
|
* This file was automatically generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
* In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
**/
|
|
gapi.load('client', () => {
|
|
/** now we can use gapi.client */
|
|
gapi.client.load('people', 'v1', () => {
|
|
/** now we can use gapi.client.people */
|
|
|
|
/** don't forget to authenticate your client before sending any request to resources: */
|
|
/** declare client_id registered in Google Developers Console */
|
|
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
const scope = [
|
|
/** See, edit, download, and permanently delete your contacts */
|
|
'https://www.googleapis.com/auth/contacts',
|
|
/** See and download your contacts */
|
|
'https://www.googleapis.com/auth/contacts.readonly',
|
|
/** View your street addresses */
|
|
'https://www.googleapis.com/auth/user.addresses.read',
|
|
/** View your complete date of birth */
|
|
'https://www.googleapis.com/auth/user.birthday.read',
|
|
/** View your email addresses */
|
|
'https://www.googleapis.com/auth/user.emails.read',
|
|
/** See your education, work history and org info */
|
|
'https://www.googleapis.com/auth/user.organization.read',
|
|
/** View your phone numbers */
|
|
'https://www.googleapis.com/auth/user.phonenumbers.read',
|
|
/** View your email address */
|
|
'https://www.googleapis.com/auth/userinfo.email',
|
|
/** See your personal info, including any personal info you've made publicly available */
|
|
'https://www.googleapis.com/auth/userinfo.profile',
|
|
];
|
|
const immediate = false;
|
|
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
if (authResult && !authResult.error) {
|
|
/** handle successful authorization */
|
|
run();
|
|
} else {
|
|
/** handle authorization error */
|
|
}
|
|
});
|
|
});
|
|
|
|
async function run() {
|
|
/**
|
|
* Get a list of contact groups owned by the authenticated user by specifying
|
|
* a list of contact group resource names.
|
|
*/
|
|
await gapi.client.people.contactGroups.batchGet({
|
|
maxMembers: 42,
|
|
resourceNames: "Test string",
|
|
});
|
|
/**
|
|
* Modify the members of a contact group owned by the authenticated user.
|
|
*
|
|
* The only system contact groups that can have members added are
|
|
* `contactGroups/myContacts` and `contactGroups/starred`. Other system
|
|
* contact groups are deprecated and can only have contacts removed.
|
|
*/
|
|
await gapi.client.people.contactGroups.members.modify({
|
|
resourceName: "Test string",
|
|
}, {
|
|
resourceNamesToAdd: [
|
|
"Test string" ],
|
|
resourceNamesToRemove: [
|
|
"Test string" ],
|
|
});
|
|
/** Create a new contact group owned by the authenticated user. */
|
|
await gapi.client.people.contactGroups.create({
|
|
}, {
|
|
contactGroup: {
|
|
etag: "Test string",
|
|
formattedName: "Test string",
|
|
groupType: "Test string",
|
|
memberCount: 42,
|
|
memberResourceNames: [
|
|
"Test string" ],
|
|
metadata: {
|
|
deleted: true,
|
|
updateTime: "Test string",
|
|
},
|
|
name: "Test string",
|
|
resourceName: "Test string",
|
|
},
|
|
});
|
|
/**
|
|
* Modify the members of a contact group owned by the authenticated user.
|
|
*
|
|
* The only system contact groups that can have members added are
|
|
* `contactGroups/myContacts` and `contactGroups/starred`. Other system
|
|
* contact groups are deprecated and can only have contacts removed.
|
|
*/
|
|
await gapi.client.people.contactGroups.members.modify({
|
|
resourceName: "Test string",
|
|
}, {
|
|
resourceNamesToAdd: [
|
|
"Test string" ],
|
|
resourceNamesToRemove: [
|
|
"Test string" ],
|
|
});
|
|
/**
|
|
* Delete an existing contact group owned by the authenticated user by
|
|
* specifying a contact group resource name.
|
|
*/
|
|
await gapi.client.people.contactGroups.delete({
|
|
deleteContacts: true,
|
|
resourceName: "Test string",
|
|
});
|
|
/**
|
|
* Modify the members of a contact group owned by the authenticated user.
|
|
*
|
|
* The only system contact groups that can have members added are
|
|
* `contactGroups/myContacts` and `contactGroups/starred`. Other system
|
|
* contact groups are deprecated and can only have contacts removed.
|
|
*/
|
|
await gapi.client.people.contactGroups.members.modify({
|
|
resourceName: "Test string",
|
|
}, {
|
|
resourceNamesToAdd: [
|
|
"Test string" ],
|
|
resourceNamesToRemove: [
|
|
"Test string" ],
|
|
});
|
|
/**
|
|
* Get a specific contact group owned by the authenticated user by specifying
|
|
* a contact group resource name.
|
|
*/
|
|
await gapi.client.people.contactGroups.get({
|
|
maxMembers: 42,
|
|
resourceName: "Test string",
|
|
});
|
|
/**
|
|
* Modify the members of a contact group owned by the authenticated user.
|
|
*
|
|
* The only system contact groups that can have members added are
|
|
* `contactGroups/myContacts` and `contactGroups/starred`. Other system
|
|
* contact groups are deprecated and can only have contacts removed.
|
|
*/
|
|
await gapi.client.people.contactGroups.members.modify({
|
|
resourceName: "Test string",
|
|
}, {
|
|
resourceNamesToAdd: [
|
|
"Test string" ],
|
|
resourceNamesToRemove: [
|
|
"Test string" ],
|
|
});
|
|
/**
|
|
* List all contact groups owned by the authenticated user. Members of the
|
|
* contact groups are not populated.
|
|
*/
|
|
await gapi.client.people.contactGroups.list({
|
|
pageSize: 42,
|
|
pageToken: "Test string",
|
|
syncToken: "Test string",
|
|
});
|
|
/**
|
|
* Modify the members of a contact group owned by the authenticated user.
|
|
*
|
|
* The only system contact groups that can have members added are
|
|
* `contactGroups/myContacts` and `contactGroups/starred`. Other system
|
|
* contact groups are deprecated and can only have contacts removed.
|
|
*/
|
|
await gapi.client.people.contactGroups.members.modify({
|
|
resourceName: "Test string",
|
|
}, {
|
|
resourceNamesToAdd: [
|
|
"Test string" ],
|
|
resourceNamesToRemove: [
|
|
"Test string" ],
|
|
});
|
|
/**
|
|
* Update the name of an existing contact group owned by the authenticated
|
|
* user.
|
|
*/
|
|
await gapi.client.people.contactGroups.update({
|
|
resourceName: "Test string",
|
|
}, {
|
|
contactGroup: {
|
|
etag: "Test string",
|
|
formattedName: "Test string",
|
|
groupType: "Test string",
|
|
memberCount: 42,
|
|
memberResourceNames: [
|
|
"Test string" ],
|
|
metadata: {
|
|
deleted: true,
|
|
updateTime: "Test string",
|
|
},
|
|
name: "Test string",
|
|
resourceName: "Test string",
|
|
},
|
|
});
|
|
/**
|
|
* Modify the members of a contact group owned by the authenticated user.
|
|
*
|
|
* The only system contact groups that can have members added are
|
|
* `contactGroups/myContacts` and `contactGroups/starred`. Other system
|
|
* contact groups are deprecated and can only have contacts removed.
|
|
*/
|
|
await gapi.client.people.contactGroups.members.modify({
|
|
resourceName: "Test string",
|
|
}, {
|
|
resourceNamesToAdd: [
|
|
"Test string" ],
|
|
resourceNamesToRemove: [
|
|
"Test string" ],
|
|
});
|
|
/** Create a new contact and return the person resource for that contact. */
|
|
await gapi.client.people.people.createContact({
|
|
}, {
|
|
addresses: [
|
|
{
|
|
city: "Test string",
|
|
country: "Test string",
|
|
countryCode: "Test string",
|
|
extendedAddress: "Test string",
|
|
formattedType: "Test string",
|
|
formattedValue: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
poBox: "Test string",
|
|
postalCode: "Test string",
|
|
region: "Test string",
|
|
streetAddress: "Test string",
|
|
type: "Test string",
|
|
} ],
|
|
ageRange: "Test string",
|
|
ageRanges: [
|
|
{
|
|
ageRange: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
} ],
|
|
biographies: [
|
|
{
|
|
contentType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
birthdays: [
|
|
{
|
|
date: {
|
|
day: 42,
|
|
month: 42,
|
|
year: 42,
|
|
},
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
text: "Test string",
|
|
} ],
|
|
braggingRights: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
coverPhotos: [
|
|
{
|
|
default: true,
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
url: "Test string",
|
|
} ],
|
|
emailAddresses: [
|
|
{
|
|
displayName: "Test string",
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
value: "Test string",
|
|
} ],
|
|
etag: "Test string",
|
|
events: [
|
|
{
|
|
date: {
|
|
day: 42,
|
|
month: 42,
|
|
year: 42,
|
|
},
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
} ],
|
|
genders: [
|
|
{
|
|
formattedValue: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
imClients: [
|
|
{
|
|
formattedProtocol: "Test string",
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
protocol: "Test string",
|
|
type: "Test string",
|
|
username: "Test string",
|
|
} ],
|
|
interests: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
locales: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
memberships: [
|
|
{
|
|
contactGroupMembership: {
|
|
contactGroupId: "Test string",
|
|
contactGroupResourceName: "Test string",
|
|
},
|
|
domainMembership: {
|
|
inViewerDomain: true,
|
|
},
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
} ],
|
|
metadata: {
|
|
deleted: true,
|
|
linkedPeopleResourceNames: [
|
|
"Test string" ],
|
|
objectType: "Test string",
|
|
previousResourceNames: [
|
|
"Test string" ],
|
|
sources: [
|
|
{
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
} ],
|
|
},
|
|
names: [
|
|
{
|
|
displayName: "Test string",
|
|
displayNameLastFirst: "Test string",
|
|
familyName: "Test string",
|
|
givenName: "Test string",
|
|
honorificPrefix: "Test string",
|
|
honorificSuffix: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
middleName: "Test string",
|
|
phoneticFamilyName: "Test string",
|
|
phoneticFullName: "Test string",
|
|
phoneticGivenName: "Test string",
|
|
phoneticHonorificPrefix: "Test string",
|
|
phoneticHonorificSuffix: "Test string",
|
|
phoneticMiddleName: "Test string",
|
|
} ],
|
|
nicknames: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
value: "Test string",
|
|
} ],
|
|
occupations: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
organizations: [
|
|
{
|
|
current: true,
|
|
department: "Test string",
|
|
domain: "Test string",
|
|
endDate: {
|
|
day: 42,
|
|
month: 42,
|
|
year: 42,
|
|
},
|
|
formattedType: "Test string",
|
|
jobDescription: "Test string",
|
|
location: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
name: "Test string",
|
|
phoneticName: "Test string",
|
|
startDate: {
|
|
day: 42,
|
|
month: 42,
|
|
year: 42,
|
|
},
|
|
symbol: "Test string",
|
|
title: "Test string",
|
|
type: "Test string",
|
|
} ],
|
|
phoneNumbers: [
|
|
{
|
|
canonicalForm: "Test string",
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
value: "Test string",
|
|
} ],
|
|
photos: [
|
|
{
|
|
default: true,
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
url: "Test string",
|
|
} ],
|
|
relations: [
|
|
{
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
person: "Test string",
|
|
type: "Test string",
|
|
} ],
|
|
relationshipInterests: [
|
|
{
|
|
formattedValue: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
relationshipStatuses: [
|
|
{
|
|
formattedValue: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
residences: [
|
|
{
|
|
current: true,
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
resourceName: "Test string",
|
|
sipAddresses: [
|
|
{
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
value: "Test string",
|
|
} ],
|
|
skills: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
taglines: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
urls: [
|
|
{
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
value: "Test string",
|
|
} ],
|
|
userDefined: [
|
|
{
|
|
key: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
});
|
|
/**
|
|
* Provides a list of the authenticated user's contacts merged with any
|
|
* connected profiles.
|
|
*
|
|
* The request throws a 400 error if 'personFields' is not specified.
|
|
*/
|
|
await gapi.client.people.people.connections.list({
|
|
pageSize: 42,
|
|
pageToken: "Test string",
|
|
personFields: "Test string",
|
|
"requestMask.includeField": "Test string",
|
|
requestSyncToken: true,
|
|
resourceName: "Test string",
|
|
sortOrder: "Test string",
|
|
syncToken: "Test string",
|
|
});
|
|
/** Delete a contact person. Any non-contact data will not be deleted. */
|
|
await gapi.client.people.people.deleteContact({
|
|
resourceName: "Test string",
|
|
});
|
|
/**
|
|
* Provides a list of the authenticated user's contacts merged with any
|
|
* connected profiles.
|
|
*
|
|
* The request throws a 400 error if 'personFields' is not specified.
|
|
*/
|
|
await gapi.client.people.people.connections.list({
|
|
pageSize: 42,
|
|
pageToken: "Test string",
|
|
personFields: "Test string",
|
|
"requestMask.includeField": "Test string",
|
|
requestSyncToken: true,
|
|
resourceName: "Test string",
|
|
sortOrder: "Test string",
|
|
syncToken: "Test string",
|
|
});
|
|
/** Delete a contact's photo. */
|
|
await gapi.client.people.people.deleteContactPhoto({
|
|
personFields: "Test string",
|
|
resourceName: "Test string",
|
|
});
|
|
/**
|
|
* Provides a list of the authenticated user's contacts merged with any
|
|
* connected profiles.
|
|
*
|
|
* The request throws a 400 error if 'personFields' is not specified.
|
|
*/
|
|
await gapi.client.people.people.connections.list({
|
|
pageSize: 42,
|
|
pageToken: "Test string",
|
|
personFields: "Test string",
|
|
"requestMask.includeField": "Test string",
|
|
requestSyncToken: true,
|
|
resourceName: "Test string",
|
|
sortOrder: "Test string",
|
|
syncToken: "Test string",
|
|
});
|
|
/**
|
|
* Provides information about a person by specifying a resource name. Use
|
|
* `people/me` to indicate the authenticated user.
|
|
*
|
|
* The request throws a 400 error if 'personFields' is not specified.
|
|
*/
|
|
await gapi.client.people.people.get({
|
|
personFields: "Test string",
|
|
"requestMask.includeField": "Test string",
|
|
resourceName: "Test string",
|
|
});
|
|
/**
|
|
* Provides a list of the authenticated user's contacts merged with any
|
|
* connected profiles.
|
|
*
|
|
* The request throws a 400 error if 'personFields' is not specified.
|
|
*/
|
|
await gapi.client.people.people.connections.list({
|
|
pageSize: 42,
|
|
pageToken: "Test string",
|
|
personFields: "Test string",
|
|
"requestMask.includeField": "Test string",
|
|
requestSyncToken: true,
|
|
resourceName: "Test string",
|
|
sortOrder: "Test string",
|
|
syncToken: "Test string",
|
|
});
|
|
/**
|
|
* Provides information about a list of specific people by specifying a list
|
|
* of requested resource names. Use `people/me` to indicate the authenticated
|
|
* user.
|
|
*
|
|
* The request throws a 400 error if 'personFields' is not specified.
|
|
*/
|
|
await gapi.client.people.people.getBatchGet({
|
|
personFields: "Test string",
|
|
"requestMask.includeField": "Test string",
|
|
resourceNames: "Test string",
|
|
});
|
|
/**
|
|
* Provides a list of the authenticated user's contacts merged with any
|
|
* connected profiles.
|
|
*
|
|
* The request throws a 400 error if 'personFields' is not specified.
|
|
*/
|
|
await gapi.client.people.people.connections.list({
|
|
pageSize: 42,
|
|
pageToken: "Test string",
|
|
personFields: "Test string",
|
|
"requestMask.includeField": "Test string",
|
|
requestSyncToken: true,
|
|
resourceName: "Test string",
|
|
sortOrder: "Test string",
|
|
syncToken: "Test string",
|
|
});
|
|
/**
|
|
* Update contact data for an existing contact person. Any non-contact data
|
|
* will not be modified.
|
|
*
|
|
* The request throws a 400 error if `updatePersonFields` is not specified.
|
|
*
|
|
* The request throws a 400 error if `person.metadata.sources` is not
|
|
* specified for the contact to be updated.
|
|
*
|
|
* The request throws a 400 error with an error with reason
|
|
* `"failedPrecondition"` if `person.metadata.sources.etag` is different than
|
|
* the contact's etag, which indicates the contact has changed since its data
|
|
* was read. Clients should get the latest person and re-apply their updates
|
|
* to the latest person.
|
|
*/
|
|
await gapi.client.people.people.updateContact({
|
|
resourceName: "Test string",
|
|
updatePersonFields: "Test string",
|
|
}, {
|
|
addresses: [
|
|
{
|
|
city: "Test string",
|
|
country: "Test string",
|
|
countryCode: "Test string",
|
|
extendedAddress: "Test string",
|
|
formattedType: "Test string",
|
|
formattedValue: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
poBox: "Test string",
|
|
postalCode: "Test string",
|
|
region: "Test string",
|
|
streetAddress: "Test string",
|
|
type: "Test string",
|
|
} ],
|
|
ageRange: "Test string",
|
|
ageRanges: [
|
|
{
|
|
ageRange: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
} ],
|
|
biographies: [
|
|
{
|
|
contentType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
birthdays: [
|
|
{
|
|
date: {
|
|
day: 42,
|
|
month: 42,
|
|
year: 42,
|
|
},
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
text: "Test string",
|
|
} ],
|
|
braggingRights: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
coverPhotos: [
|
|
{
|
|
default: true,
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
url: "Test string",
|
|
} ],
|
|
emailAddresses: [
|
|
{
|
|
displayName: "Test string",
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
value: "Test string",
|
|
} ],
|
|
etag: "Test string",
|
|
events: [
|
|
{
|
|
date: {
|
|
day: 42,
|
|
month: 42,
|
|
year: 42,
|
|
},
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
} ],
|
|
genders: [
|
|
{
|
|
formattedValue: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
imClients: [
|
|
{
|
|
formattedProtocol: "Test string",
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
protocol: "Test string",
|
|
type: "Test string",
|
|
username: "Test string",
|
|
} ],
|
|
interests: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
locales: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
memberships: [
|
|
{
|
|
contactGroupMembership: {
|
|
contactGroupId: "Test string",
|
|
contactGroupResourceName: "Test string",
|
|
},
|
|
domainMembership: {
|
|
inViewerDomain: true,
|
|
},
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
} ],
|
|
metadata: {
|
|
deleted: true,
|
|
linkedPeopleResourceNames: [
|
|
"Test string" ],
|
|
objectType: "Test string",
|
|
previousResourceNames: [
|
|
"Test string" ],
|
|
sources: [
|
|
{
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
} ],
|
|
},
|
|
names: [
|
|
{
|
|
displayName: "Test string",
|
|
displayNameLastFirst: "Test string",
|
|
familyName: "Test string",
|
|
givenName: "Test string",
|
|
honorificPrefix: "Test string",
|
|
honorificSuffix: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
middleName: "Test string",
|
|
phoneticFamilyName: "Test string",
|
|
phoneticFullName: "Test string",
|
|
phoneticGivenName: "Test string",
|
|
phoneticHonorificPrefix: "Test string",
|
|
phoneticHonorificSuffix: "Test string",
|
|
phoneticMiddleName: "Test string",
|
|
} ],
|
|
nicknames: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
value: "Test string",
|
|
} ],
|
|
occupations: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
organizations: [
|
|
{
|
|
current: true,
|
|
department: "Test string",
|
|
domain: "Test string",
|
|
endDate: {
|
|
day: 42,
|
|
month: 42,
|
|
year: 42,
|
|
},
|
|
formattedType: "Test string",
|
|
jobDescription: "Test string",
|
|
location: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
name: "Test string",
|
|
phoneticName: "Test string",
|
|
startDate: {
|
|
day: 42,
|
|
month: 42,
|
|
year: 42,
|
|
},
|
|
symbol: "Test string",
|
|
title: "Test string",
|
|
type: "Test string",
|
|
} ],
|
|
phoneNumbers: [
|
|
{
|
|
canonicalForm: "Test string",
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
value: "Test string",
|
|
} ],
|
|
photos: [
|
|
{
|
|
default: true,
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
url: "Test string",
|
|
} ],
|
|
relations: [
|
|
{
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
person: "Test string",
|
|
type: "Test string",
|
|
} ],
|
|
relationshipInterests: [
|
|
{
|
|
formattedValue: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
relationshipStatuses: [
|
|
{
|
|
formattedValue: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
residences: [
|
|
{
|
|
current: true,
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
resourceName: "Test string",
|
|
sipAddresses: [
|
|
{
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
value: "Test string",
|
|
} ],
|
|
skills: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
taglines: [
|
|
{
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
urls: [
|
|
{
|
|
formattedType: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
type: "Test string",
|
|
value: "Test string",
|
|
} ],
|
|
userDefined: [
|
|
{
|
|
key: "Test string",
|
|
metadata: {
|
|
primary: true,
|
|
source: {
|
|
etag: "Test string",
|
|
id: "Test string",
|
|
profileMetadata: {
|
|
objectType: "Test string",
|
|
userTypes: [
|
|
"Test string" ],
|
|
},
|
|
type: "Test string",
|
|
updateTime: "Test string",
|
|
},
|
|
verified: true,
|
|
},
|
|
value: "Test string",
|
|
} ],
|
|
});
|
|
/**
|
|
* Provides a list of the authenticated user's contacts merged with any
|
|
* connected profiles.
|
|
*
|
|
* The request throws a 400 error if 'personFields' is not specified.
|
|
*/
|
|
await gapi.client.people.people.connections.list({
|
|
pageSize: 42,
|
|
pageToken: "Test string",
|
|
personFields: "Test string",
|
|
"requestMask.includeField": "Test string",
|
|
requestSyncToken: true,
|
|
resourceName: "Test string",
|
|
sortOrder: "Test string",
|
|
syncToken: "Test string",
|
|
});
|
|
/** Update a contact's photo. */
|
|
await gapi.client.people.people.updateContactPhoto({
|
|
resourceName: "Test string",
|
|
}, {
|
|
personFields: "Test string",
|
|
photoBytes: "Test string",
|
|
});
|
|
/**
|
|
* Provides a list of the authenticated user's contacts merged with any
|
|
* connected profiles.
|
|
*
|
|
* The request throws a 400 error if 'personFields' is not specified.
|
|
*/
|
|
await gapi.client.people.people.connections.list({
|
|
pageSize: 42,
|
|
pageToken: "Test string",
|
|
personFields: "Test string",
|
|
"requestMask.includeField": "Test string",
|
|
requestSyncToken: true,
|
|
resourceName: "Test string",
|
|
sortOrder: "Test string",
|
|
syncToken: "Test string",
|
|
});
|
|
}
|
|
});
|