@artsy/cohesion 4.363.0 → 4.364.0--canary.708.14879.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.
@@ -78,6 +78,7 @@ export declare enum ContextModule {
78
78
  boothsTab = "boothsTab",
79
79
  bottomTabs = "bottomTabs",
80
80
  browseFair = "browseFair",
81
+ bulkEditDrawer = "bulkEditDrawer",
81
82
  categoryRail = "categoryRail",
82
83
  cityGuideCard = "cityGuideCard",
83
84
  collectionCard = "collectionCard",
@@ -92,6 +92,7 @@ exports.ContextModule = ContextModule;
92
92
  ContextModule["boothsTab"] = "boothsTab";
93
93
  ContextModule["bottomTabs"] = "bottomTabs";
94
94
  ContextModule["browseFair"] = "browseFair";
95
+ ContextModule["bulkEditDrawer"] = "bulkEditDrawer";
95
96
  ContextModule["categoryRail"] = "categoryRail";
96
97
  ContextModule["cityGuideCard"] = "cityGuideCard";
97
98
  ContextModule["collectionCard"] = "collectionCard";
@@ -53,4 +53,6 @@ export * from "./CMS/Events/UploadArtworkFlow";
53
53
  export * from "./os/Events";
54
54
  export * from "./os/Values/OsContextModule";
55
55
  export * from "./os/Values/OsOwnerType";
56
+ export * from "./os/Events/Click";
56
57
  export * from "./os/Events/MultiAddFlow";
58
+ export * from "./os/Events/Submit";
@@ -556,6 +556,18 @@ Object.keys(_OsOwnerType).forEach(function (key) {
556
556
  });
557
557
  });
558
558
 
559
+ var _Click2 = require("./os/Events/Click");
560
+
561
+ Object.keys(_Click2).forEach(function (key) {
562
+ if (key === "default" || key === "__esModule") return;
563
+ Object.defineProperty(exports, key, {
564
+ enumerable: true,
565
+ get: function get() {
566
+ return _Click2[key];
567
+ }
568
+ });
569
+ });
570
+
559
571
  var _MultiAddFlow = require("./os/Events/MultiAddFlow");
560
572
 
