From 24511a3beb3f23959d0025cda1b618c163ca96f2 Mon Sep 17 00:00:00 2001 From: Alec Jacobs Date: Fri, 3 Jun 2022 17:42:49 -0700 Subject: [PATCH] chore: enhance changeset definition to call out all new breaking changes Signed-off-by: Alec Jacobs --- .changeset/weak-bananas-deliver.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.changeset/weak-bananas-deliver.md b/.changeset/weak-bananas-deliver.md index db76f396a8..2be1e87d29 100644 --- a/.changeset/weak-bananas-deliver.md +++ b/.changeset/weak-bananas-deliver.md @@ -5,9 +5,19 @@ Introduces a new annotation `pagerduty.com/service-id` that can be used instead of the `pagerduty.com/integration-key` annotation. _Note: If both annotations are specified on a given Entity, then the `pagerduty.com/integration-key` annotation will be prefered_ -**BREAKING** The `PagerDutyClient.fromConfig` static method now expects a `FetchApi` compatible object as a third argument. +**BREAKING** The `PagerDutyClient.fromConfig` static method now expects a `FetchApi` compatible object and has been refactored to +accept 2 arguments: config and ClientApiDependencies The `PagerDutyClient` now relies on a `fetchApi` being available to execute `fetch` requests. +**BREAKING** A new query method `getServiceByEntity` that is used to query for Services by either the `integrationKey` or `serviceId` +annotation values if they are defined. The `integrationKey` value is preferred currently over `serviceId`. As such, the previous +`getServiceByIntegrationKey` method has been removed. + +**BREAKING** The return values for each Client query method has been changed to return an object instead of raw values. +For example, the `getIncidentsByServiceId` query method now returns an object in the shape of `{ incidents: Incident[] }` +instead of just `Incident[]`. +This same pattern goes for `getChangeEventsByServiceId` and `getOnCallByPolicyId` functions. + In addition, various enhancements/bug fixes were introduced: - The `PagerDutyCard` component now wraps error and loading messages with an `InfoCard` to contain errors/messages. This enforces a consistent experience on the EntityPage