vesant-sdk 1.4.2 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compliance/index.js +18 -24
- package/dist/compliance/index.js.map +1 -1
- package/dist/compliance/index.mjs +18 -24
- package/dist/compliance/index.mjs.map +1 -1
- package/dist/decisions/index.js +1 -1
- package/dist/decisions/index.js.map +1 -1
- package/dist/decisions/index.mjs +1 -1
- package/dist/decisions/index.mjs.map +1 -1
- package/dist/geolocation/index.js +1 -1
- package/dist/geolocation/index.js.map +1 -1
- package/dist/geolocation/index.mjs +1 -1
- package/dist/geolocation/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +18 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -24
- package/dist/index.mjs.map +1 -1
- package/dist/kyc/core.js +1 -1
- package/dist/kyc/core.js.map +1 -1
- package/dist/kyc/core.mjs +1 -1
- package/dist/kyc/core.mjs.map +1 -1
- package/dist/kyc/index.js +1 -1
- package/dist/kyc/index.js.map +1 -1
- package/dist/kyc/index.mjs +1 -1
- package/dist/kyc/index.mjs.map +1 -1
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +1 -1
- package/dist/react.mjs.map +1 -1
- package/dist/risk-profile/index.d.mts +0 -4
- package/dist/risk-profile/index.d.ts +0 -4
- package/dist/risk-profile/index.js +13 -22
- package/dist/risk-profile/index.js.map +1 -1
- package/dist/risk-profile/index.mjs +13 -22
- package/dist/risk-profile/index.mjs.map +1 -1
- package/dist/scores/index.js +1 -1
- package/dist/scores/index.js.map +1 -1
- package/dist/scores/index.mjs +1 -1
- package/dist/scores/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/compliance/index.js
CHANGED
|
@@ -224,7 +224,7 @@ function createConsoleLogger() {
|
|
|
224
224
|
}
|
|
225
225
|
|
|
226
226
|
// src/core/version.ts
|
|
227
|
-
var SDK_VERSION = "1.4.
|
|
227
|
+
var SDK_VERSION = "1.4.4";
|
|
228
228
|
|
|
229
229
|
// src/shared/browser-utils.ts
|
|
230
230
|
function generateUUID() {
|
|
@@ -1250,16 +1250,19 @@ var RiskProfileClient = class extends BaseClient {
|
|
|
1250
1250
|
* ```
|
|
1251
1251
|
*/
|
|
1252
1252
|
async getProfile(customerId, requestOptions) {
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1253
|
+
try {
|
|
1254
|
+
return await this.request(
|
|
1255
|
+
`/api/v1/profiles?customer_id=${encodeURIComponent(customerId)}`,
|
|
1256
|
+
void 0,
|
|
1257
|
+
void 0,
|
|
1258
|
+
requestOptions
|
|
1259
|
+
);
|
|
1260
|
+
} catch (error) {
|
|
1261
|
+
if (error instanceof CGSError && (error.statusCode === 404 || error.code === "NOT_FOUND")) {
|
|
1262
|
+
throw new CGSError(`Profile not found for customer ID: ${customerId}`, "NOT_FOUND", 404);
|
|
1263
|
+
}
|
|
1264
|
+
throw error;
|
|
1261
1265
|
}
|
|
1262
|
-
return profile;
|
|
1263
1266
|
}
|
|
1264
1267
|
/**
|
|
1265
1268
|
* Update customer profile
|
|
@@ -1312,18 +1315,6 @@ var RiskProfileClient = class extends BaseClient {
|
|
|
1312
1315
|
throw error;
|
|
1313
1316
|
}
|
|
1314
1317
|
}
|
|
1315
|
-
/**
|
|
1316
|
-
* Query profiles with filters (internal helper for getProfile)
|
|
1317
|
-
*/
|
|
1318
|
-
async queryProfiles(filters = {}, requestOptions) {
|
|
1319
|
-
const queryString = this.buildQueryString(filters);
|
|
1320
|
-
return this.request(
|
|
1321
|
-
`/api/v1/risk-dashboard/profiles${queryString}`,
|
|
1322
|
-
void 0,
|
|
1323
|
-
void 0,
|
|
1324
|
-
requestOptions
|
|
1325
|
-
);
|
|
1326
|
-
}
|
|
1327
1318
|
};
|
|
1328
1319
|
|
|
1329
1320
|
// src/compliance/types.ts
|
|
@@ -1360,6 +1351,7 @@ var ComplianceClient = class {
|
|
|
1360
1351
|
autoCreateProfiles: config.autoCreateProfiles !== false,
|
|
1361
1352
|
// default true
|
|
1362
1353
|
syncMode: config.syncMode || "sync",
|
|
1354
|
+
environment: config.environment,
|
|
1363
1355
|
interceptors,
|
|
1364
1356
|
logger: this.logger
|
|
1365
1357
|
};
|
|
@@ -1370,7 +1362,8 @@ var ComplianceClient = class {
|
|
|
1370
1362
|
headers: this.config.headers,
|
|
1371
1363
|
timeout: this.config.timeout,
|
|
1372
1364
|
debug: this.config.debug,
|
|
1373
|
-
logger: this.logger
|
|
1365
|
+
logger: this.logger,
|
|
1366
|
+
environment: this.config.environment
|
|
1374
1367
|
});
|
|
1375
1368
|
this.riskClient = new RiskProfileClient({
|
|
1376
1369
|
baseURL: this.config.baseURL,
|
|
@@ -1380,7 +1373,8 @@ var ComplianceClient = class {
|
|
|
1380
1373
|
timeout: this.config.timeout,
|
|
1381
1374
|
debug: this.config.debug,
|
|
1382
1375
|
interceptors,
|
|
1383
|
-
logger: this.logger
|
|
1376
|
+
logger: this.logger,
|
|
1377
|
+
environment: this.config.environment
|
|
1384
1378
|
});
|
|
1385
1379
|
this.currencyRates = DEFAULT_CURRENCY_RATES;
|
|
1386
1380
|
}
|