@incident-io/sdk 2.10.0 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,10 @@ import type { TriggerSlimV2 } from './TriggerSlimV2.js';
21
21
  * @interface WorkflowSlimV2
22
22
  */
23
23
  export interface WorkflowSlimV2 {
24
+ /**
25
+ * Whether the workflow is configured to run immediately or ask for confirmation in the incident channel
26
+ */
27
+ auto_run_mode: WorkflowSlimV2AutoRunModeEnum;
24
28
  /**
25
29
  * Conditions that apply to the workflow trigger
26
30
  */
@@ -102,6 +106,14 @@ export interface WorkflowSlimV2 {
102
106
  */
103
107
  version: number;
104
108
  }
109
+ /**
110
+ * @export
111
+ */
112
+ export declare const WorkflowSlimV2AutoRunModeEnum: {
113
+ readonly RunAutomatically: "run_automatically";
114
+ readonly ConfirmBeforeRunning: "confirm_before_running";
115
+ };
116
+ export type WorkflowSlimV2AutoRunModeEnum = typeof WorkflowSlimV2AutoRunModeEnum[keyof typeof WorkflowSlimV2AutoRunModeEnum];
105
117
  /**
106
118
  * @export
107
119
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.WorkflowSlimV2StateEnum = exports.WorkflowSlimV2RunsOnIncidentsEnum = exports.WorkflowSlimV2RunsOnIncidentModesEnum = exports.WorkflowSlimV2PrivateIncidentScopeEnum = void 0;
16
+ exports.WorkflowSlimV2StateEnum = exports.WorkflowSlimV2RunsOnIncidentsEnum = exports.WorkflowSlimV2RunsOnIncidentModesEnum = exports.WorkflowSlimV2PrivateIncidentScopeEnum = exports.WorkflowSlimV2AutoRunModeEnum = void 0;
17
17
  exports.instanceOfWorkflowSlimV2 = instanceOfWorkflowSlimV2;
18
18
  exports.WorkflowSlimV2FromJSON = WorkflowSlimV2FromJSON;
19
19
  exports.WorkflowSlimV2FromJSONTyped = WorkflowSlimV2FromJSONTyped;
@@ -26,6 +26,13 @@ const WorkflowDelayV2_js_1 = require("./WorkflowDelayV2.js");
26
26
  const ConditionGroupV2_js_1 = require("./ConditionGroupV2.js");
27
27
  const EngineReferenceV2_js_1 = require("./EngineReferenceV2.js");
28
28
  const TriggerSlimV2_js_1 = require("./TriggerSlimV2.js");
29
+ /**
30
+ * @export
31
+ */
32
+ exports.WorkflowSlimV2AutoRunModeEnum = {
33
+ RunAutomatically: 'run_automatically',
34
+ ConfirmBeforeRunning: 'confirm_before_running',
35
+ };
29
36
  /**
30
37
  * @export
31
38
  */
@@ -62,6 +69,8 @@ exports.WorkflowSlimV2StateEnum = {
62
69
  * Check if a given object implements the WorkflowSlimV2 interface.
63
70
  */
64
71
  function instanceOfWorkflowSlimV2(value) {
72
+ if (!('auto_run_mode' in value) || value['auto_run_mode'] === undefined)
73
+ return false;
65
74
  if (!('condition_groups' in value) || value['condition_groups'] === undefined)
66
75
  return false;
67
76
  if (!('continue_on_step_error' in value) || value['continue_on_step_error'] === undefined)
@@ -102,6 +111,7 @@ function WorkflowSlimV2FromJSONTyped(json, ignoreDiscriminator) {
102
111
  return json;
103
112
  }
104
113
  return {
114
+ 'auto_run_mode': json['auto_run_mode'],
105
115
  'condition_groups': (json['condition_groups'].map(ConditionGroupV2_js_1.ConditionGroupV2FromJSON)),
106
116
  'continue_on_step_error': json['continue_on_step_error'],
107
117
  'delay': json['delay'] == null ? undefined : (0, WorkflowDelayV2_js_1.WorkflowDelayV2FromJSON)(json['delay']),
@@ -132,6 +142,7 @@ function WorkflowSlimV2ToJSONTyped(value, ignoreDiscriminator = false) {
132
142
  return value;
133
143
  }
134
144
  return {
145
+ 'auto_run_mode': value['auto_run_mode'],
135
146
  'condition_groups': (value['condition_groups'].map(ConditionGroupV2_js_1.ConditionGroupV2ToJSON)),
136
147
  'continue_on_step_error': value['continue_on_step_error'],
137
148
  'delay': (0, WorkflowDelayV2_js_1.WorkflowDelayV2ToJSON)(value['delay']),
@@ -22,6 +22,10 @@ import type { TriggerSlimV2 } from './TriggerSlimV2.js';
22
22
  * @interface WorkflowV2
23
23
  */
24
24
  export interface WorkflowV2 {
25
+ /**
26
+ * Whether the workflow is configured to run immediately or ask for confirmation in the incident channel
27
+ */
28
+ auto_run_mode: WorkflowV2AutoRunModeEnum;
25
29
  /**
26
30
  * Conditions that apply to the workflow trigger
27
31
  */
@@ -43,7 +47,7 @@ export interface WorkflowV2 {
43
47
  */
44
48
  folder?: string;
45
49
  /**
46
- * User-configured form fields available in the workflow scope (manual triggers only)
50
+ * User-configured form fields available in the workflow scope. Allowed on manually-triggered workflows, and on workflows with an `auto_run_mode` of `confirm_before_running`.
47
51
  */
48
52
  form_fields?: Array<WorkflowFormFieldV2>;
49
53
  /**
@@ -107,6 +111,14 @@ export interface WorkflowV2 {
107
111
  */
108
112
  version: number;
109
113
  }
114
+ /**
115
+ * @export
116
+ */
117
+ export declare const WorkflowV2AutoRunModeEnum: {
118
+ readonly RunAutomatically: "run_automatically";
119
+ readonly ConfirmBeforeRunning: "confirm_before_running";
120
+ };
121
+ export type WorkflowV2AutoRunModeEnum = typeof WorkflowV2AutoRunModeEnum[keyof typeof WorkflowV2AutoRunModeEnum];
110
122
  /**
111
123
  * @export
112
124
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.WorkflowV2StateEnum = exports.WorkflowV2RunsOnIncidentsEnum = exports.WorkflowV2RunsOnIncidentModesEnum = exports.WorkflowV2PrivateIncidentScopeEnum = void 0;
16
+ exports.WorkflowV2StateEnum = exports.WorkflowV2RunsOnIncidentsEnum = exports.WorkflowV2RunsOnIncidentModesEnum = exports.WorkflowV2PrivateIncidentScopeEnum = exports.WorkflowV2AutoRunModeEnum = void 0;
17
17
  exports.instanceOfWorkflowV2 = instanceOfWorkflowV2;
18
18
  exports.WorkflowV2FromJSON = WorkflowV2FromJSON;
19
19
  exports.WorkflowV2FromJSONTyped = WorkflowV2FromJSONTyped;
@@ -27,6 +27,13 @@ const WorkflowDelayV2_js_1 = require("./WorkflowDelayV2.js");
27
27
  const ConditionGroupV2_js_1 = require("./ConditionGroupV2.js");
28
28
  const EngineReferenceV2_js_1 = require("./EngineReferenceV2.js");
29
29
  const TriggerSlimV2_js_1 = require("./TriggerSlimV2.js");
30
+ /**
31
+ * @export
32
+ */
33
+ exports.WorkflowV2AutoRunModeEnum = {
34
+ RunAutomatically: 'run_automatically',
35
+ ConfirmBeforeRunning: 'confirm_before_running',
36
+ };
30
37
  /**
31
38
  * @export
32
39
  */
@@ -63,6 +70,8 @@ exports.WorkflowV2StateEnum = {
63
70
  * Check if a given object implements the WorkflowV2 interface.
64
71
  */
65
72
  function instanceOfWorkflowV2(value) {
73
+ if (!('auto_run_mode' in value) || value['auto_run_mode'] === undefined)
74
+ return false;
66
75
  if (!('condition_groups' in value) || value['condition_groups'] === undefined)
67
76
  return false;
68
77
  if (!('continue_on_step_error' in value) || value['continue_on_step_error'] === undefined)
@@ -103,6 +112,7 @@ function WorkflowV2FromJSONTyped(json, ignoreDiscriminator) {
103
112
  return json;
104
113
  }
105
114
  return {
115
+ 'auto_run_mode': json['auto_run_mode'],
106
116
  'condition_groups': (json['condition_groups'].map(ConditionGroupV2_js_1.ConditionGroupV2FromJSON)),
107
117
  'continue_on_step_error': json['continue_on_step_error'],
108
118
  'delay': json['delay'] == null ? undefined : (0, WorkflowDelayV2_js_1.WorkflowDelayV2FromJSON)(json['delay']),
@@ -134,6 +144,7 @@ function WorkflowV2ToJSONTyped(value, ignoreDiscriminator = false) {
134
144
  return value;
135
145
  }
136
146
  return {
147
+ 'auto_run_mode': value['auto_run_mode'],
137
148
  'condition_groups': (value['condition_groups'].map(ConditionGroupV2_js_1.ConditionGroupV2ToJSON)),
138
149
  'continue_on_step_error': value['continue_on_step_error'],
139
150
  'delay': (0, WorkflowDelayV2_js_1.WorkflowDelayV2ToJSON)(value['delay']),
@@ -26,6 +26,10 @@ export interface WorkflowsCreateWorkflowPayloadV2 {
26
26
  annotations?: {
27
27
  [key: string]: string;
28
28
  };
29
+ /**
30
+ * Whether the workflow runs immediately, or asks for confirmation in the incident channel first. Defaults to `run_automatically` on create. If omitted on update, the workflow keeps its current mode.
31
+ */
32
+ auto_run_mode?: WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum;
29
33
  /**
30
34
  * Conditions that apply to the workflow trigger
31
35
  */
@@ -47,7 +51,7 @@ export interface WorkflowsCreateWorkflowPayloadV2 {
47
51
  */
48
52
  folder?: string;
49
53
  /**
50
- * User-configured form fields available in the workflow scope (manual triggers only)
54
+ * User-configured form fields available in the workflow scope. Allowed on manually-triggered workflows, and on workflows with an `auto_run_mode` of `confirm_before_running`.
51
55
  */
52
56
  form_fields?: Array<WorkflowFormFieldPayloadV2>;
53
57
  /**
@@ -99,6 +103,14 @@ export interface WorkflowsCreateWorkflowPayloadV2 {
99
103
  */
100
104
  trigger: string;
101
105
  }
106
+ /**
107
+ * @export
108
+ */
109
+ export declare const WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum: {
110
+ readonly RunAutomatically: "run_automatically";
111
+ readonly ConfirmBeforeRunning: "confirm_before_running";
112
+ };
113
+ export type WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum = typeof WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum[keyof typeof WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum];
102
114
  /**
103
115
  * @export
104
116
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.WorkflowsCreateWorkflowPayloadV2StateEnum = exports.WorkflowsCreateWorkflowPayloadV2RunsOnIncidentsEnum = exports.WorkflowsCreateWorkflowPayloadV2RunsOnIncidentModesEnum = exports.WorkflowsCreateWorkflowPayloadV2PrivateIncidentScopeEnum = void 0;
16
+ exports.WorkflowsCreateWorkflowPayloadV2StateEnum = exports.WorkflowsCreateWorkflowPayloadV2RunsOnIncidentsEnum = exports.WorkflowsCreateWorkflowPayloadV2RunsOnIncidentModesEnum = exports.WorkflowsCreateWorkflowPayloadV2PrivateIncidentScopeEnum = exports.WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum = void 0;
17
17
  exports.instanceOfWorkflowsCreateWorkflowPayloadV2 = instanceOfWorkflowsCreateWorkflowPayloadV2;
18
18
  exports.WorkflowsCreateWorkflowPayloadV2FromJSON = WorkflowsCreateWorkflowPayloadV2FromJSON;
19
19
  exports.WorkflowsCreateWorkflowPayloadV2FromJSONTyped = WorkflowsCreateWorkflowPayloadV2FromJSONTyped;
@@ -24,6 +24,13 @@ const StepConfigPayloadV2_js_1 = require("./StepConfigPayloadV2.js");
24
24
  const WorkflowFormFieldPayloadV2_js_1 = require("./WorkflowFormFieldPayloadV2.js");
25
25
  const WorkflowDelayV2_js_1 = require("./WorkflowDelayV2.js");
26
26
  const ConditionGroupPayloadV2_js_1 = require("./ConditionGroupPayloadV2.js");
27
+ /**
28
+ * @export
29
+ */
30
+ exports.WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum = {
31
+ RunAutomatically: 'run_automatically',
32
+ ConfirmBeforeRunning: 'confirm_before_running',
33
+ };
27
34
  /**
28
35
  * @export
29
36
  */
@@ -89,6 +96,7 @@ function WorkflowsCreateWorkflowPayloadV2FromJSONTyped(json, ignoreDiscriminator
89
96
  }
90
97
  return {
91
98
  'annotations': json['annotations'] == null ? undefined : json['annotations'],
99
+ 'auto_run_mode': json['auto_run_mode'] == null ? undefined : json['auto_run_mode'],
92
100
  'condition_groups': (json['condition_groups'].map(ConditionGroupPayloadV2_js_1.ConditionGroupPayloadV2FromJSON)),
93
101
  'continue_on_step_error': json['continue_on_step_error'],
94
102
  'delay': json['delay'] == null ? undefined : (0, WorkflowDelayV2_js_1.WorkflowDelayV2FromJSON)(json['delay']),
@@ -118,6 +126,7 @@ function WorkflowsCreateWorkflowPayloadV2ToJSONTyped(value, ignoreDiscriminator
118
126
  }
119
127
  return {
120
128
  'annotations': value['annotations'],
129
+ 'auto_run_mode': value['auto_run_mode'],
121
130
  'condition_groups': (value['condition_groups'].map(ConditionGroupPayloadV2_js_1.ConditionGroupPayloadV2ToJSON)),
122
131
  'continue_on_step_error': value['continue_on_step_error'],
123
132
  'delay': (0, WorkflowDelayV2_js_1.WorkflowDelayV2ToJSON)(value['delay']),
@@ -26,6 +26,10 @@ export interface WorkflowsUpdateWorkflowPayloadV2 {
26
26
  annotations?: {
27
27
  [key: string]: string;
28
28
  };
29
+ /**
30
+ * Whether the workflow runs immediately, or asks for confirmation in the incident channel first. Defaults to `run_automatically` on create. If omitted on update, the workflow keeps its current mode.
31
+ */
32
+ auto_run_mode?: WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum;
29
33
  /**
30
34
  * Conditions that apply to the workflow trigger
31
35
  */
@@ -47,7 +51,7 @@ export interface WorkflowsUpdateWorkflowPayloadV2 {
47
51
  */
48
52
  folder?: string;
49
53
  /**
50
- * User-configured form fields available in the workflow scope (manual triggers only)
54
+ * User-configured form fields available in the workflow scope. Allowed on manually-triggered workflows, and on workflows with an `auto_run_mode` of `confirm_before_running`.
51
55
  */
52
56
  form_fields?: Array<WorkflowFormFieldPayloadV2>;
53
57
  /**
@@ -99,6 +103,14 @@ export interface WorkflowsUpdateWorkflowPayloadV2 {
99
103
  */
100
104
  steps: Array<StepConfigPayloadV2>;
101
105
  }
106
+ /**
107
+ * @export
108
+ */
109
+ export declare const WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum: {
110
+ readonly RunAutomatically: "run_automatically";
111
+ readonly ConfirmBeforeRunning: "confirm_before_running";
112
+ };
113
+ export type WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum = typeof WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum[keyof typeof WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum];
102
114
  /**
103
115
  * @export
104
116
  */
@@ -13,7 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.WorkflowsUpdateWorkflowPayloadV2StateEnum = exports.WorkflowsUpdateWorkflowPayloadV2RunsOnIncidentsEnum = exports.WorkflowsUpdateWorkflowPayloadV2RunsOnIncidentModesEnum = exports.WorkflowsUpdateWorkflowPayloadV2PrivateIncidentScopeEnum = void 0;
16
+ exports.WorkflowsUpdateWorkflowPayloadV2StateEnum = exports.WorkflowsUpdateWorkflowPayloadV2RunsOnIncidentsEnum = exports.WorkflowsUpdateWorkflowPayloadV2RunsOnIncidentModesEnum = exports.WorkflowsUpdateWorkflowPayloadV2PrivateIncidentScopeEnum = exports.WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum = void 0;
17
17
  exports.instanceOfWorkflowsUpdateWorkflowPayloadV2 = instanceOfWorkflowsUpdateWorkflowPayloadV2;
18
18
  exports.WorkflowsUpdateWorkflowPayloadV2FromJSON = WorkflowsUpdateWorkflowPayloadV2FromJSON;
19
19
  exports.WorkflowsUpdateWorkflowPayloadV2FromJSONTyped = WorkflowsUpdateWorkflowPayloadV2FromJSONTyped;
@@ -24,6 +24,13 @@ const StepConfigPayloadV2_js_1 = require("./StepConfigPayloadV2.js");
24
24
  const WorkflowFormFieldPayloadV2_js_1 = require("./WorkflowFormFieldPayloadV2.js");
25
25
  const WorkflowDelayV2_js_1 = require("./WorkflowDelayV2.js");
26
26
  const ConditionGroupPayloadV2_js_1 = require("./ConditionGroupPayloadV2.js");
27
+ /**
28
+ * @export
29
+ */
30
+ exports.WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum = {
31
+ RunAutomatically: 'run_automatically',
32
+ ConfirmBeforeRunning: 'confirm_before_running',
33
+ };
27
34
  /**
28
35
  * @export
29
36
  */
@@ -87,6 +94,7 @@ function WorkflowsUpdateWorkflowPayloadV2FromJSONTyped(json, ignoreDiscriminator
87
94
  }
88
95
  return {
89
96
  'annotations': json['annotations'] == null ? undefined : json['annotations'],
97
+ 'auto_run_mode': json['auto_run_mode'] == null ? undefined : json['auto_run_mode'],
90
98
  'condition_groups': (json['condition_groups'].map(ConditionGroupPayloadV2_js_1.ConditionGroupPayloadV2FromJSON)),
91
99
  'continue_on_step_error': json['continue_on_step_error'],
92
100
  'delay': json['delay'] == null ? undefined : (0, WorkflowDelayV2_js_1.WorkflowDelayV2FromJSON)(json['delay']),
@@ -116,6 +124,7 @@ function WorkflowsUpdateWorkflowPayloadV2ToJSONTyped(value, ignoreDiscriminator
116
124
  }
117
125
  return {
118
126
  'annotations': value['annotations'],
127
+ 'auto_run_mode': value['auto_run_mode'],
119
128
  'condition_groups': (value['condition_groups'].map(ConditionGroupPayloadV2_js_1.ConditionGroupPayloadV2ToJSON)),
120
129
  'continue_on_step_error': value['continue_on_step_error'],
121
130
  'delay': (0, WorkflowDelayV2_js_1.WorkflowDelayV2ToJSON)(value['delay']),
@@ -1 +1 @@
1
- export declare const VERSION = "2.10.0";
1
+ export declare const VERSION = "2.11.0";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Written by `make build` from package.json. Do not edit.
5
- exports.VERSION = "2.10.0";
5
+ exports.VERSION = "2.11.0";
@@ -21,6 +21,10 @@ import type { TriggerSlimV2 } from './TriggerSlimV2.js';
21
21
  * @interface WorkflowSlimV2
22
22
  */
23
23
  export interface WorkflowSlimV2 {
24
+ /**
25
+ * Whether the workflow is configured to run immediately or ask for confirmation in the incident channel
26
+ */
27
+ auto_run_mode: WorkflowSlimV2AutoRunModeEnum;
24
28
  /**
25
29
  * Conditions that apply to the workflow trigger
26
30
  */
@@ -102,6 +106,14 @@ export interface WorkflowSlimV2 {
102
106
  */
103
107
  version: number;
104
108
  }
109
+ /**
110
+ * @export
111
+ */
112
+ export declare const WorkflowSlimV2AutoRunModeEnum: {
113
+ readonly RunAutomatically: "run_automatically";
114
+ readonly ConfirmBeforeRunning: "confirm_before_running";
115
+ };
116
+ export type WorkflowSlimV2AutoRunModeEnum = typeof WorkflowSlimV2AutoRunModeEnum[keyof typeof WorkflowSlimV2AutoRunModeEnum];
105
117
  /**
106
118
  * @export
107
119
  */
@@ -18,6 +18,13 @@ import { WorkflowDelayV2FromJSON, WorkflowDelayV2ToJSON, } from './WorkflowDelay
18
18
  import { ConditionGroupV2FromJSON, ConditionGroupV2ToJSON, } from './ConditionGroupV2.js';
19
19
  import { EngineReferenceV2FromJSON, EngineReferenceV2ToJSON, } from './EngineReferenceV2.js';
20
20
  import { TriggerSlimV2FromJSON, TriggerSlimV2ToJSON, } from './TriggerSlimV2.js';
21
+ /**
22
+ * @export
23
+ */
24
+ export const WorkflowSlimV2AutoRunModeEnum = {
25
+ RunAutomatically: 'run_automatically',
26
+ ConfirmBeforeRunning: 'confirm_before_running',
27
+ };
21
28
  /**
22
29
  * @export
23
30
  */
@@ -54,6 +61,8 @@ export const WorkflowSlimV2StateEnum = {
54
61
  * Check if a given object implements the WorkflowSlimV2 interface.
55
62
  */
56
63
  export function instanceOfWorkflowSlimV2(value) {
64
+ if (!('auto_run_mode' in value) || value['auto_run_mode'] === undefined)
65
+ return false;
57
66
  if (!('condition_groups' in value) || value['condition_groups'] === undefined)
58
67
  return false;
59
68
  if (!('continue_on_step_error' in value) || value['continue_on_step_error'] === undefined)
@@ -94,6 +103,7 @@ export function WorkflowSlimV2FromJSONTyped(json, ignoreDiscriminator) {
94
103
  return json;
95
104
  }
96
105
  return {
106
+ 'auto_run_mode': json['auto_run_mode'],
97
107
  'condition_groups': (json['condition_groups'].map(ConditionGroupV2FromJSON)),
98
108
  'continue_on_step_error': json['continue_on_step_error'],
99
109
  'delay': json['delay'] == null ? undefined : WorkflowDelayV2FromJSON(json['delay']),
@@ -124,6 +134,7 @@ export function WorkflowSlimV2ToJSONTyped(value, ignoreDiscriminator = false) {
124
134
  return value;
125
135
  }
126
136
  return {
137
+ 'auto_run_mode': value['auto_run_mode'],
127
138
  'condition_groups': (value['condition_groups'].map(ConditionGroupV2ToJSON)),
128
139
  'continue_on_step_error': value['continue_on_step_error'],
129
140
  'delay': WorkflowDelayV2ToJSON(value['delay']),
@@ -22,6 +22,10 @@ import type { TriggerSlimV2 } from './TriggerSlimV2.js';
22
22
  * @interface WorkflowV2
23
23
  */
24
24
  export interface WorkflowV2 {
25
+ /**
26
+ * Whether the workflow is configured to run immediately or ask for confirmation in the incident channel
27
+ */
28
+ auto_run_mode: WorkflowV2AutoRunModeEnum;
25
29
  /**
26
30
  * Conditions that apply to the workflow trigger
27
31
  */
@@ -43,7 +47,7 @@ export interface WorkflowV2 {
43
47
  */
44
48
  folder?: string;
45
49
  /**
46
- * User-configured form fields available in the workflow scope (manual triggers only)
50
+ * User-configured form fields available in the workflow scope. Allowed on manually-triggered workflows, and on workflows with an `auto_run_mode` of `confirm_before_running`.
47
51
  */
48
52
  form_fields?: Array<WorkflowFormFieldV2>;
49
53
  /**
@@ -107,6 +111,14 @@ export interface WorkflowV2 {
107
111
  */
108
112
  version: number;
109
113
  }
114
+ /**
115
+ * @export
116
+ */
117
+ export declare const WorkflowV2AutoRunModeEnum: {
118
+ readonly RunAutomatically: "run_automatically";
119
+ readonly ConfirmBeforeRunning: "confirm_before_running";
120
+ };
121
+ export type WorkflowV2AutoRunModeEnum = typeof WorkflowV2AutoRunModeEnum[keyof typeof WorkflowV2AutoRunModeEnum];
110
122
  /**
111
123
  * @export
112
124
  */
@@ -19,6 +19,13 @@ import { WorkflowDelayV2FromJSON, WorkflowDelayV2ToJSON, } from './WorkflowDelay
19
19
  import { ConditionGroupV2FromJSON, ConditionGroupV2ToJSON, } from './ConditionGroupV2.js';
20
20
  import { EngineReferenceV2FromJSON, EngineReferenceV2ToJSON, } from './EngineReferenceV2.js';
21
21
  import { TriggerSlimV2FromJSON, TriggerSlimV2ToJSON, } from './TriggerSlimV2.js';
22
+ /**
23
+ * @export
24
+ */
25
+ export const WorkflowV2AutoRunModeEnum = {
26
+ RunAutomatically: 'run_automatically',
27
+ ConfirmBeforeRunning: 'confirm_before_running',
28
+ };
22
29
  /**
23
30
  * @export
24
31
  */
@@ -55,6 +62,8 @@ export const WorkflowV2StateEnum = {
55
62
  * Check if a given object implements the WorkflowV2 interface.
56
63
  */
57
64
  export function instanceOfWorkflowV2(value) {
65
+ if (!('auto_run_mode' in value) || value['auto_run_mode'] === undefined)
66
+ return false;
58
67
  if (!('condition_groups' in value) || value['condition_groups'] === undefined)
59
68
  return false;
60
69
  if (!('continue_on_step_error' in value) || value['continue_on_step_error'] === undefined)
@@ -95,6 +104,7 @@ export function WorkflowV2FromJSONTyped(json, ignoreDiscriminator) {
95
104
  return json;
96
105
  }
97
106
  return {
107
+ 'auto_run_mode': json['auto_run_mode'],
98
108
  'condition_groups': (json['condition_groups'].map(ConditionGroupV2FromJSON)),
99
109
  'continue_on_step_error': json['continue_on_step_error'],
100
110
  'delay': json['delay'] == null ? undefined : WorkflowDelayV2FromJSON(json['delay']),
@@ -126,6 +136,7 @@ export function WorkflowV2ToJSONTyped(value, ignoreDiscriminator = false) {
126
136
  return value;
127
137
  }
128
138
  return {
139
+ 'auto_run_mode': value['auto_run_mode'],
129
140
  'condition_groups': (value['condition_groups'].map(ConditionGroupV2ToJSON)),
130
141
  'continue_on_step_error': value['continue_on_step_error'],
131
142
  'delay': WorkflowDelayV2ToJSON(value['delay']),
@@ -26,6 +26,10 @@ export interface WorkflowsCreateWorkflowPayloadV2 {
26
26
  annotations?: {
27
27
  [key: string]: string;
28
28
  };
29
+ /**
30
+ * Whether the workflow runs immediately, or asks for confirmation in the incident channel first. Defaults to `run_automatically` on create. If omitted on update, the workflow keeps its current mode.
31
+ */
32
+ auto_run_mode?: WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum;
29
33
  /**
30
34
  * Conditions that apply to the workflow trigger
31
35
  */
@@ -47,7 +51,7 @@ export interface WorkflowsCreateWorkflowPayloadV2 {
47
51
  */
48
52
  folder?: string;
49
53
  /**
50
- * User-configured form fields available in the workflow scope (manual triggers only)
54
+ * User-configured form fields available in the workflow scope. Allowed on manually-triggered workflows, and on workflows with an `auto_run_mode` of `confirm_before_running`.
51
55
  */
52
56
  form_fields?: Array<WorkflowFormFieldPayloadV2>;
53
57
  /**
@@ -99,6 +103,14 @@ export interface WorkflowsCreateWorkflowPayloadV2 {
99
103
  */
100
104
  trigger: string;
101
105
  }
106
+ /**
107
+ * @export
108
+ */
109
+ export declare const WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum: {
110
+ readonly RunAutomatically: "run_automatically";
111
+ readonly ConfirmBeforeRunning: "confirm_before_running";
112
+ };
113
+ export type WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum = typeof WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum[keyof typeof WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum];
102
114
  /**
103
115
  * @export
104
116
  */
@@ -16,6 +16,13 @@ import { StepConfigPayloadV2FromJSON, StepConfigPayloadV2ToJSON, } from './StepC
16
16
  import { WorkflowFormFieldPayloadV2FromJSON, WorkflowFormFieldPayloadV2ToJSON, } from './WorkflowFormFieldPayloadV2.js';
17
17
  import { WorkflowDelayV2FromJSON, WorkflowDelayV2ToJSON, } from './WorkflowDelayV2.js';
18
18
  import { ConditionGroupPayloadV2FromJSON, ConditionGroupPayloadV2ToJSON, } from './ConditionGroupPayloadV2.js';
19
+ /**
20
+ * @export
21
+ */
22
+ export const WorkflowsCreateWorkflowPayloadV2AutoRunModeEnum = {
23
+ RunAutomatically: 'run_automatically',
24
+ ConfirmBeforeRunning: 'confirm_before_running',
25
+ };
19
26
  /**
20
27
  * @export
21
28
  */
@@ -81,6 +88,7 @@ export function WorkflowsCreateWorkflowPayloadV2FromJSONTyped(json, ignoreDiscri
81
88
  }
82
89
  return {
83
90
  'annotations': json['annotations'] == null ? undefined : json['annotations'],
91
+ 'auto_run_mode': json['auto_run_mode'] == null ? undefined : json['auto_run_mode'],
84
92
  'condition_groups': (json['condition_groups'].map(ConditionGroupPayloadV2FromJSON)),
85
93
  'continue_on_step_error': json['continue_on_step_error'],
86
94
  'delay': json['delay'] == null ? undefined : WorkflowDelayV2FromJSON(json['delay']),
@@ -110,6 +118,7 @@ export function WorkflowsCreateWorkflowPayloadV2ToJSONTyped(value, ignoreDiscrim
110
118
  }
111
119
  return {
112
120
  'annotations': value['annotations'],
121
+ 'auto_run_mode': value['auto_run_mode'],
113
122
  'condition_groups': (value['condition_groups'].map(ConditionGroupPayloadV2ToJSON)),
114
123
  'continue_on_step_error': value['continue_on_step_error'],
115
124
  'delay': WorkflowDelayV2ToJSON(value['delay']),
@@ -26,6 +26,10 @@ export interface WorkflowsUpdateWorkflowPayloadV2 {
26
26
  annotations?: {
27
27
  [key: string]: string;
28
28
  };
29
+ /**
30
+ * Whether the workflow runs immediately, or asks for confirmation in the incident channel first. Defaults to `run_automatically` on create. If omitted on update, the workflow keeps its current mode.
31
+ */
32
+ auto_run_mode?: WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum;
29
33
  /**
30
34
  * Conditions that apply to the workflow trigger
31
35
  */
@@ -47,7 +51,7 @@ export interface WorkflowsUpdateWorkflowPayloadV2 {
47
51
  */
48
52
  folder?: string;
49
53
  /**
50
- * User-configured form fields available in the workflow scope (manual triggers only)
54
+ * User-configured form fields available in the workflow scope. Allowed on manually-triggered workflows, and on workflows with an `auto_run_mode` of `confirm_before_running`.
51
55
  */
52
56
  form_fields?: Array<WorkflowFormFieldPayloadV2>;
53
57
  /**
@@ -99,6 +103,14 @@ export interface WorkflowsUpdateWorkflowPayloadV2 {
99
103
  */
100
104
  steps: Array<StepConfigPayloadV2>;
101
105
  }
106
+ /**
107
+ * @export
108
+ */
109
+ export declare const WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum: {
110
+ readonly RunAutomatically: "run_automatically";
111
+ readonly ConfirmBeforeRunning: "confirm_before_running";
112
+ };
113
+ export type WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum = typeof WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum[keyof typeof WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum];
102
114
  /**
103
115
  * @export
104
116
  */
@@ -16,6 +16,13 @@ import { StepConfigPayloadV2FromJSON, StepConfigPayloadV2ToJSON, } from './StepC
16
16
  import { WorkflowFormFieldPayloadV2FromJSON, WorkflowFormFieldPayloadV2ToJSON, } from './WorkflowFormFieldPayloadV2.js';
17
17
  import { WorkflowDelayV2FromJSON, WorkflowDelayV2ToJSON, } from './WorkflowDelayV2.js';
18
18
  import { ConditionGroupPayloadV2FromJSON, ConditionGroupPayloadV2ToJSON, } from './ConditionGroupPayloadV2.js';
19
+ /**
20
+ * @export
21
+ */
22
+ export const WorkflowsUpdateWorkflowPayloadV2AutoRunModeEnum = {
23
+ RunAutomatically: 'run_automatically',
24
+ ConfirmBeforeRunning: 'confirm_before_running',
25
+ };
19
26
  /**
20
27
  * @export
21
28
  */
@@ -79,6 +86,7 @@ export function WorkflowsUpdateWorkflowPayloadV2FromJSONTyped(json, ignoreDiscri
79
86
  }
80
87
  return {
81
88
  'annotations': json['annotations'] == null ? undefined : json['annotations'],
89
+ 'auto_run_mode': json['auto_run_mode'] == null ? undefined : json['auto_run_mode'],
82
90
  'condition_groups': (json['condition_groups'].map(ConditionGroupPayloadV2FromJSON)),
83
91
  'continue_on_step_error': json['continue_on_step_error'],
84
92
  'delay': json['delay'] == null ? undefined : WorkflowDelayV2FromJSON(json['delay']),
@@ -108,6 +116,7 @@ export function WorkflowsUpdateWorkflowPayloadV2ToJSONTyped(value, ignoreDiscrim
108
116
  }
109
117
  return {
110
118
  'annotations': value['annotations'],
119
+ 'auto_run_mode': value['auto_run_mode'],
111
120
  'condition_groups': (value['condition_groups'].map(ConditionGroupPayloadV2ToJSON)),
112
121
  'continue_on_step_error': value['continue_on_step_error'],
113
122
  'delay': WorkflowDelayV2ToJSON(value['delay']),
@@ -1 +1 @@
1
- export declare const VERSION = "2.10.0";
1
+ export declare const VERSION = "2.11.0";
@@ -1,2 +1,2 @@
1
1
  // Written by `make build` from package.json. Do not edit.
2
- export const VERSION = "2.10.0";
2
+ export const VERSION = "2.11.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incident-io/sdk",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "TypeScript SDK for the incident.io API",
5
5
  "license": "MIT",
6
6
  "author": "incident.io <support@incident.io>",