UNPKG

4.59 kBTypeScriptView Raw
1/*!
2 * Copyright 2014 Google Inc. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16/**
17 * @namespace google.pubsub.v1
18 */
19/**
20 * @namespace google.protobuf
21 */
22/**
23 * The default export of the `@google-cloud/pubsub` package is the
24 * {@link PubSub} class.
25 *
26 * See {@link PubSub} and {@link ClientConfig} for client methods and
27 * configuration options.
28 *
29 * @module {PubSub} @google-cloud/pubsub
30 * @alias nodejs-pubsub
31 *
32 * @example Install the client library with <a href="https://www.npmjs.com/">npm</a>:
33 * ```
34 * npm install @google-cloud/pubsub
35 *
36 * ```
37 * @example Import the client library
38 * ```
39 * const {PubSub} = require('@google-cloud/pubsub');
40 *
41 * ```
42 * @example Create a client that uses <a href="https://cloud.google.com/docs/authentication/production#providing_credentials_to_your_application">Application Default Credentials (ADC)</a>:
43 * ```
44 * const pubsub = new PubSub();
45 *
46 * ```
47 * @example Create a client with <a href="https://cloud.google.com/docs/authentication/production#obtaining_and_providing_service_account_credentials_manually">explicit credentials</a>:
48 * ```
49 * const pubsub = new PubSub({
50 * projectId: 'your-project-id',
51 * keyFilename: '/path/to/keyfile.json'
52 * });
53 *
54 * ```
55 * @example <caption>include:samples/quickstart.js</caption>
56 * region_tag:pubsub_quickstart_create_topic
57 * Full quickstart example:
58 */
59/**
60 * Reference to internal generated clients, advanced use only.
61 *
62 * @name PubSub.v1
63 * @see v1.PublisherClient
64 * @see v1.SubscriberClient
65 * @type {object}
66 * @property {constructor} PublisherClient
67 * Reference to {@link v1.PublisherClient}.
68 * @property {constructor} SubscriberClient
69 * Reference to {@link v1.SubscriberClient}.
70 */
71/**
72 * Reference to internal generated clients, advanced use only.
73 *
74 * @name module:@google-cloud/pubsub.v1
75 * @see v1.PublisherClient
76 * @see v1.SubscriberClient
77 * @type {object}
78 * @property {constructor} PublisherClient
79 * Reference to {@link v1.PublisherClient}.
80 * @property {constructor} SubscriberClient
81 * Reference to {@link v1.SubscriberClient}.
82 */
83import * as v1 from './v1';
84export { v1 };
85export { ServiceError, CallOptions } from 'google-gax';
86export { Policy, GetPolicyCallback, SetPolicyCallback, SetPolicyResponse, GetPolicyResponse, IamPermissionsMap, TestIamPermissionsResponse, TestIamPermissionsCallback, IAM, } from './iam';
87export { Attributes, PublishCallback, PublishOptions } from './publisher';
88export { BatchPublishOptions } from './publisher/message-batch';
89export { PublishError } from './publisher/publish-error';
90export { FlowControlOptions } from './publisher/flow-control';
91export { PageOptions, GetSnapshotsCallback, GetSnapshotsResponse, GetSubscriptionsCallback, GetSubscriptionsResponse, GetTopicsCallback, GetTopicsResponse, EmptyCallback, EmptyResponse, ExistsCallback, ExistsResponse, PubSub, ClientConfig, } from './pubsub';
92export { CreateSnapshotCallback, CreateSnapshotResponse, SeekCallback, SeekResponse, Snapshot, } from './snapshot';
93export { Message, SubscriberOptions } from './subscriber';
94export { Schema, CreateSchemaResponse, ISchema, SchemaType, SchemaTypes, ICreateSchemaRequest, SchemaEncoding, SchemaView, SchemaViews, Encodings, SchemaMessageMetadata, } from './schema';
95export { PushConfig, SubscriptionMetadata, SubscriptionOptions, SubscriptionCloseCallback, CreateSubscriptionOptions, CreateSubscriptionCallback, CreateSubscriptionResponse, GetSubscriptionOptions, GetSubscriptionCallback, GetSubscriptionResponse, GetSubscriptionMetadataCallback, GetSubscriptionMetadataResponse, SetSubscriptionMetadataCallback, SetSubscriptionMetadataResponse, Subscription, } from './subscription';
96export { CreateTopicCallback, CreateTopicResponse, GetTopicCallback, GetTopicResponse, GetTopicOptions, GetTopicMetadataCallback, GetTopicMetadataResponse, GetTopicSubscriptionsCallback, GetTopicSubscriptionsResponse, SetTopicMetadataCallback, SetTopicMetadataResponse, Topic, TopicMetadata, } from './topic';
97import * as protos from '../protos/protos';
98export { protos };