Skip to content

Commit de4300d

Browse files
authored
feat: Tracking needs for Shipping Presets project (#661)
* Adds optional shipping_preset_id to some click events for edits and artwork form clicks * Adjust bulk edit event to handle array for label and values
1 parent c9e5989 commit de4300d

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/Schema/CMS/Events/BulkEditFlow.ts

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ export type CmsBulkEditClickLabel =
2828
| "publish"
2929
| "publish learn more"
3030
| "resolve all conflicts"
31+
| "shipping preset"
3132
| "shortlist"
3233
| "unpublish"
3334

@@ -120,21 +121,34 @@ export interface CmsBulkEditProcessingStarted {
120121
/**
121122
* Bulk Edit flow processing completed
122123
*
123-
* Example:
124+
* Example (single field):
124125
* {
125126
* action: "processingCompleted",
126127
* context_module: "Artworks - bulk edit",
127128
* label: "change availability",
128129
* value: "on hold", // e.g. "on hold", "available", "not for sale"
129130
* artwork_ids: ["artwork1", "artwork2"]
130131
* }
132+
*
133+
* Example (multiple fields):
134+
* {
135+
* action: "processingCompleted",
136+
* context_module: "Artworks - bulk edit",
137+
* labels: ["change domesticShipping", "change internationalShipping", "change collectorPickup"],
138+
* values: ["2000", "3000", "1000"],
139+
* artwork_ids: ["artwork1", "artwork2"],
140+
* shipping_preset_id: "preset123"
141+
* }
131142
*/
132143
export interface CmsBulkEditProcessingCompleted {
133144
action: CmsActionType.processingCompleted
134145
context_module: CmsContextModule.bulkEditFlow
135-
label: string
136-
value: string
146+
label?: string
147+
value?: string
148+
labels?: string[]
149+
values?: string[]
137150
artwork_ids: string[]
151+
shipping_preset_id?: string
138152
}
139153

140154
/**

src/Schema/Events/Click.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,6 +1627,7 @@ export interface ClickedPublish {
16271627
context_module: ContextModule
16281628
artwork_id: string
16291629
label: string
1630+
shipping_preset_id?: string
16301631
}
16311632

16321633
/**
@@ -1650,6 +1651,7 @@ export interface ClickedSave {
16501651
context_module: ContextModule
16511652
artwork_id: string
16521653
label: string
1654+
shipping_preset_id?: string
16531655
}
16541656

16551657
/**

0 commit comments

Comments
 (0)