@maioradv/nestjs-core 1.3.3 → 1.3.5

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.
@@ -11,7 +11,7 @@ const ApiResponseWithRels = (options, relations) => {
11
11
  ...rest,
12
12
  schema: {
13
13
  title: `${Model.name}`,
14
- allOf: [
14
+ [rest.isArray ? 'multipleOf' : 'allOf']: [
15
15
  { $ref: (0, swagger_1.getSchemaPath)(Model) },
16
16
  {
17
17
  properties: properties
@@ -1,18 +1,22 @@
1
1
  import { ConfigService } from "@nestjs/config";
2
2
  import { SentMessageInfo, Transporter } from "nodemailer";
3
- /** From email as email or ['From Name',email]
4
- * @example user@email.com
5
- * @example ['User Name','user@email.com']
6
- */
7
3
  export type MailingAddress = string | [string, string];
8
- export type ReceiverAddress = MailingAddress[];
4
+ export type ReceiverAddress = string | string[];
9
5
  export declare class MailerService {
10
6
  private readonly config;
11
7
  readonly client: Transporter<SentMessageInfo>;
12
8
  private sdkConfigs;
13
9
  constructor(config: ConfigService);
14
10
  sendMail({ from, to, subject, html, text, }: {
11
+ /** From email as email or ['From Name',email]
12
+ * @example 'user@email.com'
13
+ * @example ['User Name','user@email.com']
14
+ */
15
15
  from: MailingAddress;
16
+ /** From email as email or ['From Name',email]
17
+ * @example 'user@email.com'
18
+ * @example ['user1@email.com','user2@email.com']
19
+ */
16
20
  to: ReceiverAddress;
17
21
  subject: string;
18
22
  html: string;
@@ -24,7 +24,7 @@ let MailerService = class MailerService {
24
24
  async sendMail({ from, to, subject, html, text, }) {
25
25
  return this.client.sendMail({
26
26
  from: Array.isArray(from) ? `"${from[0]}" <${from[1]}>` : from,
27
- to: to.map(a => Array.isArray(a) ? `"${a[0]}" <${a[1]}>` : a).join(', '),
27
+ to: Array.isArray(to) ? to.join(', ') : to,
28
28
  subject,
29
29
  text,
30
30
  html,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maioradv/nestjs-core",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
4
4
  "description": "NestJS helpers by MaiorADV",
5
5
  "repository": "https://github.com/maioradv/nestjs-core.git",
6
6
  "author": "Maior ADV Srl",