@artsy/cohesion 4.370.0 → 4.371.0--canary.717.15198.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/dist/Schema/Values/ContextModule.d.ts +1 -0
- package/dist/Schema/Values/ContextModule.js +1 -0
- package/dist/Schema/index.d.ts +1 -0
- package/dist/Schema/index.js +12 -0
- package/dist/Schema/os/Events/Click.d.ts +45 -1
- package/dist/Schema/os/Events/InventoryTable.d.ts +33 -2
- 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 +23 -2
- package/dist/Schema/os/Events/index.js +5 -0
- package/dist/Schema/os/Values/OsContextModule.d.ts +2 -1
- package/dist/Schema/os/Values/OsContextModule.js +1 -0
- package/package.json +1 -1
|
@@ -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
|
@@ -58,5 +58,6 @@ export * from "./os/Events/InstagramEditor";
|
|
|
58
58
|
export * from "./os/Events/InventoryTable";
|
|
59
59
|
export * from "./os/Events/MultiAddFlow";
|
|
60
60
|
export * from "./os/Events/Submit";
|
|
61
|
+
export * from "./os/Events/Toggle";
|
|
61
62
|
export * from "./os/Values/OsContextModule";
|
|
62
63
|
export * from "./os/Values/OsOwnerType";
|
package/dist/Schema/index.js
CHANGED
|
@@ -616,6 +616,18 @@ Object.keys(_Submit).forEach(function (key) {
|
|
|
616
616
|
});
|
|
617
617
|
});
|
|
618
618
|
|
|
619
|
+
var _Toggle2 = require("./os/Events/Toggle");
|
|
620
|
+
|
|
621
|
+
Object.keys(_Toggle2).forEach(function (key) {
|
|
622
|
+
if (key === "default" || key === "__esModule") return;
|
|
623
|
+
Object.defineProperty(exports, key, {
|
|
624
|
+
enumerable: true,
|
|
625
|
+
get: function get() {
|
|
626
|
+
return _Toggle2[key];
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
});
|
|
630
|
+
|
|
619
631
|
var _OsContextModule = require("./os/Values/OsContextModule");
|
|
620
632
|
|
|
621
633
|
Object.keys(_OsContextModule).forEach(function (key) {
|
|
@@ -49,6 +49,50 @@ 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
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A partner clicks the divergence marker to inspect the downstream destination value (e.g. Artsy CMS).
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```
|
|
80
|
+
* {
|
|
81
|
+
* action: "clickedDivergenceMarker",
|
|
82
|
+
* context_module: "artworkTable",
|
|
83
|
+
* context_page_owner_type: "inventory",
|
|
84
|
+
* artwork_id: "abc123",
|
|
85
|
+
* field: "availability"
|
|
86
|
+
* }
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
export interface ClickedDivergenceMarker {
|
|
90
|
+
action: OsActionType.clickedDivergenceMarker;
|
|
91
|
+
context_module: OsContextModule.artworkTable;
|
|
92
|
+
context_page_owner_type: OsOwnerType;
|
|
93
|
+
artwork_id: string;
|
|
94
|
+
field: "availability" | "medium" | "price";
|
|
95
|
+
}
|
|
52
96
|
/**
|
|
53
97
|
* A partner opens a list, either from the Lists surface (a `ListCard`) or from
|
|
54
98
|
* the recent-lists shortcut on the Inventory surface. `source` distinguishes the
|
|
@@ -74,4 +118,4 @@ export interface ClickedOpenList {
|
|
|
74
118
|
list_type: string;
|
|
75
119
|
source: string;
|
|
76
120
|
}
|
|
77
|
-
export type OsClickEvent = ClickedActionsDropdown | ClickedCancelBulkEdit | ClickedOpenList;
|
|
121
|
+
export type OsClickEvent = ClickedActionsDropdown | ClickedCancelBulkEdit | ClickedDivergenceMarker | 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;
|
|
@@ -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
|
*
|
|
@@ -75,6 +76,10 @@ export declare enum OsActionType {
|
|
|
75
76
|
* Corresponds to {@link OsInstagramEditor}
|
|
76
77
|
*/
|
|
77
78
|
clickedConnectModal = "clickedConnectModal",
|
|
79
|
+
/**
|
|
80
|
+
* Corresponds to {@link ClickedDivergenceMarker}
|
|
81
|
+
*/
|
|
82
|
+
clickedDivergenceMarker = "clickedDivergenceMarker",
|
|
78
83
|
/**
|
|
79
84
|
* Corresponds to {@link OsInventoryTable}
|
|
80
85
|
*/
|
|
@@ -111,6 +116,10 @@ export declare enum OsActionType {
|
|
|
111
116
|
* Corresponds to {@link OsInstagramEditor}
|
|
112
117
|
*/
|
|
113
118
|
clickedUploadImageBank = "clickedUploadImageBank",
|
|
119
|
+
/**
|
|
120
|
+
* Corresponds to {@link CompletedArtworkDistribution}
|
|
121
|
+
*/
|
|
122
|
+
completedArtworkDistribution = "completedArtworkDistribution",
|
|
114
123
|
/**
|
|
115
124
|
* Corresponds to {@link CompletedArtworkImport}
|
|
116
125
|
*/
|
|
@@ -147,6 +156,10 @@ export declare enum OsActionType {
|
|
|
147
156
|
* Corresponds to {@link EditedArtworkField}
|
|
148
157
|
*/
|
|
149
158
|
editedArtworkField = "editedArtworkField",
|
|
159
|
+
/**
|
|
160
|
+
* Corresponds to {@link EditedInventoryField}
|
|
161
|
+
*/
|
|
162
|
+
editedInventoryField = "editedInventoryField",
|
|
150
163
|
/**
|
|
151
164
|
* Corresponds to {@link MovedArtworksBetweenLists}
|
|
152
165
|
*/
|
|
@@ -171,8 +184,16 @@ export declare enum OsActionType {
|
|
|
171
184
|
* Corresponds to {@link StartedArtworkImport}
|
|
172
185
|
*/
|
|
173
186
|
startedArtworkImport = "startedArtworkImport",
|
|
187
|
+
/**
|
|
188
|
+
* Corresponds to {@link ToggledDistributionSync}
|
|
189
|
+
*/
|
|
190
|
+
toggledDistributionSync = "toggledDistributionSync",
|
|
174
191
|
/**
|
|
175
192
|
* Corresponds to {@link UpdatedList}
|
|
176
193
|
*/
|
|
177
|
-
updatedList = "updatedList"
|
|
194
|
+
updatedList = "updatedList",
|
|
195
|
+
/**
|
|
196
|
+
* Corresponds to {@link ViewedDivergenceMarker}
|
|
197
|
+
*/
|
|
198
|
+
viewedDivergenceMarker = "viewedDivergenceMarker"
|
|
178
199
|
}
|
|
@@ -35,6 +35,7 @@ exports.OsActionType = OsActionType;
|
|
|
35
35
|
OsActionType["clickedConnectAccount"] = "clickedConnectAccount";
|
|
36
36
|
OsActionType["clickedConnectAccountModal"] = "clickedConnectAccountModal";
|
|
37
37
|
OsActionType["clickedConnectModal"] = "clickedConnectModal";
|
|
38
|
+
OsActionType["clickedDivergenceMarker"] = "clickedDivergenceMarker";
|
|
38
39
|
OsActionType["clickedEditionSetRow"] = "clickedEditionSetRow";
|
|
39
40
|
OsActionType["clickedExitDropZone"] = "clickedExitDropZone";
|
|
40
41
|
OsActionType["clickedExitEditor"] = "clickedExitEditor";
|
|
@@ -44,6 +45,7 @@ exports.OsActionType = OsActionType;
|
|
|
44
45
|
OsActionType["clickedOpenList"] = "clickedOpenList";
|
|
45
46
|
OsActionType["clickedPublishConfirmation"] = "clickedPublishConfirmation";
|
|
46
47
|
OsActionType["clickedUploadImageBank"] = "clickedUploadImageBank";
|
|
48
|
+
OsActionType["completedArtworkDistribution"] = "completedArtworkDistribution";
|
|
47
49
|
OsActionType["completedArtworkImport"] = "completedArtworkImport";
|
|
48
50
|
OsActionType["createdImportedArtworks"] = "createdImportedArtworks";
|
|
49
51
|
OsActionType["createdList"] = "createdList";
|
|
@@ -53,11 +55,14 @@ exports.OsActionType = OsActionType;
|
|
|
53
55
|
OsActionType["distributedArtworks"] = "distributedArtworks";
|
|
54
56
|
OsActionType["distributedList"] = "distributedList";
|
|
55
57
|
OsActionType["editedArtworkField"] = "editedArtworkField";
|
|
58
|
+
OsActionType["editedInventoryField"] = "editedInventoryField";
|
|
56
59
|
OsActionType["movedArtworksBetweenLists"] = "movedArtworksBetweenLists";
|
|
57
60
|
OsActionType["removedArtworkDocument"] = "removedArtworkDocument";
|
|
58
61
|
OsActionType["removedArtworksFromList"] = "removedArtworksFromList";
|
|
59
62
|
OsActionType["resumedArtworkImport"] = "resumedArtworkImport";
|
|
60
63
|
OsActionType["savedArtworkImages"] = "savedArtworkImages";
|
|
61
64
|
OsActionType["startedArtworkImport"] = "startedArtworkImport";
|
|
65
|
+
OsActionType["toggledDistributionSync"] = "toggledDistributionSync";
|
|
62
66
|
OsActionType["updatedList"] = "updatedList";
|
|
67
|
+
OsActionType["viewedDivergenceMarker"] = "viewedDivergenceMarker";
|
|
63
68
|
})(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 = {}));
|