@vasrefil/api-toolkit 1.5.0 → 1.5.1

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,4 +1,16 @@
1
1
  import { ServiceRespI, TransactionI, UserI } from '../interfaces';
2
+ interface GoMailerEmailPayload {
3
+ template_code: string;
4
+ recipient_email: string;
5
+ bcc?: string;
6
+ html?: string;
7
+ data?: object;
8
+ }
9
+ export interface GoMailerEventPayload {
10
+ event_code: string;
11
+ contact_email: string;
12
+ context: object;
13
+ }
2
14
  declare class GoMailerUtil_ {
3
15
  send_event: (dto: {
4
16
  serviceResponse: ServiceRespI;
@@ -8,12 +20,8 @@ declare class GoMailerUtil_ {
8
20
  user: UserI;
9
21
  transaction: TransactionI;
10
22
  }) => Promise<void>;
11
- trigger_event: (payload: {
12
- event_code: string;
13
- contact_email: string;
14
- context: any;
15
- }) => Promise<any>;
16
- send_transactional_email: (payload: any) => Promise<any>;
23
+ trigger_event: (payload: GoMailerEventPayload) => Promise<any>;
24
+ send_transactional_email: (payload: GoMailerEmailPayload) => Promise<any>;
17
25
  }
18
26
  declare const GoMailerUtil: GoMailerUtil_;
19
27
  export { GoMailerUtil };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vasrefil/api-toolkit",
3
3
  "description": "This is Vasrefil API toolkit",
4
- "version": "1.5.0",
4
+ "version": "1.5.1",
5
5
  "author": "Sodiq Alabi",
6
6
  "main": "dist/public-api.js",
7
7
  "types": "dist/public-api.d.ts",