@harnessio/react-ssca-manager-client 0.0.2 → 0.0.3

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 (21) hide show
  1. package/dist/ssca-manager/src/services/hooks/useProcessSbomMutation.d.ts +23 -0
  2. package/dist/ssca-manager/src/services/hooks/useProcessSbomMutation.js +14 -0
  3. package/dist/ssca-manager/src/services/index.d.ts +10 -0
  4. package/dist/ssca-manager/src/services/index.js +1 -1
  5. package/dist/ssca-manager/src/services/requestBodies/SbomProcessRequestBodyRequestBody.d.ts +2 -0
  6. package/dist/ssca-manager/src/services/requestBodies/SbomProcessRequestBodyRequestBody.js +1 -0
  7. package/dist/ssca-manager/src/services/responses/SbomProcessResponseBodyResponse.d.ts +2 -0
  8. package/dist/ssca-manager/src/services/responses/SbomProcessResponseBodyResponse.js +1 -0
  9. package/dist/ssca-manager/src/services/schemas/Artifact.d.ts +28 -0
  10. package/dist/ssca-manager/src/services/schemas/Artifact.js +4 -0
  11. package/dist/ssca-manager/src/services/schemas/Attestation.d.ts +11 -0
  12. package/dist/ssca-manager/src/services/schemas/Attestation.js +4 -0
  13. package/dist/ssca-manager/src/services/schemas/SbomMetadata.d.ts +47 -0
  14. package/dist/ssca-manager/src/services/schemas/SbomMetadata.js +4 -0
  15. package/dist/ssca-manager/src/services/schemas/SbomProcess.d.ts +22 -0
  16. package/dist/ssca-manager/src/services/schemas/SbomProcess.js +4 -0
  17. package/dist/ssca-manager/src/services/schemas/SbomProcessRequestBody.d.ts +10 -0
  18. package/dist/ssca-manager/src/services/schemas/SbomProcessRequestBody.js +1 -0
  19. package/dist/ssca-manager/src/services/schemas/SbomProcessResponseBody.d.ts +6 -0
  20. package/dist/ssca-manager/src/services/schemas/SbomProcessResponseBody.js +4 -0
  21. package/package.json +1 -1
@@ -0,0 +1,23 @@
1
+ import { UseMutationOptions } from '@tanstack/react-query';
2
+ import type { SbomProcessResponseBodyResponse } from '../responses/SbomProcessResponseBodyResponse';
3
+ import type { SbomProcessRequestBodyRequestBody } from '../requestBodies/SbomProcessRequestBodyRequestBody';
4
+ import type { ResponseWithPagination } from '../helpers';
5
+ import { FetcherOptions } from '../../../../fetcher/index.js';
6
+ export interface ProcessSbomMutationPathParams {
7
+ org: string;
8
+ project: string;
9
+ }
10
+ export interface ProcessSbomMutationHeaderParams {
11
+ 'Harness-Account'?: string;
12
+ }
13
+ export type ProcessSbomRequestBody = SbomProcessRequestBodyRequestBody;
14
+ export type ProcessSbomOkResponse = ResponseWithPagination<SbomProcessResponseBodyResponse>;
15
+ export type ProcessSbomErrorResponse = unknown;
16
+ export interface ProcessSbomProps extends ProcessSbomMutationPathParams, Omit<FetcherOptions<unknown, ProcessSbomRequestBody, ProcessSbomMutationHeaderParams>, 'url'> {
17
+ body: ProcessSbomRequestBody;
18
+ }
19
+ export declare function processSbom(props: ProcessSbomProps): Promise<ProcessSbomOkResponse>;
20
+ /**
21
+ * process & inject sbom
22
+ */
23
+ export declare function useProcessSbomMutation(options?: Omit<UseMutationOptions<ProcessSbomOkResponse, ProcessSbomErrorResponse, ProcessSbomProps>, 'mutationKey' | 'mutationFn'>): import("@tanstack/react-query").UseMutationResult<ProcessSbomOkResponse, unknown, ProcessSbomProps, unknown>;
@@ -0,0 +1,14 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ import { useMutation } from '@tanstack/react-query';
5
+ import { fetcher } from '../../../../fetcher/index.js';
6
+ export function processSbom(props) {
7
+ return fetcher(Object.assign({ url: `/v1/org/${props.org}/project/${props.project}/sbom/process`, method: 'POST' }, props));
8
+ }
9
+ /**
10
+ * process & inject sbom
11
+ */
12
+ export function useProcessSbomMutation(options) {
13
+ return useMutation((mutateProps) => processSbom(mutateProps), options);
14
+ }
@@ -1 +1,11 @@
1
1
  export type { GetPathParamsType, ResponseWithPagination } from './helpers';
