@fonoster/common 0.9.19 → 0.9.22

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.
Files changed (135) hide show
  1. package/dist/GrpcError.d.ts +18 -0
  2. package/dist/GrpcError.js +1 -1
  3. package/dist/assistants/LanguageModelProvider.d.ts +18 -0
  4. package/dist/assistants/LanguageModelProvider.js +1 -1
  5. package/dist/assistants/assistantSchema.d.ts +18 -0
  6. package/dist/assistants/assistantSchema.js +2 -2
  7. package/dist/assistants/conversationSettingsSchema.d.ts +18 -0
  8. package/dist/assistants/conversationSettingsSchema.js +1 -1
  9. package/dist/assistants/eventsHookSchema.d.ts +18 -0
  10. package/dist/assistants/eventsHookSchema.js +1 -1
  11. package/dist/assistants/index.d.ts +18 -0
  12. package/dist/assistants/index.js +1 -1
  13. package/dist/assistants/languageModelConfigSchema.d.ts +18 -0
  14. package/dist/assistants/languageModelConfigSchema.js +3 -3
  15. package/dist/assistants/testCasesSchema.d.ts +19 -1
  16. package/dist/assistants/testCasesSchema.js +2 -2
  17. package/dist/assistants/tools/index.d.ts +18 -0
  18. package/dist/assistants/tools/index.js +1 -1
  19. package/dist/assistants/tools/propertySchema.d.ts +18 -0
  20. package/dist/assistants/tools/propertySchema.js +1 -1
  21. package/dist/assistants/tools/toolSchema.d.ts +18 -0
  22. package/dist/assistants/tools/toolSchema.js +2 -2
  23. package/dist/constants.d.ts +18 -0
  24. package/dist/countryIsoCodes.d.ts +18 -0
  25. package/dist/countryIsoCodes.js +1 -1
  26. package/dist/envs.js +1 -1
  27. package/dist/errors/PrismaErrorEnum.d.ts +18 -0
  28. package/dist/errors/PrismaErrorEnum.js +1 -1
  29. package/dist/errors/handleError.js +1 -1
  30. package/dist/errors/handleZodError.js +1 -1
  31. package/dist/errors/index.d.ts +18 -0
  32. package/dist/errors/index.js +2 -2
  33. package/dist/errors/types.d.ts +18 -0
  34. package/dist/grpcStatusMap.js +1 -1
  35. package/dist/identity/createAuthInterceptor.js +5 -5
  36. package/dist/identity/decodeToken.d.ts +1 -1
  37. package/dist/identity/decodeToken.js +1 -1
  38. package/dist/identity/errors.d.ts +18 -0
  39. package/dist/identity/errors.js +1 -1
  40. package/dist/identity/getAccessKeyIdFromCall.d.ts +18 -0
  41. package/dist/identity/getPublicKey.js +1 -1
  42. package/dist/identity/getTokenFromCall.d.ts +18 -0
  43. package/dist/identity/hasAccess.js +1 -1
  44. package/dist/identity/index.d.ts +18 -0
  45. package/dist/identity/index.js +1 -1
  46. package/dist/identity/isValidToken.js +1 -1
  47. package/dist/identity/roles.js +1 -2
  48. package/dist/identity/tokenHasAccessKeyId.js +1 -1
  49. package/dist/identity/types.d.ts +18 -0
  50. package/dist/index.d.ts +18 -0
  51. package/dist/index.js +1 -1
  52. package/dist/messages.d.ts +18 -0
  53. package/dist/messages.js +1 -1
  54. package/dist/notifications/compileTemplate.js +1 -1
  55. package/dist/notifications/createSendEmail.js +1 -1
  56. package/dist/notifications/createSendSmsTwilioImpl.js +1 -1
  57. package/dist/notifications/index.d.ts +18 -0
  58. package/dist/notifications/index.js +1 -1
  59. package/dist/notifications/types.d.ts +18 -0
  60. package/dist/protos/identity.proto +5 -0
  61. package/dist/tts/AzureVoices.d.ts +18 -0
  62. package/dist/tts/AzureVoices.js +2 -3
  63. package/dist/tts/DeepgramVoices.d.ts +18 -0
  64. package/dist/tts/DeepgramVoices.js +2 -3
  65. package/dist/tts/ElevenLabs.d.ts +18 -0
  66. package/dist/tts/ElevenLabs.js +2 -3
  67. package/dist/tts/GoogleVoices.d.ts +18 -0
  68. package/dist/tts/GoogleVoices.js +2 -3
  69. package/dist/tts/index.d.ts +18 -0
  70. package/dist/tts/index.js +1 -1
  71. package/dist/tts/types.d.ts +18 -0
  72. package/dist/tts/types.js +1 -1
  73. package/dist/types.d.ts +18 -0
  74. package/dist/utils/assertEnvsAreSet.js +1 -1
  75. package/dist/utils/assertFileExists.js +1 -1
  76. package/dist/utils/createFetchSingleCallByCallId.d.ts +18 -0
  77. package/dist/utils/createFetchSingleCallByCallId.js +0 -18
  78. package/dist/utils/createInterceptingCall.d.ts +18 -0
  79. package/dist/utils/createService.d.ts +18 -0
  80. package/dist/utils/createService.js +1 -1
  81. package/dist/utils/datesMapper.d.ts +18 -0
  82. package/dist/utils/findIntegrationsCredentials.d.ts +18 -0
  83. package/dist/utils/findIntegrationsCredentials.js +6 -2
  84. package/dist/utils/getServerCredentials.js +1 -1
  85. package/dist/utils/index.d.ts +18 -0
  86. package/dist/utils/index.js +1 -1
  87. package/dist/utils/sendHttpRequest.js +1 -1
  88. package/dist/utils/toCamelCase.js +1 -1
  89. package/dist/utils/toPascalCase.d.ts +18 -0
  90. package/dist/utils/toPascalCase.js +1 -1
  91. package/dist/utils/types.d.ts +18 -0
  92. package/dist/utils/withErrorHandling.d.ts +18 -0
  93. package/dist/utils/withErrorHandling.js +2 -2
  94. package/dist/utils/withErrorHandlingAndValidation.d.ts +18 -0
  95. package/dist/utils/withValidation.d.ts +18 -0
  96. package/dist/validators/calls.d.ts +18 -0
  97. package/dist/validators/calls.js +1 -1
  98. package/dist/validators/common.d.ts +18 -0
  99. package/dist/validators/common.js +1 -1
  100. package/dist/validators/hostOrHostPortSchema.d.ts +18 -0
  101. package/dist/validators/hostOrHostPortSchema.js +1 -1
  102. package/dist/validators/identity.d.ts +26 -1
  103. package/dist/validators/identity.js +6 -2
  104. package/dist/validators/index.d.ts +18 -0
  105. package/dist/validators/index.js +1 -1
  106. package/dist/validators/secrets.d.ts +18 -0
  107. package/dist/validators/secrets.js +1 -1
  108. package/dist/validators/sipnet/acls.js +1 -1
  109. package/dist/validators/sipnet/agents.d.ts +18 -0
  110. package/dist/validators/sipnet/agents.js +1 -1
  111. package/dist/validators/sipnet/credentials.d.ts +18 -0
  112. package/dist/validators/sipnet/credentials.js +1 -1
  113. package/dist/validators/sipnet/domains.d.ts +18 -0
  114. package/dist/validators/sipnet/domains.js +1 -1
  115. package/dist/validators/sipnet/index.d.ts +18 -0
  116. package/dist/validators/sipnet/index.js +1 -1
  117. package/dist/validators/sipnet/numbers.js +1 -1
  118. package/dist/validators/sipnet/trunks.d.ts +18 -0
  119. package/dist/validators/sipnet/trunks.js +1 -1
  120. package/dist/voice/Dial.d.ts +18 -0
  121. package/dist/voice/Gather.d.ts +18 -0
  122. package/dist/voice/Mute.d.ts +18 -0
  123. package/dist/voice/Play.d.ts +18 -0
  124. package/dist/voice/PlayDtmf.d.ts +18 -0
  125. package/dist/voice/PlaybackControl.d.ts +18 -0
  126. package/dist/voice/Record.d.ts +18 -0
  127. package/dist/voice/Say.d.ts +18 -0
  128. package/dist/voice/Stream.d.ts +18 -0
  129. package/dist/voice/Stream.js +0 -18
  130. package/dist/voice/StreamGather.d.ts +18 -0
  131. package/dist/voice/Verb.d.ts +18 -0
  132. package/dist/voice/index.d.ts +18 -0
  133. package/dist/voice/index.js +12 -12
  134. package/dist/voice/voice.d.ts +19 -1
  135. package/package.json +4 -3
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  declare class GrpcError extends Error {
2
20
  code: number;
3
21
  constructor(code: number, message: string);
package/dist/GrpcError.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GrpcError = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  declare enum LanguageModelProvider {
2
20
  OPENAI = "openai",
3
21
  GROQ = "groq",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.LanguageModelProvider = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { z } from "zod";
2
20
  declare const assistantSchema: z.ZodObject<{
3
21
  conversationSettings: z.ZodObject<{
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.assistantSchema = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -21,9 +21,9 @@ exports.assistantSchema = void 0;
21
21
  */
22
22
  const zod_1 = require("zod");
23
23
  const conversationSettingsSchema_1 = require("./conversationSettingsSchema");
24
+ const eventsHookSchema_1 = require("./eventsHookSchema");
24
25
  const languageModelConfigSchema_1 = require("./languageModelConfigSchema");
25
26
  const testCasesSchema_1 = require("./testCasesSchema");
26
- const eventsHookSchema_1 = require("./eventsHookSchema");
27
27
  const assistantSchema = zod_1.z.object({
28
28
  conversationSettings: conversationSettingsSchema_1.conversationSettingsSchema,
29
29
  languageModel: languageModelConfigSchema_1.languageModelConfigSchema,
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { z } from "zod";
2
20
  declare const conversationSettingsSchema: z.ZodObject<{
3
21
  firstMessage: z.ZodOptional<z.ZodString>;
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.conversationSettingsSchema = void 0;
37
- /*
37
+ /**
38
38
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
39
39
  * http://github.com/fonoster/fonoster
40
40
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { z } from "zod";
2
20
  declare enum EventsHookAllowedEvents {
3
21
  ALL = "all",
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.EventsHookAllowedEvents = exports.eventsHookSchema = void 0;
37
- /*
37
+ /**
38
38
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
39
39
  * http://github.com/fonoster/fonoster
40
40
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  export * from "./tools";
2
20
  export * from "./assistantSchema";
3
21
  export * from "./LanguageModelProvider";
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- /*
17
+ /**
18
18
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
19
19
  * http://github.com/fonoster/fonoster
20
20
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { z } from "zod";
2
20
  import { LanguageModelProvider } from "./LanguageModelProvider";
3
21
  declare const languageModelConfigSchema: z.ZodObject<{
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.languageModelConfigSchema = void 0;
37
- /*
37
+ /**
38
38
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
39
39
  * http://github.com/fonoster/fonoster
40
40
  *
@@ -53,9 +53,9 @@ exports.languageModelConfigSchema = void 0;
53
53
  * limitations under the License.
54
54
  */
55
55
  const zod_1 = require("zod");
56
- const tools_1 = require("./tools");
57
- const LanguageModelProvider_1 = require("./LanguageModelProvider");
58
56
  const Messages = __importStar(require("../messages"));
57
+ const LanguageModelProvider_1 = require("./LanguageModelProvider");
58
+ const tools_1 = require("./tools");
59
59
  const NUMBER_BETWEEN_0_AND_2 = "Must be a number between 0 and 2";
60
60
  const languageModelConfigSchema = zod_1.z.object({
61
61
  provider: zod_1.z.nativeEnum(LanguageModelProvider_1.LanguageModelProvider, {
@@ -1,5 +1,23 @@
1
- import { z } from "zod";
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
2
19
  import { CallDirection } from "@fonoster/types";
20
+ import { z } from "zod";
3
21
  declare const testCasesSchema: z.ZodObject<{
4
22
  evalsLanguageModel: z.ZodObject<{
5
23
  provider: z.ZodEnum<["openai"]>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.testCasesSchema = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -19,8 +19,8 @@ exports.testCasesSchema = void 0;
19
19
  * See the License for the specific language governing permissions and
20
20
  * limitations under the License.
21
21
  */
22
- const zod_1 = require("zod");
23
22
  const types_1 = require("@fonoster/types");
23
+ const zod_1 = require("zod");
24
24
  const testCasesSchema = zod_1.z.object({
25
25
  evalsLanguageModel: zod_1.z.object({
26
26
  provider: zod_1.z.enum(["openai"], {
@@ -1 +1,19 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  export * from "./toolSchema";
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- /*
17
+ /**
18
18
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
19
19
  * http://github.com/fonoster/fonoster
20
20
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { z } from "zod";
2
20
  declare const propertySchema: z.ZodEffects<z.ZodObject<{
3
21
  type: z.ZodString;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.propertySchema = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { z } from "zod";
2
20
  import { AllowedHttpMethod } from "../../utils/sendHttpRequest";
3
21
  declare const toolSchema: z.ZodObject<{
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.toolSchema = void 0;
37
- /*
37
+ /**
38
38
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
39
39
  * http://github.com/fonoster/fonoster
40
40
  *
@@ -53,9 +53,9 @@ exports.toolSchema = void 0;
53
53
  * limitations under the License.
54
54
  */
55
55
  const zod_1 = require("zod");
56
- const propertySchema_1 = require("./propertySchema");
57
56
  const Messages = __importStar(require("../../messages"));
58
57
  const sendHttpRequest_1 = require("../../utils/sendHttpRequest");
58
+ const propertySchema_1 = require("./propertySchema");
59
59
  const toolSchema = zod_1.z.object({
60
60
  name: zod_1.z.string(),
61
61
  description: zod_1.z.string(),
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  import { ServingStatus } from "grpc-health-check";
2
20
  export declare const GRPC_NOT_SERVING_STATUS: ServingStatus;
3
21
  export declare const GRPC_SERVING_STATUS: ServingStatus;
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  declare const countryIsoCodes: {
2
20
  name: string;
3
21
  value: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.countryIsoCodes = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
package/dist/envs.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ROOT_DOMAIN = void 0;
7
- /*
7
+ /**
8
8
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
9
9
  * http://github.com/fonoster/fonoster
10
10
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  declare enum PrismaErrorEnum {
2
20
  RECORD_ALREADY_EXISTS = "P2002",
3
21
  RECORD_NOT_FOUND = "P2025"
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PrismaErrorEnum = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.handleError = handleError;
37
- /*
37
+ /**
38
38
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
39
39
  * http://github.com/fonoster/fonoster
40
40
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.handleZodError = handleZodError;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  export * from "./PrismaErrorEnum";
2
20
  export * from "./handleError";
3
21
  export * from "./handleZodError";
@@ -14,8 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./PrismaErrorEnum"), exports);
18
- /*
17
+ /**
19
18
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
20
19
  * http://github.com/fonoster/fonoster
21
20
  *
@@ -33,6 +32,7 @@ __exportStar(require("./PrismaErrorEnum"), exports);
33
32
  * See the License for the specific language governing permissions and
34
33
  * limitations under the License.
35
34
  */
35
+ __exportStar(require("./PrismaErrorEnum"), exports);
36
36
  __exportStar(require("./handleError"), exports);
37
37
  __exportStar(require("./handleZodError"), exports);
38
38
  __exportStar(require("./types"), exports);
@@ -1,3 +1,21 @@
1
+ /**
2
+ * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
3
+ * http://github.com/fonoster/fonoster
4
+ *
5
+ * This file is part of Fonoster
6
+ *
7
+ * Licensed under the MIT License (the "License");
8
+ * you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * https://opensource.org/licenses/MIT
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ */
1
19
  type GrpcErrorMessage = {
2
20
  code: number;
3
21
  message: string;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.statusMap = void 0;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createAuthInterceptor = createAuthInterceptor;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *
@@ -20,14 +20,14 @@ exports.createAuthInterceptor = createAuthInterceptor;
20
20
  * limitations under the License.
21
21
  */
22
22
  const logger_1 = require("@fonoster/logger");
23
- const roles_1 = require("./roles");
23
+ const decodeToken_1 = require("./decodeToken");
24
+ const errors_1 = require("./errors");
24
25
  const getAccessKeyIdFromCall_1 = require("./getAccessKeyIdFromCall");
25
26
  const getTokenFromCall_1 = require("./getTokenFromCall");
26
- const isValidToken_1 = require("./isValidToken");
27
- const decodeToken_1 = require("./decodeToken");
28
27
  const hasAccess_1 = require("./hasAccess");
28
+ const isValidToken_1 = require("./isValidToken");
29
+ const roles_1 = require("./roles");
29
30
  const tokenHasAccessKeyId_1 = require("./tokenHasAccessKeyId");
30
- const errors_1 = require("./errors");
31
31
  const logger = (0, logger_1.getLogger)({ service: "common", filePath: __filename });
32
32
  /**
33
33
  * This function is a gRPC interceptor that checks if the request is valid
@@ -1,3 +1,3 @@
1
- import { TokenUseEnum, DecodedToken } from "./types";
1
+ import { DecodedToken, TokenUseEnum } from "./types";
2
2
  declare function decodeToken<T extends TokenUseEnum>(token: string): DecodedToken<T>;
3
3
  export { decodeToken };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.decodeToken = decodeToken;
4
- /*
4
+ /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
7
7
  *