@incident-io/sdk 2.22.0 → 2.24.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.
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
+ import { type IncidentsConnectExternalIssuePayloadV2 } from '../models/IncidentsConnectExternalIssuePayloadV2.js';
13
14
  import { type IncidentsCreatePayloadV2 } from '../models/IncidentsCreatePayloadV2.js';
14
15
  import { type IncidentsCreateResultV2 } from '../models/IncidentsCreateResultV2.js';
15
16
  import { type IncidentsEditPayloadV2 } from '../models/IncidentsEditPayloadV2.js';
@@ -18,6 +19,16 @@ import { type IncidentsImportPostmortemDocumentPayloadV2 } from '../models/Incid
18
19
  import { type IncidentsImportPostmortemDocumentResultV2 } from '../models/IncidentsImportPostmortemDocumentResultV2.js';
19
20
  import { type IncidentsListResultV2 } from '../models/IncidentsListResultV2.js';
20
21
  import { type IncidentsShowResultV2 } from '../models/IncidentsShowResultV2.js';
22
+ export interface IncidentsV2ConnectExternalIssueRequest {
23
+ /**
24
+ * The unique identifier of the incident
25
+ */
26
+ id: string;
27
+ /**
28
+ *
29
+ */
30
+ body: IncidentsConnectExternalIssuePayloadV2;
31
+ }
21
32
  export interface IncidentsV2CreateRequest {
22
33
  /**
23
34
  *
@@ -130,6 +141,20 @@ export interface IncidentsV2ShowRequest {
130
141
  *
131
142
  */
132
143
  export declare class IncidentsV2Api extends runtime.BaseAPI {
144
+ /**
145
+ * Creates request options for incidentsV2ConnectExternalIssue without sending the request
146
+ */
147
+ incidentsV2ConnectExternalIssueRequestOpts(requestParameters: IncidentsV2ConnectExternalIssueRequest): Promise<runtime.RequestOpts>;
148
+ /**
149
+ * Connect an existing issue in an issue tracker to an incident, as its external issue. The issue is synced using the given incident ticket template, as if incident.io had created it from that template. The next sync writes the incident\'s fields into the issue. This works whether or not automatic incident ticket creation is turned on. While it is off, no tickets are created for other incidents, and the incident\'s fields are not written into this issue until it is turned on. This needs the incidents.connect_external_issue scope, either across the organisation or from an incident role on this incident. This fails if the incident already has a different external issue (unless replace is true), or if the issue is already linked to another incident or follow-up. The ID supplied can be either the incident\'s full ID, or the numeric part of its reference.
150
+ * ConnectExternalIssue Incidents V2
151
+ */
152
+ incidentsV2ConnectExternalIssueRaw(requestParameters: IncidentsV2ConnectExternalIssueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
153
+ /**
154
+ * Connect an existing issue in an issue tracker to an incident, as its external issue. The issue is synced using the given incident ticket template, as if incident.io had created it from that template. The next sync writes the incident\'s fields into the issue. This works whether or not automatic incident ticket creation is turned on. While it is off, no tickets are created for other incidents, and the incident\'s fields are not written into this issue until it is turned on. This needs the incidents.connect_external_issue scope, either across the organisation or from an incident role on this incident. This fails if the incident already has a different external issue (unless replace is true), or if the issue is already linked to another incident or follow-up. The ID supplied can be either the incident\'s full ID, or the numeric part of its reference.
155
+ * ConnectExternalIssue Incidents V2
156
+ */
157
+ incidentsV2ConnectExternalIssue(requestParameters: IncidentsV2ConnectExternalIssueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
133
158
  /**
134
159
  * Creates request options for incidentsV2Create without sending the request
135
160
  */
@@ -48,6 +48,7 @@ var __importStar = (this && this.__importStar) || (function () {
48
48
  Object.defineProperty(exports, "__esModule", { value: true });
49
49
  exports.IncidentsV2ListFilterModeEnum = exports.IncidentsV2ListSortByEnum = exports.IncidentsV2Api = void 0;
50
50
  const runtime = __importStar(require("../runtime.js"));
51
+ const IncidentsConnectExternalIssuePayloadV2_js_1 = require("../models/IncidentsConnectExternalIssuePayloadV2.js");
51
52
  const IncidentsCreatePayloadV2_js_1 = require("../models/IncidentsCreatePayloadV2.js");
52
53
  const IncidentsCreateResultV2_js_1 = require("../models/IncidentsCreateResultV2.js");
53
54
  const IncidentsEditPayloadV2_js_1 = require("../models/IncidentsEditPayloadV2.js");
@@ -60,6 +61,52 @@ const IncidentsShowResultV2_js_1 = require("../models/IncidentsShowResultV2.js")
60
61
  *
61
62
  */
62
63
  class IncidentsV2Api extends runtime.BaseAPI {
64
+ /**
65
+ * Creates request options for incidentsV2ConnectExternalIssue without sending the request
66
+ */
67
+ async incidentsV2ConnectExternalIssueRequestOpts(requestParameters) {
68
+ if (requestParameters['id'] == null) {
69
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling incidentsV2ConnectExternalIssue().');
70
+ }
71
+ if (requestParameters['body'] == null) {
72
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling incidentsV2ConnectExternalIssue().');
73
+ }
74
+ const queryParameters = {};
75
+ const headerParameters = {};
76
+ headerParameters['Content-Type'] = 'application/json';
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 = `/v2/incidents/{id}/actions/connect_external_issue`;
85
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
86
+ return {
87
+ path: urlPath,
88
+ method: 'POST',
89
+ headers: headerParameters,
90
+ query: queryParameters,
91
+ body: (0, IncidentsConnectExternalIssuePayloadV2_js_1.IncidentsConnectExternalIssuePayloadV2ToJSON)(requestParameters['body']),
92
+ };
93
+ }
94
+ /**
95
+ * Connect an existing issue in an issue tracker to an incident, as its external issue. The issue is synced using the given incident ticket template, as if incident.io had created it from that template. The next sync writes the incident\'s fields into the issue. This works whether or not automatic incident ticket creation is turned on. While it is off, no tickets are created for other incidents, and the incident\'s fields are not written into this issue until it is turned on. This needs the incidents.connect_external_issue scope, either across the organisation or from an incident role on this incident. This fails if the incident already has a different external issue (unless replace is true), or if the issue is already linked to another incident or follow-up. The ID supplied can be either the incident\'s full ID, or the numeric part of its reference.
96
+ * ConnectExternalIssue Incidents V2
97
+ */
98
+ async incidentsV2ConnectExternalIssueRaw(requestParameters, initOverrides) {
99
+ const requestOptions = await this.incidentsV2ConnectExternalIssueRequestOpts(requestParameters);
100
+ const response = await this.request(requestOptions, initOverrides);
101
+ return new runtime.VoidApiResponse(response);
102
+ }
103
+ /**
104
+ * Connect an existing issue in an issue tracker to an incident, as its external issue. The issue is synced using the given incident ticket template, as if incident.io had created it from that template. The next sync writes the incident\'s fields into the issue. This works whether or not automatic incident ticket creation is turned on. While it is off, no tickets are created for other incidents, and the incident\'s fields are not written into this issue until it is turned on. This needs the incidents.connect_external_issue scope, either across the organisation or from an incident role on this incident. This fails if the incident already has a different external issue (unless replace is true), or if the issue is already linked to another incident or follow-up. The ID supplied can be either the incident\'s full ID, or the numeric part of its reference.
105
+ * ConnectExternalIssue Incidents V2
106
+ */
107
+ async incidentsV2ConnectExternalIssue(requestParameters, initOverrides) {
108
+ await this.incidentsV2ConnectExternalIssueRaw(requestParameters, initOverrides);
109
+ }
63
110
  /**
64
111
  * Creates request options for incidentsV2Create without sending the request
65
112
  */
@@ -0,0 +1,61 @@
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 IncidentsConnectExternalIssuePayloadV2
16
+ */
17
+ export interface IncidentsConnectExternalIssuePayloadV2 {
18
+ /**
19
+ * ID of the incident ticket template to sync the issue with
20
+ */
21
+ issue_template_id: string;
22
+ /**
23
+ * The issue tracker provider the issue belongs to. It must match the provider of the incident ticket template.
24
+ */
25
+ provider: IncidentsConnectExternalIssuePayloadV2ProviderEnum;
26
+ /**
27
+ * Whether to replace the incident's current external issue, if it has a different one
28
+ */
29
+ replace?: boolean;
30
+ /**
31
+ * URL of the issue in the issue tracker
32
+ */
33
+ url: string;
34
+ }
35
+ /**
36
+ * @export
37
+ */
38
+ export declare const IncidentsConnectExternalIssuePayloadV2ProviderEnum: {
39
+ readonly Asana: "asana";
40
+ readonly AzureDevops: "azure_devops";
41
+ readonly ClickUp: "click_up";
42
+ readonly Freshservice: "freshservice";
43
+ readonly Linear: "linear";
44
+ readonly Jira: "jira";
45
+ readonly Salesforce: "salesforce";
46
+ readonly JiraServer: "jira_server";
47
+ readonly Github: "github";
48
+ readonly Gitlab: "gitlab";
49
+ readonly ServiceNow: "service_now";
50
+ readonly Shortcut: "shortcut";
51
+ readonly Notion: "notion";
52
+ };
53
+ export type IncidentsConnectExternalIssuePayloadV2ProviderEnum = typeof IncidentsConnectExternalIssuePayloadV2ProviderEnum[keyof typeof IncidentsConnectExternalIssuePayloadV2ProviderEnum];
54
+ /**
55
+ * Check if a given object implements the IncidentsConnectExternalIssuePayloadV2 interface.
56
+ */
57
+ export declare function instanceOfIncidentsConnectExternalIssuePayloadV2(value: object): value is IncidentsConnectExternalIssuePayloadV2;
58
+ export declare function IncidentsConnectExternalIssuePayloadV2FromJSON(json: any): IncidentsConnectExternalIssuePayloadV2;
59
+ export declare function IncidentsConnectExternalIssuePayloadV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentsConnectExternalIssuePayloadV2;
60
+ export declare function IncidentsConnectExternalIssuePayloadV2ToJSON(json: any): IncidentsConnectExternalIssuePayloadV2;
61
+ export declare function IncidentsConnectExternalIssuePayloadV2ToJSONTyped(value?: IncidentsConnectExternalIssuePayloadV2 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * incident.io
6
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.IncidentsConnectExternalIssuePayloadV2ProviderEnum = void 0;
17
+ exports.instanceOfIncidentsConnectExternalIssuePayloadV2 = instanceOfIncidentsConnectExternalIssuePayloadV2;
18
+ exports.IncidentsConnectExternalIssuePayloadV2FromJSON = IncidentsConnectExternalIssuePayloadV2FromJSON;
19
+ exports.IncidentsConnectExternalIssuePayloadV2FromJSONTyped = IncidentsConnectExternalIssuePayloadV2FromJSONTyped;
20
+ exports.IncidentsConnectExternalIssuePayloadV2ToJSON = IncidentsConnectExternalIssuePayloadV2ToJSON;
21
+ exports.IncidentsConnectExternalIssuePayloadV2ToJSONTyped = IncidentsConnectExternalIssuePayloadV2ToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.IncidentsConnectExternalIssuePayloadV2ProviderEnum = {
26
+ Asana: 'asana',
27
+ AzureDevops: 'azure_devops',
28
+ ClickUp: 'click_up',
29
+ Freshservice: 'freshservice',
30
+ Linear: 'linear',
31
+ Jira: 'jira',
32
+ Salesforce: 'salesforce',
33
+ JiraServer: 'jira_server',
34
+ Github: 'github',
35
+ Gitlab: 'gitlab',
36
+ ServiceNow: 'service_now',
37
+ Shortcut: 'shortcut',
38
+ Notion: 'notion',
39
+ };
40
+ /**
41
+ * Check if a given object implements the IncidentsConnectExternalIssuePayloadV2 interface.
42
+ */
43
+ function instanceOfIncidentsConnectExternalIssuePayloadV2(value) {
44
+ if (!('issue_template_id' in value) || value['issue_template_id'] === undefined)
45
+ return false;
46
+ if (!('provider' in value) || value['provider'] === undefined)
47
+ return false;
48
+ if (!('url' in value) || value['url'] === undefined)
49
+ return false;
50
+ return true;
51
+ }
52
+ function IncidentsConnectExternalIssuePayloadV2FromJSON(json) {
53
+ return IncidentsConnectExternalIssuePayloadV2FromJSONTyped(json, false);
54
+ }
55
+ function IncidentsConnectExternalIssuePayloadV2FromJSONTyped(json, ignoreDiscriminator) {
56
+ if (json == null) {
57
+ return json;
58
+ }
59
+ return {
60
+ 'issue_template_id': json['issue_template_id'],
61
+ 'provider': json['provider'],
62
+ 'replace': json['replace'] == null ? undefined : json['replace'],
63
+ 'url': json['url'],
64
+ };
65
+ }
66
+ function IncidentsConnectExternalIssuePayloadV2ToJSON(json) {
67
+ return IncidentsConnectExternalIssuePayloadV2ToJSONTyped(json, false);
68
+ }
69
+ function IncidentsConnectExternalIssuePayloadV2ToJSONTyped(value, ignoreDiscriminator = false) {
70
+ if (value == null) {
71
+ return value;
72
+ }
73
+ return {
74
+ 'issue_template_id': value['issue_template_id'],
75
+ 'provider': value['provider'],
76
+ 'replace': value['replace'],
77
+ 'url': value['url'],
78
+ };
79
+ }
@@ -868,6 +868,7 @@ export * from './IncidentUpdatesListResultV2.js';
868
868
  export * from './IncidentV1.js';
869
869
  export * from './IncidentV2.js';
870
870
  export * from './IncidentWithStatusChangeV2.js';
871
+ export * from './IncidentsConnectExternalIssuePayloadV2.js';
871
872
  export * from './IncidentsCreatePayloadV1.js';
872
873
  export * from './IncidentsCreatePayloadV2.js';
873
874
  export * from './IncidentsCreateResultV1.js';
@@ -886,6 +886,7 @@ __exportStar(require("./IncidentUpdatesListResultV2.js"), exports);
886
886
  __exportStar(require("./IncidentV1.js"), exports);
887
887
  __exportStar(require("./IncidentV2.js"), exports);
888
888
  __exportStar(require("./IncidentWithStatusChangeV2.js"), exports);
889
+ __exportStar(require("./IncidentsConnectExternalIssuePayloadV2.js"), exports);
889
890
  __exportStar(require("./IncidentsCreatePayloadV1.js"), exports);
890
891
  __exportStar(require("./IncidentsCreatePayloadV2.js"), exports);
891
892
  __exportStar(require("./IncidentsCreateResultV1.js"), exports);
@@ -1 +1 @@
1
- export declare const VERSION = "2.22.0";
1
+ export declare const VERSION = "2.24.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.22.0";
5
+ exports.VERSION = "2.24.0";
@@ -10,6 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime.js';
13
+ import { type IncidentsConnectExternalIssuePayloadV2 } from '../models/IncidentsConnectExternalIssuePayloadV2.js';
13
14
  import { type IncidentsCreatePayloadV2 } from '../models/IncidentsCreatePayloadV2.js';
14
15
  import { type IncidentsCreateResultV2 } from '../models/IncidentsCreateResultV2.js';
15
16
  import { type IncidentsEditPayloadV2 } from '../models/IncidentsEditPayloadV2.js';
@@ -18,6 +19,16 @@ import { type IncidentsImportPostmortemDocumentPayloadV2 } from '../models/Incid
18
19
  import { type IncidentsImportPostmortemDocumentResultV2 } from '../models/IncidentsImportPostmortemDocumentResultV2.js';
19
20
  import { type IncidentsListResultV2 } from '../models/IncidentsListResultV2.js';
20
21
  import { type IncidentsShowResultV2 } from '../models/IncidentsShowResultV2.js';
22
+ export interface IncidentsV2ConnectExternalIssueRequest {
23
+ /**
24
+ * The unique identifier of the incident
25
+ */
26
+ id: string;
27
+ /**
28
+ *
29
+ */
30
+ body: IncidentsConnectExternalIssuePayloadV2;
31
+ }
21
32
  export interface IncidentsV2CreateRequest {
22
33
  /**
23
34
  *
@@ -130,6 +141,20 @@ export interface IncidentsV2ShowRequest {
130
141
  *
131
142
  */
132
143
  export declare class IncidentsV2Api extends runtime.BaseAPI {
144
+ /**
145
+ * Creates request options for incidentsV2ConnectExternalIssue without sending the request
146
+ */
147
+ incidentsV2ConnectExternalIssueRequestOpts(requestParameters: IncidentsV2ConnectExternalIssueRequest): Promise<runtime.RequestOpts>;
148
+ /**
149
+ * Connect an existing issue in an issue tracker to an incident, as its external issue. The issue is synced using the given incident ticket template, as if incident.io had created it from that template. The next sync writes the incident\'s fields into the issue. This works whether or not automatic incident ticket creation is turned on. While it is off, no tickets are created for other incidents, and the incident\'s fields are not written into this issue until it is turned on. This needs the incidents.connect_external_issue scope, either across the organisation or from an incident role on this incident. This fails if the incident already has a different external issue (unless replace is true), or if the issue is already linked to another incident or follow-up. The ID supplied can be either the incident\'s full ID, or the numeric part of its reference.
150
+ * ConnectExternalIssue Incidents V2
151
+ */
152
+ incidentsV2ConnectExternalIssueRaw(requestParameters: IncidentsV2ConnectExternalIssueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
153
+ /**
154
+ * Connect an existing issue in an issue tracker to an incident, as its external issue. The issue is synced using the given incident ticket template, as if incident.io had created it from that template. The next sync writes the incident\'s fields into the issue. This works whether or not automatic incident ticket creation is turned on. While it is off, no tickets are created for other incidents, and the incident\'s fields are not written into this issue until it is turned on. This needs the incidents.connect_external_issue scope, either across the organisation or from an incident role on this incident. This fails if the incident already has a different external issue (unless replace is true), or if the issue is already linked to another incident or follow-up. The ID supplied can be either the incident\'s full ID, or the numeric part of its reference.
155
+ * ConnectExternalIssue Incidents V2
156
+ */
157
+ incidentsV2ConnectExternalIssue(requestParameters: IncidentsV2ConnectExternalIssueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
133
158
  /**
134
159
  * Creates request options for incidentsV2Create without sending the request
135
160
  */
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import * as runtime from '../runtime.js';
15
+ import { IncidentsConnectExternalIssuePayloadV2ToJSON, } from '../models/IncidentsConnectExternalIssuePayloadV2.js';
15
16
  import { IncidentsCreatePayloadV2ToJSON, } from '../models/IncidentsCreatePayloadV2.js';
16
17
  import { IncidentsCreateResultV2FromJSON, } from '../models/IncidentsCreateResultV2.js';
17
18
  import { IncidentsEditPayloadV2ToJSON, } from '../models/IncidentsEditPayloadV2.js';
@@ -24,6 +25,52 @@ import { IncidentsShowResultV2FromJSON, } from '../models/IncidentsShowResultV2.
24
25
  *
25
26
  */
26
27
  export class IncidentsV2Api extends runtime.BaseAPI {
28
+ /**
29
+ * Creates request options for incidentsV2ConnectExternalIssue without sending the request
30
+ */
31
+ async incidentsV2ConnectExternalIssueRequestOpts(requestParameters) {
32
+ if (requestParameters['id'] == null) {
33
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling incidentsV2ConnectExternalIssue().');
34
+ }
35
+ if (requestParameters['body'] == null) {
36
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling incidentsV2ConnectExternalIssue().');
37
+ }
38
+ const queryParameters = {};
39
+ const headerParameters = {};
40
+ headerParameters['Content-Type'] = 'application/json';
41
+ if (this.configuration && this.configuration.accessToken) {
42
+ const token = this.configuration.accessToken;
43
+ const tokenString = await token("BearerAuth", []);
44
+ if (tokenString) {
45
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
46
+ }
47
+ }
48
+ let urlPath = `/v2/incidents/{id}/actions/connect_external_issue`;
49
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
50
+ return {
51
+ path: urlPath,
52
+ method: 'POST',
53
+ headers: headerParameters,
54
+ query: queryParameters,
55
+ body: IncidentsConnectExternalIssuePayloadV2ToJSON(requestParameters['body']),
56
+ };
57
+ }
58
+ /**
59
+ * Connect an existing issue in an issue tracker to an incident, as its external issue. The issue is synced using the given incident ticket template, as if incident.io had created it from that template. The next sync writes the incident\'s fields into the issue. This works whether or not automatic incident ticket creation is turned on. While it is off, no tickets are created for other incidents, and the incident\'s fields are not written into this issue until it is turned on. This needs the incidents.connect_external_issue scope, either across the organisation or from an incident role on this incident. This fails if the incident already has a different external issue (unless replace is true), or if the issue is already linked to another incident or follow-up. The ID supplied can be either the incident\'s full ID, or the numeric part of its reference.
60
+ * ConnectExternalIssue Incidents V2
61
+ */
62
+ async incidentsV2ConnectExternalIssueRaw(requestParameters, initOverrides) {
63
+ const requestOptions = await this.incidentsV2ConnectExternalIssueRequestOpts(requestParameters);
64
+ const response = await this.request(requestOptions, initOverrides);
65
+ return new runtime.VoidApiResponse(response);
66
+ }
67
+ /**
68
+ * Connect an existing issue in an issue tracker to an incident, as its external issue. The issue is synced using the given incident ticket template, as if incident.io had created it from that template. The next sync writes the incident\'s fields into the issue. This works whether or not automatic incident ticket creation is turned on. While it is off, no tickets are created for other incidents, and the incident\'s fields are not written into this issue until it is turned on. This needs the incidents.connect_external_issue scope, either across the organisation or from an incident role on this incident. This fails if the incident already has a different external issue (unless replace is true), or if the issue is already linked to another incident or follow-up. The ID supplied can be either the incident\'s full ID, or the numeric part of its reference.
69
+ * ConnectExternalIssue Incidents V2
70
+ */
71
+ async incidentsV2ConnectExternalIssue(requestParameters, initOverrides) {
72
+ await this.incidentsV2ConnectExternalIssueRaw(requestParameters, initOverrides);
73
+ }
27
74
  /**
28
75
  * Creates request options for incidentsV2Create without sending the request
29
76
  */
@@ -0,0 +1,61 @@
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 IncidentsConnectExternalIssuePayloadV2
16
+ */
17
+ export interface IncidentsConnectExternalIssuePayloadV2 {
18
+ /**
19
+ * ID of the incident ticket template to sync the issue with
20
+ */
21
+ issue_template_id: string;
22
+ /**
23
+ * The issue tracker provider the issue belongs to. It must match the provider of the incident ticket template.
24
+ */
25
+ provider: IncidentsConnectExternalIssuePayloadV2ProviderEnum;
26
+ /**
27
+ * Whether to replace the incident's current external issue, if it has a different one
28
+ */
29
+ replace?: boolean;
30
+ /**
31
+ * URL of the issue in the issue tracker
32
+ */
33
+ url: string;
34
+ }
35
+ /**
36
+ * @export
37
+ */
38
+ export declare const IncidentsConnectExternalIssuePayloadV2ProviderEnum: {
39
+ readonly Asana: "asana";
40
+ readonly AzureDevops: "azure_devops";
41
+ readonly ClickUp: "click_up";
42
+ readonly Freshservice: "freshservice";
43
+ readonly Linear: "linear";
44
+ readonly Jira: "jira";
45
+ readonly Salesforce: "salesforce";
46
+ readonly JiraServer: "jira_server";
47
+ readonly Github: "github";
48
+ readonly Gitlab: "gitlab";
49
+ readonly ServiceNow: "service_now";
50
+ readonly Shortcut: "shortcut";
51
+ readonly Notion: "notion";
52
+ };
53
+ export type IncidentsConnectExternalIssuePayloadV2ProviderEnum = typeof IncidentsConnectExternalIssuePayloadV2ProviderEnum[keyof typeof IncidentsConnectExternalIssuePayloadV2ProviderEnum];
54
+ /**
55
+ * Check if a given object implements the IncidentsConnectExternalIssuePayloadV2 interface.
56
+ */
57
+ export declare function instanceOfIncidentsConnectExternalIssuePayloadV2(value: object): value is IncidentsConnectExternalIssuePayloadV2;
58
+ export declare function IncidentsConnectExternalIssuePayloadV2FromJSON(json: any): IncidentsConnectExternalIssuePayloadV2;
59
+ export declare function IncidentsConnectExternalIssuePayloadV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): IncidentsConnectExternalIssuePayloadV2;
60
+ export declare function IncidentsConnectExternalIssuePayloadV2ToJSON(json: any): IncidentsConnectExternalIssuePayloadV2;
61
+ export declare function IncidentsConnectExternalIssuePayloadV2ToJSONTyped(value?: IncidentsConnectExternalIssuePayloadV2 | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,71 @@
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
+ * @export
16
+ */
17
+ export const IncidentsConnectExternalIssuePayloadV2ProviderEnum = {
18
+ Asana: 'asana',
19
+ AzureDevops: 'azure_devops',
20
+ ClickUp: 'click_up',
21
+ Freshservice: 'freshservice',
22
+ Linear: 'linear',
23
+ Jira: 'jira',
24
+ Salesforce: 'salesforce',
25
+ JiraServer: 'jira_server',
26
+ Github: 'github',
27
+ Gitlab: 'gitlab',
28
+ ServiceNow: 'service_now',
29
+ Shortcut: 'shortcut',
30
+ Notion: 'notion',
31
+ };
32
+ /**
33
+ * Check if a given object implements the IncidentsConnectExternalIssuePayloadV2 interface.
34
+ */
35
+ export function instanceOfIncidentsConnectExternalIssuePayloadV2(value) {
36
+ if (!('issue_template_id' in value) || value['issue_template_id'] === undefined)
37
+ return false;
38
+ if (!('provider' in value) || value['provider'] === undefined)
39
+ return false;
40
+ if (!('url' in value) || value['url'] === undefined)
41
+ return false;
42
+ return true;
43
+ }
44
+ export function IncidentsConnectExternalIssuePayloadV2FromJSON(json) {
45
+ return IncidentsConnectExternalIssuePayloadV2FromJSONTyped(json, false);
46
+ }
47
+ export function IncidentsConnectExternalIssuePayloadV2FromJSONTyped(json, ignoreDiscriminator) {
48
+ if (json == null) {
49
+ return json;
50
+ }
51
+ return {
52
+ 'issue_template_id': json['issue_template_id'],
53
+ 'provider': json['provider'],
54
+ 'replace': json['replace'] == null ? undefined : json['replace'],
55
+ 'url': json['url'],
56
+ };
57
+ }
58
+ export function IncidentsConnectExternalIssuePayloadV2ToJSON(json) {
59
+ return IncidentsConnectExternalIssuePayloadV2ToJSONTyped(json, false);
60
+ }
61
+ export function IncidentsConnectExternalIssuePayloadV2ToJSONTyped(value, ignoreDiscriminator = false) {
62
+ if (value == null) {
63
+ return value;
64
+ }
65
+ return {
66
+ 'issue_template_id': value['issue_template_id'],
67
+ 'provider': value['provider'],
68
+ 'replace': value['replace'],
69
+ 'url': value['url'],
70
+ };
71
+ }
@@ -868,6 +868,7 @@ export * from './IncidentUpdatesListResultV2.js';
868
868
  export * from './IncidentV1.js';
869
869
  export * from './IncidentV2.js';
870
870
  export * from './IncidentWithStatusChangeV2.js';
871
+ export * from './IncidentsConnectExternalIssuePayloadV2.js';
871
872
  export * from './IncidentsCreatePayloadV1.js';
872
873
  export * from './IncidentsCreatePayloadV2.js';
873
874
  export * from './IncidentsCreateResultV1.js';
@@ -870,6 +870,7 @@ export * from './IncidentUpdatesListResultV2.js';
870
870
  export * from './IncidentV1.js';
871
871
  export * from './IncidentV2.js';
872
872
  export * from './IncidentWithStatusChangeV2.js';
873
+ export * from './IncidentsConnectExternalIssuePayloadV2.js';
873
874
  export * from './IncidentsCreatePayloadV1.js';
874
875
  export * from './IncidentsCreatePayloadV2.js';
875
876
  export * from './IncidentsCreateResultV1.js';
@@ -1 +1 @@
1
- export declare const VERSION = "2.22.0";
1
+ export declare const VERSION = "2.24.0";
@@ -1,2 +1,2 @@
1
1
  // Written by `make build` from package.json. Do not edit.
2
- export const VERSION = "2.22.0";
2
+ export const VERSION = "2.24.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incident-io/sdk",
3
- "version": "2.22.0",
3
+ "version": "2.24.0",
4
4
  "description": "TypeScript SDK for the incident.io API",
5
5
  "license": "MIT",
6
6
  "author": "incident.io <support@incident.io>",