@experian-ecs/connected-api-sdk 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,827 +12,1161 @@
12
12
  * OTHER LIABILITY ARISING FROM OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS CODE.
13
13
  */
14
14
 
15
- var Tt = Object.defineProperty;
16
- var gt = (r) => {
15
+ var Dt = Object.defineProperty;
16
+ var Ut = (r) => {
17
17
  throw TypeError(r);
18
18
  };
19
- var ft = (r, t, e) => t in r ? Tt(r, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[t] = e;
20
- var u = (r, t, e) => ft(r, typeof t != "symbol" ? t + "" : t, e), Y = (r, t, e) => t.has(r) || gt("Cannot " + e);
21
- var a = (r, t, e) => (Y(r, t, "read from private field"), e ? e.call(r) : t.get(r)), d = (r, t, e) => t.has(r) ? gt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(r) : t.set(r, e), L = (r, t, e, s) => (Y(r, t, "write to private field"), s ? s.call(r, e) : t.set(r, e), e), p = (r, t, e) => (Y(r, t, "access private method"), e);
22
- function At(r) {
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) {
23
23
  switch (r.type) {
24
- case "api_error":
25
- return new Ut(r);
26
- case "auth_error":
27
- return new Pt(r);
28
- case "sdk_error":
29
- return new xt(r);
24
+ case "client_side_error":
25
+ return new Gt(r);
26
+ case "authentication_error":
27
+ return new Mt(r);
28
+ case "server_side_error":
29
+ return new Kt(r);
30
+ case "rate_limit_error":
31
+ return new Xt(r);
30
32
  default:
31
- return new Et(r);
33
+ return new Ht(r);
34
+ }
35
+ }
36
+ class T extends Error {
37
+ constructor(t) {
38
+ var n;
39
+ super(t.message);
40
+ d(this, "message");
41
+ d(this, "data");
42
+ d(this, "status");
43
+ this.message = ((n = t.data) == null ? void 0 : n.message) || t.message || "", this.data = t.data, this.status = t.status;
32
44
  }
33
45
  }
34
- class A extends Error {
46
+ d(T, "generateError", Ft);
47
+ class Gt extends T {
35
48
  constructor(e) {
36
- var s;
37
- super(e.message);
38
- u(this, "message");
39
- u(this, "data");
40
- u(this, "status");
41
- this.message = ((s = e.data) == null ? void 0 : s.message) || e.message || "", this.data = e.data, this.status = e.status;
49
+ super(e), this.name = "ConnectedSolutionsClientSideError";
42
50
  }
43
51
  }
44
- u(A, "generateError", At);
45
- class Ut extends A {
46
- constructor(t) {
47
- super(t), this.name = "ConnectedSolutionsClientApiError";
52
+ class Mt extends T {
53
+ constructor(e) {
54
+ super(e), this.name = "ConnectedSolutionsClientAuthenticationError";
48
55
  }
49
56
  }
50
- class Pt extends A {
51
- constructor(t) {
52
- super(t), this.name = "ConnectedSolutionsClientAuthError";
57
+ class Kt extends T {
58
+ constructor(e) {
59
+ super(e), this.name = "ConnectedSolutionsClientServerSideError";
53
60
  }
54
61
  }
55
- class Et extends A {
56
- constructor(t) {
57
- super(t), this.name = "ConnectedSolutionsClientUnknownError";
62
+ class Ht extends T {
63
+ constructor(e) {
64
+ super(e), this.name = "ConnectedSolutionsClientSDKError";
58
65
  }
59
66
  }
60
- class xt extends A {
61
- constructor(t) {
62
- super(t), this.name = "ConnectedSolutionsClientSDKError";
67
+ class Xt extends T {
68
+ constructor(e) {
69
+ super(e), this.name = "ConnectedSolutionsClientRateLimitError";
70
+ }
71
+ }
72
+ function Ct(r) {
73
+ switch (r) {
74
+ case "CLIENT_SIDE_ERROR":
75
+ return "client_side_error";
76
+ case "AUTHENTICATION_ERROR":
77
+ return "authentication_error";
78
+ case "RATE_LIMIT_ERROR":
79
+ return "rate_limit_error";
80
+ case "SERVER_SIDE_ERROR":
81
+ return "server_side_error";
82
+ default:
83
+ return "sdk_error";
63
84
  }
64
85
  }
65
- const $t = {
86
+ function Et(r) {
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
+ }
89
+ const Rt = {
66
90
  PRODUCTION: "https://connected-api.experian.com",
67
91
  SANDBOX: "https://sandbox.connected-api.experian.com",
68
- UAT: "https://uat-api.ecs.experian.com",
69
- INTEGRATION: "https://integration-api.ecs.experian.com",
70
- DEVELOPMENT: "https://dev-api.ecs.experian.com"
71
- }, Ct = {
92
+ UAT: "https://uat.connected-api.experian.com",
93
+ INTEGRATION: "https://integration.connected-api.experian.com",
94
+ DEVELOPMENT: "https://develop.connected-api.experian.com"
95
+ }, zt = {
72
96
  PRODUCTION: "https://unity-contentstack.integration.us-exp-api.experiancs.com",
73
97
  SANDBOX: "https://unity-contentstack.dev.us-exp-api.experiancs.com",
74
98
  UAT: "https://unity-contentstack.dev.us-exp-api.experiancs.com",
75
99
  INTEGRATION: "https://unity-contentstack.dev.us-exp-api.experiancs.com",
76
100
  DEVELOPMENT: "https://unity-contentstack.dev.us-exp-api.experiancs.com"
77
101
  };
78
- var W, O, mt;
79
- class g {
80
- constructor(t) {
81
- d(this, W);
82
- u(this, "config");
83
- u(this, "baseUrl", "");
84
- u(this, "contentstackUrl", "");
85
- const s = t.environment ?? "PRODUCTION";
86
- this.config = t, this.baseUrl = $t[s], this.contentstackUrl = Ct[s];
102
+ var k, ct, vt;
103
+ class b {
104
+ constructor(e) {
105
+ h(this, k);
106
+ d(this, "config");
107
+ d(this, "baseUrl", "");
108
+ d(this, "contentstackUrl", "");
109
+ const n = e.environment ?? "PRODUCTION";
110
+ this.config = e, this.baseUrl = Rt[n], this.contentstackUrl = zt[n];
87
111
  }
88
- setConfig(t) {
89
- "environment" in t && (this.config.environment = t.environment), "token" in t && (this.config.token = t.token);
112
+ setConfig(e) {
113
+ "environment" in e && (this.config.environment = e.environment), "token" in e && (this.config.token = e.token);
90
114
  }
91
- async fetchWithAuth(t, e) {
115
+ async fetchWithAuth(e, t) {
92
116
  try {
93
- p(this, W, O).call(this);
94
- const s = typeof Headers < "u" && new Headers(e == null ? void 0 : e.headers);
95
- s && !s.Authorization && s.set("Authorization", `Bearer ${this.config.token}`);
96
- const n = {
97
- ...e,
98
- headers: s || (e == null ? void 0 : e.headers) || {}
117
+ y(this, k, ct).call(this);
118
+ const n = typeof Headers < "u" && new Headers(t == null ? void 0 : t.headers);
119
+ n && !n.Authorization && n.set("Authorization", `Bearer ${this.config.token}`);
120
+ const s = {
121
+ ...t,
122
+ headers: n || (t == null ? void 0 : t.headers) || {}
99
123
  };
100
- return await this.fetchRequest(t, n);
101
- } catch (s) {
102
- const n = s;
124
+ return await this.fetchRequest(e, s);
125
+ } catch (n) {
126
+ const s = n;
103
127
  return {
104
128
  data: void 0,
105
- error: n,
129
+ error: s,
106
130
  meta: {
107
- status: n.status ?? 500,
108
- statusText: n.message ?? ""
131
+ status: s.status ?? 500,
132
+ statusText: s.message ?? ""
109
133
  }
110
134
  };
111
135
  }
112
136
  }
113
- async fetchRequest(t, e) {
114
- var s;
137
+ async fetchRequest(e, t) {
138
+ var n;
115
139
  try {
116
- p(this, W, O).call(this);
117
- const n = await fetch(t, e);
118
- if (!(n != null && n.ok)) {
119
- let i;
120
- const y = {
121
- type: "api_error",
122
- status: n == null ? void 0 : n.status,
123
- message: n == null ? void 0 : n.statusText
140
+ y(this, k, ct).call(this);
141
+ const s = await fetch(e, t);
142
+ if (!(s != null && s.ok)) {
143
+ let o;
144
+ const u = {
145
+ type: "sdk_error",
146
+ status: s == null ? void 0 : s.status,
147
+ message: s == null ? void 0 : s.statusText
124
148
  };
125
- if ((s = n == null ? void 0 : n.headers.get("content-type")) != null && s.includes("application/json")) {
126
- const _ = await n.clone().json();
127
- y.data = _.error;
128
- }
129
- throw (n == null ? void 0 : n.status) === 401 ? i = {
130
- ...y,
131
- type: "auth_error"
132
- } : i = {
133
- ...y,
134
- type: "api_error"
135
- }, A.generateError(i);
149
+ if ((n = s == null ? void 0 : s.headers.get("content-type")) != null && n.includes("application/json")) {
150
+ const g = await s.clone().json();
151
+ u.data = g.error, u.type = Ct(g.error.type);
152
+ } else
153
+ u.type = Et(s == null ? void 0 : s.status);
154
+ throw T.generateError(u);
136
155
  }
137
- return p(this, W, mt).call(this, n) ? {
138
- data: await n.clone().json(),
156
+ return y(this, k, vt).call(this, s) ? {
157
+ data: await s.clone().json(),
139
158
  error: void 0,
140
159
  meta: {
141
- status: n.status,
142
- statusText: n.statusText
160
+ status: s.status,
161
+ statusText: s.statusText
143
162
  }
144
163
  } : {
145
164
  data: void 0,
146
165
  error: void 0,
147
166
  meta: {
148
- status: n.status,
149
- statusText: n.statusText
167
+ status: s.status,
168
+ statusText: s.statusText
150
169
  }
151
170
  };
152
- } catch (n) {
153
- const o = n;
171
+ } catch (s) {
172
+ const i = s;
154
173
  return {
155
174
  data: void 0,
156
- error: o,
175
+ error: i,
157
176
  meta: {
158
- status: o.status ?? 500,
159
- statusText: o.message
177
+ status: i.status ?? 500,
178
+ statusText: i.message
160
179
  }
161
180
  };
162
181
  }
163
182
  }
164
183
  }
165
- W = new WeakSet(), O = function() {
184
+ k = new WeakSet(), ct = function() {
166
185
  if (!this.config.token) {
167
- const t = {
186
+ const e = {
168
187
  type: "sdk_error",
169
188
  message: "You must first obtain and set a token before using an SDK method"
170
189
  };
171
- throw A.generateError(t);
190
+ throw T.generateError(e);
172
191
  }
173
- }, mt = function(t) {
174
- var e, s;
175
- return ((e = t == null ? void 0 : t.headers.get("content-type")) == null ? void 0 : e.includes("application/json")) || ((s = t == null ? void 0 : t.headers.get("content-type")) == null ? void 0 : s.includes("application/octet-stream"));
192
+ }, vt = function(e) {
193
+ var t, n;
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"));
176
195
  };
177
- var J;
178
- const k = class k extends g {
196
+ var z, G, at;
197
+ const Q = class Q extends b {
179
198
  constructor(t) {
180
199
  super(t);
200
+ h(this, G);
181
201
  }
182
- async getCreditScores(t, e) {
183
- const s = {
202
+ async getCreditScores(t, n) {
203
+ const s = t == null ? void 0 : t.version, i = y(this, G, at).call(this, s), a = {
184
204
  ...t != null && t.product_config_id ? { product_config_id: t.product_config_id } : {},
185
205
  ...t != null && t.include_factors ? { include_factors: t.include_factors.toString() } : {},
186
206
  ...t != null && t.include_ingredients ? { include_ingredients: t.include_ingredients.toString() } : {}
187
- }, n = new URLSearchParams(s).toString(), o = n ? `?${n}` : "", c = `${this.baseUrl}${a(k, J)}${o}`;
188
- return this.fetchWithAuth(c, e);
207
+ }, o = new URLSearchParams(a).toString(), u = o ? `?${o}` : "", l = `${this.baseUrl}${i}${u}`;
208
+ return this.fetchWithAuth(l, n);
189
209
  }
190
- async orderCreditScore(t, e) {
191
- const s = {
210
+ async orderCreditScore(t, n) {
211
+ const s = t.version, i = y(this, G, at).call(this, s), a = {
192
212
  ...t != null && t.include_factors ? { include_factors: t.include_factors.toString() } : {},
193
213
  ...t != null && t.include_ingredients ? { include_ingredients: t.include_ingredients.toString() } : {}
194
- }, n = new URLSearchParams(s).toString(), o = n ? `?${n}` : "", c = `${this.baseUrl}${a(k, J)}?${o}`;
195
- return this.fetchWithAuth(c, {
214
+ }, o = new URLSearchParams(a).toString(), u = o ? `?${o}` : "", l = `${this.baseUrl}${i}${u}`;
215
+ return this.fetchWithAuth(l, {
196
216
  method: "POST",
197
217
  headers: {
198
- ...(e == null ? void 0 : e.headers) ?? {},
218
+ ...(n == null ? void 0 : n.headers) ?? {},
199
219
  "Content-Type": "application/json"
200
220
  },
201
221
  body: JSON.stringify({
202
222
  product_config_id: t.product_config_id
203
223
  }),
204
- ...e ?? {}
224
+ ...n ?? {}
205
225
  });
206
226
  }
207
227
  };
208
- J = new WeakMap(), d(k, J, "/v1/credit/scores");
209
- let tt = k;
210
- var l;
211
- const h = class h extends g {
212
- constructor(t) {
213
- super(t);
228
+ z = new WeakMap(), G = new WeakSet(), /**
229
+ * Get the versioned API path for credit scores.
230
+ * @param version The API version to use.
231
+ * @returns The versioned API path.
232
+ */
233
+ at = function(t = "v1") {
234
+ return `/${t}${c(Q, z)}`;
235
+ }, h(Q, z, "/credit/scores");
236
+ let ot = Q;
237
+ var f;
238
+ const $ = class $ extends b {
239
+ constructor(e) {
240
+ super(e);
214
241
  }
215
- async getEntitlements(t, e) {
242
+ async getEntitlements(e, t) {
216
243
  return this.fetchWithAuth(
217
- `${this.baseUrl}${a(h, l)}?customer_id=${t.customer_id}`,
218
- e
244
+ `${this.baseUrl}${c($, f)}?customer_id=${e.customer_id}`,
245
+ t
219
246
  );
220
247
  }
221
- async getEntitlementById({ entitlement_id: t }, e) {
248
+ async getEntitlementById({ entitlement_id: e }, t) {
222
249
  return this.fetchWithAuth(
223
- `${this.baseUrl}${a(h, l)}/${t}`,
224
- e
250
+ `${this.baseUrl}${c($, f)}/${e}`,
251
+ t
225
252
  );
226
253
  }
227
- async createEntitlement(t, e) {
254
+ async createEntitlement(e, t) {
228
255
  return this.fetchWithAuth(
229
- `${this.baseUrl}${a(h, l)}`,
256
+ `${this.baseUrl}${c($, f)}`,
230
257
  {
231
258
  method: "POST",
232
259
  headers: {
233
- ...(e == null ? void 0 : e.headers) ?? {},
260
+ ...(t == null ? void 0 : t.headers) ?? {},
234
261
  "Content-Type": "application/json"
235
262
  },
236
- body: JSON.stringify(t),
237
- ...e ?? {}
263
+ body: JSON.stringify(e),
264
+ ...t ?? {}
238
265
  }
239
266
  );
240
267
  }
241
- async updateEntitlement(t, e) {
242
- const { entitlement_id: s, ...n } = t;
268
+ async updateEntitlement(e, t) {
269
+ const { entitlement_id: n, ...s } = e;
243
270
  return this.fetchWithAuth(
244
- `${this.baseUrl}${a(h, l)}/${s}`,
271
+ `${this.baseUrl}${c($, f)}/${n}`,
245
272
  {
246
273
  method: "PUT",
247
274
  headers: {
248
- ...(e == null ? void 0 : e.headers) ?? {},
275
+ ...(t == null ? void 0 : t.headers) ?? {},
249
276
  "Content-Type": "application/json"
250
277
  },
251
- body: JSON.stringify(n),
252
- ...e ?? {}
278
+ body: JSON.stringify(s),
279
+ ...t ?? {}
253
280
  }
254
281
  );
255
282
  }
256
- async deleteEntitlement({ entitlement_id: t }, e) {
283
+ async deleteEntitlement({ entitlement_id: e }, t) {
257
284
  return this.fetchWithAuth(
258
- `${this.baseUrl}${a(h, l)}/${t}`,
285
+ `${this.baseUrl}${c($, f)}/${e}`,
259
286
  {
260
287
  method: "DELETE",
261
- ...e ?? {}
288
+ ...t ?? {}
262
289
  }
263
290
  );
264
291
  }
265
- async activateEntitlement({ entitlement_id: t }, e) {
266
- const s = `${this.baseUrl}${a(h, l)}/${t}/activate`;
267
- return this.fetchWithAuth(s, {
292
+ async activateEntitlement({ entitlement_id: e }, t) {
293
+ const n = `${this.baseUrl}${c($, f)}/${e}/activate`;
294
+ return this.fetchWithAuth(n, {
268
295
  method: "POST",
269
- ...e ?? {}
296
+ ...t ?? {}
270
297
  });
271
298
  }
272
- async deactivateEntitlement({ entitlement_id: t }, e) {
273
- const s = `${this.baseUrl}${a(h, l)}/${t}/deactivate`;
274
- return this.fetchWithAuth(s, {
299
+ async deactivateEntitlement({ entitlement_id: e }, t) {
300
+ const n = `${this.baseUrl}${c($, f)}/${e}/deactivate`;
301
+ return this.fetchWithAuth(n, {
275
302
  method: "POST",
276
- ...e ?? {}
303
+ ...t ?? {}
277
304
  });
278
305
  }
279
- async entitleCustomerToNewProduct(t, e) {
280
- const { product_config_id: s, entitlement_id: n, customer_id: o } = t, c = `${this.baseUrl}${a(h, l)}/${n}/products/${s}/activate`;
281
- return this.fetchWithAuth(c, {
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, {
282
309
  method: "POST",
283
- ...e ?? {},
310
+ ...t ?? {},
284
311
  headers: {
285
- ...(e == null ? void 0 : e.headers) ?? {},
286
- "X-Customer-ID": o
312
+ ...(t == null ? void 0 : t.headers) ?? {},
313
+ "X-Customer-ID": i
287
314
  }
288
315
  });
289
316
  }
290
- async activateProduct(t, e) {
291
- const { product_config_id: s, entitlement_id: n } = t, o = `${this.baseUrl}${a(h, l)}/${n}/products/${s}/activate`;
292
- return this.fetchWithAuth(o, {
317
+ async activateProduct(e, t) {
318
+ const { product_config_id: n, entitlement_id: s } = e, i = `${this.baseUrl}${c($, f)}/${s}/products/${n}/activate`;
319
+ return this.fetchWithAuth(i, {
293
320
  method: "POST",
294
- ...e ?? {}
321
+ ...t ?? {}
295
322
  });
296
323
  }
297
- async deactivateProduct(t, e) {
298
- const { product_config_id: s, entitlement_id: n } = t, o = `${this.baseUrl}${a(h, l)}/${n}/products/${s}/deactivate`;
299
- return this.fetchWithAuth(o, {
324
+ async deactivateProduct(e, t) {
325
+ const { product_config_id: n, entitlement_id: s } = e, i = `${this.baseUrl}${c($, f)}/${s}/products/${n}/deactivate`;
326
+ return this.fetchWithAuth(i, {
300
327
  method: "POST",
301
- ...e ?? {}
328
+ ...t ?? {}
302
329
  });
303
330
  }
304
- async removeProductFromEntitlement(t, e) {
305
- const { product_config_id: s, entitlement_id: n } = t, o = `${this.baseUrl}${a(h, l)}/${n}/products/${s}`;
306
- return this.fetchWithAuth(o, {
331
+ async removeProductFromEntitlement(e, t) {
332
+ const { product_config_id: n, entitlement_id: s } = e, i = `${this.baseUrl}${c($, f)}/${s}/products/${n}`;
333
+ return this.fetchWithAuth(i, {
307
334
  method: "DELETE",
308
- ...e ?? {}
335
+ ...t ?? {}
309
336
  });
310
337
  }
311
- async getProductEligibility(t, e) {
312
- const s = new URLSearchParams(t).toString(), n = `${this.baseUrl}${a(h, l)}/eligibility?${s}`;
313
- return this.fetchWithAuth(n, e);
338
+ async getProductEligibility(e, t) {
339
+ const n = new URLSearchParams(e).toString(), s = `${this.baseUrl}${c($, f)}/eligibility?${n}`;
340
+ return this.fetchWithAuth(s, t);
314
341
  }
315
342
  };
316
- l = new WeakMap(), d(h, l, "/v1/entitlements");
317
- let et = h;
318
- var G;
319
- const H = class H extends g {
343
+ f = new WeakMap(), h($, f, "/v1/entitlements");
344
+ let ut = $;
345
+ var Y, Z, wt;
346
+ const q = class q extends b {
320
347
  constructor(t) {
321
348
  super(t);
349
+ h(this, Z);
322
350
  }
323
- async getCreditAttributes(t) {
324
- const e = `${this.baseUrl}${a(H, G)}`;
325
- return this.fetchWithAuth(e, t);
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);
326
354
  }
327
355
  };
328
- G = new WeakMap(), /**
329
- * Update the path below to the endpoint of the service you are adding
356
+ Y = new WeakMap(), Z = new WeakSet(), /**
357
+ * Get the versioned API path for credit attributes.
358
+ * @param version The API version to use.
359
+ * @returns The versioned API path.
330
360
  */
331
- d(H, G, "/v1/credit/attributes");
332
- let st = H;
333
- var V;
334
- const j = class j extends g {
335
- constructor(t) {
336
- super(t);
361
+ wt = function(t = "v1") {
362
+ return `/${t}${c(q, Y)}`;
363
+ }, h(q, Y, "/credit/attributes");
364
+ let dt = q;
365
+ var M;
366
+ const B = class B extends b {
367
+ constructor(e) {
368
+ super(e);
337
369
  }
338
- async getSimulations(t, e) {
339
- const s = {
340
- ...t,
341
- ...t != null && t.run_all ? { run_all: t.run_all.toString() } : {}
342
- }, n = new URLSearchParams(s).toString(), o = n ? `?${n}` : "", c = `${this.baseUrl}${a(j, V)}${o}`;
343
- return this.fetchWithAuth(c, e);
370
+ async getSimulations(e, t) {
371
+ const n = {
372
+ ...e,
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);
344
376
  }
345
- async simulateScenario(t, e) {
346
- const { product_config_id: s, ...n } = t, o = new URLSearchParams({ product_config_id: s }).toString(), c = o ? `?${o}` : "";
377
+ async simulateScenario(e, t) {
378
+ const { product_config_id: n, ...s } = e, i = new URLSearchParams({ product_config_id: n }).toString(), a = i ? `?${i}` : "";
347
379
  return this.fetchWithAuth(
348
- `${this.baseUrl}${a(j, V)}${c}`,
380
+ `${this.baseUrl}${c(B, M)}${a}`,
349
381
  {
350
382
  method: "POST",
351
383
  headers: {
352
- ...(e == null ? void 0 : e.headers) ?? {},
384
+ ...(t == null ? void 0 : t.headers) ?? {},
353
385
  "Content-Type": "application/json"
354
386
  },
355
- body: JSON.stringify(n),
356
- ...e ?? {}
387
+ body: JSON.stringify(s),
388
+ ...t ?? {}
357
389
  }
358
390
  );
359
391
  }
360
392
  };
361
- V = new WeakMap(), d(j, V, "/v1/credit/tools/simulator");
362
- let nt = j;
363
- var R, z;
364
- const S = class S extends g {
365
- constructor(t) {
366
- super(t);
393
+ M = new WeakMap(), h(B, M, "/v1/credit/tools/simulator");
394
+ let ht = B;
395
+ var j, O;
396
+ const U = class U extends b {
397
+ constructor(e) {
398
+ super(e);
367
399
  }
368
- async getCreditScorePlan(t, e) {
369
- const s = new URLSearchParams(t).toString(), n = s ? `?${s}` : "", o = `${this.baseUrl}${a(S, R)}${n}`;
370
- return this.fetchWithAuth(o, {
371
- ...e ?? {}
400
+ async getCreditScorePlan(e, t) {
401
+ const n = new URLSearchParams(e).toString(), s = n ? `?${n}` : "", i = `${this.baseUrl}${c(U, j)}${s}`;
402
+ return this.fetchWithAuth(i, {
403
+ ...t ?? {}
372
404
  });
373
405
  }
374
- async createCreditScorePlan(t, e) {
375
- const { product_config_id: s, ...n } = t, o = new URLSearchParams({ product_config_id: s }).toString(), c = o ? `?${o}` : "", i = `${this.baseUrl}${a(S, R)}${c}`;
376
- return this.fetchWithAuth(i, {
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, {
377
409
  method: "POST",
378
410
  headers: {
379
- ...(e == null ? void 0 : e.headers) ?? {},
411
+ ...(t == null ? void 0 : t.headers) ?? {},
380
412
  "Content-Type": "application/json"
381
413
  },
382
- body: JSON.stringify(n),
383
- ...e ?? {}
414
+ body: JSON.stringify(s),
415
+ ...t ?? {}
384
416
  });
385
417
  }
386
- async deleteCreditScorePlan(t, e) {
387
- const s = new URLSearchParams(t).toString(), n = s ? `?${s}` : "", o = `${this.baseUrl}${a(S, R)}${n}`;
388
- return this.fetchWithAuth(o, {
418
+ async deleteCreditScorePlan(e, t) {
419
+ const n = new URLSearchParams(e).toString(), s = n ? `?${n}` : "", i = `${this.baseUrl}${c(U, j)}${s}`;
420
+ return this.fetchWithAuth(i, {
389
421
  method: "DELETE",
390
- ...e ?? {}
422
+ ...t ?? {}
391
423
  });
392
424
  }
393
- async getCreditScorePlanRevisions(t, e) {
394
- const { product_config_id: s, ...n } = t, o = new URLSearchParams({ product_config_id: s }).toString(), c = o ? `?${o}` : "", i = `${this.baseUrl}${a(S, R)}${a(S, z)}${c}`;
395
- return this.fetchWithAuth(i, {
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, {
396
428
  method: "POST",
397
- body: JSON.stringify(n),
429
+ body: JSON.stringify(s),
398
430
  headers: {
399
- ...(e == null ? void 0 : e.headers) ?? {},
431
+ ...(t == null ? void 0 : t.headers) ?? {},
400
432
  "Content-Type": "application/json"
401
433
  },
402
- ...e ?? {}
434
+ ...t ?? {}
403
435
  });
404
436
  }
405
437
  };
406
- R = new WeakMap(), z = new WeakMap(), d(S, R, "/v1/credit/tools/planners"), d(S, z, "/revisions");
407
- let rt = S;
408
- var N;
409
- const w = class w extends g {
410
- constructor(t) {
411
- super(t);
438
+ j = new WeakMap(), O = new WeakMap(), h(U, j, "/v1/credit/tools/planners"), h(U, O, "/revisions");
439
+ let lt = U;
440
+ var I;
441
+ const W = class W extends b {
442
+ constructor(e) {
443
+ super(e);
412
444
  }
413
- async getAlerts(t, e) {
414
- const s = {
445
+ async getAlerts(e, t) {
446
+ const n = {
415
447
  page_limit: "10",
416
448
  next_page_token: "",
417
- ...t ?? {}
418
- }, n = new URLSearchParams(s).toString(), o = `${this.baseUrl}${a(w, N)}?${n}`;
419
- return this.fetchWithAuth(o, e);
449
+ ...e ?? {}
450
+ }, s = new URLSearchParams(n).toString(), i = `${this.baseUrl}${c(W, I)}?${s}`;
451
+ return this.fetchWithAuth(i, t);
420
452
  }
421
- async getAlertById({ id: t }, e) {
422
- const s = `${this.baseUrl}${a(w, N)}/${t}`;
423
- return this.fetchWithAuth(s, e);
453
+ async getAlertById({ id: e }, t) {
454
+ const n = `${this.baseUrl}${c(W, I)}/${e}`;
455
+ return this.fetchWithAuth(n, t);
424
456
  }
425
- async markAlertAsRead({ id: t }, e) {
426
- const s = `${this.baseUrl}${a(w, N)}/${t}/dispose`;
427
- return this.fetchWithAuth(s, {
457
+ async markAlertAsRead({ id: e }, t) {
458
+ const n = `${this.baseUrl}${c(W, I)}/${e}/dispose`;
459
+ return this.fetchWithAuth(n, {
428
460
  method: "PATCH",
429
- ...e ?? {}
461
+ ...t ?? {}
430
462
  });
431
463
  }
432
- async getAlertCounts(t) {
433
- const e = `${this.baseUrl}${a(w, N)}/counts`;
434
- return this.fetchWithAuth(e, t);
464
+ async getAlertCounts(e) {
465
+ const t = `${this.baseUrl}${c(W, I)}/counts`;
466
+ return this.fetchWithAuth(t, e);
435
467
  }
436
468
  };
437
- N = new WeakMap(), d(w, N, "/v1/events-alerts");
438
- let at = w;
439
- var f;
440
- const b = class b extends g {
469
+ I = new WeakMap(), h(W, I, "/v1/events-alerts");
470
+ let yt = W;
471
+ function xt(r) {
472
+ return !(r != null && r.version) || (r == null ? void 0 : r.version) === "v1";
473
+ }
474
+ function Qt(r) {
475
+ return (r == null ? void 0 : r.version) === "v2";
476
+ }
477
+ function Pt(r) {
478
+ return r !== void 0 && xt(r) && "include_fields" in r && typeof r.include_fields == "string";
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");
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");
485
+ }
486
+ var tt, E, N;
487
+ const et = class et extends b {
441
488
  constructor(t) {
442
489
  super(t);
443
- }
444
- async getReports(t, e) {
445
- const s = new URLSearchParams(t).toString(), n = s ? `?${s}` : "", o = `${this.baseUrl}${a(b, f)}${n}`;
446
- return this.fetchWithAuth(o, e);
447
- }
448
- async getReportById(t, e) {
449
- const { id: s, ...n } = t, o = new URLSearchParams(n).toString(), c = o ? `?${o}` : "", i = `${this.baseUrl}${a(b, f)}/${t.id}${c}`;
450
- return this.fetchWithAuth(i, e);
451
- }
452
- async getReportsMeta(t, e) {
453
- const { latest_only: s, report_read: n, ...o } = t ?? {}, c = {
490
+ h(this, E);
491
+ }
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}`;
496
+ return this.fetchWithAuth(l, n);
497
+ }
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}`;
502
+ return this.fetchWithAuth(g, n);
503
+ }
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 = {
454
506
  ...o ?? {},
455
- ...s ? { latest_only: s.toString() } : {},
456
- ...n ? { report_read: n.toString() } : {}
457
- }, i = new URLSearchParams(c).toString(), y = i ? `?${i}` : "", C = `${this.baseUrl}${a(b, f)}/meta${y}`;
458
- return this.fetchWithAuth(C, e);
459
- }
460
- async getReportMetaById(t, e) {
461
- const { id: s, ...n } = t, o = new URLSearchParams(n).toString(), c = o ? `?${o}` : "", i = `${this.baseUrl}${a(b, f)}/${s}/meta${c}`;
462
- return this.fetchWithAuth(i, e);
463
- }
464
- async markReportAsRead(t, e) {
465
- const s = `${this.baseUrl}${a(b, f)}/${t.id}/read`;
466
- return this.fetchWithAuth(s, {
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);
511
+ }
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}`;
514
+ return this.fetchWithAuth(g, n);
515
+ }
516
+ async markReportAsRead(t, n) {
517
+ const { id: s, version: i } = t, a = y(this, E, N).call(this, i), o = `${this.baseUrl}${a}`;
518
+ if (i === "v2") {
519
+ const l = `${o}/${s}/disposition`, g = t;
520
+ return this.fetchWithAuth(l, {
521
+ method: "PATCH",
522
+ headers: {
523
+ ...(n == null ? void 0 : n.headers) ?? {},
524
+ "Content-Type": "application/json"
525
+ },
526
+ body: JSON.stringify({
527
+ disposition: g.disposition
528
+ }),
529
+ ...n ?? {}
530
+ });
531
+ }
532
+ const u = `${o}/${s}/read`;
533
+ return this.fetchWithAuth(u, {
467
534
  method: "PUT",
468
- ...e ?? {}
535
+ ...n ?? {}
469
536
  });
470
537
  }
471
- async orderReport(t, e) {
472
- const s = {
473
- ...t.include_fields ? { include_fields: t.include_fields.toString() } : {}
474
- }, n = new URLSearchParams(s).toString(), o = n ? `?${n}` : "", c = `${this.baseUrl}${a(b, f)}${o}`;
475
- return this.fetchWithAuth(c, {
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}`;
542
+ return this.fetchWithAuth(l, {
476
543
  method: "POST",
477
544
  headers: {
478
- ...(e == null ? void 0 : e.headers) ?? {},
545
+ ...(n == null ? void 0 : n.headers) ?? {},
479
546
  "Content-Type": "application/json"
480
547
  },
481
548
  body: JSON.stringify({
482
549
  product_config_id: t.product_config_id
483
550
  }),
484
- ...e ?? {}
551
+ ...n ?? {}
485
552
  });
486
553
  }
487
554
  };
488
- f = new WeakMap(), d(b, f, "/v1/credit/reports");
489
- let ot = b;
490
- var E;
491
- const P = class P extends g {
492
- constructor(t) {
493
- super(t);
555
+ tt = new WeakMap(), E = new WeakSet(), /**
556
+ * Get the versioned API path for credit reports.
557
+ * @param version The API version to use.
558
+ * @returns The versioned API path.
559
+ */
560
+ N = function(t = "v1") {
561
+ return `/${t}${c(et, tt)}`;
562
+ }, h(et, tt, "/credit/reports");
563
+ let gt = et;
564
+ var w;
565
+ const v = class v extends b {
566
+ constructor(e) {
567
+ super(e);
494
568
  }
495
- async getCustomerById(t, e) {
496
- const s = `${this.baseUrl}${a(P, E)}/${t.customer_id}`;
497
- return this.fetchWithAuth(s, e);
569
+ async getCustomerById(e, t) {
570
+ const n = `${this.baseUrl}${c(v, w)}/${e.customer_id}`;
571
+ return this.fetchWithAuth(n, t);
498
572
  }
499
- async updateCustomer(t, e) {
500
- const { customer_id: s, ...n } = t, o = `${this.baseUrl}${a(P, E)}/${s}`;
501
- return this.fetchWithAuth(o, {
573
+ async updateCustomer(e, t) {
574
+ const { customer_id: n, ...s } = e, i = `${this.baseUrl}${c(v, w)}/${n}`;
575
+ return this.fetchWithAuth(i, {
502
576
  method: "PATCH",
503
577
  headers: {
504
- ...(e == null ? void 0 : e.headers) ?? {},
578
+ ...(t == null ? void 0 : t.headers) ?? {},
505
579
  "Content-Type": "application/json"
506
580
  },
507
- body: JSON.stringify(n ?? {}),
508
- ...e ?? {}
581
+ body: JSON.stringify(s ?? {}),
582
+ ...t ?? {}
509
583
  });
510
584
  }
511
- async deleteCustomer(t, e) {
512
- const s = `${this.baseUrl}${a(P, E)}/${t.customer_id}`;
513
- return this.fetchWithAuth(s, {
585
+ async deleteCustomer(e, t) {
586
+ const n = `${this.baseUrl}${c(v, w)}/${e.customer_id}`;
587
+ return this.fetchWithAuth(n, {
514
588
  method: "DELETE",
515
- ...e ?? {}
589
+ ...t ?? {}
516
590
  });
517
591
  }
518
- async createCustomer(t, e) {
519
- const s = `${this.baseUrl}${a(P, E)}`;
520
- return this.fetchWithAuth(s, {
592
+ async createCustomer(e, t) {
593
+ const n = `${this.baseUrl}${c(v, w)}`;
594
+ return this.fetchWithAuth(n, {
521
595
  method: "POST",
522
596
  headers: {
523
- ...(e == null ? void 0 : e.headers) ?? {},
597
+ ...(t == null ? void 0 : t.headers) ?? {},
524
598
  "Content-Type": "application/json"
525
599
  },
526
- body: JSON.stringify(t ?? {}),
527
- ...e ?? {}
600
+ body: JSON.stringify(e ?? {}),
601
+ ...t ?? {}
528
602
  });
529
603
  }
530
- async searchCustomers(t, e) {
531
- const { next_cursor: s = "", ...n } = t, o = `${this.baseUrl}${a(P, E)}/search`;
532
- return this.fetchWithAuth(o, {
604
+ async searchCustomers(e, t) {
605
+ const { next_cursor: n = "", ...s } = e, i = `${this.baseUrl}${c(v, w)}/search`;
606
+ return this.fetchWithAuth(i, {
533
607
  method: "POST",
534
608
  headers: {
535
- ...(e == null ? void 0 : e.headers) ?? {},
609
+ ...(t == null ? void 0 : t.headers) ?? {},
536
610
  "Content-Type": "application/json"
537
611
  },
538
- body: JSON.stringify({ next_cursor: s, ...n ?? {} }),
539
- ...e ?? {}
612
+ body: JSON.stringify({ next_cursor: n, ...s ?? {} }),
613
+ ...t ?? {}
540
614
  });
541
615
  }
542
616
  };
543
- E = new WeakMap(), d(P, E, "/v1/customers");
544
- let it = P;
545
- var q;
546
- const D = class D extends g {
547
- constructor(t) {
548
- super(t);
617
+ w = new WeakMap(), h(v, w, "/v1/customers");
618
+ let $t = v;
619
+ var K;
620
+ const D = class D extends b {
621
+ constructor(e) {
622
+ super(e);
549
623
  }
550
- async getAuthQuestions(t) {
551
- const e = `${this.baseUrl}${a(D, q)}/questions`;
552
- return this.fetchWithAuth(e, t);
624
+ async getAuthQuestions(e) {
625
+ const t = `${this.baseUrl}${c(D, K)}/questions`;
626
+ return this.fetchWithAuth(t, e);
553
627
  }
554
- async submitAuthAnswers(t, e) {
555
- const s = `${this.baseUrl}${a(D, q)}/questions`;
556
- return this.fetchWithAuth(s, {
628
+ async submitAuthAnswers(e, t) {
629
+ const n = `${this.baseUrl}${c(D, K)}/questions`;
630
+ return this.fetchWithAuth(n, {
557
631
  method: "POST",
558
632
  headers: {
559
- ...(e == null ? void 0 : e.headers) ?? {},
633
+ ...(t == null ? void 0 : t.headers) ?? {},
560
634
  "Content-Type": "application/json"
561
635
  },
562
- body: JSON.stringify(t),
563
- ...e ?? {}
636
+ body: JSON.stringify(e),
637
+ ...t ?? {}
564
638
  });
565
639
  }
566
640
  };
567
- q = new WeakMap(), d(D, q, "/v1/authentication");
568
- let ct = D;
569
- var X;
570
- const Q = class Q extends g {
571
- constructor(t) {
572
- super(t);
641
+ K = new WeakMap(), h(D, K, "/v1/authentication");
642
+ let ft = D;
643
+ var rt;
644
+ const nt = class nt extends b {
645
+ constructor(e) {
646
+ super(e);
573
647
  }
574
- async createRegistration(t, e) {
575
- const s = `${this.baseUrl}${a(Q, X)}`;
576
- return this.fetchWithAuth(s, {
648
+ async createRegistration(e, t) {
649
+ const n = `${this.baseUrl}${c(nt, rt)}`;
650
+ return this.fetchWithAuth(n, {
577
651
  method: "POST",
578
652
  headers: {
579
- ...(e == null ? void 0 : e.headers) ?? {},
653
+ ...(t == null ? void 0 : t.headers) ?? {},
580
654
  "Content-Type": "application/json"
581
655
  },
582
- body: JSON.stringify(t ?? {}),
583
- ...e ?? {}
656
+ body: JSON.stringify(e ?? {}),
657
+ ...t ?? {}
584
658
  });
585
659
  }
586
660
  };
587
- X = new WeakMap(), d(Q, X, "/v1/registrations");
588
- let ut = Q;
589
- var F;
590
- const I = class I extends g {
591
- constructor(t) {
592
- super(t);
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);
593
667
  }
594
- async getProductConfigs(t, e) {
595
- const { fromEntries: s, entries: n } = Object, { isArray: o } = Array, c = s(
596
- n(t).filter(([_, U]) => U != null).map(([_, U]) => [
597
- _,
598
- o(U) ? U.join(",") : U.toString()
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()
599
673
  ])
600
- ), i = new URLSearchParams(c).toString(), y = i ? `?${i}` : "", C = `${this.baseUrl}${a(I, F)}${y}`;
601
- return this.fetchWithAuth(C, {
602
- ...e || {}
674
+ ), o = new URLSearchParams(a).toString(), u = o ? `?${o}` : "", l = `${this.baseUrl}${c(J, H)}${u}`;
675
+ return this.fetchWithAuth(l, {
676
+ ...t || {}
677
+ });
678
+ }
679
+ async getProductConfigById(e, t) {
680
+ const n = `${this.baseUrl}${c(J, H)}/${e.product_config_id}`;
681
+ return this.fetchWithAuth(n, {
682
+ ...t ?? {}
683
+ });
684
+ }
685
+ };
686
+ H = new WeakMap(), h(J, H, "/v1/product-configs");
687
+ let bt = J;
688
+ var R;
689
+ const P = class P extends b {
690
+ constructor(e) {
691
+ super(e);
692
+ }
693
+ async getSurvey(e) {
694
+ const t = `${this.baseUrl}${c(P, R)}/surveys`;
695
+ return this.fetchWithAuth(t, e);
696
+ }
697
+ async submitSurvey(e, t) {
698
+ const n = `${this.baseUrl}${c(P, R)}/surveys`;
699
+ return this.fetchWithAuth(n, {
700
+ method: "POST",
701
+ headers: {
702
+ ...(t == null ? void 0 : t.headers) ?? {},
703
+ "Content-Type": "application/json"
704
+ },
705
+ body: JSON.stringify(e),
706
+ ...t ?? {}
603
707
  });
604
708
  }
605
- async getProductConfigById(t, e) {
606
- const s = `${this.baseUrl}${a(I, F)}/${t.product_config_id}`;
607
- return this.fetchWithAuth(s, {
709
+ async getScore(e) {
710
+ const t = `${this.baseUrl}${c(P, R)}/scores?latest=TRUE`;
711
+ return this.fetchWithAuth(t, e);
712
+ }
713
+ async getPlan(e, t) {
714
+ const n = {
715
+ action_status: e.action_status,
716
+ ...e.cursor ? { cursor: e.cursor } : {},
717
+ ...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);
720
+ }
721
+ async createPlan(e) {
722
+ const t = `${this.baseUrl}${c(P, R)}/plans`;
723
+ return this.fetchWithAuth(t, {
724
+ method: "POST",
725
+ headers: {
726
+ ...(e == null ? void 0 : e.headers) ?? {},
727
+ "Content-Type": "application/json"
728
+ },
729
+ body: JSON.stringify({}),
608
730
  ...e ?? {}
609
731
  });
610
732
  }
733
+ async updateAction(e, t) {
734
+ const { action_id: n, ...s } = e, i = `${this.baseUrl}${c(P, R)}/plans/actions/${n}`;
735
+ return this.fetchWithAuth(i, {
736
+ method: "PUT",
737
+ headers: {
738
+ ...(t == null ? void 0 : t.headers) ?? {},
739
+ "Content-Type": "application/json"
740
+ },
741
+ body: JSON.stringify(s),
742
+ ...t ?? {}
743
+ });
744
+ }
611
745
  };
612
- F = new WeakMap(), d(I, F, "/v1/product-configs");
613
- let dt = I;
614
- const Z = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
746
+ R = new WeakMap(), h(P, R, "/v1/ihs");
747
+ let _t = P;
748
+ var S;
749
+ const _ = class _ extends b {
750
+ constructor(e) {
751
+ super(e);
752
+ }
753
+ /**
754
+ * Create a new discovery scan
755
+ * POST /v1/dim/scans
756
+ */
757
+ async createScan(e, t) {
758
+ const n = `${this.baseUrl}${c(_, S)}/scans`;
759
+ return this.fetchWithAuth(n, {
760
+ method: "POST",
761
+ headers: {
762
+ ...(t == null ? void 0 : t.headers) ?? {},
763
+ "Content-Type": "application/json"
764
+ },
765
+ body: JSON.stringify({
766
+ product_config_id: e.product_config_id
767
+ }),
768
+ ...t ?? {}
769
+ });
770
+ }
771
+ /**
772
+ * Get scan results
773
+ * GET /v1/dim/scans
774
+ */
775
+ async getScans(e, t) {
776
+ const n = {};
777
+ 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);
780
+ }
781
+ /**
782
+ * Get scan by ID
783
+ * GET /v1/dim/scans/{scan_id}
784
+ */
785
+ async getScanById(e, t) {
786
+ const n = `${this.baseUrl}${c(_, S)}/scans/${e.scanId}`;
787
+ return this.fetchWithAuth(n, t);
788
+ }
789
+ /**
790
+ * Get scan meta data details
791
+ * GET /v1/dim/scans/meta
792
+ */
793
+ async getScansMetadata(e, t) {
794
+ const n = {};
795
+ 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);
798
+ }
799
+ /**
800
+ * Get brokers details
801
+ * GET /v1/dim/brokers
802
+ */
803
+ async getBrokers(e) {
804
+ const t = `${this.baseUrl}${c(_, S)}/brokers`;
805
+ return this.fetchWithAuth(t, e);
806
+ }
807
+ /**
808
+ * Get a broker detail
809
+ * GET /v1/dim/brokers/{broker_id}
810
+ */
811
+ async getBrokerById(e, t) {
812
+ const n = `${this.baseUrl}${c(_, S)}/brokers/${e.brokerId}`;
813
+ return this.fetchWithAuth(n, t);
814
+ }
815
+ /**
816
+ * Get brokers details for a scan
817
+ * GET /v1/dim/scans/{scan_id}/brokers
818
+ */
819
+ async getBrokersByScanId(e, t) {
820
+ const n = `${this.baseUrl}${c(_, S)}/scans/${e.scanId}/brokers`;
821
+ return this.fetchWithAuth(n, t);
822
+ }
823
+ /**
824
+ * Get brokers group detail
825
+ * GET /v1/dim/brokers/groups/{group_id}
826
+ */
827
+ async getBrokersByGroupId(e, t) {
828
+ const n = `${this.baseUrl}${c(_, S)}/brokers/groups/${e.groupId}`;
829
+ return this.fetchWithAuth(n, t);
830
+ }
831
+ /**
832
+ * Update user action for removal (disposition a scan removal)
833
+ * POST /v1/dim/brokers/groups/{group_id}/action
834
+ * Returns 202 Accepted with group_id in response body
835
+ * Note: Per OAS 1.0.29, this endpoint doesn't accept a request body
836
+ */
837
+ async updateBrokerGroupAction(e, t) {
838
+ const n = `${this.baseUrl}${c(_, S)}/brokers/groups/${e.groupId}/action`;
839
+ return this.fetchWithAuth(n, {
840
+ method: "POST",
841
+ headers: {
842
+ ...(t == null ? void 0 : t.headers) ?? {},
843
+ "Content-Type": "application/json"
844
+ },
845
+ ...t ?? {}
846
+ });
847
+ }
848
+ };
849
+ S = new WeakMap(), h(_, S, "/v1/dim");
850
+ let St = _;
851
+ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
615
852
  __proto__: null,
616
- AlertsService: at,
617
- CreditAttributesService: st,
618
- CreditReportsService: ot,
619
- CreditScorePlannerService: rt,
620
- CreditScoreSimulatorService: nt,
621
- CreditScoresService: tt,
622
- CustomerAuthService: ct,
623
- CustomersService: it,
624
- EntitlementsService: et,
625
- ProductConfigsService: dt,
626
- RegistrationsService: ut
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
627
866
  }, Symbol.toStringTag, { value: "Module" }));
628
- function _t(r) {
867
+ function qt(r) {
629
868
  return `${r[0].toLowerCase()}${r.substring(1)}`.replace(
630
869
  "Service",
631
870
  ""
632
871
  );
633
872
  }
634
- const wt = typeof process < "u" && process.versions && process.versions.node && typeof window > "u";
635
- var $, v, M, m, pt, lt, St, bt;
636
- const B = class B {
637
- constructor(t) {
638
- d(this, m);
639
- u(this, "config");
640
- d(this, $);
641
- d(this, v, null);
642
- u(this, "baseUrl", "");
643
- this.config = t, this.baseUrl = $t[t.environment ?? "PRODUCTION"], L(this, $, /* @__PURE__ */ new Map());
644
- }
645
- async getAccessToken(t) {
646
- if (!wt)
647
- throw A.generateError({
873
+ const Ot = typeof process < "u" && process.versions && process.versions.node && typeof window > "u";
874
+ var A, L, X, p, Nt, pt, Wt, jt;
875
+ const F = class F {
876
+ 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());
883
+ }
884
+ async getAccessToken(e) {
885
+ if (!Ot)
886
+ throw T.generateError({
648
887
  type: "sdk_error",
649
888
  message: "getAccessToken is not supported in browser"
650
889
  });
651
890
  try {
652
891
  return {
653
- data: await p(this, m, pt).call(this, t),
892
+ data: await y(this, p, Nt).call(this, e),
654
893
  errors: void 0,
655
894
  meta: {
656
895
  status: 200,
657
896
  statusText: "OK"
658
897
  }
659
898
  };
660
- } catch (s) {
899
+ } catch (n) {
661
900
  return this.clearCache(), {
662
901
  data: void 0,
663
- error: s,
902
+ error: n,
664
903
  meta: {
665
- status: s.status,
666
- statusText: s.message
904
+ status: n.status,
905
+ statusText: n.message
667
906
  }
668
907
  };
669
908
  }
670
909
  }
671
910
  getCacheLength() {
672
- return a(this, $).size;
911
+ return c(this, A).size;
673
912
  }
674
913
  clearCache() {
675
- const t = `${this.baseUrl}${a(B, M)}`, e = Array.from(a(this, $).keys()).filter(
676
- (s) => s.includes(t)
914
+ const e = `${this.baseUrl}${c(F, X)}`, t = Array.from(c(this, A).keys()).filter(
915
+ (n) => n.includes(e)
677
916
  );
678
- for (const s of e)
679
- a(this, $).delete(s);
917
+ for (const n of t)
918
+ c(this, A).delete(n);
680
919
  }
681
920
  };
682
- $ = new WeakMap(), v = new WeakMap(), M = new WeakMap(), m = new WeakSet(), pt = async function({
683
- grantType: t,
684
- clientId: e,
685
- clientSecret: s,
686
- customerId: n
921
+ A = new WeakMap(), L = new WeakMap(), X = new WeakMap(), p = new WeakSet(), Nt = async function({
922
+ grantType: e,
923
+ clientId: t,
924
+ clientSecret: n,
925
+ customerId: s
687
926
  }) {
688
- var _;
689
- p(this, m, St).call(this);
690
- const o = `${this.baseUrl}${a(B, M)}`, c = {
927
+ var l;
928
+ y(this, p, Wt).call(this);
929
+ const i = `${this.baseUrl}${c(F, X)}`, a = {
691
930
  method: "POST",
692
931
  headers: { "content-type": "application/json" },
693
932
  credentials: "include",
694
933
  body: JSON.stringify({
695
- grant_type: t,
696
- client_id: e,
697
- client_secret: s,
698
- ...t === "trusted_partner" ? { partner_customer_id: n ?? "" } : {}
934
+ grant_type: e,
935
+ client_id: t,
936
+ client_secret: n,
937
+ ...e === "trusted_partner" ? { partner_customer_id: s ?? "" } : {}
699
938
  })
700
- }, i = await p(this, m, bt).call(this, o, c);
701
- if (i != null && i.ok) {
702
- const K = await i.clone().json();
703
- return a(this, v) === null && p(this, m, lt).call(this, K.expires_in), K;
704
- }
705
- let y;
706
- const C = {
707
- status: i == null ? void 0 : i.status,
708
- message: (i == null ? void 0 : i.statusText) || "",
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;
943
+ }
944
+ const u = {
945
+ type: "sdk_error",
946
+ // fallback
947
+ status: o == null ? void 0 : o.status,
948
+ message: (o == null ? void 0 : o.statusText) || "",
709
949
  data: void 0
710
950
  };
711
- if ((i == null ? void 0 : i.status) === 401 ? y = {
712
- type: "auth_error",
713
- ...C
714
- } : y = {
715
- type: "api_error",
716
- ...C
717
- }, (_ = i == null ? void 0 : i.headers.get("content-type")) != null && _.includes("application/json")) {
718
- const K = await i.clone().json();
719
- y.data = K.error;
720
- }
721
- throw A.generateError(y);
722
- }, lt = function(t) {
723
- const e = (/* @__PURE__ */ new Date()).getTime(), s = 60 * 60 * 1e3, n = e + s, o = t === null ? t : new Date(n).valueOf();
724
- L(this, v, o);
725
- }, St = function() {
726
- const t = new Date(Date.now()), e = new Date(a(this, v) ?? Number.NaN);
727
- Rt(t, e) && (p(this, m, lt).call(this, null), a(this, $).clear());
728
- }, bt = async function(t, e) {
729
- const s = `${t}${JSON.stringify(e || {})}`;
730
- if (!a(this, $).has(s)) {
731
- const n = fetch(t, e ?? {});
732
- a(this, $).set(s, n);
733
- }
734
- return await a(this, $).get(s);
735
- }, d(B, M, "/v1/oauth2/token");
736
- let ht = B;
737
- function Rt(r, t) {
738
- return r > t;
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);
954
+ } else
955
+ u.type = Et(o == null ? void 0 : o.status);
956
+ throw T.generateError(u);
957
+ }, pt = function(e) {
958
+ 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) {
964
+ const n = `${e}${JSON.stringify(t || {})}`;
965
+ if (!c(this, A).has(n)) {
966
+ const s = fetch(e, t ?? {});
967
+ c(this, A).set(n, s);
968
+ }
969
+ return await c(this, A).get(n);
970
+ }, h(F, X, "/v1/oauth2/token");
971
+ let At = F;
972
+ function te(r, e) {
973
+ return r > e;
739
974
  }
740
975
  var x;
741
- const T = class T extends g {
976
+ const C = class C extends b {
742
977
  // constructor is private so that no other class can access it.
743
- constructor(e) {
744
- super(e);
745
- u(this, "alerts");
746
- u(this, "auth");
747
- u(this, "creditReports");
748
- u(this, "creditScores");
749
- u(this, "creditAttributes");
750
- u(this, "creditScorePlanner");
751
- u(this, "creditScoreSimulator");
752
- u(this, "customerAuth");
753
- u(this, "customers");
754
- u(this, "entitlements");
755
- u(this, "productConfigs");
756
- u(this, "registrations");
757
- for (const s in Z)
758
- typeof Z[s] == "function" && (this[_t(s)] = new Z[s](e));
759
- this.auth = new ht({
760
- environment: e.environment
978
+ constructor(t) {
979
+ 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({
997
+ environment: t.environment
761
998
  });
762
999
  }
763
1000
  // new services go here
764
1001
  // The method is static as we need to access the method only through the class here
765
- static getInstance(e) {
766
- return a(T, x) || L(T, x, new T(e)), a(T, x);
1002
+ static getInstance(t) {
1003
+ return c(C, x) || V(C, x, new C(t)), c(C, x);
767
1004
  }
768
1005
  static clearInstance() {
769
- L(T, x, null);
1006
+ V(C, x, null);
770
1007
  }
771
1008
  };
772
- x = new WeakMap(), d(T, x, null);
773
- let yt = T;
774
- function vt(r) {
775
- return yt.getInstance(r);
1009
+ x = new WeakMap(), h(C, x, null);
1010
+ let Tt = C;
1011
+ function he(r) {
1012
+ return Tt.getInstance(r);
776
1013
  }
777
- function Nt(r) {
1014
+ function ee(r) {
778
1015
  return r.progress_status === "TARGET_NOT_MET" || r.progress_status === "COMPLETED";
779
1016
  }
780
- function Lt(r) {
781
- return Nt(r) || r.progress_status === "TARGET_SCORE_AND_PLAN_SET" || r.progress_status === "ON_TRACK" || r.progress_status === "OFF_TRACK";
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";
782
1019
  }
783
- function kt(r) {
1020
+ function ye(r) {
784
1021
  return r.score_model.includes("VANTAGE");
785
1022
  }
786
- function jt(r) {
1023
+ function ge(r) {
787
1024
  return r.score_model.includes("FICO");
788
1025
  }
789
- function Dt(r) {
1026
+ function $e(r) {
790
1027
  return r.target_score !== void 0;
791
1028
  }
792
- function It(r) {
1029
+ function fe(r) {
793
1030
  return r.max_actions_per_plan !== void 0;
794
1031
  }
795
- function Bt(r) {
1032
+ function me(r) {
796
1033
  return r.score_model.includes("FICO");
797
1034
  }
798
- function Jt(r) {
1035
+ function be(r) {
799
1036
  return r.score_model.includes("VANTAGE");
800
1037
  }
801
- function Vt(r) {
1038
+ function _e(r) {
802
1039
  return !!(r && "best_action" in r);
803
1040
  }
804
- function qt(r) {
1041
+ function Se(r) {
805
1042
  return !!(r && "simulated_score" in r);
806
1043
  }
807
- function Ft(r) {
1044
+ function Ae(r) {
808
1045
  return !("simulated_score" in r);
809
1046
  }
810
- function Mt(r) {
1047
+ function pe(r) {
811
1048
  return !!(r && "slider_min_value" in r && "slider_max_value" in r);
812
1049
  }
813
- function Kt(r) {
1050
+ function Te(r) {
814
1051
  return !!(r && "value" in r && "simulated_score" in r);
815
1052
  }
1053
+ function Ue(r) {
1054
+ return r === "v1" || r === "v2";
1055
+ }
1056
+ function It(r) {
1057
+ if (typeof r != "object" || r === null) return !1;
1058
+ const e = r;
1059
+ return typeof e.score_id == "string" && Lt(e.bureau) && typeof e.score == "number" && typeof e.score_date == "string";
1060
+ }
1061
+ function kt(r) {
1062
+ if (typeof r != "object" || r === null) return !1;
1063
+ const e = r;
1064
+ return typeof e.id == "string" && Array.isArray(e.bureau_scores) && e.bureau_scores.every((t) => re(t));
1065
+ }
1066
+ function re(r) {
1067
+ if (typeof r != "object" || r === null) return !1;
1068
+ const e = r;
1069
+ return Lt(e.bureau) && typeof e.score == "number" && typeof e.score_date == "string";
1070
+ }
1071
+ function Lt(r) {
1072
+ return r === "EXPERIAN" || r === "EQUIFAX" || r === "TRANSUNION";
1073
+ }
1074
+ function ne(r) {
1075
+ return typeof r == "object" && r !== null && "items" in r && Array.isArray(r.items) && r.items.every(
1076
+ (e) => kt(e)
1077
+ );
1078
+ }
1079
+ function se(r) {
1080
+ return Array.isArray(r) && r.every((e) => It(e));
1081
+ }
1082
+ function Pe(r) {
1083
+ return se(r);
1084
+ }
1085
+ function Ce(r) {
1086
+ return ne(r);
1087
+ }
1088
+ function Ee(r) {
1089
+ return It(r);
1090
+ }
1091
+ function Re(r) {
1092
+ return kt(r);
1093
+ }
1094
+ function ie(r) {
1095
+ if (typeof r != "object" || r === null) return !1;
1096
+ const e = r;
1097
+ return Vt(e.bureau) && typeof e.reported_at == "string" && typeof e.categories == "object" && typeof e.attributes == "object";
1098
+ }
1099
+ function ce(r) {
1100
+ if (typeof r != "object" || r === null) return !1;
1101
+ const e = r;
1102
+ return typeof e.id == "string" && Array.isArray(e.bureau_attributes) && e.bureau_attributes.every(
1103
+ (t) => oe(t)
1104
+ );
1105
+ }
1106
+ function oe(r) {
1107
+ if (typeof r != "object" || r === null) return !1;
1108
+ const e = r;
1109
+ return Vt(e.bureau) && typeof e.reported_at == "string" && typeof e.categories == "object" && typeof e.attributes == "object";
1110
+ }
1111
+ function Vt(r) {
1112
+ return r === "EXPERIAN" || r === "EQUIFAX" || r === "TRANSUNION";
1113
+ }
1114
+ function ae(r) {
1115
+ return typeof r == "object" && r !== null && "items" in r && Array.isArray(r.items) && r.items.every(
1116
+ (e) => ce(e)
1117
+ );
1118
+ }
1119
+ function ue(r) {
1120
+ return Array.isArray(r) && r.every((e) => ie(e));
1121
+ }
1122
+ function ve(r) {
1123
+ return ue(r);
1124
+ }
1125
+ function we(r) {
1126
+ return ae(r);
1127
+ }
816
1128
  export {
817
- Ut as ConnectedSolutionsClientApiError,
818
- Pt as ConnectedSolutionsClientAuthError,
819
- A as ConnectedSolutionsClientError,
820
- xt as ConnectedSolutionsClientSDKError,
821
- Et as ConnectedSolutionsClientUnknownError,
822
- vt as createSDK,
823
- vt as default,
824
- jt as isFicoPlan,
825
- Bt as isFicoRevision,
826
- Dt as isFicoRevisionsRequest,
827
- Ft as isFicoScenario,
828
- Mt as isFicoScenarioVariation,
829
- Vt as isFicoSimulator,
830
- Nt as isPlanCompleted,
831
- Lt as isPlanSet,
832
- kt as isVantagePlan,
833
- Jt as isVantageRevision,
834
- It as isVantageRevisionsRequest,
835
- qt as isVantageScenario,
836
- Kt as isVantageScenarioVariation
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
837
1171
  };
838
1172
  //# sourceMappingURL=index.mjs.map