@maxim_mazurok/gapi.client.servicecontrol-v2 0.1.20260220 → 0.2.20260512

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.
Files changed (3) hide show
  1. package/index.d.ts +38 -16
  2. package/package.json +1 -1
  3. package/readme.md +17 -0
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://servicecontrol.googleapis.com/$discovery/rest?version=v2
12
- // Revision: 20260220
12
+ // Revision: 20260512
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -44,7 +44,7 @@ declare namespace gapi.client {
44
44
  /** The destination of a network activity, such as accepting a TCP connection. In a multi hop network activity, the destination represents the receiver of the last hop. */
45
45
  destination?: Peer;
46
46
  /** Supports extensions for advanced use cases, such as logs and metrics. */
47
- extensions?: Array<{[P in string]: any}>;
47
+ extensions?: {[P in string]: any}[];
48
48
  /** The origin of a network activity. In a multi hop network activity, the origin represents the sender of the first hop. For the first hop, the `source` and the `origin` must have the same content. */
49
49
  origin?: Peer;
50
50
  /** Represents a network request, such as an HTTP request. */
@@ -57,6 +57,8 @@ declare namespace gapi.client {
57
57
  source?: Peer;
58
58
  }
59
59
  interface AuditLog {
60
+ /** The API version identifier of the operation that uses interface based versioning (IBV). For example, `"2026-01-01-preview"`. The version identifier generally follows the format of [variant_]date[_decorator]. It should not be parsed because the exact format varies across services. */
61
+ apiVersionIdentifier?: string;
60
62
  /** Authentication information. */
61
63
  authenticationInfo?: AuthenticationInfo;
62
64
  /** Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple. */
@@ -95,6 +97,8 @@ declare namespace gapi.client {
95
97
  audiences?: string[];
96
98
  /** Structured claims presented with the credential. JWTs include `{key: value}` pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure. */
97
99
  claims?: {[P in string]: any};
100
+ /** Identifies the client credential id used for authentication. credential_id is in the format of AUTH_METHOD:IDENTIFIER, e.g. "serviceaccount:XXXXX, apikey:XXXXX" where the format of the IDENTIFIER can vary for different AUTH_METHODs. */
101
+ credentialId?: string;
98
102
  /** Attributes of the OAuth token associated with the request. */
99
103
  oauth?: Oauth;
100
104
  /** The authorized presenter of the credential. Reflects the optional Authorized Presenter (`azp`) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client id looks as follows: "123456789012.apps.googleusercontent.com". */
@@ -128,7 +132,12 @@ declare namespace gapi.client {
128
132
  /** The required IAM permission. */
129
133
  permission?: string;
130
134
  /** The type of the permission that was checked. For data access audit logs this corresponds with the permission type that must be enabled in the project/folder/organization IAM policy in order for the log to be written. */
131
- permissionType?: string;
135
+ permissionType?:
136
+ | 'PERMISSION_TYPE_UNSPECIFIED'
137
+ | 'ADMIN_READ'
138
+ | 'ADMIN_WRITE'
139
+ | 'DATA_READ'
140
+ | 'DATA_WRITE';
132
141
  /** The resource being accessed, as a REST-style or cloud resource string. For example: bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or projects/PROJECTID/datasets/DATASETID */
133
142
  resource?: string;
134
143
  /** Resource attributes used in IAM condition evaluation. This field contains resource attributes like resource type and resource name. To get the whole view of the attributes used in IAM condition evaluation, the user must also look into `AuditLog.request_metadata.request_attributes`. */
@@ -328,7 +337,7 @@ declare namespace gapi.client {
328
337
  /** The status code, which should be an enum value of google.rpc.Code. */
329
338
  code?: number;
330
339
  /** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
331
- details?: Array<{[P in string]: any}>;
340
+ details?: {[P in string]: any}[];
332
341
  /** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. */
333
342
  message?: string;
334
343
  }
@@ -384,7 +393,16 @@ declare namespace gapi.client {
384
393
  /** The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog. */
385
394
  protoPayload?: {[P in string]: any};
386
395
  /** The severity of the log entry. The default value is `LogSeverity.DEFAULT`. */
387
- severity?: string;
396
+ severity?:
397
+ | 'DEFAULT'
398
+ | 'DEBUG'
399
+ | 'INFO'
400
+ | 'NOTICE'
401
+ | 'WARNING'
402
+ | 'ERROR'
403
+ | 'CRITICAL'
404
+ | 'ALERT'
405
+ | 'EMERGENCY';
388
406
  /** Optional. Source code location information associated with the log entry, if any. */
389
407
  sourceLocation?: V2LogEntrySourceLocation;
390
408
  /** The log entry payload, represented as a structure that is expressed as a JSON object. */
@@ -422,13 +440,13 @@ declare namespace gapi.client {
422
440
  /** The parent resource for the resource. */
423
441
  parent?: Resource;
424
442
  /** The api path the resource event was created in. This should match the source of the `payload` field. For direct integrations with Chemist, this should generally be the RESPONSE. go/resource-event-pipeline-type */
425
- path?: string;
443
+ path?: 'API_PATH_UNSPECIFIED' | 'REQUEST' | 'RESPONSE';
426
444
  /** The payload contains metadata associated with the resource event. A ResourceEventPayloadStatus is provided instead if the original payload cannot be returned due to a limitation (e.g. size limit). */
427
445
  payload?: {[P in string]: any};
428
446
  /** The resource associated with the event. */
429
447
  resource?: Resource;
430
448
  /** The resource event type determines how the backend service should process the event. */
431
- type?: string;
449
+ type?: 'TYPE_UNSPECIFIED' | 'CREATE' | 'UPDATE' | 'DELETE' | 'UNDELETE';
432
450
  }
433
451
  interface ViolationInfo {
434
452
  /** Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types */
@@ -440,17 +458,21 @@ declare namespace gapi.client {
440
458
  /** Optional. Error message that policy is indicating. */
441
459
  errorMessage?: string;
442
460
  /** Optional. Indicates the type of the policy. */
443
- policyType?: string;
461
+ policyType?:
462
+ | 'POLICY_TYPE_UNSPECIFIED'
463
+ | 'BOOLEAN_CONSTRAINT'
464
+ | 'LIST_CONSTRAINT'
465
+ | 'CUSTOM_CONSTRAINT';
444
466
  }
445
467
  interface ServicesResource {
446
468
  /** This method provides admission control for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](https://cloud.google.com/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control). */
447
469
  check(request: {
448
470
  /** V1 error format. */
449
- '$.xgafv'?: string;
471
+ '$.xgafv'?: '1' | '2';
450
472
  /** OAuth access token. */
451
473
  access_token?: string;
452
474
  /** Data format for response. */
453
- alt?: string;
475
+ alt?: 'json' | 'media' | 'proto';
454
476
  /** JSONP */
455
477
  callback?: string;
456
478
  /** Selector specifying which fields to include in a partial response. */
@@ -475,11 +497,11 @@ declare namespace gapi.client {
475
497
  check(
476
498
  request: {
477
499
  /** V1 error format. */
478
- '$.xgafv'?: string;
500
+ '$.xgafv'?: '1' | '2';
479
501
  /** OAuth access token. */
480
502
  access_token?: string;
481
503
  /** Data format for response. */
482
- alt?: string;
504
+ alt?: 'json' | 'media' | 'proto';
483
505
  /** JSONP */
484
506
  callback?: string;
485
507
  /** Selector specifying which fields to include in a partial response. */
@@ -504,11 +526,11 @@ declare namespace gapi.client {
504
526
  /** This method provides telemetry reporting for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 100 operations and 1MB per Report call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control). */
505
527
  report(request: {
506
528
  /** V1 error format. */
507
- '$.xgafv'?: string;
529
+ '$.xgafv'?: '1' | '2';
508
530
  /** OAuth access token. */
509
531
  access_token?: string;
510
532
  /** Data format for response. */
511
- alt?: string;
533
+ alt?: 'json' | 'media' | 'proto';
512
534
  /** JSONP */
513
535
  callback?: string;
514
536
  /** Selector specifying which fields to include in a partial response. */
@@ -533,11 +555,11 @@ declare namespace gapi.client {
533
555
  report(
534
556
  request: {
535
557
  /** V1 error format. */
536
- '$.xgafv'?: string;
558
+ '$.xgafv'?: '1' | '2';
537
559
  /** OAuth access token. */
538
560
  access_token?: string;
539
561
  /** Data format for response. */
540
- alt?: string;
562
+ alt?: 'json' | 'media' | 'proto';
541
563
  /** JSONP */
542
564
  callback?: string;
543
565
  /** Selector specifying which fields to include in a partial response. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.servicecontrol-v2",
3
- "version": "0.1.20260220",
3
+ "version": "0.2.20260512",
4
4
  "description": "TypeScript typings for Service Control API v2",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -11,6 +11,23 @@ Install typings for Service Control API:
11
11
  npm install @types/gapi.client.servicecontrol-v2 --save-dev
12
12
  ```
13
13
 
14
+ ## TypeScript 6.0+
15
+
16
+ TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:
17
+
18
+ ```json
19
+ {
20
+ "compilerOptions": {
21
+ "types": [
22
+ "gapi",
23
+ "gapi.auth2",
24
+ "gapi.client",
25
+ "gapi.client.servicecontrol-v2"
26
+ ]
27
+ }
28
+ }
29
+ ```
30
+
14
31
  ## Usage
15
32
 
16
33
  You need to initialize Google API client in your code: