From 0d2fcb5ae2fbe3b7462bee67a83e120ef10eb3a1 Mon Sep 17 00:00:00 2001 From: J-Leg Date: Fri, 10 Sep 2021 11:18:03 +1000 Subject: [PATCH] revert lint move contents to .d.ts file --- .eslintrc.json | 3 +-- types/api/reporting.d.ts | 37 ++++++++++++++++++++++++++++++++++++- types/api/reporting.ts | 36 ------------------------------------ 3 files changed, 37 insertions(+), 39 deletions(-) delete mode 100644 types/api/reporting.ts diff --git a/.eslintrc.json b/.eslintrc.json index eae1431..637db14 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -10,7 +10,6 @@ "sourceType": "module" }, "rules": { - "@typescript-eslint/camelcase": "off", - "@typescript-eslint/no-namespace": "off" + "@typescript-eslint/camelcase": "off" } } diff --git a/types/api/reporting.d.ts b/types/api/reporting.d.ts index 011d1e5..a32cdc0 100644 --- a/types/api/reporting.d.ts +++ b/types/api/reporting.d.ts @@ -1 +1,36 @@ -export declare namespace Reporting {} +export namespace Reporting { + interface OrderStatsResponse { + message: string; + status: number; + result: OrderResult; + } + + interface OrderResult { + [region: string]: OrderStats; + } + + interface OrderStats { + period: { + from: string; + to: string; + }; + min: number; + count: number; + is_popular: boolean; + } + + interface OfferStatsResponse { + message: string; + status: number; + result: OfferResult; + } + + type OfferResult = Array; + + interface OfferStats { + total_purchase: string; + offer_id: string; + page_views: string | null; + region: string; + } +} diff --git a/types/api/reporting.ts b/types/api/reporting.ts deleted file mode 100644 index a32cdc0..0000000 --- a/types/api/reporting.ts +++ /dev/null @@ -1,36 +0,0 @@ -export namespace Reporting { - interface OrderStatsResponse { - message: string; - status: number; - result: OrderResult; - } - - interface OrderResult { - [region: string]: OrderStats; - } - - interface OrderStats { - period: { - from: string; - to: string; - }; - min: number; - count: number; - is_popular: boolean; - } - - interface OfferStatsResponse { - message: string; - status: number; - result: OfferResult; - } - - type OfferResult = Array; - - interface OfferStats { - total_purchase: string; - offer_id: string; - page_views: string | null; - region: string; - } -}