0.1.12 • Published 5 months ago
@sr-engineering/sr-api-types v0.1.12
Showrunnr API Types
Showrunnr API Types is a public package offering TypeScript type definitions that ensure type safety and consistency when interacting with Showrunnr's API.
Getting Started
Getting started is easy; simply install our package and follow the instructions below to begin using it.
Example Setup and Integrating the SR Types to your project
Do yarn install @sr-engineering/sr-api-types or npm install @sr-engineering/sr-api-types
Import types from our package. We can import types, queries, and mutations from the package like so:
import { PersonInput } from "@sr-engineering/sr-api-types/lib/person/v1/graphql";
import { PersonFragmentDoc } from "@sr-engineering/sr-api-types/lib/search/v1/graphql";
import { CurrentAccountQuery } from "@sr-engineering/sr-api-types/lib/account/v1/graphql";
and use them inside our calls as query: CurrentAccountQuery, or for mutations: async function createPerson(personData: PersonInput).
Thats it! We're now ready to use the PersonInput type.
Additional Resources
To explore the SDK in more detail, visit the ShowRunnr SDK Example Repository.