@maxim_mazurok/gapi.client.containeranalysis-v1 0.0.20230303 → 0.0.20230317

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 +169 -1
  2. package/package.json +1 -1
  3. package/tests.ts +225 -1
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://containeranalysis.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20230303
12
+ // Revision: 20230317
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -42,6 +42,27 @@ declare namespace gapi.client {
42
42
  */
43
43
  names?: string[];
44
44
  }
45
+ interface Assessment {
46
+ /** Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. */
47
+ cve?: string;
48
+ /** Contains information about the impact of this vulnerability, this will change with time. */
49
+ impacts?: string[];
50
+ /** Justification provides the justification when the state of the assessment if NOT_AFFECTED. */
51
+ justification?: Justification;
52
+ /** A detailed description of this Vex. */
53
+ longDescription?: string;
54
+ /**
55
+ * Holds a list of references associated with this vulnerability item and assessment. These uris have additional information about the vulnerability and the assessment itself. E.g.
56
+ * Link to a document which details how this assessment concluded the state of this vulnerability.
57
+ */
58
+ relatedUris?: RelatedUrl[];
59
+ /** Specifies details on how to handle (and presumably, fix) a vulnerability. */
60
+ remediations?: Remediation[];
61
+ /** A one sentence description of this Vex. */
62
+ shortDescription?: string;
63
+ /** Provides the state of this Vulnerability assessment. */
64
+ state?: string;
65
+ }
45
66
  interface AttestationNote {
46
67
  /** Hint hints at the purpose of the attestation authority. */
47
68
  hint?: Hint;
@@ -465,6 +486,8 @@ declare namespace gapi.client {
465
486
  type?: string;
466
487
  }
467
488
  interface ContaineranalysisGoogleDevtoolsCloudbuildV1BuildOptions {
489
+ /** Optional. Option to specify how default logs buckets are setup. */
490
+ defaultLogsBucketBehavior?: string;
468
491
  /**
469
492
  * Requested disk size for the VM that runs the build. Note that this is *NOT* "disk free"; some of the space will be used by the operating system and build utilities. Also note that
470
493
  * this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 2000GB; builds that
@@ -938,6 +961,9 @@ declare namespace gapi.client {
938
961
  /** The total number of vulnerabilities associated with this resource. */
939
962
  totalCount?: string;
940
963
  }
964
+ // tslint:disable-next-line:no-empty-interface
965
+ interface GeneratePackagesSummaryRequest {
966
+ }
941
967
  interface GerritSourceContext {
942
968
  /** An alias, which may be a branch or tag. */
943
969
  aliasContext?: AliasContext;
@@ -1067,6 +1093,12 @@ declare namespace gapi.client {
1067
1093
  slsaProvenanceZeroTwo?: SlsaProvenanceZeroTwo;
1068
1094
  subject?: Subject[];
1069
1095
  }
1096
+ interface Justification {
1097
+ /** Additional details on why this justification was chosen. */
1098
+ details?: string;
1099
+ /** The justification type for this vulnerability. */
1100
+ justificationType?: string;
1101
+ }
1070
1102
  interface Jwt {
1071
1103
  /** The compact encoding of a JWS, which is always three base64 encoded strings joined by periods. For details, see: https://tools.ietf.org/html/rfc7515.html#section-3.1 */
1072
1104
  compactJwt?: string;
@@ -1092,6 +1124,15 @@ declare namespace gapi.client {
1092
1124
  */
1093
1125
  expression?: string;
1094
1126
  }
1127
+ interface LicensesSummary {
1128
+ /** The number of fixable vulnerabilities associated with this resource. */
1129
+ count?: string;
1130
+ /**
1131
+ * The license of the package. Note that the format of this value is not guaranteed. It may be nil, an empty string, a boolean value (A | B), a differently formed boolean value (A OR
1132
+ * B), etc...
1133
+ */
1134
+ license?: string;
1135
+ }
1095
1136
  interface ListNoteOccurrencesResponse {
1096
1137
  /** Token to provide to skip to a particular spot in the list. */
1097
1138
  nextPageToken?: string;
@@ -1184,6 +1225,8 @@ declare namespace gapi.client {
1184
1225
  upgrade?: UpgradeNote;
1185
1226
  /** A note describing a package vulnerability. */
1186
1227
  vulnerability?: VulnerabilityNote;
1228
+ /** A note describing a vulnerability assessment. */
1229
+ vulnerabilityAssessment?: VulnerabilityAssessmentNote;
1187
1230
  }
1188
1231
  interface Occurrence {
1189
1232
  /** Describes an attestation of an artifact. */
@@ -1288,6 +1331,12 @@ declare namespace gapi.client {
1288
1331
  /** Output only. The version of the package. */
1289
1332
  version?: Version;
1290
1333
  }
1334
+ interface PackagesSummaryResponse {
1335
+ /** A listing by license name of each of the licenses and their counts. */
1336
+ licensesSummary?: LicensesSummary[];
1337
+ /** The unique URL of the image or the container for which this summary applies. */
1338
+ resourceUrl?: string;
1339
+ }
1291
1340
  interface Policy {
1292
1341
  /**
1293
1342
  * Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings`
@@ -1314,12 +1363,31 @@ declare namespace gapi.client {
1314
1363
  */
1315
1364
  version?: number;
1316
1365
  }
1366
+ interface Product {
1367
+ /** Contains a URI which is vendor-specific. Example: The artifact repository URL of an image. */
1368
+ genericUri?: string;
1369
+ /**
1370
+ * Token that identifies a product so that it can be referred to from other parts in the document. There is no predefined format as long as it uniquely identifies a group in the
1371
+ * context of the current document.
1372
+ */
1373
+ id?: string;
1374
+ /** Name of the product. */
1375
+ name?: string;
1376
+ }
1317
1377
  interface ProjectRepoId {
1318
1378
  /** The ID of the project. */
1319
1379
  projectId?: string;
1320
1380
  /** The name of the repo. Leave empty for the default repo. */
1321
1381
  repoName?: string;
1322
1382
  }
1383
+ interface Publisher {
1384
+ /** Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. */
1385
+ issuingAuthority?: string;
1386
+ /** Name of the publisher. Examples: 'Google', 'Google Cloud Platform'. */
1387
+ name?: string;
1388
+ /** The context or namespace. Contains a URL which is under control of the issuing party and can be used as a globally unique identifier for that issuing party. Example: https://csaf.io */
1389
+ publisherNamespace?: string;
1390
+ }
1323
1391
  interface Recipe {
1324
1392
  /**
1325
1393
  * Collection of all external inputs that influenced the build on top of recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe type were "make", then this might be
@@ -1351,6 +1419,14 @@ declare namespace gapi.client {
1351
1419
  /** Specific URL associated with the resource. */
1352
1420
  url?: string;
1353
1421
  }
1422
+ interface Remediation {
1423
+ /** Contains a comprehensive human-readable discussion of the remediation. */
1424
+ details?: string;
1425
+ /** The type of remediation that can be applied. */
1426
+ remediationType?: string;
1427
+ /** Contains the URL where to obtain the remediation. */
1428
+ remediationUri?: RelatedUrl;
1429
+ }
1354
1430
  interface RepoId {
1355
1431
  /** A combination of a project ID and a repo name. */
1356
1432
  projectRepoId?: ProjectRepoId;
@@ -1563,12 +1639,44 @@ declare namespace gapi.client {
1563
1639
  /** The iteration of the package build from the above version. */
1564
1640
  revision?: string;
1565
1641
  }
1642
+ interface VexAssessment {
1643
+ /** Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. */
1644
+ cve?: string;
1645
+ /** Contains information about the impact of this vulnerability, this will change with time. */
1646
+ impacts?: string[];
1647
+ /** Justification provides the justification when the state of the assessment if NOT_AFFECTED. */
1648
+ justification?: Justification;
1649
+ /** The VulnerabilityAssessment note from which this VexAssessment was generated. This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`. */
1650
+ noteName?: string;
1651
+ /** Holds a list of references associated with this vulnerability item and assessment. */
1652
+ relatedUris?: RelatedUrl[];
1653
+ /** Specifies details on how to handle (and presumably, fix) a vulnerability. */
1654
+ remediations?: Remediation[];
1655
+ /** Provides the state of this Vulnerability assessment. */
1656
+ state?: string;
1657
+ }
1566
1658
  interface Volume {
1567
1659
  /** Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps. */
1568
1660
  name?: string;
1569
1661
  /** Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths. */
1570
1662
  path?: string;
1571
1663
  }
1664
+ interface VulnerabilityAssessmentNote {
1665
+ /** Represents a vulnerability assessment for the product. */
1666
+ assessment?: Assessment;
1667
+ /** Identifies the language used by this document, corresponding to IETF BCP 47 / RFC 5646. */
1668
+ languageCode?: string;
1669
+ /** A detailed description of this Vex. */
1670
+ longDescription?: string;
1671
+ /** The product affected by this vex. */
1672
+ product?: Product;
1673
+ /** Publisher details of this Note. */
1674
+ publisher?: Publisher;
1675
+ /** A one sentence description of this Vex. */
1676
+ shortDescription?: string;
1677
+ /** The title of the note. E.g. `Vex-Debian-11.4` */
1678
+ title?: string;
1679
+ }
1572
1680
  interface VulnerabilityNote {
1573
1681
  /** The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity. */
1574
1682
  cvssScore?: number;
@@ -1620,6 +1728,7 @@ declare namespace gapi.client {
1620
1728
  shortDescription?: string;
1621
1729
  /** The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.). */
1622
1730
  type?: string;
1731
+ vexAssessment?: VexAssessment;
1623
1732
  }
1624
1733
  interface VulnerabilityOccurrencesSummary {
1625
1734
  /** A listing by resource of the number of fixable and total vulnerabilities. */
@@ -2480,9 +2589,68 @@ declare namespace gapi.client {
2480
2589
  },
2481
2590
  body: TestIamPermissionsRequest): Request<TestIamPermissionsResponse>;
2482
2591
  }
2592
+ interface ResourcesResource {
2593
+ /** Gets a summary of the packages within a given resource. */
2594
+ generatePackagesSummary(request: {
2595
+ /** V1 error format. */
2596
+ "$.xgafv"?: string;
2597
+ /** OAuth access token. */
2598
+ access_token?: string;
2599
+ /** Data format for response. */
2600
+ alt?: string;
2601
+ /** JSONP */
2602
+ callback?: string;
2603
+ /** Selector specifying which fields to include in a partial response. */
2604
+ fields?: string;
2605
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2606
+ key?: string;
2607
+ /** Required. The name of the resource to get a packages summary for in the form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. */
2608
+ name: string;
2609
+ /** OAuth 2.0 token for the current user. */
2610
+ oauth_token?: string;
2611
+ /** Returns response with indentations and line breaks. */
2612
+ prettyPrint?: boolean;
2613
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2614
+ quotaUser?: string;
2615
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2616
+ upload_protocol?: string;
2617
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2618
+ uploadType?: string;
2619
+ /** Request body */
2620
+ resource: GeneratePackagesSummaryRequest;
2621
+ }): Request<PackagesSummaryResponse>;
2622
+ generatePackagesSummary(request: {
2623
+ /** V1 error format. */
2624
+ "$.xgafv"?: string;
2625
+ /** OAuth access token. */
2626
+ access_token?: string;
2627
+ /** Data format for response. */
2628
+ alt?: string;
2629
+ /** JSONP */
2630
+ callback?: string;
2631
+ /** Selector specifying which fields to include in a partial response. */
2632
+ fields?: string;
2633
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
2634
+ key?: string;
2635
+ /** Required. The name of the resource to get a packages summary for in the form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. */
2636
+ name: string;
2637
+ /** OAuth 2.0 token for the current user. */
2638
+ oauth_token?: string;
2639
+ /** Returns response with indentations and line breaks. */
2640
+ prettyPrint?: boolean;
2641
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
2642
+ quotaUser?: string;
2643
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
2644
+ upload_protocol?: string;
2645
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
2646
+ uploadType?: string;
2647
+ },
2648
+ body: GeneratePackagesSummaryRequest): Request<PackagesSummaryResponse>;
2649
+ }
2483
2650
  interface ProjectsResource {
2484
2651
  notes: NotesResource;
2485
2652
  occurrences: OccurrencesResource;
2653
+ resources: ResourcesResource;
2486
2654
  }
2487
2655
 
2488
2656
  const projects: ProjectsResource;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.containeranalysis-v1",
3
- "version": "0.0.20230303",
3
+ "version": "0.0.20230317",
4
4
  "description": "TypeScript typings for Container Analysis API v1",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230303
6
+ // Revision: 20230317
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -269,6 +269,51 @@ gapi.load('client', async () => {
269
269
  }
270
270
  ],
271
271
  },
272
+ vulnerabilityAssessment: {
273
+ assessment: {
274
+ cve: "Test string",
275
+ impacts: [
276
+ "Test string"
277
+ ],
278
+ justification: {
279
+ details: "Test string",
280
+ justificationType: "Test string",
281
+ },
282
+ longDescription: "Test string",
283
+ relatedUris: [
284
+ {
285
+ label: "Test string",
286
+ url: "Test string",
287
+ }
288
+ ],
289
+ remediations: [
290
+ {
291
+ details: "Test string",
292
+ remediationType: "Test string",
293
+ remediationUri: {
294
+ label: "Test string",
295
+ url: "Test string",
296
+ },
297
+ }
298
+ ],
299
+ shortDescription: "Test string",
300
+ state: "Test string",
301
+ },
302
+ languageCode: "Test string",
303
+ longDescription: "Test string",
304
+ product: {
305
+ genericUri: "Test string",
306
+ id: "Test string",
307
+ name: "Test string",
308
+ },
309
+ publisher: {
310
+ issuingAuthority: "Test string",
311
+ name: "Test string",
312
+ publisherNamespace: "Test string",
313
+ },
314
+ shortDescription: "Test string",
315
+ title: "Test string",
316
+ },
272
317
  }
273
318
  },
274
319
  });
@@ -511,6 +556,51 @@ gapi.load('client', async () => {
511
556
  }
512
557
  ],
513
558
  },
