diff --git a/.changeset/nervous-seals-remain.md b/.changeset/nervous-seals-remain.md new file mode 100644 index 000000000..eb5a4c399 --- /dev/null +++ b/.changeset/nervous-seals-remain.md @@ -0,0 +1,5 @@ +--- +'@segment/analytics-next': patch +--- + +Add consent info to typescript types diff --git a/packages/browser/src/browser/index.ts b/packages/browser/src/browser/index.ts index a0a5d10d2..8ee803b3a 100644 --- a/packages/browser/src/browser/index.ts +++ b/packages/browser/src/browser/index.ts @@ -39,6 +39,17 @@ export interface LegacyIntegrationConfiguration { bundlingStatus?: string + /** + * Consent settings for the integration + */ + consentSettings?: { + /** + * Consent categories for the integration + * @example ["Analytics", "Advertising", "CAT001"] + */ + categories: string[] + } + // Segment.io specific retryQueue?: boolean @@ -64,6 +75,18 @@ export interface LegacySettings { legacyVideoPluginsEnabled?: boolean remotePlugins?: RemotePlugin[] + + /** + * Top level consent settings + */ + consentSettings?: { + /** + * All unique consent categories. + * There can be categories in this array that are important for consent that are not included in any integration (e.g. 2 cloud mode categories). + * @example ["Analytics", "Advertising", "CAT001"] + */ + allCategories: string[] + } } export interface AnalyticsBrowserSettings extends AnalyticsSettings {