123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- import {IssueConfigField} from 'app/types/index';
- type IssueAlertRuleFormField =
- | {
- type: 'choice';
- choices?: [string, string][];
- initial?: string;
- placeholder?: string;
- }
- | {
- type: 'string';
- initial?: string;
- placeholder?: string;
- }
- | {
- type: 'number';
- placeholder?: number | string;
- initial?: string;
- };
- export type IssueAlertRuleActionTemplate = {
- id: string;
- label: string;
- prompt: string;
- enabled: boolean;
- actionType?: 'ticket';
- formFields?: {
- [key: string]: IssueAlertRuleFormField;
- };
- ticketType?: string;
- link?: string;
- };
- export type IssueAlertRuleConditionTemplate = IssueAlertRuleActionTemplate;
- export type IssueAlertRuleAction = Omit<
- IssueAlertRuleActionTemplate,
- 'formFields' | 'enabled'
- > & {
- dynamic_form_fields?: IssueConfigField[];
- } & {
-
- [key: string]: number | string;
- };
- export type IssueAlertRuleCondition = Omit<
- IssueAlertRuleConditionTemplate,
- 'formFields' | 'enabled'
- > & {
- dynamic_form_fields?: IssueConfigField[];
- } & {
-
- [key: string]: number | string;
- };
- export type UnsavedIssueAlertRule = {
-
- actionMatch: 'all' | 'any' | 'none';
-
- filterMatch: 'all' | 'any' | 'none';
- actions: IssueAlertRuleAction[];
- conditions: IssueAlertRuleCondition[];
- filters: IssueAlertRuleCondition[];
- environment?: null | string;
- frequency: number;
- name: string;
- owner?: string | null;
- };
- export type IssueAlertRule = UnsavedIssueAlertRule & {
- dateCreated: string;
- createdBy: {id: number; email: string; name: string} | null;
- projects: string[];
- id: string;
- };
- export enum MailActionTargetType {
- IssueOwners = 'IssueOwners',
- Team = 'Team',
- Member = 'Member',
- }
- export enum AssigneeTargetType {
- Unassigned = 'Unassigned',
- Team = 'Team',
- Member = 'Member',
- }
- export type NoteType = {
- text: string;
- mentions: string[];
- };
|