@segment/action-destinations 3.30.2-alpha.6 → 3.31.1-alpha.2

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 (73) hide show
  1. package/dist/destinations/amplitude/generated-types.d.ts +1 -0
  2. package/dist/destinations/amplitude/groupIdentifyUser/index.js +5 -4
  3. package/dist/destinations/amplitude/groupIdentifyUser/index.js.map +1 -1
  4. package/dist/destinations/amplitude/identifyUser/index.js +15 -14
  5. package/dist/destinations/amplitude/identifyUser/index.js.map +1 -1
  6. package/dist/destinations/amplitude/index.js +21 -2
  7. package/dist/destinations/amplitude/index.js.map +1 -1
  8. package/dist/destinations/amplitude/logEvent/index.js +2 -3
  9. package/dist/destinations/amplitude/logEvent/index.js.map +1 -1
  10. package/dist/destinations/amplitude/mapUser/index.js +5 -4
  11. package/dist/destinations/amplitude/mapUser/index.js.map +1 -1
  12. package/dist/destinations/amplitude/regional-endpoints.d.ts +32 -0
  13. package/dist/destinations/amplitude/regional-endpoints.js +39 -0
  14. package/dist/destinations/amplitude/regional-endpoints.js.map +1 -0
  15. package/dist/destinations/facebook-conversions-api/custom/generated-types.d.ts +2 -2
  16. package/dist/destinations/facebook-conversions-api/custom/index.js +4 -5
  17. package/dist/destinations/facebook-conversions-api/custom/index.js.map +1 -1
  18. package/dist/destinations/facebook-conversions-api/viewContent/generated-types.d.ts +5 -5
  19. package/dist/destinations/facebook-conversions-api/viewContent/index.js +5 -5
  20. package/dist/destinations/facebook-conversions-api/viewContent/index.js.map +1 -1
  21. package/dist/destinations/google-analytics-4/addPaymentInfo/generated-types.d.ts +1 -1
  22. package/dist/destinations/google-analytics-4/addPaymentInfo/index.js +8 -138
  23. package/dist/destinations/google-analytics-4/addPaymentInfo/index.js.map +1 -1
  24. package/dist/destinations/google-analytics-4/addToCart/generated-types.d.ts +1 -1
  25. package/dist/destinations/google-analytics-4/addToCart/index.js +6 -127
  26. package/dist/destinations/google-analytics-4/addToCart/index.js.map +1 -1
  27. package/dist/destinations/google-analytics-4/addToWishlist/generated-types.d.ts +1 -1
  28. package/dist/destinations/google-analytics-4/addToWishlist/index.js +6 -125
  29. package/dist/destinations/google-analytics-4/addToWishlist/index.js.map +1 -1
  30. package/dist/destinations/google-analytics-4/beginCheckout/generated-types.d.ts +1 -1
  31. package/dist/destinations/google-analytics-4/beginCheckout/index.js +7 -138
  32. package/dist/destinations/google-analytics-4/beginCheckout/index.js.map +1 -1
  33. package/dist/destinations/google-analytics-4/customEvent/index.js +2 -13
  34. package/dist/destinations/google-analytics-4/customEvent/index.js.map +1 -1
  35. package/dist/destinations/google-analytics-4/ga4-properties.d.ts +17 -0
  36. package/dist/destinations/google-analytics-4/ga4-properties.js +276 -0
  37. package/dist/destinations/google-analytics-4/ga4-properties.js.map +1 -0
  38. package/dist/destinations/google-analytics-4/generateLead/index.js +4 -23
  39. package/dist/destinations/google-analytics-4/generateLead/index.js.map +1 -1
  40. package/dist/destinations/google-analytics-4/login/index.js +2 -13
  41. package/dist/destinations/google-analytics-4/login/index.js.map +1 -1
  42. package/dist/destinations/google-analytics-4/pageView/index.js +2 -13
  43. package/dist/destinations/google-analytics-4/pageView/index.js.map +1 -1
  44. package/dist/destinations/google-analytics-4/purchase/generated-types.d.ts +1 -1
  45. package/dist/destinations/google-analytics-4/purchase/index.js +11 -172
  46. package/dist/destinations/google-analytics-4/purchase/index.js.map +1 -1
  47. package/dist/destinations/google-analytics-4/refund/index.js +9 -148
  48. package/dist/destinations/google-analytics-4/refund/index.js.map +1 -1
  49. package/dist/destinations/google-analytics-4/removeFromCart/index.js +6 -125
  50. package/dist/destinations/google-analytics-4/removeFromCart/index.js.map +1 -1
  51. package/dist/destinations/google-analytics-4/search/index.js +2 -13
  52. package/dist/destinations/google-analytics-4/search/index.js.map +1 -1
  53. package/dist/destinations/google-analytics-4/selectItem/generated-types.d.ts +1 -1
  54. package/dist/destinations/google-analytics-4/selectItem/index.js +4 -114
  55. package/dist/destinations/google-analytics-4/selectItem/index.js.map +1 -1
  56. package/dist/destinations/google-analytics-4/selectPromotion/generated-types.d.ts +4 -4
  57. package/dist/destinations/google-analytics-4/selectPromotion/index.js +13 -145
  58. package/dist/destinations/google-analytics-4/selectPromotion/index.js.map +1 -1
  59. package/dist/destinations/google-analytics-4/signUp/index.js +2 -13
  60. package/dist/destinations/google-analytics-4/signUp/index.js.map +1 -1
  61. package/dist/destinations/google-analytics-4/viewCart/index.js +6 -125
  62. package/dist/destinations/google-analytics-4/viewCart/index.js.map +1 -1
  63. package/dist/destinations/google-analytics-4/viewItem/generated-types.d.ts +1 -1
  64. package/dist/destinations/google-analytics-4/viewItem/index.js +6 -130
  65. package/dist/destinations/google-analytics-4/viewItem/index.js.map +1 -1
  66. package/dist/destinations/google-analytics-4/viewItemList/index.js +4 -115
  67. package/dist/destinations/google-analytics-4/viewItemList/index.js.map +1 -1
  68. package/dist/destinations/google-analytics-4/viewPromotion/generated-types.d.ts +4 -4
  69. package/dist/destinations/google-analytics-4/viewPromotion/index.js +13 -154
  70. package/dist/destinations/google-analytics-4/viewPromotion/index.js.map +1 -1
  71. package/dist/destinations/slack/postToChannel/index.js +5 -5
  72. package/dist/destinations/slack/postToChannel/index.js.map +1 -1
  73. package/package.json +3 -3
