-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// !!! | ||
// WARNING: This file is autogenerated | ||
// Only modify code within MANUAL() sections | ||
// or your changes may be overwritten later! | ||
// !!! | ||
|
||
import {} from "../shared/method_options"; | ||
import { fetchConfig } from "../shared"; | ||
import { request } from "../shared"; | ||
|
||
export interface ProjectMetric { | ||
count: number; | ||
metric_type?: | ||
| "UNKNOWN" | ||
| "USER_COUNT" | ||
| "ORGANIZATION_COUNT" | ||
| "MEMBER_COUNT" | ||
| "M2M_CLIENT_COUNT" | ||
| string; | ||
} | ||
|
||
export interface ProjectMetricsResponse { | ||
request_id: string; | ||
project_id: string; | ||
metrics: ProjectMetric[]; | ||
status_code: number; | ||
} | ||
|
||
export class Project { | ||
private fetchConfig: fetchConfig; | ||
|
||
constructor(fetchConfig: fetchConfig) { | ||
this.fetchConfig = fetchConfig; | ||
} | ||
|
||
/** | ||
* @param params {@link ProjectMetricsRequest} | ||
* @returns {@link ProjectMetricsResponse} | ||
* @async | ||
* @throws A {@link StytchError} on a non-2xx response from the Stytch API | ||
* @throws A {@link RequestError} when the Stytch API cannot be reached | ||
*/ | ||
metrics(): Promise<ProjectMetricsResponse> { | ||
const headers: Record<string, string> = {}; | ||
return request<ProjectMetricsResponse>(this.fetchConfig, { | ||
method: "GET", | ||
url: `/v1/projects/metrics`, | ||
headers, | ||
}); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.