559
+ vulnerabilityAssessment: {
560
+ assessment: {
561
+ cve: "Test string",
562
+ impacts: [
563
+ "Test string"
564
+ ],
565
+ justification: {
566
+ details: "Test string",
567
+ justificationType: "Test string",
568
+ },
569
+ longDescription: "Test string",
570
+ relatedUris: [
571
+ {
572
+ label: "Test string",
573
+ url: "Test string",
574
+ }
575
+ ],
576
+ remediations: [
577
+ {
578
+ details: "Test string",
579
+ remediationType: "Test string",
580
+ remediationUri: {
581
+ label: "Test string",
582
+ url: "Test string",
583
+ },
584
+ }
585
+ ],
586
+ shortDescription: "Test string",
587
+ state: "Test string",
588
+ },
589
+ languageCode: "Test string",
590
+ longDescription: "Test string",
591
+ product: {
592
+ genericUri: "Test string",
593
+ id: "Test string",
594
+ name: "Test string",
595
+ },
596
+ publisher: {
597
+ issuingAuthority: "Test string",
598
+ name: "Test string",
599
+ publisherNamespace: "Test string",
600
+ },
601
+ shortDescription: "Test string",
602
+ title: "Test string",
603
+ },
514
604
  });
515
605
  /** Deletes the specified note. */
