@maxim_mazurok/gapi.client.chat-v1 0.0.20230129 → 0.0.20230202

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 (3) hide show
  1. package/index.d.ts +30 -20
  2. package/package.json +1 -1
  3. package/tests.ts +3 -3
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: 20230129
12
+ // Revision: 20230202
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -112,7 +112,10 @@ declare namespace gapi.client {
112
112
  title?: string;
113
113
  }
114
114
  interface CardWithId {
115
- /** Card proto that allows Chat apps to specify UI elements and editable widgets. */
115
+ /**
116
+ * Cards support a defined layout, interactive UI elements like buttons, and rich media like images. Use this card to present detailed information, gather information from users, and
117
+ * guide users to take a next step.
118
+ */
116
119
  card?: GoogleAppsCardV1Card;
117
120
  /** Required for `cardsV2` messages. Chat app-specified identifier for this widget. Scoped within a message. */
118
121
  cardId?: string;
@@ -779,13 +782,9 @@ declare namespace gapi.client {
779
782
  interface Membership {
780
783
  /** Output only. The creation time of the membership, such as when a member joined or was invited to join a space. */
781
784
  createTime?: string;
782
- /**
783
- * A Google Chat user or app. Format: `users/{user}` or `users/app` When `users/{user}`, represents a [person](https://developers.google.com/people/api/rest/v1/people) in the People
784
- * API or a [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API. When `users/app`, represents a Chat app creating
785
- * membership for itself.
786
- */
785
+ /** The Google Chat user or app the membership corresponds to. */
787
786
  member?: User;
788
- /** Resource name of the membership. Format: spaces/{space}/members/{member} */
787
+ /** Resource name of the membership, assigned by the server. Format: spaces/{space}/members/{member} */
789
788
  name?: string;
790
789
  /** Output only. User's role within a Chat space, which determines their permitted actions in the space. */
791
790
  role?: string;
@@ -799,7 +798,7 @@ declare namespace gapi.client {
799
798
  annotations?: Annotation[];
800
799
  /** Plain-text body of the message with all Chat app mentions stripped out. */
801
800
  argumentText?: string;
802
- /** User uploaded attachment. */
801
+ /** User-uploaded attachment. */
803
802
  attachment?: Attachment[];
804
803
  /**
805
804
  * Deprecated: Use `cards_v2` instead. Rich, formatted and interactive cards that can be used to display UI elements such as: formatted texts, buttons, clickable images. Cards are
@@ -808,7 +807,7 @@ declare namespace gapi.client {
808
807
  cards?: Card[];
809
808
  /**
810
809
  * Richly formatted and interactive cards that display UI elements and editable widgets, such as: - Formatted text - Buttons - Clickable images - Checkboxes - Radio buttons - Input
811
- * widgets. Cards are usually displayed below the text-body of a Chat message, but can situationally appear other places, such as
810
+ * widgets. Cards are usually displayed below the text body of a Chat message, but can situationally appear other places, such as
812
811
  * [dialogs](https://developers.google.com/chat/how-tos/dialogs). The `cardId` is a unique identifier among cards in the same message and for identifying user input values. Currently
813
812
  * supported widgets include: - `TextParagraph` - `DecoratedText` - `Image` - `ButtonList` - `Divider`
814
813
  */
@@ -840,7 +839,10 @@ declare namespace gapi.client {
840
839
  space?: Space;
841
840
  /** Plain-text body of the message. The first link to an image, video, web page, or other preview-able item generates a preview chip. */
842
841
  text?: string;
843
- /** The thread the message belongs to. For example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). */
842
+ /**
843
+ * The thread the message belongs to. For example usage, see [Start or reply to a message
844
+ * thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
845
+ */
844
846
  thread?: Thread;
845
847
  /**
846
848
  * Output only. When `true`, the message is a response in a reply thread. When `false`, the message is visible in the space's top-level conversation as either the first message of a
@@ -881,7 +883,10 @@ declare namespace gapi.client {
881
883
  type?: string;
882
884
  }
883
885
  interface Space {
884
- /** The space's display name. Required when [creating a space](https://developers.google.com/chat/api/reference/rest/v1/spaces/create). For direct messages, this field may be empty. */
886
+ /**
887
+ * The space's display name. Required when [creating a space](https://developers.google.com/chat/api/reference/rest/v1/spaces/create). For direct messages, this field may be empty.
888
+ * Supports up to 128 characters.
889
+ */
885
890
  displayName?: string;
886
891
  /** Resource name of the space. Format: spaces/{space} */
887
892
  name?: string;
@@ -897,9 +902,9 @@ declare namespace gapi.client {
897
902
  type?: string;
898
903
  }
899
904
  interface SpaceDetails {
900
- /** Optional. A description of the space. It could describe the space's discussion topic, functional purpose, or participants. */
905
+ /** Optional. A description of the space. It could describe the space's discussion topic, functional purpose, or participants. Supports up to 150 characters. */
901
906
  description?: string;
902
- /** Optional. The space's rules, expectations, and etiquette. */
907
+ /** Optional. The space's rules, expectations, and etiquette. Supports up to 5,000 characters. */
903
908
  guidelines?: string;
904
909
  }
905
910
  interface Status {
@@ -931,7 +936,7 @@ declare namespace gapi.client {
931
936
  name?: string;
932
937
  /**
933
938
  * Optional. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For example usage, see [Start or reply to a message
934
- * thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). For other requests, this is an output only field.
939
+ * thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread). For other requests, this is an output only field.
935
940
  */
936
941
  threadKey?: string;
937
942
  }
@@ -954,7 +959,12 @@ declare namespace gapi.client {
954
959
  domainId?: string;
955
960
  /** Output only. When `true`, the user is deleted or their profile is not visible. */
956
961
  isAnonymous?: boolean;
957
- /** Resource name for a Google Chat user. For human users, represents a person in the People API or a user in the Admin SDK Directory API. Format: `users/{user}` */
962
+ /**
963
+ * Resource name for a Google Chat user. Format: `users/{user}`. `users/app` can be used as an alias for the calling app bot user. For human users, `{user}` is the same user identifier
964
+ * as: - the `{person_id`} for the [Person](https://developers.google.com/people/api/rest/v1/people) in the People API, where the Person `resource_name` is `people/{person_id}`. For
965
+ * example, `users/123456789` in Chat API represents the same person as `people/123456789` in People API. - the `id` for a
966
+ * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) in the Admin SDK Directory API.
967
+ */
958
968
  name?: string;
959
969
  /** User type. */
960
970
  type?: string;
@@ -1082,8 +1092,8 @@ declare namespace gapi.client {
1082
1092
  }
1083
1093
  interface AttachmentsResource {
1084
1094
  /**
1085
- * Gets the metadata of a message attachment. The attachment data is fetched using the media API. Requires [service account
1086
- * authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
1095
+ * Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/chat/api/reference/rest/v1/media/download). Requires
1096
+ * [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
1087
1097
  */
1088
1098
  get(request?: {
1089
1099
  /** V1 error format. */
@@ -1155,7 +1165,7 @@ declare namespace gapi.client {
1155
1165
  requestId?: string;
1156
1166
  /**
1157
1167
  * Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For
1158
- * example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
1168
+ * example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
1159
1169
  */
1160
1170
  threadKey?: string;
1161
1171
  /** Upload protocol for media (e.g. "raw", "multipart"). */
@@ -1198,7 +1208,7 @@ declare namespace gapi.client {
1198
1208
  requestId?: string;
1199
1209
  /**
1200
1210
  * Optional. Deprecated: Use thread.thread_key instead. Opaque thread identifier. To start or add to a thread, create a message and specify a `threadKey` or the thread.name. For
1201
- * example usage, see [Start or reply to a message thread](/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
1211
+ * example usage, see [Start or reply to a message thread](https://developers.google.com/chat/api/guides/crudl/messages#start_or_reply_to_a_message_thread).
1202
1212
  */
1203
1213
  threadKey?: string;
1204
1214
  /** Upload protocol for media (e.g. "raw", "multipart"). */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.chat-v1",
3
- "version": "0.0.20230129",
3
+ "version": "0.0.20230202",
4
4
  "description": "TypeScript typings for Google Chat API v1",
5
5
  "license": "MIT",
6
6
  "author": {
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: 20230129
6
+ // Revision: 20230202
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -4146,8 +4146,8 @@ gapi.load('client', async () => {
4146
4146
  threadReply: true,
4147
4147
  });
4148
4148
  /**
4149
- * Gets the metadata of a message attachment. The attachment data is fetched using the media API. Requires [service account
4150
- * authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
4149
+ * Gets the metadata of a message attachment. The attachment data is fetched using the [media API](https://developers.google.com/chat/api/reference/rest/v1/media/download). Requires
4150
+ * [service account authentication](https://developers.google.com/chat/api/guides/auth/service-accounts).
4151
4151
  */
4152
4152
  await gapi.client.chat.spaces.messages.attachments.get({
4153
4153
  name: "Test string",