Skip to content

Commit 0c786f7

Browse files
committed
refactor: keep consent rule type with consent
1 parent 38f05d6 commit 0c786f7

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/configAPIClient.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type {
66
SDKInitConfig,
77
} from './sdkRuntimeModels';
88
import { Dictionary } from './utils';
9+
import type { IConsentRuleValue } from './consent';
910
import {
1011
AsyncUploader,
1112
IFetchPayload,
@@ -61,13 +62,6 @@ export interface IFilteringConsentRuleValues {
6162
values: IConsentRuleValue[];
6263
}
6364

64-
export interface IConsentRuleValue {
65-
// Server-side consent filters can return hashed consent purposes as numbers.
66-
consentPurpose: string | number;
67-
hasConsented: boolean;
68-
}
69-
70-
7165
export interface IConfigResponse {
7266
appName: string;
7367
dataPlanResult: DataPlanResult;

src/consent.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
import { Dictionary, isObject } from './utils';
88
import KitFilterHelper from './kitFilterHelper';
99
import Constants from './constants';
10-
import type { IConsentRuleValue } from './configAPIClient';
1110
import { IMParticleUser } from './identity-user-interfaces';
1211
import { IMParticleWebSDKInstance } from './mp-instance';
1312

@@ -89,6 +88,12 @@ export interface IConsentStateV2DTO {
8988
ccpa?: ICCPAConsentStateV2DTO;
9089
}
9190

91+
export interface IConsentRuleValue {
92+
// Server-side consent filters can return hashed consent purposes as numbers.
93+
consentPurpose: string | number;
94+
hasConsented: boolean;
95+
}
96+
9297
export interface IConsentRules {
9398
includeOnMatch: boolean;
9499
values: IConsentRuleValue[];

0 commit comments

Comments
 (0)