const teamsfxSdk = require("@microsoft/teamsfx");

// Load application configuration
const teamsFx = new teamsfxSdk.TeamsFx();
// Initialize a new axios instance to call {{config.APIName}}
const authProvider = new teamsfxSdk.CertificateAuthProvider(
  // TODO: 
  // 1. Add code to read your certificate and private key.
  // 2. Replace "<your-cert>" and "<your-private-key>" with your actual certificate and private key values
  // If you have a .pfx certificate, you can use the `createPfxCertOption` function to initialize your certificate
  teamsfxSdk.createPemCertOption("<your-cert>", "<your-private-key>")
);
const {{config.APIName}}Client = teamsfxSdk.createApiClient(
  process.env.TEAMSFX_API_{{capitalName}}_ENDPOINT,
  authProvider
);
module.exports.{{config.APIName}}Client = {{config.APIName}}Client;
