forked from adobe/xdm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoffer-representation.schema.json
More file actions
241 lines (241 loc) · 14.4 KB
/
offer-representation.schema.json
File metadata and controls
241 lines (241 loc) · 14.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
{
"meta:license": [
"Copyright 2018 Adobe Systems Incorporated. All rights reserved.",
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at https://creativecommons.org/licenses/by/4.0/"
],
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "https://ns.adobe.com/experience/offer-management/offer-representation",
"meta:abstract": false,
"meta:extensible": true,
"type": "object",
"title": "Representation (deprecated)",
"description": "Offer representation (deprecated).",
"definitions": {
"offer-representation": {
"properties": {
"xdm:components": {
"type": "array",
"description": "The content components of the offer representation, including all their language variants. Specific components are found by 'dx:format', 'dc:subject' and 'dc:language' or a combination thereof. This metadata is used to locate or represent the content that is associated with an offer and integrate it according to the placement contract.",
"items": {
"$ref": "#/definitions/content-component"
},
"meta:descriptionId": "offer-representation##xdm:components##description##30531"
},
"xdm:channel": {
"type": "string",
"format": "uri",
"title": "Channel",
"description": "The channel constraint is used to convey not only where the offer will be used but determine the content editor or validator that is used for the offer's representation. The value is a valid Channel URI. See 'https://ns.adobe.com/xdm/channels/channel'",
"meta:titleId": "offer-representation##xdm:channel##title##88891",
"meta:descriptionId": "offer-representation##xdm:channel##description##78821"
},
"xdm:placement": {
"type": "string",
"format": "uri",
"title": "Placement",
"description": "Placement to comply with. The value is the URI (@id) of the offer placement that is referenced. See schema https://ns.adobe.com/experience/offer-management/offer-placement",
"meta:titleId": "offer-representation##xdm:placement##title##64031",
"meta:descriptionId": "offer-representation##xdm:placement##description##57641"
}
}
},
"content-component-type": {
"type": "string",
"format": "uri",
"title": "Content Component Type",
"description": "Content component type: imagelink, html or text.",
"enum": [
"https://ns.adobe.com/experience/offer-management/content-component-text",
"https://ns.adobe.com/experience/offer-management/content-component-html",
"https://ns.adobe.com/experience/offer-management/content-component-imagelink"
],
"meta:enum": {
"https://ns.adobe.com/experience/offer-management/content-component-text": "Text component",
"https://ns.adobe.com/experience/offer-management/content-component-html": "HTML component",
"https://ns.adobe.com/experience/offer-management/content-component-imagelink": "Image and click link component"
},
"meta:titleId": "offer-representation##content-component-type##title##32481",
"meta:descriptionId": "offer-representation##content-component-type##description##40511"
},
"content-component": {
"allOf": [
{
"type": "object",
"description": "Content components are the fragments associated with the a particular offer representation. Those fragments are used to compose the end-user experience. The content resource has optional HAL links to the file resource.",
"meta:extends": [
"https://ns.adobe.com/xdm/external/hal/resource#/definitions/hal"
],
"properties": {
"@type": {
"$ref": "#/definitions/content-component-type",
"description": "Type of the component. Acts as processing hint for the client. When the experience is assembled the composer will look for the component(s) that have a specific type.",
"meta:descriptionId": "offer-representation##@type##description##34811"
},
"dc:format": {
"meta:usereditable": false,
"type": "string",
"title": "Format",
"pattern": "\\w+\\/[-.\\w]+(?:\\+[-.\\w]+)?",
"examples": [
"application/vnd.adobe.photoshop"
],
"description": "The physical or digital manifestation of the resource. Typically, Format should include the media-type of the resource. Format may be used to determine the software, hardware or other equipment needed to display or operate the resource. Recommended best practice is to select a value from a controlled vocabulary (for example, the list of [Internet Media Types](http://www.iana.org/ assignments/media-types/) defining computer media formats).",
"meta:titleId": "offer-representation##dc:format##title##90001",
"meta:descriptionId": "offer-representation##dc:format##description##40111"
},
"dc:language": {
"meta:usereditable": false,
"type": "array",
"title": "Language",
"items": {
"type": "string",
"pattern": "^(((([A-Za-z]{2,3}(-([A-Za-z]{3}(-[A-Za-z]{3}){0,2}))?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-([A-Za-z]{4}))?(-([A-Za-z]{2}|[0-9]{3}))?(-([A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*(-([0-9A-WY-Za-wy-z](-[A-Za-z0-9]{2,8})+))*(-(x(-[A-Za-z0-9]{1,8})+))?)|(x(-[A-Za-z0-9]{1,8})+)|((en-GB-oed|i-ami|i-bnn|i-default|i-enochian|i-hak|i-klingon|i-lux|i-mingo|i-navajo|i-pwn|i-tao|i-tay|i-tsu|sgn-BE-FR|sgn-BE-NL|sgn-CH-DE)|(art-lojban|cel-gaulish|no-bok|no-nyn|zh-guoyu|zh-hakka|zh-min|zh-min-nan|zh-xiang)))$"
},
"description": "The language or languages of the resource.\nLanguages are specified in language code as defined in [IETF RFC 3066](https://www.ietf.org/rfc/rfc3066.txt), which is part of BCP 47, which is used elsewhere in XDM.",
"examples": [
"\n",
"pt-BR",
"es-ES"
],
"meta:titleId": "offer-representation##dc:language##title##45611",
"meta:descriptionId": "offer-representation##dc:language##description##53491"
},
"repo:name": {
"type": "string",
"description": "Some hint about where to locate the repository that stores the external asset by the \"repo:id\".",
"meta:descriptionId": "offer-representation##repo:name##description##90641"
},
"repo:id": {
"type": "string",
"meta:immutable": true,
"meta:usereditable": false,
"description": "An optional unique identifier to reference the asset in a content repository. When Platform APIs are used to retrieve the representation the client can expect an additional property \"repo:resolveUrl\" to retrieve the asset.",
"examples": [
"urn:aaid:sc:US:6dc33479-13ca-4b19-b25d-c805eff8a69e"
],
"meta:descriptionId": "offer-representation##repo:id##description##50361"
},
"repo:resolveURL": {
"type": "string",
"format": "uri",
"meta:immutable": true,
"meta:usereditable": false,
"description": "An optional unique resource locator to read the asset in a content repository. This will make it easier to obtain the asset without the client understanding where the asset is manages and what APIs to call. This is similar to a HAL link but the semantic is simpler and more purposeful.",
"examples": [
"https://plaftform.adobe.io/resolveByPath?path="/mycorp/content/projectx/fragment/prod/herobanners/banner14.html3""
],
"meta:descriptionId": "offer-representation##repo:resolveURL##description##8911"
}
},
"meta:descriptionId": "offer-representation##0##description##40091"
},
{
"required": [
"@type",
"dc:format"
]
}
]
}
},
"allOf": [
{
"$ref": "#/definitions/offer-representation"
},
{
"required": [
"xdm:components",
"xdm:channel",
"xdm:placement"
]
}
],
"meta:status": "deprecated",
"meta:titleId": "offer-representation##title##90651",
"meta:descriptionId": "offer-representation##description##96271",
"examples": [
{
"xdm:components": [
{
"@type": "https://ns.adobe.com/experience/offer-management/content-component-text",
"dc:format": "text/template",
"dc:language": [
"en",
"en-AU",
"en-CA",
"en-GB",
"en-IN",
"en-IE",
"en-MT",
"en-NZ",
"en-PH",
"en-SG",
"en-ZA"
],
"repo:name": "expiration_message_en",
"repo:id": "urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805efef0c9e",
"repo:resolveURL": "https://platform-cs-stage.adobe.io/content/directory/resolve?asset_id="urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805efef0c9e"&resource="api:metadata/application"&name=expiration_message_en",
"xdm:copyline": "Dear Madam {{profile.person.lastName}}, the offer expires 12/6/2018"
},
{
"@type": "https://ns.adobe.com/experience/offer-management/content-component-text",
"dc:format": "text/template",
"dc:language": [
"en-US"
],
"repo:name": "expiration_message_en-US",
"repo:id": "urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805efef0c9e",
"repo:resolveURL": "https://platform-cs-stage.adobe.io/content/directory/resolve?asset_id="urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805efef0c9e"&resource="api:metadata/application"&name="expiration_message_en-US"",
"xdm:copyline": "Dear Madam {{profile.person.lastName}}, the offer expires 6/12/2018"
},
{
"@type": "https://ns.adobe.com/experience/offer-management/content-component-text",
"dc:format": "text/template",
"dc:language": [
"es"
],
"repo:name": "expiration_message_es",
"repo:resolveURL": "https://platform-cs-stage.adobe.io/content/directory/resolve?asset_id="urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805efef0c9e"&resource="api:metadata/application"&name="expiration_message_es"",
"xdm:copyline": "Estimada señora {{profile.person.lastName}}: La oferta vence el 12/6/2018"
}
],
"xdm:placement": "uri:xcore:placement-0001",
"xdm:channel": "https://ns.adobe.com/xdm/channels/email"
},
{
"xdm:components": [
{
"@type": "https://ns.adobe.com/experience/offer-management/content-component-imagelink",
"dc:format": "image/png",
"dc:language": [
"en"
],
"repo:name": "holidayOffer.2018.png",
"repo:id": "urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805eff8a69e",
"repo:resolveURL": "https://platform-cs-stage.adobe.io/content/directory/resolve?asset_id="urn:aaid:sc:VA7:6dc33479-13ca-4b19-b25d-c805eff8a69e"",
"xdm:linkURL": "https://www.mycompany.com/product?trackId=12345"
}
],
"xdm:placement": "uri:xcore:placement-0001",
"xdm:channel": "https://ns.adobe.com/xdm/channels/email"
},
{
"xdm:components": [
{
"@type": "https://ns.adobe.com/experience/offer-management/content-component-html",
"dc:format": "text/html",
"dc:language": [
"de"
],
"repo:name": "widget_quickbooking.html",
"repo:id": "urn:aaid:sc:NLD2:0567c1d6-4fdc-4541-b736-f62934fcb5fc",
"repo:resolveURL": "https://platform-cs-stage.adobe.io/content/directory/resolve?asset_id="urn:aaid:sc:NLD2:0567c1d6-4fdc-4541-b736-f62934fcb5fc""
}
],
"xdm:placement": "uri:xcore:placement-0001",
"xdm:channel": "https://ns.adobe.com/xdm/channels/email"
}
]
}