# @types/scaleway-functions

> TypeScript definitions for scaleway-functions

Latest version **1.0.3** (published 2023-11-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/scaleway-functions
pnpm add @types/scaleway-functions
yarn add @types/scaleway-functions
bun add @types/scaleway-functions
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; popular repo; extremely popular.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2023-11-22 |
| First published | 2022-07-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51363 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/scaleway-functions
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scaleway-functions
- npm.io page: https://npm.io/package/@types/scaleway-functions

## Recent versions

- 1.0.3 (latest) — 2023-11-22
- 1.0.0 (ts4.0) — 2022-07-26
- 1.0.2 — 2023-11-07
- 1.0.1 — 2023-10-18

## README

# Installation
> `npm install --save @types/scaleway-functions`

# Summary
This package contains type definitions for scaleway-functions (https://www.scaleway.com/en/serverless-functions/).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scaleway-functions.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/scaleway-functions/index.d.ts)
````ts
export type Handler<TResult = Response | object> = (
    event: Event,
    context: Context,
    callback: Callback<TResult>,
    // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
) => void | TResult | Promise<TResult>;

export type Callback<TResult = Response | object> = (error?: Error | string | null, result?: TResult) => void;

// https://github.com/scaleway/scaleway-functions-runtimes/blob/master/events/context.go
export interface Context {
    memoryLimitInMb: number;
    functionName: string;
    functionVersion: string;
}

// https://github.com/scaleway/scaleway-functions-runtimes/blob/master/events/http.go
export interface Event {
    path: string;
    httpMethod: string;
    headers: Record<string, string>;
    queryStringParameters: Record<string, string>;
    stageVariables: Record<string, string>;
    body: string;
    isBase64Encoded: boolean;
    requestContext: RequestContext;
}

export interface RequestContext {
    stage: string;
    httpMethod: string;
}

// https://github.com/scaleway/scaleway-functions-runtimes/blob/master/handler/utils.go
export interface Response {
    statusCode: number;
    body?: string | object;
    headers?: Record<string, string>;
    isBase64Encoded?: boolean;
}

````

### Additional Details
 * Last updated: Wed, 22 Nov 2023 00:24:48 GMT
 * Dependencies: none

# Credits
These definitions were written by [MrMicky](https://github.com/MrMicky-FR).

---
_Source: https://npm.io/package/@types/scaleway-functions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
