@nomalism-com/types 0.46.26 → 0.46.28

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,31 @@
1
+ import { SmsTemplate } from '../../../shared/entities/sms';
2
+ import * as IShared from '../../../shared/interface';
3
+ export type Entity = SmsTemplate;
4
+ export declare const Route = "sms_template";
5
+ export interface IEntity extends Entity {
6
+ }
7
+ export type SmsTemplateVariables = Record<string, string | number | boolean>;
8
+ export interface ICreateRequest {
9
+ key: string;
10
+ name: string;
11
+ message: string;
12
+ variables?: SmsTemplateVariables;
13
+ created_by: string;
14
+ updated_by: string;
15
+ }
16
+ export interface IUpdateRequest {
17
+ name?: string;
18
+ message?: string;
19
+ variables?: SmsTemplateVariables;
20
+ updated_by: string;
21
+ }
22
+ export interface IRepository {
23
+ find(): Promise<IEntity[]>;
24
+ findById(id: string): Promise<Entity>;
25
+ findByKey(key: string): Promise<Entity>;
26
+ create(data: ICreateRequest): Promise<string>;
27
+ update(selector: IShared.IFindByIdRequest, data: IUpdateRequest): Promise<void>;
28
+ deleteOne(selector: IShared.IFindByIdRequest): Promise<void>;
29
+ }
30
+ export type IController = IShared.IEntityWithUserToken<IRepository>;
31
+ export type IApi = IRepository;
@@ -0,0 +1,5 @@
1
+ import joi from 'joi';
2
+ export declare const createBody: joi.ObjectSchema<any>;
3
+ export declare const updateBody: joi.ObjectSchema<any>;
4
+ export declare const idParam: joi.ObjectSchema<any>;
5
+ export declare const keyParam: joi.ObjectSchema<any>;
@@ -14,3 +14,18 @@ export type SmsSender = {
14
14
  processed_at: Date | null;
15
15
  sent_at: Date | null;
16
16
  };
17
+ /**
18
+ * Model SmsTemplate
19
+ *
20
+ */
21
+ export type SmsTemplate = {
22
+ id: string;
23
+ key: string;
24
+ name: string;
25
+ message: string;
26
+ variables: unknown;
27
+ created_at: Date;
28
+ updated_at: Date;
29
+ created_by: string;
30
+ updated_by: string;
31
+ };
@@ -313,6 +313,8 @@ export type DocumentHeader = {
313
313
  delivery_departure_street: string | null;
314
314
  delivery_departure_locality: string | null;
315
315
  delivery_departure_postal_code: string | null;
316
+ delivery_departure_country_id: string | null;
317
+ delivery_departure_country_name: string | null;
316
318
  delivery_method_id: string | null;
317
319
  delivery_method: string | null;
318
320
  vehicle_id: string | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nomalism-com/types",
3
3
  "description": "A nomalism package with all necessary types and validations for developing APIs",
4
- "version": "0.46.26",
4
+ "version": "0.46.28",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",