We've recently added service factories for batchedListService and nestedBatchedListService to a client project. These should be moved to src/services/service-factory.ts in this project. To do this, several pieces will be needed.
Types:
export type BatchedListService<TRecord, TQueryParams> = (
queryParams: TQueryParams,
property: keyof TQueryParams,
size: number
) => Promise<ServiceResponse<TRecord>>;
export type NestedBatchedListService<TRecord, TPathParams, TQueryParams> = (
pathParams: TPathParams,
queryParams: TQueryParams,
property: keyof TQueryParams,
size: number
) => Promise<ServiceResponse<TRecord>>
After the _batchedList private function is added to service-factory.ts the calls to AndcultureCodeServiceFactory.nestedList and AndcultureCodeServiceFactory.list can be swapped out for a single call to the service-factory's private _list function.
Finally, a service-response-factory was added to return a successfulList result. This should also be brought over.
We've recently added service factories for
batchedListService
andnestedBatchedListService
to a client project. These should be moved tosrc/services/service-factory.ts
in this project. To do this, several pieces will be needed.Types:
Public Functions:
Private Function:
After the
_batchedList
private function is added toservice-factory.ts
the calls toAndcultureCodeServiceFactory.nestedList
andAndcultureCodeServiceFactory.list
can be swapped out for a single call to theservice-factory
's private_list
function.Finally, a
service-response-factory
was added to return asuccessfulList
result. This should also be brought over.The implementation in the client project has been tagged with this issue for reference.