feat: backend implementation for media manager v2 (WIP - Undeployed)
This commit is contained in:
@ -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: []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user