516
606
  await gapi.client.containeranalysis.projects.notes.delete({
@@ -778,6 +868,51 @@ gapi.load('client', async () => {
778
868
  }
779
869
  ],
780
870
  },
871
+ vulnerabilityAssessment: {
872
+ assessment: {
873
+ cve: "Test string",
874
+ impacts: [
875
+ "Test string"
876
+ ],
877
+ justification: {
878
+ details: "Test string",
879
+ justificationType: "Test string",
880
+ },
881
+ longDescription: "Test string",
882
+ relatedUris: [
883
+ {
884
+ label: "Test string",
885
+ url: "Test string",
886
+ }
887
+ ],
888
+ remediations: [
889
+ {
890
+ details: "Test string",
891
+ remediationType: "Test string",
892
+ remediationUri: {
893
+ label: "Test string",
894
+ url: "Test string",
895
+ },
896
+ }
897
+ ],
898
+ shortDescription: "Test string",
899
+ state: "Test string",
900
+ },
901
+ languageCode: "Test string",
902
+ longDescription: "Test string",
903
+ product: {
904
+ genericUri: "Test string",
905
+ id: "Test string",
906
+ name: "Test string",
907
+ },
908
+ publisher: {
909
+ issuingAuthority: "Test string",
910
+ name: "Test string",
911
+ publisherNamespace: "Test string",
912
+ },
913
+ shortDescription: "Test string",
914
+ title: "Test string",
915
+ },
781
916
  });