561
573
  Object.keys(_MultiAddFlow).forEach(function (key) {
@@ -566,4 +578,16 @@ Object.keys(_MultiAddFlow).forEach(function (key) {
566
578
  return _MultiAddFlow[key];
567
579
  }
568
580
  });
581
+ });
582
+
583
+ var _Submit = require("./os/Events/Submit");
584
+
585
+ Object.keys(_Submit).forEach(function (key) {
586
+ if (key === "default" || key === "__esModule") return;
587
+ Object.defineProperty(exports, key, {
588
+ enumerable: true,
589
+ get: function get() {
590
+ return _Submit[key];
591
+ }
592
+ });
569
593
  });
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Schemas describing Art OS bulk-action click 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 selects an item from the inventory Actions dropdown - also fired from
10
+ * the row action menu, the right-click context menu, and the bulk Edit button.
11
+ * Reusable across surfaces: `value` is the menu item, `label` is the trigger.
12
+ *
13
+ * @example
14
+ * ```
15
+ * {
16
+ * action: "clickedActionsDropdown",
17
+ * context_module: "actionsDropdown",
18
+ * context_page_owner_type: "inventory",
19
+ * value: "Add to Artsy (as Draft)",
20
+ * label: "action button",
21
+ * artwork_ids: ["5d2b5b5d5e5b5d000e1b5b5d"]
22
+ * }
23
+ * ```
24
+ */
25
+ export interface ClickedActionsDropdown {
26
+ action: OsActionType.clickedActionsDropdown;
27
+ context_module: OsContextModule.actionsDropdown;
28
+ context_page_owner_type: OsOwnerType;
29
+ value: string;
30
+ label: string;
31
+ artwork_ids: string[];
32
+ }
33
+ /**
34
+ * A partner cancels the bulk-edit drawer without applying changes.
35
+ *
36
+ * @example
37
+ * ```
38
+ * {
39
+ * action: "clickedCancelBulkEdit",
40
+ * context_module: "bulkEditDrawer",
41
+ * context_page_owner_type: "inventory",
42
+ * artwork_ids: ["5d2b5b5d5e5b5d000e1b5b5d"]
43
+ * }
44
+ * ```
45
+ */
46
+ export interface ClickedCancelBulkEdit {
47
+ action: OsActionType.clickedCancelBulkEdit;
48
+ context_module: OsContextModule.bulkEditDrawer;
49
+ context_page_owner_type: OsOwnerType;
50
+ artwork_ids: string[];
51
+ }
52
+ export type OsClickEvent = ClickedActionsDropdown | ClickedCancelBulkEdit;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Schemas describing Art OS bulk-action submit events (tied to backend changes)
3
+ * @packageDocumentation
4
+ */
5
+ import { OsContextModule } from "../Values/OsContextModule";
6
+ import { OsOwnerType } from "../Values/OsOwnerType";
7
+ import { OsActionType } from "./index";
8
+ /**
9
+ * A partner applies changes in the bulk-edit drawer. `labels` lists the edited
10
+ * fields and `values` carries each field's submitted value, index-aligned.
11
+ *
12
+ * @example
13
+ * ```
14
+ * {
15
+ * action: "bulkEditedArtworks",
16
+ * context_module: "bulkEditDrawer",
17
+ * context_page_owner_type: "inventory",
18
+ * labels: ["availability", "price"],
19
+ * values: ["for sale", "USD 1000"],
20
+ * artwork_ids: ["5d2b5b5d5e5b5d000e1b5b5d"],
21
+ * artwork_count: 30
22
+ * }
23
+ * ```
24
+ */
25
+ export interface BulkEditedArtworks {
26
+ action: OsActionType.bulkEditedArtworks;
27
+ context_module: OsContextModule.bulkEditDrawer;
28
+ context_page_owner_type: OsOwnerType;
29
+ labels: string[];
30
+ values: string[];
31
+ artwork_ids: string[];
32
+ artwork_count: number;
33
+ }
34
+ /**
35
+ * A partner confirms deletion of a single artwork in the delete modal.
36
+ * Fires only on a confirmed delete; cancelling is not tracked.
37
+ *
38
+ * @example
39
+ * ```
40
+ * {
41
+ * action: "deletedArtwork",
42
+ * context_module: "deleteModal",
43
+ * context_page_owner_type: "inventory",
44
+ * value: "confirm",
45
+ * artwork_ids: ["5d2b5b5d5e5b5d000e1b5b5d"]
46
+ * }
47
+ * ```
48
+ */
49
+ export interface DeletedArtwork {
50
+ action: OsActionType.deletedArtwork;
51
+ context_module: OsContextModule.deleteModal;
52
+ context_page_owner_type: OsOwnerType;
53
+ value: "confirm";
54
+ artwork_ids: string[];
55
+ }
56
+ /**
57
+ * A partner confirms or cancels distributing artworks to Artsy in the distribute modal.
58
+ *
59
+ * @example
60
+ * ```
61
+ * {
62
+ * action: "distributedArtworks",
63
+ * context_module: "distributeModal",
64
+ * context_page_owner_type: "inventory",
65
+ * destination: ["artsy"],
66
+ * value: "confirm",
67
+ * artwork_ids: ["5d2b5b5d5e5b5d000e1b5b5d"],
68
+ * selected_count: 2
69
+ * }
70
+ * ```
71
+ */
72
+ export interface DistributedArtworks {
73
+ action: OsActionType.distributedArtworks;
74
+ context_module: OsContextModule.distributeModal;
75
+ context_page_owner_type: OsOwnerType;
76
+ destination: string[];
77
+ value: "confirm" | "cancel";
78
+ artwork_ids: string[];
79
+ selected_count: number;
80
+ }
81
+ export type OsSubmitEvent = BulkEditedArtworks | DeletedArtwork | DistributedArtworks;
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,24 +1,38 @@
1
+ import { OsClickEvent } from "./Click";
1
2
  import { OsMultiAddFlow } from "./MultiAddFlow";
3
+ import { OsSubmitEvent } from "./Submit";
2
4
  /**
3
5
  * List of valid schemas for Art OS analytics actions
4
6
  *
5
7
  * Each event describes one ActionType
6
8
  */
7
- export type OsEvent = OsMultiAddFlow;
9
+ export type OsEvent = OsMultiAddFlow | OsClickEvent | OsSubmitEvent;
8
10
  /**
9
11
  * List of all Art OS actions
10
12
  *
11
13
  * Each OsActionType corresponds with a table in Redshift.
12
14
  */
