open-index/open-npm huggingface dataset:
npm package: @musalasoft/flights-server
Description: This is a skeleton JS backend application to be used for testing interview candidate's FE application development skills in any framework or vanilla JS.
Latest version: 1.0.12

# Overview
This is a skeleton JS backend application to be used for testing interview candidate's FE application development skills in any framework or vanilla JS.

See the swagger definition for details about its capabilities.

# Prerequisites
- Node >= 14.15

# Build
```bash
npm install
```

# Usage
```bash
npm start
```

You can modify the contents of the `start` script with the following parameters 

```bash
node index.js [--port] [--auth] [--async]
```

`--port`: Change the port to run the server by default 3000.

`--auth`: Run the server with authentication enabled requiring authorization headers with bearer tokens. This will also allow login, registration and checking the user profiles.

`--async`: Specify file processing to be asynchronous to simulate real life scenarios with expensive cloud operations.

`--verbose`: Enable more verbose logging for debugging and testing

`--noreadme`: Only for candidates to disable opening home page automatically

The port for all the features described next is also updated accordingly based on the previous configuration

# Documentation
Swagger documentation is available on http://localhost:3000/api-docs

# Graphql
You can test and compose GraphQl queries and mutations on the url http://localhost:3000/graphql

# Test
```bash
npm run test
```
# Publishing the library

The library is available under the company repository in npm

https://www.npmjs.com/package/@musalasoft/flights-server

To create a new version increase the version number in package.json or run the `npm version` command with the desired configuration and run `npm publish`. You must log in the
console with your credentials and have write access to the npm repo.
npm package: @musallam/ffs-audio-video-client
Description: Adobe Audio & Video API SDK
Latest version: 2.1.1

# @musallam/ffs-audio-video-client

JavaScript/TypeScript client for the Adobe Audio & Video API.

Convert text to speech, transcribe audio/video, generate avatar videos, reframe video, and dub content with lip-sync.

## Installation

```sh
npm install @musallam/ffs-audio-video-client ky
```

`ky` is a peer dependency (`^1.0.0`); install a compatible 1.x version alongside this package. Releases that bundled `ky` internally are a previous major line—when upgrading, ensure `ky` is listed in your app if your package manager does not add it automatically.

## Authentication

