@incident-io/sdk 2.21.0 → 2.22.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.
- package/dist/cjs/apis/ManagedResourcesV2Api.d.ts +39 -0
- package/dist/cjs/apis/ManagedResourcesV2Api.js +101 -0
- package/dist/cjs/apis/index.d.ts +1 -0
- package/dist/cjs/apis/index.js +1 -0
- package/dist/cjs/models/ManagedResourceV2.d.ts +79 -0
- package/dist/cjs/models/ManagedResourceV2.js +94 -0
- package/dist/cjs/models/ManagedResourcesCreateManagedResourcePayloadV2.d.ts +62 -0
- package/dist/cjs/models/ManagedResourcesCreateManagedResourcePayloadV2.js +80 -0
- package/dist/cjs/models/ManagedResourcesCreateManagedResourceResultV2.d.ts +31 -0
- package/dist/cjs/models/ManagedResourcesCreateManagedResourceResultV2.js +51 -0
- package/dist/cjs/models/index.d.ts +3 -0
- package/dist/cjs/models/index.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/apis/ManagedResourcesV2Api.d.ts +39 -0
- package/dist/esm/apis/ManagedResourcesV2Api.js +64 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ManagedResourceV2.d.ts +79 -0
- package/dist/esm/models/ManagedResourceV2.js +86 -0
- package/dist/esm/models/ManagedResourcesCreateManagedResourcePayloadV2.d.ts +62 -0
- package/dist/esm/models/ManagedResourcesCreateManagedResourcePayloadV2.js +72 -0
- package/dist/esm/models/ManagedResourcesCreateManagedResourceResultV2.d.ts +31 -0
- package/dist/esm/models/ManagedResourcesCreateManagedResourceResultV2.js +44 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,39 @@
|
|
|
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 ManagedResourcesCreateManagedResourcePayloadV2 } from '../models/ManagedResourcesCreateManagedResourcePayloadV2.js';
|
|
14
|
+
import { type ManagedResourcesCreateManagedResourceResultV2 } from '../models/ManagedResourcesCreateManagedResourceResultV2.js';
|
|
15
|
+
export interface ManagedResourcesV2CreateManagedResourceRequest {
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
body: ManagedResourcesCreateManagedResourcePayloadV2;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export declare class ManagedResourcesV2Api extends runtime.BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* Creates request options for managedResourcesV2CreateManagedResource without sending the request
|
|
27
|
+
*/
|
|
28
|
+
managedResourcesV2CreateManagedResourceRequestOpts(requestParameters: ManagedResourcesV2CreateManagedResourceRequest): Promise<runtime.RequestOpts>;
|
|
29
|
+
/**
|
|
30
|
+
* Create or update the management record for a resource. This replaces any annotations already stored on it. The annotations set `managed_by`: - `incident.io/terraform/version` sets it to `terraform`. - `incident.io/is-managed-externally` sets it to `external`. If both keys are present, `external` wins. - Neither key sets it to `dashboard`. This doesn\'t change the resource\'s configuration, but `managed_by` controls whether it can be edited in the dashboard. Returning a schedule to `dashboard` also returns its sync rules and targets. The API key must have the update scope for the resource type, e.g. `schedules.update` for a schedule.
|
|
31
|
+
* CreateManagedResource Managed Resources V2
|
|
32
|
+
*/
|
|
33
|
+
managedResourcesV2CreateManagedResourceRaw(requestParameters: ManagedResourcesV2CreateManagedResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagedResourcesCreateManagedResourceResultV2>>;
|
|
34
|
+
/**
|
|
35
|
+
* Create or update the management record for a resource. This replaces any annotations already stored on it. The annotations set `managed_by`: - `incident.io/terraform/version` sets it to `terraform`. - `incident.io/is-managed-externally` sets it to `external`. If both keys are present, `external` wins. - Neither key sets it to `dashboard`. This doesn\'t change the resource\'s configuration, but `managed_by` controls whether it can be edited in the dashboard. Returning a schedule to `dashboard` also returns its sync rules and targets. The API key must have the update scope for the resource type, e.g. `schedules.update` for a schedule.
|
|
36
|
+
* CreateManagedResource Managed Resources V2
|
|
37
|
+
*/
|
|
38
|
+
managedResourcesV2CreateManagedResource(requestParameters: ManagedResourcesV2CreateManagedResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagedResourcesCreateManagedResourceResultV2>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.ManagedResourcesV2Api = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime.js"));
|
|
51
|
+
const ManagedResourcesCreateManagedResourcePayloadV2_js_1 = require("../models/ManagedResourcesCreateManagedResourcePayloadV2.js");
|
|
52
|
+
const ManagedResourcesCreateManagedResourceResultV2_js_1 = require("../models/ManagedResourcesCreateManagedResourceResultV2.js");
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
*/
|
|
56
|
+
class ManagedResourcesV2Api extends runtime.BaseAPI {
|
|
57
|
+
/**
|
|
58
|
+
* Creates request options for managedResourcesV2CreateManagedResource without sending the request
|
|
59
|
+
*/
|
|
60
|
+
async managedResourcesV2CreateManagedResourceRequestOpts(requestParameters) {
|
|
61
|
+
if (requestParameters['body'] == null) {
|
|
62
|
+
throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling managedResourcesV2CreateManagedResource().');
|
|
63
|
+
}
|
|
64
|
+
const queryParameters = {};
|
|
65
|
+
const headerParameters = {};
|
|
66
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
67
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
68
|
+
const token = this.configuration.accessToken;
|
|
69
|
+
const tokenString = await token("BearerAuth", []);
|
|
70
|
+
if (tokenString) {
|
|
71
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
let urlPath = `/v2/managed_resources`;
|
|
75
|
+
return {
|
|
76
|
+
path: urlPath,
|
|
77
|
+
method: 'POST',
|
|
78
|
+
headers: headerParameters,
|
|
79
|
+
query: queryParameters,
|
|
80
|
+
body: (0, ManagedResourcesCreateManagedResourcePayloadV2_js_1.ManagedResourcesCreateManagedResourcePayloadV2ToJSON)(requestParameters['body']),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Create or update the management record for a resource. This replaces any annotations already stored on it. The annotations set `managed_by`: - `incident.io/terraform/version` sets it to `terraform`. - `incident.io/is-managed-externally` sets it to `external`. If both keys are present, `external` wins. - Neither key sets it to `dashboard`. This doesn\'t change the resource\'s configuration, but `managed_by` controls whether it can be edited in the dashboard. Returning a schedule to `dashboard` also returns its sync rules and targets. The API key must have the update scope for the resource type, e.g. `schedules.update` for a schedule.
|
|
85
|
+
* CreateManagedResource Managed Resources V2
|
|
86
|
+
*/
|
|
87
|
+
async managedResourcesV2CreateManagedResourceRaw(requestParameters, initOverrides) {
|
|
88
|
+
const requestOptions = await this.managedResourcesV2CreateManagedResourceRequestOpts(requestParameters);
|
|
89
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
90
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ManagedResourcesCreateManagedResourceResultV2_js_1.ManagedResourcesCreateManagedResourceResultV2FromJSON)(jsonValue));
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Create or update the management record for a resource. This replaces any annotations already stored on it. The annotations set `managed_by`: - `incident.io/terraform/version` sets it to `terraform`. - `incident.io/is-managed-externally` sets it to `external`. If both keys are present, `external` wins. - Neither key sets it to `dashboard`. This doesn\'t change the resource\'s configuration, but `managed_by` controls whether it can be edited in the dashboard. Returning a schedule to `dashboard` also returns its sync rules and targets. The API key must have the update scope for the resource type, e.g. `schedules.update` for a schedule.
|
|
94
|
+
* CreateManagedResource Managed Resources V2
|
|
95
|
+
*/
|
|
96
|
+
async managedResourcesV2CreateManagedResource(requestParameters, initOverrides) {
|
|
97
|
+
const response = await this.managedResourcesV2CreateManagedResourceRaw(requestParameters, initOverrides);
|
|
98
|
+
return await response.value();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
exports.ManagedResourcesV2Api = ManagedResourcesV2Api;
|
package/dist/cjs/apis/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export * from './IncidentUpdatesV2Api.js';
|
|
|
44
44
|
export * from './IncidentsV1Api.js';
|
|
45
45
|
export * from './IncidentsV2Api.js';
|
|
46
46
|
export * from './MaintenanceWindowsV1Api.js';
|
|
47
|
+
export * from './ManagedResourcesV2Api.js';
|
|
47
48
|
export * from './OnCallNotificationPausesV2Api.js';
|
|
48
49
|
export * from './PayConfigsV2Api.js';
|
|
49
50
|
export * from './PayReportsV2Api.js';
|
package/dist/cjs/apis/index.js
CHANGED
|
@@ -62,6 +62,7 @@ __exportStar(require("./IncidentUpdatesV2Api.js"), exports);
|
|
|
62
62
|
__exportStar(require("./IncidentsV1Api.js"), exports);
|
|
63
63
|
__exportStar(require("./IncidentsV2Api.js"), exports);
|
|
64
64
|
__exportStar(require("./MaintenanceWindowsV1Api.js"), exports);
|
|
65
|
+
__exportStar(require("./ManagedResourcesV2Api.js"), exports);
|
|
65
66
|
__exportStar(require("./OnCallNotificationPausesV2Api.js"), exports);
|
|
66
67
|
__exportStar(require("./PayConfigsV2Api.js"), exports);
|
|
67
68
|
__exportStar(require("./PayReportsV2Api.js"), exports);
|
|
@@ -0,0 +1,79 @@
|
|
|
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 ManagedResourceV2
|
|
16
|
+
*/
|
|
17
|
+
export interface ManagedResourceV2 {
|
|
18
|
+
/**
|
|
19
|
+
* Annotations that track metadata about this resource
|
|
20
|
+
*/
|
|
21
|
+
annotations: {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* How is this resource managed
|
|
26
|
+
*/
|
|
27
|
+
managed_by: ManagedResourceV2ManagedByEnum;
|
|
28
|
+
/**
|
|
29
|
+
* The ID of the resource that this relates to
|
|
30
|
+
*/
|
|
31
|
+
resource_id: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
resource_type: ManagedResourceV2ResourceTypeEnum;
|
|
36
|
+
/**
|
|
37
|
+
* The url of the external repository where this resource is managed (if there is one)
|
|
38
|
+
*/
|
|
39
|
+
source_url?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @export
|
|
43
|
+
*/
|
|
44
|
+
export declare const ManagedResourceV2ManagedByEnum: {
|
|
45
|
+
readonly Dashboard: "dashboard";
|
|
46
|
+
readonly Terraform: "terraform";
|
|
47
|
+
readonly External: "external";
|
|
48
|
+
};
|
|
49
|
+
export type ManagedResourceV2ManagedByEnum = typeof ManagedResourceV2ManagedByEnum[keyof typeof ManagedResourceV2ManagedByEnum];
|
|
50
|
+
/**
|
|
51
|
+
* @export
|
|
52
|
+
*/
|
|
53
|
+
export declare const ManagedResourceV2ResourceTypeEnum: {
|
|
54
|
+
readonly AlertRoute: "alert_route";
|
|
55
|
+
readonly AlertSource: "alert_source";
|
|
56
|
+
readonly ApiKey: "api_key";
|
|
57
|
+
readonly IncidentForm: "incident_form";
|
|
58
|
+
readonly IncidentTemplate: "incident_template";
|
|
59
|
+
readonly EscalationPath: "escalation_path";
|
|
60
|
+
readonly EscalationPathTemplate: "escalation_path_template";
|
|
61
|
+
readonly Policy: "policy";
|
|
62
|
+
readonly Schedule: "schedule";
|
|
63
|
+
readonly ScheduleSyncTarget: "schedule_sync_target";
|
|
64
|
+
readonly ScheduleSyncRule: "schedule_sync_rule";
|
|
65
|
+
readonly Secret: "secret";
|
|
66
|
+
readonly StatusPageComponent: "status_page_component";
|
|
67
|
+
readonly StatusPageStructure: "status_page_structure";
|
|
68
|
+
readonly TeamGroupingPreference: "team_grouping_preference";
|
|
69
|
+
readonly Workflow: "workflow";
|
|
70
|
+
};
|
|
71
|
+
export type ManagedResourceV2ResourceTypeEnum = typeof ManagedResourceV2ResourceTypeEnum[keyof typeof ManagedResourceV2ResourceTypeEnum];
|
|
72
|
+
/**
|
|
73
|
+
* Check if a given object implements the ManagedResourceV2 interface.
|
|
74
|
+
*/
|
|
75
|
+
export declare function instanceOfManagedResourceV2(value: object): value is ManagedResourceV2;
|
|
76
|
+
export declare function ManagedResourceV2FromJSON(json: any): ManagedResourceV2;
|
|
77
|
+
export declare function ManagedResourceV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedResourceV2;
|
|
78
|
+
export declare function ManagedResourceV2ToJSON(json: any): ManagedResourceV2;
|
|
79
|
+
export declare function ManagedResourceV2ToJSONTyped(value?: ManagedResourceV2 | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,94 @@
|
|
|
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.ManagedResourceV2ResourceTypeEnum = exports.ManagedResourceV2ManagedByEnum = void 0;
|
|
17
|
+
exports.instanceOfManagedResourceV2 = instanceOfManagedResourceV2;
|
|
18
|
+
exports.ManagedResourceV2FromJSON = ManagedResourceV2FromJSON;
|
|
19
|
+
exports.ManagedResourceV2FromJSONTyped = ManagedResourceV2FromJSONTyped;
|
|
20
|
+
exports.ManagedResourceV2ToJSON = ManagedResourceV2ToJSON;
|
|
21
|
+
exports.ManagedResourceV2ToJSONTyped = ManagedResourceV2ToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.ManagedResourceV2ManagedByEnum = {
|
|
26
|
+
Dashboard: 'dashboard',
|
|
27
|
+
Terraform: 'terraform',
|
|
28
|
+
External: 'external',
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
exports.ManagedResourceV2ResourceTypeEnum = {
|
|
34
|
+
AlertRoute: 'alert_route',
|
|
35
|
+
AlertSource: 'alert_source',
|
|
36
|
+
ApiKey: 'api_key',
|
|
37
|
+
IncidentForm: 'incident_form',
|
|
38
|
+
IncidentTemplate: 'incident_template',
|
|
39
|
+
EscalationPath: 'escalation_path',
|
|
40
|
+
EscalationPathTemplate: 'escalation_path_template',
|
|
41
|
+
Policy: 'policy',
|
|
42
|
+
Schedule: 'schedule',
|
|
43
|
+
ScheduleSyncTarget: 'schedule_sync_target',
|
|
44
|
+
ScheduleSyncRule: 'schedule_sync_rule',
|
|
45
|
+
Secret: 'secret',
|
|
46
|
+
StatusPageComponent: 'status_page_component',
|
|
47
|
+
StatusPageStructure: 'status_page_structure',
|
|
48
|
+
TeamGroupingPreference: 'team_grouping_preference',
|
|
49
|
+
Workflow: 'workflow',
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Check if a given object implements the ManagedResourceV2 interface.
|
|
53
|
+
*/
|
|
54
|
+
function instanceOfManagedResourceV2(value) {
|
|
55
|
+
if (!('annotations' in value) || value['annotations'] === undefined)
|
|
56
|
+
return false;
|
|
57
|
+
if (!('managed_by' in value) || value['managed_by'] === undefined)
|
|
58
|
+
return false;
|
|
59
|
+
if (!('resource_id' in value) || value['resource_id'] === undefined)
|
|
60
|
+
return false;
|
|
61
|
+
if (!('resource_type' in value) || value['resource_type'] === undefined)
|
|
62
|
+
return false;
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
function ManagedResourceV2FromJSON(json) {
|
|
66
|
+
return ManagedResourceV2FromJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
function ManagedResourceV2FromJSONTyped(json, ignoreDiscriminator) {
|
|
69
|
+
if (json == null) {
|
|
70
|
+
return json;
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
'annotations': json['annotations'],
|
|
74
|
+
'managed_by': json['managed_by'],
|
|
75
|
+
'resource_id': json['resource_id'],
|
|
76
|
+
'resource_type': json['resource_type'],
|
|
77
|
+
'source_url': json['source_url'] == null ? undefined : json['source_url'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function ManagedResourceV2ToJSON(json) {
|
|
81
|
+
return ManagedResourceV2ToJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
function ManagedResourceV2ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
84
|
+
if (value == null) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
'annotations': value['annotations'],
|
|
89
|
+
'managed_by': value['managed_by'],
|
|
90
|
+
'resource_id': value['resource_id'],
|
|
91
|
+
'resource_type': value['resource_type'],
|
|
92
|
+
'source_url': value['source_url'],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 ManagedResourcesCreateManagedResourcePayloadV2
|
|
16
|
+
*/
|
|
17
|
+
export interface ManagedResourcesCreateManagedResourcePayloadV2 {
|
|
18
|
+
/**
|
|
19
|
+
* Annotations that track metadata about this resource
|
|
20
|
+
*/
|
|
21
|
+
annotations: {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The ID of the resource that this relates to
|
|
26
|
+
*/
|
|
27
|
+
resource_id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The type of the related resource
|
|
30
|
+
*/
|
|
31
|
+
resource_type: ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @export
|
|
35
|
+
*/
|
|
36
|
+
export declare const ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum: {
|
|
37
|
+
readonly AlertRoute: "alert_route";
|
|
38
|
+
readonly AlertSource: "alert_source";
|
|
39
|
+
readonly ApiKey: "api_key";
|
|
40
|
+
readonly IncidentForm: "incident_form";
|
|
41
|
+
readonly IncidentTemplate: "incident_template";
|
|
42
|
+
readonly EscalationPath: "escalation_path";
|
|
43
|
+
readonly EscalationPathTemplate: "escalation_path_template";
|
|
44
|
+
readonly Policy: "policy";
|
|
45
|
+
readonly Schedule: "schedule";
|
|
46
|
+
readonly ScheduleSyncTarget: "schedule_sync_target";
|
|
47
|
+
readonly ScheduleSyncRule: "schedule_sync_rule";
|
|
48
|
+
readonly Secret: "secret";
|
|
49
|
+
readonly StatusPageComponent: "status_page_component";
|
|
50
|
+
readonly StatusPageStructure: "status_page_structure";
|
|
51
|
+
readonly TeamGroupingPreference: "team_grouping_preference";
|
|
52
|
+
readonly Workflow: "workflow";
|
|
53
|
+
};
|
|
54
|
+
export type ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum = typeof ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum[keyof typeof ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum];
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the ManagedResourcesCreateManagedResourcePayloadV2 interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfManagedResourcesCreateManagedResourcePayloadV2(value: object): value is ManagedResourcesCreateManagedResourcePayloadV2;
|
|
59
|
+
export declare function ManagedResourcesCreateManagedResourcePayloadV2FromJSON(json: any): ManagedResourcesCreateManagedResourcePayloadV2;
|
|
60
|
+
export declare function ManagedResourcesCreateManagedResourcePayloadV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedResourcesCreateManagedResourcePayloadV2;
|
|
61
|
+
export declare function ManagedResourcesCreateManagedResourcePayloadV2ToJSON(json: any): ManagedResourcesCreateManagedResourcePayloadV2;
|
|
62
|
+
export declare function ManagedResourcesCreateManagedResourcePayloadV2ToJSONTyped(value?: ManagedResourcesCreateManagedResourcePayloadV2 | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,80 @@
|
|
|
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.ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum = void 0;
|
|
17
|
+
exports.instanceOfManagedResourcesCreateManagedResourcePayloadV2 = instanceOfManagedResourcesCreateManagedResourcePayloadV2;
|
|
18
|
+
exports.ManagedResourcesCreateManagedResourcePayloadV2FromJSON = ManagedResourcesCreateManagedResourcePayloadV2FromJSON;
|
|
19
|
+
exports.ManagedResourcesCreateManagedResourcePayloadV2FromJSONTyped = ManagedResourcesCreateManagedResourcePayloadV2FromJSONTyped;
|
|
20
|
+
exports.ManagedResourcesCreateManagedResourcePayloadV2ToJSON = ManagedResourcesCreateManagedResourcePayloadV2ToJSON;
|
|
21
|
+
exports.ManagedResourcesCreateManagedResourcePayloadV2ToJSONTyped = ManagedResourcesCreateManagedResourcePayloadV2ToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum = {
|
|
26
|
+
AlertRoute: 'alert_route',
|
|
27
|
+
AlertSource: 'alert_source',
|
|
28
|
+
ApiKey: 'api_key',
|
|
29
|
+
IncidentForm: 'incident_form',
|
|
30
|
+
IncidentTemplate: 'incident_template',
|
|
31
|
+
EscalationPath: 'escalation_path',
|
|
32
|
+
EscalationPathTemplate: 'escalation_path_template',
|
|
33
|
+
Policy: 'policy',
|
|
34
|
+
Schedule: 'schedule',
|
|
35
|
+
ScheduleSyncTarget: 'schedule_sync_target',
|
|
36
|
+
ScheduleSyncRule: 'schedule_sync_rule',
|
|
37
|
+
Secret: 'secret',
|
|
38
|
+
StatusPageComponent: 'status_page_component',
|
|
39
|
+
StatusPageStructure: 'status_page_structure',
|
|
40
|
+
TeamGroupingPreference: 'team_grouping_preference',
|
|
41
|
+
Workflow: 'workflow',
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the ManagedResourcesCreateManagedResourcePayloadV2 interface.
|
|
45
|
+
*/
|
|
46
|
+
function instanceOfManagedResourcesCreateManagedResourcePayloadV2(value) {
|
|
47
|
+
if (!('annotations' in value) || value['annotations'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('resource_id' in value) || value['resource_id'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if (!('resource_type' in value) || value['resource_type'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
function ManagedResourcesCreateManagedResourcePayloadV2FromJSON(json) {
|
|
56
|
+
return ManagedResourcesCreateManagedResourcePayloadV2FromJSONTyped(json, false);
|
|
57
|
+
}
|
|
58
|
+
function ManagedResourcesCreateManagedResourcePayloadV2FromJSONTyped(json, ignoreDiscriminator) {
|
|
59
|
+
if (json == null) {
|
|
60
|
+
return json;
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
'annotations': json['annotations'],
|
|
64
|
+
'resource_id': json['resource_id'],
|
|
65
|
+
'resource_type': json['resource_type'],
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function ManagedResourcesCreateManagedResourcePayloadV2ToJSON(json) {
|
|
69
|
+
return ManagedResourcesCreateManagedResourcePayloadV2ToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
function ManagedResourcesCreateManagedResourcePayloadV2ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
72
|
+
if (value == null) {
|
|
73
|
+
return value;
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
'annotations': value['annotations'],
|
|
77
|
+
'resource_id': value['resource_id'],
|
|
78
|
+
'resource_type': value['resource_type'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 type { ManagedResourceV2 } from './ManagedResourceV2.js';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ManagedResourcesCreateManagedResourceResultV2
|
|
17
|
+
*/
|
|
18
|
+
export interface ManagedResourcesCreateManagedResourceResultV2 {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
managed_resource: ManagedResourceV2;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the ManagedResourcesCreateManagedResourceResultV2 interface.
|
|
26
|
+
*/
|
|
27
|
+
export declare function instanceOfManagedResourcesCreateManagedResourceResultV2(value: object): value is ManagedResourcesCreateManagedResourceResultV2;
|
|
28
|
+
export declare function ManagedResourcesCreateManagedResourceResultV2FromJSON(json: any): ManagedResourcesCreateManagedResourceResultV2;
|
|
29
|
+
export declare function ManagedResourcesCreateManagedResourceResultV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedResourcesCreateManagedResourceResultV2;
|
|
30
|
+
export declare function ManagedResourcesCreateManagedResourceResultV2ToJSON(json: any): ManagedResourcesCreateManagedResourceResultV2;
|
|
31
|
+
export declare function ManagedResourcesCreateManagedResourceResultV2ToJSONTyped(value?: ManagedResourcesCreateManagedResourceResultV2 | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,51 @@
|
|
|
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.instanceOfManagedResourcesCreateManagedResourceResultV2 = instanceOfManagedResourcesCreateManagedResourceResultV2;
|
|
17
|
+
exports.ManagedResourcesCreateManagedResourceResultV2FromJSON = ManagedResourcesCreateManagedResourceResultV2FromJSON;
|
|
18
|
+
exports.ManagedResourcesCreateManagedResourceResultV2FromJSONTyped = ManagedResourcesCreateManagedResourceResultV2FromJSONTyped;
|
|
19
|
+
exports.ManagedResourcesCreateManagedResourceResultV2ToJSON = ManagedResourcesCreateManagedResourceResultV2ToJSON;
|
|
20
|
+
exports.ManagedResourcesCreateManagedResourceResultV2ToJSONTyped = ManagedResourcesCreateManagedResourceResultV2ToJSONTyped;
|
|
21
|
+
const ManagedResourceV2_js_1 = require("./ManagedResourceV2.js");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the ManagedResourcesCreateManagedResourceResultV2 interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfManagedResourcesCreateManagedResourceResultV2(value) {
|
|
26
|
+
if (!('managed_resource' in value) || value['managed_resource'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function ManagedResourcesCreateManagedResourceResultV2FromJSON(json) {
|
|
31
|
+
return ManagedResourcesCreateManagedResourceResultV2FromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
function ManagedResourcesCreateManagedResourceResultV2FromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if (json == null) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
'managed_resource': (0, ManagedResourceV2_js_1.ManagedResourceV2FromJSON)(json['managed_resource']),
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function ManagedResourcesCreateManagedResourceResultV2ToJSON(json) {
|
|
42
|
+
return ManagedResourcesCreateManagedResourceResultV2ToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function ManagedResourcesCreateManagedResourceResultV2ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'managed_resource': (0, ManagedResourceV2_js_1.ManagedResourceV2ToJSON)(value['managed_resource']),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -892,6 +892,9 @@ export * from './MaintenanceWindowsListResultV1.js';
|
|
|
892
892
|
export * from './MaintenanceWindowsShowResultV1.js';
|
|
893
893
|
export * from './MaintenanceWindowsUpdatePayloadV1.js';
|
|
894
894
|
export * from './MaintenanceWindowsUpdateResultV1.js';
|
|
895
|
+
export * from './ManagedResourceV2.js';
|
|
896
|
+
export * from './ManagedResourcesCreateManagedResourcePayloadV2.js';
|
|
897
|
+
export * from './ManagedResourcesCreateManagedResourceResultV2.js';
|
|
895
898
|
export * from './ManagementMetaV2.js';
|
|
896
899
|
export * from './NewSlackUserGroupPayloadV2.js';
|
|
897
900
|
export * from './OnCallNotificationMethodPhoneDetailsPublicV2.js';
|
package/dist/cjs/models/index.js
CHANGED
|
@@ -910,6 +910,9 @@ __exportStar(require("./MaintenanceWindowsListResultV1.js"), exports);
|
|
|
910
910
|
__exportStar(require("./MaintenanceWindowsShowResultV1.js"), exports);
|
|
911
911
|
__exportStar(require("./MaintenanceWindowsUpdatePayloadV1.js"), exports);
|
|
912
912
|
__exportStar(require("./MaintenanceWindowsUpdateResultV1.js"), exports);
|
|
913
|
+
__exportStar(require("./ManagedResourceV2.js"), exports);
|
|
914
|
+
__exportStar(require("./ManagedResourcesCreateManagedResourcePayloadV2.js"), exports);
|
|
915
|
+
__exportStar(require("./ManagedResourcesCreateManagedResourceResultV2.js"), exports);
|
|
913
916
|
__exportStar(require("./ManagementMetaV2.js"), exports);
|
|
914
917
|
__exportStar(require("./NewSlackUserGroupPayloadV2.js"), exports);
|
|
915
918
|
__exportStar(require("./OnCallNotificationMethodPhoneDetailsPublicV2.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.22.0";
|
package/dist/cjs/version.js
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
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 ManagedResourcesCreateManagedResourcePayloadV2 } from '../models/ManagedResourcesCreateManagedResourcePayloadV2.js';
|
|
14
|
+
import { type ManagedResourcesCreateManagedResourceResultV2 } from '../models/ManagedResourcesCreateManagedResourceResultV2.js';
|
|
15
|
+
export interface ManagedResourcesV2CreateManagedResourceRequest {
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
body: ManagedResourcesCreateManagedResourcePayloadV2;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export declare class ManagedResourcesV2Api extends runtime.BaseAPI {
|
|
25
|
+
/**
|
|
26
|
+
* Creates request options for managedResourcesV2CreateManagedResource without sending the request
|
|
27
|
+
*/
|
|
28
|
+
managedResourcesV2CreateManagedResourceRequestOpts(requestParameters: ManagedResourcesV2CreateManagedResourceRequest): Promise<runtime.RequestOpts>;
|
|
29
|
+
/**
|
|
30
|
+
* Create or update the management record for a resource. This replaces any annotations already stored on it. The annotations set `managed_by`: - `incident.io/terraform/version` sets it to `terraform`. - `incident.io/is-managed-externally` sets it to `external`. If both keys are present, `external` wins. - Neither key sets it to `dashboard`. This doesn\'t change the resource\'s configuration, but `managed_by` controls whether it can be edited in the dashboard. Returning a schedule to `dashboard` also returns its sync rules and targets. The API key must have the update scope for the resource type, e.g. `schedules.update` for a schedule.
|
|
31
|
+
* CreateManagedResource Managed Resources V2
|
|
32
|
+
*/
|
|
33
|
+
managedResourcesV2CreateManagedResourceRaw(requestParameters: ManagedResourcesV2CreateManagedResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ManagedResourcesCreateManagedResourceResultV2>>;
|
|
34
|
+
/**
|
|
35
|
+
* Create or update the management record for a resource. This replaces any annotations already stored on it. The annotations set `managed_by`: - `incident.io/terraform/version` sets it to `terraform`. - `incident.io/is-managed-externally` sets it to `external`. If both keys are present, `external` wins. - Neither key sets it to `dashboard`. This doesn\'t change the resource\'s configuration, but `managed_by` controls whether it can be edited in the dashboard. Returning a schedule to `dashboard` also returns its sync rules and targets. The API key must have the update scope for the resource type, e.g. `schedules.update` for a schedule.
|
|
36
|
+
* CreateManagedResource Managed Resources V2
|
|
37
|
+
*/
|
|
38
|
+
managedResourcesV2CreateManagedResource(requestParameters: ManagedResourcesV2CreateManagedResourceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ManagedResourcesCreateManagedResourceResultV2>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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 { ManagedResourcesCreateManagedResourcePayloadV2ToJSON, } from '../models/ManagedResourcesCreateManagedResourcePayloadV2.js';
|
|
16
|
+
import { ManagedResourcesCreateManagedResourceResultV2FromJSON, } from '../models/ManagedResourcesCreateManagedResourceResultV2.js';
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export class ManagedResourcesV2Api extends runtime.BaseAPI {
|
|
21
|
+
/**
|
|
22
|
+
* Creates request options for managedResourcesV2CreateManagedResource without sending the request
|
|
23
|
+
*/
|
|
24
|
+
async managedResourcesV2CreateManagedResourceRequestOpts(requestParameters) {
|
|
25
|
+
if (requestParameters['body'] == null) {
|
|
26
|
+
throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling managedResourcesV2CreateManagedResource().');
|
|
27
|
+
}
|
|
28
|
+
const queryParameters = {};
|
|
29
|
+
const headerParameters = {};
|
|
30
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
31
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
32
|
+
const token = this.configuration.accessToken;
|
|
33
|
+
const tokenString = await token("BearerAuth", []);
|
|
34
|
+
if (tokenString) {
|
|
35
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
let urlPath = `/v2/managed_resources`;
|
|
39
|
+
return {
|
|
40
|
+
path: urlPath,
|
|
41
|
+
method: 'POST',
|
|
42
|
+
headers: headerParameters,
|
|
43
|
+
query: queryParameters,
|
|
44
|
+
body: ManagedResourcesCreateManagedResourcePayloadV2ToJSON(requestParameters['body']),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Create or update the management record for a resource. This replaces any annotations already stored on it. The annotations set `managed_by`: - `incident.io/terraform/version` sets it to `terraform`. - `incident.io/is-managed-externally` sets it to `external`. If both keys are present, `external` wins. - Neither key sets it to `dashboard`. This doesn\'t change the resource\'s configuration, but `managed_by` controls whether it can be edited in the dashboard. Returning a schedule to `dashboard` also returns its sync rules and targets. The API key must have the update scope for the resource type, e.g. `schedules.update` for a schedule.
|
|
49
|
+
* CreateManagedResource Managed Resources V2
|
|
50
|
+
*/
|
|
51
|
+
async managedResourcesV2CreateManagedResourceRaw(requestParameters, initOverrides) {
|
|
52
|
+
const requestOptions = await this.managedResourcesV2CreateManagedResourceRequestOpts(requestParameters);
|
|
53
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
54
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ManagedResourcesCreateManagedResourceResultV2FromJSON(jsonValue));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Create or update the management record for a resource. This replaces any annotations already stored on it. The annotations set `managed_by`: - `incident.io/terraform/version` sets it to `terraform`. - `incident.io/is-managed-externally` sets it to `external`. If both keys are present, `external` wins. - Neither key sets it to `dashboard`. This doesn\'t change the resource\'s configuration, but `managed_by` controls whether it can be edited in the dashboard. Returning a schedule to `dashboard` also returns its sync rules and targets. The API key must have the update scope for the resource type, e.g. `schedules.update` for a schedule.
|
|
58
|
+
* CreateManagedResource Managed Resources V2
|
|
59
|
+
*/
|
|
60
|
+
async managedResourcesV2CreateManagedResource(requestParameters, initOverrides) {
|
|
61
|
+
const response = await this.managedResourcesV2CreateManagedResourceRaw(requestParameters, initOverrides);
|
|
62
|
+
return await response.value();
|
|
63
|
+
}
|
|
64
|
+
}
|
package/dist/esm/apis/index.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export * from './IncidentUpdatesV2Api.js';
|
|
|
44
44
|
export * from './IncidentsV1Api.js';
|
|
45
45
|
export * from './IncidentsV2Api.js';
|
|
46
46
|
export * from './MaintenanceWindowsV1Api.js';
|
|
47
|
+
export * from './ManagedResourcesV2Api.js';
|
|
47
48
|
export * from './OnCallNotificationPausesV2Api.js';
|
|
48
49
|
export * from './PayConfigsV2Api.js';
|
|
49
50
|
export * from './PayReportsV2Api.js';
|
package/dist/esm/apis/index.js
CHANGED
|
@@ -46,6 +46,7 @@ export * from './IncidentUpdatesV2Api.js';
|
|
|
46
46
|
export * from './IncidentsV1Api.js';
|
|
47
47
|
export * from './IncidentsV2Api.js';
|
|
48
48
|
export * from './MaintenanceWindowsV1Api.js';
|
|
49
|
+
export * from './ManagedResourcesV2Api.js';
|
|
49
50
|
export * from './OnCallNotificationPausesV2Api.js';
|
|
50
51
|
export * from './PayConfigsV2Api.js';
|
|
51
52
|
export * from './PayReportsV2Api.js';
|
|
@@ -0,0 +1,79 @@
|
|
|
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 ManagedResourceV2
|
|
16
|
+
*/
|
|
17
|
+
export interface ManagedResourceV2 {
|
|
18
|
+
/**
|
|
19
|
+
* Annotations that track metadata about this resource
|
|
20
|
+
*/
|
|
21
|
+
annotations: {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* How is this resource managed
|
|
26
|
+
*/
|
|
27
|
+
managed_by: ManagedResourceV2ManagedByEnum;
|
|
28
|
+
/**
|
|
29
|
+
* The ID of the resource that this relates to
|
|
30
|
+
*/
|
|
31
|
+
resource_id: string;
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
resource_type: ManagedResourceV2ResourceTypeEnum;
|
|
36
|
+
/**
|
|
37
|
+
* The url of the external repository where this resource is managed (if there is one)
|
|
38
|
+
*/
|
|
39
|
+
source_url?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @export
|
|
43
|
+
*/
|
|
44
|
+
export declare const ManagedResourceV2ManagedByEnum: {
|
|
45
|
+
readonly Dashboard: "dashboard";
|
|
46
|
+
readonly Terraform: "terraform";
|
|
47
|
+
readonly External: "external";
|
|
48
|
+
};
|
|
49
|
+
export type ManagedResourceV2ManagedByEnum = typeof ManagedResourceV2ManagedByEnum[keyof typeof ManagedResourceV2ManagedByEnum];
|
|
50
|
+
/**
|
|
51
|
+
* @export
|
|
52
|
+
*/
|
|
53
|
+
export declare const ManagedResourceV2ResourceTypeEnum: {
|
|
54
|
+
readonly AlertRoute: "alert_route";
|
|
55
|
+
readonly AlertSource: "alert_source";
|
|
56
|
+
readonly ApiKey: "api_key";
|
|
57
|
+
readonly IncidentForm: "incident_form";
|
|
58
|
+
readonly IncidentTemplate: "incident_template";
|
|
59
|
+
readonly EscalationPath: "escalation_path";
|
|
60
|
+
readonly EscalationPathTemplate: "escalation_path_template";
|
|
61
|
+
readonly Policy: "policy";
|
|
62
|
+
readonly Schedule: "schedule";
|
|
63
|
+
readonly ScheduleSyncTarget: "schedule_sync_target";
|
|
64
|
+
readonly ScheduleSyncRule: "schedule_sync_rule";
|
|
65
|
+
readonly Secret: "secret";
|
|
66
|
+
readonly StatusPageComponent: "status_page_component";
|
|
67
|
+
readonly StatusPageStructure: "status_page_structure";
|
|
68
|
+
readonly TeamGroupingPreference: "team_grouping_preference";
|
|
69
|
+
readonly Workflow: "workflow";
|
|
70
|
+
};
|
|
71
|
+
export type ManagedResourceV2ResourceTypeEnum = typeof ManagedResourceV2ResourceTypeEnum[keyof typeof ManagedResourceV2ResourceTypeEnum];
|
|
72
|
+
/**
|
|
73
|
+
* Check if a given object implements the ManagedResourceV2 interface.
|
|
74
|
+
*/
|
|
75
|
+
export declare function instanceOfManagedResourceV2(value: object): value is ManagedResourceV2;
|
|
76
|
+
export declare function ManagedResourceV2FromJSON(json: any): ManagedResourceV2;
|
|
77
|
+
export declare function ManagedResourceV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedResourceV2;
|
|
78
|
+
export declare function ManagedResourceV2ToJSON(json: any): ManagedResourceV2;
|
|
79
|
+
export declare function ManagedResourceV2ToJSONTyped(value?: ManagedResourceV2 | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,86 @@
|
|
|
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 ManagedResourceV2ManagedByEnum = {
|
|
18
|
+
Dashboard: 'dashboard',
|
|
19
|
+
Terraform: 'terraform',
|
|
20
|
+
External: 'external',
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
export const ManagedResourceV2ResourceTypeEnum = {
|
|
26
|
+
AlertRoute: 'alert_route',
|
|
27
|
+
AlertSource: 'alert_source',
|
|
28
|
+
ApiKey: 'api_key',
|
|
29
|
+
IncidentForm: 'incident_form',
|
|
30
|
+
IncidentTemplate: 'incident_template',
|
|
31
|
+
EscalationPath: 'escalation_path',
|
|
32
|
+
EscalationPathTemplate: 'escalation_path_template',
|
|
33
|
+
Policy: 'policy',
|
|
34
|
+
Schedule: 'schedule',
|
|
35
|
+
ScheduleSyncTarget: 'schedule_sync_target',
|
|
36
|
+
ScheduleSyncRule: 'schedule_sync_rule',
|
|
37
|
+
Secret: 'secret',
|
|
38
|
+
StatusPageComponent: 'status_page_component',
|
|
39
|
+
StatusPageStructure: 'status_page_structure',
|
|
40
|
+
TeamGroupingPreference: 'team_grouping_preference',
|
|
41
|
+
Workflow: 'workflow',
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Check if a given object implements the ManagedResourceV2 interface.
|
|
45
|
+
*/
|
|
46
|
+
export function instanceOfManagedResourceV2(value) {
|
|
47
|
+
if (!('annotations' in value) || value['annotations'] === undefined)
|
|
48
|
+
return false;
|
|
49
|
+
if (!('managed_by' in value) || value['managed_by'] === undefined)
|
|
50
|
+
return false;
|
|
51
|
+
if (!('resource_id' in value) || value['resource_id'] === undefined)
|
|
52
|
+
return false;
|
|
53
|
+
if (!('resource_type' in value) || value['resource_type'] === undefined)
|
|
54
|
+
return false;
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
export function ManagedResourceV2FromJSON(json) {
|
|
58
|
+
return ManagedResourceV2FromJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
export function ManagedResourceV2FromJSONTyped(json, ignoreDiscriminator) {
|
|
61
|
+
if (json == null) {
|
|
62
|
+
return json;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
'annotations': json['annotations'],
|
|
66
|
+
'managed_by': json['managed_by'],
|
|
67
|
+
'resource_id': json['resource_id'],
|
|
68
|
+
'resource_type': json['resource_type'],
|
|
69
|
+
'source_url': json['source_url'] == null ? undefined : json['source_url'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
export function ManagedResourceV2ToJSON(json) {
|
|
73
|
+
return ManagedResourceV2ToJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
export function ManagedResourceV2ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
76
|
+
if (value == null) {
|
|
77
|
+
return value;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
'annotations': value['annotations'],
|
|
81
|
+
'managed_by': value['managed_by'],
|
|
82
|
+
'resource_id': value['resource_id'],
|
|
83
|
+
'resource_type': value['resource_type'],
|
|
84
|
+
'source_url': value['source_url'],
|
|
85
|
+
};
|
|
86
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 ManagedResourcesCreateManagedResourcePayloadV2
|
|
16
|
+
*/
|
|
17
|
+
export interface ManagedResourcesCreateManagedResourcePayloadV2 {
|
|
18
|
+
/**
|
|
19
|
+
* Annotations that track metadata about this resource
|
|
20
|
+
*/
|
|
21
|
+
annotations: {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The ID of the resource that this relates to
|
|
26
|
+
*/
|
|
27
|
+
resource_id: string;
|
|
28
|
+
/**
|
|
29
|
+
* The type of the related resource
|
|
30
|
+
*/
|
|
31
|
+
resource_type: ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @export
|
|
35
|
+
*/
|
|
36
|
+
export declare const ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum: {
|
|
37
|
+
readonly AlertRoute: "alert_route";
|
|
38
|
+
readonly AlertSource: "alert_source";
|
|
39
|
+
readonly ApiKey: "api_key";
|
|
40
|
+
readonly IncidentForm: "incident_form";
|
|
41
|
+
readonly IncidentTemplate: "incident_template";
|
|
42
|
+
readonly EscalationPath: "escalation_path";
|
|
43
|
+
readonly EscalationPathTemplate: "escalation_path_template";
|
|
44
|
+
readonly Policy: "policy";
|
|
45
|
+
readonly Schedule: "schedule";
|
|
46
|
+
readonly ScheduleSyncTarget: "schedule_sync_target";
|
|
47
|
+
readonly ScheduleSyncRule: "schedule_sync_rule";
|
|
48
|
+
readonly Secret: "secret";
|
|
49
|
+
readonly StatusPageComponent: "status_page_component";
|
|
50
|
+
readonly StatusPageStructure: "status_page_structure";
|
|
51
|
+
readonly TeamGroupingPreference: "team_grouping_preference";
|
|
52
|
+
readonly Workflow: "workflow";
|
|
53
|
+
};
|
|
54
|
+
export type ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum = typeof ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum[keyof typeof ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum];
|
|
55
|
+
/**
|
|
56
|
+
* Check if a given object implements the ManagedResourcesCreateManagedResourcePayloadV2 interface.
|
|
57
|
+
*/
|
|
58
|
+
export declare function instanceOfManagedResourcesCreateManagedResourcePayloadV2(value: object): value is ManagedResourcesCreateManagedResourcePayloadV2;
|
|
59
|
+
export declare function ManagedResourcesCreateManagedResourcePayloadV2FromJSON(json: any): ManagedResourcesCreateManagedResourcePayloadV2;
|
|
60
|
+
export declare function ManagedResourcesCreateManagedResourcePayloadV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedResourcesCreateManagedResourcePayloadV2;
|
|
61
|
+
export declare function ManagedResourcesCreateManagedResourcePayloadV2ToJSON(json: any): ManagedResourcesCreateManagedResourcePayloadV2;
|
|
62
|
+
export declare function ManagedResourcesCreateManagedResourcePayloadV2ToJSONTyped(value?: ManagedResourcesCreateManagedResourcePayloadV2 | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,72 @@
|
|
|
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 ManagedResourcesCreateManagedResourcePayloadV2ResourceTypeEnum = {
|
|
18
|
+
AlertRoute: 'alert_route',
|
|
19
|
+
AlertSource: 'alert_source',
|
|
20
|
+
ApiKey: 'api_key',
|
|
21
|
+
IncidentForm: 'incident_form',
|
|
22
|
+
IncidentTemplate: 'incident_template',
|
|
23
|
+
EscalationPath: 'escalation_path',
|
|
24
|
+
EscalationPathTemplate: 'escalation_path_template',
|
|
25
|
+
Policy: 'policy',
|
|
26
|
+
Schedule: 'schedule',
|
|
27
|
+
ScheduleSyncTarget: 'schedule_sync_target',
|
|
28
|
+
ScheduleSyncRule: 'schedule_sync_rule',
|
|
29
|
+
Secret: 'secret',
|
|
30
|
+
StatusPageComponent: 'status_page_component',
|
|
31
|
+
StatusPageStructure: 'status_page_structure',
|
|
32
|
+
TeamGroupingPreference: 'team_grouping_preference',
|
|
33
|
+
Workflow: 'workflow',
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Check if a given object implements the ManagedResourcesCreateManagedResourcePayloadV2 interface.
|
|
37
|
+
*/
|
|
38
|
+
export function instanceOfManagedResourcesCreateManagedResourcePayloadV2(value) {
|
|
39
|
+
if (!('annotations' in value) || value['annotations'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('resource_id' in value) || value['resource_id'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('resource_type' in value) || value['resource_type'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
export function ManagedResourcesCreateManagedResourcePayloadV2FromJSON(json) {
|
|
48
|
+
return ManagedResourcesCreateManagedResourcePayloadV2FromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
export function ManagedResourcesCreateManagedResourcePayloadV2FromJSONTyped(json, ignoreDiscriminator) {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'annotations': json['annotations'],
|
|
56
|
+
'resource_id': json['resource_id'],
|
|
57
|
+
'resource_type': json['resource_type'],
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
export function ManagedResourcesCreateManagedResourcePayloadV2ToJSON(json) {
|
|
61
|
+
return ManagedResourcesCreateManagedResourcePayloadV2ToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
export function ManagedResourcesCreateManagedResourcePayloadV2ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
64
|
+
if (value == null) {
|
|
65
|
+
return value;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
'annotations': value['annotations'],
|
|
69
|
+
'resource_id': value['resource_id'],
|
|
70
|
+
'resource_type': value['resource_type'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 type { ManagedResourceV2 } from './ManagedResourceV2.js';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface ManagedResourcesCreateManagedResourceResultV2
|
|
17
|
+
*/
|
|
18
|
+
export interface ManagedResourcesCreateManagedResourceResultV2 {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
managed_resource: ManagedResourceV2;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the ManagedResourcesCreateManagedResourceResultV2 interface.
|
|
26
|
+
*/
|
|
27
|
+
export declare function instanceOfManagedResourcesCreateManagedResourceResultV2(value: object): value is ManagedResourcesCreateManagedResourceResultV2;
|
|
28
|
+
export declare function ManagedResourcesCreateManagedResourceResultV2FromJSON(json: any): ManagedResourcesCreateManagedResourceResultV2;
|
|
29
|
+
export declare function ManagedResourcesCreateManagedResourceResultV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): ManagedResourcesCreateManagedResourceResultV2;
|
|
30
|
+
export declare function ManagedResourcesCreateManagedResourceResultV2ToJSON(json: any): ManagedResourcesCreateManagedResourceResultV2;
|
|
31
|
+
export declare function ManagedResourcesCreateManagedResourceResultV2ToJSONTyped(value?: ManagedResourcesCreateManagedResourceResultV2 | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { ManagedResourceV2FromJSON, ManagedResourceV2ToJSON, } from './ManagedResourceV2.js';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the ManagedResourcesCreateManagedResourceResultV2 interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfManagedResourcesCreateManagedResourceResultV2(value) {
|
|
19
|
+
if (!('managed_resource' in value) || value['managed_resource'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function ManagedResourcesCreateManagedResourceResultV2FromJSON(json) {
|
|
24
|
+
return ManagedResourcesCreateManagedResourceResultV2FromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function ManagedResourcesCreateManagedResourceResultV2FromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'managed_resource': ManagedResourceV2FromJSON(json['managed_resource']),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function ManagedResourcesCreateManagedResourceResultV2ToJSON(json) {
|
|
35
|
+
return ManagedResourcesCreateManagedResourceResultV2ToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function ManagedResourcesCreateManagedResourceResultV2ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'managed_resource': ManagedResourceV2ToJSON(value['managed_resource']),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -892,6 +892,9 @@ export * from './MaintenanceWindowsListResultV1.js';
|
|
|
892
892
|
export * from './MaintenanceWindowsShowResultV1.js';
|
|
893
893
|
export * from './MaintenanceWindowsUpdatePayloadV1.js';
|
|
894
894
|
export * from './MaintenanceWindowsUpdateResultV1.js';
|
|
895
|
+
export * from './ManagedResourceV2.js';
|
|
896
|
+
export * from './ManagedResourcesCreateManagedResourcePayloadV2.js';
|
|
897
|
+
export * from './ManagedResourcesCreateManagedResourceResultV2.js';
|
|
895
898
|
export * from './ManagementMetaV2.js';
|
|
896
899
|
export * from './NewSlackUserGroupPayloadV2.js';
|
|
897
900
|
export * from './OnCallNotificationMethodPhoneDetailsPublicV2.js';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -894,6 +894,9 @@ export * from './MaintenanceWindowsListResultV1.js';
|
|
|
894
894
|
export * from './MaintenanceWindowsShowResultV1.js';
|
|
895
895
|
export * from './MaintenanceWindowsUpdatePayloadV1.js';
|
|
896
896
|
export * from './MaintenanceWindowsUpdateResultV1.js';
|
|
897
|
+
export * from './ManagedResourceV2.js';
|
|
898
|
+
export * from './ManagedResourcesCreateManagedResourcePayloadV2.js';
|
|
899
|
+
export * from './ManagedResourcesCreateManagedResourceResultV2.js';
|
|
897
900
|
export * from './ManagementMetaV2.js';
|
|
898
901
|
export * from './NewSlackUserGroupPayloadV2.js';
|
|
899
902
|
export * from './OnCallNotificationMethodPhoneDetailsPublicV2.js';
|
package/dist/esm/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.22.0";
|
package/dist/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Written by `make build` from package.json. Do not edit.
|
|
2
|
-
export const VERSION = "2.
|
|
2
|
+
export const VERSION = "2.22.0";
|