@kyverno/backstage-plugin-policy-reporter-common 2.4.0 → 2.6.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @kyverno/backstage-plugin-policy-reporter-common
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 32f327e: Add cluster-scoped source, kind, category and policy filters.
8
+ - 32f327e: Add support for fetching cluster-scoped policy results.
9
+ - 32f327e: Backstage verion bump to v1.55.3
10
+
11
+ ## 2.5.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 256fb9a: Added source filtering to the PolicyReportsPage. Users can now filter the list of policy reports by selecting one or more sources from the selected cluster.
16
+ - 2f4ac45: Added policy filtering to the PolicyReportsPage. Users can now filter the list of policy reports by selecting one or more policies from the selected cluster.
17
+ - d598ade: Added category filtering to the PolicyReportsPage. Users can now filter the list of policy reports by selecting one or more categories from the selected cluster.
18
+ - a664d0c: Added kind filtering to the PolicyReportsPage. Users can now filter the list of policy reports by selecting one or more kinds from the selected cluster.
19
+ - 880eecc: Backstage version bump to v1.51.1
20
+ - 44c5238: Backstage version bump to v1.52.0
21
+
3
22
  ## 2.4.0
4
23
 
5
24
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -102,6 +102,82 @@ type TypedResponse<T> = Omit<Response, 'json'> & {
102
102
  interface RequestOptions {
103
103
  token?: string;
104
104
  }
105
+ /**
106
+ * @public
107
+ */
108
+ type GetCategories = {
109
+ query: {
110
+ environment: string;
111
+ sources?: Array<string>;
112
+ namespaces?: Array<string>;
113
+ };
114
+ };
115
+ /**
116
+ * @public
117
+ */
118
+ type GetClusterCategories = {
119
+ query: {
120
+ environment: string;
121
+ sources?: Array<string>;
122
+ };
123
+ };
124
+ /**
125
+ * @public
126
+ */
127
+ type GetClusterKinds = {
128
+ query: {
129
+ environment: string;
130
+ sources?: Array<string>;
131
+ namespaces?: Array<string>;
132
+ };
133
+ };
134
+ /**
135
+ * @public
136
+ */
137
+ type GetClusterPolicies = {
138
+ query: {
139
+ environment: string;
140
+ sources?: Array<string>;
141
+ categories?: Array<string>;
142
+ };
143
+ };
144
+ /**
145
+ * @public
146
+ */
147
+ type GetClusterResults = {
148
+ query: {
149
+ environment: string;
150
+ sources?: Array<string>;
151
+ kinds?: Array<string>;
152
+ categories?: Array<string>;
153
+ policies?: Array<string>;
154
+ status?: Array<Status>;
155
+ severities?: Array<Severity>;
156
+ search?: string;
157
+ labels?: Array<string>;
158
+ page?: number;
159
+ offset?: number;
160
+ direction?: Direction;
161
+ };
162
+ };
163
+ /**
164
+ * @public
165
+ */
166
+ type GetClusterSources = {
167
+ query: {
168
+ environment: string;
169
+ };
170
+ };
171
+ /**
172
+ * @public
173
+ */
174
+ type GetKinds = {
175
+ query: {
176
+ environment: string;
177
+ sources?: Array<string>;
178
+ namespaces?: Array<string>;
179
+ };
180
+ };
105
181
  /**
106
182
  * @public
107
183
  */
@@ -134,6 +210,25 @@ type GetNamespaces = {
134
210
  policies?: Array<string>;
135
211
  };
136
212
  };
213
+ /**
214
+ * @public
215
+ */
216
+ type GetPolicies = {
217
+ query: {
218
+ environment: string;
219
+ sources?: Array<string>;
220
+ namespaces?: Array<string>;
221
+ categories?: Array<string>;
222
+ };
223
+ };
224
+ /**
225
+ * @public
226
+ */
227
+ type GetSources = {
228
+ query: {
229
+ environment: string;
230
+ };
231
+ };
137
232
  /**
138
233
  * @public
139
234
  */
@@ -148,6 +243,68 @@ declare class DefaultApiClient {
148
243
  fetch: typeof fetch;
149
244
  };
150
245
  });
246
+ /**
247
+ * List of all Categories with namespace scoped results
248
+ * Get categories
249
+ * @param environment - The environment entity reference (URL encoded)
250
+ * @param sources - Filter by a list of sources
251
+ * @param namespaces - Filter by a list of namespaces
252
+ */
253
+ getCategories(request: GetCategories, options?: RequestOptions): Promise<TypedResponse<Array<string>>>;
254
+ /**
255
+ * List of all Categories with cluster scoped results
256
+ * Get cluster categories
257
+ * @param environment - The environment entity reference (URL encoded)
258
+ * @param sources - Filter by a list of sources
259
+ */
260
+ getClusterCategories(request: GetClusterCategories, options?: RequestOptions): Promise<TypedResponse<Array<string>>>;
261
+ /**
262
+ * List of all Kubernetes resource kinds with cluster scoped results
263
+ * Get cluster kinds
264
+ * @param environment - The environment entity reference (URL encoded)
265
+ * @param sources - Filter by a list of sources
266
+ * @param namespaces - Filter by a list of namespaces
267
+ */
268
+ getClusterKinds(request: GetClusterKinds, options?: RequestOptions): Promise<TypedResponse<Array<string>>>;
269
+ /**
270
+ * List of all Policies with cluster scoped results
271
+ * Get cluster policies
272
+ * @param environment - The environment entity reference (URL encoded)
273
+ * @param sources - Filter by a list of sources
274
+ * @param categories - Filter by a list of categories
275
+ */
276
+ getClusterPolicies(request: GetClusterPolicies, options?: RequestOptions): Promise<TypedResponse<Array<string>>>;
277
+ /**
278
+ * Retrieves policy results for a specific environment with optional filtering and pagination
279
+ * Get cluster policy results
280
+ * @param environment - The environment entity reference (URL encoded)
281
+ * @param sources - Filter by a list of sources
282
+ * @param kinds - Filter by a list of Kubernetes resource kinds
283
+ * @param categories - Filter by a list of categories
284
+ * @param policies - Filter by a list of policies
285
+ * @param status - Filter by policy result status
286
+ * @param severities - Filter by severity levels
287
+ * @param search - Search string to filter results
288
+ * @param labels - Filter by label-value pairs
289
+ * @param page - Requested list page number
290
+ * @param offset - Number of results per page
291
+ * @param direction - Sort direction for results
292
+ */
293
+ getClusterResults(request: GetClusterResults, options?: RequestOptions): Promise<TypedResponse<ResultList>>;
294
+ /**
295
+ * List of all Sources with cluster scoped results
296
+ * Get cluster sources
297
+ * @param environment - The environment entity reference (URL encoded)
298
+ */
299
+ getClusterSources(request: GetClusterSources, options?: RequestOptions): Promise<TypedResponse<Array<string>>>;
300
+ /**
301
+ * List of all Kubernetes resource kinds with namespace scoped results
302
+ * Get kinds
303
+ * @param environment - The environment entity reference (URL encoded)
304
+ * @param sources - Filter by a list of sources
305
+ * @param namespaces - Filter by a list of namespaces
306
+ */
307
+ getKinds(request: GetKinds, options?: RequestOptions): Promise<TypedResponse<Array<string>>>;
151
308
  /**
152
309
  * Retrieves policy results for a specific environment with optional filtering and pagination
153
310
  * Get namespaced policy results
@@ -176,6 +333,21 @@ declare class DefaultApiClient {
176
333
  * @param policies - Filter by a list of policies
177
334
  */
178
335
  getNamespaces(request: GetNamespaces, options?: RequestOptions): Promise<TypedResponse<Array<string>>>;
336
+ /**
337
+ * List of all Policies with namespace scoped results
338
+ * Get policies with namespaced policy results
339
+ * @param environment - The environment entity reference (URL encoded)
340
+ * @param sources - Filter by a list of sources
341
+ * @param namespaces - Filter by a list of namespaces
342
+ * @param categories - Filter by a list of categories
343
+ */
344
+ getPolicies(request: GetPolicies, options?: RequestOptions): Promise<TypedResponse<Array<string>>>;
345
+ /**
346
+ * List of all Sources with namespace scoped results
347
+ * Get sources
348
+ * @param environment - The environment entity reference (URL encoded)
349
+ */
350
+ getSources(request: GetSources, options?: RequestOptions): Promise<TypedResponse<Array<string>>>;
179
351
  }
180
352
 
181
353
  /**
@@ -255,4 +427,4 @@ interface RequestError {
255
427
  error: string;
256
428
  }
257
429
 
258
- export { DefaultApiClient, type Direction, type Environment, type Filter, type GetNamespacedResults, type GetNamespaces, KUBERNETES_NAMESPACE_ANNOTATION, KYVERNO_ENDPOINT_ANNOTATION, KYVERNO_KIND_ANNOTATION, KYVERNO_NAMESPACE_ANNOTATION, KYVERNO_RESOURCE_NAME_ANNOTATION, type ListResult, type Pagination, type RequestError, type RequestOptions, type ResultList, type Severity, type Status, type TypedResponse };
430
+ export { DefaultApiClient, type Direction, type Environment, type Filter, type GetCategories, type GetClusterCategories, type GetClusterKinds, type GetClusterPolicies, type GetClusterResults, type GetClusterSources, type GetKinds, type GetNamespacedResults, type GetNamespaces, type GetPolicies, type GetSources, KUBERNETES_NAMESPACE_ANNOTATION, KYVERNO_ENDPOINT_ANNOTATION, KYVERNO_KIND_ANNOTATION, KYVERNO_NAMESPACE_ANNOTATION, KYVERNO_RESOURCE_NAME_ANNOTATION, type ListResult, type Pagination, type RequestError, type RequestOptions, type ResultList, type Severity, type Status, type TypedResponse };
@@ -34,6 +34,159 @@ class DefaultApiClient {
34
34
  this.discoveryApi = options.discoveryApi;
35
35
  this.fetchApi = options.fetchApi || { fetch: crossFetch__default.default };
36
36
  }
37
+ /**
38
+ * List of all Categories with namespace scoped results
39
+ * Get categories
40
+ * @param environment - The environment entity reference (URL encoded)
41
+ * @param sources - Filter by a list of sources
42
+ * @param namespaces - Filter by a list of namespaces
43
+ */
44
+ async getCategories(request, options) {
45
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId.pluginId);
46
+ const uriTemplate = `/v1/namespaced-resources/categories{?environment,sources*,namespaces*}`;
47
+ const uri = parser__namespace.parse(uriTemplate).expand({
48
+ ...request.query
49
+ });
50
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
51
+ headers: {
52
+ "Content-Type": "application/json",
53
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
54
+ },
55
+ method: "GET"
56
+ });
57
+ }
58
+ /**
59
+ * List of all Categories with cluster scoped results
60
+ * Get cluster categories
61
+ * @param environment - The environment entity reference (URL encoded)
62
+ * @param sources - Filter by a list of sources
63
+ */
64
+ async getClusterCategories(request, options) {
65
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId.pluginId);
66
+ const uriTemplate = `/v1/cluster-resources/categories{?environment,sources*}`;
67
+ const uri = parser__namespace.parse(uriTemplate).expand({
68
+ ...request.query
69
+ });
70
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
71
+ headers: {
72
+ "Content-Type": "application/json",
73
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
74
+ },
75
+ method: "GET"
76
+ });
77
+ }
78
+ /**
79
+ * List of all Kubernetes resource kinds with cluster scoped results
80
+ * Get cluster kinds
81
+ * @param environment - The environment entity reference (URL encoded)
82
+ * @param sources - Filter by a list of sources
83
+ * @param namespaces - Filter by a list of namespaces
84
+ */
85
+ async getClusterKinds(request, options) {
86
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId.pluginId);
87
+ const uriTemplate = `/v1/cluster-resources/kinds{?environment,sources*,namespaces*}`;
88
+ const uri = parser__namespace.parse(uriTemplate).expand({
89
+ ...request.query
90
+ });
91
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
92
+ headers: {
93
+ "Content-Type": "application/json",
94
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
95
+ },
96
+ method: "GET"
97
+ });
98
+ }
99
+ /**
100
+ * List of all Policies with cluster scoped results
101
+ * Get cluster policies
102
+ * @param environment - The environment entity reference (URL encoded)
103
+ * @param sources - Filter by a list of sources
104
+ * @param categories - Filter by a list of categories
105
+ */
106
+ async getClusterPolicies(request, options) {
107
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId.pluginId);
108
+ const uriTemplate = `/v1/cluster-resources/policies{?environment,sources*,categories*}`;
109
+ const uri = parser__namespace.parse(uriTemplate).expand({
110
+ ...request.query
111
+ });
112
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
113
+ headers: {
114
+ "Content-Type": "application/json",
115
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
116
+ },
117
+ method: "GET"
118
+ });
119
+ }
120
+ /**
121
+ * Retrieves policy results for a specific environment with optional filtering and pagination
122
+ * Get cluster policy results
123
+ * @param environment - The environment entity reference (URL encoded)
124
+ * @param sources - Filter by a list of sources
125
+ * @param kinds - Filter by a list of Kubernetes resource kinds
126
+ * @param categories - Filter by a list of categories
127
+ * @param policies - Filter by a list of policies
128
+ * @param status - Filter by policy result status
129
+ * @param severities - Filter by severity levels
130
+ * @param search - Search string to filter results
131
+ * @param labels - Filter by label-value pairs
132
+ * @param page - Requested list page number
133
+ * @param offset - Number of results per page
134
+ * @param direction - Sort direction for results
135
+ */
136
+ async getClusterResults(request, options) {
137
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId.pluginId);
138
+ const uriTemplate = `/v1/cluster-resources/results{?environment,sources*,kinds*,categories*,policies*,status*,severities*,search,labels*,page,offset,direction}`;
139
+ const uri = parser__namespace.parse(uriTemplate).expand({
140
+ ...request.query
141
+ });
142
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
143
+ headers: {
144
+ "Content-Type": "application/json",
145
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
146
+ },
147
+ method: "GET"
148
+ });
149
+ }
150
+ /**
151
+ * List of all Sources with cluster scoped results
152
+ * Get cluster sources
153
+ * @param environment - The environment entity reference (URL encoded)
154
+ */
155
+ async getClusterSources(request, options) {
156
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId.pluginId);
157
+ const uriTemplate = `/v1/cluster-resources/sources{?environment}`;
158
+ const uri = parser__namespace.parse(uriTemplate).expand({
159
+ ...request.query
160
+ });
161
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
162
+ headers: {
163
+ "Content-Type": "application/json",
164
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
165
+ },
166
+ method: "GET"
167
+ });
168
+ }
169
+ /**
170
+ * List of all Kubernetes resource kinds with namespace scoped results
171
+ * Get kinds
172
+ * @param environment - The environment entity reference (URL encoded)
173
+ * @param sources - Filter by a list of sources
174
+ * @param namespaces - Filter by a list of namespaces
175
+ */
176
+ async getKinds(request, options) {
177
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId.pluginId);
178
+ const uriTemplate = `/v1/namespaced-resources/kinds{?environment,sources*,namespaces*}`;
179
+ const uri = parser__namespace.parse(uriTemplate).expand({
180
+ ...request.query
181
+ });
182
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
183
+ headers: {
184
+ "Content-Type": "application/json",
185
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
186
+ },
187
+ method: "GET"
188
+ });
189
+ }
37
190
  /**
38
191
  * Retrieves policy results for a specific environment with optional filtering and pagination
39
192
  * Get namespaced policy results
@@ -88,6 +241,47 @@ class DefaultApiClient {
88
241
  method: "GET"
89
242
  });
90
243
  }
244
+ /**
245
+ * List of all Policies with namespace scoped results
246
+ * Get policies with namespaced policy results
247
+ * @param environment - The environment entity reference (URL encoded)
248
+ * @param sources - Filter by a list of sources
249
+ * @param namespaces - Filter by a list of namespaces
250
+ * @param categories - Filter by a list of categories
251
+ */
252
+ async getPolicies(request, options) {
253
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId.pluginId);
254
+ const uriTemplate = `/v1/namespaced-resources/policies{?environment,sources*,namespaces*,categories*}`;
255
+ const uri = parser__namespace.parse(uriTemplate).expand({
256
+ ...request.query
257
+ });
258
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
259
+ headers: {
260
+ "Content-Type": "application/json",
261
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
262
+ },
263
+ method: "GET"
264
+ });
265
+ }
266
+ /**
267
+ * List of all Sources with namespace scoped results
268
+ * Get sources
269
+ * @param environment - The environment entity reference (URL encoded)
270
+ */
271
+ async getSources(request, options) {
272
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId.pluginId);
273
+ const uriTemplate = `/v1/namespaced-resources/sources{?environment}`;
274
+ const uri = parser__namespace.parse(uriTemplate).expand({
275
+ ...request.query
276
+ });
277
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
278
+ headers: {
279
+ "Content-Type": "application/json",
280
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
281
+ },
282
+ method: "GET"
283
+ });
284
+ }
91
285
  }
92
286
 
93
287
  exports.DefaultApiClient = DefaultApiClient;
@@ -1 +1 @@
1
- {"version":3,"file":"Api.client.cjs.js","sources":["../../../../../src/schema/openapi/generated/apis/Api.client.ts"],"sourcesContent":["//\n\n// ******************************************************************\n// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. *\n// ******************************************************************\nimport { DiscoveryApi } from '../types/discovery';\nimport { FetchApi } from '../types/fetch';\nimport crossFetch from 'cross-fetch';\nimport { pluginId } from '../pluginId';\nimport * as parser from 'uri-template';\nimport { Direction } from '../models/Direction.model';\nimport { ResultList } from '../models/ResultList.model';\nimport { Severity } from '../models/Severity.model';\nimport { Status } from '../models/Status.model';\n\n/**\n * Wraps the Response type to convey a type on the json call.\n *\n * @public\n */\nexport type TypedResponse<T> = Omit<Response, 'json'> & {\n json: () => Promise<T>;\n};\n\n/**\n * Options you can pass into a request for additional information.\n *\n * @public\n */\nexport interface RequestOptions {\n token?: string;\n}\n/**\n * @public\n */\nexport type GetNamespacedResults = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n kinds?: Array<string>;\n resources?: Array<string>;\n categories?: Array<string>;\n policies?: Array<string>;\n status?: Array<Status>;\n severities?: Array<Severity>;\n search?: string;\n labels?: Array<string>;\n page?: number;\n offset?: number;\n direction?: Direction;\n };\n};\n/**\n * @public\n */\nexport type GetNamespaces = {\n query: {\n environment: string;\n sources?: Array<string>;\n categories?: Array<string>;\n policies?: Array<string>;\n };\n};\n\n/**\n * @public\n */\nexport class DefaultApiClient {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n constructor(options: {\n discoveryApi: { getBaseUrl(pluginId: string): Promise<string> };\n fetchApi?: { fetch: typeof fetch };\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi || { fetch: crossFetch };\n }\n\n /**\n * Retrieves policy results for a specific environment with optional filtering and pagination\n * Get namespaced policy results\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n * @param kinds - Filter by a list of Kubernetes resource kinds\n * @param resources - Filter by a list of resources\n * @param categories - Filter by a list of categories\n * @param policies - Filter by a list of policies\n * @param status - Filter by policy result status\n * @param severities - Filter by severity levels\n * @param search - Search string to filter results\n * @param labels - Filter by label-value pairs\n * @param page - Requested list page number\n * @param offset - Number of results per page\n * @param direction - Sort direction for results\n */\n public async getNamespacedResults(\n // @ts-ignore\n request: GetNamespacedResults,\n options?: RequestOptions,\n ): Promise<TypedResponse<ResultList>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/namespaced-resources/results{?environment,sources*,namespaces*,kinds*,resources*,categories*,policies*,status*,severities*,search,labels*,page,offset,direction}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * Retrieves a list of namespaces from the policies\n * Get namespaces\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param categories - Filter by a list of categories\n * @param policies - Filter by a list of policies\n */\n public async getNamespaces(\n // @ts-ignore\n request: GetNamespaces,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaces{?environment,sources*,categories*,policies*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n}\n"],"names":["crossFetch","pluginId","parser"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoEO,MAAM,gBAAA,CAAiB;AAAA,EACX,YAAA;AAAA,EACA,QAAA;AAAA,EAEjB,YAAY,OAAA,EAGT;AACD,IAAA,IAAA,CAAK,eAAe,OAAA,CAAQ,YAAA;AAC5B,IAAA,IAAA,CAAK,QAAA,GAAW,OAAA,CAAQ,QAAA,IAAY,EAAE,OAAOA,2BAAA,EAAW;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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AAA,EAAU,OAAA,EAAS,KAAK,CAAA,CAAA;AAAG,OACpE;AAAA,MACA,MAAA,EAAQ;AAAA,KACT,CAAA;AAAA,EACH;AACF;;;;"}
1
+ {"version":3,"file":"Api.client.cjs.js","sources":["../../../../../src/schema/openapi/generated/apis/Api.client.ts"],"sourcesContent":["//\n\n// ******************************************************************\n// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. *\n// ******************************************************************\n\nimport { DiscoveryApi } from '../types/discovery';\nimport { FetchApi } from '../types/fetch';\nimport crossFetch from 'cross-fetch';\nimport { pluginId } from '../pluginId';\nimport * as parser from 'uri-template';\nimport { Direction } from '../models/Direction.model';\nimport { ResultList } from '../models/ResultList.model';\nimport { Severity } from '../models/Severity.model';\nimport { Status } from '../models/Status.model';\n\n/**\n * Wraps the Response type to convey a type on the json call.\n *\n * @public\n */\nexport type TypedResponse<T> = Omit<Response, 'json'> & {\n json: () => Promise<T>;\n};\n\n/**\n * Options you can pass into a request for additional information.\n *\n * @public\n */\nexport interface RequestOptions {\n token?: string;\n}\n/**\n * @public\n */\nexport type GetCategories = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetClusterCategories = {\n query: {\n environment: string;\n sources?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetClusterKinds = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetClusterPolicies = {\n query: {\n environment: string;\n sources?: Array<string>;\n categories?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetClusterResults = {\n query: {\n environment: string;\n sources?: Array<string>;\n kinds?: Array<string>;\n categories?: Array<string>;\n policies?: Array<string>;\n status?: Array<Status>;\n severities?: Array<Severity>;\n search?: string;\n labels?: Array<string>;\n page?: number;\n offset?: number;\n direction?: Direction;\n };\n};\n/**\n * @public\n */\nexport type GetClusterSources = {\n query: {\n environment: string;\n };\n};\n/**\n * @public\n */\nexport type GetKinds = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetNamespacedResults = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n kinds?: Array<string>;\n resources?: Array<string>;\n categories?: Array<string>;\n policies?: Array<string>;\n status?: Array<Status>;\n severities?: Array<Severity>;\n search?: string;\n labels?: Array<string>;\n page?: number;\n offset?: number;\n direction?: Direction;\n };\n};\n/**\n * @public\n */\nexport type GetNamespaces = {\n query: {\n environment: string;\n sources?: Array<string>;\n categories?: Array<string>;\n policies?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetPolicies = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n categories?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetSources = {\n query: {\n environment: string;\n };\n};\n\n/**\n * @public\n */\nexport class DefaultApiClient {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n constructor(options: {\n discoveryApi: { getBaseUrl(pluginId: string): Promise<string> };\n fetchApi?: { fetch: typeof fetch };\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi || { fetch: crossFetch };\n }\n\n /**\n * List of all Categories with namespace scoped results\n * Get categories\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n */\n public async getCategories(\n // @ts-ignore\n request: GetCategories,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaced-resources/categories{?environment,sources*,namespaces*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Categories with cluster scoped results\n * Get cluster categories\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n */\n public async getClusterCategories(\n // @ts-ignore\n request: GetClusterCategories,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/cluster-resources/categories{?environment,sources*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Kubernetes resource kinds with cluster scoped results\n * Get cluster kinds\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n */\n public async getClusterKinds(\n // @ts-ignore\n request: GetClusterKinds,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/cluster-resources/kinds{?environment,sources*,namespaces*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Policies with cluster scoped results\n * Get cluster policies\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param categories - Filter by a list of categories\n */\n public async getClusterPolicies(\n // @ts-ignore\n request: GetClusterPolicies,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/cluster-resources/policies{?environment,sources*,categories*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * Retrieves policy results for a specific environment with optional filtering and pagination\n * Get cluster policy results\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param kinds - Filter by a list of Kubernetes resource kinds\n * @param categories - Filter by a list of categories\n * @param policies - Filter by a list of policies\n * @param status - Filter by policy result status\n * @param severities - Filter by severity levels\n * @param search - Search string to filter results\n * @param labels - Filter by label-value pairs\n * @param page - Requested list page number\n * @param offset - Number of results per page\n * @param direction - Sort direction for results\n */\n public async getClusterResults(\n // @ts-ignore\n request: GetClusterResults,\n options?: RequestOptions,\n ): Promise<TypedResponse<ResultList>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/cluster-resources/results{?environment,sources*,kinds*,categories*,policies*,status*,severities*,search,labels*,page,offset,direction}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Sources with cluster scoped results\n * Get cluster sources\n * @param environment - The environment entity reference (URL encoded)\n */\n public async getClusterSources(\n // @ts-ignore\n request: GetClusterSources,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/cluster-resources/sources{?environment}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Kubernetes resource kinds with namespace scoped results\n * Get kinds\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n */\n public async getKinds(\n // @ts-ignore\n request: GetKinds,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaced-resources/kinds{?environment,sources*,namespaces*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * Retrieves policy results for a specific environment with optional filtering and pagination\n * Get namespaced policy results\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n * @param kinds - Filter by a list of Kubernetes resource kinds\n * @param resources - Filter by a list of resources\n * @param categories - Filter by a list of categories\n * @param policies - Filter by a list of policies\n * @param status - Filter by policy result status\n * @param severities - Filter by severity levels\n * @param search - Search string to filter results\n * @param labels - Filter by label-value pairs\n * @param page - Requested list page number\n * @param offset - Number of results per page\n * @param direction - Sort direction for results\n */\n public async getNamespacedResults(\n // @ts-ignore\n request: GetNamespacedResults,\n options?: RequestOptions,\n ): Promise<TypedResponse<ResultList>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/namespaced-resources/results{?environment,sources*,namespaces*,kinds*,resources*,categories*,policies*,status*,severities*,search,labels*,page,offset,direction}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * Retrieves a list of namespaces from the policies\n * Get namespaces\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param categories - Filter by a list of categories\n * @param policies - Filter by a list of policies\n */\n public async getNamespaces(\n // @ts-ignore\n request: GetNamespaces,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaces{?environment,sources*,categories*,policies*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Policies with namespace scoped results\n * Get policies with namespaced policy results\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n * @param categories - Filter by a list of categories\n */\n public async getPolicies(\n // @ts-ignore\n request: GetPolicies,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaced-resources/policies{?environment,sources*,namespaces*,categories*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Sources with namespace scoped results\n * Get sources\n * @param environment - The environment entity reference (URL encoded)\n */\n public async getSources(\n // @ts-ignore\n request: GetSources,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaced-resources/sources{?environment}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}`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AAA,MAAM,WAAA,GAAc,CAAA,8CAAA,CAAA;AAEpB,IAAA,MAAM,GAAA,GAAMC,iBAAA,CAAO,KAAA,CAAM,WAAW,EAAE,MAAA,CAAO;AAAA,MAC3C,GAAG,OAAA,CAAQ;AAAA,KACZ,CAAA;AAED,IAAA,OAAO,MAAM,KAAK,QAAA,CAAS,KAAA,CAAM,GAAG,OAAO,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI;AAAA,MACnD,OAAA,EAAS;AAAA,QACP,cAAA,EAAgB,kBAAA;AAAA,QAChB,GAAI,SAAS,KAAA,IAAS,EAAE,eAAe,CAAA,OAAA,EAAU,OAAA,EAAS,KAAK,CAAA,CAAA;AAAG,OACpE;AAAA,MACA,MAAA,EAAQ;AAAA,KACT,CAAA;AAAA,EACH;AACF;;;;"}
@@ -9,6 +9,159 @@ class DefaultApiClient {
9
9
  this.discoveryApi = options.discoveryApi;
10
10
  this.fetchApi = options.fetchApi || { fetch: crossFetch };
11
11
  }
12
+ /**
13
+ * List of all Categories with namespace scoped results
14
+ * Get categories
15
+ * @param environment - The environment entity reference (URL encoded)
16
+ * @param sources - Filter by a list of sources
17
+ * @param namespaces - Filter by a list of namespaces
18
+ */
19
+ async getCategories(request, options) {
20
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
21
+ const uriTemplate = `/v1/namespaced-resources/categories{?environment,sources*,namespaces*}`;
22
+ const uri = parser.parse(uriTemplate).expand({
23
+ ...request.query
24
+ });
25
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
26
+ headers: {
27
+ "Content-Type": "application/json",
28
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
29
+ },
30
+ method: "GET"
31
+ });
32
+ }
33
+ /**
34
+ * List of all Categories with cluster scoped results
35
+ * Get cluster categories
36
+ * @param environment - The environment entity reference (URL encoded)
37
+ * @param sources - Filter by a list of sources
38
+ */
39
+ async getClusterCategories(request, options) {
40
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
41
+ const uriTemplate = `/v1/cluster-resources/categories{?environment,sources*}`;
42
+ const uri = parser.parse(uriTemplate).expand({
43
+ ...request.query
44
+ });
45
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
46
+ headers: {
47
+ "Content-Type": "application/json",
48
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
49
+ },
50
+ method: "GET"
51
+ });
52
+ }
53
+ /**
54
+ * List of all Kubernetes resource kinds with cluster scoped results
55
+ * Get cluster kinds
56
+ * @param environment - The environment entity reference (URL encoded)
57
+ * @param sources - Filter by a list of sources
58
+ * @param namespaces - Filter by a list of namespaces
59
+ */
60
+ async getClusterKinds(request, options) {
61
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
62
+ const uriTemplate = `/v1/cluster-resources/kinds{?environment,sources*,namespaces*}`;
63
+ const uri = parser.parse(uriTemplate).expand({
64
+ ...request.query
65
+ });
66
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
67
+ headers: {
68
+ "Content-Type": "application/json",
69
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
70
+ },
71
+ method: "GET"
72
+ });
73
+ }
74
+ /**
75
+ * List of all Policies with cluster scoped results
76
+ * Get cluster policies
77
+ * @param environment - The environment entity reference (URL encoded)
78
+ * @param sources - Filter by a list of sources
79
+ * @param categories - Filter by a list of categories
80
+ */
81
+ async getClusterPolicies(request, options) {
82
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
83
+ const uriTemplate = `/v1/cluster-resources/policies{?environment,sources*,categories*}`;
84
+ const uri = parser.parse(uriTemplate).expand({
85
+ ...request.query
86
+ });
87
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
88
+ headers: {
89
+ "Content-Type": "application/json",
90
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
91
+ },
92
+ method: "GET"
93
+ });
94
+ }
95
+ /**
96
+ * Retrieves policy results for a specific environment with optional filtering and pagination
97
+ * Get cluster policy results
98
+ * @param environment - The environment entity reference (URL encoded)
99
+ * @param sources - Filter by a list of sources
100
+ * @param kinds - Filter by a list of Kubernetes resource kinds
101
+ * @param categories - Filter by a list of categories
102
+ * @param policies - Filter by a list of policies
103
+ * @param status - Filter by policy result status
104
+ * @param severities - Filter by severity levels
105
+ * @param search - Search string to filter results
106
+ * @param labels - Filter by label-value pairs
107
+ * @param page - Requested list page number
108
+ * @param offset - Number of results per page
109
+ * @param direction - Sort direction for results
110
+ */
111
+ async getClusterResults(request, options) {
112
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
113
+ const uriTemplate = `/v1/cluster-resources/results{?environment,sources*,kinds*,categories*,policies*,status*,severities*,search,labels*,page,offset,direction}`;
114
+ const uri = parser.parse(uriTemplate).expand({
115
+ ...request.query
116
+ });
117
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
118
+ headers: {
119
+ "Content-Type": "application/json",
120
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
121
+ },
122
+ method: "GET"
123
+ });
124
+ }
125
+ /**
126
+ * List of all Sources with cluster scoped results
127
+ * Get cluster sources
128
+ * @param environment - The environment entity reference (URL encoded)
129
+ */
130
+ async getClusterSources(request, options) {
131
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
132
+ const uriTemplate = `/v1/cluster-resources/sources{?environment}`;
133
+ const uri = parser.parse(uriTemplate).expand({
134
+ ...request.query
135
+ });
136
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
137
+ headers: {
138
+ "Content-Type": "application/json",
139
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
140
+ },
141
+ method: "GET"
142
+ });
143
+ }
144
+ /**
145
+ * List of all Kubernetes resource kinds with namespace scoped results
146
+ * Get kinds
147
+ * @param environment - The environment entity reference (URL encoded)
148
+ * @param sources - Filter by a list of sources
149
+ * @param namespaces - Filter by a list of namespaces
150
+ */
151
+ async getKinds(request, options) {
152
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
153
+ const uriTemplate = `/v1/namespaced-resources/kinds{?environment,sources*,namespaces*}`;
154
+ const uri = parser.parse(uriTemplate).expand({
155
+ ...request.query
156
+ });
157
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
158
+ headers: {
159
+ "Content-Type": "application/json",
160
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
161
+ },
162
+ method: "GET"
163
+ });
164
+ }
12
165
  /**
13
166
  * Retrieves policy results for a specific environment with optional filtering and pagination
14
167
  * Get namespaced policy results
@@ -63,6 +216,47 @@ class DefaultApiClient {
63
216
  method: "GET"
64
217
  });
65
218
  }
219
+ /**
220
+ * List of all Policies with namespace scoped results
221
+ * Get policies with namespaced policy results
222
+ * @param environment - The environment entity reference (URL encoded)
223
+ * @param sources - Filter by a list of sources
224
+ * @param namespaces - Filter by a list of namespaces
225
+ * @param categories - Filter by a list of categories
226
+ */
227
+ async getPolicies(request, options) {
228
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
229
+ const uriTemplate = `/v1/namespaced-resources/policies{?environment,sources*,namespaces*,categories*}`;
230
+ const uri = parser.parse(uriTemplate).expand({
231
+ ...request.query
232
+ });
233
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
234
+ headers: {
235
+ "Content-Type": "application/json",
236
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
237
+ },
238
+ method: "GET"
239
+ });
240
+ }
241
+ /**
242
+ * List of all Sources with namespace scoped results
243
+ * Get sources
244
+ * @param environment - The environment entity reference (URL encoded)
245
+ */
246
+ async getSources(request, options) {
247
+ const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);
248
+ const uriTemplate = `/v1/namespaced-resources/sources{?environment}`;
249
+ const uri = parser.parse(uriTemplate).expand({
250
+ ...request.query
251
+ });
252
+ return await this.fetchApi.fetch(`${baseUrl}${uri}`, {
253
+ headers: {
254
+ "Content-Type": "application/json",
255
+ ...options?.token && { Authorization: `Bearer ${options?.token}` }
256
+ },
257
+ method: "GET"
258
+ });
259
+ }
66
260
  }
67
261
 
68
262
  export { DefaultApiClient };
@@ -1 +1 @@
1
- {"version":3,"file":"Api.client.esm.js","sources":["../../../../../src/schema/openapi/generated/apis/Api.client.ts"],"sourcesContent":["//\n\n// ******************************************************************\n// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. *\n// ******************************************************************\nimport { DiscoveryApi } from '../types/discovery';\nimport { FetchApi } from '../types/fetch';\nimport crossFetch from 'cross-fetch';\nimport { pluginId } from '../pluginId';\nimport * as parser from 'uri-template';\nimport { Direction } from '../models/Direction.model';\nimport { ResultList } from '../models/ResultList.model';\nimport { Severity } from '../models/Severity.model';\nimport { Status } from '../models/Status.model';\n\n/**\n * Wraps the Response type to convey a type on the json call.\n *\n * @public\n */\nexport type TypedResponse<T> = Omit<Response, 'json'> & {\n json: () => Promise<T>;\n};\n\n/**\n * Options you can pass into a request for additional information.\n *\n * @public\n */\nexport interface RequestOptions {\n token?: string;\n}\n/**\n * @public\n */\nexport type GetNamespacedResults = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n kinds?: Array<string>;\n resources?: Array<string>;\n categories?: Array<string>;\n policies?: Array<string>;\n status?: Array<Status>;\n severities?: Array<Severity>;\n search?: string;\n labels?: Array<string>;\n page?: number;\n offset?: number;\n direction?: Direction;\n };\n};\n/**\n * @public\n */\nexport type GetNamespaces = {\n query: {\n environment: string;\n sources?: Array<string>;\n categories?: Array<string>;\n policies?: Array<string>;\n };\n};\n\n/**\n * @public\n */\nexport class DefaultApiClient {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n constructor(options: {\n discoveryApi: { getBaseUrl(pluginId: string): Promise<string> };\n fetchApi?: { fetch: typeof fetch };\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi || { fetch: crossFetch };\n }\n\n /**\n * Retrieves policy results for a specific environment with optional filtering and pagination\n * Get namespaced policy results\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n * @param kinds - Filter by a list of Kubernetes resource kinds\n * @param resources - Filter by a list of resources\n * @param categories - Filter by a list of categories\n * @param policies - Filter by a list of policies\n * @param status - Filter by policy result status\n * @param severities - Filter by severity levels\n * @param search - Search string to filter results\n * @param labels - Filter by label-value pairs\n * @param page - Requested list page number\n * @param offset - Number of results per page\n * @param direction - Sort direction for results\n */\n public async getNamespacedResults(\n // @ts-ignore\n request: GetNamespacedResults,\n options?: RequestOptions,\n ): Promise<TypedResponse<ResultList>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/namespaced-resources/results{?environment,sources*,namespaces*,kinds*,resources*,categories*,policies*,status*,severities*,search,labels*,page,offset,direction}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * Retrieves a list of namespaces from the policies\n * Get namespaces\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param categories - Filter by a list of categories\n * @param policies - Filter by a list of policies\n */\n public async getNamespaces(\n // @ts-ignore\n request: GetNamespaces,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaces{?environment,sources*,categories*,policies*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n}\n"],"names":[],"mappings":";;;;AAoEO,MAAM,gBAAA,CAAiB;AAAA,EACX,YAAA;AAAA,EACA,QAAA;AAAA,EAEjB,YAAY,OAAA,EAGT;AACD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,KACZ,CAAA;AAED,IAAA,OAAO,MAAM,KAAK,QAAA,CAAS,KAAA,CAAM,GAAG,OAAO,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI;AAAA,MACnD,OAAA,EAAS;AAAA,QACP,cAAA,EAAgB,kBAAA;AAAA,QAChB,GAAI,SAAS,KAAA,IAAS,EAAE,eAAe,CAAA,OAAA,EAAU,OAAA,EAAS,KAAK,CAAA,CAAA;AAAG,OACpE;AAAA,MACA,MAAA,EAAQ;AAAA,KACT,CAAA;AAAA,EACH;AACF;;;;"}
1
+ {"version":3,"file":"Api.client.esm.js","sources":["../../../../../src/schema/openapi/generated/apis/Api.client.ts"],"sourcesContent":["//\n\n// ******************************************************************\n// * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. *\n// ******************************************************************\n\nimport { DiscoveryApi } from '../types/discovery';\nimport { FetchApi } from '../types/fetch';\nimport crossFetch from 'cross-fetch';\nimport { pluginId } from '../pluginId';\nimport * as parser from 'uri-template';\nimport { Direction } from '../models/Direction.model';\nimport { ResultList } from '../models/ResultList.model';\nimport { Severity } from '../models/Severity.model';\nimport { Status } from '../models/Status.model';\n\n/**\n * Wraps the Response type to convey a type on the json call.\n *\n * @public\n */\nexport type TypedResponse<T> = Omit<Response, 'json'> & {\n json: () => Promise<T>;\n};\n\n/**\n * Options you can pass into a request for additional information.\n *\n * @public\n */\nexport interface RequestOptions {\n token?: string;\n}\n/**\n * @public\n */\nexport type GetCategories = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetClusterCategories = {\n query: {\n environment: string;\n sources?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetClusterKinds = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetClusterPolicies = {\n query: {\n environment: string;\n sources?: Array<string>;\n categories?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetClusterResults = {\n query: {\n environment: string;\n sources?: Array<string>;\n kinds?: Array<string>;\n categories?: Array<string>;\n policies?: Array<string>;\n status?: Array<Status>;\n severities?: Array<Severity>;\n search?: string;\n labels?: Array<string>;\n page?: number;\n offset?: number;\n direction?: Direction;\n };\n};\n/**\n * @public\n */\nexport type GetClusterSources = {\n query: {\n environment: string;\n };\n};\n/**\n * @public\n */\nexport type GetKinds = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetNamespacedResults = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n kinds?: Array<string>;\n resources?: Array<string>;\n categories?: Array<string>;\n policies?: Array<string>;\n status?: Array<Status>;\n severities?: Array<Severity>;\n search?: string;\n labels?: Array<string>;\n page?: number;\n offset?: number;\n direction?: Direction;\n };\n};\n/**\n * @public\n */\nexport type GetNamespaces = {\n query: {\n environment: string;\n sources?: Array<string>;\n categories?: Array<string>;\n policies?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetPolicies = {\n query: {\n environment: string;\n sources?: Array<string>;\n namespaces?: Array<string>;\n categories?: Array<string>;\n };\n};\n/**\n * @public\n */\nexport type GetSources = {\n query: {\n environment: string;\n };\n};\n\n/**\n * @public\n */\nexport class DefaultApiClient {\n private readonly discoveryApi: DiscoveryApi;\n private readonly fetchApi: FetchApi;\n\n constructor(options: {\n discoveryApi: { getBaseUrl(pluginId: string): Promise<string> };\n fetchApi?: { fetch: typeof fetch };\n }) {\n this.discoveryApi = options.discoveryApi;\n this.fetchApi = options.fetchApi || { fetch: crossFetch };\n }\n\n /**\n * List of all Categories with namespace scoped results\n * Get categories\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n */\n public async getCategories(\n // @ts-ignore\n request: GetCategories,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaced-resources/categories{?environment,sources*,namespaces*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Categories with cluster scoped results\n * Get cluster categories\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n */\n public async getClusterCategories(\n // @ts-ignore\n request: GetClusterCategories,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/cluster-resources/categories{?environment,sources*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Kubernetes resource kinds with cluster scoped results\n * Get cluster kinds\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n */\n public async getClusterKinds(\n // @ts-ignore\n request: GetClusterKinds,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/cluster-resources/kinds{?environment,sources*,namespaces*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Policies with cluster scoped results\n * Get cluster policies\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param categories - Filter by a list of categories\n */\n public async getClusterPolicies(\n // @ts-ignore\n request: GetClusterPolicies,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/cluster-resources/policies{?environment,sources*,categories*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * Retrieves policy results for a specific environment with optional filtering and pagination\n * Get cluster policy results\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param kinds - Filter by a list of Kubernetes resource kinds\n * @param categories - Filter by a list of categories\n * @param policies - Filter by a list of policies\n * @param status - Filter by policy result status\n * @param severities - Filter by severity levels\n * @param search - Search string to filter results\n * @param labels - Filter by label-value pairs\n * @param page - Requested list page number\n * @param offset - Number of results per page\n * @param direction - Sort direction for results\n */\n public async getClusterResults(\n // @ts-ignore\n request: GetClusterResults,\n options?: RequestOptions,\n ): Promise<TypedResponse<ResultList>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/cluster-resources/results{?environment,sources*,kinds*,categories*,policies*,status*,severities*,search,labels*,page,offset,direction}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Sources with cluster scoped results\n * Get cluster sources\n * @param environment - The environment entity reference (URL encoded)\n */\n public async getClusterSources(\n // @ts-ignore\n request: GetClusterSources,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/cluster-resources/sources{?environment}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Kubernetes resource kinds with namespace scoped results\n * Get kinds\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n */\n public async getKinds(\n // @ts-ignore\n request: GetKinds,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaced-resources/kinds{?environment,sources*,namespaces*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * Retrieves policy results for a specific environment with optional filtering and pagination\n * Get namespaced policy results\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n * @param kinds - Filter by a list of Kubernetes resource kinds\n * @param resources - Filter by a list of resources\n * @param categories - Filter by a list of categories\n * @param policies - Filter by a list of policies\n * @param status - Filter by policy result status\n * @param severities - Filter by severity levels\n * @param search - Search string to filter results\n * @param labels - Filter by label-value pairs\n * @param page - Requested list page number\n * @param offset - Number of results per page\n * @param direction - Sort direction for results\n */\n public async getNamespacedResults(\n // @ts-ignore\n request: GetNamespacedResults,\n options?: RequestOptions,\n ): Promise<TypedResponse<ResultList>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/namespaced-resources/results{?environment,sources*,namespaces*,kinds*,resources*,categories*,policies*,status*,severities*,search,labels*,page,offset,direction}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * Retrieves a list of namespaces from the policies\n * Get namespaces\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param categories - Filter by a list of categories\n * @param policies - Filter by a list of policies\n */\n public async getNamespaces(\n // @ts-ignore\n request: GetNamespaces,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaces{?environment,sources*,categories*,policies*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Policies with namespace scoped results\n * Get policies with namespaced policy results\n * @param environment - The environment entity reference (URL encoded)\n * @param sources - Filter by a list of sources\n * @param namespaces - Filter by a list of namespaces\n * @param categories - Filter by a list of categories\n */\n public async getPolicies(\n // @ts-ignore\n request: GetPolicies,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaced-resources/policies{?environment,sources*,namespaces*,categories*}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n\n /**\n * List of all Sources with namespace scoped results\n * Get sources\n * @param environment - The environment entity reference (URL encoded)\n */\n public async getSources(\n // @ts-ignore\n request: GetSources,\n options?: RequestOptions,\n ): Promise<TypedResponse<Array<string>>> {\n const baseUrl = await this.discoveryApi.getBaseUrl(pluginId);\n\n const uriTemplate = `/v1/namespaced-resources/sources{?environment}`;\n\n const uri = parser.parse(uriTemplate).expand({\n ...request.query,\n });\n\n return await this.fetchApi.fetch(`${baseUrl}${uri}`, {\n headers: {\n 'Content-Type': 'application/json',\n ...(options?.token && { Authorization: `Bearer ${options?.token}` }),\n },\n method: 'GET',\n });\n }\n}\n"],"names":[],"mappings":";;;;AAoKO,MAAM,gBAAA,CAAiB;AAAA,EACX,YAAA;AAAA,EACA,QAAA;AAAA,EAEjB,YAAY,OAAA,EAGT;AACD,IAAA,IAAA,CAAK,eAAe,OAAA,CAAQ,YAAA;AAC5B,IAAA,IAAA,CAAK,QAAA,GAAW,OAAA,CAAQ,QAAA,IAAY,EAAE,OAAO,UAAA,EAAW;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,MAAa,aAAA,CAEX,OAAA,EACA,OAAA,EACuC;AACvC,IAAA,MAAM,OAAA,GAAU,MAAM,IAAA,CAAK,YAAA,CAAa,WAAW,QAAQ,CAAA;AAE3D,IAAA,MAAM,WAAA,GAAc,CAAA,sEAAA,CAAA;AAEpB,IAAA,MAAM,GAAA,GAAM,MAAA,CAAO,KAAA,CAAM,WAAW,EAAE,MAAA,CAAO;AAAA,MAC3C,GAAG,OAAA,CAAQ;AAAA,KACZ,CAAA;AAED,IAAA,OAAO,MAAM,KAAK,QAAA,CAAS,KAAA,CAAM,GAAG,OAAO,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI;AAAA,MACnD,OAAA,EAAS;AAAA,QACP,cAAA,EAAgB,kBAAA;AAAA,QAChB,GAAI,SAAS,KAAA,IAAS,EAAE,eAAe,CAAA,OAAA,EAAU,OAAA,EAAS,KAAK,CAAA,CAAA;AAAG,OACpE;AAAA,MACA,MAAA,EAAQ;AAAA,KACT,CAAA;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,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,UAAA,CAEX,OAAA,EACA,OAAA,EACuC;AACvC,IAAA,MAAM,OAAA,GAAU,MAAM,IAAA,CAAK,YAAA,CAAa,WAAW,QAAQ,CAAA;AAE3D,IAAA,MAAM,WAAA,GAAc,CAAA,8CAAA,CAAA;AAEpB,IAAA,MAAM,GAAA,GAAM,MAAA,CAAO,KAAA,CAAM,WAAW,EAAE,MAAA,CAAO;AAAA,MAC3C,GAAG,OAAA,CAAQ;AAAA,KACZ,CAAA;AAED,IAAA,OAAO,MAAM,KAAK,QAAA,CAAS,KAAA,CAAM,GAAG,OAAO,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI;AAAA,MACnD,OAAA,EAAS;AAAA,QACP,cAAA,EAAgB,kBAAA;AAAA,QAChB,GAAI,SAAS,KAAA,IAAS,EAAE,eAAe,CAAA,OAAA,EAAU,OAAA,EAAS,KAAK,CAAA,CAAA;AAAG,OACpE;AAAA,MACA,MAAA,EAAQ;AAAA,KACT,CAAA;AAAA,EACH;AACF;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kyverno/backstage-plugin-policy-reporter-common",
3
3
  "description": "Common functionalities for the policy-reporter plugin",
4
- "version": "2.4.0",
4
+ "version": "2.6.0",
5
5
  "main": "dist/index.cjs.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "Apache-2.0",
@@ -23,7 +23,8 @@
23
23
  "access": "public",
24
24
  "main": "dist/index.cjs.js",
25
25
  "module": "dist/index.esm.js",
26
- "types": "dist/index.d.ts"
26
+ "types": "dist/index.d.ts",
27
+ "provenance": true
27
28
  },
28
29
  "repository": {
29
30
  "type": "git",
@@ -40,7 +41,7 @@
40
41
  "postpack": "backstage-cli package postpack"
41
42
  },
42
43
  "devDependencies": {
43
- "@backstage/cli": "^0.36.1"
44
+ "@backstage/cli": "^0.36.6"
44
45
  },
45
46
  "files": [
46
47
  "dist"
@@ -56,5 +57,6 @@
56
57
  ]
57
58
  }
58
59
  },
59
- "module": "dist/index.esm.js"
60
+ "module": "dist/index.esm.js",
61
+ "provenance": true
60
62
  }