import { Client, GetMembers200ResponseOneOfInner, GetOrganizationMemberRoles200ResponseOneOfInner, ManagementClient, Permission, ResourceServer } from 'auth0'; import { IntegrationConfig } from './config'; import { Auth0User } from './types/users'; import { IntegrationLogger } from '@jupiterone/integration-sdk-core'; export type ResourceIteratee = (each: T) => Promise | void; /** * An APIClient maintains authentication state and provides an interface to * third party data APIs. * * It is recommended that integrations wrap provider data APIs to provide a * place to handle error responses and implement common patterns for iterating * resources. */ export declare class APIClient { readonly config: IntegrationConfig; managementClient: ManagementClient; logger: IntegrationLogger; constructor(config: IntegrationConfig, logger: IntegrationLogger); testConnection(): Promise; /** * Iterates each user resource in the provider. * According to the docs you cant retrieve more that 1000 users using pagination * The solution inmplemented here, uses created_at field to paginate the responses by chunks * So that we hit the limit multiple times, but we reset the query * * @param iteratee receives each resource to produce entities/relationships */ iterateUsers(iteratee: ResourceIteratee): Promise; private sleep; private executeAPIRequestWithRetries; /** * Iterates each client (ie. Application) resource in the provider. * * @param iteratee receives each resource to produce entities/relationships */ iterateClients(iteratee: ResourceIteratee): Promise; iterateRoles(iteratee: ResourceIteratee): Promise; iterateRoleUsers(roleId: string, iteratee: ResourceIteratee): Promise; iterateServers(iteratee: ResourceIteratee): Promise; iterateRolePermissions(roleId: string, iteratee: ResourceIteratee): Promise; private paginate; private paginateWithCheckpoint; } export declare function createAPIClient(config: IntegrationConfig, logger: IntegrationLogger): APIClient; //# sourceMappingURL=client.d.ts.map