@soft-stech/flux-cd
Version:
225 lines (224 loc) • 7.59 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Provider = void 0;
const IoK8sApimachineryPkgApisMetaV1ObjectMeta_1 = require("@soft-stech/apimachinery/_schemas/IoK8sApimachineryPkgApisMetaV1ObjectMeta");
const base_1 = require("@soft-stech/base");
const validate_1 = require("@soft-stech/validate");
const schemaId = "notification.toolkit.fluxcd.io.v1beta2.Provider";
const schema = {
"type": "object",
"properties": {
"apiVersion": {
"type": "string",
"enum": [
"notification.toolkit.fluxcd.io/v1beta2"
]
},
"kind": {
"type": "string",
"enum": [
"Provider"
]
},
"metadata": {
"oneOf": [
{
"$ref": "io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta#"
},
{
"type": "null"
}
]
},
"spec": {
"properties": {
"address": {
"maxLength": 2048,
"type": "string",
"nullable": true
},
"certSecretRef": {
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object",
"nullable": true
},
"channel": {
"maxLength": 2048,
"type": "string",
"nullable": true
},
"interval": {
"type": "string",
"pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m|h))+$",
"nullable": true
},
"proxy": {
"maxLength": 2048,
"type": "string",
"pattern": "^(http|https):\\/\\/.*$",
"nullable": true
},
"secretRef": {
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
],
"type": "object",
"nullable": true
},
"suspend": {
"type": "boolean",
"nullable": true
},
"timeout": {
"type": "string",
"pattern": "^([0-9]+(\\.[0-9]+)?(ms|s|m))+$",
"nullable": true
},
"type": {
"enum": [
"slack",
"discord",
"msteams",
"rocket",
"generic",
"generic-hmac",
"github",
"gitlab",
"gitea",
"bitbucketserver",
"bitbucket",
"azuredevops",
"googlechat",
"googlepubsub",
"webex",
"sentry",
"azureeventhub",
"telegram",
"lark",
"matrix",
"opsgenie",
"alertmanager",
"grafana",
"githubdispatch",
"pagerduty",
"datadog"
],
"type": "string"
},
"username": {
"maxLength": 2048,
"type": "string",
"nullable": true
}
},
"required": [
"type"
],
"type": "object",
"nullable": true
},
"status": {
"default": {
"observedGeneration": -1
},
"properties": {
"conditions": {
"items": {
"properties": {
"lastTransitionTime": {
"format": "date-time",
"type": "string"
},
"message": {
"maxLength": 32768,
"type": "string"
},
"observedGeneration": {
"format": "int64",
"type": "integer",
"minimum": 0,
"nullable": true
},
"reason": {
"maxLength": 1024,
"minLength": 1,
"type": "string",
"pattern": "^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$"
},
"status": {
"enum": [
"True",
"False",
"Unknown"
],
"type": "string"
},
"type": {
"maxLength": 316,
"type": "string",
"pattern": "^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*\\/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$"
}
},
"required": [
"lastTransitionTime",
"message",
"reason",
"status",
"type"
],
"type": "object"
},
"type": "array",
"nullable": true
},
"lastHandledReconcileAt": {
"type": "string",
"nullable": true
},
"observedGeneration": {
"format": "int64",
"type": "integer",
"nullable": true
}
},
"type": "object",
"nullable": true
}
},
"required": [
"apiVersion",
"kind"
]
};
/**
* Provider is the Schema for the providers API.
*/
class Provider extends base_1.Model {
constructor(data) {
super({
apiVersion: Provider.apiVersion,
kind: Provider.kind,
...data
});
}
}
exports.Provider = Provider;
Provider.apiVersion = "notification.toolkit.fluxcd.io/v1beta2";
Provider.kind = "Provider";
Provider.is = (0, base_1.createTypeMetaGuard)(Provider);
(0, base_1.setSchema)(Provider, schemaId, () => {
(0, IoK8sApimachineryPkgApisMetaV1ObjectMeta_1.addSchema)();
(0, validate_1.register)(schemaId, schema);
});