@overmap-ai/core 1.0.48-add-agent-response-rating.0 → 1.0.48-add-agent-response-rating.2

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.
@@ -4242,10 +4242,20 @@ var __publicField = (obj, key, value) => {
4242
4242
  var _a2;
4243
4243
  return (_a2 = allMiddleware[0]) == null ? void 0 : _a2.run(action);
4244
4244
  }
4245
- const discardStatuses = [400, 409, 403, 404];
4245
+ const discardStatuses = [400, 409, 403, 404, 405, 500];
4246
4246
  const statusMessages = {
4247
4247
  403: { title: "Forbidden", description: "You are not authorized to perform this action.", severity: "danger" },
4248
- 404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" }
4248
+ 404: { title: "Not found", description: "The requested resource was not found.", severity: "danger" },
4249
+ 405: {
4250
+ title: "Not supported",
4251
+ description: "It's not you. It's us. Sorry for the inconvenience.",
4252
+ severity: "danger"
4253
+ },
4254
+ 500: {
4255
+ title: "Server error",
4256
+ description: "Our server seems to be experiencing problems at the moment. We have been alerted and will fix the problem as soon as possible.",
4257
+ severity: "danger"
4258
+ }
4249
4259
  };
4250
4260
  function discard(reason, action, retries = 0) {
4251
4261
  var _a2;
@@ -7508,7 +7518,7 @@ var __publicField = (obj, key, value) => {
7508
7518
  async rate(responseId, rating) {
7509
7519
  return this.enqueueRequest({
7510
7520
  description: "Rate agent response",
7511
- method: HttpMethod.POST,
7521
+ method: HttpMethod.PUT,
7512
7522
  url: `/agents/responses/${responseId}/rate/`,
7513
7523
  payload: { rating },
7514
7524
  blockers: ["rate"],