Skip to content

Latest commit

 

History

History
1597 lines (906 loc) · 44.2 KB

README.md

File metadata and controls

1597 lines (906 loc) · 44.2 KB

andculturecode-javascript-react

andculturecode-javascript-react

Index

Enumerations

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AsyncEffectCallback

Ƭ AsyncEffectCallback: function

Defined in src/types/async-effect-callback-type.ts:6

Type defining the asyncEffect parameter from calling useAsyncEffect()

Type declaration:

▸ (isMounted: function): Promise‹ReturnType‹EffectCallback››

Parameters:

▪ isMounted: function

▸ (): boolean


BulkUpdateService

Ƭ BulkUpdateService: function

Defined in src/types/bulk-update-service-type.ts:9

Type defining the service function for bulk updating the supplied resource type

param Records to be updated

param Object with path parameters to be replaced in the endpoint route

Type declaration:

▸ (records: TRecord[], pathParams: TPathParams): Promise‹ServiceResponse‹TRecord››

Parameters:

Name Type
records TRecord[]
pathParams TPathParams

BulkUpdateServiceHook

Ƭ BulkUpdateServiceHook: function

Defined in src/types/bulk-update-service-hook-type.ts:6

Type defining the return object from calling useBulkUpdate()

Type declaration:

▸ (): object


CreateService

Ƭ CreateService: function

Defined in src/types/create-service-type.ts:8

Type defining the service function for creating the supplied resource type

param Record to be created

Type declaration:

▸ (record?: TRecord): Promise‹ServiceResponse‹TRecord››

Parameters:

Name Type
record? TRecord

CreateServiceHook

Ƭ CreateServiceHook: function

Defined in src/types/create-service-hook-type.ts:6

Type defining the return object from calling useCreate()

Type declaration:

▸ (): object


DeleteService

Ƭ DeleteService: function

Defined in src/types/delete-service-type.ts:9

Type defining the service function for deleting the supplied resource

param Id of the record to be deleted

param Object with path parameters to be replaced in the endpoint route

Type declaration:

▸ (id: number, pathParams?: any): Promise‹ServiceResponse‹Boolean››

Parameters:

Name Type
id number
pathParams? any

DeleteServiceHook

Ƭ DeleteServiceHook: function

Defined in src/types/delete-service-hook-type.ts:6

Type defining the return object from calling useDelete()

Type declaration:

▸ (): object


GetService

Ƭ GetService: function

Defined in src/types/get-service-type.ts:9

Type defining the service function for getting the supplied resource type

param Object with path parameters to be replaced in the endpoint route

param Object with query parameters to be appended to the endpoint route

Type declaration:

▸ (pathParams: TPathParams, queryParams?: TQueryParams): Promise‹ServiceResponse‹TRecord››

Parameters:

Name Type
pathParams TPathParams
queryParams? TQueryParams

GetServiceHook

Ƭ GetServiceHook: function

Defined in src/types/get-service-hook-type.ts:6

Type defining the return object from calling useGet()

Type declaration:

▸ (): object

  • get: GetService‹TRecord, TPathParams, TQueryParams›

ListService

Ƭ ListService: function

Defined in src/types/list-service-type.ts:8

Type defining the service function for listing resources by supplied type

param Object with query parameters to be appended to the endpoint route

Type declaration:

▸ (queryParams?: TQueryParams): Promise‹ServiceResponse‹TRecord››

Parameters:

Name Type
queryParams? TQueryParams

ListServiceHook

Ƭ ListServiceHook: function

Defined in src/types/list-service-hook-type.ts:6

Type defining the return object from calling useList()

Type declaration:

▸ (): object


NestedCreateService

Ƭ NestedCreateService: function

Defined in src/types/nested-create-service-type.ts:9

Type defining the service function for creating the supplied resource type when resource is nested

param Record to be created

param Object with path parameters to be replaced in the endpoint route

Type declaration:

▸ (record: TRecord, pathParams: TPathParams): Promise‹ServiceResponse‹TRecord››

Parameters:

Name Type
record TRecord
pathParams TPathParams

NestedCreateServiceHook

Ƭ NestedCreateServiceHook: function

Defined in src/types/nested-create-service-hook-type.ts:6

Type defining the return object from calling useNestedCreate()

Type declaration:

▸ (): object


NestedListService

Ƭ NestedListService: function

Defined in src/types/nested-list-service-type.ts:9

