statuspage.io
Version:
A statuspage.io API client
49 lines (48 loc) • 1.82 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Endpoint = void 0;
exports.Endpoint = {
ACTIVE_JSON: 'upcoming.json',
API_V2_BASE: 'api/v2',
COMPONENTS_JSON: 'components.json',
INCIDENTS: 'incidents',
INCIDENTS_JSON: 'incidents.json',
SCHEDULED_MAINTENANCES: 'scheduled-maintenances',
SCHEDULED_MAINTENANCES_JSON: 'scheduled-maintenances.json',
STATUS_JSON: 'status.json',
SUBSCRIBERS_JSON: 'subscribers.json',
SUMMARY_JSON: 'summary.json',
UNRESOLVED_JSON: 'unresolved.json',
UPCOMING_JSON: 'upcoming.json',
Incidents: {
all() {
return `/${exports.Endpoint.API_V2_BASE}/${exports.Endpoint.INCIDENTS_JSON}`;
},
unresolved() {
return `/${exports.Endpoint.API_V2_BASE}/${exports.Endpoint.INCIDENTS}/${exports.Endpoint.UNRESOLVED_JSON}`;
},
},
ScheduledMaintenances: {
active() {
return `/${exports.Endpoint.API_V2_BASE}/${exports.Endpoint.SCHEDULED_MAINTENANCES}/${exports.Endpoint.ACTIVE_JSON}`;
},
all() {
return `/${exports.Endpoint.API_V2_BASE}/${exports.Endpoint.SCHEDULED_MAINTENANCES_JSON}`;
},
upcoming() {
return `/${exports.Endpoint.API_V2_BASE}/${exports.Endpoint.SCHEDULED_MAINTENANCES}/${exports.Endpoint.UPCOMING_JSON}`;
},
},
components() {
return `/${exports.Endpoint.API_V2_BASE}/${exports.Endpoint.COMPONENTS_JSON}`;
},
summary() {
return `/${exports.Endpoint.API_V2_BASE}/${exports.Endpoint.SUMMARY_JSON}`;
},
status() {
return `/${exports.Endpoint.API_V2_BASE}/${exports.Endpoint.STATUS_JSON}`;
},
subscribers() {
return `/${exports.Endpoint.API_V2_BASE}/${exports.Endpoint.SUBSCRIBERS_JSON}`;
},
};
;