open-index/open-npm huggingface dataset:
npm package: @freshworks/api-sdk
Description: Node.js SDK for Freshworks HTTP APIs
Author: Freshworks Inc
Latest version: 0.3.0

# Freshworks API SDK

Node.js SDK for working with Freshworks HTTP APIs. Currently supports Freshteam and partially supports Freshservice.

## Installation

```sh
npm install --save @freshworks/api-sdk
```

## Supported product APIs

| Product      | Status |
| ------------ | ------ |
| Freshteam    | ✅     |
| Freshservice | 🏁     |

🏁 - Partially supported services

## Get started

This section depicts example of using different API capabilities offered with examples

### Freshteam

This section depicts example of interacting with Freshteam API

```js
const { Freshteam } = require("@freshworks/api-sdk");

const ft = new Freshteam(domain, apiKey);
```

Call a method, e.g., list all employees (who match a search criteria):

```js
const res = await ft.employees.list({ first_name: "Arthur", last_name: "Dent" });
// Access the response body as an Array of `Employee` objects
const employees = res.json();
```

### Freshservice

This section depicts example of interacting with Freshservice API

```js
const { Freshservice } = require("@freshworks/api-sdk");

const fs = new Freshservice(domain, apiKey);
```

Call a method, e.g., fetch a Freshservice Ticket

```js
// Get a tick with given ticket ID
const res = await fs.tickets.get(14000239432);
// Access the response body as a `Ticket` object
const ticket = res.json();
```

## Documentation

