ensend 0.0.5 → 0.0.7
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/apis/SendApi.d.ts +14 -23
- package/dist/apis/SendApi.js +2 -2
- package/package.json +1 -1
package/dist/apis/SendApi.d.ts
CHANGED
|
@@ -65,19 +65,22 @@ export declare namespace TSendApi {
|
|
|
65
65
|
type RequiresAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
|
|
66
66
|
[K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
|
|
67
67
|
}[Keys];
|
|
68
|
+
type RecipientType = string | string[] | {
|
|
69
|
+
address: string;
|
|
70
|
+
name?: string;
|
|
71
|
+
variables?: Record<string, string | number>;
|
|
72
|
+
} | Array<{
|
|
73
|
+
address: string;
|
|
74
|
+
name?: string;
|
|
75
|
+
variables?: Record<string, string | number>;
|
|
76
|
+
}>;
|
|
68
77
|
export type SendMailMessageDto<I extends readonly string[] = [], T extends readonly string[] = []> = {
|
|
69
78
|
subject: string;
|
|
70
79
|
sender: I[number] | {
|
|
71
80
|
name?: string;
|
|
72
81
|
address: I[number];
|
|
73
82
|
};
|
|
74
|
-
recipients:
|
|
75
|
-
name?: string;
|
|
76
|
-
address: string;
|
|
77
|
-
} | Array<{
|
|
78
|
-
name?: string;
|
|
79
|
-
address: string;
|
|
80
|
-
}>;
|
|
83
|
+
recipients: RecipientType;
|
|
81
84
|
replyAddress?: string;
|
|
82
85
|
attachments?: Array<{
|
|
83
86
|
name: string;
|
|
@@ -100,7 +103,7 @@ export declare namespace TSendApi {
|
|
|
100
103
|
} & RequiresAtLeastOne<{
|
|
101
104
|
message: string;
|
|
102
105
|
template: {
|
|
103
|
-
|
|
106
|
+
ref: T[number];
|
|
104
107
|
variables?: Record<string, string>;
|
|
105
108
|
};
|
|
106
109
|
}, "message" | "template">;
|
|
@@ -136,28 +139,16 @@ export declare namespace TSendApi {
|
|
|
136
139
|
} & RequiresAtLeastOne<{
|
|
137
140
|
message: string;
|
|
138
141
|
template: {
|
|
139
|
-
|
|
142
|
+
ref: T[number];
|
|
140
143
|
variables?: Record<string, string>;
|
|
141
144
|
};
|
|
142
145
|
}, "message" | "template"> & RequiresAtLeastOne<{
|
|
143
|
-
recipients:
|
|
144
|
-
name?: string;
|
|
145
|
-
address: string;
|
|
146
|
-
} | Array<{
|
|
147
|
-
name?: string;
|
|
148
|
-
address: string;
|
|
149
|
-
}>;
|
|
146
|
+
recipients: RecipientType;
|
|
150
147
|
audience: string[];
|
|
151
148
|
}>;
|
|
152
149
|
export type SendExistingMailBroadcastDto = {
|
|
153
150
|
broadcastRef: string;
|
|
154
|
-
recipients?:
|
|
155
|
-
name?: string;
|
|
156
|
-
address: string;
|
|
157
|
-
} | Array<{
|
|
158
|
-
name?: string;
|
|
159
|
-
address: string;
|
|
160
|
-
}>;
|
|
151
|
+
recipients?: RecipientType;
|
|
161
152
|
};
|
|
162
153
|
export type SendMailBroadcastResponse = HttpClientResponse<{
|
|
163
154
|
broadcast: {
|
package/dist/apis/SendApi.js
CHANGED
|
@@ -46,7 +46,7 @@ export class SendApi {
|
|
|
46
46
|
async SendMailBroadcast(dto) {
|
|
47
47
|
return this.http({
|
|
48
48
|
method: "POST",
|
|
49
|
-
path: "/send/mail/
|
|
49
|
+
path: "/send/mail/broadcast",
|
|
50
50
|
body: dto,
|
|
51
51
|
});
|
|
52
52
|
}
|
|
@@ -65,7 +65,7 @@ export class SendApi {
|
|
|
65
65
|
async SendExistingMailBroadcast(dto) {
|
|
66
66
|
return this.http({
|
|
67
67
|
method: "POST",
|
|
68
|
-
path: "/send/mail/
|
|
68
|
+
path: "/send/mail/broadcast",
|
|
69
69
|
body: dto,
|
|
70
70
|
});
|
|
71
71
|
}
|