-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moment #143
Moment #143
Changes from all commits
2ffcfae
5c6f074
7699fcc
8ecbbe3
28c35e4
31eb794
4440d5c
11c861b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,7 @@ import { | |
YOU, | ||
} from './schemas/puppet.js' | ||
import { PayloadType } from './schemas/payload.js' | ||
import { MomentListOption, MomentPayload } from './schemas/moment.js' | ||
|
||
import { PuppetEventEmitter } from './events.js' | ||
|
||
|
@@ -505,6 +506,26 @@ export abstract class Puppet extends PuppetEventEmitter { | |
abstract tagContactList () : Promise<string[]> | ||
abstract tagContactRemove (tagId: string, contactId: string) : Promise<void> | ||
|
||
/** | ||
* | ||
* Moment | ||
* | ||
*/ | ||
abstract momentSignature (signature?: string) : Promise<boolean | string> | ||
abstract momentCoverage (image: FileBox) : Promise<boolean> | ||
abstract postTextMoment (content: string, visibleList?: string[]) : Promise<string> | ||
abstract postLinkMoment (urlLinkPayload: UrlLinkPayload, content?: string) : Promise<string> | ||
abstract postImageMoment (images: FileBox[], content?: string) : Promise<string> | ||
|
||
abstract momentPayload (id: string) : Promise<MomentPayload> | ||
|
||
abstract momentList (option?: MomentListOption) : Promise<string[]> | ||
abstract revokeMoment (id: string) : Promise<boolean> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please see https://cloud.google.com/apis/design/standard_methods and let's follow the google APIs recommendation for standard methods |
||
abstract likeMoment (id: string) : Promise<boolean> | ||
abstract revokeLikeMoment (id: string) : Promise<boolean> | ||
abstract commentMoment (id: string, comment: string, commentId?: string) : Promise<string> | ||
abstract revokeCommentMoment (commentId: string) : Promise<boolean> | ||
|
||
/** | ||
* | ||
* Contact | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { FileBox } from '../config' | ||
import { UrlLinkPayload } from './url-link' | ||
|
||
export interface MomentPayload { | ||
authorId: string, | ||
content?: string, | ||
urlLink?: UrlLinkPayload, | ||
images?: FileBox[], | ||
id: string, | ||
createTime: number, | ||
updateTime: number, | ||
} | ||
|
||
export interface MomentListOption { | ||
authorId?: string, | ||
momentId?: string, | ||
page?: number, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that possible to merge these functions into one?