@soft-stech/flagger
Version:
109 lines (108 loc) • 3.85 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.IAlertProviderSchema = void 0;
// Generated by ts-to-zod
const zod_1 = require("zod");
const ObjectMeta_schema_1 = require("@soft-stech/apimachinery/apis/meta/v1/ObjectMeta.schema");
/**
* AlertProvider is the Schema for the AlertProvider API.
*/
exports.IAlertProviderSchema = zod_1.z.object({
"apiVersion": zod_1.z.literal("flagger.app/v1beta1"),
"kind": zod_1.z.literal("AlertProvider"),
"metadata": ObjectMeta_schema_1.iObjectMetaSchema.optional(),
/**
* AlertProviderSpec defines the desired state of a AlertProvider.
*/
"spec": zod_1.z.object({
/**
* Type of this provider
*/
"type": zod_1.z.union([zod_1.z.literal("slack"), zod_1.z.literal("msteams"), zod_1.z.literal("discord"), zod_1.z.literal("rocket"), zod_1.z.literal("gchat")]).optional(),
/**
* Alert channel for this provider
*/
"channel": zod_1.z.string().optional(),
/**
* Bot username for this provider
*/
"username": zod_1.z.string().optional(),
/**
* Hook URL address of this provider
*/
"address": zod_1.z.string().optional(),
/**
* Http/s proxy of this provider
*/
"proxy": zod_1.z.string().optional(),
/**
* Kubernetes secret reference containing the provider address
*/
"secretRef": zod_1.z.object({
/**
* Name of the Kubernetes secret
*/
"name": zod_1.z.string()
}).optional()
}).and(zod_1.z.union([zod_1.z.object({
/**
* Type of this provider
*/
"type": zod_1.z.union([zod_1.z.literal("slack"), zod_1.z.literal("msteams"), zod_1.z.literal("discord"), zod_1.z.literal("rocket"), zod_1.z.literal("gchat")]),
/**
* Alert channel for this provider
*/
"channel": zod_1.z.string().optional(),
/**
* Bot username for this provider
*/
"username": zod_1.z.string().optional(),
/**
* Hook URL address of this provider
*/
"address": zod_1.z.string(),
/**
* Http/s proxy of this provider
*/
"proxy": zod_1.z.string().optional(),
/**
* Kubernetes secret reference containing the provider address
*/
"secretRef": zod_1.z.object({
/**
* Name of the Kubernetes secret
*/
"name": zod_1.z.string()
}).optional()
}), zod_1.z.object({
/**
* Type of this provider
*/
"type": zod_1.z.union([zod_1.z.literal("slack"), zod_1.z.literal("msteams"), zod_1.z.literal("discord"), zod_1.z.literal("rocket"), zod_1.z.literal("gchat")]),
/**
* Alert channel for this provider
*/
"channel": zod_1.z.string().optional(),
/**
* Bot username for this provider
*/
"username": zod_1.z.string().optional(),
/**
* Hook URL address of this provider
*/
"address": zod_1.z.string().optional(),
/**
* Http/s proxy of this provider
*/
"proxy": zod_1.z.string().optional(),
/**
* Kubernetes secret reference containing the provider address
*/
"secretRef": zod_1.z.object({
/**
* Name of the Kubernetes secret
*/
"name": zod_1.z.string()
})
})])).optional()
});