@experian-ecs/connected-api-sdk 1.3.0 → 1.4.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.
@@ -12,64 +12,64 @@
12
12
  * OTHER LIABILITY ARISING FROM OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS CODE.
13
13
  */
14
14
 
15
- var Dt = Object.defineProperty;
16
- var Ut = (r) => {
15
+ var Kt = Object.defineProperty;
16
+ var Rt = (r) => {
17
17
  throw TypeError(r);
18
18
  };
19
- var Jt = (r, e, t) => e in r ? Dt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
20
- var d = (r, e, t) => Jt(r, typeof e != "symbol" ? e + "" : e, t), st = (r, e, t) => e.has(r) || Ut("Cannot " + t);
21
- var c = (r, e, t) => (st(r, e, "read from private field"), t ? t.call(r) : e.get(r)), h = (r, e, t) => e.has(r) ? Ut("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), V = (r, e, t, n) => (st(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), y = (r, e, t) => (st(r, e, "access private method"), t);
22
- function Ft(r) {
19
+ var Ht = (r, e, t) => e in r ? Kt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
20
+ var h = (r, e, t) => Ht(r, typeof e != "symbol" ? e + "" : e, t), ot = (r, e, t) => e.has(r) || Rt("Cannot " + t);
21
+ var c = (r, e, t) => (ot(r, e, "read from private field"), t ? t.call(r) : e.get(r)), d = (r, e, t) => e.has(r) ? Rt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), B = (r, e, t, n) => (ot(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), y = (r, e, t) => (ot(r, e, "access private method"), t);
22
+ function Xt(r) {
23
23
  switch (r.type) {
24
24
  case "client_side_error":
25
- return new Gt(r);
25
+ return new zt(r);
26
26
  case "authentication_error":
27
- return new Mt(r);
27
+ return new Qt(r);
28
28
  case "server_side_error":
29
- return new Kt(r);
29
+ return new Yt(r);
30
30
  case "rate_limit_error":
31
- return new Xt(r);
31
+ return new qt(r);
32
32
  default:
33
- return new Ht(r);
33
+ return new Zt(r);
34
34
  }
35
35
  }
36
- class T extends Error {
36
+ class p extends Error {
37
37
  constructor(t) {
38
38
  var n;
39
39
  super(t.message);
40
- d(this, "message");
41
- d(this, "data");
42
- d(this, "status");
40
+ h(this, "message");
41
+ h(this, "data");
42
+ h(this, "status");
43
43
  this.message = ((n = t.data) == null ? void 0 : n.message) || t.message || "", this.data = t.data, this.status = t.status;
44
44
  }
45
45
  }
46
- d(T, "generateError", Ft);
47
- class Gt extends T {
46
+ h(p, "generateError", Xt);
47
+ class zt extends p {
48
48
  constructor(e) {
49
49
  super(e), this.name = "ConnectedSolutionsClientSideError";
50
50
  }
51
51
  }
52
- class Mt extends T {
52
+ class Qt extends p {
53
53
  constructor(e) {
54
54
  super(e), this.name = "ConnectedSolutionsClientAuthenticationError";
55
55
  }
56
56
  }
57
- class Kt extends T {
57
+ class Yt extends p {
58
58
  constructor(e) {
59
59
  super(e), this.name = "ConnectedSolutionsClientServerSideError";
60
60
  }
61
61
  }
62
- class Ht extends T {
62
+ class Zt extends p {
63
63
  constructor(e) {
64
64
  super(e), this.name = "ConnectedSolutionsClientSDKError";
65
65
  }
66
66
  }
67
- class Xt extends T {
67
+ class qt extends p {
68
68
  constructor(e) {
69
69
  super(e), this.name = "ConnectedSolutionsClientRateLimitError";
70
70
  }
71
71
  }
72
- function Ct(r) {
72
+ function xt(r) {
73
73
  switch (r) {
74
74
  case "CLIENT_SIDE_ERROR":
75
75
  return "client_side_error";
@@ -83,38 +83,38 @@ function Ct(r) {
83
83
  return "sdk_error";
84
84
  }
85
85
  }
86
- function Et(r) {
86
+ function Nt(r) {
87
87
  return r === 401 ? "authentication_error" : r === 429 ? "rate_limit_error" : r && r >= 500 ? "server_side_error" : r && r >= 400 ? "client_side_error" : "sdk_error";
88
88
  }
89
- const Rt = {
89
+ const Wt = {
90
90
  PRODUCTION: "https://connected-api.experian.com",
91
91
  SANDBOX: "https://sandbox.connected-api.experian.com",
92
92
  UAT: "https://uat.connected-api.experian.com",
93
93
  INTEGRATION: "https://integration.connected-api.experian.com",
94
94
  DEVELOPMENT: "https://develop.connected-api.experian.com"
95
- }, zt = {
95
+ }, Ot = {
96
96
  PRODUCTION: "https://unity-contentstack.integration.us-exp-api.experiancs.com",
97
97
  SANDBOX: "https://unity-contentstack.dev.us-exp-api.experiancs.com",
98
98
  UAT: "https://unity-contentstack.dev.us-exp-api.experiancs.com",
99
99
  INTEGRATION: "https://unity-contentstack.dev.us-exp-api.experiancs.com",
100
100
  DEVELOPMENT: "https://unity-contentstack.dev.us-exp-api.experiancs.com"
101
101
  };
102
- var k, ct, vt;
103
- class b {
102
+ var k, ut, jt;
103
+ class m {
104
104
  constructor(e) {
105
- h(this, k);
106
- d(this, "config");
107
- d(this, "baseUrl", "");
108
- d(this, "contentstackUrl", "");
105
+ d(this, k);
106
+ h(this, "config");
107
+ h(this, "baseUrl", "");
108
+ h(this, "contentstackUrl", "");
109
109
  const n = e.environment ?? "PRODUCTION";
110
- this.config = e, this.baseUrl = Rt[n], this.contentstackUrl = zt[n];
110
+ this.config = e, this.baseUrl = Wt[n], this.contentstackUrl = Ot[n];
111
111
  }
112
112
  setConfig(e) {
113
113
  "environment" in e && (this.config.environment = e.environment), "token" in e && (this.config.token = e.token);
114
114
  }
115
115
  async fetchWithAuth(e, t) {
116
116
  try {
117
- y(this, k, ct).call(this);
117
+ y(this, k, ut).call(this);
118
118
  const n = typeof Headers < "u" && new Headers(t == null ? void 0 : t.headers);
119
119
  n && !n.Authorization && n.set("Authorization", `Bearer ${this.config.token}`);
120
120
  const s = {
@@ -137,10 +137,10 @@ class b {
137
137
  async fetchRequest(e, t) {
138
138
  var n;
139
139
  try {
140
- y(this, k, ct).call(this);
140
+ y(this, k, ut).call(this);
141
141
  const s = await fetch(e, t);
142
142
  if (!(s != null && s.ok)) {
143
- let o;
143
+ let a;
144
144
  const u = {
145
145
  type: "sdk_error",
146
146
  status: s == null ? void 0 : s.status,
@@ -148,12 +148,12 @@ class b {
148
148
  };
149
149
  if ((n = s == null ? void 0 : s.headers.get("content-type")) != null && n.includes("application/json")) {
150
150
  const g = await s.clone().json();
151
- u.data = g.error, u.type = Ct(g.error.type);
151
+ u.data = g.error, u.type = xt(g.error.type);
152
152
  } else
153
- u.type = Et(s == null ? void 0 : s.status);
154
- throw T.generateError(u);
153
+ u.type = Nt(s == null ? void 0 : s.status);
154
+ throw p.generateError(u);
155
155
  }
156
- return y(this, k, vt).call(this, s) ? {
156
+ return y(this, k, jt).call(this, s) ? {
157
157
  data: await s.clone().json(),
158
158
  error: void 0,
159
159
  meta: {
@@ -181,37 +181,37 @@ class b {
181
181
  }
182
182
  }
183
183
  }
184
- k = new WeakSet(), ct = function() {
184
+ k = new WeakSet(), ut = function() {
185
185
  if (!this.config.token) {
186
186
  const e = {
187
187
  type: "sdk_error",
188
188
  message: "You must first obtain and set a token before using an SDK method"
189
189
  };
190
- throw T.generateError(e);
190
+ throw p.generateError(e);
191
191
  }
192
- }, vt = function(e) {
192
+ }, jt = function(e) {
193
193
  var t, n;
194
194
  return ((t = e == null ? void 0 : e.headers.get("content-type")) == null ? void 0 : t.includes("application/json")) || ((n = e == null ? void 0 : e.headers.get("content-type")) == null ? void 0 : n.includes("application/octet-stream"));
195
195
  };
196
- var z, G, at;
197
- const Q = class Q extends b {
196
+ var z, G, ht;
197
+ const Q = class Q extends m {
198
198
  constructor(t) {
199
199
  super(t);
200
- h(this, G);
200
+ d(this, G);
201
201
  }
202
202
  async getCreditScores(t, n) {
203
- const s = t == null ? void 0 : t.version, i = y(this, G, at).call(this, s), a = {
203
+ const s = t == null ? void 0 : t.version, i = y(this, G, ht).call(this, s), o = {
204
204
  ...t != null && t.product_config_id ? { product_config_id: t.product_config_id } : {},
205
205
  ...t != null && t.include_factors ? { include_factors: t.include_factors.toString() } : {},
206
206
  ...t != null && t.include_ingredients ? { include_ingredients: t.include_ingredients.toString() } : {}
207
- }, o = new URLSearchParams(a).toString(), u = o ? `?${o}` : "", l = `${this.baseUrl}${i}${u}`;
207
+ }, a = new URLSearchParams(o).toString(), u = a ? `?${a}` : "", l = `${this.baseUrl}${i}${u}`;
208
208
  return this.fetchWithAuth(l, n);
209
209
  }
210
210
  async orderCreditScore(t, n) {
211
- const s = t.version, i = y(this, G, at).call(this, s), a = {
211
+ const s = t.version, i = y(this, G, ht).call(this, s), o = {
212
212
  ...t != null && t.include_factors ? { include_factors: t.include_factors.toString() } : {},
213
213
  ...t != null && t.include_ingredients ? { include_ingredients: t.include_ingredients.toString() } : {}
214
- }, o = new URLSearchParams(a).toString(), u = o ? `?${o}` : "", l = `${this.baseUrl}${i}${u}`;
214
+ }, a = new URLSearchParams(o).toString(), u = a ? `?${a}` : "", l = `${this.baseUrl}${i}${u}`;
215
215
  return this.fetchWithAuth(l, {
216
216
  method: "POST",
217
217
  headers: {
@@ -230,12 +230,12 @@ z = new WeakMap(), G = new WeakSet(), /**
230
230
  * @param version The API version to use.
231
231
  * @returns The versioned API path.
232
232
  */
233
- at = function(t = "v1") {
233
+ ht = function(t = "v1") {
234
234
  return `/${t}${c(Q, z)}`;
235
- }, h(Q, z, "/credit/scores");
236
- let ot = Q;
235
+ }, d(Q, z, "/credit/scores");
236
+ let dt = Q;
237
237
  var f;
238
- const $ = class $ extends b {
238
+ const $ = class $ extends m {
239
239
  constructor(e) {
240
240
  super(e);
241
241
  }
@@ -304,8 +304,8 @@ const $ = class $ extends b {
304
304
  });
305
305
  }
306
306
  async entitleCustomerToNewProduct(e, t) {
307
- const { product_config_id: n, entitlement_id: s, customer_id: i } = e, a = `${this.baseUrl}${c($, f)}/${s}/products/${n}/activate`;
308
- return this.fetchWithAuth(a, {
307
+ const { product_config_id: n, entitlement_id: s, customer_id: i } = e, o = `${this.baseUrl}${c($, f)}/${s}/products/${n}/activate`;
308
+ return this.fetchWithAuth(o, {
309
309
  method: "POST",
310
310
  ...t ?? {},
311
311
  headers: {
@@ -340,17 +340,17 @@ const $ = class $ extends b {
340
340
  return this.fetchWithAuth(s, t);
341
341
  }
342
342
  };
343
- f = new WeakMap(), h($, f, "/v1/entitlements");
344
- let ut = $;
345
- var Y, Z, wt;
346
- const q = class q extends b {
343
+ f = new WeakMap(), d($, f, "/v1/entitlements");
344
+ let lt = $;
345
+ var Y, Z, It;
346
+ const q = class q extends m {
347
347
  constructor(t) {
348
348
  super(t);
349
- h(this, Z);
349
+ d(this, Z);
350
350
  }
351
351
  async getCreditAttributes(t, n) {
352
- const s = t == null ? void 0 : t.version, i = y(this, Z, wt).call(this, s), a = `${this.baseUrl}${i}`;
353
- return this.fetchWithAuth(a, n);
352
+ const s = t == null ? void 0 : t.version, i = y(this, Z, It).call(this, s), o = `${this.baseUrl}${i}`;
353
+ return this.fetchWithAuth(o, n);
354
354
  }
355
355
  };
356
356
  Y = new WeakMap(), Z = new WeakSet(), /**
@@ -358,12 +358,12 @@ Y = new WeakMap(), Z = new WeakSet(), /**
358
358
  * @param version The API version to use.
359
359
  * @returns The versioned API path.
360
360
  */
361
- wt = function(t = "v1") {
361
+ It = function(t = "v1") {
362
362
  return `/${t}${c(q, Y)}`;
363
- }, h(q, Y, "/credit/attributes");
364
- let dt = q;
363
+ }, d(q, Y, "/credit/attributes");
364
+ let yt = q;
365
365
  var M;
366
- const B = class B extends b {
366
+ const D = class D extends m {
367
367
  constructor(e) {
368
368
  super(e);
369
369
  }
@@ -371,13 +371,13 @@ const B = class B extends b {
371
371
  const n = {
372
372
  ...e,
373
373
  ...e != null && e.run_all ? { run_all: e.run_all.toString() } : {}
374
- }, s = new URLSearchParams(n).toString(), i = s ? `?${s}` : "", a = `${this.baseUrl}${c(B, M)}${i}`;
375
- return this.fetchWithAuth(a, t);
374
+ }, s = new URLSearchParams(n).toString(), i = s ? `?${s}` : "", o = `${this.baseUrl}${c(D, M)}${i}`;
375
+ return this.fetchWithAuth(o, t);
376
376
  }
377
377
  async simulateScenario(e, t) {
378
- const { product_config_id: n, ...s } = e, i = new URLSearchParams({ product_config_id: n }).toString(), a = i ? `?${i}` : "";
378
+ const { product_config_id: n, ...s } = e, i = new URLSearchParams({ product_config_id: n }).toString(), o = i ? `?${i}` : "";
379
379
  return this.fetchWithAuth(
380
- `${this.baseUrl}${c(B, M)}${a}`,
380
+ `${this.baseUrl}${c(D, M)}${o}`,
381
381
  {
382
382
  method: "POST",
383
383
  headers: {
@@ -390,22 +390,22 @@ const B = class B extends b {
390
390
  );
391
391
  }
392
392
  };
393
- M = new WeakMap(), h(B, M, "/v1/credit/tools/simulator");
394
- let ht = B;
393
+ M = new WeakMap(), d(D, M, "/v1/credit/tools/simulator");
394
+ let gt = D;
395
395
  var j, O;
396
- const U = class U extends b {
396
+ const P = class P extends m {
397
397
  constructor(e) {
398
398
  super(e);
399
399
  }
400
400
  async getCreditScorePlan(e, t) {
401
- const n = new URLSearchParams(e).toString(), s = n ? `?${n}` : "", i = `${this.baseUrl}${c(U, j)}${s}`;
401
+ const n = new URLSearchParams(e).toString(), s = n ? `?${n}` : "", i = `${this.baseUrl}${c(P, j)}${s}`;
402
402
  return this.fetchWithAuth(i, {
403
403
  ...t ?? {}
404
404
  });
405
405
  }
406
406
  async createCreditScorePlan(e, t) {
407
- const { product_config_id: n, ...s } = e, i = new URLSearchParams({ product_config_id: n }).toString(), a = i ? `?${i}` : "", o = `${this.baseUrl}${c(U, j)}${a}`;
408
- return this.fetchWithAuth(o, {
407
+ const { product_config_id: n, ...s } = e, i = new URLSearchParams({ product_config_id: n }).toString(), o = i ? `?${i}` : "", a = `${this.baseUrl}${c(P, j)}${o}`;
408
+ return this.fetchWithAuth(a, {
409
409
  method: "POST",
410
410
  headers: {
411
411
  ...(t == null ? void 0 : t.headers) ?? {},
@@ -416,15 +416,15 @@ const U = class U extends b {
416
416
  });
417
417
  }
418
418
  async deleteCreditScorePlan(e, t) {
419
- const n = new URLSearchParams(e).toString(), s = n ? `?${n}` : "", i = `${this.baseUrl}${c(U, j)}${s}`;
419
+ const n = new URLSearchParams(e).toString(), s = n ? `?${n}` : "", i = `${this.baseUrl}${c(P, j)}${s}`;
420
420
  return this.fetchWithAuth(i, {
421
421
  method: "DELETE",
422
422
  ...t ?? {}
423
423
  });
424
424
  }
425
425
  async getCreditScorePlanRevisions(e, t) {
426
- const { product_config_id: n, ...s } = e, i = new URLSearchParams({ product_config_id: n }).toString(), a = i ? `?${i}` : "", o = `${this.baseUrl}${c(U, j)}${c(U, O)}${a}`;
427
- return this.fetchWithAuth(o, {
426
+ const { product_config_id: n, ...s } = e, i = new URLSearchParams({ product_config_id: n }).toString(), o = i ? `?${i}` : "", a = `${this.baseUrl}${c(P, j)}${c(P, O)}${o}`;
427
+ return this.fetchWithAuth(a, {
428
428
  method: "POST",
429
429
  body: JSON.stringify(s),
430
430
  headers: {
@@ -435,10 +435,10 @@ const U = class U extends b {
435
435
  });
436
436
  }
437
437
  };
438
- j = new WeakMap(), O = new WeakMap(), h(U, j, "/v1/credit/tools/planners"), h(U, O, "/revisions");
439
- let lt = U;
438
+ j = new WeakMap(), O = new WeakMap(), d(P, j, "/v1/credit/tools/planners"), d(P, O, "/revisions");
439
+ let $t = P;
440
440
  var I;
441
- const W = class W extends b {
441
+ const W = class W extends m {
442
442
  constructor(e) {
443
443
  super(e);
444
444
  }
@@ -466,57 +466,57 @@ const W = class W extends b {
466
466
  return this.fetchWithAuth(t, e);
467
467
  }
468
468
  };
469
- I = new WeakMap(), h(W, I, "/v1/events-alerts");
470
- let yt = W;
471
- function xt(r) {
469
+ I = new WeakMap(), d(W, I, "/v1/events-alerts");
470
+ let ft = W;
471
+ function kt(r) {
472
472
  return !(r != null && r.version) || (r == null ? void 0 : r.version) === "v1";
473
473
  }
474
- function Qt(r) {
474
+ function te(r) {
475
475
  return (r == null ? void 0 : r.version) === "v2";
476
476
  }
477
- function Pt(r) {
478
- return r !== void 0 && xt(r) && "include_fields" in r && typeof r.include_fields == "string";
477
+ function wt(r) {
478
+ return r !== void 0 && kt(r) && "include_fields" in r && typeof r.include_fields == "string";
479
479
  }
480
- function Yt(r) {
481
- return r !== void 0 && xt(r) && ("include_fields" in r && typeof r.include_fields == "string" || "report_date" in r && typeof r.report_date == "string" || "product_config_id" in r && typeof r.product_config_id == "string" || "report_between" in r && typeof r.report_between == "string");
480
+ function ee(r) {
481
+ return r !== void 0 && kt(r) && ("include_fields" in r && typeof r.include_fields == "string" || "report_date" in r && typeof r.report_date == "string" || "product_config_id" in r && typeof r.product_config_id == "string" || "report_between" in r && typeof r.report_between == "string");
482
482
  }
483
- function Zt(r) {
484
- return r !== void 0 && Qt(r) && ("product_config_id" in r && typeof r.product_config_id == "string" || "report_between" in r && typeof r.report_between == "string");
483
+ function re(r) {
484
+ return r !== void 0 && te(r) && ("product_config_id" in r && typeof r.product_config_id == "string" || "report_between" in r && typeof r.report_between == "string");
485
485
  }
486
- var tt, E, N;
487
- const et = class et extends b {
486
+ var tt, C, N;
487
+ const et = class et extends m {
488
488
  constructor(t) {
489
489
  super(t);
490
- h(this, E);
490
+ d(this, C);
491
491
  }
492
492
  async getReports(t, n) {
493
- const s = t == null ? void 0 : t.version, i = y(this, E, N).call(this, s), a = {};
494
- Yt(t) && (t.report_between && (a.report_between = t.report_between.toString()), t.include_fields && (a.include_fields = t.include_fields.toString()), t.report_date && (a.report_date = t.report_date.toString()), t.product_config_id && (a.product_config_id = t.product_config_id.toString())), Zt(t) && (t.product_config_id && (a.product_config_id = t.product_config_id.toString()), t.report_between && (a.report_between = t.report_between.toString()));
495
- const o = new URLSearchParams(a).toString(), u = o ? `?${o}` : "", l = `${this.baseUrl}${i}${u}`;
493
+ const s = t == null ? void 0 : t.version, i = y(this, C, N).call(this, s), o = {};
494
+ ee(t) && (t.report_between && (o.report_between = t.report_between.toString()), t.include_fields && (o.include_fields = t.include_fields.toString()), t.report_date && (o.report_date = t.report_date.toString()), t.product_config_id && (o.product_config_id = t.product_config_id.toString())), re(t) && (t.product_config_id && (o.product_config_id = t.product_config_id.toString()), t.report_between && (o.report_between = t.report_between.toString()));
495
+ const a = new URLSearchParams(o).toString(), u = a ? `?${a}` : "", l = `${this.baseUrl}${i}${u}`;
496
496
  return this.fetchWithAuth(l, n);
497
497
  }
498
498
  async getReportById(t, n) {
499
- const { id: s, version: i } = t, a = y(this, E, N).call(this, i), o = {};
500
- Pt(t) && (o.include_fields = t.include_fields.toString());
501
- const u = new URLSearchParams(o).toString(), l = u ? `?${u}` : "", g = `${this.baseUrl}${a}/${s}${l}`;
499
+ const { id: s, version: i } = t, o = y(this, C, N).call(this, i), a = {};
500
+ wt(t) && (a.include_fields = t.include_fields.toString());
501
+ const u = new URLSearchParams(a).toString(), l = u ? `?${u}` : "", g = `${this.baseUrl}${o}/${s}${l}`;
502
502
  return this.fetchWithAuth(g, n);
503
503
  }
504
504
  async getReportsMeta(t, n) {
505
- const { version: s, latest_only: i, report_read: a, ...o } = t ?? {}, u = y(this, E, N).call(this, s), l = {
506
- ...o ?? {},
505
+ const { version: s, latest_only: i, report_read: o, ...a } = t ?? {}, u = y(this, C, N).call(this, s), l = {
506
+ ...a ?? {},
507
507
  ...i ? { latest_only: i.toString() } : {},
508
- ...a ? { report_read: a.toString() } : {}
509
- }, g = new URLSearchParams(l).toString(), m = g ? `?${g}` : "", Bt = `${this.baseUrl}${u}/meta${m}`;
510
- return this.fetchWithAuth(Bt, n);
508
+ ...o ? { report_read: o.toString() } : {}
509
+ }, g = new URLSearchParams(l).toString(), T = g ? `?${g}` : "", ct = `${this.baseUrl}${u}/meta${T}`;
510
+ return this.fetchWithAuth(ct, n);
511
511
  }
512
512
  async getReportMetaById(t, n) {
513
- const { id: s, version: i, ...a } = t, o = y(this, E, N).call(this, i), u = new URLSearchParams(a).toString(), l = u ? `?${u}` : "", g = `${this.baseUrl}${o}/${s}/meta${l}`;
513
+ const { id: s, version: i, ...o } = t, a = y(this, C, N).call(this, i), u = new URLSearchParams(o).toString(), l = u ? `?${u}` : "", g = `${this.baseUrl}${a}/${s}/meta${l}`;
514
514
  return this.fetchWithAuth(g, n);
515
515
  }
516
516
  async markReportAsRead(t, n) {
517
- const { id: s, version: i } = t, a = y(this, E, N).call(this, i), o = `${this.baseUrl}${a}`;
517
+ const { id: s, version: i } = t, o = y(this, C, N).call(this, i), a = `${this.baseUrl}${o}`;
518
518
  if (i === "v2") {
519
- const l = `${o}/${s}/disposition`, g = t;
519
+ const l = `${a}/${s}/disposition`, g = t;
520
520
  return this.fetchWithAuth(l, {
521
521
  method: "PATCH",
522
522
  headers: {
@@ -529,16 +529,16 @@ const et = class et extends b {
529
529
  ...n ?? {}
530
530
  });
531
531
  }
532
- const u = `${o}/${s}/read`;
532
+ const u = `${a}/${s}/read`;
533
533
  return this.fetchWithAuth(u, {
534
534
  method: "PUT",
535
535
  ...n ?? {}
536
536
  });
537
537
  }
538
538
  async orderReport(t, n) {
539
- const s = {}, i = t == null ? void 0 : t.version, a = y(this, E, N).call(this, i);
540
- Pt(t) && (s.include_fields = t.include_fields.toString());
541
- const o = new URLSearchParams(s).toString(), u = o ? `?${o}` : "", l = `${this.baseUrl}${a}${u}`;
539
+ const s = {}, i = t == null ? void 0 : t.version, o = y(this, C, N).call(this, i);
540
+ wt(t) && (s.include_fields = t.include_fields.toString());
541
+ const a = new URLSearchParams(s).toString(), u = a ? `?${a}` : "", l = `${this.baseUrl}${o}${u}`;
542
542
  return this.fetchWithAuth(l, {
543
543
  method: "POST",
544
544
  headers: {
@@ -552,26 +552,26 @@ const et = class et extends b {
552
552
  });
553
553
  }
554
554
  };
555
- tt = new WeakMap(), E = new WeakSet(), /**
555
+ tt = new WeakMap(), C = new WeakSet(), /**
556
556
  * Get the versioned API path for credit reports.
557
557
  * @param version The API version to use.
558
558
  * @returns The versioned API path.
559
559
  */
560
560
  N = function(t = "v1") {
561
561
  return `/${t}${c(et, tt)}`;
562
- }, h(et, tt, "/credit/reports");
563
- let gt = et;
562
+ }, d(et, tt, "/credit/reports");
563
+ let mt = et;
564
564
  var w;
565
- const v = class v extends b {
565
+ const R = class R extends m {
566
566
  constructor(e) {
567
567
  super(e);
568
568
  }
569
569
  async getCustomerById(e, t) {
570
- const n = `${this.baseUrl}${c(v, w)}/${e.customer_id}`;
570
+ const n = `${this.baseUrl}${c(R, w)}/${e.customer_id}`;
571
571
  return this.fetchWithAuth(n, t);
572
572
  }
573
573
  async updateCustomer(e, t) {
574
- const { customer_id: n, ...s } = e, i = `${this.baseUrl}${c(v, w)}/${n}`;
574
+ const { customer_id: n, ...s } = e, i = `${this.baseUrl}${c(R, w)}/${n}`;
575
575
  return this.fetchWithAuth(i, {
576
576
  method: "PATCH",
577
577
  headers: {
@@ -583,14 +583,14 @@ const v = class v extends b {
583
583
  });
584
584
  }
585
585
  async deleteCustomer(e, t) {
586
- const n = `${this.baseUrl}${c(v, w)}/${e.customer_id}`;
586
+ const n = `${this.baseUrl}${c(R, w)}/${e.customer_id}`;
587
587
  return this.fetchWithAuth(n, {
588
588
  method: "DELETE",
589
589
  ...t ?? {}
590
590
  });
591
591
  }
592
592
  async createCustomer(e, t) {
593
- const n = `${this.baseUrl}${c(v, w)}`;
593
+ const n = `${this.baseUrl}${c(R, w)}`;
594
594
  return this.fetchWithAuth(n, {
595
595
  method: "POST",
596
596
  headers: {
@@ -602,7 +602,7 @@ const v = class v extends b {
602
602
  });
603
603
  }
604
604
  async searchCustomers(e, t) {
605
- const { next_cursor: n = "", ...s } = e, i = `${this.baseUrl}${c(v, w)}/search`;
605
+ const { next_cursor: n = "", ...s } = e, i = `${this.baseUrl}${c(R, w)}/search`;
606
606
  return this.fetchWithAuth(i, {
607
607
  method: "POST",
608
608
  headers: {
@@ -614,19 +614,19 @@ const v = class v extends b {
614
614
  });
615
615
  }
616
616
  };
617
- w = new WeakMap(), h(v, w, "/v1/customers");
618
- let $t = v;
617
+ w = new WeakMap(), d(R, w, "/v1/customers");
618
+ let bt = R;
619
619
  var K;
620
- const D = class D extends b {
620
+ const J = class J extends m {
621
621
  constructor(e) {
622
622
  super(e);
623
623
  }
624
624
  async getAuthQuestions(e) {
625
- const t = `${this.baseUrl}${c(D, K)}/questions`;
625
+ const t = `${this.baseUrl}${c(J, K)}/questions`;
626
626
  return this.fetchWithAuth(t, e);
627
627
  }
628
628
  async submitAuthAnswers(e, t) {
629
- const n = `${this.baseUrl}${c(D, K)}/questions`;
629
+ const n = `${this.baseUrl}${c(J, K)}/questions`;
630
630
  return this.fetchWithAuth(n, {
631
631
  method: "POST",
632
632
  headers: {
@@ -638,10 +638,10 @@ const D = class D extends b {
638
638
  });
639
639
  }
640
640
  };
641
- K = new WeakMap(), h(D, K, "/v1/authentication");
642
- let ft = D;
641
+ K = new WeakMap(), d(J, K, "/v1/authentication");
642
+ let _t = J;
643
643
  var rt;
644
- const nt = class nt extends b {
644
+ const nt = class nt extends m {
645
645
  constructor(e) {
646
646
  super(e);
647
647
  }
@@ -658,44 +658,52 @@ const nt = class nt extends b {
658
658
  });
659
659
  }
660
660
  };
661
- rt = new WeakMap(), h(nt, rt, "/v1/registrations");
662
- let mt = nt;
663
- var H;
664
- const J = class J extends b {
665
- constructor(e) {
666
- super(e);
661
+ rt = new WeakMap(), d(nt, rt, "/v1/registrations");
662
+ let St = nt;
663
+ var st, H, Tt;
664
+ const it = class it extends m {
665
+ constructor(t) {
666
+ super(t);
667
+ d(this, H);
667
668
  }
668
- async getProductConfigs(e, t) {
669
- const { fromEntries: n, entries: s } = Object, { isArray: i } = Array, a = n(
670
- s(e).filter(([g, m]) => m != null).map(([g, m]) => [
671
- g,
672
- i(m) ? m.join(",") : m.toString()
669
+ async getProductConfigs(t, n) {
670
+ const { fromEntries: s, entries: i } = Object, { isArray: o } = Array, a = t == null ? void 0 : t.version, u = y(this, H, Tt).call(this, a), { version: l, ...g } = s(
671
+ i(t).filter(([Et, L]) => L != null).map(([Et, L]) => [
672
+ Et,
673
+ o(L) ? L.join(",") : L.toString()
673
674
  ])
674
- ), o = new URLSearchParams(a).toString(), u = o ? `?${o}` : "", l = `${this.baseUrl}${c(J, H)}${u}`;
675
- return this.fetchWithAuth(l, {
676
- ...t || {}
675
+ ), T = new URLSearchParams(g).toString(), ct = T ? `?${T}` : "", Mt = `${this.baseUrl}${u}${ct}`;
676
+ return this.fetchWithAuth(Mt, {
677
+ ...n || {}
677
678
  });
678
679
  }
679
- async getProductConfigById(e, t) {
680
- const n = `${this.baseUrl}${c(J, H)}/${e.product_config_id}`;
681
- return this.fetchWithAuth(n, {
682
- ...t ?? {}
680
+ async getProductConfigById(t, n) {
681
+ const s = t == null ? void 0 : t.version, i = y(this, H, Tt).call(this, s), o = `${this.baseUrl}${i}/${t.product_config_id}`;
682
+ return this.fetchWithAuth(o, {
683
+ ...n ?? {}
683
684
  });
684
685
  }
685
686
  };
686
- H = new WeakMap(), h(J, H, "/v1/product-configs");
687
- let bt = J;
688
- var R;
689
- const P = class P extends b {
687
+ st = new WeakMap(), H = new WeakSet(), /**
688
+ * Get the versioned API path for Product Config.
689
+ * @param version The API version to use.
690
+ * @returns The versioned API path.
691
+ */
692
+ Tt = function(t = "v1") {
693
+ return `/${t}${c(it, st)}`;
694
+ }, d(it, st, "/product-configs");
695
+ let At = it;
696
+ var E;
697
+ const U = class U extends m {
690
698
  constructor(e) {
691
699
  super(e);
692
700
  }
693
701
  async getSurvey(e) {
694
- const t = `${this.baseUrl}${c(P, R)}/surveys`;
702
+ const t = `${this.baseUrl}${c(U, E)}/surveys`;
695
703
  return this.fetchWithAuth(t, e);
696
704
  }
697
705
  async submitSurvey(e, t) {
698
- const n = `${this.baseUrl}${c(P, R)}/surveys`;
706
+ const n = `${this.baseUrl}${c(U, E)}/surveys`;
699
707
  return this.fetchWithAuth(n, {
700
708
  method: "POST",
701
709
  headers: {
@@ -707,7 +715,7 @@ const P = class P extends b {
707
715
  });
708
716
  }
709
717
  async getScore(e) {
710
- const t = `${this.baseUrl}${c(P, R)}/scores?latest=TRUE`;
718
+ const t = `${this.baseUrl}${c(U, E)}/scores?latest=TRUE`;
711
719
  return this.fetchWithAuth(t, e);
712
720
  }
713
721
  async getPlan(e, t) {
@@ -715,11 +723,11 @@ const P = class P extends b {
715
723
  action_status: e.action_status,
716
724
  ...e.cursor ? { cursor: e.cursor } : {},
717
725
  ...e.count ? { count: e.count.toString() } : {}
718
- }, s = new URLSearchParams(n).toString(), i = s ? `?${s}` : "", a = `${this.baseUrl}${c(P, R)}/plans${i}`;
719
- return this.fetchWithAuth(a, t);
726
+ }, s = new URLSearchParams(n).toString(), i = s ? `?${s}` : "", o = `${this.baseUrl}${c(U, E)}/plans${i}`;
727
+ return this.fetchWithAuth(o, t);
720
728
  }
721
729
  async createPlan(e) {
722
- const t = `${this.baseUrl}${c(P, R)}/plans`;
730
+ const t = `${this.baseUrl}${c(U, E)}/plans`;
723
731
  return this.fetchWithAuth(t, {
724
732
  method: "POST",
725
733
  headers: {
@@ -731,7 +739,7 @@ const P = class P extends b {
731
739
  });
732
740
  }
733
741
  async updateAction(e, t) {
734
- const { action_id: n, ...s } = e, i = `${this.baseUrl}${c(P, R)}/plans/actions/${n}`;
742
+ const { action_id: n, ...s } = e, i = `${this.baseUrl}${c(U, E)}/plans/actions/${n}`;
735
743
  return this.fetchWithAuth(i, {
736
744
  method: "PUT",
737
745
  headers: {
@@ -743,10 +751,10 @@ const P = class P extends b {
743
751
  });
744
752
  }
745
753
  };
746
- R = new WeakMap(), h(P, R, "/v1/ihs");
747
- let _t = P;
748
- var S;
749
- const _ = class _ extends b {
754
+ E = new WeakMap(), d(U, E, "/v1/ihs");
755
+ let pt = U;
756
+ var _;
757
+ const b = class b extends m {
750
758
  constructor(e) {
751
759
  super(e);
752
760
  }
@@ -755,7 +763,7 @@ const _ = class _ extends b {
755
763
  * POST /v1/dim/scans
756
764
  */
757
765
  async createScan(e, t) {
758
- const n = `${this.baseUrl}${c(_, S)}/scans`;
766
+ const n = `${this.baseUrl}${c(b, _)}/scans`;
759
767
  return this.fetchWithAuth(n, {
760
768
  method: "POST",
761
769
  headers: {
@@ -775,15 +783,15 @@ const _ = class _ extends b {
775
783
  async getScans(e, t) {
776
784
  const n = {};
777
785
  e != null && e.product_config_id && (n.product_config_id = e.product_config_id), e != null && e.scan_between && (n.scan_between = e.scan_between), e != null && e.cursor && (n.cursor = e.cursor), e != null && e.count && (n.count = e.count.toString());
778
- const s = new URLSearchParams(n).toString(), i = s ? `?${s}` : "", a = `${this.baseUrl}${c(_, S)}/scans${i}`;
779
- return this.fetchWithAuth(a, t);
786
+ const s = new URLSearchParams(n).toString(), i = s ? `?${s}` : "", o = `${this.baseUrl}${c(b, _)}/scans${i}`;
787
+ return this.fetchWithAuth(o, t);
780
788
  }
781
789
  /**
782
790
  * Get scan by ID
783
791
  * GET /v1/dim/scans/{scan_id}
784
792
  */
785
793
  async getScanById(e, t) {
786
- const n = `${this.baseUrl}${c(_, S)}/scans/${e.scanId}`;
794
+ const n = `${this.baseUrl}${c(b, _)}/scans/${e.scanId}`;
787
795
  return this.fetchWithAuth(n, t);
788
796
  }
789
797
  /**
@@ -793,15 +801,15 @@ const _ = class _ extends b {
793
801
  async getScansMetadata(e, t) {
794
802
  const n = {};
795
803
  e != null && e.product_config_id && (n.product_config_id = e.product_config_id), e != null && e.scan_between && (n.scan_between = e.scan_between), e != null && e.most_recent && (n.most_recent = "TRUE");
796
- const s = new URLSearchParams(n).toString(), i = s ? `?${s}` : "", a = `${this.baseUrl}${c(_, S)}/scans/meta${i}`;
797
- return this.fetchWithAuth(a, t);
804
+ const s = new URLSearchParams(n).toString(), i = s ? `?${s}` : "", o = `${this.baseUrl}${c(b, _)}/scans/meta${i}`;
805
+ return this.fetchWithAuth(o, t);
798
806
  }
799
807
  /**
800
808
  * Get brokers details
801
809
  * GET /v1/dim/brokers
802
810
  */
803
811
  async getBrokers(e) {
804
- const t = `${this.baseUrl}${c(_, S)}/brokers`;
812
+ const t = `${this.baseUrl}${c(b, _)}/brokers`;
805
813
  return this.fetchWithAuth(t, e);
806
814
  }
807
815
  /**
@@ -809,7 +817,7 @@ const _ = class _ extends b {
809
817
  * GET /v1/dim/brokers/{broker_id}
810
818
  */
811
819
  async getBrokerById(e, t) {
812
- const n = `${this.baseUrl}${c(_, S)}/brokers/${e.brokerId}`;
820
+ const n = `${this.baseUrl}${c(b, _)}/brokers/${e.brokerId}`;
813
821
  return this.fetchWithAuth(n, t);
814
822
  }
815
823
  /**
@@ -817,7 +825,7 @@ const _ = class _ extends b {
817
825
  * GET /v1/dim/scans/{scan_id}/brokers
818
826
  */
819
827
  async getBrokersByScanId(e, t) {
820
- const n = `${this.baseUrl}${c(_, S)}/scans/${e.scanId}/brokers`;
828
+ const n = `${this.baseUrl}${c(b, _)}/scans/${e.scanId}/brokers`;
821
829
  return this.fetchWithAuth(n, t);
822
830
  }
823
831
  /**
@@ -825,7 +833,7 @@ const _ = class _ extends b {
825
833
  * GET /v1/dim/brokers/groups/{group_id}
826
834
  */
827
835
  async getBrokersByGroupId(e, t) {
828
- const n = `${this.baseUrl}${c(_, S)}/brokers/groups/${e.groupId}`;
836
+ const n = `${this.baseUrl}${c(b, _)}/brokers/groups/${e.groupId}`;
829
837
  return this.fetchWithAuth(n, t);
830
838
  }
831
839
  /**
@@ -835,7 +843,7 @@ const _ = class _ extends b {
835
843
  * Note: Per OAS 1.0.29, this endpoint doesn't accept a request body
836
844
  */
837
845
  async updateBrokerGroupAction(e, t) {
838
- const n = `${this.baseUrl}${c(_, S)}/brokers/groups/${e.groupId}/action`;
846
+ const n = `${this.baseUrl}${c(b, _)}/brokers/groups/${e.groupId}/action`;
839
847
  return this.fetchWithAuth(n, {
840
848
  method: "POST",
841
849
  headers: {
@@ -846,50 +854,50 @@ const _ = class _ extends b {
846
854
  });
847
855
  }
848
856
  };
849
- S = new WeakMap(), h(_, S, "/v1/dim");
850
- let St = _;
851
- const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
857
+ _ = new WeakMap(), d(b, _, "/v1/dim");
858
+ let Pt = b;
859
+ const at = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
852
860
  __proto__: null,
853
- AlertsService: yt,
854
- CreditAttributesService: dt,
855
- CreditReportsService: gt,
856
- CreditScorePlannerService: lt,
857
- CreditScoreSimulatorService: ht,
858
- CreditScoresService: ot,
859
- CustomerAuthService: ft,
860
- CustomersService: $t,
861
- DigitalIdentityManagerService: St,
862
- EntitlementsService: ut,
863
- IdentityHealthScoreService: _t,
864
- ProductConfigsService: bt,
865
- RegistrationsService: mt
861
+ AlertsService: ft,
862
+ CreditAttributesService: yt,
863
+ CreditReportsService: mt,
864
+ CreditScorePlannerService: $t,
865
+ CreditScoreSimulatorService: gt,
866
+ CreditScoresService: dt,
867
+ CustomerAuthService: _t,
868
+ CustomersService: bt,
869
+ DigitalIdentityManagerService: Pt,
870
+ EntitlementsService: lt,
871
+ IdentityHealthScoreService: pt,
872
+ ProductConfigsService: At,
873
+ RegistrationsService: St
866
874
  }, Symbol.toStringTag, { value: "Module" }));
867
- function qt(r) {
875
+ function ne(r) {
868
876
  return `${r[0].toLowerCase()}${r.substring(1)}`.replace(
869
877
  "Service",
870
878
  ""
871
879
  );
872
880
  }
873
- const Ot = typeof process < "u" && process.versions && process.versions.node && typeof window > "u";
874
- var A, L, X, p, Nt, pt, Wt, jt;
881
+ const se = typeof process < "u" && process.versions && process.versions.node && typeof window > "u";
882
+ var S, V, X, A, Lt, vt, Vt, Bt;
875
883
  const F = class F {
876
884
  constructor(e) {
877
- h(this, p);
878
- d(this, "config");
879
- h(this, A);
880
- h(this, L, null);
881
- d(this, "baseUrl", "");
882
- this.config = e, this.baseUrl = Rt[e.environment ?? "PRODUCTION"], V(this, A, /* @__PURE__ */ new Map());
885
+ d(this, A);
886
+ h(this, "config");
887
+ d(this, S);
888
+ d(this, V, null);
889
+ h(this, "baseUrl", "");
890
+ this.config = e, this.baseUrl = Wt[e.environment ?? "PRODUCTION"], B(this, S, /* @__PURE__ */ new Map());
883
891
  }
884
892
  async getAccessToken(e) {
885
- if (!Ot)
886
- throw T.generateError({
893
+ if (!se)
894
+ throw p.generateError({
887
895
  type: "sdk_error",
888
896
  message: "getAccessToken is not supported in browser"
889
897
  });
890
898
  try {
891
899
  return {
892
- data: await y(this, p, Nt).call(this, e),
900
+ data: await y(this, A, Lt).call(this, e),
893
901
  errors: void 0,
894
902
  meta: {
895
903
  status: 200,
@@ -908,25 +916,25 @@ const F = class F {
908
916
  }
909
917
  }
910
918
  getCacheLength() {
911
- return c(this, A).size;
919
+ return c(this, S).size;
912
920
  }
913
921
  clearCache() {
914
- const e = `${this.baseUrl}${c(F, X)}`, t = Array.from(c(this, A).keys()).filter(
922
+ const e = `${this.baseUrl}${c(F, X)}`, t = Array.from(c(this, S).keys()).filter(
915
923
  (n) => n.includes(e)
916
924
  );
917
925
  for (const n of t)
918
- c(this, A).delete(n);
926
+ c(this, S).delete(n);
919
927
  }
920
928
  };
921
- A = new WeakMap(), L = new WeakMap(), X = new WeakMap(), p = new WeakSet(), Nt = async function({
929
+ S = new WeakMap(), V = new WeakMap(), X = new WeakMap(), A = new WeakSet(), Lt = async function({
922
930
  grantType: e,
923
931
  clientId: t,
924
932
  clientSecret: n,
925
933
  customerId: s
926
934
  }) {
927
935
  var l;
928
- y(this, p, Wt).call(this);
929
- const i = `${this.baseUrl}${c(F, X)}`, a = {
936
+ y(this, A, Vt).call(this);
937
+ const i = `${this.baseUrl}${c(F, X)}`, o = {
930
938
  method: "POST",
931
939
  headers: { "content-type": "application/json" },
932
940
  credentials: "include",
@@ -936,237 +944,237 @@ A = new WeakMap(), L = new WeakMap(), X = new WeakMap(), p = new WeakSet(), Nt =
936
944
  client_secret: n,
937
945
  ...e === "trusted_partner" ? { partner_customer_id: s ?? "" } : {}
938
946
  })
939
- }, o = await y(this, p, jt).call(this, i, a);
940
- if (o != null && o.ok) {
941
- const m = await o.clone().json();
942
- return c(this, L) === null && y(this, p, pt).call(this, m.expires_in), m;
947
+ }, a = await y(this, A, Bt).call(this, i, o);
948
+ if (a != null && a.ok) {
949
+ const T = await a.clone().json();
950
+ return c(this, V) === null && y(this, A, vt).call(this, T.expires_in), T;
943
951
  }
944
952
  const u = {
945
953
  type: "sdk_error",
946
954
  // fallback
947
- status: o == null ? void 0 : o.status,
948
- message: (o == null ? void 0 : o.statusText) || "",
955
+ status: a == null ? void 0 : a.status,
956
+ message: (a == null ? void 0 : a.statusText) || "",
949
957
  data: void 0
950
958
  };
951
- if ((l = o == null ? void 0 : o.headers.get("content-type")) != null && l.includes("application/json")) {
952
- const m = await o.clone().json();
953
- u.data = m.error, u.type = Ct(m.error.type);
959
+ if ((l = a == null ? void 0 : a.headers.get("content-type")) != null && l.includes("application/json")) {
960
+ const T = await a.clone().json();
961
+ u.data = T.error, u.type = xt(T.error.type);
954
962
  } else
955
- u.type = Et(o == null ? void 0 : o.status);
956
- throw T.generateError(u);
957
- }, pt = function(e) {
963
+ u.type = Nt(a == null ? void 0 : a.status);
964
+ throw p.generateError(u);
965
+ }, vt = function(e) {
958
966
  const t = (/* @__PURE__ */ new Date()).getTime(), n = 60 * 60 * 1e3, s = t + n, i = e === null ? e : new Date(s).valueOf();
959
- V(this, L, i);
960
- }, Wt = function() {
961
- const e = new Date(Date.now()), t = new Date(c(this, L) ?? Number.NaN);
962
- te(e, t) && (y(this, p, pt).call(this, null), c(this, A).clear());
963
- }, jt = async function(e, t) {
967
+ B(this, V, i);
968
+ }, Vt = function() {
969
+ const e = new Date(Date.now()), t = new Date(c(this, V) ?? Number.NaN);
970
+ ie(e, t) && (y(this, A, vt).call(this, null), c(this, S).clear());
971
+ }, Bt = async function(e, t) {
964
972
  const n = `${e}${JSON.stringify(t || {})}`;
965
- if (!c(this, A).has(n)) {
973
+ if (!c(this, S).has(n)) {
966
974
  const s = fetch(e, t ?? {});
967
- c(this, A).set(n, s);
975
+ c(this, S).set(n, s);
968
976
  }
969
- return await c(this, A).get(n);
970
- }, h(F, X, "/v1/oauth2/token");
971
- let At = F;
972
- function te(r, e) {
977
+ return await c(this, S).get(n);
978
+ }, d(F, X, "/v1/oauth2/token");
979
+ let Ut = F;
980
+ function ie(r, e) {
973
981
  return r > e;
974
982
  }
975
983
  var x;
976
- const C = class C extends b {
984
+ const v = class v extends m {
977
985
  // constructor is private so that no other class can access it.
978
986
  constructor(t) {
979
987
  super(t);
980
- d(this, "alerts");
981
- d(this, "auth");
982
- d(this, "creditReports");
983
- d(this, "creditScores");
984
- d(this, "creditAttributes");
985
- d(this, "creditScorePlanner");
986
- d(this, "creditScoreSimulator");
987
- d(this, "customerAuth");
988
- d(this, "customers");
989
- d(this, "entitlements");
990
- d(this, "productConfigs");
991
- d(this, "registrations");
992
- d(this, "identityHealthScore");
993
- d(this, "digitalIdentityManager");
994
- for (const n in it)
995
- typeof it[n] == "function" && (this[qt(n)] = new it[n](t));
996
- this.auth = new At({
988
+ h(this, "alerts");
989
+ h(this, "auth");
990
+ h(this, "creditReports");
991
+ h(this, "creditScores");
992
+ h(this, "creditAttributes");
993
+ h(this, "creditScorePlanner");
994
+ h(this, "creditScoreSimulator");
995
+ h(this, "customerAuth");
996
+ h(this, "customers");
997
+ h(this, "entitlements");
998
+ h(this, "productConfigs");
999
+ h(this, "registrations");
1000
+ h(this, "identityHealthScore");
1001
+ h(this, "digitalIdentityManager");
1002
+ for (const n in at)
1003
+ typeof at[n] == "function" && (this[ne(n)] = new at[n](t));
1004
+ this.auth = new Ut({
997
1005
  environment: t.environment
998
1006
  });
999
1007
  }
1000
1008
  // new services go here
1001
1009
  // The method is static as we need to access the method only through the class here
1002
1010
  static getInstance(t) {
1003
- return c(C, x) || V(C, x, new C(t)), c(C, x);
1011
+ return c(v, x) || B(v, x, new v(t)), c(v, x);
1004
1012
  }
1005
1013
  static clearInstance() {
1006
- V(C, x, null);
1014
+ B(v, x, null);
1007
1015
  }
1008
1016
  };
1009
- x = new WeakMap(), h(C, x, null);
1010
- let Tt = C;
1011
- function he(r) {
1012
- return Tt.getInstance(r);
1017
+ x = new WeakMap(), d(v, x, null);
1018
+ let Ct = v;
1019
+ function fe(r) {
1020
+ return Ct.getInstance(r);
1013
1021
  }
1014
- function ee(r) {
1022
+ function ce(r) {
1015
1023
  return r.progress_status === "TARGET_NOT_MET" || r.progress_status === "COMPLETED";
1016
1024
  }
1017
- function le(r) {
1018
- return ee(r) || r.progress_status === "TARGET_SCORE_AND_PLAN_SET" || r.progress_status === "ON_TRACK" || r.progress_status === "OFF_TRACK";
1025
+ function me(r) {
1026
+ return ce(r) || r.progress_status === "TARGET_SCORE_AND_PLAN_SET" || r.progress_status === "ON_TRACK" || r.progress_status === "OFF_TRACK";
1019
1027
  }
1020
- function ye(r) {
1028
+ function be(r) {
1021
1029
  return r.score_model.includes("VANTAGE");
1022
1030
  }
1023
- function ge(r) {
1031
+ function _e(r) {
1024
1032
  return r.score_model.includes("FICO");
1025
1033
  }
1026
- function $e(r) {
1034
+ function Se(r) {
1027
1035
  return r.target_score !== void 0;
1028
1036
  }
1029
- function fe(r) {
1037
+ function Ae(r) {
1030
1038
  return r.max_actions_per_plan !== void 0;
1031
1039
  }
1032
- function me(r) {
1040
+ function Te(r) {
1033
1041
  return r.score_model.includes("FICO");
1034
1042
  }
1035
- function be(r) {
1043
+ function pe(r) {
1036
1044
  return r.score_model.includes("VANTAGE");
1037
1045
  }
1038
- function _e(r) {
1046
+ function Pe(r) {
1039
1047
  return !!(r && "best_action" in r);
1040
1048
  }
1041
- function Se(r) {
1049
+ function Ue(r) {
1042
1050
  return !!(r && "simulated_score" in r);
1043
1051
  }
1044
- function Ae(r) {
1052
+ function ve(r) {
1045
1053
  return !("simulated_score" in r);
1046
1054
  }
1047
- function pe(r) {
1055
+ function Ce(r) {
1048
1056
  return !!(r && "slider_min_value" in r && "slider_max_value" in r);
1049
1057
  }
1050
- function Te(r) {
1058
+ function Ee(r) {
1051
1059
  return !!(r && "value" in r && "simulated_score" in r);
1052
1060
  }
1053
- function Ue(r) {
1061
+ function Re(r) {
1054
1062
  return r === "v1" || r === "v2";
1055
1063
  }
1056
- function It(r) {
1064
+ function Dt(r) {
1057
1065
  if (typeof r != "object" || r === null) return !1;
1058
1066
  const e = r;
1059
- return typeof e.score_id == "string" && Lt(e.bureau) && typeof e.score == "number" && typeof e.score_date == "string";
1067
+ return typeof e.score_id == "string" && Ft(e.bureau) && typeof e.score == "number" && typeof e.score_date == "string";
1060
1068
  }
1061
- function kt(r) {
1069
+ function Jt(r) {
1062
1070
  if (typeof r != "object" || r === null) return !1;
1063
1071
  const e = r;
1064
- return typeof e.id == "string" && Array.isArray(e.bureau_scores) && e.bureau_scores.every((t) => re(t));
1072
+ return typeof e.id == "string" && Array.isArray(e.bureau_scores) && e.bureau_scores.every((t) => oe(t));
1065
1073
  }
1066
- function re(r) {
1074
+ function oe(r) {
1067
1075
  if (typeof r != "object" || r === null) return !1;
1068
1076
  const e = r;
1069
- return Lt(e.bureau) && typeof e.score == "number" && typeof e.score_date == "string";
1077
+ return Ft(e.bureau) && typeof e.score == "number" && typeof e.score_date == "string";
1070
1078
  }
1071
- function Lt(r) {
1079
+ function Ft(r) {
1072
1080
  return r === "EXPERIAN" || r === "EQUIFAX" || r === "TRANSUNION";
1073
1081
  }
1074
- function ne(r) {
1082
+ function ae(r) {
1075
1083
  return typeof r == "object" && r !== null && "items" in r && Array.isArray(r.items) && r.items.every(
1076
- (e) => kt(e)
1084
+ (e) => Jt(e)
1077
1085
  );
1078
1086
  }
1079
- function se(r) {
1080
- return Array.isArray(r) && r.every((e) => It(e));
1087
+ function ue(r) {
1088
+ return Array.isArray(r) && r.every((e) => Dt(e));
1081
1089
  }
1082
- function Pe(r) {
1083
- return se(r);
1090
+ function we(r) {
1091
+ return ue(r);
1084
1092
  }
1085
- function Ce(r) {
1086
- return ne(r);
1093
+ function xe(r) {
1094
+ return ae(r);
1087
1095
  }
1088
- function Ee(r) {
1089
- return It(r);
1096
+ function Ne(r) {
1097
+ return Dt(r);
1090
1098
  }
1091
- function Re(r) {
1092
- return kt(r);
1099
+ function We(r) {
1100
+ return Jt(r);
1093
1101
  }
1094
- function ie(r) {
1102
+ function de(r) {
1095
1103
  if (typeof r != "object" || r === null) return !1;
1096
1104
  const e = r;
1097
- return Vt(e.bureau) && typeof e.reported_at == "string" && typeof e.categories == "object" && typeof e.attributes == "object";
1105
+ return Gt(e.bureau) && typeof e.reported_at == "string" && typeof e.categories == "object" && typeof e.attributes == "object";
1098
1106
  }
1099
- function ce(r) {
1107
+ function he(r) {
1100
1108
  if (typeof r != "object" || r === null) return !1;
1101
1109
  const e = r;
1102
1110
  return typeof e.id == "string" && Array.isArray(e.bureau_attributes) && e.bureau_attributes.every(
1103
- (t) => oe(t)
1111
+ (t) => le(t)
1104
1112
  );
1105
1113
  }
1106
- function oe(r) {
1114
+ function le(r) {
1107
1115
  if (typeof r != "object" || r === null) return !1;
1108
1116
  const e = r;
1109
- return Vt(e.bureau) && typeof e.reported_at == "string" && typeof e.categories == "object" && typeof e.attributes == "object";
1117
+ return Gt(e.bureau) && typeof e.reported_at == "string" && typeof e.categories == "object" && typeof e.attributes == "object";
1110
1118
  }
1111
- function Vt(r) {
1119
+ function Gt(r) {
1112
1120
  return r === "EXPERIAN" || r === "EQUIFAX" || r === "TRANSUNION";
1113
1121
  }
1114
- function ae(r) {
1122
+ function ye(r) {
1115
1123
  return typeof r == "object" && r !== null && "items" in r && Array.isArray(r.items) && r.items.every(
1116
- (e) => ce(e)
1124
+ (e) => he(e)
1117
1125
  );
1118
1126
  }
1119
- function ue(r) {
1120
- return Array.isArray(r) && r.every((e) => ie(e));
1127
+ function ge(r) {
1128
+ return Array.isArray(r) && r.every((e) => de(e));
1121
1129
  }
1122
- function ve(r) {
1123
- return ue(r);
1130
+ function je(r) {
1131
+ return ge(r);
1124
1132
  }
1125
- function we(r) {
1126
- return ae(r);
1133
+ function Ie(r) {
1134
+ return ye(r);
1127
1135
  }
1128
1136
  export {
1129
- Mt as ConnectedSolutionsClientAuthenticationError,
1130
- T as ConnectedSolutionsClientError,
1131
- Xt as ConnectedSolutionsClientRateLimitError,
1132
- Ht as ConnectedSolutionsClientSDKError,
1133
- Kt as ConnectedSolutionsClientServerSideError,
1134
- Gt as ConnectedSolutionsClientSideError,
1135
- he as createSDK,
1136
- he as default,
1137
- oe as isBureauAttribute,
1138
- re as isBureauScore,
1139
- ie as isCreditAttribute,
1140
- ue as isCreditAttributeArray,
1141
- ce as isCreditAttributeV2,
1142
- ae as isCreditAttributesV2,
1143
- It as isCreditScore,
1144
- se as isCreditScoreArray,
1145
- kt as isCreditScoreV2,
1146
- ne as isCreditScoresV2,
1147
- ge as isFicoPlan,
1148
- me as isFicoRevision,
1149
- $e as isFicoRevisionsRequest,
1150
- Ae as isFicoScenario,
1151
- pe as isFicoScenarioVariation,
1152
- _e as isFicoSimulator,
1153
- ee as isPlanCompleted,
1154
- le as isPlanSet,
1155
- ve as isV1GetCreditAttributesResponse,
1156
- Pe as isV1GetCreditScoresResponse,
1157
- Ee as isV1PostCreditScoresResponse,
1158
- we as isV2GetCreditAttributesResponse,
1159
- Ce as isV2GetCreditScoresResponse,
1160
- Re as isV2PostCreditScoresResponse,
1161
- Ue as isValidApiVersion,
1162
- Lt as isValidBureau,
1163
- Vt as isValidBureauAttribute,
1164
- ye as isVantagePlan,
1165
- be as isVantageRevision,
1166
- fe as isVantageRevisionsRequest,
1167
- Se as isVantageScenario,
1168
- Te as isVantageScenarioVariation,
1169
- Ct as mapApiErrorTypeToSDKErrorType,
1170
- Et as mapHttpStatusToSDKErrorType
1137
+ Qt as ConnectedSolutionsClientAuthenticationError,
1138
+ p as ConnectedSolutionsClientError,
1139
+ qt as ConnectedSolutionsClientRateLimitError,
1140
+ Zt as ConnectedSolutionsClientSDKError,
1141
+ Yt as ConnectedSolutionsClientServerSideError,
1142
+ zt as ConnectedSolutionsClientSideError,
1143
+ fe as createSDK,
1144
+ fe as default,
1145
+ le as isBureauAttribute,
1146
+ oe as isBureauScore,
1147
+ de as isCreditAttribute,
1148
+ ge as isCreditAttributeArray,
1149
+ he as isCreditAttributeV2,
1150
+ ye as isCreditAttributesV2,
1151
+ Dt as isCreditScore,
1152
+ ue as isCreditScoreArray,
1153
+ Jt as isCreditScoreV2,
1154
+ ae as isCreditScoresV2,
1155
+ _e as isFicoPlan,
1156
+ Te as isFicoRevision,
1157
+ Se as isFicoRevisionsRequest,
1158
+ ve as isFicoScenario,
1159
+ Ce as isFicoScenarioVariation,
1160
+ Pe as isFicoSimulator,
1161
+ ce as isPlanCompleted,
1162
+ me as isPlanSet,
1163
+ je as isV1GetCreditAttributesResponse,
1164
+ we as isV1GetCreditScoresResponse,
1165
+ Ne as isV1PostCreditScoresResponse,
1166
+ Ie as isV2GetCreditAttributesResponse,
1167
+ xe as isV2GetCreditScoresResponse,
1168
+ We as isV2PostCreditScoresResponse,
1169
+ Re as isValidApiVersion,
1170
+ Ft as isValidBureau,
1171
+ Gt as isValidBureauAttribute,
1172
+ be as isVantagePlan,
1173
+ pe as isVantageRevision,
1174
+ Ae as isVantageRevisionsRequest,
1175
+ Ue as isVantageScenario,
1176
+ Ee as isVantageScenarioVariation,
1177
+ xt as mapApiErrorTypeToSDKErrorType,
1178
+ Nt as mapHttpStatusToSDKErrorType
1171
1179
  };
1172
1180
  //# sourceMappingURL=index.mjs.map