SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
chore(frontend): drop the dead v1 invite client and its mocks (#12511)
Vikrant Gupta89bf0f953a05
diff --git a/frontend/src/api/v1/invite/create.ts b/frontend/src/api/v1/invite/create.tsdeleted file mode 100644index b0ef9bcc06..0000000000--- a/frontend/src/api/v1/invite/create.ts+++ /dev/null@@ -1,31 +0,0 @@-import axios from 'api';-import { ErrorResponseHandlerV2 } from 'api/ErrorResponseHandlerV2';-import { AxiosError } from 'axios';-import { ErrorV2Resp, SuccessResponseV2 } from 'types/api';-import { PayloadProps, Props } from 'types/api/user/setInvite';--/**- * @deprecated Use the generated `useCreateInvite` hook (or `createInvite` fetcher) from- * `api/generated/services/users` instead. This hand-written client targets the- * same endpoint and will be removed once call sites migrate.- *- * Part of https://github.com/SigNoz/engineering-pod/issues/5289, add a comment or update when removing this method.- */-const sendInvite = async (- props: Props,-): Promise<SuccessResponseV2<PayloadProps>> => {- try {- const response = await axios.post<PayloadProps>(`/invite`, {- ...props,- });-- return {- httpStatusCode: response.status,- data: response.data,- };- } catch (error) {- ErrorResponseHandlerV2(error as AxiosError<ErrorV2Resp>);- }-};--export default sendInvite;diff --git a/frontend/src/mocks-server/__mockdata__/members.ts b/frontend/src/mocks-server/__mockdata__/members.tsdeleted file mode 100644index 31019d34c5..0000000000--- a/frontend/src/mocks-server/__mockdata__/members.ts+++ /dev/null@@ -1,218 +0,0 @@-export const membersResponse = [- {- id: '3223a874-5678458745786',- name: 'John Doe',- email: '[email protected]',- createdAt: 1666357530,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '5e9681b1-5678458745786',- name: 'Jane Doe',- email: '[email protected]',- createdAt: 1666365394,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '11e8c55d-5678458745786',- name: 'Alex',- email: '[email protected]',- createdAt: 1666366317,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: 'd878012367813286731aab62',- role: 'VIEWER',- organization: 'Test Inc',- flags: null,- },- {- id: '2ad2e404-5678458745786',- name: 'Tom',- email: '[email protected]',- createdAt: 1673441483,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '6f532456-5678458745786',- name: 'Harry',- email: '[email protected]',- createdAt: 1691551672,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: 'ae22fa73-5678458745786',- name: 'Ron',- email: '[email protected]',- createdAt: 1691668239,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '3223a874-5678458745786',- name: 'John Doe',- email: '[email protected]',- createdAt: 1666357530,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '5e9681b1-5678458745786',- name: 'Jane Doe',- email: '[email protected]',- createdAt: 1666365394,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '11e8c55d-5678458745786',- name: 'Alex',- email: '[email protected]',- createdAt: 1666366317,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: 'd878012367813286731aab62',- role: 'VIEWER',- organization: 'Test Inc',- flags: null,- },- {- id: '2ad2e404-5678458745786',- name: 'Tom',- email: '[email protected]',- createdAt: 1673441483,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '6f532456-5678458745786',- name: 'Harry',- email: '[email protected]',- createdAt: 1691551672,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: 'ae22fa73-5678458745786',- name: 'Ron',- email: '[email protected]',- createdAt: 1691668239,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '3223a874-5678458745786',- name: 'John Doe',- email: '[email protected]',- createdAt: 1666357530,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '5e9681b1-5678458745786',- name: 'Jane Doe',- email: '[email protected]',- createdAt: 1666365394,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '11e8c55d-5678458745786',- name: 'Alex',- email: '[email protected]',- createdAt: 1666366317,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: 'd878012367813286731aab62',- role: 'VIEWER',- organization: 'Test Inc',- flags: null,- },- {- id: '2ad2e404-5678458745786',- name: 'Tom',- email: '[email protected]',- createdAt: 1673441483,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: '6f532456-5678458745786',- name: 'Harry',- email: '[email protected]',- createdAt: 1691551672,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },- {- id: 'ae22fa73-5678458745786',- name: 'Ron',- email: '[email protected]',- createdAt: 1691668239,- profilePictureURL: '',- orgId: '1287612376312867312867',- groupId: '5678458745786',- role: 'ADMIN',- organization: 'Test Inc',- flags: null,- },-];diff --git a/frontend/src/mocks-server/handlers.ts b/frontend/src/mocks-server/handlers.tsindex 6b5386dfaa..ce9c9b224e 100644--- a/frontend/src/mocks-server/handlers.ts+++ b/frontend/src/mocks-server/handlers.ts@@ -12,7 +12,6 @@ import {} from './__mockdata__/dashboards';import { explorerView } from './__mockdata__/explorer_views';import { licensesSuccessResponse } from './__mockdata__/licenses';-import { membersResponse } from './__mockdata__/members';import { queryRangeSuccessResponse } from './__mockdata__/query_range';import { serviceSuccessResponse } from './__mockdata__/services';import { topLevelOperationSuccessResponse } from './__mockdata__/top_level_operations';@@ -40,9 +39,6 @@ export const handlers = [res(ctx.status(200), ctx.json(topLevelOperationSuccessResponse)),),- rest.get('http://localhost/api/v1/user', (req, res, ctx) =>- res(ctx.status(200), ctx.json({ status: '200', data: membersResponse })),- ),rest.get('http://localhost/api/v3/autocomplete/attribute_keys',(req, res, ctx) => {@@ -164,15 +160,6 @@ export const handlers = [),),- rest.post('http://localhost/api/v1/invite', (_, res, ctx) =>- res(- ctx.status(200),- ctx.json({- status: 'success',- data: 'invite sent successfully',- }),- ),- ),rest.get('http://localhost/api/v3/autocomplete/aggregate_attributes',(req, res, ctx) =>diff --git a/frontend/src/types/api/user/setInvite.ts b/frontend/src/types/api/user/setInvite.tsdeleted file mode 100644index d07202e43c..0000000000--- a/frontend/src/types/api/user/setInvite.ts+++ /dev/null@@ -1,14 +0,0 @@-import { User } from 'types/reducer/app';-import { ROLES } from 'types/roles';--export interface Props {- name: User['displayName'];- email: User['email'];- role: ROLES;- frontendBaseUrl: string;-}--export interface PayloadProps {- data: string;- status: string;-}