@montonio/montonio-js 1.1.6 → 1.1.7
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/dist/montonio.es.js +958 -944
- package/dist/montonio.es.js.map +1 -1
- package/dist/montonio.umd.js +9 -9
- package/dist/montonio.umd.js.map +1 -1
- package/dist/types/components/MontonioCheckout/MontonioCheckout.d.ts +1 -0
- package/dist/types/services/Logging/Logging.d.ts +15 -0
- package/dist/types/services/Messaging/Messaging.d.ts +1 -0
- package/dist/types/services/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@ import { CheckoutOptions, UpdatableCheckoutOptions } from './types';
|
|
|
2
2
|
import { BaseComponent } from '../BaseComponent';
|
|
3
3
|
export declare class MontonioCheckout extends BaseComponent {
|
|
4
4
|
isValid: boolean;
|
|
5
|
+
private readonly logger;
|
|
5
6
|
private options;
|
|
6
7
|
private readonly environment;
|
|
7
8
|
private paymentAuth;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { EnvironmentOptions } from '../Config/types';
|
|
2
|
+
/**
|
|
3
|
+
* Thin logger wrapper that writes to both console and Datadog explicitly.
|
|
4
|
+
* Datadog does NOT forward console logs — only calls through this logger reach Datadog.
|
|
5
|
+
*
|
|
6
|
+
* Usage: private readonly logger = new MontonioLogger('ClassName');
|
|
7
|
+
*/
|
|
8
|
+
export declare class MontonioLogger {
|
|
9
|
+
private readonly context;
|
|
10
|
+
private readonly logPrefix;
|
|
11
|
+
constructor(context: string);
|
|
12
|
+
info(message: string, data?: object): void;
|
|
13
|
+
warn(message: string, data?: object): void;
|
|
14
|
+
error(message: string, data?: object): void;
|
|
15
|
+
}
|
|
2
16
|
/**
|
|
3
17
|
* Service for initializing telemetry and logging
|
|
4
18
|
* Implemented as a singleton
|
|
@@ -7,6 +21,7 @@ export declare class LoggingService {
|
|
|
7
21
|
private static _instance;
|
|
8
22
|
private initialized;
|
|
9
23
|
private readonly configService;
|
|
24
|
+
private readonly logger;
|
|
10
25
|
private constructor();
|
|
11
26
|
static get instance(): LoggingService;
|
|
12
27
|
/**
|
|
@@ -11,6 +11,7 @@ export declare class MessagingService {
|
|
|
11
11
|
* For example, the "payment complete" message can be listened to from both the MontonioCheckout
|
|
12
12
|
* component and the PaymentAuth (3DS) component - handled by the same callback.
|
|
13
13
|
*/
|
|
14
|
+
private readonly logger;
|
|
14
15
|
private subscriptions;
|
|
15
16
|
constructor();
|
|
16
17
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { ConfigService } from './Config/Config';
|
|
2
2
|
export { HTTPService } from './HTTP/HTTP';
|
|
3
3
|
export { MessagingService } from './Messaging/Messaging';
|
|
4
|
-
export { LoggingService } from './Logging/Logging';
|
|
4
|
+
export { LoggingService, MontonioLogger } from './Logging/Logging';
|