Skip to content

Commit

Permalink
Update typescript types to include consent settings (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
silesky authored Jul 16, 2023
1 parent 6789f9b commit 9c8b609
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/nervous-seals-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@segment/analytics-next': patch
---

Add consent info to typescript types
23 changes: 23 additions & 0 deletions packages/browser/src/browser/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 {
Expand Down

0 comments on commit 9c8b609

Please sign in to comment.