@routr/common 2.0.8-alpha.40 → 2.0.8-alpha.41

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/dist/auth.d.ts CHANGED
@@ -24,8 +24,12 @@ export declare const createUnauthorizedResponse: (realm: string, params?: {
24
24
  qop: string;
25
25
  algorithm: string;
26
26
  }) => {
27
+ metadata: {
28
+ accessKeyId: string;
29
+ };
27
30
  message: {
28
31
  responseType: ResponseType;
32
+ reasonPhrase: string;
29
33
  wwwAuthenticate: {
30
34
  scheme: string;
31
35
  realm: string;
package/dist/auth.js CHANGED
@@ -58,8 +58,12 @@ const getCredentials = (username, users) => users.find((user) => user.username =
58
58
  exports.getCredentials = getCredentials;
59
59
  const createUnauthorizedResponse = (realm, params = { qop: "auth", algorithm: DEFAULT_ALGORITHM }) => {
60
60
  return {
61
+ metadata: {
62
+ accessKeyId: "xxxxxxxxx"
63
+ },
61
64
  message: {
62
65
  responseType: types_1.ResponseType.UNAUTHORIZED,
66
+ reasonPhrase: "Bro fix your password",
63
67
  wwwAuthenticate: {
64
68
  scheme: "Digest",
65
69
  realm: realm,
@@ -82,10 +82,11 @@ message MessageRequest {
82
82
  repeated string external_addrs = 6;
83
83
  repeated string localnets = 7;
84
84
  fonoster.routr.sipmessage.v2draft1.SIPMessage message = 8;
85
- // .google.protobuf.Struct metadata = 9;
85
+ map<string, string> metadata = 9;
86
86
  }
87
87
 
88
88
  message MessageResponse {
89
89
  NetInterface sender = 1;
90
90
  fonoster.routr.sipmessage.v2draft1.SIPMessage message = 2;
91
+ map<string, string> metadata = 3;
91
92
  }
package/dist/types.d.ts CHANGED
@@ -59,6 +59,7 @@ export interface MessageRequest {
59
59
  externalAddrs: string[];
60
60
  localnets: string[];
61
61
  message: SIPMessage;
62
+ metadata?: Record<string, string>;
62
63
  }
63
64
  export interface MessageResponse {
64
65
  message: Record<string, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@routr/common",
3
- "version": "2.0.8-alpha.40",
3
+ "version": "2.0.8-alpha.41",
4
4
  "description": "Common package",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/routr#readme",
@@ -55,5 +55,5 @@
55
55
  "devDependencies": {
56
56
  "@types/js-yaml": "^4.0.5"
57
57
  },
58
- "gitHead": "3ac346a36a43ba06578accf48d7a4adac24a0911"
58
+ "gitHead": "52f44320b57824dfea40f48b02b44b9a8e6bdda3"
59
59
  }