@artsy/cohesion 4.243.0 → 4.244.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,16 @@
1
+ # v4.244.0 (Sun Mar 16 2025)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - feat(imports): Add CmsBatchImport events [#562](https://github.com/artsy/cohesion/pull/562) ([@damassi](https://github.com/damassi) [@leodmz](https://github.com/leodmz))
6
+
7
+ #### Authors: 2
8
+
9
+ - Christopher Pappas ([@damassi](https://github.com/damassi))
10
+ - Leo Demazeau ([@leodmz](https://github.com/leodmz))
11
+
12
+ ---
13
+
1
14
  # v4.243.0 (Fri Mar 14 2025)
2
15
 
3
16
  #### 🚀 Enhancement
@@ -0,0 +1,126 @@
1
+ /**
2
+ * Schemas describing CMS BatchImportFlow events
3
+ * @packageDocumentation
4
+ */
5
+ import { CmsContextModule } from "../Values/CmsContextModule";
6
+ import { CmsOwnerType } from "../Values/CmsOwnerType";
7
+ import { CmsActionType } from "./index";
8
+ /**
9
+ * A partner has clicked the import button and started the flow.
10
+ *
11
+ * @example
12
+ * ```
13
+ * {
14
+ * context_module: "batchImportFlow",
15
+ * context_page_owner_type: "batchImport",
16
+ * context_page_owner_id: "67b646ecbe87376bfeb3f962",
17
+ * label: "click import",
18
+ * referrer: ""
19
+ * }
20
+ * ```
21
+ */
22
+ export interface CmsBatchImportFlowClickImport {
23
+ context_module: CmsContextModule.batchImportFlow;
24
+ context_page_owner_type: CmsOwnerType.batchImport;
25
+ context_page_owner_id: string;
26
+ label: "click import works";
27
+ referrer: "";
28
+ }
29
+ /**
30
+ * A partner has clicked to add a CSV file.
31
+ *
32
+ * @example
33
+ * ```
34
+ * {
35
+ * context_module: "batchImportFlow",
36
+ * context_page_owner_type: "batchImport",
37
+ * context_page_owner_id: "67b646ecbe87376bfeb3f962",
38
+ * label: "click add CSV"
39
+ * }
40
+ * ```
41
+ */
42
+ export interface CmsBatchImportFlowClickAddCSV {
43
+ context_module: CmsContextModule.batchImportFlow;
44
+ context_page_owner_type: CmsOwnerType.batchImport;
45
+ context_page_owner_id: string;
46
+ label: "click add CSV";
47
+ }
48
+ /**
49
+ * A partner has clicked to download the template.
50
+ *
51
+ * @example
52
+ * ```
53
+ * {
54
+ * context_module: "batchImportFlow",
55
+ * context_page_owner_type: "batchImport",
56
+ * context_page_owner_id: "67b646ecbe87376bfeb3f962",
57
+ * label: "click download template"
58
+ * }
59
+ * ```
60
+ */
61
+ export interface CmsBatchImportFlowClickDownloadTemplate {
62
+ context_module: CmsContextModule.batchImportFlow;
63
+ context_page_owner_type: CmsOwnerType.batchImport;
64
+ context_page_owner_id: string;
65
+ label: "click download template";
66
+ }
67
+ /**
68
+ * Some artworks have missing information warnings.
69
+ *
70
+ * @example
71
+ * ```
72
+ * {
73
+ * event: "shownMissingInformation",
74
+ * context_page_owner_type: "batchImport",
75
+ * context_page_owner_id: "67b646ecbe87376bfeb3f962",
76
+ * // number of artworks with warnings
77
+ * value: 5
78
+ * }
79
+ * ```
80
+ */
81
+ export interface CmsBatchImportFlowShownMissingInformation {
82
+ event: CmsActionType.shownMissingInformation;
83
+ context_page_owner_type: CmsOwnerType.batchImport;
84
+ context_page_owner_id: string;
85
+ value: number;
86
+ }
87
+ /**
88
+ * Artists need matching during the batch import.
89
+ *
90
+ * @example
91
+ * ```
92
+ * {
93
+ * event: "artistNeedsMatching",
94
+ * context_page_owner_type: "batchImportArtistMatching",
95
+ * context_page_owner_id: "67b646ecbe87376bfeb3f962",
96
+ * // number of artists with missing matching
97
+ * value: 3
98
+ * }
99
+ * ```
100
+ */
101
+ export interface CmsBatchImportFlowArtistNeedsMatching {
102
+ event: CmsActionType.artistNeedsMatching;
103
+ context_page_owner_type: CmsOwnerType.batchImportArtistMatching;
104
+ context_page_owner_id: string;
105
+ value: number;
106
+ }
107
+ /**
108
+ * Partners click to exit the batch import flow
109
+ *
110
+ * @example
111
+ * ```
112
+ * {
113
+ * context_module: "batchImportFlow",
114
+ * context_page_owner_type: "batchImport",
115
+ * context_page_owner_id: "67b646ecbe87376bfeb3f962",
116
+ * label: "click import"
117
+ * }
118
+ * ```
119
+ */
120
+ export interface CmsBatchImportClickExit {
121
+ context_module: CmsContextModule.batchImportFlow;
122
+ context_page_owner_type: CmsOwnerType.batchImport;
123
+ context_page_owner_id: string;
124
+ label: "click exit";
125
+ }
126
+ export type CmsBatchImportFlow = CmsBatchImportFlowClickImport | CmsBatchImportFlowClickAddCSV | CmsBatchImportFlowClickDownloadTemplate | CmsBatchImportFlowShownMissingInformation | CmsBatchImportFlowArtistNeedsMatching | CmsBatchImportClickExit;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,22 @@
1
+ import { CmsBatchImportFlow } from "./BatchImportFlow";
2
+ /**
3
+ * List of valid schemas for CMS analytics actions
4
+ *
5
+ * Each event describes one ActionType
6
+ */
7
+ export type CmsEvent = CmsBatchImportFlow;
8
+ /**
9
+ * List of all CMS actions
10
+ *
11
+ * Each CmsActionType corresponds with a table in Redshift.
12
+ */
13
+ export declare enum CmsActionType {
14
+ /**
15
+ * Corresponds to {@link CmsBatchImportFlow}
16
+ */
17
+ artistNeedsMatching = "artistNeedsMatching",
18
+ /**
19
+ * Corresponds to {@link BatchImportFlow}
20
+ */
21
+ shownMissingInformation = "shownMissingInformation"
22
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CmsActionType = void 0;
7
+
8
+ /**
9
+ * List of valid schemas for CMS analytics actions
10
+ *
11
+ * Each event describes one ActionType
12
+ */
13
+
14
+ /**
15
+ * List of all CMS actions
16
+ *
17
+ * Each CmsActionType corresponds with a table in Redshift.
18
+ */
19
+ var CmsActionType;
20
+ exports.CmsActionType = CmsActionType;
21
+
22
+ (function (CmsActionType) {
23
+ CmsActionType["artistNeedsMatching"] = "artistNeedsMatching";
24
+ CmsActionType["shownMissingInformation"] = "shownMissingInformation";
25
+ })(CmsActionType || (exports.CmsActionType = CmsActionType = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * All context modules available for CMS
3
+ *
4
+ * A component where an action is triggered
5
+ * @packageDocumentation
6
+ */
7
+ export declare enum CmsContextModule {
8
+ batchImportFlow = "batchImportFlow"
9
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CmsContextModule = void 0;
7
+
8
+ /**
9
+ * All context modules available for CMS
10
+ *
11
+ * A component where an action is triggered
12
+ * @packageDocumentation
13
+ */
14
+ var CmsContextModule;
15
+ exports.CmsContextModule = CmsContextModule;
16
+
17
+ (function (CmsContextModule) {
18
+ CmsContextModule["batchImportFlow"] = "batchImportFlow";
19
+ })(CmsContextModule || (exports.CmsContextModule = CmsContextModule = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * All owner types available for CMS
3
+ *
4
+ * @packageDocumentation
5
+ */
6
+ export declare enum CmsOwnerType {
7
+ batchImport = "batchImport",
8
+ batchImportArtistMatching = "batchImportArtistMatching"
9
+ }
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CmsOwnerType = void 0;
7
+
8
+ /**
9
+ * All owner types available for CMS
10
+ *
11
+ * @packageDocumentation
12
+ */
13
+ var CmsOwnerType;
14
+ exports.CmsOwnerType = CmsOwnerType;
15
+
16
+ (function (CmsOwnerType) {
17
+ CmsOwnerType["batchImport"] = "batchImport";
18
+ CmsOwnerType["batchImportArtistMatching"] = "batchImportArtistMatching";
19
+ })(CmsOwnerType || (exports.CmsOwnerType = CmsOwnerType = {}));
@@ -1,3 +1,6 @@
1
+ /**
2
+ * Web and iOS exports
3
+ */
1
4
  export * from "./Events";
2
5
  export * from "./Events/ActivityPanel";
3
6
  export * from "./Events/AddToCalendar";
@@ -29,3 +32,9 @@ export * from "./Values/Intent";
29
32
  export * from "./Values/OwnerType";
30
33
  export * from "./Values/PushNotificationType";
31
34
  export * from "./Values/Tab";
35
+ /**
36
+ * CMS-specific exports
37
+ */
38
+ export * from "./CMS/Events";
39
+ export * from "./CMS/Values/CmsContextModule";
40
+ export * from "./CMS/Values/CmsOwnerType";
@@ -374,4 +374,40 @@ Object.keys(_Tab).forEach(function (key) {
374
374
  return _Tab[key];
375
375
  }
376
376
  });
377
+ });
378
+
379
+ var _Events2 = require("./CMS/Events");
380
+
381
+ Object.keys(_Events2).forEach(function (key) {
382
+ if (key === "default" || key === "__esModule") return;
383
+ Object.defineProperty(exports, key, {
384
+ enumerable: true,
385
+ get: function get() {
386
+ return _Events2[key];
387
+ }
388
+ });
389
+ });
390
+
391
+ var _CmsContextModule = require("./CMS/Values/CmsContextModule");
392
+
393
+ Object.keys(_CmsContextModule).forEach(function (key) {
394
+ if (key === "default" || key === "__esModule") return;
395
+ Object.defineProperty(exports, key, {
396
+ enumerable: true,
397
+ get: function get() {
398
+ return _CmsContextModule[key];
399
+ }
400
+ });
401
+ });
402
+
403
+ var _CmsOwnerType = require("./CMS/Values/CmsOwnerType");
404
+
405
+ Object.keys(_CmsOwnerType).forEach(function (key) {
406
+ if (key === "default" || key === "__esModule") return;
407
+ Object.defineProperty(exports, key, {
408
+ enumerable: true,
409
+ get: function get() {
410
+ return _CmsOwnerType[key];
411
+ }
412
+ });
377
413
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/cohesion",
3
- "version": "4.243.0",
3
+ "version": "4.244.0",
4
4
  "description": "Analytics schema",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {