@nomalism-com/types 0.11.16 → 0.11.18
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.
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import joi from 'joi';
|
|
2
|
-
import { ICreateRequest, IUpdateRequest } from './interfaces';
|
|
2
|
+
import { ICreateRequest, IUpdateRequest, ISendRequest } from './interfaces';
|
|
3
3
|
import * as IShared from '../../../shared/interface';
|
|
4
4
|
export declare const createBodyKeys: IShared.IRouteRequest<ICreateRequest>;
|
|
5
5
|
export declare const createBody: joi.ObjectSchema<any>;
|
|
6
6
|
export declare const updateBodyKeys: IShared.IRouteRequest<IUpdateRequest>;
|
|
7
7
|
export declare const updateBody: joi.ObjectSchema<any>;
|
|
8
|
+
export declare const sendBodyKeys: IShared.IRouteRequest<ISendRequest>;
|
|
9
|
+
export declare const sendBody: joi.ObjectSchema<any>;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.updateBody = exports.updateBodyKeys = exports.createBody = exports.createBodyKeys = void 0;
|
|
6
|
+
exports.sendBody = exports.sendBodyKeys = exports.updateBody = exports.updateBodyKeys = exports.createBody = exports.createBodyKeys = void 0;
|
|
7
7
|
var joi_1 = __importDefault(require("joi"));
|
|
8
8
|
var messages_1 = require("../../../shared/messages");
|
|
9
9
|
exports.createBodyKeys = {
|
|
@@ -20,3 +20,18 @@ exports.updateBodyKeys = {
|
|
|
20
20
|
body: joi_1.default.string().optional(),
|
|
21
21
|
};
|
|
22
22
|
exports.updateBody = joi_1.default.object().keys(exports.updateBodyKeys).messages(messages_1.messages);
|
|
23
|
+
var sendBodyAttachments = {
|
|
24
|
+
multimedia_id: joi_1.default.string().uuid().required(),
|
|
25
|
+
name: joi_1.default.string().required(),
|
|
26
|
+
};
|
|
27
|
+
exports.sendBodyKeys = {
|
|
28
|
+
name: joi_1.default.string().optional(),
|
|
29
|
+
to: joi_1.default.string().optional(),
|
|
30
|
+
subject: joi_1.default.string().optional(),
|
|
31
|
+
body: joi_1.default.string().optional(),
|
|
32
|
+
attachments: joi_1.default
|
|
33
|
+
.array()
|
|
34
|
+
.items(joi_1.default.object().keys(sendBodyAttachments).required())
|
|
35
|
+
.required(),
|
|
36
|
+
};
|
|
37
|
+
exports.sendBody = joi_1.default.object().keys(exports.updateBodyKeys).messages(messages_1.messages);
|
|
@@ -31,7 +31,7 @@ export interface IDispatchSchedulePrintJobResponse {
|
|
|
31
31
|
export interface IRepository {
|
|
32
32
|
dispatchSchedulePrintJob: (data: IDispatchSchedulePrintJobRequest) => Promise<IDispatchSchedulePrintJobResponse>;
|
|
33
33
|
findByOwner: (data: IShared.IFindByOwnerIdRequest) => Promise<Entity[]>;
|
|
34
|
-
create: (data: ICreateSchedulePrintJobRequest) => Promise<
|
|
34
|
+
create: (data: ICreateSchedulePrintJobRequest) => Promise<void>;
|
|
35
35
|
deleteOne: (params: IShared.IFindByIdRequest) => Promise<void>;
|
|
36
36
|
}
|
|
37
37
|
export type IController = IShared.IEntityWithUserToken<IRepository>;
|