Total Complexity | 5 |
Complexity/F | 1 |
Lines of Code | 26 |
Function Count | 5 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | export interface Response { |
||
2 | code: number; |
||
3 | message: string; |
||
4 | codeDesc: string; |
||
5 | data: { count: number, task_id: string }; |
||
6 | } |
||
7 | |||
8 | export = class Refresh { |
||
9 | public host: string; |
||
10 | public protocol: string; |
||
11 | public constructor(public configs: { |
||
12 | SecretId: string; |
||
13 | SecretKey: string; |
||
14 | Timestamp?: number; |
||
15 | Nonce?: number; |
||
16 | path?: string; |
||
17 | }); |
||
18 | |||
19 | public purgeDirsCache(dirs: string | string[]): Promise<Response> |
||
20 | public purgeUrlsCache(dirs: string | string[]): Promise<Response> |
||
21 | |||
22 | public request(params: any): Promise<Response> |
||
23 | public transformerUrls(urls: string | string[], type?: 'urls' | 'dirs'): Record<string, string> |
||
24 | public buildRequestParams(urls: string | string[], type?: 'urls' | 'dirs', action?: 'RefreshCdnUrl' | 'RefreshCdnDir'): Record<string, string> |
||
25 | } |
||
26 |