new schema crud of vendorDefaultSettings
This commit is contained in:
@@ -12,28 +12,28 @@ 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 { useCreateVendor, useUpdateVendor, useDeleteVendor, useListVendor, useGetVendorById, useFilterVendors, useCreateVendorRate, useUpdateVendorRate, useDeleteVendorRate, useListVendorRate } from '@dataconnect/generated/react';
|
||||
import { useListStaff, useCreateVendor, useUpdateVendor, useDeleteVendor, useCreateVendorRate, useUpdateVendorRate, useDeleteVendorRate, useCreateEvent, useUpdateEvent, useDeleteEvent } 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 } = useCreateVendor(createVendorVars);
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useUpdateVendor(updateVendorVars);
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useDeleteVendor(deleteVendorVars);
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useListVendor();
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useGetVendorById(getVendorByIdVars);
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useFilterVendors(filterVendorsVars);
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useCreateVendorRate(createVendorRateVars);
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useUpdateVendorRate(updateVendorRateVars);
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useDeleteVendorRate(deleteVendorRateVars);
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useListVendorRate();
|
||||
const { data, isPending, isSuccess, isError, error } = useCreateEvent(createEventVars);
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useUpdateEvent(updateEventVars);
|
||||
|
||||
const { data, isPending, isSuccess, isError, error } = useDeleteEvent(deleteEventVars);
|
||||
|
||||
```
|
||||
|
||||
@@ -72,9 +72,12 @@ 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 { createVendor, updateVendor, deleteVendor, listVendor, getVendorById, filterVendors, createVendorRate, updateVendorRate, deleteVendorRate, listVendorRate } from '@dataconnect/generated';
|
||||
import { listStaff, createVendor, updateVendor, deleteVendor, createVendorRate, updateVendorRate, deleteVendorRate, createEvent, updateEvent, deleteEvent } from '@dataconnect/generated';
|
||||
|
||||
|
||||
// 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);
|
||||
|
||||
@@ -84,15 +87,6 @@ const { data } = await UpdateVendor(dataConnect, updateVendorVars);
|
||||
// Operation DeleteVendor: For variables, look at type DeleteVendorVars in ../index.d.ts
|
||||
const { data } = await DeleteVendor(dataConnect, deleteVendorVars);
|
||||
|
||||
// Operation listVendor:
|
||||
const { data } = await ListVendor(dataConnect);
|
||||
|
||||
// Operation getVendorById: For variables, look at type GetVendorByIdVars in ../index.d.ts
|
||||
const { data } = await GetVendorById(dataConnect, getVendorByIdVars);
|
||||
|
||||
// Operation filterVendors: For variables, look at type FilterVendorsVars in ../index.d.ts
|
||||
const { data } = await FilterVendors(dataConnect, filterVendorsVars);
|
||||
|
||||
// Operation CreateVendorRate: For variables, look at type CreateVendorRateVars in ../index.d.ts
|
||||
const { data } = await CreateVendorRate(dataConnect, createVendorRateVars);
|
||||
|
||||
@@ -102,8 +96,14 @@ const { data } = await UpdateVendorRate(dataConnect, updateVendorRateVars);
|
||||
// Operation DeleteVendorRate: For variables, look at type DeleteVendorRateVars in ../index.d.ts
|
||||
const { data } = await DeleteVendorRate(dataConnect, deleteVendorRateVars);
|
||||
|
||||
// Operation listVendorRate:
|
||||
const { data } = await ListVendorRate(dataConnect);
|
||||
// Operation CreateEvent: For variables, look at type CreateEventVars in ../index.d.ts
|
||||
const { data } = await CreateEvent(dataConnect, createEventVars);
|
||||
|
||||
// Operation UpdateEvent: For variables, look at type UpdateEventVars in ../index.d.ts
|
||||
const { data } = await UpdateEvent(dataConnect, updateEventVars);
|
||||
|
||||
// Operation DeleteEvent: For variables, look at type DeleteEventVars in ../index.d.ts
|
||||
const { data } = await DeleteEvent(dataConnect, deleteEventVars);
|
||||
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user