kayto_ts 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +2 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -40,7 +40,7 @@ kayto --lang ts --input "https://example.com/openapi.json" --output "generated/s
40
40
  If you generate one schema file per microservice, keep clients centralized in one place.
41
41
 
42
42
  ```ts
43
- import { clientApi } from "kayto_ts";
43
+ import { clientApi, type PartialEndpointsMap } from "kayto_ts";
44
44
  import type { Endpoints as AccountsEndpoints } from "./schemas/accounts";
45
45
  import type { Endpoints as BillingEndpoints } from "./schemas/billing";
46
46
  import type { Endpoints as NotificationsEndpoints } from "./schemas/notifications";
@@ -51,7 +51,7 @@ const SERVICE_URLS = {
51
51
  notifications: "https://notifications.example.com",
52
52
  } as const;
53
53
 
54
- function createServiceClient<TEndpoints>(baseUrl: string) {
54
+ function createServiceClient<TEndpoints extends PartialEndpointsMap>(baseUrl: string) {
55
55
  return clientApi<TEndpoints>({
56
56
  baseUrl,
57
57
  onRequest: ({ init }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kayto_ts",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Type-safe HTTP client for working with kayto-generated endpoint schemas.",
5
5
  "repository": {
6
6
  "type": "git",