@metarouter/ajs-starter-kit 1.0.81-alpha.1 → 1.0.82

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.
Files changed (52) hide show
  1. package/.dist/blob/kit.etag.json +1 -1
  2. package/.dist/blob/metadata.json +4 -0
  3. package/.dist/blob/playbook.etag.json +1 -1
  4. package/.dist/blob/playbook.json +9 -5
  5. package/.dist/commission-junction/connection.etag.json +1 -1
  6. package/.dist/commission-junction/connection.json +53 -2
  7. package/.dist/commission-junction/kit.etag.json +1 -1
  8. package/.dist/commission-junction/metadata.json +4 -0
  9. package/.dist/commission-junction/playbook.etag.json +1 -1
  10. package/.dist/commission-junction/playbook.json +167 -33
  11. package/.dist/gcs/kit.etag.json +1 -1
  12. package/.dist/gcs/metadata.json +4 -0
  13. package/.dist/gcs/playbook.etag.json +1 -1
  14. package/.dist/gcs/playbook.json +9 -5
  15. package/.dist/google-pubsub/kit.etag.json +1 -1
  16. package/.dist/google-pubsub/metadata.json +4 -0
  17. package/.dist/google-pubsub/playbook.etag.json +1 -1
  18. package/.dist/google-pubsub/playbook.json +9 -5
  19. package/.dist/kafka/kit.etag.json +1 -1
  20. package/.dist/kafka/metadata.json +4 -0
  21. package/.dist/kafka/playbook.etag.json +1 -1
  22. package/.dist/kafka/playbook.json +9 -5
  23. package/.dist/kinesis/kit.etag.json +1 -1
  24. package/.dist/kinesis/metadata.json +4 -0
  25. package/.dist/kinesis/playbook.etag.json +1 -1
  26. package/.dist/kinesis/playbook.json +9 -5
  27. package/.dist/movable-ink-customer-data/kit.etag.json +1 -1
  28. package/.dist/movable-ink-customer-data/metadata.json +4 -0
  29. package/.dist/movable-ink-customer-data/playbook.etag.json +1 -1
  30. package/.dist/movable-ink-customer-data/playbook.json +89 -1
  31. package/.dist/s3/kit.etag.json +1 -1
  32. package/.dist/s3/metadata.json +4 -0
  33. package/.dist/s3/playbook.etag.json +1 -1
  34. package/.dist/s3/playbook.json +9 -5
  35. package/.dist/snowflake/kit.etag.json +1 -1
  36. package/.dist/snowflake/metadata.json +4 -8
  37. package/.dist/snowflake/playbook.etag.json +1 -1
  38. package/.dist/snowflake/playbook.json +1 -9
  39. package/.dist/treasure-data/connection.etag.json +1 -0
  40. package/.dist/treasure-data/connection.json +42 -0
  41. package/.dist/treasure-data/kit.etag.json +1 -0
  42. package/.dist/treasure-data/metadata.json +20 -0
  43. package/.dist/treasure-data/playbook.etag.json +1 -0
  44. package/.dist/treasure-data/playbook.json +95 -0
  45. package/.dist/zeotap/connection.etag.json +1 -0
  46. package/.dist/zeotap/connection.json +28 -0
  47. package/.dist/zeotap/kit.etag.json +1 -0
  48. package/.dist/zeotap/metadata.json +20 -0
  49. package/.dist/zeotap/playbook.etag.json +1 -0
  50. package/.dist/zeotap/playbook.json +95 -0
  51. package/index.js +24 -0
  52. package/package.json +1 -1
@@ -1 +1 @@
1
- "230ffad31dd09830a9b30bf829deb75f"
1
+ "1539e7d24087d5dab4e4642cd262b8b5"
@@ -31,6 +31,10 @@
31
31
  {
32
32
  "date": "2023-12-13T00:00:00.000Z",
33
33
  "note": "Marked as stable version: 1.0.0"
34
+ },
35
+ {
36
+ "date": "2024-02-13T00:00:00.000Z",
37
+ "note": "Removed Identity"
34
38
  }
35
39
  ]
36
40
  }
@@ -1 +1 @@
1
- "3f0081773506e639693f56929427a536"
1
+ "d9c038d6e831c71a2b4bac5dcbf4b42e"
@@ -1,7 +1,11 @@
1
1
  {
2
- "version": "1.0.0",
3
- "default": {},
4
- "modes": [
5
- "identity"
6
- ]
2
+ "version": "1.1.0",
3
+ "global": {
4
+ "expressions": [
5
+ {
6
+ "body": "return input",
7
+ "lang": "lua"
8
+ }
9
+ ]
10
+ }
7
11
  }
@@ -1 +1 @@
1
- "6e570485ab6dd8a0ecb221ee1e09d4d4"
1
+ "cbbaaf5da53298fcb3ae02a222edba8d"
@@ -3,11 +3,15 @@
3
3
  {
4
4
  "name": "ACCESS_TOKEN",
5
5
  "exampleValue": "my-access-token"
6
+ },
7
+ {
8
+ "name": "ENDPOINT",
9
+ "defaultValue": "graphql"
6
10
  }
7
11
  ],
