@incident-io/sdk 2.9.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.
Files changed (73) hide show
  1. package/dist/cjs/apis/IncidentFormsV3Api.d.ts +131 -0
  2. package/dist/cjs/apis/IncidentFormsV3Api.js +279 -0
  3. package/dist/cjs/apis/index.d.ts +1 -0
  4. package/dist/cjs/apis/index.js +1 -0
  5. package/dist/cjs/models/IncidentFormLifecycleElementConfigV3.d.ts +30 -0
  6. package/dist/cjs/models/IncidentFormLifecycleElementConfigV3.js +48 -0
  7. package/dist/cjs/models/IncidentFormLifecycleElementPayloadV3.d.ts +115 -0
  8. package/dist/cjs/models/IncidentFormLifecycleElementPayloadV3.js +110 -0
  9. package/dist/cjs/models/IncidentFormLifecycleElementV3.d.ts +115 -0
  10. package/dist/cjs/models/IncidentFormLifecycleElementV3.js +110 -0
  11. package/dist/cjs/models/IncidentFormV3.d.ts +68 -0
  12. package/dist/cjs/models/IncidentFormV3.js +85 -0
  13. package/dist/cjs/models/IncidentFormsCreatePayloadV3.d.ts +56 -0
  14. package/dist/cjs/models/IncidentFormsCreatePayloadV3.js +72 -0
  15. package/dist/cjs/models/IncidentFormsCreateResultV3.d.ts +31 -0
  16. package/dist/cjs/models/IncidentFormsCreateResultV3.js +51 -0
  17. package/dist/cjs/models/IncidentFormsListResultV3.d.ts +36 -0
  18. package/dist/cjs/models/IncidentFormsListResultV3.js +56 -0
  19. package/dist/cjs/models/IncidentFormsShowResultV3.d.ts +31 -0
  20. package/dist/cjs/models/IncidentFormsShowResultV3.js +51 -0
  21. package/dist/cjs/models/IncidentFormsUpdatePayloadV3.d.ts +56 -0
  22. package/dist/cjs/models/IncidentFormsUpdatePayloadV3.js +72 -0
  23. package/dist/cjs/models/IncidentFormsUpdateResultV3.d.ts +31 -0
  24. package/dist/cjs/models/IncidentFormsUpdateResultV3.js +51 -0
  25. package/dist/cjs/models/WorkflowSlimV2.d.ts +12 -0
  26. package/dist/cjs/models/WorkflowSlimV2.js +12 -1
  27. package/dist/cjs/models/WorkflowV2.d.ts +13 -1
  28. package/dist/cjs/models/WorkflowV2.js +12 -1
  29. package/dist/cjs/models/WorkflowsCreateWorkflowPayloadV2.d.ts +13 -1
  30. package/dist/cjs/models/WorkflowsCreateWorkflowPayloadV2.js +10 -1
  31. package/dist/cjs/models/WorkflowsUpdateWorkflowPayloadV2.d.ts +13 -1
  32. package/dist/cjs/models/WorkflowsUpdateWorkflowPayloadV2.js +10 -1
  33. package/dist/cjs/models/index.d.ts +10 -0
  34. package/dist/cjs/models/index.js +10 -0
  35. package/dist/cjs/version.d.ts +1 -1
  36. package/dist/cjs/version.js +1 -1
  37. package/dist/esm/apis/IncidentFormsV3Api.d.ts +131 -0
  38. package/dist/esm/apis/IncidentFormsV3Api.js +242 -0
  39. package/dist/esm/apis/index.d.ts +1 -0
  40. package/dist/esm/apis/index.js +1 -0
  41. package/dist/esm/models/IncidentFormLifecycleElementConfigV3.d.ts +30 -0
  42. package/dist/esm/models/IncidentFormLifecycleElementConfigV3.js +41 -0
  43. package/dist/esm/models/IncidentFormLifecycleElementPayloadV3.d.ts +115 -0
  44. package/dist/esm/models/IncidentFormLifecycleElementPayloadV3.js +102 -0
  45. package/dist/esm/models/IncidentFormLifecycleElementV3.d.ts +115 -0
  46. package/dist/esm/models/IncidentFormLifecycleElementV3.js +102 -0
  47. package/dist/esm/models/IncidentFormV3.d.ts +68 -0
  48. package/dist/esm/models/IncidentFormV3.js +77 -0
  49. package/dist/esm/models/IncidentFormsCreatePayloadV3.d.ts +56 -0
  50. package/dist/esm/models/IncidentFormsCreatePayloadV3.js +64 -0
  51. package/dist/esm/models/IncidentFormsCreateResultV3.d.ts +31 -0
  52. package/dist/esm/models/IncidentFormsCreateResultV3.js +44 -0
  53. package/dist/esm/models/IncidentFormsListResultV3.d.ts +36 -0
  54. package/dist/esm/models/IncidentFormsListResultV3.js +49 -0
  55. package/dist/esm/models/IncidentFormsShowResultV3.d.ts +31 -0
  56. package/dist/esm/models/IncidentFormsShowResultV3.js +44 -0
  57. package/dist/esm/models/IncidentFormsUpdatePayloadV3.d.ts +56 -0
  58. package/dist/esm/models/IncidentFormsUpdatePayloadV3.js +64 -0
  59. package/dist/esm/models/IncidentFormsUpdateResultV3.d.ts +31 -0
  60. package/dist/esm/models/IncidentFormsUpdateResultV3.js +44 -0
  61. package/dist/esm/models/WorkflowSlimV2.d.ts +12 -0
  62. package/dist/esm/models/WorkflowSlimV2.js +11 -0
  63. package/dist/esm/models/WorkflowV2.d.ts +13 -1
  64. package/dist/esm/models/WorkflowV2.js +11 -0
  65. package/dist/esm/models/WorkflowsCreateWorkflowPayloadV2.d.ts +13 -1
  66. package/dist/esm/models/WorkflowsCreateWorkflowPayloadV2.js +9 -0
  67. package/dist/esm/models/WorkflowsUpdateWorkflowPayloadV2.d.ts +13 -1
  68. package/dist/esm/models/WorkflowsUpdateWorkflowPayloadV2.js +9 -0
  69. package/dist/esm/models/index.d.ts +10 -0
  70. package/dist/esm/models/index.js +10 -0
  71. package/dist/esm/version.d.ts +1 -1
  72. package/dist/esm/version.js +1 -1
  73. package/package.json +1 -1
