@artsy/cohesion 4.371.0--canary.717.15198.0 → 4.372.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/AGENTS.md +132 -0
- package/CHANGELOG.md +24 -0
- package/CLAUDE.md +3 -0
- package/dist/Schema/Values/ContextModule.d.ts +0 -1
- package/dist/Schema/Values/ContextModule.js +0 -1
- package/dist/Schema/index.d.ts +0 -1
- package/dist/Schema/index.js +0 -12
- package/dist/Schema/os/Events/Click.d.ts +1 -45
- package/dist/Schema/os/Events/InventoryTable.d.ts +2 -33
- package/dist/Schema/os/Events/Submit.d.ts +1 -31
- package/dist/Schema/os/Events/index.d.ts +2 -23
- package/dist/Schema/os/Events/index.js +0 -5
- package/dist/Schema/os/Values/OsContextModule.d.ts +1 -2
- package/dist/Schema/os/Values/OsContextModule.js +0 -1
- package/dist/Schema/os/Values/OsOwnerType.d.ts +0 -1
- package/dist/Schema/os/Values/OsOwnerType.js +0 -1
- package/package.json +1 -1
- package/dist/Schema/os/Events/Toggle.d.ts +0 -28
- package/dist/Schema/os/Events/Toggle.js +0 -1
- package/dist/Schema/os/Events/__tests__/DistributionSyncFlow.test.d.ts +0 -1
package/AGENTS.md
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
# v4.372.0 (Fri Jun 26 2026)
|
|
2
|
+
|
|
3
|
+
#### 🚀 Enhancement
|
|
4
|
+
|
|
5
|
+
- chore: Remove list from os owner type [#718](https://github.com/artsy/cohesion/pull/718) ([@MrSltun](https://github.com/MrSltun))
|
|
6
|
+
|
|
7
|
+
#### Authors: 1
|
|
8
|
+
|
|
9
|
+
- Sultan Al-Maari ([@MrSltun](https://github.com/MrSltun))
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# v4.371.0 (Fri Jun 26 2026)
|
|
14
|
+
|
|
15
|
+
#### 🚀 Enhancement
|
|
16
|
+
|
|
17
|
+
- chore: Add AGENTS.md and CLAUDE.md for agent onboarding [#715](https://github.com/artsy/cohesion/pull/715) ([@MounirDhahri](https://github.com/MounirDhahri))
|
|
18
|
+
|
|
19
|
+
#### Authors: 1
|
|
20
|
+
|
|
21
|
+
- Mounir Dhahri ([@MounirDhahri](https://github.com/MounirDhahri))
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
1
25
|
# v4.370.0 (Thu Jun 25 2026)
|
|
2
26
|
|
|
3
27
|
#### 🚀 Enhancement
|
package/CLAUDE.md
ADDED
|
@@ -55,7 +55,6 @@ export declare enum ContextModule {
|
|
|
55
55
|
artworkRecommendationsRail = "artworkRecommendationsRail",
|
|
56
56
|
artworkSidebar = "artworkSidebar",
|
|
57
57
|
artworksTab = "artworksTab",
|
|
58
|
-
artworkTable = "artworkTable",
|
|
59
58
|
associatedViewingRoom = "associatedViewingRoom",
|
|
60
59
|
auctionCard = "auctionCard",
|
|
61
60
|
auctionHome = "auctionHome",
|
|
@@ -69,7 +69,6 @@ exports.ContextModule = ContextModule;
|
|
|
69
69
|
ContextModule["artworkRecommendationsRail"] = "artworkRecommendationsRail";
|
|
70
70
|
ContextModule["artworkSidebar"] = "artworkSidebar";
|
|
71
71
|
ContextModule["artworksTab"] = "artworksTab";
|
|
72
|
-
ContextModule["artworkTable"] = "artworkTable";
|
|
73
72
|
ContextModule["associatedViewingRoom"] = "associatedViewingRoom";
|
|
74
73
|
ContextModule["auctionCard"] = "auctionCard";
|
|
75
74
|
ContextModule["auctionHome"] = "auctionHome";
|
package/dist/Schema/index.d.ts
CHANGED
|
@@ -58,6 +58,5 @@ 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";
|
|
62
61
|
export * from "./os/Values/OsContextModule";
|
|
63
62
|
export * from "./os/Values/OsOwnerType";
|
package/dist/Schema/index.js
CHANGED
|
@@ -616,18 +616,6 @@ 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
|
-
|
|
631
619
|
var _OsContextModule = require("./os/Values/OsContextModule");
|
|
632
620
|
|
|
633
621
|
Object.keys(_OsContextModule).forEach(function (key) {
|
|
@@ -49,50 +49,6 @@ 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
|
-
}
|
|
96
52
|
/**
|
|
97
53
|
* A partner opens a list, either from the Lists surface (a `ListCard`) or from
|
|
98
54
|
* the recent-lists shortcut on the Inventory surface. `source` distinguishes the
|
|
@@ -118,4 +74,4 @@ export interface ClickedOpenList {
|
|
|
118
74
|
list_type: string;
|
|
119
75
|
source: string;
|
|
120
76
|
}
|
|
121
|
-
export type OsClickEvent = ClickedActionsDropdown | ClickedCancelBulkEdit |
|
|
77
|
+
export type OsClickEvent = ClickedActionsDropdown | ClickedCancelBulkEdit | ClickedOpenList;
|
|
@@ -311,41 +311,10 @@ 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"
|
|
315
314
|
*/
|
|
316
|
-
value: "Add to Artsy" | "Add to Collection" | "Change Collection" | "Checklist" | "Convert to Edition Set" | "Convert to Unique" | "Delete" | "
|
|
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";
|
|
317
316
|
/** Which button or trigger the partner used to open this dropdown */
|
|
318
317
|
label: "add to dropdown" | "context menu" | "more dropdown" | "row action" | "studio dropdown";
|
|
319
318
|
artwork_ids: string[];
|
|
320
319
|
}
|
|
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;
|
|
320
|
+
export type OsInventoryTable = OsAddedArtist | OsAddedArtworkDocument | OsAddedLocation | OsClickedActionsDropdown | OsClickedArtworkRow | OsClickedEditionSetRow | OsClickedImagesModal | OsEditedArtworkField | OsRemovedArtworkDocument | OsSavedArtworkImages;
|
|
@@ -78,36 +78,6 @@ 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
|
-
}
|
|
111
81
|
/**
|
|
112
82
|
* A partner creates a new list in the Add-to-list modal and bulk-adds the current
|
|
113
83
|
* selection to it. `start_date` / `end_date` are null when unset; `fair_id` is
|
|
@@ -289,4 +259,4 @@ export interface DistributedList {
|
|
|
289
259
|
fair_id?: string;
|
|
290
260
|
partner_show_id: string;
|
|
291
261
|
}
|
|
292
|
-
export type OsSubmitEvent = BulkEditedArtworks |
|
|
262
|
+
export type OsSubmitEvent = BulkEditedArtworks | DeletedArtwork | DistributedArtworks | CreatedList | AddedArtworksToList | UpdatedList | DeletedList | RemovedArtworksFromList | MovedArtworksBetweenLists | DistributedList;
|
|
@@ -6,13 +6,12 @@ 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";
|
|
10
9
|
/**
|
|
11
10
|
* List of valid schemas for Art OS analytics actions
|
|
12
11
|
*
|
|
13
12
|
* Each event describes one ActionType
|
|
14
13
|
*/
|
|
15
|
-
export type OsEvent = OsMultiAddFlow | ClickedBrandKitColor | ClickedBrandKitFont | ClickedAddBrandKitFile | ClickedSaveBrandKit | OsConnectedAppsFlow | OsClickEvent | OsInstagramEditor | OsInventoryTable | OsMaterialsEditor | OsSubmitEvent
|
|
14
|
+
export type OsEvent = OsMultiAddFlow | ClickedBrandKitColor | ClickedBrandKitFont | ClickedAddBrandKitFile | ClickedSaveBrandKit | OsConnectedAppsFlow | OsClickEvent | OsInstagramEditor | OsInventoryTable | OsMaterialsEditor | OsSubmitEvent;
|
|
16
15
|
/**
|
|
17
16
|
* List of all Art OS actions
|
|
18
17
|
*
|
|
@@ -76,10 +75,6 @@ export declare enum OsActionType {
|
|
|
76
75
|
* Corresponds to {@link OsInstagramEditor}
|
|
77
76
|
*/
|
|
78
77
|
clickedConnectModal = "clickedConnectModal",
|
|
79
|
-
/**
|
|
80
|
-
* Corresponds to {@link ClickedDivergenceMarker}
|
|
81
|
-
*/
|
|
82
|
-
clickedDivergenceMarker = "clickedDivergenceMarker",
|
|
83
78
|
/**
|
|
84
79
|
* Corresponds to {@link OsInventoryTable}
|
|
85
80
|
*/
|
|
@@ -116,10 +111,6 @@ export declare enum OsActionType {
|
|
|
116
111
|
* Corresponds to {@link OsInstagramEditor}
|
|
117
112
|
*/
|
|
118
113
|
clickedUploadImageBank = "clickedUploadImageBank",
|
|
119
|
-
/**
|
|
120
|
-
* Corresponds to {@link CompletedArtworkDistribution}
|
|
121
|
-
*/
|
|
122
|
-
completedArtworkDistribution = "completedArtworkDistribution",
|
|
123
114
|
/**
|
|
124
115
|
* Corresponds to {@link CompletedArtworkImport}
|
|
125
116
|
*/
|
|
@@ -156,10 +147,6 @@ export declare enum OsActionType {
|
|
|
156
147
|
* Corresponds to {@link EditedArtworkField}
|
|
157
148
|
*/
|
|
158
149
|
editedArtworkField = "editedArtworkField",
|
|
159
|
-
/**
|
|
160
|
-
* Corresponds to {@link EditedInventoryField}
|
|
161
|
-
*/
|
|
162
|
-
editedInventoryField = "editedInventoryField",
|
|
163
150
|
/**
|
|
164
151
|
* Corresponds to {@link MovedArtworksBetweenLists}
|
|
165
152
|
*/
|
|
@@ -184,16 +171,8 @@ export declare enum OsActionType {
|
|
|
184
171
|
* Corresponds to {@link StartedArtworkImport}
|
|
185
172
|
*/
|
|
186
173
|
startedArtworkImport = "startedArtworkImport",
|
|
187
|
-
/**
|
|
188
|
-
* Corresponds to {@link ToggledDistributionSync}
|
|
189
|
-
*/
|
|
190
|
-
toggledDistributionSync = "toggledDistributionSync",
|
|
191
174
|
/**
|
|
192
175
|
* Corresponds to {@link UpdatedList}
|
|
193
176
|
*/
|
|
194
|
-
updatedList = "updatedList"
|
|
195
|
-
/**
|
|
196
|
-
* Corresponds to {@link ViewedDivergenceMarker}
|
|
197
|
-
*/
|
|
198
|
-
viewedDivergenceMarker = "viewedDivergenceMarker"
|
|
177
|
+
updatedList = "updatedList"
|
|
199
178
|
}
|
|
@@ -35,7 +35,6 @@ exports.OsActionType = OsActionType;
|
|
|
35
35
|
OsActionType["clickedConnectAccount"] = "clickedConnectAccount";
|
|
36
36
|
OsActionType["clickedConnectAccountModal"] = "clickedConnectAccountModal";
|
|
37
37
|
OsActionType["clickedConnectModal"] = "clickedConnectModal";
|
|
38
|
-
OsActionType["clickedDivergenceMarker"] = "clickedDivergenceMarker";
|
|
39
38
|
OsActionType["clickedEditionSetRow"] = "clickedEditionSetRow";
|
|
40
39
|
OsActionType["clickedExitDropZone"] = "clickedExitDropZone";
|
|
41
40
|
OsActionType["clickedExitEditor"] = "clickedExitEditor";
|
|
@@ -45,7 +44,6 @@ exports.OsActionType = OsActionType;
|
|
|
45
44
|
OsActionType["clickedOpenList"] = "clickedOpenList";
|
|
46
45
|
OsActionType["clickedPublishConfirmation"] = "clickedPublishConfirmation";
|
|
47
46
|
OsActionType["clickedUploadImageBank"] = "clickedUploadImageBank";
|
|
48
|
-
OsActionType["completedArtworkDistribution"] = "completedArtworkDistribution";
|
|
49
47
|
OsActionType["completedArtworkImport"] = "completedArtworkImport";
|
|
50
48
|
OsActionType["createdImportedArtworks"] = "createdImportedArtworks";
|
|
51
49
|
OsActionType["createdList"] = "createdList";
|
|
@@ -55,14 +53,11 @@ exports.OsActionType = OsActionType;
|
|
|
55
53
|
OsActionType["distributedArtworks"] = "distributedArtworks";
|
|
56
54
|
OsActionType["distributedList"] = "distributedList";
|
|
57
55
|
OsActionType["editedArtworkField"] = "editedArtworkField";
|
|
58
|
-
OsActionType["editedInventoryField"] = "editedInventoryField";
|
|
59
56
|
OsActionType["movedArtworksBetweenLists"] = "movedArtworksBetweenLists";
|
|
60
57
|
OsActionType["removedArtworkDocument"] = "removedArtworkDocument";
|
|
61
58
|
OsActionType["removedArtworksFromList"] = "removedArtworksFromList";
|
|
62
59
|
OsActionType["resumedArtworkImport"] = "resumedArtworkImport";
|
|
63
60
|
OsActionType["savedArtworkImages"] = "savedArtworkImages";
|
|
64
61
|
OsActionType["startedArtworkImport"] = "startedArtworkImport";
|
|
65
|
-
OsActionType["toggledDistributionSync"] = "toggledDistributionSync";
|
|
66
62
|
OsActionType["updatedList"] = "updatedList";
|
|
67
|
-
OsActionType["viewedDivergenceMarker"] = "viewedDivergenceMarker";
|
|
68
63
|
})(OsActionType || (exports.OsActionType = OsActionType = {}));
|
|
@@ -28,6 +28,5 @@ export declare enum OsContextModule {
|
|
|
28
28
|
materialsEditor = "materialsEditor",
|
|
29
29
|
multiAdd = "multiAdd",
|
|
30
30
|
multiAddReview = "multiAddReview",
|
|
31
|
-
publishConfirmationModal = "publishConfirmationModal"
|
|
32
|
-
tableActions = "tableActions"
|
|
31
|
+
publishConfirmationModal = "publishConfirmationModal"
|
|
33
32
|
}
|
|
@@ -39,5 +39,4 @@ exports.OsContextModule = OsContextModule;
|
|
|
39
39
|
OsContextModule["multiAdd"] = "multiAdd";
|
|
40
40
|
OsContextModule["multiAddReview"] = "multiAddReview";
|
|
41
41
|
OsContextModule["publishConfirmationModal"] = "publishConfirmationModal";
|
|
42
|
-
OsContextModule["tableActions"] = "tableActions";
|
|
43
42
|
})(OsContextModule || (exports.OsContextModule = OsContextModule = {}));
|
|
@@ -17,7 +17,6 @@ exports.OsOwnerType = OsOwnerType;
|
|
|
17
17
|
OsOwnerType["collection"] = "collection";
|
|
18
18
|
OsOwnerType["connectedApps"] = "connectedApps";
|
|
19
19
|
OsOwnerType["inventory"] = "inventory";
|
|
20
|
-
OsOwnerType["list"] = "list";
|
|
21
20
|
OsOwnerType["studio"] = "studio";
|
|
22
21
|
OsOwnerType["studioInstagram"] = "studioInstagram";
|
|
23
22
|
OsOwnerType["studioMaterials"] = "studioMaterials";
|
package/package.json
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|