mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(HTTP Request Node): Add pagination support (#5993)
Is still WIP and does not implement the correct UI yet. Github issue / Community forum post (link here to close automatically): https://community.n8n.io/t/pagination-included-into-http-node/15080 https://community.n8n.io/t/how-to-paginate-through-data-in-http-requests/28103
This commit is contained in:
@@ -511,10 +511,18 @@ export interface IHttpRequestOptions {
|
||||
json?: boolean;
|
||||
}
|
||||
|
||||
export interface PaginationOptions {
|
||||
binaryResult?: boolean;
|
||||
continue: boolean | string;
|
||||
request: IRequestOptionsSimplifiedAuth;
|
||||
maxRequests?: number;
|
||||
}
|
||||
|
||||
export type IN8nHttpResponse = IDataObject | Buffer | GenericValue | GenericValue[] | null;
|
||||
|
||||
export interface IN8nHttpFullResponse {
|
||||
body: IN8nHttpResponse | Readable;
|
||||
__bodyResolved?: boolean;
|
||||
headers: IDataObject;
|
||||
statusCode: number;
|
||||
statusMessage?: string;
|
||||
@@ -708,6 +716,14 @@ export interface RequestHelperFunctions {
|
||||
requestOptions: IHttpRequestOptions,
|
||||
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
||||
): Promise<any>;
|
||||
requestWithAuthenticationPaginated(
|
||||
this: IAllExecuteFunctions,
|
||||
requestOptions: OptionsWithUri,
|
||||
itemIndex: number,
|
||||
paginationOptions: PaginationOptions,
|
||||
credentialsType?: string,
|
||||
additionalCredentialOptions?: IAdditionalCredentialOptions,
|
||||
): Promise<any[]>;
|
||||
|
||||
requestOAuth1(
|
||||
this: IAllExecuteFunctions,
|
||||
@@ -745,10 +761,12 @@ type FunctionsBaseWithRequiredKeys<Keys extends keyof FunctionsBase> = Functions
|
||||
[K in Keys]: NonNullable<FunctionsBase[K]>;
|
||||
};
|
||||
|
||||
export type ContextType = 'flow' | 'node';
|
||||
|
||||
type BaseExecutionFunctions = FunctionsBaseWithRequiredKeys<'getMode'> & {
|
||||
continueOnFail(): boolean;
|
||||
evaluateExpression(expression: string, itemIndex: number): NodeParameterValueType;
|
||||
getContext(type: string): IContextObject;
|
||||
getContext(type: ContextType): IContextObject;
|
||||
getExecuteData(): IExecuteData;
|
||||
getWorkflowDataProxy(itemIndex: number): IWorkflowDataProxyData;
|
||||
getInputSourceData(inputIndex?: number, inputName?: string): ISourceData;
|
||||
|
||||
Reference in New Issue
Block a user