Skip to content

Commit

Permalink
update client/openapi/trustd.yaml (#221)
Browse files Browse the repository at this point in the history
Signed-off-by: GitHub <[email protected]>
Co-authored-by: github-merge-queue[bot] <github-merge-queue[bot]@users.noreply.github.com>
  • Loading branch information
carlosthe19916 and github-merge-queue[bot] authored Nov 7, 2024
1 parent 513e937 commit bb3b982
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 0 deletions.
91 changes: 91 additions & 0 deletions client/openapi/trustd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,97 @@ paths:
format: binary
'404':
description: The document could not be found
/api/v1/userPreference/{key}:
get:
tags:
- userPreferences
summary: Get user preferences
operationId: getUserPreferences
parameters:
- name: key
in: path
description: The key to the user preferences
required: true
schema:
type: string
responses:
'200':
description: User preference stored under this key
headers:
etag:
schema:
type: string
description: Revision ID
content:
application/json:
schema: {}
'404':
description: Unknown user preference key
put:
tags:
- userPreferences
summary: Set user preferences
operationId: setUserPreferences
parameters:
- name: key
in: path
description: The key to the user preferences
required: true
schema:
type: string
- name: if-match
in: header
description: The revision to update
required: false
schema:
type:
- string
- 'null'
requestBody:
content:
application/json:
schema: {}
required: true
responses:
'200':
description: User preference stored under this key
headers:
etag:
schema:
type: string
description: Revision ID
'412':
description: The provided If-Match revision did not match the actual revision
delete:
tags:
- userPreferences
summary: Delete user preferences
operationId: deleteUserPreferences
parameters:
- name: key
in: path
description: The key to the user preferences
required: true
schema:
type: string
- name: if-match
in: header
description: The revision to delete
required: false
schema:
type:
- string
- 'null'
requestBody:
content:
application/json:
schema: {}
required: true
responses:
'201':
description: User preferences are deleted
'412':
description: The provided If-Match revision did not match the actual revision
/api/v1/vulnerability:
get:
tags:
Expand Down
57 changes: 57 additions & 0 deletions client/src/app/client/services.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,15 @@ import type {
DownloadSbomData,
DownloadSbomError,
DownloadSbomResponse,
GetUserPreferencesData,
GetUserPreferencesError,
GetUserPreferencesResponse,
SetUserPreferencesData,
SetUserPreferencesError,
SetUserPreferencesResponse,
DeleteUserPreferencesData,
DeleteUserPreferencesError,
DeleteUserPreferencesResponse,
ListVulnerabilitiesData,
ListVulnerabilitiesError,
ListVulnerabilitiesResponse,
Expand Down Expand Up @@ -1073,6 +1082,54 @@ export const downloadSbom = <ThrowOnError extends boolean = false>(
});
};

/**
* Get user preferences
*/
export const getUserPreferences = <ThrowOnError extends boolean = false>(
options: Options<GetUserPreferencesData, ThrowOnError>
) => {
return (options?.client ?? client).get<
GetUserPreferencesResponse,
GetUserPreferencesError,
ThrowOnError
>({
...options,
url: "/api/v1/userPreference/{key}",
});
};

/**
* Set user preferences
*/
export const setUserPreferences = <ThrowOnError extends boolean = false>(
options: Options<SetUserPreferencesData, ThrowOnError>
) => {
return (options?.client ?? client).put<
SetUserPreferencesResponse,
SetUserPreferencesError,
ThrowOnError
>({
...options,
url: "/api/v1/userPreference/{key}",
});
};

/**
* Delete user preferences
*/
export const deleteUserPreferences = <ThrowOnError extends boolean = false>(
options: Options<DeleteUserPreferencesData, ThrowOnError>
) => {
return (options?.client ?? client).delete<
DeleteUserPreferencesResponse,
DeleteUserPreferencesError,
ThrowOnError
>({
...options,
url: "/api/v1/userPreference/{key}",
});
};

/**
* List vulnerabilities
*/
Expand Down
53 changes: 53 additions & 0 deletions client/src/app/client/types.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1906,6 +1906,59 @@ export type DownloadSbomResponse = Blob | File;

export type DownloadSbomError = unknown;

export type GetUserPreferencesData = {
path: {
/**
* The key to the user preferences
*/
key: string;
};
};

export type GetUserPreferencesResponse = unknown;

export type GetUserPreferencesError = unknown;

export type SetUserPreferencesData = {
body: unknown;
headers?: {
/**
* The revision to update
*/
"if-match"?: string | null;
};
path: {
/**
* The key to the user preferences
*/
key: string;
};
};

export type SetUserPreferencesResponse = string;

export type SetUserPreferencesError = unknown;

export type DeleteUserPreferencesData = {
body: unknown;
headers?: {
/**
* The revision to delete
*/
"if-match"?: string | null;
};
path: {
/**
* The key to the user preferences
*/
key: string;
};
};

export type DeleteUserPreferencesResponse = unknown;

export type DeleteUserPreferencesError = unknown;

export type ListVulnerabilitiesData = {
query?: {
/**
Expand Down

0 comments on commit bb3b982

Please sign in to comment.