Skip to content

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.

fix(types): correct OpenAPI schema for AuthDomainConfig and PostableChannel (#11164)

Pandey680bcd08c361
diff --git a/docs/api/openapi.yml b/docs/api/openapi.yml
index b3dcd80ff5..d74ac55a60 100644
--- a/docs/api/openapi.yml
+++ b/docs/api/openapi.yml
@@ -96,6 +96,122 @@ components:
- createdAt
- updatedAt
type: object
+ AlertmanagertypesPostableChannel:
+ oneOf:
+ - required:
+ - discord_configs
+ - required:
+ - email_configs
+ - required:
+ - incidentio_configs
+ - required:
+ - pagerduty_configs
+ - required:
+ - slack_configs
+ - required:
+ - webhook_configs
+ - required:
+ - opsgenie_configs
+ - required:
+ - wechat_configs
+ - required:
+ - pushover_configs
+ - required:
+ - victorops_configs
+ - required:
+ - sns_configs
+ - required:
+ - telegram_configs
+ - required:
+ - webex_configs
+ - required:
+ - msteams_configs
+ - required:
+ - msteamsv2_configs
+ - required:
+ - jira_configs
+ - required:
+ - rocketchat_configs
+ - required:
+ - mattermost_configs
+ properties:
+ discord_configs:
+ items:
+ $ref: '#/components/schemas/ConfigDiscordConfig'
+ type: array
+ email_configs:
+ items:
+ $ref: '#/components/schemas/ConfigEmailConfig'
+ type: array
+ incidentio_configs:
+ items:
+ $ref: '#/components/schemas/ConfigIncidentioConfig'
+ type: array
+ jira_configs:
+ items:
+ $ref: '#/components/schemas/ConfigJiraConfig'
+ type: array
+ mattermost_configs:
+ items:
+ $ref: '#/components/schemas/ConfigMattermostConfig'
+ type: array
+ msteams_configs:
+ items:
+ $ref: '#/components/schemas/ConfigMSTeamsConfig'
+ type: array
+ msteamsv2_configs:
+ items:
+ $ref: '#/components/schemas/ConfigMSTeamsV2Config'
+ type: array
+ name:
+ type: string
+ opsgenie_configs:
+ items:
+ $ref: '#/components/schemas/ConfigOpsGenieConfig'
+ type: array
+ pagerduty_configs:
+ items:
+ $ref: '#/components/schemas/ConfigPagerdutyConfig'
+ type: array
+ pushover_configs:
+ items:
+ $ref: '#/components/schemas/ConfigPushoverConfig'
+ type: array
+ rocketchat_configs:
+ items:
+ $ref: '#/components/schemas/ConfigRocketchatConfig'
+ type: array
+ slack_configs:
+ items:
+ $ref: '#/components/schemas/ConfigSlackConfig'
+ type: array
+ sns_configs:
+ items:
+ $ref: '#/components/schemas/ConfigSNSConfig'
+ type: array
+ telegram_configs:
+ items:
+ $ref: '#/components/schemas/ConfigTelegramConfig'
+ type: array
+ victorops_configs:
+ items:
+ $ref: '#/components/schemas/ConfigVictorOpsConfig'
+ type: array
+ webex_configs:
+ items:
+ $ref: '#/components/schemas/ConfigWebexConfig'
+ type: array
+ webhook_configs:
+ items:
+ $ref: '#/components/schemas/ConfigWebhookConfig'
+ type: array
+ wechat_configs:
+ items:
+ $ref: '#/components/schemas/ConfigWechatConfig'
+ type: array
+ required:
+ - name
+ type: object
AlertmanagertypesPostableRoutePolicy:
properties:
channels:
@@ -133,6 +249,10 @@ components:
type: string
type: object
AuthtypesAuthDomainConfig:
+ oneOf:
+ - $ref: '#/components/schemas/AuthtypesSamlConfig'
+ - $ref: '#/components/schemas/AuthtypesGoogleConfig'
+ - $ref: '#/components/schemas/AuthtypesOIDCConfig'
properties:
googleAuthConfig:
$ref: '#/components/schemas/AuthtypesGoogleConfig'
@@ -145,8 +265,15 @@ components:
ssoEnabled:
type: boolean
ssoType:
- type: string
+ $ref: '#/components/schemas/AuthtypesAuthNProvider'
type: object
+ AuthtypesAuthNProvider:
+ enum:
+ - google_auth
+ - saml
+ - email_password
+ - oidc
+ type: string
AuthtypesAuthNProviderInfo:
properties:
relayStatePath:
@@ -169,11 +296,15 @@ components:
AuthtypesCallbackAuthNSupport:
properties:
provider:
- type: string
+ $ref: '#/components/schemas/AuthtypesAuthNProvider'
url:
type: string
type: object
AuthtypesGettableAuthDomain:
+ oneOf:
+ - $ref: '#/components/schemas/AuthtypesSamlConfig'
+ - $ref: '#/components/schemas/AuthtypesGoogleConfig'
+ - $ref: '#/components/schemas/AuthtypesOIDCConfig'
properties:
authNProviderInfo:
$ref: '#/components/schemas/AuthtypesAuthNProviderInfo'
@@ -197,7 +328,7 @@ components:
ssoEnabled:
type: boolean
ssoType:
- type: string
+ $ref: '#/components/schemas/AuthtypesAuthNProvider'
updatedAt:
format: date-time
type: string
@@ -323,7 +454,7 @@ components:
AuthtypesPasswordAuthNSupport:
properties:
provider:
- type: string
+ $ref: '#/components/schemas/AuthtypesAuthNProvider'
type: object
AuthtypesPatchableObjects:
properties:
@@ -5665,7 +5796,7 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/ConfigReceiver'
+ $ref: '#/components/schemas/AlertmanagertypesPostableChannel'
responses:
"201":
content:
@@ -7042,6 +7173,63 @@ paths:
summary: Delete auth domain
tags:
- authdomains
+ get:
+ deprecated: false
+ description: This endpoint returns an auth domain by ID
+ operationId: GetAuthDomain
+ parameters:
+ - in: path
+ name: id
+ required: true
+ schema:
+ type: string
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ properties:
+ data:
+ $ref: '#/components/schemas/AuthtypesGettableAuthDomain'
+ status:
+ type: string
+ required:
+ - status
+ - data
+ type: object
+ description: OK
+ "401":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenderErrorResponse'
+ description: Unauthorized
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenderErrorResponse'
+ description: Forbidden
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenderErrorResponse'
+ description: Not Found
+ "500":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RenderErrorResponse'
+ description: Internal Server Error
+ security:
+ - api_key:
+ - ADMIN
+ - tokenizer:
+ - ADMIN
+ summary: Get auth domain by ID
+ tags:
+ - authdomains
put:
deprecated: false
description: This endpoint updates an auth domain
diff --git a/frontend/src/api/generated/services/authdomains/index.ts b/frontend/src/api/generated/services/authdomains/index.ts
index 0350f29258..b96440eec8 100644
--- a/frontend/src/api/generated/services/authdomains/index.ts
+++ b/frontend/src/api/generated/services/authdomains/index.ts
@@ -22,6 +22,8 @@ import type {
AuthtypesUpdateableAuthDomainDTO,
CreateAuthDomain200,
DeleteAuthDomainPathParameters,
+ GetAuthDomain200,
+ GetAuthDomainPathParameters,
ListAuthDomains200,
RenderErrorResponseDTO,
UpdateAuthDomainPathParameters,
@@ -277,6 +279,109 @@ export const useDeleteAuthDomain = <
return useMutation(mutationOptions);
};
+/**
+ * This endpoint returns an auth domain by ID
+ * @summary Get auth domain by ID
+ */
+export const getAuthDomain = (
+ { id }: GetAuthDomainPathParameters,
+ signal?: AbortSignal,
+) => {
+ return GeneratedAPIInstance<GetAuthDomain200>({
+ url: `/api/v1/domains/${id}`,
+ method: 'GET',
+ signal,
+ });
+};
+
+export const getGetAuthDomainQueryKey = ({
+ id,
+}: GetAuthDomainPathParameters) => {
+ return [`/api/v1/domains/${id}`] as const;
+};
+
+export const getGetAuthDomainQueryOptions = <
+ TData = Awaited<ReturnType<typeof getAuthDomain>>,
+ TError = ErrorType<RenderErrorResponseDTO>,
+>(
+ { id }: GetAuthDomainPathParameters,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited<ReturnType<typeof getAuthDomain>>,
+ TError,
+ TData
+ >;
+ },
+) => {
+ const { query: queryOptions } = options ?? {};
+
+ const queryKey = queryOptions?.queryKey ?? getGetAuthDomainQueryKey({ id });
+
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof getAuthDomain>>> = ({
+ signal,
+ }) => getAuthDomain({ id }, signal);
+
+ return {
+ queryKey,
+ queryFn,
+ enabled: !!id,
+ ...queryOptions,
+ } as UseQueryOptions<
+ Awaited<ReturnType<typeof getAuthDomain>>,
+ TError,
+ TData
+ > & { queryKey: QueryKey };
+};
+
+export type GetAuthDomainQueryResult = NonNullable<
+ Awaited<ReturnType<typeof getAuthDomain>>
+>;
+export type GetAuthDomainQueryError = ErrorType<RenderErrorResponseDTO>;
+
+/**
+ * @summary Get auth domain by ID
+ */
+
+export function useGetAuthDomain<
+ TData = Awaited<ReturnType<typeof getAuthDomain>>,
+ TError = ErrorType<RenderErrorResponseDTO>,
+>(
+ { id }: GetAuthDomainPathParameters,
+ options?: {
+ query?: UseQueryOptions<
+ Awaited<ReturnType<typeof getAuthDomain>>,
+ TError,
+ TData
+ >;
+ },
+): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
+ const queryOptions = getGetAuthDomainQueryOptions({ id }, options);
+
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & {
+ queryKey: QueryKey;
+ };
+
+ query.queryKey = queryOptions.queryKey;
+
+ return query;
+}
+
+/**
+ * @summary Get auth domain by ID
+ */
+export const invalidateGetAuthDomain = async (
+ queryClient: QueryClient,
+ { id }: GetAuthDomainPathParameters,
+ options?: InvalidateOptions,
+): Promise<QueryClient> => {
+ await queryClient.invalidateQueries(
+ { queryKey: getGetAuthDomainQueryKey({ id }) },
+ options,
+ );
+
+ return queryClient;
+};
+
/**
* This endpoint updates an auth domain
* @summary Update auth domain
diff --git a/frontend/src/api/generated/services/channels/index.ts b/frontend/src/api/generated/services/channels/index.ts
index c7b9aa46de..a6d584855c 100644
--- a/frontend/src/api/generated/services/channels/index.ts
+++ b/frontend/src/api/generated/services/channels/index.ts
@@ -18,6 +18,7 @@ import type {
} from 'react-query';
import type {
+ AlertmanagertypesPostableChannelDTO,
ConfigReceiverDTO,
CreateChannel201,
DeleteChannelByIDPathParameters,
@@ -122,14 +123,14 @@ export const invalidateListChannels = async (
* @summary Create notification channel
*/
export const createChannel = (
- configReceiverDTO: BodyType<ConfigReceiverDTO>,
+ alertmanagertypesPostableChannelDTO: BodyType<AlertmanagertypesPostableChannelDTO>,
signal?: AbortSignal,
) => {
return GeneratedAPIInstance<CreateChannel201>({
url: `/api/v1/channels`,
method: 'POST',
headers: { 'Content-Type': 'application/json' },
- data: configReceiverDTO,
+ data: alertmanagertypesPostableChannelDTO,
signal,
});
};
@@ -141,13 +142,13 @@ export const getCreateChannelMutationOptions = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createChannel>>,
TError,
- { data: BodyType<ConfigReceiverDTO> },
+ { data: BodyType<AlertmanagertypesPostableChannelDTO> },
TContext
>;
}): UseMutationOptions<
Awaited<ReturnType<typeof createChannel>>,
TError,
- { data: BodyType<ConfigReceiverDTO> },
+ { data: BodyType<AlertmanagertypesPostableChannelDTO> },
TContext
> => {
const mutationKey = ['createChannel'];
@@ -161,7 +162,7 @@ export const getCreateChannelMutationOptions = <
const mutationFn: MutationFunction<
Awaited<ReturnType<typeof createChannel>>,
- { data: BodyType<ConfigReceiverDTO> }
+ { data: BodyType<AlertmanagertypesPostableChannelDTO> }
> = (props) => {
const { data } = props ?? {};
@@ -174,7 +175,8 @@ export const getCreateChannelMutationOptions = <
export type CreateChannelMutationResult = NonNullable<
Awaited<ReturnType<typeof createChannel>>
>;
-export type CreateChannelMutationBody = BodyType<ConfigReceiverDTO>;
+export type CreateChannelMutationBody =
+ BodyType<AlertmanagertypesPostableChannelDTO>;
export type CreateChannelMutationError = ErrorType<RenderErrorResponseDTO>;
/**
@@ -187,13 +189,13 @@ export const useCreateChannel = <
mutation?: UseMutationOptions<
Awaited<ReturnType<typeof createChannel>>,
TError,
- { data: BodyType<ConfigReceiverDTO> },
+ { data: BodyType<AlertmanagertypesPostableChannelDTO> },
TContext
>;
}): UseMutationResult<
Awaited<ReturnType<typeof createChannel>>,
TError,
- { data: BodyType<ConfigReceiverDTO> },
+ { data: BodyType<AlertmanagertypesPostableChannelDTO> },
TContext
> => {
const mutationOptions = getCreateChannelMutationOptions(options);
diff --git a/frontend/src/api/generated/services/sigNoz.schemas.ts b/frontend/src/api/generated/services/sigNoz.schemas.ts
index 387ca6d56c..dd65e72712 100644
--- a/frontend/src/api/generated/services/sigNoz.schemas.ts
+++ b/frontend/src/api/generated/services/sigNoz.schemas.ts
@@ -120,6 +120,1412 @@ export interface AlertmanagertypesGettableRoutePolicyDTO {
updatedBy?: string | null;
}
+export type AlertmanagertypesPostableChannelDTO =
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ })
+ | (unknown & {
+ /**
+ * @type array
+ */
+ discord_configs?: ConfigDiscordConfigDTO[];
+ /**
+ * @type array
+ */
+ email_configs?: ConfigEmailConfigDTO[];
+ /**
+ * @type array
+ */
+ incidentio_configs?: ConfigIncidentioConfigDTO[];
+ /**
+ * @type array
+ */
+ jira_configs?: ConfigJiraConfigDTO[];
+ /**
+ * @type array
+ */
+ mattermost_configs?: ConfigMattermostConfigDTO[];
+ /**
+ * @type array
+ */
+ msteams_configs?: ConfigMSTeamsConfigDTO[];
+ /**
+ * @type array
+ */
+ msteamsv2_configs?: ConfigMSTeamsV2ConfigDTO[];
+ /**
+ * @type string
+ */
+ name: string;
+ /**
+ * @type array
+ */
+ opsgenie_configs?: ConfigOpsGenieConfigDTO[];
+ /**
+ * @type array
+ */
+ pagerduty_configs?: ConfigPagerdutyConfigDTO[];
+ /**
+ * @type array
+ */
+ pushover_configs?: ConfigPushoverConfigDTO[];
+ /**
+ * @type array
+ */
+ rocketchat_configs?: ConfigRocketchatConfigDTO[];
+ /**
+ * @type array
+ */
+ slack_configs?: ConfigSlackConfigDTO[];
+ /**
+ * @type array
+ */
+ sns_configs?: ConfigSNSConfigDTO[];
+ /**
+ * @type array
+ */
+ telegram_configs?: ConfigTelegramConfigDTO[];
+ /**
+ * @type array
+ */
+ victorops_configs?: ConfigVictorOpsConfigDTO[];
+ /**
+ * @type array
+ */
+ webex_configs?: ConfigWebexConfigDTO[];
+ /**
+ * @type array
+ */
+ webhook_configs?: ConfigWebhookConfigDTO[];
+ /**
+ * @type array
+ */
+ wechat_configs?: ConfigWechatConfigDTO[];
+ });
+
export interface AlertmanagertypesPostableRoutePolicyDTO {
/**
* @type array
@@ -165,21 +1571,47 @@ export interface AuthtypesAttributeMappingDTO {
role?: string;
}
-export interface AuthtypesAuthDomainConfigDTO {
- googleAuthConfig?: AuthtypesGoogleConfigDTO;
- oidcConfig?: AuthtypesOIDCConfigDTO;
- roleMapping?: AuthtypesRoleMappingDTO;
- samlConfig?: AuthtypesSamlConfigDTO;
- /**
- * @type boolean
- */
- ssoEnabled?: boolean;
- /**
- * @type string
- */
- ssoType?: string;
-}
+export type AuthtypesAuthDomainConfigDTO =
+ | (AuthtypesSamlConfigDTO & {
+ googleAuthConfig?: AuthtypesGoogleConfigDTO;
+ oidcConfig?: AuthtypesOIDCConfigDTO;
+ roleMapping?: AuthtypesRoleMappingDTO;
+ samlConfig?: AuthtypesSamlConfigDTO;
+ /**
+ * @type boolean
+ */
+ ssoEnabled?: boolean;
+ ssoType?: AuthtypesAuthNProviderDTO;
+ })
+ | (AuthtypesGoogleConfigDTO & {
+ googleAuthConfig?: AuthtypesGoogleConfigDTO;
+ oidcConfig?: AuthtypesOIDCConfigDTO;
+ roleMapping?: AuthtypesRoleMappingDTO;
+ samlConfig?: AuthtypesSamlConfigDTO;
+ /**
+ * @type boolean
+ */
+ ssoEnabled?: boolean;
+ ssoType?: AuthtypesAuthNProviderDTO;
+ })
+ | (AuthtypesOIDCConfigDTO & {
+ googleAuthConfig?: AuthtypesGoogleConfigDTO;
+ oidcConfig?: AuthtypesOIDCConfigDTO;
+ roleMapping?: AuthtypesRoleMappingDTO;
+ samlConfig?: AuthtypesSamlConfigDTO;
+ /**
+ * @type boolean
+ */
+ ssoEnabled?: boolean;
+ ssoType?: AuthtypesAuthNProviderDTO;
+ });
+export enum AuthtypesAuthNProviderDTO {
+ google_auth = 'google_auth',
+ saml = 'saml',
+ email_password = 'email_password',
+ oidc = 'oidc',
+}
export interface AuthtypesAuthNProviderInfoDTO {
/**
* @type string
@@ -202,53 +1634,116 @@ export interface AuthtypesAuthNSupportDTO {
}
export interface AuthtypesCallbackAuthNSupportDTO {
- /**
- * @type string
- */
- provider?: string;
+ provider?: AuthtypesAuthNProviderDTO;
/**
* @type string
*/
url?: string;
}
-export interface AuthtypesGettableAuthDomainDTO {
- authNProviderInfo?: AuthtypesAuthNProviderInfoDTO;
- /**
- * @type string
- * @format date-time
- */
- createdAt?: Date;
- googleAuthConfig?: AuthtypesGoogleConfigDTO;
- /**
- * @type string
- */
- id: string;
- /**
- * @type string
- */
- name?: string;
- oidcConfig?: AuthtypesOIDCConfigDTO;
- /**
- * @type string
- */
- orgId?: string;
- roleMapping?: AuthtypesRoleMappingDTO;
- samlConfig?: AuthtypesSamlConfigDTO;
- /**
- * @type boolean
- */
- ssoEnabled?: boolean;
- /**
- * @type string
- */
- ssoType?: string;
- /**
- * @type string
- * @format date-time
- */
- updatedAt?: Date;
-}
+export type AuthtypesGettableAuthDomainDTO =
+ | (AuthtypesSamlConfigDTO & {
+ authNProviderInfo?: AuthtypesAuthNProviderInfoDTO;
+ /**
+ * @type string
+ * @format date-time
+ */
+ createdAt?: Date;
+ googleAuthConfig?: AuthtypesGoogleConfigDTO;
+ /**
+ * @type string
+ */
+ id: string;
+ /**
+ * @type string
+ */
+ name?: string;
+ oidcConfig?: AuthtypesOIDCConfigDTO;
+ /**
+ * @type string
+ */
+ orgId?: string;
+ roleMapping?: AuthtypesRoleMappingDTO;
+ samlConfig?: AuthtypesSamlConfigDTO;
+ /**
+ * @type boolean
+ */
+ ssoEnabled?: boolean;
+ ssoType?: AuthtypesAuthNProviderDTO;
+ /**
+ * @type string
+ * @format date-time
+ */
+ updatedAt?: Date;
+ })
+ | (AuthtypesGoogleConfigDTO & {
+ authNProviderInfo?: AuthtypesAuthNProviderInfoDTO;
+ /**
+ * @type string
+ * @format date-time
+ */
+ createdAt?: Date;
+ googleAuthConfig?: AuthtypesGoogleConfigDTO;
+ /**
+ * @type string
+ */
+ id: string;
+ /**
+ * @type string
+ */
+ name?: string;
+ oidcConfig?: AuthtypesOIDCConfigDTO;
+ /**
+ * @type string
+ */
+ orgId?: string;
+ roleMapping?: AuthtypesRoleMappingDTO;
+ samlConfig?: AuthtypesSamlConfigDTO;
+ /**
+ * @type boolean
+ */
+ ssoEnabled?: boolean;
+ ssoType?: AuthtypesAuthNProviderDTO;
+ /**
+ * @type string
+ * @format date-time
+ */
+ updatedAt?: Date;
+ })
+ | (AuthtypesOIDCConfigDTO & {
+ authNProviderInfo?: AuthtypesAuthNProviderInfoDTO;
+ /**
+ * @type string
+ * @format date-time
+ */
+ createdAt?: Date;
+ googleAuthConfig?: AuthtypesGoogleConfigDTO;
+ /**
+ * @type string
+ */
+ id: string;
+ /**
+ * @type string
+ */
+ name?: string;
+ oidcConfig?: AuthtypesOIDCConfigDTO;
+ /**
+ * @type string
+ */
+ orgId?: string;
+ roleMapping?: AuthtypesRoleMappingDTO;
+ samlConfig?: AuthtypesSamlConfigDTO;
+ /**
+ * @type boolean
+ */
+ ssoEnabled?: boolean;
+ ssoType?: AuthtypesAuthNProviderDTO;
+ /**
+ * @type string
+ * @format date-time
+ */
+ updatedAt?: Date;
+ });
export interface AuthtypesGettableObjectsDTO {
resource: AuthtypesResourceDTO;
@@ -401,10 +1896,7 @@ export interface AuthtypesOrgSessionContextDTO {
}
export interface AuthtypesPasswordAuthNSupportDTO {
- /**
- * @type string
- */
- provider?: string;
+ provider?: AuthtypesAuthNProviderDTO;
}
export interface AuthtypesPatchableObjectsDTO {
@@ -6946,6 +8438,17 @@ export type CreateAuthDomain200 = {
export type DeleteAuthDomainPathParameters = {
id: string;
};
+export type GetAuthDomainPathParameters = {
+ id: string;
+};
+export type GetAuthDomain200 = {
+ data: AuthtypesGettableAuthDomainDTO;
+ /**
+ * @type string
+ */
+ status: string;
+};
+
export type UpdateAuthDomainPathParameters = {
id: string;
};
diff --git a/frontend/src/container/OrganizationSettings/AuthDomain/CreateEdit/AuthnProviderSelector.tsx b/frontend/src/container/OrganizationSettings/AuthDomain/CreateEdit/AuthnProviderSelector.tsx
index 5270fa3c61..c85150db1c 100644
--- a/frontend/src/container/OrganizationSettings/AuthDomain/CreateEdit/AuthnProviderSelector.tsx
+++ b/frontend/src/container/OrganizationSettings/AuthDomain/CreateEdit/AuthnProviderSelector.tsx
@@ -1,10 +1,11 @@
import { GoogleSquareFilled, KeyOutlined } from '@ant-design/icons';
import { Button, Typography } from 'antd';
+import { AuthtypesAuthNProviderDTO } from 'api/generated/services/sigNoz.schemas';
import './CreateEdit.styles.scss';
interface AuthNProvider {
- key: string;
+ key: AuthtypesAuthNProviderDTO;
title: string;
description: string;
icon: JSX.Element;
@@ -14,14 +15,14 @@ interface AuthNProvider {
function getAuthNProviders(samlEnabled: boolean): AuthNProvider[] {
return [
{
- key: 'google_auth',
+ key: AuthtypesAuthNProviderDTO.google_auth,
title: 'Google Apps Authentication',
description: 'Let members sign-in with a Google workspace account',
icon: <GoogleSquareFilled style={{ fontSize: '37px' }} />,
enabled: true,
},
{
- key: 'saml',
+ key: AuthtypesAuthNProviderDTO.saml,
title: 'SAML Authentication',
description:
'Azure, Active Directory, Okta or your custom SAML 2.0 solution',
@@ -30,7 +31,7 @@ function getAuthNProviders(samlEnabled: boolean): AuthNProvider[] {
},
{
- key: 'oidc',
+ key: AuthtypesAuthNProviderDTO.oidc,
title: 'OIDC Authentication',
description:
'Authenticate using OpenID Connect providers like Azure, Active Directory, Okta, or other OIDC compliant solutions',
@@ -44,7 +45,9 @@ function AuthnProviderSelector({
setAuthnProvider,
samlEnabled,
}: {
- setAuthnProvider: React.Dispatch<React.SetStateAction<string>>;
+ setAuthnProvider: React.Dispatch<
+ React.SetStateAction<AuthtypesAuthNProviderDTO | ''>
+ >;
samlEnabled: boolean;
}): JSX.Element {
const authnProviders = getAuthNProviders(samlEnabled);
diff --git a/frontend/src/container/OrganizationSettings/AuthDomain/CreateEdit/CreateEdit.tsx b/frontend/src/container/OrganizationSettings/AuthDomain/CreateEdit/CreateEdit.tsx
index 20da212547..fa4505534e 100644
--- a/frontend/src/container/OrganizationSettings/AuthDomain/CreateEdit/CreateEdit.tsx
+++ b/frontend/src/container/OrganizationSettings/AuthDomain/CreateEdit/CreateEdit.tsx
@@ -7,6 +7,7 @@ import {
useUpdateAuthDomain,
} from 'api/generated/services/authdomains';
import {
+ AuthtypesAuthNProviderDTO,
AuthtypesGettableAuthDomainDTO,
AuthtypesGoogleConfigDTO,
AuthtypesRoleMappingDTO,
@@ -57,9 +58,9 @@ interface CreateOrEditProps {
function CreateOrEdit(props: CreateOrEditProps): JSX.Element {
const { isCreate, record, onClose } = props;
const [form] = Form.useForm<FormValues>();
- const [authnProvider, setAuthnProvider] = useState<string>(
- record?.ssoType || '',
- );
+ const [authnProvider, setAuthnProvider] = useState<
+ AuthtypesAuthNProviderDTO | ''
+ >(record?.ssoType || '');
const { showErrorModal } = useErrorModal();
const { featureFlags } = useAppContext();
@@ -138,6 +139,10 @@ function CreateOrEdit(props: CreateOrEditProps): JSX.Element {
return;
}
+ if (authnProvider === '') {
+ return;
+ }
+
const name = form.getFieldValue('name');
const googleAuthConfig = getGoogleAuthConfig();
const samlConfig = form.getFieldValue('samlConfig');
diff --git a/frontend/src/container/OrganizationSettings/AuthDomain/__tests__/mocks.ts b/frontend/src/container/OrganizationSettings/AuthDomain/__tests__/mocks.ts
index 864d0d2bc9..95230a23e5 100644
--- a/frontend/src/container/OrganizationSettings/AuthDomain/__tests__/mocks.ts
+++ b/frontend/src/container/OrganizationSettings/AuthDomain/__tests__/mocks.ts
@@ -1,4 +1,7 @@
-import { AuthtypesGettableAuthDomainDTO } from 'api/generated/services/sigNoz.schemas';
+import {
+ AuthtypesAuthNProviderDTO,
+ AuthtypesGettableAuthDomainDTO,
+} from 'api/generated/services/sigNoz.schemas';
// API Endpoints
export const AUTH_DOMAINS_LIST_ENDPOINT = '*/api/v1/domains';
@@ -11,7 +14,7 @@ export const mockGoogleAuthDomain: AuthtypesGettableAuthDomainDTO = {
id: 'domain-1',
name: 'signoz.io',
ssoEnabled: true,
- ssoType: 'google_auth',
+ ssoType: AuthtypesAuthNProviderDTO.google_auth,
googleAuthConfig: {
clientId: 'test-client-id',
clientSecret: 'test-client-secret',
@@ -26,7 +29,7 @@ export const mockSamlAuthDomain: AuthtypesGettableAuthDomainDTO = {
id: 'domain-2',
name: 'example.com',
ssoEnabled: false,
- ssoType: 'saml',
+ ssoType: AuthtypesAuthNProviderDTO.saml,
samlConfig: {
samlIdp: 'https://idp.example.com/sso',
samlEntity: 'urn:example:idp',
@@ -42,7 +45,7 @@ export const mockOidcAuthDomain: AuthtypesGettableAuthDomainDTO = {
id: 'domain-3',
name: 'corp.io',
ssoEnabled: true,
- ssoType: 'oidc',
+ ssoType: AuthtypesAuthNProviderDTO.oidc,
oidcConfig: {
issuer: 'https://oidc.corp.io',
clientId: 'oidc-client-id',
@@ -58,7 +61,7 @@ export const mockDomainWithRoleMapping: AuthtypesGettableAuthDomainDTO = {
id: 'domain-4',
name: 'enterprise.com',
ssoEnabled: true,
- ssoType: 'saml',
+ ssoType: AuthtypesAuthNProviderDTO.saml,
samlConfig: {
samlIdp: 'https://idp.enterprise.com/sso',
samlEntity: 'urn:enterprise:idp',
@@ -84,7 +87,7 @@ export const mockDomainWithDirectRoleAttribute: AuthtypesGettableAuthDomainDTO =
id: 'domain-5',
name: 'direct-role.com',
ssoEnabled: true,
- ssoType: 'oidc',
+ ssoType: AuthtypesAuthNProviderDTO.oidc,
oidcConfig: {
issuer: 'https://oidc.direct-role.com',
clientId: 'direct-role-client-id',
@@ -104,7 +107,7 @@ export const mockOidcWithClaimMapping: AuthtypesGettableAuthDomainDTO = {
id: 'domain-6',
name: 'oidc-claims.com',
ssoEnabled: true,
- ssoType: 'oidc',
+ ssoType: AuthtypesAuthNProviderDTO.oidc,
oidcConfig: {
issuer: 'https://oidc.claims.com',
issuerAlias: 'https://alias.claims.com',
@@ -129,7 +132,7 @@ export const mockSamlWithAttributeMapping: AuthtypesGettableAuthDomainDTO = {
id: 'domain-7',
name: 'saml-attrs.com',
ssoEnabled: true,
- ssoType: 'saml',
+ ssoType: AuthtypesAuthNProviderDTO.saml,
samlConfig: {
samlIdp: 'https://idp.saml-attrs.com/sso',
samlEntity: 'urn:saml-attrs:idp',
@@ -152,7 +155,7 @@ export const mockGoogleAuthWithWorkspaceGroups: AuthtypesGettableAuthDomainDTO =
id: 'domain-8',
name: 'google-groups.com',
ssoEnabled: true,
- ssoType: 'google_auth',
+ ssoType: AuthtypesAuthNProviderDTO.google_auth,
googleAuthConfig: {
clientId: 'google-groups-client-id',
clientSecret: 'google-groups-client-secret',
diff --git a/pkg/alertmanager/signozalertmanager/handler.go b/pkg/alertmanager/signozalertmanager/handler.go
index 106897d13a..000b04cf1d 100644
--- a/pkg/alertmanager/signozalertmanager/handler.go
+++ b/pkg/alertmanager/signozalertmanager/handler.go
@@ -252,6 +252,7 @@ func (handler *handler) CreateChannel(rw http.ResponseWriter, req *http.Request)
return
}
+ // TODO: Move to PostableChannel and binding package
body, err := io.ReadAll(req.Body)
if err != nil {
render.Error(rw, err)
diff --git a/pkg/apiserver/signozapiserver/alertmanager.go b/pkg/apiserver/signozapiserver/alertmanager.go
index 6f88a7d566..07a68afe69 100644
--- a/pkg/apiserver/signozapiserver/alertmanager.go
+++ b/pkg/apiserver/signozapiserver/alertmanager.go
@@ -49,7 +49,7 @@ func (provider *provider) addAlertmanagerRoutes(router *mux.Router) error {
Tags: []string{"channels"},
Summary: "Create notification channel",
Description: "This endpoint creates a notification channel",
- Request: new(alertmanagertypes.Receiver),
+ Request: new(alertmanagertypes.PostableChannel),
RequestContentType: "application/json",
Response: new(alertmanagertypes.Channel),
ResponseContentType: "application/json",
diff --git a/pkg/apiserver/signozapiserver/authdomain.go b/pkg/apiserver/signozapiserver/authdomain.go
index 04b80ca2db..63b0da781b 100644
--- a/pkg/apiserver/signozapiserver/authdomain.go
+++ b/pkg/apiserver/signozapiserver/authdomain.go
@@ -44,6 +44,23 @@ func (provider *provider) addAuthDomainRoutes(router *mux.Router) error {
return err
}
+ if err := router.Handle("/api/v1/domains/{id}", handler.New(provider.authZ.AdminAccess(provider.authDomainHandler.Get), handler.OpenAPIDef{
+ ID: "GetAuthDomain",
+ Tags: []string{"authdomains"},
+ Summary: "Get auth domain by ID",
+ Description: "This endpoint returns an auth domain by ID",
+ Request: nil,
+ RequestContentType: "",
+ Response: new(authtypes.GettableAuthDomain),
+ ResponseContentType: "application/json",
+ SuccessStatusCode: http.StatusOK,
+ ErrorStatusCodes: []int{http.StatusNotFound},
+ Deprecated: false,
+ SecuritySchemes: newSecuritySchemes(types.RoleAdmin),
+ })).Methods(http.MethodGet).GetError(); err != nil {
+ return err
+ }
+
if err := router.Handle("/api/v1/domains/{id}", handler.New(provider.authZ.AdminAccess(provider.authDomainHandler.Update), handler.OpenAPIDef{
ID: "UpdateAuthDomain",
Tags: []string{"authdomains"},
diff --git a/pkg/modules/authdomain/authdomain.go b/pkg/modules/authdomain/authdomain.go
index 0905c3419e..e479151390 100644
--- a/pkg/modules/authdomain/authdomain.go
+++ b/pkg/modules/authdomain/authdomain.go
@@ -39,6 +39,7 @@ type Module interface {
type Handler interface {
List(http.ResponseWriter, *http.Request)
+ Get(http.ResponseWriter, *http.Request)
Create(http.ResponseWriter, *http.Request)
Update(http.ResponseWriter, *http.Request)
Delete(http.ResponseWriter, *http.Request)
diff --git a/pkg/modules/authdomain/implauthdomain/handler.go b/pkg/modules/authdomain/implauthdomain/handler.go
index 4b0ceab48d..47c32a8db2 100644
--- a/pkg/modules/authdomain/implauthdomain/handler.go
+++ b/pkg/modules/authdomain/implauthdomain/handler.go
@@ -77,6 +77,31 @@ func (handler *handler) Delete(rw http.ResponseWriter, req *http.Request) {
render.Success(rw, http.StatusNoContent, nil)
}
+func (handler *handler) Get(rw http.ResponseWriter, req *http.Request) {
+ ctx, cancel := context.WithTimeout(req.Context(), 10*time.Second)
+ defer cancel()
+
+ claims, err := authtypes.ClaimsFromContext(ctx)
+ if err != nil {
+ render.Error(rw, err)
+ return
+ }
+
+ domainID, err := valuer.NewUUID(mux.Vars(req)["id"])
+ if err != nil {
+ render.Error(rw, err)
+ return
+ }
+
+ authDomain, err := handler.module.GetByOrgIDAndID(ctx, valuer.MustNewUUID(claims.OrgID), domainID)
+ if err != nil {
+ render.Error(rw, err)
+ return
+ }
+
+ render.Success(rw, http.StatusOK, authtypes.NewGettableAuthDomainFromAuthDomain(authDomain, handler.module.GetAuthNProviderInfo(ctx, authDomain)))
+}
+
func (handler *handler) List(rw http.ResponseWriter, r *http.Request) {
ctx, cancel := context.WithTimeout(r.Context(), 10*time.Second)
defer cancel()
diff --git a/pkg/types/alertmanagertypes/channel.go b/pkg/types/alertmanagertypes/channel.go
index a8c5079e1e..ba5903328d 100644
--- a/pkg/types/alertmanagertypes/channel.go
+++ b/pkg/types/alertmanagertypes/channel.go
@@ -4,12 +4,14 @@ import (
"encoding/json"
"reflect"
"regexp"
+ "strings"
"time"
"github.com/SigNoz/signoz/pkg/errors"
"github.com/SigNoz/signoz/pkg/types"
"github.com/SigNoz/signoz/pkg/valuer"
"github.com/prometheus/alertmanager/config"
+ "github.com/swaggest/jsonschema-go"
"github.com/uptrace/bun"
)
@@ -28,6 +30,18 @@ type Channels = []*Channel
type GettableChannels = []*Channel
+// TODO: the oneOf emitted by JSONSchema is not the shape OpenAPI wants for a
+// discriminated union. OpenAPI's discriminator requires every oneOf branch to
+// be a $ref to a named component and a sibling property whose value selects
+// the variant. Our payload instead uses the *presence* of one of the 18
+// *_configs arrays to imply the type, so no discriminator can be attached.
+// Refactor PostableChannel into a {name, type, config} envelope (see
+// ruletypes.RuleThresholdData for the pattern) so each notification kind
+// becomes a named component and the discriminator can be wired up properly.
+type PostableChannel struct {
+ Receiver
+}
+
// Channel represents a single receiver of the alertmanager config.
type Channel struct {
bun.BaseModel `bun:"table:notification_channel"`
@@ -183,3 +197,30 @@ func (c *Channel) Update(receiver Receiver) error {
return nil
}
+
+func (PostableChannel) JSONSchema() (jsonschema.Schema, error) {
+ type alias PostableChannel
+ reflector := &jsonschema.Reflector{}
+
+ schema, err := reflector.Reflect(alias{}, jsonschema.DefinitionsPrefix("#/components/schemas/"))
+ if err != nil {
+ return jsonschema.Schema{}, err
+ }
+
+ schema.WithRequired("name")
+
+ var oneOf []jsonschema.SchemaOrBool
+ receiverType := reflect.TypeOf(Receiver{})
+ for i := 0; i < receiverType.NumField(); i++ {
+ jsonTag := strings.Split(receiverType.Field(i).Tag.Get("json"), ",")[0]
+ if !strings.HasSuffix(jsonTag, "_configs") {
+ continue
+ }
+ branch := (&jsonschema.Schema{}).WithRequired(jsonTag)
+ oneOf = append(oneOf, branch.ToSchemaOrBool())
+ }
+
+ schema.WithOneOf(oneOf...)
+
+ return schema, nil
+}
diff --git a/pkg/types/alertmanagertypes/receiver.go b/pkg/types/alertmanagertypes/receiver.go
index 3916c150ee..7058f26475 100644
--- a/pkg/types/alertmanagertypes/receiver.go
+++ b/pkg/types/alertmanagertypes/receiver.go
@@ -4,10 +4,11 @@ import (
"context"
"encoding/json"
"fmt"
- "github.com/prometheus/common/model"
"log/slog"
"time"
+ "github.com/prometheus/common/model"
+
"github.com/SigNoz/signoz/pkg/errors"
"github.com/prometheus/alertmanager/notify"
"github.com/prometheus/alertmanager/template"
diff --git a/pkg/types/authtypes/authn.go b/pkg/types/authtypes/authn.go
index c040c735b5..b43176bfa4 100644
--- a/pkg/types/authtypes/authn.go
+++ b/pkg/types/authtypes/authn.go
@@ -156,6 +156,15 @@ func (typ *Identity) ToClaims() Claims {
}
}
+func (AuthNProvider) Enum() []any {
+ return []any{
+ AuthNProviderGoogleAuth,
+ AuthNProviderSAML,
+ AuthNProviderEmailPassword,
+ AuthNProviderOIDC,
+ }
+}
+
type AuthNStore interface {
// Get user and factor password by email and orgID.
GetActiveUserAndFactorPasswordByEmailAndOrgID(ctx context.Context, email string, orgID valuer.UUID) (*types.User, *types.FactorPassword, []*UserRole, error)
diff --git a/pkg/types/authtypes/domain.go b/pkg/types/authtypes/domain.go
index 82543239bf..71821dc0cd 100644
--- a/pkg/types/authtypes/domain.go
+++ b/pkg/types/authtypes/domain.go
@@ -29,8 +29,8 @@ var (
)
type GettableAuthDomain struct {
- *StorableAuthDomain
- *AuthDomainConfig
+ StorableAuthDomain
+ AuthDomainConfig
AuthNProviderInfo *AuthNProviderInfo `json:"authNProviderInfo"`
}
@@ -57,6 +57,15 @@ type StorableAuthDomain struct {
types.TimeAuditable
}
+// TODO: the oneOf emitted by JSONSchemaOneOf is not the shape OpenAPI wants
+// for a discriminated union. OpenAPI's discriminator requires every oneOf
+// branch to be a $ref to a named component and a sibling property whose value
+// selects the variant. ssoType is already discriminator-shaped, but the
+// variant payload lives in a sibling field (samlConfig / googleAuthConfig /
+// oidcConfig) instead of being the payload itself, so no discriminator can
+// be attached. Refactor AuthDomainConfig into an envelope (see
+// ruletypes.RuleThresholdData for the pattern) where the chosen config is
+// the payload and ssoType is the discriminator.
type AuthDomainConfig struct {
SSOEnabled bool `json:"ssoEnabled"`
AuthNProvider AuthNProvider `json:"ssoType"`
@@ -111,8 +120,8 @@ func NewAuthDomainFromStorableAuthDomain(storableAuthDomain *StorableAuthDomain)
func NewGettableAuthDomainFromAuthDomain(authDomain *AuthDomain, authNProviderInfo *AuthNProviderInfo) *GettableAuthDomain {
return &GettableAuthDomain{
- StorableAuthDomain: authDomain.StorableAuthDomain(),
- AuthDomainConfig: authDomain.AuthDomainConfig(),
+ StorableAuthDomain: *authDomain.StorableAuthDomain(),
+ AuthDomainConfig: *authDomain.AuthDomainConfig(),
AuthNProviderInfo: authNProviderInfo,
}
}
@@ -186,6 +195,14 @@ func (typ *AuthDomainConfig) UnmarshalJSON(data []byte) error {
}
+func (AuthDomainConfig) JSONSchemaOneOf() []any {
+ return []any{
+ SamlConfig{},
+ GoogleConfig{},
+ OIDCConfig{},
+ }
+}
+
type AuthDomainStore interface {
// Get by id.
Get(context.Context, valuer.UUID) (*AuthDomain, error)
diff --git a/pkg/types/ruletypes/maintenance.go b/pkg/types/ruletypes/maintenance.go
index c7ea4a86d3..7d20556f94 100644
--- a/pkg/types/ruletypes/maintenance.go
+++ b/pkg/types/ruletypes/maintenance.go
@@ -63,15 +63,15 @@ type StorablePlannedMaintenance struct {
}
type PlannedMaintenance struct {
- ID valuer.UUID `json:"id" required:"true"`
- Name string `json:"name" required:"true"`
- Description string `json:"description"`
- Schedule *Schedule `json:"schedule" required:"true"`
- RuleIDs []string `json:"alertIds"`
- CreatedAt time.Time `json:"createdAt"`
- CreatedBy string `json:"createdBy"`
- UpdatedAt time.Time `json:"updatedAt"`
- UpdatedBy string `json:"updatedBy"`
+ ID valuer.UUID `json:"id" required:"true"`
+ Name string `json:"name" required:"true"`
+ Description string `json:"description"`
+ Schedule *Schedule `json:"schedule" required:"true"`
+ RuleIDs []string `json:"alertIds"`
+ CreatedAt time.Time `json:"createdAt"`
+ CreatedBy string `json:"createdBy"`
+ UpdatedAt time.Time `json:"updatedAt"`
+ UpdatedBy string `json:"updatedBy"`
Status MaintenanceStatus `json:"status" required:"true"`
Kind MaintenanceKind `json:"kind" required:"true"`
}
diff --git a/pkg/types/ruletypes/recurrence.go b/pkg/types/ruletypes/recurrence.go
index 5becae1dcf..e7425a558c 100644
--- a/pkg/types/ruletypes/recurrence.go
+++ b/pkg/types/ruletypes/recurrence.go
@@ -3,8 +3,10 @@ package ruletypes
import (
"database/sql/driver"
"encoding/json"
+ "reflect"
"time"
+ "github.com/SigNoz/signoz/pkg/errors"
"github.com/SigNoz/signoz/pkg/valuer"
)
@@ -73,10 +75,16 @@ type Recurrence struct {
}
func (r *Recurrence) Scan(src interface{}) error {
- if data, ok := src.([]byte); ok {
+ switch data := src.(type) {
+ case []byte:
return json.Unmarshal(data, r)
+ case string:
+ return json.Unmarshal([]byte(data), r)
+ case nil:
+ return nil
+ default:
+ return errors.Newf(errors.TypeInternal, errors.CodeInternal, "recurrence: (unsupported \"%s\")", reflect.TypeOf(data).String())
}
- return nil
}
func (r *Recurrence) Value() (driver.Value, error) {
diff --git a/pkg/types/ruletypes/schedule.go b/pkg/types/ruletypes/schedule.go
index ea4e0ec213..29e40fa926 100644
--- a/pkg/types/ruletypes/schedule.go
+++ b/pkg/types/ruletypes/schedule.go
@@ -3,7 +3,10 @@ package ruletypes
import (
"database/sql/driver"
"encoding/json"
+ "reflect"
"time"
+
+ "github.com/SigNoz/signoz/pkg/errors"
)
type Schedule struct {
@@ -14,10 +17,16 @@ type Schedule struct {
}
func (s *Schedule) Scan(src interface{}) error {
- if data, ok := src.([]byte); ok {
+ switch data := src.(type) {
+ case []byte:
return json.Unmarshal(data, s)
+ case string:
+ return json.Unmarshal([]byte(data), s)
+ case nil:
+ return nil
+ default:
+ return errors.Newf(errors.TypeInternal, errors.CodeInternal, "schedule: (unsupported \"%s\")", reflect.TypeOf(data).String())
}
- return nil
}
func (s *Schedule) Value() (driver.Value, error) {