@maxim_mazurok/gapi.client.chat-v1 0.0.20240102 → 0.0.20240109

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 +73 -4
  2. package/package.json +1 -1
  3. package/readme.md +5 -0
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: 20240102
12
+ // Revision: 20240109
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -162,6 +162,11 @@ declare namespace gapi.client {
162
162
  /** The full `locale.displayName` in the format of [ISO 639 language code]-[ISO 3166 country/region code] such as "en-US". */
163
163
  userLocale?: string;
164
164
  }
165
+ interface CompleteImportSpaceRequest {}
166
+ interface CompleteImportSpaceResponse {
167
+ /** The import mode space. */
168
+ space?: Space;
169
+ }
165
170
  interface CustomEmoji {
166
171
  /** Unique key for the custom emoji resource. */
167
172
  uid?: string;
@@ -535,7 +540,7 @@ declare namespace gapi.client {
535
540
  name?: string;
536
541
  /** What to do when a change occurs in the text input field. For example, a user adding to the field or deleting text. Examples of actions to take include running a custom function or opening a [dialog](https://developers.google.com/chat/how-tos/dialogs) in Google Chat. */
537
542
  onChangeAction?: GoogleAppsCardV1Action;
538
- /** Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, `Enter a number from 0 to 100`. Supported by Google Chat apps, but not Google Workspace Add-ons. */
543
+ /** Text that appears in the text input field when the field is empty. Use this text to prompt users to enter a value. For example, `Enter a number from 0 to 100`. [Google Chat apps](https://developers.google.com/chat): */
539
544
  placeholderText?: string;
540
545
  /** How a text input field appears in the user interface. For example, whether the field is single or multi-line. */
541
546
  type?: string;
@@ -673,8 +678,10 @@ declare namespace gapi.client {
673
678
  resourceName?: string;
674
679
  }
675
680
  interface Membership {
676
- /** Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. [Developer Preview](https://developers.google.com/workspace/preview): This field is output only, except when used to import historical memberships in import mode spaces. */
681
+ /** Optional. Immutable. The creation time of the membership, such as when a member joined or was invited to join a space. This field is output only, except when used to import historical memberships in import mode spaces. */
677
682
  createTime?: string;
683
+ /** Optional. Immutable. The deletion time of the membership, such as when a member left or was removed from a space. This field is output only, except when used to import historical memberships in import mode spaces. */
684
+ deleteTime?: string;
678
685
  /** The Google Group the membership corresponds to. Only supports read operations. Other operations, like creating or updating a membership, aren't currently supported. */
679
686
  groupMember?: Group;
680
687
  /** The Google Chat user or app the membership corresponds to. If your Chat app [authenticates as a user](https://developers.google.com/chat/api/guides/auth/users), the output populates the [user](https://developers.google.com/chat/api/reference/rest/v1/User) `name` and `type`. */
@@ -703,7 +710,7 @@ declare namespace gapi.client {
703
710
  cardsV2?: CardWithId[];
704
711
  /** A custom name for a Chat message assigned at creation. Must start with `client-` and contain only lowercase letters, numbers, and hyphens up to 63 characters in length. Specify this field to get, update, or delete the message with the specified value. Assigning a custom name lets a Chat app recall the message without saving the message `name` from the [response body](/chat/api/reference/rest/v1/spaces.messages/get#response-body) returned when creating the message. Assigning a custom name doesn't replace the generated `name` field, the message's resource name. Instead, it sets the custom name as the `clientAssignedMessageId` field, which you can reference while processing later operations, like updating or deleting the message. For example usage, see [Name a created message](https://developers.google.com/chat/api/guides/v1/messages/create#name_a_created_message). */
705
712
  clientAssignedMessageId?: string;
706
- /** For spaces created in Chat, the time at which the message was created. This field is output only, except when used in imported spaces. [Developer Preview](https://developers.google.com/workspace/preview): For imported spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time. */
713
+ /** Optional. Immutable. For spaces created in Chat, the time at which the message was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the message was created in the source in order to preserve the original creation time. */
707
714
  createTime?: string;
708
715
  /** Output only. The time at which the message was deleted in Google Chat. If the message is never deleted, this field is empty. */
709
716
  deleteTime?: string;
@@ -799,10 +806,14 @@ declare namespace gapi.client {
799
806
  interface Space {
800
807
  /** Output only. Whether the Chat app was installed by a Google Workspace administrator. Administrators can install a Chat app for their domain, organizational unit, or a group of users. Administrators can only install Chat apps for direct messaging between users and the app. To support admin install, your app must feature direct messaging. */
801
808
  adminInstalled?: boolean;
809
+ /** Optional. Immutable. For spaces created in Chat, the time the space was created. This field is output only, except when used in import mode spaces. For import mode spaces, set this field to the historical timestamp at which the space was created in the source in order to preserve the original creation time. Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. */
810
+ createTime?: string;
802
811
  /** The space's display name. Required when [creating a space](https://developers.google.com/chat/api/reference/rest/v1/spaces/create). If you receive the error message `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. For direct messages, this field might be empty. Supports up to 128 characters. */
803
812
  displayName?: string;
804
813
  /** Immutable. Whether this space permits any Google Chat user as a member. Input when creating a space in a Google Workspace organization. Omit this field when creating spaces in the following conditions: * The authenticated user uses a Google Account. By default, the space permits any Google Chat user. * The space is used to [import data to Google Chat] (https://developers.google.com/chat/api/guides/import-data-overview). Import mode spaces must only permit members from the same Google Workspace organization. For existing spaces, this field is output only. */
805
814
  externalUserAllowed?: boolean;
815
+ /** Optional. Whether this space is created in `Import Mode` as part of a data migration into Google Workspace. While spaces are being imported, they aren't visible to users until the import is complete. */
816
+ importMode?: boolean;
806
817
  /** Resource name of the space. Format: `spaces/{space}` */
807
818
  name?: string;
808
819
  /** Optional. Whether the space is a DM between a Chat app and a single human. */
@@ -1602,6 +1613,64 @@ declare namespace gapi.client {
1602
1613
  reactions: ReactionsResource;
1603
1614
  }
1604
1615
  interface SpacesResource {
1616
+ /** Completes the [import process](https://developers.google.com/chat/api/guides/import-data) for the specified space and makes it visible to users. Requires app authentication and domain-wide delegation. For more information, see [Authorize Google Chat apps to import data](https://developers.google.com/chat/api/guides/authorize-import). */
1617
+ completeImport(request: {
1618
+ /** V1 error format. */
1619
+ '$.xgafv'?: string;
1620
+ /** OAuth access token. */
1621
+ access_token?: string;
1622
+ /** Data format for response. */
1623
+ alt?: string;
1624
+ /** JSONP */
1625
+ callback?: string;
1626
+ /** Selector specifying which fields to include in a partial response. */
1627
+ fields?: string;
1628
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1629
+ key?: string;
1630
+ /** Required. Resource name of the import mode space. Format: `spaces/{space}` */
1631
+ name: string;
1632
+ /** OAuth 2.0 token for the current user. */
1633
+ oauth_token?: string;
1634
+ /** Returns response with indentations and line breaks. */
1635
+ prettyPrint?: boolean;
1636
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1637
+ quotaUser?: string;
1638
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1639
+ upload_protocol?: string;
1640
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1641
+ uploadType?: string;
1642
+ /** Request body */
1643
+ resource: CompleteImportSpaceRequest;
1644
+ }): Request<CompleteImportSpaceResponse>;
1645
+ completeImport(
1646
+ request: {
1647
+ /** V1 error format. */
1648
+ '$.xgafv'?: string;
1649
+ /** OAuth access token. */
1650
+ access_token?: string;
1651
+ /** Data format for response. */
1652
+ alt?: string;
1653
+ /** JSONP */
1654
+ callback?: string;
1655
+ /** Selector specifying which fields to include in a partial response. */
1656
+ fields?: string;
1657
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1658
+ key?: string;
1659
+ /** Required. Resource name of the import mode space. Format: `spaces/{space}` */
1660
+ name: string;
1661
+ /** OAuth 2.0 token for the current user. */
1662
+ oauth_token?: string;
1663
+ /** Returns response with indentations and line breaks. */
1664
+ prettyPrint?: boolean;
1665
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1666
+ quotaUser?: string;
1667
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1668
+ upload_protocol?: string;
1669
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1670
+ uploadType?: string;
1671
+ },
1672
+ body: CompleteImportSpaceRequest
1673
+ ): Request<CompleteImportSpaceResponse>;
1605
1674
  /** Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users). */
1606
1675
  create(request: {
1607
1676
  /** 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.20240102",
3
+ "version": "0.0.20240109",
4
4
  "description": "TypeScript typings for Google Chat API v1",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -121,6 +121,11 @@ Uploads an attachment. For an example, see [Upload media as a file attachment](h
121
121
  */
122
122
  await gapi.client.chat.media.upload({parent: 'parent'});
123
123
 
124
+ /*
125
+ Completes the [import process](https://developers.google.com/chat/api/guides/import-data) for the specified space and makes it visible to users. Requires app authentication and domain-wide delegation. For more information, see [Authorize Google Chat apps to import data](https://developers.google.com/chat/api/guides/authorize-import).
126
+ */
127
+ await gapi.client.chat.spaces.completeImport({name: 'name'});
128
+
124
129
  /*
125
130
  Creates a named space. Spaces grouped by topics aren't supported. For an example, see [Create a space](https://developers.google.com/chat/api/guides/v1/spaces/create). If you receive the error message `ALREADY_EXISTS` when creating a space, try a different `displayName`. An existing space within the Google Workspace organization might already use this display name. Requires [user authentication](https://developers.google.com/chat/api/guides/auth/users).
126
131
  */