@google-apps/chat 0.3.0 → 0.5.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 +16 -0
- package/README.md +3 -0
- package/build/protos/google/apps/card/v1/card.proto +1 -1
- package/build/protos/google/chat/v1/action_status.proto +2 -1
- package/build/protos/google/chat/v1/annotation.proto +3 -1
- package/build/protos/google/chat/v1/attachment.proto +2 -1
- package/build/protos/google/chat/v1/chat_service.proto +71 -18
- package/build/protos/google/chat/v1/contextual_addon.proto +2 -1
- package/build/protos/google/chat/v1/deletion_metadata.proto +2 -1
- package/build/protos/google/chat/v1/group.proto +2 -1
- package/build/protos/google/chat/v1/history_state.proto +2 -1
- package/build/protos/google/chat/v1/matched_url.proto +2 -1
- package/build/protos/google/chat/v1/membership.proto +7 -5
- package/build/protos/google/chat/v1/message.proto +2 -1
- package/build/protos/google/chat/v1/reaction.proto +4 -3
- package/build/protos/google/chat/v1/slash_command.proto +2 -1
- package/build/protos/google/chat/v1/space.proto +7 -7
- package/build/protos/google/chat/v1/space_read_state.proto +113 -0
- package/build/protos/google/chat/v1/space_setup.proto +10 -9
- package/build/protos/google/chat/v1/thread_read_state.proto +75 -0
- package/build/protos/google/chat/v1/user.proto +2 -1
- package/build/protos/google/chat/v1/widgets.proto +2 -1
- package/build/protos/protos.d.ts +582 -16
- package/build/protos/protos.js +1255 -49
- package/build/protos/protos.json +163 -24
- package/build/src/v1/chat_service_client.d.ts +232 -26
- package/build/src/v1/chat_service_client.js +148 -0
- package/build/src/v1/chat_service_client.js.map +1 -1
- package/build/src/v1/chat_service_client_config.json +15 -0
- package/package.json +1 -1
package/build/protos/protos.json
CHANGED
|
@@ -2409,8 +2409,9 @@
|
|
|
2409
2409
|
"csharp_namespace": "Google.Apps.Chat.V1",
|
|
2410
2410
|
"go_package": "cloud.google.com/go/chat/apiv1/chatpb;chatpb",
|
|
2411
2411
|
"java_multiple_files": true,
|
|
2412
|
-
"java_outer_classname": "
|
|
2412
|
+
"java_outer_classname": "ThreadReadStateProto",
|
|
2413
2413
|
"java_package": "com.google.chat.v1",
|
|
2414
|
+
"objc_class_prefix": "DYNAPIProto",
|
|
2414
2415
|
"php_namespace": "Google\\Apps\\Chat\\V1",
|
|
2415
2416
|
"ruby_package": "Google::Apps::Chat::V1"
|
|
2416
2417
|
},
|
|
@@ -2753,7 +2754,7 @@
|
|
|
2753
2754
|
"ChatService": {
|
|
2754
2755
|
"options": {
|
|
2755
2756
|
"(google.api.default_host)": "chat.googleapis.com",
|
|
2756
|
-
"(google.api.oauth_scopes)": "https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly"
|
|
2757
|
+
"(google.api.oauth_scopes)": "https://www.googleapis.com/auth/chat.bot,https://www.googleapis.com/auth/chat.delete,https://www.googleapis.com/auth/chat.import,https://www.googleapis.com/auth/chat.memberships,https://www.googleapis.com/auth/chat.memberships.app,https://www.googleapis.com/auth/chat.memberships.readonly,https://www.googleapis.com/auth/chat.messages,https://www.googleapis.com/auth/chat.messages.create,https://www.googleapis.com/auth/chat.messages.reactions,https://www.googleapis.com/auth/chat.messages.reactions.create,https://www.googleapis.com/auth/chat.messages.reactions.readonly,https://www.googleapis.com/auth/chat.messages.readonly,https://www.googleapis.com/auth/chat.spaces,https://www.googleapis.com/auth/chat.spaces.create,https://www.googleapis.com/auth/chat.spaces.readonly,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly"
|
|
2757
2758
|
},
|
|
2758
2759
|
"methods": {
|
|
2759
2760
|
"CreateMessage": {
|
|
@@ -3179,6 +3180,62 @@
|
|
|
3179
3180
|
"(google.api.method_signature)": "name"
|
|
3180
3181
|
}
|
|
3181
3182
|
]
|
|
3183
|
+
},
|
|
3184
|
+
"GetSpaceReadState": {
|
|
3185
|
+
"requestType": "GetSpaceReadStateRequest",
|
|
3186
|
+
"responseType": "SpaceReadState",
|
|
3187
|
+
"options": {
|
|
3188
|
+
"(google.api.http).get": "/v1/{name=users/*/spaces/*/spaceReadState}",
|
|
3189
|
+
"(google.api.method_signature)": "name"
|
|
3190
|
+
},
|
|
3191
|
+
"parsedOptions": [
|
|
3192
|
+
{
|
|
3193
|
+
"(google.api.http)": {
|
|
3194
|
+
"get": "/v1/{name=users/*/spaces/*/spaceReadState}"
|
|
3195
|
+
}
|
|
3196
|
+
},
|
|
3197
|
+
{
|
|
3198
|
+
"(google.api.method_signature)": "name"
|
|
3199
|
+
}
|
|
3200
|
+
]
|
|
3201
|
+
},
|
|
3202
|
+
"UpdateSpaceReadState": {
|
|
3203
|
+
"requestType": "UpdateSpaceReadStateRequest",
|
|
3204
|
+
"responseType": "SpaceReadState",
|
|
3205
|
+
"options": {
|
|
3206
|
+
"(google.api.http).patch": "/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}",
|
|
3207
|
+
"(google.api.http).body": "space_read_state",
|
|
3208
|
+
"(google.api.method_signature)": "space_read_state,update_mask"
|
|
3209
|
+
},
|
|
3210
|
+
"parsedOptions": [
|
|
3211
|
+
{
|
|
3212
|
+
"(google.api.http)": {
|
|
3213
|
+
"patch": "/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}",
|
|
3214
|
+
"body": "space_read_state"
|
|
3215
|
+
}
|
|
3216
|
+
},
|
|
3217
|
+
{
|
|
3218
|
+
"(google.api.method_signature)": "space_read_state,update_mask"
|
|
3219
|
+
}
|
|
3220
|
+
]
|
|
3221
|
+
},
|
|
3222
|
+
"GetThreadReadState": {
|
|
3223
|
+
"requestType": "GetThreadReadStateRequest",
|
|
3224
|
+
"responseType": "ThreadReadState",
|
|
3225
|
+
"options": {
|
|
3226
|
+
"(google.api.http).get": "/v1/{name=users/*/spaces/*/threads/*/threadReadState}",
|
|
3227
|
+
"(google.api.method_signature)": "name"
|
|
3228
|
+
},
|
|
3229
|
+
"parsedOptions": [
|
|
3230
|
+
{
|
|
3231
|
+
"(google.api.http)": {
|
|
3232
|
+
"get": "/v1/{name=users/*/spaces/*/threads/*/threadReadState}"
|
|
3233
|
+
}
|
|
3234
|
+
},
|
|
3235
|
+
{
|
|
3236
|
+
"(google.api.method_signature)": "name"
|
|
3237
|
+
}
|
|
3238
|
+
]
|
|
3182
3239
|
}
|
|
3183
3240
|
}
|
|
3184
3241
|
},
|
|
@@ -4321,7 +4378,10 @@
|
|
|
4321
4378
|
"fields": {
|
|
4322
4379
|
"uid": {
|
|
4323
4380
|
"type": "string",
|
|
4324
|
-
"id": 1
|
|
4381
|
+
"id": 1,
|
|
4382
|
+
"options": {
|
|
4383
|
+
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
4384
|
+
}
|
|
4325
4385
|
}
|
|
4326
4386
|
}
|
|
4327
4387
|
},
|
|
@@ -4688,6 +4748,56 @@
|
|
|
4688
4748
|
"HISTORY_ON": 2
|
|
4689
4749
|
}
|
|
4690
4750
|
},
|
|
4751
|
+
"SpaceReadState": {
|
|
4752
|
+
"options": {
|
|
4753
|
+
"(google.api.resource).type": "chat.googleapis.com/SpaceReadState",
|
|
4754
|
+
"(google.api.resource).pattern": "users/{user}/spaces/{space}/spaceReadState",
|
|
4755
|
+
"(google.api.resource).singular": "spaceReadState"
|
|
4756
|
+
},
|
|
4757
|
+
"fields": {
|
|
4758
|
+
"name": {
|
|
4759
|
+
"type": "string",
|
|
4760
|
+
"id": 1
|
|
4761
|
+
},
|
|
4762
|
+
"lastReadTime": {
|
|
4763
|
+
"type": "google.protobuf.Timestamp",
|
|
4764
|
+
"id": 2,
|
|
4765
|
+
"options": {
|
|
4766
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
4767
|
+
}
|
|
4768
|
+
}
|
|
4769
|
+
}
|
|
4770
|
+
},
|
|
4771
|
+
"GetSpaceReadStateRequest": {
|
|
4772
|
+
"fields": {
|
|
4773
|
+
"name": {
|
|
4774
|
+
"type": "string",
|
|
4775
|
+
"id": 1,
|
|
4776
|
+
"options": {
|
|
4777
|
+
"(google.api.field_behavior)": "REQUIRED",
|
|
4778
|
+
"(google.api.resource_reference).type": "chat.googleapis.com/SpaceReadState"
|
|
4779
|
+
}
|
|
4780
|
+
}
|
|
4781
|
+
}
|
|
4782
|
+
},
|
|
4783
|
+
"UpdateSpaceReadStateRequest": {
|
|
4784
|
+
"fields": {
|
|
4785
|
+
"spaceReadState": {
|
|
4786
|
+
"type": "SpaceReadState",
|
|
4787
|
+
"id": 1,
|
|
4788
|
+
"options": {
|
|
4789
|
+
"(google.api.field_behavior)": "REQUIRED"
|
|
4790
|
+
}
|
|
4791
|
+
},
|
|
4792
|
+
"updateMask": {
|
|
4793
|
+
"type": "google.protobuf.FieldMask",
|
|
4794
|
+
"id": 2,
|
|
4795
|
+
"options": {
|
|
4796
|
+
"(google.api.field_behavior)": "REQUIRED"
|
|
4797
|
+
}
|
|
4798
|
+
}
|
|
4799
|
+
}
|
|
4800
|
+
},
|
|
4691
4801
|
"SetUpSpaceRequest": {
|
|
4692
4802
|
"fields": {
|
|
4693
4803
|
"space": {
|
|
@@ -4713,6 +4823,35 @@
|
|
|
4713
4823
|
}
|
|
4714
4824
|
}
|
|
4715
4825
|
}
|
|
4826
|
+
},
|
|
4827
|
+
"ThreadReadState": {
|
|
4828
|
+
"options": {
|
|
4829
|
+
"(google.api.resource).type": "chat.googleapis.com/ThreadReadState",
|
|
4830
|
+
"(google.api.resource).pattern": "users/{user}/spaces/{space}/threads/{thread}/threadReadState",
|
|
4831
|
+
"(google.api.resource).singular": "threadReadState"
|
|
4832
|
+
},
|
|
4833
|
+
"fields": {
|
|
4834
|
+
"name": {
|
|
4835
|
+
"type": "string",
|
|
4836
|
+
"id": 1
|
|
4837
|
+
},
|
|
4838
|
+
"lastReadTime": {
|
|
4839
|
+
"type": "google.protobuf.Timestamp",
|
|
4840
|
+
"id": 2
|
|
4841
|
+
}
|
|
4842
|
+
}
|
|
4843
|
+
},
|
|
4844
|
+
"GetThreadReadStateRequest": {
|
|
4845
|
+
"fields": {
|
|
4846
|
+
"name": {
|
|
4847
|
+
"type": "string",
|
|
4848
|
+
"id": 1,
|
|
4849
|
+
"options": {
|
|
4850
|
+
"(google.api.field_behavior)": "REQUIRED",
|
|
4851
|
+
"(google.api.resource_reference).type": "chat.googleapis.com/ThreadReadState"
|
|
4852
|
+
}
|
|
4853
|
+
}
|
|
4854
|
+
}
|
|
4716
4855
|
}
|
|
4717
4856
|
}
|
|
4718
4857
|
}
|
|
@@ -4752,33 +4891,14 @@
|
|
|
4752
4891
|
},
|
|
4753
4892
|
"api": {
|
|
4754
4893
|
"options": {
|
|
4894
|
+
"cc_enable_arenas": true,
|
|
4755
4895
|
"go_package": "google.golang.org/genproto/googleapis/api;api",
|
|
4756
4896
|
"java_multiple_files": true,
|
|
4757
4897
|
"java_outer_classname": "LaunchStageProto",
|
|
4758
4898
|
"java_package": "com.google.api",
|
|
4759
|
-
"objc_class_prefix": "GAPI"
|
|
4760
|
-
"cc_enable_arenas": true
|
|
4899
|
+
"objc_class_prefix": "GAPI"
|
|
4761
4900
|
},
|
|
4762
4901
|
"nested": {
|
|
4763
|
-
"fieldBehavior": {
|
|
4764
|
-
"rule": "repeated",
|
|
4765
|
-
"type": "google.api.FieldBehavior",
|
|
4766
|
-
"id": 1052,
|
|
4767
|
-
"extend": "google.protobuf.FieldOptions"
|
|
4768
|
-
},
|
|
4769
|
-
"FieldBehavior": {
|
|
4770
|
-
"values": {
|
|
4771
|
-
"FIELD_BEHAVIOR_UNSPECIFIED": 0,
|
|
4772
|
-
"OPTIONAL": 1,
|
|
4773
|
-
"REQUIRED": 2,
|
|
4774
|
-
"OUTPUT_ONLY": 3,
|
|
4775
|
-
"INPUT_ONLY": 4,
|
|
4776
|
-
"IMMUTABLE": 5,
|
|
4777
|
-
"UNORDERED_LIST": 6,
|
|
4778
|
-
"NON_EMPTY_DEFAULT": 7,
|
|
4779
|
-
"IDENTIFIER": 8
|
|
4780
|
-
}
|
|
4781
|
-
},
|
|
4782
4902
|
"resourceReference": {
|
|
4783
4903
|
"type": "google.api.ResourceReference",
|
|
4784
4904
|
"id": 1055,
|
|
@@ -4856,6 +4976,25 @@
|
|
|
4856
4976
|
}
|
|
4857
4977
|
}
|
|
4858
4978
|
},
|
|
4979
|
+
"fieldBehavior": {
|
|
4980
|
+
"rule": "repeated",
|
|
4981
|
+
"type": "google.api.FieldBehavior",
|
|
4982
|
+
"id": 1052,
|
|
4983
|
+
"extend": "google.protobuf.FieldOptions"
|
|
4984
|
+
},
|
|
4985
|
+
"FieldBehavior": {
|
|
4986
|
+
"values": {
|
|
4987
|
+
"FIELD_BEHAVIOR_UNSPECIFIED": 0,
|
|
4988
|
+
"OPTIONAL": 1,
|
|
4989
|
+
"REQUIRED": 2,
|
|
4990
|
+
"OUTPUT_ONLY": 3,
|
|
4991
|
+
"INPUT_ONLY": 4,
|
|
4992
|
+
"IMMUTABLE": 5,
|
|
4993
|
+
"UNORDERED_LIST": 6,
|
|
4994
|
+
"NON_EMPTY_DEFAULT": 7,
|
|
4995
|
+
"IDENTIFIER": 8
|
|
4996
|
+
}
|
|
4997
|
+
},
|
|
4859
4998
|
"http": {
|
|
4860
4999
|
"type": "HttpRule",
|
|
4861
5000
|
"id": 72295728,
|
|
@@ -117,7 +117,8 @@ export declare class ChatServiceClient {
|
|
|
117
117
|
getProjectId(): Promise<string>;
|
|
118
118
|
getProjectId(callback: Callback<string, undefined, undefined>): void;
|
|
119
119
|
/**
|
|
120
|
-
* Creates a message in a Google Chat space.
|
|
120
|
+
* Creates a message in a Google Chat space. The maximum message size,
|
|
121
|
+
* including text and cards, is 32,000 bytes. For an example, see [Send a
|
|
121
122
|
* message](https://developers.google.com/workspace/chat/create-messages).
|
|
122
123
|
*
|
|
123
124
|
* Calling this method requires
|
|
@@ -202,8 +203,9 @@ export declare class ChatServiceClient {
|
|
|
202
203
|
* @param {string} request.name
|
|
203
204
|
* Required. Resource name of the membership to retrieve.
|
|
204
205
|
*
|
|
205
|
-
* To get the app's own membership
|
|
206
|
-
*
|
|
206
|
+
* To get the app's own membership [by using user
|
|
207
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user),
|
|
208
|
+
* you can optionally use `spaces/{space}/members/app`.
|
|
207
209
|
*
|
|
208
210
|
* Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`
|
|
209
211
|
*
|
|
@@ -536,17 +538,17 @@ export declare class ChatServiceClient {
|
|
|
536
538
|
* members](https://developers.google.com/workspace/chat/set-up-spaces).
|
|
537
539
|
*
|
|
538
540
|
* To specify the human members to add, add memberships with the appropriate
|
|
539
|
-
* `member.name
|
|
540
|
-
* `
|
|
541
|
-
*
|
|
542
|
-
* the
|
|
543
|
-
*
|
|
544
|
-
*
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
*
|
|
541
|
+
* `membership.member.name`. To add a human user, use `users/{user}`, where
|
|
542
|
+
* `{user}` can be the email address for the user. For users in the same
|
|
543
|
+
* Workspace organization `{user}` can also be the `id` for the person from
|
|
544
|
+
* the People API, or the `id` for the user in the Directory API. For example,
|
|
545
|
+
* if the People API Person profile ID for `user@example.com` is `123456789`,
|
|
546
|
+
* you can add the user to the space by setting the `membership.member.name`
|
|
547
|
+
* to `users/user@example.com` or `users/123456789`.
|
|
548
|
+
*
|
|
549
|
+
* For a named space or group chat, if the caller blocks, or is blocked
|
|
550
|
+
* by some members, or doesn't have permission to add some members, then
|
|
551
|
+
* those members aren't added to the created space.
|
|
550
552
|
*
|
|
551
553
|
* To create a direct message (DM) between the calling user and another human
|
|
552
554
|
* user, specify exactly one membership to represent the human user. If
|
|
@@ -610,14 +612,14 @@ export declare class ChatServiceClient {
|
|
|
610
612
|
*
|
|
611
613
|
* The set currently allows up to 20 memberships (in addition to the caller).
|
|
612
614
|
*
|
|
613
|
-
*
|
|
614
|
-
* (format: `users/{user}`) and `type` set to
|
|
615
|
-
* add human users when setting up a space
|
|
616
|
-
* for direct message setup with the
|
|
617
|
-
* using the user's email as an alias
|
|
618
|
-
* can be `users/example@gmail.com`.
|
|
619
|
-
*
|
|
620
|
-
* `{user}`.
|
|
615
|
+
* For human membership, the `Membership.member` field must contain a `user`
|
|
616
|
+
* with `name` populated (format: `users/{user}`) and `type` set to
|
|
617
|
+
* `User.Type.HUMAN`. You can only add human users when setting up a space
|
|
618
|
+
* (adding Chat apps is only supported for direct message setup with the
|
|
619
|
+
* calling app). You can also add members using the user's email as an alias
|
|
620
|
+
* for {user}. For example, the `user.name` can be `users/example@gmail.com`.
|
|
621
|
+
* To invite Gmail users or users from external Google Workspace domains,
|
|
622
|
+
* user's email must be used for `{user}`.
|
|
621
623
|
*
|
|
622
624
|
* Optional when setting `Space.spaceType` to `SPACE`.
|
|
623
625
|
*
|
|
@@ -842,8 +844,8 @@ export declare class ChatServiceClient {
|
|
|
842
844
|
* directly to the specified space. Requires [user
|
|
843
845
|
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
844
846
|
*
|
|
845
|
-
* To specify the member to add, set the `membership.member.name`
|
|
846
|
-
*
|
|
847
|
+
* To specify the member to add, set the `membership.member.name` for the
|
|
848
|
+
* human or app member.
|
|
847
849
|
*
|
|
848
850
|
* - To add the calling app to a space or a direct message between two human
|
|
849
851
|
* users, use `users/app`. Unable to add other
|
|
@@ -898,8 +900,11 @@ export declare class ChatServiceClient {
|
|
|
898
900
|
createMembership(request: protos.google.chat.v1.ICreateMembershipRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IMembership, protos.google.chat.v1.ICreateMembershipRequest | null | undefined, {} | null | undefined>): void;
|
|
899
901
|
createMembership(request: protos.google.chat.v1.ICreateMembershipRequest, callback: Callback<protos.google.chat.v1.IMembership, protos.google.chat.v1.ICreateMembershipRequest | null | undefined, {} | null | undefined>): void;
|
|
900
902
|
/**
|
|
901
|
-
* Updates a membership.
|
|
902
|
-
*
|
|
903
|
+
* Updates a membership. For an example, see [Update a user's membership in
|
|
904
|
+
* a space](https://developers.google.com/workspace/chat/update-members).
|
|
905
|
+
*
|
|
906
|
+
* Requires [user
|
|
907
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
903
908
|
*
|
|
904
909
|
* @param {Object} request
|
|
905
910
|
* The request object that will be sent.
|
|
@@ -1032,6 +1037,149 @@ export declare class ChatServiceClient {
|
|
|
1032
1037
|
]>;
|
|
1033
1038
|
deleteReaction(request: protos.google.chat.v1.IDeleteReactionRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteReactionRequest | null | undefined, {} | null | undefined>): void;
|
|
1034
1039
|
deleteReaction(request: protos.google.chat.v1.IDeleteReactionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteReactionRequest | null | undefined, {} | null | undefined>): void;
|
|
1040
|
+
/**
|
|
1041
|
+
* Returns details about a user's read state within a space, used to identify
|
|
1042
|
+
* read and unread messages. For an example, see [Get details about a user's
|
|
1043
|
+
* space read
|
|
1044
|
+
* state](https://developers.google.com/workspace/chat/get-space-read-state).
|
|
1045
|
+
*
|
|
1046
|
+
* Requires [user
|
|
1047
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
1048
|
+
*
|
|
1049
|
+
* @param {Object} request
|
|
1050
|
+
* The request object that will be sent.
|
|
1051
|
+
* @param {string} request.name
|
|
1052
|
+
* Required. Resource name of the space read state to retrieve.
|
|
1053
|
+
*
|
|
1054
|
+
* Only supports getting read state for the calling user.
|
|
1055
|
+
*
|
|
1056
|
+
* To refer to the calling user, set one of the following:
|
|
1057
|
+
*
|
|
1058
|
+
* - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
|
|
1059
|
+
*
|
|
1060
|
+
* - Their Workspace email address. For example,
|
|
1061
|
+
* `users/user@example.com/spaces/{space}/spaceReadState`.
|
|
1062
|
+
*
|
|
1063
|
+
* - Their user id. For example,
|
|
1064
|
+
* `users/123456789/spaces/{space}/spaceReadState`.
|
|
1065
|
+
*
|
|
1066
|
+
* Format: users/{user}/spaces/{space}/spaceReadState
|
|
1067
|
+
* @param {object} [options]
|
|
1068
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1069
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1070
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.SpaceReadState|SpaceReadState}.
|
|
1071
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
1072
|
+
* for more details and examples.
|
|
1073
|
+
* @example <caption>include:samples/generated/v1/chat_service.get_space_read_state.js</caption>
|
|
1074
|
+
* region_tag:chat_v1_generated_ChatService_GetSpaceReadState_async
|
|
1075
|
+
*/
|
|
1076
|
+
getSpaceReadState(request?: protos.google.chat.v1.IGetSpaceReadStateRequest, options?: CallOptions): Promise<[
|
|
1077
|
+
protos.google.chat.v1.ISpaceReadState,
|
|
1078
|
+
protos.google.chat.v1.IGetSpaceReadStateRequest | undefined,
|
|
1079
|
+
{} | undefined
|
|
1080
|
+
]>;
|
|
1081
|
+
getSpaceReadState(request: protos.google.chat.v1.IGetSpaceReadStateRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISpaceReadState, protos.google.chat.v1.IGetSpaceReadStateRequest | null | undefined, {} | null | undefined>): void;
|
|
1082
|
+
getSpaceReadState(request: protos.google.chat.v1.IGetSpaceReadStateRequest, callback: Callback<protos.google.chat.v1.ISpaceReadState, protos.google.chat.v1.IGetSpaceReadStateRequest | null | undefined, {} | null | undefined>): void;
|
|
1083
|
+
/**
|
|
1084
|
+
* Updates a user's read state within a space, used to identify read and
|
|
1085
|
+
* unread messages. For an example, see [Update a user's space read
|
|
1086
|
+
* state](https://developers.google.com/workspace/chat/update-space-read-state).
|
|
1087
|
+
*
|
|
1088
|
+
* Requires [user
|
|
1089
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
1090
|
+
*
|
|
1091
|
+
* @param {Object} request
|
|
1092
|
+
* The request object that will be sent.
|
|
1093
|
+
* @param {google.chat.v1.SpaceReadState} request.spaceReadState
|
|
1094
|
+
* Required. The space read state and fields to update.
|
|
1095
|
+
*
|
|
1096
|
+
* Only supports updating read state for the calling user.
|
|
1097
|
+
*
|
|
1098
|
+
* To refer to the calling user, set one of the following:
|
|
1099
|
+
*
|
|
1100
|
+
* - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
|
|
1101
|
+
*
|
|
1102
|
+
* - Their Workspace email address. For example,
|
|
1103
|
+
* `users/user@example.com/spaces/{space}/spaceReadState`.
|
|
1104
|
+
*
|
|
1105
|
+
* - Their user id. For example,
|
|
1106
|
+
* `users/123456789/spaces/{space}/spaceReadState`.
|
|
1107
|
+
*
|
|
1108
|
+
* Format: users/{user}/spaces/{space}/spaceReadState
|
|
1109
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
1110
|
+
* Required. The field paths to update. Currently supported field paths:
|
|
1111
|
+
*
|
|
1112
|
+
* - `last_read_time`
|
|
1113
|
+
*
|
|
1114
|
+
* When the `last_read_time` is before the latest message create time, the
|
|
1115
|
+
* space appears as unread in the UI.
|
|
1116
|
+
*
|
|
1117
|
+
* To mark the space as read, set `last_read_time` to any value later (larger)
|
|
1118
|
+
* than the latest message create time. The `last_read_time` is coerced to
|
|
1119
|
+
* match the latest message create time. Note that the space read state only
|
|
1120
|
+
* affects the read state of messages that are visible in the space's
|
|
1121
|
+
* top-level conversation. Replies in threads are unaffected by this
|
|
1122
|
+
* timestamp, and instead rely on the thread read state.
|
|
1123
|
+
* @param {object} [options]
|
|
1124
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1125
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1126
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.SpaceReadState|SpaceReadState}.
|
|
1127
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
1128
|
+
* for more details and examples.
|
|
1129
|
+
* @example <caption>include:samples/generated/v1/chat_service.update_space_read_state.js</caption>
|
|
1130
|
+
* region_tag:chat_v1_generated_ChatService_UpdateSpaceReadState_async
|
|
1131
|
+
*/
|
|
1132
|
+
updateSpaceReadState(request?: protos.google.chat.v1.IUpdateSpaceReadStateRequest, options?: CallOptions): Promise<[
|
|
1133
|
+
protos.google.chat.v1.ISpaceReadState,
|
|
1134
|
+
protos.google.chat.v1.IUpdateSpaceReadStateRequest | undefined,
|
|
1135
|
+
{} | undefined
|
|
1136
|
+
]>;
|
|
1137
|
+
updateSpaceReadState(request: protos.google.chat.v1.IUpdateSpaceReadStateRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.ISpaceReadState, protos.google.chat.v1.IUpdateSpaceReadStateRequest | null | undefined, {} | null | undefined>): void;
|
|
1138
|
+
updateSpaceReadState(request: protos.google.chat.v1.IUpdateSpaceReadStateRequest, callback: Callback<protos.google.chat.v1.ISpaceReadState, protos.google.chat.v1.IUpdateSpaceReadStateRequest | null | undefined, {} | null | undefined>): void;
|
|
1139
|
+
/**
|
|
1140
|
+
* Returns details about a user's read state within a thread, used to identify
|
|
1141
|
+
* read and unread messages. For an example, see [Get details about a user's
|
|
1142
|
+
* thread read
|
|
1143
|
+
* state](https://developers.google.com/workspace/chat/get-thread-read-state).
|
|
1144
|
+
*
|
|
1145
|
+
* Requires [user
|
|
1146
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
1147
|
+
*
|
|
1148
|
+
* @param {Object} request
|
|
1149
|
+
* The request object that will be sent.
|
|
1150
|
+
* @param {string} request.name
|
|
1151
|
+
* Required. Resource name of the thread read state to retrieve.
|
|
1152
|
+
*
|
|
1153
|
+
* Only supports getting read state for the calling user.
|
|
1154
|
+
*
|
|
1155
|
+
* To refer to the calling user, set one of the following:
|
|
1156
|
+
*
|
|
1157
|
+
* - The `me` alias. For example,
|
|
1158
|
+
* `users/me/spaces/{space}/threads/{thread}/threadReadState`.
|
|
1159
|
+
*
|
|
1160
|
+
* - Their Workspace email address. For example,
|
|
1161
|
+
* `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`.
|
|
1162
|
+
*
|
|
1163
|
+
* - Their user id. For example,
|
|
1164
|
+
* `users/123456789/spaces/{space}/threads/{thread}/threadReadState`.
|
|
1165
|
+
*
|
|
1166
|
+
* Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState
|
|
1167
|
+
* @param {object} [options]
|
|
1168
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1169
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1170
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.ThreadReadState|ThreadReadState}.
|
|
1171
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
1172
|
+
* for more details and examples.
|
|
1173
|
+
* @example <caption>include:samples/generated/v1/chat_service.get_thread_read_state.js</caption>
|
|
1174
|
+
* region_tag:chat_v1_generated_ChatService_GetThreadReadState_async
|
|
1175
|
+
*/
|
|
1176
|
+
getThreadReadState(request?: protos.google.chat.v1.IGetThreadReadStateRequest, options?: CallOptions): Promise<[
|
|
1177
|
+
protos.google.chat.v1.IThreadReadState,
|
|
1178
|
+
protos.google.chat.v1.IGetThreadReadStateRequest | undefined,
|
|
1179
|
+
{} | undefined
|
|
1180
|
+
]>;
|
|
1181
|
+
getThreadReadState(request: protos.google.chat.v1.IGetThreadReadStateRequest, options: CallOptions, callback: Callback<protos.google.chat.v1.IThreadReadState, protos.google.chat.v1.IGetThreadReadStateRequest | null | undefined, {} | null | undefined>): void;
|
|
1182
|
+
getThreadReadState(request: protos.google.chat.v1.IGetThreadReadStateRequest, callback: Callback<protos.google.chat.v1.IThreadReadState, protos.google.chat.v1.IGetThreadReadStateRequest | null | undefined, {} | null | undefined>): void;
|
|
1035
1183
|
/**
|
|
1036
1184
|
* Lists messages in a space that the caller is a member of, including
|
|
1037
1185
|
* messages from blocked members and spaces. For an example, see
|
|
@@ -1627,6 +1775,7 @@ export declare class ChatServiceClient {
|
|
|
1627
1775
|
* Lists spaces visible to the caller or authenticated user. Group chats
|
|
1628
1776
|
* and DMs aren't listed until the first message is sent.
|
|
1629
1777
|
*
|
|
1778
|
+
*
|
|
1630
1779
|
* @param {Object} request
|
|
1631
1780
|
* The request object that will be sent.
|
|
1632
1781
|
* @param {number} [request.pageSize]
|
|
@@ -2199,6 +2348,30 @@ export declare class ChatServiceClient {
|
|
|
2199
2348
|
* @returns {string} A string representing the space.
|
|
2200
2349
|
*/
|
|
2201
2350
|
matchSpaceFromSpaceName(spaceName: string): string | number;
|
|
2351
|
+
/**
|
|
2352
|
+
* Return a fully-qualified spaceReadState resource name string.
|
|
2353
|
+
*
|
|
2354
|
+
* @param {string} user
|
|
2355
|
+
* @param {string} space
|
|
2356
|
+
* @returns {string} Resource name string.
|
|
2357
|
+
*/
|
|
2358
|
+
spaceReadStatePath(user: string, space: string): string;
|
|
2359
|
+
/**
|
|
2360
|
+
* Parse the user from SpaceReadState resource.
|
|
2361
|
+
*
|
|
2362
|
+
* @param {string} spaceReadStateName
|
|
2363
|
+
* A fully-qualified path representing SpaceReadState resource.
|
|
2364
|
+
* @returns {string} A string representing the user.
|
|
2365
|
+
*/
|
|
2366
|
+
matchUserFromSpaceReadStateName(spaceReadStateName: string): string | number;
|
|
2367
|
+
/**
|
|
2368
|
+
* Parse the space from SpaceReadState resource.
|
|
2369
|
+
*
|
|
2370
|
+
* @param {string} spaceReadStateName
|
|
2371
|
+
* A fully-qualified path representing SpaceReadState resource.
|
|
2372
|
+
* @returns {string} A string representing the space.
|
|
2373
|
+
*/
|
|
2374
|
+
matchSpaceFromSpaceReadStateName(spaceReadStateName: string): string | number;
|
|
2202
2375
|
/**
|
|
2203
2376
|
* Return a fully-qualified thread resource name string.
|
|
2204
2377
|
*
|
|
@@ -2223,6 +2396,39 @@ export declare class ChatServiceClient {
|
|
|
2223
2396
|
* @returns {string} A string representing the thread.
|
|
2224
2397
|
*/
|
|
2225
2398
|
matchThreadFromThreadName(threadName: string): string | number;
|
|
2399
|
+
/**
|
|
2400
|
+
* Return a fully-qualified threadReadState resource name string.
|
|
2401
|
+
*
|
|
2402
|
+
* @param {string} user
|
|
2403
|
+
* @param {string} space
|
|
2404
|
+
* @param {string} thread
|
|
2405
|
+
* @returns {string} Resource name string.
|
|
2406
|
+
*/
|
|
2407
|
+
threadReadStatePath(user: string, space: string, thread: string): string;
|
|
2408
|
+
/**
|
|
2409
|
+
* Parse the user from ThreadReadState resource.
|
|
2410
|
+
*
|
|
2411
|
+
* @param {string} threadReadStateName
|
|
2412
|
+
* A fully-qualified path representing ThreadReadState resource.
|
|
2413
|
+
* @returns {string} A string representing the user.
|
|
2414
|
+
*/
|
|
2415
|
+
matchUserFromThreadReadStateName(threadReadStateName: string): string | number;
|
|
2416
|
+
/**
|
|
2417
|
+
* Parse the space from ThreadReadState resource.
|
|
2418
|
+
*
|
|
2419
|
+
* @param {string} threadReadStateName
|
|
2420
|
+
* A fully-qualified path representing ThreadReadState resource.
|
|
2421
|
+
* @returns {string} A string representing the space.
|
|
2422
|
+
*/
|
|
2423
|
+
matchSpaceFromThreadReadStateName(threadReadStateName: string): string | number;
|
|
2424
|
+
/**
|
|
2425
|
+
* Parse the thread from ThreadReadState resource.
|
|
2426
|
+
*
|
|
2427
|
+
* @param {string} threadReadStateName
|
|
2428
|
+
* A fully-qualified path representing ThreadReadState resource.
|
|
2429
|
+
* @returns {string} A string representing the thread.
|
|
2430
|
+
*/
|
|
2431
|
+
matchThreadFromThreadReadStateName(threadReadStateName: string): string | number;
|
|
2226
2432
|
/**
|
|
2227
2433
|
* Terminate the gRPC channel and close the client.
|
|
2228
2434
|
*
|