@walkeros/cli 4.8.1 → 4.8.3-next-1793115089237
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/CHANGELOG.md +115 -3
- package/README.md +2 -2
- package/dist/cli.js +4149 -4149
- package/dist/dev.d.ts +51 -3
- package/dist/dev.js +186 -0
- package/dist/dev.js.map +1 -1
- package/dist/examples/README.md +12 -1
- package/dist/examples/contracts/app.json +261 -0
- package/dist/examples/contracts/base.json +708 -0
- package/dist/examples/contracts/ecommerce.json +963 -0
- package/dist/examples/contracts/leadgen.json +240 -0
- package/dist/examples/contracts/publisher.json +372 -0
- package/dist/examples/contracts/saas.json +229 -0
- package/dist/examples/contracts/travel.json +234 -0
- package/dist/examples/customers/README.md +4 -1
- package/dist/examples/event.json +1 -1
- package/dist/examples/flow-complete.json +107 -130
- package/dist/examples/flow-complete.md +12 -10
- package/dist/examples/flow-order-complete.json +1 -1
- package/dist/examples/flow.json +1 -1
- package/dist/examples/index.d.ts +34 -4
- package/dist/examples/index.js +128 -139
- package/dist/examples/index.js.map +1 -1
- package/dist/examples/shared/README.md +4 -0
- package/dist/index.d.ts +63 -223
- package/dist/index.js +572 -992
- package/dist/index.js.map +1 -1
- package/dist/validate.d.ts +1 -1
- package/dist/validate.js +337 -204
- package/dist/validate.js.map +1 -1
- package/examples/README.md +12 -1
- package/examples/contracts/app.json +261 -0
- package/examples/contracts/base.json +708 -0
- package/examples/contracts/ecommerce.json +963 -0
- package/examples/contracts/leadgen.json +240 -0
- package/examples/contracts/publisher.json +372 -0
- package/examples/contracts/saas.json +229 -0
- package/examples/contracts/travel.json +234 -0
- package/examples/customers/README.md +4 -1
- package/examples/event.json +1 -1
- package/examples/flow-complete.json +107 -130
- package/examples/flow-complete.md +12 -10
- package/examples/flow-order-complete.json +1 -1
- package/examples/flow.json +1 -1
- package/examples/shared/README.md +4 -0
- package/package.json +30 -30
- package/src/telemetry/flow.json +42 -34
- package/dist/examples/test.html +0 -43
- package/dist/examples/web-serve.js +0 -25503
- package/examples/test.html +0 -43
- package/examples/web-serve.js +0 -25503
|
@@ -0,0 +1,963 @@
|
|
|
1
|
+
{
|
|
2
|
+
"ecommerce": {
|
|
3
|
+
"description": "Events of an online shop, from the first product seen to the refund.",
|
|
4
|
+
"extend": "default",
|
|
5
|
+
"schema": {
|
|
6
|
+
"description": "What every shop event adds.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"context": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"shopping": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"description": "The stage of the shopping journey, such as discover, detail, intent, cart, checkout or complete.",
|
|
15
|
+
"prefixItems": [
|
|
16
|
+
{
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The stage."
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"type": "number",
|
|
22
|
+
"description": "Its order."
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"examples": [["detail", 0]]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"events": {
|
|
32
|
+
"product": {
|
|
33
|
+
"view": {
|
|
34
|
+
"title": "Product view",
|
|
35
|
+
"description": "The detail page of a product was shown. Every shop needs it.",
|
|
36
|
+
"examples": [
|
|
37
|
+
{
|
|
38
|
+
"name": "product view",
|
|
39
|
+
"data": {
|
|
40
|
+
"id": "ers",
|
|
41
|
+
"name": "Everyday Ruck Snack",
|
|
42
|
+
"color": "black",
|
|
43
|
+
"size": "l",
|
|
44
|
+
"price": 420,
|
|
45
|
+
"currency": "EUR"
|
|
46
|
+
},
|
|
47
|
+
"context": {
|
|
48
|
+
"shopping": ["detail", 0]
|
|
49
|
+
},
|
|
50
|
+
"globals": {
|
|
51
|
+
"pagegroup": "shop"
|
|
52
|
+
},
|
|
53
|
+
"trigger": "load"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"required": ["data"],
|
|
57
|
+
"properties": {
|
|
58
|
+
"data": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"description": "The product.",
|
|
61
|
+
"required": ["id", "price", "currency"],
|
|
62
|
+
"properties": {
|
|
63
|
+
"id": {
|
|
64
|
+
"type": ["string", "number"],
|
|
65
|
+
"description": "The product id, such as the article number.",
|
|
66
|
+
"examples": ["ers"]
|
|
67
|
+
},
|
|
68
|
+
"name": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"description": "The name of the product.",
|
|
71
|
+
"examples": ["Everyday Ruck Snack"]
|
|
72
|
+
},
|
|
73
|
+
"category": {
|
|
74
|
+
"type": "string",
|
|
75
|
+
"description": "The main category of the product.",
|
|
76
|
+
"examples": ["Apparel"]
|
|
77
|
+
},
|
|
78
|
+
"brand": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "The brand of the product."
|
|
81
|
+
},
|
|
82
|
+
"variant": {
|
|
83
|
+
"type": ["string", "number"],
|
|
84
|
+
"description": "The variant, such as a color.",
|
|
85
|
+
"examples": ["green"]
|
|
86
|
+
},
|
|
87
|
+
"price": {
|
|
88
|
+
"type": "number",
|
|
89
|
+
"description": "The unit price the buyer sees, after any product discount.",
|
|
90
|
+
"examples": [420]
|
|
91
|
+
},
|
|
92
|
+
"currency": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"description": "The currency of price, as a three-letter code.",
|
|
95
|
+
"examples": ["EUR"]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"add": {
|
|
102
|
+
"title": "Product add",
|
|
103
|
+
"description": "A visitor added a product to the cart. Every shop needs it.",
|
|
104
|
+
"examples": [
|
|
105
|
+
{
|
|
106
|
+
"name": "product add",
|
|
107
|
+
"data": {
|
|
108
|
+
"id": "ers",
|
|
109
|
+
"name": "Everyday Ruck Snack",
|
|
110
|
+
"color": "black",
|
|
111
|
+
"size": "l",
|
|
112
|
+
"price": 420,
|
|
113
|
+
"currency": "EUR",
|
|
114
|
+
"quantity": 1
|
|
115
|
+
},
|
|
116
|
+
"context": {
|
|
117
|
+
"shopping": ["intent", 0]
|
|
118
|
+
},
|
|
119
|
+
"globals": {
|
|
120
|
+
"pagegroup": "shop"
|
|
121
|
+
},
|
|
122
|
+
"trigger": "click"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"required": ["data"],
|
|
126
|
+
"properties": {
|
|
127
|
+
"data": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"description": "The product.",
|
|
130
|
+
"required": ["id", "price", "quantity", "currency"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"id": {
|
|
133
|
+
"type": ["string", "number"],
|
|
134
|
+
"description": "The product id, such as the article number.",
|
|
135
|
+
"examples": ["ers"]
|
|
136
|
+
},
|
|
137
|
+
"name": {
|
|
138
|
+
"type": "string",
|
|
139
|
+
"description": "The name of the product.",
|
|
140
|
+
"examples": ["Everyday Ruck Snack"]
|
|
141
|
+
},
|
|
142
|
+
"category": {
|
|
143
|
+
"type": "string",
|
|
144
|
+
"description": "The main category of the product.",
|
|
145
|
+
"examples": ["Apparel"]
|
|
146
|
+
},
|
|
147
|
+
"variant": {
|
|
148
|
+
"type": ["string", "number"],
|
|
149
|
+
"description": "The variant, such as a color.",
|
|
150
|
+
"examples": ["green"]
|
|
151
|
+
},
|
|
152
|
+
"price": {
|
|
153
|
+
"type": "number",
|
|
154
|
+
"description": "The unit price the buyer sees, after any product discount.",
|
|
155
|
+
"examples": [420]
|
|
156
|
+
},
|
|
157
|
+
"quantity": {
|
|
158
|
+
"type": "number",
|
|
159
|
+
"description": "How many pieces were added.",
|
|
160
|
+
"examples": [1]
|
|
161
|
+
},
|
|
162
|
+
"currency": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"description": "The currency of price and value, as a three-letter code.",
|
|
165
|
+
"examples": ["EUR"]
|
|
166
|
+
},
|
|
167
|
+
"value": {
|
|
168
|
+
"type": "number",
|
|
169
|
+
"description": "The price times the quantity."
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"visible": {
|
|
176
|
+
"title": "Product visible",
|
|
177
|
+
"description": "A product came into view in a list, such as search results or related products. One event per product. Recommended for most shops.",
|
|
178
|
+
"examples": [
|
|
179
|
+
{
|
|
180
|
+
"name": "product visible",
|
|
181
|
+
"data": {
|
|
182
|
+
"id": "ers",
|
|
183
|
+
"name": "Everyday Ruck Snack",
|
|
184
|
+
"color": "black",
|
|
185
|
+
"size": "l",
|
|
186
|
+
"price": 420,
|
|
187
|
+
"currency": "EUR",
|
|
188
|
+
"position": 3,
|
|
189
|
+
"promo": true,
|
|
190
|
+
"list": "Related products"
|
|
191
|
+
},
|
|
192
|
+
"context": {
|
|
193
|
+
"shopping": ["discover", 0]
|
|
194
|
+
},
|
|
195
|
+
"globals": {
|
|
196
|
+
"pagegroup": "shop"
|
|
197
|
+
},
|
|
198
|
+
"trigger": "load"
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
"required": ["data"],
|
|
202
|
+
"properties": {
|
|
203
|
+
"data": {
|
|
204
|
+
"type": "object",
|
|
205
|
+
"description": "The product in the list.",
|
|
206
|
+
"required": ["id"],
|
|
207
|
+
"properties": {
|
|
208
|
+
"id": {
|
|
209
|
+
"type": ["string", "number"],
|
|
210
|
+
"description": "The product id, such as the article number.",
|
|
211
|
+
"examples": ["ers"]
|
|
212
|
+
},
|
|
213
|
+
"name": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "The name of the product.",
|
|
216
|
+
"examples": ["Everyday Ruck Snack"]
|
|
217
|
+
},
|
|
218
|
+
"price": {
|
|
219
|
+
"type": "number",
|
|
220
|
+
"description": "The unit price the buyer sees, after any product discount.",
|
|
221
|
+
"examples": [420]
|
|
222
|
+
},
|
|
223
|
+
"position": {
|
|
224
|
+
"type": "number",
|
|
225
|
+
"description": "The place of the product in its list, counted from 1.",
|
|
226
|
+
"examples": [3]
|
|
227
|
+
},
|
|
228
|
+
"list": {
|
|
229
|
+
"type": "string",
|
|
230
|
+
"description": "The name of the list the product is shown in.",
|
|
231
|
+
"examples": ["Related products"]
|
|
232
|
+
},
|
|
233
|
+
"currency": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"description": "The currency of price, as a three-letter code.",
|
|
236
|
+
"examples": ["EUR"]
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"click": {
|
|
243
|
+
"title": "Product click",
|
|
244
|
+
"description": "A visitor clicked a product in a list. Recommended for most shops.",
|
|
245
|
+
"examples": [
|
|
246
|
+
{
|
|
247
|
+
"name": "product click",
|
|
248
|
+
"data": {
|
|
249
|
+
"id": "ers",
|
|
250
|
+
"name": "Everyday Ruck Snack",
|
|
251
|
+
"color": "black",
|
|
252
|
+
"size": "l",
|
|
253
|
+
"price": 420,
|
|
254
|
+
"currency": "EUR",
|
|
255
|
+
"position": 3,
|
|
256
|
+
"list": "Related products"
|
|
257
|
+
},
|
|
258
|
+
"context": {
|
|
259
|
+
"shopping": ["discover", 0]
|
|
260
|
+
},
|
|
261
|
+
"globals": {
|
|
262
|
+
"pagegroup": "shop"
|
|
263
|
+
},
|
|
264
|
+
"trigger": "click"
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"required": ["data"],
|
|
268
|
+
"properties": {
|
|
269
|
+
"data": {
|
|
270
|
+
"type": "object",
|
|
271
|
+
"description": "The product in the list.",
|
|
272
|
+
"required": ["id"],
|
|
273
|
+
"properties": {
|
|
274
|
+
"id": {
|
|
275
|
+
"type": ["string", "number"],
|
|
276
|
+
"description": "The product id, such as the article number.",
|
|
277
|
+
"examples": ["ers"]
|
|
278
|
+
},
|
|
279
|
+
"name": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"description": "The name of the product.",
|
|
282
|
+
"examples": ["Everyday Ruck Snack"]
|
|
283
|
+
},
|
|
284
|
+
"price": {
|
|
285
|
+
"type": "number",
|
|
286
|
+
"description": "The unit price the buyer sees, after any product discount.",
|
|
287
|
+
"examples": [420]
|
|
288
|
+
},
|
|
289
|
+
"position": {
|
|
290
|
+
"type": "number",
|
|
291
|
+
"description": "The place of the product in its list, counted from 1.",
|
|
292
|
+
"examples": [3]
|
|
293
|
+
},
|
|
294
|
+
"list": {
|
|
295
|
+
"type": "string",
|
|
296
|
+
"description": "The name of the list the product is shown in.",
|
|
297
|
+
"examples": ["Related products"]
|
|
298
|
+
},
|
|
299
|
+
"currency": {
|
|
300
|
+
"type": "string",
|
|
301
|
+
"description": "The currency of price, as a three-letter code.",
|
|
302
|
+
"examples": ["EUR"]
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
"remove": {
|
|
309
|
+
"title": "Product remove",
|
|
310
|
+
"description": "A visitor removed a product from the cart or lowered its quantity. Recommended for most shops.",
|
|
311
|
+
"examples": [
|
|
312
|
+
{
|
|
313
|
+
"name": "product remove",
|
|
314
|
+
"data": {
|
|
315
|
+
"id": "ers",
|
|
316
|
+
"name": "Everyday Ruck Snack",
|
|
317
|
+
"color": "black",
|
|
318
|
+
"size": "l",
|
|
319
|
+
"price": 420,
|
|
320
|
+
"currency": "EUR",
|
|
321
|
+
"quantity": 1
|
|
322
|
+
},
|
|
323
|
+
"context": {
|
|
324
|
+
"shopping": ["cart", 0]
|
|
325
|
+
},
|
|
326
|
+
"globals": {
|
|
327
|
+
"pagegroup": "shop"
|
|
328
|
+
},
|
|
329
|
+
"trigger": "click"
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"required": ["data"],
|
|
333
|
+
"properties": {
|
|
334
|
+
"data": {
|
|
335
|
+
"type": "object",
|
|
336
|
+
"description": "The product.",
|
|
337
|
+
"required": ["id", "quantity"],
|
|
338
|
+
"properties": {
|
|
339
|
+
"id": {
|
|
340
|
+
"type": ["string", "number"],
|
|
341
|
+
"description": "The product id, such as the article number.",
|
|
342
|
+
"examples": ["ers"]
|
|
343
|
+
},
|
|
344
|
+
"price": {
|
|
345
|
+
"type": "number",
|
|
346
|
+
"description": "The unit price the buyer sees, after any product discount.",
|
|
347
|
+
"examples": [420]
|
|
348
|
+
},
|
|
349
|
+
"quantity": {
|
|
350
|
+
"type": "number",
|
|
351
|
+
"description": "How many pieces were removed.",
|
|
352
|
+
"examples": [1]
|
|
353
|
+
},
|
|
354
|
+
"currency": {
|
|
355
|
+
"type": "string",
|
|
356
|
+
"description": "The currency of price and value, as a three-letter code.",
|
|
357
|
+
"examples": ["EUR"]
|
|
358
|
+
},
|
|
359
|
+
"value": {
|
|
360
|
+
"type": "number",
|
|
361
|
+
"description": "The price times the quantity removed."
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"cart": {
|
|
369
|
+
"view": {
|
|
370
|
+
"title": "Cart view",
|
|
371
|
+
"description": "The cart was shown. Recommended for most shops.",
|
|
372
|
+
"examples": [
|
|
373
|
+
{
|
|
374
|
+
"name": "cart view",
|
|
375
|
+
"data": {
|
|
376
|
+
"currency": "EUR",
|
|
377
|
+
"value": 840
|
|
378
|
+
},
|
|
379
|
+
"context": {
|
|
380
|
+
"shopping": ["cart", 0]
|
|
381
|
+
},
|
|
382
|
+
"globals": {
|
|
383
|
+
"pagegroup": "shop"
|
|
384
|
+
},
|
|
385
|
+
"nested": [
|
|
386
|
+
{
|
|
387
|
+
"entity": "product",
|
|
388
|
+
"data": {
|
|
389
|
+
"id": "ers",
|
|
390
|
+
"name": "Everyday Ruck Snack",
|
|
391
|
+
"color": "black",
|
|
392
|
+
"size": "l",
|
|
393
|
+
"price": 420,
|
|
394
|
+
"quantity": 2
|
|
395
|
+
},
|
|
396
|
+
"context": {
|
|
397
|
+
"shopping": ["cart", 0]
|
|
398
|
+
},
|
|
399
|
+
"nested": []
|
|
400
|
+
}
|
|
401
|
+
],
|
|
402
|
+
"trigger": "load"
|
|
403
|
+
}
|
|
404
|
+
],
|
|
405
|
+
"required": ["data", "nested"],
|
|
406
|
+
"properties": {
|
|
407
|
+
"data": {
|
|
408
|
+
"type": "object",
|
|
409
|
+
"description": "The cart.",
|
|
410
|
+
"required": ["value", "currency"],
|
|
411
|
+
"properties": {
|
|
412
|
+
"id": {
|
|
413
|
+
"type": ["string", "number"],
|
|
414
|
+
"description": "The id of the cart."
|
|
415
|
+
},
|
|
416
|
+
"value": {
|
|
417
|
+
"type": "number",
|
|
418
|
+
"description": "The merchandise value: the price times the quantity of every product, minus any order discount. It holds no shipping, and it holds tax only when the prices include tax.",
|
|
419
|
+
"examples": [840]
|
|
420
|
+
},
|
|
421
|
+
"currency": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"description": "The currency of value and of every price, as a three-letter code.",
|
|
424
|
+
"examples": ["EUR"]
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
"nested": {
|
|
429
|
+
"type": "array",
|
|
430
|
+
"description": "The products in the cart, at least one.",
|
|
431
|
+
"contains": {
|
|
432
|
+
"type": "object",
|
|
433
|
+
"required": ["entity", "data"],
|
|
434
|
+
"properties": {
|
|
435
|
+
"entity": {
|
|
436
|
+
"type": "string",
|
|
437
|
+
"enum": ["product"],
|
|
438
|
+
"description": "The entity name, product.",
|
|
439
|
+
"examples": ["product"]
|
|
440
|
+
},
|
|
441
|
+
"data": {
|
|
442
|
+
"type": "object",
|
|
443
|
+
"description": "The product.",
|
|
444
|
+
"required": ["id"],
|
|
445
|
+
"properties": {
|
|
446
|
+
"id": {
|
|
447
|
+
"type": ["string", "number"],
|
|
448
|
+
"description": "The product id.",
|
|
449
|
+
"examples": ["ers"]
|
|
450
|
+
},
|
|
451
|
+
"name": {
|
|
452
|
+
"type": "string",
|
|
453
|
+
"description": "The name of the product.",
|
|
454
|
+
"examples": ["Everyday Ruck Snack"]
|
|
455
|
+
},
|
|
456
|
+
"price": {
|
|
457
|
+
"type": "number",
|
|
458
|
+
"description": "The unit price the buyer sees, after any product discount.",
|
|
459
|
+
"examples": [420]
|
|
460
|
+
},
|
|
461
|
+
"quantity": {
|
|
462
|
+
"type": "number",
|
|
463
|
+
"description": "How many pieces. Missing means 1.",
|
|
464
|
+
"examples": [2]
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
},
|
|
474
|
+
"checkout": {
|
|
475
|
+
"start": {
|
|
476
|
+
"title": "Checkout start",
|
|
477
|
+
"description": "A visitor began the checkout. Every shop needs it.",
|
|
478
|
+
"examples": [
|
|
479
|
+
{
|
|
480
|
+
"name": "checkout start",
|
|
481
|
+
"data": {
|
|
482
|
+
"currency": "EUR",
|
|
483
|
+
"value": 462
|
|
484
|
+
},
|
|
485
|
+
"context": {
|
|
486
|
+
"shopping": ["checkout", 0]
|
|
487
|
+
},
|
|
488
|
+
"globals": {
|
|
489
|
+
"pagegroup": "shop"
|
|
490
|
+
},
|
|
491
|
+
"nested": [
|
|
492
|
+
{
|
|
493
|
+
"entity": "product",
|
|
494
|
+
"data": {
|
|
495
|
+
"id": "ers",
|
|
496
|
+
"name": "Everyday Ruck Snack",
|
|
497
|
+
"color": "black",
|
|
498
|
+
"size": "l",
|
|
499
|
+
"price": 420
|
|
500
|
+
},
|
|
501
|
+
"context": {
|
|
502
|
+
"shopping": ["checkout", 0]
|
|
503
|
+
},
|
|
504
|
+
"nested": []
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"entity": "product",
|
|
508
|
+
"data": {
|
|
509
|
+
"id": "cc",
|
|
510
|
+
"name": "Cool Cap",
|
|
511
|
+
"size": "one size",
|
|
512
|
+
"price": 42
|
|
513
|
+
},
|
|
514
|
+
"context": {
|
|
515
|
+
"shopping": ["checkout", 0]
|
|
516
|
+
},
|
|
517
|
+
"nested": []
|
|
518
|
+
}
|
|
519
|
+
],
|
|
520
|
+
"trigger": "load"
|
|
521
|
+
}
|
|
522
|
+
],
|
|
523
|
+
"required": ["data", "nested"],
|
|
524
|
+
"properties": {
|
|
525
|
+
"data": {
|
|
526
|
+
"type": "object",
|
|
527
|
+
"description": "The checkout.",
|
|
528
|
+
"required": ["value", "currency"],
|
|
529
|
+
"properties": {
|
|
530
|
+
"value": {
|
|
531
|
+
"type": "number",
|
|
532
|
+
"description": "The merchandise value: the price times the quantity of every product, minus any order discount. It holds no shipping, and it holds tax only when the prices include tax.",
|
|
533
|
+
"examples": [462]
|
|
534
|
+
},
|
|
535
|
+
"currency": {
|
|
536
|
+
"type": "string",
|
|
537
|
+
"description": "The currency of value and of every price, as a three-letter code.",
|
|
538
|
+
"examples": ["EUR"]
|
|
539
|
+
},
|
|
540
|
+
"coupon": {
|
|
541
|
+
"type": ["string", "number"],
|
|
542
|
+
"description": "The coupon code the buyer entered."
|
|
543
|
+
},
|
|
544
|
+
"discount": {
|
|
545
|
+
"type": "number",
|
|
546
|
+
"description": "The discount on the whole order, as a positive amount."
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
"nested": {
|
|
551
|
+
"type": "array",
|
|
552
|
+
"description": "The products in the checkout, at least one.",
|
|
553
|
+
"contains": {
|
|
554
|
+
"type": "object",
|
|
555
|
+
"required": ["entity", "data"],
|
|
556
|
+
"properties": {
|
|
557
|
+
"entity": {
|
|
558
|
+
"type": "string",
|
|
559
|
+
"enum": ["product"],
|
|
560
|
+
"description": "The entity name, product.",
|
|
561
|
+
"examples": ["product"]
|
|
562
|
+
},
|
|
563
|
+
"data": {
|
|
564
|
+
"type": "object",
|
|
565
|
+
"description": "The product.",
|
|
566
|
+
"required": ["id"],
|
|
567
|
+
"properties": {
|
|
568
|
+
"id": {
|
|
569
|
+
"type": ["string", "number"],
|
|
570
|
+
"description": "The product id.",
|
|
571
|
+
"examples": ["ers"]
|
|
572
|
+
},
|
|
573
|
+
"name": {
|
|
574
|
+
"type": "string",
|
|
575
|
+
"description": "The name of the product.",
|
|
576
|
+
"examples": ["Everyday Ruck Snack"]
|
|
577
|
+
},
|
|
578
|
+
"price": {
|
|
579
|
+
"type": "number",
|
|
580
|
+
"description": "The unit price the buyer sees, after any product discount.",
|
|
581
|
+
"examples": [420]
|
|
582
|
+
},
|
|
583
|
+
"quantity": {
|
|
584
|
+
"type": "number",
|
|
585
|
+
"description": "How many pieces. Missing means 1.",
|
|
586
|
+
"examples": [1]
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
},
|
|
595
|
+
"shipping": {
|
|
596
|
+
"title": "Checkout shipping",
|
|
597
|
+
"description": "The buyer chose how the order is shipped. Recommended for most shops.",
|
|
598
|
+
"examples": [
|
|
599
|
+
{
|
|
600
|
+
"name": "checkout shipping",
|
|
601
|
+
"data": {
|
|
602
|
+
"shippingMethod": "express",
|
|
603
|
+
"step": 2,
|
|
604
|
+
"value": 462,
|
|
605
|
+
"currency": "EUR"
|
|
606
|
+
},
|
|
607
|
+
"context": {
|
|
608
|
+
"shopping": ["checkout", 0]
|
|
609
|
+
},
|
|
610
|
+
"globals": {
|
|
611
|
+
"pagegroup": "shop"
|
|
612
|
+
},
|
|
613
|
+
"trigger": "click"
|
|
614
|
+
}
|
|
615
|
+
],
|
|
616
|
+
"required": ["data"],
|
|
617
|
+
"properties": {
|
|
618
|
+
"data": {
|
|
619
|
+
"type": "object",
|
|
620
|
+
"description": "The checkout.",
|
|
621
|
+
"required": ["shippingMethod"],
|
|
622
|
+
"dependentRequired": {
|
|
623
|
+
"value": ["currency"]
|
|
624
|
+
},
|
|
625
|
+
"properties": {
|
|
626
|
+
"shippingMethod": {
|
|
627
|
+
"type": "string",
|
|
628
|
+
"description": "How the order is shipped.",
|
|
629
|
+
"examples": ["express"]
|
|
630
|
+
},
|
|
631
|
+
"step": {
|
|
632
|
+
"type": "number",
|
|
633
|
+
"description": "The number of the checkout step, counted from 1.",
|
|
634
|
+
"examples": [2]
|
|
635
|
+
},
|
|
636
|
+
"value": {
|
|
637
|
+
"type": "number",
|
|
638
|
+
"description": "The merchandise value, the same as on checkout start.",
|
|
639
|
+
"examples": [462]
|
|
640
|
+
},
|
|
641
|
+
"currency": {
|
|
642
|
+
"type": "string",
|
|
643
|
+
"description": "The currency of value, as a three-letter code.",
|
|
644
|
+
"examples": ["EUR"]
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
"payment": {
|
|
651
|
+
"title": "Checkout payment",
|
|
652
|
+
"description": "The buyer chose how to pay. Recommended for most shops.",
|
|
653
|
+
"examples": [
|
|
654
|
+
{
|
|
655
|
+
"name": "checkout payment",
|
|
656
|
+
"data": {
|
|
657
|
+
"paymentMethod": "card",
|
|
658
|
+
"step": 3,
|
|
659
|
+
"value": 462,
|
|
660
|
+
"currency": "EUR"
|
|
661
|
+
},
|
|
662
|
+
"context": {
|
|
663
|
+
"shopping": ["checkout", 0]
|
|
664
|
+
},
|
|
665
|
+
"globals": {
|
|
666
|
+
"pagegroup": "shop"
|
|
667
|
+
},
|
|
668
|
+
"trigger": "click"
|
|
669
|
+
}
|
|
670
|
+
],
|
|
671
|
+
"required": ["data"],
|
|
672
|
+
"properties": {
|
|
673
|
+
"data": {
|
|
674
|
+
"type": "object",
|
|
675
|
+
"description": "The checkout.",
|
|
676
|
+
"required": ["paymentMethod"],
|
|
677
|
+
"dependentRequired": {
|
|
678
|
+
"value": ["currency"]
|
|
679
|
+
},
|
|
680
|
+
"properties": {
|
|
681
|
+
"paymentMethod": {
|
|
682
|
+
"type": "string",
|
|
683
|
+
"description": "How the buyer pays, such as card.",
|
|
684
|
+
"examples": ["card"]
|
|
685
|
+
},
|
|
686
|
+
"step": {
|
|
687
|
+
"type": "number",
|
|
688
|
+
"description": "The number of the checkout step, counted from 1.",
|
|
689
|
+
"examples": [3]
|
|
690
|
+
},
|
|
691
|
+
"value": {
|
|
692
|
+
"type": "number",
|
|
693
|
+
"description": "The merchandise value, the same as on checkout start.",
|
|
694
|
+
"examples": [462]
|
|
695
|
+
},
|
|
696
|
+
"currency": {
|
|
697
|
+
"type": "string",
|
|
698
|
+
"description": "The currency of value, as a three-letter code.",
|
|
699
|
+
"examples": ["EUR"]
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
"order": {
|
|
707
|
+
"complete": {
|
|
708
|
+
"title": "Order complete",
|
|
709
|
+
"description": "An order was placed. Every shop needs it.",
|
|
710
|
+
"examples": [
|
|
711
|
+
{
|
|
712
|
+
"name": "order complete",
|
|
713
|
+
"data": {
|
|
714
|
+
"id": "0rd3r1d",
|
|
715
|
+
"currency": "EUR",
|
|
716
|
+
"value": 462,
|
|
717
|
+
"tax": 73.76,
|
|
718
|
+
"shipping": 5.22,
|
|
719
|
+
"total": 467.22
|
|
720
|
+
},
|
|
721
|
+
"context": {
|
|
722
|
+
"shopping": ["complete", 0]
|
|
723
|
+
},
|
|
724
|
+
"globals": {
|
|
725
|
+
"pagegroup": "shop"
|
|
726
|
+
},
|
|
727
|
+
"nested": [
|
|
728
|
+
{
|
|
729
|
+
"entity": "product",
|
|
730
|
+
"data": {
|
|
731
|
+
"id": "ers",
|
|
732
|
+
"name": "Everyday Ruck Snack",
|
|
733
|
+
"color": "black",
|
|
734
|
+
"size": "l",
|
|
735
|
+
"price": 420
|
|
736
|
+
},
|
|
737
|
+
"context": {
|
|
738
|
+
"shopping": ["complete", 0]
|
|
739
|
+
},
|
|
740
|
+
"nested": []
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"entity": "product",
|
|
744
|
+
"data": {
|
|
745
|
+
"id": "cc",
|
|
746
|
+
"name": "Cool Cap",
|
|
747
|
+
"size": "one size",
|
|
748
|
+
"price": 42
|
|
749
|
+
},
|
|
750
|
+
"context": {
|
|
751
|
+
"shopping": ["complete", 0]
|
|
752
|
+
},
|
|
753
|
+
"nested": []
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
"entity": "gift",
|
|
757
|
+
"data": {
|
|
758
|
+
"name": "Surprise"
|
|
759
|
+
},
|
|
760
|
+
"context": {
|
|
761
|
+
"shopping": ["complete", 0]
|
|
762
|
+
},
|
|
763
|
+
"nested": []
|
|
764
|
+
}
|
|
765
|
+
],
|
|
766
|
+
"trigger": "load"
|
|
767
|
+
}
|
|
768
|
+
],
|
|
769
|
+
"required": ["data", "nested"],
|
|
770
|
+
"properties": {
|
|
771
|
+
"data": {
|
|
772
|
+
"type": "object",
|
|
773
|
+
"description": "The order.",
|
|
774
|
+
"required": ["id", "value", "currency"],
|
|
775
|
+
"properties": {
|
|
776
|
+
"id": {
|
|
777
|
+
"type": ["string", "number"],
|
|
778
|
+
"description": "The order number, unique per order.",
|
|
779
|
+
"examples": ["0rd3r1d"]
|
|
780
|
+
},
|
|
781
|
+
"value": {
|
|
782
|
+
"type": "number",
|
|
783
|
+
"description": "The merchandise value: the price times the quantity of every product, minus any order discount. It holds no shipping, and it holds tax only when the prices include tax.",
|
|
784
|
+
"examples": [462]
|
|
785
|
+
},
|
|
786
|
+
"currency": {
|
|
787
|
+
"type": "string",
|
|
788
|
+
"description": "The currency of every amount of the order, as a three-letter code.",
|
|
789
|
+
"examples": ["EUR"]
|
|
790
|
+
},
|
|
791
|
+
"tax": {
|
|
792
|
+
"type": "number",
|
|
793
|
+
"description": "The tax amount. It is part of value when the prices include tax, and comes on top when they do not.",
|
|
794
|
+
"examples": [73.76]
|
|
795
|
+
},
|
|
796
|
+
"shipping": {
|
|
797
|
+
"type": "number",
|
|
798
|
+
"description": "The shipping cost. It is not part of value.",
|
|
799
|
+
"examples": [5.22]
|
|
800
|
+
},
|
|
801
|
+
"total": {
|
|
802
|
+
"type": "number",
|
|
803
|
+
"description": "The gross amount charged: value plus shipping, and plus tax when the prices exclude it.",
|
|
804
|
+
"examples": [467.22]
|
|
805
|
+
},
|
|
806
|
+
"discount": {
|
|
807
|
+
"type": "number",
|
|
808
|
+
"description": "The discount on the whole order, as a positive amount."
|
|
809
|
+
},
|
|
810
|
+
"coupon": {
|
|
811
|
+
"type": ["string", "number"],
|
|
812
|
+
"description": "The coupon code the buyer used."
|
|
813
|
+
},
|
|
814
|
+
"paymentMethod": {
|
|
815
|
+
"type": "string",
|
|
816
|
+
"description": "How the buyer paid, such as card."
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
},
|
|
820
|
+
"nested": {
|
|
821
|
+
"type": "array",
|
|
822
|
+
"description": "The products of the order, at least one.",
|
|
823
|
+
"contains": {
|
|
824
|
+
"type": "object",
|
|
825
|
+
"required": ["entity", "data"],
|
|
826
|
+
"properties": {
|
|
827
|
+
"entity": {
|
|
828
|
+
"type": "string",
|
|
829
|
+
"enum": ["product"],
|
|
830
|
+
"description": "The entity name, product.",
|
|
831
|
+
"examples": ["product"]
|
|
832
|
+
},
|
|
833
|
+
"data": {
|
|
834
|
+
"type": "object",
|
|
835
|
+
"description": "The product.",
|
|
836
|
+
"required": ["id"],
|
|
837
|
+
"properties": {
|
|
838
|
+
"id": {
|
|
839
|
+
"type": ["string", "number"],
|
|
840
|
+
"description": "The product id.",
|
|
841
|
+
"examples": ["ers"]
|
|
842
|
+
},
|
|
843
|
+
"name": {
|
|
844
|
+
"type": "string",
|
|
845
|
+
"description": "The name of the product.",
|
|
846
|
+
"examples": ["Everyday Ruck Snack"]
|
|
847
|
+
},
|
|
848
|
+
"category": {
|
|
849
|
+
"type": "string",
|
|
850
|
+
"description": "The main category of the product.",
|
|
851
|
+
"examples": ["Apparel"]
|
|
852
|
+
},
|
|
853
|
+
"brand": {
|
|
854
|
+
"type": "string",
|
|
855
|
+
"description": "The brand of the product."
|
|
856
|
+
},
|
|
857
|
+
"variant": {
|
|
858
|
+
"type": ["string", "number"],
|
|
859
|
+
"description": "The variant, such as a color.",
|
|
860
|
+
"examples": ["green"]
|
|
861
|
+
},
|
|
862
|
+
"price": {
|
|
863
|
+
"type": "number",
|
|
864
|
+
"description": "The unit price the buyer sees, after any product discount.",
|
|
865
|
+
"examples": [420]
|
|
866
|
+
},
|
|
867
|
+
"quantity": {
|
|
868
|
+
"type": "number",
|
|
869
|
+
"description": "How many pieces. Missing means 1.",
|
|
870
|
+
"examples": [1]
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
"refund": {
|
|
880
|
+
"title": "Order refund",
|
|
881
|
+
"description": "Money went back to the buyer for an order. Recommended for most shops.",
|
|
882
|
+
"examples": [
|
|
883
|
+
{
|
|
884
|
+
"name": "order refund",
|
|
885
|
+
"data": {
|
|
886
|
+
"id": "0rd3r1d",
|
|
887
|
+
"value": 462,
|
|
888
|
+
"currency": "EUR"
|
|
889
|
+
},
|
|
890
|
+
"globals": {
|
|
891
|
+
"pagegroup": "shop"
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
],
|
|
895
|
+
"required": ["data"],
|
|
896
|
+
"properties": {
|
|
897
|
+
"data": {
|
|
898
|
+
"type": "object",
|
|
899
|
+
"description": "The refund.",
|
|
900
|
+
"required": ["id", "value", "currency"],
|
|
901
|
+
"properties": {
|
|
902
|
+
"id": {
|
|
903
|
+
"type": ["string", "number"],
|
|
904
|
+
"description": "The order number of the refunded order.",
|
|
905
|
+
"examples": ["0rd3r1d"]
|
|
906
|
+
},
|
|
907
|
+
"value": {
|
|
908
|
+
"type": "number",
|
|
909
|
+
"description": "The refunded amount, as a positive number.",
|
|
910
|
+
"examples": [462]
|
|
911
|
+
},
|
|
912
|
+
"currency": {
|
|
913
|
+
"type": "string",
|
|
914
|
+
"description": "The currency of value, as a three-letter code.",
|
|
915
|
+
"examples": ["EUR"]
|
|
916
|
+
},
|
|
917
|
+
"reason": {
|
|
918
|
+
"type": "string",
|
|
919
|
+
"description": "Why the order was refunded."
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
"nested": {
|
|
924
|
+
"type": "array",
|
|
925
|
+
"description": "For a partial refund, the refunded products.",
|
|
926
|
+
"items": {
|
|
927
|
+
"type": "object",
|
|
928
|
+
"properties": {
|
|
929
|
+
"entity": {
|
|
930
|
+
"type": "string",
|
|
931
|
+
"description": "A product.",
|
|
932
|
+
"examples": ["product"]
|
|
933
|
+
},
|
|
934
|
+
"data": {
|
|
935
|
+
"type": "object",
|
|
936
|
+
"description": "The product.",
|
|
937
|
+
"properties": {
|
|
938
|
+
"id": {
|
|
939
|
+
"type": ["string", "number"],
|
|
940
|
+
"description": "The product id, such as the article number.",
|
|
941
|
+
"examples": ["ers"]
|
|
942
|
+
},
|
|
943
|
+
"price": {
|
|
944
|
+
"type": "number",
|
|
945
|
+
"description": "The unit price the buyer sees, after any product discount.",
|
|
946
|
+
"examples": [420]
|
|
947
|
+
},
|
|
948
|
+
"quantity": {
|
|
949
|
+
"type": "number",
|
|
950
|
+
"description": "How many pieces. Missing means 1.",
|
|
951
|
+
"examples": [1]
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
}
|