-
Notifications
You must be signed in to change notification settings - Fork 5
chore: add CoderClient class #121
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
Conversation
this.sdkApi = { | ||
getUserLoginType: this.getUserLoginType, | ||
getWorkspaceBuildParameters: this.getWorkspaceBuildParameters, | ||
getWorkspaces: this.getWorkspaces, | ||
getWorkspacesByRepo: this.getWorkspacesByRepo, | ||
}; |
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.
This was originally the actual Coder SDK until I started running into the issues with the TS file parsing
Hoping to get that swapped back in ASAP
// Set up logic for syncing client snapshots to auth state changes | ||
this.authApi.subscribe(newAuthSnapshot => { | ||
const latestClientSnapshot = this.getStateSnapshot(); | ||
if (newAuthSnapshot.isTokenValid !== latestClientSnapshot.isAuthValid) { | ||
this.notifySubscriptionsOfStateChange(); | ||
} | ||
}); |
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.
This is the main thing I was talking about in the StateSnapshotManager
PR with how it's a little clunky to get two snapshots to be related to each other
Closing this out in favor of a new series of PRs |
Part 3 of the PRs for #107
Changes made
CoderClient
classerrors
file for custom error definitions