feat: backend implementation for media manager v2 (WIP - Undeployed)

This commit is contained in:
Ben Miller
2025-12-28 08:13:27 -07:00
parent a9cb63fd67
commit 6e1222cec9
11 changed files with 763 additions and 189 deletions

View File

@ -15,6 +15,7 @@ export class MockShopifyMediaService implements IShopifyMediaService {
productCreateMedia(productId: string, media: any[]): any {
return {
media: media.map(m => ({
id: `gid://shopify/Media/${Math.random()}`,
alt: m.alt,
mediaContentType: m.mediaContentType,
status: "PROCESSING"
@ -26,4 +27,27 @@ export class MockShopifyMediaService implements IShopifyMediaService {
}
}
}
getProductMedia(productId: string): any[] {
// Return empty or mock list
return []
}
productDeleteMedia(productId: string, mediaId: string): any {
return {
productDeleteMedia: {
deletedMediaId: mediaId,
userErrors: []
}
}
}
productReorderMedia(productId: string, moves: any[]): any {
return {
productReorderMedia: {
job: { id: "job_123" },
userErrors: []
}
}
}
}