@fat-zebra/sdk 2.0.2-beta.2 → 2.0.2

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/hpp/hpp.d.ts CHANGED
@@ -38,6 +38,7 @@ interface HppOptions {
38
38
  tokenizeOnly?: boolean;
39
39
  }
40
40
  declare class Hpp {
41
+ static readonly displayName = "Hpp";
41
42
  private iframe;
42
43
  private headless;
43
44
  private version;
package/dist/hpp/hpp.js CHANGED
@@ -252,6 +252,7 @@ class Hpp {
252
252
  console.log('Tokenize card response received');
253
253
  }
254
254
  }
255
+ Hpp.displayName = "Hpp";
255
256
  __decorate([
256
257
  logMethod()
257
258
  ], Hpp.prototype, "setCrossFramesEventListeners", null);
@@ -31,16 +31,15 @@ import { instrumentFunction } from "./instrument";
31
31
  // Decorator factory
32
32
  export function logMethod(opts = {}) {
33
33
  return function (target, propertyKey, descriptor) {
34
- var _a, _b;
34
+ var _a;
35
35
  const original = descriptor.value;
36
36
  if (typeof original !== "function") {
37
37
  console.error(`@logMethod can only decorate methods (${propertyKey})`);
38
38
  return descriptor;
39
39
  }
40
- const className = typeof target === "function"
41
- ? target.name || "UnknownClass"
42
- : ((_a = target === null || target === void 0 ? void 0 : target.constructor) === null || _a === void 0 ? void 0 : _a.name) || "UnknownClass";
43
- descriptor.value = instrumentFunction(propertyKey, original, Object.assign(Object.assign({}, opts), { className, mapArgs: (_b = opts.mapArgs) !== null && _b !== void 0 ? _b : ((args) => args.map((a) => {
40
+ const ctor = typeof target === "function" ? target : target === null || target === void 0 ? void 0 : target.constructor;
41
+ const className = (ctor === null || ctor === void 0 ? void 0 : ctor.displayName) || (ctor === null || ctor === void 0 ? void 0 : ctor.name) || "UnknownClass";
42
+ descriptor.value = instrumentFunction(propertyKey, original, Object.assign(Object.assign({}, opts), { className, mapArgs: (_a = opts.mapArgs) !== null && _a !== void 0 ? _a : ((args) => args.map((a) => {
44
43
  if (!a || typeof a !== "object")
45
44
  return a;
46
45
  return Object.assign(Object.assign({}, a), { js_sdk: true });
package/dist/main.d.ts CHANGED
@@ -24,6 +24,7 @@ interface VerifyCardOptions {
24
24
  challengeWindowSize?: ChallengeWindowSize;
25
25
  }
26
26
  export default class FatZebra {
27
+ static readonly displayName = "FatZebra";
27
28
  private sca;
28
29
  private fzConfig;
29
30
  private gatewayClient;
package/dist/main.js CHANGED
@@ -28,7 +28,7 @@ import { ApplePay } from './applepay';
28
28
  import { setLoggerUsername, setTransactionReference } from './logging/logger-context';
29
29
  import { logMethod } from './logging/logMethod';
30
30
  import ThreeDSecure from './three_d_secure';
31
- export default class FatZebra {
31
+ class FatZebra {
32
32
  constructor(config) {
33
33
  var _a;
34
34
  this.threeDSecureListenersBound = false;
@@ -323,6 +323,8 @@ export default class FatZebra {
323
323
  onOnce(event, callback);
324
324
  }
325
325
  }
326
+ FatZebra.displayName = "FatZebra";
327
+ export default FatZebra;
326
328
  __decorate([
327
329
  logMethod({
328
330
  mapArgs: (args) => {
@@ -29,6 +29,7 @@ export interface ScaConfig {
29
29
  environment?: Environment;
30
30
  }
31
31
  declare class Sca {
32
+ static readonly displayName = "Sca";
32
33
  private _cardinal;
33
34
  private enrollmentResult;
34
35
  private paymentIntent;
package/dist/sca/index.js CHANGED
@@ -229,6 +229,7 @@ class Sca {
229
229
  }
230
230
  }
231
231
  }
232
+ Sca.displayName = "Sca";
232
233
  __decorate([
233
234
  logMethod({
234
235
  mapArgs: (args) => {
@@ -19,6 +19,7 @@ interface ThreeDSecureRunProps {
19
19
  test: boolean;
20
20
  }
21
21
  declare class ThreeDSecure {
22
+ static readonly displayName = "ThreeDSecure";
22
23
  private headlessBridge;
23
24
  private cybersourceReferenceId;
24
25
  private paymentIntent;
@@ -197,6 +197,7 @@ class ThreeDSecure {
197
197
  }
198
198
  }
199
199
  }
200
+ ThreeDSecure.displayName = "ThreeDSecure";
200
201
  __decorate([
201
202
  logMethod({
202
203
  mapArgs: (args) => {
@@ -6,6 +6,7 @@ export interface DeviceDataCollectionMessage {
6
6
  reference_id: string;
7
7
  }
8
8
  export default class DeviceDataCollection {
9
+ static readonly displayName = "DeviceDataCollection";
9
10
  private static readonly IFRAME_ID;
10
11
  private static readonly IFRAME_NAME;
11
12
  private static readonly FORM_ID;
@@ -117,6 +117,7 @@ class DeviceDataCollection {
117
117
  }
118
118
  }
119
119
  }
120
+ DeviceDataCollection.displayName = "DeviceDataCollection";
120
121
  // Shared IDs so other classes can query the DOM directly too
121
122
  DeviceDataCollection.IFRAME_ID = "cardinal_collection_iframe";
122
123
  DeviceDataCollection.IFRAME_NAME = "collectionIframe";
@@ -1,5 +1,6 @@
1
1
  import { ChallengeWindowSize } from "../../sca/types";
2
2
  declare class ThreeDSecureChallengeWindow {
3
+ static readonly displayName = "ThreeDSecureChallengeWindow";
3
4
  private static OVERLAY_ID;
4
5
  private static CONTENT_ID;
5
6
  private static FRAME_WRAP_ID;
@@ -173,6 +173,7 @@ class ThreeDSecureChallengeWindow {
173
173
  console.log("❌ step-up iframe error");
174
174
  }
175
175
  }
176
+ ThreeDSecureChallengeWindow.displayName = "ThreeDSecureChallengeWindow";
176
177
  ThreeDSecureChallengeWindow.OVERLAY_ID = "three_d_secure_challenge_overlay";
177
178
  ThreeDSecureChallengeWindow.CONTENT_ID = "three_d_secure_challenge_content";
178
179
  ThreeDSecureChallengeWindow.FRAME_WRAP_ID = "three_d_secure_challenge_frame_wrap";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fat-zebra/sdk",
3
- "version": "2.0.2-beta.2",
3
+ "version": "2.0.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {