@google-apps/chat 0.3.0 → 0.4.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 +7 -0
- package/README.md +3 -0
- package/build/protos/google/chat/v1/chat_service.proto +43 -1
- package/build/protos/google/chat/v1/space_read_state.proto +112 -0
- package/build/protos/google/chat/v1/thread_read_state.proto +74 -0
- package/build/protos/protos.d.ts +566 -0
- package/build/protos/protos.js +1337 -131
- package/build/protos/protos.json +137 -2
- package/build/src/v1/chat_service_client.d.ts +195 -0
- 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,7 +2409,7 @@
|
|
|
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
2414
|
"php_namespace": "Google\\Apps\\Chat\\V1",
|
|
2415
2415
|
"ruby_package": "Google::Apps::Chat::V1"
|
|
@@ -2753,7 +2753,7 @@
|
|
|
2753
2753
|
"ChatService": {
|
|
2754
2754
|
"options": {
|
|
2755
2755
|
"(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"
|
|
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,https://www.googleapis.com/auth/chat.users.readstate,https://www.googleapis.com/auth/chat.users.readstate.readonly"
|
|
2757
2757
|
},
|
|
2758
2758
|
"methods": {
|
|
2759
2759
|
"CreateMessage": {
|
|
@@ -3179,6 +3179,62 @@
|
|
|
3179
3179
|
"(google.api.method_signature)": "name"
|
|
3180
3180
|
}
|
|
3181
3181
|
]
|
|
3182
|
+
},
|
|
3183
|
+
"GetSpaceReadState": {
|
|
3184
|
+
"requestType": "GetSpaceReadStateRequest",
|
|
3185
|
+
"responseType": "SpaceReadState",
|
|
3186
|
+
"options": {
|
|
3187
|
+
"(google.api.http).get": "/v1/{name=users/*/spaces/*/spaceReadState}",
|
|
3188
|
+
"(google.api.method_signature)": "name"
|
|
3189
|
+
},
|
|
3190
|
+
"parsedOptions": [
|
|
3191
|
+
{
|
|
3192
|
+
"(google.api.http)": {
|
|
3193
|
+
"get": "/v1/{name=users/*/spaces/*/spaceReadState}"
|
|
3194
|
+
}
|
|
3195
|
+
},
|
|
3196
|
+
{
|
|
3197
|
+
"(google.api.method_signature)": "name"
|
|
3198
|
+
}
|
|
3199
|
+
]
|
|
3200
|
+
},
|
|
3201
|
+
"UpdateSpaceReadState": {
|
|
3202
|
+
"requestType": "UpdateSpaceReadStateRequest",
|
|
3203
|
+
"responseType": "SpaceReadState",
|
|
3204
|
+
"options": {
|
|
3205
|
+
"(google.api.http).patch": "/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}",
|
|
3206
|
+
"(google.api.http).body": "space_read_state",
|
|
3207
|
+
"(google.api.method_signature)": "space_read_state,update_mask"
|
|
3208
|
+
},
|
|
3209
|
+
"parsedOptions": [
|
|
3210
|
+
{
|
|
3211
|
+
"(google.api.http)": {
|
|
3212
|
+
"patch": "/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}",
|
|
3213
|
+
"body": "space_read_state"
|
|
3214
|
+
}
|
|
3215
|
+
},
|
|
3216
|
+
{
|
|
3217
|
+
"(google.api.method_signature)": "space_read_state,update_mask"
|
|
3218
|
+
}
|
|
3219
|
+
]
|
|
3220
|
+
},
|
|
3221
|
+
"GetThreadReadState": {
|
|
3222
|
+
"requestType": "GetThreadReadStateRequest",
|
|
3223
|
+
"responseType": "ThreadReadState",
|
|
3224
|
+
"options": {
|
|
3225
|
+
"(google.api.http).get": "/v1/{name=users/*/spaces/*/threads/*/threadReadState}",
|
|
3226
|
+
"(google.api.method_signature)": "name"
|
|
3227
|
+
},
|
|
3228
|
+
"parsedOptions": [
|
|
3229
|
+
{
|
|
3230
|
+
"(google.api.http)": {
|
|
3231
|
+
"get": "/v1/{name=users/*/spaces/*/threads/*/threadReadState}"
|
|
3232
|
+
}
|
|
3233
|
+
},
|
|
3234
|
+
{
|
|
3235
|
+
"(google.api.method_signature)": "name"
|
|
3236
|
+
}
|
|
3237
|
+
]
|
|
3182
3238
|
}
|
|
3183
3239
|
}
|
|
3184
3240
|
},
|
|
@@ -4688,6 +4744,56 @@
|
|
|
4688
4744
|
"HISTORY_ON": 2
|
|
4689
4745
|
}
|
|
4690
4746
|
},
|
|
4747
|
+
"SpaceReadState": {
|
|
4748
|
+
"options": {
|
|
4749
|
+
"(google.api.resource).type": "chat.googleapis.com/SpaceReadState",
|
|
4750
|
+
"(google.api.resource).pattern": "users/{user}/spaces/{space}/spaceReadState",
|
|
4751
|
+
"(google.api.resource).singular": "spaceReadState"
|
|
4752
|
+
},
|
|
4753
|
+
"fields": {
|
|
4754
|
+
"name": {
|
|
4755
|
+
"type": "string",
|
|
4756
|
+
"id": 1
|
|
4757
|
+
},
|
|
4758
|
+
"lastReadTime": {
|
|
4759
|
+
"type": "google.protobuf.Timestamp",
|
|
4760
|
+
"id": 2,
|
|
4761
|
+
"options": {
|
|
4762
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
4763
|
+
}
|
|
4764
|
+
}
|
|
4765
|
+
}
|
|
4766
|
+
},
|
|
4767
|
+
"GetSpaceReadStateRequest": {
|
|
4768
|
+
"fields": {
|
|
4769
|
+
"name": {
|
|
4770
|
+
"type": "string",
|
|
4771
|
+
"id": 1,
|
|
4772
|
+
"options": {
|
|
4773
|
+
"(google.api.field_behavior)": "REQUIRED",
|
|
4774
|
+
"(google.api.resource_reference).type": "chat.googleapis.com/SpaceReadState"
|
|
4775
|
+
}
|
|
4776
|
+
}
|
|
4777
|
+
}
|
|
4778
|
+
},
|
|
4779
|
+
"UpdateSpaceReadStateRequest": {
|
|
4780
|
+
"fields": {
|
|
4781
|
+
"spaceReadState": {
|
|
4782
|
+
"type": "SpaceReadState",
|
|
4783
|
+
"id": 1,
|
|
4784
|
+
"options": {
|
|
4785
|
+
"(google.api.field_behavior)": "REQUIRED"
|
|
4786
|
+
}
|
|
4787
|
+
},
|
|
4788
|
+
"updateMask": {
|
|
4789
|
+
"type": "google.protobuf.FieldMask",
|
|
4790
|
+
"id": 2,
|
|
4791
|
+
"options": {
|
|
4792
|
+
"(google.api.field_behavior)": "REQUIRED"
|
|
4793
|
+
}
|
|
4794
|
+
}
|
|
4795
|
+
}
|
|
4796
|
+
},
|
|
4691
4797
|
"SetUpSpaceRequest": {
|
|
4692
4798
|
"fields": {
|
|
4693
4799
|
"space": {
|
|
@@ -4713,6 +4819,35 @@
|
|
|
4713
4819
|
}
|
|
4714
4820
|
}
|
|
4715
4821
|
}
|
|
4822
|
+
},
|
|
4823
|
+
"ThreadReadState": {
|
|
4824
|
+
"options": {
|
|
4825
|
+
"(google.api.resource).type": "chat.googleapis.com/ThreadReadState",
|
|
4826
|
+
"(google.api.resource).pattern": "users/{user}/spaces/{space}/threads/{thread}/threadReadState",
|
|
4827
|
+
"(google.api.resource).singular": "threadReadState"
|
|
4828
|
+
},
|
|
4829
|
+
"fields": {
|
|
4830
|
+
"name": {
|
|
4831
|
+
"type": "string",
|
|
4832
|
+
"id": 1
|
|
4833
|
+
},
|
|
4834
|
+
"lastReadTime": {
|
|
4835
|
+
"type": "google.protobuf.Timestamp",
|
|
4836
|
+
"id": 2
|
|
4837
|
+
}
|
|
4838
|
+
}
|
|
4839
|
+
},
|
|
4840
|
+
"GetThreadReadStateRequest": {
|
|
4841
|
+
"fields": {
|
|
4842
|
+
"name": {
|
|
4843
|
+
"type": "string",
|
|
4844
|
+
"id": 1,
|
|
4845
|
+
"options": {
|
|
4846
|
+
"(google.api.field_behavior)": "REQUIRED",
|
|
4847
|
+
"(google.api.resource_reference).type": "chat.googleapis.com/ThreadReadState"
|
|
4848
|
+
}
|
|
4849
|
+
}
|
|
4850
|
+
}
|
|
4716
4851
|
}
|
|
4717
4852
|
}
|
|
4718
4853
|
}
|
|
@@ -1032,6 +1032,144 @@ export declare class ChatServiceClient {
|
|
|
1032
1032
|
]>;
|
|
1033
1033
|
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
1034
|
deleteReaction(request: protos.google.chat.v1.IDeleteReactionRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.chat.v1.IDeleteReactionRequest | null | undefined, {} | null | undefined>): void;
|
|
1035
|
+
/**
|
|
1036
|
+
* Returns details about a user's read state within a space, used to identify
|
|
1037
|
+
* read and unread messages.
|
|
1038
|
+
*
|
|
1039
|
+
* Requires [user
|
|
1040
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
1041
|
+
*
|
|
1042
|
+
* @param {Object} request
|
|
1043
|
+
* The request object that will be sent.
|
|
1044
|
+
* @param {string} request.name
|
|
1045
|
+
* Required. Resource name of the space read state to retrieve.
|
|
1046
|
+
*
|
|
1047
|
+
* Only supports getting read state for the calling user.
|
|
1048
|
+
*
|
|
1049
|
+
* To refer to the calling user, set one of the following:
|
|
1050
|
+
*
|
|
1051
|
+
* - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
|
|
1052
|
+
*
|
|
1053
|
+
* - Their Workspace email address. For example,
|
|
1054
|
+
* `users/user@example.com/spaces/{space}/spaceReadState`.
|
|
1055
|
+
*
|
|
1056
|
+
* - Their user id. For example,
|
|
1057
|
+
* `users/123456789/spaces/{space}/spaceReadState`.
|
|
1058
|
+
*
|
|
1059
|
+
* Format: users/{user}/spaces/{space}/spaceReadState
|
|
1060
|
+
* @param {object} [options]
|
|
1061
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1062
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1063
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.SpaceReadState|SpaceReadState}.
|
|
1064
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
1065
|
+
* for more details and examples.
|
|
1066
|
+
* @example <caption>include:samples/generated/v1/chat_service.get_space_read_state.js</caption>
|
|
1067
|
+
* region_tag:chat_v1_generated_ChatService_GetSpaceReadState_async
|
|
1068
|
+
*/
|
|
1069
|
+
getSpaceReadState(request?: protos.google.chat.v1.IGetSpaceReadStateRequest, options?: CallOptions): Promise<[
|
|
1070
|
+
protos.google.chat.v1.ISpaceReadState,
|
|
1071
|
+
protos.google.chat.v1.IGetSpaceReadStateRequest | undefined,
|
|
1072
|
+
{} | undefined
|
|
1073
|
+
]>;
|
|
1074
|
+
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;
|
|
1075
|
+
getSpaceReadState(request: protos.google.chat.v1.IGetSpaceReadStateRequest, callback: Callback<protos.google.chat.v1.ISpaceReadState, protos.google.chat.v1.IGetSpaceReadStateRequest | null | undefined, {} | null | undefined>): void;
|
|
1076
|
+
/**
|
|
1077
|
+
* Updates a user's read state within a space, used to identify read and
|
|
1078
|
+
* unread messages.
|
|
1079
|
+
*
|
|
1080
|
+
* Requires [user
|
|
1081
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
1082
|
+
*
|
|
1083
|
+
* @param {Object} request
|
|
1084
|
+
* The request object that will be sent.
|
|
1085
|
+
* @param {google.chat.v1.SpaceReadState} request.spaceReadState
|
|
1086
|
+
* Required. The space read state and fields to update.
|
|
1087
|
+
*
|
|
1088
|
+
* Only supports updating read state for the calling user.
|
|
1089
|
+
*
|
|
1090
|
+
* To refer to the calling user, set one of the following:
|
|
1091
|
+
*
|
|
1092
|
+
* - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`.
|
|
1093
|
+
*
|
|
1094
|
+
* - Their Workspace email address. For example,
|
|
1095
|
+
* `users/user@example.com/spaces/{space}/spaceReadState`.
|
|
1096
|
+
*
|
|
1097
|
+
* - Their user id. For example,
|
|
1098
|
+
* `users/123456789/spaces/{space}/spaceReadState`.
|
|
1099
|
+
*
|
|
1100
|
+
* Format: users/{user}/spaces/{space}/spaceReadState
|
|
1101
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
1102
|
+
* Required. The field paths to update. Currently supported field paths:
|
|
1103
|
+
*
|
|
1104
|
+
* - `last_read_time`
|
|
1105
|
+
*
|
|
1106
|
+
* When the `last_read_time` is before the latest message create time, the
|
|
1107
|
+
* space appears as unread in the UI.
|
|
1108
|
+
*
|
|
1109
|
+
* To mark the space as read, set `last_read_time` to any value later (larger)
|
|
1110
|
+
* than the latest message create time. The `last_read_time` is coerced to
|
|
1111
|
+
* match the latest message create time. Note that the space read state only
|
|
1112
|
+
* affects the read state of messages that are visible in the space's
|
|
1113
|
+
* top-level conversation. Replies in threads are unaffected by this
|
|
1114
|
+
* timestamp, and instead rely on the thread read state.
|
|
1115
|
+
* @param {object} [options]
|
|
1116
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1117
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1118
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.SpaceReadState|SpaceReadState}.
|
|
1119
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
1120
|
+
* for more details and examples.
|
|
1121
|
+
* @example <caption>include:samples/generated/v1/chat_service.update_space_read_state.js</caption>
|
|
1122
|
+
* region_tag:chat_v1_generated_ChatService_UpdateSpaceReadState_async
|
|
1123
|
+
*/
|
|
1124
|
+
updateSpaceReadState(request?: protos.google.chat.v1.IUpdateSpaceReadStateRequest, options?: CallOptions): Promise<[
|
|
1125
|
+
protos.google.chat.v1.ISpaceReadState,
|
|
1126
|
+
protos.google.chat.v1.IUpdateSpaceReadStateRequest | undefined,
|
|
1127
|
+
{} | undefined
|
|
1128
|
+
]>;
|
|
1129
|
+
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;
|
|
1130
|
+
updateSpaceReadState(request: protos.google.chat.v1.IUpdateSpaceReadStateRequest, callback: Callback<protos.google.chat.v1.ISpaceReadState, protos.google.chat.v1.IUpdateSpaceReadStateRequest | null | undefined, {} | null | undefined>): void;
|
|
1131
|
+
/**
|
|
1132
|
+
* Returns details about a user's read state within a thread, used to identify
|
|
1133
|
+
* read and unread messages.
|
|
1134
|
+
*
|
|
1135
|
+
* Requires [user
|
|
1136
|
+
* authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
|
|
1137
|
+
*
|
|
1138
|
+
* @param {Object} request
|
|
1139
|
+
* The request object that will be sent.
|
|
1140
|
+
* @param {string} request.name
|
|
1141
|
+
* Required. Resource name of the thread read state to retrieve.
|
|
1142
|
+
*
|
|
1143
|
+
* Only supports getting read state for the calling user.
|
|
1144
|
+
*
|
|
1145
|
+
* To refer to the calling user, set one of the following:
|
|
1146
|
+
*
|
|
1147
|
+
* - The `me` alias. For example,
|
|
1148
|
+
* `users/me/spaces/{space}/threads/{thread}/threadReadState`.
|
|
1149
|
+
*
|
|
1150
|
+
* - Their Workspace email address. For example,
|
|
1151
|
+
* `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`.
|
|
1152
|
+
*
|
|
1153
|
+
* - Their user id. For example,
|
|
1154
|
+
* `users/123456789/spaces/{space}/threads/{thread}/threadReadState`.
|
|
1155
|
+
*
|
|
1156
|
+
* Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState
|
|
1157
|
+
* @param {object} [options]
|
|
1158
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
1159
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
1160
|
+
* The first element of the array is an object representing {@link protos.google.chat.v1.ThreadReadState|ThreadReadState}.
|
|
1161
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
|
1162
|
+
* for more details and examples.
|
|
1163
|
+
* @example <caption>include:samples/generated/v1/chat_service.get_thread_read_state.js</caption>
|
|
1164
|
+
* region_tag:chat_v1_generated_ChatService_GetThreadReadState_async
|
|
1165
|
+
*/
|
|
1166
|
+
getThreadReadState(request?: protos.google.chat.v1.IGetThreadReadStateRequest, options?: CallOptions): Promise<[
|
|
1167
|
+
protos.google.chat.v1.IThreadReadState,
|
|
1168
|
+
protos.google.chat.v1.IGetThreadReadStateRequest | undefined,
|
|
1169
|
+
{} | undefined
|
|
1170
|
+
]>;
|
|
1171
|
+
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;
|
|
1172
|
+
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
1173
|
/**
|
|
1036
1174
|
* Lists messages in a space that the caller is a member of, including
|
|
1037
1175
|
* messages from blocked members and spaces. For an example, see
|
|
@@ -2199,6 +2337,30 @@ export declare class ChatServiceClient {
|
|
|
2199
2337
|
* @returns {string} A string representing the space.
|
|
2200
2338
|
*/
|
|
2201
2339
|
matchSpaceFromSpaceName(spaceName: string): string | number;
|
|
2340
|
+
/**
|
|
2341
|
+
* Return a fully-qualified spaceReadState resource name string.
|
|
2342
|
+
*
|
|
2343
|
+
* @param {string} user
|
|
2344
|
+
* @param {string} space
|
|
2345
|
+
* @returns {string} Resource name string.
|
|
2346
|
+
*/
|
|
2347
|
+
spaceReadStatePath(user: string, space: string): string;
|
|
2348
|
+
/**
|
|
2349
|
+
* Parse the user from SpaceReadState resource.
|
|
2350
|
+
*
|
|
2351
|
+
* @param {string} spaceReadStateName
|
|
2352
|
+
* A fully-qualified path representing SpaceReadState resource.
|
|
2353
|
+
* @returns {string} A string representing the user.
|
|
2354
|
+
*/
|
|
2355
|
+
matchUserFromSpaceReadStateName(spaceReadStateName: string): string | number;
|
|
2356
|
+
/**
|
|
2357
|
+
* Parse the space from SpaceReadState resource.
|
|
2358
|
+
*
|
|
2359
|
+
* @param {string} spaceReadStateName
|
|
2360
|
+
* A fully-qualified path representing SpaceReadState resource.
|
|
2361
|
+
* @returns {string} A string representing the space.
|
|
2362
|
+
*/
|
|
2363
|
+
matchSpaceFromSpaceReadStateName(spaceReadStateName: string): string | number;
|
|
2202
2364
|
/**
|
|
2203
2365
|
* Return a fully-qualified thread resource name string.
|
|
2204
2366
|
*
|
|
@@ -2223,6 +2385,39 @@ export declare class ChatServiceClient {
|
|
|
2223
2385
|
* @returns {string} A string representing the thread.
|
|
2224
2386
|
*/
|
|
2225
2387
|
matchThreadFromThreadName(threadName: string): string | number;
|
|
2388
|
+
/**
|
|
2389
|
+
* Return a fully-qualified threadReadState resource name string.
|
|
2390
|
+
*
|
|
2391
|
+
* @param {string} user
|
|
2392
|
+
* @param {string} space
|
|
2393
|
+
* @param {string} thread
|
|
2394
|
+
* @returns {string} Resource name string.
|
|
2395
|
+
*/
|
|
2396
|
+
threadReadStatePath(user: string, space: string, thread: string): string;
|
|
2397
|
+
/**
|
|
2398
|
+
* Parse the user from ThreadReadState resource.
|
|
2399
|
+
*
|
|
2400
|
+
* @param {string} threadReadStateName
|
|
2401
|
+
* A fully-qualified path representing ThreadReadState resource.
|
|
2402
|
+
* @returns {string} A string representing the user.
|
|
2403
|
+
*/
|
|
2404
|
+
matchUserFromThreadReadStateName(threadReadStateName: string): string | number;
|
|
2405
|
+
/**
|
|
2406
|
+
* Parse the space from ThreadReadState resource.
|
|
2407
|
+
*
|
|
2408
|
+
* @param {string} threadReadStateName
|
|
2409
|
+
* A fully-qualified path representing ThreadReadState resource.
|
|
2410
|
+
* @returns {string} A string representing the space.
|
|
2411
|
+
*/
|
|
2412
|
+
matchSpaceFromThreadReadStateName(threadReadStateName: string): string | number;
|
|
2413
|
+
/**
|
|
2414
|
+
* Parse the thread from ThreadReadState resource.
|
|
2415
|
+
*
|
|
2416
|
+
* @param {string} threadReadStateName
|
|
2417
|
+
* A fully-qualified path representing ThreadReadState resource.
|
|
2418
|
+
* @returns {string} A string representing the thread.
|
|
2419
|
+
*/
|
|
2420
|
+
matchThreadFromThreadReadStateName(threadReadStateName: string): string | number;
|
|
2226
2421
|
/**
|
|
2227
2422
|
* Terminate the gRPC channel and close the client.
|
|
2228
2423
|
*
|
|
@@ -155,7 +155,9 @@ class ChatServiceClient {
|
|
|
155
155
|
quotedMessageMetadataPathTemplate: new this._gaxModule.PathTemplate('spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}'),
|
|
156
156
|
reactionPathTemplate: new this._gaxModule.PathTemplate('spaces/{space}/messages/{message}/reactions/{reaction}'),
|
|
157
157
|
spacePathTemplate: new this._gaxModule.PathTemplate('spaces/{space}'),
|
|
158
|
+
spaceReadStatePathTemplate: new this._gaxModule.PathTemplate('users/{user}/spaces/{space}/spaceReadState'),
|
|
158
159
|
threadPathTemplate: new this._gaxModule.PathTemplate('spaces/{space}/threads/{thread}'),
|
|
160
|
+
threadReadStatePathTemplate: new this._gaxModule.PathTemplate('users/{user}/spaces/{space}/threads/{thread}/threadReadState'),
|
|
159
161
|
};
|
|
160
162
|
// Some of the methods on this service return "paged" results,
|
|
161
163
|
// (e.g. 50 results at a time, with tokens to get subsequent
|
|
@@ -223,6 +225,9 @@ class ChatServiceClient {
|
|
|
223
225
|
'createReaction',
|
|
224
226
|
'listReactions',
|
|
225
227
|
'deleteReaction',
|
|
228
|
+
'getSpaceReadState',
|
|
229
|
+
'updateSpaceReadState',
|
|
230
|
+
'getThreadReadState',
|
|
226
231
|
];
|
|
227
232
|
for (const methodName of chatServiceStubMethods) {
|
|
228
233
|
const callPromise = this.chatServiceStub.then(stub => (...args) => {
|
|
@@ -303,6 +308,8 @@ class ChatServiceClient {
|
|
|
303
308
|
'https://www.googleapis.com/auth/chat.spaces',
|
|
304
309
|
'https://www.googleapis.com/auth/chat.spaces.create',
|
|
305
310
|
'https://www.googleapis.com/auth/chat.spaces.readonly',
|
|
311
|
+
'https://www.googleapis.com/auth/chat.users.readstate',
|
|
312
|
+
'https://www.googleapis.com/auth/chat.users.readstate.readonly',
|
|
306
313
|
];
|
|
307
314
|
}
|
|
308
315
|
/**
|
|
@@ -700,6 +707,69 @@ class ChatServiceClient {
|
|
|
700
707
|
this.initialize();
|
|
701
708
|
return this.innerApiCalls.deleteReaction(request, options, callback);
|
|
702
709
|
}
|
|
710
|
+
getSpaceReadState(request, optionsOrCallback, callback) {
|
|
711
|
+
var _a;
|
|
712
|
+
request = request || {};
|
|
713
|
+
let options;
|
|
714
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
715
|
+
callback = optionsOrCallback;
|
|
716
|
+
options = {};
|
|
717
|
+
}
|
|
718
|
+
else {
|
|
719
|
+
options = optionsOrCallback;
|
|
720
|
+
}
|
|
721
|
+
options = options || {};
|
|
722
|
+
options.otherArgs = options.otherArgs || {};
|
|
723
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
724
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
725
|
+
this._gaxModule.routingHeader.fromParams({
|
|
726
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
727
|
+
});
|
|
728
|
+
this.initialize();
|
|
729
|
+
return this.innerApiCalls.getSpaceReadState(request, options, callback);
|
|
730
|
+
}
|
|
731
|
+
updateSpaceReadState(request, optionsOrCallback, callback) {
|
|
732
|
+
var _a;
|
|
733
|
+
request = request || {};
|
|
734
|
+
let options;
|
|
735
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
736
|
+
callback = optionsOrCallback;
|
|
737
|
+
options = {};
|
|
738
|
+
}
|
|
739
|
+
else {
|
|
740
|
+
options = optionsOrCallback;
|
|
741
|
+
}
|
|
742
|
+
options = options || {};
|
|
743
|
+
options.otherArgs = options.otherArgs || {};
|
|
744
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
745
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
746
|
+
this._gaxModule.routingHeader.fromParams({
|
|
747
|
+
'space_read_state.name': (_a = request.spaceReadState.name) !== null && _a !== void 0 ? _a : '',
|
|
748
|
+
});
|
|
749
|
+
this.initialize();
|
|
750
|
+
return this.innerApiCalls.updateSpaceReadState(request, options, callback);
|
|
751
|
+
}
|
|
752
|
+
getThreadReadState(request, optionsOrCallback, callback) {
|
|
753
|
+
var _a;
|
|
754
|
+
request = request || {};
|
|
755
|
+
let options;
|
|
756
|
+
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
757
|
+
callback = optionsOrCallback;
|
|
758
|
+
options = {};
|
|
759
|
+
}
|
|
760
|
+
else {
|
|
761
|
+
options = optionsOrCallback;
|
|
762
|
+
}
|
|
763
|
+
options = options || {};
|
|
764
|
+
options.otherArgs = options.otherArgs || {};
|
|
765
|
+
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
766
|
+
options.otherArgs.headers['x-goog-request-params'] =
|
|
767
|
+
this._gaxModule.routingHeader.fromParams({
|
|
768
|
+
name: (_a = request.name) !== null && _a !== void 0 ? _a : '',
|
|
769
|
+
});
|
|
770
|
+
this.initialize();
|
|
771
|
+
return this.innerApiCalls.getThreadReadState(request, options, callback);
|
|
772
|
+
}
|
|
703
773
|
listMessages(request, optionsOrCallback, callback) {
|
|
704
774
|
var _a;
|
|
705
775
|
request = request || {};
|
|
@@ -1737,6 +1807,39 @@ class ChatServiceClient {
|
|
|
1737
1807
|
matchSpaceFromSpaceName(spaceName) {
|
|
1738
1808
|
return this.pathTemplates.spacePathTemplate.match(spaceName).space;
|
|
1739
1809
|
}
|
|
1810
|
+
/**
|
|
1811
|
+
* Return a fully-qualified spaceReadState resource name string.
|
|
1812
|
+
*
|
|
1813
|
+
* @param {string} user
|
|
1814
|
+
* @param {string} space
|
|
1815
|
+
* @returns {string} Resource name string.
|
|
1816
|
+
*/
|
|
1817
|
+
spaceReadStatePath(user, space) {
|
|
1818
|
+
return this.pathTemplates.spaceReadStatePathTemplate.render({
|
|
1819
|
+
user: user,
|
|
1820
|
+
space: space,
|
|
1821
|
+
});
|
|
1822
|
+
}
|
|
1823
|
+
/**
|
|
1824
|
+
* Parse the user from SpaceReadState resource.
|
|
1825
|
+
*
|
|
1826
|
+
* @param {string} spaceReadStateName
|
|
1827
|
+
* A fully-qualified path representing SpaceReadState resource.
|
|
1828
|
+
* @returns {string} A string representing the user.
|
|
1829
|
+
*/
|
|
1830
|
+
matchUserFromSpaceReadStateName(spaceReadStateName) {
|
|
1831
|
+
return this.pathTemplates.spaceReadStatePathTemplate.match(spaceReadStateName).user;
|
|
1832
|
+
}
|
|
1833
|
+
/**
|
|
1834
|
+
* Parse the space from SpaceReadState resource.
|
|
1835
|
+
*
|
|
1836
|
+
* @param {string} spaceReadStateName
|
|
1837
|
+
* A fully-qualified path representing SpaceReadState resource.
|
|
1838
|
+
* @returns {string} A string representing the space.
|
|
1839
|
+
*/
|
|
1840
|
+
matchSpaceFromSpaceReadStateName(spaceReadStateName) {
|
|
1841
|
+
return this.pathTemplates.spaceReadStatePathTemplate.match(spaceReadStateName).space;
|
|
1842
|
+
}
|
|
1740
1843
|
/**
|
|
1741
1844
|
* Return a fully-qualified thread resource name string.
|
|
1742
1845
|
*
|
|
@@ -1770,6 +1873,51 @@ class ChatServiceClient {
|
|
|
1770
1873
|
matchThreadFromThreadName(threadName) {
|
|
1771
1874
|
return this.pathTemplates.threadPathTemplate.match(threadName).thread;
|
|
1772
1875
|
}
|
|
1876
|
+
/**
|
|
1877
|
+
* Return a fully-qualified threadReadState resource name string.
|
|
1878
|
+
*
|
|
1879
|
+
* @param {string} user
|
|
1880
|
+
* @param {string} space
|
|
1881
|
+
* @param {string} thread
|
|
1882
|
+
* @returns {string} Resource name string.
|
|
1883
|
+
*/
|
|
1884
|
+
threadReadStatePath(user, space, thread) {
|
|
1885
|
+
return this.pathTemplates.threadReadStatePathTemplate.render({
|
|
1886
|
+
user: user,
|
|
1887
|
+
space: space,
|
|
1888
|
+
thread: thread,
|
|
1889
|
+
});
|
|
1890
|
+
}
|
|
1891
|
+
/**
|
|
1892
|
+
* Parse the user from ThreadReadState resource.
|
|
1893
|
+
*
|
|
1894
|
+
* @param {string} threadReadStateName
|
|
1895
|
+
* A fully-qualified path representing ThreadReadState resource.
|
|
1896
|
+
* @returns {string} A string representing the user.
|
|
1897
|
+
*/
|
|
1898
|
+
matchUserFromThreadReadStateName(threadReadStateName) {
|
|
1899
|
+
return this.pathTemplates.threadReadStatePathTemplate.match(threadReadStateName).user;
|
|
1900
|
+
}
|
|
1901
|
+
/**
|
|
1902
|
+
* Parse the space from ThreadReadState resource.
|
|
1903
|
+
*
|
|
1904
|
+
* @param {string} threadReadStateName
|
|
1905
|
+
* A fully-qualified path representing ThreadReadState resource.
|
|
1906
|
+
* @returns {string} A string representing the space.
|
|
1907
|
+
*/
|
|
1908
|
+
matchSpaceFromThreadReadStateName(threadReadStateName) {
|
|
1909
|
+
return this.pathTemplates.threadReadStatePathTemplate.match(threadReadStateName).space;
|
|
1910
|
+
}
|
|
1911
|
+
/**
|
|
1912
|
+
* Parse the thread from ThreadReadState resource.
|
|
1913
|
+
*
|
|
1914
|
+
* @param {string} threadReadStateName
|
|
1915
|
+
* A fully-qualified path representing ThreadReadState resource.
|
|
1916
|
+
* @returns {string} A string representing the thread.
|
|
1917
|
+
*/
|
|
1918
|
+
matchThreadFromThreadReadStateName(threadReadStateName) {
|
|
1919
|
+
return this.pathTemplates.threadReadStatePathTemplate.match(threadReadStateName).thread;
|
|
1920
|
+
}
|
|
1773
1921
|
/**
|
|
1774
1922
|
* Terminate the gRPC channel and close the client.
|
|
1775
1923
|
*
|