@incident-io/sdk 2.20.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.
Files changed (45) hide show
  1. package/dist/cjs/apis/ManagedResourcesV2Api.d.ts +39 -0
  2. package/dist/cjs/apis/ManagedResourcesV2Api.js +101 -0
  3. package/dist/cjs/apis/index.d.ts +1 -0
  4. package/dist/cjs/apis/index.js +1 -0
  5. package/dist/cjs/models/APIKeyRoleV1.d.ts +1 -0
  6. package/dist/cjs/models/APIKeyRoleV1.js +1 -0
  7. package/dist/cjs/models/APIKeysCreatePayloadV1.d.ts +1 -0
  8. package/dist/cjs/models/APIKeysCreatePayloadV1.js +1 -0
  9. package/dist/cjs/models/APIKeysUpdatePayloadV1.d.ts +1 -0
  10. package/dist/cjs/models/APIKeysUpdatePayloadV1.js +1 -0
  11. package/dist/cjs/models/IdentityV1.d.ts +1 -0
  12. package/dist/cjs/models/IdentityV1.js +1 -0
  13. package/dist/cjs/models/ManagedResourceV2.d.ts +79 -0
  14. package/dist/cjs/models/ManagedResourceV2.js +94 -0
  15. package/dist/cjs/models/ManagedResourcesCreateManagedResourcePayloadV2.d.ts +62 -0
  16. package/dist/cjs/models/ManagedResourcesCreateManagedResourcePayloadV2.js +80 -0
  17. package/dist/cjs/models/ManagedResourcesCreateManagedResourceResultV2.d.ts +31 -0
  18. package/dist/cjs/models/ManagedResourcesCreateManagedResourceResultV2.js +51 -0
  19. package/dist/cjs/models/index.d.ts +3 -0
  20. package/dist/cjs/models/index.js +3 -0
  21. package/dist/cjs/version.d.ts +1 -1
  22. package/dist/cjs/version.js +1 -1
  23. package/dist/esm/apis/ManagedResourcesV2Api.d.ts +39 -0
  24. package/dist/esm/apis/ManagedResourcesV2Api.js +64 -0
  25. package/dist/esm/apis/index.d.ts +1 -0
  26. package/dist/esm/apis/index.js +1 -0
  27. package/dist/esm/models/APIKeyRoleV1.d.ts +1 -0
  28. package/dist/esm/models/APIKeyRoleV1.js +1 -0
  29. package/dist/esm/models/APIKeysCreatePayloadV1.d.ts +1 -0
  30. package/dist/esm/models/APIKeysCreatePayloadV1.js +1 -0
  31. package/dist/esm/models/APIKeysUpdatePayloadV1.d.ts +1 -0
  32. package/dist/esm/models/APIKeysUpdatePayloadV1.js +1 -0
  33. package/dist/esm/models/IdentityV1.d.ts +1 -0
  34. package/dist/esm/models/IdentityV1.js +1 -0
  35. package/dist/esm/models/ManagedResourceV2.d.ts +79 -0
  36. package/dist/esm/models/ManagedResourceV2.js +86 -0
  37. package/dist/esm/models/ManagedResourcesCreateManagedResourcePayloadV2.d.ts +62 -0
  38. package/dist/esm/models/ManagedResourcesCreateManagedResourcePayloadV2.js +72 -0
  39. package/dist/esm/models/ManagedResourcesCreateManagedResourceResultV2.d.ts +31 -0
  40. package/dist/esm/models/ManagedResourcesCreateManagedResourceResultV2.js +44 -0
  41. package/dist/esm/models/index.d.ts +3 -0
  42. package/dist/esm/models/index.js +3 -0
  43. package/dist/esm/version.d.ts +1 -1
  44. package/dist/esm/version.js +1 -1
  45. 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;