8
12
  "default": {
9
- "endpoint": "https://tracking.api.cj.com/graphql",
10
- "batchSize": 1,
13
+ "endpoint": "https://tracking.api.cj.com/$$ENDPOINT$$",
14
+ "batchSize": 500,
11
15
  "method": "POST",
12
16
  "headers": [
13
17
  {
@@ -19,5 +23,52 @@
19
23
  "body": "function tableToString(tbl)\n local result, isJsonArray = {}, true\n\n for k, v in pairs(tbl) do\n isJsonArray = isJsonArray and type(k) == \"number\" and math.floor(k) == k and k > 0\n\n local valueStr = (\n type(v) == \"table\" and tableToString(v) or\n type(v) == \"boolean\" and tostring(v) or\n type(v) == \"number\" and v or\n '\"' .. tostring(v) .. '\"'\n )\n\n if isJsonArray then\n result[#result + 1] = valueStr\n else\n result[#result + 1] = k .. \":\" .. valueStr\n end\n end\n\n return (isJsonArray and \"[\" or \"{\") .. table.concat(result, \",\") .. (isJsonArray and \"]\" or \"}\")\nend\n\n\nlocal graphQLString = string.format([[\n mutation {\n createOrders(\n newOrders: [%s]\n ) {\n orders {\n submissionId\n orderReceivedTime\n advertiser {\n enterpriseId\n }\n actionTracker {\n id\n }\n eventTime\n orderId\n cjEvent\n amount\n discount\n verticalParameters {\n originState\n taxAmount\n confirmationNumber\n originCity\n itemId\n noCancellation\n orderSubtotal\n destinationCity\n destinationState\n }\n items {\n unitPrice\n quantity\n sku\n discount\n }\n coupon\n currency\n }\n errors {\n message\n fields\n }\n }\n }\n]], tableToString(batch[1]))\n\nrequest.body = { query = graphQLString }\nreturn request",
20
24
  "lang": "lua"
21
25
  }
26
+ },
27
+ "eventSpecific": {
28
+ "order_canceled": {
29
+ "endpoint": "https://tracking.api.cj.com/$$ENDPOINT$$",
30
+ "batchSize": 500,
31
+ "method": "POST",
32
+ "headers": [
33
+ {
34
+ "key": "Authorization",
35
+ "value": "Bearer $$ACCESS_TOKEN$$"
36
+ }
37
+ ],
38
+ "transform": {
39
+ "body": "function tableToString(tbl)\n local result, isJsonArray = {}, true\n\n for k, v in pairs(tbl) do\n isJsonArray = isJsonArray and type(k) == \"number\" and math.floor(k) == k and k > 0\n\n local valueStr = (\n type(v) == \"table\" and tableToString(v) or\n type(v) == \"boolean\" and tostring(v) or\n type(v) == \"number\" and v or\n '\"' .. tostring(v) .. '\"'\n )\n\n if isJsonArray then\n result[#result + 1] = valueStr\n else\n result[#result + 1] = k .. \":\" .. valueStr\n end\n end\n\n return (isJsonArray and \"[\" or \"{\") .. table.concat(result, \",\") .. (isJsonArray and \"]\" or \"}\")\nend\n\n\nlocal graphQLString = string.format([[\n mutation {\n cancelOrders(\n cancelledOrders: [%s]\n ) {\n orders {\n submissionId\n status\n }\n errors {\n message\n fields\n }\n }\n }\n]], tableToString(batch[1]))\n\nrequest.body = { query = graphQLString }\nreturn request",
40
+ "lang": "lua"
41
+ }
42
+ },
43
+ "order_completed": {
44
+ "endpoint": "https://tracking.api.cj.com/$$ENDPOINT$$",
45
+ "batchSize": 500,
46
+ "method": "POST",
47
+ "headers": [
48
+ {
49
+ "key": "Authorization",
50
+ "value": "Bearer $$ACCESS_TOKEN$$"
51
+ }
52
+ ],
53
+ "transform": {
54
+ "body": "function tableToString(tbl)\n local result, isJsonArray = {}, true\n\n for k, v in pairs(tbl) do\n isJsonArray = isJsonArray and type(k) == \"number\" and math.floor(k) == k and k > 0\n\n local valueStr = (\n type(v) == \"table\" and tableToString(v) or\n type(v) == \"boolean\" and tostring(v) or\n type(v) == \"number\" and v or\n '\"' .. tostring(v) .. '\"'\n )\n\n if isJsonArray then\n result[#result + 1] = valueStr\n else\n result[#result + 1] = k .. \":\" .. valueStr\n end\n end\n\n return (isJsonArray and \"[\" or \"{\") .. table.concat(result, \",\") .. (isJsonArray and \"]\" or \"}\")\nend\n\n\nlocal graphQLString = string.format([[\n mutation {\n createOrders(\n newOrders: [%s]\n ) {\n orders {\n submissionId\n orderReceivedTime\n advertiser {\n enterpriseId\n }\n actionTracker {\n id\n }\n eventTime\n orderId\n cjEvent\n amount\n discount\n verticalParameters {\n originState\n taxAmount\n confirmationNumber\n originCity\n itemId\n noCancellation\n orderSubtotal\n destinationCity\n destinationState\n }\n items {\n unitPrice\n quantity\n sku\n discount\n }\n coupon\n currency\n }\n errors {\n message\n fields\n }\n }\n }\n]], tableToString(batch[1]))\n\nrequest.body = { query = graphQLString }\nreturn request",
55
+ "lang": "lua"
56
+ }
57
+ },
58
+ "order_updated": {
59
+ "endpoint": "https://tracking.api.cj.com/$$ENDPOINT$$",
60
+ "batchSize": 500,
61
+ "method": "POST",
62
+ "headers": [
63
+ {
64
+ "key": "Authorization",
65
+ "value": "Bearer $$ACCESS_TOKEN$$"
66
+ }
67
+ ],
68
+ "transform": {
69
+ "body": "function tableToString(tbl)\n local result, isJsonArray = {}, true\n\n for k, v in pairs(tbl) do\n isJsonArray = isJsonArray and type(k) == \"number\" and math.floor(k) == k and k > 0\n\n local valueStr = (\n type(v) == \"table\" and tableToString(v) or\n type(v) == \"boolean\" and tostring(v) or\n type(v) == \"number\" and v or\n '\"' .. tostring(v) .. '\"'\n )\n\n if isJsonArray then\n result[#result + 1] = valueStr\n else\n result[#result + 1] = k .. \":\" .. valueStr\n end\n end\n\n return (isJsonArray and \"[\" or \"{\") .. table.concat(result, \",\") .. (isJsonArray and \"]\" or \"}\")\nend\n\n\nlocal graphQLString = string.format([[\n mutation {\n restateOrders(\n restatedOrders: [%s]\n ) {\n orders {\n submissionId\n updateTime\n advertiser {\n enterpriseId\n }\n actionTracker {\n id\n }\n updateTime\n orderId\n cjEvent\n amount\n discount\n verticalParameters {\n originState\n taxAmount\n confirmationNumber\n originCity\n itemId\n noCancellation\n orderSubtotal\n destinationCity\n destinationState\n }\n items {\n unitPrice\n quantity\n sku\n discount\n }\n coupon\n currency\n }\n errors {\n message\n fields\n }\n }\n }\n]], tableToString(batch[1]))\n\nrequest.body = { query = graphQLString }\nreturn request",
70
+ "lang": "lua"
71
+ }
72
+ }
22
73
  }
23
74
  }
