0.1.27 • Published 2 years ago
@intavia/api-client v0.1.27
InTaVia api client
this ia a typescript client for the intavia api.
you can find more info about the project on the intavia website.
how to use
configure the api base url:
import { configureApiBaseUrl } from "@intavia/api-client";
const baseUrl = process.env.NEXT_PUBLIC_INTAVIA_API_BASE_URL;
configureApiBaseUrl(baseUrl);
call endpoint:
import { searchEntities } from "@intavia/api-client";
const response = await searchEntities.request({ q: "stefan" });
use zod
validation schemas:
import type { Person } from "@intavia/api-client";
import { person as personSchema } from "@intavia/api-client";
const person: Person = {
id: "1",
kind: "person",
label: { default: "stefan" },
};
const result = personSchema.safeParse(person);
if (result.success === true) {
console.log("Definitely a person.\n", result.data);
} else {
console.error("You sure this is a person?\n", result.error);
}
0.1.27
2 years ago
0.1.22
2 years ago
0.1.23
2 years ago
0.1.24
2 years ago
0.1.25
2 years ago
0.1.26
2 years ago
0.1.20
2 years ago
0.1.21
2 years ago
0.1.16
2 years ago
0.1.17
2 years ago
0.1.18
2 years ago
0.1.19
2 years ago
0.1.11
2 years ago
0.1.12
2 years ago
0.1.13
2 years ago
0.1.14
2 years ago
0.1.15
2 years ago
0.1.10
2 years ago
0.1.9
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago