2.0.23 • Published 2 years ago

generatetypesfromloops v2.0.23

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years 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

2 years ago

2.0.15

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.13

2 years ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.11

2 years ago

2.0.12

2 years ago

2.0.6

2 years ago

2.0.9

2 years ago

2.0.1

2 years ago

2.0.19

2 years ago

2.0.17

2 years ago

2.0.18

2 years ago

2.0.23

2 years ago

2.0.20

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago