@fonoster/common 0.9.20 → 0.9.23
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/GrpcError.d.ts +18 -0
- package/dist/GrpcError.js +1 -1
- package/dist/assistants/LanguageModelProvider.d.ts +18 -0
- package/dist/assistants/LanguageModelProvider.js +1 -1
- package/dist/assistants/assistantSchema.d.ts +18 -0
- package/dist/assistants/assistantSchema.js +2 -2
- package/dist/assistants/conversationSettingsSchema.d.ts +18 -0
- package/dist/assistants/conversationSettingsSchema.js +1 -1
- package/dist/assistants/eventsHookSchema.d.ts +18 -0
- package/dist/assistants/eventsHookSchema.js +1 -1
- package/dist/assistants/index.d.ts +18 -0
- package/dist/assistants/index.js +1 -1
- package/dist/assistants/languageModelConfigSchema.d.ts +18 -0
- package/dist/assistants/languageModelConfigSchema.js +3 -3
- package/dist/assistants/testCasesSchema.d.ts +19 -1
- package/dist/assistants/testCasesSchema.js +2 -2
- package/dist/assistants/tools/index.d.ts +18 -0
- package/dist/assistants/tools/index.js +1 -1
- package/dist/assistants/tools/propertySchema.d.ts +18 -0
- package/dist/assistants/tools/propertySchema.js +1 -1
- package/dist/assistants/tools/toolSchema.d.ts +18 -0
- package/dist/assistants/tools/toolSchema.js +2 -2
- package/dist/constants.d.ts +18 -0
- package/dist/countryIsoCodes.d.ts +18 -0
- package/dist/countryIsoCodes.js +1 -1
- package/dist/envs.js +1 -1
- package/dist/errors/PrismaErrorEnum.d.ts +18 -0
- package/dist/errors/PrismaErrorEnum.js +1 -1
- package/dist/errors/handleError.js +1 -1
- package/dist/errors/handleZodError.js +1 -1
- package/dist/errors/index.d.ts +18 -0
- package/dist/errors/index.js +2 -2
- package/dist/errors/types.d.ts +18 -0
- package/dist/grpcStatusMap.js +1 -1
- package/dist/identity/createAuthInterceptor.js +5 -5
- package/dist/identity/decodeToken.d.ts +1 -1
- package/dist/identity/decodeToken.js +1 -1
- package/dist/identity/errors.d.ts +18 -0
- package/dist/identity/errors.js +1 -1
- package/dist/identity/getAccessKeyIdFromCall.d.ts +18 -0
- package/dist/identity/getPublicKey.js +1 -1
- package/dist/identity/getTokenFromCall.d.ts +18 -0
- package/dist/identity/hasAccess.js +1 -1
- package/dist/identity/index.d.ts +18 -0
- package/dist/identity/index.js +1 -1
- package/dist/identity/isValidToken.js +1 -1
- package/dist/identity/roles.js +1 -2
- package/dist/identity/tokenHasAccessKeyId.js +1 -1
- package/dist/identity/types.d.ts +18 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +1 -1
- package/dist/messages.d.ts +18 -0
- package/dist/messages.js +1 -1
- package/dist/notifications/compileTemplate.js +1 -1
- package/dist/notifications/createSendEmail.js +1 -1
- package/dist/notifications/createSendSmsTwilioImpl.js +1 -1
- package/dist/notifications/index.d.ts +18 -0
- package/dist/notifications/index.js +1 -1
- package/dist/notifications/types.d.ts +18 -0
- package/dist/tts/AzureVoices.d.ts +18 -0
- package/dist/tts/AzureVoices.js +2 -3
- package/dist/tts/DeepgramVoices.d.ts +18 -0
- package/dist/tts/DeepgramVoices.js +2 -3
- package/dist/tts/ElevenLabs.d.ts +18 -0
- package/dist/tts/ElevenLabs.js +2 -3
- package/dist/tts/GoogleVoices.d.ts +18 -0
- package/dist/tts/GoogleVoices.js +2 -3
- package/dist/tts/index.d.ts +18 -0
- package/dist/tts/index.js +1 -1
- package/dist/tts/types.d.ts +18 -0
- package/dist/tts/types.js +1 -1
- package/dist/types.d.ts +18 -0
- package/dist/utils/assertEnvsAreSet.js +1 -1
- package/dist/utils/assertFileExists.js +1 -1
- package/dist/utils/createFetchSingleCallByCallId.d.ts +18 -0
- package/dist/utils/createFetchSingleCallByCallId.js +0 -18
- package/dist/utils/createInterceptingCall.d.ts +18 -0
- package/dist/utils/createService.d.ts +18 -0
- package/dist/utils/createService.js +1 -1
- package/dist/utils/datesMapper.d.ts +18 -0
- package/dist/utils/findIntegrationsCredentials.d.ts +18 -0
- package/dist/utils/findIntegrationsCredentials.js +6 -2
- package/dist/utils/getServerCredentials.js +1 -1
- package/dist/utils/index.d.ts +18 -0
- package/dist/utils/index.js +1 -1
- package/dist/utils/sendHttpRequest.js +1 -1
- package/dist/utils/toCamelCase.js +1 -1
- package/dist/utils/toPascalCase.d.ts +18 -0
- package/dist/utils/toPascalCase.js +1 -1
- package/dist/utils/types.d.ts +18 -0
- package/dist/utils/withErrorHandling.d.ts +18 -0
- package/dist/utils/withErrorHandling.js +2 -2
- package/dist/utils/withErrorHandlingAndValidation.d.ts +18 -0
- package/dist/utils/withValidation.d.ts +18 -0
- package/dist/validators/calls.d.ts +18 -0
- package/dist/validators/calls.js +1 -1
- package/dist/validators/common.d.ts +18 -0
- package/dist/validators/common.js +1 -1
- package/dist/validators/hostOrHostPortSchema.d.ts +18 -0
- package/dist/validators/hostOrHostPortSchema.js +1 -1
- package/dist/validators/identity.d.ts +19 -1
- package/dist/validators/identity.js +2 -2
- package/dist/validators/index.d.ts +18 -0
- package/dist/validators/index.js +1 -1
- package/dist/validators/secrets.d.ts +18 -0
- package/dist/validators/secrets.js +1 -1
- package/dist/validators/sipnet/acls.js +1 -1
- package/dist/validators/sipnet/agents.d.ts +18 -0
- package/dist/validators/sipnet/agents.js +1 -1
- package/dist/validators/sipnet/credentials.d.ts +18 -0
- package/dist/validators/sipnet/credentials.js +1 -1
- package/dist/validators/sipnet/domains.d.ts +18 -0
- package/dist/validators/sipnet/domains.js +1 -1
- package/dist/validators/sipnet/index.d.ts +18 -0
- package/dist/validators/sipnet/index.js +1 -1
- package/dist/validators/sipnet/numbers.js +1 -1
- package/dist/validators/sipnet/trunks.d.ts +18 -0
- package/dist/validators/sipnet/trunks.js +1 -1
- package/dist/voice/Dial.d.ts +18 -0
- package/dist/voice/Gather.d.ts +18 -0
- package/dist/voice/Mute.d.ts +18 -0
- package/dist/voice/Play.d.ts +18 -0
- package/dist/voice/PlayDtmf.d.ts +18 -0
- package/dist/voice/PlaybackControl.d.ts +18 -0
- package/dist/voice/Record.d.ts +18 -0
- package/dist/voice/Say.d.ts +18 -0
- package/dist/voice/Stream.d.ts +18 -0
- package/dist/voice/Stream.js +0 -18
- package/dist/voice/StreamGather.d.ts +18 -0
- package/dist/voice/Verb.d.ts +18 -0
- package/dist/voice/index.d.ts +18 -0
- package/dist/voice/index.js +12 -12
- package/dist/voice/voice.d.ts +19 -1
- package/package.json +4 -3
|
@@ -10,24 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.createFetchSingleCallByCallId = createFetchSingleCallByCallId;
|
|
13
|
-
/*
|
|
14
|
-
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
15
|
-
* http://github.com/fonoster/fonoster
|
|
16
|
-
*
|
|
17
|
-
* This file is part of Fonoster
|
|
18
|
-
*
|
|
19
|
-
* Licensed under the MIT License (the "License");
|
|
20
|
-
* you may not use this file except in compliance with
|
|
21
|
-
* the License. You may obtain a copy of the License at
|
|
22
|
-
*
|
|
23
|
-
* https://opensource.org/licenses/MIT
|
|
24
|
-
*
|
|
25
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
26
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
27
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
28
|
-
* See the License for the specific language governing permissions and
|
|
29
|
-
* limitations under the License.
|
|
30
|
-
*/
|
|
31
13
|
const influxdb_client_1 = require("@influxdata/influxdb-client");
|
|
32
14
|
const constants_1 = require("../constants");
|
|
33
15
|
function createFetchSingleCallByCallId(influxdb) {
|
|
@@ -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 { status as GRPCStatus, ServerInterceptingCall } from "@grpc/grpc-js";
|
|
2
20
|
declare function createInterceptingCall(params: {
|
|
3
21
|
call: ServerInterceptingCall;
|
|
@@ -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 * as grpc from "@grpc/grpc-js";
|
|
2
20
|
type ServiceDefinitionParams = {
|
|
3
21
|
serviceName: string;
|
|
@@ -34,7 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.createServiceDefinition = createServiceDefinition;
|
|
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
|
type ObjectWithDates = {
|
|
2
20
|
createdAt: Date;
|
|
3
21
|
updatedAt: Date;
|
|
@@ -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 function findIntegrationsCredentials(integrations: {
|
|
2
20
|
productRef: string;
|
|
3
21
|
credentials: Record<string, unknown>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findIntegrationsCredentials = findIntegrationsCredentials;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
5
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
6
6
|
* http://github.com/fonoster/fonoster
|
|
7
7
|
*
|
|
@@ -21,5 +21,9 @@ exports.findIntegrationsCredentials = findIntegrationsCredentials;
|
|
|
21
21
|
*/
|
|
22
22
|
function findIntegrationsCredentials(integrations, engine) {
|
|
23
23
|
var _a;
|
|
24
|
-
|
|
24
|
+
const integration = (_a = integrations.find((i) => i.productRef === engine)) === null || _a === void 0 ? void 0 : _a.credentials;
|
|
25
|
+
if (!integration) {
|
|
26
|
+
throw new Error(`Integration ${engine} not found`);
|
|
27
|
+
}
|
|
28
|
+
return integration;
|
|
25
29
|
}
|
|
@@ -43,7 +43,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
};
|
|
44
44
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
45
|
exports.getServerCredentials = getServerCredentials;
|
|
46
|
-
|
|
46
|
+
/**
|
|
47
47
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
48
48
|
* http://github.com/fonoster/fonoster
|
|
49
49
|
*
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -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 "./assertEnvsAreSet";
|
|
2
20
|
export * from "./assertFileExists";
|
|
3
21
|
export * from "./createInterceptingCall";
|
package/dist/utils/index.js
CHANGED
|
@@ -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
|
*
|
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AllowedHttpMethod = void 0;
|
|
13
13
|
exports.sendHttpRequest = sendHttpRequest;
|
|
14
|
-
|
|
14
|
+
/**
|
|
15
15
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
16
16
|
* http://github.com/fonoster/fonoster
|
|
17
17
|
*
|
|
@@ -1,2 +1,20 @@
|
|
|
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 function toPascalCase(str: string): string;
|
|
2
20
|
export { toPascalCase };
|
package/dist/utils/types.d.ts
CHANGED
|
@@ -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 { ParameterizedQuery } from "@influxdata/influxdb-client";
|
|
2
20
|
type InfluxDBClient = {
|
|
3
21
|
collectRows(query: ParameterizedQuery): Promise<unknown[]>;
|
|
@@ -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 { GrpcErrorMessage } from "../errors";
|
|
2
20
|
declare function withErrorHandling(fn: Function): (call: {
|
|
3
21
|
request: unknown;
|
|
@@ -10,8 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.withErrorHandling = withErrorHandling;
|
|
13
|
-
|
|
14
|
-
/*
|
|
13
|
+
/**
|
|
15
14
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
16
15
|
* http://github.com/fonoster/fonoster
|
|
17
16
|
*
|
|
@@ -29,6 +28,7 @@ exports.withErrorHandling = withErrorHandling;
|
|
|
29
28
|
* See the License for the specific language governing permissions and
|
|
30
29
|
* limitations under the License.
|
|
31
30
|
*/
|
|
31
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
32
32
|
const errors_1 = require("../errors");
|
|
33
33
|
function withErrorHandling(fn) {
|
|
34
34
|
return (call, callback) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -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 function withErrorHandlingAndValidation(fn: Function, schema: z.ZodSchema): (call: {
|
|
3
21
|
request: unknown;
|
|
@@ -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 { GrpcErrorMessage } from "../errors";
|
|
3
21
|
declare function withValidation(fn: Function, schema: z.ZodSchema): (call: {
|
|
@@ -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 { CallStatus, CallType } from "@fonoster/types";
|
|
2
20
|
import { z } from "zod";
|
|
3
21
|
declare const createCallRequestSchema: z.ZodObject<{
|
package/dist/validators/calls.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.listCallsRequestSchema = exports.getCallRequestSchema = exports.createCallRequestSchema = 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 usernameSchema: z.ZodString;
|
|
3
21
|
declare const baseApiObjectSchema: z.ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.usernameSchema = exports.nameSchema = exports.listRequestSchema = exports.emptySchema = exports.baseApiObjectSchema = 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 hostOrHostPortSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
3
21
|
export { hostOrHostPortSchema };
|
|
@@ -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 { Role } from "@fonoster/types";
|
|
2
20
|
import { z } from "zod";
|
|
3
21
|
declare const createWorkspaceRequestSchema: z.ZodObject<{
|
|
@@ -61,7 +79,7 @@ declare const createUserRequestSchema: z.ZodObject<{
|
|
|
61
79
|
name: z.ZodString;
|
|
62
80
|
email: z.ZodString;
|
|
63
81
|
password: z.ZodString;
|
|
64
|
-
avatar: z.ZodString
|
|
82
|
+
avatar: z.ZodOptional<z.ZodString>;
|
|
65
83
|
}, "strip", z.ZodTypeAny, {
|
|
66
84
|
name?: string;
|
|
67
85
|
password?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createUserWithOauth2CodeRequestSchema = exports.resetPasswordRequestSchema = exports.sendResetPasswordCodeRequestSchema = exports.verifyCodeRequestSchema = exports.updateWorkspaceRequestSchema = exports.updateUserRequestSchema = exports.sendVerificationCodeRequestSchema = exports.resendWorkspaceMembershipInvitationRequestSchema = exports.removeUserFromWorkspaceRequestSchema = exports.inviteUserToWorkspaceRequestSchema = exports.exchangeRefreshTokenRequestSchema = exports.exchangeOauth2RequestSchema = exports.exchangeCredentialsRequestSchema = exports.exchangeApiKeysRequestSchema = exports.createWorkspaceRequestSchema = exports.createUserRequestSchema = exports.createApiKeyRequestSchema = void 0;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
5
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
6
6
|
* http://github.com/fonoster/fonoster
|
|
7
7
|
*
|
|
@@ -70,7 +70,7 @@ const createUserRequestSchema = zod_1.z.object({
|
|
|
70
70
|
name: zod_1.z.string().max(50, { message: MAX_NAME_MESSAGE }),
|
|
71
71
|
email: zod_1.z.string().email({ message: EMAIL_MESSAGE }),
|
|
72
72
|
password: zod_1.z.string().min(8, { message: PASSWORD_MESSAGE }).max(100),
|
|
73
|
-
avatar: zod_1.z.string().url().max(255, { message: "Invalid avatar URL" })
|
|
73
|
+
avatar: zod_1.z.string().url().max(255, { message: "Invalid avatar URL" }).optional()
|
|
74
74
|
});
|
|
75
75
|
exports.createUserRequestSchema = createUserRequestSchema;
|
|
76
76
|
const createUserWithOauth2CodeRequestSchema = zod_1.z.object({
|
|
@@ -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 "./calls";
|
|
2
20
|
export * from "./common";
|
|
3
21
|
export * from "./hostOrHostPortSchema";
|
package/dist/validators/index.js
CHANGED
|
@@ -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 createSecretRequestSchema: z.ZodObject<{
|
|
3
21
|
name: 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.updateAclRequestSchema = exports.createAclRequestSchema = 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 const createAgentRequestSchema: z.ZodObject<{
|
|
3
21
|
name: z.ZodString;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateAgentRequestSchema = exports.createAgentRequestSchema = 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 createCredentialsRequestSchema: z.ZodObject<{
|
|
3
21
|
name: z.ZodString;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateCredentialsRequestSchema = exports.createCredentialsRequestSchema = void 0;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
5
|
* Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
|
|
6
6
|
* http://github.com/fonoster/fonoster
|
|
7
7
|
*
|