Skip to main content

CRM Provider

To add a new crm provider head over to

src/services/crm/providers

create a new provider with the name [provider].service.ts

Inside the file add the following code:

import { CrmInterface } from "@github20k/services/crm/crm.interface";
import axios, { AxiosHeaders } from "axios";
import { number, object, string } from "yup";
import { AbstractServicesService } from "@github20k/services/abstract.services.service";
export class ProviderService extends AbstractServicesService implements CrmInterface
{
// required environment variables
validation = object({
PARAM: string().required(),
PARAM: number().required()
});

providerName = "provider name";

async addDeal(name: string, email: string) {
// add deal to the crm
}
}

Make sure to add the new provider name also in env.check.ts