feat: updated the Metadata type to allow for custom properties (#975)

## This PR
- Updates the `Metadata` type to a `Record` so that Providers can
provide more than just the `name` property as part of the `metadata`.

### Notes
Conversation
[here](https://cloud-native.slack.com/archives/C03J36ZP020/p1721747906370629).

---------

Signed-off-by: Juan Bernal <juanxwtf@gmail.com>
This commit is contained in:
Juan Bernal 2024-08-23 12:29:55 -04:00 committed by GitHub
parent 964d65b775
commit 16b0d74340
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 9 deletions

4
package-lock.json generated
View File

@ -13851,7 +13851,7 @@
},
"packages/client": {
"name": "@openfeature/web-sdk",
"version": "1.2.0",
"version": "1.2.1",
"license": "Apache-2.0",
"devDependencies": {
"@openfeature/core": "1.3.0"
@ -13883,7 +13883,7 @@
},
"packages/react": {
"name": "@openfeature/react-sdk",
"version": "0.4.1",
"version": "0.4.2",
"license": "Apache-2.0",
"devDependencies": {
"@openfeature/core": "*",

View File

@ -1,7 +1,6 @@
import { Metadata } from '../types';
import { ProviderMetadata } from '../provider/provider';
export interface ClientMetadata extends Metadata {
export interface ClientMetadata {
/**
* @deprecated alias of "domain", use domain instead
*/

View File

@ -82,7 +82,7 @@ export { ClientProviderStatus as AllProviderStatus };
/**
* Static data about the provider.
*/
export interface ProviderMetadata extends Metadata {
export interface ProviderMetadata extends Readonly<Metadata> {
readonly name: string;
}

View File

@ -1,2 +1 @@
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Metadata {}
export type Metadata = Record<string, string>;