Type defining the service function for listing resources by supplied type when resource is nested

param Object with path parameters to be replaced in the endpoint route

param Object with query parameters to be appended to the endpoint route

Type declaration:

▸ (pathParams: TPathParams, queryParams?: TQueryParams): Promise‹ServiceResponse‹TRecord››

Parameters:

Name Type
pathParams TPathParams
queryParams? TQueryParams

NestedListServiceHook

Ƭ NestedListServiceHook: function

Defined in src/types/nested-list-service-hook-type.ts:6

Type defining the return object from calling useNestedList()

Type declaration:

▸ (): object


UpdateService

Ƭ UpdateService: function

Defined in src/types/update-service-type.ts:9

Type defining the service function for updating the supplied resource type

param Record to be created

param Object with path parameters to be replaced in the endpoint route

Type declaration:

▸ (record: TRecord, pathParams?: TPathParams): Promise‹ServiceResponse‹TRecord››

Parameters:

Name Type
record TRecord
pathParams? TPathParams

UpdateServiceHook

Ƭ UpdateServiceHook: function

Defined in src/types/update-service-hook-type.ts:6

Type defining the return object from calling useUpdate()

Type declaration:

▸ (): object

Variables

Const RouteDefinitionFactory

• RouteDefinitionFactory: IFactory‹RouteDefinition› = Factory.define( FactoryType.RouteDefinition.Default ) .sequence("authRequired", () => false) .sequence("component", () => React.Fragment) .sequence("exact", () => true) .sequence("path", (i: number) => /path${i}) .sequence("routes", () => {})

Defined in src/tests/factories/route-definition-factory.ts:10


Const RouteDefinitionNestedFactory

• RouteDefinitionNestedFactory: IFactory‹RouteDefinition› = Factory.define( FactoryType.RouteDefinition.Nested ) .sequence("authRequired", () => false) .sequence("component", () => React.Fragment) .sequence("exact", () => true) .sequence("path", (i: number) => /path${i}) .sequence("routes", () => { return { nestedRoute: Factory.build( FactoryType.RouteDefinition.Default ), }; })

Defined in src/tests/factories/route-definition-factory.ts:19


Const RouteMapFactory

• RouteMapFactory: IFactory‹RouteMap› = Factory.define( FactoryType.RouteMap ).sequence("/", () => Factory.build(FactoryType.RouteDefinition.Default) )

Defined in src/tests/factories/route-map-factory.ts:10

Functions

Const AuthenticatedRoute

▸ AuthenticatedRoute(props: AuthenticatedRouteProps): Element‹›

Defined in src/components/routing/authenticated-route.tsx:23

Locks a route behind authentication. Can optionally redirect a user to another location if attempting to access the route while unauthenticated.

Parameters:

Name Type
props AuthenticatedRouteProps

Returns: Element‹›


Const NestedRoute

▸ NestedRoute(props: NestedRouteProps): Element‹›

Defined in src/components/routing/nested-route.tsx:26

Dynamically renders a route and its subroutes, accounting for additional custom properties on RouteDefinition

Parameters:

Name Type
props NestedRouteProps

Returns: Element‹›


Const NestedRoutes

▸ NestedRoutes(props: NestedRoutesProps): null | Element‹›

Defined in src/components/routing/nested-routes.tsx:27

Component to easily render nested sub-route components from a list of routes. Commonly used when setting up a layout

Parameters:

Name Type
props NestedRoutesProps

Returns: null | Element‹›


Const NestedRoutesByProperty

▸ NestedRoutesByProperty(props: NestedRoutesByPropertyProps): null | Element‹›

Defined in src/components/routing/nested-routes-by-property.tsx:27

Renders Route components mapped to a custom property

Parameters:

Name Type
props NestedRoutesByPropertyProps

Returns: null | Element‹›


Const Redirects

▸ Redirects(props: RedirectsProps): Element‹›

Defined in src/components/routing/redirects.tsx:22

Simple way to redirect a flat array of RedirectDefinitions

Parameters:

Name Type
props RedirectsProps

Returns: Element‹›


Const _buildUrl

▸ _buildUrl(id: number, resourceEndpoint: string, pathParams?: any): string

Defined in src/services/service-factory.ts:159

Parameters:

Name Type
id number
resourceEndpoint string
pathParams? any

Returns: string


Const _bulkUpdate

