@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.
- package/CHANGELOG.md +38 -0
- package/README.md +54 -53
- package/build/protos/protos.d.ts +2 -1
- package/build/protos/protos.js +7 -0
- package/build/protos/protos.json +14 -1
- package/build/src/iam.d.ts +180 -0
- package/build/src/iam.js +11 -176
- package/build/src/iam.js.map +1 -1
- package/build/src/index.d.ts +13 -4
- package/build/src/index.js +12 -4
- package/build/src/index.js.map +1 -1
- package/build/src/lease-manager.d.ts +7 -2
- package/build/src/lease-manager.js +19 -4
- package/build/src/lease-manager.js.map +1 -1
- package/build/src/publisher/flow-control.d.ts +90 -0
- package/build/src/publisher/flow-control.js +145 -0
- package/build/src/publisher/flow-control.js.map +1 -0
- package/build/src/publisher/flow-publisher.d.ts +95 -0
- package/build/src/publisher/flow-publisher.js +133 -0
- package/build/src/publisher/flow-publisher.js.map +1 -0
- package/build/src/publisher/index.d.ts +33 -5
- package/build/src/publisher/index.js +16 -39
- package/build/src/publisher/index.js.map +1 -1
- package/build/src/publisher/message-batch.d.ts +1 -1
- package/build/src/publisher/message-batch.js +4 -3
- package/build/src/publisher/message-batch.js.map +1 -1
- package/build/src/publisher/message-queues.js.map +1 -1
- package/build/src/publisher/pubsub-message.d.ts +52 -0
- package/build/src/publisher/pubsub-message.js +56 -0
- package/build/src/publisher/pubsub-message.js.map +1 -0
- 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 +7 -83
- 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 +38 -404
- package/build/src/subscription.js.map +1 -1
- package/build/src/topic.d.ts +481 -1
- package/build/src/topic.js +51 -430
- package/build/src/topic.js.map +1 -1
- package/build/src/util.d.ts +2 -1
- package/build/src/util.js +2 -2
- package/build/src/util.js.map +1 -1
- package/build/src/v1/publisher_client.d.ts +262 -0
- package/build/src/v1/publisher_client.js +11 -244
- 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 +165 -0
- package/build/src/v1/schema_service_client.js +7 -153
- package/build/src/v1/schema_service_client.js.map +1 -1
- package/build/src/v1/subscriber_client.d.ts +566 -0
- package/build/src/v1/subscriber_client.js +11 -534
- package/build/src/v1/subscriber_client.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,44 @@
|
|
|
4
4
|
|
|
5
5
|
[1]: https://www.npmjs.com/package/@google-cloud/pubsub?activeTab=versions
|
|
6
6
|
|
|
7
|
+
### [2.18.2](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.18.1...v2.18.2) (2021-11-08)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Bug Fixes
|
|
11
|
+
|
|
12
|
+
* **cloud-rad:** move comments for TSDoc ([#1423](https://www.github.com/googleapis/nodejs-pubsub/issues/1423)) ([a40a23e](https://www.github.com/googleapis/nodejs-pubsub/commit/a40a23ee43c6697000996e0ff7070f41610397f5))
|
|
13
|
+
|
|
14
|
+
### [2.18.1](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.18.0...v2.18.1) (2021-09-27)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* deprecate maxExtension in favour of maxExtensionMinutes ([#1402](https://www.github.com/googleapis/nodejs-pubsub/issues/1402)) ([46b83ba](https://www.github.com/googleapis/nodejs-pubsub/commit/46b83ba14e954cc6bec3f03ca7c3e0bcdfb7597c))
|
|
20
|
+
|
|
21
|
+
## [2.18.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.17.0...v2.18.0) (2021-09-23)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* add publisher side flow control ([#1359](https://www.github.com/googleapis/nodejs-pubsub/issues/1359)) ([cc0f61b](https://www.github.com/googleapis/nodejs-pubsub/commit/cc0f61b18258bae0be1a5962a93970cc15dcd304))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* update default RPC retry timeouts to match other languages ([#1399](https://www.github.com/googleapis/nodejs-pubsub/issues/1399)) ([8c1afee](https://www.github.com/googleapis/nodejs-pubsub/commit/8c1afeee26fbff84448b1a9576e4c4ef5c67f9cc))
|
|
32
|
+
|
|
33
|
+
## [2.17.0](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.16.6...v2.17.0) (2021-08-25)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* turns on self-signed JWT feature flag ([#1382](https://www.github.com/googleapis/nodejs-pubsub/issues/1382)) ([e8b4922](https://www.github.com/googleapis/nodejs-pubsub/commit/e8b49228cffd8016be12ab607363136c2f27c593))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* **build:** move branch references to main ([#1174](https://www.github.com/googleapis/nodejs-pubsub/issues/1174)) ([#1386](https://www.github.com/googleapis/nodejs-pubsub/issues/1386)) ([16b710a](https://www.github.com/googleapis/nodejs-pubsub/commit/16b710aae29575b9108215479080a8d6c3dad654))
|
|
44
|
+
|
|
7
45
|
### [2.16.6](https://www.github.com/googleapis/nodejs-pubsub/compare/v2.16.5...v2.16.6) (2021-08-19)
|
|
8
46
|
|
|
9
47
|
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
[](https://cloud.google.com/terms/launch-stages)
|
|
8
8
|
[](https://www.npmjs.org/package/@google-cloud/pubsub)
|
|
9
|
-
[](https://codecov.io/gh/googleapis/nodejs-pubsub)
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -23,7 +23,7 @@ guides.
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
A comprehensive list of changes in each version may be found in
|
|
26
|
-
[the CHANGELOG](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
26
|
+
[the CHANGELOG](https://github.com/googleapis/nodejs-pubsub/blob/main/CHANGELOG.md).
|
|
27
27
|
|
|
28
28
|
* [Google Cloud Pub/Sub Node.js Client API Reference][client-docs]
|
|
29
29
|
* [Google Cloud Pub/Sub Documentation][product-docs]
|
|
@@ -120,56 +120,57 @@ To configure `@google-cloud/pubsub` to use an alternative `grpc` transport:
|
|
|
120
120
|
|
|
121
121
|
## Samples
|
|
122
122
|
|
|
123
|
-
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-pubsub/tree/
|
|
123
|
+
Samples are in the [`samples/`](https://github.com/googleapis/nodejs-pubsub/tree/main/samples) directory. Each sample's `README.md` has instructions for running its sample.
|
|
124
124
|
|
|
125
125
|
| Sample | Source Code | Try it |
|
|
126
126
|
| --------------------------- | --------------------------------- | ------ |
|
|
127
|
-
| Create an Avro based Schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
128
|
-
| Create a Proto based Schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
129
|
-
| Create Push Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
130
|
-
| Create Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
131
|
-
| Create Subscription With Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
132
|
-
| Create Subscription with ordering enabled | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
133
|
-
| Create Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
134
|
-
| Create Topic With Schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
135
|
-
| Delete a previously created schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
136
|
-
| Delete Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
137
|
-
| Delete Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
138
|
-
| Detach Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
139
|
-
| Get a previously created schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
140
|
-
| Get Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
141
|
-
| Get Subscription Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
142
|
-
| Get Topic Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
143
|
-
| List All Topics | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
144
|
-
| List schemas on a project | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
145
|
-
| List Subscriptions | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
146
|
-
| List Subscriptions On a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
147
|
-
| Listen For Avro Records | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
148
|
-
| Listen For Errors | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
149
|
-
| Listen For Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
150
|
-
| Listen For Protobuf Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
151
|
-
| Listen For Messages With Custom Attributes | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
152
|
-
| Modify Push Configuration | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
153
|
-
| OpenTelemetry Tracing | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
154
|
-
| Publish Avro Records to a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
155
|
-
| Publish Batched Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
156
|
-
| Publish Message | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
157
|
-
| Publish Message With Custom Attributes | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
158
|
-
| Publish Ordered Message | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
159
|
-
| Publish Protobuf Messages to a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
160
|
-
| Publish
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
| Set
|
|
166
|
-
|
|
|
167
|
-
|
|
|
168
|
-
| Synchronous Pull
|
|
169
|
-
| Synchronous Pull
|
|
170
|
-
|
|
|
171
|
-
| Test
|
|
172
|
-
|
|
|
127
|
+
| Create an Avro based Schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createAvroSchema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createAvroSchema.js,samples/README.md) |
|
|
128
|
+
| Create a Proto based Schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createProtoSchema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createProtoSchema.js,samples/README.md) |
|
|
129
|
+
| Create Push Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createPushSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createPushSubscription.js,samples/README.md) |
|
|
130
|
+
| Create Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscription.js,samples/README.md) |
|
|
131
|
+
| Create Subscription With Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscriptionWithDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscriptionWithDeadLetterPolicy.js,samples/README.md) |
|
|
132
|
+
| Create Subscription with ordering enabled | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createSubscriptionWithOrdering.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createSubscriptionWithOrdering.js,samples/README.md) |
|
|
133
|
+
| Create Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createTopic.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createTopic.js,samples/README.md) |
|
|
134
|
+
| Create Topic With Schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/createTopicWithSchema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/createTopicWithSchema.js,samples/README.md) |
|
|
135
|
+
| Delete a previously created schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/deleteSchema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/deleteSchema.js,samples/README.md) |
|
|
136
|
+
| Delete Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/deleteSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/deleteSubscription.js,samples/README.md) |
|
|
137
|
+
| Delete Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/deleteTopic.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/deleteTopic.js,samples/README.md) |
|
|
138
|
+
| Detach Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/detachSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/detachSubscription.js,samples/README.md) |
|
|
139
|
+
| Get a previously created schema | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/getSchema.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getSchema.js,samples/README.md) |
|
|
140
|
+
| Get Subscription | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/getSubscription.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getSubscription.js,samples/README.md) |
|
|
141
|
+
| Get Subscription Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/getSubscriptionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getSubscriptionPolicy.js,samples/README.md) |
|
|
142
|
+
| Get Topic Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/getTopicPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/getTopicPolicy.js,samples/README.md) |
|
|
143
|
+
| List All Topics | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listAllTopics.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listAllTopics.js,samples/README.md) |
|
|
144
|
+
| List schemas on a project | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listSchemas.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listSchemas.js,samples/README.md) |
|
|
145
|
+
| List Subscriptions | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listSubscriptions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listSubscriptions.js,samples/README.md) |
|
|
146
|
+
| List Subscriptions On a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listTopicSubscriptions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listTopicSubscriptions.js,samples/README.md) |
|
|
147
|
+
| Listen For Avro Records | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenForAvroRecords.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenForAvroRecords.js,samples/README.md) |
|
|
148
|
+
| Listen For Errors | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenForErrors.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenForErrors.js,samples/README.md) |
|
|
149
|
+
| Listen For Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenForMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenForMessages.js,samples/README.md) |
|
|
150
|
+
| Listen For Protobuf Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenForProtobufMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenForProtobufMessages.js,samples/README.md) |
|
|
151
|
+
| Listen For Messages With Custom Attributes | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/listenWithCustomAttributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/listenWithCustomAttributes.js,samples/README.md) |
|
|
152
|
+
| Modify Push Configuration | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/modifyPushConfig.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/modifyPushConfig.js,samples/README.md) |
|
|
153
|
+
| OpenTelemetry Tracing | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/openTelemetryTracing.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/openTelemetryTracing.js,samples/README.md) |
|
|
154
|
+
| Publish Avro Records to a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishAvroRecords.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishAvroRecords.js,samples/README.md) |
|
|
155
|
+
| Publish Batched Messages | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishBatchedMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishBatchedMessages.js,samples/README.md) |
|
|
156
|
+
| Publish Message | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishMessage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishMessage.js,samples/README.md) |
|
|
157
|
+
| Publish Message With Custom Attributes | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishMessageWithCustomAttributes.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishMessageWithCustomAttributes.js,samples/README.md) |
|
|
158
|
+
| Publish Ordered Message | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishOrderedMessage.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishOrderedMessage.js,samples/README.md) |
|
|
159
|
+
| Publish Protobuf Messages to a Topic | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishProtobufMessages.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishProtobufMessages.js,samples/README.md) |
|
|
160
|
+
| Publish with flow control | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishWithFlowControl.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishWithFlowControl.js,samples/README.md) |
|
|
161
|
+
| Publish With Retry Settings | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/publishWithRetrySettings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/publishWithRetrySettings.js,samples/README.md) |
|
|
162
|
+
| Quickstart | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
|
|
163
|
+
| Remove Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/removeDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/removeDeadLetterPolicy.js,samples/README.md) |
|
|
164
|
+
| Resume Publish | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/resumePublish.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/resumePublish.js,samples/README.md) |
|
|
165
|
+
| Set Subscription IAM Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/setSubscriptionPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/setSubscriptionPolicy.js,samples/README.md) |
|
|
166
|
+
| Set Topic IAM Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/setTopicPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/setTopicPolicy.js,samples/README.md) |
|
|
167
|
+
| Subscribe With Flow Control Settings | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/subscribeWithFlowControlSettings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/subscribeWithFlowControlSettings.js,samples/README.md) |
|
|
168
|
+
| Synchronous Pull | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/synchronousPull.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/synchronousPull.js,samples/README.md) |
|
|
169
|
+
| Synchronous Pull with delivery attempt. | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/synchronousPullWithDeliveryAttempts.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/synchronousPullWithDeliveryAttempts.js,samples/README.md) |
|
|
170
|
+
| Synchronous Pull With Lease Management | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/synchronousPullWithLeaseManagement.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/synchronousPullWithLeaseManagement.js,samples/README.md) |
|
|
171
|
+
| Test Subscription Permissions | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/testSubscriptionPermissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/testSubscriptionPermissions.js,samples/README.md) |
|
|
172
|
+
| Test Topic Permissions | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/testTopicPermissions.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/testTopicPermissions.js,samples/README.md) |
|
|
173
|
+
| Update Dead Letter Policy | [source code](https://github.com/googleapis/nodejs-pubsub/blob/main/samples/updateDeadLetterPolicy.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-pubsub&page=editor&open_in_editor=samples/updateDeadLetterPolicy.js,samples/README.md) |
|
|
173
174
|
|
|
174
175
|
|
|
175
176
|
|
|
@@ -218,19 +219,19 @@ More Information: [Google Cloud Platform Launch Stages][launch_stages]
|
|
|
218
219
|
|
|
219
220
|
## Contributing
|
|
220
221
|
|
|
221
|
-
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
222
|
+
Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-pubsub/blob/main/CONTRIBUTING.md).
|
|
222
223
|
|
|
223
224
|
Please note that this `README.md`, the `samples/README.md`,
|
|
224
225
|
and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`)
|
|
225
226
|
are generated from a central template. To edit one of these files, make an edit
|
|
226
|
-
to its
|
|
227
|
-
[directory](https://github.com/googleapis/synthtool
|
|
227
|
+
to its templates in
|
|
228
|
+
[directory](https://github.com/googleapis/synthtool).
|
|
228
229
|
|
|
229
230
|
## License
|
|
230
231
|
|
|
231
232
|
Apache Version 2.0
|
|
232
233
|
|
|
233
|
-
See [LICENSE](https://github.com/googleapis/nodejs-pubsub/blob/
|
|
234
|
+
See [LICENSE](https://github.com/googleapis/nodejs-pubsub/blob/main/LICENSE)
|
|
234
235
|
|
|
235
236
|
[client-docs]: https://cloud.google.com/nodejs/docs/reference/pubsub/latest
|
|
236
237
|
[product-docs]: https://cloud.google.com/pubsub/docs/
|
package/build/protos/protos.d.ts
CHANGED
package/build/protos/protos.js
CHANGED
|
@@ -15300,6 +15300,7 @@
|
|
|
15300
15300
|
* @property {number} INPUT_ONLY=4 INPUT_ONLY value
|
|
15301
15301
|
* @property {number} IMMUTABLE=5 IMMUTABLE value
|
|
15302
15302
|
* @property {number} UNORDERED_LIST=6 UNORDERED_LIST value
|
|
15303
|
+
* @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value
|
|
15303
15304
|
*/
|
|
15304
15305
|
api.FieldBehavior = (function() {
|
|
15305
15306
|
var valuesById = {}, values = Object.create(valuesById);
|
|
@@ -15310,6 +15311,7 @@
|
|
|
15310
15311
|
values[valuesById[4] = "INPUT_ONLY"] = 4;
|
|
15311
15312
|
values[valuesById[5] = "IMMUTABLE"] = 5;
|
|
15312
15313
|
values[valuesById[6] = "UNORDERED_LIST"] = 6;
|
|
15314
|
+
values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7;
|
|
15313
15315
|
return values;
|
|
15314
15316
|
})();
|
|
15315
15317
|
|
|
@@ -21478,6 +21480,7 @@
|
|
|
21478
21480
|
case 4:
|
|
21479
21481
|
case 5:
|
|
21480
21482
|
case 6:
|
|
21483
|
+
case 7:
|
|
21481
21484
|
break;
|
|
21482
21485
|
}
|
|
21483
21486
|
}
|
|
@@ -21582,6 +21585,10 @@
|
|
|
21582
21585
|
case 6:
|
|
21583
21586
|
message[".google.api.fieldBehavior"][i] = 6;
|
|
21584
21587
|
break;
|
|
21588
|
+
case "NON_EMPTY_DEFAULT":
|
|
21589
|
+
case 7:
|
|
21590
|
+
message[".google.api.fieldBehavior"][i] = 7;
|
|
21591
|
+
break;
|
|
21585
21592
|
}
|
|
21586
21593
|
}
|
|
21587
21594
|
if (object[".google.api.resourceReference"] != null) {
|
package/build/protos/protos.json
CHANGED
|
@@ -1771,7 +1771,8 @@
|
|
|
1771
1771
|
"OUTPUT_ONLY": 3,
|
|
1772
1772
|
"INPUT_ONLY": 4,
|
|
1773
1773
|
"IMMUTABLE": 5,
|
|
1774
|
-
"UNORDERED_LIST": 6
|
|
1774
|
+
"UNORDERED_LIST": 6,
|
|
1775
|
+
"NON_EMPTY_DEFAULT": 7
|
|
1775
1776
|
}
|
|
1776
1777
|
},
|
|
1777
1778
|
"resourceReference": {
|
|
@@ -2414,6 +2415,18 @@
|
|
|
2414
2415
|
]
|
|
2415
2416
|
],
|
|
2416
2417
|
"reserved": [
|
|
2418
|
+
[
|
|
2419
|
+
4,
|
|
2420
|
+
4
|
|
2421
|
+
],
|
|
2422
|
+
[
|
|
2423
|
+
5,
|
|
2424
|
+
5
|
|
2425
|
+
],
|
|
2426
|
+
[
|
|
2427
|
+
6,
|
|
2428
|
+
6
|
|
2429
|
+
],
|
|
2417
2430
|
[
|
|
2418
2431
|
8,
|
|
2419
2432
|
8
|
package/build/src/iam.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export declare type TestIamPermissionsCallback = ResourceCallback<IamPermissions
|
|
|
62
62
|
* @see [What is Cloud IAM?]{@link https://cloud.google.com/iam/}
|
|
63
63
|
*
|
|
64
64
|
* @example
|
|
65
|
+
* ```
|
|
65
66
|
* const {PubSub} = require('@google-cloud/pubsub');
|
|
66
67
|
* const pubsub = new PubSub();
|
|
67
68
|
*
|
|
@@ -70,18 +71,197 @@ export declare type TestIamPermissionsCallback = ResourceCallback<IamPermissions
|
|
|
70
71
|
*
|
|
71
72
|
* const subscription = pubsub.subscription('my-subscription');
|
|
72
73
|
* // subscription.iam
|
|
74
|
+
* ```
|
|
73
75
|
*/
|
|
74
76
|
export declare class IAM {
|
|
75
77
|
pubsub: PubSub;
|
|
76
78
|
request: typeof PubSub.prototype.request;
|
|
77
79
|
id: string;
|
|
78
80
|
constructor(pubsub: PubSub, id: string);
|
|
81
|
+
/**
|
|
82
|
+
* @typedef {array} GetPolicyResponse
|
|
83
|
+
* @property {object} 0 The policy.
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* @callback GetPolicyCallback
|
|
87
|
+
* @param {?Error} err Request error, if any.
|
|
88
|
+
* @param {object} acl The policy.
|
|
89
|
+
*/
|
|
90
|
+
/**
|
|
91
|
+
* Get the IAM policy
|
|
92
|
+
*
|
|
93
|
+
* @param {object} [gaxOptions] Request configuration options, outlined
|
|
94
|
+
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
95
|
+
* @param {GetPolicyCallback} [callback] Callback function.
|
|
96
|
+
* @returns {Promise<GetPolicyResponse>}
|
|
97
|
+
*
|
|
98
|
+
* @see [Topics: getIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/getIamPolicy}
|
|
99
|
+
* @see [Subscriptions: getIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/getIamPolicy}
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```
|
|
103
|
+
* const {PubSub} = require('@google-cloud/pubsub');
|
|
104
|
+
* const pubsub = new PubSub();
|
|
105
|
+
*
|
|
106
|
+
* const topic = pubsub.topic('my-topic');
|
|
107
|
+
* const subscription = topic.subscription('my-subscription');
|
|
108
|
+
*
|
|
109
|
+
* topic.iam.getPolicy(function(err, policy, apiResponse) {});
|
|
110
|
+
*
|
|
111
|
+
* subscription.iam.getPolicy(function(err, policy, apiResponse) {});
|
|
112
|
+
*
|
|
113
|
+
* //-
|
|
114
|
+
* // If the callback is omitted, we'll return a Promise.
|
|
115
|
+
* //-
|
|
116
|
+
* topic.iam.getPolicy().then(function(data) {
|
|
117
|
+
* const policy = data[0];
|
|
118
|
+
* const apiResponse = data[1];
|
|
119
|
+
* });
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
79
122
|
getPolicy(gaxOpts?: CallOptions): Promise<GetPolicyResponse>;
|
|
80
123
|
getPolicy(callback: GetPolicyCallback): void;
|
|
81
124
|
getPolicy(gaxOpts: CallOptions, callback: GetPolicyCallback): void;
|
|
125
|
+
/**
|
|
126
|
+
* @typedef {array} SetPolicyResponse
|
|
127
|
+
* @property {object} 0 The policy.
|
|
128
|
+
*/
|
|
129
|
+
/**
|
|
130
|
+
* @callback SetPolicyCallback
|
|
131
|
+
* @param {?Error} err Request error, if any.
|
|
132
|
+
* @param {object} acl The policy.
|
|
133
|
+
*/
|
|
134
|
+
/**
|
|
135
|
+
* Set the IAM policy
|
|
136
|
+
*
|
|
137
|
+
* @throws {Error} If no policy is provided.
|
|
138
|
+
*
|
|
139
|
+
* @param {object} policy The [policy](https://cloud.google.com/pubsub/docs/reference/rest/v1/Policy).
|
|
140
|
+
* @param {array} [policy.bindings] Bindings associate members with roles.
|
|
141
|
+
* @param {Array<object>} [policy.rules] Rules to be applied to the policy.
|
|
142
|
+
* @param {string} [policy.etag] Etags are used to perform a read-modify-write.
|
|
143
|
+
* @param {object} [gaxOptions] Request configuration options, outlined
|
|
144
|
+
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
145
|
+
* @param {SetPolicyCallback} callback Callback function.
|
|
146
|
+
* @returns {Promise<SetPolicyResponse>}
|
|
147
|
+
*
|
|
148
|
+
* @see [Topics: setIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/setIamPolicy}
|
|
149
|
+
* @see [Subscriptions: setIamPolicy API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/setIamPolicy}
|
|
150
|
+
* @see [Policy]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/Policy}
|
|
151
|
+
*
|
|
152
|
+
* @example
|
|
153
|
+
* ```
|
|
154
|
+
* const {PubSub} = require('@google-cloud/pubsub');
|
|
155
|
+
* const pubsub = new PubSub();
|
|
156
|
+
*
|
|
157
|
+
* const topic = pubsub.topic('my-topic');
|
|
158
|
+
* const subscription = topic.subscription('my-subscription');
|
|
159
|
+
*
|
|
160
|
+
* const myPolicy = {
|
|
161
|
+
* bindings: [
|
|
162
|
+
* {
|
|
163
|
+
* role: 'roles/pubsub.subscriber',
|
|
164
|
+
* members:
|
|
165
|
+
* ['serviceAccount:myotherproject@appspot.gserviceaccount.com']
|
|
166
|
+
* }
|
|
167
|
+
* ]
|
|
168
|
+
* };
|
|
169
|
+
*
|
|
170
|
+
* topic.iam.setPolicy(myPolicy, function(err, policy, apiResponse) {});
|
|
171
|
+
*
|
|
172
|
+
* subscription.iam.setPolicy(myPolicy, function(err, policy, apiResponse)
|
|
173
|
+
* {});
|
|
174
|
+
*
|
|
175
|
+
* //-
|
|
176
|
+
* // If the callback is omitted, we'll return a Promise.
|
|
177
|
+
* //-
|
|
178
|
+
* topic.iam.setPolicy(myPolicy).then(function(data) {
|
|
179
|
+
* const policy = data[0];
|
|
180
|
+
* const apiResponse = data[1];
|
|
181
|
+
* });
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
82
184
|
setPolicy(policy: Policy, gaxOpts?: CallOptions): Promise<SetPolicyResponse>;
|
|
83
185
|
setPolicy(policy: Policy, gaxOpts: CallOptions, callback: SetPolicyCallback): void;
|
|
84
186
|
setPolicy(policy: Policy, callback: SetPolicyCallback): void;
|
|
187
|
+
/**
|
|
188
|
+
* @callback TestIamPermissionsCallback
|
|
189
|
+
* @param {?Error} err Request error, if any.
|
|
190
|
+
* @param {TestIamPermissionsAPIResponse} permissions A subset of permissions that the caller is allowed.
|
|
191
|
+
* @param {PermissionsResponse} apiResponse The full API response.
|
|
192
|
+
*/
|
|
193
|
+
/**
|
|
194
|
+
* @typedef {array} TestIamPermissionsResponse
|
|
195
|
+
* @property {object[]} 0 A subset of permissions that the caller is allowed.
|
|
196
|
+
* @property {PermissionsResponse} 1 The full API response.
|
|
197
|
+
*/
|
|
198
|
+
/**
|
|
199
|
+
* @typedef {string[]} PermissionsResponse
|
|
200
|
+
* A subset of TestPermissionsRequest.permissions that the caller is allowed.
|
|
201
|
+
* @see https://cloud.google.com/pubsub/docs/reference/rpc/google.iam.v1#google.iam.v1.TestIamPermissionsRequest
|
|
202
|
+
*/
|
|
203
|
+
/**
|
|
204
|
+
* Test a set of permissions for a resource.
|
|
205
|
+
*
|
|
206
|
+
* Permissions with wildcards such as `*` or `storage.*` are not allowed.
|
|
207
|
+
*
|
|
208
|
+
* @throws {Error} If permissions are not provided.
|
|
209
|
+
*
|
|
210
|
+
* @param {string|string[]} permissions The permission(s) to test for.
|
|
211
|
+
* @param {object} [gaxOptions] Request configuration options, outlined
|
|
212
|
+
* here: https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html.
|
|
213
|
+
* @param {TestIamPermissionsCallback} [callback] Callback function.
|
|
214
|
+
* @returns {Promise<TestIamPermissionsResponse>}
|
|
215
|
+
*
|
|
216
|
+
* @see [Topics: testIamPermissions API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.topics/testIamPermissions}
|
|
217
|
+
* @see [Subscriptions: testIamPermissions API Documentation]{@link https://cloud.google.com/pubsub/docs/reference/rest/v1/projects.subscriptions/testIamPermissions}
|
|
218
|
+
* @see [Permissions Reference]{@link https://cloud.google.com/pubsub/access_control#permissions}
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```
|
|
222
|
+
* const {PubSub} = require('@google-cloud/pubsub');
|
|
223
|
+
* const pubsub = new PubSub();
|
|
224
|
+
*
|
|
225
|
+
* const topic = pubsub.topic('my-topic');
|
|
226
|
+
* const subscription = topic.subscription('my-subscription');
|
|
227
|
+
*
|
|
228
|
+
* //-
|
|
229
|
+
* // Test a single permission.
|
|
230
|
+
* //-
|
|
231
|
+
* const test = 'pubsub.topics.update';
|
|
232
|
+
*
|
|
233
|
+
* topic.iam.testPermissions(test, function(err, permissions, apiResponse) {
|
|
234
|
+
* console.log(permissions);
|
|
235
|
+
* // {
|
|
236
|
+
* // "pubsub.topics.update": true
|
|
237
|
+
* // }
|
|
238
|
+
* });
|
|
239
|
+
*
|
|
240
|
+
* //-
|
|
241
|
+
* // Test several permissions at once.
|
|
242
|
+
* //-
|
|
243
|
+
* const tests = [
|
|
244
|
+
* 'pubsub.subscriptions.consume',
|
|
245
|
+
* 'pubsub.subscriptions.update'
|
|
246
|
+
* ];
|
|
247
|
+
*
|
|
248
|
+
* subscription.iam.testPermissions(tests, function(err, permissions) {
|
|
249
|
+
* console.log(permissions);
|
|
250
|
+
* // {
|
|
251
|
+
* // "pubsub.subscriptions.consume": true,
|
|
252
|
+
* // "pubsub.subscriptions.update": false
|
|
253
|
+
* // }
|
|
254
|
+
* });
|
|
255
|
+
*
|
|
256
|
+
* //-
|
|
257
|
+
* // If the callback is omitted, we'll return a Promise.
|
|
258
|
+
* //-
|
|
259
|
+
* topic.iam.testPermissions(test).then(function(data) {
|
|
260
|
+
* const permissions = data[0];
|
|
261
|
+
* const apiResponse = data[1];
|
|
262
|
+
* });
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
85
265
|
testPermissions(permissions: string | string[], gaxOpts?: CallOptions): Promise<TestIamPermissionsResponse>;
|
|
86
266
|
testPermissions(permissions: string | string[], gaxOpts: CallOptions, callback: TestIamPermissionsCallback): void;
|
|
87
267
|
testPermissions(permissions: string | string[], callback: TestIamPermissionsCallback): void;
|