@adyen/kyc-components 3.20.0 → 3.20.1

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.
@@ -11468,7 +11468,6 @@ const rules$3 = ({
11468
11468
  data,
11469
11469
  country: country2,
11470
11470
  taskType,
11471
- isEmbeddedDropin,
11472
11471
  isExperimentEnabled = () => false
11473
11472
  }) => ({
11474
11473
  isDirectorIdNumberRequiredForCountry: () => {
@@ -11540,7 +11539,7 @@ const rules$3 = ({
11540
11539
  }
11541
11540
  },
11542
11541
  accountHolderIfCustomer: () => {
11543
- if (taskType === TaskTypes.INDIVIDUAL && !isEmbeddedDropin && !(isExperimentEnabled == null ? void 0 : isExperimentEnabled("EnableNewEntryFlow"))) {
11542
+ if (taskType === TaskTypes.INDIVIDUAL && !(isExperimentEnabled == null ? void 0 : isExperimentEnabled("EnableNewEntryFlow"))) {
11544
11543
  return REQUIRED;
11545
11544
  }
11546
11545
  },
@@ -32240,9 +32239,6 @@ function IndividualDropinComponent({
32240
32239
  const {
32241
32240
  getConfiguration: getConfiguration2
32242
32241
  } = useConfigurationApi();
32243
- const {
32244
- isEmbeddedDropin
32245
- } = useAuthContext();
32246
32242
  const {
32247
32243
  isExperimentEnabled
32248
32244
  } = useExperimentsContext();
@@ -32288,7 +32284,6 @@ function IndividualDropinComponent({
32288
32284
  data,
32289
32285
  country: country2,
32290
32286
  taskType,
32291
- isEmbeddedDropin,
32292
32287
  isExperimentEnabled
32293
32288
  }), [country2, data, taskType]);
32294
32289
  const customValidators = useMemo(() => isExperimentEnabled("EnableAgeVerification") ? validators({
@@ -36237,7 +36232,7 @@ const createLegalEntity = async (context, legalEntity) => {
36237
36232
  loadingContext,
36238
36233
  errorLevel: "warn",
36239
36234
  errorMessage: "LegalEntity create failed",
36240
- path: `${legalEntityId}`,
36235
+ path: `${legalEntityId}/create`,
36241
36236
  authentication: "jwt",
36242
36237
  headers: {
36243
36238
  "Content-Type": "application/json"
@@ -36324,16 +36319,17 @@ const getDocument = async (context, documentId) => {
36324
36319
  }
36325
36320
  });
36326
36321
  };
36327
- const getLegalEntity = async (context) => {
36322
+ const getLegalEntity = async (context, legalEntityId) => {
36328
36323
  const {
36329
36324
  loadingContext,
36330
- legalEntityId
36325
+ legalEntityId: rootLegalEntityId
36331
36326
  } = context;
36327
+ const path = legalEntityId !== rootLegalEntityId ? `${rootLegalEntityId}/${legalEntityId}` : `${rootLegalEntityId}`;
36332
36328
  return httpGet({
36333
36329
  loadingContext,
36334
36330
  errorLevel: "warn",
36335
36331
  errorMessage: `LegalEntity not available`,
36336
- path: `${legalEntityId}`,
36332
+ path,
36337
36333
  authentication: "jwt",
36338
36334
  headers: {
36339
36335
  "Content-Type": "application/json"
@@ -36432,16 +36428,17 @@ const updateDocument = async (context, document2, documentId, ownerId) => {
36432
36428
  }
36433
36429
  }, document2);
36434
36430
  };
36435
- const updateLegalEntity = async (context, legalEntity) => {
36431
+ const updateLegalEntity = async (context, legalEntity, legalEntityId) => {
36436
36432
  const {
36437
36433
  loadingContext,
36438
- legalEntityId
36434
+ legalEntityId: rootLegalEntityId
36439
36435
  } = context;
36436
+ const path = legalEntityId !== rootLegalEntityId ? `${rootLegalEntityId}/${legalEntityId}` : `${rootLegalEntityId}`;
36440
36437
  return httpPost({
36441
36438
  loadingContext,
36442
36439
  errorLevel: "warn",
36443
36440
  errorMessage: `LegalEntity update failed`,
36444
- path: `${legalEntityId}`,
36441
+ path,
36445
36442
  authentication: "jwt",
36446
36443
  headers: {
36447
36444
  "Content-Type": "application/json"
@@ -36783,14 +36780,8 @@ const useComponentApi = (rootLegalEntityId) => {
36783
36780
  legalEntityId: rootLegalEntityId
36784
36781
  };
36785
36782
  return {
36786
- getLegalEntity: async (legalEntityId) => getLegalEntity({
36787
- ...baseRequestContext,
36788
- legalEntityId
36789
- }),
36790
- updateLegalEntity: async (legalEntity, legalEntityId) => updateLegalEntity({
36791
- ...baseRequestContext,
36792
- legalEntityId
36793
- }, legalEntity),
36783
+ getLegalEntity: async (legalEntityId) => getLegalEntity(baseRequestContext, legalEntityId),
36784
+ updateLegalEntity: async (legalEntity, legalEntityId) => updateLegalEntity(baseRequestContext, legalEntity, legalEntityId),
36794
36785
  createLegalEntity: async (legalEntity) => createLegalEntity(baseRequestContext, legalEntity),
36795
36786
  getTransferInstrument: async (transferInstrumentId) => getTransferInstrument(baseRequestContext, transferInstrumentId),
36796
36787
  getBankVerificationVendor: async (country2, openBankingPartnerConfigId) => getBankVerificationVendor(baseRequestContext, country2, openBankingPartnerConfigId),
@@ -38641,7 +38632,7 @@ const ConfigurationApiProvider = ({
38641
38632
  isEmbeddedDropin,
38642
38633
  loadingContext
38643
38634
  } = authContext;
38644
- const sdkVersion = "3.20.0";
38635
+ const sdkVersion = "3.20.1";
38645
38636
  useAnalytics({
38646
38637
  onUserEvent,
38647
38638
  legalEntityId: rootLegalEntityId,
@@ -1,3 +1,3 @@
1
- import type { ExistingLegalEntity } from '../../models/api/legal-entity';
1
+ import type { ExistingLegalEntity, LegalEntity } from '../../models/api/legal-entity';
2
2
  import type { ComponentApiRequestContext } from '../types';
3
- export declare const getLegalEntity: (context: ComponentApiRequestContext) => Promise<ExistingLegalEntity>;
3
+ export declare const getLegalEntity: (context: ComponentApiRequestContext, legalEntityId: LegalEntity["id"]) => Promise<ExistingLegalEntity>;
@@ -1,3 +1,3 @@
1
1
  import type { ExistingLegalEntity, LegalEntity } from '../../models/api/legal-entity';
2
2
  import type { ComponentApiRequestContext } from '../types';
3
- export declare const updateLegalEntity: (context: ComponentApiRequestContext, legalEntity: LegalEntity) => Promise<ExistingLegalEntity>;
3
+ export declare const updateLegalEntity: (context: ComponentApiRequestContext, legalEntity: LegalEntity, legalEntityId: LegalEntity["id"]) => Promise<ExistingLegalEntity>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adyen/kyc-components",
3
- "version": "3.20.0",
3
+ "version": "3.20.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "files": [