@maxim_mazurok/gapi.client.chat-v1 0.0.20230723 → 0.0.20230729

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.
Files changed (4) hide show
  1. package/index.d.ts +49 -37
  2. package/package.json +1 -1
  3. package/readme.md +1 -1
  4. package/tests.ts +19 -17
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://chat.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20230723
12
+ // Revision: 20230729
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -483,7 +483,10 @@ declare namespace gapi.client {
483
483
  /** The divider style between sections. */
484
484
  sectionDividerStyle?:
485
485
  string;
486
- /** Contains a collection of widgets. Each section has its own, optional header. Sections are visually separated by a line divider. */
486
+ /**
487
+ * Contains a collection of widgets. Each section has its own, optional header. Sections are visually separated by a line divider. For an example in Google Chat apps, see [Card
488
+ * section](https://developers.google.com/chat/ui/widgets/card-section).
489
+ */
487
490
  sections?:
488
491
  GoogleAppsCardV1Section[];
489
492
  }
@@ -551,7 +554,7 @@ declare namespace gapi.client {
551
554
  string;
552
555
  /**
553
556
  * The name by which the `DateTimePicker` is identified in a form input event. For details about working with form inputs, see [Receive form
554
- * data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
557
+ * data](https://developers.google.com/chat/ui/read-form-data).
555
558
  */
556
559
  name?:
557
560
  string;
@@ -603,7 +606,7 @@ declare namespace gapi.client {
603
606
  GoogleAppsCardV1SwitchControl;
604
607
  /**
605
608
  * Required. The primary text. Supports simple formatting. For more information about formatting text, see [Formatting text in Google Chat
606
- * apps](https://developers.google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [Formatting text in Google Workspace
609
+ * apps](https://developers.google.com/chat/api/guides/message-formats/cards#card-formatting) and [Formatting text in Google Workspace
607
610
  * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
608
611
  */
609
612
  text?:
@@ -767,7 +770,7 @@ declare namespace gapi.client {
767
770
  boolean;
768
771
  /**
769
772
  * Text that appears at the top of a section. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat
770
- * apps](https://developers.google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [Formatting text in Google Workspace
773
+ * apps](https://developers.google.com/chat/api/guides/message-formats/cards#card-formatting) and [Formatting text in Google Workspace
771
774
  * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting).
772
775
  */
773
776
  header?:
@@ -810,13 +813,13 @@ declare namespace gapi.client {
810
813
  number;
811
814
  /**
812
815
  * The name that identifies the selection input in a form input event. For details about working with form inputs, see [Receive form
813
- * data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
816
+ * data](https://developers.google.com/chat/ui/read-form-data).
814
817
  */
815
818
  name?:
816
819
  string;
817
820
  /**
818
821
  * If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form. For details about working with form
819
- * inputs, see [Receive form data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
822
+ * inputs, see [Receive form data](https://developers.google.com/chat/ui/read-form-data).
820
823
  */
821
824
  onChangeAction?:
822
825
  GoogleAppsCardV1Action;
@@ -851,7 +854,7 @@ declare namespace gapi.client {
851
854
  string;
852
855
  /**
853
856
  * The value associated with this item. The client should use this as a form input value. For details about working with form inputs, see [Receive form
854
- * data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
857
+ * data](https://developers.google.com/chat/ui/read-form-data).
855
858
  */
856
859
  value?:
857
860
  string;
@@ -872,7 +875,7 @@ declare namespace gapi.client {
872
875
  string;
873
876
  /**
874
877
  * The name by which the switch widget is identified in a form input event. For details about working with form inputs, see [Receive form
875
- * data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
878
+ * data](https://developers.google.com/chat/ui/read-form-data).
876
879
  */
877
880
  name?:
878
881
  string;
@@ -884,7 +887,7 @@ declare namespace gapi.client {
884
887
  boolean;
885
888
  /**
886
889
  * The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form
887
- * data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
890
+ * data](https://developers.google.com/chat/ui/read-form-data).
888
891
  */
889
892
  value?:
890
893
  string;
@@ -919,7 +922,7 @@ declare namespace gapi.client {
919
922
  string;
920
923
  /**
921
924
  * The name by which the text input is identified in a form input event. For details about working with form inputs, see [Receive form
922
- * data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
925
+ * data](https://developers.google.com/chat/ui/read-form-data).
923
926
  */
924
927
  name?:
925
928
  string;
@@ -934,7 +937,7 @@ declare namespace gapi.client {
934
937
  string;
935
938
  /**
936
939
  * The value entered by a user, returned as part of a form input event. For details about working with form inputs, see [Receive form
937
- * data](https://developers.google.com/chat/how-tos/dialogs#receive_form_data_from_dialogs).
940
+ * data](https://developers.google.com/chat/ui/read-form-data).
938
941
  */
939
942
  value?:
940
943
  string;
@@ -1012,7 +1015,7 @@ declare namespace gapi.client {
1012
1015
  GoogleAppsCardV1TextInput;
1013
1016
  /**
1014
1017
  * Displays a text paragraph. Supports simple HTML formatted text. For more information about formatting text, see [Formatting text in Google Chat
1015
- * apps](https://developers.google.com/chat/api/guides/message-formats/cards#card_text_formatting) and [Formatting text in Google Workspace
1018
+ * apps](https://developers.google.com/chat/api/guides/message-formats/cards#card-formatting) and [Formatting text in Google Workspace
1016
1019
  * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). For example, the following JSON creates a bolded text: ``` "textParagraph": { "text": "
1017
1020
  * *bold text*" } ```
1018
1021
  */
@@ -1340,11 +1343,13 @@ declare namespace gapi.client {
1340
1343
  }
1341
1344
  interface SetUpSpaceRequest {
1342
1345
  /**
1343
- * Optional. The initial set of in-domain users invited to join the space. The calling user is automatically added to the space, and shouldn't be specified as a membership. The set
1344
- * currently allows up to 20 memberships (in addition to the caller). The `Membership.member` field must contain a user with `name` populated and `User.Type.HUMAN`. All other fields
1345
- * are ignored. Optional when setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships. Required when setting
1346
+ * Optional. The Google Chat users to invite to join the space. Omit the calling user, as they are added automatically. The set currently allows up to 20 memberships (in addition to
1347
+ * the caller). The `Membership.member` field must contain a `user` with `name` populated (format: `users/{user}`) and `type` set to `User.Type.HUMAN`. You can only add human users
1348
+ * when setting up a space (adding Chat apps is only supported for direct message setup with the calling app). You can also add members using the user's email as an alias for {user}.
1349
+ * For example, the `user.name` can be `users/example@gmail.com`." To invite Gmail users or users from external Google Workspace domains, user's email must be used for `{user}`.
1350
+ * Optional when setting `Space.spaceType` to `SPACE`. Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at least two memberships. Required when setting
1346
1351
  * `Space.spaceType` to `DIRECT_MESSAGE` with a human user, along with exactly one membership. Must be empty when creating a 1:1 conversation between a human and the calling Chat app
1347
- * (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). Not supported: Inviting guest users, or adding other Chat apps.
1352
+ * (when setting `Space.spaceType` to `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`).
1348
1353
  */
1349
1354
  memberships?:
1350
1355
  Membership[];
@@ -1686,10 +1691,10 @@ declare namespace gapi.client {
1686
1691
  * they're invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user
1687
1692
  * authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` (for human membership) or `chat.memberships.app` (for app membership) scope. To
1688
1693
  * specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to a space or a direct message between two human users, use
1689
- * `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the
1690
- * [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the
1691
- * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, if the People API `Person` `resourceName` is `people/123456789`,
1692
- * you can add the user to the space by setting the `membership.member.name` to `users/123456789`.
1694
+ * `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace
1695
+ * organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person
1696
+ * `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or
1697
+ * `users/123456789`.
1693
1698
  */
1694
1699
  create(request: {
1695
1700
  /** V1 error format. */
@@ -1796,8 +1801,9 @@ declare namespace gapi.client {
1796
1801
  string;
1797
1802
  /**
1798
1803
  * Required. Resource name of the membership to delete. Chat apps can delete human users' or their own memberships. Chat apps can't delete other apps' memberships. When deleting a
1799
- * human membership, requires the `chat.memberships` scope and `spaces/{space}/members/{member}` format. When deleting an app membership, requires the `chat.memberships.app` scope
1800
- * and `spaces/{space}/members/app` format. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
1804
+ * human membership, requires the `chat.memberships` scope and `spaces/{space}/members/{member}` format. You can use the email as an alias for `{member}`. For example,
1805
+ * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user. When deleting an app membership, requires the `chat.memberships.app`
1806
+ * scope and `spaces/{space}/members/app` format. Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`.
1801
1807
  */
1802
1808
  name:
1803
1809
  string;
@@ -1844,7 +1850,8 @@ declare namespace gapi.client {
1844
1850
  string;
1845
1851
  /**
1846
1852
  * Required. Resource name of the membership to retrieve. To get the app's own membership, you can optionally use `spaces/{space}/members/app`. Format:
1847
- * `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
1853
+ * `spaces/{space}/members/{member}` or `spaces/{space}/members/app` When [authenticated as a user](https://developers.google.com/chat/api/guides/auth/users), you can use the
1854
+ * user's email as an alias for `{member}`. For example, `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the email of the Google Chat user.
1848
1855
  */
1849
1856
  name:
1850
1857
  string;
@@ -2318,7 +2325,8 @@ declare namespace gapi.client {
2318
2325
  * Deletes a message. For an example, see [Delete a message](https://developers.google.com/chat/api/guides/v1/messages/delete). Requires
2319
2326
  * [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
2320
2327
  * authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User
2321
- * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
2328
+ * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only
2329
+ * delete messages created by the calling Chat app.
2322
2330
  */
2323
2331
  delete(request?: {
2324
2332
  /** V1 error format. */
@@ -2494,7 +2502,8 @@ declare namespace gapi.client {
2494
2502
  * recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires
2495
2503
  * [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
2496
2504
  * authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User
2497
- * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
2505
+ * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only
2506
+ * update messages created by the calling Chat app.
2498
2507
  */
2499
2508
  patch(request: {
2500
2509
  /** V1 error format. */
@@ -2605,7 +2614,8 @@ declare namespace gapi.client {
2605
2614
  * recommend using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires
2606
2615
  * [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
2607
2616
  * authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User
2608
- * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
2617
+ * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only
2618
+ * update messages created by the calling Chat app.
2609
2619
  */
2610
2620
  update(request: {
2611
2621
  /** V1 error format. */
@@ -2881,7 +2891,9 @@ declare namespace gapi.client {
2881
2891
  * Required. Resource name of the user to find direct message with. Format: `users/{user}`, where `{user}` is either the `{person_id}` for the
2882
2892
  * [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the
2883
2893
  * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, if the People API `Person.resourceName` is
2884
- * `people/123456789`, you can find a direct message with that person by using `users/123456789` as the `name`.
2894
+ * `people/123456789`, you can find a direct message with that person by using `users/123456789` as the `name`. When [authenticated as a
2895
+ * user](https://developers.google.com/chat/api/guides/auth/users), you can use the email as an alias for `{user}`. For example, `users/example@gmail.com` where `example@gmail.com`
2896
+ * is the email of the Google Chat user.
2885
2897
  */
2886
2898
  name?:
2887
2899
  string;
@@ -3118,15 +3130,15 @@ declare namespace gapi.client {
3118
3130
  /**
3119
3131
  * Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see
3120
3132
  * [Set up a space](https://developers.google.com/chat/api/guides/v1/spaces/set-up). To specify the human members to add, add memberships with the appropriate `member.name` in the
3121
- * `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people)
3122
- * from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. For example, if the People
3123
- * API `Person` `resourceName` is `people/123456789`, you can add the user to the space by including a membership with `users/123456789` as the `member.name`. For a space or group
3124
- * chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another
3125
- * human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling
3126
- * user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the
3127
- * calling app as a member of a space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM
3128
- * already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies or guest access
3129
- * aren't supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.
3133
+ * `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be
3134
+ * the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is
3135
+ * `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a space or group chat, if the
3136
+ * caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user,
3137
+ * specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the
3138
+ * calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a
3139
+ * member of a space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM already exists
3140
+ * between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies or guest access aren't
3141
+ * supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.
3130
3142
  */
3131
3143
  setup(request: {
3132
3144
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.chat-v1",
3
- "version": "0.0.20230723",
3
+ "version": "0.0.20230729",
4
4
  "description": "TypeScript typings for Google Chat API v1",
5
5
  "license": "MIT",
6
6
  "author": {
package/readme.md CHANGED
@@ -149,7 +149,7 @@ Updates a space. For an example, see [Update a space](https://developers.google.
149
149
  await gapi.client.chat.spaces.patch({ name: "name", });
150
150
 
151
151
  /*
152
- Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space](https://developers.google.com/chat/api/guides/v1/spaces/set-up). To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. For example, if the People API `Person` `resourceName` is `people/123456789`, you can add the user to the space by including a membership with `users/123456789` as the `member.name`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies or guest access aren't supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.
152
+ Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set up a space](https://developers.google.com/chat/api/guides/v1/spaces/set-up). To specify the human members to add, add memberships with the appropriate `member.name` in the `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a space or group chat, if the caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM already exists between two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies or guest access aren't supported. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.
153
153
  */
154
154
  await gapi.client.chat.spaces.setup({ });
155
155
  ```
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230723
6
+ // Revision: 20230729
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -159,15 +159,15 @@ gapi.load('client', async () => {
159
159
  /**
160
160
  * Creates a space and adds specified users to it. The calling user is automatically added to the space, and shouldn't be specified as a membership in the request. For an example, see [Set
161
161
  * up a space](https://developers.google.com/chat/api/guides/v1/spaces/set-up). To specify the human members to add, add memberships with the appropriate `member.name` in the
162
- * `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the [person](https://developers.google.com/people/api/rest/v1/people) from
163
- * the People API, or the `id` for the [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. For example, if the People API
164
- * `Person` `resourceName` is `people/123456789`, you can add the user to the space by including a membership with `users/123456789` as the `member.name`. For a space or group chat, if the
165
- * caller blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user,
166
- * specify exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the
167
- * calling app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a
168
- * member of a space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM already exists between
169
- * two users, even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies or guest access aren't supported. Requires
170
- * [user authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.
162
+ * `SetUpSpaceRequest`. To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace organization `{user}` can also be the
163
+ * `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person `resourceName` for `user@example.com` is
164
+ * `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`. For a space or group chat, if the caller
165
+ * blocks or is blocked by some members, then those members aren't added to the created space. To create a direct message (DM) between the calling user and another human user, specify
166
+ * exactly one membership to represent the human user. If one user blocks the other, the request fails and the DM isn't created. To create a DM between the calling user and the calling
167
+ * app, set `Space.singleUserBotDm` to `true` and don't specify any memberships. You can only use this method to set up a DM with the calling app. To add the calling app as a member of a
168
+ * space or an existing DM between two human users, see [create a membership](https://developers.google.com/chat/api/guides/v1/members/create). If a DM already exists between two users,
169
+ * even when one user blocks the other at the time a request is made, then the existing DM is returned. Spaces with threaded replies or guest access aren't supported. Requires [user
170
+ * authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.spaces.create` or `chat.spaces` scope.
171
171
  */
172
172
  await gapi.client.chat.spaces.setup({
173
173
  }, {
@@ -210,10 +210,9 @@ gapi.load('client', async () => {
210
210
  * invited, and must accept the space invitation before joining. Otherwise, creating a membership adds the member directly to the specified space. Requires [user
211
211
  * authentication](https://developers.google.com/chat/api/guides/auth/users) and the `chat.memberships` (for human membership) or `chat.memberships.app` (for app membership) scope. To
212
212
  * specify the member to add, set the `membership.member.name` in the `CreateMembershipRequest`: - To add the calling app to a space or a direct message between two human users, use
213
- * `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` is either the `{person_id}` for the
214
- * [person](https://developers.google.com/people/api/rest/v1/people) from the People API, or the `id` for the
215
- * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Directory API. For example, if the People API `Person` `resourceName` is `people/123456789`, you
216
- * can add the user to the space by setting the `membership.member.name` to `users/123456789`.
213
+ * `users/app`. Unable to add other apps to the space. - To add a human user, use `users/{user}`, where `{user}` can be the email address for the user. For users in the same Workspace
214
+ * organization `{user}` can also be the `{person_id}` for the person from the People API, or the `id` for the user in the Directory API. For example, if the People API Person
215
+ * `resourceName` for `user@example.com` is `people/123456789`, you can add the user to the space by setting the `membership.member.name` to `users/user@example.com` or `users/123456789`.
217
216
  */
218
217
  await gapi.client.chat.spaces.members.create({
219
218
  parent: "Test string",
@@ -2369,7 +2368,8 @@ gapi.load('client', async () => {
2369
2368
  * Deletes a message. For an example, see [Delete a message](https://developers.google.com/chat/api/guides/v1/messages/delete). Requires
2370
2369
  * [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
2371
2370
  * authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User
2372
- * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
2371
+ * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only delete
2372
+ * messages created by the calling Chat app.
2373
2373
  */
2374
2374
  await gapi.client.chat.spaces.messages.delete({
2375
2375
  force: true,
@@ -2402,7 +2402,8 @@ gapi.load('client', async () => {
2402
2402
  * using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires
2403
2403
  * [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
2404
2404
  * authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User
2405
- * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
2405
+ * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only update
2406
+ * messages created by the calling Chat app.
2406
2407
  */
2407
2408
  await gapi.client.chat.spaces.messages.patch({
2408
2409
  allowMissing: true,
@@ -4502,7 +4503,8 @@ gapi.load('client', async () => {
4502
4503
  * using the `patch` method. For an example, see [Update a message](https://developers.google.com/chat/api/guides/v1/messages/update). Requires
4503
4504
  * [authentication](https://developers.google.com/chat/api/guides/auth). Fully supports [service account
4504
4505
  * authentication](https://developers.google.com/chat/api/guides/auth/service-accounts) and [user authentication](https://developers.google.com/chat/api/guides/auth/users). [User
4505
- * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope.
4506
+ * authentication](https://developers.google.com/chat/api/guides/auth/users) requires the `chat.messages` authorization scope. Requests authenticated with service accounts can only update
4507
+ * messages created by the calling Chat app.
4506
4508
  */
4507
4509
  await gapi.client.chat.spaces.messages.update({
4508
4510
  allowMissing: true,