@google-apps/chat 0.23.0 → 0.24.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/README.md +8 -0
- package/build/protos/google/chat/v1/action_status.proto +1 -1
- package/build/protos/google/chat/v1/annotation.proto +1 -1
- package/build/protos/google/chat/v1/attachment.proto +1 -1
- package/build/protos/google/chat/v1/chat_service.proto +178 -12
- package/build/protos/google/chat/v1/contextual_addon.proto +1 -1
- package/build/protos/google/chat/v1/deletion_metadata.proto +1 -1
- package/build/protos/google/chat/v1/event_payload.proto +1 -1
- package/build/protos/google/chat/v1/group.proto +1 -1
- package/build/protos/google/chat/v1/history_state.proto +1 -1
- package/build/protos/google/chat/v1/matched_url.proto +1 -1
- package/build/protos/google/chat/v1/membership.proto +1 -1
- package/build/protos/google/chat/v1/message.proto +41 -0
- package/build/protos/google/chat/v1/reaction.proto +1 -1
- package/build/protos/google/chat/v1/section.proto +344 -0
- package/build/protos/google/chat/v1/slash_command.proto +1 -1
- package/build/protos/google/chat/v1/space.proto +81 -1
- package/build/protos/google/chat/v1/space_event.proto +1 -1
- package/build/protos/google/chat/v1/space_notification_setting.proto +1 -1
- package/build/protos/google/chat/v1/space_read_state.proto +1 -1
- package/build/protos/google/chat/v1/space_setup.proto +1 -1
- package/build/protos/google/chat/v1/thread_read_state.proto +1 -1
- package/build/protos/google/chat/v1/user.proto +1 -1
- package/build/protos/google/chat/v1/widgets.proto +1 -1
- package/build/protos/protos.d.ts +1982 -85
- package/build/protos/protos.js +5081 -693
- package/build/protos/protos.json +520 -2
- package/build/src/v1/chat_service_client.d.ts +797 -11
- package/build/src/v1/chat_service_client.js +744 -2
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +40 -0
- package/build/src/v1/chat_service_proto_list.json +1 -0
- package/build/src/v1/gapic_metadata.json +92 -0
- package/package.json +10 -2
|
@@ -207,6 +207,10 @@ export declare class ChatServiceClient {
|
|
|
207
207
|
*
|
|
208
208
|
* For details, see [Name a
|
|
209
209
|
* message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message).
|
|
210
|
+
* @param {google.chat.v1.CreateMessageNotificationOptions} [request.createMessageNotificationOptions]
|
|
211
|
+
* Optional. Controls the notification behavior when the message is posted.
|
|
212
|
+
* To learn more, see [Force notifications or send silent
|
|
213
|
+
* messages](https://developer.google.com/workspace/chat/create-messages#force-notify-silent).
|
|
210
214
|
* @param {object} [options]
|
|
211
215
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
212
216
|
* @returns {Promise} - The promise which resolves to an array.
|
|
@@ -310,8 +314,7 @@ export declare class ChatServiceClient {
|
|
|
310
314
|
* that invoke the Chat app.
|
|
311
315
|
* - `https://www.googleapis.com/auth/chat.app.messages.readonly`
|
|
312
316
|
* with [administrator
|
|
313
|
-
* approval](https://support.google.com/a?p=chat-app-auth)
|
|
314
|
-
* [Developer Preview](https://developers.google.com/workspace/preview)).
|
|
317
|
+
* approval](https://support.google.com/a?p=chat-app-auth).
|
|
315
318
|
* When using this authentication scope,
|
|
316
319
|
* this method returns details about a public message in a space.
|
|
317
320
|
*
|
|
@@ -1786,12 +1789,13 @@ export declare class ChatServiceClient {
|
|
|
1786
1789
|
* - [App
|
|
1787
1790
|
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
1788
1791
|
* with [administrator
|
|
1789
|
-
* approval](https://support.google.com/a?p=chat-app-auth)
|
|
1790
|
-
*
|
|
1791
|
-
* with one of the following authorization scopes:
|
|
1792
|
+
* approval](https://support.google.com/a?p=chat-app-auth)
|
|
1793
|
+
* with one of the following authorization scopes:
|
|
1792
1794
|
* - `https://www.googleapis.com/auth/chat.app.spaces`
|
|
1795
|
+
* - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
|
|
1793
1796
|
* - `https://www.googleapis.com/auth/chat.app.messages.readonly`
|
|
1794
1797
|
* - `https://www.googleapis.com/auth/chat.app.memberships`
|
|
1798
|
+
* - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
|
|
1795
1799
|
*
|
|
1796
1800
|
* - [User
|
|
1797
1801
|
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
@@ -1911,6 +1915,201 @@ export declare class ChatServiceClient {
|
|
|
1911
1915
|
]>;
|
|
1912
1916
|
updateSpaceNotificationSetting(request: protos.google.chat.v1.IUpdateSpaceNotificationSettingRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISpaceNotificationSetting, protos.google.chat.v1.IUpdateSpaceNotificationSettingRequest | null | undefined, {} | null | undefined>): void;
|
|
1913
1917
|
updateSpaceNotificationSetting(request: protos.google.chat.v1.IUpdateSpaceNotificationSettingRequest, callback: Callback<protos.google.chat.v1.ISpaceNotificationSetting, protos.google.chat.v1.IUpdateSpaceNotificationSettingRequest | null | undefined, {} | null | undefined>): void;
|
|
1918
|
+
/**
|
|
1919
|
+
* Creates a section in Google Chat. Sections help users group conversations
|
|
1920
|
+
* and customize the list of spaces displayed in Chat navigation panel. Only
|
|
1921
|
+
* sections of type `CUSTOM_SECTION` can be created. For details, see [Create
|
|
1922
|
+
* and organize sections in Google
|
|
1923
|
+
* Chat](https://support.google.com/chat/answer/16059854).
|
|
1924
|
+
*
|
|
1925
|
+
* Requires [user
|
|
1926
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1927
|
+
* with the [authorization
|
|
1928
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1929
|
+
*
|
|
1930
|
+
* - `https://www.googleapis.com/auth/chat.users.sections`
|
|
1931
|
+
*
|
|
1932
|
+
* @param {Object} request
|
|
1933
|
+
* The request object that will be sent.
|
|
1934
|
+
* @param {string} request.parent
|
|
1935
|
+
* Required. The parent resource name where the section is created.
|
|
1936
|
+
*
|
|
1937
|
+
* Format: `users/{user}`
|
|
1938
|
+
* @param {google.chat.v1.Section} request.section
|
|
1939
|
+
* Required. The section to create.
|
|
1940
|
+
* @param {object} [options]
|
|
1941
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1942
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1943
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Section|Section}.
|
|
1944
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
1945
|
+
* for more details and examples.
|
|
1946
|
+
* @example <caption>include:samples/generated/v1/chat_service.create_section.js</caption>
|
|
1947
|
+
* region_tag:chat_v1_generated_ChatService_CreateSection_async
|
|
1948
|
+
*/
|
|
1949
|
+
createSection(request?: protos.google.chat.v1.ICreateSectionRequest, options?: CallOptions): Promise<[
|
|
1950
|
+
protos.google.chat.v1.ISection,
|
|
1951
|
+
protos.google.chat.v1.ICreateSectionRequest | undefined,
|
|
1952
|
+
{} | undefined
|
|
1953
|
+
]>;
|
|
1954
|
+
createSection(request: protos.google.chat.v1.ICreateSectionRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISection, protos.google.chat.v1.ICreateSectionRequest | null | undefined, {} | null | undefined>): void;
|
|
1955
|
+
createSection(request: protos.google.chat.v1.ICreateSectionRequest, callback: Callback<protos.google.chat.v1.ISection, protos.google.chat.v1.ICreateSectionRequest | null | undefined, {} | null | undefined>): void;
|
|
1956
|
+
/**
|
|
1957
|
+
* Deletes a section of type `CUSTOM_SECTION`.
|
|
1958
|
+
*
|
|
1959
|
+
* If the section contains items, such as spaces, the items are moved to
|
|
1960
|
+
* Google Chat's default sections and are not deleted.
|
|
1961
|
+
*
|
|
1962
|
+
* For details, see [Create and organize sections in Google
|
|
1963
|
+
* Chat](https://support.google.com/chat/answer/16059854).
|
|
1964
|
+
*
|
|
1965
|
+
* Requires [user
|
|
1966
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
1967
|
+
* with the [authorization
|
|
1968
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
1969
|
+
*
|
|
1970
|
+
* - `https://www.googleapis.com/auth/chat.users.sections`
|
|
1971
|
+
*
|
|
1972
|
+
* @param {Object} request
|
|
1973
|
+
* The request object that will be sent.
|
|
1974
|
+
* @param {string} request.name
|
|
1975
|
+
* Required. The name of the section to delete.
|
|
1976
|
+
*
|
|
1977
|
+
* Format: `users/{user}/sections/{section}`
|
|
1978
|
+
* @param {object} [options]
|
|
1979
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1980
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1981
|
+
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
|
|
1982
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
1983
|
+
* for more details and examples.
|
|
1984
|
+
* @example <caption>include:samples/generated/v1/chat_service.delete_section.js</caption>
|
|
1985
|
+
* region_tag:chat_v1_generated_ChatService_DeleteSection_async
|
|
1986
|
+
*/
|
|
1987
|
+
deleteSection(request?: protos.google.chat.v1.IDeleteSectionRequest, options?: CallOptions): Promise<[
|
|
1988
|
+
protos.google.protobuf.IEmpty,
|
|
1989
|
+
protos.google.chat.v1.IDeleteSectionRequest | undefined,
|
|
1990
|
+
{} | undefined
|
|
1991
|
+
]>;
|
|
1992
|
+
deleteSection(request: protos.google.chat.v1.IDeleteSectionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteSectionRequest | null | undefined, {} | null | undefined>): void;
|
|
1993
|
+
deleteSection(request: protos.google.chat.v1.IDeleteSectionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteSectionRequest | null | undefined, {} | null | undefined>): void;
|
|
1994
|
+
/**
|
|
1995
|
+
* Updates a section. Only sections of type `CUSTOM_SECTION` can be updated.
|
|
1996
|
+
* For details, see [Create and organize sections in Google
|
|
1997
|
+
* Chat](https://support.google.com/chat/answer/16059854).
|
|
1998
|
+
*
|
|
1999
|
+
* Requires [user
|
|
2000
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
2001
|
+
* with the [authorization
|
|
2002
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
2003
|
+
*
|
|
2004
|
+
* - `https://www.googleapis.com/auth/chat.users.sections`
|
|
2005
|
+
*
|
|
2006
|
+
* @param {Object} request
|
|
2007
|
+
* The request object that will be sent.
|
|
2008
|
+
* @param {google.chat.v1.Section} request.section
|
|
2009
|
+
* Required. The section to update.
|
|
2010
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
2011
|
+
* Required. The mask to specify which fields to update.
|
|
2012
|
+
*
|
|
2013
|
+
* Currently supported field paths:
|
|
2014
|
+
*
|
|
2015
|
+
* - `display_name`
|
|
2016
|
+
* @param {object} [options]
|
|
2017
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2018
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2019
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.Section|Section}.
|
|
2020
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
2021
|
+
* for more details and examples.
|
|
2022
|
+
* @example <caption>include:samples/generated/v1/chat_service.update_section.js</caption>
|
|
2023
|
+
* region_tag:chat_v1_generated_ChatService_UpdateSection_async
|
|
2024
|
+
*/
|
|
2025
|
+
updateSection(request?: protos.google.chat.v1.IUpdateSectionRequest, options?: CallOptions): Promise<[
|
|
2026
|
+
protos.google.chat.v1.ISection,
|
|
2027
|
+
protos.google.chat.v1.IUpdateSectionRequest | undefined,
|
|
2028
|
+
{} | undefined
|
|
2029
|
+
]>;
|
|
2030
|
+
updateSection(request: protos.google.chat.v1.IUpdateSectionRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISection, protos.google.chat.v1.IUpdateSectionRequest | null | undefined, {} | null | undefined>): void;
|
|
2031
|
+
updateSection(request: protos.google.chat.v1.IUpdateSectionRequest, callback: Callback<protos.google.chat.v1.ISection, protos.google.chat.v1.IUpdateSectionRequest | null | undefined, {} | null | undefined>): void;
|
|
2032
|
+
/**
|
|
2033
|
+
* Changes the sort order of a section. For details, see [Create and organize
|
|
2034
|
+
* sections in Google Chat](https://support.google.com/chat/answer/16059854).
|
|
2035
|
+
*
|
|
2036
|
+
* Requires [user
|
|
2037
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
2038
|
+
* with the [authorization
|
|
2039
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
2040
|
+
*
|
|
2041
|
+
* - `https://www.googleapis.com/auth/chat.users.sections`
|
|
2042
|
+
*
|
|
2043
|
+
* @param {Object} request
|
|
2044
|
+
* The request object that will be sent.
|
|
2045
|
+
* @param {string} request.name
|
|
2046
|
+
* Required. The resource name of the section to position.
|
|
2047
|
+
*
|
|
2048
|
+
* Format: `users/{user}/sections/{section}`
|
|
2049
|
+
* @param {number} [request.sortOrder]
|
|
2050
|
+
* Optional. The absolute position of the section in the list of sections.
|
|
2051
|
+
* The position must be greater than 0. If the position is greater than the
|
|
2052
|
+
* number of sections, the section will be appended to the end of the list.
|
|
2053
|
+
* This operation inserts the section at the given position and shifts the
|
|
2054
|
+
* original section at that position, and those below it, to the next
|
|
2055
|
+
* position.
|
|
2056
|
+
* @param {google.chat.v1.PositionSectionRequest.Position} [request.relativePosition]
|
|
2057
|
+
* Optional. The relative position of the section in the list of sections.
|
|
2058
|
+
* @param {object} [options]
|
|
2059
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2060
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2061
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.PositionSectionResponse|PositionSectionResponse}.
|
|
2062
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
2063
|
+
* for more details and examples.
|
|
2064
|
+
* @example <caption>include:samples/generated/v1/chat_service.position_section.js</caption>
|
|
2065
|
+
* region_tag:chat_v1_generated_ChatService_PositionSection_async
|
|
2066
|
+
*/
|
|
2067
|
+
positionSection(request?: protos.google.chat.v1.IPositionSectionRequest, options?: CallOptions): Promise<[
|
|
2068
|
+
protos.google.chat.v1.IPositionSectionResponse,
|
|
2069
|
+
protos.google.chat.v1.IPositionSectionRequest | undefined,
|
|
2070
|
+
{} | undefined
|
|
2071
|
+
]>;
|
|
2072
|
+
positionSection(request: protos.google.chat.v1.IPositionSectionRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IPositionSectionResponse, protos.google.chat.v1.IPositionSectionRequest | null | undefined, {} | null | undefined>): void;
|
|
2073
|
+
positionSection(request: protos.google.chat.v1.IPositionSectionRequest, callback: Callback<protos.google.chat.v1.IPositionSectionResponse, protos.google.chat.v1.IPositionSectionRequest | null | undefined, {} | null | undefined>): void;
|
|
2074
|
+
/**
|
|
2075
|
+
* Moves an item from one section to another. For example, if a section
|
|
2076
|
+
* contains spaces, this method can be used to move a space to a different
|
|
2077
|
+
* section. For details, see [Create and organize sections in Google
|
|
2078
|
+
* Chat](https://support.google.com/chat/answer/16059854).
|
|
2079
|
+
*
|
|
2080
|
+
* Requires [user
|
|
2081
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
2082
|
+
* with the [authorization
|
|
2083
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
2084
|
+
*
|
|
2085
|
+
* - `https://www.googleapis.com/auth/chat.users.sections`
|
|
2086
|
+
*
|
|
2087
|
+
* @param {Object} request
|
|
2088
|
+
* The request object that will be sent.
|
|
2089
|
+
* @param {string} request.name
|
|
2090
|
+
* Required. The resource name of the section item to move.
|
|
2091
|
+
*
|
|
2092
|
+
* Format: `users/{user}/sections/{section}/items/{item}`
|
|
2093
|
+
* @param {string} request.targetSection
|
|
2094
|
+
* Required. The resource name of the section to move the section item to.
|
|
2095
|
+
*
|
|
2096
|
+
* Format: `users/{user}/sections/{section}`
|
|
2097
|
+
* @param {object} [options]
|
|
2098
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
2099
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
2100
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.MoveSectionItemResponse|MoveSectionItemResponse}.
|
|
2101
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
2102
|
+
* for more details and examples.
|
|
2103
|
+
* @example <caption>include:samples/generated/v1/chat_service.move_section_item.js</caption>
|
|
2104
|
+
* region_tag:chat_v1_generated_ChatService_MoveSectionItem_async
|
|
2105
|
+
*/
|
|
2106
|
+
moveSectionItem(request?: protos.google.chat.v1.IMoveSectionItemRequest, options?: CallOptions): Promise<[
|
|
2107
|
+
protos.google.chat.v1.IMoveSectionItemResponse,
|
|
2108
|
+
protos.google.chat.v1.IMoveSectionItemRequest | undefined,
|
|
2109
|
+
{} | undefined
|
|
2110
|
+
]>;
|
|
2111
|
+
moveSectionItem(request: protos.google.chat.v1.IMoveSectionItemRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IMoveSectionItemResponse, protos.google.chat.v1.IMoveSectionItemRequest | null | undefined, {} | null | undefined>): void;
|
|
2112
|
+
moveSectionItem(request: protos.google.chat.v1.IMoveSectionItemRequest, callback: Callback<protos.google.chat.v1.IMoveSectionItemResponse, protos.google.chat.v1.IMoveSectionItemRequest | null | undefined, {} | null | undefined>): void;
|
|
1914
2113
|
/**
|
|
1915
2114
|
* Lists messages in a space that the caller is a member of, including
|
|
1916
2115
|
* messages from blocked members and spaces. System messages, like those
|
|
@@ -1927,9 +2126,8 @@ export declare class ChatServiceClient {
|
|
|
1927
2126
|
* - [App
|
|
1928
2127
|
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
1929
2128
|
* with [administrator
|
|
1930
|
-
* approval](https://support.google.com/a?p=chat-app-auth)
|
|
1931
|
-
*
|
|
1932
|
-
* with the authorization scope:
|
|
2129
|
+
* approval](https://support.google.com/a?p=chat-app-auth)
|
|
2130
|
+
* with the authorization scope:
|
|
1933
2131
|
* - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When
|
|
1934
2132
|
* using this authentication scope, this method only returns public
|
|
1935
2133
|
* messages in a space. It doesn't include private messages.
|
|
@@ -3205,6 +3403,207 @@ export declare class ChatServiceClient {
|
|
|
3205
3403
|
*/
|
|
3206
3404
|
searchSpacesAsync(request?: protos.google.chat.v1.ISearchSpacesRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
3207
3405
|
/**
|
|
3406
|
+
* Returns all spaces with `spaceType == GROUP_CHAT`, whose
|
|
3407
|
+
* human memberships contain exactly the calling user, and the users specified
|
|
3408
|
+
* in `FindGroupChatsRequest.users`. Only members that have joined the
|
|
3409
|
+
* conversation are supported. For an example, see [Find group
|
|
3410
|
+
* chats](https://developers.google.com/workspace/chat/find-group-chats).
|
|
3411
|
+
*
|
|
3412
|
+
* If the calling user blocks, or is blocked by, some users, and no spaces
|
|
3413
|
+
* with the entire specified set of users are found, this method returns
|
|
3414
|
+
* spaces that don't include the blocked or blocking users.
|
|
3415
|
+
*
|
|
3416
|
+
* The specified set of users must contain only human (non-app) memberships.
|
|
3417
|
+
* A request that contains non-human users doesn't return any spaces.
|
|
3418
|
+
*
|
|
3419
|
+
* Requires [user
|
|
3420
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
3421
|
+
* with one of the following [authorization
|
|
3422
|
+
* scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
3423
|
+
*
|
|
3424
|
+
* - `https://www.googleapis.com/auth/chat.memberships.readonly`
|
|
3425
|
+
* - `https://www.googleapis.com/auth/chat.memberships`
|
|
3426
|
+
*
|
|
3427
|
+
* @param {Object} request
|
|
3428
|
+
* The request object that will be sent.
|
|
3429
|
+
* @param {string[]} [request.users]
|
|
3430
|
+
* Optional. Resource names of all human users in group chat with the calling
|
|
3431
|
+
* user. Chat apps can't be included in the request.
|
|
3432
|
+
*
|
|
3433
|
+
* The maximum number of users that can be specified in a single request is
|
|
3434
|
+
* `49`.
|
|
3435
|
+
*
|
|
3436
|
+
* Format: `users/{user}`, where `{user}` is either the `id` for the
|
|
3437
|
+
* [person](https://developers.google.com/people/api/rest/v1/people) from the
|
|
3438
|
+
* People API, or the `id` for the
|
|
3439
|
+
* [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
|
|
3440
|
+
* in the Directory API. For example, to find all group chats with the calling
|
|
3441
|
+
* user and two other users, with People API profile IDs `123456789` and
|
|
3442
|
+
* `987654321`, you can use `users/123456789` and `users/987654321`.
|
|
3443
|
+
* You can also use the email as an alias for `{user}`. For example,
|
|
3444
|
+
* `users/example@gmail.com` where `example@gmail.com` is the email of the
|
|
3445
|
+
* Google Chat user.
|
|
3446
|
+
* @param {number} [request.pageSize]
|
|
3447
|
+
* Optional. The maximum number of spaces to return. The service might return
|
|
3448
|
+
* fewer than this value.
|
|
3449
|
+
*
|
|
3450
|
+
* If unspecified, at most 10 spaces are returned.
|
|
3451
|
+
*
|
|
3452
|
+
* The maximum value is 30. If you use a value more than 30, it's
|
|
3453
|
+
* automatically changed to 30.
|
|
3454
|
+
*
|
|
3455
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
3456
|
+
* @param {string} [request.pageToken]
|
|
3457
|
+
* Optional. A page token, received from a previous call to find group chats.
|
|
3458
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
3459
|
+
*
|
|
3460
|
+
* When paginating, all other parameters provided should match the call that
|
|
3461
|
+
* provided the token. Passing different values may lead to unexpected
|
|
3462
|
+
* results.
|
|
3463
|
+
* @param {google.chat.v1.SpaceView} request.spaceView
|
|
3464
|
+
* Requested space view type. If unset, defaults to
|
|
3465
|
+
* `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
|
|
3466
|
+
* `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
|
|
3467
|
+
* for example,
|
|
3468
|
+
* https://www.googleapis.com/auth/chat.spaces or
|
|
3469
|
+
* https://www.googleapis.com/auth/chat.spaces.readonly.
|
|
3470
|
+
* @param {object} [options]
|
|
3471
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3472
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
3473
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Space|Space}.
|
|
3474
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3475
|
+
* times as needed and will merge results from all the pages into this array.
|
|
3476
|
+
* Note that it can affect your quota.
|
|
3477
|
+
* We recommend using `findGroupChatsAsync()`
|
|
3478
|
+
* method described below for async iteration which you can stop as needed.
|
|
3479
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3480
|
+
* for more details and examples.
|
|
3481
|
+
*/
|
|
3482
|
+
findGroupChats(request?: protos.google.chat.v1.IFindGroupChatsRequest, options?: CallOptions): Promise<[
|
|
3483
|
+
protos.google.chat.v1.ISpace[],
|
|
3484
|
+
protos.google.chat.v1.IFindGroupChatsRequest | null,
|
|
3485
|
+
protos.google.chat.v1.IFindGroupChatsResponse
|
|
3486
|
+
]>;
|
|
3487
|
+
findGroupChats(request: protos.google.chat.v1.IFindGroupChatsRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IFindGroupChatsRequest, protos.google.chat.v1.IFindGroupChatsResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
|
|
3488
|
+
findGroupChats(request: protos.google.chat.v1.IFindGroupChatsRequest, callback: PaginationCallback<protos.google.chat.v1.IFindGroupChatsRequest, protos.google.chat.v1.IFindGroupChatsResponse | null | undefined, protos.google.chat.v1.ISpace>): void;
|
|
3489
|
+
/**
|
|
3490
|
+
* Equivalent to `findGroupChats`, but returns a NodeJS Stream object.
|
|
3491
|
+
* @param {Object} request
|
|
3492
|
+
* The request object that will be sent.
|
|
3493
|
+
* @param {string[]} [request.users]
|
|
3494
|
+
* Optional. Resource names of all human users in group chat with the calling
|
|
3495
|
+
* user. Chat apps can't be included in the request.
|
|
3496
|
+
*
|
|
3497
|
+
* The maximum number of users that can be specified in a single request is
|
|
3498
|
+
* `49`.
|
|
3499
|
+
*
|
|
3500
|
+
* Format: `users/{user}`, where `{user}` is either the `id` for the
|
|
3501
|
+
* [person](https://developers.google.com/people/api/rest/v1/people) from the
|
|
3502
|
+
* People API, or the `id` for the
|
|
3503
|
+
* [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
|
|
3504
|
+
* in the Directory API. For example, to find all group chats with the calling
|
|
3505
|
+
* user and two other users, with People API profile IDs `123456789` and
|
|
3506
|
+
* `987654321`, you can use `users/123456789` and `users/987654321`.
|
|
3507
|
+
* You can also use the email as an alias for `{user}`. For example,
|
|
3508
|
+
* `users/example@gmail.com` where `example@gmail.com` is the email of the
|
|
3509
|
+
* Google Chat user.
|
|
3510
|
+
* @param {number} [request.pageSize]
|
|
3511
|
+
* Optional. The maximum number of spaces to return. The service might return
|
|
3512
|
+
* fewer than this value.
|
|
3513
|
+
*
|
|
3514
|
+
* If unspecified, at most 10 spaces are returned.
|
|
3515
|
+
*
|
|
3516
|
+
* The maximum value is 30. If you use a value more than 30, it's
|
|
3517
|
+
* automatically changed to 30.
|
|
3518
|
+
*
|
|
3519
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
3520
|
+
* @param {string} [request.pageToken]
|
|
3521
|
+
* Optional. A page token, received from a previous call to find group chats.
|
|
3522
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
3523
|
+
*
|
|
3524
|
+
* When paginating, all other parameters provided should match the call that
|
|
3525
|
+
* provided the token. Passing different values may lead to unexpected
|
|
3526
|
+
* results.
|
|
3527
|
+
* @param {google.chat.v1.SpaceView} request.spaceView
|
|
3528
|
+
* Requested space view type. If unset, defaults to
|
|
3529
|
+
* `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
|
|
3530
|
+
* `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
|
|
3531
|
+
* for example,
|
|
3532
|
+
* https://www.googleapis.com/auth/chat.spaces or
|
|
3533
|
+
* https://www.googleapis.com/auth/chat.spaces.readonly.
|
|
3534
|
+
* @param {object} [options]
|
|
3535
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3536
|
+
* @returns {Stream}
|
|
3537
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.Space|Space} on 'data' event.
|
|
3538
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
3539
|
+
* times as needed. Note that it can affect your quota.
|
|
3540
|
+
* We recommend using `findGroupChatsAsync()`
|
|
3541
|
+
* method described below for async iteration which you can stop as needed.
|
|
3542
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3543
|
+
* for more details and examples.
|
|
3544
|
+
*/
|
|
3545
|
+
findGroupChatsStream(request?: protos.google.chat.v1.IFindGroupChatsRequest, options?: CallOptions): Transform;
|
|
3546
|
+
/**
|
|
3547
|
+
* Equivalent to `findGroupChats`, but returns an iterable object.
|
|
3548
|
+
*
|
|
3549
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
3550
|
+
* @param {Object} request
|
|
3551
|
+
* The request object that will be sent.
|
|
3552
|
+
* @param {string[]} [request.users]
|
|
3553
|
+
* Optional. Resource names of all human users in group chat with the calling
|
|
3554
|
+
* user. Chat apps can't be included in the request.
|
|
3555
|
+
*
|
|
3556
|
+
* The maximum number of users that can be specified in a single request is
|
|
3557
|
+
* `49`.
|
|
3558
|
+
*
|
|
3559
|
+
* Format: `users/{user}`, where `{user}` is either the `id` for the
|
|
3560
|
+
* [person](https://developers.google.com/people/api/rest/v1/people) from the
|
|
3561
|
+
* People API, or the `id` for the
|
|
3562
|
+
* [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users)
|
|
3563
|
+
* in the Directory API. For example, to find all group chats with the calling
|
|
3564
|
+
* user and two other users, with People API profile IDs `123456789` and
|
|
3565
|
+
* `987654321`, you can use `users/123456789` and `users/987654321`.
|
|
3566
|
+
* You can also use the email as an alias for `{user}`. For example,
|
|
3567
|
+
* `users/example@gmail.com` where `example@gmail.com` is the email of the
|
|
3568
|
+
* Google Chat user.
|
|
3569
|
+
* @param {number} [request.pageSize]
|
|
3570
|
+
* Optional. The maximum number of spaces to return. The service might return
|
|
3571
|
+
* fewer than this value.
|
|
3572
|
+
*
|
|
3573
|
+
* If unspecified, at most 10 spaces are returned.
|
|
3574
|
+
*
|
|
3575
|
+
* The maximum value is 30. If you use a value more than 30, it's
|
|
3576
|
+
* automatically changed to 30.
|
|
3577
|
+
*
|
|
3578
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
3579
|
+
* @param {string} [request.pageToken]
|
|
3580
|
+
* Optional. A page token, received from a previous call to find group chats.
|
|
3581
|
+
* Provide this parameter to retrieve the subsequent page.
|
|
3582
|
+
*
|
|
3583
|
+
* When paginating, all other parameters provided should match the call that
|
|
3584
|
+
* provided the token. Passing different values may lead to unexpected
|
|
3585
|
+
* results.
|
|
3586
|
+
* @param {google.chat.v1.SpaceView} request.spaceView
|
|
3587
|
+
* Requested space view type. If unset, defaults to
|
|
3588
|
+
* `SPACE_VIEW_RESOURCE_NAME_ONLY`. Requests that specify
|
|
3589
|
+
* `SPACE_VIEW_EXPANDED` must include scopes that allow reading space data,
|
|
3590
|
+
* for example,
|
|
3591
|
+
* https://www.googleapis.com/auth/chat.spaces or
|
|
3592
|
+
* https://www.googleapis.com/auth/chat.spaces.readonly.
|
|
3593
|
+
* @param {object} [options]
|
|
3594
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
3595
|
+
* @returns {Object}
|
|
3596
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
3597
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
3598
|
+
* {@link protos.google.chat.v1.Space|Space}. The API will be called under the hood as needed, once per the page,
|
|
3599
|
+
* so you can stop the iteration when you don't need more results.
|
|
3600
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
3601
|
+
* for more details and examples.
|
|
3602
|
+
* @example <caption>include:samples/generated/v1/chat_service.find_group_chats.js</caption>
|
|
3603
|
+
* region_tag:chat_v1_generated_ChatService_FindGroupChats_async
|
|
3604
|
+
*/
|
|
3605
|
+
findGroupChatsAsync(request?: protos.google.chat.v1.IFindGroupChatsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpace>;
|
|
3606
|
+
/**
|
|
3208
3607
|
* Lists reactions to a message. For an example, see
|
|
3209
3608
|
* [List reactions for a
|
|
3210
3609
|
* message](https://developers.google.com/workspace/chat/list-reactions).
|
|
@@ -3632,12 +4031,13 @@ export declare class ChatServiceClient {
|
|
|
3632
4031
|
* - [App
|
|
3633
4032
|
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
|
|
3634
4033
|
* with [administrator
|
|
3635
|
-
* approval](https://support.google.com/a?p=chat-app-auth)
|
|
3636
|
-
*
|
|
3637
|
-
* with one of the following authorization scopes:
|
|
4034
|
+
* approval](https://support.google.com/a?p=chat-app-auth)
|
|
4035
|
+
* with one of the following authorization scopes:
|
|
3638
4036
|
* - `https://www.googleapis.com/auth/chat.app.spaces`
|
|
4037
|
+
* - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
|
|
3639
4038
|
* - `https://www.googleapis.com/auth/chat.app.messages.readonly`
|
|
3640
4039
|
* - `https://www.googleapis.com/auth/chat.app.memberships`
|
|
4040
|
+
* - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
|
|
3641
4041
|
*
|
|
3642
4042
|
* - [User
|
|
3643
4043
|
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
@@ -3925,6 +4325,335 @@ export declare class ChatServiceClient {
|
|
|
3925
4325
|
* region_tag:chat_v1_generated_ChatService_ListSpaceEvents_async
|
|
3926
4326
|
*/
|
|
3927
4327
|
listSpaceEventsAsync(request?: protos.google.chat.v1.IListSpaceEventsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpaceEvent>;
|
|
4328
|
+
/**
|
|
4329
|
+
* Lists sections available to the Chat user. Sections help users group their
|
|
4330
|
+
* conversations and customize the list of spaces displayed in Chat
|
|
4331
|
+
* navigation panel. For details, see [Create and organize sections in Google
|
|
4332
|
+
* Chat](https://support.google.com/chat/answer/16059854).
|
|
4333
|
+
*
|
|
4334
|
+
* Requires [user
|
|
4335
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
4336
|
+
* with the [authorization
|
|
4337
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
4338
|
+
*
|
|
4339
|
+
* - `https://www.googleapis.com/auth/chat.users.sections`
|
|
4340
|
+
* - `https://www.googleapis.com/auth/chat.users.sections.readonly`
|
|
4341
|
+
*
|
|
4342
|
+
* @param {Object} request
|
|
4343
|
+
* The request object that will be sent.
|
|
4344
|
+
* @param {string} request.parent
|
|
4345
|
+
* Required. The parent, which is the user resource name that owns this
|
|
4346
|
+
* collection of sections. Only supports listing sections for the calling
|
|
4347
|
+
* user. To refer to the calling user, set one of the following:
|
|
4348
|
+
*
|
|
4349
|
+
* - The `me` alias. For example, `users/me`.
|
|
4350
|
+
*
|
|
4351
|
+
* - Their Workspace email address. For example, `users/user@example.com`.
|
|
4352
|
+
*
|
|
4353
|
+
* - Their user id. For example, `users/123456789`.
|
|
4354
|
+
*
|
|
4355
|
+
* Format: `users/{user}`
|
|
4356
|
+
* @param {number} [request.pageSize]
|
|
4357
|
+
* Optional. The maximum number of sections to return. The service may return
|
|
4358
|
+
* fewer than this value.
|
|
4359
|
+
*
|
|
4360
|
+
* If unspecified, at most 10 sections will be returned.
|
|
4361
|
+
*
|
|
4362
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
4363
|
+
* automatically changed to 100.
|
|
4364
|
+
*
|
|
4365
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
4366
|
+
* @param {string} [request.pageToken]
|
|
4367
|
+
* Optional. A page token, received from a previous list sections call.
|
|
4368
|
+
* Provide this to retrieve the subsequent page.
|
|
4369
|
+
*
|
|
4370
|
+
* When paginating, all other parameters provided should match the call that
|
|
4371
|
+
* provided the page token. Passing different values to the other parameters
|
|
4372
|
+
* might lead to unexpected results.
|
|
4373
|
+
* @param {object} [options]
|
|
4374
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
4375
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
4376
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.Section|Section}.
|
|
4377
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
4378
|
+
* times as needed and will merge results from all the pages into this array.
|
|
4379
|
+
* Note that it can affect your quota.
|
|
4380
|
+
* We recommend using `listSectionsAsync()`
|
|
4381
|
+
* method described below for async iteration which you can stop as needed.
|
|
4382
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
4383
|
+
* for more details and examples.
|
|
4384
|
+
*/
|
|
4385
|
+
listSections(request?: protos.google.chat.v1.IListSectionsRequest, options?: CallOptions): Promise<[
|
|
4386
|
+
protos.google.chat.v1.ISection[],
|
|
4387
|
+
protos.google.chat.v1.IListSectionsRequest | null,
|
|
4388
|
+
protos.google.chat.v1.IListSectionsResponse
|
|
4389
|
+
]>;
|
|
4390
|
+
listSections(request: protos.google.chat.v1.IListSectionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListSectionsRequest, protos.google.chat.v1.IListSectionsResponse | null | undefined, protos.google.chat.v1.ISection>): void;
|
|
4391
|
+
listSections(request: protos.google.chat.v1.IListSectionsRequest, callback: PaginationCallback<protos.google.chat.v1.IListSectionsRequest, protos.google.chat.v1.IListSectionsResponse | null | undefined, protos.google.chat.v1.ISection>): void;
|
|
4392
|
+
/**
|
|
4393
|
+
* Equivalent to `listSections`, but returns a NodeJS Stream object.
|
|
4394
|
+
* @param {Object} request
|
|
4395
|
+
* The request object that will be sent.
|
|
4396
|
+
* @param {string} request.parent
|
|
4397
|
+
* Required. The parent, which is the user resource name that owns this
|
|
4398
|
+
* collection of sections. Only supports listing sections for the calling
|
|
4399
|
+
* user. To refer to the calling user, set one of the following:
|
|
4400
|
+
*
|
|
4401
|
+
* - The `me` alias. For example, `users/me`.
|
|
4402
|
+
*
|
|
4403
|
+
* - Their Workspace email address. For example, `users/user@example.com`.
|
|
4404
|
+
*
|
|
4405
|
+
* - Their user id. For example, `users/123456789`.
|
|
4406
|
+
*
|
|
4407
|
+
* Format: `users/{user}`
|
|
4408
|
+
* @param {number} [request.pageSize]
|
|
4409
|
+
* Optional. The maximum number of sections to return. The service may return
|
|
4410
|
+
* fewer than this value.
|
|
4411
|
+
*
|
|
4412
|
+
* If unspecified, at most 10 sections will be returned.
|
|
4413
|
+
*
|
|
4414
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
4415
|
+
* automatically changed to 100.
|
|
4416
|
+
*
|
|
4417
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
4418
|
+
* @param {string} [request.pageToken]
|
|
4419
|
+
* Optional. A page token, received from a previous list sections call.
|
|
4420
|
+
* Provide this to retrieve the subsequent page.
|
|
4421
|
+
*
|
|
4422
|
+
* When paginating, all other parameters provided should match the call that
|
|
4423
|
+
* provided the page token. Passing different values to the other parameters
|
|
4424
|
+
* might lead to unexpected results.
|
|
4425
|
+
* @param {object} [options]
|
|
4426
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
4427
|
+
* @returns {Stream}
|
|
4428
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.Section|Section} on 'data' event.
|
|
4429
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
4430
|
+
* times as needed. Note that it can affect your quota.
|
|
4431
|
+
* We recommend using `listSectionsAsync()`
|
|
4432
|
+
* method described below for async iteration which you can stop as needed.
|
|
4433
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
4434
|
+
* for more details and examples.
|
|
4435
|
+
*/
|
|
4436
|
+
listSectionsStream(request?: protos.google.chat.v1.IListSectionsRequest, options?: CallOptions): Transform;
|
|
4437
|
+
/**
|
|
4438
|
+
* Equivalent to `listSections`, but returns an iterable object.
|
|
4439
|
+
*
|
|
4440
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
4441
|
+
* @param {Object} request
|
|
4442
|
+
* The request object that will be sent.
|
|
4443
|
+
* @param {string} request.parent
|
|
4444
|
+
* Required. The parent, which is the user resource name that owns this
|
|
4445
|
+
* collection of sections. Only supports listing sections for the calling
|
|
4446
|
+
* user. To refer to the calling user, set one of the following:
|
|
4447
|
+
*
|
|
4448
|
+
* - The `me` alias. For example, `users/me`.
|
|
4449
|
+
*
|
|
4450
|
+
* - Their Workspace email address. For example, `users/user@example.com`.
|
|
4451
|
+
*
|
|
4452
|
+
* - Their user id. For example, `users/123456789`.
|
|
4453
|
+
*
|
|
4454
|
+
* Format: `users/{user}`
|
|
4455
|
+
* @param {number} [request.pageSize]
|
|
4456
|
+
* Optional. The maximum number of sections to return. The service may return
|
|
4457
|
+
* fewer than this value.
|
|
4458
|
+
*
|
|
4459
|
+
* If unspecified, at most 10 sections will be returned.
|
|
4460
|
+
*
|
|
4461
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
4462
|
+
* automatically changed to 100.
|
|
4463
|
+
*
|
|
4464
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
4465
|
+
* @param {string} [request.pageToken]
|
|
4466
|
+
* Optional. A page token, received from a previous list sections call.
|
|
4467
|
+
* Provide this to retrieve the subsequent page.
|
|
4468
|
+
*
|
|
4469
|
+
* When paginating, all other parameters provided should match the call that
|
|
4470
|
+
* provided the page token. Passing different values to the other parameters
|
|
4471
|
+
* might lead to unexpected results.
|
|
4472
|
+
* @param {object} [options]
|
|
4473
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
4474
|
+
* @returns {Object}
|
|
4475
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
4476
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
4477
|
+
* {@link protos.google.chat.v1.Section|Section}. The API will be called under the hood as needed, once per the page,
|
|
4478
|
+
* so you can stop the iteration when you don't need more results.
|
|
4479
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
4480
|
+
* for more details and examples.
|
|
4481
|
+
* @example <caption>include:samples/generated/v1/chat_service.list_sections.js</caption>
|
|
4482
|
+
* region_tag:chat_v1_generated_ChatService_ListSections_async
|
|
4483
|
+
*/
|
|
4484
|
+
listSectionsAsync(request?: protos.google.chat.v1.IListSectionsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISection>;
|
|
4485
|
+
/**
|
|
4486
|
+
* Lists items in a section.
|
|
4487
|
+
*
|
|
4488
|
+
* Only spaces can be section items. For details, see [Create and organize
|
|
4489
|
+
* sections in Google Chat](https://support.google.com/chat/answer/16059854).
|
|
4490
|
+
*
|
|
4491
|
+
* Requires [user
|
|
4492
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
|
|
4493
|
+
* with the [authorization
|
|
4494
|
+
* scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
|
|
4495
|
+
*
|
|
4496
|
+
* - `https://www.googleapis.com/auth/chat.users.sections`
|
|
4497
|
+
* - `https://www.googleapis.com/auth/chat.users.sections.readonly`
|
|
4498
|
+
*
|
|
4499
|
+
* @param {Object} request
|
|
4500
|
+
* The request object that will be sent.
|
|
4501
|
+
* @param {string} request.parent
|
|
4502
|
+
* Required. The parent, which is the section resource name that owns this
|
|
4503
|
+
* collection of section items. Only supports listing section items for the
|
|
4504
|
+
* calling user.
|
|
4505
|
+
*
|
|
4506
|
+
* When you're filtering by space, use the wildcard `-` to search across all
|
|
4507
|
+
* sections. For example, `users/{user}/sections/-`.
|
|
4508
|
+
*
|
|
4509
|
+
* Format: `users/{user}/sections/{section}`
|
|
4510
|
+
* @param {number} [request.pageSize]
|
|
4511
|
+
* Optional. The maximum number of section items to return. The service may
|
|
4512
|
+
* return fewer than this value.
|
|
4513
|
+
*
|
|
4514
|
+
* If unspecified, at most 10 section items will be returned.
|
|
4515
|
+
*
|
|
4516
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
4517
|
+
* automatically changed to 100.
|
|
4518
|
+
*
|
|
4519
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
4520
|
+
* @param {string} [request.pageToken]
|
|
4521
|
+
* Optional. A page token, received from a previous list section items call.
|
|
4522
|
+
* Provide this to retrieve the subsequent page.
|
|
4523
|
+
*
|
|
4524
|
+
* When paginating, all other parameters provided should match the call that
|
|
4525
|
+
* provided the page token. Passing different values to the other parameters
|
|
4526
|
+
* might lead to unexpected results.
|
|
4527
|
+
* @param {string} [request.filter]
|
|
4528
|
+
* Optional. A query filter.
|
|
4529
|
+
*
|
|
4530
|
+
* Currently only supports filtering by space.
|
|
4531
|
+
*
|
|
4532
|
+
* For example, `space = spaces/{space}`.
|
|
4533
|
+
*
|
|
4534
|
+
* Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
4535
|
+
* @param {object} [options]
|
|
4536
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
4537
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
4538
|
+
* The first element of the array is Array of {@link protos.google.chat.v1.SectionItem|SectionItem}.
|
|
4539
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
4540
|
+
* times as needed and will merge results from all the pages into this array.
|
|
4541
|
+
* Note that it can affect your quota.
|
|
4542
|
+
* We recommend using `listSectionItemsAsync()`
|
|
4543
|
+
* method described below for async iteration which you can stop as needed.
|
|
4544
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
4545
|
+
* for more details and examples.
|
|
4546
|
+
*/
|
|
4547
|
+
listSectionItems(request?: protos.google.chat.v1.IListSectionItemsRequest, options?: CallOptions): Promise<[
|
|
4548
|
+
protos.google.chat.v1.ISectionItem[],
|
|
4549
|
+
protos.google.chat.v1.IListSectionItemsRequest | null,
|
|
4550
|
+
protos.google.chat.v1.IListSectionItemsResponse
|
|
4551
|
+
]>;
|
|
4552
|
+
listSectionItems(request: protos.google.chat.v1.IListSectionItemsRequest, options: CallOptions, callback: PaginationCallback<protos.google.chat.v1.IListSectionItemsRequest, protos.google.chat.v1.IListSectionItemsResponse | null | undefined, protos.google.chat.v1.ISectionItem>): void;
|
|
4553
|
+
listSectionItems(request: protos.google.chat.v1.IListSectionItemsRequest, callback: PaginationCallback<protos.google.chat.v1.IListSectionItemsRequest, protos.google.chat.v1.IListSectionItemsResponse | null | undefined, protos.google.chat.v1.ISectionItem>): void;
|
|
4554
|
+
/**
|
|
4555
|
+
* Equivalent to `listSectionItems`, but returns a NodeJS Stream object.
|
|
4556
|
+
* @param {Object} request
|
|
4557
|
+
* The request object that will be sent.
|
|
4558
|
+
* @param {string} request.parent
|
|
4559
|
+
* Required. The parent, which is the section resource name that owns this
|
|
4560
|
+
* collection of section items. Only supports listing section items for the
|
|
4561
|
+
* calling user.
|
|
4562
|
+
*
|
|
4563
|
+
* When you're filtering by space, use the wildcard `-` to search across all
|
|
4564
|
+
* sections. For example, `users/{user}/sections/-`.
|
|
4565
|
+
*
|
|
4566
|
+
* Format: `users/{user}/sections/{section}`
|
|
4567
|
+
* @param {number} [request.pageSize]
|
|
4568
|
+
* Optional. The maximum number of section items to return. The service may
|
|
4569
|
+
* return fewer than this value.
|
|
4570
|
+
*
|
|
4571
|
+
* If unspecified, at most 10 section items will be returned.
|
|
4572
|
+
*
|
|
4573
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
4574
|
+
* automatically changed to 100.
|
|
4575
|
+
*
|
|
4576
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
4577
|
+
* @param {string} [request.pageToken]
|
|
4578
|
+
* Optional. A page token, received from a previous list section items call.
|
|
4579
|
+
* Provide this to retrieve the subsequent page.
|
|
4580
|
+
*
|
|
4581
|
+
* When paginating, all other parameters provided should match the call that
|
|
4582
|
+
* provided the page token. Passing different values to the other parameters
|
|
4583
|
+
* might lead to unexpected results.
|
|
4584
|
+
* @param {string} [request.filter]
|
|
4585
|
+
* Optional. A query filter.
|
|
4586
|
+
*
|
|
4587
|
+
* Currently only supports filtering by space.
|
|
4588
|
+
*
|
|
4589
|
+
* For example, `space = spaces/{space}`.
|
|
4590
|
+
*
|
|
4591
|
+
* Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
4592
|
+
* @param {object} [options]
|
|
4593
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
4594
|
+
* @returns {Stream}
|
|
4595
|
+
* An object stream which emits an object representing {@link protos.google.chat.v1.SectionItem|SectionItem} on 'data' event.
|
|
4596
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
4597
|
+
* times as needed. Note that it can affect your quota.
|
|
4598
|
+
* We recommend using `listSectionItemsAsync()`
|
|
4599
|
+
* method described below for async iteration which you can stop as needed.
|
|
4600
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
4601
|
+
* for more details and examples.
|
|
4602
|
+
*/
|
|
4603
|
+
listSectionItemsStream(request?: protos.google.chat.v1.IListSectionItemsRequest, options?: CallOptions): Transform;
|
|
4604
|
+
/**
|
|
4605
|
+
* Equivalent to `listSectionItems`, but returns an iterable object.
|
|
4606
|
+
*
|
|
4607
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
|
4608
|
+
* @param {Object} request
|
|
4609
|
+
* The request object that will be sent.
|
|
4610
|
+
* @param {string} request.parent
|
|
4611
|
+
* Required. The parent, which is the section resource name that owns this
|
|
4612
|
+
* collection of section items. Only supports listing section items for the
|
|
4613
|
+
* calling user.
|
|
4614
|
+
*
|
|
4615
|
+
* When you're filtering by space, use the wildcard `-` to search across all
|
|
4616
|
+
* sections. For example, `users/{user}/sections/-`.
|
|
4617
|
+
*
|
|
4618
|
+
* Format: `users/{user}/sections/{section}`
|
|
4619
|
+
* @param {number} [request.pageSize]
|
|
4620
|
+
* Optional. The maximum number of section items to return. The service may
|
|
4621
|
+
* return fewer than this value.
|
|
4622
|
+
*
|
|
4623
|
+
* If unspecified, at most 10 section items will be returned.
|
|
4624
|
+
*
|
|
4625
|
+
* The maximum value is 100. If you use a value more than 100, it's
|
|
4626
|
+
* automatically changed to 100.
|
|
4627
|
+
*
|
|
4628
|
+
* Negative values return an `INVALID_ARGUMENT` error.
|
|
4629
|
+
* @param {string} [request.pageToken]
|
|
4630
|
+
* Optional. A page token, received from a previous list section items call.
|
|
4631
|
+
* Provide this to retrieve the subsequent page.
|
|
4632
|
+
*
|
|
4633
|
+
* When paginating, all other parameters provided should match the call that
|
|
4634
|
+
* provided the page token. Passing different values to the other parameters
|
|
4635
|
+
* might lead to unexpected results.
|
|
4636
|
+
* @param {string} [request.filter]
|
|
4637
|
+
* Optional. A query filter.
|
|
4638
|
+
*
|
|
4639
|
+
* Currently only supports filtering by space.
|
|
4640
|
+
*
|
|
4641
|
+
* For example, `space = spaces/{space}`.
|
|
4642
|
+
*
|
|
4643
|
+
* Invalid queries are rejected with an `INVALID_ARGUMENT` error.
|
|
4644
|
+
* @param {object} [options]
|
|
4645
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
4646
|
+
* @returns {Object}
|
|
4647
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
|
4648
|
+
* When you iterate the returned iterable, each element will be an object representing
|
|
4649
|
+
* {@link protos.google.chat.v1.SectionItem|SectionItem}. The API will be called under the hood as needed, once per the page,
|
|
4650
|
+
* so you can stop the iteration when you don't need more results.
|
|
4651
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
|
4652
|
+
* for more details and examples.
|
|
4653
|
+
* @example <caption>include:samples/generated/v1/chat_service.list_section_items.js</caption>
|
|
4654
|
+
* region_tag:chat_v1_generated_ChatService_ListSectionItems_async
|
|
4655
|
+
*/
|
|
4656
|
+
listSectionItemsAsync(request?: protos.google.chat.v1.IListSectionItemsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISectionItem>;
|
|
3928
4657
|
/**
|
|
3929
4658
|
* Return a fully-qualified attachment resource name string.
|
|
3930
4659
|
*
|
|
@@ -4087,6 +4816,63 @@ export declare class ChatServiceClient {
|
|
|
4087
4816
|
* @returns {string} A string representing the reaction.
|
|
4088
4817
|
*/
|
|
4089
4818
|
matchReactionFromReactionName(reactionName: string): string | number;
|
|
4819
|
+
/**
|
|
4820
|
+
* Return a fully-qualified section resource name string.
|
|
4821
|
+
*
|
|
4822
|
+
* @param {string} user
|
|
4823
|
+
* @param {string} section
|
|
4824
|
+
* @returns {string} Resource name string.
|
|
4825
|
+
*/
|
|
4826
|
+
sectionPath(user: string, section: string): string;
|
|
4827
|
+
/**
|
|
4828
|
+
* Parse the user from Section resource.
|
|
4829
|
+
*
|
|
4830
|
+
* @param {string} sectionName
|
|
4831
|
+
* A fully-qualified path representing Section resource.
|
|
4832
|
+
* @returns {string} A string representing the user.
|
|
4833
|
+
*/
|
|
4834
|
+
matchUserFromSectionName(sectionName: string): string | number;
|
|
4835
|
+
/**
|
|
4836
|
+
* Parse the section from Section resource.
|
|
4837
|
+
*
|
|
4838
|
+
* @param {string} sectionName
|
|
4839
|
+
* A fully-qualified path representing Section resource.
|
|
4840
|
+
* @returns {string} A string representing the section.
|
|
4841
|
+
*/
|
|
4842
|
+
matchSectionFromSectionName(sectionName: string): string | number;
|
|
4843
|
+
/**
|
|
4844
|
+
* Return a fully-qualified sectionItem resource name string.
|
|
4845
|
+
*
|
|
4846
|
+
* @param {string} user
|
|
4847
|
+
* @param {string} section
|
|
4848
|
+
* @param {string} item
|
|
4849
|
+
* @returns {string} Resource name string.
|
|
4850
|
+
*/
|
|
4851
|
+
sectionItemPath(user: string, section: string, item: string): string;
|
|
4852
|
+
/**
|
|
4853
|
+
* Parse the user from SectionItem resource.
|
|
4854
|
+
*
|
|
4855
|
+
* @param {string} sectionItemName
|
|
4856
|
+
* A fully-qualified path representing SectionItem resource.
|
|
4857
|
+
* @returns {string} A string representing the user.
|
|
4858
|
+
*/
|
|
4859
|
+
matchUserFromSectionItemName(sectionItemName: string): string | number;
|
|
4860
|
+
/**
|
|
4861
|
+
* Parse the section from SectionItem resource.
|
|
4862
|
+
*
|
|
4863
|
+
* @param {string} sectionItemName
|
|
4864
|
+
* A fully-qualified path representing SectionItem resource.
|
|
4865
|
+
* @returns {string} A string representing the section.
|
|
4866
|
+
*/
|
|
4867
|
+
matchSectionFromSectionItemName(sectionItemName: string): string | number;
|
|
4868
|
+
/**
|
|
4869
|
+
* Parse the item from SectionItem resource.
|
|
4870
|
+
*
|
|
4871
|
+
* @param {string} sectionItemName
|
|
4872
|
+
* A fully-qualified path representing SectionItem resource.
|
|
4873
|
+
* @returns {string} A string representing the item.
|
|
4874
|
+
*/
|
|
4875
|
+
matchItemFromSectionItemName(sectionItemName: string): string | number;
|
|
4090
4876
|
/**
|
|
4091
4877
|
* Return a fully-qualified space resource name string.
|
|
4092
4878
|
*
|