2.0.23 • Published 12 months ago

generatetypesfromloops v2.0.23

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

Loops API Types Generator

This script generates TypeScript types based on the OpenAPI schema fetched from the Loops API. The generated types are stored in a specified output file, which can be used in a TypeScript project.

Top-level file configurations

.env

( .env.template )

  • The LOOPS_API_KEY key is used to authenticate with the Loops API.

.loopsConfig.json

( .loopsConfig.template.json)

The configuration file should contain the following keys:

  • domain (optional): The domain of the Loops API. Defaults to "app.loops.so".
  • outputFile (optional): The file path for the generated TypeScript types. Defaults to "generatedTypes.d.ts". Note: will overwrite an existing file.
  • envKey (optional): The environment variable key for the Loops API key. Defaults to "LOOPS_API_KEY".
  • transactional (required): An object that defines the mapping of transactional email ids to desired name of the generated type.
  • debug (optional): A flag to enable debug mode. Defaults to false.

Usage

Create .loopsConfig.json and a .env per the instructions above. Then run the following command:

npm run loops
1.3.5

12 months ago

2.0.15

12 months ago

2.0.3

12 months ago

2.0.2

12 months ago

2.0.13

12 months ago

2.0.5

12 months ago

2.0.4

12 months ago

2.0.11

12 months ago

2.0.12

12 months ago

2.0.6

12 months ago

2.0.9

12 months ago

2.0.1

12 months ago

2.0.19

12 months ago

2.0.17

12 months ago

2.0.18

12 months ago

2.0.23

12 months ago

2.0.20

12 months ago

1.3.3

1 year ago

1.3.2

1 year ago

1.3.1

1 year ago

1.3.0

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago