Fix style

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-12-02 14:12:58 +01:00
parent b0e475301a
commit d710f5af73
18 changed files with 71 additions and 52 deletions

View File

@@ -11,7 +11,7 @@ export async function proboApiRequest(
this: IExecuteFunctions | IHookFunctions,
query: string,
variables: IDataObject = {},
): Promise<any> {
): Promise<IDataObject> {
const credentials = await this.getCredentials('proboApi');
if (!credentials?.apiKey) {
@@ -44,11 +44,11 @@ export async function proboApiRequestAllItems(
this: IExecuteFunctions,
query: string,
variables: IDataObject,
getConnection: (response: any) => any,
getConnection: (response: IDataObject) => IDataObject | undefined,
returnAll: boolean = true,
limit: number = 0,
): Promise<any[]> {
const items: any[] = [];
): Promise<IDataObject[]> {
const items: IDataObject[] = [];
let hasNextPage = true;
let cursor: string | null = null;
const pageSize = 100;
@@ -72,7 +72,8 @@ export async function proboApiRequestAllItems(
const connection = getConnection(responseData);
if (connection?.edges) {
items.push(...connection.edges.map((edge: any) => edge.node));
const edges = connection.edges as Array<{ node: IDataObject }>;
items.push(...edges.map((edge) => edge.node));
}
if (connection?.pageInfo) {