@ketch-sdk/ketch-types 0.1.1 → 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,1049 +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
- }
488
-
489
- /**
490
- * Environment
491
- */
492
- export interface Environment {
493
- code: string
494
- pattern?: string
495
- hash?: string
496
- }
497
-
498
- /**
499
- * Deployment
500
- */
501
- export interface Deployment {
502
- code: string
503
- version: number
504
- }
505
-
506
- /**
507
- * Cookie
508
- */
509
- export interface Cookie {
510
- name: string
511
- code: string
512
- host: string
513
- duration: CookieDuration
514
- provenance: CookieProvenance
515
- category: CookieCategory
516
- description: string
517
- serviceProvider?: string
518
- latest?: boolean
519
- version?: number
520
- }
521
-
522
- /**
523
- * PurposeCategory
524
- */
525
- export type PurposeCategory = {
526
- name: string
527
- description: string
528
- retentionPeriod: string
529
- externalTransfers: string
530
- }
531
-
532
- /**
533
- * Purpose
534
- */
535
- export interface Purpose {
536
- code: string
537
- name?: string
538
- description?: string
539
- legalBasisCode: string
540
- requiresOptIn?: boolean
541
- allowsOptOut?: boolean
542
- requiresDisplay?: boolean
543
- requiresPrivacyPolicy?: boolean
544
- cookies?: Cookie[]
545
- categories?: PurposeCategory[]
546
- tcfType?: string
547
- tcfID?: string
548
- canonicalPurposeCode?: string
549
- legalBasisName?: string
550
- legalBasisDescription?: string
551
-
552
- /**
553
- * the data subject types for which the purpose is relevant. If this list is empty then the purpose applies to all
554
- * data subject types
555
- */
556
- dataSubjectTypeCodes?: string[]
557
- }
558
-
559
- /**
560
- * CanonicalPurpose
561
- */
562
- export interface CanonicalPurpose {
563
- code: string
564
- name: string
565
- purposeCodes?: string[]
566
- }
567
-
568
- /**
569
- * IdentityLocation is the location on the page from which to retrieve identity information
570
- */
571
- export enum IdentityType {
572
- IDENTITY_TYPE_UNDEFINED = '',
573
- IDENTITY_TYPE_DATA_LAYER = 'dataLayer',
574
- IDENTITY_TYPE_WINDOW = 'window',
575
- IDENTITY_TYPE_COOKIE = 'cookie',
576
- IDENTITY_TYPE_MANAGED = 'managedCookie', // this is created if necessary and stored in a cookie with associated name
577
- IDENTITY_TYPE_LOCAL_STORAGE = 'localStorage',
578
- IDENTITY_TYPE_SESSION_STORAGE = 'sessionStorage',
579
- IDENTITY_TYPE_QUERY_STRING = 'queryString',
580
- }
581
-
582
- /**
583
- * IdentityFormat is the encoding of the string identity value
584
- */
585
- export enum IdentityFormat {
586
- IDENTITY_FORMAT_UNDEFINED = '',
587
- IDENTITY_FORMAT_STRING = 'string',
588
- IDENTITY_FORMAT_JSON = 'json',
589
- IDENTITY_FORMAT_JWT = 'jwt',
590
- IDENTITY_FORMAT_QUERY = 'query',
591
- IDENTITY_FORMAT_SEMICOLON = 'semicolon',
592
- }
593
-
594
- /**
595
- * Identity represents all the metadata for an identifier on the page
596
- */
597
- export interface Identity {
598
- /**
599
- * type is the location on the page from which to retrieve identity information
600
- */
601
- type: IdentityType
602
-
603
- /**
604
- * variable is the name to look up the identity value in the specified location
605
- */
606
- variable: string
607
-
608
- /**
609
- * format is the encoding of the value
610
- */
611
- format: IdentityFormat
612
-
613
- /**
614
- * key is the identifier to find the identity within the value if the format is IDENTITY_FORMAT_STRING then key
615
- * will be undefined
616
- */
617
- key?: string
618
-
619
- /**
620
- * priority of the identity for consent conflict resolution
621
- */
622
- priority?: number
623
- }
624
-
625
- /**
626
- * PolicyDocument
627
- */
628
- export interface PolicyDocument {
629
- code: string
630
- version: number
631
- url: string
632
- }
633
-
634
- /**
635
- * SwitchTextRenderLogic
636
- */
637
- export enum SwitchTextRenderLogic {
638
- /**
639
- * SWITCH_TEXT_RENDER_ALL always renders the switch text regardless of state
640
- */
641
- SWITCH_TEXT_RENDER_ALL = 1,
642
- /**
643
- * SWITCH_TEXT_RENDER_LEGAL_BASIS renders the switch text only if different from the legal basis default
644
- */
645
- SWITCH_TEXT_RENDER_LEGAL_BASIS = 2,
646
- /**
647
- * SWITCH_TEXT_RENDER_CHANGE renders the switch only if the user changes the state of the switch
648
- */
649
- SWITCH_TEXT_RENDER_CHANGE = 3,
650
- /**
651
- * SWITCH_TEXT_RENDER_NEVER never renders the switch text
652
- */
653
- SWITCH_TEXT_RENDER_NEVER = 4,
654
- }
655
-
656
- /**
657
- * Banner
658
- */
659
- export interface Banner {
660
- title?: string
661
- footerDescription: string
662
- buttonText: string
663
- primaryButtonAction?: ExperiencePrimaryButtonAction
664
- secondaryButtonText?: string
665
- secondaryButtonDestination?: ExperienceButtonDestination
666
-
667
- /**
668
- * showCloseIcon determines whether the x out icon appears in the experience. Default do not show
669
- */
670
- showCloseIcon?: boolean
671
-
672
- /**
673
- * additional extensions
674
- */
675
- extensions?: { [key: string]: string }
676
- }
677
-
678
- /**
679
- * Modal
680
- */
681
- export interface Modal {
682
- title: string
683
- bodyTitle?: string
684
- bodyDescription?: string
685
- buttonText: string
686
-
687
- /**
688
- * consentTitle is the heading that goes above the list of purposes this optionally overrides the standard title
689
- */
690
- consentTitle?: string
691
-
692
- /**
693
- * hideConsentTitle determines whether the consent title should be hidden. Default is to show
694
- */
695
- hideConsentTitle?: boolean
696
-
697
- /**
698
- * hideLegalBases determines whether the legal bases should be hidden. Default is to show
699
- */
700
- hideLegalBases?: boolean
701
-
702
- /**
703
- * switchOnText overrides the standard text for a consent switch in the on state
704
- */
705
- switchOnText?: string
706
-
707
- /**
708
- * switchOffText overrides the standard text for a consent switch in the off state
709
- */
710
- switchOffText?: string
711
-
712
- /**
713
- * switchTextRenderLogic determines the logic for showing the switch text
714
- */
715
- switchTextRenderLogic?: SwitchTextRenderLogic
716
-
717
- /**
718
- * showCloseIcon determines whether the x out icon appears in the experience. Default do not show
719
- */
720
- showCloseIcon?: boolean
721
-
722
- /**
723
- * additional extensions
724
- */
725
- extensions?: { [key: string]: string }
726
- }
727
-
728
- /**
729
- * JIT
730
- */
731
- export interface JIT {
732
- title?: string
733
- bodyDescription?: string
734
- acceptButtonText: string
735
- declineButtonText: string
736
- moreInfoText?: string
737
- moreInfoDestination?: ExperienceButtonDestination
738
-
739
- /**
740
- * showCloseIcon determines whether the x out icon appears in the experience. Default do not show
741
- */
742
- showCloseIcon?: boolean
743
-
744
- /**
745
- * additional extensions
746
- */
747
- extensions?: { [key: string]: string }
748
- }
749
-
750
- /**
751
- * RightsTab
752
- */
753
- export interface RightsTab {
754
- tabName: string
755
- bodyTitle?: string
756
- bodyDescription?: string
757
- buttonText: string
758
-
759
- /**
760
- * additional extensions
761
- */
762
- extensions?: { [key: string]: string }
763
- }
764
-
765
- /**
766
- * ConsentsTab
767
- */
768
- export interface ConsentsTab {
769
- tabName: string
770
- bodyTitle?: string
771
- bodyDescription?: string
772
- buttonText: string
773
-
774
- /**
775
- * consentTitle is the heading that goes above the list of purposes
776
- * this optionally overrides the standard title
777
- */
778
- consentTitle?: string
779
-
780
- /**
781
- * hideConsentTitle determines whether the consent title should be hidden. Default is to show
782
- */
783
- hideConsentTitle?: boolean
784
-
785
- /**
786
- * hideLegalBases determines whether the legal bases should be hidden. Default is to show
787
- */
788
- hideLegalBases?: boolean
789
-
790
- /**
791
- * switchOnText overrides the standard text for a consent switch in the on state
792
- */
793
- switchOnText?: string
794
-
795
- /**
796
- * switchOffText overrides the standard text for a consent switch in the off state
797
- */
798
- switchOffText?: string
799
-
800
- /**
801
- * switchTextRenderLogic determines the logic for showing the switch text
802
- */
803
- switchTextRenderLogic?: SwitchTextRenderLogic
804
-
805
- /**
806
- * additional extensions
807
- */
808
- extensions?: { [key: string]: string }
809
- }
810
-
811
- /**
812
- * OverviewTab
813
- */
814
- export interface OverviewTab {
815
- tabName: string
816
- bodyTitle?: string
817
- bodyDescription: string
818
-
819
- /**
820
- * additional extensions
821
- * */
822
- extensions?: { [key: string]: string }
823
- }
824
-
825
- /**
826
- * ConsentExperience
827
- */
828
- export interface ConsentExperience {
829
- code: string
830
- version: number
831
- banner: Banner
832
- modal: Modal
833
- jit?: JIT
834
- experienceDefault: ExperienceDefault
835
-
836
- /**
837
- * additional extensions
838
- */
839
- extensions?: { [key: string]: string }
840
- }
841
-
842
- /**
843
- * PreferenceExperience
844
- */
845
- export interface PreferenceExperience {
846
- code: string
847
- version: number
848
- title: string
849
- rights?: RightsTab
850
- consents?: ConsentsTab
851
- overview: OverviewTab
852
-
853
- /**
854
- * additional extensions
855
- */
856
- extensions?: { [key: string]: string }
857
- }
858
-
859
- /**
860
- * Right
861
- */
862
- export interface Right {
863
- code: string
864
- name: string
865
- description: string
866
-
867
- /**
868
- * the data subject types for which the right is relevant. If this list is empty then the right applies to all
869
- * data subject types
870
- */
871
- dataSubjectTypeCodes?: string[]
872
- }
873
-
874
- /**
875
- * Experience
876
- */
877
- export interface Experience {
878
- consent?: ConsentExperience
879
- preference?: PreferenceExperience
880
- }
881
-
882
- /**
883
- * BannerPosition
884
- */
885
- export enum BannerPosition {
886
- BOTTOM = 1,
887
- TOP = 2,
888
- BOTTOM_LEFT = 3,
889
- BOTTOM_RIGHT = 4,
890
- }
891
-
892
- /**
893
- * ModalPosition
894
- */
895
- export enum ModalPosition {
896
- CENTER = 1,
897
- LEFT_FULL_HEIGHT = 2,
898
- RIGHT_FULL_HEIGHT = 3,
899
- }
900
-
901
- /**
902
- * Theme
903
- */
904
- export interface Theme {
905
- watermark?: boolean
906
- buttonBorderRadius: number
907
-
908
- bannerBackgroundColor: string
909
- bannerContentColor?: string
910
- bannerButtonColor: string
911
- bannerSecondaryButtonColor?: string
912
- bannerPosition?: BannerPosition
913
-
914
- modalHeaderBackgroundColor: string
915
- modalHeaderContentColor?: string
916
- modalContentColor: string
917
- modalButtonColor: string
918
- modalPosition?: ModalPosition
919
- /**
920
- * modalSwitchOnColor is the color of the consent switch in the on state for the modal this overrides standard theme
921
- * colors
922
- */
923
- modalSwitchOnColor?: string
924
-
925
- /**
926
- * modalSwitchOffColor is the color of the consent switch in the off state for the modal this overrides standard
927
- * theme colors
928
- */
929
- modalSwitchOffColor?: string
930
-
931
- formHeaderBackgroundColor: string
932
- formHeaderContentColor?: string
933
- formContentColor: string
934
- formButtonColor: string
935
- /**
936
- * formSwitchOnColor is the color of the consent switch in the on state for the form this overrides standard theme
937
- * colors
938
- */
939
- formSwitchOnColor?: string
940
- /**
941
- * formSwitchOffColor is the color of the consent switch in the off state for the form this overrides standard theme
942
- * colors
943
- */
944
- formSwitchOffColor?: string
945
-
946
- /**
947
- * qrBackgroundColor is the override for the QR code background color
948
- */
949
- qrBackgroundColor?: string
950
- /**
951
- * qrForegroundColor is the override for the QR code foreground color
952
- */
953
- qrForegroundColor?: string
954
- }
955
-
956
- /**
957
- * Vendor purpose
958
- */
959
- export interface VendorPurpose {
960
- name: string
961
- legalBasis?: string // legalBasisName
962
- }
963
-
964
- /**
965
- * Vendor definition
966
- */
967
- export interface Vendor {
968
- id: string
969
- name: string
970
- purposes?: VendorPurpose[]
971
- specialPurposes?: VendorPurpose[]
972
- features?: VendorPurpose[]
973
- specialFeatures?: VendorPurpose[]
974
- policyUrl?: string
975
- cookieMaxAgeSeconds?: number
976
- usesCookies?: boolean
977
- UsesNonCookieAccess?: boolean // deprecated
978
-
979
- // replaces UsesNonCookieAccess
980
- usesNonCookieAccess?: boolean
981
- }
982
-
983
- /**
984
- * DataSubjectType represents user defined data subject types with code as the unique identifier
985
- */
986
- export interface DataSubjectType {
987
- code: string
988
- name: string
989
-
990
- /**
991
- * requiresUserInput is true if additional information must be requested to describe the data subject relation
992
- */
993
- requiresUserInput: boolean
994
- }
995
-
996
- /**
997
- * Stack represents a grouping of purposes to be displayed in an experience
998
- */
999
- export interface Stack {
1000
- /**
1001
- * name of the stack to be displayed
1002
- */
1003
- name: string
1004
-
1005
- /**
1006
- * list of purpose codes that are members of the stack
1007
- */
1008
- purposeCodes: string[]
1009
- }
1010
-
1011
- /**
1012
- * Configuration
1013
- */
1014
- export interface Configuration {
1015
- language?: string
1016
- organization: Organization
1017
- property?: Property
1018
- environments?: Environment[]
1019
- environment?: Environment
1020
- jurisdiction?: JurisdictionInfo
1021
- identities?: { [key: string]: Identity }
1022
- deployment?: Deployment
1023
- regulations?: string[]
1024
- rights?: Right[]
1025
- purposes?: Purpose[]
1026
- canonicalPurposes?: { [key: string]: CanonicalPurpose }
1027
- experiences?: Experience
1028
- services?: { [key: string]: string }
1029
- options?: { [key: string]: string }
1030
- privacyPolicy?: PolicyDocument
1031
- termsOfService?: PolicyDocument
1032
- theme?: Theme
1033
- scripts?: string[]
1034
- vendors?: Vendor[]
1035
-
1036
- // dataSubjectTypes is the list of data subject types relevant for this configuration
1037
- dataSubjectTypes?: DataSubjectType[]
1038
-
1039
- // stacks is the list of stacks to be displayed in an experience
1040
- stacks?: Stack[]
1041
- }
1042
-
1043
- declare global {
1044
- interface Window {
1045
- semaphore: {
1046
- push(args: any[]): void
1047
- }
1048
- }
1049
- }