@googleapis/trafficdirector 1.2.0 → 1.2.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 +14 -0
- package/build/index.d.ts +5 -0
- package/build/index.js +4 -1
- package/build/index.js.map +1 -1
- package/build/v3.d.ts +875 -0
- package/build/v3.js +83 -0
- package/build/v3.js.map +1 -0
- package/index.ts +17 -2
- package/package.json +1 -1
- package/v3.ts +980 -0
package/build/v3.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2020 Google LLC
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.trafficdirector_v3 = void 0;
|
|
16
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
17
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
18
|
+
/* eslint-disable @typescript-eslint/no-empty-interface */
|
|
19
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
20
|
+
/* eslint-disable no-irregular-whitespace */
|
|
21
|
+
const googleapis_common_1 = require("googleapis-common");
|
|
22
|
+
var trafficdirector_v3;
|
|
23
|
+
(function (trafficdirector_v3) {
|
|
24
|
+
/**
|
|
25
|
+
* Traffic Director API
|
|
26
|
+
*
|
|
27
|
+
*
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```js
|
|
31
|
+
* const {google} = require('googleapis');
|
|
32
|
+
* const trafficdirector = google.trafficdirector('v3');
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
class Trafficdirector {
|
|
36
|
+
constructor(options, google) {
|
|
37
|
+
this.context = {
|
|
38
|
+
_options: options || {},
|
|
39
|
+
google,
|
|
40
|
+
};
|
|
41
|
+
this.discovery = new Resource$Discovery(this.context);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
trafficdirector_v3.Trafficdirector = Trafficdirector;
|
|
45
|
+
class Resource$Discovery {
|
|
46
|
+
constructor(context) {
|
|
47
|
+
this.context = context;
|
|
48
|
+
}
|
|
49
|
+
client_status(paramsOrCallback, optionsOrCallback, callback) {
|
|
50
|
+
let params = (paramsOrCallback ||
|
|
51
|
+
{});
|
|
52
|
+
let options = (optionsOrCallback || {});
|
|
53
|
+
if (typeof paramsOrCallback === 'function') {
|
|
54
|
+
callback = paramsOrCallback;
|
|
55
|
+
params = {};
|
|
56
|
+
options = {};
|
|
57
|
+
}
|
|
58
|
+
if (typeof optionsOrCallback === 'function') {
|
|
59
|
+
callback = optionsOrCallback;
|
|
60
|
+
options = {};
|
|
61
|
+
}
|
|
62
|
+
const rootUrl = options.rootUrl || 'https://trafficdirector.googleapis.com/';
|
|
63
|
+
const parameters = {
|
|
64
|
+
options: Object.assign({
|
|
65
|
+
url: (rootUrl + '/v3/discovery:client_status').replace(/([^:]\/)\/+/g, '$1'),
|
|
66
|
+
method: 'POST',
|
|
67
|
+
}, options),
|
|
68
|
+
params,
|
|
69
|
+
requiredParams: [],
|
|
70
|
+
pathParams: [],
|
|
71
|
+
context: this.context,
|
|
72
|
+
};
|
|
73
|
+
if (callback) {
|
|
74
|
+
(0, googleapis_common_1.createAPIRequest)(parameters, callback);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
return (0, googleapis_common_1.createAPIRequest)(parameters);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
trafficdirector_v3.Resource$Discovery = Resource$Discovery;
|
|
82
|
+
})(trafficdirector_v3 = exports.trafficdirector_v3 || (exports.trafficdirector_v3 = {}));
|
|
83
|
+
//# sourceMappingURL=v3.js.map
|
package/build/v3.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v3.js","sourceRoot":"","sources":["../v3.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uDAAuD;AACvD,sDAAsD;AACtD,0DAA0D;AAC1D,oDAAoD;AACpD,4CAA4C;AAE5C,yDAe2B;AAG3B,IAAiB,kBAAkB,CA86BlC;AA96BD,WAAiB,kBAAkB;IAgEjC;;;;;;;;;;OAUG;IACH,MAAa,eAAe;QAI1B,YAAY,OAAsB,EAAE,MAA2B;YAC7D,IAAI,CAAC,OAAO,GAAG;gBACb,QAAQ,EAAE,OAAO,IAAI,EAAE;gBACvB,MAAM;aACP,CAAC;YAEF,IAAI,CAAC,SAAS,GAAG,IAAI,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACxD,CAAC;KACF;IAZY,kCAAe,kBAY3B,CAAA;IA2uBD,MAAa,kBAAkB;QAE7B,YAAY,OAA0B;YACpC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACzB,CAAC;QAoCD,aAAa,CACX,gBAGkC,EAClC,iBAIkC,EAClC,QAEkC;YAKlC,IAAI,MAAM,GAAG,CAAC,gBAAgB;gBAC5B,EAAE,CAA4C,CAAC;YACjD,IAAI,OAAO,GAAG,CAAC,iBAAiB,IAAI,EAAE,CAAkB,CAAC;YAEzD,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE;gBAC1C,QAAQ,GAAG,gBAAgB,CAAC;gBAC5B,MAAM,GAAG,EAA6C,CAAC;gBACvD,OAAO,GAAG,EAAE,CAAC;aACd;YAED,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;gBAC3C,QAAQ,GAAG,iBAAiB,CAAC;gBAC7B,OAAO,GAAG,EAAE,CAAC;aACd;YAED,MAAM,OAAO,GACX,OAAO,CAAC,OAAO,IAAI,yCAAyC,CAAC;YAC/D,MAAM,UAAU,GAAG;gBACjB,OAAO,EAAE,MAAM,CAAC,MAAM,CACpB;oBACE,GAAG,EAAE,CAAC,OAAO,GAAG,6BAA6B,CAAC,CAAC,OAAO,CACpD,cAAc,EACd,IAAI,CACL;oBACD,MAAM,EAAE,MAAM;iBACf,EACD,OAAO,CACR;gBACD,MAAM;gBACN,cAAc,EAAE,EAAE;gBAClB,UAAU,EAAE,EAAE;gBACd,OAAO,EAAE,IAAI,CAAC,OAAO;aACtB,CAAC;YACF,IAAI,QAAQ,EAAE;gBACZ,IAAA,oCAAgB,EACd,UAAU,EACV,QAAyC,CAC1C,CAAC;aACH;iBAAM;gBACL,OAAO,IAAA,oCAAgB,EAA8B,UAAU,CAAC,CAAC;aAClE;QACH,CAAC;KACF;IAnGY,qCAAkB,qBAmG9B,CAAA;AASH,CAAC,EA96BgB,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QA86BlC"}
|
package/index.ts
CHANGED
|
@@ -15,9 +15,11 @@
|
|
|
15
15
|
|
|
16
16
|
import {AuthPlus, getAPI, GoogleConfigurable} from 'googleapis-common';
|
|
17
17
|
import {trafficdirector_v2} from './v2';
|
|
18
|
+
import {trafficdirector_v3} from './v3';
|
|
18
19
|
|
|
19
20
|
export const VERSIONS = {
|
|
20
21
|
v2: trafficdirector_v2.Trafficdirector,
|
|
22
|
+
v3: trafficdirector_v3.Trafficdirector,
|
|
21
23
|
};
|
|
22
24
|
|
|
23
25
|
export function trafficdirector(
|
|
@@ -26,9 +28,21 @@ export function trafficdirector(
|
|
|
26
28
|
export function trafficdirector(
|
|
27
29
|
options: trafficdirector_v2.Options
|
|
28
30
|
): trafficdirector_v2.Trafficdirector;
|
|
29
|
-
export function trafficdirector
|
|
31
|
+
export function trafficdirector(
|
|
32
|
+
version: 'v3'
|
|
33
|
+
): trafficdirector_v3.Trafficdirector;
|
|
34
|
+
export function trafficdirector(
|
|
35
|
+
options: trafficdirector_v3.Options
|
|
36
|
+
): trafficdirector_v3.Trafficdirector;
|
|
37
|
+
export function trafficdirector<
|
|
38
|
+
T = trafficdirector_v2.Trafficdirector | trafficdirector_v3.Trafficdirector,
|
|
39
|
+
>(
|
|
30
40
|
this: GoogleConfigurable,
|
|
31
|
-
versionOrOptions:
|
|
41
|
+
versionOrOptions:
|
|
42
|
+
| 'v2'
|
|
43
|
+
| trafficdirector_v2.Options
|
|
44
|
+
| 'v3'
|
|
45
|
+
| trafficdirector_v3.Options
|
|
32
46
|
) {
|
|
33
47
|
return getAPI<T>('trafficdirector', versionOrOptions, VERSIONS, this);
|
|
34
48
|
}
|
|
@@ -36,6 +50,7 @@ export function trafficdirector<T = trafficdirector_v2.Trafficdirector>(
|
|
|
36
50
|
const auth = new AuthPlus();
|
|
37
51
|
export {auth};
|
|
38
52
|
export {trafficdirector_v2};
|
|
53
|
+
export {trafficdirector_v3};
|
|
39
54
|
export {
|
|
40
55
|
AuthPlus,
|
|
41
56
|
GlobalOptions,
|