@@ -1 +1 @@
1
- "05fec366f431cf60b2daa57e8e323840"
1
+ "92c7ed06cd44b4f5968f6403fbfb8dc7"
@@ -15,6 +15,10 @@
15
15
  {
16
16
  "date": "2024-01-17T05:00:00.000Z",
17
17
  "note": "commission-junction initial release."
18
+ },
19
+ {
20
+ "date": "2024-02-12T00:00:00.000Z",
21
+ "note": "Add order_canceled and order_updated."
18
22
  }
19
23
  ]
20
24
  }
@@ -1 +1 @@
1
- "4d2541ca3b25339c02063fe4e2cc5e86"
1
+ "d81df4b5939b0b95134d106389e9eafe"
@@ -1,26 +1,12 @@
1
1
  {
2
- "version": "v0.1.0",
2
+ "version": "0.2.0",
3
3
  "params": [
4
- {
5
- "name": "ACTION_TRACKER_ID",
6
- "exampleValue": "my-action-tracker-id"
7
- },
8
4
  {
9
5
  "name": "ENTERPRISE_ID",
10
6
  "exampleValue": "my-enterprise-id"
11
7
  }
12
8
  ],
13
9
  "global": {
14
- "filters": [
15
- {
16
- "byEventNames": {
17
- "action": "allow",
18
- "events": [
19
- "order_completed"
20
- ]
21
- }
22
- }
23
- ],
24
10
  "enrichments": [
25
11
  {
26
12
  "staticString": "$$ENTERPRISE_ID$$",
@@ -28,22 +14,6 @@
28
14
  }
29
15
  ],
30
16
  "mappings": [
31
- {
32
- "inputKey": "input",
33
- "outputKey": "actionTrackerId",
34
- "transforms": [
35
- {
36
- "expression": {
37
- "lang": "lua",
38
- "body": "local actionTrackerId = TO_TRUNCATED_INT($$ACTION_TRACKER_ID$$)\nreturn actionTrackerId"
39
- }
40
- }
41
- ]
42
- },
43
- {
44
- "inputKey": "originalTimestamp",
45
- "outputKey": "eventTime"
46
- },
47
17
  {
48
18
  "inputKey": "context.providers.commissionJunction.cjEvent",
49
19
  "outputKey": "cjEvent"
@@ -51,6 +21,22 @@
51
21
  {
52
22
  "inputKey": "properties.sid",
53
23
  "outputKey": "sid"
24
+ },
25
+ {
26
+ "inputKey": "properties.order_id",
27
+ "outputKey": "orderId"
28
+ }
29
+ ]
30
+ },
31
+ "default": {
32
+ "filters": [
33
+ {
34
+ "byEventNames": {
35
+ "action": "allow",
36
+ "events": [
37
+ ""
38
+ ]
39
+ }
54
40
  }
55
41
  ]
56
42
  },
@@ -58,8 +44,132 @@
58
44
  "order_completed": {
59
45
  "mappings": [
60
46
  {
61
- "inputKey": "properties.order_id",
62
- "outputKey": "orderId"
47
+ "inputKey": "input",
48
+ "outputKey": "actionTrackerId",
49
+ "transforms": [
50
+ {
51
+ "expression": {
52
+ "lang": "lua",
53
+ "body": "return TO_TRUNCATED_INT(\"ADD_ACTION_TRACKER_ID_HERE\")"
54
+ }
55
+ }
56
+ ]
57
+ },
58
+ {
59
+ "inputKey": "properties.revenue",
60
+ "outputKey": "amount"
61
+ },
62
+ {
63
+ "inputKey": "properties.discount",
64
+ "outputKey": "discount"
65
+ },
66
+ {
67
+ "inputKey": "input",
68
+ "outputKey": "items",
69
+ "transforms": [
70
+ {
71
+ "expression": {
72
+ "lang": "lua",
73
+ "body": "return MAP(\n input.properties.products,\n function (p)\n return {\n unitPrice=p.price,\n quantity=p.quantity,\n sku=p.sku,\n discount=p.discount or 0\n }\n end\n )"
74
+ }
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ "inputKey": "properties.coupon",
80
+ "outputKey": "coupon"
81
+ },
82
+ {
83
+ "inputKey": "properties.currency",
84
+ "outputKey": "currency",
85
+ "transforms": [
86
+ {
87
+ "modifyString": "uppercase"
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "inputKey": "properties.customerStatus",
93
+ "outputKey": "customerStatus"
94
+ },
95
+ {
96
+ "inputKey": "properties.confirmationNumber",
97
+ "outputKey": "verticalParameters.confirmationNumber"
98
+ },
99
+ {
100
+ "inputKey": "properties.originCity",
101
+ "outputKey": "verticalParameters.originCity"
102
+ },
103
+ {
104
+ "inputKey": "properties.originState",
105
+ "outputKey": "verticalParameters.originState"
106
+ },
107
+ {
108
+ "inputKey": "properties.destinationCity",
109
+ "outputKey": "verticalParameters.destinationCity"
110
+ },
111
+ {
112
+ "inputKey": "properties.destinationState",
113
+ "outputKey": "verticalParameters.destinationState"
114
+ },
115
+ {
116
+ "inputKey": "properties.noCancellation",
117
+ "outputKey": "verticalParameters.noCancellation",
118
+ "transforms": [
119
+ {
120
+ "toScalar": "string"
121
+ }
122
+ ]
123
+ },
124
+ {
125
+ "inputKey": "properties.revenue",
126
+ "outputKey": "verticalParameters.orderSubtotal",
127
+ "transforms": [
128
+ {
129
+ "toScalar": "string"
130
+ }
131
+ ]
132
+ },
133
+ {
134
+ "inputKey": "properties.tax",
135
+ "outputKey": "verticalParameters.taxAmount",
136
+ "transforms": [
137
+ {
138
+ "toScalar": "string"
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ "inputKey": "input",
144
+ "outputKey": "verticalParameters.itemId",
145
+ "transforms": [
146
+ {
147
+ "expression": {
148
+ "lang": "lua",
149
+ "body": "return JOIN(PLUCK(input.properties.products,\"product_id\"), \", \")"
150
+ }
151
+ }
152
+ ]
153
+ },
154
+ {
155
+ "inputKey": "originalTimestamp",
156
+ "outputKey": "eventTime"
157
+ }
158
+ ]
159
+ },
160
+ "order_updated": {
161
+ "mappings": [
162
+ {
163
+ "inputKey": "input",
164
+ "outputKey": "actionTrackerId",
165
+ "transforms": [
166
+ {
167
+ "expression": {
168
+ "lang": "lua",
169
+ "body": "return TO_TRUNCATED_INT(\"ADD_ACTION_TRACKER_ID_HERE\")"
170
+ }
171
+ }
172
+ ]
63
173
  },
64
174
  {
65
175
  "inputKey": "properties.revenue",
@@ -156,6 +266,30 @@
156
266
  }
157
267
  }
158
268
  ]
269
+ },
270
+ {
271
+ "inputKey": "originalTimestamp",
272
+ "outputKey": "updateTime"
273
+ }
274
+ ]
275
+ },
276
+ "order_canceled": {
277
+ "mappings": [
278
+ {
279
+ "inputKey": "input",
280
+ "outputKey": "actionTrackerId",
281
+ "transforms": [
282
+ {
283
+ "expression": {
284
+ "lang": "lua",
285
+ "body": "return TO_TRUNCATED_INT(\"ADD_ACTION_TRACKER_ID_HERE\")"
286
+ }
287
+ }
288
+ ]
289
+ },
290
+ {
291
+ "inputKey": "originalTimestamp",
292
+ "outputKey": "updateTime"
159
293
  }
160
294
  ]
161
295
  }
@@ -1 +1 @@
1
- "ab417af867bcb584f58bbebbd945c9c5"
1
+ "d79b90b34e2436d761c71000897c4d53"
@@ -23,6 +23,10 @@
23
23
  {
24
24
  "date": "2023-12-13T00:00:00.000Z",
25
25
  "note": "Marked as unstable version: 0.1.0"
26
+ },
27
+ {
28
+ "date": "2024-02-13T00:00:00.000Z",
29
+ "note": "Removed Identity"
26
30
  }
27
31
  ]
28
32
  }
@@ -1 +1 @@
1
- "b968eb1b754bc42a6a5acdcd843d4f4e"
1
+ "2f96353725e4cd845fe0ae3025f691ae"
@@ -1,7 +1,11 @@
1
1
  {
2
- "version": "0.1.0",
3
- "default": {},
4
- "modes": [
5
- "identity"
6
- ]
2
+ "version": "0.2.0",
3
+ "global": {
4
+ "expressions": [
5
+ {
6
+ "body": "return input",
7
+ "lang": "lua"
8
+ }
9
+ ]
10
+ }
7
11
  }
@@ -1 +1 @@
1
- "92c045fae60ce75d5ac2c0578e40a7d1"
1
+ "81fb208be2823289912edb5a9a12a41a"
@@ -23,6 +23,10 @@
23
23
  {
24
24
  "date": "2023-12-13T00:00:00.000Z",
25
25
  "note": "Stable release\nMarked as stable version: 1.0.0"
26
+ },
27
+ {
28
+ "date": "2024-02-13T00:00:00.000Z",
29
+ "note": "Removed Identity"
26
30
  }
27
31
  ]
28
32
  }
@@ -1 +1 @@
1
- "3f0081773506e639693f56929427a536"
1
+ "d9c038d6e831c71a2b4bac5dcbf4b42e"
@@ -1,7 +1,11 @@
1
1
  {
2
- "version": "1.0.0",
3
- "default": {},
4
- "modes": [
5
- "identity"
6
- ]
2
+ "version": "1.1.0",
3
+ "global": {
4
+ "expressions": [
5
+ {
6
+ "body": "return input",
7
+ "lang": "lua"
8
+ }
9
+ ]
10
+ }
7
11
  }
@@ -1 +1 @@
1
- "cb96ec1e43d3adc842fd827725b0e4e9"
1
+ "96967353ebdabb44a532e547010285c6"
@@ -35,6 +35,10 @@
35
35
  {
36
36
  "date": "2023-12-13T00:00:00.000Z",
37
37
  "note": "Stable release\nMarked as stable version: 1.0.0"
38
+ },
39
+ {
40
+ "date": "2024-02-13T00:00:00.000Z",
41
+ "note": "Removed Identity"
38
42
  }
39
43
  ]
