@telia-ace/alliance-internal-node-utilities 1.0.2 → 1.0.3-next.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @telia-ace/alliance-internal-node-utilities
2
2
 
3
+ ## 1.0.3-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - ba11e1f: Remove unused error codes.
8
+
9
+ ## 1.0.3-next.0
10
+
11
+ ### Patch Changes
12
+
13
+ - 828548a: Add error code for missing database record.
14
+
3
15
  ## 1.0.2
4
16
 
5
17
  ### Patch Changes
@@ -1,6 +1,5 @@
1
1
  import { HttpStatus } from '@nestjs/common';
2
2
  export declare enum GatewayErrorCodes {
3
- NoMatchingEndpoint = 10000,
4
3
  NoObjectId = 10001,
5
4
  NoTargetAppHeader = 10002,
6
5
  NoTargetWorkspaceHeader = 10003,
@@ -11,7 +10,6 @@ export declare enum GatewayErrorCodes {
11
10
  NoUserInRequestContext = 10008,
12
11
  NoAppInRequestContext = 10009,
13
12
  NoWorkspaceInRequestContext = 10010,
14
- NoManifestInRequestContext = 10011,
15
13
  NoUserPermissionsInRequestContext = 10012,
16
14
  WorkspacePermissionDenied = 10013
17
15
  }
@@ -19,7 +17,8 @@ export declare enum DatabasesErrorCodes {
19
17
  NoPublicKey = 11000,
20
18
  NoAuthHeader = 11001,
21
19
  FailedFileStore = 11002,
22
- FailedFileRead = 11003
20
+ FailedFileRead = 11003,
21
+ NoRecord = 11004
23
22
  }
24
23
  export declare enum PortalErrorCodes {
25
24
  NoObjectId = 12000
package/dist/index.cjs CHANGED
@@ -519,7 +519,6 @@ ${errors.join(
519
519
  }
520
520
 
521
521
  var GatewayErrorCodes = /* @__PURE__ */ ((GatewayErrorCodes2) => {
522
- GatewayErrorCodes2[GatewayErrorCodes2["NoMatchingEndpoint"] = 1e4] = "NoMatchingEndpoint";
523
522
  GatewayErrorCodes2[GatewayErrorCodes2["NoObjectId"] = 10001] = "NoObjectId";
524
523
  GatewayErrorCodes2[GatewayErrorCodes2["NoTargetAppHeader"] = 10002] = "NoTargetAppHeader";
525
524
  GatewayErrorCodes2[GatewayErrorCodes2["NoTargetWorkspaceHeader"] = 10003] = "NoTargetWorkspaceHeader";
@@ -530,7 +529,6 @@ var GatewayErrorCodes = /* @__PURE__ */ ((GatewayErrorCodes2) => {
530
529
  GatewayErrorCodes2[GatewayErrorCodes2["NoUserInRequestContext"] = 10008] = "NoUserInRequestContext";
531
530
  GatewayErrorCodes2[GatewayErrorCodes2["NoAppInRequestContext"] = 10009] = "NoAppInRequestContext";
532
531
  GatewayErrorCodes2[GatewayErrorCodes2["NoWorkspaceInRequestContext"] = 10010] = "NoWorkspaceInRequestContext";
533
- GatewayErrorCodes2[GatewayErrorCodes2["NoManifestInRequestContext"] = 10011] = "NoManifestInRequestContext";
534
532
  GatewayErrorCodes2[GatewayErrorCodes2["NoUserPermissionsInRequestContext"] = 10012] = "NoUserPermissionsInRequestContext";
535
533
  GatewayErrorCodes2[GatewayErrorCodes2["WorkspacePermissionDenied"] = 10013] = "WorkspacePermissionDenied";
536
534
  return GatewayErrorCodes2;
@@ -540,6 +538,7 @@ var DatabasesErrorCodes = /* @__PURE__ */ ((DatabasesErrorCodes2) => {
540
538
  DatabasesErrorCodes2[DatabasesErrorCodes2["NoAuthHeader"] = 11001] = "NoAuthHeader";
541
539
  DatabasesErrorCodes2[DatabasesErrorCodes2["FailedFileStore"] = 11002] = "FailedFileStore";
542
540
  DatabasesErrorCodes2[DatabasesErrorCodes2["FailedFileRead"] = 11003] = "FailedFileRead";
541
+ DatabasesErrorCodes2[DatabasesErrorCodes2["NoRecord"] = 11004] = "NoRecord";
543
542
  return DatabasesErrorCodes2;
544
543
  })(DatabasesErrorCodes || {});
545
544
  var PortalErrorCodes = /* @__PURE__ */ ((PortalErrorCodes2) => {
@@ -548,10 +547,6 @@ var PortalErrorCodes = /* @__PURE__ */ ((PortalErrorCodes2) => {
548
547
  })(PortalErrorCodes || {});
549
548
  const allianceErrors = {
550
549
  // gateway
551
- [1e4 /* NoMatchingEndpoint */]: {
552
- httpCode: common.HttpStatus.BAD_REQUEST,
553
- message: "Could not find endpoint matching request in app manifest."
554
- },
555
550
  [10001 /* NoObjectId */]: {
556
551
  httpCode: common.HttpStatus.UNAUTHORIZED,
557
552
  message: "No object id available on authenticated user."
@@ -592,10 +587,6 @@ const allianceErrors = {
592
587
  httpCode: common.HttpStatus.INTERNAL_SERVER_ERROR,
593
588
  message: "No workspace in request context."
594
589
  },
595
- [10011 /* NoManifestInRequestContext */]: {
596
- httpCode: common.HttpStatus.INTERNAL_SERVER_ERROR,
597
- message: "No manifest in request context."
598
- },
599
590
  [10012 /* NoUserPermissionsInRequestContext */]: {
600
591
  httpCode: common.HttpStatus.INTERNAL_SERVER_ERROR,
601
592
  message: "No user permissions in request context."
@@ -621,6 +612,10 @@ const allianceErrors = {
621
612
  httpCode: common.HttpStatus.INTERNAL_SERVER_ERROR,
622
613
  message: "Error reading file."
623
614
  },
615
+ [11004 /* NoRecord */]: {
616
+ httpCode: common.HttpStatus.INTERNAL_SERVER_ERROR,
617
+ message: "Missing database record."
618
+ },
624
619
  // portal
625
620
  [12e3 /* NoObjectId */]: {
626
621
  httpCode: common.HttpStatus.UNAUTHORIZED,
package/dist/index.mjs CHANGED
@@ -514,7 +514,6 @@ ${errors.join(
514
514
  }
515
515
 
516
516
  var GatewayErrorCodes = /* @__PURE__ */ ((GatewayErrorCodes2) => {
517
- GatewayErrorCodes2[GatewayErrorCodes2["NoMatchingEndpoint"] = 1e4] = "NoMatchingEndpoint";
518
517
  GatewayErrorCodes2[GatewayErrorCodes2["NoObjectId"] = 10001] = "NoObjectId";
519
518
  GatewayErrorCodes2[GatewayErrorCodes2["NoTargetAppHeader"] = 10002] = "NoTargetAppHeader";
520
519
  GatewayErrorCodes2[GatewayErrorCodes2["NoTargetWorkspaceHeader"] = 10003] = "NoTargetWorkspaceHeader";
@@ -525,7 +524,6 @@ var GatewayErrorCodes = /* @__PURE__ */ ((GatewayErrorCodes2) => {
525
524
  GatewayErrorCodes2[GatewayErrorCodes2["NoUserInRequestContext"] = 10008] = "NoUserInRequestContext";
526
525
  GatewayErrorCodes2[GatewayErrorCodes2["NoAppInRequestContext"] = 10009] = "NoAppInRequestContext";
527
526
  GatewayErrorCodes2[GatewayErrorCodes2["NoWorkspaceInRequestContext"] = 10010] = "NoWorkspaceInRequestContext";
528
- GatewayErrorCodes2[GatewayErrorCodes2["NoManifestInRequestContext"] = 10011] = "NoManifestInRequestContext";
529
527
  GatewayErrorCodes2[GatewayErrorCodes2["NoUserPermissionsInRequestContext"] = 10012] = "NoUserPermissionsInRequestContext";
530
528
  GatewayErrorCodes2[GatewayErrorCodes2["WorkspacePermissionDenied"] = 10013] = "WorkspacePermissionDenied";
531
529
  return GatewayErrorCodes2;
@@ -535,6 +533,7 @@ var DatabasesErrorCodes = /* @__PURE__ */ ((DatabasesErrorCodes2) => {
535
533
  DatabasesErrorCodes2[DatabasesErrorCodes2["NoAuthHeader"] = 11001] = "NoAuthHeader";
536
534
  DatabasesErrorCodes2[DatabasesErrorCodes2["FailedFileStore"] = 11002] = "FailedFileStore";
537
535
  DatabasesErrorCodes2[DatabasesErrorCodes2["FailedFileRead"] = 11003] = "FailedFileRead";
536
+ DatabasesErrorCodes2[DatabasesErrorCodes2["NoRecord"] = 11004] = "NoRecord";
538
537
  return DatabasesErrorCodes2;
539
538
  })(DatabasesErrorCodes || {});
540
539
  var PortalErrorCodes = /* @__PURE__ */ ((PortalErrorCodes2) => {
@@ -543,10 +542,6 @@ var PortalErrorCodes = /* @__PURE__ */ ((PortalErrorCodes2) => {
543
542
  })(PortalErrorCodes || {});
544
543
  const allianceErrors = {
545
544
  // gateway
546
- [1e4 /* NoMatchingEndpoint */]: {
547
- httpCode: HttpStatus.BAD_REQUEST,
548
- message: "Could not find endpoint matching request in app manifest."
549
- },
550
545
  [10001 /* NoObjectId */]: {
551
546
  httpCode: HttpStatus.UNAUTHORIZED,
552
547
  message: "No object id available on authenticated user."
@@ -587,10 +582,6 @@ const allianceErrors = {
587
582
  httpCode: HttpStatus.INTERNAL_SERVER_ERROR,
588
583
  message: "No workspace in request context."
589
584
  },
590
- [10011 /* NoManifestInRequestContext */]: {
591
- httpCode: HttpStatus.INTERNAL_SERVER_ERROR,
592
- message: "No manifest in request context."
593
- },
594
585
  [10012 /* NoUserPermissionsInRequestContext */]: {
595
586
  httpCode: HttpStatus.INTERNAL_SERVER_ERROR,
596
587
  message: "No user permissions in request context."
@@ -616,6 +607,10 @@ const allianceErrors = {
616
607
  httpCode: HttpStatus.INTERNAL_SERVER_ERROR,
617
608
  message: "Error reading file."
618
609
  },
610
+ [11004 /* NoRecord */]: {
611
+ httpCode: HttpStatus.INTERNAL_SERVER_ERROR,
612
+ message: "Missing database record."
613
+ },
619
614
  // portal
620
615
  [12e3 /* NoObjectId */]: {
621
616
  httpCode: HttpStatus.UNAUTHORIZED,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telia-ace/alliance-internal-node-utilities",
3
- "version": "1.0.2",
3
+ "version": "1.0.3-next.1",
4
4
  "description": "Utilities used internally by packages developed by team Alliance.",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "Telia Company AB",