782
917
  /**
783
918
  * Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the
@@ -1491,6 +1626,34 @@ gapi.load('client', async () => {
1491
1626
  severity: "Test string",
1492
1627
  shortDescription: "Test string",
1493
1628
  type: "Test string",
1629
+ vexAssessment: {
1630
+ cve: "Test string",
1631
+ impacts: [
1632
+ "Test string"
1633
+ ],
1634
+ justification: {
1635
+ details: "Test string",
1636
+ justificationType: "Test string",
1637
+ },
1638
+ noteName: "Test string",
1639
+ relatedUris: [
1640
+ {
1641
+ label: "Test string",
1642
+ url: "Test string",
1643
+ }
1644
+ ],
1645
+ remediations: [
1646
+ {
1647
+ details: "Test string",
1648
+ remediationType: "Test string",
1649
+ remediationUri: {
1650
+ label: "Test string",
1651
+ url: "Test string",
1652
+ },
1653
+ }
1654
+ ],
1655
+ state: "Test string",
1656
+ },
1494
1657
  },
1495
1658
  }
1496
1659
  ],
@@ -2160,6 +2323,34 @@ gapi.load('client', async () => {
2160
2323
  severity: "Test string",
2161
2324
  shortDescription: "Test string",
2162
2325
  type: "Test string",
2326
+ vexAssessment: {
2327
+ cve: "Test string",
2328
+ impacts: [
2329
+ "Test string"
2330
+ ],
2331
+ justification: {
2332
+ details: "Test string",
2333
+ justificationType: "Test string",
2334
+ },
2335
+ noteName: "Test string",
2336
+ relatedUris: [
2337
+ {
2338
+ label: "Test string",
2339
+ url: "Test string",
2340
+ }
2341
+ ],
2342
+ remediations: [
2343
+ {
2344
+ details: "Test string",
2345
+ remediationType: "Test string",
2346
+ remediationUri: {
2347
+ label: "Test string",
2348
+ url: "Test string",
2349
+ },
2350
+ }
2351
+ ],
2352
+ state: "Test string",
2353
+ },
2163
2354
  },
2164
2355
  });
2165
2356
  /** Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource. */
