Generating Typescript interfaces from Json schema. (#2244)

This commit is contained in:
Sachin Chaurasiya 2022-01-17 13:35:56 +05:30 committed by GitHub
parent 099ddbbce9
commit 1f8c28dde1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 114 additions and 62 deletions

View File

@ -23,7 +23,7 @@ export interface CatalogVersion {
/** /**
* Build timestamp * Build timestamp
*/ */
timestamp?: string; timestamp?: number;
/** /**
* Software version of the catalog * Software version of the catalog
*/ */

View File

@ -13,7 +13,7 @@
*/ */
/** /**
* Add lineage details between two entities * Add lineage edge between two entities
*/ */
export interface AddLineage { export interface AddLineage {
/** /**

View File

@ -46,9 +46,10 @@ export interface Bots {
*/ */
name?: string; name?: string;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -80,9 +80,10 @@ export interface Chart {
*/ */
tags?: TagLabel[]; tags?: TagLabel[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -80,9 +80,10 @@ export interface Dashboard {
*/ */
tags?: TagLabel[]; tags?: TagLabel[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -70,9 +70,10 @@ export interface Database {
*/ */
tables?: EntityReference[]; tables?: EntityReference[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -72,9 +72,10 @@ export interface Location {
*/ */
tags?: TagLabel[]; tags?: TagLabel[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -64,9 +64,10 @@ export interface Metrics {
*/ */
tags?: TagLabel[]; tags?: TagLabel[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -87,9 +87,10 @@ export interface Mlmodel {
*/ */
tags?: TagLabel[]; tags?: TagLabel[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -92,9 +92,10 @@ export interface Pipeline {
*/ */
tasks?: Task[]; tasks?: Task[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -59,9 +59,10 @@ export interface Report {
*/ */
service: EntityReference; service: EntityReference;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -110,9 +110,10 @@ export interface Table {
*/ */
tags?: TagLabel[]; tags?: TagLabel[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -110,9 +110,10 @@ export interface Topic {
*/ */
tags?: TagLabel[]; tags?: TagLabel[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -40,9 +40,9 @@ export interface Thread {
id: string; id: string;
posts: Post[]; posts: Post[];
/** /**
* Timestamp of the when the first post created the thread. * Timestamp of the when the first post created the thread in Unix epoch time milliseconds.
*/ */
threadTs?: Date; threadTs?: number;
} }
/** /**
@ -58,7 +58,7 @@ export interface Post {
*/ */
message: string; message: string;
/** /**
* Timestamp of the post. * Timestamp of the post in Unix epoch time milliseconds.
*/ */
postTs?: Date; postTs?: number;
} }

View File

@ -111,9 +111,10 @@ export interface Location {
*/ */
tags?: TagLabel[]; tags?: TagLabel[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */
@ -370,9 +371,10 @@ export interface StorageService {
*/ */
serviceType: StorageServiceType; serviceType: StorageServiceType;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -61,9 +61,10 @@ export interface DashboardService {
*/ */
serviceType: DashboardServiceType; serviceType: DashboardServiceType;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -59,9 +59,10 @@ export interface DatabaseService {
*/ */
serviceType: DatabaseServiceType; serviceType: DatabaseServiceType;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -62,9 +62,10 @@ export interface MessagingService {
*/ */
serviceType: MessagingServiceType; serviceType: MessagingServiceType;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -58,9 +58,10 @@ export interface PipelineService {
*/ */
serviceType?: PipelineServiceType; serviceType?: PipelineServiceType;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -49,9 +49,10 @@ export interface StorageService {
*/ */
serviceType: StorageServiceType; serviceType: StorageServiceType;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -43,9 +43,10 @@ export interface TagCategory {
href?: string; href?: string;
name: string; name: string;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */
@ -145,9 +146,10 @@ export interface TagClass {
*/ */
name: string; name: string;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -39,9 +39,10 @@ export interface Role {
id: string; id: string;
name: string; name: string;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -48,9 +48,10 @@ export interface Team {
*/ */
profile?: Profile; profile?: Profile;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -80,9 +80,10 @@ export interface User {
*/ */
timezone?: string; timezone?: string;
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -103,9 +103,10 @@ export interface Ingestion {
*/ */
tags?: TagLabel[]; tags?: TagLabel[];
/** /**
* Last update time corresponding to the new version of the entity. * Last update time corresponding to the new version of the entity in Unix epoch time
* milliseconds.
*/ */
updatedAt?: Date; updatedAt?: number;
/** /**
* User who made the update. * User who made the update.
*/ */

View File

@ -17,10 +17,6 @@
* API operations. * API operations.
*/ */
export interface AuditLog { export interface AuditLog {
/**
* Date when the API call is made.
*/
dateTime?: Date;
/** /**
* Identifier of entity that was modified by the operation. * Identifier of entity that was modified by the operation.
*/ */
@ -41,6 +37,11 @@ export interface AuditLog {
* HTTP response code for the api requested. * HTTP response code for the api requested.
*/ */
responseCode: number; responseCode: number;
/**
* Timestamp when the API call is made in Unix epoch time milliseconds in Unix epoch time
* milliseconds.
*/
timestamp?: number;
/** /**
* Name of the user who made the API request. * Name of the user who made the API request.
*/ */

View File

@ -33,15 +33,15 @@ export interface ChangeEvent {
* `currentVersion`. * `currentVersion`.
*/ */
currentVersion?: number; currentVersion?: number;
/**
* Date and time when the change was made.
*/
dateTime: Date;
/** /**
* For `eventType` `entityCreated`, this field captures JSON coded string of the entity * For `eventType` `entityCreated`, this field captures JSON coded string of the entity
* using the schema corresponding to `entityType`. * using the schema corresponding to `entityType`.
*/ */
entity?: any; entity?: any;
/**
* Fully Qualified Name of entity that was modified by the operation.
*/
entityFullyQualifiedName?: string;
/** /**
* Identifier of entity that was modified by the operation. * Identifier of entity that was modified by the operation.
*/ */
@ -57,6 +57,10 @@ export interface ChangeEvent {
* `currentVersion`. * `currentVersion`.
*/ */
previousVersion?: number; previousVersion?: number;
/**
* Timestamp when the change was made in Unix epoch time milliseconds.
*/
timestamp: number;
/** /**
* Name of the user whose activity resulted in the change. * Name of the user whose activity resulted in the change.
*/ */

View File

@ -0,0 +1,23 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/*
* Copyright 2021 Collate
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* GET entity by id, GET entity by name, and LIST entities can include deleted or
* non-deleted entities using the parameter include
*/
export enum Include {
All = 'all',
Deleted = 'deleted',
NonDeleted = 'non-deleted',
}