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

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,18 @@
1
1
  # @telia-ace/alliance-internal-node-utilities
2
2
 
3
+ ## 1.0.3-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 828548a: Add error code for missing database record.
8
+
9
+ ## 1.0.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 59f0d3f: Remove unnecessary scripts.
14
+ - 9c6dc92: Added utility for creating public static files used in all Alliance portal distributions.
15
+
3
16
  ## 1.0.2-next.1
4
17
 
5
18
  ### Patch Changes
@@ -12,13 +12,15 @@ export declare enum GatewayErrorCodes {
12
12
  NoAppInRequestContext = 10009,
13
13
  NoWorkspaceInRequestContext = 10010,
14
14
  NoManifestInRequestContext = 10011,
15
- NoUserPermissionsInRequestContext = 10012
15
+ NoUserPermissionsInRequestContext = 10012,
16
+ WorkspacePermissionDenied = 10013
16
17
  }
17
18
  export declare enum DatabasesErrorCodes {
18
19
  NoPublicKey = 11000,
19
20
  NoAuthHeader = 11001,
20
21
  FailedFileStore = 11002,
21
- FailedFileRead = 11003
22
+ FailedFileRead = 11003,
23
+ NoRecord = 11004
22
24
  }
23
25
  export declare enum PortalErrorCodes {
24
26
  NoObjectId = 12000
package/dist/index.cjs CHANGED
@@ -532,6 +532,7 @@ var GatewayErrorCodes = /* @__PURE__ */ ((GatewayErrorCodes2) => {
532
532
  GatewayErrorCodes2[GatewayErrorCodes2["NoWorkspaceInRequestContext"] = 10010] = "NoWorkspaceInRequestContext";
533
533
  GatewayErrorCodes2[GatewayErrorCodes2["NoManifestInRequestContext"] = 10011] = "NoManifestInRequestContext";
534
534
  GatewayErrorCodes2[GatewayErrorCodes2["NoUserPermissionsInRequestContext"] = 10012] = "NoUserPermissionsInRequestContext";
535
+ GatewayErrorCodes2[GatewayErrorCodes2["WorkspacePermissionDenied"] = 10013] = "WorkspacePermissionDenied";
535
536
  return GatewayErrorCodes2;
536
537
  })(GatewayErrorCodes || {});
537
538
  var DatabasesErrorCodes = /* @__PURE__ */ ((DatabasesErrorCodes2) => {
@@ -539,6 +540,7 @@ var DatabasesErrorCodes = /* @__PURE__ */ ((DatabasesErrorCodes2) => {
539
540
  DatabasesErrorCodes2[DatabasesErrorCodes2["NoAuthHeader"] = 11001] = "NoAuthHeader";
540
541
  DatabasesErrorCodes2[DatabasesErrorCodes2["FailedFileStore"] = 11002] = "FailedFileStore";
541
542
  DatabasesErrorCodes2[DatabasesErrorCodes2["FailedFileRead"] = 11003] = "FailedFileRead";
543
+ DatabasesErrorCodes2[DatabasesErrorCodes2["NoRecord"] = 11004] = "NoRecord";
542
544
  return DatabasesErrorCodes2;
543
545
  })(DatabasesErrorCodes || {});
544
546
  var PortalErrorCodes = /* @__PURE__ */ ((PortalErrorCodes2) => {
@@ -599,6 +601,10 @@ const allianceErrors = {
599
601
  httpCode: common.HttpStatus.INTERNAL_SERVER_ERROR,
600
602
  message: "No user permissions in request context."
601
603
  },
604
+ [10013 /* WorkspacePermissionDenied */]: {
605
+ httpCode: common.HttpStatus.FORBIDDEN,
606
+ message: "User does not have access to the current workspace."
607
+ },
602
608
  // databases
603
609
  [11e3 /* NoPublicKey */]: {
604
610
  httpCode: common.HttpStatus.UNAUTHORIZED,
@@ -616,6 +622,10 @@ const allianceErrors = {
616
622
  httpCode: common.HttpStatus.INTERNAL_SERVER_ERROR,
617
623
  message: "Error reading file."
618
624
  },
625
+ [11004 /* NoRecord */]: {
626
+ httpCode: common.HttpStatus.INTERNAL_SERVER_ERROR,
627
+ message: "Missing database record."
628
+ },
619
629
  // portal
620
630
  [12e3 /* NoObjectId */]: {
621
631
  httpCode: common.HttpStatus.UNAUTHORIZED,
package/dist/index.mjs CHANGED
@@ -527,6 +527,7 @@ var GatewayErrorCodes = /* @__PURE__ */ ((GatewayErrorCodes2) => {
527
527
  GatewayErrorCodes2[GatewayErrorCodes2["NoWorkspaceInRequestContext"] = 10010] = "NoWorkspaceInRequestContext";
528
528
  GatewayErrorCodes2[GatewayErrorCodes2["NoManifestInRequestContext"] = 10011] = "NoManifestInRequestContext";
529
529
  GatewayErrorCodes2[GatewayErrorCodes2["NoUserPermissionsInRequestContext"] = 10012] = "NoUserPermissionsInRequestContext";
530
+ GatewayErrorCodes2[GatewayErrorCodes2["WorkspacePermissionDenied"] = 10013] = "WorkspacePermissionDenied";
530
531
  return GatewayErrorCodes2;
531
532
  })(GatewayErrorCodes || {});
532
533
  var DatabasesErrorCodes = /* @__PURE__ */ ((DatabasesErrorCodes2) => {
@@ -534,6 +535,7 @@ var DatabasesErrorCodes = /* @__PURE__ */ ((DatabasesErrorCodes2) => {
534
535
  DatabasesErrorCodes2[DatabasesErrorCodes2["NoAuthHeader"] = 11001] = "NoAuthHeader";
535
536
  DatabasesErrorCodes2[DatabasesErrorCodes2["FailedFileStore"] = 11002] = "FailedFileStore";
536
537
  DatabasesErrorCodes2[DatabasesErrorCodes2["FailedFileRead"] = 11003] = "FailedFileRead";
538
+ DatabasesErrorCodes2[DatabasesErrorCodes2["NoRecord"] = 11004] = "NoRecord";
537
539
  return DatabasesErrorCodes2;
538
540
  })(DatabasesErrorCodes || {});
539
541
  var PortalErrorCodes = /* @__PURE__ */ ((PortalErrorCodes2) => {
@@ -594,6 +596,10 @@ const allianceErrors = {
594
596
  httpCode: HttpStatus.INTERNAL_SERVER_ERROR,
595
597
  message: "No user permissions in request context."
596
598
  },
599
+ [10013 /* WorkspacePermissionDenied */]: {
600
+ httpCode: HttpStatus.FORBIDDEN,
601
+ message: "User does not have access to the current workspace."
602
+ },
597
603
  // databases
598
604
  [11e3 /* NoPublicKey */]: {
599
605
  httpCode: HttpStatus.UNAUTHORIZED,
@@ -611,6 +617,10 @@ const allianceErrors = {
611
617
  httpCode: HttpStatus.INTERNAL_SERVER_ERROR,
612
618
  message: "Error reading file."
613
619
  },
620
+ [11004 /* NoRecord */]: {
621
+ httpCode: HttpStatus.INTERNAL_SERVER_ERROR,
622
+ message: "Missing database record."
623
+ },
614
624
  // portal
615
625
  [12e3 /* NoObjectId */]: {
616
626
  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-next.1",
3
+ "version": "1.0.3-next.0",
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",