40
44
  }
@@ -1 +1 @@
1
- "3f0081773506e639693f56929427a536"
1
+ "d9c038d6e831c71a2b4bac5dcbf4b42e"
@@ -1,7 +1,11 @@
1
1
  {
2
- "version": "1.0.0",
3
- "default": {},
4
- "modes": [
5
- "identity"
6
- ]
2
+ "version": "1.1.0",
3
+ "global": {
4
+ "expressions": [
5
+ {
6
+ "body": "return input",
7
+ "lang": "lua"
8
+ }
9
+ ]
10
+ }
7
11
  }
@@ -1 +1 @@
1
- "6b69b60faf995cad054aac7f43110183"
1
+ "313557c18a58ca459cc11dc797144b00"
@@ -23,6 +23,10 @@
23
23
  {
24
24
  "date": "2023-12-13T00:00:00.000Z",
25
25
  "note": "Marked as unstable version: 0.1.0"
26
+ },
27
+ {
28
+ "date": "2024-02-13T00:00:00.000Z",
29
+ "note": "Removed Identity"
26
30
  }
27
31
  ]
28
32
  }
@@ -1 +1 @@
1
- "b968eb1b754bc42a6a5acdcd843d4f4e"
1
+ "2f96353725e4cd845fe0ae3025f691ae"
@@ -1,7 +1,11 @@
1
1
  {
2
- "version": "0.1.0",
3
- "default": {},
4
- "modes": [
5
- "identity"
6
- ]
2
+ "version": "0.2.0",
3
+ "global": {
4
+ "expressions": [
5
+ {
6
+ "body": "return input",
7
+ "lang": "lua"
8
+ }
9
+ ]
10
+ }
7
11
  }
