@nomalism-com/types 0.21.73 → 0.21.75

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.
@@ -20,7 +20,7 @@ export interface ICloneRequest {
20
20
  export interface ICloneResponse {
21
21
  spreadsheetId: string;
22
22
  }
23
- export type IGetProductGroup = "cortinado" | "estore" | "tapete" | "outros" | "estofo" | "almofada" | "papel" | "terceiros";
23
+ export type IGetProductGroup = "cortinado" | "tapete" | "estore" | "estofo" | "almofada" | "outros" | "calhas&varões" | "papel" | "varoes" | "terceiros";
24
24
  export type IGetProductType = "confecção" | "calha" | "tecido 1" | "tecido 2" | "varoes" | "livre" | "papel";
25
25
  export type IReferenceType = "noma" | "sheets" | undefined;
26
26
  export interface IGetProduct {
@@ -0,0 +1,19 @@
1
+ import * as IShared from "../../../shared/interface";
2
+ import { Task, TaskMessage } from "../../../shared/entities";
3
+ export type Entity = Task;
4
+ export declare const Route = "task";
5
+ export declare const UpperName = "Task";
6
+ export declare const LowerName: string;
7
+ export type ICreateRequest = Pick<Entity, "from" | "to" | "task">;
8
+ export type IUpdateRequest = Pick<Entity, "from" | "to" | "task" | "read" | "archived">;
9
+ export interface IFindWithMessagesResponse extends Entity {
10
+ messages: TaskMessage[];
11
+ }
12
+ export interface IRepository {
13
+ find(): Promise<Entity[]>;
14
+ findWithMessages(id: IShared.IFindByIdRequest): Promise<IFindWithMessagesResponse>;
15
+ create(data: ICreateRequest): Promise<Entity>;
16
+ update(id: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<Entity>;
17
+ delete(id: IShared.IFindByIdRequest): Promise<void>;
18
+ }
19
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -0,0 +1,3 @@
1
+ import joi from "joi";
2
+ export declare const createBody: joi.ObjectSchema<any>;
3
+ export declare const updateBody: joi.ObjectSchema<any>;
@@ -0,0 +1,14 @@
1
+ import * as IShared from "../../../shared/interface";
2
+ import { TaskMessage } from "../../../shared/entities";
3
+ export type Entity = TaskMessage;
4
+ export declare const Route = "task_message";
5
+ export declare const UpperName = "Task";
6
+ export declare const LowerName: string;
7
+ export type ICreateRequest = Pick<Entity, "message" | "task_id">;
8
+ export type IUpdateRequest = Pick<Entity, "message" | "task_id">;
9
+ export interface IRepository {
10
+ create(data: ICreateRequest): Promise<Entity>;
11
+ update(id: string, data: IUpdateRequest): Promise<Entity>;
12
+ delete(id: IShared.IFindByIdRequest): Promise<void>;
13
+ }
14
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
@@ -0,0 +1,3 @@
1
+ import joi from "joi";
2
+ export declare const createBody: joi.ObjectSchema<any>;
3
+ export declare const updateBody: joi.ObjectSchema<any>;
@@ -130,3 +130,5 @@ export import GoogleSheetImports = Stock.GoogleSheetImports;
130
130
  export import DocumentLineNote = Stock.DocumentLineNote;
131
131
  export import SavedProviderProposal = Stock.SavedProviderProposal;
132
132
  export import EmailVerification = Integration.EmailVerification;
133
+ export import Task = Stock.Task;
134
+ export import TaskMessage = Stock.TaskMessage;
@@ -1236,3 +1236,24 @@ export type SavedProviderProposal = {
1236
1236
  created_by: string;
1237
1237
  updated_by: string;
1238
1238
  };
1239
+ export interface TaskMessage {
1240
+ id: string;
1241
+ message: string;
1242
+ task_id: string;
1243
+ created_at: Date;
1244
+ updated_at: Date;
1245
+ created_by: string;
1246
+ updated_by: string;
1247
+ }
1248
+ export interface Task {
1249
+ id: string;
1250
+ from: string;
1251
+ to: string;
1252
+ task: string;
1253
+ read: string;
1254
+ archived: string;
1255
+ created_at: Date;
1256
+ updated_at: Date;
1257
+ created_by: string;
1258
+ updated_by: string;
1259
+ }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "typescript",
10
10
  "helper"
11
11
  ],
12
- "version": "0.21.73",
12
+ "version": "0.21.75",
13
13
  "main": "./dist/index.min.js",
14
14
  "types": "./dist/index.d.ts",
15
15
  "files": [