@artsy/cohesion 4.34.0 → 4.35.0

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 CHANGED
@@ -1,3 +1,28 @@
1
+ # v4.35.0 (Fri Mar 11 2022)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - fix: add missing export for ExperimentViewed [#309](https://github.com/artsy/cohesion/pull/309) ([@mc-jones](https://github.com/mc-jones))
6
+
7
+ #### Authors: 1
8
+
9
+ - Matt Jones ([@mc-jones](https://github.com/mc-jones))
10
+
11
+ ---
12
+
13
+ # v4.34.1 (Wed Mar 09 2022)
14
+
15
+ #### 🐛 Bug Fix
16
+
17
+ - adding experiment [#304](https://github.com/artsy/cohesion/pull/304) ([@pvinis](https://github.com/pvinis) [@mc-jones](https://github.com/mc-jones))
18
+
19
+ #### Authors: 2
20
+
21
+ - Matt Jones ([@mc-jones](https://github.com/mc-jones))
22
+ - Pavlos Vinieratos ([@pvinis](https://github.com/pvinis))
23
+
24
+ ---
25
+
1
26
  # v4.34.0 (Wed Mar 09 2022)
2
27
 
3
28
  #### 🚀 Enhancement
@@ -0,0 +1,38 @@
1
+ import { OwnerType } from "../Values/OwnerType";
2
+ import { ActionType } from ".";
3
+ /**
4
+ * Schemas describing experiment events
5
+ * @packageDocumentation
6
+ */
7
+ /**
8
+ * A user received an experiment on Artsy.
9
+ *
10
+ * This schema describes events sent to Segment from [[experimentViewed]].
11
+ *
12
+ * @example
13
+ * ```
14
+ * {
15
+ * action: "experimentViewed",
16
+ * service: "unleash",
17
+ * experiment_name: "some_experiment_we_are_running",
18
+ * variant_name: "cool_new_variant",
19
+ * payload: "10", // optional
20
+ * context_owner_type: "artwork",
21
+ * context_owner_id: "55ed8ca57261693d930000b8",
22
+ * }
23
+ * ```
24
+ *
25
+ * `payload` is used for variable values that can be sent to the clients as part of the variant.
26
+ * Specifically for Unleash, find some docs about `payload` here:
27
+ * https://docs.getunleash.io/advanced/toggle_variants#variant-payload.
28
+ */
29
+ export interface ExperimentViewed {
30
+ action: ActionType.experimentViewed;
31
+ service: "unleash" | string;
32
+ experiment_name: string;
33
+ variant_name: "control" | string;
34
+ payload?: string;
35
+ context_owner_type: OwnerType;
36
+ context_owner_id?: string;
37
+ context_owner_slug?: string;
38
+ }
@@ -0,0 +1 @@
1
+ "use strict";
@@ -323,6 +323,10 @@ export declare enum ActionType {
323
323
  * Corresponds to {@link Share}
324
324
  */
325
325
  share = "share",
326
+ /**
327
+ * Corresponds to {@link ExperimentViewed}
328
+ */
329
+ experimentViewed = "experimentViewed",
326
330
  /**
327
331
  * Corresponds to {@link SubmitAnotherArtwork}
328
332
  */
@@ -94,6 +94,7 @@ exports.ActionType = ActionType;
94
94
  ActionType["sentArtworkInquiry"] = "sentArtworkInquiry";
95
95
  ActionType["sentConversationMessage"] = "sentConversationMessage";
96
96
  ActionType["share"] = "share";
97
+ ActionType["experimentViewed"] = "experimentViewed";
97
98
  ActionType["submitAnotherArtwork"] = "submitAnotherArtwork";
98
99
  ActionType["successfullyLoggedIn"] = "successfullyLoggedIn";
99
100
  ActionType["tappedArticleGroup"] = "tappedArticleGroup";
@@ -3,6 +3,7 @@ export * from "./Events/AddToCalendar";
3
3
  export * from "./Events/Authentication";
4
4
  export * from "./Events/Click";
5
5
  export * from "./Events/Conversations";
6
+ export * from "./Events/ExperimentViewed";
6
7
  export * from "./Events/Inquiries";
7
8
  export * from "./Events/FilterAndSort";
8
9
  export * from "./Events/MyCollection";
@@ -64,6 +64,18 @@ Object.keys(_Conversations).forEach(function (key) {
64
64
  });
65
65
  });
66
66
 
67
+ var _ExperimentViewed = require("./Events/ExperimentViewed");
68
+
69
+ Object.keys(_ExperimentViewed).forEach(function (key) {
70
+ if (key === "default" || key === "__esModule") return;
71
+ Object.defineProperty(exports, key, {
72
+ enumerable: true,
73
+ get: function get() {
74
+ return _ExperimentViewed[key];
75
+ }
76
+ });
77
+ });
78
+
67
79
  var _Inquiries = require("./Events/Inquiries");
68
80
 
69
81
  Object.keys(_Inquiries).forEach(function (key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/cohesion",
3
- "version": "4.34.0",
3
+ "version": "4.35.0",
4
4
  "description": "Analytics schema",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {