aimyapi 0.1.1 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +0,0 @@
1
- import { APIInterface, SalesData } from "./sales_api";
2
- export declare class API implements APIInterface {
3
- sendEmail(to: string, subject: string, body: string): Promise<void>;
4
- getSalesData(): SalesData[];
5
- print(text: string): void;
6
- delay(milliseconds: number): Promise<void>;
7
- }
@@ -1,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.API = void 0;
4
- const utils_1 = require("../lib/utils");
5
- class API {
6
- // Mock implementation, doesn't actually send an email
7
- sendEmail(to, subject, body) {
8
- console.log(`Sending email to "${to}" with subject "${subject}" and body\n"${body}"`);
9
- return (0, utils_1.delay)(1000);
10
- }
11
- getSalesData() {
12
- return [
13
- { sales: 100, month: 1, year: 2020, businessUnit: "Advertising" },
14
- { sales: 200, month: 2, year: 2020, businessUnit: "Advertising" },
15
- { sales: 300, month: 3, year: 2020, businessUnit: "Advertising" },
16
- { sales: 400, month: 4, year: 2020, businessUnit: "Advertising" },
17
- { sales: 500, month: 5, year: 2020, businessUnit: "Advertising" },
18
- { sales: 600, month: 6, year: 2020, businessUnit: "Advertising" },
19
- { sales: 700, month: 7, year: 2020, businessUnit: "Advertising" },
20
- { sales: 800, month: 8, year: 2020, businessUnit: "Advertising" },
21
- { sales: 900, month: 9, year: 2020, businessUnit: "Advertising" },
22
- { sales: 1000, month: 10, year: 2020, businessUnit: "Advertising" },
23
- { sales: 1100, month: 11, year: 2020, businessUnit: "Advertising" },
24
- { sales: 1100, month: 12, year: 2020, businessUnit: "Advertising" },
25
- { sales: 1200, month: 1, year: 2020, businessUnit: "Software" },
26
- { sales: 1300, month: 2, year: 2020, businessUnit: "Software" },
27
- { sales: 1400, month: 3, year: 2020, businessUnit: "Software" },
28
- { sales: 1500, month: 4, year: 2020, businessUnit: "Software" },
29
- { sales: 1600, month: 5, year: 2020, businessUnit: "Software" },
30
- { sales: 1700, month: 6, year: 2020, businessUnit: "Software" },
31
- { sales: 1800, month: 7, year: 2020, businessUnit: "Software" },
32
- { sales: 1800, month: 8, year: 2020, businessUnit: "Software" },
33
- { sales: 1500, month: 9, year: 2020, businessUnit: "Software" },
34
- { sales: 1200, month: 10, year: 2020, businessUnit: "Software" },
35
- { sales: 1000, month: 11, year: 2020, businessUnit: "Software" },
36
- { sales: 100, month: 12, year: 2020, businessUnit: "Software" },
37
- { sales: 1200, month: 1, year: 2020, businessUnit: "Hardware" },
38
- { sales: 1300, month: 2, year: 2020, businessUnit: "Hardware" },
39
- { sales: 1400, month: 3, year: 2020, businessUnit: "Hardware" },
40
- { sales: 1500, month: 4, year: 2020, businessUnit: "Hardware" },
41
- { sales: 1600, month: 5, year: 2020, businessUnit: "Hardware" },
42
- { sales: 1700, month: 6, year: 2020, businessUnit: "Hardware" },
43
- { sales: 1800, month: 7, year: 2020, businessUnit: "Hardware" },
44
- { sales: 1800, month: 8, year: 2020, businessUnit: "Hardware" },
45
- { sales: 1500, month: 9, year: 2020, businessUnit: "Hardware" },
46
- { sales: 1200, month: 10, year: 2020, businessUnit: "Hardware" },
47
- { sales: 1000, month: 11, year: 2020, businessUnit: "Hardware" },
48
- { sales: 100, month: 12, year: 2020, businessUnit: "Hardware" },
49
- ];
50
- }
51
- ;
52
- print(text) {
53
- console.log(text);
54
- }
55
- delay(milliseconds) {
56
- return (0, utils_1.delay)(milliseconds);
57
- }
58
- }
59
- exports.API = API;
File without changes
File without changes
File without changes