feat(media): implement integrated media manager with sidebar and picker
- Implement DriveService and ShopifyMediaService for backend operations - Create MediaSidebar.html with premium UI and auto-polling - Integrate Google Picker API for robust file selection - Orchestrate sync logic via MediaService (Drive -> Staged Upload -> Shopify) - Add secure config handling for API keys and tokens - Update ppsscript.json with required OAuth scopes - Update MEMORY.md and README.md with architecture details
This commit is contained in:
6
src/interfaces/IDriveService.ts
Normal file
6
src/interfaces/IDriveService.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export interface IDriveService {
|
||||
getOrCreateFolder(folderName: string, parentFolderId: string): GoogleAppsScript.Drive.Folder
|
||||
saveFile(blob: GoogleAppsScript.Base.Blob, folderId: string): GoogleAppsScript.Drive.File
|
||||
getFiles(folderId: string): GoogleAppsScript.Drive.File[]
|
||||
getFileById(id: string): GoogleAppsScript.Drive.File
|
||||
}
|
||||
3
src/interfaces/INetworkService.ts
Normal file
3
src/interfaces/INetworkService.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export interface INetworkService {
|
||||
fetch(url: string, params: GoogleAppsScript.URL_Fetch.URLFetchRequestOptions): GoogleAppsScript.URL_Fetch.HTTPResponse
|
||||
}
|
||||
4
src/interfaces/IShopifyMediaService.ts
Normal file
4
src/interfaces/IShopifyMediaService.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export interface IShopifyMediaService {
|
||||
stagedUploadsCreate(input: any[]): any
|
||||
productCreateMedia(productId: string, media: any[]): any
|
||||
}
|
||||
Reference in New Issue
Block a user