new sdk for front with vendor entity

This commit is contained in:
José Salazar
2025-11-24 12:16:40 -05:00
parent 93f17ce517
commit 0e0d5c647e
18 changed files with 1482 additions and 204 deletions

View File

@@ -12,10 +12,10 @@ For each operation, there is a wrapper hook that can be used to call the operati
Here are all of the hooks that get generated:
```ts
import { useListStaff, useCreateEvent, useListEvents, useCreateStaff } from '@dataconnect/generated/react';
import { useListVendor, useCreateEvent, useListEvents, useCreateStaff, useListStaff, useCreateVendor } from '@dataconnect/generated/react';
// The types of these hooks are available in react/index.d.ts
const { data, isPending, isSuccess, isError, error } = useListStaff();
const { data, isPending, isSuccess, isError, error } = useListVendor();
const { data, isPending, isSuccess, isError, error } = useCreateEvent(createEventVars);
@@ -23,6 +23,10 @@ const { data, isPending, isSuccess, isError, error } = useListEvents();
const { data, isPending, isSuccess, isError, error } = useCreateStaff(createStaffVars);
const { data, isPending, isSuccess, isError, error } = useListStaff();
const { data, isPending, isSuccess, isError, error } = useCreateVendor(createVendorVars);
```
Here's an example from a different generated SDK:
@@ -60,11 +64,11 @@ If a user is not using a supported framework, they can use the generated SDK dir
Here's an example of how to use it with the first 5 operations:
```js
import { listStaff, createEvent, listEvents, createStaff } from '@dataconnect/generated';
import { listVendor, createEvent, listEvents, createStaff, listStaff, createVendor } from '@dataconnect/generated';
// Operation listStaff:
const { data } = await ListStaff(dataConnect);
// Operation listVendor:
const { data } = await ListVendor(dataConnect);
// Operation CreateEvent: For variables, look at type CreateEventVars in ../index.d.ts
const { data } = await CreateEvent(dataConnect, createEventVars);
@@ -75,5 +79,11 @@ const { data } = await ListEvents(dataConnect);
// Operation CreateStaff: For variables, look at type CreateStaffVars in ../index.d.ts
const { data } = await CreateStaff(dataConnect, createStaffVars);
// Operation listStaff:
const { data } = await ListStaff(dataConnect);
// Operation CreateVendor: For variables, look at type CreateVendorVars in ../index.d.ts
const { data } = await CreateVendor(dataConnect, createVendorVars);
```