@maxim_mazurok/gapi.client.servicecontrol-v1 0.0.20220729
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/index.d.ts +1155 -0
- package/package.json +20 -0
- package/readme.md +86 -0
- package/tests.ts +476 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maxim_mazurok/gapi.client.servicecontrol-v1",
|
|
3
|
+
"version": "0.0.20220729",
|
|
4
|
+
"description": "TypeScript typings for Service Control API v1",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"email": "maxim@mazurok.com",
|
|
8
|
+
"name": "Maxim Mazurok",
|
|
9
|
+
"url": "https://maxim.mazurok.com"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/Maxim-Mazurok/google-api-typings-generator.git"
|
|
14
|
+
},
|
|
15
|
+
"types": "index.d.ts",
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@types/gapi.client": "*",
|
|
18
|
+
"@types/gapi.client.discovery": "*"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# TypeScript typings for Service Control API v1
|
|
2
|
+
|
|
3
|
+
Provides admission control and telemetry reporting for services integrated with Service Infrastructure.
|
|
4
|
+
For detailed description please check [documentation](https://cloud.google.com/service-control/).
|
|
5
|
+
|
|
6
|
+
## Installing
|
|
7
|
+
|
|
8
|
+
Install typings for Service Control API:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
npm install @types/gapi.client.servicecontrol-v1 --save-dev
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
You need to initialize Google API client in your code:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
gapi.load('client', () => {
|
|
20
|
+
// now we can use gapi.client
|
|
21
|
+
// ...
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then load api client wrapper:
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
gapi.client.load('https://servicecontrol.googleapis.com/$discovery/rest?version=v1', () => {
|
|
29
|
+
// now we can use:
|
|
30
|
+
// gapi.client.servicecontrol
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
|
|
36
|
+
gapi.client.load('servicecontrol', 'v1', () => {
|
|
37
|
+
// now we can use:
|
|
38
|
+
// gapi.client.servicecontrol
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Don't forget to authenticate your client before sending any request to resources:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
// declare client_id registered in Google Developers Console
|
|
46
|
+
var client_id = '',
|
|
47
|
+
scope = [
|
|
48
|
+
// See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
|
49
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
50
|
+
|
|
51
|
+
// Manage your Google Service Control data
|
|
52
|
+
'https://www.googleapis.com/auth/servicecontrol',
|
|
53
|
+
],
|
|
54
|
+
immediate = true;
|
|
55
|
+
// ...
|
|
56
|
+
|
|
57
|
+
gapi.auth.authorize(
|
|
58
|
+
{ client_id: client_id, scope: scope, immediate: immediate },
|
|
59
|
+
authResult => {
|
|
60
|
+
if (authResult && !authResult.error) {
|
|
61
|
+
/* handle successful authorization */
|
|
62
|
+
} else {
|
|
63
|
+
/* handle authorization error */
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
After that you can use Service Control API resources: <!-- TODO: make this work for multiple namespaces -->
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
|
|
72
|
+
/*
|
|
73
|
+
Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). **NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.
|
|
74
|
+
*/
|
|
75
|
+
await gapi.client.servicecontrol.services.allocateQuota({ serviceName: "serviceName", });
|
|
76
|
+
|
|
77
|
+
/*
|
|
78
|
+
Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam).
|
|
79
|
+
*/
|
|
80
|
+
await gapi.client.servicecontrol.services.check({ serviceName: "serviceName", });
|
|
81
|
+
|
|
82
|
+
/*
|
|
83
|
+
Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).
|
|
84
|
+
*/
|
|
85
|
+
await gapi.client.servicecontrol.services.report({ serviceName: "serviceName", });
|
|
86
|
+
```
|
package/tests.ts
ADDED
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.servicecontrol-v1 definition tests */
|
|
2
|
+
// IMPORTANT
|
|
3
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
|
+
|
|
6
|
+
// Revision: 20220729
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://servicecontrol.googleapis.com/$discovery/rest?version=v1');
|
|
12
|
+
/** now we can use gapi.client.servicecontrol */
|
|
13
|
+
|
|
14
|
+
/** don't forget to authenticate your client before sending any request to resources: */
|
|
15
|
+
/** declare client_id registered in Google Developers Console */
|
|
16
|
+
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
17
|
+
const scope = [
|
|
18
|
+
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
|
|
19
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
20
|
+
/** Manage your Google Service Control data */
|
|
21
|
+
'https://www.googleapis.com/auth/servicecontrol',
|
|
22
|
+
];
|
|
23
|
+
const immediate = false;
|
|
24
|
+
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
25
|
+
if (authResult && !authResult.error) {
|
|
26
|
+
/** handle successful authorization */
|
|
27
|
+
run();
|
|
28
|
+
} else {
|
|
29
|
+
/** handle authorization error */
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
async function run() {
|
|
34
|
+
/**
|
|
35
|
+
* Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on
|
|
36
|
+
* the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). **NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`,
|
|
37
|
+
* `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.
|
|
38
|
+
*/
|
|
39
|
+
await gapi.client.servicecontrol.services.allocateQuota({
|
|
40
|
+
serviceName: "Test string",
|
|
41
|
+
}, {
|
|
42
|
+
allocateOperation: {
|
|
43
|
+
consumerId: "Test string",
|
|
44
|
+
labels: {
|
|
45
|
+
A: "Test string"
|
|
46
|
+
},
|
|
47
|
+
methodName: "Test string",
|
|
48
|
+
operationId: "Test string",
|
|
49
|
+
quotaMetrics: [
|
|
50
|
+
{
|
|
51
|
+
metricName: "Test string",
|
|
52
|
+
metricValues: [
|
|
53
|
+
{
|
|
54
|
+
boolValue: true,
|
|
55
|
+
distributionValue: {
|
|
56
|
+
bucketCounts: [
|
|
57
|
+
"Test string"
|
|
58
|
+
],
|
|
59
|
+
count: "Test string",
|
|
60
|
+
exemplars: [
|
|
61
|
+
{
|
|
62
|
+
attachments: [
|
|
63
|
+
{
|
|
64
|
+
A: 42
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
timestamp: "Test string",
|
|
68
|
+
value: 42,
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
explicitBuckets: {
|
|
72
|
+
bounds: [
|
|
73
|
+
42
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
exponentialBuckets: {
|
|
77
|
+
growthFactor: 42,
|
|
78
|
+
numFiniteBuckets: 42,
|
|
79
|
+
scale: 42,
|
|
80
|
+
},
|
|
81
|
+
linearBuckets: {
|
|
82
|
+
numFiniteBuckets: 42,
|
|
83
|
+
offset: 42,
|
|
84
|
+
width: 42,
|
|
85
|
+
},
|
|
86
|
+
maximum: 42,
|
|
87
|
+
mean: 42,
|
|
88
|
+
minimum: 42,
|
|
89
|
+
sumOfSquaredDeviation: 42,
|
|
90
|
+
},
|
|
91
|
+
doubleValue: 42,
|
|
92
|
+
endTime: "Test string",
|
|
93
|
+
int64Value: "Test string",
|
|
94
|
+
labels: {
|
|
95
|
+
A: "Test string"
|
|
96
|
+
},
|
|
97
|
+
moneyValue: {
|
|
98
|
+
currencyCode: "Test string",
|
|
99
|
+
nanos: 42,
|
|
100
|
+
units: "Test string",
|
|
101
|
+
},
|
|
102
|
+
startTime: "Test string",
|
|
103
|
+
stringValue: "Test string",
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
quotaMode: "Test string",
|
|
109
|
+
},
|
|
110
|
+
serviceConfigId: "Test string",
|
|
111
|
+
});
|
|
112
|
+
/**
|
|
113
|
+
* Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed.
|
|
114
|
+
* If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to
|
|
115
|
+
* avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy
|
|
116
|
+
* information. NOTE: the CheckRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.check` permission on the specified service.
|
|
117
|
+
* For more information, see [Cloud IAM](https://cloud.google.com/iam).
|
|
118
|
+
*/
|
|
119
|
+
await gapi.client.servicecontrol.services.check({
|
|
120
|
+
serviceName: "Test string",
|
|
121
|
+
}, {
|
|
122
|
+
operation: {
|
|
123
|
+
consumerId: "Test string",
|
|
124
|
+
endTime: "Test string",
|
|
125
|
+
importance: "Test string",
|
|
126
|
+
labels: {
|
|
127
|
+
A: "Test string"
|
|
128
|
+
},
|
|
129
|
+
logEntries: [
|
|
130
|
+
{
|
|
131
|
+
httpRequest: {
|
|
132
|
+
cacheFillBytes: "Test string",
|
|
133
|
+
cacheHit: true,
|
|
134
|
+
cacheLookup: true,
|
|
135
|
+
cacheValidatedWithOriginServer: true,
|
|
136
|
+
latency: "Test string",
|
|
137
|
+
protocol: "Test string",
|
|
138
|
+
referer: "Test string",
|
|
139
|
+
remoteIp: "Test string",
|
|
140
|
+
requestMethod: "Test string",
|
|
141
|
+
requestSize: "Test string",
|
|
142
|
+
requestUrl: "Test string",
|
|
143
|
+
responseSize: "Test string",
|
|
144
|
+
serverIp: "Test string",
|
|
145
|
+
status: 42,
|
|
146
|
+
userAgent: "Test string",
|
|
147
|
+
},
|
|
148
|
+
insertId: "Test string",
|
|
149
|
+
labels: {
|
|
150
|
+
A: "Test string"
|
|
151
|
+
},
|
|
152
|
+
name: "Test string",
|
|
153
|
+
operation: {
|
|
154
|
+
first: true,
|
|
155
|
+
id: "Test string",
|
|
156
|
+
last: true,
|
|
157
|
+
producer: "Test string",
|
|
158
|
+
},
|
|
159
|
+
protoPayload: {
|
|
160
|
+
A: 42
|
|
161
|
+
},
|
|
162
|
+
severity: "Test string",
|
|
163
|
+
sourceLocation: {
|
|
164
|
+
file: "Test string",
|
|
165
|
+
function: "Test string",
|
|
166
|
+
line: "Test string",
|
|
167
|
+
},
|
|
168
|
+
structPayload: {
|
|
169
|
+
A: 42
|
|
170
|
+
},
|
|
171
|
+
textPayload: "Test string",
|
|
172
|
+
timestamp: "Test string",
|
|
173
|
+
trace: "Test string",
|
|
174
|
+
}
|
|
175
|
+
],
|
|
176
|
+
metricValueSets: [
|
|
177
|
+
{
|
|
178
|
+
metricName: "Test string",
|
|
179
|
+
metricValues: [
|
|
180
|
+
{
|
|
181
|
+
boolValue: true,
|
|
182
|
+
distributionValue: {
|
|
183
|
+
bucketCounts: [
|
|
184
|
+
"Test string"
|
|
185
|
+
],
|
|
186
|
+
count: "Test string",
|
|
187
|
+
exemplars: [
|
|
188
|
+
{
|
|
189
|
+
attachments: [
|
|
190
|
+
{
|
|
191
|
+
A: 42
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
timestamp: "Test string",
|
|
195
|
+
value: 42,
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
explicitBuckets: {
|
|
199
|
+
bounds: [
|
|
200
|
+
42
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
exponentialBuckets: {
|
|
204
|
+
growthFactor: 42,
|
|
205
|
+
numFiniteBuckets: 42,
|
|
206
|
+
scale: 42,
|
|
207
|
+
},
|
|
208
|
+
linearBuckets: {
|
|
209
|
+
numFiniteBuckets: 42,
|
|
210
|
+
offset: 42,
|
|
211
|
+
width: 42,
|
|
212
|
+
},
|
|
213
|
+
maximum: 42,
|
|
214
|
+
mean: 42,
|
|
215
|
+
minimum: 42,
|
|
216
|
+
sumOfSquaredDeviation: 42,
|
|
217
|
+
},
|
|
218
|
+
doubleValue: 42,
|
|
219
|
+
endTime: "Test string",
|
|
220
|
+
int64Value: "Test string",
|
|
221
|
+
labels: {
|
|
222
|
+
A: "Test string"
|
|
223
|
+
},
|
|
224
|
+
moneyValue: {
|
|
225
|
+
currencyCode: "Test string",
|
|
226
|
+
nanos: 42,
|
|
227
|
+
units: "Test string",
|
|
228
|
+
},
|
|
229
|
+
startTime: "Test string",
|
|
230
|
+
stringValue: "Test string",
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
operationId: "Test string",
|
|
236
|
+
operationName: "Test string",
|
|
237
|
+
quotaProperties: {
|
|
238
|
+
quotaMode: "Test string",
|
|
239
|
+
},
|
|
240
|
+
resources: [
|
|
241
|
+
{
|
|
242
|
+
resourceContainer: "Test string",
|
|
243
|
+
resourceLocation: "Test string",
|
|
244
|
+
resourceName: "Test string",
|
|
245
|
+
}
|
|
246
|
+
],
|
|
247
|
+
startTime: "Test string",
|
|
248
|
+
traceSpans: [
|
|
249
|
+
{
|
|
250
|
+
attributes: {
|
|
251
|
+
attributeMap: {
|
|
252
|
+
A: {
|
|
253
|
+
boolValue: true,
|
|
254
|
+
intValue: "Test string",
|
|
255
|
+
stringValue: {
|
|
256
|
+
truncatedByteCount: 42,
|
|
257
|
+
value: "Test string",
|
|
258
|
+
},
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
droppedAttributesCount: 42,
|
|
262
|
+
},
|
|
263
|
+
childSpanCount: 42,
|
|
264
|
+
displayName: {
|
|
265
|
+
truncatedByteCount: 42,
|
|
266
|
+
value: "Test string",
|
|
267
|
+
},
|
|
268
|
+
endTime: "Test string",
|
|
269
|
+
name: "Test string",
|
|
270
|
+
parentSpanId: "Test string",
|
|
271
|
+
sameProcessAsParentSpan: true,
|
|
272
|
+
spanId: "Test string",
|
|
273
|
+
spanKind: "Test string",
|
|
274
|
+
startTime: "Test string",
|
|
275
|
+
status: {
|
|
276
|
+
code: 42,
|
|
277
|
+
details: [
|
|
278
|
+
{
|
|
279
|
+
A: 42
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
message: "Test string",
|
|
283
|
+
},
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
userLabels: {
|
|
287
|
+
A: "Test string"
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
requestProjectSettings: true,
|
|
291
|
+
serviceConfigId: "Test string",
|
|
292
|
+
skipActivationCheck: true,
|
|
293
|
+
});
|
|
294
|
+
/**
|
|
295
|
+
* Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting
|
|
296
|
+
* data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time
|
|
297
|
+
* window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit (wire-format byte size) of 1MB. This method requires the
|
|
298
|
+
* `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).
|
|
299
|
+
*/
|
|
300
|
+
await gapi.client.servicecontrol.services.report({
|
|
301
|
+
serviceName: "Test string",
|
|
302
|
+
}, {
|
|
303
|
+
operations: [
|
|
304
|
+
{
|
|
305
|
+
consumerId: "Test string",
|
|
306
|
+
endTime: "Test string",
|
|
307
|
+
importance: "Test string",
|
|
308
|
+
labels: {
|
|
309
|
+
A: "Test string"
|
|
310
|
+
},
|
|
311
|
+
logEntries: [
|
|
312
|
+
{
|
|
313
|
+
httpRequest: {
|
|
314
|
+
cacheFillBytes: "Test string",
|
|
315
|
+
cacheHit: true,
|
|
316
|
+
cacheLookup: true,
|
|
317
|
+
cacheValidatedWithOriginServer: true,
|
|
318
|
+
latency: "Test string",
|
|
319
|
+
protocol: "Test string",
|
|
320
|
+
referer: "Test string",
|
|
321
|
+
remoteIp: "Test string",
|
|
322
|
+
requestMethod: "Test string",
|
|
323
|
+
requestSize: "Test string",
|
|
324
|
+
requestUrl: "Test string",
|
|
325
|
+
responseSize: "Test string",
|
|
326
|
+
serverIp: "Test string",
|
|
327
|
+
status: 42,
|
|
328
|
+
userAgent: "Test string",
|
|
329
|
+
},
|
|
330
|
+
insertId: "Test string",
|
|
331
|
+
labels: {
|
|
332
|
+
A: "Test string"
|
|
333
|
+
},
|
|
334
|
+
name: "Test string",
|
|
335
|
+
operation: {
|
|
336
|
+
first: true,
|
|
337
|
+
id: "Test string",
|
|
338
|
+
last: true,
|
|
339
|
+
producer: "Test string",
|
|
340
|
+
},
|
|
341
|
+
protoPayload: {
|
|
342
|
+
A: 42
|
|
343
|
+
},
|
|
344
|
+
severity: "Test string",
|
|
345
|
+
sourceLocation: {
|
|
346
|
+
file: "Test string",
|
|
347
|
+
function: "Test string",
|
|
348
|
+
line: "Test string",
|
|
349
|
+
},
|
|
350
|
+
structPayload: {
|
|
351
|
+
A: 42
|
|
352
|
+
},
|
|
353
|
+
textPayload: "Test string",
|
|
354
|
+
timestamp: "Test string",
|
|
355
|
+
trace: "Test string",
|
|
356
|
+
}
|
|
357
|
+
],
|
|
358
|
+
metricValueSets: [
|
|
359
|
+
{
|
|
360
|
+
metricName: "Test string",
|
|
361
|
+
metricValues: [
|
|
362
|
+
{
|
|
363
|
+
boolValue: true,
|
|
364
|
+
distributionValue: {
|
|
365
|
+
bucketCounts: [
|
|
366
|
+
"Test string"
|
|
367
|
+
],
|
|
368
|
+
count: "Test string",
|
|
369
|
+
exemplars: [
|
|
370
|
+
{
|
|
371
|
+
attachments: [
|
|
372
|
+
{
|
|
373
|
+
A: 42
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
timestamp: "Test string",
|
|
377
|
+
value: 42,
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
explicitBuckets: {
|
|
381
|
+
bounds: [
|
|
382
|
+
42
|
|
383
|
+
],
|
|
384
|
+
},
|
|
385
|
+
exponentialBuckets: {
|
|
386
|
+
growthFactor: 42,
|
|
387
|
+
numFiniteBuckets: 42,
|
|
388
|
+
scale: 42,
|
|
389
|
+
},
|
|
390
|
+
linearBuckets: {
|
|
391
|
+
numFiniteBuckets: 42,
|
|
392
|
+
offset: 42,
|
|
393
|
+
width: 42,
|
|
394
|
+
},
|
|
395
|
+
maximum: 42,
|
|
396
|
+
mean: 42,
|
|
397
|
+
minimum: 42,
|
|
398
|
+
sumOfSquaredDeviation: 42,
|
|
399
|
+
},
|
|
400
|
+
doubleValue: 42,
|
|
401
|
+
endTime: "Test string",
|
|
402
|
+
int64Value: "Test string",
|
|
403
|
+
labels: {
|
|
404
|
+
A: "Test string"
|
|
405
|
+
},
|
|
406
|
+
moneyValue: {
|
|
407
|
+
currencyCode: "Test string",
|
|
408
|
+
nanos: 42,
|
|
409
|
+
units: "Test string",
|
|
410
|
+
},
|
|
411
|
+
startTime: "Test string",
|
|
412
|
+
stringValue: "Test string",
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
}
|
|
416
|
+
],
|
|
417
|
+
operationId: "Test string",
|
|
418
|
+
operationName: "Test string",
|
|
419
|
+
quotaProperties: {
|
|
420
|
+
quotaMode: "Test string",
|
|
421
|
+
},
|
|
422
|
+
resources: [
|
|
423
|
+
{
|
|
424
|
+
resourceContainer: "Test string",
|
|
425
|
+
resourceLocation: "Test string",
|
|
426
|
+
resourceName: "Test string",
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
startTime: "Test string",
|
|
430
|
+
traceSpans: [
|
|
431
|
+
{
|
|
432
|
+
attributes: {
|
|
433
|
+
attributeMap: {
|
|
434
|
+
A: {
|
|
435
|
+
boolValue: true,
|
|
436
|
+
intValue: "Test string",
|
|
437
|
+
stringValue: {
|
|
438
|
+
truncatedByteCount: 42,
|
|
439
|
+
value: "Test string",
|
|
440
|
+
},
|
|
441
|
+
}
|
|
442
|
+
},
|
|
443
|
+
droppedAttributesCount: 42,
|
|
444
|
+
},
|
|
445
|
+
childSpanCount: 42,
|
|
446
|
+
displayName: {
|
|
447
|
+
truncatedByteCount: 42,
|
|
448
|
+
value: "Test string",
|
|
449
|
+
},
|
|
450
|
+
endTime: "Test string",
|
|
451
|
+
name: "Test string",
|
|
452
|
+
parentSpanId: "Test string",
|
|
453
|
+
sameProcessAsParentSpan: true,
|
|
454
|
+
spanId: "Test string",
|
|
455
|
+
spanKind: "Test string",
|
|
456
|
+
startTime: "Test string",
|
|
457
|
+
status: {
|
|
458
|
+
code: 42,
|
|
459
|
+
details: [
|
|
460
|
+
{
|
|
461
|
+
A: 42
|
|
462
|
+
}
|
|
463
|
+
],
|
|
464
|
+
message: "Test string",
|
|
465
|
+
},
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
userLabels: {
|
|
469
|
+
A: "Test string"
|
|
470
|
+
},
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
serviceConfigId: "Test string",
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
});
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "commonjs",
|
|
4
|
+
"lib": ["es6", "dom"],
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"noImplicitThis": true,
|
|
7
|
+
"strictNullChecks": true,
|
|
8
|
+
"baseUrl": "../",
|
|
9
|
+
"typeRoots": [
|
|
10
|
+
"../"
|
|
11
|
+
],
|
|
12
|
+
"types": [],
|
|
13
|
+
"noEmit": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"strictFunctionTypes": true
|
|
16
|
+
},
|
|
17
|
+
"files": ["index.d.ts", "tests.ts"]
|
|
18
|
+
}
|