@fonoster/apiserver 0.17.0 → 0.17.2

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.
@@ -56,7 +56,7 @@ function createListApplications(prisma) {
56
56
  const items = result.map(applicationWithEncodedStruct_1.applicationWithEncodedStruct);
57
57
  callback(null, {
58
58
  items,
59
- nextPageToken: items.length < pageSize ? undefined : (_a = result[result.length - 1]) === null || _a === void 0 ? void 0 : _a.ref
59
+ nextPageToken: items.length < pageSize ? "" : (_a = result[result.length - 1]) === null || _a === void 0 ? void 0 : _a.ref
60
60
  });
61
61
  });
62
62
  return (0, common_1.withErrorHandlingAndValidation)(listApplications, common_1.Validators.listRequestSchema);
@@ -70,7 +70,8 @@ function createCreateCallSubscriber(config) {
70
70
  CALL_DIRECTION: "peer-to-pstn",
71
71
  INGRESS_NUMBER: from,
72
72
  APP_REF: appRef,
73
- METADATA: JSON.stringify(metadata)
73
+ METADATA: JSON.stringify(metadata),
74
+ CALL_REF: ref
74
75
  }
75
76
  });
76
77
  });
@@ -29,7 +29,7 @@ type ListCallsRequest = {
29
29
  pageToken?: string;
30
30
  };
31
31
  type ListCallsResponse = {
32
- nextPageToken?: string;
32
+ nextPageToken: string;
33
33
  items: CallDetailRecord[];
34
34
  };
35
35
  type GetCallRequest = {
@@ -49,7 +49,7 @@ function listSecrets(prisma) {
49
49
  })).map(common_1.datesMapper);
50
50
  callback(null, {
51
51
  items: result,
52
- nextPageToken: result.length < pageSize ? undefined : (_a = result[result.length - 1]) === null || _a === void 0 ? void 0 : _a.ref
52
+ nextPageToken: result.length < pageSize ? "" : (_a = result[result.length - 1]) === null || _a === void 0 ? void 0 : _a.ref
53
53
  });
54
54
  });
55
55
  return (0, common_1.withErrorHandlingAndValidation)(fn, common_1.Validators.listRequestSchema);
@@ -16,6 +16,7 @@ const zod_validation_error_1 = require("zod-validation-error");
16
16
  const logger = (0, logger_1.getLogger)({ service: "apiserver", filePath: __filename });
17
17
  function withErrorHandling(fn) {
18
18
  return (request) => __awaiter(this, void 0, void 0, function* () {
19
+ var _a;
19
20
  try {
20
21
  return yield fn(request);
21
22
  }
@@ -29,7 +30,7 @@ function withErrorHandling(fn) {
29
30
  });
30
31
  }
31
32
  else if (err.message !== "Channel not found" &&
32
- !err.message.includes("Channel not found")) {
33
+ !((_a = err.message) === null || _a === void 0 ? void 0 : _a.includes("Channel not found"))) {
33
34
  throw err;
34
35
  }
35
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/apiserver",
3
- "version": "0.17.0",
3
+ "version": "0.17.2",
4
4
  "description": "APIServer for Fonoster",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -22,14 +22,14 @@
22
22
  },
23
23
  "dependencies": {
24
24
  "@deepgram/sdk": "^3.5.1",
25
- "@fonoster/authz": "^0.17.0",
26
- "@fonoster/autopilot": "^0.17.0",
27
- "@fonoster/common": "^0.17.0",
28
- "@fonoster/identity": "^0.17.0",
29
- "@fonoster/logger": "^0.17.0",
30
- "@fonoster/sipnet": "^0.17.0",
31
- "@fonoster/streams": "^0.17.0",
32
- "@fonoster/types": "^0.17.0",
25
+ "@fonoster/authz": "^0.17.1",
26
+ "@fonoster/autopilot": "^0.17.1",
27
+ "@fonoster/common": "^0.17.1",
28
+ "@fonoster/identity": "^0.17.1",
29
+ "@fonoster/logger": "^0.17.1",
30
+ "@fonoster/sipnet": "^0.17.1",
31
+ "@fonoster/streams": "^0.17.1",
32
+ "@fonoster/types": "^0.17.1",
33
33
  "@google-cloud/speech": "^6.6.0",
34
34
  "@google-cloud/text-to-speech": "^5.3.0",
35
35
  "@grpc/grpc-js": "~1.10.11",
@@ -76,5 +76,5 @@
76
76
  "@types/uuid": "^10.0.0",
77
77
  "@types/validator": "^13.15.10"
78
78
  },
79
- "gitHead": "4d1a9afaec6f294184386e009d1a4e292fb3583b"
79
+ "gitHead": "7e58ee6c3906323bea59b25b7043971e8284d593"
80
80
  }