@@ -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';
@@ -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);
@@ -32,6 +32,7 @@ export declare const APIKeyRoleV1NameEnum: {
32
32
  readonly IncidentCreator: "incident_creator";
33
33
  readonly IncidentEditor: "incident_editor";
34
34
  readonly ManageSettings: "manage_settings";
35
+ readonly GlossaryEntriesManage: "glossary_entries_manage";
35
36
  readonly GlobalAccess: "global_access";
36
37
  readonly CatalogViewer: "catalog_viewer";
37
38
  readonly CatalogEditor: "catalog_editor";
@@ -27,6 +27,7 @@ exports.APIKeyRoleV1NameEnum = {
27
27
  IncidentCreator: 'incident_creator',
28
28
  IncidentEditor: 'incident_editor',
29
29
  ManageSettings: 'manage_settings',
30
+ GlossaryEntriesManage: 'glossary_entries_manage',
30
31
  GlobalAccess: 'global_access',
31
32
  CatalogViewer: 'catalog_viewer',
32
33
  CatalogEditor: 'catalog_editor',
@@ -44,6 +44,7 @@ export declare const APIKeysCreatePayloadV1RoleNamesEnum: {
44
44
  readonly IncidentCreator: "incident_creator";
45
45
  readonly IncidentEditor: "incident_editor";
46
46
  readonly ManageSettings: "manage_settings";
47
+ readonly GlossaryEntriesManage: "glossary_entries_manage";
47
48
  readonly GlobalAccess: "global_access";
48
49
  readonly CatalogViewer: "catalog_viewer";
49
50
  readonly CatalogEditor: "catalog_editor";
@@ -27,6 +27,7 @@ exports.APIKeysCreatePayloadV1RoleNamesEnum = {
27
27
  IncidentCreator: 'incident_creator',
28
28
  IncidentEditor: 'incident_editor',
29
29
  ManageSettings: 'manage_settings',
30
+ GlossaryEntriesManage: 'glossary_entries_manage',
30
31
  GlobalAccess: 'global_access',
31
32
  CatalogViewer: 'catalog_viewer',
32
33
  CatalogEditor: 'catalog_editor',
@@ -44,6 +44,7 @@ export declare const APIKeysUpdatePayloadV1RoleNamesEnum: {
44
44
  readonly IncidentCreator: "incident_creator";
45
45
  readonly IncidentEditor: "incident_editor";
46
46
  readonly ManageSettings: "manage_settings";
47
+ readonly GlossaryEntriesManage: "glossary_entries_manage";
47
48
  readonly GlobalAccess: "global_access";
48
49
  readonly CatalogViewer: "catalog_viewer";
49
50
  readonly CatalogEditor: "catalog_editor";
@@ -27,6 +27,7 @@ exports.APIKeysUpdatePayloadV1RoleNamesEnum = {
27
27
  IncidentCreator: 'incident_creator',
28
28
  IncidentEditor: 'incident_editor',
29
29
  ManageSettings: 'manage_settings',
30
+ GlossaryEntriesManage: 'glossary_entries_manage',
30
31
  GlobalAccess: 'global_access',
31
32
  CatalogViewer: 'catalog_viewer',
32
33
  CatalogEditor: 'catalog_editor',
@@ -45,6 +45,7 @@ export declare const IdentityV1RolesEnum: {
45
45
  readonly IncidentCreator: "incident_creator";
46
46
  readonly IncidentEditor: "incident_editor";
47
47
  readonly ManageSettings: "manage_settings";
48
+ readonly GlossaryEntriesManage: "glossary_entries_manage";
48
49
  readonly GlobalAccess: "global_access";
49
50
  readonly CatalogViewer: "catalog_viewer";
50
51
  readonly CatalogEditor: "catalog_editor";
@@ -28,6 +28,7 @@ exports.IdentityV1RolesEnum = {
28
28
  IncidentCreator: 'incident_creator',
29
29
  IncidentEditor: 'incident_editor',
30
30
  ManageSettings: 'manage_settings',
31
+ GlossaryEntriesManage: 'glossary_entries_manage',
31
32
  GlobalAccess: 'global_access',
32
33
  CatalogViewer: 'catalog_viewer',
33
34
  CatalogEditor: 'catalog_editor',
@@ -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';
@@ -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);