@artsy/cohesion 4.373.0 → 4.374.0--canary.717.15299.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 +0 -36
- package/dist/Schema/Values/ContextModule.d.ts +1 -0
- package/dist/Schema/Values/ContextModule.js +1 -0
- package/dist/Schema/index.d.ts +1 -1
- package/dist/Schema/index.js +9 -9
- package/dist/Schema/os/Events/Click.d.ts +24 -1
- package/dist/Schema/os/Events/InventoryTable.d.ts +33 -2
- package/dist/Schema/os/Events/MaterialsEditor.d.ts +24 -1
- package/dist/Schema/os/Events/Submit.d.ts +31 -1
- package/dist/Schema/os/Events/Toggle.d.ts +28 -0
- package/dist/Schema/os/Events/Toggle.js +1 -0
- package/dist/Schema/os/Events/__tests__/DistributionSyncFlow.test.d.ts +1 -0
- package/dist/Schema/os/Events/index.d.ts +19 -2
- package/dist/Schema/os/Events/index.js +4 -0
- package/dist/Schema/os/Values/OsContextModule.d.ts +2 -1
- package/dist/Schema/os/Values/OsContextModule.js +1 -0
- package/dist/Schema/os/Values/OsOwnerType.d.ts +1 -0
- package/dist/Schema/os/Values/OsOwnerType.js +1 -0
- package/package.json +1 -1
- package/AGENTS.md +0 -132
- package/CLAUDE.md +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,39 +1,3 @@
|
|
|
1
|
-
# v4.373.0 (Fri Jun 26 2026)
|
|
2
|
-
|
|
3
|
-
#### 🚀 Enhancement
|
|
4
|
-
|
|
5
|
-
- fix(os): Export MaterialsEditor events correctly from Schema [#719](https://github.com/artsy/cohesion/pull/719) ([@olerichter00](https://github.com/olerichter00))
|
|
6
|
-
|
|
7
|
-
#### Authors: 1
|
|
8
|
-
|
|
9
|
-
- Ole ([@olerichter00](https://github.com/olerichter00))
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# v4.372.0 (Fri Jun 26 2026)
|
|
14
|
-
|
|
15
|
-
#### 🚀 Enhancement
|
|
16
|
-
|
|
17
|
-
- chore: Remove list from os owner type [#718](https://github.com/artsy/cohesion/pull/718) ([@MrSltun](https://github.com/MrSltun))
|
|
18
|
-
|
|
19
|
-
#### Authors: 1
|
|
20
|
-
|
|
21
|
-
- Sultan Al-Maari ([@MrSltun](https://github.com/MrSltun))
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
# v4.371.0 (Fri Jun 26 2026)
|
|
26
|
-
|
|
27
|
-
#### 🚀 Enhancement
|
|
28
|
-
|
|
29
|
-
- chore: Add AGENTS.md and CLAUDE.md for agent onboarding [#715](https://github.com/artsy/cohesion/pull/715) ([@MounirDhahri](https://github.com/MounirDhahri))
|
|
30
|
-
|
|
31
|
-
#### Authors: 1
|
|
32
|
-
|
|
33
|
-
- Mounir Dhahri ([@MounirDhahri](https://github.com/MounirDhahri))
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
1
|
# v4.370.0 (Thu Jun 25 2026)
|
|
38
2
|
|
|
39
3
|
#### 🚀 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";
|
package/dist/Schema/index.d.ts
CHANGED
|
@@ -56,8 +56,8 @@ export * from "./os/Events/Click";
|
|
|
56
56
|
export * from "./os/Events/ConnectedAppsFlow";
|
|
57
57
|
export * from "./os/Events/InstagramEditor";
|
|
58
58
|
export * from "./os/Events/InventoryTable";
|
|
59
|
-
export * from "./os/Events/MaterialsEditor";
|
|
60
59
|
export * from "./os/Events/MultiAddFlow";
|
|
61
60
|
export * from "./os/Events/Submit";
|
|
61
|
+
export * from "./os/Events/Toggle";
|
|
62
62
|
export * from "./os/Values/OsContextModule";
|
|
63
63
|
export * from "./os/Values/OsOwnerType";
|
package/dist/Schema/index.js
CHANGED
|
@@ -592,38 +592,38 @@ Object.keys(_InventoryTable).forEach(function (key) {
|
|
|
592
592
|
});
|
|
593
593
|
});
|
|
594
594
|
|
|
595
|
-
var
|
|
595
|
+
var _MultiAddFlow = require("./os/Events/MultiAddFlow");
|
|
596
596
|
|
|
597
|
-
Object.keys(
|
|
597
|
+
Object.keys(_MultiAddFlow).forEach(function (key) {
|
|
598
598
|
if (key === "default" || key === "__esModule") return;
|
|
599
599
|
Object.defineProperty(exports, key, {
|
|
600
600
|
enumerable: true,
|
|
601
601
|
get: function get() {
|
|
602
|
-
return
|
|
602
|
+
return _MultiAddFlow[key];
|
|
603
603
|
}
|
|
604
604
|
});
|
|
605
605
|
});
|
|
606
606
|
|
|
607
|
-
var
|
|
607
|
+
var _Submit = require("./os/Events/Submit");
|
|
608
608
|
|
|
609
|
-
Object.keys(
|
|
609
|
+
Object.keys(_Submit).forEach(function (key) {
|
|
610
610
|
if (key === "default" || key === "__esModule") return;
|
|
611
611
|
Object.defineProperty(exports, key, {
|
|
612
612
|
enumerable: true,
|
|
613
613
|
get: function get() {
|
|
614
|
-
return
|
|
614
|
+
return _Submit[key];
|
|
615
615
|
}
|
|
616
616
|
});
|
|
617
617
|
});
|
|
618
618
|
|
|
619
|
-
var
|
|
619
|
+
var _Toggle2 = require("./os/Events/Toggle");
|
|
620
620
|
|
|
621
|
-
Object.keys(
|
|
621
|
+
Object.keys(_Toggle2).forEach(function (key) {
|
|
622
622
|
if (key === "default" || key === "__esModule") return;
|
|
623
623
|
Object.defineProperty(exports, key, {
|
|
624
624
|
enumerable: true,
|
|
625
625
|
get: function get() {
|
|
626
|
-
return
|
|
626
|
+
return _Toggle2[key];
|
|
627
627
|
}
|
|
628
628
|
});
|
|
629
629
|
});
|
|
@@ -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
|
-
|
|
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;
|
|
@@ -5,6 +5,29 @@ import { OsActionType } from ".";
|
|
|
5
5
|
* Schemas describing Art OS Materials (Tearsheet / Checklist) events
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* A partner selects "Tearsheet" or "Checklist" from the inventory actions dropdown
|
|
10
|
+
* to open the Materials editor. The dropdown is surfaced three ways: the artwork's
|
|
11
|
+
* actions, bulk actions, and the right-click context menu.
|
|
12
|
+
*
|
|
13
|
+
* This schema describes events sent to Segment from [[OsClickedActionsDropdown]]
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```
|
|
17
|
+
* {
|
|
18
|
+
* action: "clickedActionsDropdown",
|
|
19
|
+
* context_module: "actionsDropdown",
|
|
20
|
+
* context_page_owner_type: "inventory",
|
|
21
|
+
* value: "Tearsheet"
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export interface OsClickedActionsDropdown {
|
|
26
|
+
action: OsActionType.clickedActionsDropdown;
|
|
27
|
+
context_module: OsContextModule.actionsDropdown;
|
|
28
|
+
context_page_owner_type: OsOwnerType;
|
|
29
|
+
value: "Tearsheet" | "Checklist" | "Instagram Post";
|
|
30
|
+
}
|
|
8
31
|
/**
|
|
9
32
|
* A partner clicks "Exit" in the Materials editor header to leave the editor.
|
|
10
33
|
*
|
|
@@ -85,4 +108,4 @@ export interface OsCreatedStudioContent {
|
|
|
85
108
|
/** Generic catch-all for the artwork detail fields included in the generated material */
|
|
86
109
|
content: Record<string, unknown>;
|
|
87
110
|
}
|
|
88
|
-
export type OsMaterialsEditor = OsClickedBrandKitModal | OsClickedExitEditor | OsCreatedStudioContent;
|
|
111
|
+
export type OsMaterialsEditor = OsClickedActionsDropdown | OsClickedBrandKitModal | OsClickedExitEditor | OsCreatedStudioContent;
|
|
@@ -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,4 @@ 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
|
+
export type OsSubmitEvent = BulkEditedArtworks | CompletedArtworkDistribution | DeletedArtwork | DistributedArtworks | CreatedList | AddedArtworksToList | UpdatedList | DeletedList | RemovedArtworksFromList | MovedArtworksBetweenLists | DistributedList;
|
|
@@ -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";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -6,12 +6,13 @@ import { OsInventoryTable } from "./InventoryTable";
|
|
|
6
6
|
import { OsMaterialsEditor } from "./MaterialsEditor";
|
|
7
7
|
import { OsMultiAddFlow } from "./MultiAddFlow";
|
|
8
8
|
import { OsSubmitEvent } from "./Submit";
|
|
9
|
+
import { OsToggleEvent } from "./Toggle";
|
|
9
10
|
/**
|
|
10
11
|
* List of valid schemas for Art OS analytics actions
|
|
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 | OsInstagramEditor | OsInventoryTable | OsMaterialsEditor | OsSubmitEvent | OsToggleEvent;
|
|
15
16
|
/**
|
|
16
17
|
* List of all Art OS actions
|
|
17
18
|
*
|
|
@@ -111,6 +112,10 @@ export declare enum OsActionType {
|
|
|
111
112
|
* Corresponds to {@link OsInstagramEditor}
|
|
112
113
|
*/
|
|
113
114
|
clickedUploadImageBank = "clickedUploadImageBank",
|
|
115
|
+
/**
|
|
116
|
+
* Corresponds to {@link CompletedArtworkDistribution}
|
|
117
|
+
*/
|
|
118
|
+
completedArtworkDistribution = "completedArtworkDistribution",
|
|
114
119
|
/**
|
|
115
120
|
* Corresponds to {@link CompletedArtworkImport}
|
|
116
121
|
*/
|
|
@@ -147,6 +152,10 @@ export declare enum OsActionType {
|
|
|
147
152
|
* Corresponds to {@link EditedArtworkField}
|
|
148
153
|
*/
|
|
149
154
|
editedArtworkField = "editedArtworkField",
|
|
155
|
+
/**
|
|
156
|
+
* Corresponds to {@link EditedInventoryField}
|
|
157
|
+
*/
|
|
158
|
+
editedInventoryField = "editedInventoryField",
|
|
150
159
|
/**
|
|
151
160
|
* Corresponds to {@link MovedArtworksBetweenLists}
|
|
152
161
|
*/
|
|
@@ -171,8 +180,16 @@ export declare enum OsActionType {
|
|
|
171
180
|
* Corresponds to {@link StartedArtworkImport}
|
|
172
181
|
*/
|
|
173
182
|
startedArtworkImport = "startedArtworkImport",
|
|
183
|
+
/**
|
|
184
|
+
* Corresponds to {@link ToggledDistributionSync}
|
|
185
|
+
*/
|
|
186
|
+
toggledDistributionSync = "toggledDistributionSync",
|
|
174
187
|
/**
|
|
175
188
|
* Corresponds to {@link UpdatedList}
|
|
176
189
|
*/
|
|
177
|
-
updatedList = "updatedList"
|
|
190
|
+
updatedList = "updatedList",
|
|
191
|
+
/**
|
|
192
|
+
* Corresponds to {@link ViewedDivergenceMarker}
|
|
193
|
+
*/
|
|
194
|
+
viewedDivergenceMarker = "viewedDivergenceMarker"
|
|
178
195
|
}
|
|
@@ -44,6 +44,7 @@ exports.OsActionType = OsActionType;
|
|
|
44
44
|
OsActionType["clickedOpenList"] = "clickedOpenList";
|
|
45
45
|
OsActionType["clickedPublishConfirmation"] = "clickedPublishConfirmation";
|
|
46
46
|
OsActionType["clickedUploadImageBank"] = "clickedUploadImageBank";
|
|
47
|
+
OsActionType["completedArtworkDistribution"] = "completedArtworkDistribution";
|
|
47
48
|
OsActionType["completedArtworkImport"] = "completedArtworkImport";
|
|
48
49
|
OsActionType["createdImportedArtworks"] = "createdImportedArtworks";
|
|
49
50
|
OsActionType["createdList"] = "createdList";
|
|
@@ -53,11 +54,14 @@ exports.OsActionType = OsActionType;
|
|
|
53
54
|
OsActionType["distributedArtworks"] = "distributedArtworks";
|
|
54
55
|
OsActionType["distributedList"] = "distributedList";
|
|
55
56
|
OsActionType["editedArtworkField"] = "editedArtworkField";
|
|
57
|
+
OsActionType["editedInventoryField"] = "editedInventoryField";
|
|
56
58
|
OsActionType["movedArtworksBetweenLists"] = "movedArtworksBetweenLists";
|
|
57
59
|
OsActionType["removedArtworkDocument"] = "removedArtworkDocument";
|
|
58
60
|
OsActionType["removedArtworksFromList"] = "removedArtworksFromList";
|
|
59
61
|
OsActionType["resumedArtworkImport"] = "resumedArtworkImport";
|
|
60
62
|
OsActionType["savedArtworkImages"] = "savedArtworkImages";
|
|
61
63
|
OsActionType["startedArtworkImport"] = "startedArtworkImport";
|
|
64
|
+
OsActionType["toggledDistributionSync"] = "toggledDistributionSync";
|
|
62
65
|
OsActionType["updatedList"] = "updatedList";
|
|
66
|
+
OsActionType["viewedDivergenceMarker"] = "viewedDivergenceMarker";
|
|
63
67
|
})(OsActionType || (exports.OsActionType = OsActionType = {}));
|
|
@@ -28,5 +28,6 @@ export declare enum OsContextModule {
|
|
|
28
28
|
materialsEditor = "materialsEditor",
|
|
29
29
|
multiAdd = "multiAdd",
|
|
30
30
|
multiAddReview = "multiAddReview",
|
|
31
|
-
publishConfirmationModal = "publishConfirmationModal"
|
|
31
|
+
publishConfirmationModal = "publishConfirmationModal",
|
|
32
|
+
tableActions = "tableActions"
|
|
32
33
|
}
|
|
@@ -39,4 +39,5 @@ exports.OsContextModule = OsContextModule;
|
|
|
39
39
|
OsContextModule["multiAdd"] = "multiAdd";
|
|
40
40
|
OsContextModule["multiAddReview"] = "multiAddReview";
|
|
41
41
|
OsContextModule["publishConfirmationModal"] = "publishConfirmationModal";
|
|
42
|
+
OsContextModule["tableActions"] = "tableActions";
|
|
42
43
|
})(OsContextModule || (exports.OsContextModule = OsContextModule = {}));
|
|
@@ -17,6 +17,7 @@ exports.OsOwnerType = OsOwnerType;
|
|
|
17
17
|
OsOwnerType["collection"] = "collection";
|
|
18
18
|
OsOwnerType["connectedApps"] = "connectedApps";
|
|
19
19
|
OsOwnerType["inventory"] = "inventory";
|
|
20
|
+
OsOwnerType["list"] = "list";
|
|
20
21
|
OsOwnerType["studio"] = "studio";
|
|
21
22
|
OsOwnerType["studioInstagram"] = "studioInstagram";
|
|
22
23
|
OsOwnerType["studioMaterials"] = "studioMaterials";
|
package/package.json
CHANGED
package/AGENTS.md
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# Agent Guidelines
|
|
2
|
-
|
|
3
|
-
`@artsy/cohesion` is **Artsy's analytics schema** — a published TypeScript package of
|
|
4
|
-
interfaces and enums that describe every analytics event sent to Segment/Redshift.
|
|
5
|
-
There is no runtime logic: each event is a typed shape, and each event name maps to a
|
|
6
|
-
downstream Redshift table. Consuming apps (web + iOS) import these types to fire events.
|
|
7
|
-
|
|
8
|
-
## Tech Stack
|
|
9
|
-
|
|
10
|
-
- **TypeScript** (strict) — the entire schema is type definitions; no runtime code
|
|
11
|
-
- **Babel** — compiles `src/**/*.ts` → `dist/` (`@babel/preset-typescript`)
|
|
12
|
-
- **tsc** — type-checking and `.d.ts` emission only (not used for transpiling)
|
|
13
|
-
- **Jest** — tests assert each event interface serializes to its expected JSON shape
|
|
14
|
-
- **ESLint + Prettier** — `simple-import-sort` and `sort-keys-fix` are enforced
|
|
15
|
-
- **TypeDoc** — public docs at https://cohesion.artsy.net are generated from doc comments
|
|
16
|
-
- **Auto / CircleCI** — versioning and npm publish on merge to `main`
|
|
17
|
-
|
|
18
|
-
## Common Commands
|
|
19
|
-
|
|
20
|
-
- `yarn test` — run the Jest suite (`<file>` or `-t <name>` to scope)
|
|
21
|
-
- `yarn type-check` — `tsc --noEmit` (also runs on pre-push)
|
|
22
|
-
- `yarn lint` — `eslint . --ext .ts --fix` (import + key sorting)
|
|
23
|
-
- `yarn docs` — regenerate TypeDoc output into `doc/`
|
|
24
|
-
|
|
25
|
-
## Pre-Commit Verification
|
|
26
|
-
|
|
27
|
-
Before every commit, verify on pending files:
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
yarn type-check
|
|
31
|
-
yarn test
|
|
32
|
-
yarn lint
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
`husky` runs `lint-staged` on pre-commit and `yarn type-check` on pre-push. Never commit
|
|
36
|
-
code that fails these checks.
|
|
37
|
-
|
|
38
|
-
## Code Style & Common Patterns
|
|
39
|
-
|
|
40
|
-
These are enforced by lint/test or are established conventions — follow them verbatim:
|
|
41
|
-
|
|
42
|
-
- **One interface per event.** Name it `UpperCamelCase`; its `action` literal and the
|
|
43
|
-
matching `ActionType`/`OsActionType` enum member are `lowerCamelCase`. The enum member
|
|
44
|
-
value **is** the Redshift table name, so it must not change casually.
|
|
45
|
-
- **`action` is always a literal type**, e.g. `action: ActionType.commercialFilterParamsChanged`
|
|
46
|
-
(not the bare `ActionType`).
|
|
47
|
-
- **Sort keys alphabetically.** `sort-keys-fix` lints interface members, enum members, and
|
|
48
|
-
object literals (including test fixtures) into alphabetical order. Run `yarn lint` to fix.
|
|
49
|
-
- **Sort imports.** `simple-import-sort` orders imports; let `--fix` handle it.
|
|
50
|
-
- **Every event needs a context module and an owner type.** Use `context_module`
|
|
51
|
-
(`ContextModule`/`OsContextModule`) for the component, and an owner-type field for the
|
|
52
|
-
page/screen: `context_owner_type` (`OwnerType`), or `context_page_owner_type` /
|
|
53
|
-
`context_screen_owner_type` for the page/screen-scoped subtypes.
|
|
54
|
-
- **Document every event with a TypeDoc block** containing a prose description and an
|
|
55
|
-
`@example` code fence showing the emitted JSON. This is the public documentation — see
|
|
56
|
-
`src/Schema/Events/FilterAndSort.ts` for the canonical style.
|
|
57
|
-
- **Aggregate interfaces into a union** (e.g. `OsSubmitEvent`, `OsEvent`) and re-export
|
|
58
|
-
every new file from the relevant `index.ts` and `src/Schema/index.ts`.
|
|
59
|
-
- **Prettier:** no semicolons, double quotes, trailing commas, 2-space indent.
|
|
60
|
-
|
|
61
|
-
To add a CMS or core event, follow the step-by-step guide in [README.md](README.md#schema).
|
|
62
|
-
|
|
63
|
-
## ArtOS Events (`src/Schema/os/`)
|
|
64
|
-
|
|
65
|
-
ArtOS events have their **own** schema and conventions — do **not** reuse CMS or core
|
|
66
|
-
events for ArtOS. When adding ArtOS tracking, follow these principles (from the
|
|
67
|
-
[ArtOS tracking guidelines](https://app.notion.com/p/373cab0764a080fca7e7d5a984ec17c7) and
|
|
68
|
-
[Filter/Sort/Search doc](https://app.notion.com/p/37bcab0764a081a2b22dc0f6434e44fa)):
|
|
69
|
-
|
|
70
|
-
1. **Live under `src/Schema/os/`** with its own `Events/` and `Values/` folders. ArtOS has
|
|
71
|
-
dedicated `OsActionType`, `OsContextModule`, and `OsOwnerType` — never the shared ones.
|
|
72
|
-
2. **Never reuse CMS events** for ArtOS surfaces, and vice versa.
|
|
73
|
-
3. **Name events `VerbNoun`, past tense** — `ClickedFilterDrawer`, `CreatedStudioContent`,
|
|
74
|
-
`BulkEditedArtworks`. (The older `NounVerb` names like `ListCreated` were flipped.)
|
|
75
|
-
4. **No generic action events.** Avoid `InventoryClicked` / `Clicked` / `Toggled` /
|
|
76
|
-
`Impression`; events must name the specific intent (`ClickedActionsDropdown`,
|
|
77
|
-
not a catch-all click). Events should be **reusable across surfaces** by intent — e.g.
|
|
78
|
-
`ClickedFilterDrawer` can fire on any page that has a filter component.
|
|
79
|
-
5. **Differentiate surfaces via owner type, not a module field.** Do not add an `OSModule`
|
|
80
|
-
field; use `context_page_owner_type` (`inventory`, `collection`, `studioInstagram`, …)
|
|
81
|
-
to distinguish ArtOS surfaces. The URL itself changes (`/catalog` → `/lists` → …).
|
|
82
|
-
6. **Group reusable events by interaction in shared files** (`Click.ts`, `Impression.ts`,
|
|
83
|
-
`Toggle.ts`). A set of events that is 100% non-reusable and scoped to one surface may get
|
|
84
|
-
its own file (e.g. `InstagramEditor.ts`, `MultiAddFlow.ts`).
|
|
85
|
-
7. **Backend-tied, flow-completion events go in `Submit.ts`** — events that fire on
|
|
86
|
-
successful completion of a flow and depend on a backend change (`BulkEditedArtworks`,
|
|
87
|
-
`DeletedArtwork`, `DistributedArtworks`). These are platform-agnostic (web + future app),
|
|
88
|
-
so they stay out of the web-only `Click.ts`.
|
|
89
|
-
8. **Avoid name collisions with existing events** — the OS list events drop the "Artwork"
|
|
90
|
-
qualifier (`CreatedList`, not `CreatedArtworkList`) so they don't clash with the existing
|
|
91
|
-
CMS saved-artwork-list events.
|
|
92
|
-
|
|
93
|
-
## File Organization
|
|
94
|
-
|
|
95
|
-
```
|
|
96
|
-
src/
|
|
97
|
-
├── index.ts # Top-level package entry (re-exports Schema + DeprecatedHelpers)
|
|
98
|
-
├── Schema/
|
|
99
|
-
│ ├── index.ts # Re-exports every event + value file (web/iOS, CMS, ArtOS)
|
|
100
|
-
│ ├── Events/ # Core web + iOS events (FilterAndSort, Search, Click, Tap, …)
|
|
101
|
-
│ ├── Values/ # Shared enums: ContextModule, OwnerType, Intent, Tab, …
|
|
102
|
-
│ ├── CMS/ # CMS (gallery partner CMS) schema — Events/ + Values/
|
|
103
|
-
│ └── os/ # ArtOS schema — see "ArtOS Events" above
|
|
104
|
-
│ ├── Events/ # Click, Submit, InstagramEditor, MultiAddFlow, … (+ __tests__/)
|
|
105
|
-
│ └── Values/ # OsContextModule, OsOwnerType
|
|
106
|
-
├── DeprecatedSchema/ # Frozen legacy schema — do not extend
|
|
107
|
-
└── DeprecatedHelpers/ # Frozen legacy helpers — do not extend
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
## Workflow
|
|
111
|
-
|
|
112
|
-
- Branch off `main`; open a PR using `pull_request_template.md`.
|
|
113
|
-
- Merging to `main` auto-publishes a new npm version via Auto; **PRs from feature branches
|
|
114
|
-
publish canary versions** consumers can test before merge.
|
|
115
|
-
- Commit messages follow Conventional Commits (e.g. `chore:`, `feat:`) — used by Auto to
|
|
116
|
-
decide the version bump.
|
|
117
|
-
|
|
118
|
-
## Gotchas
|
|
119
|
-
|
|
120
|
-
- **Adding a file is not enough** — it must be re-exported from `src/Schema/index.ts` (and
|
|
121
|
-
any folder `index.ts` union) or consumers can't import it.
|
|
122
|
-
- **The enum value is a contract.** An `ActionType`/`OsActionType` value names a Redshift
|
|
123
|
-
table; renaming it breaks the downstream data pipeline.
|
|
124
|
-
- **`DeprecatedSchema` / `DeprecatedHelpers` are frozen** — add new events to `Schema`.
|
|
125
|
-
- **Doc comments are shipped docs**, not just hints — keep `@example` blocks accurate.
|
|
126
|
-
- The data team owns the core `Schema`; coordinate before changing shared `Values`.
|
|
127
|
-
|
|
128
|
-
## Further Documentation
|
|
129
|
-
|
|
130
|
-
- [README.md](README.md) — setup, and the canonical "add a new event" walkthrough
|
|
131
|
-
- ArtOS tracking guidelines: [event list & principles](https://app.notion.com/p/373cab0764a080fca7e7d5a984ec17c7), [Filter/Sort/Search](https://app.notion.com/p/37bcab0764a081a2b22dc0f6434e44fa)
|
|
132
|
-
- Generated API docs: https://cohesion.artsy.net
|
package/CLAUDE.md
DELETED