2
+ export type { ProcessSbomErrorResponse, ProcessSbomMutationPathParams, ProcessSbomOkResponse, ProcessSbomProps, ProcessSbomRequestBody, } from './hooks/useProcessSbomMutation';
3
+ export { processSbom, useProcessSbomMutation } from './hooks/useProcessSbomMutation';
4
+ export type { SbomProcessRequestBodyRequestBody } from './requestBodies/SbomProcessRequestBodyRequestBody';
5
+ export type { SbomProcessResponseBodyResponse } from './responses/SbomProcessResponseBodyResponse';
6
+ export type { Artifact } from './schemas/Artifact';
7
+ export type { Attestation } from './schemas/Attestation';
8
+ export type { SbomMetadata } from './schemas/SbomMetadata';
9
+ export type { SbomProcess } from './schemas/SbomProcess';
10
+ export type { SbomProcessRequestBody } from './schemas/SbomProcessRequestBody';
11
+ export type { SbomProcessResponseBody } from './schemas/SbomProcessResponseBody';
@@ -1 +1 @@
1
- export {};
1
+ export { processSbom, useProcessSbomMutation } from './hooks/useProcessSbomMutation';
@@ -0,0 +1,2 @@
1
+ import type { SbomProcessRequestBody } from '../schemas/SbomProcessRequestBody';
2
+ export type SbomProcessRequestBodyRequestBody = SbomProcessRequestBody;
@@ -0,0 +1,2 @@
1
+ import type { SbomProcessResponseBody } from '../schemas/SbomProcessResponseBody';
2
+ export type SbomProcessResponseBodyResponse = SbomProcessResponseBody;
@@ -0,0 +1,28 @@
1
+ export interface Artifact {
2
+ /**
3
+ * id of the artifact
4
+ * @example "089855ea-f90e-4bea-a5c9-b5ddf85d3180"
5
+ */
6
+ id?: string;
7
+ /**
8
+ * name of the artifact
9
+ * @example "harness/image"
10
+ */
11
+ name: string;
12
+ /**
13
+ * url of the artifact
14
+ * @example "https://console.cloud.google.com/gcr/images/imageName"
15
+ */
16
+ registry_url: string;
17
+ /**
18
+ * tag of the artifact
19
+ * @default "latest"
20
+ * @example "latest"
21
+ */
22
+ tag?: string;
23
+ /**
24
+ * type of the artifact
25
+ * @example "repo/image"
26
+ */
27
+ type?: string;
28
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,11 @@
1
+ export interface Attestation {
2
+ /**
3
+ * is the sbom attested or not
4
+ */
5
+ is_attested?: boolean;
6
+ /**
7
+ * url of the attested file
8
+ * @example "https://storage.googleapis.com/sbom_store_public/kmpySmUISimoRrJL6NL73w/default/SSCS_CI_Plugin_Demo/CKO_SSCA_Pipeline/Build/39/q940CvjoQj-GEInJQfWiwg/sbom"
9
+ */
10
+ url?: string;
11
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,47 @@
1
+ export interface SbomMetadata {
2
+ /**
3
+ * BuildURL
4
+ * @example "https://app.harness.io/ng/#/account/acc/ci/orgs/org/projects/dummyProject/pipelines/CKO_SSCA_Pipeline/executions/q940CvjoQj-GEInJQfWiwg/pipeline?storeType=INLINE"
5
+ */
6
+ build_url?: string;
7
+ /**
8
+ * stage name where sbom is generated
9
+ * @example "spdx-json"
10
+ */
11
+ format?: string;
12
+ /**
13
+ * name of the package
14
+ * @example "z940CvjoQj-GEInJQfWiwq"
15
+ */
16
+ pipeline_execution_id?: string;
17
+ /**
18
+ * name of the package
19
+ * @example "SSCA_Pipeline"
20
+ */
21
+ pipeline_identifier?: string;
22
+ /**
23
+ * name of the package
24
+ * @example "1"
25
+ */
26
+ sequence_id?: string;
27
+ /**
28
+ * name of the Stage
29
+ * @example "Build"
30
+ */
31
+ stage_identifier?: string;
32
+ /**
33
+ * StepExecutionId
34
+ * @example "betatest1"
35
+ */
36
+ step_execution_id?: string;
37
+ /**
38
+ * id of the step
39
+ * @example "Orchestrate"
40
+ */
41
+ step_identifier?: string;
42
+ /**
43
+ * name of the package
44
+ * @example "synk"
45
+ */
46
+ tool?: string;
47
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,22 @@
1
+ export interface SbomProcess {
2
+ /**
3
+ * serialised sbom data
4
+ * @format byte
5
+ */
6
+ data?: string;
7
+ /**
8
+ * format of the SBOM
9
+ * @example "spdx-json"
10
+ */
11
+ format: string;
12
+ /**
13
+ * name of the sbom
14
+ * @example "SBOM_Name"
15
+ */
16
+ name: string;
17
+ /**
18
+ * URL of the sbom
19
+ * @example "https://console.google.com/storage"
20
+ */
21
+ url?: string;
22
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { Artifact } from '../schemas/Artifact';
2
+ import type { Attestation } from '../schemas/Attestation';
3
+ import type { SbomMetadata } from '../schemas/SbomMetadata';
4
+ import type { SbomProcess } from '../schemas/SbomProcess';
5
+ export interface SbomProcessRequestBody {
6
+ artifact?: Artifact;
7
+ attestation?: Attestation;
8
+ sbom_metadata?: SbomMetadata;
9
+ sbom_process?: SbomProcess;
10
+ }
@@ -0,0 +1,6 @@
1
+ export interface SbomProcessResponseBody {
2
+ /**
3
+ * Id of created artifact
4
+ */
5
+ artifact_id?: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ /* eslint-disable */
2
+ // This code is autogenerated using @harnessio/oats-cli.
3
+ // Please do not modify this code directly.
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harnessio/react-ssca-manager-client",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Harness SSCA manager APIs integrated with react hooks",
5
5
  "author": "Harness Inc",
6
6
  "license": "MIT",