Skip to content
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

v0.2.0 #10

Merged
merged 8 commits into from
Nov 28, 2019
Merged

v0.2.0 #10

merged 8 commits into from
Nov 28, 2019

Conversation

lllwvlvwlll
Copy link
Member

@lllwvlvwlll lllwvlvwlll commented Nov 28, 2019

  • implements api changes for https://github.com/Moonlight-io/asteroid-domain-user/pull/332
    • adds profile_type to createProfile and getOwnedProfileHeaders
  • misc updates based on findings from migrating the claims worker and system testing to use the sdk
    • moves getProfileByToken from asteroid-user to asteroid (does not require a user login for use)
    • adds support for setting of groups using either a secret or admin-level access_token
    • aligns payload support of createTask with asteroid-domain-worker usage
    • update to baseurl of getUnclaimedTask to target the correct asteroid domain

@@ -201,17 +200,15 @@ export class AsteroidUser {
/**
* @returns ID of the newly created task
*/
async createTask(taskType: string, taskVersion: string, taskPriority: number, target: string): Promise<string> {
async createTask(taskType: string, taskVersion: string, taskPriority: number, payload: object): Promise<string> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this been further specified rather then a generic object type?

For example, will this interface definition works:

interface CreateTaskPayload {
  target: string
}

And the method declaration will then becomes:

async createTask(taskType: string, taskVersion: string, taskPriority: number, payload: CreateTaskPayload): Promise<string> {

Purpose of this, is to providing typing guidance on what's the expectation for the variable payload.

@rockacola rockacola assigned lllwvlvwlll and unassigned rockacola Nov 28, 2019
@lllwvlvwlll
Copy link
Member Author

lllwvlvwlll commented Nov 28, 2019 via email

@rockacola rockacola merged commit 5c942c3 into master Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants