@trafficgroup/knex-rel 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +5 -0
- package/knexfile.ts +63 -0
- package/migrations/.gitkeep +0 -0
- package/migrations/20250717160737_migration.ts +15 -0
- package/migrations/20250717160908_migration.ts +24 -0
- package/migrations/20250717161310_migration.ts +35 -0
- package/migrations/20250717161406_migration.ts +36 -0
- package/migrations/20250717162431_migration.ts +59 -0
- package/package.json +47 -0
- package/src/KnexConnection.ts +95 -0
- package/src/d.types.ts +18 -0
- package/src/dao/user/user.dao.ts +53 -0
- package/src/index.ts +8 -0
- package/src/interfaces/folder/folder.interfaces.ts +10 -0
- package/src/interfaces/study/study.interfaces.ts +9 -0
- package/src/interfaces/user/user.interfaces.ts +9 -0
- package/src/interfaces/video/video.interfaces.ts +13 -0
- package/tsconfig.json +15 -0
package/.env
ADDED
package/knexfile.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { Knex } from "knex";
|
|
2
|
+
require("dotenv").config();
|
|
3
|
+
|
|
4
|
+
const config: { [key: string]: Knex.Config } = {
|
|
5
|
+
development: {
|
|
6
|
+
client: "postgresql",
|
|
7
|
+
connection: {
|
|
8
|
+
database: process.env.PG_DB,
|
|
9
|
+
user: process.env.PG_USER,
|
|
10
|
+
password: process.env.PG_PASSWORD,
|
|
11
|
+
host: process.env.PG_HOST,
|
|
12
|
+
port: !!process.env.PG_PORT ? +process.env.PG_PORT : 54323,
|
|
13
|
+
ssl: { rejectUnauthorized: false },
|
|
14
|
+
},
|
|
15
|
+
pool: {
|
|
16
|
+
min: 2,
|
|
17
|
+
max: 10,
|
|
18
|
+
},
|
|
19
|
+
migrations: {
|
|
20
|
+
tableName: "knex_migrations",
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
staging: {
|
|
25
|
+
client: "postgresql",
|
|
26
|
+
connection: {
|
|
27
|
+
database: process.env.PG_DB,
|
|
28
|
+
user: process.env.PG_USER,
|
|
29
|
+
password: process.env.PG_PASSWORD,
|
|
30
|
+
host: process.env.PG_HOST,
|
|
31
|
+
port: !!process.env.PG_PORT ? +process.env.PG_PORT : 54323,
|
|
32
|
+
ssl: { rejectUnauthorized: false },
|
|
33
|
+
},
|
|
34
|
+
pool: {
|
|
35
|
+
min: 2,
|
|
36
|
+
max: 10,
|
|
37
|
+
},
|
|
38
|
+
migrations: {
|
|
39
|
+
tableName: "knex_migrations",
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
production: {
|
|
44
|
+
client: "postgresql",
|
|
45
|
+
connection: {
|
|
46
|
+
database: process.env.PG_DB,
|
|
47
|
+
user: process.env.PG_USER,
|
|
48
|
+
password: process.env.PG_PASSWORD,
|
|
49
|
+
host: process.env.PG_HOST,
|
|
50
|
+
port: !!process.env.PG_PORT ? +process.env.PG_PORT : 54323,
|
|
51
|
+
ssl: { rejectUnauthorized: false },
|
|
52
|
+
},
|
|
53
|
+
pool: {
|
|
54
|
+
min: 2,
|
|
55
|
+
max: 10,
|
|
56
|
+
},
|
|
57
|
+
migrations: {
|
|
58
|
+
tableName: "knex_migrations",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
module.exports = config;
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
export async function up(knex: Knex): Promise<void> {
|
|
4
|
+
await knex.schema.createTable("user", (table) => {
|
|
5
|
+
table.increments("id").primary();
|
|
6
|
+
table.string("email").notNullable().unique();
|
|
7
|
+
table.string("nombre").notNullable();
|
|
8
|
+
table.enu("role", ["ADMIN", "USER"]).notNullable().defaultTo("USER");
|
|
9
|
+
table.timestamps(true, true); // created_at, updated_at
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export async function down(knex: Knex): Promise<void> {
|
|
14
|
+
await knex.schema.dropTableIfExists("user");
|
|
15
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
export async function up(knex: Knex): Promise<void> {
|
|
4
|
+
await knex.schema.createTable("study", (table) => {
|
|
5
|
+
table.increments("id").primary();
|
|
6
|
+
table.string("name").notNullable();
|
|
7
|
+
|
|
8
|
+
table
|
|
9
|
+
.integer("createdBy")
|
|
10
|
+
.unsigned()
|
|
11
|
+
.notNullable()
|
|
12
|
+
.references("id")
|
|
13
|
+
.inTable("user")
|
|
14
|
+
.onDelete("CASCADE");
|
|
15
|
+
|
|
16
|
+
table.enu("status", ["COMPLETE", "IN PROGRESS", "FAILED"]).notNullable().defaultTo("IN PROGRESS");
|
|
17
|
+
|
|
18
|
+
table.timestamps(true, true); // created_at, updated_at
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export async function down(knex: Knex): Promise<void> {
|
|
23
|
+
await knex.schema.dropTableIfExists("study");
|
|
24
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
export async function up(knex: Knex): Promise<void> {
|
|
4
|
+
await knex.schema.createTable("folders", (table) => {
|
|
5
|
+
table.increments("id").primary();
|
|
6
|
+
table.string("name").notNullable();
|
|
7
|
+
|
|
8
|
+
table
|
|
9
|
+
.integer("createdBy")
|
|
10
|
+
.unsigned()
|
|
11
|
+
.notNullable()
|
|
12
|
+
.references("id")
|
|
13
|
+
.inTable("user")
|
|
14
|
+
.onDelete("CASCADE");
|
|
15
|
+
|
|
16
|
+
table
|
|
17
|
+
.enu("status", ["UPLOADING", "COMPLETE"])
|
|
18
|
+
.notNullable()
|
|
19
|
+
.defaultTo("UPLOADING");
|
|
20
|
+
|
|
21
|
+
table
|
|
22
|
+
.integer("studyId")
|
|
23
|
+
.unsigned()
|
|
24
|
+
.notNullable()
|
|
25
|
+
.references("id")
|
|
26
|
+
.inTable("study")
|
|
27
|
+
.onDelete("CASCADE");
|
|
28
|
+
|
|
29
|
+
table.timestamps(true, true);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export async function down(knex: Knex): Promise<void> {
|
|
34
|
+
await knex.schema.dropTableIfExists("folders");
|
|
35
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
export async function up(knex: Knex): Promise<void> {
|
|
4
|
+
await knex.schema.createTable("video", (table) => {
|
|
5
|
+
table.increments("id").primary();
|
|
6
|
+
|
|
7
|
+
table
|
|
8
|
+
.integer("folderId")
|
|
9
|
+
.unsigned()
|
|
10
|
+
.notNullable()
|
|
11
|
+
.references("id")
|
|
12
|
+
.inTable("folders")
|
|
13
|
+
.onDelete("CASCADE");
|
|
14
|
+
|
|
15
|
+
table.string("videoLocation").notNullable();
|
|
16
|
+
table.float("videoRate").notNullable(); // FPS
|
|
17
|
+
|
|
18
|
+
table
|
|
19
|
+
.enu("videoType", ["TMC", "ATR", "JUNCTION", "ROUNDABOUT", "PATHWAY"])
|
|
20
|
+
.notNullable();
|
|
21
|
+
|
|
22
|
+
table.jsonb("metadata").defaultTo('{}');
|
|
23
|
+
table
|
|
24
|
+
.enu("status", ["QUEUED", "PROCESSING", "COMPLETED", "FAILED"])
|
|
25
|
+
.notNullable()
|
|
26
|
+
.defaultTo("QUEUE");
|
|
27
|
+
|
|
28
|
+
table.jsonb("results").defaultTo('{}');
|
|
29
|
+
|
|
30
|
+
table.timestamps(true, true);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export async function down(knex: Knex): Promise<void> {
|
|
35
|
+
await knex.schema.dropTableIfExists("video");
|
|
36
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
export async function up(knex: Knex): Promise<void> {
|
|
4
|
+
await knex.raw(`CREATE EXTENSION IF NOT EXISTS "uuid-ossp"`);
|
|
5
|
+
|
|
6
|
+
// === USER ===
|
|
7
|
+
await knex.schema.alterTable("user", (table) => {
|
|
8
|
+
table.uuid("uuid").defaultTo(knex.raw("uuid_generate_v4()"));
|
|
9
|
+
});
|
|
10
|
+
await knex("user").update({ uuid: knex.raw("uuid_generate_v4()") });
|
|
11
|
+
await knex.schema.alterTable("user", (table) => {
|
|
12
|
+
table.uuid("uuid").notNullable().unique().alter();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// === STUDY ===
|
|
16
|
+
await knex.schema.alterTable("study", (table) => {
|
|
17
|
+
table.uuid("uuid").defaultTo(knex.raw("uuid_generate_v4()"));
|
|
18
|
+
});
|
|
19
|
+
await knex("study").update({ uuid: knex.raw("uuid_generate_v4()") });
|
|
20
|
+
await knex.schema.alterTable("study", (table) => {
|
|
21
|
+
table.uuid("uuid").notNullable().unique().alter();
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// === FOLDERS ===
|
|
25
|
+
await knex.schema.alterTable("folders", (table) => {
|
|
26
|
+
table.uuid("uuid").defaultTo(knex.raw("uuid_generate_v4()"));
|
|
27
|
+
});
|
|
28
|
+
await knex("folders").update({ uuid: knex.raw("uuid_generate_v4()") });
|
|
29
|
+
await knex.schema.alterTable("folders", (table) => {
|
|
30
|
+
table.uuid("uuid").notNullable().unique().alter();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// === VIDEO ===
|
|
34
|
+
await knex.schema.alterTable("video", (table) => {
|
|
35
|
+
table.uuid("uuid").defaultTo(knex.raw("uuid_generate_v4()"));
|
|
36
|
+
});
|
|
37
|
+
await knex("video").update({ uuid: knex.raw("uuid_generate_v4()") });
|
|
38
|
+
await knex.schema.alterTable("video", (table) => {
|
|
39
|
+
table.uuid("uuid").notNullable().unique().alter();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export async function down(knex: Knex): Promise<void> {
|
|
44
|
+
await knex.schema.alterTable("video", (table) => {
|
|
45
|
+
table.dropColumn("uuid");
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
await knex.schema.alterTable("folders", (table) => {
|
|
49
|
+
table.dropColumn("uuid");
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
await knex.schema.alterTable("study", (table) => {
|
|
53
|
+
table.dropColumn("uuid");
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
await knex.schema.alterTable("user", (table) => {
|
|
57
|
+
table.dropColumn("uuid");
|
|
58
|
+
});
|
|
59
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@trafficgroup/knex-rel",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Knex Module",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "jest",
|
|
8
|
+
"format": "prettier --write .",
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"clean": "rimraf dist && npm run format && npm run build",
|
|
11
|
+
"npm:publish": "npm run clean && npm publish",
|
|
12
|
+
"migrate:create": "knex migrate:make migration -x ts",
|
|
13
|
+
"migrate:deploy": "knex migrate:latest",
|
|
14
|
+
"seed:create": "knex seed:make seed -x ts",
|
|
15
|
+
"seed:run": "knex seed:run"
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/tms-world/knex-module.git"
|
|
20
|
+
},
|
|
21
|
+
"author": "Genium, Inc",
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"bugs": {
|
|
24
|
+
"url": "https://github.com/tms-world/knex-module/issues"
|
|
25
|
+
},
|
|
26
|
+
"homepage": "https://github.com/tms-world/knex-module#readme",
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@eslint/js": "^9.23.0",
|
|
29
|
+
"@types/dotenv": "^6.1.1",
|
|
30
|
+
"@types/lodash": "^4.17.16",
|
|
31
|
+
"@types/node": "^22.13.13",
|
|
32
|
+
"eslint": "^9.23.0",
|
|
33
|
+
"globals": "^16.0.0",
|
|
34
|
+
"prettier": "^3.5.3",
|
|
35
|
+
"rimraf": "^6.0.1",
|
|
36
|
+
"ts-node": "^10.9.2",
|
|
37
|
+
"typescript": "^5.8.2",
|
|
38
|
+
"typescript-eslint": "^8.28.0"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"dotenv": "^16.4.7",
|
|
42
|
+
"knex": "^3.1.0",
|
|
43
|
+
"lodash": "^4.17.21",
|
|
44
|
+
"pg": "^8.14.1",
|
|
45
|
+
"uuid": "^11.1.0"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { knex, Knex } from "knex";
|
|
2
|
+
|
|
3
|
+
class KnexManager {
|
|
4
|
+
private static knexInstance: Knex<any, unknown[]> | null = null;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Open a new connection. Reuse the already existing one if there's any.
|
|
8
|
+
*/
|
|
9
|
+
static async connect(
|
|
10
|
+
config?: Knex.Config,
|
|
11
|
+
connections?: number,
|
|
12
|
+
): Promise<Knex<any, unknown[]>> {
|
|
13
|
+
if (!KnexManager.knexInstance) {
|
|
14
|
+
const testConfig = {
|
|
15
|
+
client: "pg",
|
|
16
|
+
connection: {
|
|
17
|
+
host: process.env.SQL_HOST,
|
|
18
|
+
user: process.env.SQL_USER,
|
|
19
|
+
password: process.env.SQL_PASSWORD,
|
|
20
|
+
database: process.env.SQL_DB_NAME,
|
|
21
|
+
charset: "utf8mb4",
|
|
22
|
+
port: Number(process.env.SQL_PORT) || 5432,
|
|
23
|
+
ssl: { rejectUnauthorized: false },
|
|
24
|
+
},
|
|
25
|
+
pool: {
|
|
26
|
+
min: 1,
|
|
27
|
+
max: connections || 15,
|
|
28
|
+
idleTimeoutMillis: 20000,
|
|
29
|
+
acquireTimeoutMillis: 30000,
|
|
30
|
+
},
|
|
31
|
+
migrations: {
|
|
32
|
+
tableName: "knex_migrations",
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
KnexManager.knexInstance = knex(
|
|
36
|
+
config || {
|
|
37
|
+
client: "pg",
|
|
38
|
+
connection: {
|
|
39
|
+
host: process.env.SQL_HOST,
|
|
40
|
+
user: process.env.SQL_USER,
|
|
41
|
+
password: process.env.SQL_PASSWORD,
|
|
42
|
+
database: process.env.SQL_DB_NAME,
|
|
43
|
+
charset: "utf8mb4",
|
|
44
|
+
port: Number(process.env.SQL_PORT) || 5432,
|
|
45
|
+
ssl: { rejectUnauthorized: false },
|
|
46
|
+
},
|
|
47
|
+
pool: {
|
|
48
|
+
min: 1,
|
|
49
|
+
max: connections || 15,
|
|
50
|
+
idleTimeoutMillis: 20000,
|
|
51
|
+
acquireTimeoutMillis: 30000,
|
|
52
|
+
},
|
|
53
|
+
migrations: {
|
|
54
|
+
tableName: "knex_migrations",
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
);
|
|
58
|
+
try {
|
|
59
|
+
await KnexManager.knexInstance.raw("SELECT 1");
|
|
60
|
+
console.info(`Knex connection established`);
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error(`Failed to establish Knex connection:`, error);
|
|
63
|
+
KnexManager.knexInstance = null;
|
|
64
|
+
throw error;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return KnexManager.knexInstance;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Devuelve la conexión activa.
|
|
73
|
+
*/
|
|
74
|
+
static getConnection(): Knex<any, unknown[]> {
|
|
75
|
+
if (!KnexManager.knexInstance) {
|
|
76
|
+
throw new Error(
|
|
77
|
+
"Knex connection has not been established. Call connect() first.",
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
return KnexManager.knexInstance;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Cierra la conexión y destruye la instancia.
|
|
85
|
+
*/
|
|
86
|
+
static async disconnect(): Promise<void> {
|
|
87
|
+
if (KnexManager.knexInstance) {
|
|
88
|
+
await KnexManager.knexInstance.destroy();
|
|
89
|
+
KnexManager.knexInstance = null;
|
|
90
|
+
console.info(`Knex connection closed`);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export default KnexManager;
|
package/src/d.types.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface IDataPaginator<T> {
|
|
2
|
+
success: boolean;
|
|
3
|
+
data: T[];
|
|
4
|
+
page: number;
|
|
5
|
+
limit: number;
|
|
6
|
+
count: number;
|
|
7
|
+
totalCount: number;
|
|
8
|
+
totalPages: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface IBaseDAO<T> {
|
|
12
|
+
create(item: T): Promise<T>;
|
|
13
|
+
getById(id: number): Promise<T | null>;
|
|
14
|
+
getByUuid(uuid: string): Promise<T | null>;
|
|
15
|
+
getAll(): Promise<IDataPaginator<T>>;
|
|
16
|
+
update(id: number, item: T): Promise<T | null>;
|
|
17
|
+
delete(id: number): Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Knex } from "knex";
|
|
2
|
+
import { IBaseDAO, IDataPaginator } from "../../d.types";
|
|
3
|
+
import { IUser } from "../../interfaces/user/user.interfaces";
|
|
4
|
+
import KnexManager from "../../KnexConnection";
|
|
5
|
+
|
|
6
|
+
export class UserDAO implements IBaseDAO<IUser> {
|
|
7
|
+
private _knex: Knex<any, unknown[]> = KnexManager.getConnection();
|
|
8
|
+
|
|
9
|
+
async create(item: IUser): Promise<IUser> {
|
|
10
|
+
const [createdUser] = await this._knex("user").insert(item).returning("*");
|
|
11
|
+
return createdUser;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
async getById(id: number): Promise<IUser | null> {
|
|
15
|
+
const user = await this._knex("user").where({ id }).first();
|
|
16
|
+
return user || null;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async getByUuid(uuid: string): Promise<IUser | null> {
|
|
20
|
+
const user = await this._knex("user").where({ uuid }).first();
|
|
21
|
+
return user || null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async update(id: number, item: Partial<IUser>): Promise<IUser | null> {
|
|
25
|
+
const [updatedUser] = await this._knex("user").where({ id }).update(item).returning("*");
|
|
26
|
+
return updatedUser || null;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async delete(id: number): Promise<boolean> {
|
|
30
|
+
const result = await this._knex("user").where({ id }).del();
|
|
31
|
+
return result > 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
async getAll(): Promise<IDataPaginator<IUser>> {
|
|
35
|
+
const page = 1; // Default to first page
|
|
36
|
+
const limit = 10; // Default limit
|
|
37
|
+
const offset = (page - 1) * limit;
|
|
38
|
+
|
|
39
|
+
const [countResult] = await this._knex("user").count("* as count");
|
|
40
|
+
const totalCount = +countResult.count;
|
|
41
|
+
const users = await this._knex("user").limit(limit).offset(offset);
|
|
42
|
+
|
|
43
|
+
return {
|
|
44
|
+
success: true,
|
|
45
|
+
data: users,
|
|
46
|
+
page,
|
|
47
|
+
limit,
|
|
48
|
+
count: users.length,
|
|
49
|
+
totalCount,
|
|
50
|
+
totalPages: Math.ceil(totalCount / limit),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IVideo {
|
|
2
|
+
id: number;
|
|
3
|
+
uuid: string;
|
|
4
|
+
folderId: number;
|
|
5
|
+
videoLocation: string;
|
|
6
|
+
videoRate: number;
|
|
7
|
+
videoType: 'TMC' | 'ATR' | 'JUNCTION' | 'ROUNDABOUT' | 'PATHWAY';
|
|
8
|
+
metadata: Record<string, any>;
|
|
9
|
+
status: 'QUEUE' | 'PROCESSING' | 'COMPLETED' | 'FAILED';
|
|
10
|
+
results: Record<string, any>;
|
|
11
|
+
created_at: string;
|
|
12
|
+
updated_at: string;
|
|
13
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "CommonJS",
|
|
4
|
+
"target": "es2016",
|
|
5
|
+
"sourceMap": true,
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"noImplicitAny": true,
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"rootDir": "./src",
|
|
10
|
+
"outDir": "./dist",
|
|
11
|
+
"skipLibCheck": true
|
|
12
|
+
},
|
|
13
|
+
"include": ["src/**/*"],
|
|
14
|
+
"exclude": ["node_modules"]
|
|
15
|
+
}
|