@google-cloud/pubsub 2.18.1 → 2.18.5
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 +32 -0
- package/README.md +5 -5
- package/build/protos/protos.d.ts +1 -1
- package/build/protos/protos.js +1 -1
- package/build/src/iam.d.ts +180 -0
- package/build/src/iam.js +2 -172
- package/build/src/iam.js.map +1 -1
- package/build/src/index.d.ts +12 -4
- package/build/src/index.js +12 -4
- package/build/src/index.js.map +1 -1
- package/build/src/message-stream.d.ts +0 -7
- package/build/src/message-stream.js +6 -17
- package/build/src/message-stream.js.map +1 -1
- package/build/src/publisher/flow-publisher.d.ts +6 -0
- package/build/src/publisher/flow-publisher.js +6 -0
- package/build/src/publisher/flow-publisher.js.map +1 -1
- package/build/src/publisher/index.d.ts +35 -0
- package/build/src/publisher/index.js +0 -35
- package/build/src/publisher/index.js.map +1 -1
- package/build/src/pubsub.d.ts +354 -4
- package/build/src/pubsub.js +28 -322
- package/build/src/pubsub.js.map +1 -1
- package/build/src/schema.d.ts +9 -4
- package/build/src/schema.js +9 -4
- package/build/src/schema.js.map +1 -1
- package/build/src/snapshot.d.ts +87 -0
- package/build/src/snapshot.js +2 -79
- package/build/src/snapshot.js.map +1 -1
- package/build/src/subscriber.d.ts +6 -0
- package/build/src/subscriber.js +6 -0
- package/build/src/subscriber.js.map +1 -1
- package/build/src/subscription.d.ts +439 -9
- package/build/src/subscription.js +24 -400
- package/build/src/subscription.js.map +1 -1
- package/build/src/topic.d.ts +467 -2
- package/build/src/topic.js +17 -417
- package/build/src/topic.js.map +1 -1
- package/build/src/v1/index.js +1 -1
- package/build/src/v1/publisher_client.d.ts +246 -15
- package/build/src/v1/publisher_client.js +19 -265
- package/build/src/v1/publisher_client.js.map +1 -1
- package/build/src/v1/publisher_client_config.json +2 -2
- package/build/src/v1/schema_service_client.d.ts +151 -5
- package/build/src/v1/schema_service_client.js +7 -158
- package/build/src/v1/schema_service_client.js.map +1 -1
- package/build/src/v1/subscriber_client.d.ts +536 -16
- package/build/src/v1/subscriber_client.js +15 -553
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +6 -6
|
@@ -103,24 +103,206 @@ export declare class PublisherClient {
|
|
|
103
103
|
static get scopes(): string[];
|
|
104
104
|
getProjectId(): Promise<string>;
|
|
105
105
|
getProjectId(callback: Callback<string, undefined, undefined>): void;
|
|
106
|
+
/**
|
|
107
|
+
* Creates the given topic with the given name. See the [resource name rules]
|
|
108
|
+
* (https://cloud.google.com/pubsub/docs/admin#resource_names).
|
|
109
|
+
*
|
|
110
|
+
* @param {Object} request
|
|
111
|
+
* The request object that will be sent.
|
|
112
|
+
* @param {string} request.name
|
|
113
|
+
* Required. The name of the topic. It must have the format
|
|
114
|
+
* `"projects/{project}/topics/{topic}"`. `{topic}` must start with a letter,
|
|
115
|
+
* and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`),
|
|
116
|
+
* underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent
|
|
117
|
+
* signs (`%`). It must be between 3 and 255 characters in length, and it
|
|
118
|
+
* must not start with `"goog"`.
|
|
119
|
+
* @param {number[]} request.labels
|
|
120
|
+
* See [Creating and managing labels]
|
|
121
|
+
* (https://cloud.google.com/pubsub/docs/labels).
|
|
122
|
+
* @param {google.pubsub.v1.MessageStoragePolicy} request.messageStoragePolicy
|
|
123
|
+
* Policy constraining the set of Google Cloud Platform regions where messages
|
|
124
|
+
* published to the topic may be stored. If not present, then no constraints
|
|
125
|
+
* are in effect.
|
|
126
|
+
* @param {string} request.kmsKeyName
|
|
127
|
+
* The resource name of the Cloud KMS CryptoKey to be used to protect access
|
|
128
|
+
* to messages published on this topic.
|
|
129
|
+
*
|
|
130
|
+
* The expected format is `projects/* /locations/* /keyRings/* /cryptoKeys/*`.
|
|
131
|
+
* @param {google.pubsub.v1.SchemaSettings} request.schemaSettings
|
|
132
|
+
* Settings for validating messages published against a schema.
|
|
133
|
+
* @param {boolean} request.satisfiesPzs
|
|
134
|
+
* Reserved for future use. This field is set only in responses from the
|
|
135
|
+
* server; it is ignored if it is set in any requests.
|
|
136
|
+
* @param {google.protobuf.Duration} request.messageRetentionDuration
|
|
137
|
+
* Indicates the minimum duration to retain a message after it is published to
|
|
138
|
+
* the topic. If this field is set, messages published to the topic in the
|
|
139
|
+
* last `message_retention_duration` are always available to subscribers. For
|
|
140
|
+
* instance, it allows any attached subscription to [seek to a
|
|
141
|
+
* timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time)
|
|
142
|
+
* that is up to `message_retention_duration` in the past. If this field is
|
|
143
|
+
* not set, message retention is controlled by settings on individual
|
|
144
|
+
* subscriptions. Cannot be more than 7 days or less than 10 minutes.
|
|
145
|
+
* @param {object} [options]
|
|
146
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
147
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
148
|
+
* The first element of the array is an object representing [Topic]{@link google.pubsub.v1.Topic}.
|
|
149
|
+
* Please see the
|
|
150
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
151
|
+
* for more details and examples.
|
|
152
|
+
* @example <caption>include:samples/generated/v1/publisher.create_topic.js</caption>
|
|
153
|
+
* region_tag:pubsub_v1_generated_Publisher_CreateTopic_async
|
|
154
|
+
*/
|
|
106
155
|
createTopic(request?: protos.google.pubsub.v1.ITopic, options?: CallOptions): Promise<[protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.ITopic | undefined, {} | undefined]>;
|
|
107
156
|
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
157
|
createTopic(request: protos.google.pubsub.v1.ITopic, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.ITopic | null | undefined, {} | null | undefined>): void;
|
|
158
|
+
/**
|
|
159
|
+
* Updates an existing topic. Note that certain properties of a
|
|
160
|
+
* topic are not modifiable.
|
|
161
|
+
*
|
|
162
|
+
* @param {Object} request
|
|
163
|
+
* The request object that will be sent.
|
|
164
|
+
* @param {google.pubsub.v1.Topic} request.topic
|
|
165
|
+
* Required. The updated topic object.
|
|
166
|
+
* @param {google.protobuf.FieldMask} request.updateMask
|
|
167
|
+
* Required. Indicates which fields in the provided topic to update. Must be
|
|
168
|
+
* specified and non-empty. Note that if `update_mask` contains
|
|
169
|
+
* "message_storage_policy" but the `message_storage_policy` is not set in
|
|
170
|
+
* the `topic` provided above, then the updated value is determined by the
|
|
171
|
+
* policy configured at the project or organization level.
|
|
172
|
+
* @param {object} [options]
|
|
173
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
174
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
175
|
+
* The first element of the array is an object representing [Topic]{@link google.pubsub.v1.Topic}.
|
|
176
|
+
* Please see the
|
|
177
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
178
|
+
* for more details and examples.
|
|
179
|
+
* @example <caption>include:samples/generated/v1/publisher.update_topic.js</caption>
|
|
180
|
+
* region_tag:pubsub_v1_generated_Publisher_UpdateTopic_async
|
|
181
|
+
*/
|
|
109
182
|
updateTopic(request?: protos.google.pubsub.v1.IUpdateTopicRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IUpdateTopicRequest | undefined, {} | undefined]>;
|
|
110
183
|
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
184
|
updateTopic(request: protos.google.pubsub.v1.IUpdateTopicRequest, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IUpdateTopicRequest | null | undefined, {} | null | undefined>): void;
|
|
185
|
+
/**
|
|
186
|
+
* Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic
|
|
187
|
+
* does not exist.
|
|
188
|
+
*
|
|
189
|
+
* @param {Object} request
|
|
190
|
+
* The request object that will be sent.
|
|
191
|
+
* @param {string} request.topic
|
|
192
|
+
* Required. The messages in the request will be published on this topic.
|
|
193
|
+
* Format is `projects/{project}/topics/{topic}`.
|
|
194
|
+
* @param {number[]} request.messages
|
|
195
|
+
* Required. The messages to publish.
|
|
196
|
+
* @param {object} [options]
|
|
197
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
198
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
199
|
+
* The first element of the array is an object representing [PublishResponse]{@link google.pubsub.v1.PublishResponse}.
|
|
200
|
+
* Please see the
|
|
201
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
202
|
+
* for more details and examples.
|
|
203
|
+
* @example <caption>include:samples/generated/v1/publisher.publish.js</caption>
|
|
204
|
+
* region_tag:pubsub_v1_generated_Publisher_Publish_async
|
|
205
|
+
*/
|
|
112
206
|
publish(request?: protos.google.pubsub.v1.IPublishRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.IPublishResponse, protos.google.pubsub.v1.IPublishRequest | undefined, {} | undefined]>;
|
|
113
207
|
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
208
|
publish(request: protos.google.pubsub.v1.IPublishRequest, callback: Callback<protos.google.pubsub.v1.IPublishResponse, protos.google.pubsub.v1.IPublishRequest | null | undefined, {} | null | undefined>): void;
|
|
209
|
+
/**
|
|
210
|
+
* Gets the configuration of a topic.
|
|
211
|
+
*
|
|
212
|
+
* @param {Object} request
|
|
213
|
+
* The request object that will be sent.
|
|
214
|
+
* @param {string} request.topic
|
|
215
|
+
* Required. The name of the topic to get.
|
|
216
|
+
* Format is `projects/{project}/topics/{topic}`.
|
|
217
|
+
* @param {object} [options]
|
|
218
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
219
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
220
|
+
* The first element of the array is an object representing [Topic]{@link google.pubsub.v1.Topic}.
|
|
221
|
+
* Please see the
|
|
222
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
223
|
+
* for more details and examples.
|
|
224
|
+
* @example <caption>include:samples/generated/v1/publisher.get_topic.js</caption>
|
|
225
|
+
* region_tag:pubsub_v1_generated_Publisher_GetTopic_async
|
|
226
|
+
*/
|
|
115
227
|
getTopic(request?: protos.google.pubsub.v1.IGetTopicRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IGetTopicRequest | undefined, {} | undefined]>;
|
|
116
228
|
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
229
|
getTopic(request: protos.google.pubsub.v1.IGetTopicRequest, callback: Callback<protos.google.pubsub.v1.ITopic, protos.google.pubsub.v1.IGetTopicRequest | null | undefined, {} | null | undefined>): void;
|
|
230
|
+
/**
|
|
231
|
+
* Deletes the topic with the given name. Returns `NOT_FOUND` if the topic
|
|
232
|
+
* does not exist. After a topic is deleted, a new topic may be created with
|
|
233
|
+
* the same name; this is an entirely new topic with none of the old
|
|
234
|
+
* configuration or subscriptions. Existing subscriptions to this topic are
|
|
235
|
+
* not deleted, but their `topic` field is set to `_deleted-topic_`.
|
|
236
|
+
*
|
|
237
|
+
* @param {Object} request
|
|
238
|
+
* The request object that will be sent.
|
|
239
|
+
* @param {string} request.topic
|
|
240
|
+
* Required. Name of the topic to delete.
|
|
241
|
+
* Format is `projects/{project}/topics/{topic}`.
|
|
242
|
+
* @param {object} [options]
|
|
243
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
244
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
245
|
+
* The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
|
|
246
|
+
* Please see the
|
|
247
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
248
|
+
* for more details and examples.
|
|
249
|
+
* @example <caption>include:samples/generated/v1/publisher.delete_topic.js</caption>
|
|
250
|
+
* region_tag:pubsub_v1_generated_Publisher_DeleteTopic_async
|
|
251
|
+
*/
|
|
118
252
|
deleteTopic(request?: protos.google.pubsub.v1.IDeleteTopicRequest, options?: CallOptions): Promise<[protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteTopicRequest | undefined, {} | undefined]>;
|
|
119
253
|
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
254
|
deleteTopic(request: protos.google.pubsub.v1.IDeleteTopicRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.pubsub.v1.IDeleteTopicRequest | null | undefined, {} | null | undefined>): void;
|
|
255
|
+
/**
|
|
256
|
+
* Detaches a subscription from this topic. All messages retained in the
|
|
257
|
+
* subscription are dropped. Subsequent `Pull` and `StreamingPull` requests
|
|
258
|
+
* will return FAILED_PRECONDITION. If the subscription is a push
|
|
259
|
+
* subscription, pushes to the endpoint will stop.
|
|
260
|
+
*
|
|
261
|
+
* @param {Object} request
|
|
262
|
+
* The request object that will be sent.
|
|
263
|
+
* @param {string} request.subscription
|
|
264
|
+
* Required. The subscription to detach.
|
|
265
|
+
* Format is `projects/{project}/subscriptions/{subscription}`.
|
|
266
|
+
* @param {object} [options]
|
|
267
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
268
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
269
|
+
* The first element of the array is an object representing [DetachSubscriptionResponse]{@link google.pubsub.v1.DetachSubscriptionResponse}.
|
|
270
|
+
* Please see the
|
|
271
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods)
|
|
272
|
+
* for more details and examples.
|
|
273
|
+
* @example <caption>include:samples/generated/v1/publisher.detach_subscription.js</caption>
|
|
274
|
+
* region_tag:pubsub_v1_generated_Publisher_DetachSubscription_async
|
|
275
|
+
*/
|
|
121
276
|
detachSubscription(request?: protos.google.pubsub.v1.IDetachSubscriptionRequest, options?: CallOptions): Promise<[protos.google.pubsub.v1.IDetachSubscriptionResponse, protos.google.pubsub.v1.IDetachSubscriptionRequest | undefined, {} | undefined]>;
|
|
122
277
|
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
278
|
detachSubscription(request: protos.google.pubsub.v1.IDetachSubscriptionRequest, callback: Callback<protos.google.pubsub.v1.IDetachSubscriptionResponse, protos.google.pubsub.v1.IDetachSubscriptionRequest | null | undefined, {} | null | undefined>): void;
|
|
279
|
+
/**
|
|
280
|
+
* Lists matching topics.
|
|
281
|
+
*
|
|
282
|
+
* @param {Object} request
|
|
283
|
+
* The request object that will be sent.
|
|
284
|
+
* @param {string} request.project
|
|
285
|
+
* Required. The name of the project in which to list topics.
|
|
286
|
+
* Format is `projects/{project-id}`.
|
|
287
|
+
* @param {number} request.pageSize
|
|
288
|
+
* Maximum number of topics to return.
|
|
289
|
+
* @param {string} request.pageToken
|
|
290
|
+
* The value returned by the last `ListTopicsResponse`; indicates that this is
|
|
291
|
+
* a continuation of a prior `ListTopics` call, and that the system should
|
|
292
|
+
* return the next page of data.
|
|
293
|
+
* @param {object} [options]
|
|
294
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
295
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
296
|
+
* The first element of the array is Array of [Topic]{@link google.pubsub.v1.Topic}.
|
|
297
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
298
|
+
* times as needed and will merge results from all the pages into this array.
|
|
299
|
+
* Note that it can affect your quota.
|
|
300
|
+
* We recommend using `listTopicsAsync()`
|
|
301
|
+
* method described below for async iteration which you can stop as needed.
|
|
302
|
+
* Please see the
|
|
303
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
304
|
+
* for more details and examples.
|
|
305
|
+
*/
|
|
124
306
|
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
307
|
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
308
|
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;
|
|
@@ -175,13 +357,37 @@ export declare class PublisherClient {
|
|
|
175
357
|
* Please see the
|
|
176
358
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
177
359
|
* for more details and examples.
|
|
178
|
-
* @example
|
|
179
|
-
*
|
|
180
|
-
* for await (const response of iterable) {
|
|
181
|
-
* // process response
|
|
182
|
-
* }
|
|
360
|
+
* @example <caption>include:samples/generated/v1/publisher.list_topics.js</caption>
|
|
361
|
+
* region_tag:pubsub_v1_generated_Publisher_ListTopics_async
|
|
183
362
|
*/
|
|
184
363
|
listTopicsAsync(request?: protos.google.pubsub.v1.IListTopicsRequest, options?: CallOptions): AsyncIterable<protos.google.pubsub.v1.ITopic>;
|
|
364
|
+
/**
|
|
365
|
+
* Lists the names of the attached subscriptions on this topic.
|
|
366
|
+
*
|
|
367
|
+
* @param {Object} request
|
|
368
|
+
* The request object that will be sent.
|
|
369
|
+
* @param {string} request.topic
|
|
370
|
+
* Required. The name of the topic that subscriptions are attached to.
|
|
371
|
+
* Format is `projects/{project}/topics/{topic}`.
|
|
372
|
+
* @param {number} request.pageSize
|
|
373
|
+
* Maximum number of subscription names to return.
|
|
374
|
+
* @param {string} request.pageToken
|
|
375
|
+
* The value returned by the last `ListTopicSubscriptionsResponse`; indicates
|
|
376
|
+
* that this is a continuation of a prior `ListTopicSubscriptions` call, and
|
|
377
|
+
* that the system should return the next page of data.
|
|
378
|
+
* @param {object} [options]
|
|
379
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
380
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
381
|
+
* The first element of the array is Array of string.
|
|
382
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
383
|
+
* times as needed and will merge results from all the pages into this array.
|
|
384
|
+
* Note that it can affect your quota.
|
|
385
|
+
* We recommend using `listTopicSubscriptionsAsync()`
|
|
386
|
+
* method described below for async iteration which you can stop as needed.
|
|
387
|
+
* Please see the
|
|
388
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
389
|
+
* for more details and examples.
|
|
390
|
+
*/
|
|
185
391
|
listTopicSubscriptions(request?: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, options?: CallOptions): Promise<[string[], protos.google.pubsub.v1.IListTopicSubscriptionsRequest | null, protos.google.pubsub.v1.IListTopicSubscriptionsResponse]>;
|
|
186
392
|
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
393
|
listTopicSubscriptions(request: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicSubscriptionsRequest, protos.google.pubsub.v1.IListTopicSubscriptionsResponse | null | undefined, string>): void;
|
|
@@ -236,13 +442,41 @@ export declare class PublisherClient {
|
|
|
236
442
|
* Please see the
|
|
237
443
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
238
444
|
* for more details and examples.
|
|
239
|
-
* @example
|
|
240
|
-
*
|
|
241
|
-
* for await (const response of iterable) {
|
|
242
|
-
* // process response
|
|
243
|
-
* }
|
|
445
|
+
* @example <caption>include:samples/generated/v1/publisher.list_topic_subscriptions.js</caption>
|
|
446
|
+
* region_tag:pubsub_v1_generated_Publisher_ListTopicSubscriptions_async
|
|
244
447
|
*/
|
|
245
448
|
listTopicSubscriptionsAsync(request?: protos.google.pubsub.v1.IListTopicSubscriptionsRequest, options?: CallOptions): AsyncIterable<string>;
|
|
449
|
+
/**
|
|
450
|
+
* Lists the names of the snapshots on this topic. Snapshots are used in
|
|
451
|
+
* [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations,
|
|
452
|
+
* which allow you to manage message acknowledgments in bulk. That is, you can
|
|
453
|
+
* set the acknowledgment state of messages in an existing subscription to the
|
|
454
|
+
* state captured by a snapshot.
|
|
455
|
+
*
|
|
456
|
+
* @param {Object} request
|
|
457
|
+
* The request object that will be sent.
|
|
458
|
+
* @param {string} request.topic
|
|
459
|
+
* Required. The name of the topic that snapshots are attached to.
|
|
460
|
+
* Format is `projects/{project}/topics/{topic}`.
|
|
461
|
+
* @param {number} request.pageSize
|
|
462
|
+
* Maximum number of snapshot names to return.
|
|
463
|
+
* @param {string} request.pageToken
|
|
464
|
+
* The value returned by the last `ListTopicSnapshotsResponse`; indicates
|
|
465
|
+
* that this is a continuation of a prior `ListTopicSnapshots` call, and
|
|
466
|
+
* that the system should return the next page of data.
|
|
467
|
+
* @param {object} [options]
|
|
468
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
|
469
|
+
* @returns {Promise} - The promise which resolves to an array.
|
|
470
|
+
* The first element of the array is Array of string.
|
|
471
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
|
472
|
+
* times as needed and will merge results from all the pages into this array.
|
|
473
|
+
* Note that it can affect your quota.
|
|
474
|
+
* We recommend using `listTopicSnapshotsAsync()`
|
|
475
|
+
* method described below for async iteration which you can stop as needed.
|
|
476
|
+
* Please see the
|
|
477
|
+
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
478
|
+
* for more details and examples.
|
|
479
|
+
*/
|
|
246
480
|
listTopicSnapshots(request?: protos.google.pubsub.v1.IListTopicSnapshotsRequest, options?: CallOptions): Promise<[string[], protos.google.pubsub.v1.IListTopicSnapshotsRequest | null, protos.google.pubsub.v1.IListTopicSnapshotsResponse]>;
|
|
247
481
|
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
482
|
listTopicSnapshots(request: protos.google.pubsub.v1.IListTopicSnapshotsRequest, callback: PaginationCallback<protos.google.pubsub.v1.IListTopicSnapshotsRequest, protos.google.pubsub.v1.IListTopicSnapshotsResponse | null | undefined, string>): void;
|
|
@@ -297,11 +531,8 @@ export declare class PublisherClient {
|
|
|
297
531
|
* Please see the
|
|
298
532
|
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
|
299
533
|
* for more details and examples.
|
|
300
|
-
* @example
|
|
301
|
-
*
|
|
302
|
-
* for await (const response of iterable) {
|
|
303
|
-
* // process response
|
|
304
|
-
* }
|
|
534
|
+
* @example <caption>include:samples/generated/v1/publisher.list_topic_snapshots.js</caption>
|
|
535
|
+
* region_tag:pubsub_v1_generated_Publisher_ListTopicSnapshots_async
|
|
305
536
|
*/
|
|
306
537
|
listTopicSnapshotsAsync(request?: protos.google.pubsub.v1.IListTopicSnapshotsRequest, options?: CallOptions): AsyncIterable<string>;
|
|
307
538
|
/**
|