vesant-sdk 1.4.3 → 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.
Files changed (41) hide show
  1. package/dist/compliance/index.js +13 -22
  2. package/dist/compliance/index.js.map +1 -1
  3. package/dist/compliance/index.mjs +13 -22
  4. package/dist/compliance/index.mjs.map +1 -1
  5. package/dist/decisions/index.js +1 -1
  6. package/dist/decisions/index.js.map +1 -1
  7. package/dist/decisions/index.mjs +1 -1
  8. package/dist/decisions/index.mjs.map +1 -1
  9. package/dist/geolocation/index.js +1 -1
  10. package/dist/geolocation/index.js.map +1 -1
  11. package/dist/geolocation/index.mjs +1 -1
  12. package/dist/geolocation/index.mjs.map +1 -1
  13. package/dist/index.d.mts +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +13 -22
  16. package/dist/index.js.map +1 -1
  17. package/dist/index.mjs +13 -22
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/kyc/core.js +1 -1
  20. package/dist/kyc/core.js.map +1 -1
  21. package/dist/kyc/core.mjs +1 -1
  22. package/dist/kyc/core.mjs.map +1 -1
  23. package/dist/kyc/index.js +1 -1
  24. package/dist/kyc/index.js.map +1 -1
  25. package/dist/kyc/index.mjs +1 -1
  26. package/dist/kyc/index.mjs.map +1 -1
  27. package/dist/react.js +1 -1
  28. package/dist/react.js.map +1 -1
  29. package/dist/react.mjs +1 -1
  30. package/dist/react.mjs.map +1 -1
  31. package/dist/risk-profile/index.d.mts +0 -4
  32. package/dist/risk-profile/index.d.ts +0 -4
  33. package/dist/risk-profile/index.js +13 -22
  34. package/dist/risk-profile/index.js.map +1 -1
  35. package/dist/risk-profile/index.mjs +13 -22
  36. package/dist/risk-profile/index.mjs.map +1 -1
  37. package/dist/scores/index.js +1 -1
  38. package/dist/scores/index.js.map +1 -1
  39. package/dist/scores/index.mjs +1 -1
  40. package/dist/scores/index.mjs.map +1 -1
  41. package/package.json +1 -1
@@ -224,7 +224,7 @@ function createConsoleLogger() {
224
224
  }
225
225
 
226
226
  // src/core/version.ts
227
- var SDK_VERSION = "1.4.1";
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
- const response = await this.queryProfiles({
1254
- search: customerId,
1255
- page: 1,
1256
- page_size: 10
1257
- }, requestOptions);
1258
- const profile = response.data.find((p) => p.customer_id === customerId);
1259
- if (!profile) {
1260
- throw new CGSError(`Profile not found for customer ID: ${customerId}`, "NOT_FOUND", 404);
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