Skip to content

Commit

Permalink
Add types for new API calls
Browse files Browse the repository at this point in the history
  • Loading branch information
b-per committed Jul 29, 2022
1 parent 1e795b0 commit ee15c8e
Showing 1 changed file with 40 additions and 1 deletion.
41 changes: 40 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ export interface dbtEnv {
state: number;
created_at: string;
updated_at: string;
project: [unknown];
project: {
repository: {
remote_url: string;
remote_backend: string;
};
};
jobs: string;
credentials: string;
custom_environment_variables: string;
Expand Down Expand Up @@ -117,6 +122,8 @@ export interface dbtModelShort {
name: string;
materializedType: string;
packageName: string;
path: string;
root_path: string;
}

export interface dbtGraphQLModelShort {
Expand All @@ -137,6 +144,7 @@ export interface dbtModelByEnv {
jobId: number;
runGeneratedAt: string;
childrenL1: Array<string>;
dependsOn: Array<string>;
parentsModels: Array<{
uniqueId: string;
}>;
Expand Down Expand Up @@ -218,3 +226,34 @@ export interface dbtProjectAnswer {
};
data: dbtProject;
}

export interface dbtRunsAnswer {
status: {
code: number;
is_success: boolean;
user_message: string;
developer_message: string;
};
data: [
{
id: number;
}
];
}

// expand
export interface dbtManifest {
nodes: Record<string, dbtManifestModel>;
}

export interface dbtManifestModel {
unique_id: string;
name: string;
config: {
materialized: string;
};
package_name: string;
original_file_path: string;
root_path: string;
resource_type: string;
}

0 comments on commit ee15c8e

Please sign in to comment.