Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions website/docs/sdk-reference/openfeature/angular.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ npm i @openfeature/angular-sdk @openfeature/config-cat-web-provider
### 2. Initialize the Angular SDK

The `ConfigCatWebProvider.create()` function takes the SDK key and an optional `options` argument containing additional
configuration options for the underlying [ConfigCat client](../../js#creating-the-configcat-client):
configuration options for the underlying [ConfigCat client](../../js/browser/#creating-the-configcat-client):

* For applications using modules:

```ts
import { NgModule } from '@angular/core';
import { BooleanFeatureFlagDirective, type EvaluationContext, OpenFeatureModule } from '@openfeature/angular-sdk';
import { ConfigCatWebProvider } from '@openfeature/config-cat-web-provider';
import { createConsoleLogger, LogLevel } from 'configcat-js-ssr';
import { createConsoleLogger, LogLevel } from '@configcat/sdk';

const configCatProvider = ConfigCatWebProvider.create('#YOUR-SDK-KEY#', {
// Specify options for the underlying ConfigCat client
Expand Down Expand Up @@ -75,7 +75,7 @@ configuration options for the underlying [ConfigCat client](../../js#creating-th
import { type ApplicationConfig, importProvidersFrom } from '@angular/core';
import { type EvaluationContext, OpenFeatureModule } from '@openfeature/angular-sdk';
import { ConfigCatWebProvider } from '@openfeature/config-cat-web-provider';
import { createConsoleLogger, LogLevel } from 'configcat-js-ssr';
import { createConsoleLogger, LogLevel } from '@configcat/sdk';

const configCatProvider = ConfigCatWebProvider.create('#YOUR-SDK-KEY#', {
// Specify options for the underlying ConfigCat client
Expand Down Expand Up @@ -128,7 +128,7 @@ in the OpenFeature specification is a container for arbitrary contextual data th
flag evaluation.

You can find [here](./js.mdx#evaluation-context) how the ConfigCat provider translates these evaluation contexts to
ConfigCat [User Objects](../../js/#user-object).
ConfigCat [User Objects](../../js/browser/#user-object).

## Advanced features

Expand Down
8 changes: 4 additions & 4 deletions website/docs/sdk-reference/openfeature/js.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ npm i @openfeature/config-cat-web-provider

### 2. Initialize the provider

The `ConfigCatWebProvider.create()` function takes the SDK key and an optional `options` argument containing additional configuration options for the [ConfigCat JavaScript SDK](../../js/#creating-the-configcat-client):
The `ConfigCatWebProvider.create()` function takes the SDK key and an optional `options` argument containing additional configuration options for the [ConfigCat Browser (JavaScript) SDK](../../js/browser/#creating-the-configcat-client):

```js
import { OpenFeature } from "@openfeature/web-sdk";
import { ConfigCatWebProvider } from '@openfeature/config-cat-web-provider';
import { createConsoleLogger, LogLevel } from "configcat-js-ssr";
import { createConsoleLogger, LogLevel } from "@configcat/sdk";

// Build options for the ConfigCat SDK.
const options = {
Expand All @@ -40,7 +40,7 @@ await OpenFeature.setProviderAndWait(ConfigCatWebProvider.create('#YOUR-SDK-KEY#
const client = OpenFeature.getClient();
```

For more information about all the configuration options, see the [JavaScript SDK documentation](../../js/#creating-the-configcat-client).
For more information about all the configuration options, see the [Browser (JavaScript) SDK documentation](../../js/browser/#creating-the-configcat-client).

### 3. Evaluate your feature flag

Expand All @@ -64,7 +64,7 @@ await OpenFeature.clearProviders();
## Evaluation Context

An <a href="https://openfeature.dev/docs/reference/concepts/evaluation-context" target="_blank">evaluation context</a> in the OpenFeature specification is a container for arbitrary contextual data that can be used as a basis for feature flag evaluation.
The ConfigCat provider translates these evaluation contexts to ConfigCat [User Objects](../../js/#user-object).
The ConfigCat provider translates these evaluation contexts to ConfigCat [User Objects](../../js/browser/#user-object).

The following table shows how the different context attributes are mapped to User Object attributes.

Expand Down
8 changes: 4 additions & 4 deletions website/docs/sdk-reference/openfeature/nestjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ npm i @openfeature/nestjs-sdk @openfeature/config-cat-provider

### 2. Initialize the NestJS SDK

The `ConfigCatProvider.create()` function takes the SDK key, the desired [polling mode](../../node#polling-modes)
The `ConfigCatProvider.create()` function takes the SDK key, the desired [polling mode](../../js/node/#polling-modes)
(Auto Polling is recommended for this kind of application) and an optional `options` argument containing additional
configuration options for the underlying [ConfigCat client](../../node#creating-the-configcat-client):
configuration options for the underlying [ConfigCat client](../../js/node/#creating-the-configcat-client):

```ts
import { Module } from '@nestjs/common';
import { OpenFeatureModule } from '@openfeature/nestjs-sdk';
import { ConfigCatProvider } from '@openfeature/config-cat-provider';
import { createConsoleLogger, LogLevel, PollingMode } from 'configcat-js-ssr';
import { createConsoleLogger, LogLevel, PollingMode } from '@configcat/sdk';
import { FeatureFlagService } from './_services/feature-flag.service';

const configCatProvider = ConfigCatProvider.create('#YOUR-SDK-KEY#', PollingMode.AutoPoll, {
Expand Down Expand Up @@ -105,7 +105,7 @@ in the OpenFeature specification is a container for arbitrary contextual data th
flag evaluation.

You can find [here](./node.mdx#evaluation-context) how the ConfigCat provider translates these evaluation contexts to
ConfigCat [User Objects](../../node/#user-object).
ConfigCat [User Objects](../../js/node/#user-object).

## Advanced features

Expand Down
8 changes: 4 additions & 4 deletions website/docs/sdk-reference/openfeature/node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ npm i @openfeature/config-cat-provider

### 2. Initialize the provider

The `ConfigCatProvider.create()` function takes the SDK key and an optional `options` argument containing additional configuration options for the [ConfigCat Node.js SDK](../../node/#creating-the-configcat-client):
The `ConfigCatProvider.create()` function takes the SDK key and an optional `options` argument containing additional configuration options for the [ConfigCat Node.js SDK](../../js/node/#creating-the-configcat-client):

```js
import { OpenFeature } from "@openfeature/server-sdk";
import { ConfigCatProvider } from '@openfeature/config-cat-provider';
import { createConsoleLogger, LogLevel, PollingMode } from "configcat-node";
import { createConsoleLogger, LogLevel, PollingMode } from "@configcat/sdk";

// Build options for the ConfigCat SDK.
const options = {
Expand All @@ -40,7 +40,7 @@ await OpenFeature.setProviderAndWait(ConfigCatProvider.create('#YOUR-SDK-KEY#',
const client = OpenFeature.getClient();
```

For more information about all the configuration options, see the [Node.js SDK documentation](../../node/#creating-the-configcat-client).
For more information about all the configuration options, see the [Node.js SDK documentation](../../js/node/#creating-the-configcat-client).

### 3. Evaluate your feature flag

Expand All @@ -64,7 +64,7 @@ await OpenFeature.clearProviders();
## Evaluation Context

An <a href="https://openfeature.dev/docs/reference/concepts/evaluation-context" target="_blank">evaluation context</a> in the OpenFeature specification is a container for arbitrary contextual data that can be used as a basis for feature flag evaluation.
The ConfigCat provider translates these evaluation contexts to ConfigCat [User Objects](../../node/#user-object).
The ConfigCat provider translates these evaluation contexts to ConfigCat [User Objects](../../js/node/#user-object).

The following table shows how the different context attributes are mapped to User Object attributes.

Expand Down
6 changes: 3 additions & 3 deletions website/docs/sdk-reference/openfeature/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ npm i @openfeature/react-sdk @openfeature/config-cat-web-provider
### 2. Initialize the React SDK

The `ConfigCatWebProvider.create()` function takes the SDK key and an optional `options` argument containing additional
configuration options for the underlying [ConfigCat client](../../js#creating-the-configcat-client):
configuration options for the underlying [ConfigCat client](../../js/browser/#creating-the-configcat-client):

```jsx
import { OpenFeature, OpenFeatureProvider } from '@openfeature/react-sdk';
import { ConfigCatWebProvider } from '@openfeature/config-cat-web-provider';
import { createConsoleLogger, LogLevel } from 'configcat-js-ssr';
import { createConsoleLogger, LogLevel } from '@configcat/sdk';

const configCatProvider = ConfigCatWebProvider.create('#YOUR-SDK-KEY#', {
// Specify options for the underlying ConfigCat client
Expand Down Expand Up @@ -85,7 +85,7 @@ in the OpenFeature specification is a container for arbitrary contextual data th
flag evaluation.

You can find [here](./js.mdx#evaluation-context) how the ConfigCat provider translates these evaluation contexts to
ConfigCat [User Objects](../../js/#user-object).
ConfigCat [User Objects](../../js/browser/#user-object).

## Advanced features

Expand Down