- [**Freshworks API SDK documentation**](https://developers.freshworks.com/api-sdk/)
- [Sample code](https://github.com/freshworks-developers/api-sdk-samples)

---

## License

MIT
npm package: @freshworks/banner
Description: Banner component in Nucleus
Latest version: 0.18.1

@freshworks/banner
==============================================================================
[![npm version](https://badge.fury.io/js/%40freshworks%2Fbanner.svg)](https://www.npmjs.com/package/@freshworks/banner)
![npm](https://img.shields.io/npm/dm/@freshworks/banner)

```sh
ember install @freshworks/banner
```

Banners in Freshdesk
------------------------------------------------------------------------------
Banners display information at the top of the screen and alert the user about effects on further usage of the product due to a particular activity, functionality or product-wide status information.

Scenario
------------------------------------------------------------------------------
Banners persist until the related issue ends (not dismissable unlike notifications). Due to their location on the top, the rest of the UI is pushed below relatively during their appearance.
npm package: @freshworks/button
Description: Button component in Nucleus
Latest version: 0.19.1

@freshworks/button
==============================================================================
[![npm version](https://badge.fury.io/js/%40freshworks%2Fbutton.svg)](https://www.npmjs.com/package/@freshworks/button)
![npm](https://img.shields.io/npm/dm/@freshworks/button)

```
ember install @freshworks/button
```

Buttons in Freshdesk
------------------------------------------------------------------------------
Buttons means operation or series of operations. Buttons are interactive components that the users can click or touch to trigger corresponding business logic. 

Scenario
------------------------------------------------------------------------------
There are several button variants used throughout the product. They are used in pages such as articles, forms, wizards and perform actions such as saving, cancelling or sending, or call users to those actions. 

Guidelines
------------------------------------------------------------------------------
**DO’s**

1. Label button with what action it triggers.
2. Choose appropriate button for the context.
3. Use primary button for the primary/important action of the page.
4. Use secondary buttons as default buttons.
5. Use link buttons as tertiary buttons for less prominent actions.
6. Use consistent button placement and direction for a user journey.
7. Use button against a contrast background and have essential white space around the button.

**DONT’s**

1. Avoid using too many buttons in one page. 
2. Button copy shouldn’t be too wordy.
3. Don’t use more than one primary button in a page.
4. Don’t use buttons instead of tabs.
5. Don’t trigger the action without alerting the user for destructive buttons. 
6. Don’t use destructive buttons for all delete/ cancellation scenarios. More applicable for actions which involves deleting the data permanently.
7. Don’t enable primary button before all mandatory fields are filled.
npm package: @freshworks/core
Description: Nucleus::Core - SCSS styles & helpers
Latest version: 0.15.1

@freshworks/core
==============================================================================
[![npm version](https://badge.fury.io/js/%40freshworks%2Fcore.svg)](https://www.npmjs.com/package/@freshworks/core)
![npm](https://img.shields.io/npm/dm/@freshworks/core)

```
ember install @freshworks/core
```

Contains the core design modules of Freshworks DSM:

1. variables
2. animations
3. utilities

To import these stylesheets in your host app, add any/all of the following to your `app.scss` as per your requirement.

```css
@import "nucleus/variables";
@import "nucleus/animations";
@import "nucleus/utilities";
```

To import them in another dependent addon (e.g @freshdesk/button), add the following to the addon's `index.js`:

```js
treeForAddonStyles(tree) {
  let coreStyleTree = new Funnel(this.getCoreStylesPath(), {
    destDir: 'nucleus'
  });
  return mergeTrees([coreStyleTree, tree]);
},

getCoreStylesPath() {
  let pkgPath = path.dirname(require.resolve(`@freshworks/core/package.json`));
  return path.join(pkgPath, 'app/styles');
}
```

**REASON:**

`@nucleus/core`'s app style funnel needs to be merged with the addon's style funnel in order for those files to be recognised by *ember-cli-sass*. More info [here](https://discuss.emberjs.com/t/how-can-i-share-files-css-sass-between-addons/15429/8)
npm package: @freshworks/ember-codemods
Description: ![npm (scoped)](https://img.shields.io/npm/v/@freshworks/ember-codemods) ![](https://github.com/freshdesk/ember-freshdesk-codemods/workflows/Node%20CI/badge.svg)
Latest version: 0.5.0

# @freshworks/ember-codemods

![npm (scoped)](https://img.shields.io/npm/v/@freshworks/ember-codemods)
![](https://github.com/freshdesk/ember-freshdesk-codemods/workflows/Node%20CI/badge.svg)


A collection of codemods by Freshworks.

## Usage

To run a specific codemod from this project, you would run the following:

```
npx @freshworks/ember-codemods <TRANSFORM NAME> path/of/files/ or/some**/*glob.js

# or

yarn global add @freshworks/ember-codemods
ember-codemods <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
```

## Transforms

<!--TRANSFORMS_START-->
* [async-leaks](transforms/async-leaks/README.md)
* [cleanup-imports](transforms/cleanup-imports/README.md)
* [engine-route-transitions](transforms/engine-route-transitions/README.md)
* [insert-hooks](transforms/insert-hooks/README.md)
* [mocha-to-qunit](transforms/mocha-to-qunit/README.md)
* [modify-import](transforms/modify-import/README.md)
* [remove-unused-get-import](transforms/remove-unused-get-import/README.md)
* [setup-helpers-with-await](transforms/setup-helpers-with-await/README.md)
<!--TRANSFORMS_END-->

## Contributing

### Installation

* clone the repo
* change into the repo directory
* `yarn`

### Running tests

* `yarn test`

### Update Documentation

* `yarn update-docs`
npm package: @freshworks/ember-sequential-render
Description: An elegant solution to optimize your application's render performance.
Author: Kanalveli Ramachandran
Latest version: 2.0.0

Ember Sequential Render
==============================================================================

![Build](https://github.com/freshworks/ember-sequential-render/workflows/Build/badge.svg?branch=main)


Modern SPA layouts have an overload of information in the user's viewport in any given route. What's preventing secondary information from blocking or taking up resources, which, if left alone, would drastically improve the rendering of the primary content? 
[More thoughts on Critical Rendering Path](https://developers.google.com/web/fundamentals/performance/critical-rendering-path)

ember-sequential-render helps in CRP optimization with the following features:

### Prioritized Sequential Rendering

A composable container component, **sequential-render**, which prioritizes and queues the data fetch and the rendering of its content with the necessary loading states.

### Postrender callback

An elegant way to defer the load of thirdparty resources after the rendering of the highest priority item in your queue.


Compatibility
------------------------------------------------------------------------------

* Ember.js v3.20 or above
* Ember CLI v3.20 or above
* Node.js v12 or above

For lower Ember versions, please use [v1.3.1](https://freshworks.github.io/ember-sequential-render/versions/v1.3.1/).


Installation
------------------------------------------------------------------------------

```
ember install @freshworks/ember-sequential-render
```


Usage
------------------------------------------------------------------------------
[Usage Documentation](https://freshworks.github.io/ember-sequential-render)

Contributing
------------------------------------------------------------------------------

See the [Contributing](CONTRIBUTING.md) guide for details.


License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).
npm package: @freshworks/icon
Description: Icons in Nucleus
Latest version: 0.21.1

@freshworks/icon
==============================================================================
[![npm version](https://badge.fury.io/js/%40freshworks%2Ficon.svg)](https://www.npmjs.com/package/@freshworks/icon)
![npm](https://img.shields.io/npm/dm/@freshworks/icon)

```
ember install @freshworks/icon
```

## Icon explorer

```sh
cd packages/icon
ember serve
```

You can view the icon explorer at http://localhost:4200/ember-svg-jar/index.html
npm package: @freshworks/inline-banner
Description: Inline banner component in Nucleus
Latest version: 0.18.1

@freshworks/inline-banner
==============================================================================
[![npm version](https://badge.fury.io/js/%40freshworks%2Finline-banner.svg)](https://www.npmjs.com/package/@freshworks/inline-banner)
![npm](https://img.shields.io/npm/dm/@freshworks/inline-banner)

```sh
ember install @freshworks/inline-banner
```
npm package: @freshworks/modal
Description: Modal component in Nucleus
Latest version: 0.18.1

@freshworks/modal
==============================================================================
[![npm version](https://badge.fury.io/js/%40freshworks%2Fmodal.svg)](https://www.npmjs.com/package/@freshworks/modal)
![npm](https://img.shields.io/npm/dm/@freshworks/modal)

```
ember install @freshworks/modal
```

Modals are an interactive component which appears on top of the page that stops any other interaction behind it. It has a focused task with few components within it like CTAs. Modals requires the users to critically respond to it in order to get back to primary task.

Scenario
------------------------------------------------------------------------------
Best use of modals is to get the task quickly done and may also support in completion of the primary task, for example: Creation of an entity and also editing it. Modal has to be relevant and carefully utilized as modal grasp users attention and may obstruct their current flow. 

Guidelines
------------------------------------------------------------------------------
**DO’s**

1. Add scroll to body (CTA to remain fixed) incase the content is more. 
2. Icon to the titles has to be contextual
3. Focus should be on the first item in modal as it opens

**DONT’s**

1. Don’t exceed maximum width of 800 px
2. Avoid using 2 levels of modal on modal.
3. Don’t use modal if it is not related to the user’s current taskflow.
4. Avoid modal for complex decision making that requires additional sources of information.
5. Avoid closing the modal on clicking outside for confirmation modals and forms dialogs in which user confirmation or input required.
npm package: @freshworks/nucleus-codemods
Description: ![CI](https://github.com/freshdesk/nucleus-codemods/workflows/CI/badge.svg) [![npm version](https://badge.fury.io/js/%40freshworks%2Fnucleus-codemods.svg)](https://www.npmjs.com/package/@freshworks/nucleus-codemods)
Latest version: 0.3.0

# nucleus-codemods

![CI](https://github.com/freshdesk/nucleus-codemods/workflows/CI/badge.svg)
[![npm version](https://badge.fury.io/js/%40freshworks%2Fnucleus-codemods.svg)](https://www.npmjs.com/package/@freshworks/nucleus-codemods)

A collection of codemod's for nucleus-codemods.

## Usage

To run a specific codemod from this project, you would run the following:

```
npx @freshworks/nucleus-codemods <TRANSFORM NAME> path/of/files/ or/some**/*glob.js

# or

yarn global add @freshworks/nucleus-codemods
@freshworks/nucleus-codemods <TRANSFORM NAME> path/of/files/ or/some**/*glob.js
```

## Transforms

<!--TRANSFORMS_START-->
* [button](transforms/button/README.md)
* [confirm-dialog](transforms/confirm-dialog/README.md)
* [inline-banner](transforms/inline-banner/README.md)
<!--TRANSFORMS_END-->

## Contributing

### Installation

* clone the repo
* change into the repo directory
* `yarn`

### Running tests

* `yarn test`

### Update Documentation

* `yarn update-docs`
npm package: @freshworks/oas
Description: Freshworks style guide for REST API
Author: Mohamed Ibrahim
Latest version: 0.0.4


# Freshworks OpenAPI 2.0 and 3.0.x Style Guide

Lint rules to validate Open API 2.0 and 3.0.x Specification using [Spectral](https://stoplight.io/open-source/spectral/). This extends ***spectral:oas*** package and adds custom rules on top of it.

# Usage

## Extending this style guide

### YAML

    extends:
	  - https://unpkg.com/@freshworks/oas
	rules:
	  ...

### JSON


     {
        "extends": [
            "https://unpkg.com/@freshworks/oas"
        ],
        "rules": {
            ...
        }
    }

# Rules
Some rules are used from ***spectral:oas*** as it is and overridden the severity to **ERROR**. Rules that are not extended from ***spectral:oas*** will have prefix `fw-`.

> Severity is set to **ERROR** for all rules defined below. Individual  
> projects can override severity level to suit their needs.

## info-description

OpenAPI object info `description` must be present and non-empty string.

## info-contact

Info object should contain `contact` object.

## operation-tags

Operation should have non-empty `tags` array.

## operation-tag-defined

Operation tags should be defined in global tags.

## operation-operationId

Operation should have an `operationId`.

## fw-info-license

Info object should contain `license` object

## fw-operation-summary

Each operation should have `summary`

## fw-schema-properties-example

Schema properties should have an example value defined

## fw-properties-underscore-case

Schema properties should be in underscore case

## fw-ensure-no-legacy-tags

Tags should not have legacy in its name

## fw-path-kebab-case

Path should be in kebab case.

> Private APIs follows the convention of `/api/_/...` . One underscore (`_`) followed by `/api/` is allowed for private APIs as an exception.

## fw-path-param-underscore-case

Path parameter should be in underscore case

## fw-query-param-underscore-case

Query parameter should be in underscore case

## fw-form-param-underscore-case

Form data parameter should be in underscore case
npm package: @freshworks/pagination
Description: Introduces pagination for a component
Latest version: 0.15.1

@freshworks/pagination
==============================================================================

```
yarn add @freshworks/pagination
```

Pagination is used when a large set of data needs to be displayed in a list or table across multiple pages. Nucleus Pagination provides a paginator with visual page numbers for navigation. The component also abstracts the calculation of the items that are displayed on the current page. The developer only needs to pass the total array of records to the pagination component.


Scenario
------------------------------------------------------------------------------

Pagination can be used to display the list of contacts, companies or tickets across multiple pages in the form of a table

Guidelines
------------------------------------------------------------------------------
**Do's**
1. Pagination should be used when a large set of content is displayed with tables or lists.

2. Though the number of items on a page can be altered, ensure that the default is reasonable. 

3. Use Mini Pagination when the pagination is to be done inside a toolbar. 


**Dont's**

1. Do not use pagination if the number of items is known to be less.

2. Do not override the actions and behaviour of pagination and paginator