# Opvious API

This package contains auto-generated SDKs and types for the
[Opvious](https://www.opvious.io) API. It is suitable for use both client-side
and server-side.


## Quickstart

```typescript
import {createSdk, createGraphqlSdk} from '@opvious/api';

// REST SDK (data operations)
const sdk = createSdk({
  // Optional authorization token
  headers: {authorization: `Bearer ${process.env.OPVIOUS_TOKEN}`},
});

// GraphQL SDK (metadata operations)
const graphqlSdk = createGraphqlSdk(sdk);
```

Note that several SDK methods require an API access token. You can generate one
[here](https://hub.cloud.opvious.io/authorizations).


## Included resources

This package also includes the following resource files:

+ OpenAPI specification (`resources/openapi.yaml`);
+ GraphQL schema (`resources/graphql/schema.gql`);
+ GraphQL operations (`resources/graphql/**/*.graphql`).

These can be used to generate your own SDKs.


## Related libraries

+ [Higher level TypeScript
  SDK](https://www.opvious.io/sdk.ts/modules/opvious.html), recommended if you
  are interfacing with the Opvious API from your backend
+ [Python SDK](https://opvious.readthedocs.io), recommended to formulate complex
  optimization models
