@ketch-sdk/ketch-types 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.ts DELETED
@@ -1,1050 +0,0 @@
1
- /**
2
- * Callback
3
- */
4
- export declare type Callback = (arg0: any) => void
5
-
6
- /**
7
- * Status
8
- */
9
- export type Status = { [key: string]: boolean }
10
-
11
- /**
12
- * Consent
13
- */
14
- export type Consent = {
15
- purposes: Status
16
- vendors?: string[] // list of vendor ids for which the user has opted out
17
- }
18
-
19
- /**
20
- * Identities
21
- */
22
- export type Identities = { [key: string]: string }
23
-
24
- /**
25
- * PreferenceExperienceParams
26
- */
27
- export type PreferenceExperienceParams = {
28
- showRightsTab?: boolean
29
- dataSubjectTypeCodes?: string[]
30
- }
31
-
32
- /**
33
- * Plugin
34
- */
35
- export interface Plugin {
36
- init: (host: Ketch, config: Configuration) => void
37
-
38
- environmentLoaded?: (host: Ketch, config: Configuration, env: Environment) => void
39
-
40
- geoIPLoaded?: (host: Ketch, config: Configuration, ipInfo: IPInfo) => void
41
-
42
- identitiesLoaded?: (host: Ketch, config: Configuration, identities: Identities) => void
43
-
44
- jurisdictionLoaded?: (host: Ketch, config: Configuration, policyScope: string) => void
45
-
46
- regionInfoLoaded?: (host: Ketch, config: Configuration, region: string) => void
47
-
48
- consentChanged?: (host: Ketch, config: Configuration, consent: Consent) => void
49
-
50
- rightInvoked?: (host: Ketch, config: Configuration, request: InvokeRightRequest) => void
51
-
52
- showConsentExperience?: ShowConsentExperience
53
-
54
- showPreferenceExperience?: ShowPreferenceExperience
55
-
56
- willShowExperience?: (host: Ketch, config: Configuration) => void
57
-
58
- experienceHidden?: (host: Ketch, config: Configuration, reason?: string) => void
59
- }
60
-
61
- /**
62
- * Ketch host
63
- */
64
- export interface Ketch {
65
- getConfig(): Promise<Configuration>
66
-
67
- registerPlugin(plugin: Plugin): Promise<void>
68
-
69
- getProperty(p: string): string | null
70
-
71
- hasConsent(): boolean
72
- getConsent(): Promise<Consent>
73
- setConsent(c: Consent): Promise<Consent>
74
- changeConsent(consent: Consent): Promise<void>
75
- setProvisionalConsent(c: Consent): Promise<void>
76
- onConsent(callback: Callback): Promise<void>
77
-
78
- invokeRight(eventData: InvokeRightsEvent): Promise<void>
79
- onInvokeRight(callback: Callback): Promise<void>
80
-
81
- shouldShowConsent(c: Consent): boolean
82
- setShowConsentExperience(): Promise<void>
83
-
84
- showConsentExperience(): Promise<Consent>
85
- onShowConsentExperience(callback: ShowConsentExperience): Promise<void>
86
-
87
- showPreferenceExperience(params: PreferenceExperienceParams): Promise<Consent>
88
- onShowPreferenceExperience(callback: ShowPreferenceExperience): Promise<void>
89
-
90
- experienceClosed(reason: string): Promise<Consent>
91
- onHideExperience(callback: Callback): Promise<void>
92
- onWillShowExperience(callback: Callback): Promise<void>
93
-
94
- getEnvironment(): Promise<Environment>
95
- setEnvironment(env: Environment): Promise<Environment>
96
- onEnvironment(callback: Callback): Promise<void>
97
-
98
- getGeoIP(): Promise<IPInfo>
99
- setGeoIP(g: IPInfo): Promise<IPInfo>
100
- onGeoIP(callback: Callback): Promise<void>
101
-
102
- getIdentities(): Promise<Identities>
103
- setIdentities(id: Identities): Promise<Identities>
104
- onIdentities(callback: Callback): Promise<void>
105
-
106
- getJurisdiction(): Promise<string>
107
- setJurisdiction(ps: string): Promise<string>
108
- onJurisdiction(callback: Callback): Promise<void>
109
-
110
- getRegionInfo(): Promise<string>
111
- onRegionInfo(callback: Callback): Promise<void>
112
- setRegionInfo(info: string): Promise<string>
113
-
114
- // Native events
115
- fireNativeEvent(name: string, args: any): Promise<void>
116
- }
117
-
118
- /**
119
- * ShowPreferenceExperience
120
- */
121
- export type ShowPreferenceExperience = (
122
- host: Ketch,
123
- config: Configuration,
124
- consents: Consent,
125
- options?: ShowPreferenceOptions,
126
- ) => void
127
-
128
- /**
129
- * ShowConsentExperience
130
- */
131
- export type ShowConsentExperience = (
132
- host: Ketch,
133
- config: Configuration,
134
- consents: Consent,
135
- options?: ShowConsentOptions,
136
- ) => void
137
-
138
- /**
139
- * ShowPreferenceOptions
140
- */
141
- export type ShowPreferenceOptions = {
142
- tab?: 'overviewTab' | 'rightsTab' | 'consentsTab'
143
-
144
- /**
145
- * dataSubjectTypeCodes is the list of data subjects to display. If undefined, all data subjects are displayed.
146
- */
147
- dataSubjectTypeCodes?: string[]
148
-
149
- /**
150
- * showRightsTab determines whether the rights tab will show. If undefined, the rights tab is displayed.
151
- */
152
- showRightsTab?: boolean
153
- }
154
-
155
- /**
156
- * ShowConsentOptions
157
- */
158
- export type ShowConsentOptions = {
159
- displayHint: 'experiences.consent.jit' | 'experiences.consent.modal' | 'experiences.consent.banner'
160
- purposes?: string[]
161
- }
162
-
163
- /**
164
- * InvokeRightsEvent
165
- */
166
- export type InvokeRightsEvent = {
167
- addressLine1?: string
168
- addressLine2?: string
169
- country?: string
170
- details?: string
171
- firstName: string
172
- lastName: string
173
- phoneNumber?: string
174
- postalCode?: string
175
- right: string
176
- rightsEmail: string
177
- stateRegion?: string
178
- }
179
-
180
- /**
181
- * AppDiv
182
- */
183
- export interface AppDiv {
184
- id: string
185
- zIndex: string
186
- }
187
-
188
- /**
189
- * ExperienceDefault
190
- */
191
- export enum ExperienceDefault {
192
- BANNER = 1,
193
- MODAL,
194
- }
195
-
196
- /**
197
- * ExperienceButtonDestination
198
- */
199
- export enum ExperienceButtonDestination {
200
- GOTO_MODAL = 1,
201
- GOTO_PREFERENCE = 2,
202
- REJECT_ALL = 3,
203
- }
204
-
205
- /**
206
- * ExperiencePrimaryButtonAction
207
- */
208
- export enum ExperiencePrimaryButtonAction {
209
- SAVE_CURRENT_STATE = 1,
210
- ACCEPT_ALL = 2,
211
- }
212
-
213
- /**
214
- * MigrationOption
215
- */
216
- export enum MigrationOption {
217
- MIGRATE_DEFAULT,
218
- MIGRATE_NEVER,
219
- MIGRATE_FROM_ALLOW,
220
- MIGRATE_FROM_DENY,
221
- MIGRATE_ALWAYS,
222
- }
223
-
224
- /**
225
- * CookieDuration
226
- */
227
- export enum CookieDuration {
228
- SESSION = 1,
229
- PERSISTENT,
230
- }
231
-
232
- /**
233
- * CookieProvenance
234
- */
235
- export enum CookieProvenance {
236
- FIRST_PARTY = 1,
237
- THIRD_PARTY,
238
- }
239
-
240
- /**
241
- * CookieCategory
242
- */
243
- export enum CookieCategory {
244
- STRICTLY_NECESSARY = 1,
245
- FUNCTIONAL,
246
- PERFORMANCE,
247
- MARKETING,
248
- }
249
-
250
- /**
251
- * IPLanguage
252
- */
253
- export interface IPLanguage {
254
- code: string
255
- name: string
256
- native: string
257
- }
258
-
259
- /**
260
- * IPLocation
261
- */
262
- export interface IPLocation {
263
- geonameId: number
264
- capital: string
265
- languages: IPLanguage[]
266
- countryFlag: string
267
- countryFlagEmoji: string
268
- countryFlagEmojiUnicode: string
269
- callingCode: string
270
- isEU: boolean
271
- }
272
-
273
- /**
274
- * IPInfo
275
- */
276
- export interface IPInfo {
277
- ip: string
278
- hostname: string
279
- continentCode: string
280
- continentName: string
281
- countryCode: string
282
- countryName: string
283
- regionCode: string
284
- regionName: string
285
- city: string
286
- zip: string
287
- latitude: number
288
- longitude: number
289
- location: IPLocation
290
- }
291
-
292
- /**
293
- * GetLocationRequest
294
- */
295
- export interface GetLocationRequest {
296
- IP?: string
297
- }
298
-
299
- /**
300
- * GetLocationResponse
301
- */
302
- export interface GetLocationResponse {
303
- location: IPInfo
304
- }
305
-
306
- /**
307
- * PurposeLegalBasis
308
- */
309
- export interface PurposeLegalBasis {
310
- legalBasisCode: string
311
- }
312
-
313
- /**
314
- * PurposeAllowed
315
- */
316
- export interface PurposeAllowed {
317
- allowed: string
318
- }
319
-
320
- /**
321
- * PurposeAllowedLegalBasis
322
- */
323
- export interface PurposeAllowedLegalBasis {
324
- allowed: string
325
- legalBasisCode: string
326
- }
327
-
328
- /**
329
- * GetConsentRequest
330
- */
331
- export interface GetConsentRequest {
332
- organizationCode: string
333
- controllerCode?: string
334
- propertyCode: string
335
- environmentCode: string
336
- jurisdictionCode: string
337
- identities: { [key: string]: string }
338
- purposes: { [key: string]: PurposeLegalBasis }
339
- }
340
-
341
- /**
342
- * GetConsentResponse
343
- */
344
- export interface GetConsentResponse {
345
- purposes: { [key: string]: PurposeAllowed | string }
346
- /**
347
- * list of vendor ids for which the user has opted out
348
- */
349
- vendors?: string[]
350
- }
351
-
352
- /**
353
- * SetConsentRequest
354
- */
355
- export interface SetConsentRequest {
356
- organizationCode: string
357
- controllerCode?: string
358
- propertyCode: string
359
- environmentCode: string
360
- identities: { [key: string]: string }
361
- collectedAt?: number
362
- jurisdictionCode: string
363
- migrationOption: MigrationOption
364
- purposes: { [key: string]: PurposeAllowedLegalBasis }
365
- vendors?: string[] // list of vendor ids for which the user has opted out
366
-
367
- /**
368
- * identityPriority is a map from the identity space code to the priority that should be used to resolve consent
369
- * conflict
370
- * lower values take top priority
371
- * if an identity space codes is not in the identityPriority map then it is the last priority
372
- */
373
- identityPriority?: { [key: string]: number }
374
- }
375
-
376
- /**
377
- * User
378
- */
379
- export interface User {
380
- email: string
381
- first: string
382
- last: string
383
- country?: string
384
- stateRegion?: string
385
- description?: string
386
- phone?: string
387
- postalCode?: string
388
- addressLine1?: string
389
- addressLine2?: string
390
-
391
- /**
392
- * typeCode is the identifier representing the data subject type specified by the user
393
- */
394
- typeCode?: string
395
-
396
- /**
397
- * typeRelationshipDetails is additional information provided by the user describing their relation to the business
398
- */
399
- typeRelationshipDetails?: string
400
- }
401
-
402
- /**
403
- * InvokeRightRequest
404
- */
405
- export interface InvokeRightRequest {
406
- organizationCode: string
407
- controllerCode?: string
408
- propertyCode: string
409
- environmentCode: string
410
- identities: { [key: string]: string }
411
- invokedAt?: number
412
- jurisdictionCode: string
413
- rightCode: string
414
- user: User
415
- }
416
-
417
- /**
418
- * GetBootstrapConfigurationRequest
419
- */
420
- export interface GetBootstrapConfigurationRequest {
421
- organizationCode: string
422
- propertyCode: string
423
- }
424
-
425
- /**
426
- * GetFullConfigurationRequest
427
- */
428
- export interface GetFullConfigurationRequest {
429
- organizationCode: string
430
- propertyCode: string
431
- environmentCode?: string
432
- hash?: string
433
- deploymentID?: string
434
- jurisdictionCode?: string
435
- languageCode?: string
436
- }
437
-
438
- /**
439
- * GetPreferenceQRRequest
440
- */
441
- export interface GetPreferenceQRRequest {
442
- organizationCode: string
443
- propertyCode: string
444
- environmentCode?: string
445
- imageSize?: number
446
- path?: string
447
- backgroundColor?: string
448
- foregroundColor?: string
449
- parameters: { [key: string]: string }
450
- }
451
-
452
- /**
453
- * WebReportRequest
454
- */
455
- export interface WebReportRequest {
456
- type: string
457
- age: number
458
- url: string
459
- user_agent: string
460
- body: { [key: string]: any }
461
- }
462
-
463
- /**
464
- * Organization
465
- */
466
- export interface Organization {
467
- code: string
468
- }
469
-
470
- /**
471
- * JurisdictionInfo
472
- */
473
- export interface JurisdictionInfo {
474
- code?: string
475
- defaultScopeCode?: string
476
- variable?: string
477
- scopes?: { [key: string]: string }
478
- }
479
-
480
- /**
481
- * Property
482
- */
483
- export interface Property {
484
- code?: string
485
- name?: string
486
- platform?: string
487
- proxy?: string
488
- }
489
-
490
- /**
491
- * Environment
492
- */
493
- export interface Environment {
494
- code: string
495
- pattern?: string
496
- hash?: string
497
- }
498
-
499
- /**
500
- * Deployment
501
- */
502
- export interface Deployment {
503
- code: string
504
- version: number
505
- }
506
-
507
- /**
508
- * Cookie
509
- */
510
- export interface Cookie {
511
- name: string
512
- code: string
513
- host: string
514
- duration: CookieDuration
515
- provenance: CookieProvenance
516
- category: CookieCategory
517
- description: string
518
- serviceProvider?: string
519
- latest?: boolean
520
- version?: number
521
- }
522
-
523
- /**
524
- * PurposeCategory
525
- */
526
- export type PurposeCategory = {
527
- name: string
528
- description: string
529
- retentionPeriod: string
530
- externalTransfers: string
531
- }
532
-
533
- /**
534
- * Purpose
535
- */
536
- export interface Purpose {
537
- code: string
538
- name?: string
539
- description?: string
540
- legalBasisCode: string
541
- requiresOptIn?: boolean
542
- allowsOptOut?: boolean
543
- requiresDisplay?: boolean
544
- requiresPrivacyPolicy?: boolean
545
- cookies?: Cookie[]
546
- categories?: PurposeCategory[]
547
- tcfType?: string
548
- tcfID?: string
549
- canonicalPurposeCode?: string
550
- legalBasisName?: string
551
- legalBasisDescription?: string
552
-
553
- /**
554
- * the data subject types for which the purpose is relevant. If this list is empty then the purpose applies to all
555
- * data subject types
556
- */
557
- dataSubjectTypeCodes?: string[]
558
- }
559
-
560
- /**
561
- * CanonicalPurpose
562
- */
563
- export interface CanonicalPurpose {
564
- code: string
565
- name: string
566
- purposeCodes?: string[]
567
- }
568
-
569
- /**
570
- * IdentityLocation is the location on the page from which to retrieve identity information
571
- */
572
- export enum IdentityType {
573
- IDENTITY_TYPE_UNDEFINED = '',
574
- IDENTITY_TYPE_DATA_LAYER = 'dataLayer',
575
- IDENTITY_TYPE_WINDOW = 'window',
576
- IDENTITY_TYPE_COOKIE = 'cookie',
577
- IDENTITY_TYPE_MANAGED = 'managedCookie', // this is created if necessary and stored in a cookie with associated name
578
- IDENTITY_TYPE_LOCAL_STORAGE = 'localStorage',
579
- IDENTITY_TYPE_SESSION_STORAGE = 'sessionStorage',
580
- IDENTITY_TYPE_QUERY_STRING = 'queryString',
581
- }
582
-
583
- /**
584
- * IdentityFormat is the encoding of the string identity value
585
- */
586
- export enum IdentityFormat {
587
- IDENTITY_FORMAT_UNDEFINED = '',
588
- IDENTITY_FORMAT_STRING = 'string',
589
- IDENTITY_FORMAT_JSON = 'json',
590
- IDENTITY_FORMAT_JWT = 'jwt',
591
- IDENTITY_FORMAT_QUERY = 'query',
592
- IDENTITY_FORMAT_SEMICOLON = 'semicolon',
593
- }
594
-
595
- /**
596
- * Identity represents all the metadata for an identifier on the page
597
- */
598
- export interface Identity {
599
- /**
600
- * type is the location on the page from which to retrieve identity information
601
- */
602
- type: IdentityType
603
-
604
- /**
605
- * variable is the name to look up the identity value in the specified location
606
- */
607
- variable: string
608
-
609
- /**
610
- * format is the encoding of the value
611
- */
612
- format: IdentityFormat
613
-
614
- /**
615
- * key is the identifier to find the identity within the value if the format is IDENTITY_FORMAT_STRING then key
616
- * will be undefined
617
- */
618
- key?: string
619
-
620
- /**
621
- * priority of the identity for consent conflict resolution
622
- */
623
- priority?: number
624
- }
625
-
626
- /**
627
- * PolicyDocument
628
- */
629
- export interface PolicyDocument {
630
- code: string
631
- version: number
632
- url: string
633
- }
634
-
635
- /**
636
- * SwitchTextRenderLogic
637
- */
638
- export enum SwitchTextRenderLogic {
639
- /**
640
- * SWITCH_TEXT_RENDER_ALL always renders the switch text regardless of state
641
- */
642
- SWITCH_TEXT_RENDER_ALL = 1,
643
- /**
644
- * SWITCH_TEXT_RENDER_LEGAL_BASIS renders the switch text only if different from the legal basis default
645
- */
646
- SWITCH_TEXT_RENDER_LEGAL_BASIS = 2,
647
- /**
648
- * SWITCH_TEXT_RENDER_CHANGE renders the switch only if the user changes the state of the switch
649
- */
650
- SWITCH_TEXT_RENDER_CHANGE = 3,
651
- /**
652
- * SWITCH_TEXT_RENDER_NEVER never renders the switch text
653
- */
654
- SWITCH_TEXT_RENDER_NEVER = 4,
655
- }
656
-
657
- /**
658
- * Banner
659
- */
660
- export interface Banner {
661
- title?: string
662
- footerDescription: string
663
- buttonText: string
664
- primaryButtonAction?: ExperiencePrimaryButtonAction
665
- secondaryButtonText?: string
666
- secondaryButtonDestination?: ExperienceButtonDestination
667
-
668
- /**
669
- * showCloseIcon determines whether the x out icon appears in the experience. Default do not show
670
- */
671
- showCloseIcon?: boolean
672
-
673
- /**
674
- * additional extensions
675
- */
676
- extensions?: { [key: string]: string }
677
- }
678
-
679
- /**
680
- * Modal
681
- */
682
- export interface Modal {
683
- title: string
684
- bodyTitle?: string
685
- bodyDescription?: string
686
- buttonText: string
687
-
688
- /**
689
- * consentTitle is the heading that goes above the list of purposes this optionally overrides the standard title
690
- */
691
- consentTitle?: string
692
-
693
- /**
694
- * hideConsentTitle determines whether the consent title should be hidden. Default is to show
695
- */
696
- hideConsentTitle?: boolean
697
-
698
- /**
699
- * hideLegalBases determines whether the legal bases should be hidden. Default is to show
700
- */
701
- hideLegalBases?: boolean
702
-
703
- /**
704
- * switchOnText overrides the standard text for a consent switch in the on state
705
- */
706
- switchOnText?: string
707
-
708
- /**
709
- * switchOffText overrides the standard text for a consent switch in the off state
710
- */
711
- switchOffText?: string
712
-
713
- /**
714
- * switchTextRenderLogic determines the logic for showing the switch text
715
- */
716
- switchTextRenderLogic?: SwitchTextRenderLogic
717
-
718
- /**
719
- * showCloseIcon determines whether the x out icon appears in the experience. Default do not show
720
- */
721
- showCloseIcon?: boolean
722
-
723
- /**
724
- * additional extensions
725
- */
726
- extensions?: { [key: string]: string }
727
- }
728
-
729
- /**
730
- * JIT
731
- */
732
- export interface JIT {
733
- title?: string
734
- bodyDescription?: string
735
- acceptButtonText: string
736
- declineButtonText: string
737
- moreInfoText?: string
738
- moreInfoDestination?: ExperienceButtonDestination
739
-
740
- /**
741
- * showCloseIcon determines whether the x out icon appears in the experience. Default do not show
742
- */
743
- showCloseIcon?: boolean
744
-
745
- /**
746
- * additional extensions
747
- */
748
- extensions?: { [key: string]: string }
749
- }
750
-
751
- /**
752
- * RightsTab
753
- */
754
- export interface RightsTab {
755
- tabName: string
756
- bodyTitle?: string
757
- bodyDescription?: string
758
- buttonText: string
759
-
760
- /**
761
- * additional extensions
762
- */
763
- extensions?: { [key: string]: string }
764
- }
765
-
766
- /**
767
- * ConsentsTab
768
- */
769
- export interface ConsentsTab {
770
- tabName: string
771
- bodyTitle?: string
772
- bodyDescription?: string
773
- buttonText: string
774
-
775
- /**
776
- * consentTitle is the heading that goes above the list of purposes
777
- * this optionally overrides the standard title
778
- */
779
- consentTitle?: string
780
-
781
- /**
782
- * hideConsentTitle determines whether the consent title should be hidden. Default is to show
783
- */
784
- hideConsentTitle?: boolean
785
-
786
- /**
787
- * hideLegalBases determines whether the legal bases should be hidden. Default is to show
788
- */
789
- hideLegalBases?: boolean
790
-
791
- /**
792
- * switchOnText overrides the standard text for a consent switch in the on state
793
- */
794
- switchOnText?: string
795
-
796
- /**
797
- * switchOffText overrides the standard text for a consent switch in the off state
798
- */
799
- switchOffText?: string
800
-
801
- /**
802
- * switchTextRenderLogic determines the logic for showing the switch text
803
- */
804
- switchTextRenderLogic?: SwitchTextRenderLogic
805
-
806
- /**
807
- * additional extensions
808
- */
809
- extensions?: { [key: string]: string }
810
- }
811
-
812
- /**
813
- * OverviewTab
814
- */
815
- export interface OverviewTab {
816
- tabName: string
817
- bodyTitle?: string
818
- bodyDescription: string
819
-
820
- /**
821
- * additional extensions
822
- * */
823
- extensions?: { [key: string]: string }
824
- }
825
-
826
- /**
827
- * ConsentExperience
828
- */
829
- export interface ConsentExperience {
830
- code: string
831
- version: number
832
- banner: Banner
833
- modal: Modal
834
- jit?: JIT
835
- experienceDefault: ExperienceDefault
836
-
837
- /**
838
- * additional extensions
839
- */
840
- extensions?: { [key: string]: string }
841
- }
842
-
843
- /**
844
- * PreferenceExperience
845
- */
846
- export interface PreferenceExperience {
847
- code: string
848
- version: number
849
- title: string
850
- rights?: RightsTab
851
- consents?: ConsentsTab
852
- overview: OverviewTab
853
-
854
- /**
855
- * additional extensions
856
- */
857
- extensions?: { [key: string]: string }
858
- }
859
-
860
- /**
861
- * Right
862
- */
863
- export interface Right {
864
- code: string
865
- name: string
866
- description: string
867
-
868
- /**
869
- * the data subject types for which the right is relevant. If this list is empty then the right applies to all
870
- * data subject types
871
- */
872
- dataSubjectTypeCodes?: string[]
873
- }
874
-
875
- /**
876
- * Experience
877
- */
878
- export interface Experience {
879
- consent?: ConsentExperience
880
- preference?: PreferenceExperience
881
- }
882
-
883
- /**
884
- * BannerPosition
885
- */
886
- export enum BannerPosition {
887
- BOTTOM = 1,
888
- TOP = 2,
889
- BOTTOM_LEFT = 3,
890
- BOTTOM_RIGHT = 4,
891
- }
892
-
893
- /**
894
- * ModalPosition
895
- */
896
- export enum ModalPosition {
897
- CENTER = 1,
898
- LEFT_FULL_HEIGHT = 2,
899
- RIGHT_FULL_HEIGHT = 3,
900
- }
901
-
902
- /**
903
- * Theme
904
- */
905
- export interface Theme {
906
- watermark?: boolean
907
- buttonBorderRadius: number
908
-
909
- bannerBackgroundColor: string
910
- bannerContentColor?: string
911
- bannerButtonColor: string
912
- bannerSecondaryButtonColor?: string
913
- bannerPosition?: BannerPosition
914
-
915
- modalHeaderBackgroundColor: string
916
- modalHeaderContentColor?: string
917
- modalContentColor: string
918
- modalButtonColor: string
919
- modalPosition?: ModalPosition
920
- /**
921
- * modalSwitchOnColor is the color of the consent switch in the on state for the modal this overrides standard theme
922
- * colors
923
- */
924
- modalSwitchOnColor?: string
925
-
926
- /**
927
- * modalSwitchOffColor is the color of the consent switch in the off state for the modal this overrides standard
928
- * theme colors
929
- */
930
- modalSwitchOffColor?: string
931
-
932
- formHeaderBackgroundColor: string
933
- formHeaderContentColor?: string
934
- formContentColor: string
935
- formButtonColor: string
936
- /**
937
- * formSwitchOnColor is the color of the consent switch in the on state for the form this overrides standard theme
938
- * colors
939
- */
940
- formSwitchOnColor?: string
941
- /**
942
- * formSwitchOffColor is the color of the consent switch in the off state for the form this overrides standard theme
943
- * colors
944
- */
945
- formSwitchOffColor?: string
946
-
947
- /**
948
- * qrBackgroundColor is the override for the QR code background color
949
- */
950
- qrBackgroundColor?: string
951
- /**
952
- * qrForegroundColor is the override for the QR code foreground color
953
- */
954
- qrForegroundColor?: string
955
- }
956
-
957
- /**
958
- * Vendor purpose
959
- */
960
- export interface VendorPurpose {
961
- name: string
962
- legalBasis?: string // legalBasisName
963
- }
964
-
965
- /**
966
- * Vendor definition
967
- */
968
- export interface Vendor {
969
- id: string
970
- name: string
971
- purposes?: VendorPurpose[]
972
- specialPurposes?: VendorPurpose[]
973
- features?: VendorPurpose[]
974
- specialFeatures?: VendorPurpose[]
975
- policyUrl?: string
976
- cookieMaxAgeSeconds?: number
977
- usesCookies?: boolean
978
- UsesNonCookieAccess?: boolean // deprecated
979
-
980
- // replaces UsesNonCookieAccess
981
- usesNonCookieAccess?: boolean
982
- }
983
-
984
- /**
985
- * DataSubjectType represents user defined data subject types with code as the unique identifier
986
- */
987
- export interface DataSubjectType {
988
- code: string
989
- name: string
990
-
991
- /**
992
- * requiresUserInput is true if additional information must be requested to describe the data subject relation
993
- */
994
- requiresUserInput: boolean
995
- }
996
-
997
- /**
998
- * Stack represents a grouping of purposes to be displayed in an experience
999
- */
1000
- export interface Stack {
1001
- /**
1002
- * name of the stack to be displayed
1003
- */
1004
- name: string
1005
-
1006
- /**
1007
- * list of purpose codes that are members of the stack
1008
- */
1009
- purposeCodes: string[]
1010
- }
1011
-
1012
- /**
1013
- * Configuration
1014
- */
1015
- export interface Configuration {
1016
- language?: string
1017
- organization: Organization
1018
- property?: Property
1019
- environments?: Environment[]
1020
- environment?: Environment
1021
- jurisdiction?: JurisdictionInfo
1022
- identities?: { [key: string]: Identity }
1023
- deployment?: Deployment
1024
- regulations?: string[]
1025
- rights?: Right[]
1026
- purposes?: Purpose[]
1027
- canonicalPurposes?: { [key: string]: CanonicalPurpose }
1028
- experiences?: Experience
1029
- services?: { [key: string]: string }
1030
- options?: { [key: string]: string }
1031
- privacyPolicy?: PolicyDocument
1032
- termsOfService?: PolicyDocument
1033
- theme?: Theme
1034
- scripts?: string[]
1035
- vendors?: Vendor[]
1036
-
1037
- // dataSubjectTypes is the list of data subject types relevant for this configuration
1038
- dataSubjectTypes?: DataSubjectType[]
1039
-
1040
- // stacks is the list of stacks to be displayed in an experience
1041
- stacks?: Stack[]
1042
- }
1043
-
1044
- declare global {
1045
- interface Window {
1046
- semaphore: {
1047
- push(args: any[]): void
1048
- }
1049
- }
1050
- }