@@ -2864,6 +3055,34 @@ gapi.load('client', async () => {
2864
3055
  severity: "Test string",
2865
3056
  shortDescription: "Test string",
2866
3057
  type: "Test string",
3058
+ vexAssessment: {
3059
+ cve: "Test string",
3060
+ impacts: [
3061
+ "Test string"
3062
+ ],
3063
+ justification: {
3064
+ details: "Test string",
3065
+ justificationType: "Test string",
3066
+ },
3067
+ noteName: "Test string",
3068
+ relatedUris: [
3069
+ {
3070
+ label: "Test string",
3071
+ url: "Test string",
3072
+ }
3073
+ ],
3074
+ remediations: [
3075
+ {
3076
+ details: "Test string",
3077
+ remediationType: "Test string",
3078
+ remediationUri: {
3079
+ label: "Test string",
3080
+ url: "Test string",
3081
+ },
3082
+ }
3083
+ ],
3084
+ state: "Test string",
3085
+ },
2867
3086
  },
2868
3087
  });
2869
3088
  /**
@@ -2904,5 +3123,10 @@ gapi.load('client', async () => {
2904
3123
  "Test string"
2905
3124
  ],
2906
3125
  });
3126
+ /** Gets a summary of the packages within a given resource. */
3127
+ await gapi.client.containeranalysis.projects.resources.generatePackagesSummary({
3128
+ name: "Test string",
3129
+ }, {
3130
+ });
2907
3131
  }
2908
3132
  });