@@ -2,142 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const actions_core_1 = require("@segment/actions-core");
4
4
  const constants_1 = require("../constants");
5
+ const ga4_properties_1 = require("../ga4-properties");
5
6
  const action = {
6
7
  title: 'View Item',
7
8
  description: 'Send event when a user views an item',
8
9
  defaultSubscription: 'type = "track" and event = "Product Viewed"',
9
10
  fields: {
10
- client_id: {
11
- label: 'Client ID',
12
- description: 'Uniquely identifies a user instance of a web client.',
13
- type: 'string',
14
- required: true,
15
- default: {
16
- '@if': {
17
- exists: { '@path': '$.userId' },
18
- then: { '@path': '$.userId' },
19
- else: { '@path': '$.anonymousId' }
20
- }
21
- }
22
- },
23
- currency: {
24
- label: 'Currency',
25
- type: 'string',
26
- description: 'Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.',
27
- default: {
28
- '@path': '$.properties.currency'
29
- }
30
- },
31
- value: {
32
- label: 'Value',
33
- type: 'number',
34
- description: 'The monetary value of the event, in units of the specified currency parameter.',
35
- default: {
36
- '@path': '$.properties.value'
37
- }
38
- },
11
+ client_id: { ...ga4_properties_1.client_id },
12
+ currency: { ...ga4_properties_1.currency },
13
+ value: { ...ga4_properties_1.value },
39
14
  items: {
40
- label: 'Products',
41
- description: 'The list of products in the event.',
42
- type: 'object',
43
- multiple: true,
44
- properties: {
45
- item_id: {
46
- label: 'Product ID',
47
- type: 'string',
48
- description: 'Identifier for the product being purchased.'
49
- },
50
- item_name: {
51
- label: 'Name',
52
- type: 'string',
53
- description: 'Name of the product being purchased.'
54
- },
55
- affiliation: {
56
- label: 'Affiliation',
57
- type: 'string',
58
- description: 'A product affiliation to designate a supplying company or brick and mortar store location.'
59
- },
60
- coupon: {
61
- label: 'Coupon',
62
- type: 'string',
63
- description: 'Coupon code used for a purchase.'
64
- },
65
- currency: {
66
- label: 'Currency',
67
- type: 'string',
68
- description: 'Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.'
69
- },
70
- discount: {
71
- label: 'Discount',
72
- type: 'number',
73
- description: 'Monetary value of discount associated with a purchase.'
74
- },
75
- index: {
76
- label: 'Index',
77
- type: 'number',
78
- description: 'The index of the item in a list.'
79
- },
80
- item_brand: {
81
- label: 'Brand',
82
- type: 'string',
83
- description: 'Brand associated with the product.'
84
- },
85
- item_category: {
86
- label: 'Category',
87
- type: 'string',
88
- description: 'Category of the product.'
89
- },
90
- item_category2: {
91
- label: 'Category2',
92
- type: 'string',
93
- description: 'The second category of the product.'
94
- },
95
- item_category3: {
96
- label: 'Category3',
97
- type: 'string',
98
- description: 'The third category of the product.'
99
- },
100
- item_category4: {
101
- label: 'Category4',
102
- type: 'string',
103
- description: 'The fourth category of the product.'
104
- },
105
- item_category5: {
106
- label: 'Category5',
107
- type: 'string',
108
- description: 'The fifth category of the product.'
109
- },
110
- item_list_id: {
111
- label: 'Item List Name',
112
- type: 'string',
113
- description: 'The ID of the list in which the item was presented to the user.'
114
- },
115
- item_list_name: {
116
- label: 'Item List Name',
117
- type: 'string',
118
- description: 'The name of the list in which the item was presented to the user.'
119
- },
120
- item_variant: {
121
- label: 'Variant',
122
- type: 'string',
123
- description: 'Variant of the product (e.g. Black).'
124
- },
125
- location_id: {
126
- label: 'Location ID',
127
- type: 'string',
128
- description: 'The location associated with the item.'
129
- },
130
- price: {
131
- label: 'Price',
132
- type: 'number',
133
- description: 'Price of the product being purchased, in units of the specified currency parameter.'
134
- },
135
- quantity: {
136
- label: 'Quantity',
137
- type: 'integer',
138
- description: 'Item quantity.'
139
- }
140
- }
15
+ ...ga4_properties_1.items_single_products,
16
+ required: true
141
17
  }
142
18
  },
143
19
  perform: (request, { payload }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/viewItem/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AAKjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,sCAAsC;IACnD,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,sDAAsD;YACnE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,2FAA2F;YACxG,OAAO,EAAE;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S;gBAC5B,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,WAAW;wBACjB,MAAM,EAAE;4BACN,QAAQ,EAAE,OAAO,CAAC,QAAQ;4BAC1B,KAAK,EAAE,WAAW;4BAClB,KAAK,EAAE,OAAO,CAAC,KAAK;yBACrB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/viewItem/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AACjD,sDAAqF;AAKrF,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,WAAW;IAClB,WAAW,EAAE,sCAAsC;IACnD,mBAAmB,EAAE,8CAA8C;IACnE,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,QAAQ,EAAE,EAAE,GAAG,yBAAQ,EAAE;QACzB,KAAK,EAAE,EAAE,GAAG,sBAAK,EAAE;QACnB,KAAK,EAAE;YACL,GAAG,sCAAqB;YACxB,QAAQ,EAAE,IAAI;SACf;KACF;IACD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,IAAI,OAAO,CAAC,QAAQ,IAAI,CAAC,8BAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACtE,MAAM,IAAI,+BAAgB,CAAC,GAAG,OAAO,CAAC,QAAQ,gCAAgC,EAAE,wBAAwB,EAAE,GAAG,CAAC,CAAA;SAC/G;QAED,IAAI,WAAW,GAAkB,EAAE,CAAA;QAEnC,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBAC1C,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,OAAO,KAAK,SA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ions_core_1 = require("@segment/actions-core");
4
4
  const constants_1 = require("../constants");
5
+ const ga4_properties_1 = require("../ga4-properties");
5
6
  const action = {
6
7
  title: 'View Item List',
7
8
  description: 'Send event when a user views a list of items or offerings',
8
9
  defaultSubscription: 'type = "track" and event = "Product List Viewed"',
9
10
  fields: {
10
- client_id: {
11
- label: 'Client ID',
12
- description: 'Uniquely identifies a user instance of a web client.',
13
- type: 'string',
14
- required: true,
15
- default: {
16
- '@if': {
17
- exists: { '@path': '$.userId' },
18
- then: { '@path': '$.userId' },
19
- else: { '@path': '$.anonymousId' }
20
- }
21
- }
22
- },
11
+ client_id: { ...ga4_properties_1.client_id },
23
12
  item_list_id: {
24
13
  label: 'Item List ID',
25
14
  type: 'string',
@@ -37,108 +26,8 @@ const action = {
37
26
  }
38
27
  },
39
28
  items: {
40
- label: 'Products',
41
- description: 'The list of products in the event.',
42
- type: 'object',
43
- multiple: true,
44
- required: true,
45
- properties: {
46
- item_id: {
47
- label: 'Product ID',
48
- type: 'string',
49
- description: 'Identifier for the product being purchased.'
50
- },
51
- item_name: {
52
- label: 'Name',
53
- type: 'string',
54
- description: 'Name of the product being purchased.'
55
- },
56
- affiliation: {
57
- label: 'Affiliation',
58
- type: 'string',
59
- description: 'A product affiliation to designate a supplying company or brick and mortar store location.'
60
- },
61
- coupon: {
62
- label: 'Coupon',
63
- type: 'string',
64
- description: 'Coupon code used for a purchase.'
65
- },
66
- currency: {
67
- label: 'Currency',
68
- type: 'string',
69
- description: 'Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.'
70
- },
71
- discount: {
72
- label: 'Discount',
73
- type: 'number',
74
- description: 'Monetary value of discount associated with a purchase.'
75
- },
76
- index: {
77
- label: 'Index',
78
- type: 'number',
79
- description: 'The index/position of the item in a list.'
80
- },
81
- item_brand: {
82
- label: 'Brand',
83
- type: 'string',
84
- description: 'Brand associated with the product.'
85
- },
86
- item_category: {
87
- label: 'Category',
88
- type: 'string',
89
- description: 'The category of the item.'
90
- },
91
- item_category2: {
92
- label: 'Category 2',
93
- type: 'string',
94
- description: 'The second category hierarchy or additional taxonomy for the item.'
95
- },
96
- item_category3: {
97
- label: 'Category 3',
98
- type: 'string',
99
- description: 'The third category hierarchy or additional taxonomy for the item.'
100
- },
101
- item_category4: {
102
- label: 'Category 4',
103
- type: 'string',
104
- description: 'The fourth category hierarchy or additional taxonomy for the item.'
105
- },
106
- item_category5: {
107
- label: 'Category 5',
108
- type: 'string',
109
- description: 'The fifth category hierarchy or additional taxonomy for the item.'
110
- },
111
- item_list_id: {
112
- label: 'Item List ID',
113
- type: 'string',
114
- description: 'The ID of the list in which the item was presented to the user.'
115
- },
116
- item_list_name: {
117
- label: 'Item List Name',
118
- type: 'string',
119
- description: 'The name of the list in which the item was presented to the user.'
120
- },
121
- item_variant: {
122
- label: 'Variant',
123
- type: 'string',
124
- description: 'Variant of the product (e.g. Black).'
125
- },
126
- location_id: {
127
- label: 'Location ID',
128
- type: 'string',
129
- description: 'The location associated with the item.'
130
- },
131
- price: {
132
- label: 'Price',
133
- type: 'number',
134
- description: 'Price of the product being purchased, in units of the specified currency parameter.'
135
- },
136
- quantity: {
137
- label: 'Quantity',
138
- type: 'number',
139
- description: 'Item Quantity'
140
- }
141
- }
29
+ ...ga4_properties_1.items_multi_products,
30
+ required: true
142
31
  }
143
32
  },
144
33
  perform: (request, { payload }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/viewItemList/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AASjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,2DAA2D;IACxE,mBAAmB,EAAE,kDAAkD;IACvE,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,sDAAsD;YACnE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;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OAAO,OAAsB,CAAA;YAC/B,CAAC,CAAC,CAAA;SACH;QAED,OAAO,OAAO,CAAC,6CAA6C,EAAE;YAC5D,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,MAAM,EAAE;oBACN;wBACE,IAAI,EAAE,gBAAgB;wBACtB,MAAM,EAAE;4BACN,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,cAAc,EAAE,OAAO,CAAC,cAAc;4BACtC,KAAK,EAAE,WAAW;yBACnB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -11,8 +11,6 @@ export interface Payload {
11
11
  affiliation?: string;
12
12
  coupon?: string;
13
13
  currency?: string;
14
- creative_name?: string;
15
- creative_slot?: string;
16
14
  discount?: number;
17
15
  index?: number;
18
16
  item_brand?: string;
@@ -26,8 +24,10 @@ export interface Payload {
26
24
  item_variant?: string;
27
25
  location_id?: string;
28
26
  price?: number;
29
- promotion_id?: string;
30
- promotion_name?: string;
31
27
  quantity?: number;
28
+ creative_name?: string;
29
+ creative_slot?: string;
30
+ promotion_name?: string;
31
+ promotion_id?: string;
32
32
  }[];
33
33
  }
@@ -2,37 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const actions_core_1 = require("@segment/actions-core");
4
4
  const constants_1 = require("../constants");
5
+ const ga4_properties_1 = require("../ga4-properties");
5
6
  const action = {
6
7
  title: 'View Promotion',
7
8
  description: 'Send event when a promotion is shown to a user',
8
9
  defaultSubscription: 'type = "track" and event = "Promotion Viewed"',
9
10
  fields: {
10
- client_id: {
11
- label: 'Client ID',
12
- description: 'Uniquely identifies a user instance of a web client.',
13
- type: 'string',
14
- required: true,
15
- default: {
16
- '@if': {
17
- exists: { '@path': '$.userId' },
18
- then: { '@path': '$.userId' },
19
- else: { '@path': '$.anonymousId' }
20
- }
21
- }
22
- },
23
- creative_name: {
24
- label: 'Creative Name',
25
- type: 'string',
26
- description: 'The name of the promotional creative.'
27
- },
28
- creative_slot: {
29
- label: 'Creative Slot',
30
- type: 'string',
31
- description: 'The name of the promotional creative slot associated with the event.',
32
- default: {
33
- '@path': '$.properties.creative'
34
- }
35
- },
11
+ client_id: { ...ga4_properties_1.client_id },
12
+ creative_name: { ...ga4_properties_1.creative_name },
13
+ creative_slot: { ...ga4_properties_1.creative_slot, default: { '@path': '$.properties.creative' } },
36
14
  location_id: {
37
15
  label: 'Location ID',
38
16
  type: 'string',
@@ -41,143 +19,24 @@ const action = {
41
19
  '@path': '$.properties.position'
42
20
  }
43
21
  },
44
- promotion_id: {
45
- label: 'Promotion ID',
46
- type: 'string',
47
- description: 'The ID of the promotion associated with the event.',
48
- default: {
49
- '@path': '$.properties.promotion_id'
50
- }
51
- },
52
- promotion_name: {
53
- label: 'Promotion Name',
54
- type: 'string',
55
- description: 'The name of the promotion associated with the event.',
56
- default: {
57
- '@path': '$.properties.name'
58
- }
59
- },
22
+ promotion_id: { ...ga4_properties_1.promotion_id, default: { '@path': '$.properties.promotion_id' } },
23
+ promotion_name: { ...ga4_properties_1.promotion_name, default: { '@path': '$.properties.name' } },
60
24
  items: {
61
- label: 'Products',
62
- description: 'The list of products in the event.',
63
- type: 'object',
64
- multiple: true,
25
+ ...ga4_properties_1.items_single_products,
65
26
  required: true,
66
27
  properties: {
67
- item_id: {
68
- label: 'Product ID',
69
- type: 'string',
70
- description: 'Identifier for the product being purchased.'
71
- },
72
- item_name: {
73
- label: 'Name',
74
- type: 'string',
75
- description: 'Name of the product being purchased.'
76
- },
77
- affiliation: {
78
- label: 'Affiliation',
79
- type: 'string',
80
- description: 'A product affiliation to designate a supplying company or brick and mortar store location.'
81
- },
82
- coupon: {
83
- label: 'Coupon',
84
- type: 'string',
85
- description: 'Coupon code used for a purchase.'
86
- },
87
- currency: {
88
- label: 'Currency',
89
- type: 'string',
90
- description: 'Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.'
91
- },
28
+ ...ga4_properties_1.minimal_items.properties,
92
29
  creative_name: {
93
- label: 'Creative Name',
94
- type: 'string',
95
- description: 'The name of the promotional creative.'
30
+ ...ga4_properties_1.creative_name
96
31
  },
97
32
  creative_slot: {
98
- label: 'Creative Slot',
99
- type: 'string',
100
- description: 'The name of the promotional creative slot associated with the item.'
101
- },
102
- discount: {
103
- label: 'Discount',
104
- type: 'number',
105
- description: 'Monetary value of discount associated with a purchase.'
106
- },
107
- index: {
108
- label: 'Index',
109
- type: 'number',
110
- description: 'The index/position of the item in a list.'
111
- },
112
- item_brand: {
113
- label: 'Brand',
114
- type: 'string',
115
- description: 'Brand associated with the product.'
116
- },
117
- item_category: {
118
- label: 'Category',
119
- type: 'string',
120
- description: 'The category of the item.'
121
- },
122
- item_category2: {
123
- label: 'Category 2',
124
- type: 'string',
125
- description: 'The second category hierarchy or additional taxonomy for the item.'
126
- },
127
- item_category3: {
128
- label: 'Category 3',
129
- type: 'string',
130
- description: 'The third category hierarchy or additional taxonomy for the item.'
131
- },
132
- item_category4: {
133
- label: 'Category 4',
134
- type: 'string',
135
- description: 'The fourth category hierarchy or additional taxonomy for the item.'
136
- },
137
- item_category5: {
138
- label: 'Category 5',
139
- type: 'string',
140
- description: 'The fifth category hierarchy or additional taxonomy for the item.'
141
- },
142
- item_list_id: {
143
- label: 'Item List ID',
144
- type: 'string',
145
- description: 'The ID of the list in which the item was presented to the user.'
146
- },
147
- item_list_name: {
148
- label: 'Item List Name',
149
- type: 'string',
150
- description: 'The name of the list in which the item was presented to the user.'
151
- },
152
- item_variant: {
153
- label: 'Variant',
154
- type: 'string',
155
- description: 'Variant of the product (e.g. Black).'
156
- },
157
- location_id: {
158
- label: 'Location ID',
159
- type: 'string',
160
- description: 'The location associated with the item.'
161
- },
162
- price: {
163
- label: 'Price',
164
- type: 'number',
165
- description: 'Price of the product being purchased, in units of the specified currency parameter.'
166
- },
167
- promotion_id: {
168
- label: 'Promotion ID',
169
- type: 'string',
170
- description: 'The ID of the promotion associated with the item.'
33
+ ...ga4_properties_1.creative_slot
171
34
  },
172
35
  promotion_name: {
173
- label: 'Promotion Name',
174
- type: 'string',
175
- description: 'The name of the promotion associated with the item.'
36
+ ...ga4_properties_1.promotion_name
176
37
  },
177
- quantity: {
178
- label: 'Quantity',
179
- type: 'number',
180
- description: 'Item Quantity'
38
+ promotion_id: {
39
+ ...ga4_properties_1.promotion_id
181
40
  }
182
41
  }
183
42
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/viewPromotion/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AASjD,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,gDAAgD;IAC7D,mBAAmB,EAAE,+CAA+C;IACpE,MAAM,EAAE;QACN,SAAS,EAAE;YACT,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,sDAAsD;YACnE,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE;gBACP,KAAK,EAAE;oBACL,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC/B,IAAI,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;oBAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE;iBACnC;aACF;SACF;QACD,aAAa,EAAE;YACb,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,uCAAuC;SACrD;QACD,aAAa,EAAE;YACb,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,sEAAsE;YACnF,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;aACjC;SACF;QACD,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yBAAyB;YACtC,OAAO,EAAE;gBACP,OAAO,EAAE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EAAE;4BACN,aAAa,EAAE,OAAO,CAAC,aAAa;4BACpC,aAAa,EAAE,OAAO,CAAC,aAAa;4BACpC,WAAW,EAAE,OAAO,CAAC,WAAW;4BAChC,YAAY,EAAE,OAAO,CAAC,YAAY;4BAClC,cAAc,EAAE,OAAO,CAAC,cAAc;4BACtC,KAAK,EAAE,WAAW;yBACnB;qBACF;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/google-analytics-4/viewPromotion/index.ts"],"names":[],"mappings":";;AAAA,wDAA0E;AAC1E,4CAAiD;AACjD,sDAQ0B;AAS1B,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,gBAAgB;IACvB,WAAW,EAAE,gDAAgD;IAC7D,mBAAmB,EAAE,+CAA+C;IACpE,MAAM,EAAE;QACN,SAAS,EAAE,EAAE,GAAG,0BAAS,EAAE;QAC3B,aAAa,EAAE,EAAE,GAAG,8BAAa,EAAE;QACnC,aAAa,EAAE,EAAE,GAAG,8BAAa,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE,EAAE;QAClF,WAAW,EAAE;YACX,KAAK,EAAE,aAAa;YACpB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,yBAAyB;YACtC,OAAO,EAAE;gBACP,OAAO,EAAE,uBAAuB;aACjC;SACF;QACD,YAAY,EAAE,EAAE,GAAG,6BAAY,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,EAAE;QACpF,cAAc,EAAE,EAAE,GAAG,+BAAc,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,mBAAmB,EAAE,EAAE;QAChF,KAAK,EAAE;YACL,GAAG,sCAAqB;YACxB,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE;gBACV,GAAG,8BAAa,CAAC,UAAU;gBAC3B,aAAa,EAAE;oBACb,GAAG,8BAAa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F;iBACF;aACF;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
@@ -2,11 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const action = {
4
4
  title: 'Post Message',
5
- description: 'Post a message to a Slack channel.',
5
+ description: 'Post a message to the specified Slack workspace and channel when the associated trigger criteria are met.',
6
6
  fields: {
7
7
  url: {
8
8
  label: 'Webhook URL',
9
- description: 'Slack webhook URL.',
9
+ description: 'The webhook provided by Slack to connect with the desired Slack workspace.',
10
10
  type: 'string',
11
11
  required: true,
12
12
  format: 'uri'
@@ -19,18 +19,18 @@ const action = {
19
19
  },
20
20
  channel: {
21
21
  label: 'Channel',
22
- description: 'Slack channel to post message to.',
22
+ description: 'The channel within the Slack workspace. Do not include the `#` character. For example, use `general`, not `#general`.',
23
23
  type: 'string'
24
24
  },
25
25
  username: {
26
26
  label: 'User',
27
- description: 'User name to post messages as.',
27
+ description: 'The sender of the posted message.',
28
28
  type: 'string',
29
29
  default: 'Segment'
30
30
  },
31
31
  icon_url: {
32
32
  label: 'Icon URL',
33
- description: 'URL for user icon image.',
33
+ description: 'The URL of the image that appears next to the User.',
34
34
  type: 'string',
35
35
  default: 'https://logo.clearbit.com/segment.com'
36
36
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/slack/postToChannel/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,oCAAoC;IACjD,MAAM,EAAE;QACN,GAAG,EAAE;YACH,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,oBAAoB;YACjC,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,KAAK;SACd;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,kIAAkI;YACpI,IAAI,EAAE,MAAM;SACb;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,mCAAmC;YAChD,IAAI,EAAE,QAAQ;SACf;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,gCAAgC;YAC7C,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,SAAS;SACnB;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,0BAA0B;YACvC,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,uCAAuC;SACjD;KACF;IAED,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE;YAC1B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;aAC3B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/destinations/slack/postToChannel/index.ts"],"names":[],"mappings":";;AAIA,MAAM,MAAM,GAAwC;IAClD,KAAK,EAAE,cAAc;IACrB,WAAW,EACT,2GAA2G;IAC7G,MAAM,EAAE;QACN,GAAG,EAAE;YACH,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,4EAA4E;YACzF,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,KAAK;SACd;QACD,IAAI,EAAE;YACJ,KAAK,EAAE,SAAS;YAChB,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,kIAAkI;YACpI,IAAI,EAAE,MAAM;SACb;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EACT,uHAAuH;YACzH,IAAI,EAAE,QAAQ;SACf;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,MAAM;YACb,WAAW,EAAE,mCAAmC;YAChD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,SAAS;SACnB;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,qDAAqD;YAClE,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,uCAAuC;SACjD;KACF;IAED,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;QAChC,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE;YAC1B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE;gBACJ,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;aAC3B;SACF,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAED,kBAAe,MAAM,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@segment/action-destinations",
3
3
  "description": "Destination Actions engine and definitions.",
4
- "version": "3.30.2-alpha.6",
4
+ "version": "3.31.1-alpha.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/segmentio/action-destinations",
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@amplitude/ua-parser-js": "^0.7.25",
41
- "@segment/actions-core": "^3.21.1-alpha.6",
41
+ "@segment/actions-core": "^3.21.2-alpha.2",
42
42
  "dayjs": "^1.10.7",
43
43
  "lodash": "^4.17.21",
44
44
  "mustache": "^4.2.0"
@@ -58,5 +58,5 @@
58
58
  "<rootDir>/test/setup-after-env.ts"
59
59
  ]
60
60
  },
61
- "gitHead": "90793a74bafec209dbb87a448f21ff93ecbae01f"
61
+ "gitHead": "69bff55b7890f903a24e9274a76a32c0db9d2862"
62
62
  }