platform-clientdeprecated

A simple client to manage organizations in the Coveo Cloud Platform.

Usage no npm install needed!

<script type="module">
  import platformClient from 'https://cdn.skypack.dev/platform-client';
</script>

README

Coveo-Platform-Client Build Status codecov TypeScript code style: prettier

A simple client to manage organizations in the Coveo Cloud Platform.

Description

This repository contains a command line tool to perform administrative tasks in the Coveo Cloud Platform. It also allows automation of tasks that previously had to be done manually, like graduating the configuration from organizations in a different stage (ex.: dev, uat, prod).

How-to build

You should have node 6.9.1 (or later) installed to build this project.

npm install -g gulp
npm install
gulp

How-to run

In order to run the tool, you will need 2 things:

  1. At least 2 organizations
  2. API keys for each organizations with the proper privileges

Make sure you were able to run gulp entirely without any errors first. Then, run node index.js --help from the bin folder. The help screen will be displayed and will list the available commands.

To get help regarding a specific command, run node index.js <command_name> --help, for example node index.js graduate-fields --help. You will get detailed help regarding the different parameters.

Interactive Command

You can always run the interactive command with node index.js interactive

Alt Text

Here is an exmaple of the field graduation between 2 orgs with the command node index.js graduate-fields <org_1_id> <org_2_id> <org_1_key> <org_2_key> -l verbose.

Important Gulp Tasks

  • gulp default: Builds the entire project
  • gulp dev: Starts a nodemon dev server for the project.
  • gulp devTest: Starts a nodemon dev server for the tests.
  • gulp test: Builds and runs the unit tests and saves the coverage.

Dev

gulp dev

This will start nodemon dev server instance. Any time you hit Save in a source file, the bundle will be recompiled to the bin folder.

Tests

Tests are written using MochaJS. You can use npm run test to run the tests.

If you wish to write new unit tests, you can do so by starting a new nodemon dev instance.

To start the server, run gulp devTest.

Every time you hit Save in a source file or in a test file, the dev server will reload and re-run your tests.

Code coverage will be reported in ./coverage

Available Coveo documentation

The code for the projects uses APIs, SDKs, and code from the Coveo Platform. You can use the following resources for more information and get started:

It's also built on nodejs/typescript.

Contributing

  • Branch
  • Pull request to default putting at least 2 reviewers and at least 1 reviewer in coveo or ancientwinds.
  • Simple as that!

The Coveo Team will look at your code and validate that :

  • The guidelines are respected
  • You didn’t forget any API key or password in it
  • There is no malicious code

Authors