Skip to content

Commit

Permalink
feat(people): update the API
Browse files Browse the repository at this point in the history
#### people:v1
The following keys were added:
- auth.oauth2.scopes.https://www.googleapis.com/auth/contacts.other.readonly.description
- resources.otherContacts.methods.list.scopes

The following keys were changed:
- resources.otherContacts.methods.copyOtherContactToMyContactsGroup.description
- resources.otherContacts.methods.copyOtherContactToMyContactsGroup.parameters.resourceName.description
- resources.otherContacts.methods.copyOtherContactToMyContactsGroup.scopes
- resources.otherContacts.methods.list.description
- resources.otherContacts.methods.list.parameters.pageSize.description
- schemas.CopyOtherContactToMyContactsGroupRequest.description
- schemas.ListOtherContactsResponse.description
- schemas.ListOtherContactsResponse.properties.otherContacts.description
- schemas.Source.properties.type.enumDescriptions
  • Loading branch information
yoshi-automation authored and JustinBeckwith committed Jul 10, 2020
1 parent fef4e3d commit 3b82224
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 25 deletions.
31 changes: 19 additions & 12 deletions discovery/people-v1.json
Expand Up @@ -5,6 +5,9 @@
"https://www.googleapis.com/auth/contacts": {
"description": "See, edit, download, and permanently delete your contacts"
},
"https://www.googleapis.com/auth/contacts.other.readonly": {
"description": "See and download contact info automatically saved in your \"Other contacts\""
},
"https://www.googleapis.com/auth/contacts.readonly": {
"description": "See and download your contacts"
},
Expand Down Expand Up @@ -345,7 +348,7 @@
"otherContacts": {
"methods": {
"copyOtherContactToMyContactsGroup": {
"description": "Copies an other contact to a new contact in the user's MY_CONTACTS group",
"description": "Copies an \"Other contact\" to a new contact in the user's \"myContacts\" group",
"flatPath": "v1/otherContacts/{otherContactsId}:copyOtherContactToMyContactsGroup",
"httpMethod": "POST",
"id": "people.otherContacts.copyOtherContactToMyContactsGroup",
Expand All @@ -354,7 +357,7 @@
],
"parameters": {
"resourceName": {
"description": "Required. The resource name of the other contact to copy.",
"description": "Required. The resource name of the \"Other contact\" to copy.",
"location": "path",
"pattern": "^otherContacts/[^/]+$",
"required": true,
Expand All @@ -369,18 +372,19 @@
"$ref": "Person"
},
"scopes": [
"https://www.googleapis.com/auth/contacts"
"https://www.googleapis.com/auth/contacts",
"https://www.googleapis.com/auth/contacts.other.readonly"
]
},
"list": {
"description": "List all other contacts, that is contacts that are not in a contact group.\nOther contacts are typically auto created contacts from interactions.",
"description": "List all \"Other contacts\", that is contacts that are not in a contact\ngroup. \"Other contacts\" are typically auto created contacts from\ninteractions.",
"flatPath": "v1/otherContacts",
"httpMethod": "GET",
"id": "people.otherContacts.list",
"parameterOrder": [],
"parameters": {
"pageSize": {
"description": "Optional. The number of other contacts to include in the response. Valid values are\nbetween 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.",
"description": "Optional. The number of \"Other contacts\" to include in the response. Valid values are\nbetween 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.",
"format": "int32",
"location": "query",
"type": "integer"
Expand Down Expand Up @@ -410,7 +414,10 @@
"path": "v1/otherContacts",
"response": {
"$ref": "ListOtherContactsResponse"
}
},
"scopes": [
"https://www.googleapis.com/auth/contacts.other.readonly"
]
}
}
},
Expand Down Expand Up @@ -930,7 +937,7 @@
}
}
},
"revision": "20200609",
"revision": "20200708",
"rootUrl": "https://people.googleapis.com/",
"schemas": {
"Address": {
Expand Down Expand Up @@ -1196,7 +1203,7 @@
"type": "object"
},
"CopyOtherContactToMyContactsGroupRequest": {
"description": "A request to copy an other contact to my contacts group.",
"description": "A request to copy an \"Other contact\" to my contacts group.",
"id": "CopyOtherContactToMyContactsGroupRequest",
"properties": {
"copyMask": {
Expand Down Expand Up @@ -1560,7 +1567,7 @@
"type": "object"
},
"ListOtherContactsResponse": {
"description": "The response to a request for the authenticated user's other contacts.",
"description": "The response to a request for the authenticated user's \"Other contacts\".",
"id": "ListOtherContactsResponse",
"properties": {
"nextPageToken": {
Expand All @@ -1572,7 +1579,7 @@
"type": "string"
},
"otherContacts": {
"description": "The list of other contacts returned as Person resources. Other contacts\nsupport a limited subset of supported fields. See\nListOtherContactsRequest.request_mask for more detailed information.",
"description": "The list of \"Other contacts\" returned as Person resources. \"Other contacts\"\nsupport a limited subset of fields. See\nListOtherContactsRequest.request_mask for more detailed information.",
"items": {
"$ref": "Person"
},
Expand Down Expand Up @@ -2407,8 +2414,8 @@
"[Google profile](https://profiles.google.com). You can view the\nprofile at\n[https://profiles.google.com/](https://profiles.google.com/){id}, where\n{id} is the source id.",
"[G Suite domain profile](https://support.google.com/a/answer/1628008).",
"[Google contact](https://contacts.google.com). You can view the\ncontact at\n[https://contact.google.com/](https://contact.google.com/){id}, where\n{id} is the source id.",
"[Google contact](https://contacts.google.com). You can view these kinds\nof contacts under the 'Other contacts' tab.",
"[G Suite shared domain\ncontact](https://support.google.com/a/answer/9281635)."
"[Google \"Other contact\"](https://contacts.google.com/other).",
"[G Suite domain shared\ncontact](https://support.google.com/a/answer/9281635)."
],
"type": "string"
},
Expand Down
29 changes: 16 additions & 13 deletions src/apis/people/v1.ts
Expand Up @@ -334,7 +334,7 @@ export namespace people_v1 {
status?: Schema$Status;
}
/**
* A request to copy an other contact to my contacts group.
* A request to copy an "Other contact" to my contacts group.
*/
export interface Schema$CopyOtherContactToMyContactsGroupRequest {
/**
Expand Down Expand Up @@ -627,7 +627,7 @@ export namespace people_v1 {
people?: Schema$Person[];
}
/**
* The response to a request for the authenticated user's other contacts.
* The response to a request for the authenticated user's "Other contacts".
*/
export interface Schema$ListOtherContactsResponse {
/**
Expand All @@ -639,7 +639,7 @@ export namespace people_v1 {
*/
nextSyncToken?: string | null;
/**
* The list of other contacts returned as Person resources. Other contacts support a limited subset of supported fields. See ListOtherContactsRequest.request_mask for more detailed information.
* The list of "Other contacts" returned as Person resources. "Other contacts" support a limited subset of fields. See ListOtherContactsRequest.request_mask for more detailed information.
*/
otherContacts?: Schema$Person[];
}
Expand Down Expand Up @@ -2464,7 +2464,7 @@ export namespace people_v1 {

/**
* people.otherContacts.copyOtherContactToMyContactsGroup
* @desc Copies an other contact to a new contact in the user's MY_CONTACTS group
* @desc Copies an "Other contact" to a new contact in the user's "myContacts" group
* @example
* // Before running the sample:
* // - Enable the API at:
Expand All @@ -2480,7 +2480,10 @@ export namespace people_v1 {
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: ['https://www.googleapis.com/auth/contacts'],
* scopes: [
* 'https://www.googleapis.com/auth/contacts',
* 'https://www.googleapis.com/auth/contacts.other.readonly',
* ],
* });
*
* // Acquire an auth client, and bind it to all future calls
Expand All @@ -2489,7 +2492,7 @@ export namespace people_v1 {
*
* // Do the magic
* const res = await people.otherContacts.copyOtherContactToMyContactsGroup({
* // Required. The resource name of the other contact to copy.
* // Required. The resource name of the "Other contact" to copy.
* resourceName: 'otherContacts/my-otherContact',
*
* // Request body metadata
Expand Down Expand Up @@ -2551,7 +2554,7 @@ export namespace people_v1 {
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {string} params.resourceName Required. The resource name of the other contact to copy.
* @param {string} params.resourceName Required. The resource name of the "Other contact" to copy.
* @param {().CopyOtherContactToMyContactsGroupRequest} params.requestBody Request body data
* @param {object} [options] Optionally override request options, such as `url`, `method`, and `encoding`.
* @param {callback} callback The callback that handles the response.
Expand Down Expand Up @@ -2639,7 +2642,7 @@ export namespace people_v1 {

/**
* people.otherContacts.list
* @desc List all other contacts, that is contacts that are not in a contact group. Other contacts are typically auto created contacts from interactions.
* @desc List all "Other contacts", that is contacts that are not in a contact group. "Other contacts" are typically auto created contacts from interactions.
* @example
* // Before running the sample:
* // - Enable the API at:
Expand All @@ -2655,7 +2658,7 @@ export namespace people_v1 {
* async function main() {
* const auth = new google.auth.GoogleAuth({
* // Scopes can be specified either as an array or as a single, space-delimited string.
* scopes: [],
* scopes: ['https://www.googleapis.com/auth/contacts.other.readonly'],
* });
*
* // Acquire an auth client, and bind it to all future calls
Expand All @@ -2664,7 +2667,7 @@ export namespace people_v1 {
*
* // Do the magic
* const res = await people.otherContacts.list({
* // Optional. The number of other contacts to include in the response. Valid values are
* // Optional. The number of "Other contacts" to include in the response. Valid values are
* // between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.
* pageSize: 'placeholder-value',
* // Optional. A page token, received from a previous `ListOtherContacts` call.
Expand Down Expand Up @@ -2712,7 +2715,7 @@ export namespace people_v1 {
* @memberOf! ()
*
* @param {object} params Parameters for request
* @param {integer=} params.pageSize Optional. The number of other contacts to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.
* @param {integer=} params.pageSize Optional. The number of "Other contacts" to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.
* @param {string=} params.pageToken Optional. A page token, received from a previous `ListOtherContacts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListOtherContacts` must match the call that provided the page token.
* @param {string=} params.readMask Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * emailAddresses * names * phoneNumbers
* @param {boolean=} params.requestSyncToken Optional. Whether the response should include `next_sync_token`, which can be used to get all changes since the last request. For subsequent sync requests use the `sync_token` param instead. Initial sync requests that specify `request_sync_token` have an additional rate limit.
Expand Down Expand Up @@ -2808,7 +2811,7 @@ export namespace people_v1 {
export interface Params$Resource$Othercontacts$Copyothercontacttomycontactsgroup
extends StandardParameters {
/**
* Required. The resource name of the other contact to copy.
* Required. The resource name of the "Other contact" to copy.
*/
resourceName?: string;

Expand All @@ -2820,7 +2823,7 @@ export namespace people_v1 {
export interface Params$Resource$Othercontacts$List
extends StandardParameters {
/**
* Optional. The number of other contacts to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.
* Optional. The number of "Other contacts" to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.
*/
pageSize?: number;
/**
Expand Down

0 comments on commit 3b82224

Please sign in to comment.