@@ -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']),
@@ -754,6 +754,16 @@ export * from './IncidentDebriefV2.js';
754
754
  export * from './IncidentDurationMetricV2.js';
755
755
  export * from './IncidentDurationMetricWithValueV2.js';
756
756
  export * from './IncidentEditPayloadV2.js';
757
+ export * from './IncidentFormLifecycleElementConfigV3.js';
758
+ export * from './IncidentFormLifecycleElementPayloadV3.js';
759
+ export * from './IncidentFormLifecycleElementV3.js';
760
+ export * from './IncidentFormV3.js';
761
+ export * from './IncidentFormsCreatePayloadV3.js';
762
+ export * from './IncidentFormsCreateResultV3.js';
763
+ export * from './IncidentFormsListResultV3.js';
764
+ export * from './IncidentFormsShowResultV3.js';
765
+ export * from './IncidentFormsUpdatePayloadV3.js';
766
+ export * from './IncidentFormsUpdateResultV3.js';
757
767
  export * from './IncidentMembershipV1.js';
758
768
  export * from './IncidentMembershipsCreatePayloadV1.js';
759
769
  export * from './IncidentMembershipsCreateResultV1.js';
@@ -772,6 +772,16 @@ __exportStar(require("./IncidentDebriefV2.js"), exports);
772
772
  __exportStar(require("./IncidentDurationMetricV2.js"), exports);
773
773
  __exportStar(require("./IncidentDurationMetricWithValueV2.js"), exports);
774
774
  __exportStar(require("./IncidentEditPayloadV2.js"), exports);
