feat: add Signalwire integration

This commit is contained in:
Sebastian Schumann
2023-02-24 03:39:25 +01:00
parent 831ae96e0f
commit d7e4ae53ce
19 changed files with 286 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
import { TBeforeRequest } from '@automatisch/types';
const addAuthHeader: TBeforeRequest = ($, requestConfig) => {
if (
requestConfig.headers &&
$.auth.data?.accountSid &&
$.auth.data?.authToken
) {
requestConfig.headers['Content-Type'] = 'application/x-www-form-urlencoded';
requestConfig.auth = {
username: $.auth.data.accountSid as string,
password: $.auth.data.authToken as string,
};
}
return requestConfig;
};
export default addAuthHeader;