-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(moments): Add function to create Moment without uploading media (#…
…135) * Rename `createMoment` to `createMomentAndUploadMedia` * Create new `createMoment` function to create a Moment without uploading media. * Change visibility to `public` for `uploadMediaList` and `awaitForMediaProcessing` * Allows clients to upload media separately from Moments creation * Adjust MomentsClient unit tests
- Loading branch information
Showing
7 changed files
with
102 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/moments/src/client/dtos/create/CreateAndUploadInput.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { CreateSteps } from './CreateSteps'; | ||
import { CreateMedia } from './CreateMedia'; | ||
|
||
/** | ||
* Interface representing the input needed to create a moment and upload media in one action. | ||
* @interface | ||
* @property {number} dropId - The ID of the drop related to the moment. | ||
* @property {number} [tokenId] - The ID of the token related to the moment (optional). | ||
* @property {string} author - The author of the moment. An Ethereum address. | ||
* @property {string} description - The description of the moment (optional). | ||
* @property {string} timeOut - The amount of time to wait until media is processed. | ||
* @property {(step: CreateSteps) => void | Promise<void>} [onStepUpdate] - Optional callback function to be called when the step changes. | ||
* @property {(progress: number) => void | Promise<void>} [onFileProgress] - Optional callback function to be called when the file upload progress change - progress is a number between 0 and 1. | ||
* @property {CreateMedia[]} media - The media to be uploaded. | ||
*/ | ||
export interface CreateAndUploadMomentInput { | ||
author: string; | ||
description?: string; | ||
dropId: number; | ||
tokenId?: number; | ||
timeOut?: number; | ||
onStepUpdate?: (step: CreateSteps) => void | Promise<void>; | ||
onFileUploadProgress?: (progress: number) => void | Promise<void>; | ||
media?: CreateMedia[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters