@nomalism-com/types 0.42.2 → 0.42.4

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/dist/index.cjs CHANGED
@@ -4922,12 +4922,14 @@ var createBodyKeys55 = {
4922
4922
  })
4923
4923
  ).required(),
4924
4924
  key: joi87.string().required(),
4925
- rapid: joi87.boolean().required()
4925
+ rapid: joi87.boolean().required(),
4926
+ variables: joi87.array().items(joi87.string()).required()
4926
4927
  };
4927
4928
  var createBody56 = joi87.object().keys(createBodyKeys55).messages(messages);
4928
4929
  var updateBodyKeys51 = {
4929
4930
  name: joi87.string().optional(),
4930
- body: joi87.string().optional()
4931
+ body: joi87.string().optional(),
4932
+ variables: joi87.array().items(joi87.string()).optional()
4931
4933
  };
4932
4934
  var updateBody51 = joi87.object().keys(updateBodyKeys51).messages(messages);
4933
4935
  var sendBodyKeys = {
@@ -4959,7 +4961,8 @@ var sendBodyKeys = {
4959
4961
  filename: joi87.string().required(),
4960
4962
  path: joi87.string().required()
4961
4963
  })
4962
- ).required()
4964
+ ).required(),
4965
+ variables: joi87.array().items(joi87.string()).required()
4963
4966
  };
4964
4967
  var sendBody = joi87.object().keys(sendBodyKeys).messages(messages);
4965
4968
 
package/dist/index.js CHANGED
@@ -4922,12 +4922,14 @@ var createBodyKeys55 = {
4922
4922
  })
4923
4923
  ).required(),
4924
4924
  key: joi87.string().required(),
4925
- rapid: joi87.boolean().required()
4925
+ rapid: joi87.boolean().required(),
4926
+ variables: joi87.array().items(joi87.string()).required()
4926
4927
  };
4927
4928
  var createBody56 = joi87.object().keys(createBodyKeys55).messages(messages);
4928
4929
  var updateBodyKeys51 = {
4929
4930
  name: joi87.string().optional(),
4930
- body: joi87.string().optional()
4931
+ body: joi87.string().optional(),
4932
+ variables: joi87.array().items(joi87.string()).optional()
4931
4933
  };
4932
4934
  var updateBody51 = joi87.object().keys(updateBodyKeys51).messages(messages);
4933
4935
  var sendBodyKeys = {
@@ -4959,7 +4961,8 @@ var sendBodyKeys = {
4959
4961
  filename: joi87.string().required(),
4960
4962
  path: joi87.string().required()
4961
4963
  })
4962
- ).required()
4964
+ ).required(),
4965
+ variables: joi87.array().items(joi87.string()).required()
4963
4966
  };
4964
4967
  var sendBody = joi87.object().keys(sendBodyKeys).messages(messages);
4965
4968
 
@@ -6,8 +6,8 @@ export declare const Route = "email_template";
6
6
  export declare const UpperName = "EmailTemplate";
7
7
  export declare const LowerName: string;
8
8
  export interface IEntityExtended extends Entity {
9
- to: string;
10
- subject: string;
9
+ to?: string;
10
+ subject?: string;
11
11
  attachments: EmailTemplateAttachment[];
12
12
  }
13
13
  export interface ICreateAttachments {
@@ -20,10 +20,12 @@ export interface ICreateRequest {
20
20
  attachments: ICreateAttachments[];
21
21
  key: string;
22
22
  rapid: boolean;
23
+ variables: string[];
23
24
  }
24
25
  export interface IUpdateRequest {
25
26
  name?: string;
26
27
  body?: string;
28
+ variables?: string[];
27
29
  }
28
30
  export interface ISendRequest {
29
31
  owner_id: string | null;
@@ -34,6 +36,7 @@ export interface ISendRequest {
34
36
  subject: string;
35
37
  html: string;
36
38
  attachments: IEmailAttachment[];
39
+ variables: string[];
37
40
  }
38
41
  export interface IRepository {
39
42
  find(): Promise<IEntityExtended[]>;
@@ -98,6 +98,7 @@ export type EmailTemplate = {
98
98
  body: string;
99
99
  key: string;
100
100
  rapid: Boolean;
101
+ variables: string[];
101
102
  created_by: string;
102
103
  updated_by: string;
103
104
  created_at: Date;
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.42.2",
4
+ "version": "0.42.4",
5
5
  "author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
6
6
  "license": "UNLICENSED",
7
7
  "type": "module",