Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update typescript types to include consent settings #900

Merged
merged 3 commits into from
Jul 16, 2023
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
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