@lucaapp/service-utils 1.36.0 → 1.36.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.
@@ -46,3 +46,10 @@ export declare const conflict: (message?: string) => {
46
46
  message: string;
47
47
  };
48
48
  };
49
+ export declare const tooManyRequests: (message?: string) => {
50
+ status: 429;
51
+ body: {
52
+ error: HTTPStatus.TOO_MANY_REQUESTS;
53
+ message: string;
54
+ };
55
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.conflict = exports.notFound = exports.forbidden = exports.unauthorized = exports.badRequest = exports.noContent = exports.created = exports.ok = void 0;
3
+ exports.tooManyRequests = exports.conflict = exports.notFound = exports.forbidden = exports.unauthorized = exports.badRequest = exports.noContent = exports.created = exports.ok = void 0;
4
4
  const http_1 = require("./types/http");
5
5
  const ok = (body) => ({
6
6
  status: 200,
@@ -57,3 +57,11 @@ const conflict = (message) => ({
57
57
  },
58
58
  });
59
59
  exports.conflict = conflict;
60
+ const tooManyRequests = (message) => ({
61
+ status: 429,
62
+ body: {
63
+ error: http_1.HTTPStatus.TOO_MANY_REQUESTS,
64
+ message: message || 'Too many requests',
65
+ },
66
+ });
67
+ exports.tooManyRequests = tooManyRequests;
@@ -3,4 +3,5 @@ export type LocationGroup = {
3
3
  operatorId: string;
4
4
  createdAt: Date;
5
5
  updatedAt: Date;
6
+ name: string;
6
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lucaapp/service-utils",
3
- "version": "1.36.0",
3
+ "version": "1.36.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [