@google-cloud/pubsub 2.16.6 → 2.18.2

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 (62) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +54 -53
  3. package/build/protos/protos.d.ts +2 -1
  4. package/build/protos/protos.js +7 -0
  5. package/build/protos/protos.json +14 -1
  6. package/build/src/iam.d.ts +180 -0
  7. package/build/src/iam.js +11 -176
  8. package/build/src/iam.js.map +1 -1
  9. package/build/src/index.d.ts +13 -4
  10. package/build/src/index.js +12 -4
  11. package/build/src/index.js.map +1 -1
  12. package/build/src/lease-manager.d.ts +7 -2
  13. package/build/src/lease-manager.js +19 -4
  14. package/build/src/lease-manager.js.map +1 -1
  15. package/build/src/publisher/flow-control.d.ts +90 -0
  16. package/build/src/publisher/flow-control.js +145 -0
  17. package/build/src/publisher/flow-control.js.map +1 -0
  18. package/build/src/publisher/flow-publisher.d.ts +95 -0
  19. package/build/src/publisher/flow-publisher.js +133 -0
  20. package/build/src/publisher/flow-publisher.js.map +1 -0
  21. package/build/src/publisher/index.d.ts +33 -5
  22. package/build/src/publisher/index.js +16 -39
  23. package/build/src/publisher/index.js.map +1 -1
  24. package/build/src/publisher/message-batch.d.ts +1 -1
  25. package/build/src/publisher/message-batch.js +4 -3
  26. package/build/src/publisher/message-batch.js.map +1 -1
  27. package/build/src/publisher/message-queues.js.map +1 -1
  28. package/build/src/publisher/pubsub-message.d.ts +52 -0
  29. package/build/src/publisher/pubsub-message.js +56 -0
  30. package/build/src/publisher/pubsub-message.js.map +1 -0
  31. package/build/src/pubsub.d.ts +354 -4
  32. package/build/src/pubsub.js +28 -322
  33. package/build/src/pubsub.js.map +1 -1
  34. package/build/src/schema.d.ts +9 -4
  35. package/build/src/schema.js +9 -4
  36. package/build/src/schema.js.map +1 -1
  37. package/build/src/snapshot.d.ts +87 -0
  38. package/build/src/snapshot.js +7 -83
  39. package/build/src/snapshot.js.map +1 -1
  40. package/build/src/subscriber.d.ts +6 -0
  41. package/build/src/subscriber.js +6 -0
  42. package/build/src/subscriber.js.map +1 -1
  43. package/build/src/subscription.d.ts +439 -9
  44. package/build/src/subscription.js +38 -404
  45. package/build/src/subscription.js.map +1 -1
  46. package/build/src/topic.d.ts +481 -1
  47. package/build/src/topic.js +51 -430
  48. package/build/src/topic.js.map +1 -1
  49. package/build/src/util.d.ts +2 -1
  50. package/build/src/util.js +2 -2
  51. package/build/src/util.js.map +1 -1
  52. package/build/src/v1/publisher_client.d.ts +262 -0
  53. package/build/src/v1/publisher_client.js +11 -244
  54. package/build/src/v1/publisher_client.js.map +1 -1
  55. package/build/src/v1/publisher_client_config.json +2 -2
  56. package/build/src/v1/schema_service_client.d.ts +165 -0
  57. package/build/src/v1/schema_service_client.js +7 -153
  58. package/build/src/v1/schema_service_client.js.map +1 -1
  59. package/build/src/v1/subscriber_client.d.ts +566 -0
  60. package/build/src/v1/subscriber_client.js +11 -534
  61. package/build/src/v1/subscriber_client.js.map +1 -1
  62. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"topic.js","sourceRoot":"","sources":["../../src/topic.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uDAAkD;AAClD,uDAAqD;AAKrD,+BAA0B;AAC1B,2CAMqB;AAuDrB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAa,KAAK;IAYhB,YAAY,MAAc,EAAE,IAAY,EAAE,OAAwB;QAJlE,2BAAsB,GAAG,qBAAS,CAAC,SAAS,CAC1C,kBAAkB,CACiB,CAAC;QAGpC;;;;WAIG;QACH,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACtD,IAAI,CAAC,SAAS,GAAG,IAAI,qBAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9C;;;;WAIG;QACH;;;;WAIG;QACH,IAAI,CAAC,MAAM,GAAG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IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE;YAC1B,OAAO,IAAI,CAAC;SACb;QACD,OAAO,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,IAAI,CAAC;IACrD,CAAC;CACF;AA77BD,sBA67BC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH;;;GAGG;AACH,qBAAS,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,kBAAkB,CAAC,CAAC,CAAC;AAE9C;;;;;GAKG;AACH,oBAAa,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,EAAE;IACpC,OAAO;IACP,QAAQ;IACR,oBAAoB;IACpB,QAAQ;IACR,QAAQ;IACR,KAAK;IACL,aAAa;IACb,kBAAkB;IAClB,aAAa;CACd,CAAC,CAAC"}
