Passed
Pull Request — master (#134)
by
unknown
02:18
created

src/response/AuthResponse.d.ts   A

Complexity

Total Complexity 11
Complexity/F 1

Size

Lines of Code 28
Function Count 11

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 24
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 11
mnd 0
bc 0
fnc 11
bpm 0
cpm 1
noi 0

11 Functions

Rating   Name   Duplication   Size   Complexity  
A AuthResponse.get_intuit_tid 0 1 1
A AuthResponse.isJson 0 1 1
A AuthResponse.getToken 0 1 1
A AuthResponse.headers 0 1 1
A AuthResponse.isContentType 0 1 1
A AuthResponse.valid 0 1 1
A AuthResponse.processResponse 0 1 1
A AuthResponse.text 0 1 1
A AuthResponse.getJson 0 1 1
A AuthResponse.status 0 1 1
A AuthResponse.getContentType 0 1 1
1
import * as popsicle from "popsicle";
2
import { Token } from "../access-token/Token";
3
4
export class AuthResponse {
5
  response: popsicle.Response;
6
  body: string;
7
  json: Record<string, any>;
8
  intuit_tid: string;
9
  token: Token;
10
  constructor(params: {
11
    token?: Token,
12
    response?: popsicle.Response,
13
    body?: string,
14
    intuit_id?: string
15
  });
16
  processResponse(response: popsicle.Response): void;
17
  getToken(): Token;
18
  text(): string;
19
  status(): number;
20
  headers(): Record<string, any>;
21
  valid(): boolean;
22
  getJson(): Record<string, any>;
23
  get_intuit_tid(): string;
24
  isContentType(): boolean;
25
  getContentType(): string;
26
  isJson(): boolean;
27
}
28