---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../modules.md) / [config](../index.md) / ResolvedB2CConfig

# Interface: ResolvedB2CConfig

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:494](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L494)

Result of configuration resolution with factory methods.

Provides both raw configuration values and factory methods for creating
B2C SDK objects (B2CInstance, AuthStrategy, MrtClient) based on the
resolved configuration. Use the `has*` methods to check availability before
calling factory methods, which throw errors if required configuration is missing.

## Example

```typescript
import { resolveConfig } from '@salesforce/b2c-tooling-sdk/config';

const config = resolveConfig({
  hostname: process.env.SFCC_SERVER,
  clientId: process.env.SFCC_CLIENT_ID,
});

if (config.hasB2CInstanceConfig()) {
  const instance = config.createB2CInstance();
  await instance.webdav.propfind('Cartridges');
}

if (config.hasMrtConfig()) {
  const mrtAuth = config.createMrtAuth();
}
```

## Properties

### sources

> `readonly` **sources**: [`ConfigSourceInfo`](ConfigSourceInfo.md)[]

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:502](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L502)

Information about which sources contributed to the config

***

### values

> `readonly` **values**: [`NormalizedConfig`](NormalizedConfig.md)

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:496](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L496)

Raw configuration values

***

### warnings

> `readonly` **warnings**: [`ConfigWarning`](ConfigWarning.md)[]

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:499](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L499)

Warnings generated during resolution

## Methods

### createB2CInstance()

> **createB2CInstance**(`options?`): [`B2CInstance`](../../instance/classes/B2CInstance.md)

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:537](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L537)

Creates a B2CInstance from the resolved configuration.

#### Parameters

##### options?

[`CreateB2CInstanceOptions`](CreateB2CInstanceOptions.md)

OAuth runtime options and optional pre-resolved strategy

#### Returns

[`B2CInstance`](../../instance/classes/B2CInstance.md)

#### Throws

Error if hostname is not configured

***

### createBasicAuth()

> **createBasicAuth**(): [`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:543](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L543)

Creates a Basic auth strategy.

#### Returns

[`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

#### Throws

Error if username or password is not configured

***

### createMrtAuth()

> **createMrtAuth**(): [`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:556](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L556)

Creates an MRT auth strategy (API key).

#### Returns

[`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

#### Throws

Error if mrtApiKey is not configured

***

### createOAuth()

> **createOAuth**(`options?`): [`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:550](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L550)

Creates an OAuth auth strategy.

#### Parameters

##### options?

[`CreateOAuthOptions`](CreateOAuthOptions.md)

OAuth options (allowed methods)

#### Returns

[`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

#### Throws

Error if clientId is not configured

***

### createWebDavAuth()

> **createWebDavAuth**(): [`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:563](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L563)

Creates a WebDAV auth strategy.
Prefers Basic auth if available, falls back to OAuth.

#### Returns

[`AuthStrategy`](../../auth/interfaces/AuthStrategy.md)

#### Throws

Error if neither Basic auth nor OAuth is configured

***

### hasB2CInstanceConfig()

> **hasB2CInstanceConfig**(): `boolean`

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:510](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L510)

Check if B2C instance configuration is available.
Requires: hostname

#### Returns

`boolean`

***

### hasBasicAuthConfig()

> **hasBasicAuthConfig**(): `boolean`

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:528](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L528)

Check if Basic auth configuration is available.
Requires: username and password

#### Returns

`boolean`

***

### hasMrtConfig()

> **hasMrtConfig**(): `boolean`

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:516](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L516)

Check if MRT configuration is available.
Requires: mrtApiKey

#### Returns

`boolean`

***

### hasOAuthConfig()

> **hasOAuthConfig**(): `boolean`

Defined in: [packages/b2c-tooling-sdk/src/config/types.ts:522](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/2feab01f654eec77c6d702777ec2818472f131f1/packages/b2c-tooling-sdk/src/config/types.ts#L522)

Check if OAuth configuration is available.
Requires: clientId

#### Returns

`boolean`
