-
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.
refactor: Adapt Moments package to POAP Moments API v2 (#139)
- Loading branch information
Showing
26 changed files
with
91 additions
and
294 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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"FetchMoments": "Fetch Moments", | ||
"UploadMoments": "Upload Moments", | ||
"UpdateMoment": "Update Moment" | ||
"UploadMoments": "Upload Moments" | ||
} |
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
23 changes: 9 additions & 14 deletions
23
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 |
---|---|---|
@@ -1,25 +1,20 @@ | ||
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. | ||
*/ | ||
/** Interface representing the input needed to create a moment and upload media in one action. */ | ||
export interface CreateAndUploadMomentInput { | ||
/** The author of the moment. An Ethereum address. */ | ||
author: string; | ||
/** The description of the moment. */ | ||
description?: string; | ||
dropId: number; | ||
tokenId?: number; | ||
/** The IDs of the drops to associate to the moment. */ | ||
dropIds: number[]; | ||
/** The amount of time to wait until media is processed. */ | ||
timeOut?: number; | ||
/** Callback function to be called when the progress step changes. */ | ||
onStepUpdate?: (step: CreateSteps) => void | Promise<void>; | ||
/** Callback function to be called when the file upload progress change - progress is a number between 0 and 1. */ | ||
onFileUploadProgress?: (progress: number) => void | Promise<void>; | ||
/** The media to be uploaded and attached to the Moment. */ | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,17 @@ | ||
import { CreateSteps } from './CreateSteps'; | ||
|
||
/** | ||
* Interface representing the input needed to create a moment. | ||
* @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 {string[]} mediaKeys - The media keys previously uploaded to attach to the Moment. | ||
*/ | ||
/** Interface representing the input needed to create a moment. */ | ||
export interface CreateMomentInput { | ||
/** The author of the moment. An Ethereum address. */ | ||
author: string; | ||
/** The description of the moment. */ | ||
description?: string; | ||
dropId: number; | ||
tokenId?: number; | ||
/** The IDs of the drops to associate to the moment. */ | ||
dropIds: number[]; | ||
/** The amount of time to wait until media is processed. */ | ||
timeOut?: number; | ||
/** Callback function to be called when the step changes. */ | ||
onStepUpdate?: (step: CreateSteps) => void | Promise<void>; | ||
/** The media keys previously uploaded to attach to the Moment. */ | ||
mediaKeys?: string[]; | ||
} |
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
Oops, something went wrong.