Skip to content

Commit

Permalink
Update typescript types for taxonomy is_default (#997)
Browse files Browse the repository at this point in the history
* Autogenerate types

* Add is_default to taxonomy type
  • Loading branch information
allisonking authored Aug 17, 2022
1 parent c9fdca0 commit 203e6cf
Show file tree
Hide file tree
Showing 22 changed files with 174 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const EditTaxonomyForm = ({ entity, labels, onCancel, onEdit }: Props) => {
name: entity.name ?? "",
description: entity.description ?? "",
parent_key: entity.parent_key ?? "",
is_default: entity.is_default ?? false,
};
const [formError, setFormError] = useState<string | null>(null);

Expand Down
1 change: 1 addition & 0 deletions clients/ctl/admin-ui/src/features/taxonomy/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface TaxonomyEntity {
name?: string;
description?: string;
parent_key?: string;
is_default?: boolean;
}

export interface Labels {
Expand Down
11 changes: 11 additions & 0 deletions clients/ctl/admin-ui/src/types/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
/* tslint:disable */
/* eslint-disable */

export type { AccessToken } from './models/AccessToken';
export type { AWSConfig } from './models/AWSConfig';
export type { BigQueryConfig } from './models/BigQueryConfig';
export type { ContactDetails } from './models/ContactDetails';
export type { DatabaseConfig } from './models/DatabaseConfig';
export type { DataCategory } from './models/DataCategory';
Expand All @@ -26,11 +28,13 @@ export type { GenerateResponse } from './models/GenerateResponse';
export { GenerateTypes } from './models/GenerateTypes';
export type { HTTPValidationError } from './models/HTTPValidationError';
export { IncludeExcludeEnum } from './models/IncludeExcludeEnum';
export type { KeyfileCreds } from './models/KeyfileCreds';
export { LegalBasisEnum } from './models/LegalBasisEnum';
export { MatchesEnum } from './models/MatchesEnum';
export type { OktaConfig } from './models/OktaConfig';
export type { Organization } from './models/Organization';
export type { OrganizationMetadata } from './models/OrganizationMetadata';
export type { Page_UserResponse_ } from './models/Page_UserResponse_';
export type { Policy } from './models/Policy';
export type { PolicyRule } from './models/PolicyRule';
export type { PrivacyDeclaration } from './models/PrivacyDeclaration';
Expand All @@ -41,6 +45,13 @@ export { SpecialCategoriesEnum } from './models/SpecialCategoriesEnum';
export { StatusEnum } from './models/StatusEnum';
export type { System } from './models/System';
export type { SystemMetadata } from './models/SystemMetadata';
export type { UserCreate } from './models/UserCreate';
export type { UserCreateResponse } from './models/UserCreateResponse';
export type { UserLogin } from './models/UserLogin';
export type { UserLoginResponse } from './models/UserLoginResponse';
export type { UserPasswordReset } from './models/UserPasswordReset';
export type { UserResponse } from './models/UserResponse';
export type { UserUpdate } from './models/UserUpdate';
export type { ValidateRequest } from './models/ValidateRequest';
export type { ValidateResponse } from './models/ValidateResponse';
export type { ValidationError } from './models/ValidationError';
Expand Down
10 changes: 10 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/AccessToken.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* A wrapper for the access_code returned upon successful authentication
*/
export type AccessToken = {
access_token: string;
};
13 changes: 13 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/BigQueryConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { KeyfileCreds } from './KeyfileCreds';

/**
* The model for the connection config for BigQuery
*/
export type BigQueryConfig = {
dataset?: string;
keyfile_creds: KeyfileCreds;
};
4 changes: 4 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/DataCategory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ export type DataCategory = {
*/
description?: string;
parent_key?: string;
/**
* Denotes whether the resource is part of the default taxonomy or not.
*/
is_default?: boolean;
};
4 changes: 4 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/DataQualifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ export type DataQualifier = {
*/
description?: string;
parent_key?: string;
/**
* Denotes whether the resource is part of the default taxonomy or not.
*/
is_default?: boolean;
};
4 changes: 4 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/DataSubject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,8 @@ export type DataSubject = {
* A boolean value to annotate whether or not automated decisions/profiling exists for the data subject.
*/
automated_decisions_or_profiling?: boolean;
/**
* Denotes whether the resource is part of the default taxonomy or not.
*/
is_default?: boolean;
};
4 changes: 4 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/DataUse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ export type DataUse = {
* A url pointing to the legitimate interest impact assessment. Required if the legal bases used is legitimate interest.
*/
legitimate_interest_impact_assessment?: string;
/**
* Denotes whether the resource is part of the default taxonomy or not.
*/
is_default?: boolean;
};
3 changes: 2 additions & 1 deletion clients/ctl/admin-ui/src/types/api/models/Generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/* eslint-disable */

import type { AWSConfig } from './AWSConfig';
import type { BigQueryConfig } from './BigQueryConfig';
import type { DatabaseConfig } from './DatabaseConfig';
import type { GenerateTypes } from './GenerateTypes';
import type { OktaConfig } from './OktaConfig';
Expand All @@ -12,7 +13,7 @@ import type { ValidTargets } from './ValidTargets';
* Defines attributes for generating resources included in a request.
*/
export type Generate = {
config: (AWSConfig | OktaConfig | DatabaseConfig);
config: (AWSConfig | OktaConfig | DatabaseConfig | BigQueryConfig);
target: ValidTargets;
type: GenerateTypes;
};
19 changes: 19 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/KeyfileCreds.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* The model for BigQuery credential keyfiles.
*/
export type KeyfileCreds = {
type?: string;
project_id: string;
private_key_id?: string;
private_key?: string;
client_email?: string;
client_id?: string;
auth_uri?: string;
token_uri?: string;
auth_provider_x509_cert_url?: string;
client_x509_cert_url?: string;
};
12 changes: 12 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/Page_UserResponse_.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { UserResponse } from './UserResponse';

export type Page_UserResponse_ = {
items: Array<UserResponse>;
total: number;
page: number;
size: number;
};
13 changes: 13 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/UserCreate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Data required to create a FidesUser.
*/
export type UserCreate = {
username: string;
password: string;
first_name?: string;
last_name?: string;
};
10 changes: 10 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/UserCreateResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Response after creating a FidesUser
*/
export type UserCreateResponse = {
id: string;
};
12 changes: 12 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/UserLogin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Similar to UserCreate except we do not need the extra validation on
* username and password.
*/
export type UserLogin = {
username: string;
password: string;
};
14 changes: 14 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/UserLoginResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

import type { AccessToken } from './AccessToken';
import type { UserResponse } from './UserResponse';

/**
* Similar to UserResponse except with an access token
*/
export type UserLoginResponse = {
user_data: UserResponse;
token_data: AccessToken;
};
11 changes: 11 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/UserPasswordReset.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Contains both old and new passwords when resetting a password
*/
export type UserPasswordReset = {
old_password: string;
new_password: string;
};
14 changes: 14 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/UserResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Response after requesting a User
*/
export type UserResponse = {
id: string;
username: string;
created_at: string;
first_name?: string;
last_name?: string;
};
11 changes: 11 additions & 0 deletions clients/ctl/admin-ui/src/types/api/models/UserUpdate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */

/**
* Data required to update a FidesopsUser
*/
export type UserUpdate = {
first_name?: string;
last_name?: string;
};
1 change: 1 addition & 0 deletions clients/ctl/admin-ui/src/types/api/models/ValidTargets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export enum ValidTargets {
AWS = 'aws',
DB = 'db',
OKTA = 'okta',
BIGQUERY = 'bigquery',
}
3 changes: 2 additions & 1 deletion clients/ctl/admin-ui/src/types/api/models/ValidateRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
/* eslint-disable */

import type { AWSConfig } from './AWSConfig';
import type { BigQueryConfig } from './BigQueryConfig';
import type { OktaConfig } from './OktaConfig';
import type { ValidationTarget } from './ValidationTarget';

/**
* Validate endpoint request object
*/
export type ValidateRequest = {
config: (AWSConfig | OktaConfig);
config: (AWSConfig | BigQueryConfig | OktaConfig);
target: ValidationTarget;
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
export enum ValidationTarget {
AWS = 'aws',
OKTA = 'okta',
BIGQUERY = 'bigquery',
}

0 comments on commit 203e6cf

Please sign in to comment.