@pagerduty/backstage-plugin-common 0.3.0 → 0.5.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/CHANGELOG.md +16 -0
- package/dist/index.d.ts +141 -1
- package/dist/types.cjs.js.map +1 -1
- package/dist/types.esm.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @pagerduty/backstage-plugin-common
|
|
2
2
|
|
|
3
|
+
## 0.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- bee64f1: Release the service mappings feature
|
|
8
|
+
|
|
9
|
+
## 0.4.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 9941800: Refactor the service mappings screen and add an auto-matching functionality to mass map PagerDuty service to Backstage entities
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- ef0af04: Moved to a process/polling based loading of the automatic mapping matches
|
|
18
|
+
|
|
3
19
|
## 0.3.0
|
|
4
20
|
|
|
5
21
|
### Minor Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -364,6 +364,146 @@ type AutoMatchEntityMappingsResponse = {
|
|
|
364
364
|
matches: AutoMatchEntityMapping[];
|
|
365
365
|
statistics: AutoMatchStatistics;
|
|
366
366
|
};
|
|
367
|
+
/** @public */
|
|
368
|
+
type AutoMatchJobStatus = 'pending' | 'running' | 'completed' | 'failed';
|
|
369
|
+
/** @public */
|
|
370
|
+
type AutoMatchStartResponse = {
|
|
371
|
+
jobId: string;
|
|
372
|
+
status: AutoMatchJobStatus;
|
|
373
|
+
};
|
|
374
|
+
/** @public */
|
|
375
|
+
type AutoMatchStatusResponse = {
|
|
376
|
+
jobId: string;
|
|
377
|
+
status: AutoMatchJobStatus;
|
|
378
|
+
createdAt: string;
|
|
379
|
+
completedAt?: string;
|
|
380
|
+
result?: AutoMatchEntityMappingsResponse;
|
|
381
|
+
error?: string;
|
|
382
|
+
};
|
|
383
|
+
/** @public */
|
|
384
|
+
type PagerDutyCustomField = {
|
|
385
|
+
id: string;
|
|
386
|
+
data_type: string;
|
|
387
|
+
description?: string;
|
|
388
|
+
display_name: string;
|
|
389
|
+
enabled: boolean;
|
|
390
|
+
field_type: string;
|
|
391
|
+
name: string;
|
|
392
|
+
backstageEntityMappingPath?: string;
|
|
393
|
+
};
|
|
394
|
+
/** @public */
|
|
395
|
+
type PagerDutyCustomFieldCreateRequest = {
|
|
396
|
+
field: {
|
|
397
|
+
data_type: 'string';
|
|
398
|
+
description?: string;
|
|
399
|
+
display_name: string;
|
|
400
|
+
enabled: boolean;
|
|
401
|
+
field_type: 'single_value';
|
|
402
|
+
name: string;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
405
|
+
/** @public */
|
|
406
|
+
type PagerDutyCustomFieldResponse = {
|
|
407
|
+
field: PagerDutyCustomField;
|
|
408
|
+
};
|
|
409
|
+
/** @public */
|
|
410
|
+
type PagerDutyCustomFieldsResponse = {
|
|
411
|
+
fields: PagerDutyCustomField[];
|
|
412
|
+
};
|
|
413
|
+
/** @public */
|
|
414
|
+
type BackstageCustomField = {
|
|
415
|
+
id: number;
|
|
416
|
+
pagerdutyCustomFieldId: string;
|
|
417
|
+
pagerdutyCustomFieldDisplayName: string;
|
|
418
|
+
pagerdutyCustomFieldEnabled: boolean;
|
|
419
|
+
backstageEntityMappingPath: string;
|
|
420
|
+
pagerdutySubdomain: string;
|
|
421
|
+
description?: string;
|
|
422
|
+
createdAt: Date;
|
|
423
|
+
updatedAt: Date;
|
|
424
|
+
};
|
|
425
|
+
/** @public */
|
|
426
|
+
type BackstageCustomFieldCreateRequest = {
|
|
427
|
+
name: string;
|
|
428
|
+
entityPath: string;
|
|
429
|
+
description?: string;
|
|
430
|
+
};
|
|
431
|
+
/** @public */
|
|
432
|
+
type BackstageCustomFieldUpdateRequest = {
|
|
433
|
+
name: string;
|
|
434
|
+
entityPath: string;
|
|
435
|
+
description?: string;
|
|
436
|
+
};
|
|
437
|
+
/** @public */
|
|
438
|
+
type BackstageCustomFieldToggleEnabledRequest = {
|
|
439
|
+
enabled: boolean;
|
|
440
|
+
};
|
|
441
|
+
/** @public */
|
|
442
|
+
type PagerDutyCustomFieldUpdateRequest = {
|
|
443
|
+
field: {
|
|
444
|
+
display_name: string;
|
|
445
|
+
description?: string;
|
|
446
|
+
enabled?: boolean;
|
|
447
|
+
};
|
|
448
|
+
};
|
|
449
|
+
/** @public */
|
|
450
|
+
type BackstageCustomFieldsResponse = {
|
|
451
|
+
customFields: BackstageCustomField[];
|
|
452
|
+
};
|
|
453
|
+
/** @public */
|
|
454
|
+
type PagerDutyServiceCustomFieldValue = {
|
|
455
|
+
id: string;
|
|
456
|
+
value: string | null;
|
|
457
|
+
};
|
|
458
|
+
/** @public */
|
|
459
|
+
type PagerDutyServiceCustomFieldValuesRequest = {
|
|
460
|
+
custom_fields: PagerDutyServiceCustomFieldValue[];
|
|
461
|
+
};
|
|
462
|
+
/** @public */
|
|
463
|
+
type PagerDutyServiceCustomFieldValuesResponse = {
|
|
464
|
+
custom_fields: PagerDutyServiceCustomFieldValue[];
|
|
465
|
+
};
|
|
466
|
+
/** @public */
|
|
467
|
+
type CustomFieldSyncLog = {
|
|
468
|
+
id: number;
|
|
469
|
+
timestamp: Date;
|
|
470
|
+
errorCode: string;
|
|
471
|
+
customFieldId: string;
|
|
472
|
+
customFieldName: string;
|
|
473
|
+
entityPath: string;
|
|
474
|
+
serviceId: string;
|
|
475
|
+
serviceName: string;
|
|
476
|
+
errorMessage: string;
|
|
477
|
+
subdomain: string;
|
|
478
|
+
};
|
|
479
|
+
/** @public */
|
|
480
|
+
type CustomFieldSyncLogCreateRequest = {
|
|
481
|
+
errorCode: string;
|
|
482
|
+
customFieldId: string;
|
|
483
|
+
customFieldName: string;
|
|
484
|
+
entityPath: string;
|
|
485
|
+
serviceId: string;
|
|
486
|
+
serviceName: string;
|
|
487
|
+
errorMessage: string;
|
|
488
|
+
};
|
|
489
|
+
/** @public */
|
|
490
|
+
type CustomFieldSyncLogSeverity = 'info' | 'warning' | 'error';
|
|
491
|
+
/** @public */
|
|
492
|
+
type CustomFieldSyncLogFilters = {
|
|
493
|
+
search?: string;
|
|
494
|
+
severity?: CustomFieldSyncLogSeverity;
|
|
495
|
+
customFieldName?: string;
|
|
496
|
+
entityPath?: string;
|
|
497
|
+
serviceName?: string;
|
|
498
|
+
};
|
|
499
|
+
/** @public */
|
|
500
|
+
type CustomFieldSyncLogsResponse = {
|
|
501
|
+
logs: CustomFieldSyncLog[];
|
|
502
|
+
total: number;
|
|
503
|
+
customFieldNames: string[];
|
|
504
|
+
entityPaths: string[];
|
|
505
|
+
serviceNames: string[];
|
|
506
|
+
};
|
|
367
507
|
|
|
368
508
|
/** @public */
|
|
369
509
|
declare const PAGERDUTY_INTEGRATION_KEY = "pagerduty.com/integration-key";
|
|
@@ -371,4 +511,4 @@ declare const PAGERDUTY_INTEGRATION_KEY = "pagerduty.com/integration-key";
|
|
|
371
511
|
declare const PAGERDUTY_SERVICE_ID = "pagerduty.com/service-id";
|
|
372
512
|
|
|
373
513
|
export { HttpError, PAGERDUTY_INTEGRATION_KEY, PAGERDUTY_SERVICE_ID };
|
|
374
|
-
export type { AutoMatchBackstageComponent, AutoMatchEntityMapping, AutoMatchEntityMappingsResponse, AutoMatchPagerDutyService, AutoMatchScoreBreakdown, AutoMatchStatistics, FormattedBackstageEntity, PagerDutyAbilitiesResponse, PagerDutyAccountConfig, PagerDutyChangeEvent, PagerDutyChangeEventsResponse, PagerDutyEnhancedEntityMappingsResponse, PagerDutyEntityMapping, PagerDutyEntityMappingResponse, PagerDutyEntityMappingsResponse, PagerDutyEscalationPoliciesResponse, PagerDutyEscalationPolicy, PagerDutyIncident, PagerDutyIncidentUrgencyRule, PagerDutyIncidentsResponse, PagerDutyIntegration, PagerDutyIntegrationResponse, PagerDutyOAuthConfig, PagerDutyOnCall, PagerDutyOnCallUsersResponse, PagerDutyOnCallsResponse, PagerDutyService, PagerDutyServiceDependency, PagerDutyServiceDependencyReference, PagerDutyServiceDependencyResponse, PagerDutyServiceMetrics, PagerDutyServiceMetricsResponse, PagerDutyServiceResponse, PagerDutyServiceStandard, PagerDutyServiceStandards, PagerDutyServiceStandardsResponse, PagerDutyServicesAPIResponse, PagerDutyServicesResponse, PagerDutySetting, PagerDutySettings, PagerDutyTeam, PagerDutyTeamsResponse, PagerDutyUser, PagerDutyVendor };
|
|
514
|
+
export type { AutoMatchBackstageComponent, AutoMatchEntityMapping, AutoMatchEntityMappingsResponse, AutoMatchJobStatus, AutoMatchPagerDutyService, AutoMatchScoreBreakdown, AutoMatchStartResponse, AutoMatchStatistics, AutoMatchStatusResponse, BackstageCustomField, BackstageCustomFieldCreateRequest, BackstageCustomFieldToggleEnabledRequest, BackstageCustomFieldUpdateRequest, BackstageCustomFieldsResponse, CustomFieldSyncLog, CustomFieldSyncLogCreateRequest, CustomFieldSyncLogFilters, CustomFieldSyncLogSeverity, CustomFieldSyncLogsResponse, FormattedBackstageEntity, PagerDutyAbilitiesResponse, PagerDutyAccountConfig, PagerDutyChangeEvent, PagerDutyChangeEventsResponse, PagerDutyCustomField, PagerDutyCustomFieldCreateRequest, PagerDutyCustomFieldResponse, PagerDutyCustomFieldUpdateRequest, PagerDutyCustomFieldsResponse, PagerDutyEnhancedEntityMappingsResponse, PagerDutyEntityMapping, PagerDutyEntityMappingResponse, PagerDutyEntityMappingsResponse, PagerDutyEscalationPoliciesResponse, PagerDutyEscalationPolicy, PagerDutyIncident, PagerDutyIncidentUrgencyRule, PagerDutyIncidentsResponse, PagerDutyIntegration, PagerDutyIntegrationResponse, PagerDutyOAuthConfig, PagerDutyOnCall, PagerDutyOnCallUsersResponse, PagerDutyOnCallsResponse, PagerDutyService, PagerDutyServiceCustomFieldValue, PagerDutyServiceCustomFieldValuesRequest, PagerDutyServiceCustomFieldValuesResponse, PagerDutyServiceDependency, PagerDutyServiceDependencyReference, PagerDutyServiceDependencyResponse, PagerDutyServiceMetrics, PagerDutyServiceMetricsResponse, PagerDutyServiceResponse, PagerDutyServiceStandard, PagerDutyServiceStandards, PagerDutyServiceStandardsResponse, PagerDutyServicesAPIResponse, PagerDutyServicesResponse, PagerDutySetting, PagerDutySettings, PagerDutyTeam, PagerDutyTeamsResponse, PagerDutyUser, PagerDutyVendor };
|
package/dist/types.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs.js","sources":["../src/types.ts"],"sourcesContent":["/** @public */\nexport type PagerDutyIncident = {\n id: string;\n title: string;\n status: string;\n html_url: string;\n assignments: [\n {\n assignee: PagerDutyUser;\n },\n ];\n service: PagerDutyService;\n created_at: string;\n urgency?: string;\n};\n\n/** @public */\nexport type PagerDutyUser = {\n id: string;\n summary: string;\n email: string;\n html_url: string;\n name: string;\n avatar_url: string;\n};\n\n/** @public */\nexport type PagerDutyChangeEvent = {\n id: string;\n integration: PagerDutyIntegration[];\n source: string;\n html_url?: string;\n links: [\n {\n href: string;\n text: string;\n },\n ];\n summary: string;\n timestamp: string;\n};\n\n/** @public */\nexport type PagerDutyService = {\n id: string;\n name: string;\n description?: string;\n escalation_policy: PagerDutyEscalationPolicy;\n alert_creation?: string;\n incident_urgency_rule?: PagerDutyIncidentUrgencyRule;\n integrations?: PagerDutyIntegration[];\n teams?: PagerDutyTeam[];\n status?: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEscalationPolicy = {\n id: string;\n name: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyIncidentUrgencyRule = {\n type: string;\n urgency: string;\n};\n\n/** @public */\nexport type PagerDutyIntegration = {\n id: string;\n type: string;\n summary?: string;\n self?: string;\n html_url?: string;\n name?: string;\n service?: PagerDutyService;\n created_at?: string;\n vendor?: PagerDutyVendor;\n integration_key?: string;\n};\n\n/** @public */\nexport type PagerDutyTeam = {\n id: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n name: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyTeamsResponse = {\n teams: PagerDutyTeam[];\n more?: boolean;\n limit?: number;\n offset?: number;\n total?: number;\n};\n\n/** @public */\nexport type PagerDutyOnCall = {\n user: PagerDutyUser;\n escalation_level: number;\n};\n\n/** @public */\nexport type PagerDutyOnCallUsersResponse = {\n users: PagerDutyUser[];\n};\n\n/** @public */\nexport type PagerDutyVendor = {\n id: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n};\n\n/** @public */\nexport type PagerDutyServiceStandards = {\n resource_id: string;\n resource_type: string;\n score: {\n passing: number;\n total: number;\n };\n standards: PagerDutyServiceStandard[];\n};\n\n/** @public */\nexport type PagerDutyServiceStandard = {\n active: boolean;\n description: string;\n id: string;\n name: string;\n pass: boolean;\n type: string;\n};\n\n/** @public */\nexport type PagerDutyServiceStandardsResponse = {\n standards: PagerDutyServiceStandards;\n};\n\n/** @public */\nexport type PagerDutyServiceMetrics = {\n mean_assignment_count?: number;\n mean_engaged_seconds?: number;\n mean_engaged_user_count?: number;\n mean_seconds_to_engage?: number;\n mean_seconds_to_first_ack?: number;\n mean_seconds_to_mobilize?: number;\n mean_seconds_to_resolve?: number;\n mean_user_defined_engaged_seconds?: number;\n service_id: string;\n service_name?: string;\n team_id?: string;\n team_name?: string;\n total_business_hour_interruptions?: number;\n total_down_time_minutes?: number;\n total_engaged_seconds?: number;\n total_escalation_count?: number;\n total_high_urgency_incidents?: number;\n total_incident_count?: number;\n total_incidents_acknowledged?: number;\n total_incidents_auto_resolved?: number;\n total_incidents_manual_escalated?: number;\n total_incidents_reassigned?: number;\n total_incidents_timeout_escalated?: number;\n total_interruptions?: number;\n total_low_urgency_incidents?: number;\n total_major_incidents?: number;\n total_notifications?: number;\n total_off_hour_interruptions?: number;\n total_sleep_hour_interruptions?: number;\n total_snoozed_seconds?: number;\n total_user_defined_engaged_seconds?: number;\n up_time_pct?: number;\n};\n\n/** @public */\nexport type PagerDutyServiceMetricsResponse = {\n metrics: PagerDutyServiceMetrics[];\n};\n\n/** @public */\nexport type PagerDutyServicesResponse = {\n services: PagerDutyService[];\n};\n\n/** @public */\nexport type PagerDutyServicesAPIResponse = PagerDutyServicesResponse & {\n offset: number;\n limit: number;\n total: number | null;\n more: boolean;\n};\n\n/** @public */\nexport type PagerDutyServiceResponse = {\n service: PagerDutyService;\n};\n\n/** @public */\nexport type PagerDutyIncidentsResponse = {\n incidents: PagerDutyIncident[];\n};\n\n/** @public */\nexport type PagerDutyChangeEventsResponse = {\n change_events: PagerDutyChangeEvent[];\n};\n\n/** @public */\nexport type PagerDutyOnCallsResponse = {\n oncalls: PagerDutyOnCall[];\n};\n\n/** @public */\nexport type PagerDutyIntegrationResponse = {\n integration: PagerDutyIntegration;\n};\n\n/** @public */\nexport type PagerDutyEscalationPoliciesResponse = {\n escalation_policies: PagerDutyEscalationPolicy[];\n limit?: number;\n offset?: number;\n more?: boolean;\n total?: number;\n};\n\n/** @public */\nexport type PagerDutyAbilitiesResponse = {\n abilities: string[];\n};\n\n/** @public */\nexport class HttpError extends Error {\n constructor(message: string, status: number) {\n super(message);\n this.status = status;\n }\n\n status: number;\n}\n\n/** @public */\nexport type PagerDutyOAuthConfig = {\n clientId: string;\n clientSecret: string;\n region?: string;\n subDomain: string;\n identityUrl?: string;\n};\n\n/** @public */\nexport type PagerDutyAccountConfig = {\n id: string;\n isDefault?: boolean;\n eventsBaseUrl?: string;\n apiBaseUrl?: string;\n apiToken?: string;\n oauth?: PagerDutyOAuthConfig;\n};\n\n/** @public */\nexport type PagerDutyEntityMapping = {\n entityRef: string;\n entityName?: string;\n serviceId: string;\n serviceName?: string;\n integrationKey?: string;\n serviceUrl?: string;\n status?: 'NotMapped' | 'InSync' | 'OutOfSync';\n processedDate?: Date;\n team?: string;\n escalationPolicy?: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEntityMappingsResponse = {\n mappings: PagerDutyEntityMapping[];\n};\n\n/** @public */\nexport type FormattedBackstageEntity = {\n name: string;\n id: string;\n namespace: string;\n type: string;\n system: string;\n owner: string;\n lifecycle: string;\n annotations: {\n 'pagerduty.com/integration-key': string;\n 'pagerduty.com/service-id': string;\n };\n // PagerDuty properties\n serviceName?: string;\n serviceUrl?: string;\n team?: string;\n escalationPolicy?: string;\n status?: 'NotMapped' | 'InSync' | 'OutOfSync' | 'ErrorWhenFetchingService';\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEnhancedEntityMappingsResponse = {\n entities: FormattedBackstageEntity[];\n totalCount: number;\n};\n\n/** @public */\nexport type PagerDutyEntityMappingResponse = {\n mapping: PagerDutyEntityMapping;\n};\n\n/** @public */\nexport type PagerDutyServiceDependencyReference = {\n id: string;\n type: string;\n};\n\n/** @public */\nexport type PagerDutyServiceDependency = {\n id?: string;\n type?: string;\n supporting_service: PagerDutyServiceDependencyReference;\n dependent_service: PagerDutyServiceDependencyReference;\n};\n\n/** @public */\nexport type PagerDutyServiceDependencyResponse = {\n relationships: PagerDutyServiceDependency[];\n};\n\n/** @public */\nexport type PagerDutySetting = {\n id: string;\n value: 'backstage' | 'pagerduty' | 'both' | 'disabled';\n};\n\n/** @public */\nexport type PagerDutySettings = {\n settings: PagerDutySetting[];\n};\n\n/** @public */\nexport type AutoMatchScoreBreakdown = {\n baseScore: number;\n exactMatch: boolean;\n teamMatch: boolean;\n acronymMatch: boolean;\n rawScore: number;\n};\n\n/** @public */\nexport type AutoMatchPagerDutyService = {\n serviceId: string;\n name: string;\n team: string;\n account?: string;\n};\n\n/** @public */\nexport type AutoMatchBackstageComponent = {\n entityRef: string;\n name: string;\n owner: string;\n};\n\n/** @public */\nexport type AutoMatchEntityMapping = {\n pagerDutyService: AutoMatchPagerDutyService;\n backstageComponent: AutoMatchBackstageComponent;\n score: number;\n confidence: string;\n scoreBreakdown: AutoMatchScoreBreakdown;\n};\n\n/** @public */\nexport type AutoMatchStatistics = {\n totalPagerDutyServices: number;\n totalBackstageComponents: number;\n totalPossibleComparisons: number;\n matchesFound: number;\n exactMatches: number;\n highConfidenceMatches: number;\n mediumConfidenceMatches: number;\n threshold: number;\n loadTimeMs: number;\n matchTimeMs: number;\n totalTimeMs: number;\n};\n\n/** @public */\nexport type AutoMatchEntityMappingsResponse = {\n matches: AutoMatchEntityMapping[];\n statistics: AutoMatchStatistics;\n};\n"],"names":[],"mappings":";;AA2PO,MAAM,kBAAkB,KAAA,CAAM;AAAA,EACnC,WAAA,CAAY,SAAiB,MAAA,EAAgB;AAC3C,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AAAA,EAEA,MAAA;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"types.cjs.js","sources":["../src/types.ts"],"sourcesContent":["/** @public */\nexport type PagerDutyIncident = {\n id: string;\n title: string;\n status: string;\n html_url: string;\n assignments: [\n {\n assignee: PagerDutyUser;\n },\n ];\n service: PagerDutyService;\n created_at: string;\n urgency?: string;\n};\n\n/** @public */\nexport type PagerDutyUser = {\n id: string;\n summary: string;\n email: string;\n html_url: string;\n name: string;\n avatar_url: string;\n};\n\n/** @public */\nexport type PagerDutyChangeEvent = {\n id: string;\n integration: PagerDutyIntegration[];\n source: string;\n html_url?: string;\n links: [\n {\n href: string;\n text: string;\n },\n ];\n summary: string;\n timestamp: string;\n};\n\n/** @public */\nexport type PagerDutyService = {\n id: string;\n name: string;\n description?: string;\n escalation_policy: PagerDutyEscalationPolicy;\n alert_creation?: string;\n incident_urgency_rule?: PagerDutyIncidentUrgencyRule;\n integrations?: PagerDutyIntegration[];\n teams?: PagerDutyTeam[];\n status?: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEscalationPolicy = {\n id: string;\n name: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyIncidentUrgencyRule = {\n type: string;\n urgency: string;\n};\n\n/** @public */\nexport type PagerDutyIntegration = {\n id: string;\n type: string;\n summary?: string;\n self?: string;\n html_url?: string;\n name?: string;\n service?: PagerDutyService;\n created_at?: string;\n vendor?: PagerDutyVendor;\n integration_key?: string;\n};\n\n/** @public */\nexport type PagerDutyTeam = {\n id: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n name: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyTeamsResponse = {\n teams: PagerDutyTeam[];\n more?: boolean;\n limit?: number;\n offset?: number;\n total?: number;\n};\n\n/** @public */\nexport type PagerDutyOnCall = {\n user: PagerDutyUser;\n escalation_level: number;\n};\n\n/** @public */\nexport type PagerDutyOnCallUsersResponse = {\n users: PagerDutyUser[];\n};\n\n/** @public */\nexport type PagerDutyVendor = {\n id: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n};\n\n/** @public */\nexport type PagerDutyServiceStandards = {\n resource_id: string;\n resource_type: string;\n score: {\n passing: number;\n total: number;\n };\n standards: PagerDutyServiceStandard[];\n};\n\n/** @public */\nexport type PagerDutyServiceStandard = {\n active: boolean;\n description: string;\n id: string;\n name: string;\n pass: boolean;\n type: string;\n};\n\n/** @public */\nexport type PagerDutyServiceStandardsResponse = {\n standards: PagerDutyServiceStandards;\n};\n\n/** @public */\nexport type PagerDutyServiceMetrics = {\n mean_assignment_count?: number;\n mean_engaged_seconds?: number;\n mean_engaged_user_count?: number;\n mean_seconds_to_engage?: number;\n mean_seconds_to_first_ack?: number;\n mean_seconds_to_mobilize?: number;\n mean_seconds_to_resolve?: number;\n mean_user_defined_engaged_seconds?: number;\n service_id: string;\n service_name?: string;\n team_id?: string;\n team_name?: string;\n total_business_hour_interruptions?: number;\n total_down_time_minutes?: number;\n total_engaged_seconds?: number;\n total_escalation_count?: number;\n total_high_urgency_incidents?: number;\n total_incident_count?: number;\n total_incidents_acknowledged?: number;\n total_incidents_auto_resolved?: number;\n total_incidents_manual_escalated?: number;\n total_incidents_reassigned?: number;\n total_incidents_timeout_escalated?: number;\n total_interruptions?: number;\n total_low_urgency_incidents?: number;\n total_major_incidents?: number;\n total_notifications?: number;\n total_off_hour_interruptions?: number;\n total_sleep_hour_interruptions?: number;\n total_snoozed_seconds?: number;\n total_user_defined_engaged_seconds?: number;\n up_time_pct?: number;\n};\n\n/** @public */\nexport type PagerDutyServiceMetricsResponse = {\n metrics: PagerDutyServiceMetrics[];\n};\n\n/** @public */\nexport type PagerDutyServicesResponse = {\n services: PagerDutyService[];\n};\n\n/** @public */\nexport type PagerDutyServicesAPIResponse = PagerDutyServicesResponse & {\n offset: number;\n limit: number;\n total: number | null;\n more: boolean;\n};\n\n/** @public */\nexport type PagerDutyServiceResponse = {\n service: PagerDutyService;\n};\n\n/** @public */\nexport type PagerDutyIncidentsResponse = {\n incidents: PagerDutyIncident[];\n};\n\n/** @public */\nexport type PagerDutyChangeEventsResponse = {\n change_events: PagerDutyChangeEvent[];\n};\n\n/** @public */\nexport type PagerDutyOnCallsResponse = {\n oncalls: PagerDutyOnCall[];\n};\n\n/** @public */\nexport type PagerDutyIntegrationResponse = {\n integration: PagerDutyIntegration;\n};\n\n/** @public */\nexport type PagerDutyEscalationPoliciesResponse = {\n escalation_policies: PagerDutyEscalationPolicy[];\n limit?: number;\n offset?: number;\n more?: boolean;\n total?: number;\n};\n\n/** @public */\nexport type PagerDutyAbilitiesResponse = {\n abilities: string[];\n};\n\n/** @public */\nexport class HttpError extends Error {\n constructor(message: string, status: number) {\n super(message);\n this.status = status;\n }\n\n status: number;\n}\n\n/** @public */\nexport type PagerDutyOAuthConfig = {\n clientId: string;\n clientSecret: string;\n region?: string;\n subDomain: string;\n identityUrl?: string;\n};\n\n/** @public */\nexport type PagerDutyAccountConfig = {\n id: string;\n isDefault?: boolean;\n eventsBaseUrl?: string;\n apiBaseUrl?: string;\n apiToken?: string;\n oauth?: PagerDutyOAuthConfig;\n};\n\n/** @public */\nexport type PagerDutyEntityMapping = {\n entityRef: string;\n entityName?: string;\n serviceId: string;\n serviceName?: string;\n integrationKey?: string;\n serviceUrl?: string;\n status?: 'NotMapped' | 'InSync' | 'OutOfSync';\n processedDate?: Date;\n team?: string;\n escalationPolicy?: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEntityMappingsResponse = {\n mappings: PagerDutyEntityMapping[];\n};\n\n/** @public */\nexport type FormattedBackstageEntity = {\n name: string;\n id: string;\n namespace: string;\n type: string;\n system: string;\n owner: string;\n lifecycle: string;\n annotations: {\n 'pagerduty.com/integration-key': string;\n 'pagerduty.com/service-id': string;\n };\n // PagerDuty properties\n serviceName?: string;\n serviceUrl?: string;\n team?: string;\n escalationPolicy?: string;\n status?: 'NotMapped' | 'InSync' | 'OutOfSync' | 'ErrorWhenFetchingService';\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEnhancedEntityMappingsResponse = {\n entities: FormattedBackstageEntity[];\n totalCount: number;\n};\n\n/** @public */\nexport type PagerDutyEntityMappingResponse = {\n mapping: PagerDutyEntityMapping;\n};\n\n/** @public */\nexport type PagerDutyServiceDependencyReference = {\n id: string;\n type: string;\n};\n\n/** @public */\nexport type PagerDutyServiceDependency = {\n id?: string;\n type?: string;\n supporting_service: PagerDutyServiceDependencyReference;\n dependent_service: PagerDutyServiceDependencyReference;\n};\n\n/** @public */\nexport type PagerDutyServiceDependencyResponse = {\n relationships: PagerDutyServiceDependency[];\n};\n\n/** @public */\nexport type PagerDutySetting = {\n id: string;\n value: 'backstage' | 'pagerduty' | 'both' | 'disabled';\n};\n\n/** @public */\nexport type PagerDutySettings = {\n settings: PagerDutySetting[];\n};\n\n/** @public */\nexport type AutoMatchScoreBreakdown = {\n baseScore: number;\n exactMatch: boolean;\n teamMatch: boolean;\n acronymMatch: boolean;\n rawScore: number;\n};\n\n/** @public */\nexport type AutoMatchPagerDutyService = {\n serviceId: string;\n name: string;\n team: string;\n account?: string;\n};\n\n/** @public */\nexport type AutoMatchBackstageComponent = {\n entityRef: string;\n name: string;\n owner: string;\n};\n\n/** @public */\nexport type AutoMatchEntityMapping = {\n pagerDutyService: AutoMatchPagerDutyService;\n backstageComponent: AutoMatchBackstageComponent;\n score: number;\n confidence: string;\n scoreBreakdown: AutoMatchScoreBreakdown;\n};\n\n/** @public */\nexport type AutoMatchStatistics = {\n totalPagerDutyServices: number;\n totalBackstageComponents: number;\n totalPossibleComparisons: number;\n matchesFound: number;\n exactMatches: number;\n highConfidenceMatches: number;\n mediumConfidenceMatches: number;\n threshold: number;\n loadTimeMs: number;\n matchTimeMs: number;\n totalTimeMs: number;\n};\n\n/** @public */\nexport type AutoMatchEntityMappingsResponse = {\n matches: AutoMatchEntityMapping[];\n statistics: AutoMatchStatistics;\n};\n\n/** @public */\nexport type AutoMatchJobStatus =\n | 'pending'\n | 'running'\n | 'completed'\n | 'failed';\n\n/** @public */\nexport type AutoMatchStartResponse = {\n jobId: string;\n status: AutoMatchJobStatus;\n};\n\n/** @public */\nexport type AutoMatchStatusResponse = {\n jobId: string;\n status: AutoMatchJobStatus;\n createdAt: string;\n completedAt?: string;\n result?: AutoMatchEntityMappingsResponse;\n error?: string;\n};\n\n/** @public */\nexport type PagerDutyCustomField = {\n id: string;\n data_type: string;\n description?: string;\n display_name: string;\n enabled: boolean;\n field_type: string;\n name: string;\n backstageEntityMappingPath?: string;\n};\n\n/** @public */\nexport type PagerDutyCustomFieldCreateRequest = {\n field: {\n data_type: 'string';\n description?: string;\n display_name: string;\n enabled: boolean;\n field_type: 'single_value';\n name: string;\n };\n};\n\n/** @public */\nexport type PagerDutyCustomFieldResponse = {\n field: PagerDutyCustomField;\n};\n\n/** @public */\nexport type PagerDutyCustomFieldsResponse = {\n fields: PagerDutyCustomField[];\n};\n\n/** @public */\nexport type BackstageCustomField = {\n id: number;\n pagerdutyCustomFieldId: string;\n pagerdutyCustomFieldDisplayName: string;\n pagerdutyCustomFieldEnabled: boolean;\n backstageEntityMappingPath: string;\n pagerdutySubdomain: string;\n description?: string;\n createdAt: Date;\n updatedAt: Date;\n};\n\n/** @public */\nexport type BackstageCustomFieldCreateRequest = {\n name: string;\n entityPath: string;\n description?: string;\n};\n\n/** @public */\nexport type BackstageCustomFieldUpdateRequest = {\n name: string;\n entityPath: string;\n description?: string;\n};\n\n/** @public */\nexport type BackstageCustomFieldToggleEnabledRequest = {\n enabled: boolean;\n};\n\n/** @public */\nexport type PagerDutyCustomFieldUpdateRequest = {\n field: {\n display_name: string;\n description?: string;\n enabled?: boolean;\n };\n};\n\n/** @public */\nexport type BackstageCustomFieldsResponse = {\n customFields: BackstageCustomField[];\n};\n\n/** @public */\nexport type PagerDutyServiceCustomFieldValue = {\n id: string;\n value: string | null;\n};\n\n/** @public */\nexport type PagerDutyServiceCustomFieldValuesRequest = {\n custom_fields: PagerDutyServiceCustomFieldValue[];\n};\n\n// The PagerDuty API echoes back the same shape it receives, so these two types\n// are structurally identical but kept separate to distinguish call-site intent.\n/** @public */\nexport type PagerDutyServiceCustomFieldValuesResponse = {\n custom_fields: PagerDutyServiceCustomFieldValue[];\n};\n\n/** @public */\nexport type CustomFieldSyncLog = {\n id: number;\n timestamp: Date;\n errorCode: string;\n customFieldId: string;\n customFieldName: string;\n entityPath: string;\n serviceId: string;\n serviceName: string;\n errorMessage: string;\n subdomain: string;\n};\n\n/** @public */\nexport type CustomFieldSyncLogCreateRequest = {\n errorCode: string;\n customFieldId: string;\n customFieldName: string;\n entityPath: string;\n serviceId: string;\n serviceName: string;\n errorMessage: string;\n};\n\n/** @public */\nexport type CustomFieldSyncLogSeverity = 'info' | 'warning' | 'error';\n\n/** @public */\nexport type CustomFieldSyncLogFilters = {\n search?: string;\n severity?: CustomFieldSyncLogSeverity;\n customFieldName?: string;\n entityPath?: string;\n serviceName?: string;\n};\n\n/** @public */\nexport type CustomFieldSyncLogsResponse = {\n logs: CustomFieldSyncLog[];\n total: number;\n customFieldNames: string[];\n entityPaths: string[];\n serviceNames: string[];\n};\n"],"names":[],"mappings":";;AA2PO,MAAM,kBAAkB,KAAA,CAAM;AAAA,EACnC,WAAA,CAAY,SAAiB,MAAA,EAAgB;AAC3C,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AAAA,EAEA,MAAA;AACF;;;;"}
|
package/dist/types.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.esm.js","sources":["../src/types.ts"],"sourcesContent":["/** @public */\nexport type PagerDutyIncident = {\n id: string;\n title: string;\n status: string;\n html_url: string;\n assignments: [\n {\n assignee: PagerDutyUser;\n },\n ];\n service: PagerDutyService;\n created_at: string;\n urgency?: string;\n};\n\n/** @public */\nexport type PagerDutyUser = {\n id: string;\n summary: string;\n email: string;\n html_url: string;\n name: string;\n avatar_url: string;\n};\n\n/** @public */\nexport type PagerDutyChangeEvent = {\n id: string;\n integration: PagerDutyIntegration[];\n source: string;\n html_url?: string;\n links: [\n {\n href: string;\n text: string;\n },\n ];\n summary: string;\n timestamp: string;\n};\n\n/** @public */\nexport type PagerDutyService = {\n id: string;\n name: string;\n description?: string;\n escalation_policy: PagerDutyEscalationPolicy;\n alert_creation?: string;\n incident_urgency_rule?: PagerDutyIncidentUrgencyRule;\n integrations?: PagerDutyIntegration[];\n teams?: PagerDutyTeam[];\n status?: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEscalationPolicy = {\n id: string;\n name: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyIncidentUrgencyRule = {\n type: string;\n urgency: string;\n};\n\n/** @public */\nexport type PagerDutyIntegration = {\n id: string;\n type: string;\n summary?: string;\n self?: string;\n html_url?: string;\n name?: string;\n service?: PagerDutyService;\n created_at?: string;\n vendor?: PagerDutyVendor;\n integration_key?: string;\n};\n\n/** @public */\nexport type PagerDutyTeam = {\n id: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n name: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyTeamsResponse = {\n teams: PagerDutyTeam[];\n more?: boolean;\n limit?: number;\n offset?: number;\n total?: number;\n};\n\n/** @public */\nexport type PagerDutyOnCall = {\n user: PagerDutyUser;\n escalation_level: number;\n};\n\n/** @public */\nexport type PagerDutyOnCallUsersResponse = {\n users: PagerDutyUser[];\n};\n\n/** @public */\nexport type PagerDutyVendor = {\n id: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n};\n\n/** @public */\nexport type PagerDutyServiceStandards = {\n resource_id: string;\n resource_type: string;\n score: {\n passing: number;\n total: number;\n };\n standards: PagerDutyServiceStandard[];\n};\n\n/** @public */\nexport type PagerDutyServiceStandard = {\n active: boolean;\n description: string;\n id: string;\n name: string;\n pass: boolean;\n type: string;\n};\n\n/** @public */\nexport type PagerDutyServiceStandardsResponse = {\n standards: PagerDutyServiceStandards;\n};\n\n/** @public */\nexport type PagerDutyServiceMetrics = {\n mean_assignment_count?: number;\n mean_engaged_seconds?: number;\n mean_engaged_user_count?: number;\n mean_seconds_to_engage?: number;\n mean_seconds_to_first_ack?: number;\n mean_seconds_to_mobilize?: number;\n mean_seconds_to_resolve?: number;\n mean_user_defined_engaged_seconds?: number;\n service_id: string;\n service_name?: string;\n team_id?: string;\n team_name?: string;\n total_business_hour_interruptions?: number;\n total_down_time_minutes?: number;\n total_engaged_seconds?: number;\n total_escalation_count?: number;\n total_high_urgency_incidents?: number;\n total_incident_count?: number;\n total_incidents_acknowledged?: number;\n total_incidents_auto_resolved?: number;\n total_incidents_manual_escalated?: number;\n total_incidents_reassigned?: number;\n total_incidents_timeout_escalated?: number;\n total_interruptions?: number;\n total_low_urgency_incidents?: number;\n total_major_incidents?: number;\n total_notifications?: number;\n total_off_hour_interruptions?: number;\n total_sleep_hour_interruptions?: number;\n total_snoozed_seconds?: number;\n total_user_defined_engaged_seconds?: number;\n up_time_pct?: number;\n};\n\n/** @public */\nexport type PagerDutyServiceMetricsResponse = {\n metrics: PagerDutyServiceMetrics[];\n};\n\n/** @public */\nexport type PagerDutyServicesResponse = {\n services: PagerDutyService[];\n};\n\n/** @public */\nexport type PagerDutyServicesAPIResponse = PagerDutyServicesResponse & {\n offset: number;\n limit: number;\n total: number | null;\n more: boolean;\n};\n\n/** @public */\nexport type PagerDutyServiceResponse = {\n service: PagerDutyService;\n};\n\n/** @public */\nexport type PagerDutyIncidentsResponse = {\n incidents: PagerDutyIncident[];\n};\n\n/** @public */\nexport type PagerDutyChangeEventsResponse = {\n change_events: PagerDutyChangeEvent[];\n};\n\n/** @public */\nexport type PagerDutyOnCallsResponse = {\n oncalls: PagerDutyOnCall[];\n};\n\n/** @public */\nexport type PagerDutyIntegrationResponse = {\n integration: PagerDutyIntegration;\n};\n\n/** @public */\nexport type PagerDutyEscalationPoliciesResponse = {\n escalation_policies: PagerDutyEscalationPolicy[];\n limit?: number;\n offset?: number;\n more?: boolean;\n total?: number;\n};\n\n/** @public */\nexport type PagerDutyAbilitiesResponse = {\n abilities: string[];\n};\n\n/** @public */\nexport class HttpError extends Error {\n constructor(message: string, status: number) {\n super(message);\n this.status = status;\n }\n\n status: number;\n}\n\n/** @public */\nexport type PagerDutyOAuthConfig = {\n clientId: string;\n clientSecret: string;\n region?: string;\n subDomain: string;\n identityUrl?: string;\n};\n\n/** @public */\nexport type PagerDutyAccountConfig = {\n id: string;\n isDefault?: boolean;\n eventsBaseUrl?: string;\n apiBaseUrl?: string;\n apiToken?: string;\n oauth?: PagerDutyOAuthConfig;\n};\n\n/** @public */\nexport type PagerDutyEntityMapping = {\n entityRef: string;\n entityName?: string;\n serviceId: string;\n serviceName?: string;\n integrationKey?: string;\n serviceUrl?: string;\n status?: 'NotMapped' | 'InSync' | 'OutOfSync';\n processedDate?: Date;\n team?: string;\n escalationPolicy?: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEntityMappingsResponse = {\n mappings: PagerDutyEntityMapping[];\n};\n\n/** @public */\nexport type FormattedBackstageEntity = {\n name: string;\n id: string;\n namespace: string;\n type: string;\n system: string;\n owner: string;\n lifecycle: string;\n annotations: {\n 'pagerduty.com/integration-key': string;\n 'pagerduty.com/service-id': string;\n };\n // PagerDuty properties\n serviceName?: string;\n serviceUrl?: string;\n team?: string;\n escalationPolicy?: string;\n status?: 'NotMapped' | 'InSync' | 'OutOfSync' | 'ErrorWhenFetchingService';\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEnhancedEntityMappingsResponse = {\n entities: FormattedBackstageEntity[];\n totalCount: number;\n};\n\n/** @public */\nexport type PagerDutyEntityMappingResponse = {\n mapping: PagerDutyEntityMapping;\n};\n\n/** @public */\nexport type PagerDutyServiceDependencyReference = {\n id: string;\n type: string;\n};\n\n/** @public */\nexport type PagerDutyServiceDependency = {\n id?: string;\n type?: string;\n supporting_service: PagerDutyServiceDependencyReference;\n dependent_service: PagerDutyServiceDependencyReference;\n};\n\n/** @public */\nexport type PagerDutyServiceDependencyResponse = {\n relationships: PagerDutyServiceDependency[];\n};\n\n/** @public */\nexport type PagerDutySetting = {\n id: string;\n value: 'backstage' | 'pagerduty' | 'both' | 'disabled';\n};\n\n/** @public */\nexport type PagerDutySettings = {\n settings: PagerDutySetting[];\n};\n\n/** @public */\nexport type AutoMatchScoreBreakdown = {\n baseScore: number;\n exactMatch: boolean;\n teamMatch: boolean;\n acronymMatch: boolean;\n rawScore: number;\n};\n\n/** @public */\nexport type AutoMatchPagerDutyService = {\n serviceId: string;\n name: string;\n team: string;\n account?: string;\n};\n\n/** @public */\nexport type AutoMatchBackstageComponent = {\n entityRef: string;\n name: string;\n owner: string;\n};\n\n/** @public */\nexport type AutoMatchEntityMapping = {\n pagerDutyService: AutoMatchPagerDutyService;\n backstageComponent: AutoMatchBackstageComponent;\n score: number;\n confidence: string;\n scoreBreakdown: AutoMatchScoreBreakdown;\n};\n\n/** @public */\nexport type AutoMatchStatistics = {\n totalPagerDutyServices: number;\n totalBackstageComponents: number;\n totalPossibleComparisons: number;\n matchesFound: number;\n exactMatches: number;\n highConfidenceMatches: number;\n mediumConfidenceMatches: number;\n threshold: number;\n loadTimeMs: number;\n matchTimeMs: number;\n totalTimeMs: number;\n};\n\n/** @public */\nexport type AutoMatchEntityMappingsResponse = {\n matches: AutoMatchEntityMapping[];\n statistics: AutoMatchStatistics;\n};\n"],"names":[],"mappings":"AA2PO,MAAM,kBAAkB,KAAA,CAAM;AAAA,EACnC,WAAA,CAAY,SAAiB,MAAA,EAAgB;AAC3C,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AAAA,EAEA,MAAA;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"types.esm.js","sources":["../src/types.ts"],"sourcesContent":["/** @public */\nexport type PagerDutyIncident = {\n id: string;\n title: string;\n status: string;\n html_url: string;\n assignments: [\n {\n assignee: PagerDutyUser;\n },\n ];\n service: PagerDutyService;\n created_at: string;\n urgency?: string;\n};\n\n/** @public */\nexport type PagerDutyUser = {\n id: string;\n summary: string;\n email: string;\n html_url: string;\n name: string;\n avatar_url: string;\n};\n\n/** @public */\nexport type PagerDutyChangeEvent = {\n id: string;\n integration: PagerDutyIntegration[];\n source: string;\n html_url?: string;\n links: [\n {\n href: string;\n text: string;\n },\n ];\n summary: string;\n timestamp: string;\n};\n\n/** @public */\nexport type PagerDutyService = {\n id: string;\n name: string;\n description?: string;\n escalation_policy: PagerDutyEscalationPolicy;\n alert_creation?: string;\n incident_urgency_rule?: PagerDutyIncidentUrgencyRule;\n integrations?: PagerDutyIntegration[];\n teams?: PagerDutyTeam[];\n status?: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEscalationPolicy = {\n id: string;\n name: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyIncidentUrgencyRule = {\n type: string;\n urgency: string;\n};\n\n/** @public */\nexport type PagerDutyIntegration = {\n id: string;\n type: string;\n summary?: string;\n self?: string;\n html_url?: string;\n name?: string;\n service?: PagerDutyService;\n created_at?: string;\n vendor?: PagerDutyVendor;\n integration_key?: string;\n};\n\n/** @public */\nexport type PagerDutyTeam = {\n id: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n name: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyTeamsResponse = {\n teams: PagerDutyTeam[];\n more?: boolean;\n limit?: number;\n offset?: number;\n total?: number;\n};\n\n/** @public */\nexport type PagerDutyOnCall = {\n user: PagerDutyUser;\n escalation_level: number;\n};\n\n/** @public */\nexport type PagerDutyOnCallUsersResponse = {\n users: PagerDutyUser[];\n};\n\n/** @public */\nexport type PagerDutyVendor = {\n id: string;\n type?: string;\n summary?: string;\n self?: string;\n html_url?: string;\n};\n\n/** @public */\nexport type PagerDutyServiceStandards = {\n resource_id: string;\n resource_type: string;\n score: {\n passing: number;\n total: number;\n };\n standards: PagerDutyServiceStandard[];\n};\n\n/** @public */\nexport type PagerDutyServiceStandard = {\n active: boolean;\n description: string;\n id: string;\n name: string;\n pass: boolean;\n type: string;\n};\n\n/** @public */\nexport type PagerDutyServiceStandardsResponse = {\n standards: PagerDutyServiceStandards;\n};\n\n/** @public */\nexport type PagerDutyServiceMetrics = {\n mean_assignment_count?: number;\n mean_engaged_seconds?: number;\n mean_engaged_user_count?: number;\n mean_seconds_to_engage?: number;\n mean_seconds_to_first_ack?: number;\n mean_seconds_to_mobilize?: number;\n mean_seconds_to_resolve?: number;\n mean_user_defined_engaged_seconds?: number;\n service_id: string;\n service_name?: string;\n team_id?: string;\n team_name?: string;\n total_business_hour_interruptions?: number;\n total_down_time_minutes?: number;\n total_engaged_seconds?: number;\n total_escalation_count?: number;\n total_high_urgency_incidents?: number;\n total_incident_count?: number;\n total_incidents_acknowledged?: number;\n total_incidents_auto_resolved?: number;\n total_incidents_manual_escalated?: number;\n total_incidents_reassigned?: number;\n total_incidents_timeout_escalated?: number;\n total_interruptions?: number;\n total_low_urgency_incidents?: number;\n total_major_incidents?: number;\n total_notifications?: number;\n total_off_hour_interruptions?: number;\n total_sleep_hour_interruptions?: number;\n total_snoozed_seconds?: number;\n total_user_defined_engaged_seconds?: number;\n up_time_pct?: number;\n};\n\n/** @public */\nexport type PagerDutyServiceMetricsResponse = {\n metrics: PagerDutyServiceMetrics[];\n};\n\n/** @public */\nexport type PagerDutyServicesResponse = {\n services: PagerDutyService[];\n};\n\n/** @public */\nexport type PagerDutyServicesAPIResponse = PagerDutyServicesResponse & {\n offset: number;\n limit: number;\n total: number | null;\n more: boolean;\n};\n\n/** @public */\nexport type PagerDutyServiceResponse = {\n service: PagerDutyService;\n};\n\n/** @public */\nexport type PagerDutyIncidentsResponse = {\n incidents: PagerDutyIncident[];\n};\n\n/** @public */\nexport type PagerDutyChangeEventsResponse = {\n change_events: PagerDutyChangeEvent[];\n};\n\n/** @public */\nexport type PagerDutyOnCallsResponse = {\n oncalls: PagerDutyOnCall[];\n};\n\n/** @public */\nexport type PagerDutyIntegrationResponse = {\n integration: PagerDutyIntegration;\n};\n\n/** @public */\nexport type PagerDutyEscalationPoliciesResponse = {\n escalation_policies: PagerDutyEscalationPolicy[];\n limit?: number;\n offset?: number;\n more?: boolean;\n total?: number;\n};\n\n/** @public */\nexport type PagerDutyAbilitiesResponse = {\n abilities: string[];\n};\n\n/** @public */\nexport class HttpError extends Error {\n constructor(message: string, status: number) {\n super(message);\n this.status = status;\n }\n\n status: number;\n}\n\n/** @public */\nexport type PagerDutyOAuthConfig = {\n clientId: string;\n clientSecret: string;\n region?: string;\n subDomain: string;\n identityUrl?: string;\n};\n\n/** @public */\nexport type PagerDutyAccountConfig = {\n id: string;\n isDefault?: boolean;\n eventsBaseUrl?: string;\n apiBaseUrl?: string;\n apiToken?: string;\n oauth?: PagerDutyOAuthConfig;\n};\n\n/** @public */\nexport type PagerDutyEntityMapping = {\n entityRef: string;\n entityName?: string;\n serviceId: string;\n serviceName?: string;\n integrationKey?: string;\n serviceUrl?: string;\n status?: 'NotMapped' | 'InSync' | 'OutOfSync';\n processedDate?: Date;\n team?: string;\n escalationPolicy?: string;\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEntityMappingsResponse = {\n mappings: PagerDutyEntityMapping[];\n};\n\n/** @public */\nexport type FormattedBackstageEntity = {\n name: string;\n id: string;\n namespace: string;\n type: string;\n system: string;\n owner: string;\n lifecycle: string;\n annotations: {\n 'pagerduty.com/integration-key': string;\n 'pagerduty.com/service-id': string;\n };\n // PagerDuty properties\n serviceName?: string;\n serviceUrl?: string;\n team?: string;\n escalationPolicy?: string;\n status?: 'NotMapped' | 'InSync' | 'OutOfSync' | 'ErrorWhenFetchingService';\n account?: string;\n};\n\n/** @public */\nexport type PagerDutyEnhancedEntityMappingsResponse = {\n entities: FormattedBackstageEntity[];\n totalCount: number;\n};\n\n/** @public */\nexport type PagerDutyEntityMappingResponse = {\n mapping: PagerDutyEntityMapping;\n};\n\n/** @public */\nexport type PagerDutyServiceDependencyReference = {\n id: string;\n type: string;\n};\n\n/** @public */\nexport type PagerDutyServiceDependency = {\n id?: string;\n type?: string;\n supporting_service: PagerDutyServiceDependencyReference;\n dependent_service: PagerDutyServiceDependencyReference;\n};\n\n/** @public */\nexport type PagerDutyServiceDependencyResponse = {\n relationships: PagerDutyServiceDependency[];\n};\n\n/** @public */\nexport type PagerDutySetting = {\n id: string;\n value: 'backstage' | 'pagerduty' | 'both' | 'disabled';\n};\n\n/** @public */\nexport type PagerDutySettings = {\n settings: PagerDutySetting[];\n};\n\n/** @public */\nexport type AutoMatchScoreBreakdown = {\n baseScore: number;\n exactMatch: boolean;\n teamMatch: boolean;\n acronymMatch: boolean;\n rawScore: number;\n};\n\n/** @public */\nexport type AutoMatchPagerDutyService = {\n serviceId: string;\n name: string;\n team: string;\n account?: string;\n};\n\n/** @public */\nexport type AutoMatchBackstageComponent = {\n entityRef: string;\n name: string;\n owner: string;\n};\n\n/** @public */\nexport type AutoMatchEntityMapping = {\n pagerDutyService: AutoMatchPagerDutyService;\n backstageComponent: AutoMatchBackstageComponent;\n score: number;\n confidence: string;\n scoreBreakdown: AutoMatchScoreBreakdown;\n};\n\n/** @public */\nexport type AutoMatchStatistics = {\n totalPagerDutyServices: number;\n totalBackstageComponents: number;\n totalPossibleComparisons: number;\n matchesFound: number;\n exactMatches: number;\n highConfidenceMatches: number;\n mediumConfidenceMatches: number;\n threshold: number;\n loadTimeMs: number;\n matchTimeMs: number;\n totalTimeMs: number;\n};\n\n/** @public */\nexport type AutoMatchEntityMappingsResponse = {\n matches: AutoMatchEntityMapping[];\n statistics: AutoMatchStatistics;\n};\n\n/** @public */\nexport type AutoMatchJobStatus =\n | 'pending'\n | 'running'\n | 'completed'\n | 'failed';\n\n/** @public */\nexport type AutoMatchStartResponse = {\n jobId: string;\n status: AutoMatchJobStatus;\n};\n\n/** @public */\nexport type AutoMatchStatusResponse = {\n jobId: string;\n status: AutoMatchJobStatus;\n createdAt: string;\n completedAt?: string;\n result?: AutoMatchEntityMappingsResponse;\n error?: string;\n};\n\n/** @public */\nexport type PagerDutyCustomField = {\n id: string;\n data_type: string;\n description?: string;\n display_name: string;\n enabled: boolean;\n field_type: string;\n name: string;\n backstageEntityMappingPath?: string;\n};\n\n/** @public */\nexport type PagerDutyCustomFieldCreateRequest = {\n field: {\n data_type: 'string';\n description?: string;\n display_name: string;\n enabled: boolean;\n field_type: 'single_value';\n name: string;\n };\n};\n\n/** @public */\nexport type PagerDutyCustomFieldResponse = {\n field: PagerDutyCustomField;\n};\n\n/** @public */\nexport type PagerDutyCustomFieldsResponse = {\n fields: PagerDutyCustomField[];\n};\n\n/** @public */\nexport type BackstageCustomField = {\n id: number;\n pagerdutyCustomFieldId: string;\n pagerdutyCustomFieldDisplayName: string;\n pagerdutyCustomFieldEnabled: boolean;\n backstageEntityMappingPath: string;\n pagerdutySubdomain: string;\n description?: string;\n createdAt: Date;\n updatedAt: Date;\n};\n\n/** @public */\nexport type BackstageCustomFieldCreateRequest = {\n name: string;\n entityPath: string;\n description?: string;\n};\n\n/** @public */\nexport type BackstageCustomFieldUpdateRequest = {\n name: string;\n entityPath: string;\n description?: string;\n};\n\n/** @public */\nexport type BackstageCustomFieldToggleEnabledRequest = {\n enabled: boolean;\n};\n\n/** @public */\nexport type PagerDutyCustomFieldUpdateRequest = {\n field: {\n display_name: string;\n description?: string;\n enabled?: boolean;\n };\n};\n\n/** @public */\nexport type BackstageCustomFieldsResponse = {\n customFields: BackstageCustomField[];\n};\n\n/** @public */\nexport type PagerDutyServiceCustomFieldValue = {\n id: string;\n value: string | null;\n};\n\n/** @public */\nexport type PagerDutyServiceCustomFieldValuesRequest = {\n custom_fields: PagerDutyServiceCustomFieldValue[];\n};\n\n// The PagerDuty API echoes back the same shape it receives, so these two types\n// are structurally identical but kept separate to distinguish call-site intent.\n/** @public */\nexport type PagerDutyServiceCustomFieldValuesResponse = {\n custom_fields: PagerDutyServiceCustomFieldValue[];\n};\n\n/** @public */\nexport type CustomFieldSyncLog = {\n id: number;\n timestamp: Date;\n errorCode: string;\n customFieldId: string;\n customFieldName: string;\n entityPath: string;\n serviceId: string;\n serviceName: string;\n errorMessage: string;\n subdomain: string;\n};\n\n/** @public */\nexport type CustomFieldSyncLogCreateRequest = {\n errorCode: string;\n customFieldId: string;\n customFieldName: string;\n entityPath: string;\n serviceId: string;\n serviceName: string;\n errorMessage: string;\n};\n\n/** @public */\nexport type CustomFieldSyncLogSeverity = 'info' | 'warning' | 'error';\n\n/** @public */\nexport type CustomFieldSyncLogFilters = {\n search?: string;\n severity?: CustomFieldSyncLogSeverity;\n customFieldName?: string;\n entityPath?: string;\n serviceName?: string;\n};\n\n/** @public */\nexport type CustomFieldSyncLogsResponse = {\n logs: CustomFieldSyncLog[];\n total: number;\n customFieldNames: string[];\n entityPaths: string[];\n serviceNames: string[];\n};\n"],"names":[],"mappings":"AA2PO,MAAM,kBAAkB,KAAA,CAAM;AAAA,EACnC,WAAA,CAAY,SAAiB,MAAA,EAAgB;AAC3C,IAAA,KAAA,CAAM,OAAO,CAAA;AACb,IAAA,IAAA,CAAK,MAAA,GAAS,MAAA;AAAA,EAChB;AAAA,EAEA,MAAA;AACF;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagerduty/backstage-plugin-common",
|
|
3
3
|
"description": "Common components for PagerDuty plugins for Backstage",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.5.0",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"clean": "backstage-cli package clean"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@backstage/cli": "^0.
|
|
42
|
+
"@backstage/cli": "^0.36.2",
|
|
43
43
|
"@commitlint/cli": "^17.7.1",
|
|
44
44
|
"@commitlint/config-conventional": "^17.7.0",
|
|
45
45
|
"typescript": "^5.8.0"
|