Obtain a Bearer token and API key from the [Adobe Developer Console](https://developer.adobe.com/console).

The package exports a singleton `client` with `baseUrl` pre-configured. Set auth once at app startup:

```ts
import { client } from '@musallam/ffs-audio-video-client';

client.setConfig({
  auth: () => 'YOUR_ACCESS_TOKEN',
  headers: { 'x-api-key': 'YOUR_API_KEY' },
});
```

## Interceptors

Use `client.interceptors` to handle token refresh, logging, or errors:

```ts
import { client } from '@musallam/ffs-audio-video-client';

// Refresh token before each request
client.interceptors.request.use((request) => {
  request.headers.set('Authorization', `Bearer ${getAccessToken()}`);
  return request;
});

// Log responses
client.interceptors.response.use((response) => {
  console.log(`${response.status} ${response.url}`);
  return response;
});

// Eject when no longer needed
const id = client.interceptors.request.use(myInterceptor);
client.interceptors.request.eject(id);
```

## Usage

### Flat (tree-shakeable)

```ts
import { createClient, createConfig } from '@musallam/ffs-audio-video-client';
import { generateSpeech, transcribe, generateAvatar } from '@musallam/ffs-audio-video-client';

createClient(
  createConfig({
    baseUrl: 'https://audio-video.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);

const result = await generateSpeech({ body: { text: 'Hello world', voice: 'en-US-1' } });
```

### Class-based

```ts
import { createClient, createConfig, AudioVideoSdk } from '@musallam/ffs-audio-video-client/sdk';

const client = createClient(
  createConfig({
    baseUrl: 'https://audio-video.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);
const audioVideo = new AudioVideoSdk(client);

const result = await audioVideo.generateSpeech({ body: { text: 'Hello world', voice: 'en-US-1' } });
```
npm package: @musallam/ffs-cloud-storage-client
Description: Adobe Cloud Storage & Collaboration API SDK
Latest version: 2.1.1

# @musallam/ffs-cloud-storage-client

JavaScript/TypeScript client for the Adobe Creative Cloud Storage & Collaboration API.

Manage Creative Cloud projects, folders, and files — including uploads, permissions, and image renditions.

## Installation

```sh
npm install @musallam/ffs-cloud-storage-client ky
```

`ky` is a peer dependency (`^1.0.0`); install a compatible 1.x version alongside this package. Releases that bundled `ky` internally are a previous major line—when upgrading, ensure `ky` is listed in your app if your package manager does not add it automatically.

## Authentication

Obtain a Bearer token and API key from the [Adobe Developer Console](https://developer.adobe.com/console).

The package exports a singleton `client` with `baseUrl` pre-configured. Set auth once at app startup:

```ts
import { client } from '@musallam/ffs-cloud-storage-client';

client.setConfig({
  auth: () => 'YOUR_ACCESS_TOKEN',
  headers: { 'x-api-key': 'YOUR_API_KEY' },
});
```

## Interceptors

Use `client.interceptors` to handle token refresh, logging, or errors:

```ts
import { client } from '@musallam/ffs-cloud-storage-client';

// Refresh token before each request
client.interceptors.request.use((request) => {
  request.headers.set('Authorization', `Bearer ${getAccessToken()}`);
  return request;
});

// Log responses
client.interceptors.response.use((response) => {
  console.log(`${response.status} ${response.url}`);
  return response;
});

// Eject when no longer needed
const id = client.interceptors.request.use(myInterceptor);
client.interceptors.request.eject(id);
```

## Usage

### Flat (tree-shakeable)

```ts
import { createClient, createConfig } from '@musallam/ffs-cloud-storage-client';
import { getProjects, createProject, getFile } from '@musallam/ffs-cloud-storage-client';

createClient(
  createConfig({
    baseUrl: 'https://cc-storage.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);

const projects = await getProjects();
```

### Class-based

```ts
import {
  createClient,
  createConfig,
  CloudStorageSdk,
} from '@musallam/ffs-cloud-storage-client/sdk';

const client = createClient(
  createConfig({
    baseUrl: 'https://cc-storage.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);
const storage = new CloudStorageSdk(client);

const projects = await storage.getProjects();
```
npm package: @musallam/ffs-firefly-client
Description: Adobe Firefly API SDK
Latest version: 2.1.1

# @musallam/ffs-firefly-client

JavaScript/TypeScript client for the [Adobe Firefly API](https://developer.adobe.com/firefly-services/docs/firefly-api/api/).

Generate images from text prompts, expand or fill images with AI-generated content, and create videos using Adobe Firefly models.

## Installation

```sh
npm install @musallam/ffs-firefly-client ky
```

`ky` is a peer dependency (`^1.0.0`); install a compatible 1.x version alongside this package. Releases that bundled `ky` internally are a previous major line—when upgrading, ensure `ky` is listed in your app if your package manager does not add it automatically.

## Authentication

Obtain a Bearer token and API key from the [Adobe Developer Console](https://developer.adobe.com/console).

The package exports a singleton `client` with `baseUrl` pre-configured. Set auth once at app startup:

```ts
import { client } from '@musallam/ffs-firefly-client';

client.setConfig({
  auth: () => 'YOUR_ACCESS_TOKEN',
  headers: { 'x-api-key': 'YOUR_API_KEY' },
});
```

## Interceptors

Use `client.interceptors` to handle token refresh, logging, or errors:

```ts
import { client } from '@musallam/ffs-firefly-client';

// Refresh token before each request
client.interceptors.request.use((request) => {
  request.headers.set('Authorization', `Bearer ${getAccessToken()}`);
  return request;
});

// Log responses
client.interceptors.response.use((response) => {
  console.log(`${response.status} ${response.url}`);
  return response;
});

// Eject when no longer needed
const id = client.interceptors.request.use(myInterceptor);
client.interceptors.request.eject(id);
```

## Usage

### Flat (tree-shakeable)

```ts
import { createClient, createConfig } from '@musallam/ffs-firefly-client';
import {
  generateImagesV3Async,
  expandImagesV3Async,
  fillImagesV3Async,
} from '@musallam/ffs-firefly-client';

createClient(
  createConfig({
    baseUrl: 'https://firefly-api.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);

const result = await generateImagesV3Async({ body: { prompt: 'a cat on a surfboard' } });
```

### Class-based

```ts
import { createClient, createConfig, FireflySdk } from '@musallam/ffs-firefly-client/sdk';

const client = createClient(
  createConfig({
    baseUrl: 'https://firefly-api.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);
const firefly = new FireflySdk(client);

const result = await firefly.generateImagesV3Async({ body: { prompt: 'a cat on a surfboard' } });
```
npm package: @musallam/ffs-indesign-client
Description: Adobe InDesign API SDK
Latest version: 2.1.1

# @musallam/ffs-indesign-client

JavaScript/TypeScript client for the [Adobe InDesign API](https://developer.adobe.com/firefly-services/docs/indesign/).

Automate document generation with data merge, create renditions from INDD files, convert PDFs to InDesign, and run custom scripts.

## Installation

```sh
npm install @musallam/ffs-indesign-client ky
```

`ky` is a peer dependency (`^1.0.0`); install a compatible 1.x version alongside this package. Releases that bundled `ky` internally are a previous major line—when upgrading, ensure `ky` is listed in your app if your package manager does not add it automatically.

## Authentication

Obtain a Bearer token and API key from the [Adobe Developer Console](https://developer.adobe.com/console).

The package exports a singleton `client` with `baseUrl` pre-configured. Set auth once at app startup:

```ts
import { client } from '@musallam/ffs-indesign-client';

client.setConfig({
  auth: () => 'YOUR_ACCESS_TOKEN',
  headers: { 'x-api-key': 'YOUR_API_KEY' },
});
```

## Interceptors

Use `client.interceptors` to handle token refresh, logging, or errors:

```ts
import { client } from '@musallam/ffs-indesign-client';

// Refresh token before each request
client.interceptors.request.use((request) => {
  request.headers.set('Authorization', `Bearer ${getAccessToken()}`);
  return request;
});

// Log responses
client.interceptors.response.use((response) => {
  console.log(`${response.status} ${response.url}`);
  return response;
});

// Eject when no longer needed
const id = client.interceptors.request.use(myInterceptor);
client.interceptors.request.eject(id);
```

## Usage

### Flat (tree-shakeable)

```ts
import { createClient, createConfig } from '@musallam/ffs-indesign-client';
import { dataMerge, renditionJob, convertPdfToInDesign } from '@musallam/ffs-indesign-client';

createClient(
  createConfig({
    baseUrl: 'https://indesign.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);

const result = await dataMerge({
  body: { assets: [{ href: 'https://...', storage: 'external' }] },
});
```

### Class-based

```ts
import { createClient, createConfig, InDesignSdk } from '@musallam/ffs-indesign-client/sdk';

const client = createClient(
  createConfig({
    baseUrl: 'https://indesign.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);
const indesign = new InDesignSdk(client);

const result = await indesign.dataMerge({
  body: { assets: [{ href: 'https://...', storage: 'external' }] },
});
```
npm package: @musallam/ffs-lightroom-client
Description: Adobe Lightroom API SDK
Latest version: 2.1.1

# @musallam/ffs-lightroom-client

JavaScript/TypeScript client for the [Adobe Lightroom API](https://developer.adobe.com/firefly-services/docs/lightroom/).

Apply auto tone corrections, manual edits, and XMP presets to images programmatically.

## Installation

```sh
npm install @musallam/ffs-lightroom-client ky
```

`ky` is a peer dependency (`^1.0.0`); install a compatible 1.x version alongside this package. Releases that bundled `ky` internally are a previous major line—when upgrading, ensure `ky` is listed in your app if your package manager does not add it automatically.

## Authentication

Obtain a Bearer token and API key from the [Adobe Developer Console](https://developer.adobe.com/console).

The package exports a singleton `client` with `baseUrl` pre-configured. Set auth once at app startup:

```ts
import { client } from '@musallam/ffs-lightroom-client';

client.setConfig({
  auth: () => 'YOUR_ACCESS_TOKEN',
  headers: { 'x-api-key': 'YOUR_API_KEY' },
});
```

## Interceptors

Use `client.interceptors` to handle token refresh, logging, or errors:

```ts
import { client } from '@musallam/ffs-lightroom-client';

// Refresh token before each request
client.interceptors.request.use((request) => {
  request.headers.set('Authorization', `Bearer ${getAccessToken()}`);
  return request;
});

// Log responses
client.interceptors.response.use((response) => {
  console.log(`${response.status} ${response.url}`);
  return response;
});

// Eject when no longer needed
const id = client.interceptors.request.use(myInterceptor);
client.interceptors.request.eject(id);
```

## Usage

### Flat (tree-shakeable)

```ts
import { createClient, createConfig } from '@musallam/ffs-lightroom-client';
import { applyAutoTone, applyEdits, applyPreset } from '@musallam/ffs-lightroom-client';

createClient(
  createConfig({
    baseUrl: 'https://image.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);

const result = await applyAutoTone({
  body: { inputs: { source: { href: 'https://...', storage: 'external' } } },
});
```

### Class-based

```ts
import { createClient, createConfig, LightroomSdk } from '@musallam/ffs-lightroom-client/sdk';

const client = createClient(
  createConfig({
    baseUrl: 'https://image.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);
const lightroom = new LightroomSdk(client);

const result = await lightroom.applyAutoTone({
  body: { inputs: { source: { href: 'https://...', storage: 'external' } } },
});
```
npm package: @musallam/ffs-photoshop-client
Description: Adobe Photoshop API SDK
Latest version: 2.1.1

# @musallam/ffs-photoshop-client

JavaScript/TypeScript client for the [Adobe Photoshop API](https://developer.adobe.com/firefly-services/docs/photoshop/api/).

Create and modify PSD documents, remove backgrounds, apply masks, edit text layers, and automate Photoshop actions programmatically.

## Installation

```sh
npm install @musallam/ffs-photoshop-client ky
```

`ky` is a peer dependency (`^1.0.0`); install a compatible 1.x version alongside this package. Releases that bundled `ky` internally are a previous major line—when upgrading, ensure `ky` is listed in your app if your package manager does not add it automatically.

## Authentication

Obtain a Bearer token and API key from the [Adobe Developer Console](https://developer.adobe.com/console).

The package exports a singleton `client` with `baseUrl` pre-configured. Set auth once at app startup:

```ts
import { client } from '@musallam/ffs-photoshop-client';

client.setConfig({
  auth: () => 'YOUR_ACCESS_TOKEN',
  headers: { 'x-api-key': 'YOUR_API_KEY' },
});
```

## Interceptors

Use `client.interceptors` to handle token refresh, logging, or errors:

```ts
import { client } from '@musallam/ffs-photoshop-client';

// Refresh token before each request
client.interceptors.request.use((request) => {
  request.headers.set('Authorization', `Bearer ${getAccessToken()}`);
  return request;
});

// Log responses
client.interceptors.response.use((response) => {
  console.log(`${response.status} ${response.url}`);
  return response;
});

// Eject when no longer needed
const id = client.interceptors.request.use(myInterceptor);
client.interceptors.request.eject(id);
```

## Usage

### Flat (tree-shakeable)

```ts
import { createClient, createConfig } from '@musallam/ffs-photoshop-client';
import {
  removeBackground,
  createDocumentAsync,
  modifyDocumentAsync,
} from '@musallam/ffs-photoshop-client';

createClient(
  createConfig({
    baseUrl: 'https://image.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);

const result = await removeBackground({
  body: { input: { href: 'https://...', storage: 'external' } },
});
```

### Class-based

```ts
import { createClient, createConfig, PhotoshopSdk } from '@musallam/ffs-photoshop-client/sdk';

const client = createClient(
  createConfig({
    baseUrl: 'https://image.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);
const photoshop = new PhotoshopSdk(client);

const result = await photoshop.removeBackground({
  body: { input: { href: 'https://...', storage: 'external' } },
});
```
npm package: @musallam/ffs-substance-3d-client
Description: Adobe Substance 3D API SDK
Latest version: 2.1.1

# @musallam/ffs-substance-3d-client

JavaScript/TypeScript client for the Adobe Substance 3D API.

Assemble 3D scenes, generate composites, convert between 3D file formats, and render with basic or advanced options.

## Installation

```sh
npm install @musallam/ffs-substance-3d-client ky
```

`ky` is a peer dependency (`^1.0.0`); install a compatible 1.x version alongside this package. Releases that bundled `ky` internally are a previous major line—when upgrading, ensure `ky` is listed in your app if your package manager does not add it automatically.

## Authentication

Obtain a Bearer token and API key from the [Adobe Developer Console](https://developer.adobe.com/console).

The package exports a singleton `client` with `baseUrl` pre-configured. Set auth once at app startup:

```ts
import { client } from '@musallam/ffs-substance-3d-client';

client.setConfig({
  auth: () => 'YOUR_ACCESS_TOKEN',
  headers: { 'x-api-key': 'YOUR_API_KEY' },
});
```

## Interceptors

Use `client.interceptors` to handle token refresh, logging, or errors:

```ts
import { client } from '@musallam/ffs-substance-3d-client';

// Refresh token before each request
client.interceptors.request.use((request) => {
  request.headers.set('Authorization', `Bearer ${getAccessToken()}`);
  return request;
});

// Log responses
client.interceptors.response.use((response) => {
  console.log(`${response.status} ${response.url}`);
  return response;
});

// Eject when no longer needed
const id = client.interceptors.request.use(myInterceptor);
client.interceptors.request.eject(id);
```

## Usage

### Flat (tree-shakeable)

```ts
import { createClient, createConfig } from '@musallam/ffs-substance-3d-client';
import {
  v1CompositesCompose,
  v1ScenesAssemble,
  v1ScenesConvert,
} from '@musallam/ffs-substance-3d-client';

createClient(
  createConfig({
    baseUrl: 'https://substance3d.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);

const result = await v1ScenesAssemble({
  body: { assets: [{ href: 'https://...', storage: 'external' }] },
});
```

### Class-based

```ts
import { createClient, createConfig, Substance3Dsdk } from '@musallam/ffs-substance-3d-client/sdk';

const client = createClient(
  createConfig({
    baseUrl: 'https://substance3d.adobe.io',
    headers: {
      Authorization: 'Bearer YOUR_ACCESS_TOKEN',
      'x-api-key': 'YOUR_API_KEY',
    },
  })
);
const substance = new Substance3Dsdk(client);

const result = await substance.v1ScenesAssemble({
  body: { assets: [{ href: 'https://...', storage: 'external' }] },
});
```