@@ -13,6 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import { PromisifyOptions } from '@google-cloud/promisify';
16
17
  /**
17
18
  * This replaces usage of promisifyAll(), going forward. Instead of opting
18
19
  * some methods out, you will need to opt methods in. Additionally, this
@@ -23,5 +24,5 @@
23
24
  *
24
25
  * @private
25
26
  */
26
- export declare function promisifySome<T>(class_: Function, classProto: T, methods: (keyof T)[]): void;
27
+ export declare function promisifySome<T>(class_: Function, classProto: T, methods: (keyof T)[], options?: PromisifyOptions): void;
27
28
  export declare function noop(): void;
package/build/src/util.js CHANGED
@@ -27,11 +27,11 @@ const promisify_1 = require("@google-cloud/promisify");
27
27
  *
28
28
  * @private
29
29
  */
30
- function promisifySome(class_, classProto, methods) {
30
+ function promisifySome(class_, classProto, methods, options) {
31
31
  methods.forEach(methodName => {
32
32
  // Do the same stream checks as promisifyAll().
33
33
  const m = classProto[methodName];
34
- classProto[methodName] = promisify_1.promisify(m);
34
+ classProto[methodName] = promisify_1.promisify(m, options);
35
35
  });
36
36
  }
37
37
  exports.promisifySome = promisifySome;
@@ -1 +1 @@
1
- {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uDAAkD;AAElD;;;;;;;;;GASG;AACH,SAAgB,aAAa,CAC3B,MAAgB,EAChB,UAAa,EACb,OAAoB;IAEpB,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC3B,+CAA+C;QAC/C,MAAM,CAAC,GAAG,UAAU,CAAC,UAAU,CAAwB,CAAC;QACxD,UAAU,CAAC,UAAU,CAAC,GAAG,qBAAS,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC;AAVD,sCAUC;AAED,SAAgB,IAAI,KAAI,CAAC;AAAzB,oBAAyB"}
1
+ {"version":3,"file":"util.js","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uDAAoE;AAEpE;;;;;;;;;GASG;AACH,SAAgB,aAAa,CAC3B,MAAgB,EAChB,UAAa,EACb,OAAoB,EACpB,OAA0B;IAE1B,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QAC3B,+CAA+C;QAC/C,MAAM,CAAC,GAAG,UAAU,CAAC,UAAU,CAAwB,CAAC;QACxD,UAAU,CAAC,UAAU,CAAC,GAAG,qBAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC;AAXD,sCAWC;AAED,SAAgB,IAAI,KAAI,CAAC;AAAzB,oBAAyB"}
@@ -101,26 +101,224 @@ export declare class PublisherClient {
101
101
  * @returns {string[]} List of default scopes.
102
102
  */
103
103
  static get scopes(): string[];
104
+ /**
105
+ * Return the project ID used by this class.
106
+ * @returns {Promise} A promise that resolves to string containing the project ID.
107
+ */
104
108
  getProjectId(): Promise<string>;
105
109
  getProjectId(callback: Callback<string, undefined, undefined>): void;
110
+ /**
111
+ * Creates the given topic with the given name. See the [resource name rules]
112
+ * (https://cloud.google.com/pubsub/docs/admin#resource_names).
113
+ *
114
+ * @param {Object} request
115
+ * The request object that will be sent.
116
+ * @param {string} request.name
117
+ * Required. The name of the topic. It must have the format
118
+ * `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
119
+ * and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
120
+ * underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
121
+ * signs (`%`). It must be between 3 and 255 characters in length, and it
122
+ * must not start with `"goog"`.
123
+ * @param {number[]} request.labels
124
+ * See [Creating and managing labels]
125
+ * (https://cloud.google.com/pubsub/docs/labels).
126
+ * @param {google.pubsub.v1.MessageStoragePolicy} request.messageStoragePolicy
127
+ * Policy constraining the set of Google Cloud Platform regions where messages
128
+ * published to the topic may be stored. If not present, then no constraints
129
+ * are in effect.
130
+ * @param {string} request.kmsKeyName
131
+ * The resource name of the Cloud KMS CryptoKey to be used to protect access
132
+ * to messages published on this topic.
133
+ *
134
+ * The expected format is `projects/* /locations/* /keyRings/* /cryptoKeys/*`.
135
+ * @param {google.pubsub.v1.SchemaSettings} request.schemaSettings
136
+ * Settings for validating messages published against a schema.
137
+ * @param {boolean} request.satisfiesPzs
138
+ * Reserved for future use. This field is set only in responses from the
139
+ * server; it is ignored if it is set in any requests.
140
+ * @param {google.protobuf.Duration} request.messageRetentionDuration
141
+ * Indicates the minimum duration to retain a message after it is published to
142
+ * the topic. If this field is set, messages published to the topic in the
143
+ * last `message_retention_duration` are always available to subscribers. For
144
+ * instance, it allows any attached subscription to [seek to a
145
+ * timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
146
+ * that is up to `message_retention_duration` in the past. If this field is
147
+ * not set, message retention is controlled by settings on individual
148
+ * subscriptions. Cannot be more than 7 days or less than 10 minutes.
149
+ * @param {object} [options]
150
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
151
+ * @returns {Promise} - The promise which resolves to an array.
152
+ * The first element of the array is an object representing [Topic]{@link google.pubsub.v1.Topic}.
153
+ * Please see the
154
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
155
+ * for more details and examples.
156
+ * @example
157
+ * ```
158
+ * const [response] = await client.createTopic(request);
159
+ * ```
160
+ */
106
161
  createTopic(request?: protos.google.pubsub.v1.ITopic, options?: CallOptions): Promise<[protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.ITopic | undefined, {} | undefined]>;
107
162
  createTopic(request: protos.google.pubsub.v1.ITopic, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.ITopic | null | undefined, {} | null | undefined>): void;
108
163
  createTopic(request: protos.google.pubsub.v1.ITopic, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.ITopic | null | undefined, {} | null | undefined>): void;
164
+ /**
165
+ * Updates an existing topic. Note that certain properties of a
166
+ * topic are not modifiable.
167
+ *
168
+ * @param {Object} request
169
+ * The request object that will be sent.
170
+ * @param {google.pubsub.v1.Topic} request.topic
171
+ * Required. The updated topic object.
172
+ * @param {google.protobuf.FieldMask} request.updateMask
173
+ * Required. Indicates which fields in the provided topic to update. Must be
174
+ * specified and non-empty. Note that if `update_mask` contains
175
+ * "message_storage_policy" but the `message_storage_policy` is not set in
176
+ * the `topic` provided above, then the updated value is determined by the
177
+ * policy configured at the project or organization level.
178
+ * @param {object} [options]
179
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
180
+ * @returns {Promise} - The promise which resolves to an array.
181
+ * The first element of the array is an object representing [Topic]{@link google.pubsub.v1.Topic}.
182
+ * Please see the
183
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
184
+ * for more details and examples.
185
+ * @example
186
+ * ```
187
+ * const [response] = await client.updateTopic(request);
188
+ * ```
189
+ */
109
190
  updateTopic(request?: protos.google.pubsub.v1.IUpdateTopicRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IUpdateTopicRequest | undefined, {} | undefined]>;
110
191
  updateTopic(request: protos.google.pubsub.v1.IUpdateTopicRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IUpdateTopicRequest | null | undefined, {} | null | undefined>): void;
111
192
  updateTopic(request: protos.google.pubsub.v1.IUpdateTopicRequest, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IUpdateTopicRequest | null | undefined, {} | null | undefined>): void;
193
+ /**
194
+ * Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
195
+ * does not exist.
196
+ *
197
+ * @param {Object} request
198
+ * The request object that will be sent.
199
+ * @param {string} request.topic
200
+ * Required. The messages in the request will be published on this topic.
201
+ * Format is `projects/{project}/topics/{topic}`.
202
+ * @param {number[]} request.messages
203
+ * Required. The messages to publish.
204
+ * @param {object} [options]
205
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
206
+ * @returns {Promise} - The promise which resolves to an array.
207
+ * The first element of the array is an object representing [PublishResponse]{@link google.pubsub.v1.PublishResponse}.
208
+ * Please see the
209
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
210
+ * for more details and examples.
211
+ * @example
212
+ * ```
213
+ * const [response] = await client.publish(request);
214
+ * ```
215
+ */
112
216
  publish(request?: protos.google.pubsub.v1.IPublishRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.IPublishResponse, protos.google.pubsub.v1.IPublishRequest | undefined, {} | undefined]>;
113
217
  publish(request: protos.google.pubsub.v1.IPublishRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.IPublishResponse, protos.google.pubsub.v1.IPublishRequest | null | undefined, {} | null | undefined>): void;
114
218
  publish(request: protos.google.pubsub.v1.IPublishRequest, callback: Callback<protos.google.pubsub.v1.IPublishResponse, protos.google.pubsub.v1.IPublishRequest | null | undefined, {} | null | undefined>): void;
219
+ /**
220
+ * Gets the configuration of a topic.
221
+ *
222
+ * @param {Object} request
223
+ * The request object that will be sent.
224
+ * @param {string} request.topic
225
+ * Required. The name of the topic to get.
226
+ * Format is `projects/{project}/topics/{topic}`.
227
+ * @param {object} [options]
228
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
229
+ * @returns {Promise} - The promise which resolves to an array.
230
+ * The first element of the array is an object representing [Topic]{@link google.pubsub.v1.Topic}.
231
+ * Please see the
232
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
233
+ * for more details and examples.
234
+ * @example
235
+ * ```
236
+ * const [response] = await client.getTopic(request);
237
+ * ```
238
+ */
115
239
  getTopic(request?: protos.google.pubsub.v1.IGetTopicRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IGetTopicRequest | undefined, {} | undefined]>;
116
240
  getTopic(request: protos.google.pubsub.v1.IGetTopicRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IGetTopicRequest | null | undefined, {} | null | undefined>): void;
117
241
  getTopic(request: protos.google.pubsub.v1.IGetTopicRequest, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IGetTopicRequest | null | undefined, {} | null | undefined>): void;
242
+ /**
243
+ * Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
244
+ * does not exist. After a topic is deleted, a new topic may be created with
245
+ * the same name; this is an entirely new topic with none of the old
246
+ * configuration or subscriptions. Existing subscriptions to this topic are
247
+ * not deleted, but their `topic` field is set to `_deleted-topic_`.
248
+ *
249
+ * @param {Object} request
250
+ * The request object that will be sent.
251
+ * @param {string} request.topic
252
+ * Required. Name of the topic to delete.
253
+ * Format is `projects/{project}/topics/{topic}`.
254
+ * @param {object} [options]
255
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
256
+ * @returns {Promise} - The promise which resolves to an array.
257
+ * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
258
+ * Please see the
259
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
260
+ * for more details and examples.
261
+ * @example
262
+ * ```
263
+ * const [response] = await client.deleteTopic(request);
264
+ * ```
265
+ */
118
266
  deleteTopic(request?: protos.google.pubsub.v1.IDeleteTopicRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteTopicRequest | undefined, {} | undefined]>;
119
267
  deleteTopic(request: protos.google.pubsub.v1.IDeleteTopicRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteTopicRequest | null | undefined, {} | null | undefined>): void;
120
268
  deleteTopic(request: protos.google.pubsub.v1.IDeleteTopicRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteTopicRequest | null | undefined, {} | null | undefined>): void;
269
+ /**
270
+ * Detaches a subscription from this topic. All messages retained in the
271
+ * subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
272
+ * will return FAILED_PRECONDITION. If the subscription is a push
273
+ * subscription, pushes to the endpoint will stop.
274
+ *
275
+ * @param {Object} request
276
+ * The request object that will be sent.
277
+ * @param {string} request.subscription
278
+ * Required. The subscription to detach.
279
+ * Format is `projects/{project}/subscriptions/{subscription}`.
280
+ * @param {object} [options]
281
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
282
+ * @returns {Promise} - The promise which resolves to an array.
283
+ * The first element of the array is an object representing [DetachSubscriptionResponse]{@link google.pubsub.v1.DetachSubscriptionResponse}.
284
+ * Please see the
285
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
286
+ * for more details and examples.
287
+ * @example
288
+ * ```
289
+ * const [response] = await client.detachSubscription(request);
290
+ * ```
291
+ */
121
292
  detachSubscription(request?: protos.google.pubsub.v1.IDetachSubscriptionRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.IDetachSubscriptionResponse, protos.google.pubsub.v1.IDetachSubscriptionRequest | undefined, {} | undefined]>;
122
293
  detachSubscription(request: protos.google.pubsub.v1.IDetachSubscriptionRequest, options: CallOptions, callback: Callback<protos.google.pubsub.v1.IDetachSubscriptionResponse, protos.google.pubsub.v1.IDetachSubscriptionRequest | null | undefined, {} | null | undefined>): void;
123
294
  detachSubscription(request: protos.google.pubsub.v1.IDetachSubscriptionRequest, callback: Callback<protos.google.pubsub.v1.IDetachSubscriptionResponse, protos.google.pubsub.v1.IDetachSubscriptionRequest | null | undefined, {} | null | undefined>): void;
295
+ /**
296
+ * Lists matching topics.
297
+ *
298
+ * @param {Object} request
299
+ * The request object that will be sent.
300
+ * @param {string} request.project
301
+ * Required. The name of the project in which to list topics.
302
+ * Format is `projects/{project-id}`.
303
+ * @param {number} request.pageSize
304
+ * Maximum number of topics to return.
305
+ * @param {string} request.pageToken
306
+ * The value returned by the last `ListTopicsResponse`; indicates that this is
307
+ * a continuation of a prior `ListTopics` call, and that the system should
308
+ * return the next page of data.
309
+ * @param {object} [options]
310
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
311
+ * @returns {Promise} - The promise which resolves to an array.
312
+ * The first element of the array is Array of [Topic]{@link google.pubsub.v1.Topic}.
313
+ * The client library will perform auto-pagination by default: it will call the API as many
314
+ * times as needed and will merge results from all the pages into this array.
315
+ * Note that it can affect your quota.
316
+ * We recommend using `listTopicsAsync()`
317
+ * method described below for async iteration which you can stop as needed.
318
+ * Please see the
319
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
320
+ * for more details and examples.
321
+ */
124
322
  listTopics(request?: protos.google.pubsub.v1.IListTopicsRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ITopic[], protos.google.pubsub.v1.IListTopicsRequest | null, protos.google.pubsub.v1.IListTopicsResponse]>;
125
323
  listTopics(request: protos.google.pubsub.v1.IListTopicsRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicsRequest, protos.google.pubsub.v1.IListTopicsResponse | null | undefined, protos.google.pubsub.v1.ITopic>): void;
126
324
  listTopics(request: protos.google.pubsub.v1.IListTopicsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicsRequest, protos.google.pubsub.v1.IListTopicsResponse | null | undefined, protos.google.pubsub.v1.ITopic>): void;
@@ -176,12 +374,41 @@ export declare class PublisherClient {
176
374
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
177
375
  * for more details and examples.
178
376
  * @example
377
+ * ```
179
378
  * const iterable = client.listTopicsAsync(request);
180
379
  * for await (const response of iterable) {
181
380
  * // process response
182
381
  * }
382
+ * ```
183
383
  */
184
384
  listTopicsAsync(request?: protos.google.pubsub.v1.IListTopicsRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ITopic>;
385
+ /**
386
+ * Lists the names of the attached subscriptions on this topic.
387
+ *
388
+ * @param {Object} request
389
+ * The request object that will be sent.
390
+ * @param {string} request.topic
391
+ * Required. The name of the topic that subscriptions are attached to.
392
+ * Format is `projects/{project}/topics/{topic}`.
393
+ * @param {number} request.pageSize
394
+ * Maximum number of subscription names to return.
395
+ * @param {string} request.pageToken
396
+ * The value returned by the last `ListTopicSubscriptionsResponse`; indicates
397
+ * that this is a continuation of a prior `ListTopicSubscriptions` call, and
398
+ * that the system should return the next page of data.
399
+ * @param {object} [options]
400
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
401
+ * @returns {Promise} - The promise which resolves to an array.
402
+ * The first element of the array is Array of string.
403
+ * The client library will perform auto-pagination by default: it will call the API as many
404
+ * times as needed and will merge results from all the pages into this array.
405
+ * Note that it can affect your quota.
406
+ * We recommend using `listTopicSubscriptionsAsync()`
407
+ * method described below for async iteration which you can stop as needed.
408
+ * Please see the
409
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
410
+ * for more details and examples.
411
+ */
185
412
  listTopicSubscriptions(request?: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, options?: CallOptions): Promise<[string[], protos.google.pubsub.v1.IListTopicSubscriptionsRequest | null, protos.google.pubsub.v1.IListTopicSubscriptionsResponse]>;
186
413
  listTopicSubscriptions(request: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicSubscriptionsRequest, protos.google.pubsub.v1.IListTopicSubscriptionsResponse | null | undefined, string>): void;
187
414
  listTopicSubscriptions(request: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicSubscriptionsRequest, protos.google.pubsub.v1.IListTopicSubscriptionsResponse | null | undefined, string>): void;
@@ -237,12 +464,45 @@ export declare class PublisherClient {
237
464
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
238
465
  * for more details and examples.
239
466
  * @example
467
+ * ```
240
468
  * const iterable = client.listTopicSubscriptionsAsync(request);
241
469
  * for await (const response of iterable) {
242
470
  * // process response
243
471
  * }
472
+ * ```
244
473
  */
245
474
  listTopicSubscriptionsAsync(request?: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, options?: CallOptions): AsyncIterable<string>;
475
+ /**
476
+ * Lists the names of the snapshots on this topic. Snapshots are used in
477
+ * [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
478
+ * which allow you to manage message acknowledgments in bulk. That is, you can
479
+ * set the acknowledgment state of messages in an existing subscription to the
480
+ * state captured by a snapshot.
481
+ *
482
+ * @param {Object} request
483
+ * The request object that will be sent.
484
+ * @param {string} request.topic
485
+ * Required. The name of the topic that snapshots are attached to.
486
+ * Format is `projects/{project}/topics/{topic}`.
487
+ * @param {number} request.pageSize
488
+ * Maximum number of snapshot names to return.
489
+ * @param {string} request.pageToken
490
+ * The value returned by the last `ListTopicSnapshotsResponse`; indicates
491
+ * that this is a continuation of a prior `ListTopicSnapshots` call, and
492
+ * that the system should return the next page of data.
493
+ * @param {object} [options]
494
+ * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
495
+ * @returns {Promise} - The promise which resolves to an array.
496
+ * The first element of the array is Array of string.
497
+ * The client library will perform auto-pagination by default: it will call the API as many
498
+ * times as needed and will merge results from all the pages into this array.
499
+ * Note that it can affect your quota.
500
+ * We recommend using `listTopicSnapshotsAsync()`
501
+ * method described below for async iteration which you can stop as needed.
502
+ * Please see the
503
+ * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
504
+ * for more details and examples.
505
+ */
246
506
  listTopicSnapshots(request?: protos.google.pubsub.v1.IListTopicSnapshotsRequest, options?: CallOptions): Promise<[string[], protos.google.pubsub.v1.IListTopicSnapshotsRequest | null, protos.google.pubsub.v1.IListTopicSnapshotsResponse]>;
247
507
  listTopicSnapshots(request: protos.google.pubsub.v1.IListTopicSnapshotsRequest, options: CallOptions, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicSnapshotsRequest, protos.google.pubsub.v1.IListTopicSnapshotsResponse | null | undefined, string>): void;
248
508
  listTopicSnapshots(request: protos.google.pubsub.v1.IListTopicSnapshotsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicSnapshotsRequest, protos.google.pubsub.v1.IListTopicSnapshotsResponse | null | undefined, string>): void;
@@ -298,10 +558,12 @@ export declare class PublisherClient {
298
558
  * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
299
559
  * for more details and examples.
300
560
  * @example
561
+ * ```
301
562
  * const iterable = client.listTopicSnapshotsAsync(request);
302
563
  * for await (const response of iterable) {
303
564
  * // process response
304
565
  * }
566
+ * ```
305
567
  */
306
568
  listTopicSnapshotsAsync(request?: protos.google.pubsub.v1.IListTopicSnapshotsRequest, options?: CallOptions): AsyncIterable<string>;
307
569
  /**