@google-apps/chat 0.10.0 → 0.11.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.
@@ -95,22 +95,23 @@ message Space {
95
95
  // discussion topic, functional purpose, or participants.
96
96
  //
97
97
  // Supports up to 150 characters.
98
- string description = 1;
98
+ string description = 1 [(google.api.field_behavior) = OPTIONAL];
99
99
 
100
100
  // Optional. The space's rules, expectations, and etiquette.
101
101
  //
102
102
  // Supports up to 5,000 characters.
103
- string guidelines = 2;
103
+ string guidelines = 2 [(google.api.field_behavior) = OPTIONAL];
104
104
  }
105
105
 
106
106
  // Represents the count of memberships of a space, grouped into categories.
107
107
  message MembershipCount {
108
- // Count of human users that have directly joined the space, not counting
109
- // users joined by having membership in a joined group.
110
- int32 joined_direct_human_user_count = 4;
108
+ // Output only. Count of human users that have directly joined the space,
109
+ // not counting users joined by having membership in a joined group.
110
+ int32 joined_direct_human_user_count = 4
111
+ [(google.api.field_behavior) = OUTPUT_ONLY];
111
112
 
112
- // Count of all groups that have directly joined the space.
113
- int32 joined_group_count = 5;
113
+ // Output only. Count of all groups that have directly joined the space.
114
+ int32 joined_group_count = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
114
115
  }
115
116
 
116
117
  // Represents the [access
@@ -131,6 +132,9 @@ message Space {
131
132
  // invited to the space can also discover and access the space. To learn
132
133
  // more, see [Make a space discoverable to specific
133
134
  // users](https://developers.google.com/workspace/chat/space-target-audience).
135
+ //
136
+ // Creating discoverable spaces requires [user
137
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
134
138
  DISCOVERABLE = 2;
135
139
  }
136
140
 
@@ -150,8 +154,23 @@ message Space {
150
154
  // To use the default target audience for the Google Workspace organization,
151
155
  // set to `audiences/default`.
152
156
  //
157
+ // Reading the target audience supports:
158
+ //
159
+ // - [User
160
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user)
161
+ //
162
+ // - [App
163
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app)
164
+ // with [administrator
165
+ // approval](https://support.google.com/a?p=chat-app-auth)
166
+ // with the `chat.app.spaces` scope in [Developer
167
+ // Preview](https://developers.google.com/workspace/preview).
168
+ //
153
169
  // This field is not populated when using the `chat.bot` scope with [app
154
170
  // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app).
171
+ //
172
+ // Setting the target audience requires [user
173
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
155
174
  string audience = 3 [(google.api.field_behavior) = OPTIONAL];
156
175
  }
157
176
 
@@ -178,42 +197,50 @@ message Space {
178
197
  // To set permission settings when creating a space, specify the
179
198
  // `PredefinedPermissionSettings` field in your request.
180
199
  message PermissionSettings {
181
- // Setting for managing members and groups in a space.
182
- optional PermissionSetting manage_members_and_groups = 1;
200
+ // Optional. Setting for managing members and groups in a space.
201
+ optional PermissionSetting manage_members_and_groups = 1
202
+ [(google.api.field_behavior) = OPTIONAL];
183
203
 
184
- // Setting for updating space name, avatar, description and guidelines.
185
- optional PermissionSetting modify_space_details = 2;
204
+ // Optional. Setting for updating space name, avatar, description and
205
+ // guidelines.
206
+ optional PermissionSetting modify_space_details = 2
207
+ [(google.api.field_behavior) = OPTIONAL];
186
208
 
187
- // Setting for toggling space history on and off.
188
- optional PermissionSetting toggle_history = 3;
209
+ // Optional. Setting for toggling space history on and off.
210
+ optional PermissionSetting toggle_history = 3
211
+ [(google.api.field_behavior) = OPTIONAL];
189
212
 
190
- // Setting for using @all in a space.
191
- optional PermissionSetting use_at_mention_all = 4;
213
+ // Optional. Setting for using @all in a space.
214
+ optional PermissionSetting use_at_mention_all = 4
215
+ [(google.api.field_behavior) = OPTIONAL];
192
216
 
193
- // Setting for managing apps in a space.
194
- optional PermissionSetting manage_apps = 5;
217
+ // Optional. Setting for managing apps in a space.
218
+ optional PermissionSetting manage_apps = 5
219
+ [(google.api.field_behavior) = OPTIONAL];
195
220
 
196
- // Setting for managing webhooks in a space.
197
- optional PermissionSetting manage_webhooks = 6;
221
+ // Optional. Setting for managing webhooks in a space.
222
+ optional PermissionSetting manage_webhooks = 6
223
+ [(google.api.field_behavior) = OPTIONAL];
198
224
 
199
225
  // Output only. Setting for posting messages in a space.
200
226
  optional PermissionSetting post_messages = 7
201
227
  [(google.api.field_behavior) = OUTPUT_ONLY];
202
228
 
203
- // Setting for replying to messages in a space.
204
- optional PermissionSetting reply_messages = 8;
229
+ // Optional. Setting for replying to messages in a space.
230
+ optional PermissionSetting reply_messages = 8
231
+ [(google.api.field_behavior) = OPTIONAL];
205
232
  }
206
233
 
207
234
  // Represents a space permission setting.
208
235
  message PermissionSetting {
209
- // Whether spaces managers have this permission.
210
- bool managers_allowed = 1;
236
+ // Optional. Whether spaces managers have this permission.
237
+ bool managers_allowed = 1 [(google.api.field_behavior) = OPTIONAL];
211
238
 
212
- // Whether non-manager members have this permission.
213
- bool members_allowed = 2;
239
+ // Optional. Whether non-manager members have this permission.
240
+ bool members_allowed = 2 [(google.api.field_behavior) = OPTIONAL];
214
241
  }
215
242
 
216
- // Resource name of the space.
243
+ // Identifier. Resource name of the space.
217
244
  //
218
245
  // Format: `spaces/{space}`
219
246
  //
@@ -223,15 +250,15 @@ message Space {
223
250
  // method or from the space URL. For example, if the space URL
224
251
  // is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID
225
252
  // is `AAAAAAAAA`.
226
- string name = 1;
253
+ string name = 1 [(google.api.field_behavior) = IDENTIFIER];
227
254
 
228
255
  // Output only. Deprecated: Use `space_type` instead.
229
256
  // The type of a space.
230
257
  Type type = 2 [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
231
258
 
232
- // The type of space. Required when creating a space or updating the space
233
- // type of a space. Output only for other usage.
234
- SpaceType space_type = 10;
259
+ // Optional. The type of space. Required when creating a space or updating the
260
+ // space type of a space. Output only for other usage.
261
+ SpaceType space_type = 10 [(google.api.field_behavior) = OPTIONAL];
235
262
 
236
263
  // Optional. Whether the space is a DM between a Chat app and a single
237
264
  // human.
@@ -242,7 +269,7 @@ message Space {
242
269
  bool threaded = 5
243
270
  [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY];
244
271
 
245
- // The space's display name. Required when [creating a
272
+ // Optional. The space's display name. Required when [creating a
246
273
  // space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create)
247
274
  // with a `spaceType` of `SPACE`. If you receive the error message
248
275
  // `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a
@@ -252,32 +279,39 @@ message Space {
252
279
  // For direct messages, this field might be empty.
253
280
  //
254
281
  // Supports up to 128 characters.
255
- string display_name = 3;
282
+ string display_name = 3 [(google.api.field_behavior) = OPTIONAL];
256
283
 
257
- // Immutable. Whether this space permits any Google Chat user as a member.
258
- // Input when creating a space in a Google Workspace organization. Omit this
259
- // field when creating spaces in the following conditions:
284
+ // Optional. Immutable. Whether this space permits any Google Chat user as a
285
+ // member. Input when creating a space in a Google Workspace organization.
286
+ // Omit this field when creating spaces in the following conditions:
260
287
  //
261
288
  // * The authenticated user uses a consumer account (unmanaged user
262
289
  // account). By default, a space created by a consumer account permits any
263
290
  // Google Chat user.
264
291
  //
265
292
  // For existing spaces, this field is output only.
266
- bool external_user_allowed = 8 [(google.api.field_behavior) = IMMUTABLE];
293
+ bool external_user_allowed = 8 [
294
+ (google.api.field_behavior) = IMMUTABLE,
295
+ (google.api.field_behavior) = OPTIONAL
296
+ ];
267
297
 
268
298
  // Output only. The threading state in the Chat space.
269
299
  SpaceThreadingState space_threading_state = 9
270
300
  [(google.api.field_behavior) = OUTPUT_ONLY];
271
301
 
272
- // Details about the space including description and rules.
273
- SpaceDetails space_details = 11;
302
+ // Optional. Details about the space including description and rules.
303
+ SpaceDetails space_details = 11 [(google.api.field_behavior) = OPTIONAL];
274
304
 
275
- // The message history state for messages and threads in this space.
276
- HistoryState space_history_state = 13;
305
+ // Optional. The message history state for messages and threads in this space.
306
+ HistoryState space_history_state = 13
307
+ [(google.api.field_behavior) = OPTIONAL];
277
308
 
278
309
  // Optional. Whether this space is created in `Import Mode` as part of a data
279
310
  // migration into Google Workspace. While spaces are being imported, they
280
311
  // aren't visible to users until the import is complete.
312
+ //
313
+ // Creating a space in `Import Mode`requires [user
314
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
281
315
  bool import_mode = 16 [(google.api.field_behavior) = OPTIONAL];
282
316
 
283
317
  // Optional. Immutable. For spaces created in Chat, the time the space was
@@ -322,6 +356,9 @@ message Space {
322
356
  // Represents the [permission settings]
323
357
  // (https://support.google.com/chat/answer/13340792) of a space. Only
324
358
  // populated when the `space_type` is `SPACE`.
359
+ //
360
+ // Requires [user
361
+ // authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user).
325
362
  oneof space_permission_settings {
326
363
  // Optional. Input only. Predefined space permission settings, input only
327
364
  // when creating a space. If the field is not set, a collaboration space is
@@ -338,20 +375,28 @@ message Space {
338
375
  PermissionSettings permission_settings = 27
339
376
  [(google.api.field_behavior) = OPTIONAL];
340
377
  }
378
+
379
+ // Output only. The time when the space will be automatically deleted by the
380
+ // system if it remains in import mode.
381
+ //
382
+ // Each space created in import mode must exit this mode before this expire
383
+ // time using `spaces.completeImport`.
384
+ //
385
+ // This field is only populated for spaces that were created with import mode.
386
+ google.protobuf.Timestamp import_mode_expire_time = 28
387
+ [(google.api.field_behavior) = OUTPUT_ONLY];
341
388
  }
342
389
 
343
390
  // A request to create a named space with no members.
344
391
  message CreateSpaceRequest {
345
392
  // Required. The `displayName` and `spaceType` fields must be populated. Only
346
- // `SpaceType.SPACE` is supported.
393
+ // `SpaceType.SPACE` and `SpaceType.GROUP_CHAT` are supported.
394
+ // `SpaceType.GROUP_CHAT` can only be used if `importMode` is set to true.
347
395
  //
348
396
  // If you receive the error message `ALREADY_EXISTS`,
349
397
  // try a different `displayName`. An existing space within the Google
350
398
  // Workspace organization might already use this display name.
351
399
  //
352
- // If you're a member of the [Developer Preview
353
- // program](https://developers.google.com/workspace/preview),
354
- // `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true.
355
400
  //
356
401
  // The space `name` is assigned on the server so anything specified in this
357
402
  // field will be ignored.
@@ -430,7 +475,7 @@ message GetSpaceRequest {
430
475
  (google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
431
476
  ];
432
477
 
433
- // When `true`, the method runs using the user's Google Workspace
478
+ // Optional. When `true`, the method runs using the user's Google Workspace
434
479
  // administrator privileges.
435
480
  //
436
481
  // The calling user must be a Google Workspace administrator with the
@@ -439,7 +484,7 @@ message GetSpaceRequest {
439
484
  //
440
485
  // Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0
441
486
  // scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
442
- bool use_admin_access = 2;
487
+ bool use_admin_access = 2 [(google.api.field_behavior) = OPTIONAL];
443
488
  }
444
489
 
445
490
  // A request to get direct message space based on the user resource.
@@ -528,9 +573,10 @@ message UpdateSpaceRequest {
528
573
  // - `permission_settings.manageApps`
529
574
  // - `permission_settings.manageWebhooks`
530
575
  // - `permission_settings.replyMessages`
531
- google.protobuf.FieldMask update_mask = 2;
576
+ google.protobuf.FieldMask update_mask = 2
577
+ [(google.api.field_behavior) = REQUIRED];
532
578
 
533
- // When `true`, the method runs using the user's Google Workspace
579
+ // Optional. When `true`, the method runs using the user's Google Workspace
534
580
  // administrator privileges.
535
581
  //
536
582
  // The calling user must be a Google Workspace administrator with the
@@ -542,7 +588,7 @@ message UpdateSpaceRequest {
542
588
  //
543
589
  // Some `FieldMask` values are not supported using admin access. For details,
544
590
  // see the description of `update_mask`.
545
- bool use_admin_access = 3;
591
+ bool use_admin_access = 3 [(google.api.field_behavior) = OPTIONAL];
546
592
  }
547
593
 
548
594
  // Request to search for a list of spaces based on a query.
@@ -700,7 +746,7 @@ message DeleteSpaceRequest {
700
746
  (google.api.resource_reference) = { type: "chat.googleapis.com/Space" }
701
747
  ];
702
748
 
703
- // When `true`, the method runs using the user's Google Workspace
749
+ // Optional. When `true`, the method runs using the user's Google Workspace
704
750
  // administrator privileges.
705
751
  //
706
752
  // The calling user must be a Google Workspace administrator with the
@@ -709,7 +755,7 @@ message DeleteSpaceRequest {
709
755
  //
710
756
  // Requires the `chat.admin.delete` [OAuth 2.0
711
757
  // scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes).
712
- bool use_admin_access = 2;
758
+ bool use_admin_access = 2 [(google.api.field_behavior) = OPTIONAL];
713
759
  }
714
760
 
715
761
  // Request message for completing the import process for a space.
@@ -216,15 +216,15 @@ message ListSpaceEventsRequest {
216
216
  // return fewer than this value.
217
217
  //
218
218
  // Negative values return an `INVALID_ARGUMENT` error.
219
- int32 page_size = 5;
219
+ int32 page_size = 5 [(google.api.field_behavior) = OPTIONAL];
220
220
 
221
- // A page token, received from a previous list space events call. Provide this
222
- // to retrieve the subsequent page.
221
+ // Optional. A page token, received from a previous list space events call.
222
+ // Provide this to retrieve the subsequent page.
223
223
  //
224
224
  // When paginating, all other parameters provided to list space events must
225
225
  // match the call that provided the page token. Passing different values to
226
226
  // the other parameters might lead to unexpected results.
227
- string page_token = 6;
227
+ string page_token = 6 [(google.api.field_behavior) = OPTIONAL];
228
228
 
229
229
  // Required. A query filter.
230
230
  //
@@ -3062,6 +3062,9 @@ export namespace google {
3062
3062
 
3063
3063
  /** FieldOptions .google.api.fieldBehavior */
3064
3064
  ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null);
3065
+
3066
+ /** FieldOptions .google.api.fieldInfo */
3067
+ ".google.api.fieldInfo"?: (google.api.IFieldInfo|null);
3065
3068
  }
3066
3069
 
3067
3070
  /** Represents a FieldOptions. */
@@ -17790,6 +17793,9 @@ export namespace google {
17790
17793
 
17791
17794
  /** Space permissionSettings */
17792
17795
  permissionSettings?: (google.chat.v1.Space.IPermissionSettings|null);
17796
+
17797
+ /** Space importModeExpireTime */
17798
+ importModeExpireTime?: (google.protobuf.ITimestamp|null);
17793
17799
  }
17794
17800
 
17795
17801
  /** Represents a Space. */
@@ -17858,6 +17864,9 @@ export namespace google {
17858
17864
  /** Space permissionSettings. */
17859
17865
  public permissionSettings?: (google.chat.v1.Space.IPermissionSettings|null);
17860
17866
 
17867
+ /** Space importModeExpireTime. */
17868
+ public importModeExpireTime?: (google.protobuf.ITimestamp|null);
17869
+
17861
17870
  /** Space spacePermissionSettings. */
17862
17871
  public spacePermissionSettings?: ("predefinedPermissionSettings"|"permissionSettings");
17863
17872
 
@@ -24749,5 +24758,114 @@ export namespace google {
24749
24758
  GA = 4,
24750
24759
  DEPRECATED = 5
24751
24760
  }
24761
+
24762
+ /** Properties of a FieldInfo. */
24763
+ interface IFieldInfo {
24764
+
24765
+ /** FieldInfo format */
24766
+ format?: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format|null);
24767
+ }
24768
+
24769
+ /** Represents a FieldInfo. */
24770
+ class FieldInfo implements IFieldInfo {
24771
+
24772
+ /**
24773
+ * Constructs a new FieldInfo.
24774
+ * @param [properties] Properties to set
24775
+ */
24776
+ constructor(properties?: google.api.IFieldInfo);
24777
+
24778
+ /** FieldInfo format. */
24779
+ public format: (google.api.FieldInfo.Format|keyof typeof google.api.FieldInfo.Format);
24780
+
24781
+ /**
24782
+ * Creates a new FieldInfo instance using the specified properties.
24783
+ * @param [properties] Properties to set
24784
+ * @returns FieldInfo instance
24785
+ */
24786
+ public static create(properties?: google.api.IFieldInfo): google.api.FieldInfo;
24787
+
24788
+ /**
24789
+ * Encodes the specified FieldInfo message. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages.
24790
+ * @param message FieldInfo message or plain object to encode
24791
+ * @param [writer] Writer to encode to
24792
+ * @returns Writer
24793
+ */
24794
+ public static encode(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer;
24795
+
24796
+ /**
24797
+ * Encodes the specified FieldInfo message, length delimited. Does not implicitly {@link google.api.FieldInfo.verify|verify} messages.
24798
+ * @param message FieldInfo message or plain object to encode
24799
+ * @param [writer] Writer to encode to
24800
+ * @returns Writer
24801
+ */
24802
+ public static encodeDelimited(message: google.api.IFieldInfo, writer?: $protobuf.Writer): $protobuf.Writer;
24803
+
24804
+ /**
24805
+ * Decodes a FieldInfo message from the specified reader or buffer.
24806
+ * @param reader Reader or buffer to decode from
24807
+ * @param [length] Message length if known beforehand
24808
+ * @returns FieldInfo
24809
+ * @throws {Error} If the payload is not a reader or valid buffer
24810
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
24811
+ */
24812
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.FieldInfo;
24813
+
24814
+ /**
24815
+ * Decodes a FieldInfo message from the specified reader or buffer, length delimited.
24816
+ * @param reader Reader or buffer to decode from
24817
+ * @returns FieldInfo
24818
+ * @throws {Error} If the payload is not a reader or valid buffer
24819
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
24820
+ */
24821
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.FieldInfo;
24822
+
24823
+ /**
24824
+ * Verifies a FieldInfo message.
24825
+ * @param message Plain object to verify
24826
+ * @returns `null` if valid, otherwise the reason why it is not
24827
+ */
24828
+ public static verify(message: { [k: string]: any }): (string|null);
24829
+
24830
+ /**
24831
+ * Creates a FieldInfo message from a plain object. Also converts values to their respective internal types.
24832
+ * @param object Plain object
24833
+ * @returns FieldInfo
24834
+ */
24835
+ public static fromObject(object: { [k: string]: any }): google.api.FieldInfo;
24836
+
24837
+ /**
24838
+ * Creates a plain object from a FieldInfo message. Also converts values to other types if specified.
24839
+ * @param message FieldInfo
24840
+ * @param [options] Conversion options
24841
+ * @returns Plain object
24842
+ */
24843
+ public static toObject(message: google.api.FieldInfo, options?: $protobuf.IConversionOptions): { [k: string]: any };
24844
+
24845
+ /**
24846
+ * Converts this FieldInfo to JSON.
24847
+ * @returns JSON object
24848
+ */
24849
+ public toJSON(): { [k: string]: any };
24850
+
24851
+ /**
24852
+ * Gets the default type url for FieldInfo
24853
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
24854
+ * @returns The default type url
24855
+ */
24856
+ public static getTypeUrl(typeUrlPrefix?: string): string;
24857
+ }
24858
+
24859
+ namespace FieldInfo {
24860
+
24861
+ /** Format enum. */
24862
+ enum Format {
24863
+ FORMAT_UNSPECIFIED = 0,
24864
+ UUID4 = 1,
24865
+ IPV4 = 2,
24866
+ IPV6 = 3,
24867
+ IPV4_OR_IPV6 = 4
24868
+ }
24869
+ }
24752
24870
  }
24753
24871
  }