@artsy/cohesion 4.375.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/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 +24 -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 +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/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
|
@@ -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";
|
package/dist/Schema/index.js
CHANGED
|
@@ -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
|
-
|
|
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
|
|
@@ -343,4 +373,4 @@ export interface ConvertedArtworkToUnique {
|
|
|
343
373
|
context_page_owner_type: OsOwnerType;
|
|
344
374
|
value: "confirm" | "cancel";
|
|
345
375
|
}
|
|
346
|
-
export type OsSubmitEvent = AddedArtworksToList | BulkEditedArtworks | ConvertedArtworkToUnique | CreatedEditionSet | CreatedList | DeletedArtwork | DeletedList | DistributedArtworks | DistributedList | MovedArtworksBetweenLists | RemovedArtworksFromList | UpdatedEditionSet | UpdatedList;
|
|
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";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,6 +121,10 @@ 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
|
*/
|
|
@@ -168,6 +173,10 @@ export declare enum OsActionType {
|
|
|
168
173
|
* Corresponds to {@link EditedArtworkField}
|
|
169
174
|
*/
|
|
170
175
|
editedArtworkField = "editedArtworkField",
|
|
176
|
+
/**
|
|
177
|
+
* Corresponds to {@link EditedInventoryField}
|
|
178
|
+
*/
|
|
179
|
+
editedInventoryField = "editedInventoryField",
|
|
171
180
|
/**
|
|
172
181
|
* Corresponds to {@link MovedArtworksBetweenLists}
|
|
173
182
|
*/
|
|
@@ -204,6 +213,10 @@ export declare enum OsActionType {
|
|
|
204
213
|
* Corresponds to {@link StartedArtworkImport}
|
|
205
214
|
*/
|
|
206
215
|
startedArtworkImport = "startedArtworkImport",
|
|
216
|
+
/**
|
|
217
|
+
* Corresponds to {@link ToggledDistributionSync}
|
|
218
|
+
*/
|
|
219
|
+
toggledDistributionSync = "toggledDistributionSync",
|
|
207
220
|
/**
|
|
208
221
|
* Corresponds to {@link UpdatedEditionSet}
|
|
209
222
|
*/
|
|
@@ -211,5 +224,9 @@ export declare enum OsActionType {
|
|
|
211
224
|
/**
|
|
212
225
|
* Corresponds to {@link UpdatedList}
|
|
213
226
|
*/
|
|
214
|
-
updatedList = "updatedList"
|
|
227
|
+
updatedList = "updatedList",
|
|
228
|
+
/**
|
|
229
|
+
* Corresponds to {@link ViewedDivergenceMarker}
|
|
230
|
+
*/
|
|
231
|
+
viewedDivergenceMarker = "viewedDivergenceMarker"
|
|
215
232
|
}
|
|
@@ -46,6 +46,7 @@ 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";
|
|
50
51
|
OsActionType["convertedArtworkToUnique"] = "convertedArtworkToUnique";
|
|
51
52
|
OsActionType["createdEditionSet"] = "createdEditionSet";
|
|
@@ -58,6 +59,7 @@ exports.OsActionType = OsActionType;
|
|
|
58
59
|
OsActionType["distributedArtworks"] = "distributedArtworks";
|
|
59
60
|
OsActionType["distributedList"] = "distributedList";
|
|
60
61
|
OsActionType["editedArtworkField"] = "editedArtworkField";
|
|
62
|
+
OsActionType["editedInventoryField"] = "editedInventoryField";
|
|
61
63
|
OsActionType["movedArtworksBetweenLists"] = "movedArtworksBetweenLists";
|
|
62
64
|
OsActionType["removedArtworkDocument"] = "removedArtworkDocument";
|
|
63
65
|
OsActionType["removedFilter"] = "removedFilter";
|
|
@@ -67,6 +69,8 @@ exports.OsActionType = OsActionType;
|
|
|
67
69
|
OsActionType["searchedArtworks"] = "searchedArtworks";
|
|
68
70
|
OsActionType["sortedColumn"] = "sortedColumn";
|
|
69
71
|
OsActionType["startedArtworkImport"] = "startedArtworkImport";
|
|
72
|
+
OsActionType["toggledDistributionSync"] = "toggledDistributionSync";
|
|
70
73
|
OsActionType["updatedEditionSet"] = "updatedEditionSet";
|
|
71
74
|
OsActionType["updatedList"] = "updatedList";
|
|
75
|
+
OsActionType["viewedDivergenceMarker"] = "viewedDivergenceMarker";
|
|
72
76
|
})(OsActionType || (exports.OsActionType = OsActionType = {}));
|
|
@@ -32,5 +32,6 @@ export declare enum OsContextModule {
|
|
|
32
32
|
materialsEditor = "materialsEditor",
|
|
33
33
|
multiAdd = "multiAdd",
|
|
34
34
|
multiAddReview = "multiAddReview",
|
|
35
|
-
publishConfirmationModal = "publishConfirmationModal"
|
|
35
|
+
publishConfirmationModal = "publishConfirmationModal",
|
|
36
|
+
tableActions = "tableActions"
|
|
36
37
|
}
|
|
@@ -43,4 +43,5 @@ exports.OsContextModule = OsContextModule;
|
|
|
43
43
|
OsContextModule["multiAdd"] = "multiAdd";
|
|
44
44
|
OsContextModule["multiAddReview"] = "multiAddReview";
|
|
45
45
|
OsContextModule["publishConfirmationModal"] = "publishConfirmationModal";
|
|
46
|
+
OsContextModule["tableActions"] = "tableActions";
|
|
46
47
|
})(OsContextModule || (exports.OsContextModule = OsContextModule = {}));
|