Mati OS
NNovu
•Created by Mati OS on 7/29/2024 in #💬│support
Override providers from nodejs code
Yes! The type deffined in events.interface.d.ts(10, 5) for
for email are
but for sms are
sms is missing
overrides
key are:
export interface IBroadcastPayloadOptions {
payload: ITriggerPayload;
overrides?: ITriggerOverrides; // this line
tenant?: ITriggerTenant;
transactionId?: string;
}
ITriggerOverrides = {
[key in 'mailgun' | 'nodemailer' | 'plivo' | 'postmark' | 'sendgrid' | 'twilio']?: object;
} & {
[key in 'fcm']?: ITriggerOverrideFCM;
} & {
[key in 'apns']?: ITriggerOverrideAPNS;
} & {
[key in 'expo']?: ITriggerOverrideExpo;
} & {
[key in 'delay']?: ITriggerOverrideDelayAction;
} & {
[key in 'layoutIdentifier']?: string;
} & {
[key in 'email']?: IEmailOverrides; // this line
} & {
[key in 'sms']?: ITriggerOverrideSMS; // this line
} & {
[key in SmsProviderIdEnum]?: ITriggerOverrideSMS;
} & {
[key in 'whatsapp']?: IWhatsappOverrides;
};
export interface IBroadcastPayloadOptions {
payload: ITriggerPayload;
overrides?: ITriggerOverrides; // this line
tenant?: ITriggerTenant;
transactionId?: string;
}
ITriggerOverrides = {
[key in 'mailgun' | 'nodemailer' | 'plivo' | 'postmark' | 'sendgrid' | 'twilio']?: object;
} & {
[key in 'fcm']?: ITriggerOverrideFCM;
} & {
[key in 'apns']?: ITriggerOverrideAPNS;
} & {
[key in 'expo']?: ITriggerOverrideExpo;
} & {
[key in 'delay']?: ITriggerOverrideDelayAction;
} & {
[key in 'layoutIdentifier']?: string;
} & {
[key in 'email']?: IEmailOverrides; // this line
} & {
[key in 'sms']?: ITriggerOverrideSMS; // this line
} & {
[key in SmsProviderIdEnum]?: ITriggerOverrideSMS;
} & {
[key in 'whatsapp']?: IWhatsappOverrides;
};
export interface IIntegrationOverride {
integrationIdentifier?: string;
}
export interface IEmailOverrides extends IIntegrationOverride {
to?: string[];
from?: string;
text?: string;
replyTo?: string;
cc?: string[];
bcc?: string[];
senderName?: string;
customData?: Record<string, any>;
headers?: Record<string, string>;
}
export interface IIntegrationOverride {
integrationIdentifier?: string;
}
export interface IEmailOverrides extends IIntegrationOverride {
to?: string[];
from?: string;
text?: string;
replyTo?: string;
cc?: string[];
bcc?: string[];
senderName?: string;
customData?: Record<string, any>;
headers?: Record<string, string>;
}
export type ITriggerOverrideSMS = {
to?: string;
content?: string;
from?: string;
customData?: Record<string, any>;
};
export type ITriggerOverrideSMS = {
to?: string;
content?: string;
from?: string;
customData?: Record<string, any>;
};
integrationIdentifier
.
Not sure if this is a type error or a missing functionality4 replies