|
| 1 | +/* |
| 2 | + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one |
| 3 | + * or more contributor license agreements. Licensed under the "Elastic License |
| 4 | + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side |
| 5 | + * Public License v 1"; you may not use this file except in compliance with, at |
| 6 | + * your election, the "Elastic License 2.0", the "GNU Affero General Public |
| 7 | + * License v3.0 only", or the "Server Side Public License, v 1". |
| 8 | + */ |
| 9 | + |
| 10 | +import type { z } from '@kbn/zod'; |
| 11 | +import type { |
| 12 | + ExecutorParamsSchema, |
| 13 | + ExecutorSubActionPushParamsSchema, |
| 14 | + ExternalIncidentServiceConfigurationSchema, |
| 15 | + ExternalIncidentServiceSecretConfigurationSchema, |
| 16 | +} from '../schemas/v1'; |
| 17 | + |
| 18 | +// config |
| 19 | +export type CasesWebhookPublicConfigurationType = z.infer< |
| 20 | + typeof ExternalIncidentServiceConfigurationSchema |
| 21 | +>; |
| 22 | +// secrets |
| 23 | +export type CasesWebhookSecretConfigurationType = z.infer< |
| 24 | + typeof ExternalIncidentServiceSecretConfigurationSchema |
| 25 | +>; |
| 26 | +// params |
| 27 | +export type CasesWebhookActionParamsType = z.infer<typeof ExecutorParamsSchema>; |
| 28 | + |
| 29 | +export type Incident = Omit<ExecutorSubActionPushParams['incident'], 'externalId'>; |
| 30 | + |
| 31 | +export type ExecutorParams = z.infer<typeof ExecutorParamsSchema>; |
| 32 | +export type ExecutorSubActionPushParams = z.infer<typeof ExecutorSubActionPushParamsSchema>; |
| 33 | +export type PushToServiceApiParams = ExecutorSubActionPushParams; |
| 34 | + |
| 35 | +export interface ExternalServiceIncidentResponse { |
| 36 | + id: string; |
| 37 | + title: string; |
| 38 | + url: string; |
| 39 | + pushedDate: string; |
| 40 | +} |
| 41 | +export type CasesWebhookExecutorResultData = ExternalServiceIncidentResponse; |
0 commit comments