775
+ __exportStar(require("./IncidentFormLifecycleElementConfigV3.js"), exports);
776
+ __exportStar(require("./IncidentFormLifecycleElementPayloadV3.js"), exports);
777
+ __exportStar(require("./IncidentFormLifecycleElementV3.js"), exports);
778
+ __exportStar(require("./IncidentFormV3.js"), exports);
779
+ __exportStar(require("./IncidentFormsCreatePayloadV3.js"), exports);
780
+ __exportStar(require("./IncidentFormsCreateResultV3.js"), exports);
781
+ __exportStar(require("./IncidentFormsListResultV3.js"), exports);
782
+ __exportStar(require("./IncidentFormsShowResultV3.js"), exports);
783
+ __exportStar(require("./IncidentFormsUpdatePayloadV3.js"), exports);
784
+ __exportStar(require("./IncidentFormsUpdateResultV3.js"), exports);
775
785
  __exportStar(require("./IncidentMembershipV1.js"), exports);
776
786
  __exportStar(require("./IncidentMembershipsCreatePayloadV1.js"), exports);
777
787
  __exportStar(require("./IncidentMembershipsCreateResultV1.js"), exports);
@@ -1 +1 @@
1
- export declare const VERSION = "2.9.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.9.0";
5
+ exports.VERSION = "2.11.0";
@@ -0,0 +1,131 @@
1
+ /**
2
+ * incident.io
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime.js';
13
+ import { type IncidentFormsCreatePayloadV3 } from '../models/IncidentFormsCreatePayloadV3.js';
14
+ import { type IncidentFormsCreateResultV3 } from '../models/IncidentFormsCreateResultV3.js';
15
+ import { type IncidentFormsListResultV3 } from '../models/IncidentFormsListResultV3.js';
16
+ import { type IncidentFormsShowResultV3 } from '../models/IncidentFormsShowResultV3.js';
17
+ import { type IncidentFormsUpdatePayloadV3 } from '../models/IncidentFormsUpdatePayloadV3.js';
18
+ import { type IncidentFormsUpdateResultV3 } from '../models/IncidentFormsUpdateResultV3.js';
19
+ export interface IncidentFormsV3CreateRequest {
20
+ /**
21
+ *
22
+ */
23
+ body: IncidentFormsCreatePayloadV3;
24
+ }
25
+ export interface IncidentFormsV3DeleteRequest {
26
+ /**
27
+ * Unique identifier for this incident form
28
+ */
29
+ id: string;
30
+ }
31
+ export interface IncidentFormsV3ListRequest {
32
+ /**
33
+ * Integer number of records to return
34
+ */
35
+ page_size?: number;
36
+ /**
37
+ * An incident form's ID. This endpoint will return a list of forms after this ID in relation to the API response order.
38
+ */
39
+ after?: string;
40
+ }
41
+ export interface IncidentFormsV3ShowRequest {
42
+ /**
43
+ * Unique identifier for this incident form
44
+ */
45
+ id: string;
46
+ }
47
+ export interface IncidentFormsV3UpdateRequest {
48
+ /**
49
+ * Unique identifier of the incident form
50
+ */
51
+ id: string;
52
+ /**
53
+ *
54
+ */
55
+ body: IncidentFormsUpdatePayloadV3;
56
+ }
57
+ /**
58
+ *
59
+ */
60
+ export declare class IncidentFormsV3Api extends runtime.BaseAPI {
61
+ /**
62
+ * Creates request options for incidentFormsV3Create without sending the request
63
+ */
64
+ incidentFormsV3CreateRequestOpts(requestParameters: IncidentFormsV3CreateRequest): Promise<runtime.RequestOpts>;
65
+ /**
66
+ * Create an incident form for an incident type. A form that already exists for that form type and incident type is rejected.
67
+ * Create Incident Forms V3
68
+ */
69
+ incidentFormsV3CreateRaw(requestParameters: IncidentFormsV3CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentFormsCreateResultV3>>;
70
+ /**
71
+ * Create an incident form for an incident type. A form that already exists for that form type and incident type is rejected.
72
+ * Create Incident Forms V3
73
+ */
74
+ incidentFormsV3Create(requestParameters: IncidentFormsV3CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentFormsCreateResultV3>;
75
+ /**
76
+ * Creates request options for incidentFormsV3Delete without sending the request
77
+ */
78
+ incidentFormsV3DeleteRequestOpts(requestParameters: IncidentFormsV3DeleteRequest): Promise<runtime.RequestOpts>;
79
+ /**
80
+ * Archive an incident form. The organisation\'s default form of a type cannot be archived.
81
+ * Delete Incident Forms V3
82
+ */
83
+ incidentFormsV3DeleteRaw(requestParameters: IncidentFormsV3DeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
84
+ /**
85
+ * Archive an incident form. The organisation\'s default form of a type cannot be archived.
86
+ * Delete Incident Forms V3
87
+ */
88
+ incidentFormsV3Delete(requestParameters: IncidentFormsV3DeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
89
+ /**
90
+ * Creates request options for incidentFormsV3List without sending the request
91
+ */
92
+ incidentFormsV3ListRequestOpts(requestParameters: IncidentFormsV3ListRequest): Promise<runtime.RequestOpts>;
93
+ /**
94
+ * List incident forms for your account, including their elements and expressions.
95
+ * List Incident Forms V3
96
+ */
97
+ incidentFormsV3ListRaw(requestParameters: IncidentFormsV3ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentFormsListResultV3>>;
98
+ /**
99
+ * List incident forms for your account, including their elements and expressions.
100
+ * List Incident Forms V3
101
+ */
102
+ incidentFormsV3List(requestParameters?: IncidentFormsV3ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentFormsListResultV3>;
103
+ /**
104
+ * Creates request options for incidentFormsV3Show without sending the request
105
+ */
106
+ incidentFormsV3ShowRequestOpts(requestParameters: IncidentFormsV3ShowRequest): Promise<runtime.RequestOpts>;
107
+ /**
108
+ * Get a single incident form, including its elements and expressions.
109
+ * Show Incident Forms V3
110
+ */
111
+ incidentFormsV3ShowRaw(requestParameters: IncidentFormsV3ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentFormsShowResultV3>>;
112
+ /**
113
+ * Get a single incident form, including its elements and expressions.
114
+ * Show Incident Forms V3
115
+ */
116
+ incidentFormsV3Show(requestParameters: IncidentFormsV3ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentFormsShowResultV3>;
117
+ /**
118
+ * Creates request options for incidentFormsV3Update without sending the request
119
+ */
120
+ incidentFormsV3UpdateRequestOpts(requestParameters: IncidentFormsV3UpdateRequest): Promise<runtime.RequestOpts>;
121
+ /**
122
+ * Replace an incident form, including its elements and expressions.
123
+ * Update Incident Forms V3
124
+ */
125
+ incidentFormsV3UpdateRaw(requestParameters: IncidentFormsV3UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<IncidentFormsUpdateResultV3>>;
126
+ /**
127
+ * Replace an incident form, including its elements and expressions.
128
+ * Update Incident Forms V3
129
+ */
130
+ incidentFormsV3Update(requestParameters: IncidentFormsV3UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IncidentFormsUpdateResultV3>;
131
+ }
@@ -0,0 +1,242 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * incident.io
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import * as runtime from '../runtime.js';
15
+ import { IncidentFormsCreatePayloadV3ToJSON, } from '../models/IncidentFormsCreatePayloadV3.js';
16
+ import { IncidentFormsCreateResultV3FromJSON, } from '../models/IncidentFormsCreateResultV3.js';
17
+ import { IncidentFormsListResultV3FromJSON, } from '../models/IncidentFormsListResultV3.js';
18
+ import { IncidentFormsShowResultV3FromJSON, } from '../models/IncidentFormsShowResultV3.js';
19
+ import { IncidentFormsUpdatePayloadV3ToJSON, } from '../models/IncidentFormsUpdatePayloadV3.js';
20
+ import { IncidentFormsUpdateResultV3FromJSON, } from '../models/IncidentFormsUpdateResultV3.js';
21
+ /**
22
+ *
23
+ */
24
+ export class IncidentFormsV3Api extends runtime.BaseAPI {
25
+ /**
26
+ * Creates request options for incidentFormsV3Create without sending the request
27
+ */
28
+ async incidentFormsV3CreateRequestOpts(requestParameters) {
29
+ if (requestParameters['body'] == null) {
30
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling incidentFormsV3Create().');
31
+ }
32
+ const queryParameters = {};
33
+ const headerParameters = {};
34
+ headerParameters['Content-Type'] = 'application/json';
35
+ if (this.configuration && this.configuration.accessToken) {
36
+ const token = this.configuration.accessToken;
37
+ const tokenString = await token("BearerAuth", []);
38
+ if (tokenString) {
39
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
40
+ }
41
+ }
42
+ let urlPath = `/v3/incident_forms`;
43
+ return {
44
+ path: urlPath,
45
+ method: 'POST',
46
+ headers: headerParameters,
47
+ query: queryParameters,
48
+ body: IncidentFormsCreatePayloadV3ToJSON(requestParameters['body']),
49
+ };
50
+ }
51
+ /**
52
+ * Create an incident form for an incident type. A form that already exists for that form type and incident type is rejected.
53
+ * Create Incident Forms V3
54
+ */
55
+ async incidentFormsV3CreateRaw(requestParameters, initOverrides) {
56
+ const requestOptions = await this.incidentFormsV3CreateRequestOpts(requestParameters);
57
+ const response = await this.request(requestOptions, initOverrides);
58
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentFormsCreateResultV3FromJSON(jsonValue));
59
+ }
60
+ /**
61
+ * Create an incident form for an incident type. A form that already exists for that form type and incident type is rejected.
62
+ * Create Incident Forms V3
63
+ */
64
+ async incidentFormsV3Create(requestParameters, initOverrides) {
65
+ const response = await this.incidentFormsV3CreateRaw(requestParameters, initOverrides);
66
+ return await response.value();
67
+ }
68
+ /**
69
+ * Creates request options for incidentFormsV3Delete without sending the request
70
+ */
71
+ async incidentFormsV3DeleteRequestOpts(requestParameters) {
72
+ if (requestParameters['id'] == null) {
73
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling incidentFormsV3Delete().');
74
+ }
75
+ const queryParameters = {};
76
+ const headerParameters = {};
77
+ if (this.configuration && this.configuration.accessToken) {
78
+ const token = this.configuration.accessToken;
79
+ const tokenString = await token("BearerAuth", []);
80
+ if (tokenString) {
81
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
82
+ }
83
+ }
84
+ let urlPath = `/v3/incident_forms/{id}`;
85
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
86
+ return {
87
+ path: urlPath,
88
+ method: 'DELETE',
89
+ headers: headerParameters,
90
+ query: queryParameters,
91
+ };
92
+ }
93
+ /**
94
+ * Archive an incident form. The organisation\'s default form of a type cannot be archived.
95
+ * Delete Incident Forms V3
96
+ */
97
+ async incidentFormsV3DeleteRaw(requestParameters, initOverrides) {
98
+ const requestOptions = await this.incidentFormsV3DeleteRequestOpts(requestParameters);
99
+ const response = await this.request(requestOptions, initOverrides);
100
+ return new runtime.VoidApiResponse(response);
101
+ }
102
+ /**
103
+ * Archive an incident form. The organisation\'s default form of a type cannot be archived.
104
+ * Delete Incident Forms V3
105
+ */
106
+ async incidentFormsV3Delete(requestParameters, initOverrides) {
107
+ await this.incidentFormsV3DeleteRaw(requestParameters, initOverrides);
108
+ }
109
+ /**
110
+ * Creates request options for incidentFormsV3List without sending the request
111
+ */
112
+ async incidentFormsV3ListRequestOpts(requestParameters) {
113
+ const queryParameters = {};
114
+ if (requestParameters['page_size'] != null) {
115
+ queryParameters['page_size'] = requestParameters['page_size'];
116
+ }
117
+ if (requestParameters['after'] != null) {
118
+ queryParameters['after'] = requestParameters['after'];
119
+ }
120
+ const headerParameters = {};
121
+ if (this.configuration && this.configuration.accessToken) {
122
+ const token = this.configuration.accessToken;
123
+ const tokenString = await token("BearerAuth", []);
124
+ if (tokenString) {
125
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
126
+ }
127
+ }
128
+ let urlPath = `/v3/incident_forms`;
129
+ return {
130
+ path: urlPath,
131
+ method: 'GET',
132
+ headers: headerParameters,
133
+ query: queryParameters,
134
+ };
135
+ }
136
+ /**
137
+ * List incident forms for your account, including their elements and expressions.
138
+ * List Incident Forms V3
139
+ */
140
+ async incidentFormsV3ListRaw(requestParameters, initOverrides) {
141
+ const requestOptions = await this.incidentFormsV3ListRequestOpts(requestParameters);
142
+ const response = await this.request(requestOptions, initOverrides);
143
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentFormsListResultV3FromJSON(jsonValue));
144
+ }
145
+ /**
146
+ * List incident forms for your account, including their elements and expressions.
147
+ * List Incident Forms V3
148
+ */
149
+ async incidentFormsV3List(requestParameters = {}, initOverrides) {
150
+ const response = await this.incidentFormsV3ListRaw(requestParameters, initOverrides);
151
+ return await response.value();
152
+ }
153
+ /**
154
+ * Creates request options for incidentFormsV3Show without sending the request
155
+ */
156
+ async incidentFormsV3ShowRequestOpts(requestParameters) {
157
+ if (requestParameters['id'] == null) {
158
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling incidentFormsV3Show().');
159
+ }
160
+ const queryParameters = {};
161
+ const headerParameters = {};
162
+ if (this.configuration && this.configuration.accessToken) {
163
+ const token = this.configuration.accessToken;
164
+ const tokenString = await token("BearerAuth", []);
165
+ if (tokenString) {
166
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
167
+ }
168
+ }
169
+ let urlPath = `/v3/incident_forms/{id}`;
170
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
171
+ return {
172
+ path: urlPath,
173
+ method: 'GET',
174
+ headers: headerParameters,
175
+ query: queryParameters,
176
+ };
177
+ }
178
+ /**
179
+ * Get a single incident form, including its elements and expressions.
180
+ * Show Incident Forms V3
181
+ */
182
+ async incidentFormsV3ShowRaw(requestParameters, initOverrides) {
183
+ const requestOptions = await this.incidentFormsV3ShowRequestOpts(requestParameters);
184
+ const response = await this.request(requestOptions, initOverrides);
185
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentFormsShowResultV3FromJSON(jsonValue));
186
+ }
187
+ /**
188
+ * Get a single incident form, including its elements and expressions.
189
+ * Show Incident Forms V3
190
+ */
191
+ async incidentFormsV3Show(requestParameters, initOverrides) {
192
+ const response = await this.incidentFormsV3ShowRaw(requestParameters, initOverrides);
193
+ return await response.value();
194
+ }
195
+ /**
196
+ * Creates request options for incidentFormsV3Update without sending the request
197
+ */
198
+ async incidentFormsV3UpdateRequestOpts(requestParameters) {
199
+ if (requestParameters['id'] == null) {
200
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling incidentFormsV3Update().');
201
+ }
202
+ if (requestParameters['body'] == null) {
203
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling incidentFormsV3Update().');
204
+ }
205
+ const queryParameters = {};
206
+ const headerParameters = {};
207
+ headerParameters['Content-Type'] = 'application/json';
208
+ if (this.configuration && this.configuration.accessToken) {
209
+ const token = this.configuration.accessToken;
210
+ const tokenString = await token("BearerAuth", []);
211
+ if (tokenString) {
212
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
213
+ }
214
+ }
215
+ let urlPath = `/v3/incident_forms/{id}`;
216
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
217
+ return {
218
+ path: urlPath,
219
+ method: 'PUT',
220
+ headers: headerParameters,
221
+ query: queryParameters,
222
+ body: IncidentFormsUpdatePayloadV3ToJSON(requestParameters['body']),
223
+ };
224
+ }
225
+ /**
226
+ * Replace an incident form, including its elements and expressions.
227
+ * Update Incident Forms V3
228
+ */
229
+ async incidentFormsV3UpdateRaw(requestParameters, initOverrides) {
230
+ const requestOptions = await this.incidentFormsV3UpdateRequestOpts(requestParameters);
231
+ const response = await this.request(requestOptions, initOverrides);
232
+ return new runtime.JSONApiResponse(response, (jsonValue) => IncidentFormsUpdateResultV3FromJSON(jsonValue));
233
+ }
234
+ /**
235
+ * Replace an incident form, including its elements and expressions.
236
+ * Update Incident Forms V3
237
+ */
238
+ async incidentFormsV3Update(requestParameters, initOverrides) {
239
+ const response = await this.incidentFormsV3UpdateRaw(requestParameters, initOverrides);
240
+ return await response.value();
241
+ }
242
+ }
@@ -27,6 +27,7 @@ export * from './HeartbeatV2Api.js';
27
27
  export * from './IPAllowlistsV1Api.js';
28
28
  export * from './IncidentActivityLogEntriesV2Api.js';
29
29
  export * from './IncidentAttachmentsV1Api.js';
30
+ export * from './IncidentFormsV3Api.js';
30
31
  export * from './IncidentMembershipsV1Api.js';
31
32
  export * from './IncidentParticipantWorkloadsV2Api.js';
32
33
  export * from './IncidentParticipantsV2Api.js';
@@ -29,6 +29,7 @@ export * from './HeartbeatV2Api.js';
29
29
  export * from './IPAllowlistsV1Api.js';
30
30
  export * from './IncidentActivityLogEntriesV2Api.js';
31
31
  export * from './IncidentAttachmentsV1Api.js';
32
+ export * from './IncidentFormsV3Api.js';
32
33
  export * from './IncidentMembershipsV1Api.js';
33
34
  export * from './IncidentParticipantWorkloadsV2Api.js';
34
35
  export * from './IncidentParticipantsV2Api.js';
@@ -0,0 +1,30 @@
1
+ /**
2
+ * incident.io
3
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface IncidentFormLifecycleElementConfigV3
16
+ */
17
+ export interface IncidentFormLifecycleElementConfigV3 {
18
+ /**
19
+ * Whether the free-text comment must be filled in, for anyone giving investigation feedback
20
+ */
21
+ require_comment?: boolean;
22
+ }
23
+ /**
24
+ * Check if a given object implements the IncidentFormLifecycleElementConfigV3 interface.
25
+ */
26
+ export declare function instanceOfIncidentFormLifecycleElementConfigV3(value: object): value is IncidentFormLifecycleElementConfigV3;
27
+ export declare function IncidentFormLifecycleElementConfigV3FromJSON(json: any): IncidentFormLifecycleElementConfigV3;
28
+ export declare function IncidentFormLifecycleElementConfigV3FromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentFormLifecycleElementConfigV3;
29
+ export declare function IncidentFormLifecycleElementConfigV3ToJSON(json: any): IncidentFormLifecycleElementConfigV3;
30
+ export declare function IncidentFormLifecycleElementConfigV3ToJSONTyped(value?: IncidentFormLifecycleElementConfigV3 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,41 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * incident.io
5
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ /**
15
+ * Check if a given object implements the IncidentFormLifecycleElementConfigV3 interface.
16
+ */
17
+ export function instanceOfIncidentFormLifecycleElementConfigV3(value) {
18
+ return true;
19
+ }
20
+ export function IncidentFormLifecycleElementConfigV3FromJSON(json) {
21
+ return IncidentFormLifecycleElementConfigV3FromJSONTyped(json, false);
22
+ }
23
+ export function IncidentFormLifecycleElementConfigV3FromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'require_comment': json['require_comment'] == null ? undefined : json['require_comment'],
29
+ };
30
+ }
31
+ export function IncidentFormLifecycleElementConfigV3ToJSON(json) {
32
+ return IncidentFormLifecycleElementConfigV3ToJSONTyped(json, false);
33
+ }
34
+ export function IncidentFormLifecycleElementConfigV3ToJSONTyped(value, ignoreDiscriminator = false) {
35
+ if (value == null) {
36
+ return value;
37
+ }
38
+ return {
39
+ 'require_comment': value['require_comment'],
40
+ };
41
+ }