grm-shared-library 1.0.15 → 1.0.17

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/README.md ADDED
@@ -0,0 +1,2 @@
1
+ # grm-shared-library
2
+ Common code for GRM
@@ -1,3 +1,5 @@
1
1
  export declare const KAFKA_TOPICS: {
2
- CREATE_ORG: string;
2
+ ORG_CREATED: string;
3
+ ORG_UPDATED: string;
4
+ ORG_DELETED: string;
3
5
  };
@@ -2,5 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.KAFKA_TOPICS = void 0;
4
4
  exports.KAFKA_TOPICS = {
5
- CREATE_ORG: 'create.org'
5
+ ORG_CREATED: 'org.created',
6
+ ORG_UPDATED: 'org.updated',
7
+ ORG_DELETED: 'org.deleted',
6
8
  };
@@ -28,5 +28,6 @@ __decorate([
28
28
  ], MapLocationDto.prototype, "lng", void 0);
29
29
  __decorate([
30
30
  (0, class_validator_1.IsNumber)(),
31
+ (0, class_validator_1.IsOptional)(),
31
32
  __metadata("design:type", Number)
32
33
  ], MapLocationDto.prototype, "course", void 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "grm-shared-library",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [
@@ -8,10 +8,7 @@
8
8
  ],
9
9
  "scripts": {
10
10
  "build": "tsc",
11
- "build:watch": "tsc -w",
12
- "prepare": "npm run build",
13
- "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
14
- "type-check": "tsc --noEmit"
11
+ "test": "echo \"Error: no test specified\" && exit 1"
15
12
  },
16
13
  "keywords": [],
17
14
  "author": "",
@@ -1,3 +0,0 @@
1
- export declare function SentenceCase(): PropertyDecorator;
2
- export declare function UpperCase(): PropertyDecorator;
3
- export declare function LowerCase(): PropertyDecorator;
@@ -1,28 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SentenceCase = SentenceCase;
4
- exports.UpperCase = UpperCase;
5
- exports.LowerCase = LowerCase;
6
- const class_transformer_1 = require("class-transformer");
7
- function SentenceCase() {
8
- return (0, class_transformer_1.Transform)(({ value }) => {
9
- if (typeof value !== 'string') {
10
- return value;
11
- }
12
- return value
13
- .split(' ')
14
- .map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
15
- .join(' ');
16
- });
17
- }
18
- function UpperCase() {
19
- return (0, class_transformer_1.Transform)(({ value }) => {
20
- if (typeof value !== 'string') {
21
- return value;
22
- }
23
- return value.toUpperCase();
24
- });
25
- }
26
- function LowerCase() {
27
- return (0, class_transformer_1.Transform)(({ value }) => typeof value === "string" ? value.toLowerCase() : value);
28
- }