Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
include .env

# export values in .env to be used in the shell scripts
export $(shell sed 's/=.*//' .env)

default:
$(MAKE) build

deps:
cd code && npm ci
.PHONY: deps

build: deps
cd code && npm run build
.PHONY: build

auth:
devrev profiles authenticate --org $(DEV_ORG) --usr $(USER_EMAIL) --expiry 7 # days

.PHONY: auth

deploy: auth
./code/scripts/deploy.sh
.PHONY: deploy

# Removes the latest snap-in from the org. This is useful when you want to
# re-deploy the same snap-in to the same org.
uninstall:
./code/scripts/cleanup.sh
.PHONY: uninstall
138 changes: 124 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,124 @@
## Partner Workshop Submission

1. Clone this repo: https://github.com/devrev/partner-workshop-submissions
2. Create a branch locally: git commit -b CustomerName_YourName_ProblemStatementNumber
3. Add your code folder here.
4. Commit and Push your code
5. Raise a PR from your branch to main

Also, Dashboard is part of Snap-in, so it doesn’t need any other code repo.
Guidelines:
- You just need to share the code repo with the snap-in. The dashboard should be part of the snap-in only.
- Screenshots of the setup and documentation are not required.
- There are no additional requirements.
- You should put the code in the repo and share it with us.
# Gong API Integration Project

This repository contains a Chef cookbook for managing infrastructure configurations with Gong API integration. The project enables seamless integration between Gong's AI-powered conversation analytics platform and your infrastructure management system.

## Features

- Gong API integration for call data retrieval and analysis
- Secure authentication and data handling
- Automated data synchronization
- Custom data extraction and loading functions
- Domain mapping for efficient data organization

## Prerequisites

1. Install [Chef Workstation](https://docs.chef.io/workstation/install_workstation/)
2. Install [Git](https://git-scm.com/downloads)
3. Gong API credentials (Access Key and Secret Key)
4. Node.js and npm (for API integration components)

## Project Structure

```
.
├── my_cookbook/ # Main cookbook directory
├── code/ # Gong API integration code
│ ├── src/ # Source code
│ ├── scripts/ # Utility scripts
│ └── test/ # Test files
├── .github/ # GitHub Actions workflows
├── .env.example # Example environment variables
├── Makefile # Build and deployment automation
├── manifest.yaml # Project manifest
└── metadata.json # Project metadata
```

## Getting Started

1. Clone the repository:
```bash
git clone <repository-url>
cd gong_project
```

2. Set up your environment:
- Copy `.env.example` to `.env`
- Update the environment variables in `.env` with your specific values:
- GONG_ACCESS_KEY
- GONG_SECRET_KEY
- GONG_ACCOUNT_ID
- Other required configuration values

3. Build the cookbook:
```bash
make build
```

4. Deploy the cookbook:
```bash
make deploy
```

## Gong API Integration

### Available Functions

- `retrieve_gong_data`: Retrieves and searches Gong call data while preserving user permissions
- `gongDataLoading`: Loads Gong data using Airdrop technology
- `extraction`: Handles data extraction from Gong API
- `loading`: Manages data loading and integration

### Authentication

The project uses secure authentication methods for Gong API access:
- API credentials are stored securely in environment variables
- Token-based authentication with automatic refresh
- User permission preservation

## Development

### Adding New Recipes

1. Create a new recipe file in `my_cookbook/recipes/`
2. Add the recipe to the cookbook's metadata
3. Update the default recipe if needed

### Testing

Run tests using:
```bash
make test
```

## Common Issues

#### Q: Build fails with dependency errors
A: Ensure all required cookbook dependencies are properly specified in the metadata.rb file

#### Q: Deployment fails with authentication errors
A: Verify your Gong API credentials are properly configured in your environment

#### Q: Environment variables not being picked up
A: Make sure you've copied `.env.example` to `.env` and filled in all required values

#### Q: Gong API connection issues
A: Check your API credentials and ensure your network allows access to Gong's API endpoints

## Contributing

1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Support

For issues related to:
- Gong API integration: Contact the development team
- Chef cookbook: Refer to the Chef documentation
- General project issues: Open an issue in the repository
4 changes: 4 additions & 0 deletions code/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
.env
extracted_files
1 change: 1 addition & 0 deletions code/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
1 change: 1 addition & 0 deletions code/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist/**/*
15 changes: 15 additions & 0 deletions code/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxSingleQuote": false,
"arrowParens": "always",
"proseWrap": "never",
"htmlWhitespaceSensitivity": "strict",
"endOfLine": "lf",
"organizeImportsSkipDestructiveCodeActions": true
}
6 changes: 6 additions & 0 deletions code/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
'@babel/preset-typescript',
],
};
4 changes: 4 additions & 0 deletions code/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
6 changes: 6 additions & 0 deletions code/nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"execMap": {
"ts": "ts-node",
"watch": ["src"]
}
}
Loading