@artsy/cohesion 4.374.0 → 4.376.0--canary.717.15363.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.375.0 (Mon Jun 29 2026)
2
+
3
+ #### 🚀 Enhancement
4
+
5
+ - chore: Add edition sets tracking events [#720](https://github.com/artsy/cohesion/pull/720) ([@MrSltun](https://github.com/MrSltun))
6
+
7
+ #### Authors: 1
8
+
9
+ - Sultan Al-Maari ([@MrSltun](https://github.com/MrSltun))
10
+
11
+ ---
12
+
1
13
  # v4.374.0 (Sat Jun 27 2026)
2
14
 
3
15
  #### 🚀 Enhancement
@@ -55,6 +55,7 @@ export declare enum ContextModule {
55
55
  artworkRecommendationsRail = "artworkRecommendationsRail",
56
56
  artworkSidebar = "artworkSidebar",
57
57
  artworksTab = "artworksTab",
58
+ artworkTable = "artworkTable",
58
59
  associatedViewingRoom = "associatedViewingRoom",
59
60
  auctionCard = "auctionCard",
60
61
  auctionHome = "auctionHome",
@@ -69,6 +69,7 @@ exports.ContextModule = ContextModule;
69
69
  ContextModule["artworkRecommendationsRail"] = "artworkRecommendationsRail";
70
70
  ContextModule["artworkSidebar"] = "artworkSidebar";
71
71
  ContextModule["artworksTab"] = "artworksTab";
72
+ ContextModule["artworkTable"] = "artworkTable";
72
73
  ContextModule["associatedViewingRoom"] = "associatedViewingRoom";
73
74
  ContextModule["auctionCard"] = "auctionCard";
74
75
  ContextModule["auctionHome"] = "auctionHome";
@@ -60,5 +60,6 @@ export * from "./os/Events/InventoryTable";
60
60
  export * from "./os/Events/MaterialsEditor";
61
61
  export * from "./os/Events/MultiAddFlow";
62
62
  export * from "./os/Events/Submit";
63
+ export * from "./os/Events/Toggle";
63
64
  export * from "./os/Values/OsContextModule";
64
65
  export * from "./os/Values/OsOwnerType";
@@ -640,6 +640,18 @@ Object.keys(_Submit).forEach(function (key) {
640
640
  });
641
641
  });
642
642
 
643
+ var _Toggle2 = require("./os/Events/Toggle");
644
+
645
+ Object.keys(_Toggle2).forEach(function (key) {
646
+ if (key === "default" || key === "__esModule") return;
647
+ Object.defineProperty(exports, key, {
648
+ enumerable: true,
649
+ get: function get() {
650
+ return _Toggle2[key];
651
+ }
652
+ });
653
+ });
654
+
643
655
  var _OsContextModule = require("./os/Values/OsContextModule");
644
656
 
645
657
  Object.keys(_OsContextModule).forEach(function (key) {
@@ -49,6 +49,29 @@ export interface ClickedCancelBulkEdit {
49
49
  context_page_owner_type: OsOwnerType;
50
50
  artwork_ids: string[];
51
51
  }
52
+ /**
53
+ * The divergence marker appears in a syncable cell when the OS value
54
+ * diverges from the downstream destination value (e.g. Artsy CMS). Fires as an
55
+ * impression when the marker first renders for a given artwork/field combination.
56
+ *
57
+ * @example
58
+ * ```
59
+ * {
60
+ * action: "viewedDivergenceMarker",
61
+ * context_module: "artworkTable",
62
+ * context_page_owner_type: "inventory",
63
+ * artwork_id: "abc123",
64
+ * field: "availability"
65
+ * }
66
+ * ```
67
+ */
68
+ export interface ViewedDivergenceMarker {
69
+ action: OsActionType.viewedDivergenceMarker;
70
+ context_module: OsContextModule.artworkTable;
71
+ context_page_owner_type: OsOwnerType;
72
+ artwork_id: string;
73
+ field: "availability" | "medium" | "price";
74
+ }
52
75
  /**
53
76
  * A partner opens a list, either from the Lists surface (a `ListCard`) or from
54
77
  * the recent-lists shortcut on the Inventory surface. `source` distinguishes the
@@ -74,4 +97,4 @@ export interface ClickedOpenList {
74
97
  list_type: string;
75
98
  source: string;
76
99
  }
77
- export type OsClickEvent = ClickedActionsDropdown | ClickedCancelBulkEdit | ClickedOpenList;
100
+ export type OsClickEvent = ClickedActionsDropdown | ClickedCancelBulkEdit | ViewedDivergenceMarker | ClickedOpenList;
@@ -311,10 +311,41 @@ export interface OsClickedActionsDropdown {
311
311
  * Top-bar "More": "Delete"
312
312
  * Row/context menu only: "Remove from Artsy" | "Change Collection" | "Remove from Collection" |
313
313
  * "Convert to Edition Set" | "Edit Edition Set" | "Convert to Unique"
314
+ * Distribution: "Distribute to Artsy"
314
315
  */
315
- value: "Add to Artsy" | "Add to Collection" | "Change Collection" | "Checklist" | "Convert to Edition Set" | "Convert to Unique" | "Delete" | "Edit Edition Set" | "Instagram Post" | "Mailchimp Campaign" | "Remove from Artsy" | "Remove from Collection" | "Tearsheet";
316
+ value: "Add to Artsy" | "Add to Collection" | "Change Collection" | "Checklist" | "Convert to Edition Set" | "Convert to Unique" | "Delete" | "Distribute to Artsy" | "Edit Edition Set" | "Instagram Post" | "Mailchimp Campaign" | "Remove from Artsy" | "Remove from Collection" | "Tearsheet";
316
317
  /** Which button or trigger the partner used to open this dropdown */
317
318
  label: "add to dropdown" | "context menu" | "more dropdown" | "row action" | "studio dropdown";
318
319
  artwork_ids: string[];
319
320
  }
320
- export type OsInventoryTable = OsAddedArtist | OsAddedArtworkDocument | OsAddedLocation | OsClickedActionsDropdown | OsClickedArtworkRow | OsClickedEditionSetRow | OsClickedImagesModal | OsEditedArtworkField | OsRemovedArtworkDocument | OsSavedArtworkImages;
321
+ /**
322
+ * A partner edits an availability, medium, or price cell that is configured to sync
323
+ * with a downstream destination (e.g. Artsy CMS). Fires on mutation success. Distinct
324
+ * from {@link OsEditedArtworkField} (general field edits) — this captures only the three
325
+ * syncable fields and whether a push to the destination actually occurred.
326
+ *
327
+ * @example
328
+ * ```
329
+ * {
330
+ * action: "editedInventoryField",
331
+ * context_module: "artworkTable",
332
+ * context_page_owner_type: "inventory",
333
+ * destination: ["artsy"],
334
+ * artwork_id: "abc123",
335
+ * field: "availability",
336
+ * did_push_to_cms: false
337
+ * }
338
+ * ```
339
+ */
340
+ export interface EditedInventoryField {
341
+ action: OsActionType.editedInventoryField;
342
+ context_module: OsContextModule.artworkTable;
343
+ context_page_owner_type: OsOwnerType;
344
+ /** Downstream destinations the value was pushed to (e.g. ["artsy"]) */
345
+ destination: string[];
346
+ artwork_id: string;
347
+ field: "availability" | "medium" | "price";
348
+ /** false e.g. for "Not For Sale" (OS-only value that does not push to the destination) */
349
+ did_push_to_cms: boolean;
350
+ }
351
+ export type OsInventoryTable = EditedInventoryField | OsAddedArtist | OsAddedArtworkDocument | OsAddedLocation | OsClickedActionsDropdown | OsClickedArtworkRow | OsClickedEditionSetRow | OsClickedImagesModal | OsEditedArtworkField | OsRemovedArtworkDocument | OsSavedArtworkImages;
@@ -78,6 +78,36 @@ export interface DistributedArtworks {
78
78
  artwork_ids: string[];
79
79
  selected_count: number;
80
80
  }
81
+ /**
82
+ * The websocket-driven distribute job reaches a terminal state (complete or failed).
83
+ * Driven by `useDistributeWebsocket` (`PartnersChannel`, `metadata_update`).
84
+ * Fire on the final websocket message to capture success/skip rates.
85
+ *
86
+ * @example
87
+ * ```
88
+ * {
89
+ * action: "completedArtworkDistribution",
90
+ * context_module: "artworkTable",
91
+ * context_page_owner_type: "inventory",
92
+ * destination: ["artsy"],
93
+ * total_artworks: 12,
94
+ * success_count: 10,
95
+ * skipped_count: 2,
96
+ * value: "partial"
97
+ * }
98
+ * ```
99
+ */
100
+ export interface CompletedArtworkDistribution {
101
+ action: OsActionType.completedArtworkDistribution;
102
+ context_module: OsContextModule.artworkTable;
103
+ context_page_owner_type: OsOwnerType.inventory;
104
+ /** Destination marketplaces (currently Artsy only; extensible) */
105
+ destination: string[];
106
+ total_artworks: number;
107
+ success_count: number;
108
+ skipped_count: number;
109
+ value: "success" | "partial" | "error";
110
+ }
81
111
  /**
82
112
  * A partner creates a new list in the Add-to-list modal and bulk-adds the current
83
113
  * selection to it. `start_date` / `end_date` are null when unset; `fair_id` is
@@ -259,4 +289,88 @@ export interface DistributedList {
259
289
  fair_id?: string;
260
290
  partner_show_id: string;
261
291
  }
262
- export type OsSubmitEvent = BulkEditedArtworks | DeletedArtwork | DistributedArtworks | CreatedList | AddedArtworksToList | UpdatedList | DeletedList | RemovedArtworksFromList | MovedArtworksBetweenLists | DistributedList;
292
+ /**
293
+ * A partner confirms conversion of a unique artwork to an edition set in the
294
+ * edition set modal. `is_limited` is true when an edition size was provided
295
+ * (Limited Edition), false when the edition size is unknown.
296
+ *
297
+ * @example
298
+ * ```
299
+ * {
300
+ * action: "createdEditionSet",
301
+ * context_module: "editionSetModal",
302
+ * context_page_owner_type: "inventory",
303
+ * artwork_id: "5d2b5b5d5e5b5d000e1b5b5d",
304
+ * is_limited: true,
305
+ * variants: [{ edition_size: 4, inventory_count: 5 }]
306
+ * }
307
+ * ```
308
+ */
309
+ export interface CreatedEditionSet {
310
+ action: OsActionType.createdEditionSet;
311
+ artwork_id: string;
312
+ context_module: OsContextModule.editionSetModal;
313
+ context_page_owner_type: OsOwnerType;
314
+ is_limited: boolean;
315
+ variants: Array<{
316
+ edition_size: number | null;
317
+ inventory_count: number | null;
318
+ }>;
319
+ }
320
+ /**
321
+ * A partner saves edits to an existing edition set in the edition set modal.
322
+ * `variants_added`, `variants_edited`, and `variants_removed` reflect the diff
323
+ * between the original and submitted variants array.
324
+ *
325
+ * @example
326
+ * ```
327
+ * {
328
+ * action: "updatedEditionSet",
329
+ * context_module: "editionSetModal",
330
+ * context_page_owner_type: "inventory",
331
+ * artwork_id: "5d2b5b5d5e5b5d000e1b5b5d",
332
+ * is_limited: true,
333
+ * variants: [{ edition_size: 4, inventory_count: 5 }],
334
+ * variants_added: 0,
335
+ * variants_edited: 1,
336
+ * variants_removed: 0
337
+ * }
338
+ * ```
339
+ */
340
+ export interface UpdatedEditionSet {
341
+ action: OsActionType.updatedEditionSet;
342
+ artwork_id: string;
343
+ context_module: OsContextModule.editionSetModal;
344
+ context_page_owner_type: OsOwnerType;
345
+ is_limited: boolean;
346
+ variants: Array<{
347
+ edition_size: number | null;
348
+ inventory_count: number | null;
349
+ }>;
350
+ variants_added: number;
351
+ variants_edited: number;
352
+ variants_removed: number;
353
+ }
354
+ /**
355
+ * A partner confirms or cancels reverting an edition-set artwork to a unique
356
+ * work in the Convert to Unique confirmation modal.
357
+ *
358
+ * @example
359
+ * ```
360
+ * {
361
+ * action: "convertedArtworkToUnique",
362
+ * context_module: "convertToUniqueModal",
363
+ * context_page_owner_type: "inventory",
364
+ * artwork_ids: ["5d2b5b5d5e5b5d000e1b5b5d"],
365
+ * value: "confirm"
366
+ * }
367
+ * ```
368
+ */
369
+ export interface ConvertedArtworkToUnique {
370
+ action: OsActionType.convertedArtworkToUnique;
371
+ artwork_ids: string[];
372
+ context_module: OsContextModule.convertToUniqueModal;
373
+ context_page_owner_type: OsOwnerType;
374
+ value: "confirm" | "cancel";
375
+ }
376
+ export type OsSubmitEvent = AddedArtworksToList | BulkEditedArtworks | BulkEditedArtworks | CompletedArtworkDistribution | ConvertedArtworkToUnique | CreatedEditionSet | CreatedList | CreatedList | DeletedArtwork | DeletedArtwork | DeletedList | DistributedArtworks | DistributedArtworks | DistributedList | MovedArtworksBetweenLists | RemovedArtworksFromList | UpdatedEditionSet | UpdatedList;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Schemas describing Art OS toggle events
3
+ * @packageDocumentation
4
+ */
5
+ import { OsContextModule } from "../Values/OsContextModule";
6
+ import { OsOwnerType } from "../Values/OsOwnerType";
7
+ import { OsActionType } from "./index";
8
+ /**
9
+ * A partner toggles account-wide Auto-sync on or off via the InventoryTableActions bar.
10
+ * Flips `distributionSyncEnabled` for the whole partner account.
11
+ *
12
+ * @example
13
+ * ```
14
+ * {
15
+ * action: "toggledDistributionSync",
16
+ * context_module: "tableActions",
17
+ * context_page_owner_type: "inventory",
18
+ * value: "on"
19
+ * }
20
+ * ```
21
+ */
22
+ export interface ToggledDistributionSync {
23
+ action: OsActionType.toggledDistributionSync;
24
+ context_module: OsContextModule.tableActions;
25
+ context_page_owner_type: OsOwnerType.inventory;
26
+ value: "on" | "off";
27
+ }
28
+ export type OsToggleEvent = ToggledDistributionSync;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -7,12 +7,13 @@ import { OsInventoryTable } from "./InventoryTable";
7
7
  import { OsMaterialsEditor } from "./MaterialsEditor";
8
8
  import { OsMultiAddFlow } from "./MultiAddFlow";
9
9
  import { OsSubmitEvent } from "./Submit";
10
+ import { OsToggleEvent } from "./Toggle";
10
11
  /**
11
12
  * List of valid schemas for Art OS analytics actions
12
13
  *
13
14
  * Each event describes one ActionType
14
15
  */
15
- export type OsEvent = OsMultiAddFlow | ClickedBrandKitColor | ClickedBrandKitFont | ClickedAddBrandKitFile | ClickedSaveBrandKit | OsConnectedAppsFlow | OsClickEvent | OsFilterSortSearch | OsInstagramEditor | OsInventoryTable | OsMaterialsEditor | OsSubmitEvent;
16
+ export type OsEvent = OsMultiAddFlow | ClickedBrandKitColor | ClickedBrandKitFont | ClickedAddBrandKitFile | ClickedSaveBrandKit | OsConnectedAppsFlow | OsClickEvent | OsFilterSortSearch | OsInstagramEditor | OsInventoryTable | OsMaterialsEditor | OsSubmitEvent | OsToggleEvent;
16
17
  /**
17
18
  * List of all Art OS actions
18
19
  *
@@ -120,10 +121,22 @@ export declare enum OsActionType {
120
121
  * Corresponds to {@link OsInstagramEditor}
121
122
  */
122
123
  clickedUploadImageBank = "clickedUploadImageBank",
124
+ /**
125
+ * Corresponds to {@link CompletedArtworkDistribution}
126
+ */
127
+ completedArtworkDistribution = "completedArtworkDistribution",
123
128
  /**
124
129
  * Corresponds to {@link CompletedArtworkImport}
125
130
  */
126
131
  completedArtworkImport = "completedArtworkImport",
132
+ /**
133
+ * Corresponds to {@link ConvertedArtworkToUnique}
134
+ */
135
+ convertedArtworkToUnique = "convertedArtworkToUnique",
136
+ /**
137
+ * Corresponds to {@link CreatedEditionSet}
138
+ */
139
+ createdEditionSet = "createdEditionSet",
127
140
  /**
128
141
  * Corresponds to {@link CreatedImportedArtworks}
129
142
  */
@@ -160,6 +173,10 @@ export declare enum OsActionType {
160
173
  * Corresponds to {@link EditedArtworkField}
161
174
  */
162
175
  editedArtworkField = "editedArtworkField",
176
+ /**
177
+ * Corresponds to {@link EditedInventoryField}
178
+ */
179
+ editedInventoryField = "editedInventoryField",
163
180
  /**
164
181
  * Corresponds to {@link MovedArtworksBetweenLists}
165
182
  */
@@ -196,8 +213,20 @@ export declare enum OsActionType {
196
213
  * Corresponds to {@link StartedArtworkImport}
197
214
  */
198
215
  startedArtworkImport = "startedArtworkImport",
216
+ /**
217
+ * Corresponds to {@link ToggledDistributionSync}
218
+ */
219
+ toggledDistributionSync = "toggledDistributionSync",
220
+ /**
221
+ * Corresponds to {@link UpdatedEditionSet}
222
+ */
223
+ updatedEditionSet = "updatedEditionSet",
199
224
  /**
200
225
  * Corresponds to {@link UpdatedList}
201
226
  */
202
- updatedList = "updatedList"
227
+ updatedList = "updatedList",
228
+ /**
229
+ * Corresponds to {@link ViewedDivergenceMarker}
230
+ */
231
+ viewedDivergenceMarker = "viewedDivergenceMarker"
203
232
  }
@@ -46,7 +46,10 @@ exports.OsActionType = OsActionType;
46
46
  OsActionType["clickedOpenList"] = "clickedOpenList";
47
47
  OsActionType["clickedPublishConfirmation"] = "clickedPublishConfirmation";
48
48
  OsActionType["clickedUploadImageBank"] = "clickedUploadImageBank";
49
+ OsActionType["completedArtworkDistribution"] = "completedArtworkDistribution";
49
50
  OsActionType["completedArtworkImport"] = "completedArtworkImport";
51
+ OsActionType["convertedArtworkToUnique"] = "convertedArtworkToUnique";
52
+ OsActionType["createdEditionSet"] = "createdEditionSet";
50
53
  OsActionType["createdImportedArtworks"] = "createdImportedArtworks";
51
54
  OsActionType["createdList"] = "createdList";
52
55
  OsActionType["createdStudioContent"] = "createdStudioContent";
@@ -56,6 +59,7 @@ exports.OsActionType = OsActionType;
56
59
  OsActionType["distributedArtworks"] = "distributedArtworks";
57
60
  OsActionType["distributedList"] = "distributedList";
58
61
  OsActionType["editedArtworkField"] = "editedArtworkField";
62
+ OsActionType["editedInventoryField"] = "editedInventoryField";
59
63
  OsActionType["movedArtworksBetweenLists"] = "movedArtworksBetweenLists";
60
64
  OsActionType["removedArtworkDocument"] = "removedArtworkDocument";
61
65
  OsActionType["removedFilter"] = "removedFilter";
@@ -65,5 +69,8 @@ exports.OsActionType = OsActionType;
65
69
  OsActionType["searchedArtworks"] = "searchedArtworks";
66
70
  OsActionType["sortedColumn"] = "sortedColumn";
67
71
  OsActionType["startedArtworkImport"] = "startedArtworkImport";
72
+ OsActionType["toggledDistributionSync"] = "toggledDistributionSync";
73
+ OsActionType["updatedEditionSet"] = "updatedEditionSet";
68
74
  OsActionType["updatedList"] = "updatedList";
75
+ OsActionType["viewedDivergenceMarker"] = "viewedDivergenceMarker";
69
76
  })(OsActionType || (exports.OsActionType = OsActionType = {}));
@@ -17,9 +17,11 @@ export declare enum OsContextModule {
17
17
  bulkEditDrawer = "bulkEditDrawer",
18
18
  connectedAppsList = "connectedAppsList",
19
19
  connectModal = "connectModal",
20
+ convertToUniqueModal = "convertToUniqueModal",
20
21
  deleteModal = "deleteModal",
21
22
  distributeModal = "distributeModal",
22
23
  documentsModal = "documentsModal",
24
+ editionSetModal = "editionSetModal",
23
25
  editorHeader = "editorHeader",
24
26
  imageBank = "imageBank",
25
27
  imageEditor = "imageEditor",
@@ -30,5 +32,6 @@ export declare enum OsContextModule {
30
32
  materialsEditor = "materialsEditor",
31
33
  multiAdd = "multiAdd",
32
34
  multiAddReview = "multiAddReview",
33
- publishConfirmationModal = "publishConfirmationModal"
35
+ publishConfirmationModal = "publishConfirmationModal",
36
+ tableActions = "tableActions"
34
37
  }
@@ -27,9 +27,11 @@ exports.OsContextModule = OsContextModule;
27
27
  OsContextModule["bulkEditDrawer"] = "bulkEditDrawer";
28
28
  OsContextModule["connectedAppsList"] = "connectedAppsList";
29
29
  OsContextModule["connectModal"] = "connectModal";
30
+ OsContextModule["convertToUniqueModal"] = "convertToUniqueModal";
30
31
  OsContextModule["deleteModal"] = "deleteModal";
31
32
  OsContextModule["distributeModal"] = "distributeModal";
32
33
  OsContextModule["documentsModal"] = "documentsModal";
34
+ OsContextModule["editionSetModal"] = "editionSetModal";
33
35
  OsContextModule["editorHeader"] = "editorHeader";
34
36
  OsContextModule["imageBank"] = "imageBank";
35
37
  OsContextModule["imageEditor"] = "imageEditor";
@@ -41,4 +43,5 @@ exports.OsContextModule = OsContextModule;
41
43
  OsContextModule["multiAdd"] = "multiAdd";
42
44
  OsContextModule["multiAddReview"] = "multiAddReview";
43
45
  OsContextModule["publishConfirmationModal"] = "publishConfirmationModal";
46
+ OsContextModule["tableActions"] = "tableActions";
44
47
  })(OsContextModule || (exports.OsContextModule = OsContextModule = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/cohesion",
3
- "version": "4.374.0",
3
+ "version": "4.376.0--canary.717.15363.0",
4
4
  "description": "Analytics schema",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {