//#region src/utils/speakeasy.ts
function createSpeakeasyPagination(type, config) {
	if (type === "offsetLimit") return { "x-speakeasy-pagination": {
		type: "offsetLimit",
		inputs: config?.inputs ?? [{
			name: "page",
			in: "parameters",
			type: "page"
		}, {
			name: "limit",
			in: "parameters",
			type: "limit"
		}],
		outputs: config?.outputs ?? { numPages: "$.pagination.pages" }
	} };
	return { "x-speakeasy-pagination": {
		type: "cursor",
		inputs: config?.inputs ?? [],
		outputs: config?.outputs ?? {}
	} };
}
/**
* Speakeasy pagination extension for offset-limit pagination.
* Use this in createRoute() calls for list endpoints that support pagination.
*
* IMPORTANT: Endpoints using this extension MUST return responses matching
* the StandardPaginationResponse<T> shape with data from a *Paginated() function
* (e.g., listAgentsPaginated, listProjectsPaginated) to ensure the JSONPath
* '$.pagination.pages' correctly resolves.
*
* @example
* ```ts
* createRoute({
*   method: 'get',
*   path: '/',
*   // ... other config
*   ...speakeasyOffsetLimitPagination,
* })
* ```
*/
const speakeasyOffsetLimitPagination = createSpeakeasyPagination("offsetLimit");

//#endregion
export { createSpeakeasyPagination, speakeasyOffsetLimitPagination };