@artsy/cohesion 4.373.0 → 4.374.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,15 @@
1
+ # v4.374.0 (Sat Jun 27 2026)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - chore(os): Add tracking schema for Art OS Filter, Sort, Search [#714](https://github.com/artsy/cohesion/pull/714) ([@olerichter00](https://github.com/olerichter00))
6
+
7
+ #### Authors: 1
8
+
9
+ - Ole ([@olerichter00](https://github.com/olerichter00))
10
+
11
+ ---
12
+
1
13
  # v4.373.0 (Fri Jun 26 2026)
2
14
 
3
15
  #### 🚀 Enhancement
@@ -54,6 +54,7 @@ export * from "./os/Events";
54
54
  export * from "./os/Events/BrandKit";
55
55
  export * from "./os/Events/Click";
56
56
  export * from "./os/Events/ConnectedAppsFlow";
57
+ export * from "./os/Events/FilterSortSearch";
57
58
  export * from "./os/Events/InstagramEditor";
58
59
  export * from "./os/Events/InventoryTable";
59
60
  export * from "./os/Events/MaterialsEditor";
@@ -568,6 +568,18 @@ Object.keys(_ConnectedAppsFlow).forEach(function (key) {
568
568
  });
569
569
  });
570
570
 
571
+ var _FilterSortSearch = require("./os/Events/FilterSortSearch");
572
+
573
+ Object.keys(_FilterSortSearch).forEach(function (key) {
574
+ if (key === "default" || key === "__esModule") return;
575
+ Object.defineProperty(exports, key, {
576
+ enumerable: true,
577
+ get: function get() {
578
+ return _FilterSortSearch[key];
579
+ }
580
+ });
581
+ });
582
+
571
583
  var _InstagramEditor = require("./os/Events/InstagramEditor");
572
584
 
