UNPKG

2.87 kBTypeScriptView Raw
1export interface AttributeDescriptor {
2 attributeName: string;
3 containerName: string;
4}
5export interface AttributesContainer {
6 attributes: {
7 [key: string]: ProfileAttribute;
8 };
9 containerName: string;
10 revision: number;
11}
12export interface Avatar {
13 isAutoGenerated: boolean;
14 size: AvatarSize;
15 timeStamp: Date;
16 value: number[];
17}
18export declare enum AvatarSize {
19 Small = 0,
20 Medium = 1,
21 Large = 2
22}
23export interface CoreProfileAttribute extends ProfileAttributeBase<any> {
24}
25export interface Country {
26 code: string;
27 englishName: string;
28}
29export interface CreateProfileContext {
30 cIData: {
31 [key: string]: any;
32 };
33 contactWithOffers: boolean;
34 countryName: string;
35 displayName: string;
36 emailAddress: string;
37 hasAccount: boolean;
38 language: string;
39 phoneNumber: string;
40}
41export interface GeoRegion {
42 regionCode: string;
43}
44export interface Profile {
45 applicationContainer: AttributesContainer;
46 coreAttributes: {
47 [key: string]: CoreProfileAttribute;
48 };
49 coreRevision: number;
50 id: string;
51 revision: number;
52 timeStamp: Date;
53}
54export interface ProfileAttribute extends ProfileAttributeBase<string> {
55}
56export interface ProfileAttributeBase<T> {
57 descriptor: AttributeDescriptor;
58 revision: number;
59 timeStamp: Date;
60 value: T;
61}
62/**
63 * Country/region information
64 */
65export interface ProfileRegion {
66 /**
67 * The two-letter code defined in ISO 3166 for the country/region.
68 */
69 code: string;
70 /**
71 * Localized country/region name
72 */
73 name: string;
74}
75/**
76 * Container of country/region information
77 */
78export interface ProfileRegions {
79 /**
80 * List of country/region code with contact consent requirement type of notice
81 */
82 noticeContactConsentRequirementRegions: string[];
83 /**
84 * List of country/region code with contact consent requirement type of opt-out
85 */
86 optOutContactConsentRequirementRegions: string[];
87 /**
88 * List of country/regions
89 */
90 regions: ProfileRegion[];
91}
92export declare var TypeInfo: {
93 AttributeDescriptor: {
94 fields: any;
95 };
96 AttributesContainer: {
97 fields: any;
98 };
99 Avatar: {
100 fields: any;
101 };
102 AvatarSize: {
103 enumValues: {
104 small: number;
105 medium: number;
106 large: number;
107 };
108 };
109 CoreProfileAttribute: {
110 fields: any;
111 };
112 Country: {
113 fields: any;
114 };
115 CreateProfileContext: {
116 fields: any;
117 };
118 GeoRegion: {
119 fields: any;
120 };
121 Profile: {
122 fields: any;
123 };
124 ProfileAttribute: {
125 fields: any;
126 };
127 ProfileAttributeBase: {
128 fields: any;
129 };
130 ProfileRegion: {
131 fields: any;
132 };
133 ProfileRegions: {
134 fields: any;
135 };
136};