13
15
  export declare enum OsActionType {
16
+ /**
17
+ * Corresponds to {@link BulkEditedArtworks}
18
+ */
19
+ bulkEditedArtworks = "bulkEditedArtworks",
14
20
  /**
15
21
  * Corresponds to {@link CancelledArtworkImport}
16
22
  */
17
23
  cancelledArtworkImport = "cancelledArtworkImport",
24
+ /**
25
+ * Corresponds to {@link ClickedActionsDropdown}
26
+ */
27
+ clickedActionsDropdown = "clickedActionsDropdown",
18
28
  /**
19
29
  * Corresponds to {@link ClickedAddFromFile}
20
30
  */
21
31
  clickedAddFromFile = "clickedAddFromFile",
32
+ /**
33
+ * Corresponds to {@link ClickedCancelBulkEdit}
34
+ */
35
+ clickedCancelBulkEdit = "clickedCancelBulkEdit",
22
36
  /**
23
37
  * Corresponds to {@link ClickedExitDropZone}
24
38
  */
@@ -31,6 +45,14 @@ export declare enum OsActionType {
31
45
  * Corresponds to {@link CreatedImportedArtworks}
32
46
  */
33
47
  createdImportedArtworks = "createdImportedArtworks",
48
+ /**
49
+ * Corresponds to {@link DeletedArtwork}
50
+ */
51
+ deletedArtwork = "deletedArtwork",
52
+ /**
53
+ * Corresponds to {@link DistributedArtworks}
54
+ */
55
+ distributedArtworks = "distributedArtworks",
34
56
  /**
35
57
  * Corresponds to {@link EditedArtworkField}
36
58
  */
@@ -20,11 +20,16 @@ var OsActionType;
20
20
  exports.OsActionType = OsActionType;
21
21
 
22
22
  (function (OsActionType) {
23
+ OsActionType["bulkEditedArtworks"] = "bulkEditedArtworks";
23
24
  OsActionType["cancelledArtworkImport"] = "cancelledArtworkImport";
25
+ OsActionType["clickedActionsDropdown"] = "clickedActionsDropdown";
24
26
  OsActionType["clickedAddFromFile"] = "clickedAddFromFile";
27
+ OsActionType["clickedCancelBulkEdit"] = "clickedCancelBulkEdit";
25
28
  OsActionType["clickedExitDropZone"] = "clickedExitDropZone";
26
29
  OsActionType["completedArtworkImport"] = "completedArtworkImport";
27
30
  OsActionType["createdImportedArtworks"] = "createdImportedArtworks";
31
+ OsActionType["deletedArtwork"] = "deletedArtwork";
32
+ OsActionType["distributedArtworks"] = "distributedArtworks";
28
33
  OsActionType["editedArtworkField"] = "editedArtworkField";
29
34
  OsActionType["resumedArtworkImport"] = "resumedArtworkImport";
30
35
  OsActionType["startedArtworkImport"] = "startedArtworkImport";
@@ -5,6 +5,10 @@
5
5
  * @packageDocumentation
6
6
  */
7
7
  export declare enum OsContextModule {
8
+ actionsDropdown = "actionsDropdown",
9
+ bulkEditDrawer = "bulkEditDrawer",
10
+ deleteModal = "deleteModal",
11
+ distributeModal = "distributeModal",
8
12
  multiAdd = "multiAdd",
9
13
  multiAddReview = "multiAddReview"
10
14
  }
@@ -15,6 +15,10 @@ var OsContextModule;
15
15
  exports.OsContextModule = OsContextModule;
16
16
 
17
17
  (function (OsContextModule) {
18
+ OsContextModule["actionsDropdown"] = "actionsDropdown";
19
+ OsContextModule["bulkEditDrawer"] = "bulkEditDrawer";
20
+ OsContextModule["deleteModal"] = "deleteModal";
21
+ OsContextModule["distributeModal"] = "distributeModal";
18
22
  OsContextModule["multiAdd"] = "multiAdd";
19
23
  OsContextModule["multiAddReview"] = "multiAddReview";
20
24
  })(OsContextModule || (exports.OsContextModule = OsContextModule = {}));
@@ -4,5 +4,6 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
  export declare enum OsOwnerType {
7
+ collection = "collection",
7
8
  inventory = "inventory"
8
9
  }
@@ -14,5 +14,6 @@ var OsOwnerType;
14
14
  exports.OsOwnerType = OsOwnerType;
15
15
 
16
16
  (function (OsOwnerType) {
17
+ OsOwnerType["collection"] = "collection";
17
18
  OsOwnerType["inventory"] = "inventory";
18
19
  })(OsOwnerType || (exports.OsOwnerType = OsOwnerType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/cohesion",
3
- "version": "4.363.0",
3
+ "version": "4.364.0--canary.708.14879.0",
4
4
  "description": "Analytics schema",
5
5
  "main": "dist/index.js",
6
6
  "publishConfig": {