▸ _bulkUpdate<TRecord, TPathParams>(recordType: object, records: Array‹TRecord›, resourceEndpoint: string, pathParams: TPathParams): Promise‹ServiceResponse‹TRecord››

Defined in src/services/service-factory.ts:167

Type parameters:

▪ TRecord: any

▪ TPathParams: any

Parameters:

▪ recordType: object

Name Type
constructor

▪ records: Array‹TRecord›

▪ resourceEndpoint: string

▪ pathParams: TPathParams

Returns: Promise‹ServiceResponse‹TRecord››


Const _create

▸ _create<TRecord>(recordType: object, url: string, record?: TRecord): Promise‹ServiceResponse‹TRecord››

Defined in src/services/service-factory.ts:185

Type parameters:

▪ TRecord: any

Parameters:

▪ recordType: object

Name Type
constructor

▪ url: string

▪Optional record: TRecord

Returns: Promise‹ServiceResponse‹TRecord››


Const _delete

▸ _delete(id: number, resourceEndpoint: string, pathParams?: any): Promise‹ServiceResponse‹Boolean››

Defined in src/services/service-factory.ts:197

Parameters:

Name Type
id number
resourceEndpoint string
pathParams? any

Returns: Promise‹ServiceResponse‹Boolean››


Const _get

▸ _get<TRecord, TPathParams, TQueryParams>(recordType: object, resourceEndpoint: string, pathParams: TPathParams, queryParams?: TQueryParams): Promise‹ServiceResponse‹TRecord››

Defined in src/services/service-factory.ts:208

Type parameters:

▪ TRecord

▪ TPathParams

▪ TQueryParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ resourceEndpoint: string

▪ pathParams: TPathParams

▪Optional queryParams: TQueryParams

Returns: Promise‹ServiceResponse‹TRecord››


Const _list

▸ _list<TRecord>(recordType: object, baseEndpoint: string, pathParams?: any, queryParams?: any): Promise‹ServiceResponse‹TRecord››

Defined in src/services/service-factory.ts:224

Type parameters:

▪ TRecord: any

Parameters:

▪ recordType: object

Name Type
constructor

▪ baseEndpoint: string

▪Optional pathParams: any

▪Optional queryParams: any

Returns: Promise‹ServiceResponse‹TRecord››


Const _update

▸ _update<TRecord, TPathParams>(recordType: object, record: TRecord, resourceEndpoint: string, pathParams?: TPathParams): Promise‹ServiceResponse‹TRecord››

Defined in src/services/service-factory.ts:240

Type parameters:

▪ TRecord: any

▪ TPathParams: any

Parameters:

▪ recordType: object

Name Type
constructor

▪ record: TRecord

▪ resourceEndpoint: string

▪Optional pathParams: TPathParams

Returns: Promise‹ServiceResponse‹TRecord››


Const debugRoutes

▸ debugRoutes(routes: RouteMap): void

Defined in src/utilities/route-utils.ts:15

Outputs flattened routing table for debugging purposes

Parameters:

Name Type
routes RouteMap

Returns: void


Const getFlattenedRoutes

▸ getFlattenedRoutes(routeArray: RouteDefinition[]): RouteDefinition[]

Defined in src/utilities/route-utils.ts:23

Parameters:

Name Type
routeArray RouteDefinition[]

Returns: RouteDefinition[]


Const makeCancellable

▸ makeCancellable(promise: Promise‹any›): object

Defined in src/hooks/make-cancellable.ts:10

Wrap the provided promise in a promise that intercepts cancellation requests

Parameters:

Name Type
promise Promise‹any›

Returns: object

  • promise: Promise‹unknown› = wrappedPromise

  • cancel(): void


useAsyncEffect

▸ useAsyncEffect(asyncEffect: AsyncEffectCallback, deps: DependencyList): void

Defined in src/hooks/use-async-effect.ts:10

Version of the useEffect hook that accepts an async function

export

Parameters:

Name Type Description
asyncEffect AsyncEffectCallback -
deps DependencyList

Returns: void


Const useCancellablePromise

▸ useCancellablePromise(): object

Defined in src/hooks/use-cancellable-promise.ts:4

Returns: object

  • cancellablePromise: cancellablePromise

useDebounce

▸ useDebounce<T>(value: T, delay: number): T

Defined in src/hooks/use-debounce.ts:8

Throttles the supplied value for a set amount of milliseconds

Type parameters:

▪ T

Parameters:

Name Type Default Description
value T - -
delay number 200 number of milliseconds to delay

Returns: T


Const useLocalization

▸ useLocalization<TKeys>(): object

Defined in src/hooks/use-localization.ts:7

Typed wrapper of i18n useTranslation hook

Type parameters:

▪ TKeys

Returns: object

  • t: translate = useCallback(translate, [t])

useOnClickOutside

▸ useOnClickOutside(ref: RefObject‹HTMLElement›, handler: function, deps?: React.DependencyList | undefined): void

Defined in src/hooks/use-onclick-outside.ts:9

Custom hook providing utility to take some action when a mouse event is fired outside of an element.

Parameters:

▪ ref: RefObject‹HTMLElement›

▪ handler: function

▸ (): void

▪Optional deps: React.DependencyList | undefined

Returns: void


usePageErrors

▸ usePageErrors(): object

Defined in src/hooks/use-page-errors.ts:7

Hook to bundle common page error handling functionality

Returns: object

  • handlePageLoadError: (Anonymous function)

  • pageErrors: string[]

  • resetPageErrors: (Anonymous function)

  • setPageErrors(): function

    • (value: A): void

useQuery

▸ useQuery<TRecord, TQueryParams, TPathParams>(options: UseQueryOptions‹TRecord, TQueryParams, TPathParams›): object

Defined in src/hooks/use-query.ts:11

Type parameters:

▪ TRecord

▪ TQueryParams

▪ TPathParams

Parameters:

Name Type
options UseQueryOptions‹TRecord, TQueryParams, TPathParams›

Returns: object

  • loading: boolean

  • pathParams: undefined | TPathParams

  • query: TQueryParams

  • setPathParams(): function

    • (value: A): void
  • setQuery(): function

    • (value: A): void
  • setValues(): function

    • (value: A): void
  • values: TRecord[]


useSortedAlphabetically

▸ useSortedAlphabetically<T>(initialValue: Array‹T›, sortBySelector: function): [ReducerState‹Reducer‹Array‹T›, Array‹T›››, Dispatch‹ReducerAction‹Reducer‹Array‹T›, Array‹T››››]

Defined in src/hooks/use-sorted-alphabetically.ts:19

Create a stateful array value which is always sorted alphabetically.

Type parameters:

▪ T

Parameters:

▪ initialValue: Array‹T›

the initial value of the array. Does not need to be sorted, the hook will sort it before setting the value.

▪ sortBySelector: function

a function which takes an array element, and returns a string property by which to sort alphabetically.

▸ (value: T): string

Parameters:

Name Type
value T

Returns: [ReducerState‹Reducer‹Array‹T›, Array‹T›››, Dispatch‹ReducerAction‹Reducer‹Array‹T›, Array‹T››››]


useTextOverflow

▸ useTextOverflow<T>(ref: RefObject‹T›): boolean

Defined in src/hooks/use-text-overflow.ts:11

A custom hook for determining if elements overflow their containers. Useful for when you have text-overflow: ellipsis; and you want to detect whether the text is actually long enough to trigger the ellipsis to appear.

Type parameters:

▪ T: HTMLElement

Parameters:

Name Type Description
ref RefObject‹T›

Returns: boolean


useWindow

▸ useWindow(): object

Defined in src/hooks/use-window.ts:8

Get window properties. Hook into window events and make properties more easily accessible to components.

Returns: object

  • height: number

  • width: number

Object literals

Const FactoryType

▪ FactoryType: object

Defined in src/tests/factories/factory-type.ts:1

RouteMap

• RouteMap: string = "RouteMap"

Defined in src/tests/factories/factory-type.ts:6

▪ RouteDefinition: object

Defined in src/tests/factories/factory-type.ts:2

  • Default: string = "RouteDefinition"

  • Nested: string = "RouteDefinition.Nested"


Const RouteUtils

▪ RouteUtils: object

Defined in src/utilities/route-utils.ts:45

appendQueryParams

• appendQueryParams: function = CoreRouteUtils.appendQueryParams

Defined in src/utilities/route-utils.ts:46

Type declaration:

▸ (path: string, queryParams: any, arrayFormat?: QueryStringArrayFormat, arrayFormatSeparator?: string | undefined): string

Parameters:

Name Type
path string
queryParams any
arrayFormat? QueryStringArrayFormat
arrayFormatSeparator? string | undefined

debugRoutes

• debugRoutes: debugRoutes

Defined in src/utilities/route-utils.ts:47

getFlattenedRoutes

• getFlattenedRoutes: getFlattenedRoutes

Defined in src/utilities/route-utils.ts:48

getUrl

• getUrl: function = CoreRouteUtils.getUrl

Defined in src/utilities/route-utils.ts:49

Type declaration:

▸ (path: string, pathParams?: any): string

Parameters:

Name Type
path string
pathParams? any

getUrlFromPath

• getUrlFromPath: function = CoreRouteUtils.getUrlFromPath

Defined in src/utilities/route-utils.ts:50

Type declaration:

▸ (path: string, pathParams?: any, queryParams?: any): string

Parameters:

Name Type
path string
pathParams? any
queryParams? any

replacePathParams

• replacePathParams: function = CoreRouteUtils.replacePathParams

Defined in src/utilities/route-utils.ts:51

Type declaration:

▸ (path: string, pathParams: any): string

Parameters:

Name Type
path string
pathParams any

Const ServiceFactory

▪ ServiceFactory: object

Defined in src/services/service-factory.ts:19

Factory to encapsulate common service function logic

bulkUpdate

▸ bulkUpdate<TRecord, TPathParams>(recordType: object, resourceEndpoint: string): BulkUpdateService‹TRecord, TPathParams›

Defined in src/services/service-factory.ts:25

Creates a conventional Service Update function for an Array of the supplied resource type

Type parameters:

▪ TRecord: any

▪ TPathParams: any

Parameters:

▪ recordType: object

Name Type
constructor

▪ resourceEndpoint: string

Returns: BulkUpdateService‹TRecord, TPathParams›

create

▸ create<TRecord>(recordType: object, baseEndpoint: string): CreateService‹TRecord›

Defined in src/services/service-factory.ts:47

Creates conventional Service Create function for the supplied resource type

Recommendation

Use nestedCreate when route is nested!

Type parameters:

▪ TRecord: any

Parameters:

▪ recordType: object

Name Type
constructor

▪ baseEndpoint: string

Returns: CreateService‹TRecord›

delete

▸ delete(resourceEndpoint: string): DeleteService

Defined in src/services/service-factory.ts:60

Creates conventional Service Delete function for the supplied resource type

Parameters:

Name Type Description
resourceEndpoint string

Returns: DeleteService

get

▸ get<TRecord, TPathParams, TQueryParams>(recordType: object, resourceEndpoint: string): GetService‹TRecord, TPathParams, TQueryParams›

Defined in src/services/service-factory.ts:70

Creates conventional Service Get function for the supplied resource type

Type parameters:

▪ TRecord

▪ TPathParams

▪ TQueryParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ resourceEndpoint: string

Returns: GetService‹TRecord, TPathParams, TQueryParams›

list

▸ list<TRecord, TQueryParams>(recordType: object, baseEndpoint: string): ListService‹TRecord, TQueryParams›

Defined in src/services/service-factory.ts:92

Creates conventional Service List function for the supplied resource type

Recommendation

Use nestedList when route is nested!

Type parameters:

▪ TRecord

▪ TQueryParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ baseEndpoint: string

Returns: ListService‹TRecord, TQueryParams›

nestedCreate

▸ nestedCreate<TRecord, TPathParams>(recordType: object, baseEndpoint: string): NestedCreateService‹TRecord, TPathParams›

Defined in src/services/service-factory.ts:106

Creates conventional Service Create function for the supplied resource type when the resource is nested

Type parameters:

▪ TRecord: any

▪ TPathParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ baseEndpoint: string

Returns: NestedCreateService‹TRecord, TPathParams›

nestedList

▸ nestedList<TRecord, TPathParams, TQueryParams>(recordType: object, baseEndpoint: string): NestedListService‹TRecord, TPathParams, TQueryParams›

Defined in src/services/service-factory.ts:121

Creates conventional Service List function for the supplied resource type

Type parameters:

▪ TRecord

▪ TPathParams

▪ TQueryParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ baseEndpoint: string

Returns: NestedListService‹TRecord, TPathParams, TQueryParams›

update

▸ update<TRecord, TPathParams>(recordType: object, resourceEndpoint: string): UpdateService‹TRecord, TPathParams›

Defined in src/services/service-factory.ts:139

Creates conventional Service Update function for the supplied resource type

Type parameters:

▪ TRecord: any

▪ TPathParams: any

Parameters:

▪ recordType: object

Name Type
constructor

▪ resourceEndpoint: string

Returns: UpdateService‹TRecord, TPathParams›


Const ServiceHookFactory

▪ ServiceHookFactory: object

Defined in src/services/service-hook-factory.ts:26

Factory to encapsulate common service function logic

useBulkUpdate

▸ useBulkUpdate<TRecord, TPathParams>(recordType: object, resourceEndpoint: string): BulkUpdateServiceHook‹TRecord, TPathParams›

Defined in src/services/service-hook-factory.ts:33

Creates conventional hook for using service update function for an array of the supplied resource type. Automatically handles cancellation tokens internally.

Type parameters:

▪ TRecord

▪ TPathParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ resourceEndpoint: string

Returns: BulkUpdateServiceHook‹TRecord, TPathParams›

useCreate

▸ useCreate<TRecord>(recordType: object, baseEndpoint: string): CreateServiceHook‹TRecord›

Defined in src/services/service-hook-factory.ts:68

Creates conventional hook for using service create function for the supplied resource type. Automatically handles cancellation tokens internally.

Recommendation

Use useNestedCreate when route is nested!

Type parameters:

▪ TRecord: any

Parameters:

▪ recordType: object

Name Type
constructor

▪ baseEndpoint: string

Returns: CreateServiceHook‹TRecord›

useDelete

▸ useDelete(resourceEndpoint: string): DeleteServiceHook

Defined in src/services/service-hook-factory.ts:98

Creates conventional hook for using service delete function for the supplied resource type. Automatically handles cancellation tokens internally.

Parameters:

Name Type
resourceEndpoint string

Returns: DeleteServiceHook

useGet

▸ useGet<TRecord, TPathParams, TQueryParams>(recordType: object, resourceEndpoint: string): GetServiceHook‹TRecord, TPathParams, TQueryParams›

Defined in src/services/service-hook-factory.ts:123

Creates conventional hook for using service get function for the supplied resource type. Automatically handles cancellation tokens internally.

Type parameters:

▪ TRecord

▪ TPathParams

▪ TQueryParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ resourceEndpoint: string

Returns: GetServiceHook‹TRecord, TPathParams, TQueryParams›

useList

▸ useList<TRecord, TQueryParams>(recordType: object, baseEndpoint: string): ListServiceHook‹TRecord, TQueryParams›

Defined in src/services/service-hook-factory.ts:159

Creates conventional hook for using service list function for the supplied resource type. Automatically handles cancellation tokens internally.

Recommendation

Use useNestedList when route is nested!

Type parameters:

▪ TRecord

▪ TQueryParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ baseEndpoint: string

Returns: ListServiceHook‹TRecord, TQueryParams›

useNestedCreate

▸ useNestedCreate<TRecord, TPathParams>(recordType: object, baseEndpoint: string): NestedCreateServiceHook‹TRecord, TPathParams›

Defined in src/services/service-hook-factory.ts:189

Creates conventional hook for using service nested create function for the supplied resource type. Automatically handles cancellation tokens internally.

Type parameters:

▪ TRecord: any

▪ TPathParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ baseEndpoint: string

Returns: NestedCreateServiceHook‹TRecord, TPathParams›

useNestedList

▸ useNestedList<TRecord, TPathParams, TQueryParams>(recordType: object, baseEndpoint: string): NestedListServiceHook‹TRecord, TPathParams, TQueryParams›

Defined in src/services/service-hook-factory.ts:220

Creates conventional hook for using service nested list function for the supplied resource type. Automatically handles cancellation tokens internally.

Type parameters:

▪ TRecord

▪ TPathParams

▪ TQueryParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ baseEndpoint: string

Returns: NestedListServiceHook‹TRecord, TPathParams, TQueryParams›

useUpdate

▸ useUpdate<TRecord, TPathParams>(recordType: object, resourceEndpoint: string): UpdateServiceHook‹TRecord, TPathParams›

Defined in src/services/service-hook-factory.ts:252

Creates conventional hook for using service update function for the supplied resource type. Automatically handles cancellation tokens internally.

Type parameters:

▪ TRecord

▪ TPathParams

Parameters:

▪ recordType: object

Name Type
constructor

▪ resourceEndpoint: string

Returns: UpdateServiceHook‹TRecord, TPathParams›