open-index/open-npm huggingface dataset:
npm package: @samgaia/logger
Description: Logger client for Samgaia application
Author: Marvin Slegt
Latest version: 1.0.0-prod

# Logger Module

Logger client for Samgaia application

## Getting Started

### Prerequisites

This client module works with node >= 8.6.0

For this module to work, you need to have process `environment` set with this values

```
SLACK_WEBHOOK_URL=
SLACK_DEFAULT_CHANNEL=
```

### Installing

```
npm install gitlab:Samgaia/logger#v1.0.0-prod
```

### Usages

- Initializing

```typescript
import { Logger, ILoggerPayload } from '@Samgaia/logger';

const logger = new Logger(); // will use default channel set in environment
// or
const logger = new Logger('#optional-channel'); // OPTIONAL - will override default channel set in environment
```

- Log message

```typescript
const payload: ILoggerPayload = {
  channel: '#desired-channel', // OPTIONAL - will override default channel set in class instantiation or environment
  username: 'Module - Logger', // required, use the module name that utilizing this logger
  function: 'testLogger', // required, use the function name that call this logger
  message: 'test message from logger test script.'// required, any message you want to log, can be a stringify error as well
};

const response = await logger.info(options);
// or just await if you dont need the response
await logger.info(options); // will have blue line for info indicator
await logger.warning(options); // will have yellow line for warning indicator
await logger.error(options); // will have red line for error indicator
```

## Authors

- **Marvin Slegt** - _Initial work_

See also the list of [contributors](https://gitlab.com/Samgaia/logger/graphs/master) who participated in this project.

## License

This project is private and belong to **Samgaia B.V.**

## Latest version

- 1.0.0-prod

## Issues

- Visit [issues page](https://gitlab.com/Samgaia/logger/issues)
npm package: @samgaia/mollie-client
Description: Mollie client with Type Definition.
Author: Marvin Slegt
Latest version: 2.1.0

# Mollie Client Module

Mollie v2 client with Type Definition

## Getting Started

### Prerequisites

This Mollie client works with Node >= v8.6.0

For this module to work, you need to have process `environment` set with this values

```
MOLLIE_API_KEY=<-- your Mollie api key -->
```

### Installing

```
npm install git+https://gitlab.com/samgaia/mollie-client.git
```

### Usages

- Initializing

```typescript
import { MollieClient } from '@samgaia/mollie-client';

const mollie = new MollieClient().mollie;
```

## API

For full API see [Official Mollie v2 docs](https://docs.mollie.com/reference/v2/)

_**not all API from documentation are typed**_

## Helpers

This client provides a few helpers for APIs that commonly used in Samgaia application.

To use client helpers, you don't use `mollie` property but use the class itself.

```typescript
import { MollieClient } from '@samgaia/mollie-client';

const mollie = new MollieClient();
```

- Create payment

```typescript
const payment = await mollie.createPayment({
  amount: {
    value: '150.00',
    currency: 'EUR'
  },
  description: 'samgaia order #1234',
  redirectUrl: 'https://your-order-page-url',
  webhookUrl: 'https://your-webhook-api-url',
  method: 'ideal',
  metadata: '1234'
});
// will return Payment object
```

- Get payment

```typescript
const payment = await mollie.getPayment('mollie_txid');
// will return Payment object
```

## Authors

- **Marvin Slegt** - _Initial work_

See also the list of [contributors](https://gitlab.com/samgaia/mollie-client/graphs/master) who participated in this project.

## License

This project is private and belong to **Samgaia B.V.**

## Latest version

- 2.0.0

## Issues

- Visit [issues page](https://gitlab.com/samgaia/mollie-client/issues)