generated from productdevbookcom/ts-bundle-template
-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: getUser, getLicensePayload, activateLicense (#8)
- Loading branch information
1 parent
e6e435e
commit 87b6ec7
Showing
13 changed files
with
87 additions
and
142 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 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,2 +1,4 @@ | ||
export * from './ProjectsManager' | ||
export * from './ServicesManager' | ||
export * from './SettingsManager' | ||
export * from './MonitorManager' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,58 @@ | ||
import type { $Fetch } from 'ofetch' | ||
export interface ClientResponse { | ||
get: <T>(route: string, body: any) => Promise<T> | ||
post: <T>(route: string, body: any) => Promise<T> | ||
token: string | ||
} | ||
|
||
export type * from './general' | ||
export interface RestConfig { | ||
baseURL: string | ||
token: string | ||
} | ||
|
||
export interface ConstructorInput { | ||
url: string | ||
auth: { | ||
email: string | ||
password: string | ||
export interface RestResponse<T> { | ||
result: { | ||
data: { | ||
json: T | ||
} | ||
} | ||
token?: string | ||
} | ||
|
||
export interface Options { | ||
export interface RestError { | ||
ok: boolean | ||
errorMessage: string | ||
status?: number | ||
error?: object | ||
} | ||
|
||
export type * from './monitor' | ||
export type * from './projects' | ||
export type * from './services' | ||
export type * from './settings' | ||
|
||
export interface ClientConfig { | ||
endpoint: string | ||
token: string | ||
nitro: $Fetch | ||
auth: ConstructorInput['auth'] | ||
/** | ||
* @deprecated Use `token` instead | ||
*/ | ||
credentials?: { | ||
email: string | ||
password: string | ||
} | ||
} | ||
|
||
export type NoResponse = RestResponse<null> | ||
|
||
export type StringResponse = RestResponse<string> | ||
|
||
export type BooleanResponse = RestResponse<boolean> | ||
|
||
export interface LoginRes extends RestResponse<{ token: string }> {} | ||
|
||
export interface UserRes extends RestResponse<{ | ||
id: string | ||
createdAt: string | ||
email: string | ||
admin: boolean | ||
password: null | ||
}> {} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.