law-common 1.0.5 → 1.0.6

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.
@@ -0,0 +1,6 @@
1
+ export interface IBaseResponse<T> {
2
+ success: boolean;
3
+ statusCode: number;
4
+ data: T;
5
+ timeStamp: string;
6
+ }
@@ -0,0 +1,4 @@
1
+ export interface ITaskCreateDto {
2
+ name: string;
3
+ description?: string;
4
+ }
@@ -0,0 +1,6 @@
1
+ import { TaskStatusEnum } from "../../entities/enums/task.entity.enum";
2
+ export interface ITaskUpdateDto {
3
+ name?: string;
4
+ description?: string;
5
+ status?: TaskStatusEnum;
6
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum TaskStatusEnum {
2
+ active = "active",
3
+ deactive = "deactive",
4
+ deleted = "deleted"
5
+ }
@@ -0,0 +1,8 @@
1
+ import { Modify } from "../../misc/interface/modify.interface";
2
+ export declare function ConvertToCommonEntity<T extends {
3
+ createdOn: Date;
4
+ updatedOn: Date;
5
+ }, R extends Modify<T, {
6
+ createdOn: string;
7
+ updatedOn: string;
8
+ }>>(obj: T): R;
@@ -0,0 +1,6 @@
1
+ export interface IAuditColumnEntity {
2
+ createdOn: Date;
3
+ updatedOn: Date;
4
+ createdBy: number;
5
+ updatedBy: number;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { Modify } from "../../misc/interface/modify.interface";
2
+ export type IModifyEntity<T> = Modify<T, {
3
+ createdOn: string;
4
+ updatedOn: string;
5
+ }>;
@@ -0,0 +1,8 @@
1
+ import { TaskStatusEnum } from "../enums/task.entity.enum";
2
+ import { IAuditColumnEntity } from "./audit-column.entity.interface";
3
+ export interface ITaskEntity extends IAuditColumnEntity {
4
+ id: number;
5
+ name: string;
6
+ description: string;
7
+ status: TaskStatusEnum;
8
+ }
@@ -0,0 +1,9 @@
1
+ export interface IValidationErrors {
2
+ [key: string]: string[];
3
+ }
4
+ export interface IErrorResponse {
5
+ success: boolean;
6
+ statusCode: number;
7
+ data: IValidationErrors;
8
+ timeStamp: string;
9
+ }
@@ -0,0 +1,4 @@
1
+ export type IAppBadRequestException = {
2
+ key: string;
3
+ message: string[];
4
+ };
@@ -0,0 +1,2 @@
1
+ export * from './exceptions/interface/error.response';
2
+ export * from './api/interface/base.response.interface';
@@ -0,0 +1 @@
1
+ export type Modify<T, R> = Omit<T, keyof R> & R;
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "law-common",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
package/tsconfig.json CHANGED
@@ -50,7 +50,7 @@
50
50
  // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
51
51
 
52
52
  /* Emit */
53
- // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
53
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
54
54
  // "declarationMap": true, /* Create sourcemaps for d.ts files. */
55
55
  // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
56
56
  // "sourceMap": true, /* Create source map files for emitted JavaScript files. */