skyeye-svc-common-utils 0.0.205 → 0.0.207
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/.github/dependabot.yml +17 -17
- package/.vscode/settings.json +25 -25
- package/README.md +31 -31
- package/package.json +74 -74
- package/pull_request_template.md +41 -41
- package/sonar-project.properties +11 -11
- package/src/index.ts +20 -20
- package/src/interfaces/apiResponse.ts +6 -6
- package/src/interfaces/index.ts +11 -11
- package/src/interfaces/pagination.ts +10 -10
- package/src/interfaces/serviceResponse.ts +7 -7
- package/src/interfaces/subcriptionFeaturePermissionModel.ts +19 -19
- package/src/interfaces/userInfo.ts +34 -34
- package/src/lib/azure/azureBlobStorage.ts +72 -72
- package/src/lib/azure/azureKeyVault.ts +14 -14
- package/src/lib/azure/azureServiceBusQueue.ts +24 -24
- package/src/lib/azure/azureStorageQueue.ts +11 -11
- package/src/lib/azure/azureTableStorage.ts +45 -45
- package/src/lib/httpClient.ts +18 -18
- package/src/models/baseControllerParameter.ts +11 -11
- package/src/models/index.ts +4 -4
- package/src/utils/appConfig.ts +30 -30
- package/src/utils/appConst.ts +114 -114
- package/src/utils/authentication/auth.ts +97 -97
- package/src/utils/authentication/role.ts +142 -142
- package/src/utils/baseClass/baseController.ts +161 -161
- package/src/utils/baseClass/baseService.ts +11 -11
- package/src/utils/commonUtils/appUtils.ts +100 -100
- package/src/utils/commonUtils/index.ts +3 -3
- package/src/utils/commonUtils/jwtUtils.ts +36 -36
- package/src/utils/commonUtils/responseUtils.ts +50 -50
- package/src/utils/commonUtils/validation.ts +60 -60
- package/src/utils/documentation/swagger.ts +32 -32
- package/src/utils/logger/logger.ts +31 -31
- package/src/utils/logger/morganLogger.ts +26 -26
- package/src/utils/middleware/handleError.ts +9 -9
- package/src/utils/middleware/isPublicUser.ts +33 -33
- package/src/utils/middleware/startdbConnection.ts +17 -17
- package/src/utils/monitoring/apm.ts +80 -80
- package/tsconfig.json +29 -29
package/.github/dependabot.yml
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
# for more information, see https://dependabot.com
|
|
2
|
-
# for more settings, see https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates#commit-message
|
|
3
|
-
|
|
4
|
-
version: 2
|
|
5
|
-
updates:
|
|
6
|
-
- package-ecosystem: npm
|
|
7
|
-
directory: "/"
|
|
8
|
-
schedule:
|
|
9
|
-
interval: daily
|
|
10
|
-
target-branch: "master"
|
|
11
|
-
open-pull-requests-limit: 1
|
|
12
|
-
reviewers:
|
|
13
|
-
- dexterchang-tw
|
|
14
|
-
- Clifford-Liu
|
|
15
|
-
- Steven-h3
|
|
16
|
-
- sophia6734wu
|
|
17
|
-
allow:
|
|
1
|
+
# for more information, see https://dependabot.com
|
|
2
|
+
# for more settings, see https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/configuration-options-for-dependency-updates#commit-message
|
|
3
|
+
|
|
4
|
+
version: 2
|
|
5
|
+
updates:
|
|
6
|
+
- package-ecosystem: npm
|
|
7
|
+
directory: "/"
|
|
8
|
+
schedule:
|
|
9
|
+
interval: daily
|
|
10
|
+
target-branch: "master"
|
|
11
|
+
open-pull-requests-limit: 1
|
|
12
|
+
reviewers:
|
|
13
|
+
- dexterchang-tw
|
|
14
|
+
- Clifford-Liu
|
|
15
|
+
- Steven-h3
|
|
16
|
+
- sophia6734wu
|
|
17
|
+
allow:
|
|
18
18
|
- dependency-name: skyeye-common-const
|
package/.vscode/settings.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cSpell.words": [
|
|
3
|
-
"APIKEY",
|
|
4
|
-
"DELINK",
|
|
5
|
-
"Grpc",
|
|
6
|
-
"ICBSECTOR",
|
|
7
|
-
"KEYVAULT",
|
|
8
|
-
"NERL",
|
|
9
|
-
"RBAC",
|
|
10
|
-
"SCOUTAI",
|
|
11
|
-
"SCOUTAIRESULT",
|
|
12
|
-
"TAASCONFIG",
|
|
13
|
-
"blobstorage",
|
|
14
|
-
"guids",
|
|
15
|
-
"mutex",
|
|
16
|
-
"openapi",
|
|
17
|
-
"organisation",
|
|
18
|
-
"printf",
|
|
19
|
-
"proto",
|
|
20
|
-
"protobuf",
|
|
21
|
-
"skyeye",
|
|
22
|
-
"startdb",
|
|
23
|
-
"tada",
|
|
24
|
-
"typeorm"
|
|
25
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"cSpell.words": [
|
|
3
|
+
"APIKEY",
|
|
4
|
+
"DELINK",
|
|
5
|
+
"Grpc",
|
|
6
|
+
"ICBSECTOR",
|
|
7
|
+
"KEYVAULT",
|
|
8
|
+
"NERL",
|
|
9
|
+
"RBAC",
|
|
10
|
+
"SCOUTAI",
|
|
11
|
+
"SCOUTAIRESULT",
|
|
12
|
+
"TAASCONFIG",
|
|
13
|
+
"blobstorage",
|
|
14
|
+
"guids",
|
|
15
|
+
"mutex",
|
|
16
|
+
"openapi",
|
|
17
|
+
"organisation",
|
|
18
|
+
"printf",
|
|
19
|
+
"proto",
|
|
20
|
+
"protobuf",
|
|
21
|
+
"skyeye",
|
|
22
|
+
"startdb",
|
|
23
|
+
"tada",
|
|
24
|
+
"typeorm"
|
|
25
|
+
]
|
|
26
26
|
}
|
package/README.md
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
# SkyEye-SVC-Common-Utils
|
|
2
|
-
This is the common utils for SkyEye service projects,
|
|
3
|
-
It include multiple utils, middilewares, authentications, some common interfaces
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
# GRPC
|
|
7
|
-
This command to build .proto files for Typescript used.
|
|
8
|
-
- protoc --proto_path=./ grpcProtos/sample.proto --js_out=import_style=commonjs,binary:. --ts_out=service=true:.
|
|
9
|
-
|
|
10
|
-
Please make sure run the `npm run build` before push changes
|
|
11
|
-
|
|
12
|
-
## Command to run test
|
|
13
|
-
`npm run test`
|
|
14
|
-
|
|
15
|
-
## Command to run code coverage
|
|
16
|
-
`npm run coverage`
|
|
17
|
-
|
|
18
|
-
**Note**
|
|
19
|
-
|
|
20
|
-
* don't push the `.nyc_output\xx\xx.json` and `coverage` file to github
|
|
21
|
-
* upload all the file from **report** folder
|
|
22
|
-
|
|
23
|
-
## Permissions
|
|
24
|
-
When add new permissions, please avoid duplication,
|
|
25
|
-
value for permission list :
|
|
26
|
-
`permissionCode`: `<ServiceName>_<HTTP Method>_<Controller>_<Action>`
|
|
27
|
-
`permissionLabel`: any name you want to show to frontend for easy recognise
|
|
28
|
-
`permissionDesc`: short description on what this permission can do
|
|
29
|
-
`permissionMethod`: The http Method: GET/POST/PUT/DELETE , uppercase only
|
|
30
|
-
`permissionUrl`: the Path for this permission. `/<Controller>/<Action>`
|
|
31
|
-
`allowAnonymous`: whether this path is able to access by anyone
|
|
1
|
+
# SkyEye-SVC-Common-Utils
|
|
2
|
+
This is the common utils for SkyEye service projects,
|
|
3
|
+
It include multiple utils, middilewares, authentications, some common interfaces
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
# GRPC
|
|
7
|
+
This command to build .proto files for Typescript used.
|
|
8
|
+
- protoc --proto_path=./ grpcProtos/sample.proto --js_out=import_style=commonjs,binary:. --ts_out=service=true:.
|
|
9
|
+
|
|
10
|
+
Please make sure run the `npm run build` before push changes
|
|
11
|
+
|
|
12
|
+
## Command to run test
|
|
13
|
+
`npm run test`
|
|
14
|
+
|
|
15
|
+
## Command to run code coverage
|
|
16
|
+
`npm run coverage`
|
|
17
|
+
|
|
18
|
+
**Note**
|
|
19
|
+
|
|
20
|
+
* don't push the `.nyc_output\xx\xx.json` and `coverage` file to github
|
|
21
|
+
* upload all the file from **report** folder
|
|
22
|
+
|
|
23
|
+
## Permissions
|
|
24
|
+
When add new permissions, please avoid duplication,
|
|
25
|
+
value for permission list :
|
|
26
|
+
`permissionCode`: `<ServiceName>_<HTTP Method>_<Controller>_<Action>`
|
|
27
|
+
`permissionLabel`: any name you want to show to frontend for easy recognise
|
|
28
|
+
`permissionDesc`: short description on what this permission can do
|
|
29
|
+
`permissionMethod`: The http Method: GET/POST/PUT/DELETE , uppercase only
|
|
30
|
+
`permissionUrl`: the Path for this permission. `/<Controller>/<Action>`
|
|
31
|
+
`allowAnonymous`: whether this path is able to access by anyone
|
package/package.json
CHANGED
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "skyeye-svc-common-utils",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "dist/index.js",
|
|
6
|
-
"types": "dist/index.d.ts",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"build": "tsc -p ./tsconfig.json",
|
|
9
|
-
"postinstall": "npm run build",
|
|
10
|
-
"clean": "rm -rf package-lock.json node_modules dist",
|
|
11
|
-
"cleanPublish": "npm run clean && npm publish"
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/HandshakesByDC/SkyEye-SVC-Common-Utils.git"
|
|
16
|
-
},
|
|
17
|
-
"author": "",
|
|
18
|
-
"license": "ISC",
|
|
19
|
-
"bugs": {
|
|
20
|
-
"url": "https://github.com/HandshakesByDC/SkyEye-SVC-Common-Utils/issues"
|
|
21
|
-
},
|
|
22
|
-
"homepage": "https://github.com/HandshakesByDC/SkyEye-SVC-Common-Utils#readme",
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@azure/identity": "latest",
|
|
25
|
-
"@azure/keyvault-secrets": "latest",
|
|
26
|
-
"@azure/service-bus": "^7.1.0",
|
|
27
|
-
"@azure/storage-blob": "^12.1.2",
|
|
28
|
-
"@azure/storage-queue": "^12.0.2",
|
|
29
|
-
"@grpc/proto-loader": "^0.5.3",
|
|
30
|
-
"@improbable-eng/grpc-web": "^0.12.0",
|
|
31
|
-
"@types/chai": "^4.2.11",
|
|
32
|
-
"@types/google-protobuf": "^3.7.2",
|
|
33
|
-
"@types/jsonwebtoken": "^8.3.7",
|
|
34
|
-
"@types/swagger-jsdoc": "^3.0.2",
|
|
35
|
-
"@types/swagger-ui-express": "^4.1.1",
|
|
36
|
-
"async-mutex": "^0.3.2",
|
|
37
|
-
"azure-storage": "^2.10.3",
|
|
38
|
-
"dateformat": "^3.0.3",
|
|
39
|
-
"debug": "^4.1.1",
|
|
40
|
-
"dotenv": "^8.2.0",
|
|
41
|
-
"elastic-apm-node": "^3.5.0",
|
|
42
|
-
"express": "^4.17.1",
|
|
43
|
-
"grpc": "^1.24.2",
|
|
44
|
-
"http-errors": "^1.7.3",
|
|
45
|
-
"https": "^1.0.0",
|
|
46
|
-
"jsonwebtoken": "^8.5.1",
|
|
47
|
-
"moment": "^2.24.0",
|
|
48
|
-
"morgan": "^1.9.1",
|
|
49
|
-
"node-fetch": "^2.6.0",
|
|
50
|
-
"nyc": "^15.1.0",
|
|
51
|
-
"rotating-file-stream": "^1.4.6",
|
|
52
|
-
"skyeye-common-const": "0.0.
|
|
53
|
-
"swagger-jsdoc": "^3.5.0",
|
|
54
|
-
"swagger-ui-express": "^4.1.3",
|
|
55
|
-
"ts-node": "^9.0.0",
|
|
56
|
-
"typeorm": "^0.2.20",
|
|
57
|
-
"typescript": "^3.7.4",
|
|
58
|
-
"uuid": "^3.3.3",
|
|
59
|
-
"winston": "^3.2.1",
|
|
60
|
-
"winston-daily-rotate-file": "^4.2.1",
|
|
61
|
-
"@types/express-serve-static-core": "4.17.30"
|
|
62
|
-
},
|
|
63
|
-
"devDependencies": {
|
|
64
|
-
"@types/dateformat": "^3.0.1",
|
|
65
|
-
"@types/debug": "~4.1.5",
|
|
66
|
-
"@types/dotenv": "^8.2.0",
|
|
67
|
-
"@types/http-errors": "~1.6.1",
|
|
68
|
-
"@types/morgan": "~1.7.37",
|
|
69
|
-
"@types/node": "^14.0.27",
|
|
70
|
-
"@types/node-fetch": "^2.5.3",
|
|
71
|
-
"@types/uuid": "^3.4.6",
|
|
72
|
-
"@types/winston": "2.4.4"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "skyeye-svc-common-utils",
|
|
3
|
+
"version": "0.0.207",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "tsc -p ./tsconfig.json",
|
|
9
|
+
"postinstall": "npm run build",
|
|
10
|
+
"clean": "rm -rf package-lock.json node_modules dist",
|
|
11
|
+
"cleanPublish": "npm run clean && npm publish"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/HandshakesByDC/SkyEye-SVC-Common-Utils.git"
|
|
16
|
+
},
|
|
17
|
+
"author": "",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/HandshakesByDC/SkyEye-SVC-Common-Utils/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/HandshakesByDC/SkyEye-SVC-Common-Utils#readme",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@azure/identity": "latest",
|
|
25
|
+
"@azure/keyvault-secrets": "latest",
|
|
26
|
+
"@azure/service-bus": "^7.1.0",
|
|
27
|
+
"@azure/storage-blob": "^12.1.2",
|
|
28
|
+
"@azure/storage-queue": "^12.0.2",
|
|
29
|
+
"@grpc/proto-loader": "^0.5.3",
|
|
30
|
+
"@improbable-eng/grpc-web": "^0.12.0",
|
|
31
|
+
"@types/chai": "^4.2.11",
|
|
32
|
+
"@types/google-protobuf": "^3.7.2",
|
|
33
|
+
"@types/jsonwebtoken": "^8.3.7",
|
|
34
|
+
"@types/swagger-jsdoc": "^3.0.2",
|
|
35
|
+
"@types/swagger-ui-express": "^4.1.1",
|
|
36
|
+
"async-mutex": "^0.3.2",
|
|
37
|
+
"azure-storage": "^2.10.3",
|
|
38
|
+
"dateformat": "^3.0.3",
|
|
39
|
+
"debug": "^4.1.1",
|
|
40
|
+
"dotenv": "^8.2.0",
|
|
41
|
+
"elastic-apm-node": "^3.5.0",
|
|
42
|
+
"express": "^4.17.1",
|
|
43
|
+
"grpc": "^1.24.2",
|
|
44
|
+
"http-errors": "^1.7.3",
|
|
45
|
+
"https": "^1.0.0",
|
|
46
|
+
"jsonwebtoken": "^8.5.1",
|
|
47
|
+
"moment": "^2.24.0",
|
|
48
|
+
"morgan": "^1.9.1",
|
|
49
|
+
"node-fetch": "^2.6.0",
|
|
50
|
+
"nyc": "^15.1.0",
|
|
51
|
+
"rotating-file-stream": "^1.4.6",
|
|
52
|
+
"skyeye-common-const": "0.0.196",
|
|
53
|
+
"swagger-jsdoc": "^3.5.0",
|
|
54
|
+
"swagger-ui-express": "^4.1.3",
|
|
55
|
+
"ts-node": "^9.0.0",
|
|
56
|
+
"typeorm": "^0.2.20",
|
|
57
|
+
"typescript": "^3.7.4",
|
|
58
|
+
"uuid": "^3.3.3",
|
|
59
|
+
"winston": "^3.2.1",
|
|
60
|
+
"winston-daily-rotate-file": "^4.2.1",
|
|
61
|
+
"@types/express-serve-static-core": "4.17.30"
|
|
62
|
+
},
|
|
63
|
+
"devDependencies": {
|
|
64
|
+
"@types/dateformat": "^3.0.1",
|
|
65
|
+
"@types/debug": "~4.1.5",
|
|
66
|
+
"@types/dotenv": "^8.2.0",
|
|
67
|
+
"@types/http-errors": "~1.6.1",
|
|
68
|
+
"@types/morgan": "~1.7.37",
|
|
69
|
+
"@types/node": "^14.0.27",
|
|
70
|
+
"@types/node-fetch": "^2.5.3",
|
|
71
|
+
"@types/uuid": "^3.4.6",
|
|
72
|
+
"@types/winston": "2.4.4"
|
|
73
|
+
}
|
|
74
|
+
}
|
package/pull_request_template.md
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
Thank you for your contribution to the repo.
|
|
2
|
-
Before submitting this PR, please make sure:
|
|
3
|
-
|
|
4
|
-
- [ ] Your code builds clean without any errors or warnings
|
|
5
|
-
- [ ] You are using approved terminology
|
|
6
|
-
- [ ] You have added unit tests
|
|
7
|
-
- [ ] You have updated documentation
|
|
8
|
-
- [ ] You have checked related services are updated (eg. gRPC)
|
|
9
|
-
|
|
10
|
-
You may delete the sections as necessary.
|
|
11
|
-
|
|
12
|
-
### Context
|
|
13
|
-
___
|
|
14
|
-
|
|
15
|
-
Fill this up with some context that will be useful to the reviewer that is looking at your PR.
|
|
16
|
-
|
|
17
|
-
Example:
|
|
18
|
-
* Add references to a related previous PR.
|
|
19
|
-
* Link to an existing card on Click Up/Confluence.
|
|
20
|
-
* Link to an issue on Sentry.
|
|
21
|
-
|
|
22
|
-
### Changes
|
|
23
|
-
___
|
|
24
|
-
|
|
25
|
-
Fill this up with the changes that are included in this PR.
|
|
26
|
-
|
|
27
|
-
Example:
|
|
28
|
-
* Added tests.
|
|
29
|
-
* Refactored checkout flow.
|
|
30
|
-
|
|
31
|
-
### Test
|
|
32
|
-
___
|
|
33
|
-
|
|
34
|
-
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
|
|
35
|
-
Please also list any relevant details for your test configuration.
|
|
36
|
-
|
|
37
|
-
- [ ] Test A
|
|
38
|
-
- [ ] Test B
|
|
39
|
-
|
|
40
|
-
### Shout-outs
|
|
41
|
-
___
|
|
1
|
+
Thank you for your contribution to the repo.
|
|
2
|
+
Before submitting this PR, please make sure:
|
|
3
|
+
|
|
4
|
+
- [ ] Your code builds clean without any errors or warnings
|
|
5
|
+
- [ ] You are using approved terminology
|
|
6
|
+
- [ ] You have added unit tests
|
|
7
|
+
- [ ] You have updated documentation
|
|
8
|
+
- [ ] You have checked related services are updated (eg. gRPC)
|
|
9
|
+
|
|
10
|
+
You may delete the sections as necessary.
|
|
11
|
+
|
|
12
|
+
### Context
|
|
13
|
+
___
|
|
14
|
+
|
|
15
|
+
Fill this up with some context that will be useful to the reviewer that is looking at your PR.
|
|
16
|
+
|
|
17
|
+
Example:
|
|
18
|
+
* Add references to a related previous PR.
|
|
19
|
+
* Link to an existing card on Click Up/Confluence.
|
|
20
|
+
* Link to an issue on Sentry.
|
|
21
|
+
|
|
22
|
+
### Changes
|
|
23
|
+
___
|
|
24
|
+
|
|
25
|
+
Fill this up with the changes that are included in this PR.
|
|
26
|
+
|
|
27
|
+
Example:
|
|
28
|
+
* Added tests.
|
|
29
|
+
* Refactored checkout flow.
|
|
30
|
+
|
|
31
|
+
### Test
|
|
32
|
+
___
|
|
33
|
+
|
|
34
|
+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
|
|
35
|
+
Please also list any relevant details for your test configuration.
|
|
36
|
+
|
|
37
|
+
- [ ] Test A
|
|
38
|
+
- [ ] Test B
|
|
39
|
+
|
|
40
|
+
### Shout-outs
|
|
41
|
+
___
|
|
42
42
|
Fill this up with the people that have helped you out along the way to thank them! :tada
|
package/sonar-project.properties
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
sonar.projectKey=HandshakesByDC_SkyEye-SVC-Common-Utils
|
|
2
|
-
sonar.organization=handshakesbydc
|
|
3
|
-
|
|
4
|
-
# This is the name and version displayed in the SonarCloud UI.
|
|
5
|
-
#sonar.projectName=SkyEye-SVC-Announcement
|
|
6
|
-
#sonar.projectVersion=1.0
|
|
7
|
-
|
|
8
|
-
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
|
|
9
|
-
#sonar.sources=.
|
|
10
|
-
|
|
11
|
-
# Encoding of the source code. Default is default system encoding
|
|
1
|
+
sonar.projectKey=HandshakesByDC_SkyEye-SVC-Common-Utils
|
|
2
|
+
sonar.organization=handshakesbydc
|
|
3
|
+
|
|
4
|
+
# This is the name and version displayed in the SonarCloud UI.
|
|
5
|
+
#sonar.projectName=SkyEye-SVC-Announcement
|
|
6
|
+
#sonar.projectVersion=1.0
|
|
7
|
+
|
|
8
|
+
# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
|
|
9
|
+
#sonar.sources=.
|
|
10
|
+
|
|
11
|
+
# Encoding of the source code. Default is default system encoding
|
|
12
12
|
#sonar.sourceEncoding=UTF-8
|
package/src/index.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
export * from './utils/appConfig';
|
|
2
|
-
export * from './utils/appConst';
|
|
3
|
-
export * from './utils/commonUtils';
|
|
4
|
-
export * from './utils/authentication/auth';
|
|
5
|
-
export * from './utils/logger/logger';
|
|
6
|
-
export { default as morganLogger } from './utils/logger/morganLogger';
|
|
7
|
-
export * from './utils/middleware/handleError';
|
|
8
|
-
export * from './utils/middleware/startdbConnection';
|
|
9
|
-
export * from './utils/middleware/isPublicUser';
|
|
10
|
-
export * from './utils/baseClass/baseController';
|
|
11
|
-
export * from './utils/baseClass/baseService';
|
|
12
|
-
export * from './interfaces/index';
|
|
13
|
-
export * from './lib/azure/azureKeyVault';
|
|
14
|
-
export * from './lib/azure/azureStorageQueue';
|
|
15
|
-
export * from './lib/azure/azureServiceBusQueue';
|
|
16
|
-
export * from './lib/azure/azureTableStorage';
|
|
17
|
-
export * from './lib/azure/azureBlobStorage';
|
|
18
|
-
export * from './utils/documentation/swagger';
|
|
19
|
-
export * from './lib/httpClient';
|
|
20
|
-
export * from './utils/monitoring/apm';
|
|
1
|
+
export * from './utils/appConfig';
|
|
2
|
+
export * from './utils/appConst';
|
|
3
|
+
export * from './utils/commonUtils';
|
|
4
|
+
export * from './utils/authentication/auth';
|
|
5
|
+
export * from './utils/logger/logger';
|
|
6
|
+
export { default as morganLogger } from './utils/logger/morganLogger';
|
|
7
|
+
export * from './utils/middleware/handleError';
|
|
8
|
+
export * from './utils/middleware/startdbConnection';
|
|
9
|
+
export * from './utils/middleware/isPublicUser';
|
|
10
|
+
export * from './utils/baseClass/baseController';
|
|
11
|
+
export * from './utils/baseClass/baseService';
|
|
12
|
+
export * from './interfaces/index';
|
|
13
|
+
export * from './lib/azure/azureKeyVault';
|
|
14
|
+
export * from './lib/azure/azureStorageQueue';
|
|
15
|
+
export * from './lib/azure/azureServiceBusQueue';
|
|
16
|
+
export * from './lib/azure/azureTableStorage';
|
|
17
|
+
export * from './lib/azure/azureBlobStorage';
|
|
18
|
+
export * from './utils/documentation/swagger';
|
|
19
|
+
export * from './lib/httpClient';
|
|
20
|
+
export * from './utils/monitoring/apm';
|
|
21
21
|
export * from './models/baseControllerParameter';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export interface ApiResponse {
|
|
2
|
-
isSuccess: boolean;
|
|
3
|
-
message?: string;
|
|
4
|
-
data?: any;
|
|
5
|
-
totalCount?: number;
|
|
6
|
-
aggregation?: any;
|
|
1
|
+
export interface ApiResponse {
|
|
2
|
+
isSuccess: boolean;
|
|
3
|
+
message?: string;
|
|
4
|
+
data?: any;
|
|
5
|
+
totalCount?: number;
|
|
6
|
+
aggregation?: any;
|
|
7
7
|
}
|
package/src/interfaces/index.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { ApiResponse } from './apiResponse';
|
|
2
|
-
import { ServiceResponse } from './serviceResponse';
|
|
3
|
-
import { UserInfo } from './userInfo';
|
|
4
|
-
import { Pagination } from './pagination';
|
|
5
|
-
import { SubcriptionFeaturePermissionModel } from './subcriptionFeaturePermissionModel';
|
|
6
|
-
export {
|
|
7
|
-
ApiResponse,
|
|
8
|
-
ServiceResponse,
|
|
9
|
-
UserInfo,
|
|
10
|
-
Pagination,
|
|
11
|
-
SubcriptionFeaturePermissionModel
|
|
1
|
+
import { ApiResponse } from './apiResponse';
|
|
2
|
+
import { ServiceResponse } from './serviceResponse';
|
|
3
|
+
import { UserInfo } from './userInfo';
|
|
4
|
+
import { Pagination } from './pagination';
|
|
5
|
+
import { SubcriptionFeaturePermissionModel } from './subcriptionFeaturePermissionModel';
|
|
6
|
+
export {
|
|
7
|
+
ApiResponse,
|
|
8
|
+
ServiceResponse,
|
|
9
|
+
UserInfo,
|
|
10
|
+
Pagination,
|
|
11
|
+
SubcriptionFeaturePermissionModel
|
|
12
12
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
export class Pagination{
|
|
3
|
-
skip:number;
|
|
4
|
-
take:number;
|
|
5
|
-
order: any;
|
|
6
|
-
constructor(){
|
|
7
|
-
this.skip = 0;
|
|
8
|
-
this.take = 20;
|
|
9
|
-
this.order = null;
|
|
10
|
-
}
|
|
1
|
+
|
|
2
|
+
export class Pagination{
|
|
3
|
+
skip:number;
|
|
4
|
+
take:number;
|
|
5
|
+
order: any;
|
|
6
|
+
constructor(){
|
|
7
|
+
this.skip = 0;
|
|
8
|
+
this.take = 20;
|
|
9
|
+
this.order = null;
|
|
10
|
+
}
|
|
11
11
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export interface ServiceResponse {
|
|
2
|
-
isSuccess: boolean;
|
|
3
|
-
message?: string;
|
|
4
|
-
data?: any;
|
|
5
|
-
totalCount?:number;
|
|
6
|
-
aggregation?:any;
|
|
7
|
-
error?: boolean;
|
|
1
|
+
export interface ServiceResponse {
|
|
2
|
+
isSuccess: boolean;
|
|
3
|
+
message?: string;
|
|
4
|
+
data?: any;
|
|
5
|
+
totalCount?:number;
|
|
6
|
+
aggregation?:any;
|
|
7
|
+
error?: boolean;
|
|
8
8
|
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export class SubcriptionFeaturePermissionModel {
|
|
2
|
-
|
|
3
|
-
organisationGuid: string;
|
|
4
|
-
|
|
5
|
-
organisationName: string;
|
|
6
|
-
|
|
7
|
-
organisationStatus: string;
|
|
8
|
-
|
|
9
|
-
permissionList: string[];
|
|
10
|
-
|
|
11
|
-
featureList: string[];
|
|
12
|
-
|
|
13
|
-
constructor() {
|
|
14
|
-
this.organisationGuid = null;
|
|
15
|
-
this.organisationName = null;
|
|
16
|
-
this.organisationStatus = null;
|
|
17
|
-
this.permissionList = new Array<string>();
|
|
18
|
-
this.featureList = new Array<string>();
|
|
19
|
-
}
|
|
1
|
+
export class SubcriptionFeaturePermissionModel {
|
|
2
|
+
|
|
3
|
+
organisationGuid: string;
|
|
4
|
+
|
|
5
|
+
organisationName: string;
|
|
6
|
+
|
|
7
|
+
organisationStatus: string;
|
|
8
|
+
|
|
9
|
+
permissionList: string[];
|
|
10
|
+
|
|
11
|
+
featureList: string[];
|
|
12
|
+
|
|
13
|
+
constructor() {
|
|
14
|
+
this.organisationGuid = null;
|
|
15
|
+
this.organisationName = null;
|
|
16
|
+
this.organisationStatus = null;
|
|
17
|
+
this.permissionList = new Array<string>();
|
|
18
|
+
this.featureList = new Array<string>();
|
|
19
|
+
}
|
|
20
20
|
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { SubcriptionFeaturePermissionModel } from './subcriptionFeaturePermissionModel';
|
|
2
|
-
|
|
3
|
-
export class UserInfo {
|
|
4
|
-
userName: string;
|
|
5
|
-
|
|
6
|
-
email: string;
|
|
7
|
-
|
|
8
|
-
contactNumber: string;
|
|
9
|
-
|
|
10
|
-
userGuid: string;
|
|
11
|
-
|
|
12
|
-
firstName: string;
|
|
13
|
-
|
|
14
|
-
lastName: string;
|
|
15
|
-
|
|
16
|
-
subcriptionFeaturePermissionModel: SubcriptionFeaturePermissionModel[];
|
|
17
|
-
|
|
18
|
-
requestOrganisation: string;
|
|
19
|
-
|
|
20
|
-
isPublicUser: boolean;
|
|
21
|
-
|
|
22
|
-
exp: number;
|
|
23
|
-
|
|
24
|
-
constructor() {
|
|
25
|
-
this.userName = null;
|
|
26
|
-
this.email = null;
|
|
27
|
-
this.userGuid = null;
|
|
28
|
-
this.firstName = null;
|
|
29
|
-
this.lastName = null;
|
|
30
|
-
this.isPublicUser = null;
|
|
31
|
-
this.subcriptionFeaturePermissionModel = new Array<SubcriptionFeaturePermissionModel>();
|
|
32
|
-
this.requestOrganisation = null;
|
|
33
|
-
this.exp = Math.floor(Date.now() / 1000) + (60 * 60);
|
|
34
|
-
}
|
|
1
|
+
import { SubcriptionFeaturePermissionModel } from './subcriptionFeaturePermissionModel';
|
|
2
|
+
|
|
3
|
+
export class UserInfo {
|
|
4
|
+
userName: string;
|
|
5
|
+
|
|
6
|
+
email: string;
|
|
7
|
+
|
|
8
|
+
contactNumber: string;
|
|
9
|
+
|
|
10
|
+
userGuid: string;
|
|
11
|
+
|
|
12
|
+
firstName: string;
|
|
13
|
+
|
|
14
|
+
lastName: string;
|
|
15
|
+
|
|
16
|
+
subcriptionFeaturePermissionModel: SubcriptionFeaturePermissionModel[];
|
|
17
|
+
|
|
18
|
+
requestOrganisation: string;
|
|
19
|
+
|
|
20
|
+
isPublicUser: boolean;
|
|
21
|
+
|
|
22
|
+
exp: number;
|
|
23
|
+
|
|
24
|
+
constructor() {
|
|
25
|
+
this.userName = null;
|
|
26
|
+
this.email = null;
|
|
27
|
+
this.userGuid = null;
|
|
28
|
+
this.firstName = null;
|
|
29
|
+
this.lastName = null;
|
|
30
|
+
this.isPublicUser = null;
|
|
31
|
+
this.subcriptionFeaturePermissionModel = new Array<SubcriptionFeaturePermissionModel>();
|
|
32
|
+
this.requestOrganisation = null;
|
|
33
|
+
this.exp = Math.floor(Date.now() / 1000) + (60 * 60);
|
|
34
|
+
}
|
|
35
35
|
}
|