@google-apps/chat 0.23.0 → 0.23.1

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.
@@ -310,8 +310,7 @@ export declare class ChatServiceClient {
310
310
  * that invoke the Chat app.
311
311
  * - `https://www.googleapis.com/auth/chat.app.messages.readonly`
312
312
  * with [administrator
313
- * approval](https://support.google.com/a?p=chat-app-auth) (available in
314
- * [Developer Preview](https://developers.google.com/workspace/preview)).
313
+ * approval](https://support.google.com/a?p=chat-app-auth).
315
314
  * When using this authentication scope,
316
315
  * this method returns details about a public message in a space.
317
316
  *
@@ -1786,12 +1785,13 @@ export declare class ChatServiceClient {
1786
1785
  * - [App
1787
1786
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
1788
1787
  * with [administrator
1789
- * approval](https://support.google.com/a?p=chat-app-auth) in
1790
- * [Developer Preview](https://developers.google.com/workspace/preview)
1791
- * with one of the following authorization scopes:
1788
+ * approval](https://support.google.com/a?p=chat-app-auth)
1789
+ * with one of the following authorization scopes:
1792
1790
  * - `https://www.googleapis.com/auth/chat.app.spaces`
1791
+ * - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
1793
1792
  * - `https://www.googleapis.com/auth/chat.app.messages.readonly`
1794
1793
  * - `https://www.googleapis.com/auth/chat.app.memberships`
1794
+ * - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
1795
1795
  *
1796
1796
  * - [User
1797
1797
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
@@ -1911,6 +1911,201 @@ export declare class ChatServiceClient {
1911
1911
  ]>;
1912
1912
  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
1913
  updateSpaceNotificationSetting(request: protos.google.chat.v1.IUpdateSpaceNotificationSettingRequest, callback: Callback<protos.google.chat.v1.ISpaceNotificationSetting, protos.google.chat.v1.IUpdateSpaceNotificationSettingRequest | null | undefined, {} | null | undefined>): void;
1914
+ /**
1915
+ * Creates a section in Google Chat. Sections help users group conversations
1916
+ * and customize the list of spaces displayed in Chat navigation panel. Only
1917
+ * sections of type `CUSTOM_SECTION` can be created. For details, see [Create
1918
+ * and organize sections in Google
1919
+ * Chat](https://support.google.com/chat/answer/16059854).
1920
+ *
1921
+ * Requires [user
1922
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1923
+ * with the [authorization
1924
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1925
+ *
1926
+ * - `https://www.googleapis.com/auth/chat.users.sections`
1927
+ *
1928
+ * @param {Object} request
1929
+ * The request object that will be sent.
1930
+ * @param {string} request.parent
1931
+ * Required. The parent resource name where the section is created.
1932
+ *
1933
+ * Format: `users/{user}`
1934
+ * @param {google.chat.v1.Section} request.section
1935
+ * Required. The section to create.
1936
+ * @param {object} [options]
1937
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1938
+ * @returns {Promise} - The promise which resolves to an array.
1939
+ * The first element of the array is an object representing {@link protos.google.chat.v1.Section|Section}.
1940
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1941
+ * for more details and examples.
1942
+ * @example <caption>include:samples/generated/v1/chat_service.create_section.js</caption>
1943
+ * region_tag:chat_v1_generated_ChatService_CreateSection_async
1944
+ */
1945
+ createSection(request?: protos.google.chat.v1.ICreateSectionRequest, options?: CallOptions): Promise<[
1946
+ protos.google.chat.v1.ISection,
1947
+ protos.google.chat.v1.ICreateSectionRequest | undefined,
1948
+ {} | undefined
1949
+ ]>;
1950
+ 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;
1951
+ createSection(request: protos.google.chat.v1.ICreateSectionRequest, callback: Callback<protos.google.chat.v1.ISection, protos.google.chat.v1.ICreateSectionRequest | null | undefined, {} | null | undefined>): void;
1952
+ /**
1953
+ * Deletes a section of type `CUSTOM_SECTION`.
1954
+ *
1955
+ * If the section contains items, such as spaces, the items are moved to
1956
+ * Google Chat's default sections and are not deleted.
1957
+ *
1958
+ * For details, see [Create and organize sections in Google
1959
+ * Chat](https://support.google.com/chat/answer/16059854).
1960
+ *
1961
+ * Requires [user
1962
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1963
+ * with the [authorization
1964
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1965
+ *
1966
+ * - `https://www.googleapis.com/auth/chat.users.sections`
1967
+ *
1968
+ * @param {Object} request
1969
+ * The request object that will be sent.
1970
+ * @param {string} request.name
1971
+ * Required. The name of the section to delete.
1972
+ *
1973
+ * Format: `users/{user}/sections/{section}`
1974
+ * @param {object} [options]
1975
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
1976
+ * @returns {Promise} - The promise which resolves to an array.
1977
+ * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
1978
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
1979
+ * for more details and examples.
1980
+ * @example <caption>include:samples/generated/v1/chat_service.delete_section.js</caption>
1981
+ * region_tag:chat_v1_generated_ChatService_DeleteSection_async
1982
+ */
1983
+ deleteSection(request?: protos.google.chat.v1.IDeleteSectionRequest, options?: CallOptions): Promise<[
1984
+ protos.google.protobuf.IEmpty,
1985
+ protos.google.chat.v1.IDeleteSectionRequest | undefined,
1986
+ {} | undefined
1987
+ ]>;
1988
+ 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;
1989
+ deleteSection(request: protos.google.chat.v1.IDeleteSectionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteSectionRequest | null | undefined, {} | null | undefined>): void;
1990
+ /**
1991
+ * Updates a section. Only sections of type `CUSTOM_SECTION` can be updated.
1992
+ * For details, see [Create and organize sections in Google
1993
+ * Chat](https://support.google.com/chat/answer/16059854).
1994
+ *
1995
+ * Requires [user
1996
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
1997
+ * with the [authorization
1998
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
1999
+ *
2000
+ * - `https://www.googleapis.com/auth/chat.users.sections`
2001
+ *
2002
+ * @param {Object} request
2003
+ * The request object that will be sent.
2004
+ * @param {google.chat.v1.Section} request.section
2005
+ * Required. The section to update.
2006
+ * @param {google.protobuf.FieldMask} request.updateMask
2007
+ * Required. The mask to specify which fields to update.
2008
+ *
2009
+ * Currently supported field paths:
2010
+ *
2011
+ * - `display_name`
2012
+ * @param {object} [options]
2013
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2014
+ * @returns {Promise} - The promise which resolves to an array.
2015
+ * The first element of the array is an object representing {@link protos.google.chat.v1.Section|Section}.
2016
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2017
+ * for more details and examples.
2018
+ * @example <caption>include:samples/generated/v1/chat_service.update_section.js</caption>
2019
+ * region_tag:chat_v1_generated_ChatService_UpdateSection_async
2020
+ */
2021
+ updateSection(request?: protos.google.chat.v1.IUpdateSectionRequest, options?: CallOptions): Promise<[
2022
+ protos.google.chat.v1.ISection,
2023
+ protos.google.chat.v1.IUpdateSectionRequest | undefined,
2024
+ {} | undefined
2025
+ ]>;
2026
+ 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;
2027
+ updateSection(request: protos.google.chat.v1.IUpdateSectionRequest, callback: Callback<protos.google.chat.v1.ISection, protos.google.chat.v1.IUpdateSectionRequest | null | undefined, {} | null | undefined>): void;
2028
+ /**
2029
+ * Changes the sort order of a section. For details, see [Create and organize
2030
+ * sections in Google Chat](https://support.google.com/chat/answer/16059854).
2031
+ *
2032
+ * Requires [user
2033
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2034
+ * with the [authorization
2035
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
2036
+ *
2037
+ * - `https://www.googleapis.com/auth/chat.users.sections`
2038
+ *
2039
+ * @param {Object} request
2040
+ * The request object that will be sent.
2041
+ * @param {string} request.name
2042
+ * Required. The resource name of the section to position.
2043
+ *
2044
+ * Format: `users/{user}/sections/{section}`
2045
+ * @param {number} [request.sortOrder]
2046
+ * Optional. The absolute position of the section in the list of sections.
2047
+ * The position must be greater than 0. If the position is greater than the
2048
+ * number of sections, the section will be appended to the end of the list.
2049
+ * This operation inserts the section at the given position and shifts the
2050
+ * original section at that position, and those below it, to the next
2051
+ * position.
2052
+ * @param {google.chat.v1.PositionSectionRequest.Position} [request.relativePosition]
2053
+ * Optional. The relative position of the section in the list of sections.
2054
+ * @param {object} [options]
2055
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2056
+ * @returns {Promise} - The promise which resolves to an array.
2057
+ * The first element of the array is an object representing {@link protos.google.chat.v1.PositionSectionResponse|PositionSectionResponse}.
2058
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2059
+ * for more details and examples.
2060
+ * @example <caption>include:samples/generated/v1/chat_service.position_section.js</caption>
2061
+ * region_tag:chat_v1_generated_ChatService_PositionSection_async
2062
+ */
2063
+ positionSection(request?: protos.google.chat.v1.IPositionSectionRequest, options?: CallOptions): Promise<[
2064
+ protos.google.chat.v1.IPositionSectionResponse,
2065
+ protos.google.chat.v1.IPositionSectionRequest | undefined,
2066
+ {} | undefined
2067
+ ]>;
2068
+ 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;
2069
+ positionSection(request: protos.google.chat.v1.IPositionSectionRequest, callback: Callback<protos.google.chat.v1.IPositionSectionResponse, protos.google.chat.v1.IPositionSectionRequest | null | undefined, {} | null | undefined>): void;
2070
+ /**
2071
+ * Moves an item from one section to another. For example, if a section
2072
+ * contains spaces, this method can be used to move a space to a different
2073
+ * section. For details, see [Create and organize sections in Google
2074
+ * Chat](https://support.google.com/chat/answer/16059854).
2075
+ *
2076
+ * Requires [user
2077
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
2078
+ * with the [authorization
2079
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
2080
+ *
2081
+ * - `https://www.googleapis.com/auth/chat.users.sections`
2082
+ *
2083
+ * @param {Object} request
2084
+ * The request object that will be sent.
2085
+ * @param {string} request.name
2086
+ * Required. The resource name of the section item to move.
2087
+ *
2088
+ * Format: `users/{user}/sections/{section}/items/{item}`
2089
+ * @param {string} request.targetSection
2090
+ * Required. The resource name of the section to move the section item to.
2091
+ *
2092
+ * Format: `users/{user}/sections/{section}`
2093
+ * @param {object} [options]
2094
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
2095
+ * @returns {Promise} - The promise which resolves to an array.
2096
+ * The first element of the array is an object representing {@link protos.google.chat.v1.MoveSectionItemResponse|MoveSectionItemResponse}.
2097
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
2098
+ * for more details and examples.
2099
+ * @example <caption>include:samples/generated/v1/chat_service.move_section_item.js</caption>
2100
+ * region_tag:chat_v1_generated_ChatService_MoveSectionItem_async
2101
+ */
2102
+ moveSectionItem(request?: protos.google.chat.v1.IMoveSectionItemRequest, options?: CallOptions): Promise<[
2103
+ protos.google.chat.v1.IMoveSectionItemResponse,
2104
+ protos.google.chat.v1.IMoveSectionItemRequest | undefined,
2105
+ {} | undefined
2106
+ ]>;
2107
+ 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;
2108
+ 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
2109
  /**
1915
2110
  * Lists messages in a space that the caller is a member of, including
1916
2111
  * messages from blocked members and spaces. System messages, like those
@@ -1927,9 +2122,8 @@ export declare class ChatServiceClient {
1927
2122
  * - [App
1928
2123
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
1929
2124
  * with [administrator
1930
- * approval](https://support.google.com/a?p=chat-app-auth) in
1931
- * [Developer Preview](https://developers.google.com/workspace/preview)
1932
- * with the authorization scope:
2125
+ * approval](https://support.google.com/a?p=chat-app-auth)
2126
+ * with the authorization scope:
1933
2127
  * - `https://www.googleapis.com/auth/chat.app.messages.readonly`. When
1934
2128
  * using this authentication scope, this method only returns public
1935
2129
  * messages in a space. It doesn't include private messages.
@@ -3632,12 +3826,13 @@ export declare class ChatServiceClient {
3632
3826
  * - [App
3633
3827
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
3634
3828
  * with [administrator
3635
- * approval](https://support.google.com/a?p=chat-app-auth) in
3636
- * [Developer Preview](https://developers.google.com/workspace/preview)
3637
- * with one of the following authorization scopes:
3829
+ * approval](https://support.google.com/a?p=chat-app-auth)
3830
+ * with one of the following authorization scopes:
3638
3831
  * - `https://www.googleapis.com/auth/chat.app.spaces`
3832
+ * - `https://www.googleapis.com/auth/chat.app.spaces.readonly`
3639
3833
  * - `https://www.googleapis.com/auth/chat.app.messages.readonly`
3640
3834
  * - `https://www.googleapis.com/auth/chat.app.memberships`
3835
+ * - `https://www.googleapis.com/auth/chat.app.memberships.readonly`
3641
3836
  *
3642
3837
  * - [User
3643
3838
  * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
@@ -3925,6 +4120,335 @@ export declare class ChatServiceClient {
3925
4120
  * region_tag:chat_v1_generated_ChatService_ListSpaceEvents_async
3926
4121
  */
3927
4122
  listSpaceEventsAsync(request?: protos.google.chat.v1.IListSpaceEventsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISpaceEvent>;
4123
+ /**
4124
+ * Lists sections available to the Chat user. Sections help users group their
4125
+ * conversations and customize the list of spaces displayed in Chat
4126
+ * navigation panel. For details, see [Create and organize sections in Google
4127
+ * Chat](https://support.google.com/chat/answer/16059854).
4128
+ *
4129
+ * Requires [user
4130
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
4131
+ * with the [authorization
4132
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
4133
+ *
4134
+ * - `https://www.googleapis.com/auth/chat.users.sections`
4135
+ * - `https://www.googleapis.com/auth/chat.users.sections.readonly`
4136
+ *
4137
+ * @param {Object} request
4138
+ * The request object that will be sent.
4139
+ * @param {string} request.parent
4140
+ * Required. The parent, which is the user resource name that owns this
4141
+ * collection of sections. Only supports listing sections for the calling
4142
+ * user. To refer to the calling user, set one of the following:
4143
+ *
4144
+ * - The `me` alias. For example, `users/me`.
4145
+ *
4146
+ * - Their Workspace email address. For example, `users/user@example.com`.
4147
+ *
4148
+ * - Their user id. For example, `users/123456789`.
4149
+ *
4150
+ * Format: `users/{user}`
4151
+ * @param {number} [request.pageSize]
4152
+ * Optional. The maximum number of sections to return. The service may return
4153
+ * fewer than this value.
4154
+ *
4155
+ * If unspecified, at most 10 sections will be returned.
4156
+ *
4157
+ * The maximum value is 100. If you use a value more than 100, it's
4158
+ * automatically changed to 100.
4159
+ *
4160
+ * Negative values return an `INVALID_ARGUMENT` error.
4161
+ * @param {string} [request.pageToken]
4162
+ * Optional. A page token, received from a previous list sections call.
4163
+ * Provide this to retrieve the subsequent page.
4164
+ *
4165
+ * When paginating, all other parameters provided should match the call that
4166
+ * provided the page token. Passing different values to the other parameters
4167
+ * might lead to unexpected results.
4168
+ * @param {object} [options]
4169
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4170
+ * @returns {Promise} - The promise which resolves to an array.
4171
+ * The first element of the array is Array of {@link protos.google.chat.v1.Section|Section}.
4172
+ * The client library will perform auto-pagination by default: it will call the API as many
4173
+ * times as needed and will merge results from all the pages into this array.
4174
+ * Note that it can affect your quota.
4175
+ * We recommend using `listSectionsAsync()`
4176
+ * method described below for async iteration which you can stop as needed.
4177
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4178
+ * for more details and examples.
4179
+ */
4180
+ listSections(request?: protos.google.chat.v1.IListSectionsRequest, options?: CallOptions): Promise<[
4181
+ protos.google.chat.v1.ISection[],
4182
+ protos.google.chat.v1.IListSectionsRequest | null,
4183
+ protos.google.chat.v1.IListSectionsResponse
4184
+ ]>;
4185
+ 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;
4186
+ 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;
4187
+ /**
4188
+ * Equivalent to `listSections`, but returns a NodeJS Stream object.
4189
+ * @param {Object} request
4190
+ * The request object that will be sent.
4191
+ * @param {string} request.parent
4192
+ * Required. The parent, which is the user resource name that owns this
4193
+ * collection of sections. Only supports listing sections for the calling
4194
+ * user. To refer to the calling user, set one of the following:
4195
+ *
4196
+ * - The `me` alias. For example, `users/me`.
4197
+ *
4198
+ * - Their Workspace email address. For example, `users/user@example.com`.
4199
+ *
4200
+ * - Their user id. For example, `users/123456789`.
4201
+ *
4202
+ * Format: `users/{user}`
4203
+ * @param {number} [request.pageSize]
4204
+ * Optional. The maximum number of sections to return. The service may return
4205
+ * fewer than this value.
4206
+ *
4207
+ * If unspecified, at most 10 sections will be returned.
4208
+ *
4209
+ * The maximum value is 100. If you use a value more than 100, it's
4210
+ * automatically changed to 100.
4211
+ *
4212
+ * Negative values return an `INVALID_ARGUMENT` error.
4213
+ * @param {string} [request.pageToken]
4214
+ * Optional. A page token, received from a previous list sections call.
4215
+ * Provide this to retrieve the subsequent page.
4216
+ *
4217
+ * When paginating, all other parameters provided should match the call that
4218
+ * provided the page token. Passing different values to the other parameters
4219
+ * might lead to unexpected results.
4220
+ * @param {object} [options]
4221
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4222
+ * @returns {Stream}
4223
+ * An object stream which emits an object representing {@link protos.google.chat.v1.Section|Section} on 'data' event.
4224
+ * The client library will perform auto-pagination by default: it will call the API as many
4225
+ * times as needed. Note that it can affect your quota.
4226
+ * We recommend using `listSectionsAsync()`
4227
+ * method described below for async iteration which you can stop as needed.
4228
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4229
+ * for more details and examples.
4230
+ */
4231
+ listSectionsStream(request?: protos.google.chat.v1.IListSectionsRequest, options?: CallOptions): Transform;
4232
+ /**
4233
+ * Equivalent to `listSections`, but returns an iterable object.
4234
+ *
4235
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
4236
+ * @param {Object} request
4237
+ * The request object that will be sent.
4238
+ * @param {string} request.parent
4239
+ * Required. The parent, which is the user resource name that owns this
4240
+ * collection of sections. Only supports listing sections for the calling
4241
+ * user. To refer to the calling user, set one of the following:
4242
+ *
4243
+ * - The `me` alias. For example, `users/me`.
4244
+ *
4245
+ * - Their Workspace email address. For example, `users/user@example.com`.
4246
+ *
4247
+ * - Their user id. For example, `users/123456789`.
4248
+ *
4249
+ * Format: `users/{user}`
4250
+ * @param {number} [request.pageSize]
4251
+ * Optional. The maximum number of sections to return. The service may return
4252
+ * fewer than this value.
4253
+ *
4254
+ * If unspecified, at most 10 sections will be returned.
4255
+ *
4256
+ * The maximum value is 100. If you use a value more than 100, it's
4257
+ * automatically changed to 100.
4258
+ *
4259
+ * Negative values return an `INVALID_ARGUMENT` error.
4260
+ * @param {string} [request.pageToken]
4261
+ * Optional. A page token, received from a previous list sections call.
4262
+ * Provide this to retrieve the subsequent page.
4263
+ *
4264
+ * When paginating, all other parameters provided should match the call that
4265
+ * provided the page token. Passing different values to the other parameters
4266
+ * might lead to unexpected results.
4267
+ * @param {object} [options]
4268
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4269
+ * @returns {Object}
4270
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
4271
+ * When you iterate the returned iterable, each element will be an object representing
4272
+ * {@link protos.google.chat.v1.Section|Section}. The API will be called under the hood as needed, once per the page,
4273
+ * so you can stop the iteration when you don't need more results.
4274
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4275
+ * for more details and examples.
4276
+ * @example <caption>include:samples/generated/v1/chat_service.list_sections.js</caption>
4277
+ * region_tag:chat_v1_generated_ChatService_ListSections_async
4278
+ */
4279
+ listSectionsAsync(request?: protos.google.chat.v1.IListSectionsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISection>;
4280
+ /**
4281
+ * Lists items in a section.
4282
+ *
4283
+ * Only spaces can be section items. For details, see [Create and organize
4284
+ * sections in Google Chat](https://support.google.com/chat/answer/16059854).
4285
+ *
4286
+ * Requires [user
4287
+ * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
4288
+ * with the [authorization
4289
+ * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes):
4290
+ *
4291
+ * - `https://www.googleapis.com/auth/chat.users.sections`
4292
+ * - `https://www.googleapis.com/auth/chat.users.sections.readonly`
4293
+ *
4294
+ * @param {Object} request
4295
+ * The request object that will be sent.
4296
+ * @param {string} request.parent
4297
+ * Required. The parent, which is the section resource name that owns this
4298
+ * collection of section items. Only supports listing section items for the
4299
+ * calling user.
4300
+ *
4301
+ * When you're filtering by space, use the wildcard `-` to search across all
4302
+ * sections. For example, `users/{user}/sections/-`.
4303
+ *
4304
+ * Format: `users/{user}/sections/{section}`
4305
+ * @param {number} [request.pageSize]
4306
+ * Optional. The maximum number of section items to return. The service may
4307
+ * return fewer than this value.
4308
+ *
4309
+ * If unspecified, at most 10 section items will be returned.
4310
+ *
4311
+ * The maximum value is 100. If you use a value more than 100, it's
4312
+ * automatically changed to 100.
4313
+ *
4314
+ * Negative values return an `INVALID_ARGUMENT` error.
4315
+ * @param {string} [request.pageToken]
4316
+ * Optional. A page token, received from a previous list section items call.
4317
+ * Provide this to retrieve the subsequent page.
4318
+ *
4319
+ * When paginating, all other parameters provided should match the call that
4320
+ * provided the page token. Passing different values to the other parameters
4321
+ * might lead to unexpected results.
4322
+ * @param {string} [request.filter]
4323
+ * Optional. A query filter.
4324
+ *
4325
+ * Currently only supports filtering by space.
4326
+ *
4327
+ * For example, `space = spaces/{space}`.
4328
+ *
4329
+ * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
4330
+ * @param {object} [options]
4331
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4332
+ * @returns {Promise} - The promise which resolves to an array.
4333
+ * The first element of the array is Array of {@link protos.google.chat.v1.SectionItem|SectionItem}.
4334
+ * The client library will perform auto-pagination by default: it will call the API as many
4335
+ * times as needed and will merge results from all the pages into this array.
4336
+ * Note that it can affect your quota.
4337
+ * We recommend using `listSectionItemsAsync()`
4338
+ * method described below for async iteration which you can stop as needed.
4339
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4340
+ * for more details and examples.
4341
+ */
4342
+ listSectionItems(request?: protos.google.chat.v1.IListSectionItemsRequest, options?: CallOptions): Promise<[
4343
+ protos.google.chat.v1.ISectionItem[],
4344
+ protos.google.chat.v1.IListSectionItemsRequest | null,
4345
+ protos.google.chat.v1.IListSectionItemsResponse
4346
+ ]>;
4347
+ 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;
4348
+ 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;
4349
+ /**
4350
+ * Equivalent to `listSectionItems`, but returns a NodeJS Stream object.
4351
+ * @param {Object} request
4352
+ * The request object that will be sent.
4353
+ * @param {string} request.parent
4354
+ * Required. The parent, which is the section resource name that owns this
4355
+ * collection of section items. Only supports listing section items for the
4356
+ * calling user.
4357
+ *
4358
+ * When you're filtering by space, use the wildcard `-` to search across all
4359
+ * sections. For example, `users/{user}/sections/-`.
4360
+ *
4361
+ * Format: `users/{user}/sections/{section}`
4362
+ * @param {number} [request.pageSize]
4363
+ * Optional. The maximum number of section items to return. The service may
4364
+ * return fewer than this value.
4365
+ *
4366
+ * If unspecified, at most 10 section items will be returned.
4367
+ *
4368
+ * The maximum value is 100. If you use a value more than 100, it's
4369
+ * automatically changed to 100.
4370
+ *
4371
+ * Negative values return an `INVALID_ARGUMENT` error.
4372
+ * @param {string} [request.pageToken]
4373
+ * Optional. A page token, received from a previous list section items call.
4374
+ * Provide this to retrieve the subsequent page.
4375
+ *
4376
+ * When paginating, all other parameters provided should match the call that
4377
+ * provided the page token. Passing different values to the other parameters
4378
+ * might lead to unexpected results.
4379
+ * @param {string} [request.filter]
4380
+ * Optional. A query filter.
4381
+ *
4382
+ * Currently only supports filtering by space.
4383
+ *
4384
+ * For example, `space = spaces/{space}`.
4385
+ *
4386
+ * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
4387
+ * @param {object} [options]
4388
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4389
+ * @returns {Stream}
4390
+ * An object stream which emits an object representing {@link protos.google.chat.v1.SectionItem|SectionItem} on 'data' event.
4391
+ * The client library will perform auto-pagination by default: it will call the API as many
4392
+ * times as needed. Note that it can affect your quota.
4393
+ * We recommend using `listSectionItemsAsync()`
4394
+ * method described below for async iteration which you can stop as needed.
4395
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4396
+ * for more details and examples.
4397
+ */
4398
+ listSectionItemsStream(request?: protos.google.chat.v1.IListSectionItemsRequest, options?: CallOptions): Transform;
4399
+ /**
4400
+ * Equivalent to `listSectionItems`, but returns an iterable object.
4401
+ *
4402
+ * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
4403
+ * @param {Object} request
4404
+ * The request object that will be sent.
4405
+ * @param {string} request.parent
4406
+ * Required. The parent, which is the section resource name that owns this
4407
+ * collection of section items. Only supports listing section items for the
4408
+ * calling user.
4409
+ *
4410
+ * When you're filtering by space, use the wildcard `-` to search across all
4411
+ * sections. For example, `users/{user}/sections/-`.
4412
+ *
4413
+ * Format: `users/{user}/sections/{section}`
4414
+ * @param {number} [request.pageSize]
4415
+ * Optional. The maximum number of section items to return. The service may
4416
+ * return fewer than this value.
4417
+ *
4418
+ * If unspecified, at most 10 section items will be returned.
4419
+ *
4420
+ * The maximum value is 100. If you use a value more than 100, it's
4421
+ * automatically changed to 100.
4422
+ *
4423
+ * Negative values return an `INVALID_ARGUMENT` error.
4424
+ * @param {string} [request.pageToken]
4425
+ * Optional. A page token, received from a previous list section items call.
4426
+ * Provide this to retrieve the subsequent page.
4427
+ *
4428
+ * When paginating, all other parameters provided should match the call that
4429
+ * provided the page token. Passing different values to the other parameters
4430
+ * might lead to unexpected results.
4431
+ * @param {string} [request.filter]
4432
+ * Optional. A query filter.
4433
+ *
4434
+ * Currently only supports filtering by space.
4435
+ *
4436
+ * For example, `space = spaces/{space}`.
4437
+ *
4438
+ * Invalid queries are rejected with an `INVALID_ARGUMENT` error.
4439
+ * @param {object} [options]
4440
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
4441
+ * @returns {Object}
4442
+ * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
4443
+ * When you iterate the returned iterable, each element will be an object representing
4444
+ * {@link protos.google.chat.v1.SectionItem|SectionItem}. The API will be called under the hood as needed, once per the page,
4445
+ * so you can stop the iteration when you don't need more results.
4446
+ * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
4447
+ * for more details and examples.
4448
+ * @example <caption>include:samples/generated/v1/chat_service.list_section_items.js</caption>
4449
+ * region_tag:chat_v1_generated_ChatService_ListSectionItems_async
4450
+ */
4451
+ listSectionItemsAsync(request?: protos.google.chat.v1.IListSectionItemsRequest, options?: CallOptions): AsyncIterable<protos.google.chat.v1.ISectionItem>;
3928
4452
  /**
3929
4453
  * Return a fully-qualified attachment resource name string.
3930
4454
  *
@@ -4087,6 +4611,63 @@ export declare class ChatServiceClient {
4087
4611
  * @returns {string} A string representing the reaction.
4088
4612
  */
4089
4613
  matchReactionFromReactionName(reactionName: string): string | number;
4614
+ /**
4615
+ * Return a fully-qualified section resource name string.
4616
+ *
4617
+ * @param {string} user
4618
+ * @param {string} section
4619
+ * @returns {string} Resource name string.
4620
+ */
4621
+ sectionPath(user: string, section: string): string;
4622
+ /**
4623
+ * Parse the user from Section resource.
4624
+ *
4625
+ * @param {string} sectionName
4626
+ * A fully-qualified path representing Section resource.
4627
+ * @returns {string} A string representing the user.
4628
+ */
4629
+ matchUserFromSectionName(sectionName: string): string | number;
4630
+ /**
4631
+ * Parse the section from Section resource.
4632
+ *
4633
+ * @param {string} sectionName
4634
+ * A fully-qualified path representing Section resource.
4635
+ * @returns {string} A string representing the section.
4636
+ */
4637
+ matchSectionFromSectionName(sectionName: string): string | number;
4638
+ /**
4639
+ * Return a fully-qualified sectionItem resource name string.
4640
+ *
4641
+ * @param {string} user
4642
+ * @param {string} section
4643
+ * @param {string} item
4644
+ * @returns {string} Resource name string.
4645
+ */
4646
+ sectionItemPath(user: string, section: string, item: string): string;
4647
+ /**
4648
+ * Parse the user from SectionItem resource.
4649
+ *
4650
+ * @param {string} sectionItemName
4651
+ * A fully-qualified path representing SectionItem resource.
4652
+ * @returns {string} A string representing the user.
4653
+ */
4654
+ matchUserFromSectionItemName(sectionItemName: string): string | number;
4655
+ /**
4656
+ * Parse the section from SectionItem resource.
4657
+ *
4658
+ * @param {string} sectionItemName
4659
+ * A fully-qualified path representing SectionItem resource.
4660
+ * @returns {string} A string representing the section.
4661
+ */
4662
+ matchSectionFromSectionItemName(sectionItemName: string): string | number;
4663
+ /**
4664
+ * Parse the item from SectionItem resource.
4665
+ *
4666
+ * @param {string} sectionItemName
4667
+ * A fully-qualified path representing SectionItem resource.
4668
+ * @returns {string} A string representing the item.
4669
+ */
4670
+ matchItemFromSectionItemName(sectionItemName: string): string | number;
4090
4671
  /**
4091
4672
  * Return a fully-qualified space resource name string.
4092
4673
  *