@reevit/node 0.3.0
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.
- package/.github/workflows/ci.yml +35 -0
- package/.github/workflows/publish.yml +32 -0
- package/LICENSE +21 -0
- package/README.md +1385 -0
- package/dist/client.d.ts +72 -0
- package/dist/client.js +117 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +56 -0
- package/dist/services/connections.d.ts +9 -0
- package/dist/services/connections.js +21 -0
- package/dist/services/fraud.d.ts +8 -0
- package/dist/services/fraud.js +17 -0
- package/dist/services/payments.d.ts +10 -0
- package/dist/services/payments.js +30 -0
- package/dist/services/subscriptions.d.ts +8 -0
- package/dist/services/subscriptions.js +17 -0
- package/dist/types.d.ts +118 -0
- package/dist/types.js +2 -0
- package/package.json +26 -0
- package/src/client.ts +202 -0
- package/src/index.ts +48 -0
- package/src/services/connections.ts +21 -0
- package/src/services/fraud.ts +16 -0
- package/src/services/payments.ts +36 -0
- package/src/services/subscriptions.ts +16 -0
- package/src/types.ts +129 -0
- package/tsconfig.json +15 -0
package/src/client.ts
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
|
|
3
|
+
// Types
|
|
4
|
+
|
|
5
|
+
type PaymentMethod = 'card' | 'mobile_money' | 'bank_transfer';
|
|
6
|
+
|
|
7
|
+
interface PaymentError {
|
|
8
|
+
code: string;
|
|
9
|
+
message: string;
|
|
10
|
+
details?: any;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface ReevitCheckoutConfig {
|
|
14
|
+
amount: number;
|
|
15
|
+
currency: string;
|
|
16
|
+
metadata?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface CreatePaymentIntentRequest {
|
|
20
|
+
amount: number;
|
|
21
|
+
currency: string;
|
|
22
|
+
method: string;
|
|
23
|
+
country: string;
|
|
24
|
+
customer_id?: string;
|
|
25
|
+
metadata?: Record<string, unknown>;
|
|
26
|
+
description?: string;
|
|
27
|
+
policy?: {
|
|
28
|
+
prefer?: string[];
|
|
29
|
+
max_amount?: number;
|
|
30
|
+
blocked_bins?: string[];
|
|
31
|
+
allowed_bins?: string[];
|
|
32
|
+
velocity_max_per_minute?: number;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface PaymentIntentResponse {
|
|
37
|
+
id: string;
|
|
38
|
+
connection_id: string;
|
|
39
|
+
provider: string;
|
|
40
|
+
status: string;
|
|
41
|
+
client_secret: string;
|
|
42
|
+
amount: number;
|
|
43
|
+
currency: string;
|
|
44
|
+
fee_amount: number;
|
|
45
|
+
fee_currency: string;
|
|
46
|
+
net_amount: number;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
interface ConfirmPaymentRequest {
|
|
50
|
+
provider_ref_id: string;
|
|
51
|
+
provider_data?: Record<string, unknown>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface PaymentDetailResponse {
|
|
55
|
+
id: string;
|
|
56
|
+
connection_id: string;
|
|
57
|
+
provider: string;
|
|
58
|
+
method: string;
|
|
59
|
+
status: string;
|
|
60
|
+
amount: number;
|
|
61
|
+
currency: string;
|
|
62
|
+
fee_amount: number;
|
|
63
|
+
fee_currency: string;
|
|
64
|
+
net_amount: number;
|
|
65
|
+
customer_id?: string;
|
|
66
|
+
client_secret: string;
|
|
67
|
+
provider_ref_id?: string;
|
|
68
|
+
metadata?: Record<string, unknown>;
|
|
69
|
+
created_at: string;
|
|
70
|
+
updated_at: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
interface APIErrorResponse {
|
|
74
|
+
code: string;
|
|
75
|
+
message: string;
|
|
76
|
+
details?: Record<string, string>;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
interface ReevitAPIClientConfig {
|
|
80
|
+
publicKey: string;
|
|
81
|
+
baseUrl?: string;
|
|
82
|
+
timeout?: number;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Constants
|
|
86
|
+
|
|
87
|
+
const API_BASE_URL_PRODUCTION = 'https://api.reevit.io';
|
|
88
|
+
const API_BASE_URL_SANDBOX = 'https://sandbox-api.reevit.io';
|
|
89
|
+
const DEFAULT_TIMEOUT = 30000;
|
|
90
|
+
|
|
91
|
+
function isSandboxKey(publicKey: string): boolean {
|
|
92
|
+
return publicKey.startsWith('pk_test_') || publicKey.startsWith('pk_sandbox_');
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function createPaymentError(response: any, errorData: APIErrorResponse): PaymentError {
|
|
96
|
+
return {
|
|
97
|
+
code: errorData.code || 'api_error',
|
|
98
|
+
message: errorData.message || 'An unexpected error occurred',
|
|
99
|
+
details: {
|
|
100
|
+
httpStatus: response.status,
|
|
101
|
+
...errorData.details,
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export class ReevitAPIClient {
|
|
107
|
+
private publicKey: string;
|
|
108
|
+
private baseUrl: string;
|
|
109
|
+
private timeout: number;
|
|
110
|
+
|
|
111
|
+
constructor(config: ReevitAPIClientConfig) {
|
|
112
|
+
this.publicKey = config.publicKey;
|
|
113
|
+
this.baseUrl = config.baseUrl || (isSandboxKey(config.publicKey) ? API_BASE_URL_SANDBOX : API_BASE_URL_PRODUCTION);
|
|
114
|
+
this.timeout = config.timeout || DEFAULT_TIMEOUT;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private async request<T>(method: string, path: string, body?: any): Promise<{ data?: T; error?: PaymentError }> {
|
|
118
|
+
try {
|
|
119
|
+
const response = await axios({
|
|
120
|
+
method,
|
|
121
|
+
url: `${this.baseUrl}${path}`,
|
|
122
|
+
data: body,
|
|
123
|
+
headers: {
|
|
124
|
+
'Content-Type': 'application/json',
|
|
125
|
+
'Authorization': `Bearer ${this.publicKey}`,
|
|
126
|
+
'X-Reevit-Client': '@reevit/node',
|
|
127
|
+
'X-Reevit-Client-Version': '0.3.0',
|
|
128
|
+
},
|
|
129
|
+
timeout: this.timeout,
|
|
130
|
+
});
|
|
131
|
+
return { data: response.data };
|
|
132
|
+
} catch (error: any) {
|
|
133
|
+
if (error.response) {
|
|
134
|
+
return {
|
|
135
|
+
error: createPaymentError(error.response, error.response.data),
|
|
136
|
+
};
|
|
137
|
+
} else if (error.code === 'ECONNABORTED') {
|
|
138
|
+
return {
|
|
139
|
+
error: {
|
|
140
|
+
code: 'request_timeout',
|
|
141
|
+
message: 'The request timed out. Please try again.',
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
} else if (error.message.includes('Network Error') || error.code === 'ENOTFOUND') {
|
|
145
|
+
return {
|
|
146
|
+
error: {
|
|
147
|
+
code: 'network_error',
|
|
148
|
+
message: 'Unable to connect to Reevit. Please check your internet connection.',
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
} else {
|
|
152
|
+
return {
|
|
153
|
+
error: {
|
|
154
|
+
code: 'unknown_error',
|
|
155
|
+
message: 'An unexpected error occurred. Please try again.',
|
|
156
|
+
},
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
async createPaymentIntent(config: ReevitCheckoutConfig, method: PaymentMethod, country = 'GH'): Promise<{ data?: PaymentIntentResponse; error?: PaymentError }> {
|
|
163
|
+
const request: CreatePaymentIntentRequest = {
|
|
164
|
+
amount: config.amount,
|
|
165
|
+
currency: config.currency,
|
|
166
|
+
method: this.mapPaymentMethod(method),
|
|
167
|
+
country,
|
|
168
|
+
customer_id: config.metadata?.customerId as string | undefined,
|
|
169
|
+
metadata: config.metadata,
|
|
170
|
+
};
|
|
171
|
+
return this.request<PaymentIntentResponse>('POST', '/v1/payments/intents', request);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
async getPaymentIntent(paymentId: string): Promise<{ data?: PaymentDetailResponse; error?: PaymentError }> {
|
|
175
|
+
return this.request<PaymentDetailResponse>('GET', `/v1/payments/${paymentId}`);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
async confirmPayment(paymentId: string): Promise<{ data?: PaymentDetailResponse; error?: PaymentError }> {
|
|
179
|
+
return this.request<PaymentDetailResponse>('POST', `/v1/payments/${paymentId}/confirm`);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
async cancelPaymentIntent(paymentId: string): Promise<{ data?: PaymentDetailResponse; error?: PaymentError }> {
|
|
183
|
+
return this.request<PaymentDetailResponse>('POST', `/v1/payments/${paymentId}/cancel`);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
private mapPaymentMethod(method: PaymentMethod): string {
|
|
187
|
+
switch (method) {
|
|
188
|
+
case 'card':
|
|
189
|
+
return 'card';
|
|
190
|
+
case 'mobile_money':
|
|
191
|
+
return 'mobile_money';
|
|
192
|
+
case 'bank_transfer':
|
|
193
|
+
return 'bank_transfer';
|
|
194
|
+
default:
|
|
195
|
+
return method;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export function createReevitClient(config: ReevitAPIClientConfig): ReevitAPIClient {
|
|
201
|
+
return new ReevitAPIClient(config);
|
|
202
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import axios, { AxiosInstance } from 'axios';
|
|
2
|
+
import { PaymentsService } from './services/payments';
|
|
3
|
+
import { ConnectionsService } from './services/connections';
|
|
4
|
+
import { SubscriptionsService } from './services/subscriptions';
|
|
5
|
+
import { FraudService } from './services/fraud';
|
|
6
|
+
|
|
7
|
+
// Default API base URLs (secure HTTPS)
|
|
8
|
+
const API_BASE_URL_PRODUCTION = 'https://api.reevit.io';
|
|
9
|
+
const API_BASE_URL_SANDBOX = 'https://sandbox-api.reevit.io';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Determines if an API key is for sandbox mode
|
|
13
|
+
*/
|
|
14
|
+
function isSandboxKey(apiKey: string): boolean {
|
|
15
|
+
return apiKey.startsWith('sk_test_') || apiKey.startsWith('sk_sandbox_');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export class Reevit {
|
|
19
|
+
private client: AxiosInstance;
|
|
20
|
+
|
|
21
|
+
public payments: PaymentsService;
|
|
22
|
+
public connections: ConnectionsService;
|
|
23
|
+
public subscriptions: SubscriptionsService;
|
|
24
|
+
public fraud: FraudService;
|
|
25
|
+
|
|
26
|
+
constructor(apiKey: string, orgId: string, baseUrl?: string) {
|
|
27
|
+
// Use provided baseUrl, or auto-detect based on API key prefix
|
|
28
|
+
const resolvedBaseUrl = baseUrl || (isSandboxKey(apiKey) ? API_BASE_URL_SANDBOX : API_BASE_URL_PRODUCTION);
|
|
29
|
+
|
|
30
|
+
this.client = axios.create({
|
|
31
|
+
baseURL: resolvedBaseUrl,
|
|
32
|
+
timeout: 10000,
|
|
33
|
+
headers: {
|
|
34
|
+
'Content-Type': 'application/json',
|
|
35
|
+
'User-Agent': 'reevit-node/0.1.0',
|
|
36
|
+
'X-Reevit-Key': apiKey,
|
|
37
|
+
'X-Org-Id': orgId,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
this.payments = new PaymentsService(this.client);
|
|
42
|
+
this.connections = new ConnectionsService(this.client);
|
|
43
|
+
this.subscriptions = new SubscriptionsService(this.client);
|
|
44
|
+
this.fraud = new FraudService(this.client);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export * from './types';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { Connection, ConnectionRequest } from '../types';
|
|
3
|
+
|
|
4
|
+
export class ConnectionsService {
|
|
5
|
+
constructor(private client: AxiosInstance) { }
|
|
6
|
+
|
|
7
|
+
async create(data: ConnectionRequest): Promise<Connection> {
|
|
8
|
+
const response = await this.client.post<Connection>('/v1/connections', data);
|
|
9
|
+
return response.data;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async list(): Promise<Connection[]> {
|
|
13
|
+
const response = await this.client.get<Connection[]>('/v1/connections');
|
|
14
|
+
return response.data;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async test(data: ConnectionRequest): Promise<boolean> {
|
|
18
|
+
const response = await this.client.post<{ success: boolean }>('/v1/connections/test', data);
|
|
19
|
+
return response.data.success;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { FraudPolicy } from '../types';
|
|
3
|
+
|
|
4
|
+
export class FraudService {
|
|
5
|
+
constructor(private client: AxiosInstance) { }
|
|
6
|
+
|
|
7
|
+
async get(): Promise<FraudPolicy> {
|
|
8
|
+
const response = await this.client.get<FraudPolicy>('/v1/policies/fraud');
|
|
9
|
+
return response.data;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async update(policy: FraudPolicy): Promise<FraudPolicy> {
|
|
13
|
+
const response = await this.client.post<FraudPolicy>('/v1/policies/fraud', policy);
|
|
14
|
+
return response.data;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import {
|
|
3
|
+
Payment,
|
|
4
|
+
PaymentIntentRequest,
|
|
5
|
+
PaymentSummary,
|
|
6
|
+
Refund
|
|
7
|
+
} from '../types';
|
|
8
|
+
|
|
9
|
+
export class PaymentsService {
|
|
10
|
+
constructor(private client: AxiosInstance) { }
|
|
11
|
+
|
|
12
|
+
async createIntent(data: PaymentIntentRequest): Promise<Payment> {
|
|
13
|
+
const response = await this.client.post<Payment>('/v1/payments/intents', data);
|
|
14
|
+
return response.data;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async list(limit: number = 50, offset: number = 0): Promise<PaymentSummary[]> {
|
|
18
|
+
const response = await this.client.get<PaymentSummary[]>('/v1/payments', {
|
|
19
|
+
params: { limit, offset }
|
|
20
|
+
});
|
|
21
|
+
return response.data;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async get(id: string): Promise<Payment> {
|
|
25
|
+
const response = await this.client.get<Payment>(`/v1/payments/${id}`);
|
|
26
|
+
return response.data;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
async refund(id: string, amount?: number, reason?: string): Promise<Refund> {
|
|
30
|
+
const response = await this.client.post<Refund>(`/v1/payments/${id}/refund`, {
|
|
31
|
+
amount,
|
|
32
|
+
reason
|
|
33
|
+
});
|
|
34
|
+
return response.data;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { Subscription, SubscriptionRequest } from '../types';
|
|
3
|
+
|
|
4
|
+
export class SubscriptionsService {
|
|
5
|
+
constructor(private client: AxiosInstance) { }
|
|
6
|
+
|
|
7
|
+
async create(data: SubscriptionRequest): Promise<Subscription> {
|
|
8
|
+
const response = await this.client.post<Subscription>('/v1/subscriptions', data);
|
|
9
|
+
return response.data;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
async list(): Promise<Subscription[]> {
|
|
13
|
+
const response = await this.client.get<Subscription[]>('/v1/subscriptions');
|
|
14
|
+
return response.data;
|
|
15
|
+
}
|
|
16
|
+
}
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
export interface PaymentIntentRequest {
|
|
2
|
+
amount: number;
|
|
3
|
+
currency: string;
|
|
4
|
+
method: string;
|
|
5
|
+
country: string;
|
|
6
|
+
customer_id?: string;
|
|
7
|
+
policy?: FraudPolicyInput;
|
|
8
|
+
metadata?: Record<string, any>;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface FraudPolicyInput {
|
|
12
|
+
prefer?: string[];
|
|
13
|
+
max_amount?: number;
|
|
14
|
+
blocked_bins?: string[];
|
|
15
|
+
allowed_bins?: string[];
|
|
16
|
+
velocity_max_per_minute?: number;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface Payment {
|
|
20
|
+
id: string;
|
|
21
|
+
connection_id: string;
|
|
22
|
+
provider: string;
|
|
23
|
+
provider_ref_id: string;
|
|
24
|
+
method: string;
|
|
25
|
+
status: string;
|
|
26
|
+
amount: number;
|
|
27
|
+
currency: string;
|
|
28
|
+
fee_amount: number;
|
|
29
|
+
fee_currency: string;
|
|
30
|
+
net_amount: number;
|
|
31
|
+
customer_id: string;
|
|
32
|
+
metadata: Record<string, any>;
|
|
33
|
+
route: PaymentRouteAttempt[];
|
|
34
|
+
created_at: string;
|
|
35
|
+
updated_at: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface PaymentSummary {
|
|
39
|
+
id: string;
|
|
40
|
+
connection_id: string;
|
|
41
|
+
provider: string;
|
|
42
|
+
method: string;
|
|
43
|
+
status: string;
|
|
44
|
+
amount: number;
|
|
45
|
+
currency: string;
|
|
46
|
+
fee_amount: number;
|
|
47
|
+
fee_currency: string;
|
|
48
|
+
net_amount: number;
|
|
49
|
+
customer_id: string;
|
|
50
|
+
metadata: Record<string, any>;
|
|
51
|
+
created_at: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface PaymentRouteAttempt {
|
|
55
|
+
connection_id: string;
|
|
56
|
+
provider: string;
|
|
57
|
+
status: string;
|
|
58
|
+
error: string;
|
|
59
|
+
labels: string[];
|
|
60
|
+
routing_hints?: RoutingHints;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface RoutingHints {
|
|
64
|
+
country_preference: string[];
|
|
65
|
+
method_bias: Record<string, string>;
|
|
66
|
+
fallback_only: boolean;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface Refund {
|
|
70
|
+
id: string;
|
|
71
|
+
payment_id: string;
|
|
72
|
+
amount: number;
|
|
73
|
+
status: string;
|
|
74
|
+
reason: string;
|
|
75
|
+
created_at: string;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export interface ConnectionRequest {
|
|
79
|
+
provider: string;
|
|
80
|
+
mode: string;
|
|
81
|
+
credentials: Record<string, any>;
|
|
82
|
+
capabilities?: Record<string, any>;
|
|
83
|
+
routing_hints?: RoutingHints;
|
|
84
|
+
labels?: string[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface Connection {
|
|
88
|
+
id: string;
|
|
89
|
+
provider: string;
|
|
90
|
+
mode: string;
|
|
91
|
+
status: string;
|
|
92
|
+
capabilities: Record<string, any>;
|
|
93
|
+
routing_hints: RoutingHints;
|
|
94
|
+
labels: string[];
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface SubscriptionRequest {
|
|
98
|
+
customer_id: string;
|
|
99
|
+
plan_id: string;
|
|
100
|
+
amount: number;
|
|
101
|
+
currency: string;
|
|
102
|
+
method: string;
|
|
103
|
+
interval: 'monthly' | 'yearly';
|
|
104
|
+
metadata?: Record<string, any>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface Subscription {
|
|
108
|
+
id: string;
|
|
109
|
+
org_id: string;
|
|
110
|
+
customer_id: string;
|
|
111
|
+
plan_id: string;
|
|
112
|
+
amount: number;
|
|
113
|
+
currency: string;
|
|
114
|
+
method: string;
|
|
115
|
+
interval: string;
|
|
116
|
+
status: string;
|
|
117
|
+
next_renewal_at: string;
|
|
118
|
+
metadata: Record<string, any>;
|
|
119
|
+
created_at: string;
|
|
120
|
+
updated_at: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface FraudPolicy {
|
|
124
|
+
prefer: string[];
|
|
125
|
+
max_amount: number;
|
|
126
|
+
blocked_bins: string[];
|
|
127
|
+
allowed_bins: string[];
|
|
128
|
+
velocity_max_per_minute: number;
|
|
129
|
+
}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es2018",
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"lib": ["es2018", "dom"],
|
|
6
|
+
"declaration": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"esModuleInterop": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"outDir": "./dist"
|
|
12
|
+
},
|
|
13
|
+
"include": ["src/**/*"],
|
|
14
|
+
"exclude": ["node_modules", "dist"]
|
|
15
|
+
}
|