Skip to content

Commit

Permalink
Regenerate types
Browse files Browse the repository at this point in the history
  • Loading branch information
krystof-k committed Sep 5, 2023
1 parent ca1f711 commit 64d3d5a
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 0 deletions.
15 changes: 15 additions & 0 deletions data/types/candidate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,28 @@ export type ID1 = string;
* Type of a reference: either a person or an organization
*/
export type Type = "person" | "organization";
/**
* Display name of a candidate
*/
export type DisplayName = string;
/**
* Motto of a candidate
*/
export type Motto = string;
/**
* Official candidate list (usually drawn) number assigned by a public authority
*/
export type Number = number;

/**
* Candidate for a calculator
*/
export interface Candidate {
id: ID;
reference: PersonOrOrganizationReference;
displayName?: DisplayName;
motto?: Motto;
number?: Number;
[k: string]: unknown;
}
/**
Expand Down
15 changes: 15 additions & 0 deletions data/types/candidates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,28 @@ export type ID1 = string;
* Type of a reference: either a person or an organization
*/
export type Type = "person" | "organization";
/**
* Display name of a candidate
*/
export type DisplayName = string;
/**
* Motto of a candidate
*/
export type Motto = string;
/**
* Official candidate list (usually drawn) number assigned by a public authority
*/
export type Number = number;

/**
* Candidate for a calculator
*/
export interface Candidate {
id: ID;
reference: PersonOrOrganizationReference;
displayName?: DisplayName;
motto?: Motto;
number?: Number;
[k: string]: unknown;
}
/**
Expand Down
5 changes: 5 additions & 0 deletions data/types/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export type ShortName1 = string;
* Organization's abbreviation with max. 15 characters
*/
export type Abbreviation = string;
/**
* Whether the organization is a political party/movement, coalition or a candidate list
*/
export type OrganizationType = "party" | "coalition" | "candidate-list";
/**
* List of members of an organization
*
Expand Down Expand Up @@ -61,6 +65,7 @@ export interface Organization2 {
* Alternate names to use for example in search
*/
alternateNames?: string[];
type?: OrganizationType;
members?: Members;
[k: string]: unknown;
}
Expand Down
5 changes: 5 additions & 0 deletions data/types/organizations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export type ShortName1 = string;
* Organization's abbreviation with max. 15 characters
*/
export type Abbreviation = string;
/**
* Whether the organization is a political party/movement, coalition or a candidate list
*/
export type OrganizationType = "party" | "coalition" | "candidate-list";
/**
* List of members of an organization
*
Expand Down Expand Up @@ -65,6 +69,7 @@ export interface Organization2 {
* Alternate names to use for example in search
*/
alternateNames?: string[];
type?: OrganizationType;
members?: Members;
[k: string]: unknown;
}
Expand Down
11 changes: 11 additions & 0 deletions data/types/question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ export type Statement = string;
* A detailed description or an explanation of a question
*/
export type Detail = string;
/**
* Ordered list of tags
*
* @minItems 1
*/
export type Tags = [Tag, ...Tag[]];
/**
* Tag with max. 25 characters
*/
export type Tag = string;

/**
* Question for a calculator
Expand All @@ -30,5 +40,6 @@ export interface Question {
title: Title;
statement: Statement;
detail?: Detail;
tags?: Tags;
[k: string]: unknown;
}
11 changes: 11 additions & 0 deletions data/types/questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ export type Statement = string;
* A detailed description or an explanation of a question
*/
export type Detail = string;
/**
* Ordered list of tags
*
* @minItems 1
*/
export type Tags = [Tag, ...Tag[]];
/**
* Tag with max. 25 characters
*/
export type Tag = string;

/**
* Question for a calculator
Expand All @@ -36,5 +46,6 @@ export interface Question {
title: Title;
statement: Statement;
detail?: Detail;
tags?: Tags;
[k: string]: unknown;
}
17 changes: 17 additions & 0 deletions data/types/tags.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/

/**
* Ordered list of tags
*
* @minItems 1
*/
export type Tags = [Tag, ...Tag[]];
/**
* Tag with max. 25 characters
*/
export type Tag = string;

0 comments on commit 64d3d5a

Please sign in to comment.