UNPKG

@soft-stech/flux-cd

Version:
128 lines (127 loc) 5.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.IProviderSchema = 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"); /** * Provider is the Schema for the providers API */ exports.IProviderSchema = zod_1.z.object({ /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources */ apiVersion: zod_1.z.literal("notification.toolkit.fluxcd.io/v1beta3"), /** * Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds */ kind: zod_1.z.literal("Provider"), metadata: ObjectMeta_schema_1.iObjectMetaSchema.optional(), /** * ProviderSpec defines the desired state of the Provider. */ spec: zod_1.z .object({ /** * Address specifies the endpoint, in a generic sense, to where alerts are sent. What kind of endpoint depends on the specific Provider type being used. For the generic Provider, for example, this is an HTTP/S address. For other Provider types this could be a project ID or a namespace. * @maxLength 2048 */ address: zod_1.z.string().max(2048).optional(), /** * CertSecretRef specifies the Secret containing a PEM-encoded CA certificate (in the `ca.crt` key). * Note: Support for the `caFile` key has been deprecated. */ certSecretRef: zod_1.z .object({ /** * Name of the referent. */ name: zod_1.z.string() }) .optional(), /** * Channel specifies the destination channel where events should be posted. * @maxLength 2048 */ channel: zod_1.z.string().max(2048).optional(), /** * Interval at which to reconcile the Provider with its Secret references. Deprecated and not used in v1beta3. * @pattern ^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$ */ interval: zod_1.z .string() .regex(/^([0-9]+(\.[0-9]+)?(ms|s|m|h))+$/) .optional(), /** * Proxy the HTTP/S address of the proxy server. * @maxLength 2048 * @pattern ^(http|https):\/\/.*$ */ proxy: zod_1.z .string() .max(2048) .regex(/^(http|https):\/\/.*$/) .optional(), /** * SecretRef specifies the Secret containing the authentication credentials for this Provider. */ secretRef: zod_1.z .object({ /** * Name of the referent. */ name: zod_1.z.string() }) .optional(), /** * Suspend tells the controller to suspend subsequent events handling for this Provider. */ suspend: zod_1.z.boolean().optional(), /** * Timeout for sending alerts to the Provider. * @pattern ^([0-9]+(\.[0-9]+)?(ms|s|m))+$ */ timeout: zod_1.z .string() .regex(/^([0-9]+(\.[0-9]+)?(ms|s|m))+$/) .optional(), /** * Type specifies which Provider implementation to use. */ type: zod_1.z.union([ zod_1.z.literal("slack"), zod_1.z.literal("discord"), zod_1.z.literal("msteams"), zod_1.z.literal("rocket"), zod_1.z.literal("generic"), zod_1.z.literal("generic-hmac"), zod_1.z.literal("github"), zod_1.z.literal("gitlab"), zod_1.z.literal("gitea"), zod_1.z.literal("bitbucketserver"), zod_1.z.literal("bitbucket"), zod_1.z.literal("azuredevops"), zod_1.z.literal("googlechat"), zod_1.z.literal("googlepubsub"), zod_1.z.literal("webex"), zod_1.z.literal("sentry"), zod_1.z.literal("azureeventhub"), zod_1.z.literal("telegram"), zod_1.z.literal("lark"), zod_1.z.literal("matrix"), zod_1.z.literal("opsgenie"), zod_1.z.literal("alertmanager"), zod_1.z.literal("grafana"), zod_1.z.literal("githubdispatch"), zod_1.z.literal("pagerduty"), zod_1.z.literal("datadog"), zod_1.z.literal("nats") ]), /** * Username specifies the name under which events are posted. * @maxLength 2048 */ username: zod_1.z.string().max(2048).optional() }) .optional() });