File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
packages/clients/src/api/audit_trail/v1alpha1 Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import type {
1515 ListEventsResponse ,
1616 ListProductsResponse ,
1717 Product ,
18+ ProductService ,
1819 Resource ,
1920 SecretManagerSecretInfo ,
2021 SecretManagerSecretVersionInfo ,
@@ -186,6 +187,19 @@ export const unmarshalListEventsResponse = (
186187 } as ListEventsResponse
187188}
188189
190+ const unmarshalProductService = ( data : unknown ) : ProductService => {
191+ if ( ! isJSONObject ( data ) ) {
192+ throw new TypeError (
193+ `Unmarshalling the type 'ProductService' failed as data isn't a dictionary.` ,
194+ )
195+ }
196+
197+ return {
198+ methods : data . methods ,
199+ name : data . name ,
200+ } as ProductService
201+ }
202+
189203const unmarshalProduct = ( data : unknown ) : Product => {
190204 if ( ! isJSONObject ( data ) ) {
191205 throw new TypeError (
@@ -195,6 +209,7 @@ const unmarshalProduct = (data: unknown): Product => {
195209
196210 return {
197211 name : data . name ,
212+ services : unmarshalArrayOfObject ( data . services , unmarshalProductService ) ,
198213 title : data . title ,
199214 } as Product
200215}
Original file line number Diff line number Diff line change @@ -84,6 +84,11 @@ export interface Resource {
8484 kubeAclInfo ?: KubernetesACLInfo
8585}
8686
87+ export interface ProductService {
88+ name : string
89+ methods : string [ ]
90+ }
91+
8792export interface Event {
8893 /** ID of the event. */
8994 id : string
@@ -122,6 +127,11 @@ export interface Product {
122127 title : string
123128 /** Product name. */
124129 name : string
130+ /**
131+ * Specifies the API versions of the products integrated with Audit Trail.
132+ * Each version defines the methods logged by Audit Trail.
133+ */
134+ services : ProductService [ ]
125135}
126136
127137export type ListEventsRequest = {
You can’t perform that action at this time.
0 commit comments