-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
350 additions
and
332 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,3 @@ | ||
import type { RouteRequestParams, RouteResponse } from '@seamapi/types/connect' | ||
import type { Axios } from 'axios' | ||
import type { SetNonNullable } from 'type-fest' | ||
import { SeamHttpWorkspaces } from 'lib/seam/connect/routes/workspaces.js' | ||
|
||
export class SeamHttpLegacyWorkspaces { | ||
client: Axios | ||
|
||
constructor(client: Axios) { | ||
this.client = client | ||
} | ||
|
||
async get( | ||
params: WorkspacesGetParams, | ||
): Promise<WorkspacesGetResponse['workspace']> { | ||
const { data } = await this.client.request<WorkspacesGetResponse>({ | ||
url: '/workspaces/get', | ||
method: 'get', | ||
params, | ||
}) | ||
return data.workspace | ||
} | ||
} | ||
|
||
// TODO: Import from routes so no need to redefine here | ||
type WorkspacesGetParams = SetNonNullable< | ||
Required<RouteRequestParams<'/workspaces/get'>> | ||
> | ||
|
||
type WorkspacesGetResponse = SetNonNullable< | ||
Required<RouteResponse<'/workspaces/get'>> | ||
> | ||
export class SeamHttpLegacyWorkspaces extends SeamHttpWorkspaces {} |
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
Oops, something went wrong.