@google-apps/chat 0.5.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.6.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.5.0...chat-v0.6.0) (2024-07-10)
4
+
5
+
6
+ ### Features
7
+
8
+ * [chat] Add doc for Discoverable Space support for GA launch ([#5525](https://github.com/googleapis/google-cloud-node/issues/5525)) ([9a80089](https://github.com/googleapis/google-cloud-node/commit/9a80089d974280420e269f24aba563f4adceb4c3))
9
+
3
10
  ## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.4.0...chat-v0.5.0) (2024-05-21)
4
11
 
5
12
 
@@ -48,7 +48,7 @@ message Attachment {
48
48
  }
49
49
 
50
50
  // Resource name of the attachment, in the form
51
- // `spaces/*/messages/*/attachments/*`.
51
+ // `spaces/{space}/messages/{message}/attachments/{attachment}`.
52
52
  string name = 1;
53
53
 
54
54
  // Output only. The original file name for the content, not the full path.
@@ -103,7 +103,7 @@ message AttachmentDataRef {
103
103
  // Request to get an attachment.
104
104
  message GetAttachmentRequest {
105
105
  // Required. Resource name of the attachment, in the form
106
- // `spaces/*/messages/*/attachments/*`.
106
+ // `spaces/{space}/messages/{message}/attachments/{attachment}`.
107
107
  string name = 1 [
108
108
  (google.api.field_behavior) = REQUIRED,
109
109
  (google.api.resource_reference) = { type: "chat.googleapis.com/Attachment" }
@@ -42,6 +42,11 @@ option ruby_package = "Google::Apps::Chat::V1";
42
42
  service ChatService {
43
43
  option (google.api.default_host) = "chat.googleapis.com";
44
44
  option (google.api.oauth_scopes) =
45
+ "https://www.googleapis.com/auth/chat.admin.delete,"
46
+ "https://www.googleapis.com/auth/chat.admin.memberships,"
47
+ "https://www.googleapis.com/auth/chat.admin.memberships.readonly,"
48
+ "https://www.googleapis.com/auth/chat.admin.spaces,"
49
+ "https://www.googleapis.com/auth/chat.admin.spaces.readonly,"
45
50
  "https://www.googleapis.com/auth/chat.bot,"
46
51
  "https://www.googleapis.com/auth/chat.delete,"
47
52
  "https://www.googleapis.com/auth/chat.import,"
@@ -253,6 +258,9 @@ service ChatService {
253
258
  // Lists spaces visible to the caller or authenticated user. Group chats
254
259
  // and DMs aren't listed until the first message is sent.
255
260
  //
261
+ // To list all named spaces by Google Workspace organization, use the
262
+ // [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search)
263
+ // method using Workspace administrator privileges instead.
256
264
  rpc ListSpaces(ListSpacesRequest) returns (ListSpacesResponse) {
257
265
  option (google.api.http) = {
258
266
  get: "/v1/spaces"
@@ -311,6 +319,17 @@ service ChatService {
311
319
  // you can add the user to the space by setting the `membership.member.name`
312
320
  // to `users/user@example.com` or `users/123456789`.
313
321
  //
322
+ // To specify the Google groups to add, add memberships with the
323
+ // appropriate `membership.group_member.name`. To add or invite a Google
324
+ // group, use `groups/{group}`, where `{group}` is the `id` for the group from
325
+ // the Cloud Identity Groups API. For example, you can use [Cloud Identity
326
+ // Groups lookup
327
+ // API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
328
+ // to retrieve the ID `123456789` for group email `group@example.com`, then
329
+ // you can add the group to the space by setting the
330
+ // `membership.group_member.name` to `groups/123456789`. Group email is not
331
+ // supported, and Google groups can only be added as members in named spaces.
332
+ //
314
333
  // For a named space or group chat, if the caller blocks, or is blocked
315
334
  // by some members, or doesn't have permission to add some members, then
316
335
  // those members aren't added to the created space.
@@ -427,7 +446,8 @@ service ChatService {
427
446
  // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
428
447
  //
429
448
  // To specify the member to add, set the `membership.member.name` for the
430
- // human or app member.
449
+ // human or app member, or set the `membership.group_member.name` for the
450
+ // group member.
431
451
  //
432
452
  // - To add the calling app to a space or a direct message between two human
433
453
  // users, use `users/app`. Unable to add other
@@ -440,6 +460,15 @@ service ChatService {
440
460
  // profile ID for `user@example.com` is `123456789`, you can add the user to
441
461
  // the space by setting the `membership.member.name` to
442
462
  // `users/user@example.com` or `users/123456789`.
463
+ //
464
+ // - To add or invite a Google group in a named space, use
465
+ // `groups/{group}`, where `{group}` is the `id` for the group from the Cloud
466
+ // Identity Groups API. For example, you can use [Cloud Identity Groups lookup
467
+ // API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup)
468
+ // to retrieve the ID `123456789` for group email `group@example.com`, then
469
+ // you can add or invite the group to a named space by setting the
470
+ // `membership.group_member.name` to `groups/123456789`. Group email is not
471
+ // supported, and Google groups can only be added as members in named spaces.
443
472
  rpc CreateMembership(CreateMembershipRequest) returns (Membership) {
444
473
  option (google.api.http) = {
445
474
  post: "/v1/{parent=spaces/*}/members"
@@ -106,8 +106,6 @@ message Membership {
106
106
  User member = 3;
107
107
 
108
108
  // The Google Group the membership corresponds to.
109
- // Only supports read operations. Other operations, like
110
- // creating or updating a membership, aren't currently supported.
111
109
  Group group_member = 5;
112
110
  }
113
111
 
@@ -217,16 +215,23 @@ message ListMembershipsRequest {
217
215
  //
218
216
  // To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`.
219
217
  //
220
- // To filter by type, set `member.type` to `HUMAN` or `BOT`.
218
+ // To filter by type, set `member.type` to `HUMAN` or `BOT`. Developer
219
+ // Preview: You can also filter for `member.type` using the `!=` operator.
221
220
  //
222
221
  // To filter by both role and type, use the `AND` operator. To filter by
223
222
  // either role or type, use the `OR` operator.
224
223
  //
224
+ // Either `member.type = "HUMAN"` or `member.type != "BOT"` is required
225
+ // when `use_admin_access` is set to true. Other member type filters will be
226
+ // rejected.
227
+ //
225
228
  // For example, the following queries are valid:
226
229
  //
227
230
  // ```
228
231
  // role = "ROLE_MANAGER" OR role = "ROLE_MEMBER"
229
232
  // member.type = "HUMAN" AND role = "ROLE_MANAGER"
233
+ //
234
+ // member.type != "BOT"
230
235
  // ```
231
236
  //
232
237
  // The following queries are invalid:
@@ -236,7 +241,6 @@ message ListMembershipsRequest {
236
241
  // role = "ROLE_MANAGER" AND role = "ROLE_MEMBER"
237
242
  // ```
238
243
  //
239
- //
240
244
  // Invalid queries are rejected by the server with an `INVALID_ARGUMENT`
241
245
  // error.
242
246
  string filter = 5 [(google.api.field_behavior) = OPTIONAL];
@@ -103,6 +103,39 @@ message Space {
103
103
  string guidelines = 2;
104
104
  }
105
105
 
106
+ // Represents the [access
107
+ // setting](https://support.google.com/chat/answer/11971020) of the space.
108
+ message AccessSettings {
109
+ // Represents the access state of the space.
110
+ enum AccessState {
111
+ // Access state is unknown or not supported in this API.
112
+ ACCESS_STATE_UNSPECIFIED = 0;
113
+
114
+ // Space is discoverable by added or invited members or groups.
115
+ PRIVATE = 1;
116
+
117
+ // Space is discoverable by the selected [target
118
+ // audience](https://support.google.com/a/answer/9934697), as well as
119
+ // added or invited members or groups.
120
+ DISCOVERABLE = 2;
121
+ }
122
+
123
+ // Output only. Indicates the access state of the space.
124
+ AccessState access_state = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
125
+
126
+ // Optional. The resource name of the [target
127
+ // audience](https://support.google.com/a/answer/9934697) who can discover
128
+ // the space, join the space, and preview the messages in the space. For
129
+ // details, see [Make a space discoverable to a target
130
+ // audience](https://developers.google.com/workspace/chat/space-target-audience).
131
+ //
132
+ // Format: `audiences/{audience}`
133
+ //
134
+ // To use the default target audience for the Google Workspace organization,
135
+ // set to `audiences/default`.
136
+ string audience = 3 [(google.api.field_behavior) = OPTIONAL];
137
+ }
138
+
106
139
  // Resource name of the space.
107
140
  //
108
141
  // Format: `spaces/{space}`
@@ -192,6 +225,14 @@ message Space {
192
225
  //
193
226
  // To support admin install, your Chat app must feature direct messaging.
194
227
  bool admin_installed = 19 [(google.api.field_behavior) = OUTPUT_ONLY];
228
+
229
+ // Optional. Specifies the [access
230
+ // setting](https://support.google.com/chat/answer/11971020) of the space.
231
+ // Only populated when the `space_type` is `SPACE`.
232
+ AccessSettings access_settings = 23 [(google.api.field_behavior) = OPTIONAL];
233
+
234
+ // Output only. The URI for a user to access the space.
235
+ string space_uri = 25 [(google.api.field_behavior) = OUTPUT_ONLY];
195
236
  }
196
237
 
197
238
  // A request to create a named space.
@@ -270,7 +311,7 @@ message ListSpacesResponse {
270
311
 
271
312
  // A request to return a single space.
272
313
  message GetSpaceRequest {
273
- // Required. Resource name of the space, in the form "spaces/*".
314
+ // Required. Resource name of the space, in the form `spaces/{space}`.
274
315
  //
275
316
  // Format: `spaces/{space}`
276
317
  string name = 1 [
@@ -325,6 +366,7 @@ message UpdateSpaceRequest {
325
366
  // the display name is optional if the existing space already has the `SPACE`
326
367
  // type. Trying to update the space type in other ways results in an invalid
327
368
  // argument error).
369
+ // `space_type` is not supported with admin access.
328
370
  //
329
371
  // - `space_details`
330
372
  //
@@ -333,12 +375,27 @@ message UpdateSpaceRequest {
333
375
  // allows users to change their history
334
376
  // setting](https://support.google.com/a/answer/7664184).
335
377
  // Warning: mutually exclusive with all other field paths.)
378
+ // `space_history_state` is not supported with admin access.
379
+ //
380
+ // - `access_settings.audience` (Supports changing the [access
381
+ // setting](https://support.google.com/chat/answer/11971020) of who can
382
+ // discover the space, join the space, and preview the messages in space. If
383
+ // no audience is specified in the access setting, the space's access setting
384
+ // is updated to private. Warning: mutually exclusive with all other field
385
+ // paths.)
386
+ // `access_settings.audience` is not supported with admin access.
336
387
  //
337
- // - Developer Preview: `access_settings.audience` (Supports changing the
338
- // [access setting](https://support.google.com/chat/answer/11971020) of a
339
- // space. If no audience is specified in the access setting, the space's
340
- // access setting is updated to restricted. Warning: mutually exclusive with
341
- // all other field paths.)
388
+ // - Developer Preview: Supports changing the [permission
389
+ // settings](https://support.google.com/chat/answer/13340792) of a space,
390
+ // supported field paths
391
+ // include: `permission_settings.manage_members_and_groups`,
392
+ // `permission_settings.modify_space_details`,
393
+ // `permission_settings.toggle_history`,
394
+ // `permission_settings.use_at_mention_all`,
395
+ // `permission_settings.manage_apps`, `permission_settings.manage_webhooks`,
396
+ // `permission_settings.reply_messages`
397
+ // (Warning: mutually exclusive with all other non-permission settings field
398
+ // paths). `permission_settings` is not supported with admin access.
342
399
  google.protobuf.FieldMask update_mask = 2;
343
400
  }
344
401
 
@@ -64,8 +64,8 @@ message SetUpSpaceRequest {
64
64
  // authenticated user returns an error.
65
65
  string request_id = 2 [(google.api.field_behavior) = OPTIONAL];
66
66
 
67
- // Optional. The Google Chat users to invite to join the space. Omit the
68
- // calling user, as they are added automatically.
67
+ // Optional. The Google Chat users or groups to invite to join the space. Omit
68
+ // the calling user, as they are added automatically.
69
69
  //
70
70
  // The set currently allows up to 20 memberships (in addition to the caller).
71
71
  //
@@ -78,6 +78,10 @@ message SetUpSpaceRequest {
78
78
  // To invite Gmail users or users from external Google Workspace domains,
79
79
  // user's email must be used for `{user}`.
80
80
  //
81
+ // For Google group membership, the `Membership.group_member` field must
82
+ // contain a `group` with `name` populated (format `groups/{group}`). You
83
+ // can only add Google groups when setting `Space.spaceType` to `SPACE`.
84
+ //
81
85
  // Optional when setting `Space.spaceType` to `SPACE`.
82
86
  //
83
87
  // Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at
@@ -17563,6 +17563,12 @@ export namespace google {
17563
17563
 
17564
17564
  /** Space adminInstalled */
17565
17565
  adminInstalled?: (boolean|null);
17566
+
17567
+ /** Space accessSettings */
17568
+ accessSettings?: (google.chat.v1.Space.IAccessSettings|null);
17569
+
17570
+ /** Space spaceUri */
17571
+ spaceUri?: (string|null);
17566
17572
  }
17567
17573
 
17568
17574
  /** Represents a Space. */
@@ -17613,6 +17619,12 @@ export namespace google {
17613
17619
  /** Space adminInstalled. */
17614
17620
  public adminInstalled: boolean;
17615
17621
 
17622
+ /** Space accessSettings. */
17623
+ public accessSettings?: (google.chat.v1.Space.IAccessSettings|null);
17624
+
17625
+ /** Space spaceUri. */
17626
+ public spaceUri: string;
17627
+
17616
17628
  /**
17617
17629
  * Creates a new Space instance using the specified properties.
17618
17630
  * @param [properties] Properties to set
@@ -17818,6 +17830,119 @@ export namespace google {
17818
17830
  */
17819
17831
  public static getTypeUrl(typeUrlPrefix?: string): string;
17820
17832
  }
17833
+
17834
+ /** Properties of an AccessSettings. */
17835
+ interface IAccessSettings {
17836
+
17837
+ /** AccessSettings accessState */
17838
+ accessState?: (google.chat.v1.Space.AccessSettings.AccessState|keyof typeof google.chat.v1.Space.AccessSettings.AccessState|null);
17839
+
17840
+ /** AccessSettings audience */
17841
+ audience?: (string|null);
17842
+ }
17843
+
17844
+ /** Represents an AccessSettings. */
17845
+ class AccessSettings implements IAccessSettings {
17846
+
17847
+ /**
17848
+ * Constructs a new AccessSettings.
17849
+ * @param [properties] Properties to set
17850
+ */
17851
+ constructor(properties?: google.chat.v1.Space.IAccessSettings);
17852
+
17853
+ /** AccessSettings accessState. */
17854
+ public accessState: (google.chat.v1.Space.AccessSettings.AccessState|keyof typeof google.chat.v1.Space.AccessSettings.AccessState);
17855
+
17856
+ /** AccessSettings audience. */
17857
+ public audience: string;
17858
+
17859
+ /**
17860
+ * Creates a new AccessSettings instance using the specified properties.
17861
+ * @param [properties] Properties to set
17862
+ * @returns AccessSettings instance
17863
+ */
17864
+ public static create(properties?: google.chat.v1.Space.IAccessSettings): google.chat.v1.Space.AccessSettings;
17865
+
17866
+ /**
17867
+ * Encodes the specified AccessSettings message. Does not implicitly {@link google.chat.v1.Space.AccessSettings.verify|verify} messages.
17868
+ * @param message AccessSettings message or plain object to encode
17869
+ * @param [writer] Writer to encode to
17870
+ * @returns Writer
17871
+ */
17872
+ public static encode(message: google.chat.v1.Space.IAccessSettings, writer?: $protobuf.Writer): $protobuf.Writer;
17873
+
17874
+ /**
17875
+ * Encodes the specified AccessSettings message, length delimited. Does not implicitly {@link google.chat.v1.Space.AccessSettings.verify|verify} messages.
17876
+ * @param message AccessSettings message or plain object to encode
17877
+ * @param [writer] Writer to encode to
17878
+ * @returns Writer
17879
+ */
17880
+ public static encodeDelimited(message: google.chat.v1.Space.IAccessSettings, writer?: $protobuf.Writer): $protobuf.Writer;
17881
+
17882
+ /**
17883
+ * Decodes an AccessSettings message from the specified reader or buffer.
17884
+ * @param reader Reader or buffer to decode from
17885
+ * @param [length] Message length if known beforehand
17886
+ * @returns AccessSettings
17887
+ * @throws {Error} If the payload is not a reader or valid buffer
17888
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
17889
+ */
17890
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.chat.v1.Space.AccessSettings;
17891
+
17892
+ /**
17893
+ * Decodes an AccessSettings message from the specified reader or buffer, length delimited.
17894
+ * @param reader Reader or buffer to decode from
17895
+ * @returns AccessSettings
17896
+ * @throws {Error} If the payload is not a reader or valid buffer
17897
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
17898
+ */
17899
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.chat.v1.Space.AccessSettings;
17900
+
17901
+ /**
17902
+ * Verifies an AccessSettings message.
17903
+ * @param message Plain object to verify
17904
+ * @returns `null` if valid, otherwise the reason why it is not
17905
+ */
17906
+ public static verify(message: { [k: string]: any }): (string|null);
17907
+
17908
+ /**
17909
+ * Creates an AccessSettings message from a plain object. Also converts values to their respective internal types.
17910
+ * @param object Plain object
17911
+ * @returns AccessSettings
17912
+ */
17913
+ public static fromObject(object: { [k: string]: any }): google.chat.v1.Space.AccessSettings;
17914
+
17915
+ /**
17916
+ * Creates a plain object from an AccessSettings message. Also converts values to other types if specified.
17917
+ * @param message AccessSettings
17918
+ * @param [options] Conversion options
17919
+ * @returns Plain object
17920
+ */
17921
+ public static toObject(message: google.chat.v1.Space.AccessSettings, options?: $protobuf.IConversionOptions): { [k: string]: any };
17922
+
17923
+ /**
17924
+ * Converts this AccessSettings to JSON.
17925
+ * @returns JSON object
17926
+ */
17927
+ public toJSON(): { [k: string]: any };
17928
+
17929
+ /**
17930
+ * Gets the default type url for AccessSettings
17931
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
17932
+ * @returns The default type url
17933
+ */
17934
+ public static getTypeUrl(typeUrlPrefix?: string): string;
17935
+ }
17936
+
17937
+ namespace AccessSettings {
17938
+
17939
+ /** AccessState enum. */
17940
+ enum AccessState {
17941
+ ACCESS_STATE_UNSPECIFIED = 0,
17942
+ PRIVATE = 1,
17943
+ DISCOVERABLE = 2
17944
+ }
17945
+ }
17821
17946
  }
17822
17947
 
17823
17948
  /** Properties of a CreateSpaceRequest. */