axe-api 0.30.0-rc3 → 0.30.0-rc5
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/package.json +5 -6
- package/build/dev-kit/app/config.d.ts +0 -3
- package/build/dev-kit/app/config.js +0 -31
- package/build/dev-kit/app/v1/Hooks/Customer/onBeforeForceDelete.d.ts +0 -3
- package/build/dev-kit/app/v1/Hooks/Customer/onBeforeForceDelete.js +0 -14
- package/build/dev-kit/app/v1/Hooks/Employee/onBeforeForceDelete.d.ts +0 -2
- package/build/dev-kit/app/v1/Hooks/Employee/onBeforeForceDelete.js +0 -14
- package/build/dev-kit/app/v1/Hooks/User/onBeforeInsert.d.ts +0 -2
- package/build/dev-kit/app/v1/Hooks/User/onBeforeInsert.js +0 -14
- package/build/dev-kit/app/v1/Models/Customer.d.ts +0 -7
- package/build/dev-kit/app/v1/Models/Customer.js +0 -15
- package/build/dev-kit/app/v1/Models/Employee.d.ts +0 -9
- package/build/dev-kit/app/v1/Models/Employee.js +0 -21
- package/build/dev-kit/app/v1/Models/EmployeeAddress.d.ts +0 -8
- package/build/dev-kit/app/v1/Models/EmployeeAddress.js +0 -18
- package/build/dev-kit/app/v1/Models/Post.d.ts +0 -8
- package/build/dev-kit/app/v1/Models/Post.js +0 -20
- package/build/dev-kit/app/v1/Models/User.d.ts +0 -8
- package/build/dev-kit/app/v1/Models/User.js +0 -32
- package/build/dev-kit/app/v1/Serialization/PostSerialization.d.ts +0 -3
- package/build/dev-kit/app/v1/Serialization/PostSerialization.js +0 -6
- package/build/dev-kit/app/v1/Serialization/UserSerialization.d.ts +0 -3
- package/build/dev-kit/app/v1/Serialization/UserSerialization.js +0 -5
- package/build/dev-kit/app/v1/config.d.ts +0 -3
- package/build/dev-kit/app/v1/config.js +0 -22
- package/build/dev-kit/app/v1/init.d.ts +0 -4
- package/build/dev-kit/app/v1/init.js +0 -26
- package/build/dev-kit/app/v2/Models/Customer.d.ts +0 -11
- package/build/dev-kit/app/v2/Models/Customer.js +0 -23
- package/build/dev-kit/app/v2/Models/Employee.d.ts +0 -9
- package/build/dev-kit/app/v2/Models/Employee.js +0 -21
- package/build/dev-kit/app/v2/Models/EmployeeAddress.d.ts +0 -8
- package/build/dev-kit/app/v2/Models/EmployeeAddress.js +0 -18
- package/build/dev-kit/app/v2/Models/Post.d.ts +0 -6
- package/build/dev-kit/app/v2/Models/Post.js +0 -14
- package/build/dev-kit/app/v2/Models/User.d.ts +0 -7
- package/build/dev-kit/app/v2/Models/User.js +0 -23
- package/build/dev-kit/app/v2/Serialization/UserSerialization.d.ts +0 -3
- package/build/dev-kit/app/v2/Serialization/UserSerialization.js +0 -5
- package/build/dev-kit/app/v2/config.d.ts +0 -3
- package/build/dev-kit/app/v2/config.js +0 -13
- package/build/dev-kit/app/v2/init.d.ts +0 -4
- package/build/dev-kit/app/v2/init.js +0 -16
- package/build/dev-kit/app/v3/config.d.ts +0 -3
- package/build/dev-kit/app/v3/config.js +0 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "axe-api",
|
|
3
|
-
"version": "0.30.0-
|
|
3
|
+
"version": "0.30.0-rc5",
|
|
4
4
|
"description": "AXE API is a simple tool which has been created based on Express and Knex.js to create Rest APIs quickly.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"author": "Özgür Adem Işıklı <i.ozguradem@gmail.com>",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "tsc",
|
|
16
|
+
"build": "tsc && rm -rf build/dev-kit",
|
|
17
17
|
"build:watch": "tsc -w",
|
|
18
18
|
"dev": "ts-node-dev --files --respawn --clear index.ts",
|
|
19
19
|
"dev-kit": "ts-node-dev --respawn --clear dev-kit.ts",
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
"test:mysql8": "sh ./scripts/test-mysql8.sh"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
+
"pluralize": "^8.0.0",
|
|
33
|
+
"validatorjs": "^3.22.1",
|
|
32
34
|
"@types/express": "^4.17.17",
|
|
33
35
|
"chalk": "^4.1.2",
|
|
34
36
|
"change-case": "^4.1.2",
|
|
@@ -37,10 +39,7 @@
|
|
|
37
39
|
"http-status-codes": "^2.2.0",
|
|
38
40
|
"knex": "^2.4.2",
|
|
39
41
|
"knex-paginate": "^3.0.2",
|
|
40
|
-
"knex-schema-inspector": "^2.0.4"
|
|
41
|
-
"multer": "^1.4.5-lts.1",
|
|
42
|
-
"pluralize": "^8.0.0",
|
|
43
|
-
"validatorjs": "^3.22.1"
|
|
42
|
+
"knex-schema-inspector": "^2.0.4"
|
|
44
43
|
},
|
|
45
44
|
"devDependencies": {
|
|
46
45
|
"@babel/core": "^7.19.1",
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const path_1 = __importDefault(require("path"));
|
|
7
|
-
const index_1 = require("../../index");
|
|
8
|
-
const config = {
|
|
9
|
-
prefix: "api",
|
|
10
|
-
env: process.env.NODE_ENV || "production",
|
|
11
|
-
port: process.env.APP_PORT ? parseInt(process.env.APP_PORT) : 3000,
|
|
12
|
-
logLevel: index_1.LogLevels.INFO,
|
|
13
|
-
database: {
|
|
14
|
-
client: process.env.DB_CLIENT || "mysql",
|
|
15
|
-
connection: {
|
|
16
|
-
host: process.env.DB_HOST || "localhost",
|
|
17
|
-
user: process.env.DB_USER || "user",
|
|
18
|
-
password: process.env.DB_PASSWORD || "password",
|
|
19
|
-
database: process.env.DB_DATABASE || "database",
|
|
20
|
-
filename: path_1.default.join(__dirname, "..", "..", "mydb.sqlite"),
|
|
21
|
-
},
|
|
22
|
-
pool: {
|
|
23
|
-
min: 2,
|
|
24
|
-
max: 10,
|
|
25
|
-
},
|
|
26
|
-
migrations: {
|
|
27
|
-
tableName: "knex_migrations",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
exports.default = config;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.default = ({ formData }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
-
throw new Error("Fake");
|
|
14
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
-
throw new Error("This is just a test message.");
|
|
14
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.default = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
-
// TODO
|
|
14
|
-
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../../index");
|
|
4
|
-
class Customer extends index_1.Model {
|
|
5
|
-
get table() {
|
|
6
|
-
return "soft_delete_1";
|
|
7
|
-
}
|
|
8
|
-
get fillable() {
|
|
9
|
-
return ["name"];
|
|
10
|
-
}
|
|
11
|
-
employees() {
|
|
12
|
-
return this.hasMany("Employee", "id", "parent_id");
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
exports.default = Customer;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Model } from "../../../../index";
|
|
2
|
-
declare class Employee extends Model {
|
|
3
|
-
get table(): string;
|
|
4
|
-
get fillable(): string[];
|
|
5
|
-
get deletedAtColumn(): string;
|
|
6
|
-
children(): import("../../../../index").IRelation;
|
|
7
|
-
parent(): import("../../../../index").IRelation;
|
|
8
|
-
}
|
|
9
|
-
export default Employee;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../../index");
|
|
4
|
-
class Employee extends index_1.Model {
|
|
5
|
-
get table() {
|
|
6
|
-
return "soft_delete_2";
|
|
7
|
-
}
|
|
8
|
-
get fillable() {
|
|
9
|
-
return ["name"];
|
|
10
|
-
}
|
|
11
|
-
get deletedAtColumn() {
|
|
12
|
-
return "deleted_at";
|
|
13
|
-
}
|
|
14
|
-
children() {
|
|
15
|
-
return this.hasMany("EmployeeAddress", "id", "parent_id");
|
|
16
|
-
}
|
|
17
|
-
parent() {
|
|
18
|
-
return this.belongsTo("Customer", "parent_id", "id");
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.default = Employee;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../../index");
|
|
4
|
-
class EmployeeAddress extends index_1.Model {
|
|
5
|
-
get table() {
|
|
6
|
-
return "soft_delete_3";
|
|
7
|
-
}
|
|
8
|
-
get fillable() {
|
|
9
|
-
return ["name"];
|
|
10
|
-
}
|
|
11
|
-
get deletedAtColumn() {
|
|
12
|
-
return "deleted_at";
|
|
13
|
-
}
|
|
14
|
-
parent() {
|
|
15
|
-
return this.belongsTo("Employee", "parent_id", "id");
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.default = EmployeeAddress;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { Model } from "../../../../index";
|
|
2
|
-
declare class Post extends Model {
|
|
3
|
-
get fillable(): string[];
|
|
4
|
-
get validations(): Record<string, string>;
|
|
5
|
-
get limits(): import("../../../../index").IQueryLimitConfig[][];
|
|
6
|
-
user(): import("../../../../index").IRelation;
|
|
7
|
-
}
|
|
8
|
-
export default Post;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../../index");
|
|
4
|
-
class Post extends index_1.Model {
|
|
5
|
-
get fillable() {
|
|
6
|
-
return ["title"];
|
|
7
|
-
}
|
|
8
|
-
get validations() {
|
|
9
|
-
return {
|
|
10
|
-
title: "required",
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
get limits() {
|
|
14
|
-
return [(0, index_1.allow)(index_1.QueryFeature.WithHasOne)];
|
|
15
|
-
}
|
|
16
|
-
user() {
|
|
17
|
-
return this.hasOne("User", "id", "user_id");
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.default = Post;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { IMethodBaseConfig, IRelation, Model } from "../../../../index";
|
|
2
|
-
declare class User extends Model {
|
|
3
|
-
get fillable(): IMethodBaseConfig;
|
|
4
|
-
get validations(): Record<string, string>;
|
|
5
|
-
get limits(): import("../../../../index").IQueryLimitConfig[][];
|
|
6
|
-
posts(): IRelation;
|
|
7
|
-
}
|
|
8
|
-
export default User;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../../index");
|
|
4
|
-
class User extends index_1.Model {
|
|
5
|
-
get fillable() {
|
|
6
|
-
return {
|
|
7
|
-
POST: ["email", "name", "surname"],
|
|
8
|
-
PUT: ["name", "surname"],
|
|
9
|
-
PATCH: ["name", "surname"],
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
get validations() {
|
|
13
|
-
return {
|
|
14
|
-
email: "required|email",
|
|
15
|
-
name: "required",
|
|
16
|
-
surname: "required",
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
get limits() {
|
|
20
|
-
return [
|
|
21
|
-
(0, index_1.allow)(index_1.QueryFeature.WhereLike, ["name", "surname"]),
|
|
22
|
-
(0, index_1.allow)(index_1.QueryFeature.WithHasMany, ["posts"]),
|
|
23
|
-
// deny(QueryFeature.WhereGt),
|
|
24
|
-
// deny(QueryFeature.FieldsAll),
|
|
25
|
-
// deny(QueryFeature.Sorting),
|
|
26
|
-
];
|
|
27
|
-
}
|
|
28
|
-
posts() {
|
|
29
|
-
return this.hasMany("Post", "id", "user_id");
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
exports.default = User;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../index");
|
|
4
|
-
const simpleSerializer = (data) => {
|
|
5
|
-
data.signed = true;
|
|
6
|
-
return data;
|
|
7
|
-
};
|
|
8
|
-
const config = Object.assign(Object.assign({}, index_1.DEFAULT_VERSION_CONFIG), { transaction: [], serializers: [simpleSerializer], supportedLanguages: ["en"], defaultLanguage: "en", query: {
|
|
9
|
-
limits: [
|
|
10
|
-
(0, index_1.allow)(index_1.QueryFeature.All),
|
|
11
|
-
// allow(QueryFeature.FieldsAll),
|
|
12
|
-
// // allow(QueryFeature.WithHasOne),
|
|
13
|
-
// allow(QueryFeature.Sorting),
|
|
14
|
-
// allow(QueryFeature.WhereGt),
|
|
15
|
-
(0, index_1.deny)(index_1.QueryFeature.WithHasMany),
|
|
16
|
-
],
|
|
17
|
-
defaults: {
|
|
18
|
-
perPage: 2,
|
|
19
|
-
maxPerPage: 2,
|
|
20
|
-
},
|
|
21
|
-
} });
|
|
22
|
-
exports.default = config;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.onAfterInit = exports.onBeforeInit = void 0;
|
|
16
|
-
const body_parser_1 = __importDefault(require("body-parser"));
|
|
17
|
-
const multer_1 = __importDefault(require("multer"));
|
|
18
|
-
const onBeforeInit = (app) => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
|
-
const forms = (0, multer_1.default)();
|
|
20
|
-
app.use(body_parser_1.default.urlencoded({ extended: true }));
|
|
21
|
-
app.use(forms.array("file"));
|
|
22
|
-
app.use(body_parser_1.default.json());
|
|
23
|
-
});
|
|
24
|
-
exports.onBeforeInit = onBeforeInit;
|
|
25
|
-
const onAfterInit = (app) => __awaiter(void 0, void 0, void 0, function* () { });
|
|
26
|
-
exports.onAfterInit = onAfterInit;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Model } from "../../../../index";
|
|
2
|
-
declare class Customer extends Model {
|
|
3
|
-
get table(): string;
|
|
4
|
-
get validations(): {
|
|
5
|
-
name: string;
|
|
6
|
-
};
|
|
7
|
-
get fillable(): string[];
|
|
8
|
-
get limits(): import("../../../../index").IQueryLimitConfig[][];
|
|
9
|
-
employees(): import("../../../../index").IRelation;
|
|
10
|
-
}
|
|
11
|
-
export default Customer;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../../index");
|
|
4
|
-
class Customer extends index_1.Model {
|
|
5
|
-
get table() {
|
|
6
|
-
return "soft_delete_1";
|
|
7
|
-
}
|
|
8
|
-
get validations() {
|
|
9
|
-
return {
|
|
10
|
-
name: "required|min:100",
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
get fillable() {
|
|
14
|
-
return ["name"];
|
|
15
|
-
}
|
|
16
|
-
get limits() {
|
|
17
|
-
return [(0, index_1.allow)(index_1.QueryFeature.FieldsAll), (0, index_1.deny)(index_1.QueryFeature.Sorting, ["id"])];
|
|
18
|
-
}
|
|
19
|
-
employees() {
|
|
20
|
-
return this.hasMany("Employee", "id", "parent_id");
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.default = Customer;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Model } from "../../../../index";
|
|
2
|
-
declare class Employee extends Model {
|
|
3
|
-
get table(): string;
|
|
4
|
-
get fillable(): string[];
|
|
5
|
-
get deletedAtColumn(): string;
|
|
6
|
-
children(): import("../../../../index").IRelation;
|
|
7
|
-
parent(): import("../../../../index").IRelation;
|
|
8
|
-
}
|
|
9
|
-
export default Employee;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../../index");
|
|
4
|
-
class Employee extends index_1.Model {
|
|
5
|
-
get table() {
|
|
6
|
-
return "soft_delete_2";
|
|
7
|
-
}
|
|
8
|
-
get fillable() {
|
|
9
|
-
return ["name"];
|
|
10
|
-
}
|
|
11
|
-
get deletedAtColumn() {
|
|
12
|
-
return "deleted_at";
|
|
13
|
-
}
|
|
14
|
-
children() {
|
|
15
|
-
return this.hasMany("EmployeeAddress", "id", "parent_id");
|
|
16
|
-
}
|
|
17
|
-
parent() {
|
|
18
|
-
return this.belongsTo("Customer", "parent_id", "id");
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
exports.default = Employee;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../../index");
|
|
4
|
-
class EmployeeAddress extends index_1.Model {
|
|
5
|
-
get table() {
|
|
6
|
-
return "soft_delete_3";
|
|
7
|
-
}
|
|
8
|
-
get fillable() {
|
|
9
|
-
return ["name"];
|
|
10
|
-
}
|
|
11
|
-
get deletedAtColumn() {
|
|
12
|
-
return "deleted_at";
|
|
13
|
-
}
|
|
14
|
-
parent() {
|
|
15
|
-
return this.belongsTo("Employee", "parent_id", "id");
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.default = EmployeeAddress;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../../index");
|
|
4
|
-
class Post extends index_1.Model {
|
|
5
|
-
get fillable() {
|
|
6
|
-
return ["title"];
|
|
7
|
-
}
|
|
8
|
-
get validations() {
|
|
9
|
-
return {
|
|
10
|
-
title: "required",
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
exports.default = Post;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../../index");
|
|
4
|
-
class User extends index_1.Model {
|
|
5
|
-
get fillable() {
|
|
6
|
-
return {
|
|
7
|
-
POST: ["email", "name", "surname"],
|
|
8
|
-
PUT: ["name", "surname"],
|
|
9
|
-
PATCH: ["name", "surname"],
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
get validations() {
|
|
13
|
-
return {
|
|
14
|
-
email: "required|email",
|
|
15
|
-
name: "required",
|
|
16
|
-
surname: "required",
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
posts() {
|
|
20
|
-
return this.hasMany("Post", "id", "user_id");
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.default = User;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const index_1 = require("../../../index");
|
|
4
|
-
const config = {
|
|
5
|
-
transaction: [],
|
|
6
|
-
serializers: [],
|
|
7
|
-
supportedLanguages: ["en-GB", "en", "tr", "de"],
|
|
8
|
-
defaultLanguage: "en-GB",
|
|
9
|
-
query: {
|
|
10
|
-
limits: [(0, index_1.allow)(index_1.QueryFeature.Sorting)],
|
|
11
|
-
},
|
|
12
|
-
};
|
|
13
|
-
exports.default = config;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.onAfterInit = exports.onBeforeInit = void 0;
|
|
13
|
-
const onBeforeInit = (app) => __awaiter(void 0, void 0, void 0, function* () { });
|
|
14
|
-
exports.onBeforeInit = onBeforeInit;
|
|
15
|
-
const onAfterInit = (app) => __awaiter(void 0, void 0, void 0, function* () { });
|
|
16
|
-
exports.onAfterInit = onAfterInit;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const config = {
|
|
4
|
-
transaction: [],
|
|
5
|
-
serializers: [],
|
|
6
|
-
supportedLanguages: ["en-GB", "en", "tr", "de"],
|
|
7
|
-
defaultLanguage: "en-GB",
|
|
8
|
-
query: {
|
|
9
|
-
limits: [],
|
|
10
|
-
},
|
|
11
|
-
};
|
|
12
|
-
exports.default = config;
|