From bab12a578d2c234ae86bcd65cb51d0ee94d4856b Mon Sep 17 00:00:00 2001 From: Nicolas Ulrich Date: Mon, 23 Dec 2024 15:22:54 +0100 Subject: [PATCH] Add Account properties --- lib/cjs/generated/rum.d.ts | 14 ++++++++++++++ lib/cjs/generated/telemetry.d.ts | 9 ++++++++- lib/esm/generated/rum.d.ts | 14 ++++++++++++++ lib/esm/generated/telemetry.d.ts | 9 ++++++++- schemas/rum/_common-schema.json | 19 +++++++++++++++++++ .../usage/common-features-schema.json | 11 +++++++++++ 6 files changed, 74 insertions(+), 2 deletions(-) diff --git a/lib/cjs/generated/rum.d.ts b/lib/cjs/generated/rum.d.ts index 4395532..119490b 100644 --- a/lib/cjs/generated/rum.d.ts +++ b/lib/cjs/generated/rum.d.ts @@ -1245,6 +1245,20 @@ export interface CommonProperties { readonly anonymous_id?: string; [k: string]: unknown; }; + /** + * Account properties + */ + readonly account?: { + /** + * Identifier of the account + */ + readonly id: string; + /** + * Name of the account + */ + readonly name?: string; + [k: string]: unknown; + }; /** * Device connectivity properties */ diff --git a/lib/cjs/generated/telemetry.d.ts b/lib/cjs/generated/telemetry.d.ts index 7d9d8b5..28ef7b4 100644 --- a/lib/cjs/generated/telemetry.d.ts +++ b/lib/cjs/generated/telemetry.d.ts @@ -407,7 +407,7 @@ export declare type TelemetryUsageEvent = CommonTelemetryProperties & { /** * Schema of features usage common across SDKs */ -export declare type TelemetryCommonFeaturesUsage = SetTrackingConsent | StopSession | StartView | AddAction | AddError | SetGlobalContext | SetUser | AddFeatureFlagEvaluation; +export declare type TelemetryCommonFeaturesUsage = SetTrackingConsent | StopSession | StartView | AddAction | AddError | SetGlobalContext | SetUser | SetAccount | AddFeatureFlagEvaluation; /** * Schema of browser specific features usage */ @@ -592,6 +592,13 @@ export interface SetUser { feature: 'set-user'; [k: string]: unknown; } +export interface SetAccount { + /** + * setAccount, setAccountProperty APIs + */ + feature: 'set-account'; + [k: string]: unknown; +} export interface AddFeatureFlagEvaluation { /** * addFeatureFlagEvaluation API diff --git a/lib/esm/generated/rum.d.ts b/lib/esm/generated/rum.d.ts index 4395532..119490b 100644 --- a/lib/esm/generated/rum.d.ts +++ b/lib/esm/generated/rum.d.ts @@ -1245,6 +1245,20 @@ export interface CommonProperties { readonly anonymous_id?: string; [k: string]: unknown; }; + /** + * Account properties + */ + readonly account?: { + /** + * Identifier of the account + */ + readonly id: string; + /** + * Name of the account + */ + readonly name?: string; + [k: string]: unknown; + }; /** * Device connectivity properties */ diff --git a/lib/esm/generated/telemetry.d.ts b/lib/esm/generated/telemetry.d.ts index 7d9d8b5..28ef7b4 100644 --- a/lib/esm/generated/telemetry.d.ts +++ b/lib/esm/generated/telemetry.d.ts @@ -407,7 +407,7 @@ export declare type TelemetryUsageEvent = CommonTelemetryProperties & { /** * Schema of features usage common across SDKs */ -export declare type TelemetryCommonFeaturesUsage = SetTrackingConsent | StopSession | StartView | AddAction | AddError | SetGlobalContext | SetUser | AddFeatureFlagEvaluation; +export declare type TelemetryCommonFeaturesUsage = SetTrackingConsent | StopSession | StartView | AddAction | AddError | SetGlobalContext | SetUser | SetAccount | AddFeatureFlagEvaluation; /** * Schema of browser specific features usage */ @@ -592,6 +592,13 @@ export interface SetUser { feature: 'set-user'; [k: string]: unknown; } +export interface SetAccount { + /** + * setAccount, setAccountProperty APIs + */ + feature: 'set-account'; + [k: string]: unknown; +} export interface AddFeatureFlagEvaluation { /** * addFeatureFlagEvaluation API diff --git a/schemas/rum/_common-schema.json b/schemas/rum/_common-schema.json index 020a829..5893c4d 100644 --- a/schemas/rum/_common-schema.json +++ b/schemas/rum/_common-schema.json @@ -132,6 +132,25 @@ }, "readOnly": true }, + "account": { + "type": "object", + "description": "Account properties", + "additionalProperties": true, + "required": ["id"], + "properties": { + "id": { + "type": "string", + "description": "Identifier of the account", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of the account", + "readOnly": true + } + }, + "readOnly": true + }, "connectivity": { "type": "object", "description": "Device connectivity properties", diff --git a/schemas/telemetry/usage/common-features-schema.json b/schemas/telemetry/usage/common-features-schema.json index b66c784..f6eebb3 100644 --- a/schemas/telemetry/usage/common-features-schema.json +++ b/schemas/telemetry/usage/common-features-schema.json @@ -87,6 +87,17 @@ } } }, + { + "required": ["feature"], + "title": "SetAccount", + "properties": { + "feature": { + "type": "string", + "description": "setAccount, setAccountProperty APIs", + "const": "set-account" + } + } + }, { "required": ["feature"], "title": "AddFeatureFlagEvaluation",