@@ -1 +1 @@
1
- "336af703682abd0abed08e879d1da392"
1
+ "e9270d14fcb8a03044e65cbd0d2de54b"
@@ -15,6 +15,10 @@
15
15
  {
16
16
  "date": "2024-02-07T00:00:00.000Z",
17
17
  "note": "Movable Ink - Customer Data initial release."
18
+ },
19
+ {
20
+ "date": "2024-02-12T00:00:00.000Z",
21
+ "note": "New event implementation: `product_removed`."
18
22
  }
19
23
  ]
20
24
  }
@@ -1 +1 @@
1
- "6eec9986ab61724920bac87ac9dc1c6f"
1
+ "0fbed9651430f53c3059086dfe14bab3"
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.0",
2
+ "version": "0.2.0",
3
3
  "default": {
4
4
  "filters": [
5
5
  {
@@ -330,6 +330,94 @@
330
330
  }
331
331
  ]
332
332
  },
333
+ "product_removed": {
334
+ "mappings": [
335
+ {
336
+ "inputKey": "properties.cart_id",
337
+ "outputKey": "properties.cart_id",
338
+ "transforms": [
339
+ {
340
+ "substring": {
341
+ "start": 0,
342
+ "end": 256
343
+ }
344
+ }
345
+ ]
346
+ },
347
+ {
348
+ "inputKey": "properties",
349
+ "outputKey": "properties.product_id",
350
+ "transforms": [
351
+ {
352
+ "expression": {
353
+ "lang": "lua",
354
+ "body": "return SUBSTRING(input.properties.product_id, 0, 256) or SUBSTRING(input.properties.sku, 0, 256)"
355
+ }
356
+ }
357
+ ]
358
+ },
359
+ {
360
+ "inputKey": "properties.sku",
361
+ "outputKey": "properties.sku",
362
+ "transforms": [
363
+ {
364
+ "substring": {
365
+ "start": 0,
366
+ "end": 256
367
+ }
368
+ }
369
+ ]
370
+ },
371
+ {
372
+ "inputKey": "properties.category",
373
+ "outputKey": "properties.category",
374
+ "transforms": [
375
+ {
376
+ "substring": {
377
+ "start": 0,
378
+ "end": 256
379
+ }
380
+ }
381
+ ]
382
+ },
383
+ {
384
+ "inputKey": "properties.currency",
385
+ "outputKey": "properties.currency"
386
+ },
387
+ {
388
+ "inputKey": "properties.name",
389
+ "outputKey": "properties.name",
390
+ "transforms": [
391
+ {
392
+ "substring": {
393
+ "start": 0,
394
+ "end": 256
395
+ }
396
+ }
397
+ ]
398
+ },
399
+ {
400
+ "inputKey": "properties.price",
401
+ "outputKey": "properties.price"
402
+ },
403
+ {
404
+ "inputKey": "properties.quantity",
405
+ "outputKey": "properties.quantity"
406
+ },
407
+ {
408
+ "inputKey": "properties.url",
409
+ "outputKey": "properties.url",
410
+ "transforms": [
411
+ {
412
+ "substring": {
413
+ "start": 0,
414
+ "end": 256
415
+ }
416
+ }
417
+ ]
418
+ }
419
+ ]
420
+ },
333
421
  "cart_viewed": {
334
422
  "mappings": [
335
423
  {
@@ -1 +1 @@
1
- "5ba24043e5afd91afafdbae6603d7784"
1
+ "b8700998fced0675b28d6b1fe0c70a17"
@@ -27,6 +27,10 @@
27
27
  {
28
28
  "date": "2023-12-13T00:00:00.000Z",
29
29
  "note": "Marked as stable version: 1.0.0"
30
+ },
31
+ {
32
+ "date": "2024-02-13T00:00:00.000Z",
33
+ "note": "Removed Identity"
30
34
  }
31
35
  ]
32
36
  }
@@ -1 +1 @@
1
- "3f0081773506e639693f56929427a536"
1
+ "d9c038d6e831c71a2b4bac5dcbf4b42e"
@@ -1,7 +1,11 @@
1
1
  {
2
- "version": "1.0.0",
3
- "default": {},
4
- "modes": [
5
- "identity"
6
- ]
2
+ "version": "1.1.0",
3
+ "global": {
4
+ "expressions": [
5
+ {
6
+ "body": "return input",
7
+ "lang": "lua"
8
+ }
9
+ ]
10
+ }
7
11
  }
@@ -1 +1 @@
1
- "4622d0d68979ba2f2f44da432e1549e4"
1
+ "814eff5000dc4ff9d79d89b8e52d8587"
@@ -1,10 +1,10 @@
1
1
  {
2
- "isDraft": false,
3
- "isBeta": true,
2
+ "isDraft": true,
3
+ "isBeta": false,
4
4
  "friendlyName": "Snowflake",
5
- "description": "Snowflake is a cloud-based data storage and analytics service that provides rapid, easy-to-work-with access to extensive amounts of data.",
5
+ "description": "Snowflake is a fully-managed service that’s simple to use but can power a near-unlimited number of concurrent workloads.",
6
6
  "logo": "https://cdn.metarouter.io/logo.svg",
7
- "color": "#c6fbff",
7
+ "color": "#29b5e8",
8
8
  "eventSource": {
9
9
  "isAndroidApp": true,
10
10
  "isIosApp": true,
@@ -23,10 +23,6 @@
23
23
  {
24
24
  "date": "2023-12-13T00:00:00.000Z",
25
25
  "note": "Marked as unstable version: 0.1.0"
26
- },
27
- {
28
- "date": "2023-02-07T00:00:00.000Z",
29
- "note": "Marked as beta"
30
26
  }
31
27
  ]
32
28
  }
@@ -1 +1 @@
1
- "2790fcda652871fe5f3d8cbb532b920d"
1
+ "f16c24c256a8b248553c8ae3bd5d5384"
@@ -1,11 +1,3 @@
1
1
  {
2
- "version": "0.1.0",
3
- "default": {
4
- "expressions": [
5
- {
6
- "body": "return input",
7
- "lang": "lua"
8
- }
9
- ]
10
- }
2
+ "version": "0.1.0"
11
3
  }
@@ -0,0 +1 @@
1
+ "892703683c92f11203edf88fa577b3d4"
@@ -0,0 +1,42 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "ENDPOINT",
5
+ "isOptional": false,
6
+ "exampleValue": "my-endpoint"
7
+ },
8
+ {
9
+ "name": "API_KEY",
10
+ "isOptional": false,
11
+ "exampleValue": "my-api-key"
12
+ },
13
+ {
14
+ "name": "DATABASE_ID",
15
+ "isOptional": false,
16
+ "exampleValue": "my-database-id"
17
+ },
18
+ {
19
+ "name": "TABLE_ID",
20
+ "isOptional": false,
21
+ "exampleValue": "my-ingestion-id"
22
+ }
23
+ ],
24
+ "default": {
25
+ "endpoint": "$$ENDPOINT$$/$$DATABASE_ID$$/$$TABLE_ID$$",
26
+ "method": "POST",
27
+ "headers": [
28
+ {
29
+ "key": "Content-Type",
30
+ "value": "application/vnd.treasuredata.v1.single+json"
31
+ },
32
+ {
33
+ "key": "Accept-Encoding",
34
+ "value": "application/json"
35
+ },
36
+ {
37
+ "key": "Authorization",
38
+ "value": "TD1 $$API_KEY$$"
39
+ }
40
+ ]
41
+ }
42
+ }
@@ -0,0 +1 @@
1
+ "2d57b3ceaeb3567381f3690ebf634f0c"
@@ -0,0 +1,20 @@
1
+ {
2
+ "isDraft": false,
3
+ "isBeta": true,
4
+ "friendlyName": "Treasure Data",
5
+ "description": "Treasure Data is a customer data platform (CDP) that unifies offline and online customer touchpoints.",
6
+ "logo": "https://cdn.metarouter.io/logo.svg",
7
+ "color": "#",
8
+ "eventSource": {
9
+ "isAndroidApp": true,
10
+ "isIosApp": true,
11
+ "isWebApp": true
12
+ },
13
+ "inputSchema": "analytics_js",
14
+ "releaseNotes": [
15
+ {
16
+ "date": "2024-02-21T00:00:00.000Z",
17
+ "note": "Initial release; beta."
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1 @@
1
+ "b41b6a6abf842c24f13a67478667c4f9"
@@ -0,0 +1,95 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "global": {
4
+ "mappings": [
5
+ {
6
+ "inputKey": "messageId",
7
+ "outputKey": "id"
8
+ },
9
+ {
10
+ "inputKey": "userId",
11
+ "outputKey": "user_id"
12
+ },
13
+ {
14
+ "inputKey": "previousId",
15
+ "outputKey": "previous_id"
16
+ },
17
+ {
18
+ "inputKey": "anonymousId",
19
+ "outputKey": "anonymous_id"
20
+ },
21
+ {
22
+ "inputKey": "originalTimestamp",
23
+ "outputKey": "original_timestamp"
24
+ },
25
+ {
26
+ "inputKey": "receivedAt",
27
+ "outputKey": "received_at"
28
+ },
29
+ {
30
+ "inputKey": "sentAt",
31
+ "outputKey": "sent_at"
32
+ },
33
+ {
34
+ "inputKey": "timestamp",
35
+ "outputKey": "timestamp"
36
+ },
37
+ {
38
+ "inputKey": "integrations",
39
+ "outputKey": "integrations",
40
+ "transforms": [
41
+ {
42
+ "toScalar": "string"
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "inputKey": "type",
48
+ "outputKey": "type"
49
+ },
50
+ {
51
+ "inputKey": "event",
52
+ "outputKey": "event"
53
+ },
54
+ {
55
+ "inputKey": "name",
56
+ "outputKey": "name"
57
+ },
58
+ {
59
+ "inputKey": "category",
60
+ "outputKey": "category"
61
+ },
62
+ {
63
+ "inputKey": "properties.title",
64
+ "outputKey": "_titleHash",
65
+ "transforms": [
66
+ {
67
+ "toHash": "md5"
68
+ }
69
+ ]
70
+ }
71
+ ],
72
+ "spreadings": [
73
+ {
74
+ "flatten": {
75
+ "depth": 5,
76
+ "prefix": "context",
77
+ "separator": "_"
78
+ },
79
+ "inputKey": "context"
80
+ },
81
+ {
82
+ "flatten": {
83
+ "separator": "_"
84
+ },
85
+ "inputKey": "traits"
86
+ },
87
+ {
88
+ "flatten": {
89
+ "separator": "_"
90
+ },
91
+ "inputKey": "properties"
92
+ }
93
+ ]
94
+ }
95
+ }
@@ -0,0 +1 @@
1
+ "fd019ec7efa4110a98aabedf76c9b45b"
@@ -0,0 +1,28 @@
1
+ {
2
+ "params": [
3
+ {
4
+ "name": "ENDPOINT",
5
+ "isOptional": false,
6
+ "exampleValue": "my-endpoint"
7
+ },
8
+ {
9
+ "name": "API_KEY",
10
+ "isOptional": false,
11
+ "exampleValue": "my-api-key"
12
+ }
13
+ ],
14
+ "default": {
15
+ "endpoint": "$$ENDPOINT$$",
16
+ "method": "POST",
17
+ "headers": [
18
+ {
19
+ "key": "Content-Type",
20
+ "value": "application/json"
21
+ },
22
+ {
23
+ "key": "Authorization",
24
+ "value": "Basic $$API_KEY$$"
25
+ }
26
+ ]
27
+ }
28
+ }
@@ -0,0 +1 @@
1
+ "ffe8b69fced0b5fe21e99f7f3dd2688d"
@@ -0,0 +1,20 @@
1
+ {
2
+ "isDraft": false,
3
+ "isBeta": true,
4
+ "friendlyName": "Zeotap",
5
+ "description": "Zeotap is a secure Customer Data Platform that allows clients the ability to unify customer data now and in the cookieless future.",
6
+ "logo": "https://cdn.metarouter.io/logo.svg",
7
+ "color": "#",
8
+ "eventSource": {
9
+ "isAndroidApp": true,
10
+ "isIosApp": true,
11
+ "isWebApp": true
12
+ },
13
+ "inputSchema": "analytics_js",
14
+ "releaseNotes": [
15
+ {
16
+ "date": "2024-02-21T00:00:00.000Z",
17
+ "note": "Initial release; beta."
18
+ }
19
+ ]
20
+ }
@@ -0,0 +1 @@
1
+ "b41b6a6abf842c24f13a67478667c4f9"
@@ -0,0 +1,95 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "global": {
4
+ "mappings": [
5
+ {
6
+ "inputKey": "messageId",
7
+ "outputKey": "id"
8
+ },
9
+ {
10
+ "inputKey": "userId",
11
+ "outputKey": "user_id"
12
+ },
13
+ {
14
+ "inputKey": "previousId",
15
+ "outputKey": "previous_id"
16
+ },
17
+ {
18
+ "inputKey": "anonymousId",
19
+ "outputKey": "anonymous_id"
20
+ },
21
+ {
22
+ "inputKey": "originalTimestamp",
23
+ "outputKey": "original_timestamp"
24
+ },
25
+ {
26
+ "inputKey": "receivedAt",
27
+ "outputKey": "received_at"
28
+ },
29
+ {
30
+ "inputKey": "sentAt",
31
+ "outputKey": "sent_at"
32
+ },
33
+ {
34
+ "inputKey": "timestamp",
35
+ "outputKey": "timestamp"
36
+ },
37
+ {
38
+ "inputKey": "integrations",
39
+ "outputKey": "integrations",
40
+ "transforms": [
41
+ {
42
+ "toScalar": "string"
43
+ }
44
+ ]
45
+ },
46
+ {
47
+ "inputKey": "type",
48
+ "outputKey": "type"
49
+ },
50
+ {
51
+ "inputKey": "event",
52
+ "outputKey": "event"
53
+ },
54
+ {
55
+ "inputKey": "name",
56
+ "outputKey": "name"
57
+ },
58
+ {
59
+ "inputKey": "category",
60
+ "outputKey": "category"
61
+ },
62
+ {
63
+ "inputKey": "properties.title",
64
+ "outputKey": "_titleHash",
65
+ "transforms": [
66
+ {
67
+ "toHash": "md5"
68
+ }
69
+ ]
70
+ }
71
+ ],
72
+ "spreadings": [
73
+ {
74
+ "flatten": {
75
+ "depth": 5,
76
+ "prefix": "context",
77
+ "separator": "_"
78
+ },
79
+ "inputKey": "context"
80
+ },
81
+ {
82
+ "flatten": {
83
+ "separator": "_"
84
+ },
85
+ "inputKey": "traits"
86
+ },
87
+ {
88
+ "flatten": {
89
+ "separator": "_"
90
+ },
91
+ "inputKey": "properties"
92
+ }
93
+ ]
94
+ }
95
+ }
package/index.js CHANGED
@@ -388,6 +388,13 @@ exports.tiktok = {
388
388
  metadata: require('./.dist/tiktok/metadata.json')
389
389
  }
390
390
 
391
+ exports['treasure-data'] = {
392
+ connectionTemplate: connectionSchemas.properties.treasureData,
393
+ endpointSchema: require('./.dist/treasure-data/connection.json'),
394
+ playbook: require('./.dist/treasure-data/playbook.json'),
395
+ metadata: require('./.dist/treasure-data/metadata.json')
396
+ }
397
+
391
398
  exports['twitter-conversions'] = {
392
399
  connectionTemplate: connectionSchemas.properties.twitterConversions,
393
400
  endpointSchema: require('./.dist/twitter-conversions/connection.json'),
@@ -430,6 +437,13 @@ exports['yahoo-offline-conversion'] = {
430
437
  metadata: require('./.dist/yahoo-offline-conversion/metadata.json')
431
438
  }
432
439
 
440
+ exports['zeotap'] = {
441
+ connectionTemplate: connectionSchemas.properties.zeotap,
442
+ endpointSchema: require('./.dist/zeotap/connection.json'),
443
+ playbook: require('./.dist/zeotap/playbook.json'),
444
+ metadata: require('./.dist/zeotap/metadata.json')
445
+ }
446
+
433
447
  exports.etags = {
434
448
  actioniq: {
435
449
  endpointSchema: require('./.dist/actioniq/connection.etag.json'),
@@ -706,6 +720,11 @@ exports.etags = {
706
720
  playbook: require('./.dist/tiktok/playbook.etag.json'),
707
721
  kit: require('./.dist/tiktok/kit.etag.json')
708
722
  },
723
+ 'treasure-data': {
724
+ endpointSchema: require('./.dist/treasure-data/connection.etag.json'),
725
+ playbook: require('./.dist/treasure-data/playbook.etag.json'),
726
+ kit: require('./.dist/treasure-data/kit.etag.json')
727
+ },
709
728
  'twitter-conversions': {
710
729
  endpointSchema: require('./.dist/twitter-conversions/connection.etag.json'),
711
730
  playbook: require('./.dist/twitter-conversions/playbook.etag.json'),
@@ -736,4 +755,9 @@ exports.etags = {
736
755
  playbook: require('./.dist/yahoo-offline-conversion/playbook.etag.json'),
737
756
  kit: require('./.dist/yahoo-offline-conversion/kit.etag.json')
738
757
  },
758
+ 'zeotap': {
759
+ endpointSchema: require('./.dist/zeotap/connection.etag.json'),
760
+ playbook: require('./.dist/zeotap/playbook.etag.json'),
761
+ kit: require('./.dist/zeotap/kit.etag.json')
762
+ },
739
763
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metarouter/ajs-starter-kit",
3
- "version": "1.0.81-alpha.1",
3
+ "version": "1.0.82",
4
4
  "description": "MetaRouter analytics.js starter kit",
5
5
  "main": "index.js",
6
6
  "scripts": {