@incident-io/sdk 2.8.0 → 2.9.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/StatusPageComponentsV2Api.d.ts +129 -0
- package/dist/cjs/apis/StatusPageComponentsV2Api.js +273 -0
- package/dist/cjs/apis/index.d.ts +1 -0
- package/dist/cjs/apis/index.js +1 -0
- package/dist/cjs/models/StatusPageComponentV2.d.ts +46 -0
- package/dist/cjs/models/StatusPageComponentV2.js +61 -0
- package/dist/cjs/models/StatusPageComponentsCreatePayloadV2.d.ts +34 -0
- package/dist/cjs/models/StatusPageComponentsCreatePayloadV2.js +52 -0
- package/dist/cjs/models/StatusPageComponentsCreateResultV2.d.ts +31 -0
- package/dist/cjs/models/StatusPageComponentsCreateResultV2.js +51 -0
- package/dist/cjs/models/StatusPageComponentsListResultV2.d.ts +31 -0
- package/dist/cjs/models/StatusPageComponentsListResultV2.js +51 -0
- package/dist/cjs/models/StatusPageComponentsShowResultV2.d.ts +31 -0
- package/dist/cjs/models/StatusPageComponentsShowResultV2.js +51 -0
- package/dist/cjs/models/StatusPageComponentsUpdatePayloadV2.d.ts +34 -0
- package/dist/cjs/models/StatusPageComponentsUpdatePayloadV2.js +52 -0
- package/dist/cjs/models/StatusPageComponentsUpdateResultV2.d.ts +31 -0
- package/dist/cjs/models/StatusPageComponentsUpdateResultV2.js +51 -0
- package/dist/cjs/models/index.d.ts +7 -0
- package/dist/cjs/models/index.js +7 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/apis/StatusPageComponentsV2Api.d.ts +129 -0
- package/dist/esm/apis/StatusPageComponentsV2Api.js +236 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/StatusPageComponentV2.d.ts +46 -0
- package/dist/esm/models/StatusPageComponentV2.js +54 -0
- package/dist/esm/models/StatusPageComponentsCreatePayloadV2.d.ts +34 -0
- package/dist/esm/models/StatusPageComponentsCreatePayloadV2.js +45 -0
- package/dist/esm/models/StatusPageComponentsCreateResultV2.d.ts +31 -0
- package/dist/esm/models/StatusPageComponentsCreateResultV2.js +44 -0
- package/dist/esm/models/StatusPageComponentsListResultV2.d.ts +31 -0
- package/dist/esm/models/StatusPageComponentsListResultV2.js +44 -0
- package/dist/esm/models/StatusPageComponentsShowResultV2.d.ts +31 -0
- package/dist/esm/models/StatusPageComponentsShowResultV2.js +44 -0
- package/dist/esm/models/StatusPageComponentsUpdatePayloadV2.d.ts +34 -0
- package/dist/esm/models/StatusPageComponentsUpdatePayloadV2.js +45 -0
- package/dist/esm/models/StatusPageComponentsUpdateResultV2.d.ts +31 -0
- package/dist/esm/models/StatusPageComponentsUpdateResultV2.js +44 -0
- package/dist/esm/models/index.d.ts +7 -0
- package/dist/esm/models/index.js +7 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,129 @@
|
|
|
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 StatusPageComponentsCreatePayloadV2 } from '../models/StatusPageComponentsCreatePayloadV2.js';
|
|
14
|
+
import { type StatusPageComponentsCreateResultV2 } from '../models/StatusPageComponentsCreateResultV2.js';
|
|
15
|
+
import { type StatusPageComponentsListResultV2 } from '../models/StatusPageComponentsListResultV2.js';
|
|
16
|
+
import { type StatusPageComponentsShowResultV2 } from '../models/StatusPageComponentsShowResultV2.js';
|
|
17
|
+
import { type StatusPageComponentsUpdatePayloadV2 } from '../models/StatusPageComponentsUpdatePayloadV2.js';
|
|
18
|
+
import { type StatusPageComponentsUpdateResultV2 } from '../models/StatusPageComponentsUpdateResultV2.js';
|
|
19
|
+
export interface StatusPageComponentsV2CreateRequest {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
body: StatusPageComponentsCreatePayloadV2;
|
|
24
|
+
}
|
|
25
|
+
export interface StatusPageComponentsV2DestroyRequest {
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier of the status page component
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
31
|
+
export interface StatusPageComponentsV2ShowRequest {
|
|
32
|
+
/**
|
|
33
|
+
* Unique identifier of the status page component
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
}
|
|
37
|
+
export interface StatusPageComponentsV2UpdateRequest {
|
|
38
|
+
/**
|
|
39
|
+
* Unique identifier of the status page component
|
|
40
|
+
*/
|
|
41
|
+
id: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
body: StatusPageComponentsUpdatePayloadV2;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* statusPageComponentsV2List takes no parameters yet. The argument exists so that the first
|
|
49
|
+
* one the API adds is a new optional field here, not a change to the
|
|
50
|
+
* method's signature. Pass request options as the second argument.
|
|
51
|
+
*/
|
|
52
|
+
export interface StatusPageComponentsV2ListRequest {
|
|
53
|
+
[key: string]: never;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
export declare class StatusPageComponentsV2Api extends runtime.BaseAPI {
|
|
59
|
+
/**
|
|
60
|
+
* Creates request options for statusPageComponentsV2Create without sending the request
|
|
61
|
+
*/
|
|
62
|
+
statusPageComponentsV2CreateRequestOpts(requestParameters: StatusPageComponentsV2CreateRequest): Promise<runtime.RequestOpts>;
|
|
63
|
+
/**
|
|
64
|
+
* Create a status page component. Placement on a page is controlled separately via status page structures.
|
|
65
|
+
* Create Status Page Components V2
|
|
66
|
+
*/
|
|
67
|
+
statusPageComponentsV2CreateRaw(requestParameters: StatusPageComponentsV2CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StatusPageComponentsCreateResultV2>>;
|
|
68
|
+
/**
|
|
69
|
+
* Create a status page component. Placement on a page is controlled separately via status page structures.
|
|
70
|
+
* Create Status Page Components V2
|
|
71
|
+
*/
|
|
72
|
+
statusPageComponentsV2Create(requestParameters: StatusPageComponentsV2CreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StatusPageComponentsCreateResultV2>;
|
|
73
|
+
/**
|
|
74
|
+
* Creates request options for statusPageComponentsV2Destroy without sending the request
|
|
75
|
+
*/
|
|
76
|
+
statusPageComponentsV2DestroyRequestOpts(requestParameters: StatusPageComponentsV2DestroyRequest): Promise<runtime.RequestOpts>;
|
|
77
|
+
/**
|
|
78
|
+
* Archive a status page component.
|
|
79
|
+
* Destroy Status Page Components V2
|
|
80
|
+
*/
|
|
81
|
+
statusPageComponentsV2DestroyRaw(requestParameters: StatusPageComponentsV2DestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
82
|
+
/**
|
|
83
|
+
* Archive a status page component.
|
|
84
|
+
* Destroy Status Page Components V2
|
|
85
|
+
*/
|
|
86
|
+
statusPageComponentsV2Destroy(requestParameters: StatusPageComponentsV2DestroyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Creates request options for statusPageComponentsV2List without sending the request
|
|
89
|
+
*/
|
|
90
|
+
statusPageComponentsV2ListRequestOpts(requestParameters: StatusPageComponentsV2ListRequest): Promise<runtime.RequestOpts>;
|
|
91
|
+
/**
|
|
92
|
+
* List all status page components for an organisation.
|
|
93
|
+
* List Status Page Components V2
|
|
94
|
+
*/
|
|
95
|
+
statusPageComponentsV2ListRaw(requestParameters: StatusPageComponentsV2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StatusPageComponentsListResultV2>>;
|
|
96
|
+
/**
|
|
97
|
+
* List all status page components for an organisation.
|
|
98
|
+
* List Status Page Components V2
|
|
99
|
+
*/
|
|
100
|
+
statusPageComponentsV2List(requestParameters?: StatusPageComponentsV2ListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StatusPageComponentsListResultV2>;
|
|
101
|
+
/**
|
|
102
|
+
* Creates request options for statusPageComponentsV2Show without sending the request
|
|
103
|
+
*/
|
|
104
|
+
statusPageComponentsV2ShowRequestOpts(requestParameters: StatusPageComponentsV2ShowRequest): Promise<runtime.RequestOpts>;
|
|
105
|
+
/**
|
|
106
|
+
* Show a single status page component.
|
|
107
|
+
* Show Status Page Components V2
|
|
108
|
+
*/
|
|
109
|
+
statusPageComponentsV2ShowRaw(requestParameters: StatusPageComponentsV2ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StatusPageComponentsShowResultV2>>;
|
|
110
|
+
/**
|
|
111
|
+
* Show a single status page component.
|
|
112
|
+
* Show Status Page Components V2
|
|
113
|
+
*/
|
|
114
|
+
statusPageComponentsV2Show(requestParameters: StatusPageComponentsV2ShowRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StatusPageComponentsShowResultV2>;
|
|
115
|
+
/**
|
|
116
|
+
* Creates request options for statusPageComponentsV2Update without sending the request
|
|
117
|
+
*/
|
|
118
|
+
statusPageComponentsV2UpdateRequestOpts(requestParameters: StatusPageComponentsV2UpdateRequest): Promise<runtime.RequestOpts>;
|
|
119
|
+
/**
|
|
120
|
+
* Update a status page component\'s name and description.
|
|
121
|
+
* Update Status Page Components V2
|
|
122
|
+
*/
|
|
123
|
+
statusPageComponentsV2UpdateRaw(requestParameters: StatusPageComponentsV2UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<StatusPageComponentsUpdateResultV2>>;
|
|
124
|
+
/**
|
|
125
|
+
* Update a status page component\'s name and description.
|
|
126
|
+
* Update Status Page Components V2
|
|
127
|
+
*/
|
|
128
|
+
statusPageComponentsV2Update(requestParameters: StatusPageComponentsV2UpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<StatusPageComponentsUpdateResultV2>;
|
|
129
|
+
}
|
|
@@ -0,0 +1,273 @@
|
|
|
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.StatusPageComponentsV2Api = void 0;
|
|
50
|
+
const runtime = __importStar(require("../runtime.js"));
|
|
51
|
+
const StatusPageComponentsCreatePayloadV2_js_1 = require("../models/StatusPageComponentsCreatePayloadV2.js");
|
|
52
|
+
const StatusPageComponentsCreateResultV2_js_1 = require("../models/StatusPageComponentsCreateResultV2.js");
|
|
53
|
+
const StatusPageComponentsListResultV2_js_1 = require("../models/StatusPageComponentsListResultV2.js");
|
|
54
|
+
const StatusPageComponentsShowResultV2_js_1 = require("../models/StatusPageComponentsShowResultV2.js");
|
|
55
|
+
const StatusPageComponentsUpdatePayloadV2_js_1 = require("../models/StatusPageComponentsUpdatePayloadV2.js");
|
|
56
|
+
const StatusPageComponentsUpdateResultV2_js_1 = require("../models/StatusPageComponentsUpdateResultV2.js");
|
|
57
|
+
/**
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
class StatusPageComponentsV2Api extends runtime.BaseAPI {
|
|
61
|
+
/**
|
|
62
|
+
* Creates request options for statusPageComponentsV2Create without sending the request
|
|
63
|
+
*/
|
|
64
|
+
async statusPageComponentsV2CreateRequestOpts(requestParameters) {
|
|
65
|
+
if (requestParameters['body'] == null) {
|
|
66
|
+
throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling statusPageComponentsV2Create().');
|
|
67
|
+
}
|
|
68
|
+
const queryParameters = {};
|
|
69
|
+
const headerParameters = {};
|
|
70
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
71
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
72
|
+
const token = this.configuration.accessToken;
|
|
73
|
+
const tokenString = await token("BearerAuth", []);
|
|
74
|
+
if (tokenString) {
|
|
75
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
let urlPath = `/v2/status_page_components`;
|
|
79
|
+
return {
|
|
80
|
+
path: urlPath,
|
|
81
|
+
method: 'POST',
|
|
82
|
+
headers: headerParameters,
|
|
83
|
+
query: queryParameters,
|
|
84
|
+
body: (0, StatusPageComponentsCreatePayloadV2_js_1.StatusPageComponentsCreatePayloadV2ToJSON)(requestParameters['body']),
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Create a status page component. Placement on a page is controlled separately via status page structures.
|
|
89
|
+
* Create Status Page Components V2
|
|
90
|
+
*/
|
|
91
|
+
async statusPageComponentsV2CreateRaw(requestParameters, initOverrides) {
|
|
92
|
+
const requestOptions = await this.statusPageComponentsV2CreateRequestOpts(requestParameters);
|
|
93
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
94
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, StatusPageComponentsCreateResultV2_js_1.StatusPageComponentsCreateResultV2FromJSON)(jsonValue));
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Create a status page component. Placement on a page is controlled separately via status page structures.
|
|
98
|
+
* Create Status Page Components V2
|
|
99
|
+
*/
|
|
100
|
+
async statusPageComponentsV2Create(requestParameters, initOverrides) {
|
|
101
|
+
const response = await this.statusPageComponentsV2CreateRaw(requestParameters, initOverrides);
|
|
102
|
+
return await response.value();
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Creates request options for statusPageComponentsV2Destroy without sending the request
|
|
106
|
+
*/
|
|
107
|
+
async statusPageComponentsV2DestroyRequestOpts(requestParameters) {
|
|
108
|
+
if (requestParameters['id'] == null) {
|
|
109
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling statusPageComponentsV2Destroy().');
|
|
110
|
+
}
|
|
111
|
+
const queryParameters = {};
|
|
112
|
+
const headerParameters = {};
|
|
113
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
114
|
+
const token = this.configuration.accessToken;
|
|
115
|
+
const tokenString = await token("BearerAuth", []);
|
|
116
|
+
if (tokenString) {
|
|
117
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
let urlPath = `/v2/status_page_components/{id}`;
|
|
121
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
122
|
+
return {
|
|
123
|
+
path: urlPath,
|
|
124
|
+
method: 'DELETE',
|
|
125
|
+
headers: headerParameters,
|
|
126
|
+
query: queryParameters,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Archive a status page component.
|
|
131
|
+
* Destroy Status Page Components V2
|
|
132
|
+
*/
|
|
133
|
+
async statusPageComponentsV2DestroyRaw(requestParameters, initOverrides) {
|
|
134
|
+
const requestOptions = await this.statusPageComponentsV2DestroyRequestOpts(requestParameters);
|
|
135
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
136
|
+
return new runtime.VoidApiResponse(response);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Archive a status page component.
|
|
140
|
+
* Destroy Status Page Components V2
|
|
141
|
+
*/
|
|
142
|
+
async statusPageComponentsV2Destroy(requestParameters, initOverrides) {
|
|
143
|
+
await this.statusPageComponentsV2DestroyRaw(requestParameters, initOverrides);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Creates request options for statusPageComponentsV2List without sending the request
|
|
147
|
+
*/
|
|
148
|
+
async statusPageComponentsV2ListRequestOpts(requestParameters) {
|
|
149
|
+
const queryParameters = {};
|
|
150
|
+
const headerParameters = {};
|
|
151
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
152
|
+
const token = this.configuration.accessToken;
|
|
153
|
+
const tokenString = await token("BearerAuth", []);
|
|
154
|
+
if (tokenString) {
|
|
155
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
let urlPath = `/v2/status_page_components`;
|
|
159
|
+
return {
|
|
160
|
+
path: urlPath,
|
|
161
|
+
method: 'GET',
|
|
162
|
+
headers: headerParameters,
|
|
163
|
+
query: queryParameters,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* List all status page components for an organisation.
|
|
168
|
+
* List Status Page Components V2
|
|
169
|
+
*/
|
|
170
|
+
async statusPageComponentsV2ListRaw(requestParameters, initOverrides) {
|
|
171
|
+
const requestOptions = await this.statusPageComponentsV2ListRequestOpts(requestParameters);
|
|
172
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
173
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, StatusPageComponentsListResultV2_js_1.StatusPageComponentsListResultV2FromJSON)(jsonValue));
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* List all status page components for an organisation.
|
|
177
|
+
* List Status Page Components V2
|
|
178
|
+
*/
|
|
179
|
+
async statusPageComponentsV2List(requestParameters = {}, initOverrides) {
|
|
180
|
+
const response = await this.statusPageComponentsV2ListRaw(requestParameters, initOverrides);
|
|
181
|
+
return await response.value();
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Creates request options for statusPageComponentsV2Show without sending the request
|
|
185
|
+
*/
|
|
186
|
+
async statusPageComponentsV2ShowRequestOpts(requestParameters) {
|
|
187
|
+
if (requestParameters['id'] == null) {
|
|
188
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling statusPageComponentsV2Show().');
|
|
189
|
+
}
|
|
190
|
+
const queryParameters = {};
|
|
191
|
+
const headerParameters = {};
|
|
192
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
193
|
+
const token = this.configuration.accessToken;
|
|
194
|
+
const tokenString = await token("BearerAuth", []);
|
|
195
|
+
if (tokenString) {
|
|
196
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
let urlPath = `/v2/status_page_components/{id}`;
|
|
200
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
201
|
+
return {
|
|
202
|
+
path: urlPath,
|
|
203
|
+
method: 'GET',
|
|
204
|
+
headers: headerParameters,
|
|
205
|
+
query: queryParameters,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Show a single status page component.
|
|
210
|
+
* Show Status Page Components V2
|
|
211
|
+
*/
|
|
212
|
+
async statusPageComponentsV2ShowRaw(requestParameters, initOverrides) {
|
|
213
|
+
const requestOptions = await this.statusPageComponentsV2ShowRequestOpts(requestParameters);
|
|
214
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
215
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, StatusPageComponentsShowResultV2_js_1.StatusPageComponentsShowResultV2FromJSON)(jsonValue));
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Show a single status page component.
|
|
219
|
+
* Show Status Page Components V2
|
|
220
|
+
*/
|
|
221
|
+
async statusPageComponentsV2Show(requestParameters, initOverrides) {
|
|
222
|
+
const response = await this.statusPageComponentsV2ShowRaw(requestParameters, initOverrides);
|
|
223
|
+
return await response.value();
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Creates request options for statusPageComponentsV2Update without sending the request
|
|
227
|
+
*/
|
|
228
|
+
async statusPageComponentsV2UpdateRequestOpts(requestParameters) {
|
|
229
|
+
if (requestParameters['id'] == null) {
|
|
230
|
+
throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling statusPageComponentsV2Update().');
|
|
231
|
+
}
|
|
232
|
+
if (requestParameters['body'] == null) {
|
|
233
|
+
throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling statusPageComponentsV2Update().');
|
|
234
|
+
}
|
|
235
|
+
const queryParameters = {};
|
|
236
|
+
const headerParameters = {};
|
|
237
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
238
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
239
|
+
const token = this.configuration.accessToken;
|
|
240
|
+
const tokenString = await token("BearerAuth", []);
|
|
241
|
+
if (tokenString) {
|
|
242
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
let urlPath = `/v2/status_page_components/{id}`;
|
|
246
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
247
|
+
return {
|
|
248
|
+
path: urlPath,
|
|
249
|
+
method: 'PUT',
|
|
250
|
+
headers: headerParameters,
|
|
251
|
+
query: queryParameters,
|
|
252
|
+
body: (0, StatusPageComponentsUpdatePayloadV2_js_1.StatusPageComponentsUpdatePayloadV2ToJSON)(requestParameters['body']),
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Update a status page component\'s name and description.
|
|
257
|
+
* Update Status Page Components V2
|
|
258
|
+
*/
|
|
259
|
+
async statusPageComponentsV2UpdateRaw(requestParameters, initOverrides) {
|
|
260
|
+
const requestOptions = await this.statusPageComponentsV2UpdateRequestOpts(requestParameters);
|
|
261
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
262
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, StatusPageComponentsUpdateResultV2_js_1.StatusPageComponentsUpdateResultV2FromJSON)(jsonValue));
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Update a status page component\'s name and description.
|
|
266
|
+
* Update Status Page Components V2
|
|
267
|
+
*/
|
|
268
|
+
async statusPageComponentsV2Update(requestParameters, initOverrides) {
|
|
269
|
+
const response = await this.statusPageComponentsV2UpdateRaw(requestParameters, initOverrides);
|
|
270
|
+
return await response.value();
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
exports.StatusPageComponentsV2Api = StatusPageComponentsV2Api;
|
package/dist/cjs/apis/index.d.ts
CHANGED
|
@@ -52,6 +52,7 @@ export * from './ScheduleSyncTargetsV2Api.js';
|
|
|
52
52
|
export * from './SchedulesV2Api.js';
|
|
53
53
|
export * from './SecretsV2Api.js';
|
|
54
54
|
export * from './SeveritiesV1Api.js';
|
|
55
|
+
export * from './StatusPageComponentsV2Api.js';
|
|
55
56
|
export * from './StatusPagesV1Api.js';
|
|
56
57
|
export * from './StatusPagesV2Api.js';
|
|
57
58
|
export * from './TeamsV3Api.js';
|
package/dist/cjs/apis/index.js
CHANGED
|
@@ -70,6 +70,7 @@ __exportStar(require("./ScheduleSyncTargetsV2Api.js"), exports);
|
|
|
70
70
|
__exportStar(require("./SchedulesV2Api.js"), exports);
|
|
71
71
|
__exportStar(require("./SecretsV2Api.js"), exports);
|
|
72
72
|
__exportStar(require("./SeveritiesV1Api.js"), exports);
|
|
73
|
+
__exportStar(require("./StatusPageComponentsV2Api.js"), exports);
|
|
73
74
|
__exportStar(require("./StatusPagesV1Api.js"), exports);
|
|
74
75
|
__exportStar(require("./StatusPagesV2Api.js"), exports);
|
|
75
76
|
__exportStar(require("./TeamsV3Api.js"), exports);
|
|
@@ -0,0 +1,46 @@
|
|
|
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 { ManagementMetaV2 } from './ManagementMetaV2.js';
|
|
13
|
+
/**
|
|
14
|
+
* A status page component that can appear on one or more status pages.
|
|
15
|
+
*
|
|
16
|
+
* Components are organisation-scoped. Placement on a page is controlled by that
|
|
17
|
+
* page's structure, not by ownership of the component.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface StatusPageComponentV2
|
|
20
|
+
*/
|
|
21
|
+
export interface StatusPageComponentV2 {
|
|
22
|
+
/**
|
|
23
|
+
* Optional short description of this component
|
|
24
|
+
*/
|
|
25
|
+
description?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Unique identifier for this component
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
management_meta: ManagementMetaV2;
|
|
34
|
+
/**
|
|
35
|
+
* Human-readable name for the component
|
|
36
|
+
*/
|
|
37
|
+
name: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the StatusPageComponentV2 interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function instanceOfStatusPageComponentV2(value: object): value is StatusPageComponentV2;
|
|
43
|
+
export declare function StatusPageComponentV2FromJSON(json: any): StatusPageComponentV2;
|
|
44
|
+
export declare function StatusPageComponentV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusPageComponentV2;
|
|
45
|
+
export declare function StatusPageComponentV2ToJSON(json: any): StatusPageComponentV2;
|
|
46
|
+
export declare function StatusPageComponentV2ToJSONTyped(value?: StatusPageComponentV2 | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,61 @@
|
|
|
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.instanceOfStatusPageComponentV2 = instanceOfStatusPageComponentV2;
|
|
17
|
+
exports.StatusPageComponentV2FromJSON = StatusPageComponentV2FromJSON;
|
|
18
|
+
exports.StatusPageComponentV2FromJSONTyped = StatusPageComponentV2FromJSONTyped;
|
|
19
|
+
exports.StatusPageComponentV2ToJSON = StatusPageComponentV2ToJSON;
|
|
20
|
+
exports.StatusPageComponentV2ToJSONTyped = StatusPageComponentV2ToJSONTyped;
|
|
21
|
+
const ManagementMetaV2_js_1 = require("./ManagementMetaV2.js");
|
|
22
|
+
/**
|
|
23
|
+
* Check if a given object implements the StatusPageComponentV2 interface.
|
|
24
|
+
*/
|
|
25
|
+
function instanceOfStatusPageComponentV2(value) {
|
|
26
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
27
|
+
return false;
|
|
28
|
+
if (!('management_meta' in value) || value['management_meta'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function StatusPageComponentV2FromJSON(json) {
|
|
35
|
+
return StatusPageComponentV2FromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
function StatusPageComponentV2FromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if (json == null) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
43
|
+
'id': json['id'],
|
|
44
|
+
'management_meta': (0, ManagementMetaV2_js_1.ManagementMetaV2FromJSON)(json['management_meta']),
|
|
45
|
+
'name': json['name'],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function StatusPageComponentV2ToJSON(json) {
|
|
49
|
+
return StatusPageComponentV2ToJSONTyped(json, false);
|
|
50
|
+
}
|
|
51
|
+
function StatusPageComponentV2ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
52
|
+
if (value == null) {
|
|
53
|
+
return value;
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
'description': value['description'],
|
|
57
|
+
'id': value['id'],
|
|
58
|
+
'management_meta': (0, ManagementMetaV2_js_1.ManagementMetaV2ToJSON)(value['management_meta']),
|
|
59
|
+
'name': value['name'],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 StatusPageComponentsCreatePayloadV2
|
|
16
|
+
*/
|
|
17
|
+
export interface StatusPageComponentsCreatePayloadV2 {
|
|
18
|
+
/**
|
|
19
|
+
* Optional short description of this component
|
|
20
|
+
*/
|
|
21
|
+
description?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Human-readable name for the component
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given object implements the StatusPageComponentsCreatePayloadV2 interface.
|
|
29
|
+
*/
|
|
30
|
+
export declare function instanceOfStatusPageComponentsCreatePayloadV2(value: object): value is StatusPageComponentsCreatePayloadV2;
|
|
31
|
+
export declare function StatusPageComponentsCreatePayloadV2FromJSON(json: any): StatusPageComponentsCreatePayloadV2;
|
|
32
|
+
export declare function StatusPageComponentsCreatePayloadV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusPageComponentsCreatePayloadV2;
|
|
33
|
+
export declare function StatusPageComponentsCreatePayloadV2ToJSON(json: any): StatusPageComponentsCreatePayloadV2;
|
|
34
|
+
export declare function StatusPageComponentsCreatePayloadV2ToJSONTyped(value?: StatusPageComponentsCreatePayloadV2 | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
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.instanceOfStatusPageComponentsCreatePayloadV2 = instanceOfStatusPageComponentsCreatePayloadV2;
|
|
17
|
+
exports.StatusPageComponentsCreatePayloadV2FromJSON = StatusPageComponentsCreatePayloadV2FromJSON;
|
|
18
|
+
exports.StatusPageComponentsCreatePayloadV2FromJSONTyped = StatusPageComponentsCreatePayloadV2FromJSONTyped;
|
|
19
|
+
exports.StatusPageComponentsCreatePayloadV2ToJSON = StatusPageComponentsCreatePayloadV2ToJSON;
|
|
20
|
+
exports.StatusPageComponentsCreatePayloadV2ToJSONTyped = StatusPageComponentsCreatePayloadV2ToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the StatusPageComponentsCreatePayloadV2 interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfStatusPageComponentsCreatePayloadV2(value) {
|
|
25
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
function StatusPageComponentsCreatePayloadV2FromJSON(json) {
|
|
30
|
+
return StatusPageComponentsCreatePayloadV2FromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
function StatusPageComponentsCreatePayloadV2FromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
38
|
+
'name': json['name'],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function StatusPageComponentsCreatePayloadV2ToJSON(json) {
|
|
42
|
+
return StatusPageComponentsCreatePayloadV2ToJSONTyped(json, false);
|
|
43
|
+
}
|
|
44
|
+
function StatusPageComponentsCreatePayloadV2ToJSONTyped(value, ignoreDiscriminator = false) {
|
|
45
|
+
if (value == null) {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'description': value['description'],
|
|
50
|
+
'name': value['name'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -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 { StatusPageComponentV2 } from './StatusPageComponentV2.js';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface StatusPageComponentsCreateResultV2
|
|
17
|
+
*/
|
|
18
|
+
export interface StatusPageComponentsCreateResultV2 {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
status_page_component: StatusPageComponentV2;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the StatusPageComponentsCreateResultV2 interface.
|
|
26
|
+
*/
|
|
27
|
+
export declare function instanceOfStatusPageComponentsCreateResultV2(value: object): value is StatusPageComponentsCreateResultV2;
|
|
28
|
+
export declare function StatusPageComponentsCreateResultV2FromJSON(json: any): StatusPageComponentsCreateResultV2;
|
|
29
|
+
export declare function StatusPageComponentsCreateResultV2FromJSONTyped(json: any, ignoreDiscriminator: boolean): StatusPageComponentsCreateResultV2;
|
|
30
|
+
export declare function StatusPageComponentsCreateResultV2ToJSON(json: any): StatusPageComponentsCreateResultV2;
|
|
31
|
+
export declare function StatusPageComponentsCreateResultV2ToJSONTyped(value?: StatusPageComponentsCreateResultV2 | null, ignoreDiscriminator?: boolean): any;
|