@maxim_mazurok/gapi.client.containeranalysis-v1beta1 0.0.20230612 → 0.0.20230707

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 +170 -1
  2. package/package.json +1 -1
  3. package/tests.ts +261 -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=v1beta1
12
- // Revision: 20230612
12
+ // Revision: 20230707
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -163,6 +163,24 @@ declare namespace gapi.client {
163
163
  signature?:
164
164
  BuildSignature;
165
165
  }
166
+ interface BuildDefinition {
167
+ buildType?:
168
+ string;
169
+ externalParameters?:
170
+ { [P in string]: any };
171
+ internalParameters?:
172
+ { [P in string]: any };
173
+ resolvedDependencies?:
174
+ ResourceDescriptor[];
175
+ }
176
+ interface BuildMetadata {
177
+ finishedOn?:
178
+ string;
179
+ invocationId?:
180
+ string;
181
+ startedOn?:
182
+ string;
183
+ }
166
184
  interface BuildProvenance {
167
185
  /** Version string of the builder at the time this build was executed. */
168
186
  builderVersion?:
@@ -1173,6 +1191,9 @@ declare namespace gapi.client {
1173
1191
  /** The last time continuous analysis was done for this resource. Deprecated, do not use. */
1174
1192
  lastAnalysisTime?:
1175
1193
  string;
1194
+ /** The status of an SBOM generation. */
1195
+ sbomStatus?:
1196
+ SBOMStatus;
1176
1197
  }
1177
1198
  interface Discovery {
1178
1199
  /** Required. Immutable. The kind of analysis that is handled by this discovery. */
@@ -1257,6 +1278,14 @@ declare namespace gapi.client {
1257
1278
  customValues?:
1258
1279
  { [P in string]: string };
1259
1280
  }
1281
+ // tslint:disable-next-line:no-empty-interface
1282
+ interface ExportSBOMRequest {
1283
+ }
1284
+ interface ExportSBOMResponse {
1285
+ /** The name of the discovery occurrence in the form "projects/{project_id}/occurrences/{OCCURRENCE_ID} It can be used to track the progression of the SBOM export. */
1286
+ discoveryOccurrenceId?:
1287
+ string;
1288
+ }
1260
1289
  interface Expr {
1261
1290
  /** Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI. */
1262
1291
  description?:
@@ -1422,6 +1451,8 @@ declare namespace gapi.client {
1422
1451
  string;
1423
1452
  }
1424
1453
  interface GrafeasV1beta1BuildDetails {
1454
+ inTotoSlsaProvenanceV1?:
1455
+ InTotoSlsaProvenanceV1;
1425
1456
  /** Required. The actual provenance for the build. */
1426
1457
  provenance?:
1427
1458
  BuildProvenance;
@@ -1575,6 +1606,17 @@ declare namespace gapi.client {
1575
1606
  threshold?:
1576
1607
  string;
1577
1608
  }
1609
+ interface InTotoSlsaProvenanceV1 {
1610
+ /** InToto spec defined at https://github.com/in-toto/attestation/tree/main/spec#statement */
1611
+ _type?:
1612
+ string;
1613
+ predicate?:
1614
+ SlsaProvenanceV1;
1615
+ predicateType?:
1616
+ string;
1617
+ subject?:
1618
+ Subject[];
1619
+ }
1578
1620
  interface Justification {
1579
1621
  /** Additional details on why this justification was chosen. */
1580
1622
  details?:
@@ -2053,6 +2095,14 @@ declare namespace gapi.client {
2053
2095
  repoName?:
2054
2096
  string;
2055
2097
  }
2098
+ interface ProvenanceBuilder {
2099
+ builderDependencies?:
2100
+ ResourceDescriptor[];
2101
+ id?:
2102
+ string;
2103
+ version?:
2104
+ { [P in string]: string };
2105
+ }
2056
2106
  interface Publisher {
2057
2107
  /** Provides information about the authority of the issuing party to release the document, in particular, the party's constituency and responsibilities or other obligations. */
2058
2108
  issuingAuthority?:
@@ -2124,6 +2174,30 @@ declare namespace gapi.client {
2124
2174
  uri?:
2125
2175
  string;
2126
2176
  }
2177
+ interface ResourceDescriptor {
2178
+ annotations?:
2179
+ { [P in string]: any };
2180
+ content?:
2181
+ string;
2182
+ digest?:
2183
+ { [P in string]: string };
2184
+ downloadLocation?:
2185
+ string;
2186
+ mediaType?:
2187
+ string;
2188
+ name?:
2189
+ string;
2190
+ uri?:
2191
+ string;
2192
+ }
2193
+ interface RunDetails {
2194
+ builder?:
2195
+ ProvenanceBuilder;
2196
+ byproducts?:
2197
+ ResourceDescriptor[];
2198
+ metadata?:
2199
+ BuildMetadata;
2200
+ }
2127
2201
  interface SbomReferenceIntotoPayload {
2128
2202
  /** Identifier for the schema of the Statement. */
2129
2203
  _type?:
@@ -2171,6 +2245,14 @@ declare namespace gapi.client {
2171
2245
  signatures?:
2172
2246
  EnvelopeSignature[];
2173
2247
  }
2248
+ interface SBOMStatus {
2249
+ /** If there was an error generating an SBOM, this will indicate what that error was. */
2250
+ error?:
2251
+ string;
2252
+ /** The progress of the SBOM generation. */
2253
+ sbomState?:
2254
+ string;
2255
+ }
2174
2256
  interface SetIamPolicyRequest {
2175
2257
  /**
2176
2258
  * REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud
@@ -2210,6 +2292,12 @@ declare namespace gapi.client {
2210
2292
  publicKeyValue?:
2211
2293
  string;
2212
2294
  }
2295
+ interface SlsaProvenanceV1 {
2296
+ buildDefinition?:
2297
+ BuildDefinition;
2298
+ runDetails?:
2299
+ RunDetails;
2300
+ }
2213
2301
  interface Source {
2214
2302
  /**
2215
2303
  * If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will
@@ -3602,6 +3690,87 @@ declare namespace gapi.client {
3602
3690
  body: TestIamPermissionsRequest): Request<TestIamPermissionsResponse>;
3603
3691
  }
3604
3692
  interface ResourcesResource {
3693
+ /** Generates an SBOM and other dependency information for the given resource. */
3694
+ exportSBOM(request: {
3695
+ /** V1 error format. */
3696
+ "$.xgafv"?:
3697
+ string;
3698
+ /** OAuth access token. */
3699
+ access_token?:
3700
+ string;
3701
+ /** Data format for response. */
3702
+ alt?:
3703
+ string;
3704
+ /** JSONP */
3705
+ callback?:
3706
+ string;
3707
+ /** Selector specifying which fields to include in a partial response. */
3708
+ fields?:
3709
+ string;
3710
+ /** 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. */
3711
+ key?:
3712
+ string;
3713
+ /** Required. The name of the resource in the form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. */
3714
+ name:
3715
+ string;
3716
+ /** OAuth 2.0 token for the current user. */
3717
+ oauth_token?:
3718
+ string;
3719
+ /** Returns response with indentations and line breaks. */
3720
+ prettyPrint?:
3721
+ boolean;
3722
+ /** 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. */
3723
+ quotaUser?:
3724
+ string;
3725
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3726
+ upload_protocol?:
3727
+ string;
3728
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3729
+ uploadType?:
3730
+ string;
3731
+ /** Request body */
3732
+ resource:
3733
+ ExportSBOMRequest;
3734
+ }): Request<ExportSBOMResponse>;
3735
+ exportSBOM(request: {
3736
+ /** V1 error format. */
3737
+ "$.xgafv"?:
3738
+ string;
3739
+ /** OAuth access token. */
3740
+ access_token?:
3741
+ string;
3742
+ /** Data format for response. */
3743
+ alt?:
3744
+ string;
3745
+ /** JSONP */
3746
+ callback?:
3747
+ string;
3748
+ /** Selector specifying which fields to include in a partial response. */
3749
+ fields?:
3750
+ string;
3751
+ /** 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. */
3752
+ key?:
3753
+ string;
3754
+ /** Required. The name of the resource in the form of `projects/[PROJECT_ID]/resources/[RESOURCE_URL]`. */
3755
+ name:
3756
+ string;
3757
+ /** OAuth 2.0 token for the current user. */
3758
+ oauth_token?:
3759
+ string;
3760
+ /** Returns response with indentations and line breaks. */
3761
+ prettyPrint?:
3762
+ boolean;
3763
+ /** 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. */
3764
+ quotaUser?:
3765
+ string;
3766
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
3767
+ upload_protocol?:
3768
+ string;
3769
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
3770
+ uploadType?:
3771
+ string;
3772
+ },
3773
+ body: ExportSBOMRequest): Request<ExportSBOMResponse>;
3605
3774
  /** Gets a summary of the packages within a given resource. */
3606
3775
  generatePackagesSummary(request: {
3607
3776
  /** V1 error format. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.containeranalysis-v1beta1",
3
- "version": "0.0.20230612",
3
+ "version": "0.0.20230707",
4
4
  "description": "TypeScript typings for Container Analysis API v1beta1",
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: 20230612
6
+ // Revision: 20230707
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -1048,6 +1048,87 @@ gapi.load('client', async () => {
1048
1048
  },
1049
1049
  },
1050
1050
  build: {
1051
+ inTotoSlsaProvenanceV1: {
1052
+ _type: "Test string",
1053
+ predicate: {
1054
+ buildDefinition: {
1055
+ buildType: "Test string",
1056
+ externalParameters: {
1057
+ A: 42
1058
+ },
1059
+ internalParameters: {
1060
+ A: 42
1061
+ },
1062
+ resolvedDependencies: [
1063
+ {
1064
+ annotations: {
1065
+ A: 42
1066
+ },
1067
+ content: "Test string",
1068
+ digest: {
1069
+ A: "Test string"
1070
+ },
1071
+ downloadLocation: "Test string",
1072
+ mediaType: "Test string",
1073
+ name: "Test string",
1074
+ uri: "Test string",
1075
+ }
1076
+ ],
1077
+ },
1078
+ runDetails: {
1079
+ builder: {
1080
+ builderDependencies: [
1081
+ {
1082
+ annotations: {
1083
+ A: 42
1084
+ },
1085
+ content: "Test string",
1086
+ digest: {
1087
+ A: "Test string"
1088
+ },
1089
+ downloadLocation: "Test string",
1090
+ mediaType: "Test string",
1091
+ name: "Test string",
1092
+ uri: "Test string",
1093
+ }
1094
+ ],
1095
+ id: "Test string",
1096
+ version: {
1097
+ A: "Test string"
1098
+ },
1099
+ },
1100
+ byproducts: [
1101
+ {
1102
+ annotations: {
1103
+ A: 42
1104
+ },
1105
+ content: "Test string",
1106
+ digest: {
1107
+ A: "Test string"
1108
+ },
1109
+ downloadLocation: "Test string",
1110
+ mediaType: "Test string",
1111
+ name: "Test string",
1112
+ uri: "Test string",
1113
+ }
1114
+ ],
1115
+ metadata: {
1116
+ finishedOn: "Test string",
1117
+ invocationId: "Test string",
1118
+ startedOn: "Test string",
1119
+ },
1120
+ },
1121
+ },
1122
+ predicateType: "Test string",
1123
+ subject: [
1124
+ {
1125
+ digest: {
1126
+ A: "Test string"
1127
+ },
1128
+ name: "Test string",
1129
+ }
1130
+ ],
1131
+ },
1051
1132
  provenance: {
1052
1133
  builderVersion: "Test string",
1053
1134
  buildOptions: {
@@ -1231,6 +1312,10 @@ gapi.load('client', async () => {
1231
1312
  },
1232
1313
  continuousAnalysis: "Test string",
1233
1314
  lastAnalysisTime: "Test string",
1315
+ sbomStatus: {
1316
+ error: "Test string",
1317
+ sbomState: "Test string",
1318
+ },
1234
1319
  },
1235
1320
  },
1236
1321
  envelope: {
@@ -1538,6 +1623,87 @@ gapi.load('client', async () => {
1538
1623
  },
1539
1624
  },
1540
1625
  build: {
1626
+ inTotoSlsaProvenanceV1: {
1627
+ _type: "Test string",
1628
+ predicate: {
1629
+ buildDefinition: {
1630
+ buildType: "Test string",
1631
+ externalParameters: {
1632
+ A: 42
1633
+ },
1634
+ internalParameters: {
1635
+ A: 42
1636
+ },
1637
+ resolvedDependencies: [
1638
+ {
1639
+ annotations: {
1640
+ A: 42
1641
+ },
1642
+ content: "Test string",
1643
+ digest: {
1644
+ A: "Test string"
1645
+ },
1646
+ downloadLocation: "Test string",
1647
+ mediaType: "Test string",
1648
+ name: "Test string",
1649
+ uri: "Test string",
1650
+ }
1651
+ ],
1652
+ },
1653
+ runDetails: {
1654
+ builder: {
1655
+ builderDependencies: [
1656
+ {
1657
+ annotations: {
1658
+ A: 42
1659
+ },
1660
+ content: "Test string",
1661
+ digest: {
1662
+ A: "Test string"
1663
+ },
1664
+ downloadLocation: "Test string",
1665
+ mediaType: "Test string",
1666
+ name: "Test string",
1667
+ uri: "Test string",
1668
+ }
1669
+ ],
1670
+ id: "Test string",
1671
+ version: {
1672
+ A: "Test string"
1673
+ },
1674
+ },
1675
+ byproducts: [
1676
+ {
1677
+ annotations: {
1678
+ A: 42
1679
+ },
1680
+ content: "Test string",
1681
+ digest: {
1682
+ A: "Test string"
1683
+ },
1684
+ downloadLocation: "Test string",
1685
+ mediaType: "Test string",
1686
+ name: "Test string",
1687
+ uri: "Test string",
1688
+ }
1689
+ ],
1690
+ metadata: {
1691
+ finishedOn: "Test string",
1692
+ invocationId: "Test string",
1693
+ startedOn: "Test string",
1694
+ },
1695
+ },
1696
+ },
1697
+ predicateType: "Test string",
1698
+ subject: [
1699
+ {
1700
+ digest: {
1701
+ A: "Test string"
1702
+ },
1703
+ name: "Test string",
1704
+ }
1705
+ ],
1706
+ },
1541
1707
  provenance: {
1542
1708
  builderVersion: "Test string",
1543
1709
  buildOptions: {
@@ -1721,6 +1887,10 @@ gapi.load('client', async () => {
1721
1887
  },
1722
1888
  continuousAnalysis: "Test string",
1723
1889
  lastAnalysisTime: "Test string",
1890
+ sbomStatus: {
1891
+ error: "Test string",
1892
+ sbomState: "Test string",
1893
+ },
1724
1894
  },
1725
1895
  },
1726
1896
  envelope: {
@@ -2063,6 +2233,87 @@ gapi.load('client', async () => {
2063
2233
  },
2064
2234
  },
2065
2235
  build: {
2236
+ inTotoSlsaProvenanceV1: {
2237
+ _type: "Test string",
2238
+ predicate: {
2239
+ buildDefinition: {
2240
+ buildType: "Test string",
2241
+ externalParameters: {
2242
+ A: 42
2243
+ },
2244
+ internalParameters: {
2245
+ A: 42
2246
+ },
2247
+ resolvedDependencies: [
2248
+ {
2249
+ annotations: {
2250
+ A: 42
2251
+ },
2252
+ content: "Test string",
2253
+ digest: {
2254
+ A: "Test string"
2255
+ },
2256
+ downloadLocation: "Test string",
2257
+ mediaType: "Test string",
2258
+ name: "Test string",
2259
+ uri: "Test string",
2260
+ }
2261
+ ],
2262
+ },
2263
+ runDetails: {
2264
+ builder: {
2265
+ builderDependencies: [
2266
+ {
2267
+ annotations: {
2268
+ A: 42
2269
+ },
2270
+ content: "Test string",
2271
+ digest: {
2272
+ A: "Test string"
2273
+ },
2274
+ downloadLocation: "Test string",
2275
+ mediaType: "Test string",
2276
+ name: "Test string",
2277
+ uri: "Test string",
2278
+ }
2279
+ ],
2280
+ id: "Test string",
2281
+ version: {
2282
+ A: "Test string"
2283
+ },
2284
+ },
2285
+ byproducts: [
2286
+ {
2287
+ annotations: {
2288
+ A: 42
2289
+ },
2290
+ content: "Test string",
2291
+ digest: {
2292
+ A: "Test string"
2293
+ },
2294
+ downloadLocation: "Test string",
2295
+ mediaType: "Test string",
2296
+ name: "Test string",
2297
+ uri: "Test string",
2298
+ }
2299
+ ],
2300
+ metadata: {
2301
+ finishedOn: "Test string",
2302
+ invocationId: "Test string",
2303
+ startedOn: "Test string",
2304
+ },
2305
+ },
2306
+ },
2307
+ predicateType: "Test string",
2308
+ subject: [
2309
+ {
2310
+ digest: {
2311
+ A: "Test string"
2312
+ },
2313
+ name: "Test string",
2314
+ }
2315
+ ],
2316
+ },
2066
2317
  provenance: {
2067
2318
  builderVersion: "Test string",
2068
2319
  buildOptions: {
@@ -2246,6 +2497,10 @@ gapi.load('client', async () => {
2246
2497
  },
2247
2498
  continuousAnalysis: "Test string",
2248
2499
  lastAnalysisTime: "Test string",
2500
+ sbomStatus: {
2501
+ error: "Test string",
2502
+ sbomState: "Test string",
2503
+ },
2249
2504
  },
2250
2505
  },
2251
2506
  envelope: {
@@ -2565,6 +2820,11 @@ gapi.load('client', async () => {
2565
2820
  "Test string"
2566
2821
  ],
2567
2822
  });
2823
+ /** Generates an SBOM and other dependency information for the given resource. */
2824
+ await gapi.client.containeranalysis.projects.resources.exportSBOM({
2825
+ name: "Test string",
2826
+ }, {
2827
+ });
2568
2828
  /** Gets a summary of the packages within a given resource. */
2569
2829
  await gapi.client.containeranalysis.projects.resources.generatePackagesSummary({
2570
2830
  name: "Test string",