@experian-ecs/connected-api-sdk 1.5.0 → 1.6.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/README.md +26 -1
- package/dist/esm/index.mjs +277 -258
- package/dist/esm/index.mjs.map +1 -1
- package/dist/index.d.ts +74 -1
- package/dist/umd/index.umd.js +1 -1
- package/dist/umd/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.mjs
CHANGED
|
@@ -12,25 +12,25 @@
|
|
|
12
12
|
* OTHER LIABILITY ARISING FROM OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS CODE.
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
|
-
var
|
|
16
|
-
var
|
|
15
|
+
var Zt = Object.defineProperty;
|
|
16
|
+
var kt = (r) => {
|
|
17
17
|
throw TypeError(r);
|
|
18
18
|
};
|
|
19
|
-
var
|
|
20
|
-
var h = (r, e, t) =>
|
|
21
|
-
var c = (r, e, t) => (
|
|
22
|
-
function
|
|
19
|
+
var qt = (r, e, t) => e in r ? Zt(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
20
|
+
var h = (r, e, t) => qt(r, typeof e != "symbol" ? e + "" : e, t), ht = (r, e, t) => e.has(r) || kt("Cannot " + t);
|
|
21
|
+
var c = (r, e, t) => (ht(r, e, "read from private field"), t ? t.call(r) : e.get(r)), d = (r, e, t) => e.has(r) ? kt("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(r) : e.set(r, t), J = (r, e, t, n) => (ht(r, e, "write to private field"), n ? n.call(r, t) : e.set(r, t), t), y = (r, e, t) => (ht(r, e, "access private method"), t);
|
|
22
|
+
function Ot(r) {
|
|
23
23
|
switch (r.type) {
|
|
24
24
|
case "client_side_error":
|
|
25
|
-
return new
|
|
25
|
+
return new te(r);
|
|
26
26
|
case "authentication_error":
|
|
27
|
-
return new
|
|
27
|
+
return new ee(r);
|
|
28
28
|
case "server_side_error":
|
|
29
|
-
return new
|
|
29
|
+
return new re(r);
|
|
30
30
|
case "rate_limit_error":
|
|
31
|
-
return new
|
|
31
|
+
return new se(r);
|
|
32
32
|
default:
|
|
33
|
-
return new
|
|
33
|
+
return new ne(r);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
class p extends Error {
|
|
@@ -43,33 +43,33 @@ class p extends Error {
|
|
|
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
|
-
h(p, "generateError",
|
|
47
|
-
class
|
|
46
|
+
h(p, "generateError", Ot);
|
|
47
|
+
class te extends p {
|
|
48
48
|
constructor(e) {
|
|
49
49
|
super(e), this.name = "ConnectedSolutionsClientSideError";
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
class
|
|
52
|
+
class ee extends p {
|
|
53
53
|
constructor(e) {
|
|
54
54
|
super(e), this.name = "ConnectedSolutionsClientAuthenticationError";
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
class
|
|
57
|
+
class re extends p {
|
|
58
58
|
constructor(e) {
|
|
59
59
|
super(e), this.name = "ConnectedSolutionsClientServerSideError";
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
class
|
|
62
|
+
class ne extends p {
|
|
63
63
|
constructor(e) {
|
|
64
64
|
super(e), this.name = "ConnectedSolutionsClientSDKError";
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
class
|
|
67
|
+
class se extends p {
|
|
68
68
|
constructor(e) {
|
|
69
69
|
super(e), this.name = "ConnectedSolutionsClientRateLimitError";
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function It(r) {
|
|
73
73
|
switch (r) {
|
|
74
74
|
case "CLIENT_SIDE_ERROR":
|
|
75
75
|
return "client_side_error";
|
|
@@ -83,38 +83,38 @@ function jt(r) {
|
|
|
83
83
|
return "sdk_error";
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function Vt(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
|
|
89
|
+
const Bt = {
|
|
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
|
-
},
|
|
95
|
+
}, ie = {
|
|
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
|
|
103
|
-
class
|
|
102
|
+
var L, yt, Dt;
|
|
103
|
+
class g {
|
|
104
104
|
constructor(e) {
|
|
105
|
-
d(this,
|
|
105
|
+
d(this, L);
|
|
106
106
|
h(this, "config");
|
|
107
107
|
h(this, "baseUrl", "");
|
|
108
108
|
h(this, "contentstackUrl", "");
|
|
109
109
|
const n = e.environment ?? "PRODUCTION";
|
|
110
|
-
this.config = e, this.baseUrl =
|
|
110
|
+
this.config = e, this.baseUrl = Bt[n], this.contentstackUrl = ie[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,
|
|
117
|
+
y(this, L, yt).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,7 +137,7 @@ class m {
|
|
|
137
137
|
async fetchRequest(e, t) {
|
|
138
138
|
var n;
|
|
139
139
|
try {
|
|
140
|
-
y(this,
|
|
140
|
+
y(this, L, yt).call(this);
|
|
141
141
|
const s = await fetch(e, t);
|
|
142
142
|
if (!(s != null && s.ok)) {
|
|
143
143
|
let a;
|
|
@@ -147,13 +147,13 @@ class m {
|
|
|
147
147
|
message: s == null ? void 0 : s.statusText
|
|
148
148
|
};
|
|
149
149
|
if ((n = s == null ? void 0 : s.headers.get("content-type")) != null && n.includes("application/json")) {
|
|
150
|
-
const
|
|
151
|
-
u.data =
|
|
150
|
+
const $ = await s.clone().json();
|
|
151
|
+
u.data = $.error, u.type = It($.error.type);
|
|
152
152
|
} else
|
|
153
|
-
u.type =
|
|
153
|
+
u.type = Vt(s == null ? void 0 : s.status);
|
|
154
154
|
throw p.generateError(u);
|
|
155
155
|
}
|
|
156
|
-
return y(this,
|
|
156
|
+
return y(this, L, Dt).call(this, s) ? {
|
|
157
157
|
data: await s.clone().json(),
|
|
158
158
|
error: void 0,
|
|
159
159
|
meta: {
|
|
@@ -181,7 +181,7 @@ class m {
|
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
L = new WeakSet(), yt = function() {
|
|
185
185
|
if (!this.config.token) {
|
|
186
186
|
const e = {
|
|
187
187
|
type: "sdk_error",
|
|
@@ -189,18 +189,18 @@ I = new WeakSet(), ht = function() {
|
|
|
189
189
|
};
|
|
190
190
|
throw p.generateError(e);
|
|
191
191
|
}
|
|
192
|
-
},
|
|
192
|
+
}, Dt = 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 Y, M,
|
|
197
|
-
const Z = class Z extends
|
|
196
|
+
var Y, M, $t;
|
|
197
|
+
const Z = class Z extends g {
|
|
198
198
|
constructor(t) {
|
|
199
199
|
super(t);
|
|
200
200
|
d(this, M);
|
|
201
201
|
}
|
|
202
202
|
async getCreditScores(t, n) {
|
|
203
|
-
const s = t == null ? void 0 : t.version, i = y(this, M,
|
|
203
|
+
const s = t == null ? void 0 : t.version, i = y(this, M, $t).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() } : {}
|
|
@@ -208,7 +208,7 @@ const Z = class Z extends m {
|
|
|
208
208
|
return this.fetchWithAuth(l, n);
|
|
209
209
|
}
|
|
210
210
|
async orderCreditScore(t, n) {
|
|
211
|
-
const s = t.version, i = y(this, M,
|
|
211
|
+
const s = t.version, i = y(this, M, $t).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
214
|
}, a = new URLSearchParams(o).toString(), u = a ? `?${a}` : "", l = `${this.baseUrl}${i}${u}`;
|
|
@@ -230,30 +230,30 @@ Y = new WeakMap(), M = new WeakSet(), /**
|
|
|
230
230
|
* @param version The API version to use.
|
|
231
231
|
* @returns The versioned API path.
|
|
232
232
|
*/
|
|
233
|
-
|
|
233
|
+
$t = function(t = "v1") {
|
|
234
234
|
return `/${t}${c(Z, Y)}`;
|
|
235
235
|
}, d(Z, Y, "/credit/scores");
|
|
236
|
-
let
|
|
237
|
-
var
|
|
238
|
-
const
|
|
236
|
+
let gt = Z;
|
|
237
|
+
var m;
|
|
238
|
+
const f = class f extends g {
|
|
239
239
|
constructor(e) {
|
|
240
240
|
super(e);
|
|
241
241
|
}
|
|
242
242
|
async getEntitlements(e, t) {
|
|
243
243
|
return this.fetchWithAuth(
|
|
244
|
-
`${this.baseUrl}${c(
|
|
244
|
+
`${this.baseUrl}${c(f, m)}?customer_id=${e.customer_id}`,
|
|
245
245
|
t
|
|
246
246
|
);
|
|
247
247
|
}
|
|
248
248
|
async getEntitlementById({ entitlement_id: e }, t) {
|
|
249
249
|
return this.fetchWithAuth(
|
|
250
|
-
`${this.baseUrl}${c(
|
|
250
|
+
`${this.baseUrl}${c(f, m)}/${e}`,
|
|
251
251
|
t
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
254
|
async createEntitlement(e, t) {
|
|
255
255
|
return this.fetchWithAuth(
|
|
256
|
-
`${this.baseUrl}${c(
|
|
256
|
+
`${this.baseUrl}${c(f, m)}`,
|
|
257
257
|
{
|
|
258
258
|
method: "POST",
|
|
259
259
|
headers: {
|
|
@@ -268,7 +268,7 @@ const $ = class $ extends m {
|
|
|
268
268
|
async updateEntitlement(e, t) {
|
|
269
269
|
const { entitlement_id: n, ...s } = e;
|
|
270
270
|
return this.fetchWithAuth(
|
|
271
|
-
`${this.baseUrl}${c(
|
|
271
|
+
`${this.baseUrl}${c(f, m)}/${n}`,
|
|
272
272
|
{
|
|
273
273
|
method: "PUT",
|
|
274
274
|
headers: {
|
|
@@ -282,7 +282,7 @@ const $ = class $ extends m {
|
|
|
282
282
|
}
|
|
283
283
|
async deleteEntitlement({ entitlement_id: e }, t) {
|
|
284
284
|
return this.fetchWithAuth(
|
|
285
|
-
`${this.baseUrl}${c(
|
|
285
|
+
`${this.baseUrl}${c(f, m)}/${e}`,
|
|
286
286
|
{
|
|
287
287
|
method: "DELETE",
|
|
288
288
|
...t ?? {}
|
|
@@ -290,21 +290,21 @@ const $ = class $ extends m {
|
|
|
290
290
|
);
|
|
291
291
|
}
|
|
292
292
|
async activateEntitlement({ entitlement_id: e }, t) {
|
|
293
|
-
const n = `${this.baseUrl}${c(
|
|
293
|
+
const n = `${this.baseUrl}${c(f, m)}/${e}/activate`;
|
|
294
294
|
return this.fetchWithAuth(n, {
|
|
295
295
|
method: "POST",
|
|
296
296
|
...t ?? {}
|
|
297
297
|
});
|
|
298
298
|
}
|
|
299
299
|
async deactivateEntitlement({ entitlement_id: e }, t) {
|
|
300
|
-
const n = `${this.baseUrl}${c(
|
|
300
|
+
const n = `${this.baseUrl}${c(f, m)}/${e}/deactivate`;
|
|
301
301
|
return this.fetchWithAuth(n, {
|
|
302
302
|
method: "POST",
|
|
303
303
|
...t ?? {}
|
|
304
304
|
});
|
|
305
305
|
}
|
|
306
306
|
async entitleCustomerToNewProduct(e, t) {
|
|
307
|
-
const { product_config_id: n, entitlement_id: s, customer_id: i } = e, o = `${this.baseUrl}${c(
|
|
307
|
+
const { product_config_id: n, entitlement_id: s, customer_id: i } = e, o = `${this.baseUrl}${c(f, m)}/${s}/products/${n}`;
|
|
308
308
|
return this.fetchWithAuth(o, {
|
|
309
309
|
method: "POST",
|
|
310
310
|
...t ?? {},
|
|
@@ -315,41 +315,41 @@ const $ = class $ extends m {
|
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
317
|
async activateProduct(e, t) {
|
|
318
|
-
const { product_config_id: n, entitlement_id: s } = e, i = `${this.baseUrl}${c(
|
|
318
|
+
const { product_config_id: n, entitlement_id: s } = e, i = `${this.baseUrl}${c(f, m)}/${s}/products/${n}/activate`;
|
|
319
319
|
return this.fetchWithAuth(i, {
|
|
320
320
|
method: "POST",
|
|
321
321
|
...t ?? {}
|
|
322
322
|
});
|
|
323
323
|
}
|
|
324
324
|
async deactivateProduct(e, t) {
|
|
325
|
-
const { product_config_id: n, entitlement_id: s } = e, i = `${this.baseUrl}${c(
|
|
325
|
+
const { product_config_id: n, entitlement_id: s } = e, i = `${this.baseUrl}${c(f, m)}/${s}/products/${n}/deactivate`;
|
|
326
326
|
return this.fetchWithAuth(i, {
|
|
327
327
|
method: "POST",
|
|
328
328
|
...t ?? {}
|
|
329
329
|
});
|
|
330
330
|
}
|
|
331
331
|
async removeProductFromEntitlement(e, t) {
|
|
332
|
-
const { product_config_id: n, entitlement_id: s } = e, i = `${this.baseUrl}${c(
|
|
332
|
+
const { product_config_id: n, entitlement_id: s } = e, i = `${this.baseUrl}${c(f, m)}/${s}/products/${n}`;
|
|
333
333
|
return this.fetchWithAuth(i, {
|
|
334
334
|
method: "DELETE",
|
|
335
335
|
...t ?? {}
|
|
336
336
|
});
|
|
337
337
|
}
|
|
338
338
|
async getProductEligibility(e, t) {
|
|
339
|
-
const n = new URLSearchParams(e).toString(), s = `${this.baseUrl}${c(
|
|
339
|
+
const n = new URLSearchParams(e).toString(), s = `${this.baseUrl}${c(f, m)}/eligibility?${n}`;
|
|
340
340
|
return this.fetchWithAuth(s, t);
|
|
341
341
|
}
|
|
342
342
|
};
|
|
343
|
-
|
|
344
|
-
let
|
|
345
|
-
var q, O,
|
|
346
|
-
const tt = class tt extends
|
|
343
|
+
m = new WeakMap(), d(f, m, "/v1/entitlements");
|
|
344
|
+
let ft = f;
|
|
345
|
+
var q, O, Jt;
|
|
346
|
+
const tt = class tt extends g {
|
|
347
347
|
constructor(t) {
|
|
348
348
|
super(t);
|
|
349
349
|
d(this, O);
|
|
350
350
|
}
|
|
351
351
|
async getCreditAttributes(t, n) {
|
|
352
|
-
const s = t == null ? void 0 : t.version, i = y(this, O,
|
|
352
|
+
const s = t == null ? void 0 : t.version, i = y(this, O, Jt).call(this, s), o = `${this.baseUrl}${i}`;
|
|
353
353
|
return this.fetchWithAuth(o, n);
|
|
354
354
|
}
|
|
355
355
|
};
|
|
@@ -358,12 +358,12 @@ q = new WeakMap(), O = new WeakSet(), /**
|
|
|
358
358
|
* @param version The API version to use.
|
|
359
359
|
* @returns The versioned API path.
|
|
360
360
|
*/
|
|
361
|
-
|
|
361
|
+
Jt = function(t = "v1") {
|
|
362
362
|
return `/${t}${c(tt, q)}`;
|
|
363
363
|
}, d(tt, q, "/credit/attributes");
|
|
364
|
-
let
|
|
364
|
+
let mt = tt;
|
|
365
365
|
var H;
|
|
366
|
-
const F = class F extends
|
|
366
|
+
const F = class F extends g {
|
|
367
367
|
constructor(e) {
|
|
368
368
|
super(e);
|
|
369
369
|
}
|
|
@@ -391,9 +391,9 @@ const F = class F extends m {
|
|
|
391
391
|
}
|
|
392
392
|
};
|
|
393
393
|
H = new WeakMap(), d(F, H, "/v1/credit/tools/simulator");
|
|
394
|
-
let
|
|
394
|
+
let bt = F;
|
|
395
395
|
var j, et;
|
|
396
|
-
const U = class U extends
|
|
396
|
+
const U = class U extends g {
|
|
397
397
|
constructor(e) {
|
|
398
398
|
super(e);
|
|
399
399
|
}
|
|
@@ -436,9 +436,9 @@ const U = class U extends m {
|
|
|
436
436
|
}
|
|
437
437
|
};
|
|
438
438
|
j = new WeakMap(), et = new WeakMap(), d(U, j, "/v1/credit/tools/planners"), d(U, et, "/revisions");
|
|
439
|
-
let
|
|
439
|
+
let _t = U;
|
|
440
440
|
var k;
|
|
441
|
-
const x = class x extends
|
|
441
|
+
const x = class x extends g {
|
|
442
442
|
constructor(e) {
|
|
443
443
|
super(e);
|
|
444
444
|
}
|
|
@@ -467,56 +467,56 @@ const x = class x extends m {
|
|
|
467
467
|
}
|
|
468
468
|
};
|
|
469
469
|
k = new WeakMap(), d(x, k, "/v1/events-alerts");
|
|
470
|
-
let
|
|
471
|
-
function
|
|
470
|
+
let St = x;
|
|
471
|
+
function Ft(r) {
|
|
472
472
|
return !(r != null && r.version) || (r == null ? void 0 : r.version) === "v1";
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function ce(r) {
|
|
475
475
|
return (r == null ? void 0 : r.version) === "v2";
|
|
476
476
|
}
|
|
477
|
-
function
|
|
478
|
-
return r !== void 0 &&
|
|
477
|
+
function Lt(r) {
|
|
478
|
+
return r !== void 0 && Ft(r) && "include_fields" in r && typeof r.include_fields == "string";
|
|
479
479
|
}
|
|
480
|
-
function
|
|
481
|
-
return r !== void 0 &&
|
|
480
|
+
function oe(r) {
|
|
481
|
+
return r !== void 0 && Ft(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
|
|
484
|
-
return r !== void 0 &&
|
|
483
|
+
function ae(r) {
|
|
484
|
+
return r !== void 0 && ce(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 rt,
|
|
487
|
-
const nt = class nt extends
|
|
486
|
+
var rt, E, W;
|
|
487
|
+
const nt = class nt extends g {
|
|
488
488
|
constructor(t) {
|
|
489
489
|
super(t);
|
|
490
|
-
d(this,
|
|
490
|
+
d(this, E);
|
|
491
491
|
}
|
|
492
492
|
async getReports(t, n) {
|
|
493
|
-
const s = t == null ? void 0 : t.version, i = y(this,
|
|
494
|
-
|
|
493
|
+
const s = t == null ? void 0 : t.version, i = y(this, E, W).call(this, s), o = {};
|
|
494
|
+
oe(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())), ae(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
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, o = y(this,
|
|
500
|
-
|
|
501
|
-
const u = new URLSearchParams(a).toString(), l = u ? `?${u}` : "",
|
|
502
|
-
return this.fetchWithAuth(
|
|
499
|
+
const { id: s, version: i } = t, o = y(this, E, W).call(this, i), a = {};
|
|
500
|
+
Lt(t) && (a.include_fields = t.include_fields.toString());
|
|
501
|
+
const u = new URLSearchParams(a).toString(), l = u ? `?${u}` : "", $ = `${this.baseUrl}${o}/${s}${l}`;
|
|
502
|
+
return this.fetchWithAuth($, n);
|
|
503
503
|
}
|
|
504
504
|
async getReportsMeta(t, n) {
|
|
505
|
-
const { version: s, latest_only: i, report_read: o, ...a } = t ?? {}, u = y(this,
|
|
505
|
+
const { version: s, latest_only: i, report_read: o, ...a } = t ?? {}, u = y(this, E, W).call(this, s), l = {
|
|
506
506
|
...a ?? {},
|
|
507
507
|
...i ? { latest_only: i.toString() } : {},
|
|
508
508
|
...o ? { report_read: o.toString() } : {}
|
|
509
|
-
},
|
|
510
|
-
return this.fetchWithAuth(
|
|
509
|
+
}, $ = new URLSearchParams(l).toString(), T = $ ? `?${$}` : "", dt = `${this.baseUrl}${u}/meta${T}`;
|
|
510
|
+
return this.fetchWithAuth(dt, n);
|
|
511
511
|
}
|
|
512
512
|
async getReportMetaById(t, n) {
|
|
513
|
-
const { id: s, version: i, ...o } = t, a = y(this,
|
|
514
|
-
return this.fetchWithAuth(
|
|
513
|
+
const { id: s, version: i, ...o } = t, a = y(this, E, W).call(this, i), u = new URLSearchParams(o).toString(), l = u ? `?${u}` : "", $ = `${this.baseUrl}${a}/${s}/meta${l}`;
|
|
514
|
+
return this.fetchWithAuth($, n);
|
|
515
515
|
}
|
|
516
516
|
async markReportAsRead(t, n) {
|
|
517
|
-
const { id: s, version: i } = t, o = y(this,
|
|
517
|
+
const { id: s, version: i } = t, o = y(this, E, W).call(this, i), a = `${this.baseUrl}${o}`;
|
|
518
518
|
if (i === "v2") {
|
|
519
|
-
const l = `${a}/${s}/disposition`,
|
|
519
|
+
const l = `${a}/${s}/disposition`, $ = t;
|
|
520
520
|
return this.fetchWithAuth(l, {
|
|
521
521
|
method: "PATCH",
|
|
522
522
|
headers: {
|
|
@@ -524,7 +524,7 @@ const nt = class nt extends m {
|
|
|
524
524
|
"Content-Type": "application/json"
|
|
525
525
|
},
|
|
526
526
|
body: JSON.stringify({
|
|
527
|
-
disposition:
|
|
527
|
+
disposition: $.disposition
|
|
528
528
|
}),
|
|
529
529
|
...n ?? {}
|
|
530
530
|
});
|
|
@@ -536,8 +536,8 @@ const nt = class nt extends m {
|
|
|
536
536
|
});
|
|
537
537
|
}
|
|
538
538
|
async orderReport(t, n) {
|
|
539
|
-
const s = {}, i = t == null ? void 0 : t.version, o = y(this,
|
|
540
|
-
|
|
539
|
+
const s = {}, i = t == null ? void 0 : t.version, o = y(this, E, W).call(this, i);
|
|
540
|
+
Lt(t) && (s.include_fields = t.include_fields.toString());
|
|
541
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",
|
|
@@ -552,7 +552,7 @@ const nt = class nt extends m {
|
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
554
|
};
|
|
555
|
-
rt = new WeakMap(),
|
|
555
|
+
rt = new WeakMap(), E = 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.
|
|
@@ -560,9 +560,9 @@ rt = new WeakMap(), v = new WeakSet(), /**
|
|
|
560
560
|
W = function(t = "v1") {
|
|
561
561
|
return `/${t}${c(nt, rt)}`;
|
|
562
562
|
}, d(nt, rt, "/credit/reports");
|
|
563
|
-
let
|
|
563
|
+
let At = nt;
|
|
564
564
|
var w;
|
|
565
|
-
const R = class R extends
|
|
565
|
+
const R = class R extends g {
|
|
566
566
|
constructor(e) {
|
|
567
567
|
super(e);
|
|
568
568
|
}
|
|
@@ -615,9 +615,9 @@ const R = class R extends m {
|
|
|
615
615
|
}
|
|
616
616
|
};
|
|
617
617
|
w = new WeakMap(), d(R, w, "/v1/customers");
|
|
618
|
-
let
|
|
618
|
+
let Tt = R;
|
|
619
619
|
var X;
|
|
620
|
-
const K = class K extends
|
|
620
|
+
const K = class K extends g {
|
|
621
621
|
constructor(e) {
|
|
622
622
|
super(e);
|
|
623
623
|
}
|
|
@@ -639,9 +639,9 @@ const K = class K extends m {
|
|
|
639
639
|
}
|
|
640
640
|
};
|
|
641
641
|
X = new WeakMap(), d(K, X, "/v1/authentication");
|
|
642
|
-
let
|
|
642
|
+
let pt = K;
|
|
643
643
|
var st;
|
|
644
|
-
const it = class it extends
|
|
644
|
+
const it = class it extends g {
|
|
645
645
|
constructor(e) {
|
|
646
646
|
super(e);
|
|
647
647
|
}
|
|
@@ -659,26 +659,26 @@ const it = class it extends m {
|
|
|
659
659
|
}
|
|
660
660
|
};
|
|
661
661
|
st = new WeakMap(), d(it, st, "/v1/registrations");
|
|
662
|
-
let
|
|
663
|
-
var ct, z,
|
|
664
|
-
const ot = class ot extends
|
|
662
|
+
let Ut = it;
|
|
663
|
+
var ct, z, Ct;
|
|
664
|
+
const ot = class ot extends g {
|
|
665
665
|
constructor(t) {
|
|
666
666
|
super(t);
|
|
667
667
|
d(this, z);
|
|
668
668
|
}
|
|
669
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, z,
|
|
671
|
-
i(t).filter(([
|
|
672
|
-
|
|
673
|
-
o(
|
|
670
|
+
const { fromEntries: s, entries: i } = Object, { isArray: o } = Array, a = t == null ? void 0 : t.version, u = y(this, z, Ct).call(this, a), { version: l, ...$ } = s(
|
|
671
|
+
i(t).filter(([jt, I]) => I != null).map(([jt, I]) => [
|
|
672
|
+
jt,
|
|
673
|
+
o(I) ? I.join(",") : I.toString()
|
|
674
674
|
])
|
|
675
|
-
), T = new URLSearchParams(
|
|
676
|
-
return this.fetchWithAuth(
|
|
675
|
+
), T = new URLSearchParams($).toString(), dt = T ? `?${T}` : "", Yt = `${this.baseUrl}${u}${dt}`;
|
|
676
|
+
return this.fetchWithAuth(Yt, {
|
|
677
677
|
...n || {}
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
async getProductConfigById(t, n) {
|
|
681
|
-
const s = t == null ? void 0 : t.version, i = y(this, z,
|
|
681
|
+
const s = t == null ? void 0 : t.version, i = y(this, z, Ct).call(this, s), o = `${this.baseUrl}${i}/${t.product_config_id}`;
|
|
682
682
|
return this.fetchWithAuth(o, {
|
|
683
683
|
...n ?? {}
|
|
684
684
|
});
|
|
@@ -689,21 +689,21 @@ ct = new WeakMap(), z = new WeakSet(), /**
|
|
|
689
689
|
* @param version The API version to use.
|
|
690
690
|
* @returns The versioned API path.
|
|
691
691
|
*/
|
|
692
|
-
|
|
692
|
+
Ct = function(t = "v1") {
|
|
693
693
|
return `/${t}${c(ot, ct)}`;
|
|
694
694
|
}, d(ot, ct, "/product-configs");
|
|
695
|
-
let
|
|
696
|
-
var
|
|
697
|
-
const P = class P extends
|
|
695
|
+
let Pt = ot;
|
|
696
|
+
var v;
|
|
697
|
+
const P = class P extends g {
|
|
698
698
|
constructor(e) {
|
|
699
699
|
super(e);
|
|
700
700
|
}
|
|
701
701
|
async getSurvey(e) {
|
|
702
|
-
const t = `${this.baseUrl}${c(P,
|
|
702
|
+
const t = `${this.baseUrl}${c(P, v)}/surveys`;
|
|
703
703
|
return this.fetchWithAuth(t, e);
|
|
704
704
|
}
|
|
705
705
|
async submitSurvey(e, t) {
|
|
706
|
-
const n = `${this.baseUrl}${c(P,
|
|
706
|
+
const n = `${this.baseUrl}${c(P, v)}/surveys`;
|
|
707
707
|
return this.fetchWithAuth(n, {
|
|
708
708
|
method: "POST",
|
|
709
709
|
headers: {
|
|
@@ -715,7 +715,7 @@ const P = class P extends m {
|
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
717
|
async getScore(e) {
|
|
718
|
-
const t = `${this.baseUrl}${c(P,
|
|
718
|
+
const t = `${this.baseUrl}${c(P, v)}/scores?latest=TRUE`;
|
|
719
719
|
return this.fetchWithAuth(t, e);
|
|
720
720
|
}
|
|
721
721
|
async getPlan(e, t) {
|
|
@@ -723,11 +723,11 @@ const P = class P extends m {
|
|
|
723
723
|
action_status: e.action_status,
|
|
724
724
|
...e.cursor ? { cursor: e.cursor } : {},
|
|
725
725
|
...e.count ? { count: e.count.toString() } : {}
|
|
726
|
-
}, s = new URLSearchParams(n).toString(), i = s ? `?${s}` : "", o = `${this.baseUrl}${c(P,
|
|
726
|
+
}, s = new URLSearchParams(n).toString(), i = s ? `?${s}` : "", o = `${this.baseUrl}${c(P, v)}/plans${i}`;
|
|
727
727
|
return this.fetchWithAuth(o, t);
|
|
728
728
|
}
|
|
729
729
|
async createPlan(e) {
|
|
730
|
-
const t = `${this.baseUrl}${c(P,
|
|
730
|
+
const t = `${this.baseUrl}${c(P, v)}/plans`;
|
|
731
731
|
return this.fetchWithAuth(t, {
|
|
732
732
|
method: "POST",
|
|
733
733
|
headers: {
|
|
@@ -739,7 +739,7 @@ const P = class P extends m {
|
|
|
739
739
|
});
|
|
740
740
|
}
|
|
741
741
|
async updateAction(e, t) {
|
|
742
|
-
const { action_id: n, ...s } = e, i = `${this.baseUrl}${c(P,
|
|
742
|
+
const { action_id: n, ...s } = e, i = `${this.baseUrl}${c(P, v)}/plans/actions/${n}`;
|
|
743
743
|
return this.fetchWithAuth(i, {
|
|
744
744
|
method: "PUT",
|
|
745
745
|
headers: {
|
|
@@ -751,10 +751,10 @@ const P = class P extends m {
|
|
|
751
751
|
});
|
|
752
752
|
}
|
|
753
753
|
};
|
|
754
|
-
|
|
755
|
-
let
|
|
754
|
+
v = new WeakMap(), d(P, v, "/v1/ihs");
|
|
755
|
+
let Et = P;
|
|
756
756
|
var _;
|
|
757
|
-
const b = class b extends
|
|
757
|
+
const b = class b extends g {
|
|
758
758
|
constructor(e) {
|
|
759
759
|
super(e);
|
|
760
760
|
}
|
|
@@ -855,9 +855,9 @@ const b = class b extends m {
|
|
|
855
855
|
}
|
|
856
856
|
};
|
|
857
857
|
_ = new WeakMap(), d(b, _, "/v1/dim");
|
|
858
|
-
let
|
|
858
|
+
let vt = b;
|
|
859
859
|
var B;
|
|
860
|
-
const V = class V extends
|
|
860
|
+
const V = class V extends g {
|
|
861
861
|
constructor(e) {
|
|
862
862
|
super(e);
|
|
863
863
|
}
|
|
@@ -906,32 +906,50 @@ const V = class V extends m {
|
|
|
906
906
|
}
|
|
907
907
|
};
|
|
908
908
|
B = new WeakMap(), d(V, B, "/v1/credit");
|
|
909
|
-
let
|
|
910
|
-
|
|
909
|
+
let Rt = V;
|
|
910
|
+
var at;
|
|
911
|
+
const ut = class ut extends g {
|
|
912
|
+
constructor(e) {
|
|
913
|
+
super(e);
|
|
914
|
+
}
|
|
915
|
+
async getOffers(e, t) {
|
|
916
|
+
const n = new URLSearchParams(
|
|
917
|
+
Object.entries(e).filter(([, i]) => i != null).map(([i, o]) => [i, o.toString()])
|
|
918
|
+
).toString(), s = n ? `?${n}` : "";
|
|
919
|
+
return this.fetchWithAuth(
|
|
920
|
+
`${this.baseUrl}${c(ut, at)}${s}`,
|
|
921
|
+
t
|
|
922
|
+
);
|
|
923
|
+
}
|
|
924
|
+
};
|
|
925
|
+
at = new WeakMap(), d(ut, at, "/v1/offers/credit-cards");
|
|
926
|
+
let wt = ut;
|
|
927
|
+
const lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
911
928
|
__proto__: null,
|
|
912
|
-
AlertsService:
|
|
913
|
-
CreditAttributesService:
|
|
914
|
-
CreditLockUnlockService:
|
|
915
|
-
CreditReportsService:
|
|
916
|
-
CreditScorePlannerService:
|
|
917
|
-
CreditScoreSimulatorService:
|
|
918
|
-
CreditScoresService:
|
|
919
|
-
CustomerAuthService:
|
|
920
|
-
CustomersService:
|
|
921
|
-
DigitalIdentityManagerService:
|
|
922
|
-
EntitlementsService:
|
|
923
|
-
IdentityHealthScoreService:
|
|
924
|
-
|
|
925
|
-
|
|
929
|
+
AlertsService: St,
|
|
930
|
+
CreditAttributesService: mt,
|
|
931
|
+
CreditLockUnlockService: Rt,
|
|
932
|
+
CreditReportsService: At,
|
|
933
|
+
CreditScorePlannerService: _t,
|
|
934
|
+
CreditScoreSimulatorService: bt,
|
|
935
|
+
CreditScoresService: gt,
|
|
936
|
+
CustomerAuthService: pt,
|
|
937
|
+
CustomersService: Tt,
|
|
938
|
+
DigitalIdentityManagerService: vt,
|
|
939
|
+
EntitlementsService: ft,
|
|
940
|
+
IdentityHealthScoreService: Et,
|
|
941
|
+
OffersService: wt,
|
|
942
|
+
ProductConfigsService: Pt,
|
|
943
|
+
RegistrationsService: Ut
|
|
926
944
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
927
|
-
function
|
|
945
|
+
function ue(r) {
|
|
928
946
|
return `${r[0].toLowerCase()}${r.substring(1)}`.replace(
|
|
929
947
|
"Service",
|
|
930
948
|
""
|
|
931
949
|
);
|
|
932
950
|
}
|
|
933
|
-
const
|
|
934
|
-
var S, D, Q, A,
|
|
951
|
+
const de = typeof process < "u" && process.versions && process.versions.node && typeof window > "u";
|
|
952
|
+
var S, D, Q, A, Kt, Wt, Gt, Mt;
|
|
935
953
|
const G = class G {
|
|
936
954
|
constructor(e) {
|
|
937
955
|
d(this, A);
|
|
@@ -939,17 +957,17 @@ const G = class G {
|
|
|
939
957
|
d(this, S);
|
|
940
958
|
d(this, D, null);
|
|
941
959
|
h(this, "baseUrl", "");
|
|
942
|
-
this.config = e, this.baseUrl =
|
|
960
|
+
this.config = e, this.baseUrl = Bt[e.environment ?? "PRODUCTION"], J(this, S, /* @__PURE__ */ new Map());
|
|
943
961
|
}
|
|
944
962
|
async getAccessToken(e) {
|
|
945
|
-
if (!
|
|
963
|
+
if (!de)
|
|
946
964
|
throw p.generateError({
|
|
947
965
|
type: "sdk_error",
|
|
948
966
|
message: "getAccessToken is not supported in browser"
|
|
949
967
|
});
|
|
950
968
|
try {
|
|
951
969
|
return {
|
|
952
|
-
data: await y(this, A,
|
|
970
|
+
data: await y(this, A, Kt).call(this, e),
|
|
953
971
|
errors: void 0,
|
|
954
972
|
meta: {
|
|
955
973
|
status: 200,
|
|
@@ -978,14 +996,14 @@ const G = class G {
|
|
|
978
996
|
c(this, S).delete(n);
|
|
979
997
|
}
|
|
980
998
|
};
|
|
981
|
-
S = new WeakMap(), D = new WeakMap(), Q = new WeakMap(), A = new WeakSet(),
|
|
999
|
+
S = new WeakMap(), D = new WeakMap(), Q = new WeakMap(), A = new WeakSet(), Kt = async function({
|
|
982
1000
|
grantType: e,
|
|
983
1001
|
clientId: t,
|
|
984
1002
|
clientSecret: n,
|
|
985
1003
|
customerId: s
|
|
986
1004
|
}) {
|
|
987
1005
|
var l;
|
|
988
|
-
y(this, A,
|
|
1006
|
+
y(this, A, Gt).call(this);
|
|
989
1007
|
const i = `${this.baseUrl}${c(G, Q)}`, o = {
|
|
990
1008
|
method: "POST",
|
|
991
1009
|
headers: { "content-type": "application/json" },
|
|
@@ -996,10 +1014,10 @@ S = new WeakMap(), D = new WeakMap(), Q = new WeakMap(), A = new WeakSet(), Dt =
|
|
|
996
1014
|
client_secret: n,
|
|
997
1015
|
...e === "trusted_partner" ? { partner_customer_id: s ?? "" } : {}
|
|
998
1016
|
})
|
|
999
|
-
}, a = await y(this, A,
|
|
1017
|
+
}, a = await y(this, A, Mt).call(this, i, o);
|
|
1000
1018
|
if (a != null && a.ok) {
|
|
1001
1019
|
const T = await a.clone().json();
|
|
1002
|
-
return c(this, D) === null && y(this, A,
|
|
1020
|
+
return c(this, D) === null && y(this, A, Wt).call(this, T.expires_in), T;
|
|
1003
1021
|
}
|
|
1004
1022
|
const u = {
|
|
1005
1023
|
type: "sdk_error",
|
|
@@ -1010,17 +1028,17 @@ S = new WeakMap(), D = new WeakMap(), Q = new WeakMap(), A = new WeakSet(), Dt =
|
|
|
1010
1028
|
};
|
|
1011
1029
|
if ((l = a == null ? void 0 : a.headers.get("content-type")) != null && l.includes("application/json")) {
|
|
1012
1030
|
const T = await a.clone().json();
|
|
1013
|
-
u.data = T.error, u.type =
|
|
1031
|
+
u.data = T.error, u.type = It(T.error.type);
|
|
1014
1032
|
} else
|
|
1015
|
-
u.type =
|
|
1033
|
+
u.type = Vt(a == null ? void 0 : a.status);
|
|
1016
1034
|
throw p.generateError(u);
|
|
1017
|
-
},
|
|
1035
|
+
}, Wt = function(e) {
|
|
1018
1036
|
const t = (/* @__PURE__ */ new Date()).getTime(), n = 60 * 60 * 1e3, s = t + n, i = e === null ? e : new Date(s).valueOf();
|
|
1019
1037
|
J(this, D, i);
|
|
1020
|
-
},
|
|
1038
|
+
}, Gt = function() {
|
|
1021
1039
|
const e = new Date(Date.now()), t = new Date(c(this, D) ?? Number.NaN);
|
|
1022
|
-
|
|
1023
|
-
},
|
|
1040
|
+
he(e, t) && (y(this, A, Wt).call(this, null), c(this, S).clear());
|
|
1041
|
+
}, Mt = async function(e, t) {
|
|
1024
1042
|
const n = `${e}${JSON.stringify(t || {})}`;
|
|
1025
1043
|
if (!c(this, S).has(n)) {
|
|
1026
1044
|
const s = fetch(e, t ?? {});
|
|
@@ -1028,12 +1046,12 @@ S = new WeakMap(), D = new WeakMap(), Q = new WeakMap(), A = new WeakSet(), Dt =
|
|
|
1028
1046
|
}
|
|
1029
1047
|
return await c(this, S).get(n);
|
|
1030
1048
|
}, d(G, Q, "/v1/oauth2/token");
|
|
1031
|
-
let
|
|
1032
|
-
function
|
|
1049
|
+
let Nt = G;
|
|
1050
|
+
function he(r, e) {
|
|
1033
1051
|
return r > e;
|
|
1034
1052
|
}
|
|
1035
1053
|
var N;
|
|
1036
|
-
const C = class C extends
|
|
1054
|
+
const C = class C extends g {
|
|
1037
1055
|
// constructor is private so that no other class can access it.
|
|
1038
1056
|
constructor(t) {
|
|
1039
1057
|
super(t);
|
|
@@ -1052,9 +1070,10 @@ const C = class C extends m {
|
|
|
1052
1070
|
h(this, "identityHealthScore");
|
|
1053
1071
|
h(this, "digitalIdentityManager");
|
|
1054
1072
|
h(this, "creditLockUnlock");
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1073
|
+
h(this, "offers");
|
|
1074
|
+
for (const n in lt)
|
|
1075
|
+
typeof lt[n] == "function" && (this[ue(n)] = new lt[n](t));
|
|
1076
|
+
this.auth = new Nt({
|
|
1058
1077
|
environment: t.environment
|
|
1059
1078
|
});
|
|
1060
1079
|
}
|
|
@@ -1068,171 +1087,171 @@ const C = class C extends m {
|
|
|
1068
1087
|
}
|
|
1069
1088
|
};
|
|
1070
1089
|
N = new WeakMap(), d(C, N, null);
|
|
1071
|
-
let
|
|
1072
|
-
function
|
|
1073
|
-
return
|
|
1090
|
+
let xt = C;
|
|
1091
|
+
function Te(r) {
|
|
1092
|
+
return xt.getInstance(r);
|
|
1074
1093
|
}
|
|
1075
|
-
function
|
|
1094
|
+
function le(r) {
|
|
1076
1095
|
return r.progress_status === "TARGET_NOT_MET" || r.progress_status === "COMPLETED";
|
|
1077
1096
|
}
|
|
1078
|
-
function
|
|
1079
|
-
return
|
|
1097
|
+
function pe(r) {
|
|
1098
|
+
return le(r) || r.progress_status === "TARGET_SCORE_AND_PLAN_SET" || r.progress_status === "ON_TRACK" || r.progress_status === "OFF_TRACK";
|
|
1080
1099
|
}
|
|
1081
|
-
function
|
|
1100
|
+
function Ue(r) {
|
|
1082
1101
|
return r.score_model.includes("VANTAGE");
|
|
1083
1102
|
}
|
|
1084
|
-
function
|
|
1103
|
+
function Pe(r) {
|
|
1085
1104
|
return r.score_model.includes("FICO");
|
|
1086
1105
|
}
|
|
1087
|
-
function
|
|
1106
|
+
function Ce(r) {
|
|
1088
1107
|
return r.target_score !== void 0;
|
|
1089
1108
|
}
|
|
1090
|
-
function
|
|
1109
|
+
function Ee(r) {
|
|
1091
1110
|
return r.max_actions_per_plan !== void 0;
|
|
1092
1111
|
}
|
|
1093
|
-
function
|
|
1112
|
+
function ve(r) {
|
|
1094
1113
|
return r.score_model.includes("FICO");
|
|
1095
1114
|
}
|
|
1096
|
-
function
|
|
1115
|
+
function Re(r) {
|
|
1097
1116
|
return r.score_model.includes("VANTAGE");
|
|
1098
1117
|
}
|
|
1099
|
-
function
|
|
1118
|
+
function we(r) {
|
|
1100
1119
|
return !!(r && "best_action" in r);
|
|
1101
1120
|
}
|
|
1102
|
-
function
|
|
1121
|
+
function Ne(r) {
|
|
1103
1122
|
return !!(r && "simulated_score" in r);
|
|
1104
1123
|
}
|
|
1105
|
-
function
|
|
1124
|
+
function We(r) {
|
|
1106
1125
|
return !("simulated_score" in r);
|
|
1107
1126
|
}
|
|
1108
|
-
function
|
|
1127
|
+
function xe(r) {
|
|
1109
1128
|
return !!(r && "slider_min_value" in r && "slider_max_value" in r);
|
|
1110
1129
|
}
|
|
1111
|
-
function
|
|
1130
|
+
function je(r) {
|
|
1112
1131
|
return !!(r && "value" in r && "simulated_score" in r);
|
|
1113
1132
|
}
|
|
1114
|
-
function
|
|
1133
|
+
function ke(r) {
|
|
1115
1134
|
return r === "v1" || r === "v2";
|
|
1116
1135
|
}
|
|
1117
|
-
function
|
|
1136
|
+
function Ht(r) {
|
|
1118
1137
|
if (typeof r != "object" || r === null) return !1;
|
|
1119
1138
|
const e = r;
|
|
1120
|
-
return typeof e.score_id == "string" &&
|
|
1139
|
+
return typeof e.score_id == "string" && zt(e.bureau) && typeof e.score == "number" && typeof e.score_date == "string";
|
|
1121
1140
|
}
|
|
1122
|
-
function
|
|
1141
|
+
function Xt(r) {
|
|
1123
1142
|
if (typeof r != "object" || r === null) return !1;
|
|
1124
1143
|
const e = r;
|
|
1125
|
-
return typeof e.id == "string" && Array.isArray(e.bureau_scores) && e.bureau_scores.every((t) =>
|
|
1144
|
+
return typeof e.id == "string" && Array.isArray(e.bureau_scores) && e.bureau_scores.every((t) => ye(t));
|
|
1126
1145
|
}
|
|
1127
|
-
function
|
|
1146
|
+
function ye(r) {
|
|
1128
1147
|
if (typeof r != "object" || r === null) return !1;
|
|
1129
1148
|
const e = r;
|
|
1130
|
-
return
|
|
1149
|
+
return zt(e.bureau) && typeof e.score == "number" && typeof e.score_date == "string";
|
|
1131
1150
|
}
|
|
1132
|
-
function
|
|
1151
|
+
function zt(r) {
|
|
1133
1152
|
return r === "EXPERIAN" || r === "EQUIFAX" || r === "TRANSUNION";
|
|
1134
1153
|
}
|
|
1135
|
-
function
|
|
1154
|
+
function ge(r) {
|
|
1136
1155
|
return typeof r == "object" && r !== null && "items" in r && Array.isArray(r.items) && r.items.every(
|
|
1137
|
-
(e) =>
|
|
1156
|
+
(e) => Xt(e)
|
|
1138
1157
|
);
|
|
1139
1158
|
}
|
|
1140
|
-
function
|
|
1141
|
-
return Array.isArray(r) && r.every((e) =>
|
|
1159
|
+
function $e(r) {
|
|
1160
|
+
return Array.isArray(r) && r.every((e) => Ht(e));
|
|
1142
1161
|
}
|
|
1143
|
-
function
|
|
1144
|
-
return
|
|
1162
|
+
function Le(r) {
|
|
1163
|
+
return $e(r);
|
|
1145
1164
|
}
|
|
1146
|
-
function
|
|
1147
|
-
return
|
|
1165
|
+
function Ie(r) {
|
|
1166
|
+
return ge(r);
|
|
1148
1167
|
}
|
|
1149
|
-
function
|
|
1150
|
-
return
|
|
1168
|
+
function Ve(r) {
|
|
1169
|
+
return Ht(r);
|
|
1151
1170
|
}
|
|
1152
|
-
function
|
|
1153
|
-
return
|
|
1171
|
+
function Be(r) {
|
|
1172
|
+
return Xt(r);
|
|
1154
1173
|
}
|
|
1155
|
-
function
|
|
1174
|
+
function fe(r) {
|
|
1156
1175
|
if (typeof r != "object" || r === null) return !1;
|
|
1157
1176
|
const e = r;
|
|
1158
|
-
return
|
|
1177
|
+
return Qt(e.bureau) && typeof e.reported_at == "string" && typeof e.categories == "object" && typeof e.attributes == "object";
|
|
1159
1178
|
}
|
|
1160
|
-
function
|
|
1179
|
+
function me(r) {
|
|
1161
1180
|
if (typeof r != "object" || r === null) return !1;
|
|
1162
1181
|
const e = r;
|
|
1163
1182
|
return typeof e.id == "string" && Array.isArray(e.bureau_attributes) && e.bureau_attributes.every(
|
|
1164
|
-
(t) =>
|
|
1183
|
+
(t) => be(t)
|
|
1165
1184
|
);
|
|
1166
1185
|
}
|
|
1167
|
-
function
|
|
1186
|
+
function be(r) {
|
|
1168
1187
|
if (typeof r != "object" || r === null) return !1;
|
|
1169
1188
|
const e = r;
|
|
1170
|
-
return
|
|
1189
|
+
return Qt(e.bureau) && typeof e.reported_at == "string" && typeof e.categories == "object" && typeof e.attributes == "object";
|
|
1171
1190
|
}
|
|
1172
|
-
function
|
|
1191
|
+
function Qt(r) {
|
|
1173
1192
|
return r === "EXPERIAN" || r === "EQUIFAX" || r === "TRANSUNION";
|
|
1174
1193
|
}
|
|
1175
|
-
function
|
|
1194
|
+
function _e(r) {
|
|
1176
1195
|
return typeof r == "object" && r !== null && "items" in r && Array.isArray(r.items) && r.items.every(
|
|
1177
|
-
(e) =>
|
|
1196
|
+
(e) => me(e)
|
|
1178
1197
|
);
|
|
1179
1198
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return Array.isArray(r) && r.every((e) =>
|
|
1199
|
+
function Se(r) {
|
|
1200
|
+
return Array.isArray(r) && r.every((e) => fe(e));
|
|
1182
1201
|
}
|
|
1183
|
-
function
|
|
1184
|
-
return
|
|
1202
|
+
function De(r) {
|
|
1203
|
+
return Se(r);
|
|
1185
1204
|
}
|
|
1186
|
-
function
|
|
1187
|
-
return
|
|
1205
|
+
function Je(r) {
|
|
1206
|
+
return _e(r);
|
|
1188
1207
|
}
|
|
1189
|
-
const
|
|
1208
|
+
const Fe = {
|
|
1190
1209
|
LOCKED: "LOCKED",
|
|
1191
1210
|
UNLOCKED: "UNLOCKED"
|
|
1192
1211
|
};
|
|
1193
1212
|
export {
|
|
1194
|
-
|
|
1213
|
+
ee as ConnectedSolutionsClientAuthenticationError,
|
|
1195
1214
|
p as ConnectedSolutionsClientError,
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1215
|
+
se as ConnectedSolutionsClientRateLimitError,
|
|
1216
|
+
ne as ConnectedSolutionsClientSDKError,
|
|
1217
|
+
re as ConnectedSolutionsClientServerSideError,
|
|
1218
|
+
te as ConnectedSolutionsClientSideError,
|
|
1219
|
+
Fe as LOCK_STATUS,
|
|
1220
|
+
Te as createSDK,
|
|
1221
|
+
Te as default,
|
|
1222
|
+
be as isBureauAttribute,
|
|
1223
|
+
ye as isBureauScore,
|
|
1224
|
+
fe as isCreditAttribute,
|
|
1225
|
+
Se as isCreditAttributeArray,
|
|
1226
|
+
me as isCreditAttributeV2,
|
|
1227
|
+
_e as isCreditAttributesV2,
|
|
1228
|
+
Ht as isCreditScore,
|
|
1229
|
+
$e as isCreditScoreArray,
|
|
1230
|
+
Xt as isCreditScoreV2,
|
|
1231
|
+
ge as isCreditScoresV2,
|
|
1232
|
+
Pe as isFicoPlan,
|
|
1233
|
+
ve as isFicoRevision,
|
|
1234
|
+
Ce as isFicoRevisionsRequest,
|
|
1235
|
+
We as isFicoScenario,
|
|
1236
|
+
xe as isFicoScenarioVariation,
|
|
1237
|
+
we as isFicoSimulator,
|
|
1238
|
+
le as isPlanCompleted,
|
|
1239
|
+
pe as isPlanSet,
|
|
1240
|
+
De as isV1GetCreditAttributesResponse,
|
|
1241
|
+
Le as isV1GetCreditScoresResponse,
|
|
1242
|
+
Ve as isV1PostCreditScoresResponse,
|
|
1243
|
+
Je as isV2GetCreditAttributesResponse,
|
|
1244
|
+
Ie as isV2GetCreditScoresResponse,
|
|
1245
|
+
Be as isV2PostCreditScoresResponse,
|
|
1246
|
+
ke as isValidApiVersion,
|
|
1247
|
+
zt as isValidBureau,
|
|
1248
|
+
Qt as isValidBureauAttribute,
|
|
1249
|
+
Ue as isVantagePlan,
|
|
1250
|
+
Re as isVantageRevision,
|
|
1251
|
+
Ee as isVantageRevisionsRequest,
|
|
1252
|
+
Ne as isVantageScenario,
|
|
1253
|
+
je as isVantageScenarioVariation,
|
|
1254
|
+
It as mapApiErrorTypeToSDKErrorType,
|
|
1255
|
+
Vt as mapHttpStatusToSDKErrorType
|
|
1237
1256
|
};
|
|
1238
1257
|
//# sourceMappingURL=index.mjs.map
|