Skip to content

Commit

Permalink
Merge pull request #2061 from RedHatInsights/RHCLOUD-35115
Browse files Browse the repository at this point in the history
[RHCLOUD-35115] Add types for PDF Generator API
  • Loading branch information
Hyperkid123 authored Sep 12, 2024
2 parents 57260ea + 6519a14 commit 91e609d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions packages/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { History } from 'history';
import { Access } from '@redhat-cloud-services/rbac-client';
import { AnalyticsBrowser } from '@segment/analytics-next';
import { Method } from 'axios';
import type { AxiosRequestConfig } from 'axios';

export declare type HelpTopicLink = {
href: string;
Expand Down Expand Up @@ -32,6 +33,14 @@ export declare type PDFRequestOptions = {
filename?: string;
};

type CreateAxiosRequest<T = any> = (service: string, config: AxiosRequestConfig) => Promise<T>;

type FetchData = (createAsyncRequest: CreateAxiosRequest) => Promise<any>;

type AsyncState<T = any> = {
data: T;
};

declare type ChromeUser = {
entitlements: {
[key: string]: {
Expand Down

0 comments on commit 91e609d

Please sign in to comment.