573
585
  Object.keys(_InstagramEditor).forEach(function (key) {
@@ -0,0 +1,162 @@
1
+ import { OsContextModule } from "../Values/OsContextModule";
2
+ import { OsOwnerType } from "../Values/OsOwnerType";
3
+ import { OsActionType } from ".";
4
+ /**
5
+ * Schemas describing Art OS Filter, Sort & Search events
6
+ * @packageDocumentation
7
+ */
8
+ /**
9
+ * A partner opens the filter drawer via the Filter pill in the inventory or collection view.
10
+ *
11
+ * This schema describes events sent to Segment from [[OsClickedFilterDrawer]]
12
+ *
13
+ * @example
14
+ * ```
15
+ * {
16
+ * action: "clickedFilterDrawer",
17
+ * context_module: "artworkFilters",
18
+ * context_page_owner_type: "inventory",
19
+ * value: 2
20
+ * }
21
+ * ```
22
+ */
23
+ export interface OsClickedFilterDrawer {
24
+ action: OsActionType.clickedFilterDrawer;
25
+ context_module: OsContextModule.artworkFilters;
26
+ context_page_owner_type: OsOwnerType.inventory | OsOwnerType.collection;
27
+ /** Number of active filters when opening the drawer */
28
+ value: number;
29
+ }
30
+ /**
31
+ * A partner applies a filter in the filter drawer.
32
+ * One event fires per selection; `label` identifies the filter type
33
+ * and `value` carries the selected value.
34
+ *
35
+ * This schema describes events sent to Segment from [[OsAppliedFilter]]
36
+ *
37
+ * @example Availability filter
38
+ * ```
39
+ * {
40
+ * action: "appliedFilter",
41
+ * context_module: "artworkFilters",
42
+ * context_page_owner_type: "inventory",
43
+ * label: "availability",
44
+ * value: "for sale"
45
+ * }
46
+ * ```
47
+ *
48
+ * @example Artist filter
49
+ * ```
50
+ * {
51
+ * action: "appliedFilter",
52
+ * context_module: "artworkFilters",
53
+ * context_page_owner_type: "collection",
54
+ * label: "artist",
55
+ * value: "<artistId>"
56
+ * }
57
+ * ```
58
+ */
59
+ export interface OsAppliedFilter {
60
+ action: OsActionType.appliedFilter;
61
+ context_module: OsContextModule.artworkFilters;
62
+ context_page_owner_type: OsOwnerType.inventory | OsOwnerType.collection;
63
+ label: "availability" | "status" | "location" | "artist" | "coa";
64
+ value: string;
65
+ }
66
+ /**
67
+ * A partner removes a single filter via the selected-filter pill or the per-section Clear link.
68
+ *
69
+ * This schema describes events sent to Segment from [[OsRemovedFilter]]
70
+ *
71
+ * @example
72
+ * ```
73
+ * {
74
+ * action: "removedFilter",
75
+ * context_module: "artworkFilters",
76
+ * context_page_owner_type: "inventory",
77
+ * label: "availability",
78
+ * value: "for sale"
79
+ * }
80
+ * ```
81
+ */
82
+ export interface OsRemovedFilter {
83
+ action: OsActionType.removedFilter;
84
+ context_module: OsContextModule.artworkFilters;
85
+ context_page_owner_type: OsOwnerType.inventory | OsOwnerType.collection;
86
+ label: "availability" | "status" | "location" | "artist" | "coa";
87
+ value: string;
88
+ }
89
+ /**
90
+ * A partner clears all active filters via the "Clear all" button.
91
+ *
92
+ * This schema describes events sent to Segment from [[OsClearedFilters]]
93
+ *
94
+ * @example
95
+ * ```
96
+ * {
97
+ * action: "clearedFilters",
98
+ * context_module: "artworkFilters",
99
+ * context_page_owner_type: "inventory",
100
+ * value: 3
101
+ * }
102
+ * ```
103
+ */
104
+ export interface OsClearedFilters {
105
+ action: OsActionType.clearedFilters;
106
+ context_module: OsContextModule.artworkFilters;
107
+ context_page_owner_type: OsOwnerType.inventory | OsOwnerType.collection;
108
+ /** Number of filters cleared */
109
+ value: number;
110
+ }
111
+ /**
112
+ * A partner clicks a sortable column header to sort the artwork table.
113
+ * A column-header click cycles ascending → descending → default.
114
+ *
115
+ * This schema describes events sent to Segment from [[OsSortedColumn]]
116
+ *
117
+ * @example
118
+ * ```
119
+ * {
120
+ * action: "sortedColumn",
121
+ * context_module: "artworkTable",
122
+ * context_page_owner_type: "inventory",
123
+ * label: "date added",
124
+ * value: "asc"
125
+ * }
126
+ * ```
127
+ */
128
+ export interface OsSortedColumn {
129
+ action: OsActionType.sortedColumn;
130
+ context_module: OsContextModule.artworkTable;
131
+ context_page_owner_type: OsOwnerType.inventory | OsOwnerType.collection;
132
+ /** The column being sorted */
133
+ label: string;
134
+ value: "asc" | "desc" | "default";
135
+ }
136
+ /**
137
+ * A partner submits a keyword search in the artwork search bar.
138
+ * Fires on the debounced commit (not per keystroke).
139
+ *
140
+ * This schema describes events sent to Segment from [[OsSearchedArtworks]]
141
+ *
142
+ * @example
143
+ * ```
144
+ * {
145
+ * action: "searchedArtworks",
146
+ * context_module: "artworkSearch",
147
+ * context_page_owner_type: "inventory",
148
+ * query: "Kelly",
149
+ * value: 42
150
+ * }
151
+ * ```
152
+ */
153
+ export interface OsSearchedArtworks {
154
+ action: OsActionType.searchedArtworks;
155
+ context_module: OsContextModule.artworkSearch;
156
+ context_page_owner_type: OsOwnerType.inventory | OsOwnerType.collection;
157
+ /** The committed search string */
158
+ query: string;
159
+ /** Number of results after the search resolves */
160
+ value: number;
161
+ }
162
+ export type OsFilterSortSearch = OsAppliedFilter | OsClearedFilters | OsClickedFilterDrawer | OsRemovedFilter | OsSearchedArtworks | OsSortedColumn;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1,6 +1,7 @@
1
1
  import { ClickedAddBrandKitFile, ClickedBrandKitColor, ClickedBrandKitFont, ClickedSaveBrandKit } from "./BrandKit";
2
2
  import { OsClickEvent } from "./Click";
3
3
  import { OsConnectedAppsFlow } from "./ConnectedAppsFlow";
4
+ import { OsFilterSortSearch } from "./FilterSortSearch";
4
5
  import { OsInstagramEditor } from "./InstagramEditor";
5
6
  import { OsInventoryTable } from "./InventoryTable";
6
7
  import { OsMaterialsEditor } from "./MaterialsEditor";
@@ -11,13 +12,17 @@ import { OsSubmitEvent } from "./Submit";
11
12
  *
12
13
  * Each event describes one ActionType
13
14
  */
14
- export type OsEvent = OsMultiAddFlow | ClickedBrandKitColor | ClickedBrandKitFont | ClickedAddBrandKitFile | ClickedSaveBrandKit | OsConnectedAppsFlow | OsClickEvent | OsInstagramEditor | OsInventoryTable | OsMaterialsEditor | OsSubmitEvent;
15
+ export type OsEvent = OsMultiAddFlow | ClickedBrandKitColor | ClickedBrandKitFont | ClickedAddBrandKitFile | ClickedSaveBrandKit | OsConnectedAppsFlow | OsClickEvent | OsFilterSortSearch | OsInstagramEditor | OsInventoryTable | OsMaterialsEditor | OsSubmitEvent;
15
16
  /**
16
17
  * List of all Art OS actions
17
18
  *
18
19
  * Each OsActionType corresponds with a table in Redshift.
19
20
  */
20
21
  export declare enum OsActionType {
22
+ /**
23
+ * Corresponds to {@link OsFilterSortSearch}
24
+ */
25
+ appliedFilter = "appliedFilter",
21
26
  /**
22
27
  * Corresponds to {@link OsInventoryTable}
23
28
  */
@@ -63,6 +68,10 @@ export declare enum OsActionType {
63
68
  * Corresponds to {@link ClickedCancelBulkEdit}
64
69
  */
65
70
  clickedCancelBulkEdit = "clickedCancelBulkEdit",
71
+ /**
72
+ * Corresponds to {@link OsFilterSortSearch}
73
+ */
74
+ clickedFilterDrawer = "clickedFilterDrawer",
66
75
  /**
67
76
  * Corresponds to {@link ClickedConnectAccount}
68
77
  */
@@ -127,6 +136,10 @@ export declare enum OsActionType {
127
136
  * Corresponds to {@link OsMaterialsEditor} and {@link OsInstagramEditor}
128
137
  */
129
138
  createdStudioContent = "createdStudioContent",
139
+ /**
140
+ * Corresponds to {@link OsFilterSortSearch}
141
+ */
142
+ clearedFilters = "clearedFilters",
130
143
  /**
131
144
  * Corresponds to {@link DeletedArtwork}
132
145
  */
@@ -155,6 +168,10 @@ export declare enum OsActionType {
155
168
  * Corresponds to {@link OsInventoryTable}
156
169
  */
157
170
  removedArtworkDocument = "removedArtworkDocument",
171
+ /**
172
+ * Corresponds to {@link OsFilterSortSearch}
173
+ */
174
+ removedFilter = "removedFilter",
158
175
  /**
159
176
  * Corresponds to {@link RemovedArtworksFromList}
160
177
  */
@@ -167,6 +184,14 @@ export declare enum OsActionType {
167
184
  * Corresponds to {@link OsInventoryTable}
168
185
  */
169
186
  savedArtworkImages = "savedArtworkImages",
187
+ /**
188
+ * Corresponds to {@link OsFilterSortSearch}
189
+ */
190
+ searchedArtworks = "searchedArtworks",
191
+ /**
192
+ * Corresponds to {@link OsFilterSortSearch}
193
+ */
194
+ sortedColumn = "sortedColumn",
170
195
  /**
171
196
  * Corresponds to {@link StartedArtworkImport}
172
197
  */
@@ -20,6 +20,7 @@ var OsActionType;
20
20
  exports.OsActionType = OsActionType;
21
21
 
22
22
  (function (OsActionType) {
23
+ OsActionType["appliedFilter"] = "appliedFilter";
23
24
  OsActionType["addedArtist"] = "addedArtist";
24
25
  OsActionType["addedArtworkDocument"] = "addedArtworkDocument";
25
26
  OsActionType["addedArtworksToList"] = "addedArtworksToList";
@@ -32,6 +33,7 @@ exports.OsActionType = OsActionType;
32
33
  OsActionType["clickedAspectRatio"] = "clickedAspectRatio";
33
34
  OsActionType["clickedBrandKitModal"] = "clickedBrandKitModal";
34
35
  OsActionType["clickedCancelBulkEdit"] = "clickedCancelBulkEdit";
36
+ OsActionType["clickedFilterDrawer"] = "clickedFilterDrawer";
35
37
  OsActionType["clickedConnectAccount"] = "clickedConnectAccount";
36
38
  OsActionType["clickedConnectAccountModal"] = "clickedConnectAccountModal";
37
39
  OsActionType["clickedConnectModal"] = "clickedConnectModal";
@@ -48,6 +50,7 @@ exports.OsActionType = OsActionType;
48
50
  OsActionType["createdImportedArtworks"] = "createdImportedArtworks";
49
51
  OsActionType["createdList"] = "createdList";
50
52
  OsActionType["createdStudioContent"] = "createdStudioContent";
53
+ OsActionType["clearedFilters"] = "clearedFilters";
51
54
  OsActionType["deletedArtwork"] = "deletedArtwork";
52
55
  OsActionType["deletedList"] = "deletedList";
53
56
  OsActionType["distributedArtworks"] = "distributedArtworks";
@@ -55,9 +58,12 @@ exports.OsActionType = OsActionType;
55
58
  OsActionType["editedArtworkField"] = "editedArtworkField";
56
59
  OsActionType["movedArtworksBetweenLists"] = "movedArtworksBetweenLists";
57
60
  OsActionType["removedArtworkDocument"] = "removedArtworkDocument";
61
+ OsActionType["removedFilter"] = "removedFilter";
58
62
  OsActionType["removedArtworksFromList"] = "removedArtworksFromList";
59
63
  OsActionType["resumedArtworkImport"] = "resumedArtworkImport";
60
64
  OsActionType["savedArtworkImages"] = "savedArtworkImages";
65
+ OsActionType["searchedArtworks"] = "searchedArtworks";
66
+ OsActionType["sortedColumn"] = "sortedColumn";
61
67
  OsActionType["startedArtworkImport"] = "startedArtworkImport";
62
68
  OsActionType["updatedList"] = "updatedList";
63
69
  })(OsActionType || (exports.OsActionType = OsActionType = {}));
@@ -9,6 +9,8 @@ export declare enum OsContextModule {
9
9
  addArtistModal = "addArtistModal",
10
10
  addLocationModal = "addLocationModal",
11
11
  addToListModal = "addToListModal",
12
+ artworkFilters = "artworkFilters",
13
+ artworkSearch = "artworkSearch",
12
14
  artworkTable = "artworkTable",
13
15
  brandKit = "brandKit",
14
16
  brandKitPromptModal = "brandKitPromptModal",
@@ -19,6 +19,8 @@ exports.OsContextModule = OsContextModule;
19
19
  OsContextModule["addArtistModal"] = "addArtistModal";
20
20
  OsContextModule["addLocationModal"] = "addLocationModal";
21
21
  OsContextModule["addToListModal"] = "addToListModal";
22
+ OsContextModule["artworkFilters"] = "artworkFilters";
23
+ OsContextModule["artworkSearch"] = "artworkSearch";
22
24
  OsContextModule["artworkTable"] = "artworkTable";
23
25
  OsContextModule["brandKit"] = "brandKit";
24
26
  OsContextModule["brandKitPromptModal"] = "brandKitPromptModal";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/cohesion",
3
- "version": "4.373.0",
3
+ "version": "4.374.0",
4
4
  "description": "Analytics schema",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {